|
@@ -13,7 +13,7 @@
|
|
|
|
|
|
<template slot="yangpinKeyId" slot-scope="text, record,index">
|
|
|
<a-form-model-item :prop="'list.'+index+'.yangpinKeyId'" :rules="validatorRules.yangpinKeyId">
|
|
|
- <a-select :disabled="formDisabled" v-model="record.yangpinKeyId" allowClear :dropdownMatchSelectWidth="false" option-label-prop="label" @change="handleChange2">
|
|
|
+ <a-select :disabled="formDisabled" v-model="record.yangpinKeyId" allowClear :dropdownMatchSelectWidth="false" option-label-prop="label" @change="handleChange">
|
|
|
<!-- 针对样品名称有相同的情况,做以下更改 -->
|
|
|
<!-- <a-select-option v-for="d in yangpins" :key="d.sampleName"> -->
|
|
|
<a-select-option v-for="d in yangpins" :key="d.key" :label="d.sampleName" :channel="d">
|
|
@@ -40,8 +40,8 @@
|
|
|
</template>
|
|
|
|
|
|
|
|
|
- <template slot="standardRequirement" slot-scope="text, record,index">
|
|
|
- <a-form-model-item :prop="'list.'+index+'.standardRequirement'" :rules="validatorRules.standardRequirement">
|
|
|
+ <template slot="standardRequirementQ" slot-scope="text, record,index">
|
|
|
+ <a-form-model-item :prop="'list.'+index+'.standardRequirementQ'" :rules="validatorRules.standardRequirementQ">
|
|
|
<!-- <j-multi-select-tag :disabled="formDisabled" v-model="record.standardRequirement" :dropdownMatchSelectWidth="false" dictCode="itdm_weituo_yiju,name,name" /> -->
|
|
|
<!-- 为了解决下拉框显示不全的问题,原来的没有对应参数配置 -->
|
|
|
<a-select
|
|
@@ -53,8 +53,8 @@
|
|
|
@change="handleDescCate"
|
|
|
mode="multiple"
|
|
|
>
|
|
|
- <a-select-option v-for="(item) in yijuLists" :key="item.name">
|
|
|
- {{ item.name }}
|
|
|
+ <a-select-option v-for="yj in yijuLists" :key="yj.name" :label="yj.name">
|
|
|
+ {{ yj.name }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
@@ -175,11 +175,11 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
title: '检测依据',
|
|
|
- dataIndex: 'standardRequirement',
|
|
|
- key: 'standardRequirement',
|
|
|
+ dataIndex: 'standardRequirementQ',
|
|
|
+ key: 'standardRequirementQ',
|
|
|
align: 'center',
|
|
|
width: '15%',
|
|
|
- scopedSlots: { customRender: 'standardRequirement' }
|
|
|
+ scopedSlots: { customRender: 'standardRequirementQ' }
|
|
|
},
|
|
|
{
|
|
|
title: '判定依据',
|
|
@@ -285,19 +285,27 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 获得选中项信息
|
|
|
- handleChange2(value,optipn) {
|
|
|
+ handleChange(value,optipn) {
|
|
|
console.log(777,value,optipn);
|
|
|
if(value){
|
|
|
const a = optipn.data.attrs.channel
|
|
|
// console.log(a)
|
|
|
+ // 解决下拉选择后多个输入框显示-用$set,估计设置中间变量也能解决
|
|
|
this.$set(this.model.list[this.clickIndex], 'sampleModelSpecification', a.sampleModelSpecification )
|
|
|
this.$set(this.model.list[this.clickIndex], 'yangpinKeyId', a.sampleName )
|
|
|
}
|
|
|
},
|
|
|
|
|
|
// 多选依据
|
|
|
- handleDescCate(item) {
|
|
|
- console.log(item)
|
|
|
+ handleDescCate(value,optipn) {
|
|
|
+ // console.log(value, optipn)
|
|
|
+ // 这里用$set不好使
|
|
|
+ // this.$set(this.model.list[this.clickIndex], 'standardRequirementQ', value)
|
|
|
+ // 解决多选数据选择不回显--设置中间变量
|
|
|
+ const newData = [...this.model.list];
|
|
|
+ const target = newData[this.clickIndex];
|
|
|
+ target.standardRequirementQ = value;
|
|
|
+ this.model.list = newData;
|
|
|
},
|
|
|
|
|
|
newMember() {
|
|
@@ -322,32 +330,21 @@ export default {
|
|
|
const newData = this.model.list.filter(item => item.key !== key)
|
|
|
this.model.list = newData
|
|
|
},
|
|
|
- saveRow(key) {
|
|
|
- let target = this.model.list.filter(item => item.key === key)[0]
|
|
|
- target.editable = false
|
|
|
- target.isNew = false
|
|
|
-
|
|
|
- },
|
|
|
+ // saveRow(key) {
|
|
|
+ // let target = this.model.list.filter(item => item.key === key)[0]
|
|
|
+ // target.editable = false
|
|
|
+ // target.isNew = false
|
|
|
+ // },
|
|
|
|
|
|
- handleChange(value, key, column) {
|
|
|
- const newData = [...this.model.list]
|
|
|
- const target = newData.filter(item => key === item.key)[0]
|
|
|
- if (target) {
|
|
|
- target[column] = value
|
|
|
- this.model.list = newData
|
|
|
- }
|
|
|
- },
|
|
|
submitForm() {
|
|
|
// sessionStorage.setItem('yangpinkz', JSON.stringify(this.model.list))
|
|
|
this.$store.commit('SET_SHIYANINFO', this.model.list);
|
|
|
|
|
|
this.$refs.form.validate(valid => {
|
|
|
- if (valid) {
|
|
|
-
|
|
|
+ if (valid) {
|
|
|
this.$emit('submitForm')
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
},
|
|
|
prevStep() {
|
|
|
// sessionStorage.setItem('yangpinkz', JSON.stringify(this.model.list))
|