diff --git a/public/index.html b/public/index.html
index f449c2f..6f52be6 100644
--- a/public/index.html
+++ b/public/index.html
@@ -39,8 +39,8 @@
<% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
<% } %>
diff --git a/src/components/360View/medicalRecord/callMedical/index.vue b/src/components/360View/medicalRecord/callMedical/index.vue
index 54f584a..d06e846 100644
--- a/src/components/360View/medicalRecord/callMedical/index.vue
+++ b/src/components/360View/medicalRecord/callMedical/index.vue
@@ -122,18 +122,20 @@ export default {
this.$message.error(res.msg)
}
},
- async deleteForm(id) {
+ deleteForm(id) {
const params = {
id: id
}
- const { data: res } = await this.$http.post('/case/delete', params)
- if (res.code === 0) {
- this.$message.success('删除成功')
- this.id = ''
- await this.getFormList()
- } else {
- this.$message.error(res.msg)
- }
+ this.$confirmFun('你确定要删除吗?').then(async() => {
+ const { data: res } = await this.$http.post('/case/delete', params)
+ if (res.code === 0) {
+ this.$message.success('删除成功')
+ this.id = ''
+ await this.getFormList()
+ } else {
+ this.$message.error(res.msg)
+ }
+ })
},
async getFormList() {
const { data: res } = await this.$http.get('/patient/view/getCases', {
diff --git a/src/components/360View/medicalRecord/index.vue b/src/components/360View/medicalRecord/index.vue
index f2c3851..0373253 100644
--- a/src/components/360View/medicalRecord/index.vue
+++ b/src/components/360View/medicalRecord/index.vue
@@ -138,7 +138,26 @@ export default {
if (this.curIndex === index) {
return
}
- this.$confirmFun('是否保存数据,否则当前数据会丢弃!', '保存', '', '已取消保存数据!')
+ // 360视图不用保存
+ if (this.onlyRead) {
+ this.curIndex = index
+ this.id = item.id
+ this.name = item.name
+ this.caseId = item.id
+ this.jsonText = item.jsonText
+ return
+ }
+ this.confirmChange().finally(() => {
+ this.curIndex = index
+ this.id = item.id
+ this.name = item.name
+ this.caseId = item.id
+ this.jsonText = item.jsonText
+ })
+ },
+ // 切换保存
+ confirmChange() {
+ return this.$confirmFun('是否保存数据,否则当前数据会丢弃!', '保存', '', '已取消保存数据!')
.then(() => {
this.$nextTick(() => {
switch (this.name) {
@@ -159,12 +178,6 @@ export default {
return
}
})
- }).finally(() => {
- this.curIndex = index
- this.id = item.id
- this.name = item.name
- this.caseId = item.id
- this.jsonText = item.jsonText
})
},
getPatientData() {
diff --git a/src/components/360View/opticalFile/index.vue b/src/components/360View/opticalFile/index.vue
index 378191f..c1e87d1 100644
--- a/src/components/360View/opticalFile/index.vue
+++ b/src/components/360View/opticalFile/index.vue
@@ -178,13 +178,15 @@ export default {
const params = {
id: this.id
}
- const { data: res } = await this.$http.post('/case/delete', params)
- if (res.code === 0) {
- this.$message.success('删除成功')
- this.getFormList(1)
- } else {
- this.$message.error(res.msg)
- }
+ this.$confirmFun('你确定要删除吗?').then(async() => {
+ const { data: res } = await this.$http.post('/case/delete', params)
+ if (res.code === 0) {
+ this.$message.success('删除成功')
+ this.getFormList(1)
+ } else {
+ this.$message.error(res.msg)
+ }
+ })
},
async getFormList(type) {
const { data: res } = await this.$http.get('/patient/view/getCases', {
diff --git a/src/page-subspecialty/views/modules/optometryManagement/dioptric/patient-add-or-update.vue b/src/page-subspecialty/views/modules/optometryManagement/dioptric/patient-add-or-update.vue
index 78015c1..90ed764 100644
--- a/src/page-subspecialty/views/modules/optometryManagement/dioptric/patient-add-or-update.vue
+++ b/src/page-subspecialty/views/modules/optometryManagement/dioptric/patient-add-or-update.vue
@@ -83,7 +83,7 @@
{{ $t('cancel') }}
- {{ $t('confirm') }}
+ {{ $t('confirm') }}
@@ -103,6 +103,7 @@ export default {
},
data() {
return {
+ disabled: false,
visible: false,
dataForm: {
platform: 3,
@@ -198,25 +199,30 @@ export default {
},
// 表单提交
dataFormSubmitHandle: debounce(function() {
+ this.disabled = true
this.$refs.dataForm.validate((valid) => {
if (!valid) {
+ this.disabled = false
return false
}
this.dataForm.zlProjectCode = this.dataForm.zlProjectCode.length && this.dataForm.zlProjectCode.join(',')
- this.$http[!this.dataForm.id ? 'post' : 'put']('/patient/savePatient', this.dataForm).then(({ data: res }) => {
- if (res.code !== 0) {
- return this.$message.error(res.msg)
- }
- this.$message({
- message: this.$t('prompt.success'),
- type: 'success',
- duration: 500,
- onClose: () => {
- this.visible = false
- this.$emit('refreshDataList')
+ this.$http[!this.dataForm.id ? 'post' : 'put']('/patient/savePatient', this.dataForm)
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
}
+ this.$message({
+ message: this.$t('prompt.success'),
+ type: 'success',
+ duration: 500,
+ onClose: () => {
+ this.visible = false
+ this.$emit('refreshDataList')
+ }
+ })
})
- }).catch(() => {})
+ .catch(() => {})
+ .finally(() => { this.disabled = false })
})
}, 1000, { leading: true, trailing: false }),
// 关闭弹框
diff --git a/src/page-subspecialty/views/modules/outpatientManagement/call/patient-add-or-update.vue b/src/page-subspecialty/views/modules/outpatientManagement/call/patient-add-or-update.vue
index bc68718..517c7ce 100644
--- a/src/page-subspecialty/views/modules/outpatientManagement/call/patient-add-or-update.vue
+++ b/src/page-subspecialty/views/modules/outpatientManagement/call/patient-add-or-update.vue
@@ -83,7 +83,7 @@
{{ $t('cancel') }}
- {{ $t('confirm') }}
+ {{ $t('confirm') }}
@@ -104,6 +104,7 @@ export default {
},
data() {
return {
+ disabled: false,
visible: false,
dataForm: {
platform: 1,
@@ -207,25 +208,30 @@ export default {
},
// 表单提交
dataFormSubmitHandle: debounce(function() {
+ this.disabled = true
this.$refs.dataForm.validate((valid) => {
if (!valid) {
+ this.disabled = false
return false
}
this.dataForm.zlProjectCode = this.dataForm.zlProjectCode.length && this.dataForm.zlProjectCode.join(',')
- this.$http[!this.dataForm.id ? 'post' : 'put']('/patient/savePatient', this.dataForm).then(({ data: res }) => {
- if (res.code !== 0) {
- return this.$message.error(res.msg)
- }
- this.$message({
- message: this.$t('prompt.success'),
- type: 'success',
- duration: 500,
- onClose: () => {
- this.visible = false
- this.$emit('refreshDataList')
+ this.$http[!this.dataForm.id ? 'post' : 'put']('/patient/savePatient', this.dataForm)
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
}
+ this.$message({
+ message: this.$t('prompt.success'),
+ type: 'success',
+ duration: 500,
+ onClose: () => {
+ this.visible = false
+ this.$emit('refreshDataList')
+ }
+ })
})
- }).catch(() => {})
+ .catch(() => {})
+ .finally(() => { this.disabled = false })
})
}, 1000, { leading: true, trailing: false }),
// 关闭弹框
diff --git a/src/page-subspecialty/views/modules/outpatientManagement/treat/patient-add-or-update.vue b/src/page-subspecialty/views/modules/outpatientManagement/treat/patient-add-or-update.vue
index 3c6743c..0063362 100644
--- a/src/page-subspecialty/views/modules/outpatientManagement/treat/patient-add-or-update.vue
+++ b/src/page-subspecialty/views/modules/outpatientManagement/treat/patient-add-or-update.vue
@@ -80,7 +80,7 @@
{{ $t('cancel') }}
- {{ $t('confirm') }}
+ {{ $t('confirm') }}
@@ -100,6 +100,7 @@ export default {
},
data() {
return {
+ disabled: false,
visible: false,
dataForm: {
platform: 2,
@@ -194,27 +195,34 @@ export default {
},
// 表单提交
dataFormSubmitHandle: debounce(function() {
+ this.disabled = true
this.$refs.dataForm.validate((valid) => {
if (!valid) {
+ this.disabled = false
return false
}
this.dataForm.zlProjectCode = this.dataForm.zlProjectCode.length && this.dataForm.zlProjectCode.join(',')
- this.$http[!this.dataForm.id ? 'post' : 'put']('/patient/savePatient', this.dataForm).then(({ data: res }) => {
- if (res.code !== 0) {
- return this.$message.error(res.msg)
- }
- this.$message({
- message: this.$t('prompt.success'),
- type: 'success',
- duration: 500,
- onClose: () => {
- this.visible = false
- this.$emit('refreshDataList')
+ this.$http[!this.dataForm.id ? 'post' : 'put']('/patient/savePatient', this.dataForm)
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
}
+ this.$message({
+ message: this.$t('prompt.success'),
+ type: 'success',
+ duration: 500,
+ onClose: () => {
+ this.visible = false
+ this.$emit('refreshDataList')
+ }
+ })
+ })
+ .catch(res => {
+ this.$message.error(res.msg)
+ })
+ .finally(() => {
+ this.disabled = false
})
- }).catch(res => {
- this.$message.error(res.msg)
- })
})
}, 1000, { leading: true, trailing: false }),
// 关闭弹框