ÎļþÃû´Ó src/components/view/standard_method.vue ÐÞ¸Ä |
| | |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="padding-left: 20px;">æ åæ¹æ³</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <!-- <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">æ°å¢</el-button> --> |
| | | <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">æ°å¢</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <ValueTable ref="ValueTable" :url="$api.standardMethod.selectStandardMethodList" :componentData="componentData" :key="upIndex"/> |
| | | <ValueTable ref="ValueTable" :url="$api.standardMethod.selectStandardMethodList" |
| | | :delUrl="$api.standardMethod.delStandardMethod" :upUrl="$api.standardMethod.upStandardMethod" :componentData="componentData" :key="upIndex"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | font: 'ç¼è¾', |
| | | type: 'text', |
| | | method: 'doDiy', |
| | | field:['createUserName','updateUserName'] |
| | | field:['sampleType','createUserName','updateUserName','æ£éªå¯¹è±¡=structureTestObjectId'] |
| | | },{ |
| | | id: 'delete', |
| | | font: 'å é¤', |
| | | type: 'text', |
| | | method: 'doDiy' |
| | | }], |
| | | tagField: {}, |
| | | selectField: {}, |
| | | requiredAdd:['code','name'], |
| | | requiredUp:['code','name'] |
| | | tagField: { |
| | | structureTestObjectId:{select: []} |
| | | }, |
| | | selectField: { |
| | | structureTestObjectId:{select: []} |
| | | }, |
| | | requiredAdd:['code','name','structureTestObjectId'], |
| | | requiredUp:['code','name','structureTestObjectId'] |
| | | }, |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | |
| | | mounted() { |
| | | this.entityCopy = this.HaveJson(this.componentData.entity) |
| | | this.getPower() |
| | | this.selectTestObjectByName() |
| | | }, |
| | | methods: { |
| | | refreshTable() { |
| | |
| | | let del = false |
| | | let add = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | /* if(power[i].menuMethod=='addEnum'){ |
| | | 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) |
| | |
| | | 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 |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |