浏览代码

疾病相关基本完成

luolei 4 年之前
父节点
当前提交
deddb44449

+ 13 - 1
src/api/config.js

@@ -4,7 +4,7 @@ const testUrl = ''
 export default {
 export default {
   host: 'http://192.168.2.121:5050',
   host: 'http://192.168.2.121:5050',
   // imgHost: 'http://192.168.2.121:82',      //富文本编辑器图片回传地址
   // imgHost: 'http://192.168.2.121:82',      //富文本编辑器图片回传地址
-  imgHost:'http://192.168.2.121:82',      //富文本编辑器图片回传地址
+  imgHost:'http://192.168.2.236:82',      //富文本编辑器图片回传地址
   delayTime: 500,
   delayTime: 500,
   urls: {
   urls: {
     /* 登录注册相关接口 */
     /* 登录注册相关接口 */
@@ -481,6 +481,7 @@ export default {
     'updateDisclaimerInformationsCDSS': '/api/cdssman/disclaimerInfo/updateDisclaimerInformations',   //修改免责申明详情
     'updateDisclaimerInformationsCDSS': '/api/cdssman/disclaimerInfo/updateDisclaimerInformations',   //修改免责申明详情
 
 
     'getListDicCDSS': '/api/cdssman/sys/dictionaryInfo/getList',   //返回字典信息(界面返回)
     'getListDicCDSS': '/api/cdssman/sys/dictionaryInfo/getList',   //返回字典信息(界面返回)
+    'getListBack': '/api/cdssman/sys/dictionaryInfo/getListBack',   //返回字典信息(后台返回)
 
 
     'getKlmEnumsDataCDSS': '/api/cdssman/getKlmEnumsData',   //枚举数据获取
     'getKlmEnumsDataCDSS': '/api/cdssman/getKlmEnumsData',   //枚举数据获取
 
 
@@ -531,6 +532,17 @@ export default {
     'clearStandRuleDrug':'/api/cdssman/cache/clearStandRuleDrug',
     'clearStandRuleDrug':'/api/cdssman/cache/clearStandRuleDrug',
     'saveBaseConceptInfo':'/api/cdssman/graph/klConcept/saveConceptInfo',
     'saveBaseConceptInfo':'/api/cdssman/graph/klConcept/saveConceptInfo',
     'getBaseConceptAll':'/api/cdssman/graph/klConcept/getConceptAll',
     'getBaseConceptAll':'/api/cdssman/graph/klConcept/getConceptAll',
+    //疾病相关维护
+    'getDiseasePage':'/api/cdssman/klDisease/getDiseasePage',
+    'diseaseDelete':'/api/cdssman/klDisease/delete',
+    'getBaseDetail':'/api/cdssman/klDisease/getDetail',
+    'searchConcept':'/api/cdssman/klDisease/searchConcept',
+    //静态知识术语
+    'staticBaseKnowledge':'/api/cdssman/kl/conceptInfo/getPage',
+    'changeBaseStatus':'/api/cdssman/kl/conceptInfo/changeStatus',
+    'getBaseRecordById':'/api/cdssman/kl/conceptInfo/getRecordById',
+    'saveBaseOrUpdateRecord':'/api/cdssman/kl/conceptInfo/saveOrUpdateRecord',
+    'staticKnowledgeBaseInfo':'/api/cdssman/kl/conceptInfo/staticKnowledgeIndexWithoutInfo',
   },
   },
   menuIconList: { //菜单对应图标
   menuIconList: { //菜单对应图标
     'YH-KZT': 'el-icon-menu',
     'YH-KZT': 'el-icon-menu',

+ 30 - 0
src/api/knowledgeTree.js

@@ -46,4 +46,34 @@ export default {
   baseRelationTypeGetPage(param) {
   baseRelationTypeGetPage(param) {
     return axios.post(urls.baseRelationTypeGetPage, param);
     return axios.post(urls.baseRelationTypeGetPage, param);
   },
   },
+  getDiseasePage(param) {
+    return axios.post(urls.getDiseasePage, param);
+  },
+  staticBaseKnowledge(param) {
+    return axios.post(urls.staticBaseKnowledge, param);
+  },
+  getListBack(param) {//字典信息
+    return axios.post(urls.getListBack, param);
+  },
+  changeBaseStatus(param) {//字典信息
+    return axios.post(urls.changeBaseStatus, param);
+  },
+  getBaseRecordById(param) {//获取静态知识详情
+    return axios.post(urls.getBaseRecordById, param);
+  },
+  saveBaseOrUpdateRecord(param) {//保存静态知识
+    return axios.post(urls.saveBaseOrUpdateRecord, param);
+  },
+  staticKnowledgeBaseInfo(param) {//搜索静态知识
+    return axios.post(urls.staticKnowledgeBaseInfo, param);
+  },
+  diseaseDelete(param) {//删除诊断依据
+    return axios.post(urls.diseaseDelete, param);
+  },
+  getBaseDetail(param) {//获取疾病详情
+    return axios.post(urls.getBaseDetail, param);
+  },
+  searchConcept(param) {//查询疾病
+    return axios.post(urls.searchConcept, param);
+  },
 };
 };

+ 1 - 0
src/components/icss/AddMedicinePrompt.vue

@@ -35,6 +35,7 @@
                
                
                 <InfoParagraph v-for="(f,i) in form.prags"
                 <InfoParagraph v-for="(f,i) in form.prags"
                                 v-if="!upload"
                                 v-if="!upload"
+                               :key="i"
                                :data="f"
                                :data="f"
                                :index="i"
                                :index="i"
                                :total="form.prags.length"
                                :total="form.prags.length"

+ 326 - 0
src/components/knowledgeExtra/AboutDisease.vue

@@ -0,0 +1,326 @@
+<template>
+    <div>
+        <crumbs title="疾病相关维护" minWidth="995px">
+            <el-form :inline="true" class="demo-form-inline">
+                <el-form-item label="疾病名称:">
+                    <el-input size="mini" v-model="filter.term" placeholder="请输入名称"></el-input>
+                </el-form-item>
+                <el-form-item>
+                    <el-button size="mini" @click="filterDatas">确认</el-button>
+                    <el-button size="mini" type="warning" style="margin:0 10px"  @click="addMedicalMultR">新增疾病</el-button>
+                </el-form-item>
+            </el-form>
+        </crumbs>
+        <div class="contents">
+            <el-table :data="list"
+                      border
+                      style="width: 100%">
+                <el-table-column
+                        type="index"
+                        :index="indexMethod"
+                        label="编号"
+                        width="60">
+                </el-table-column>
+                <el-table-column
+                        prop="disName"
+                        label="疾病名称"
+                        show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column
+                        prop="modifier"
+                        label="操作人">
+                </el-table-column>
+                <el-table-column
+                        prop="gmtModified"
+                        label="操作时间"
+                        :show-overflow-tooltip="true">
+                </el-table-column>
+                
+                <el-table-column
+                        label="操作" width="160">
+                    <template slot-scope="scope">
+                        <el-button type="text" size="small" @click="toEditProduct(scope.row)">修改</el-button>
+                        <span style="margin:0 3px;">|</span>
+                        <el-button type="text" size="small" class="delete" @click="showDelDialog(scope.row)">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <el-pagination :current-page.sync="currentPage"
+                           @current-change="currentChange"
+                           background
+                           :page-size="pageSize"
+                           :page-sizes="pageSizeArr"
+                           @size-change="handleSizeChange"
+                           :layout="pageLayout"
+                           :total="total">
+            </el-pagination>
+        </div>
+
+    </div>
+</template>
+
+<script>
+  import api from '@api/knowledgeTree.js';
+  import config from '@api/config.js';
+  import utils from '@api/utils.js';
+  
+  export default {
+    name: 'AboutDisease',
+    data: function () {
+      return {
+        list: [],
+        stateSelect:[
+          {id:'N',name:'启用中'},
+          {id:'Y',name:'已删除'},
+        ],
+        isState:'',
+        cacheData: {},
+        currentPage: 1,
+        pageSize: config.pageSize,
+        pageSizeArr:config.pageSizeArr,
+        pageLayout:config.pageLayout,
+        total: 0,
+        searched: false,
+        filter: {
+          term:'',
+          type:''
+        },
+        typeList:[]
+      }
+    },
+    created() {
+      const that = this;
+      //返回时避免参数未赋值就获取列表
+      setTimeout(function(){
+        that.getDataList();
+      });
+      // this.getTypeList();
+    },
+    watch: {
+      'filter': {
+        handler: function () {
+          this.searched = false;
+        },
+        deep: true
+      }
+    },
+    beforeRouteEnter(to, from, next){
+      next(vm => {
+        //const pm = to.param;
+        Object.assign(vm,to.params);
+        vm.inCurrentPage=to.params.currentPage;
+      })
+    },
+    methods: {
+      handleSizeChange(val){
+        this.pageSize = val;
+        this.currentPage = utils.getCurrentPage(this.currentPage, this.total, this.pageSize);
+        this.getDataList();
+      },
+      addMedicalMultR(){
+        const pam = this.searched ? {
+          currentPage: this.currentPage,
+          pageSize:this.pageSize,
+          filter: this.filter
+        } : {currentPage: this.currentPage,
+          pageSize:this.pageSize};
+        this.$router.push({name:'DiseaseTree',
+          params:pam});
+      },
+      toEditProduct(row){
+        const param = {
+          disName: row.disName,
+        };
+        const pam = this.searched ? {
+          currentPage: this.currentPage,
+          pageSize:this.pageSize,
+          filter: this.filter
+        } : {currentPage: this.currentPage,
+          pageSize:this.pageSize};
+        api.getBaseDetail(param).then((res) => {
+          const {code,data,msg} = res.data;
+          console.log(code)
+          if(code=='0'){
+              const item = Object.assign({},row,data);
+              this.$router.push({name:'DiseaseTree',params:Object.assign(pam, {isEdit: true, data: item})});
+          }else{
+              this.$message({
+              message: msg,
+              type: 'warning'
+              });
+          }
+        })
+      },
+      filterDatas(){
+        this.currentPage = 1;
+        this.getDataList();
+      },
+      getDataList(isTurnPage) {
+        const param = this.getFilterItems(isTurnPage);
+        this.searched = true;
+        const loading = this.$loading({
+            lock: true,
+            text: 'Loading',
+            spinner: 'el-icon-loading',
+            background: 'rgba(0, 0, 0, 0.7)'
+        }); 
+        api.getDiseasePage(param).then((res) => {
+          loading.close()
+          if (res.data.code == '0') {
+            const data = res.data.data;
+            this.list = data.records;
+            this.cacheData[param.current] = data.records;
+            this.total = data.total;
+            if(this.inCurrentPage!==undefined){
+              this.currentPage=this.inCurrentPage;
+              this.inCurrentPage = undefined;
+            }
+          }
+        }).catch((error) => {
+          console.log(error);
+        });
+      },
+      getTypeList(){
+        api.allKnowledgeType({'name':''}).then((res)=>{
+          const data = res.data;
+          if(data.code==0){
+            this.typeList = data.data;
+          }else{
+            console.log(res.msg);
+          }
+        }).catch((error) => {
+          console.log(error);
+        });
+      },
+      /*getDetailList(id) {
+        this.$router.push({name:'DeptInfoDetail', params:{id: id}})
+      },*/
+      getFilterItems(isTurnPage) {
+        //翻页时筛选条件没点确定则清空
+        if(isTurnPage&&!this.searched){
+          this.clearFilter();
+        };
+        const param = {
+          disName: this.filter.term.trim(),
+          current: this.inCurrentPage||this.currentPage,
+          size: this.pageSize
+        };
+        return param;
+      },
+      indexMethod(index) {
+        return ((this.currentPage - 1) * this.pageSize) + index + 1;
+      },
+      currentChange(next) {
+        this.currentPage = next;
+        if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
+          this.list = this.cacheData[next];
+        } else {
+          this.getDataList(true);
+        }
+      },
+      warning(msg,type){
+        this.$message({
+          showClose: true,
+          message:msg,
+          type:type||'warning'
+        })
+      },
+      showConfirmDialog(msg,resolve){
+        this.$alert(msg, '提示', {
+          confirmButtonText: '确定',
+          type: 'warning'
+        }).then(() => {
+          resolve();
+        }).catch(() => {});
+      },
+      showDelDialog(item){
+        /*const param = {
+          term:item.term,
+          type:item.type,
+          id:item.id
+        }*/
+        const param = {
+          disName:item.disName
+        }
+        let waringTxt = '是否删除该关系,可能对现有系统造成影响'
+        this.showConfirmDialog(waringTxt,()=>{
+          api.diseaseDelete(param).then((res)=>{
+            if(res.data.code=='0'){
+              if(!this.searched){
+                //未点确认时清空搜索条件
+                this.clearFilter();
+              }
+              if(this.list.length==1){
+                //当前在最后一页且只有一条数据时,删除后跳到前一页
+                this.currentPage = this.currentPage===1?1:this.currentPage-1;
+              }
+              this.warning(res.data.msg||'操作成功','success');
+              this.getDataList();
+            }else{
+              this.warning(res.data.msg);
+            }
+          }).catch((error)=>{
+            this.warning(error);
+          })
+        });
+      },
+      clearFilter(){
+        this.filter={
+          term:'',
+          type:''
+        };
+      },
+      uploadClick(){
+        let inp = document.getElementById("upFile");
+        inp.click();
+      },
+      uploadFile(e){
+        let fileInfo = e.target.files[0];
+        e.preventDefault();
+        let formData = new FormData();
+        formData.append('uploadfile', fileInfo);
+        const header = {
+          headers:{
+            'Content-Type': 'multipart/form-data'
+          }
+        }
+        api.knowledgeUpload(formData,header).then((res)=>{
+          if(res.data.code==0){
+            this.$message({
+              message: '上传成功',
+              type: 'success',
+            });
+            this.getDataList();
+          }else{
+            this.$message({
+              dangerouslyUseHTMLString: true,
+              message:res.data.msg,
+              type:'warning'
+            });
+          }
+        })
+        
+        //解决上传相同文件不触发change
+        let inp = document.getElementById("upFile");
+        inp.value = "";   
+      },
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+    @import "../../less/admin.less";
+    .delete{
+        color: red;
+    }
+    .review{
+      color: #22ccc8;
+    }
+    .el-table .cell{
+      overflow: hidden;
+      white-space: nowrap;
+    }
+    #upFile{
+      display: none !important;
+    }
+</style>

+ 6 - 9
src/components/knowledgeExtra/AddDevKnow.vue

@@ -59,7 +59,7 @@
             @reOrder="reOrder"
             @reOrder="reOrder"
             :showType="showType"
             :showType="showType"
           ></DevInfo>
           ></DevInfo>
-          <el-form-item v-if="upload" label="标题名称:" prop="fileTitle" label-width="160px">
+          <el-form-item v-if="upload" label="标题名称搜索:" prop="fileTitle" label-width="160px">
             <el-input v-model="form.fileTitle"></el-input>
             <el-input v-model="form.fileTitle"></el-input>
           </el-form-item>
           </el-form-item>
           <el-form-item
           <el-form-item
@@ -107,7 +107,7 @@
 /**
 /**
  *
  *
  */
  */
-import api from '@api/cdss.js';
+import api from '@api/knowledgeTree.js';
 import DevInfo from './DevInfo';
 import DevInfo from './DevInfo';
 import config from '@api/config';
 import config from '@api/config';
 import $ from 'jquery';
 import $ from 'jquery';
@@ -204,7 +204,6 @@ export default {
   watch: {
   watch: {
     showType: {
     showType: {
       handler(newVal, oldVal) {
       handler(newVal, oldVal) {
-        // console.log('newVal============', newVal, 'oldVal============', oldVal);
         if (newVal !== oldVal) {
         if (newVal !== oldVal) {
           this.form.prags = this.form.prags.map(item => {
           this.form.prags = this.form.prags.map(item => {
             return { ...item, position: [] };
             return { ...item, position: [] };
@@ -234,8 +233,7 @@ export default {
           _this.handleClear();
           _this.handleClear();
         }, 300);
         }, 300);
       }
       }
-      api
-        .getTremList({ id: data.id })
+      api.getBaseRecordById({ id: data.id })
         .then(res => {
         .then(res => {
           if (res.data.code == '0') {
           if (res.data.code == '0') {
             const data = res.data.data;
             const data = res.data.data;
@@ -448,7 +446,7 @@ export default {
       }
       }
       //搜索术语列表
       //搜索术语列表
       this.showDrop = true;
       this.showDrop = true;
-      api.getAllConcept({ inputStr: query.trim(), types: [0] }).then(res => {
+      api.staticKnowledgeBaseInfo({ inputStr: query.trim(), types: [0] }).then(res => {
         this.showDrop = false;
         this.showDrop = false;
         if (res.data.code === '0') {
         if (res.data.code === '0') {
           this.terms = res.data.data;
           this.terms = res.data.data;
@@ -649,8 +647,7 @@ export default {
     //保存编辑 接口
     //保存编辑 接口
     sendSaveOrEdit(param) {
     sendSaveOrEdit(param) {
       this.isCopy && (param.id = undefined);
       this.isCopy && (param.id = undefined);
-      api
-        .saveTermPrompts(param)
+      api.saveBaseOrUpdateRecord(param)
         .then(res => {
         .then(res => {
           if (res.data.code === '0') {
           if (res.data.code === '0') {
             this.isSuccessUpload = 0; // 修改文件上传状态为0
             this.isSuccessUpload = 0; // 修改文件上传状态为0
@@ -658,7 +655,7 @@ export default {
             this.isSaveSuccess = true; // 保存成功,可正常退出
             this.isSaveSuccess = true; // 保存成功,可正常退出
             //返回带搜索条件的首页
             //返回带搜索条件的首页
             this.$router.push({
             this.$router.push({
-              name: 'MedicinePromptCDSS',
+              name: 'StaticInfo',
               params: Object.assign({}, this.$route.params, {
               params: Object.assign({}, this.$route.params, {
                 currentPage: 1
                 currentPage: 1
               })
               })

+ 403 - 0
src/components/knowledgeExtra/DiseaseTree.vue

@@ -0,0 +1,403 @@
+<template>
+  <div class="addMedicalMultRelationWrapper">
+    <crumbs :title="minTitle" fix="fixed" linkTo="AboutDisease"></crumbs>
+    <div class="contents">
+      <div class="content">
+        <div class="addBtn" v-if="list.length == 0">
+          <!-- <el-button
+            @click="addConcept"
+          >+ 新 增</el-button> -->
+        </div>
+
+        <div class="tree">
+          <el-tree
+            :data="list"
+            :props="defaultProps"
+            node-key="conceptId"
+            draggable
+            :allow-drag="allowDrag"
+            :allow-drop="allowDrop"
+            :expand-on-click-node="true"
+            :render-after-expand="true"
+            :highlight-current="true"
+            :default-expanded-keys="defaultExpandedArr"
+            @node-click = "handleNodeClick"
+          >
+            <span class="custom-tree-node" slot-scope="{ node, data }" >
+                <span class="custom-tree-node-name ellipsis" :class="{colorGray: data.isDeletedConcept == 'Y'}" :title="node.label">{{ node.label }}</span>
+                <span class="btn-box">
+                  <el-button
+                      class="btn-add fl"
+                      v-if="data.level < 2 &&data.level>0"
+                      type="text"
+                      size="mini"
+                      @click="(e) => append(data, e)">
+                      + 增加
+                  </el-button>
+                  <el-button
+                      class="btn-del fr"
+                      v-if="data.level != 0"
+                      type="text"
+                      size="mini"
+                      @click="() => remove(node, data)">
+                      删除
+                  </el-button>
+                </span>
+            </span>
+          </el-tree>
+        </div>
+        <div class="btn">
+          <el-button
+            type="primary"
+            :disabled = 'saveDisable'
+            @click="confirm"
+          >确 定</el-button>
+        </div>
+      </div>
+    </div>
+    <SearchList 
+      v-if="showSearch" 
+      :conceptList="conceptList" 
+      :addLevel="addLevel"
+      @closeSearch="closeSearch" 
+      @selectConcept="selectConcept" 
+      @searchConcept="searchConcept" />
+  </div>
+</template>
+<script type="text/javascript">
+import api from '@api/knowledgeTree.js';
+import SearchList from '../basicKnow/SearchList.vue';
+
+export default {
+    name:'DiseaseTree',
+    components:{
+      SearchList
+    },
+    data(){
+      return{
+        minTitle:'疾病相关维护-添加',
+        tab:[
+          {name:'ICD10疾病类别',id:'1'},
+          {name:'科室疾病类别',id:'2'},
+          {name:'药物类别',id:'3'},
+          {name:'症状类别',id:'4'},
+          {name:'手术和操作类别',id:'5'},
+          {name:'实验室检查类别',id:'6'},
+          {name:'辅助检查类别',id:'7'},
+        ],
+        curId:'1',
+        list: [],
+        defaultProps: {
+          children: 'nodeList',
+          label: 'conceptName'
+        },
+        conceptList: [], //概念列表
+        showSearch: false,
+        addLevel: 0,  //添加级别
+        excludedConceptIds:[],
+        operaList: [],
+        relationConceptId: '', //关联父类ID
+        level: 0, //层级(修改时只能显示三级)
+        saveDisable: false,  //保存按钮禁止点击
+        defaultExpandedArr: [],
+        relationTypes:[]
+      }
+    },
+    created(){
+      this.getTreeList(1)
+    },
+    methods:{
+      getTreeList(id){
+
+      const { isEdit, data } = this.$route.params
+      if(isEdit) {
+          this.isEdit = isEdit
+          this.minTitle = '疾病相关维护-修改'
+          const paramData = JSON.parse(JSON.stringify(data))
+          let result = paramData.diseaseDetailDTO||{}
+          // this.relationTypes = paramData.types[0]||[]
+          const itemStr = JSON.stringify(result)
+          let tmp = itemStr.replace(/disName/g,'conceptName').replace(/rname/g,'conceptName').replace(/datas/g,'nodeList').replace(/details/g,'nodeList').replace(/id/g,'conceptId').replace(/libName/g,'conceptName')
+          let item = JSON.parse(tmp)
+          item.level = 0
+          item.isExpanded = false
+          item.nodeList = this.IteraNodeList(item.nodeList, [], 1)
+          let arr = []
+          arr[0] = item
+          this.list = [...arr]
+      }
+      },
+      allowDrop(draggingNode, dropNode, type) {
+        if(draggingNode.parent.data.conceptName !== dropNode.parent.data.conceptName){
+          return false
+        }else{
+          return type !== 'inner'
+        }
+      },
+      allowDrag(draggingNode) {
+        return draggingNode.data.level != 0;//一级不可拖动
+      },
+      handleNodeClick(data) {
+          if(data.nodeList.length > 0) {
+            if(!data.isExpanded) {
+              this.defaultExpandedArr.push(data.conceptId)
+            } else {
+              this.defaultExpandedArr = this.defaultExpandedArr.filter(item => item !== data.conceptId)
+            }
+            this.$set(data, 'isExpanded', !data.isExpanded);
+          }
+      
+      },
+      confirm() { 
+        if(!this.list[0] || this.list[0].nodeList.length == 0) {
+          this.message('请输入数据信息');
+          return
+        }
+        const param = {
+          conceptId: this.list[0].conceptId,
+          sonRelationId: 17,
+          isOrderBy: 1
+        }
+        const nodeListResult = []
+        this.IteraNodeList(this.list[0].nodeList, nodeListResult, 0)
+        param.nodeList = nodeListResult
+        this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+        api.addTreeRelation(this.reparams(param)).then((res) => {
+          const { data } = res
+          if(data.code == '0') {
+            this.message(res.data.msg||'术语关系建立成功','success');
+          } else {
+            this.message(data.msg);
+          }
+          this.saveDisable = false;
+        })
+      },
+      IteraNodeList(nodeList,  nodeListResult, type, level = 1) {
+        this.level= level + 1
+        for(let i = 0; i <nodeList.length; i++) {
+          let newChild;
+          if(type == '0') { //添加的时候保存所有的id列表
+            newChild = {conceptId: nodeList[i].conceptId, relationId: 17,nodeList:[],sonRelationId: 17, isExpanded:false}
+          } else if(type == '1') {  //修改的时候添加层级
+            const item = JSON.parse(JSON.stringify(nodeList[i]))
+            newChild = Object.assign(item, {level:  level, nodeList: [],sonRelationId: 17, isExpanded:false})
+          } else if(type == '2') { //移除节点的时候同时移除节点(搜索时排除的id列表)
+            newChild = nodeList[i].conceptId
+          }
+          if(nodeList[i].nodeList &&nodeList[i].nodeList.length > 0&&level < 3) {
+            if(type == '0' || type =='1') {
+              this.IteraNodeList(nodeList[i].nodeList,  newChild.nodeList, type, level+1)
+            } else if(type == '2') {
+              this.IteraNodeList(nodeList[i].nodeList,  nodeListResult, type, level+1)
+            }
+          }
+          newChild&&nodeListResult.push(newChild)
+        }
+        return nodeListResult
+      },
+      searchConcept(txt) {
+        let  excludedConceptIds = [];
+        if(this.list[0]) {
+          this.excludedConceptIds = this.IteraNodeList(this.list[0].nodeList,excludedConceptIds, 2)
+        }
+        const {libType} = this.operaList
+        const params = {
+          "name": txt,
+          "excludedConceptIds": this.excludedConceptIds,
+          "libType": libType[0],
+        }
+        api.searchConcept(params).then((res) => {
+          const { data } = res
+          if(data.code == '0') {
+            this.conceptList = data.data
+          }
+        })
+      },
+      selectConcept(item) {
+        if(this.addLevel == 0) {
+          this.list.push(Object.assign({}, item,  {nodeList: [], level: 0, conceptId: item.conceptId, sonRelationId: 17}))
+          this.list = JSON.parse(JSON.stringify(this.list))
+        }else {
+          const data = this.operaList
+          const newChild = Object.assign({}, item,  {nodeList: [], level: data.level+1, conceptId: item.conceptId, relationId: 17,sonRelationId: 17});
+          // const newChild = { id: id++, label: 'nodeList', level: data.level+1, children: [] };
+          if (!data.nodeList) {
+          this.$set(data, 'nodeList', []);
+          }
+          data.nodeList.push(newChild);
+        }
+        this.conceptList = [];
+        this.closeSearch();
+      },
+      openSearch(e) {
+        this.showSearch = true
+      },
+      closeSearch() {
+        this.conceptText = ''
+        this.conceptList = []
+        this.showSearch = false
+      },
+      append(data, e) {
+          this.addLevel = data.level+1;
+          this.relationConceptId = data.conceptId
+          this.operaList = data;
+          this.openSearch(data);
+
+          // const newChild = { id: id++, label: 'testtest', level: data.level+1, nodeList: [] };
+          // if (!data.nodeList) {
+          // this.$set(data, 'nodeList', []);
+          // }
+          // data.nodeList.push(newChild);
+      },
+
+      remove(node, data) {
+          const parent = node.parent;
+          const nodeList = parent.data.nodeList || parent.data;
+          const index = nodeList.findIndex(d => d.conceptId === data.conceptId);
+          nodeList.splice(index, 1);
+      },
+      reparams(param){
+        let params = []
+        const tmplis = param.nodeList||[];
+        for(let i = 0;i < tmplis.length;i++){
+          let item = tmplis[i],sonIds=[]
+          if(item.nodeList&&item.nodeList.length>0){
+            for(let j = 0;j < item.nodeList.length;j++){
+              sonIds.push(item.nodeList[j].conceptId)
+            }
+          }
+          let obj = {
+            "eid": item.conceptId,
+            "eids": sonIds,
+            "rid": this.relationTypes[1],
+            "sid": param.conceptId,
+            "srid": this.relationTypes[3]
+          }
+          params.push(obj)
+        }
+        return params
+      },
+      message(msg,type){
+        this.$message({
+          showClose: true,
+          message:msg,
+          type:type||'warning'
+        })
+      },
+      
+    }
+}
+</script>
+<style lang="less" scoped>
+@import "../../less/admin.less";
+.content {
+  min-width: auto;
+  box-sizing: border-box;
+}
+.contents {
+  box-sizing: border-box;
+  box-sizing: border-box;
+}
+
+.addMedicalMultRelationWrapper {
+  height: calc(100% - 70px);
+}
+.tree {
+  margin-bottom: 230px;
+}
+.contents {
+  height: 100%;
+  padding-top: 60px;
+}
+.btn-box {
+  position: absolute;
+  left: 350px;
+}
+.btn-del {
+  color: #8F8F8F;
+  padding-left: 28px;
+}
+.addBtn {
+  width: 66px;
+  order: 1px solid #21CBC7;
+  border-radius: 2px;
+}
+.conceptSearch {
+  position: fixed;
+  right: 20px;
+  top: 180px;
+  bottom: 10px;
+  width: 300px;
+  background: #fff;
+  border: 1px solid #C9C9C9;
+  text-align: center;
+  z-index: 2;
+  padding: 30px;
+  box-sizing: border-box;
+  .conceptTitle {
+    width: 100%;
+    text-align: center;
+    padding: 20px 0;
+  }
+  .searchText {
+    padding: 0 35px 0 15px;
+    width: 100%;
+    height: 34px;
+    border: 1px solid #C9C9C9;
+    box-sizing: border-box;
+  }
+  .conceptList {
+    min-height: 200px;
+    max-height:300px;
+    margin: -2px auto 0;
+    border: 1px solid #E1DFDF;
+    overflow: hidden;
+    overflow-y: auto;
+  }
+  .conceptItem {
+    height: 34px;
+    line-height: 34px;
+    text-align: left;
+    padding: 0 15px;
+    cursor: pointer;
+  }
+  .conceptItem:hover {
+    background: #f5f7fa;
+  }
+  .closeSearch {
+    position: absolute;
+    width: 30px;
+    right: 0;
+    top: 0;
+  }
+  .searchWrap {
+    position: relative;
+    .search {
+      position: absolute;
+      right: 7px;
+      top:8px;
+    }
+  }
+}
+.delete {
+  cursor: pointer;
+}
+.content{
+  background: #fff;
+  padding: 20px 20px 30px;
+  color: #545455;
+ 
+}
+
+.btn {
+  text-align: right;
+  margin-top: 20px;
+}
+.custom-tree-node-name {
+  display: inline-block;
+  width: 270px;
+}
+.colorGray {
+  color: #c1c1c1;
+} 
+</style>

+ 299 - 410
src/components/knowledgeExtra/StaticInfo.vue

@@ -1,439 +1,328 @@
 <template>
 <template>
-  <div>
-    <crumbs title="医学术语静态知识维护" style="min-width: 1088px">
-      <el-form :inline="true" class="demo-form-inline">
-        <el-form-item label="标准术语归类:" class="selectMedicine">
-          <el-select size="mini" v-model="filter.libType" placeholder="请选择" clearable>
-            <el-option
-              v-for="item in typeList"
-              :label="item.name"
-              :value="item.orderNo"
-              :key="item.orderNo"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="标准术语:">
-          <el-input size="mini" maxlength="50" v-model="filter.term" placeholder="请输入" clearable></el-input>
-        </el-form-item>
-        <el-form-item label="状态:" class="selectMedicine">
-          <el-select size="mini" v-model="filter.status" placeholder="请选择" clearable>
-            <el-option v-for="item in stateList" :label="item.name" :value="item.id" :key="item.id"></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item class="dododo">
-          <el-button size="mini" @click="filterDatas">检索</el-button>
-          <!-- <el-button
-            size="mini"
-            type="warning"
-            @click="reIdentification"
-          >{{!reLoading?'更新图谱标识':'正在更新中...'}}</el-button> -->
-          <el-button size="mini" type="warning" @click="addMedicalPrompt">添加静态知识</el-button>
-        </el-form-item>
-      </el-form>
-    </crumbs>
-    <div class="contents">
-      <el-table :data="list" border style="width: 100%">
-        <el-table-column type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
-        <el-table-column prop="gmtModified" label="医学标准术语"></el-table-column>
-        <el-table-column prop="name" label="标准术语归类" :show-overflow-tooltip="true"></el-table-column>
-        <el-table-column prop="typeName" label="关联标题"></el-table-column>
-        <el-table-column label="状态" >
-          <template slot-scope="scope">
-            <span v-if="scope.row.status===1">启用</span>
-            <span v-if="scope.row.status===0">禁用</span>
-          </template>
-        </el-table-column>
-        <el-table-column prop="title" label="操作人"  :show-overflow-tooltip="true"></el-table-column>
-        <el-table-column prop="title" label="操作时间"  :show-overflow-tooltip="true"></el-table-column>
-        <el-table-column label="操作" width="140">
-          <template slot-scope="scope">
-            <el-button v-if="scope.row.status===0" type="text" size="small" class="is-disabled">修改</el-button>
-            <el-button
-              v-if="scope.row.status===1"
-              type="text"
-              size="small"
-              @click="toEditProduct(scope.row)"
-            >修改</el-button>
-             <span style="margin:0 3px;">|</span>
-             <el-button type="text" size="small" @click="toCopyProduct(scope.row)">复制</el-button>
-            <span style="margin:0 3px;">|</span>
-            <el-button
-              v-if="scope.row.status===0"
-              type="text"
-              size="small"
-              @click="showReuseDialog(scope.row)"
-            >启用</el-button>
-            <el-button
-              v-if="scope.row.status===1"
-              type="text"
-              size="small"
-              class="delete"
-              @click="showDelDialog(scope.row)"
-            >禁用</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-      <el-pagination
-        :current-page.sync="currentPage"
-        @current-change="currentChange"
-        background
-        :page-size="pageSize"
-        class="pagepage pagepage"
-        :page-sizes="pageSizeArr"
-        @size-change="handleSizeChange"
-        :layout="pageLayout"
-        :total="total"
-      ></el-pagination>
+    <div>
+        <crumbs title="医学术语静态知识维护">
+            <el-form :inline="true" class="demo-form-inline">
+                <el-form-item label="标准术语归类:">
+                    <el-select size="mini" v-model="filter.libType" placeholder="标准术语归类" clearable>
+                        <el-option v-for="item in typeList" :label="item.name" :value="item.val" :key="item.val"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="医学标准术语:">
+                    <el-input size="mini" v-model="filter.term" placeholder="请输入术语" clearable></el-input>
+                </el-form-item>
+                <el-form-item label="状态:">
+                    <el-select size="mini" v-model="filter.status" placeholder="请选择" clearable>
+                        <el-option v-for="item in stateList" :label="item.name" :value="item.id" :key="item.id"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item>
+                    <el-button size="mini" @click="filterDatas">确认</el-button>
+                    <el-button size="mini" type="warning" style="margin:0 10px" @click="addMedicalPrompt">添加静态知识</el-button>
+                </el-form-item>
+            </el-form>
+        </crumbs>
+        <div class="contents">
+            <el-table :data="list"
+                      border
+                      style="width: 100%">
+                <el-table-column
+                        type="index"
+                        :index="indexMethod"
+                        label="编号"
+                        width="60">
+                </el-table-column>
+                <el-table-column
+                        prop="name"
+                        label="医学标准术语">
+                </el-table-column>
+                <el-table-column
+                        prop="typeName"
+                        label="标准术语归属"
+                        width="120">
+                </el-table-column>
+                <el-table-column
+                        prop="title"
+                        label="关联标题"
+                        width="240">
+                </el-table-column>
+                <el-table-column
+                        label="状态">
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.isDeleted=='N'">启用</span>
+                        <span v-if="scope.row.isDeleted=='Y'" class="delete">禁用</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="modifier"
+                        label="操作人"
+                        width="80">
+                </el-table-column>
+                <el-table-column
+                        prop="gmtModified"
+                        label="操作时间"
+                        width="180"
+                        :show-overflow-tooltip="true">
+                </el-table-column>
+                <el-table-column
+                        label="操作" width="140">
+                    <template slot-scope="scope">
+                        <el-button v-if="scope.row.isDeleted=='Y'" type="text" size="small" class="is-disabled">修改</el-button>
+                        <el-button v-if="scope.row.isDeleted=='N'" type="text" size="small" @click="toEditProduct(scope.row)">修改</el-button>
+                        <span style="margin:0 3px;">|</span>
+                        <el-button v-if="scope.row.isDeleted=='Y' || scope.row.typeId === 82 || scope.row.typeId === 83" type="text" size="small" class="is-disabled">复制</el-button>
+                        <el-button v-if="scope.row.isDeleted=='N'&&scope.row.typeId !== 82 && scope.row.typeId !== 83" type="text" size="small" @click="toCopyProduct(scope.row)">复制</el-button>
+                        <span style="margin:0 3px;">|</span>
+                        <el-button v-if="scope.row.isDeleted=='Y'" type="text" size="small" @click="showReuseDialog(scope.row)">启用</el-button>
+                        <el-button v-if="scope.row.isDeleted=='N'" type="text" size="small" class="delete" @click="showDelDialog(scope.row)">禁用</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <el-pagination :current-page.sync="currentPage"
+                           @current-change="currentChange"
+                           background
+                           :page-size="pageSize"
+                           :page-sizes="pageSizeArr"
+                           @size-change="handleSizeChange"
+                           :layout="pageLayout"
+                           :total="total">
+            </el-pagination>
+        </div>
+
     </div>
     </div>
-  </div>
 </template>
 </template>
 
 
 <script>
 <script>
-import api from '@api/cdss.js';
-import config from '@api/config.js';
-import utils from '@api/utils.js';
-
-export default {
-  name: 'MedicinePrompt',
-  data: function() {
-    return {
-      list: [],
-      cacheData: {},
-      currentPage: 1,
-      pageSize: config.pageSize,
-      pageSizeArr: config.pageSizeArr,
-      pageLayout: config.pageLayout,
-      total: 0,
-      linkIn: [],
-      pays: [],
-      typeList: [],
-      stateList: [
-        { id: 1, name: '启用' },
-        { id: 0, name: '禁用' }
-      ],
-      searched: false,
-      filter: {
-        term: '',
-        title: '',
-        status: '',
-        libType: ''
-      },
-      // reLoading: false //更新图谱标识
-    };
-  },
-  created() {
-    const that = this;
-    //返回时避免参数未赋值就获取列表
-    setTimeout(function() {
-      // that.getDataList();
-      // that.getListDicCDSS();
-    });
-    // this.typeList = config.emData;
-    // 非首页 编辑页返回 设置 this.currentPage
-    if (Object.keys(this.$route.params).length !== 0) {
-      this.currentPage = this.$route.params.currentPage;
-    }
-  },
-  watch: {
-    filter: {
-      handler: function() {
-        this.searched = false;
-      },
-      deep: true
-    }
-  },
-  beforeRouteEnter(to, from, next) {
-    next(vm => {
-      //const pm = to.param;
-      Object.assign(vm, to.params);
-      vm.inCurrentPage = to.params.currentPage;
-    });
-  },
-  methods: {
-    //更新图谱标识
-    // reIdentification() {
-    //   this.reLoading = true;
-    //   api.BatchUpdateHasInfoStatus().then(res => {
-    //     this.reLoading = false;
-    //     if (res.data.code === '0' && res.data.data === true) {
-    //       // 更新成功
-    //       this.warning('更新成功', 'success');
-    //     } else {
-    //       // 更新失败
-    //       this.warning('更新失败');
-    //     }
-    //   });
-    // },
+  import api from '@api/knowledgeTree.js';
+  import config from '@api/config.js';
+  import utils from '@api/utils.js';
 
 
-    getListDicCDSS() {
-      api.getListDicCDSS().then(res => {
-        if (res.data.code === '0') {
-          this.typeList = res.data.data && res.data.data['10'];
+  export default {
+    name: 'StaticInfo',
+    data: function () {
+      return {
+        list: [],
+        cacheData: {},
+        currentPage: 1,
+        pageSize: config.pageSize,
+        pageSizeArr:config.pageSizeArr,
+        pageLayout:config.pageLayout,
+        total: 0,
+        linkIn:[],
+        pays:[],
+        typeList:[],
+        stateList:[
+          {id:'N',name:'启用'},
+          {id:'Y',name:'禁用'},
+        ],
+        searched: false,
+        filter: {
+          term: '',
+          title:'',
+          status:'',
+          libType:'',
         }
         }
-      });
-    },
-
-    handleSizeChange(val) {
-      this.pageSize = val;
-      this.currentPage = utils.getCurrentPage(
-        this.currentPage,
-        this.total,
-        this.pageSize
-      );
-      this.getDataList();
-    },
-    addMedicalPrompt() {
-      const pam = this.searched
-        ? {
-            currentPage: this.currentPage,
-            pageSize: this.pageSize,
-            filter: this.filter
-          }
-        : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({ name: 'AddDevKnow', params: pam });
+      }
     },
     },
-    toEditProduct(row) {
-      const pam = this.searched
-        ? {
-            currentPage: this.currentPage,
-            pageSize: this.pageSize,
-            filter: this.filter
-          }
-        : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddDevKnow',
-        params: Object.assign(pam, { data: row, isEdit: true })
+    created() {
+      //返回时避免参数未赋值就获取列表
+      setTimeout(()=>{
+        this.getDataList();
+        this.getListBack();
       });
       });
+      // const enums = JSON.parse(localStorage.getItem('knowledgeEnumsData'));
+      // this.typeList = enums.conceptDetailLexiconTypeEnum;
     },
     },
-    toCopyProduct(row) {
-      const pam = this.searched
-        ? {
-            currentPage: this.currentPage,
-            pageSize: this.pageSize,
-            filter: this.filter
-          }
-        : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddDevKnow',
-        params: Object.assign(pam, { data: row, isCopy: true })
-      });
+    watch: {
+      'filter': {
+        handler: function () {
+          this.searched = false;
+        },
+        deep: true
+      }
     },
     },
-    filterDatas() {
-      this.currentPage = 1;
-      this.getDataList();
+    beforeRouteEnter(to, from, next){
+      next(vm => {
+        //const pm = to.param;
+        Object.assign(vm,to.params);
+        vm.inCurrentPage=to.params.currentPage;
+      })
     },
     },
-    getDataList(isTurnPage) {
-      const param = this.getFilterItems(isTurnPage);
-      this.searched = true;
-      const loading = this.$loading({
-        lock: true,
-        text: 'Loading',
-        spinner: 'el-icon-loading',
-        background: 'rgba(0, 0, 0, 0.7)'
-      });
-      api
-        .getConceptKnowledgeList(param)
-        .then(res => {
-          loading.close();
+    methods: {
+      handleSizeChange(val){
+        this.pageSize = val;
+        this.currentPage = utils.getCurrentPage(this.currentPage, this.total, this.pageSize);
+        this.getDataList();
+      },
+      addMedicalPrompt(){
+        const pam = this.searched ? {
+          currentPage: this.currentPage,
+          pageSize:this.pageSize,
+          filter: this.filter
+        } : {currentPage: this.currentPage,
+          pageSize:this.pageSize};
+        this.$router.push({name:'AddDevKnow',
+          params:pam});
+      },
+      toEditProduct(row){
+        const pam = this.searched ? {
+          currentPage: this.currentPage,
+          pageSize:this.pageSize,
+          filter: this.filter
+        } : {currentPage: this.currentPage,
+          pageSize:this.pageSize};
+        this.$router.push({
+          name:'AddDevKnow',
+          params: Object.assign(pam, {data:row,isEdit:true})
+        })
+      },
+      toCopyProduct(row){
+        const pam = this.searched ? {
+          currentPage: this.currentPage,
+          pageSize:this.pageSize,
+          filter: this.filter
+        } : {currentPage: this.currentPage,
+          pageSize:this.pageSize};
+        this.$router.push({
+          name:'AddDevKnow',
+          params: Object.assign(pam, {data:row,isCopy:true})
+        })
+      },
+      filterDatas(){
+        this.currentPage = 1;
+        this.getDataList();
+      },
+      getListBack(){
+        api.getListBack({}).then((res) => {
+          const result = res.data
+          if (result.code == '0') {
+            this.typeList = result.data&&result.data[10]||[]
+          }
+        })
+      },
+      getDataList(isTurnPage) {
+        const param = this.getFilterItems(isTurnPage);
+        this.searched = true;
+        const loading = this.$loading({
+            lock: true,
+            text: 'Loading',
+            spinner: 'el-icon-loading',
+            background: 'rgba(0, 0, 0, 0.7)'
+        });
+        api.staticBaseKnowledge(param).then((res) => {
+          loading.close()
           if (res.data.code == '0') {
           if (res.data.code == '0') {
             const data = res.data.data;
             const data = res.data.data;
-            // 类型:1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、6-检查子项  7-手术和操作
-            let temp = [
-              '',
-              '诊断',
-              '药品',
-              '检验套餐',
-              '检验细项',
-              '检查',
-              '检查子项',
-              '手术和操作'
-            ];
-            this.list = data.records = data.records.filter(item => {
-              item.typeName = temp[item.type];
-              return item;
-            });
+            let templis = data.records;
+            this.list = templis;
             this.cacheData[param.current] = data.records;
             this.cacheData[param.current] = data.records;
             this.total = data.total;
             this.total = data.total;
-            if (this.inCurrentPage !== undefined) {
-              this.currentPage = this.inCurrentPage;
+            for(let i = 0;i < templis.length;i++){
+              templis[i].isDeleted = templis[i].status=='1'?'N':'Y'
+            }
+            if(this.inCurrentPage!==undefined){
+              this.currentPage=this.inCurrentPage;
               this.inCurrentPage = undefined;
               this.inCurrentPage = undefined;
             }
             }
           }
           }
-        })
-        .catch(error => {
-          if (error.code === '900010001') {
-            return false;
-          }
+        }).catch((error) => {
           console.log(error);
           console.log(error);
         });
         });
-    },
-    clearFilter() {
-      this.filter = {
-        term: '',
-        title: '',
-        status: '',
-        libType: ''
-      };
-    },
-    getFilterItems(isTurnPage) {
-      //翻页时筛选条件没点确定则清空
-      if (isTurnPage && !this.searched) {
-        this.clearFilter();
-      }
-      const param = {
-        name: this.filter.term.trim(),
-        title: this.filter.title,
-        current: this.inCurrentPage || this.currentPage,
-        size: this.pageSize,
-        status: this.filter.status,
-        type: this.filter.libType
-      };
-      return param;
-    },
-    indexMethod(index) {
-      return (this.currentPage - 1) * this.pageSize + index + 1;
-    },
-    currentChange(next) {
-      this.currentPage = next;
-      /*if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
+      },
+      clearFilter(){
+        this.filter={
+          term: '',
+          title:'',
+          status:'',
+          libType:'',
+        };
+      },
+      getFilterItems(isTurnPage) {
+        //翻页时筛选条件没点确定则清空
+        if(isTurnPage&&!this.searched){
+          this.clearFilter();
+        };
+        const param = {
+          name:this.filter.term.trim(),
+          current: this.inCurrentPage||this.currentPage,
+          size: this.pageSize,
+          status:this.filter.status == 'Y'?0:this.filter.status == 'N'?1:'',
+          type:this.filter.libType||'',
+        };
+        return param;
+      },
+      indexMethod(index) {
+        return ((this.currentPage - 1) * this.pageSize) + index + 1;
+      },
+      currentChange(next) {
+        this.currentPage = next;
+        /*if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
           this.list = this.cacheData[next];
           this.list = this.cacheData[next];
         } else {*/
         } else {*/
-      this.getDataList(true);
-      //}
-    },
-    warning(msg, type) {
-      this.$message({
-        showClose: true,
-        message: msg,
-        type: type || 'warning'
-      });
-    },
-    showConfirmDialog(msg, resolve, type) {
-      let showInfo = '启用';
-      let btnNameClass = 'confirmBtn1';
-      if (type === 'Del') {
-        showInfo = '禁用';
-        btnNameClass = 'delBtn';
-      }
-
-      this.$alert(msg, '提示', {
-        confirmButtonText: showInfo,
-        // cancelButtonText: '取消',
-        // cancelButtonClass: 'cancelBtn',
-        // confirmButtonClass: btnNameClass,
-        type: 'warning'
-      })
-        .then(() => {
-          resolve();
+          this.getDataList(true);
+        //}
+      },
+      warning(msg,type){
+        this.$message({
+          showClose: true,
+          message:msg,
+          type:type||'warning'
         })
         })
-        .catch(() => {});
-    },
-    showDelDialog(row) {
-      this.showConfirmDialog(
-        '确定禁用该静态知识?',
-        () => {
-          api
-            .delConceptInfo({ id: row.id, status: 0 })
-            .then(res => {
-              if (res.data.code == '0') {
-                if (!this.searched) {
-                  //未点确认时清空搜索条件
-                  this.clearFilter();
-                }
-                this.warning(res.data.msg || '操作成功', 'success');
-                this.getDataList();
-              } else {
-                this.warning(res.data.msg);
-              }
-            })
-            .catch(error => {
-              if (error.code === '900010001') {
-                return false;
-              }
-              this.warning(error);
-            });
-        },
-        'Del'
-      );
-    },
-    showReuseDialog(row) {
-      this.showConfirmDialog(
-        '确定启用该静态知识?',
-        () => {
-          api
-            .delConceptInfo({ id: row.id, status: 1 })
-            .then(res => {
-              if (res.data.code == '0') {
-                this.currentPage = 1; //恢复数据跳转到筛选条件下首页
-                this.warning(res.data.msg || '操作成功', 'success');
-                this.getDataList();
-              } else {
-                this.warning(res.data.msg);
-              }
-            })
-            .catch(error => {
-              if (error.code === '900010001') {
-                return false;
+      },
+      showConfirmDialog(msg,resolve){
+        this.$confirm(msg, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          cancelButtonClass:'cancel',
+          type: 'warning'
+        }).then(() => {
+          resolve();
+        }).catch(() => {});
+      },
+      showDelDialog(row){
+        this.showConfirmDialog('是否删除该静态知识?',()=>{
+          api.changeBaseStatus({id:row.id,status:0}).then((res)=>{
+            if(res.data.code=='0'){
+              if(!this.searched){
+                //未点确认时清空搜索条件
+                this.clearFilter();
               }
               }
-              this.warning(error);
-            });
-        },
-        'Reuse'
-      );
+              this.warning(res.data.msg||'操作成功','success');
+              this.getDataList();
+            }else{
+              this.warning(res.data.msg);
+            }
+          }).catch((error)=>{
+            this.warning(error);
+          })
+        });
+      },
+      showReuseDialog(row){
+        this.showConfirmDialog('是否重新启用该条数据?',()=>{
+          api.changeBaseStatus({id:row.id,status:1}).then((res)=>{
+            if(res.data.code=='0'){
+              this.currentPage = 1;         //恢复数据跳转到筛选条件下首页
+              this.warning(res.data.msg||'操作成功','success');
+              this.getDataList();
+            }else{
+              this.warning(res.data.msg);
+            }
+          }).catch((error)=>{
+            this.warning(error);
+          })
+        });
+      }
     }
     }
   }
   }
-};
 </script>
 </script>
 
 
-<style lang="less" scoped>
-@import '../../less/admin.less';
-.status-span {
-  font-size: 12px;
-  margin-right: 10px;
-  color: unset;
-}
-.dododo {
-  margin-top: 1px !important;
-}
-.pagepage {
-  .el-input.el-input--mini.el-input--suffix input {
-    height: 28px;
-    line-height: 28px;
-  }
-  .el-pagination__sizes {
-    margin-right: 20px !important;
-  }
-}
-.el-message-box {
-  /deep/ .cancelBtn {
-    background-color: #d7d7d7;
-    border-color: transparent;
-  }
-  /deep/ .delBtn {
-    background-color: #ff545b !important;
-    border-color: transparent !important;
-  }
-  /deep/ .confirmBtn1 {
-    position: relative;
-    right: 0px !important;
-  }
-}
-
-.selectMedicine {
-  // /deep/ .el-input__suffix-inner {
-  //   position: relative;
-  //   top: -1px;
-  // }
-  /deep/ .el-icon-circle-close {
-    position: relative;
-    // top: -2px;
-    left: 12px;
-  }
-}
-
-body {
-  .el-tooltip__popper {
-    max-width: 400px;
-  }
-}
-</style>
+<style lang="less">
+    @import "../../less/admin.less";
+    .status-span{
+        font-size: 12px;
+        margin-right:10px;
+        color: unset;
+    }
+    .delete {
+      color: red;
+    }
+</style>

+ 13 - 1
src/routes.js

@@ -203,7 +203,9 @@ import AddTerm from '@components/basicKnow/AddTerm.vue'   //知识库基础维
 import StaticInfo from '@components/knowledgeExtra/StaticInfo.vue'   //知识库扩展维护-静态信息维护
 import StaticInfo from '@components/knowledgeExtra/StaticInfo.vue'   //知识库扩展维护-静态信息维护
 import AddDevKnow from '@components/knowledgeExtra/AddDevKnow.vue'   //知识库扩展维护-静态信息维护-编辑
 import AddDevKnow from '@components/knowledgeExtra/AddDevKnow.vue'   //知识库扩展维护-静态信息维护-编辑
 import KnowledgeAll from '@components/knowledgeExtra/KnowledgeAll.vue'   //知识库树
 import KnowledgeAll from '@components/knowledgeExtra/KnowledgeAll.vue'   //知识库树
-import KnowledgeBaseType from '@components/knowledgeExtra/KnowledgeBaseType.vue'   //知识库树
+import KnowledgeBaseType from '@components/knowledgeExtra/KnowledgeBaseType.vue'   
+import AboutDisease from '@components/knowledgeExtra/AboutDisease.vue'   
+import DiseaseTree from '@components/knowledgeExtra/DiseaseTree.vue'   
 
 
 export default [
 export default [
   {
   {
@@ -611,6 +613,16 @@ export default [
         component: KnowledgeBaseType,
         component: KnowledgeBaseType,
         name: 'KnowledgeBaseType',
         name: 'KnowledgeBaseType',
       }, //基础术语类型维护
       }, //基础术语类型维护
+      {
+        path: 'LT-ZSKKZWH-JBXGWH',
+        component: AboutDisease,
+        name: 'AboutDisease',
+      }, //疾病相关维护
+      {
+        path: 'LT-ZSKKZWH-JBXGWH-EDIT',
+        component: DiseaseTree,
+        name: 'DiseaseTree',
+      }, //疾病相关维护
     ],
     ],
   },
   },
 ];
 ];