| | |
| | | <template slot-scope="scope"> |
| | | <!-- <el-button type="text" @click="showEditHandle(scope.row)">编辑</el-button>--> |
| | | <el-button type="text" @click="showEnterPriseDetailForm('修改',scope.row)" >编辑</el-button> |
| | | <el-button v-if="userType != 3" :disabled="disableRole(scope.row)" type="text" align="center" @click="deleteById('删除',scope.row)" >删除</el-button> |
| | | <el-button v-if="userType != 3" :disabled="disableRole(scope.row)" type="text" align="center" @click="changeStatus('停用',scope.row)" >{{scope.row.enterprisestatus == '停止'?'启用':'停用'}}</el-button> |
| | | <el-button v-if="isSupervision==='null'" type="text" align="center" @click="deleteById('删除',scope.row)" >删除</el-button> |
| | | <el-button v-if="isShow" type="text" align="center" @click="deleteByName(scope.row)" >完全删除</el-button> |
| | | <el-button v-if="isSupervision==='null'" type="text" align="center" @click="changeStatus('停用',scope.row)" >{{scope.row.enterprisestatus == '停止'?'启用':'停用'}}</el-button> |
| | | <!-- <el-button :disabled="scope.row.type==1" type="text" style="color:red;" @click="deleteHandle(scope.row)" v-if="scope.row.infostatus === '待审批' ? false : true ">重置密码</el-button>--> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | import { dictionaryAllItems } from "../../api/dictionary"; |
| | | import enterpriseDetailForm from "./enterpriseDetailForm" |
| | | import { userList, createUser, deleteUser, updateUser } from '@/api/user' |
| | | import { enterpriseList,addEnterprise ,deleteEnterprise ,exportEnterprise,deactivateEnterprise,activateEnterprise} from '@/api/enterprise' |
| | | import { enterpriseList,addEnterprise ,deleteEnterprise ,exportEnterprise,deactivateEnterprise,activateEnterprise,totalDeleteEnterprise} from '@/api/enterprise' |
| | | import { exportFeed} from '@/api/Feed' |
| | | import { roleList } from '@/api/role' |
| | | import { parseTime, computePageCount, parseUserType } from '@/utils' |
| | |
| | | currentPage: 1, |
| | | pageTotal: 0, |
| | | tableKey: 0, |
| | | isShow: false, |
| | | enterpriseList: [], |
| | | enterpriseFilter:{ |
| | | enterprisesize:'' |
| | |
| | | this.getEconomicTypeList() |
| | | this.getSafetySuperVisionList() |
| | | this.getEconomicIndustryList() |
| | | const roles = JSON.parse(Cookies.get('roles')) |
| | | if(roles.find(i=>i.name == '管理员'|| i.name == '超级管理员')){ |
| | | this.isShow = true |
| | | }else{ |
| | | this.isShow = false |
| | | } |
| | | }, |
| | | methods: { |
| | | getEnterpriseList() { |
| | |
| | | }) |
| | | }) |
| | | },//删除企业 |
| | | |
| | | async deleteByName(row){ |
| | | console.log(row,'row') |
| | | this.$confirm('删除此条信息,是否继续','提示',{ |
| | | confirmButtonText:'确定', |
| | | cancelButtonText:'取消', |
| | | type:'warning', |
| | | }).then(()=> { |
| | | totalDeleteEnterprise(row.enterprisename).then( (res)=>{ |
| | | if(res.data.code === "200"){ |
| | | this.$notify({ |
| | | title:'成功', |
| | | message:'删除成功', |
| | | type:'success', |
| | | duration:2000, |
| | | }) |
| | | this.getEnterpriseList() |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:res.data.message |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | async changeStatus(title,row){ |
| | | if (row.enterprisestatus == '停止' ) { |
| | | this.$confirm('是否确认启用此企业','提示',{ |