| | |
| | | <el-button v-if="userType === 1" style="margin-left: 10px;" type="primary" icon="el-icon-download" @click="importUnitCode">导入单位代码</el-button> |
| | | <el-button v-if="userType === 1" style="margin-left: 10px;" type="primary" icon="el-icon-download" @click="exportUnitCode">导出单位代码</el-button> |
| | | <el-button type="primary" icon="el-icon-search" @click="queryHandle" /> |
| | | <el-button type="primary" v-if="isShow" icon="el-icon-delete" @click="openDelete">旧企业清除</el-button> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <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> |
| | |
| | | <el-button type="primary" @click="importHandle()">导入</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | | :visible.sync="deleteVisible" |
| | | append-to-body |
| | | title="清理企业数据" |
| | | :close-on-click-modal="false" |
| | | @close="resetDelete" |
| | | > |
| | | <el-form |
| | | ref="deleteForm" |
| | | label-position="right" |
| | | label-width="120px" |
| | | style="width:500px;" |
| | | element-loading-text="删除中..." |
| | | > |
| | | <el-form-item label="企业名称:"> |
| | | <el-input v-model.trim="deleteForm.enterprisename" class="carrierLicense_select"> |
| | | |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="deleteVisible = false">取消</el-button> |
| | | <el-button type="primary" @click="deleteEnter">确认</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <uploadExcel ref="import" @getinfo="getEnterpriseList"></uploadExcel> |
| | | <div style="clear: both;"></div> |
| | | </div> |
| | |
| | | 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' |
| | |
| | | } |
| | | } |
| | | return { |
| | | deleteVisible: false, |
| | | pageSize: 10, |
| | | recordTotal: 0, |
| | | currentPage: 1, |
| | | pageTotal: 0, |
| | | tableKey: 0, |
| | | isShow: false, |
| | | enterpriseList: [], |
| | | enterpriseFilter:{ |
| | | enterprisesize:'' |
| | |
| | | queryForm: { |
| | | name: '' |
| | | }, |
| | | deleteForm: { |
| | | enterprisename: '' |
| | | }, |
| | | dialogFormVisible: false, |
| | | unitCodeVisible:false, |
| | | dialogStatus: '', |
| | |
| | | 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 deleteEnter(){ |
| | | if(this.deleteForm.enterprisename !== ''){ |
| | | await this.deleteByName(this.deleteForm) |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | | message: '请输入企业名称' |
| | | }) |
| | | } |
| | | }, |
| | | resetDelete(){ |
| | | this.deleteForm = { |
| | | enterprisename:'' |
| | | } |
| | | }, |
| | | async deleteByName(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() |
| | | this.deleteVisible = false |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:res.data.message |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | async changeStatus(title,row){ |
| | | if (row.enterprisestatus == '停止' ) { |
| | | this.$confirm('是否确认启用此企业','提示',{ |
| | |
| | | this.$refs['dataForm'].clearValidate() |
| | | }) |
| | | }, |
| | | |
| | | openDelete(){ |
| | | this.deleteVisible = true |
| | | }, |
| | | updateHandle() { |
| | | this.$refs['dataForm'].validate((valid) => { |
| | | const _this = this |