| | |
| | | <el-table-column |
| | | prop="RowNum" |
| | | width="50" |
| | | fixed |
| | | label="序号" |
| | | /> |
| | | <el-table-column |
| | |
| | | > |
| | | <!-- @close="handleClose"--> |
| | | <div> |
| | | <i class="el-icon-s-operation" style="color:#42b983;margin: -20px 10px 20px 0" />设备点检标准信息 |
| | | <i class="el-icon-s-operation" style="color:#42b983;margin: -20px 10px 20px 0" />设备点检标准信息: |
| | | </div> |
| | | <div style="margin: 0 30px;"> |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | |
| | | code: '', |
| | | name: '', |
| | | enable: 'Y', |
| | | description: ''// 上级单位 |
| | | description: '' |
| | | }, |
| | | operation: '', |
| | | dialogFormRules: { |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.getDeviceCheckStandArdSearch() |
| | | this.handleRequest() |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | |
| | | this.getDeviceCheckItemSelect() |
| | | }, |
| | | methods: { |
| | | handleRequest() { |
| | | this.getDeviceCheckStandArdSearch().then(res => { |
| | | if (res.code === '200') { |
| | | this.getDeviceCheckItemSelect() |
| | | } |
| | | }) |
| | | }, |
| | | async getDeviceCheckStandArdSearch() { |
| | | const res = await DeviceCheckStandArdSearch(this.form) |
| | | this.tableData = res.data |
| | | this.total = res.count |
| | | return { code: res.code } |
| | | }, |
| | | // 排序改变时 |
| | | sortChange({ column, prop, order }) { |
| | |
| | | DeleteDeviceCheckStaned({ checkstand_code: row.code }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('删除成功!') |
| | | if (this.form.page > 1 && this.tableData.length === 1) { |
| | | this.form.page-- |
| | | } |
| | | this.getDeviceCheckStandArdSearch() |
| | | } |
| | | }) |
| | |
| | | this.dialogFormEqp.code = row.code |
| | | |
| | | const { data: res } = await DeviceCheckStanedAssociationEqp({ checkstand_code: row.code }) |
| | | this.dialogFormEqp.eqpAll = res |
| | | this.dialogFormEqp.eqpAll = res.filter(item => item.children.length > 0) |
| | | |
| | | if (this.dialogFormEqp.eqpAll.length > 0) { |
| | | this.dialogFormEqp.eqpAll.forEach((item, index) => { |
| | |
| | | this.dialogFormEqp.eqpAll[index].name = '全部' |
| | | this.dialogFormEqp.eqpTree = [this.dialogFormEqp.eqpAll[index]] |
| | | } |
| | | }) |
| | | this.$nextTick(() => { // 树形回显 |
| | | this.$refs.epqTree.setCheckedKeys(this.dialogFormEqp.eqpCodeSelectedArr) |
| | | }) |
| | | }, |
| | | // 小盒子点击 |
| | |
| | | }) |
| | | this.dialogFormEqp.eqpCodeSelectedArr = [...new Set(this.dialogFormEqp.eqpCodeSelectedArr)] |
| | | } |
| | | |
| | | console.log(this.dialogFormEqp.eqpCodeSelectedArr, 666) |
| | | // 2.第二种情况当树形 半叶 为零 全叶 为零 |
| | | if (halfCheckedKeys.length === 0 && checkedKeys.length === 0) { |
| | | console.log('// 2.第二种情况当树形 半叶 为零 全叶 为零') |