Commit c1730110 by lichengming

修改了委托单添加

parent c2681bff
...@@ -102,14 +102,6 @@ ...@@ -102,14 +102,6 @@
@on-result-change="_soilChange" name="sampleDescribe" placeholder="请输入或选择土质描述" @on-result-change="_soilChange" name="sampleDescribe" placeholder="请输入或选择土质描述"
></AutoComplete> ></AutoComplete>
</div> </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)"> <div v-else @click.stop="_handleRow(scope)">
<span> {{ scope.row[item.key] }}</span> <span> {{ scope.row[item.key] }}</span>
</div> </div>
...@@ -352,6 +344,7 @@ export default { ...@@ -352,6 +344,7 @@ export default {
}, },
methods: { methods: {
_itemImportBack(data) { _itemImportBack(data) {
this.$forceUpdate()
console.log('传过来的数据', data) console.log('传过来的数据', data)
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
data[i].id = undefined data[i].id = undefined
...@@ -363,13 +356,13 @@ export default { ...@@ -363,13 +356,13 @@ export default {
if (this.getPage.records[index].experimentList !== undefined) { if (this.getPage.records[index].experimentList !== undefined) {
const name = [] const name = []
this.itemList = this.getPage.records[index].experimentList 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++) { 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]) this.itemList.push(info[i])
name.push(info[i].name) 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.getPage.records[index].experimentList = this.itemList
this.$set(this.getPage.records, index, this.getPage.records[index]) this.$set(this.getPage.records, index, this.getPage.records[index])
} else { } else {
...@@ -379,7 +372,7 @@ export default { ...@@ -379,7 +372,7 @@ export default {
this.itemList.push(info[i]) this.itemList.push(info[i])
name.push(info[i].name) 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.getPage.records[index].experimentList = this.itemList
this.$set(this.getPage.records, index, this.getPage.records[index]) this.$set(this.getPage.records, index, this.getPage.records[index])
} }
...@@ -595,7 +588,7 @@ export default { ...@@ -595,7 +588,7 @@ export default {
samplePack: '', samplePack: '',
sampleDescribe: '', sampleDescribe: '',
siteNo: '', siteNo: '',
itemNames: '' experiments: ''
} }
this.getPage.records.unshift(data) 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