|
@@ -4,6 +4,7 @@
|
|
|
:columns="columns"
|
|
|
:dataSource="model.list"
|
|
|
:pagination="false"
|
|
|
+ :customRow="clickThenCheck"
|
|
|
>
|
|
|
|
|
|
|
|
@@ -23,6 +24,12 @@
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
|
|
|
+ <template slot="sampleModelSpecification" slot-scope="text, record,index">
|
|
|
+ <a-form-model-item :prop="'list.'+index+'.sampleModelSpecification'">
|
|
|
+ <a-input disabled v-model="record.sampleModelSpecification" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
<template slot="testItems" slot-scope="text, record,index">
|
|
|
<a-form-model-item :prop="'list.'+index+'.testItems'" :rules="validatorRules.testItems">
|
|
|
<a-input :disabled="formDisabled" v-model="record.testItems" />
|
|
@@ -34,8 +41,16 @@
|
|
|
<a-form-model-item :prop="'list.'+index+'.standardRequirement'" :rules="validatorRules.standardRequirement">
|
|
|
<!-- <j-multi-select-tag :disabled="formDisabled" v-model="record.standardRequirement" :dropdownMatchSelectWidth="false" dictCode="itdm_weituo_yiju,name,name" /> -->
|
|
|
<!-- 为了解决下拉框显示不全的问题,原来的没有对应参数配置 -->
|
|
|
- <a-select :disabled="formDisabled" v-model="record.standardRequirement" allowClear :dropdownMatchSelectWidth="false" mode="multiple">
|
|
|
- <a-select-option v-for="(item, index) in yijuLists" :key="index">
|
|
|
+ <a-select
|
|
|
+ :disabled="formDisabled"
|
|
|
+ v-model="record.standardRequirement"
|
|
|
+ allowClear
|
|
|
+ optionFilterProp="label"
|
|
|
+ :dropdownMatchSelectWidth="false"
|
|
|
+ @change="handleDescCate"
|
|
|
+ mode="multiple"
|
|
|
+ >
|
|
|
+ <a-select-option v-for="(item) in yijuLists" :key="item.name">
|
|
|
{{ item.name }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
@@ -112,6 +127,8 @@ export default {
|
|
|
return {
|
|
|
yangpins: {},
|
|
|
count: 1,
|
|
|
+ // 当前点击的是第几行
|
|
|
+ clickIndex: -1,
|
|
|
model: {
|
|
|
list: []
|
|
|
},
|
|
@@ -138,6 +155,14 @@ export default {
|
|
|
scopedSlots: { customRender: 'yangpinKeyId' }
|
|
|
},
|
|
|
{
|
|
|
+ title: '规格型号',
|
|
|
+ dataIndex: 'sampleModelSpecification',
|
|
|
+ key: 'sampleModelSpecification',
|
|
|
+ align: 'center',
|
|
|
+ width: '15%',
|
|
|
+ scopedSlots: { customRender: 'sampleModelSpecification' }
|
|
|
+ },
|
|
|
+ {
|
|
|
title: '检测项目',
|
|
|
dataIndex: 'testItems',
|
|
|
key: 'testItems',
|
|
@@ -195,9 +220,12 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.getYijuLists()
|
|
|
+ console.log(JSON.parse(sessionStorage.getItem('yangpin')))
|
|
|
+ console.log(JSON.parse(sessionStorage.getItem('yangpinkz')))
|
|
|
const data = JSON.parse(sessionStorage.getItem('yangpinkz'))
|
|
|
if (data != null) {
|
|
|
this.model.list=data
|
|
|
+
|
|
|
}else{
|
|
|
this.newMember()
|
|
|
}
|
|
@@ -221,12 +249,30 @@ export default {
|
|
|
this.yijuLists = res.result
|
|
|
})
|
|
|
},
|
|
|
+ // 获取当前点击行是哪儿一行
|
|
|
+ clickThenCheck(record, index){
|
|
|
+ return {
|
|
|
+ on: {
|
|
|
+ click: () => {
|
|
|
+ // console.log(record, index)
|
|
|
+ this.clickIndex = index
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
// 获得选中项信息
|
|
|
handleChange2(value,optipn) {
|
|
|
console.log(777,value,optipn);
|
|
|
const a = optipn.data.attrs.channel
|
|
|
console.log(a)
|
|
|
+ this.model.list[this.clickIndex].sampleModelSpecification = a.sampleModelSpecification
|
|
|
+ console.log(this.model)
|
|
|
+ },
|
|
|
+
|
|
|
+ // 多选依据
|
|
|
+ handleDescCate(item) {
|
|
|
+ console.log(item)
|
|
|
},
|
|
|
|
|
|
newMember() {
|
|
@@ -234,7 +280,7 @@ export default {
|
|
|
key: this.count + '',
|
|
|
yangpinKeyId: '',
|
|
|
testItems: '',
|
|
|
- standardRequirement: '',
|
|
|
+ standardRequirement: [],
|
|
|
judgementBasis: '',
|
|
|
yijufile: '',
|
|
|
beizhu: '',
|
|
@@ -267,6 +313,7 @@ export default {
|
|
|
},
|
|
|
submitForm() {
|
|
|
sessionStorage.setItem('yangpinkz', JSON.stringify(this.model.list))
|
|
|
+ // sessionStorage.setItem('yangpin', JSON.stringify(this.model.list))
|
|
|
|
|
|
this.$refs.form.validate(valid => {
|
|
|
if (valid) {
|