|
@@ -104,7 +104,7 @@ export default {
|
|
|
approver4: []
|
|
approver4: []
|
|
|
},
|
|
},
|
|
|
fileData: {
|
|
fileData: {
|
|
|
- tempalteId: '',
|
|
|
|
|
|
|
+ templateId: '',
|
|
|
name: '',
|
|
name: '',
|
|
|
type: '',
|
|
type: '',
|
|
|
path: '',
|
|
path: '',
|
|
@@ -153,17 +153,17 @@ export default {
|
|
|
pageData = addDataCont
|
|
pageData = addDataCont
|
|
|
} else {
|
|
} else {
|
|
|
pageData = {
|
|
pageData = {
|
|
|
- tempalteId: formData.moBanId,
|
|
|
|
|
|
|
+ templateId: formData.moBanId,
|
|
|
name: formData.biaoDanMingCheng,
|
|
name: formData.biaoDanMingCheng,
|
|
|
file: formData.biaoDanMoBan,
|
|
file: formData.biaoDanMoBan,
|
|
|
type: formData.guiDangLuJing,
|
|
type: formData.guiDangLuJing,
|
|
|
path: formData.cunFangLuJing,
|
|
path: formData.cunFangLuJing,
|
|
|
config: formData.peiZhi,
|
|
config: formData.peiZhi,
|
|
|
- option: formData.muBanXinXi
|
|
|
|
|
|
|
+ option: formData.muBanXinXi ? JSON.parse(formData.muBanXinXi) : {}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
const { shenPiRen1, shenPiRen2, shenPiRen3, shenPiRen4 } = formData || {}
|
|
const { shenPiRen1, shenPiRen2, shenPiRen3, shenPiRen4 } = formData || {}
|
|
|
- const { name, file, type, path, tempalteId, config, option } = pageData || {}
|
|
|
|
|
|
|
+ const { name, file, type, path, templateId, config, option } = pageData || {}
|
|
|
console.log('pageData:', pageData)
|
|
console.log('pageData:', pageData)
|
|
|
this.approverData = {
|
|
this.approverData = {
|
|
|
approver1: shenPiRen1 ? shenPiRen1.split(',') : [],
|
|
approver1: shenPiRen1 ? shenPiRen1.split(',') : [],
|
|
@@ -175,13 +175,13 @@ export default {
|
|
|
this.nodeId = nodeId
|
|
this.nodeId = nodeId
|
|
|
// const res = await editTemplateFile({ fileName: path })
|
|
// const res = await editTemplateFile({ fileName: path })
|
|
|
this.fileData = {
|
|
this.fileData = {
|
|
|
- tempalteId,
|
|
|
|
|
|
|
+ templateId,
|
|
|
name,
|
|
name,
|
|
|
type,
|
|
type,
|
|
|
path,
|
|
path,
|
|
|
file,
|
|
file,
|
|
|
config,
|
|
config,
|
|
|
- option: option ? JSON.parse(option) : {}
|
|
|
|
|
|
|
+ option: option || {}
|
|
|
}
|
|
}
|
|
|
this.showApprover = this.nodeList.length > 0
|
|
this.showApprover = this.nodeList.length > 0
|
|
|
if (!this.isInitialized || this.lastApproval !== config) {
|
|
if (!this.isInitialized || this.lastApproval !== config) {
|
|
@@ -220,7 +220,7 @@ export default {
|
|
|
this.$emit('change-data', 'biaoDanMoBan', this.fileData.file)
|
|
this.$emit('change-data', 'biaoDanMoBan', this.fileData.file)
|
|
|
this.$emit('change-data', 'guiDangLuJing', this.fileData.type)
|
|
this.$emit('change-data', 'guiDangLuJing', this.fileData.type)
|
|
|
this.$emit('change-data', 'cunFangLuJing', this.fileData.path)
|
|
this.$emit('change-data', 'cunFangLuJing', this.fileData.path)
|
|
|
- this.$emit('change-data', 'moBanId', this.fileData.tempalteId)
|
|
|
|
|
|
|
+ this.$emit('change-data', 'moBanId', this.fileData.templateId)
|
|
|
},
|
|
},
|
|
|
shouldShowApprover (index) {
|
|
shouldShowApprover (index) {
|
|
|
return this.nodeList.length > index && (!this.nodeId || !this.nodeIdList.slice(0, index).includes(this.nodeId))
|
|
return this.nodeList.length > index && (!this.nodeId || !this.nodeIdList.slice(0, index).includes(this.nodeId))
|