[add] 参数项收集清单
This commit is contained in:
@@ -78,7 +78,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%">
|
||||
<table-collection ref="CollectionTabel" :url='url' :paramsManifest='paramsManifest'/>
|
||||
<table-collection ref="CollectionTabel" :url='url' :paramsManifest='paramsManifest' @rowValue='rowValue' @value='value'/>
|
||||
</div>
|
||||
<a-modal v-model="areaVisible" :title="$t('parameterTemplate')" width='750px' :footer="null">
|
||||
</a-modal>
|
||||
@@ -166,7 +166,9 @@ export default {
|
||||
templatetitleId: '',
|
||||
rowId: '',
|
||||
version: 0,
|
||||
itemId: ''
|
||||
itemId: '',
|
||||
selectedRowKeys: [],
|
||||
selectedRowKeysValue: []
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@@ -179,16 +181,38 @@ export default {
|
||||
mounted() {
|
||||
},
|
||||
methods:{
|
||||
rowValue(val) {
|
||||
this.selectedRowKeysValue = val
|
||||
},
|
||||
value(val) {
|
||||
this.selectedRowKeys = val
|
||||
},
|
||||
handleAdd() {
|
||||
//
|
||||
postAction(this.url.add, {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
// _this.getlist()
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
let postDate = []
|
||||
this.selectedRowKeysValue.forEach((item, index) => {
|
||||
let postDateobj = {}
|
||||
Object.keys(item).forEach((itemIn, index) => {
|
||||
if(item[itemIn] instanceof Object) {
|
||||
postDateobj[itemIn] = item[itemIn]
|
||||
}
|
||||
})
|
||||
postDateobj.id = item.id
|
||||
postDate.push(postDateobj)
|
||||
})
|
||||
console.log(postDate,'postDatepostDatepostDatepostDate')
|
||||
if(this.selectedRowKeys.length == 0) {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}else {
|
||||
postAction(this.url.add, postDate).then((res) => {
|
||||
if (res.success) {
|
||||
console.log(res,'lllll')
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
// _this.getlist()
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
handleModule() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user