diff --git a/src/components/360View/afterPart/index-copy.vue b/src/components/360View/afterPart/index-copy.vue index 62af523..37b0bbd 100644 --- a/src/components/360View/afterPart/index-copy.vue +++ b/src/components/360View/afterPart/index-copy.vue @@ -631,19 +631,19 @@ export default { }) }, // 点击左侧模板数据覆盖表格内容 - templateData(data, node) { - if (data && data.caseJson) { - this.tableData = JSON.parse(data.caseJson) - // 回显表格复选框 - this.$nextTick(() => { - this.tableData.forEach(item => { - if (item.flag) { - this.$refs.multipleTable.toggleRowSelection(item, true) - } - }) - }) + async templateData(data, node) { + const { data: res } = await this.$http.get('/mjz/getMjzHdjcInfoTemplate', { + params: { + id: data.id, + patientId: this.patientId + } + }) + if (res.code === 0) { + if (res.data) { + this.dataForm = this.handleData(res.data) + } } else { - // this.tableData = Object.assign([], this.sourceData) + this.$message.error(res.msg) } }, // 点击保存模板后弹框 @@ -658,15 +658,19 @@ export default { }, // 保存模板树 async saveTreeTemplete() { - if (!this.treeId) return this.$message.warning('请选择节点!') + if (!this.treeId) return this.$message.warning('请选择目录!') const params = { - caseJson: JSON.stringify(this.tableData), doctorId: this.doctorId, name: this.form.name, type: 3, // 2前段检查 3后段检查 treeId: this.treeId } - const { data: res } = await this.$http.post('/treetemplate/addTreeCase', params) + for (const resKey in this.dataForm) { + if (Array.isArray(this.dataForm[resKey])) { + this.dataForm[resKey] = this.dataForm[resKey].join(',') + } + } + const { data: res } = await this.$http.post('/mjz/saveMjzHdjcTemplate', { ...params, ...this.dataForm }) if (res.code === 0) { this.templateFlag = false await this.queryTreeCase() @@ -707,7 +711,7 @@ export default { let url = '' if (data.type) { // 模板节点 - url = '/treetemplate/deleteTreeCase' + url = '/mjz/delMjzHdjcInfoTemplate' } else { // 树节点 url = '/treetemplate/deleteTree' diff --git a/src/components/360View/commonForm/threeVision.vue b/src/components/360View/commonForm/threeVision.vue index e857964..cd697fb 100644 --- a/src/components/360View/commonForm/threeVision.vue +++ b/src/components/360View/commonForm/threeVision.vue @@ -1286,7 +1286,6 @@ export default { const L = /ᴸ\/ʀ/g for (const key in this.dataForm) { if (typeof this.dataForm[key] === 'string') { - console.log(this.dataForm[key]) this.dataForm[key] = this.dataForm[key].replace(R, '右上') this.dataForm[key] = this.dataForm[key].replace(L, '左上') } diff --git a/src/components/360View/forePart/index-copy.vue b/src/components/360View/forePart/index-copy.vue index d856e5f..a4fb24a 100644 --- a/src/components/360View/forePart/index-copy.vue +++ b/src/components/360View/forePart/index-copy.vue @@ -1027,20 +1027,20 @@ export default { }) }) }, - // 点击左侧模板数据覆盖表格内容 - templateData(data, node) { - if (data && data.caseJson) { - this.tableData = JSON.parse(data.caseJson) - // 回显表格复选框 - this.$nextTick(() => { - this.tableData.forEach(item => { - if (item.flag) { - this.$refs.multipleTable.toggleRowSelection(item, true) - } - }) - }) + // 点击左侧模板数据查询表格内容 + async templateData(data, node) { + const { data: res } = await this.$http.get('/mjz/getMjzQdjcInfoTemplate', { + params: { + id: data.id, + patientId: this.patientId + } + }) + if (res.code === 0) { + if (res.data) { + this.dataForm = this.handleData(res.data) + } } else { - // this.tableData = Object.assign([], this.sourceData) + this.$message.error(res.msg) } }, // 点击保存模板后弹框 @@ -1057,13 +1057,18 @@ export default { async saveTreeTemplete() { if (!this.treeId) return this.$message.warning('请选择目录!') const params = { - caseJson: JSON.stringify(this.tableData), doctorId: this.doctorId, name: this.form.name, type: 2, // 2前段检查 3后段检查 - treeId: this.treeId + treeId: this.treeId, + parentId: this.parentId + } + for (const resKey in this.dataForm) { + if (Array.isArray(this.dataForm[resKey])) { + this.dataForm[resKey] = this.dataForm[resKey].join(',') + } } - const { data: res } = await this.$http.post('/treetemplate/addTreeCase', params) + const { data: res } = await this.$http.post('/mjz/saveMjzQdjcTemplate', { ...params, ...this.dataForm }) if (res.code === 0) { this.templateFlag = false await this.queryTreeCase() @@ -1104,7 +1109,7 @@ export default { let url = '' if (data.type) { // 模板节点 - url = '/treetemplate/deleteTreeCase' + url = '/mjz/delMjzQdjcInfoTemplate' } else { // 树节点 url = '/treetemplate/deleteTree' diff --git a/src/components/360View/medicalRecord/outPatientRecord/diagnosisForm.vue b/src/components/360View/medicalRecord/outPatientRecord/diagnosisForm.vue index 8dcd858..c0df2b4 100644 --- a/src/components/360View/medicalRecord/outPatientRecord/diagnosisForm.vue +++ b/src/components/360View/medicalRecord/outPatientRecord/diagnosisForm.vue @@ -1,15 +1,17 @@