This commit is contained in:
zhutianqi
2021-08-09 14:14:54 +08:00
parent a44cefdceb
commit e14730c0a6
9 changed files with 104 additions and 55 deletions
@@ -135,6 +135,7 @@
</el-table> </el-table>
</div> </div>
<ProcessFooter <ProcessFooter
show-save
show-submit show-submit
:submitLoading="isSubmit" :submitLoading="isSubmit"
:saveLoading="saveLoading" :saveLoading="saveLoading"
@@ -155,7 +156,7 @@
import ProcessHeader from '../../components/ProcessHeader' import ProcessHeader from '../../components/ProcessHeader'
import ProcessFooter from '../../components/ProcessFooter' import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle' import ProcessTitle from '../../components/ProcessTitle'
import {inboundLiaisonDetail,processCreateStand} from 'api/process' import {inboundLiaisonDetail,processCreateStand,saveTaskForPub} from 'api/process'
export default { export default {
name: "bzdyStep2", name: "bzdyStep2",
@@ -229,7 +230,21 @@
handleTabs(name) { handleTabs(name) {
this.active = name this.active = name
}, },
handleSave() {}, handleSave() {
this.saveLoading = true
let _formData = new FormData()
_formData.append('taskIds', this.taskIds)
_formData.append('json', JSON.stringify({
form: this.form,
commentText: this.commentText,
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
}).catch(e => {
this.saveLoading = false
})
},
handleSubmit() { handleSubmit() {
this.$refs['qbkwForm'].validate((valid) => { this.$refs['qbkwForm'].validate((valid) => {
if (valid) { if (valid) {
@@ -261,11 +276,13 @@
pId: this.pId pId: this.pId
}).then(res => { }).then(res => {
let data = JSON.parse(res.mesg) let data = JSON.parse(res.mesg)
this.form.title = data.title this.form.title = data.title || data.form.title
this.form.date = data.date this.form.date = data.date || data.form.date
this.json = data this.json = data || data.form
this.form.model = data.model this.form.model = data.model || data.form.model
this.form.modelName = data.modelName this.form.modelName = data.modelName || data.form.modelName
this.form.responUserList = data.form.responUserList
this.form.responUserListName = data.form.responUserListName
}).catch(e => { }).catch(e => {
}) })
}) })
@@ -147,6 +147,7 @@
</el-table> </el-table>
</div> </div>
<ProcessFooter <ProcessFooter
show-save
show-submit show-submit
:submitLoading="isSubmit" :submitLoading="isSubmit"
:saveLoading="saveLoading" :saveLoading="saveLoading"
@@ -180,7 +181,7 @@
import ProcessHeader from '../../components/ProcessHeader' import ProcessHeader from '../../components/ProcessHeader'
import ProcessFooter from '../../components/ProcessFooter' import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle' import ProcessTitle from '../../components/ProcessTitle'
import {inboundLiaisonDetail,processCreateStand} from 'api/process' import {inboundLiaisonDetail,processCreateStand,saveTaskForPub} from 'api/process'
export default { export default {
name: "bzdyStep3", name: "bzdyStep3",
@@ -273,7 +274,21 @@
handleTabs(name) { handleTabs(name) {
this.active = name this.active = name
}, },
handleSave() {}, handleSave() {
this.saveLoading = true
let _formData = new FormData()
_formData.append('taskIds', this.taskIds)
_formData.append('json', JSON.stringify({
form: this.form,
commentText: this.commentText,
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
}).catch(e => {
this.saveLoading = false
})
},
handleSubmit() { handleSubmit() {
this.$refs['qbkwForm'].validate((valid) => { this.$refs['qbkwForm'].validate((valid) => {
if (valid) { if (valid) {
@@ -305,13 +320,15 @@
pId: this.pId pId: this.pId
}).then(res => { }).then(res => {
let data = JSON.parse(res.mesg) let data = JSON.parse(res.mesg)
this.form.title = data.title this.form.title = data.title || data.form.title
this.form.date = data.date this.form.date = data.date || data.form.date
this.json = data this.json = data || data.form
this.form.model = data.model this.form.model = data.model || data.form.model
this.form.modelName = data.modelName this.form.modelName = data.modelName || data.form.modelName
this.form.fileName = data.fileName || '' this.form.responUserList = data.form.responUserList
this.form.fileId = data.fileId || '' this.form.responUserListName = data.form.responUserListName
this.form.fileName = data.form.fileName || data.fileName || ''
this.form.fileId = data.form.fileId || data.fileId || ''
}).catch(e => { }).catch(e => {
}) })
}) })
@@ -252,13 +252,14 @@
pId: this.pId pId: this.pId
}).then(res => { }).then(res => {
let data = JSON.parse(res.mesg) let data = JSON.parse(res.mesg)
this.form.title = data.title console.log(data);
this.form.date = data.date this.form.title = data.title || data.form.title
this.json = data this.form.date = data.date || data.form.date
this.form.file = data.fileId this.json = data || data.form
this.form.fileName = data.fileName this.form.file = data.fileId || data.form.fileId
this.form.model = data.model this.form.fileName = data.fileName || data.form.fileName
this.form.modelName = data.modelName this.form.model = data.model || data.form.model
this.form.modelName = data.modelName || data.form.modelName
}).catch(e => { }).catch(e => {
}) })
}) })
@@ -174,6 +174,7 @@
</el-table> </el-table>
</div> </div>
<ProcessFooter <ProcessFooter
show-save
show-submit show-submit
:submitLoading="isSubmit" :submitLoading="isSubmit"
:saveLoading="saveLoading" :saveLoading="saveLoading"
@@ -297,7 +298,21 @@
handleTabs(name) { handleTabs(name) {
this.active = name this.active = name
}, },
handleSave() {}, handleSave() {
this.saveLoading = true
let _formData = new FormData()
_formData.append('taskIds', this.taskIds)
_formData.append('json', JSON.stringify({
form: this.form,
commentText: this.commentText,
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
}).catch(e => {
this.saveLoading = false
})
},
handleSubmit() { handleSubmit() {
this.$refs['qbkwForm'].validate((valid) => { this.$refs['qbkwForm'].validate((valid) => {
if (valid) { if (valid) {
@@ -327,12 +342,12 @@
pId: this.pId pId: this.pId
}).then(res => { }).then(res => {
let data = JSON.parse(res.mesg) let data = JSON.parse(res.mesg)
this.form.title = data.title this.form.title = data.title || data.form.title
this.form.date = data.date this.form.date = data.date || data.form.date
this.json = data this.json = data || data.form
this.tableData = data.responUserList this.tableData = data.responUserList || data.form.responUserList
this.form.hzfileId = data.hzfileId this.form.hzfileId = data.hzfileId || data.form.hzfileId
this.form.hzfileName = data.hzfileName this.form.hzfileName = data.hzfileName || data.form.hzfileName
}).catch(e => { }).catch(e => {
}) })
}) })
@@ -341,12 +341,12 @@
pId: this.pId pId: this.pId
}).then(res => { }).then(res => {
let data = JSON.parse(res.mesg) let data = JSON.parse(res.mesg)
this.form.title = data.title this.form.title = data.title || data.form.title
this.form.date = data.date this.form.date = data.date || data.form.date
this.json = data this.json = data || data.form
this.tableData = data.responUserList this.tableData = data.responUserList || data.form.responUserList
this.form.hzfileName = data.hzfileName this.form.hzfileId = data.hzfileId || data.form.hzfileId
this.form.hzfileId = data.hzfileId this.form.hzfileName = data.hzfileName || data.form.hzfileName
}).catch(e => { }).catch(e => {
}) })
}) })
@@ -341,12 +341,12 @@
pId: this.pId pId: this.pId
}).then(res => { }).then(res => {
let data = JSON.parse(res.mesg) let data = JSON.parse(res.mesg)
this.form.title = data.title this.form.title = data.title || data.form.title
this.form.date = data.date this.form.date = data.date || data.form.date
this.json = data this.json = data || data.form
this.tableData = data.responUserList this.tableData = data.responUserList || data.form.responUserList
this.form.hzfileName = data.hzfileName this.form.hzfileId = data.hzfileId || data.form.hzfileId
this.form.hzfileId = data.hzfileId this.form.hzfileName = data.hzfileName || data.form.hzfileName
}).catch(e => { }).catch(e => {
}) })
}) })
@@ -341,12 +341,12 @@
pId: this.pId pId: this.pId
}).then(res => { }).then(res => {
let data = JSON.parse(res.mesg) let data = JSON.parse(res.mesg)
this.form.title = data.title this.form.title = data.title || data.form.title
this.form.date = data.date this.form.date = data.date || data.form.date
this.json = data this.json = data || data.form
this.tableData = data.responUserList this.tableData = data.responUserList || data.form.responUserList
this.form.hzfileName = data.hzfileName this.form.hzfileId = data.hzfileId || data.form.hzfileId
this.form.hzfileId = data.hzfileId this.form.hzfileName = data.hzfileName || data.form.hzfileName
}).catch(e => { }).catch(e => {
}) })
}) })
@@ -341,12 +341,12 @@
pId: this.pId pId: this.pId
}).then(res => { }).then(res => {
let data = JSON.parse(res.mesg) let data = JSON.parse(res.mesg)
this.form.title = data.title this.form.title = data.title || data.form.title
this.form.date = data.date this.form.date = data.date || data.form.date
this.json = data this.json = data || data.form
this.tableData = data.responUserList this.tableData = data.responUserList || data.form.responUserList
this.form.hzfileName = data.hzfileName this.form.hzfileId = data.hzfileId || data.form.hzfileId
this.form.hzfileId = data.hzfileId this.form.hzfileName = data.hzfileName || data.form.hzfileName
}).catch(e => { }).catch(e => {
}) })
}) })
@@ -321,7 +321,6 @@
this.active = name this.active = name
}, },
handleSave() { handleSave() {
this.saveLoading = true this.saveLoading = true
let _formData = new FormData() let _formData = new FormData()
_formData.append('taskIds', this.taskIds) _formData.append('taskIds', this.taskIds)