[update] 调年度制修订计划两个流程

This commit is contained in:
lideqin
2023-10-24 17:59:40 +08:00
parent 4e1d090c78
commit 9ab2eb4c24
17 changed files with 711 additions and 159 deletions
@@ -120,13 +120,53 @@ export default {
}
]
},
modalType: '' // 是在新增还是在编辑,编辑的时候放正在编辑的下标
modalType: '', // 是在新增还是在编辑,编辑的时候放正在编辑的下标
data: undefined
}
},
methods: {
// 选择用户得到用户名
userSelectNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value
},
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
this.data = data
// 给表单赋值
// this.formInline =
// 给表格赋值
// this.$nextTick(() => {
// this.$refs.tableRef.dataSource =
// })
},
// 外层要获取数据
getData () {
// 把数据抛出
const data = {}
data.formInline = this.formInline
data.dataSource = this.$refs.tableRef.dataSource
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
getDataValidate (callback) {
// 可能是表单,也可能是表格,表单校验一定要填,有是否下发联络人
this.$refs.ruleForm.validate(result => {
if (result) {
if (this.$refs.tableRef.dataSource && this.$refs.tableRef.dataSource.length > 0) {
const data = {}
data.formInline = this.formInline
data.dataSource = this.$refs.tableRef.dataSource
callback(data)
} else {
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
const data = false
callback(data)
}
} else {
const data = false
callback(data)
}
})
}
}
}