|
|
@ -178,6 +178,8 @@ export default { |
|
|
|
}, |
|
|
|
uploadUrl: '', |
|
|
|
dataForm: { |
|
|
|
id: '', |
|
|
|
state: 1, |
|
|
|
caseTitle: '', |
|
|
|
caseNumber: 0, |
|
|
|
mainPicture: '', |
|
|
@ -188,6 +190,10 @@ export default { |
|
|
|
requiredFlag: false |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
this.dataForm.id = this.$route.query.id |
|
|
|
this.init() |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
dataRule () { |
|
|
|
return { |
|
|
@ -333,8 +339,24 @@ export default { |
|
|
|
this.visible = true |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs['dataForm'].resetFields() |
|
|
|
if (this.dataForm.id) { |
|
|
|
this.getInfo() |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取信息 |
|
|
|
getInfo () { |
|
|
|
this.$http.get(`/cloudAnalysis/typicalcase/${this.dataForm.id}`).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.dataForm = { |
|
|
|
...this.dataForm, |
|
|
|
...res.data |
|
|
|
} |
|
|
|
}).catch(() => {}) |
|
|
|
this.requiredFlag = true |
|
|
|
}, |
|
|
|
// 表单提交 |
|
|
|
dataFormSubmitHandle: debounce(function () { |
|
|
|
this.$refs['dataForm'].validate((valid) => { |
|
|
|