[update] 50782

This commit is contained in:
zhaomeijing
2022-04-25 17:42:17 +08:00
parent 862c82faa3
commit 94b7ee3f3a
2 changed files with 28 additions and 8 deletions
@@ -562,6 +562,9 @@
isTableEdit:false, isTableEdit:false,
// 新增添加字段 // 新增添加字段
standardSelectionContent: [], // 所选择的标准选择的全部字段 standardSelectionContent: [], // 所选择的标准选择的全部字段
formArrayName: [], // 标准选择的名字
formArrayId: [], // 标准选择的id
valueItem: '' // 标准选择的自定义字段名
} }
}, },
props:{ props:{
@@ -685,10 +688,25 @@
}, },
//保存 //保存
splitSave(){ splitSave(){
// console.log('vallll',this.contentList) // todo
this.$refs.splitEditForm.validate(valid=>{ this.$refs.splitEditForm.validate(valid=>{
if(valid){ if(valid){
// 标准编号 -- 选取或者填写的
let _formInlinevalueItem = this.formInline[this.valueItem].split(',')
// 标准编号的id临时变量
let _valueItemArr = []
if(this.formArrayName.length > 0) {
this.formArrayName.forEach((item, index) => {
_formInlinevalueItem.forEach((itemlabel, indexlabel) => {
if(itemlabel === item) {
_valueItemArr.push(this.formArrayId[index])
}
})
})
}
if(_valueItemArr.length > 0) {
this.formInline[this.valueItem + '_id'] = _valueItemArr.join(',')
}
this.loading = true this.loading = true
if(!this.submitFlag){ if(!this.submitFlag){
this.submitFlag=true this.submitFlag=true
@@ -1104,14 +1122,16 @@
}, },
changeContent(val) { changeContent(val) {
console.log(val,'kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk')
this.standardSelectionContent = val this.standardSelectionContent = val
console.log(this.standardSelectionContent,'vcalllll')
}, },
StandardselectionChange(value, id) { StandardselectionChange(value, id) {
this.formInline[value + '_id'] = id // todo
this.valueItem = value
if(this.formInline[value] !== undefined) {
this.formArrayName = this.formInline[value].split(',')
this.formArrayId = id.split(',')
}
this.formInline = { ...this.formInline } this.formInline = { ...this.formInline }
console.log(this.formInline,'this.formInlinethis.formInlinethis.formInline')
}, },
PersonnelSelectionChange(value, id) { PersonnelSelectionChange(value, id) {
this.formInline[value + '_id'] = id this.formInline[value + '_id'] = id
+2 -2
View File
@@ -112,7 +112,7 @@ export default {
dataSource: [], dataSource: [],
confirmLoading: false, confirmLoading: false,
url: { url: {
list: 'params/template/list', list: 'params/template/page',
add: 'params/template/add', add: 'params/template/add',
edit: 'params/template/edit', edit: 'params/template/edit',
deleteBatch: 'params/template/delete', deleteBatch: 'params/template/delete',
@@ -278,7 +278,7 @@ export default {
this.getList() this.getList()
return return
} }
this.dataSource = res.result || [] this.dataSource = res.result.records || []
this.total = res.result.total this.total = res.result.total
this.loading = false this.loading = false
} else { } else {