| | |
| | | </div> |
| | | <el-tag |
| | | v-for="tag in diagglist" |
| | | @close="removediagg(tag.icd10code)" |
| | | @close="removediagg(tag)" |
| | | type="warning" |
| | | closable |
| | | :disable-transitions="false" |
| | |
| | | </div> |
| | | <el-tag |
| | | v-for="tag in diagglist" |
| | | @close="removediagg(tag.icd10code)" |
| | | @close="removediagg(tag)" |
| | | type="warning" |
| | | closable |
| | | :disable-transitions="false" |
| | |
| | | this.form.serviceType == 8 || |
| | | this.form.serviceType == 12 || |
| | | this.form.serviceType == 13 || |
| | | this.form.serviceType == 20 || |
| | | this.form.serviceType == 9 |
| | | ) { |
| | | this.checkboxlist = [ |
| | |
| | | ...item, |
| | | itemCode: code, |
| | | itemName: item.itemName || item.medicalName, |
| | | manufacturerName: item.manufacturerName || item.medicalCompany |
| | | manufacturerName: item.manufacturerName || item.medicalCompany, |
| | | }); |
| | | }); |
| | | } |
| | |
| | | item.icdname = item.icd10name; |
| | | this.diagglist.push(item); |
| | | } else { |
| | | getillnesslist({ icdname: item.icd10name }).then((res) => { |
| | | getillnesslist({ icdcode: item.icd10code }).then((res) => { |
| | | item.icdname = res.rows[0].icdname; |
| | | this.diagglist.push(item); |
| | | }); |
| | |
| | | }); |
| | | } |
| | | }, |
| | | removediagg(row) { |
| | | removediagg(tag) { |
| | | // 任务组:本地删除即可,后端保存时统一更新 |
| | | if (this.form.appltype == 5) { |
| | | this.diagglist = this.diagglist.filter((item) => item.icd10code != row); |
| | | this.diagglist = this.diagglist.filter((item) => item != tag); |
| | | return; |
| | | } |
| | | // 普通疾病关联:调后端接口逐条删除 |
| | | let result = this.diagglist |
| | | .filter((item) => item.icd10code == row) |
| | | .map((item) => item.id); |
| | | if (result.length) { |
| | | taskdiaghospgetsondel(result).then((res) => { |
| | | |
| | | // 普通疾病关联:判断是否有 id(已保存的记录才有 id) |
| | | if (tag.id) { |
| | | // id 存在,调后端接口删除 |
| | | taskdiaghospgetsondel([tag.id]).then((res) => { |
| | | if (res.code) { |
| | | this.diagglist = this.diagglist.filter( |
| | | (item) => item.icd10code != row |
| | | ); |
| | | this.diagglist = this.diagglist.filter((item) => item != tag); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | } |
| | | }); |
| | | } else { |
| | | // id 不存在(未保存的新记录),直接本地删除 |
| | | this.diagglist = this.diagglist.filter((item) => item != tag); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | } |
| | | }, |
| | | remoteopcode(name) { |
| | |
| | | }, |
| | | // 删除已选药品(单独接口) |
| | | removeMedical(code) { |
| | | taskmedicaldel({ medicalCode: code, taskId: this.form.taskid }).then((res) => { |
| | | taskmedicaldel({ medicalCode: code, taskId: this.form.taskid }).then( |
| | | (res) => { |
| | | if (res.code == 200) { |
| | | this.medicalCodes = this.medicalCodes.filter((c) => c !== code); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | } |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | |
| | | // ---------- 患者选择 ---------- |