优化
This commit is contained in:
parent
daf6a4e584
commit
93abb615d0
@ -104,16 +104,17 @@ export default {
|
|||||||
this.loadings = true
|
this.loadings = true
|
||||||
try {
|
try {
|
||||||
this.$loadingStart()
|
this.$loadingStart()
|
||||||
let res1 = await apiCheckStaff(Object.assign({}, this.basisForm, {confirm: 1}))
|
let res12 = await apiCheckStaff(Object.assign({}, this.basisForm, {confirm: 1}))
|
||||||
console.log('res1: ', res1)
|
console.log('res1: ', res12)
|
||||||
let res = await saveBaseSet(this.basisForm)
|
let res = await saveBaseSet(this.basisForm)
|
||||||
if (res.code !== 200) {
|
if (res.code !== 200) {
|
||||||
|
this.loadings = false
|
||||||
this.$loadingEnd()
|
this.$loadingEnd()
|
||||||
return this.$message.error(res.msg)
|
return this.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
res = res.data
|
res = res.data
|
||||||
this.basisForm = res
|
this.basisForm = res
|
||||||
this.templateForm.evaluationGroupId = res.id
|
this.templateForm.evaluationGroupId = this.basisForm.id
|
||||||
for (let i in this.processInfo) {
|
for (let i in this.processInfo) {
|
||||||
try {
|
try {
|
||||||
if (this.$route.query.copy) {
|
if (this.$route.query.copy) {
|
||||||
@ -122,27 +123,40 @@ export default {
|
|||||||
return i
|
return i
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
let res1 = await saveDetailProcs(Object.assign({}, this.processInfo[i].chartDetails, {evaluationGroupId: res.id}))
|
let res1 = await saveDetailProcs(Object.assign({}, this.processInfo[i].chartDetails, {evaluationGroupId: this.basisForm.id}))
|
||||||
|
if (res1.code !== 200) {
|
||||||
|
this.loadings = false
|
||||||
|
this.$loadingEnd()
|
||||||
|
this.$message.error(res1.msg)
|
||||||
|
return
|
||||||
|
}
|
||||||
console.log('res: ', res1)
|
console.log('res: ', res1)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('error: ', error)
|
this.loadings = false
|
||||||
|
this.$loadingEnd()
|
||||||
|
return this.$message.error(error.msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('res: ', res)
|
console.log('res: ', res)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$message.error(error.msg)
|
this.loadings = false
|
||||||
|
this.$loadingEnd()
|
||||||
|
return this.$message.error(error.msg)
|
||||||
}
|
}
|
||||||
console.log('this.templateForm: ', JSON.stringify(this.templateForm))
|
console.log('this.templateForm: ', JSON.stringify(this.templateForm))
|
||||||
try {
|
try {
|
||||||
let res = await saveTemSet(this.templateForm)
|
let res = await saveTemSet(this.templateForm)
|
||||||
|
this.loadings = false
|
||||||
this.$loadingEnd()
|
this.$loadingEnd()
|
||||||
res = res.data
|
res = res.data
|
||||||
// this.basisForm = res
|
// this.basisForm = res
|
||||||
console.log('res: ', res)
|
console.log('res: ', res)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$message.error(error.msg)
|
|
||||||
}
|
|
||||||
this.loadings = false
|
this.loadings = false
|
||||||
|
this.$loadingEnd()
|
||||||
|
return this.$message.error(error.msg)
|
||||||
|
}
|
||||||
|
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '保存成功',
|
message: '保存成功',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user