Bläddra i källkod

Revert: 关联维护改弹窗-接口待对

zhouna 4 år sedan
förälder
incheckning
7805764cad
1 ändrade filer med 10 tillägg och 105 borttagningar
  1. 10 105
      src/components/cdssManage/disease/Disease.vue

+ 10 - 105
src/components/cdssManage/disease/Disease.vue

@@ -15,16 +15,6 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <el-form-item label="" class="selectMedicine">
-            <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
-              <el-option
-                      v-for="item in matchList"
-                      :label="item.name"
-                      :value="item.name"
-                      :key="item.id"
-              ></el-option>
-            </el-select>
-          </el-form-item>
           <el-form-item label="医院诊断名称:">
             <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
           </el-form-item>
@@ -71,9 +61,6 @@
         ></el-pagination>
       </div>
     </div>
-    <LtModal v-if="modalVisiable" :disabled="saveDisable" @confirm="submitForm" @close="closeModal">
-      <LinkContent :form="form" ref="relationForm" labelName="诊断名称" termType="4" valName="diseaseNames"/>
-    </LtModal>
   </div>
 </template>
 
@@ -81,14 +68,11 @@
 import api from '@api/cdss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-import LtModal from '@base/LtModal';
-import LinkContent from '@base/LinkContent';
 
 export default {
   name: 'Disease', //化验大小项和公表维护
   data: function() {
     return {
-      matchList:[{id:-1,name:'全部'},{id:1,name:'已匹配'},{id:2,name:'未匹配'},{id:3,name:'多项匹配'}],
       list: [],
       searched: false,
       filter: {
@@ -102,19 +86,10 @@ export default {
       total: 0,
       uploadInfo: '导入',
       title: '诊断关联维护 | ',
-      modalVisiable:false,  //弹窗显示状态
-      saveDisable:false,    //确定按钮禁用状态
-      form:{
-          searchText: '', //搜索字段
-          hisName: '',
-          icdCode: ''
-      }
+      hospitaiName: '',
+      hospitalId: ''
     };
   },
-  components:{
-      LtModal,
-      LinkContent
-  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -257,15 +232,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.showModal()
-      /*this.$router.push({
+      this.$router.push({
         name: 'AddDisease',
         params: Object.assign(pam, {
           isEdit: false,
           data: { hospitalId: this.hospitalId },
           hospitaiName: this.hospitaiName
         })
-      });*/
+      });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -277,15 +251,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      /*this.$router.push({
+      this.$router.push({
         name: 'AddDisease',
         params: Object.assign(pam, {
           isEdit: true,
           data: { ...item, hospitalId: this.hospitalId },
           hospitaiName: this.hospitaiName
         })
-      });*/
-      this.showModal();
+      });
     },
     currentChange(next) {
       this.currentPage = next;
@@ -465,84 +438,16 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
-    },
-    showModal(){
-        this.modalVisiable=true
-    },
-    closeModal(){
-        this.modalVisiable=false
-    },
-    // 建立关联-参数处理
-    submitForm() {
-        console.log(this.$refs)
-        this.$refs.relationForm.$refs.innerForm.validate(valid => {
-            if (valid) {
-                const { searchText, hisName, icdCode } = this.form;
-                let params = {
-                    hisName: hisName,
-                    uniqueName: searchText,
-                    icdCode: icdCode,
-                    hospitalId: this.hospitalId
-                };
-                this.showSaveDialog(params);
-            } else {
-                console.log('error submit!!');
-                return false;
-            }
-        });
-    },
-      // 建立关联-映射关系是否已存在
-      showSaveDialog(params) {
-          this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
-          api
-              .diseaseIsExistRecord(params)
-              .then(res => {
-                  if (!res.data.data) {
-                      // 不存在,创建新的关联
-                      // 如果是编辑时,需要携带id
-                      if (this.isEdit) {
-                          params = { ...params, id: this.editId };
-                      }
-                      this.saveLisMapping(params, '保存成功', 'success');
-                  } else {
-                      // 已存在,提示修改
-                      this.warning('该条关联已存在,无法添加');
-                      this.saveDisable = false;
-                  }
-              })
-              .catch(err => {
-                  if (err.code === '900010001') {
-                      return false;
-                  }
-                  this.warning(err);
-              });
-      },
-
-      // 映射关系不存在-建立关联
-      saveLisMapping(params, msg, type) {
-          api.saveOrUpdateDiseaseRecord(params).then(res => {
-              if (res.data.code === '0') {
-                  this.warning(res.data.msg || msg, type);
-                  this.initForm();
-                  this.$router.push({
-                      name: 'Disease',
-                      params: Object.assign({}, this.$route.params, {
-                          currentPage: 1
-                      })
-                  });
-              } else {
-                  this.warning(res.data.msg);
-              }
-              this.saveDisable = false;
-          });
-      },
+    }
   }
 };
 </script>
 
-<style lang="less" scoped>
+<style lang="less">
 @import '../../../less/admin.less';
+</style>
 
+<style lang="less" scoped>
 .delete {
   color: red;
 }