提交 98ba0c46 编写于 作者: changdi.hao's avatar changdi.hao

优化体验

上级 cf9727e7
......@@ -18,7 +18,10 @@ export default [{
redirect: '/diagnosis-list'
}, {
path: '/diagnosis-list',
component: diagnosisList
component: diagnosisList,
meta: {
keepAlive: true // 需要被缓存
}
}, {
path: '/diagnosis-im',
component: diagnosisIm
......
......@@ -281,7 +281,7 @@
<el-row :gutter="60" type="flex" justify="center" align="center">
<el-button @click="cancle">{{editorType== 1 ? '取消' : '返回'}}</el-button>
<el-button type="primary" @click="save" v-if="editorType== 1">保存</el-button>
<el-button type="primary" @click="save" v-if="editorType== 1" :disabled="btnDisable">保存</el-button>
</el-row>
</div>
</div>
......@@ -303,6 +303,7 @@ export default {
noable: false,
editorType: 1, // //1为编辑状态,2为查看
loading: true,
btnDisable: false,
oldDiagnoseAdvice: '', //旧的诊断建议
formData: {
// 预约单信息
......@@ -553,9 +554,10 @@ export default {
}
},
save() {
this.$refs.form.validate((valid) => {
let url = `/diagnose/admin/diagnose/update`;
this.formData.birthday = new Date(this.formData.birthdayStr);
this.formData.birthday = new Date(this.formData.birthdayStr)
// this.formData.birthday = this.formData.birthdayStr;
let params = JSON.parse(JSON.stringify(this.formData))
params.illnessImageUrls = this.$refs.imgComponent ? [...this.$refs.imgComponent.setNewArr()] : []
......@@ -565,8 +567,11 @@ export default {
if (!params.diagnoseAdvice) {
params.diagnoseAdvice = this.oldDiagnoseAdvice
}
this.loading = true
this.btnDisable = true
this.POST(url, params).then(res => {
this.loading = false
this.btnDisable = false
if (res.code == "000000") {
this.$message.success('保存成功');
this.$router.back()
......@@ -576,6 +581,9 @@ export default {
type: "error"
})
}
}).catch(() => {
this.btnDisable = false
this.loading = false
});
return
if (valid) {
......
......@@ -369,6 +369,9 @@ export default {
}
}
},
activated() {
this.search()
},
created() {
},
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册