| | |
| | | value: 1, |
| | | label: '是' |
| | | }] |
| | | }, |
| | | isUse: { |
| | | select: [{ |
| | | value: 0, |
| | | type: 'info', |
| | | label: '否' |
| | | }, { |
| | | value: 1, |
| | | label: '是' |
| | | }] |
| | | }, |
| | | qualificationId:{ |
| | | select: [] |
| | | } |
| | | }, |
| | | selectField: { |
| | |
| | | isProduct: { |
| | | select: [{ |
| | | value: 0, |
| | | type: 'info', |
| | | label: '否' |
| | | }, { |
| | | value: 1, |
| | | label: '是' |
| | | }] |
| | | }, |
| | | isUse: { |
| | | select: [{ |
| | | value: 0, |
| | | type: 'info', |
| | | label: '否' |
| | | }, { |
| | | value: 1, |
| | | label: '是' |
| | | }] |
| | | }, |
| | | qualificationId:{ |
| | | select: [] |
| | | } |
| | | }, |
| | | requiredAdd: ['code', 'name', 'structureTestObjectId', 'isProduct'], |
| | | requiredUp: ['code', 'name', 'structureTestObjectId', 'isProduct'] |
| | | requiredAdd: ['code', 'name', 'structureTestObjectId', 'isProduct','isUse','nameEn'], |
| | | requiredUp: ['code', 'name', 'structureTestObjectId', 'isProduct','isUse','nameEn'] |
| | | }, |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | |
| | | this.entityCopy = this.HaveJson(this.componentData.entity) |
| | | this.getPower() |
| | | this.selectTestObjectByName() |
| | | this.getQualificationList() |
| | | }, |
| | | methods: { |
| | | refreshTable() { |
| | |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let up = false |
| | | let del = fa |
| | | let del = false |
| | | let add = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addStandardMethod') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delStandardMethod') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'upStandardMethod') { |
| | | up = true |
| | | } |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!up) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | }, |
| | | openAdd() { |
| | | this.$refs.ValueTable.openAddDia(this.$api.standardMethod.addStandardMethod); |
| | | }, |
| | | selectTestObjectByName() { |
| | | this.$axios.get(this.$api.capacityScope.selectTestObjectByName).then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.specimenName, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.componentData.selectField.structureTestObjectId.select = data |
| | | this.componentData.tagField.structureTestObjectId.select = data |
| | | }) |
| | | }, |
| | | getQualificationList(){ |
| | | this.$axios.post(this.$api.certification.getCertificationDetail,{ |
| | | page: { |
| | | current: -1, |
| | | size: -1 |
| | | }, |
| | | entity:{ |
| | | name: null, |
| | | }}, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if(res.code==200){ |
| | | let list = res.data.body.records.map(item => { |
| | | item.label = item.name |
| | | item.value = item.id |
| | | return item |
| | | }); |
| | | this.componentData.selectField.qualificationId.select = list |
| | | this.componentData.tagField.qualificationId.select = list |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |