Commit c1730110 by lichengming

修改了委托单添加

parent c2681bff
......@@ -102,14 +102,6 @@
@on-result-change="_soilChange" name="sampleDescribe" placeholder="请输入或选择土质描述"
></AutoComplete>
</div>
<div v-else-if="item.key==='itemNames'" @click.stop="_handleRow(scope)">
<el-input
v-model="scope.row.itemNames"
blur
placeholder="试验项目"
readonly
/>
</div>
<div v-else @click.stop="_handleRow(scope)">
<span> {{ scope.row[item.key] }}</span>
</div>
......@@ -352,6 +344,7 @@ export default {
},
methods: {
_itemImportBack(data) {
this.$forceUpdate()
console.log('传过来的数据', data)
for (let i = 0; i < data.length; i++) {
data[i].id = undefined
......@@ -363,13 +356,13 @@ export default {
if (this.getPage.records[index].experimentList !== undefined) {
const name = []
this.itemList = this.getPage.records[index].experimentList
name.push(this.getPage.records[index].itemNames)
name.push(this.getPage.records[index].experiments)
for (let i = 0; i < info.length; i++) {
console.log(this.getPage.records[index].itemNames[i])
console.log(this.getPage.records[index].experiments[i])
this.itemList.push(info[i])
name.push(info[i].name)
}
this.getPage.records[index].itemNames = name.join('、')
this.getPage.records[index].experiments = name.join('、')
this.getPage.records[index].experimentList = this.itemList
this.$set(this.getPage.records, index, this.getPage.records[index])
} else {
......@@ -379,7 +372,7 @@ export default {
this.itemList.push(info[i])
name.push(info[i].name)
}
this.getPage.records[index].itemNames = name.join('、')
this.getPage.records[index].experiments = name.join('、')
this.getPage.records[index].experimentList = this.itemList
this.$set(this.getPage.records, index, this.getPage.records[index])
}
......@@ -595,7 +588,7 @@ export default {
samplePack: '',
sampleDescribe: '',
siteNo: '',
itemNames: ''
experiments: ''
}
this.getPage.records.unshift(data)
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment