瀏覽代碼

merge from test

zhangxc 6 年之前
父節點
當前提交
5aad341d0e

+ 1 - 0
package.json

@@ -9,6 +9,7 @@
   },
   "dependencies": {
     "js-md5": "^0.7.3",
+    "quill-image-extend-module": "^1.1.2",
     "vue": "^2.5.17",
     "vue-quill-editor": "^3.0.6"
   },

+ 14 - 9
src/api/config.js

@@ -146,16 +146,19 @@ export default {
     'getVersionDetlInfo': 'api/icssman/versionDetail/getDetailById', //版本信息-版本说明列表获取
     'promptServer':'/api/icssman/file/uploadImage',    //静态知识
     /**************医学术语维护****************/
-	  'saveConceptInfo':'/api/knowledgeman/libraryDetail/addLibraryDetail',   //保存术语静态知识
+	'saveConceptInfo':'/api/knowledgeman/libraryDetail/addLibraryDetail',   //保存术语静态知识
     'delConceptInfo':'/api/knowledgeman/libraryDetail/removeLibraryDetail',   //删除术语静态知识
-    // 'knowledgeName': 'api/knowledgeman/medical/getAllMedicalInfo', //医学术语--命名维护
-    'knowledgeName': 'api/knowledgeman/concept/getAllInformation', //医学术语--命名维护
-    'knowledgeUpload': 'api/knowledgeman/concept/importTermExcel', //医学术语--命名维护-导入
-    'allKnowledgeType': 'api/knowledgeman/type/getAllType', //医学术语--类型列表
-    'deletMedicalName': 'api/knowledgeman/concept/removeConceptInfo', //医学术语--命名维护-删除
-    'getMedicalDetail': 'api/knowledgeman/medical/getMedicalInfo', //医学术语--命名维护-修改获取同义词
-    'knowledgeRelation': 'api/knowledgeman/relation/getAllRelation', //医学术语--关系维护
-    'delKnowledgeRelation': 'api/knowledgeman/relation/removeRelation', //医学术语--关系维护-删除
+    'knowledgeName': 'api/knowledgeman/concept/getAllInformation', //医学术语-命名维护
+    'knowledgeUpload': 'api/knowledgeman/concept/conceptInfoExcelIm', //医学术语-命名维护-导入
+    'allKnowledgeType': 'api/knowledgeman/lexicon/getAllLexicon', //医学术语-类型列表
+    'deletMedicalName': 'api/knowledgeman/concept/removeConceptInfo', //医学术语-命名维护-删除
+    'getMedicalDetail': 'api/knowledgeman/concept/getConceptInfoDetail', //医学术语-命名维护-详情
+    'addMedicalName': 'api/knowledgeman/concept/addConceptInfo', //医学术语-命名维护-添加修改
+    'knowledgeRelation': 'api/knowledgeman/relation/getRelationInfoList', //医学术语-关系维护
+    'delKnowledgeRelation': 'api/knowledgeman/relation/removeRelationInfo', //医学术语-关系维护-删除
+    'getAllRelationType': 'api/knowledgeman/lexiconRelationship/getAllLexiconRelationship', //医学术语-关系维护-关系下拉
+    'addRelationConcept': 'api/knowledgeman/relation/addRelationInfo', //医学术语-关系维护-添加
+    'RelationUpload': 'api/knowledgeman/relation/relationInfoExcelIm', //医学术语-关系维护-导入
     'getAllConcept': 'api/knowledgeman/concept/getAllConcept', //查询所有术语名称
     'getMedicalInfoList': '/api/knowledgeman/medical/getMedicalInfoList', //医学术语--属性维护--属性列表
     'medicalInfoExcelIm': '/api/knowledgeman/medical/medicalInfoExcelIm', //医学术语--属性维护-术语医学属性excel文件导入
@@ -171,6 +174,8 @@ export default {
     'delLisMappingById': '/api/icssman/lisMapping/delLisMappingById',  //医学数据-化验大小项与公表项维护-单个删除
     'delLisMappingByIds': '/api/icssman/lisMapping/delLisMappingByIds', //医学数据-化验大小项与公表项维护-批量删除
     'modifyLisMapping': '/api/icssman/lisMapping/modifyLisMapping',  //医学数据-化验大小项与公表项维护-修改
+    'getTypeList': 'api/knowledgeman/lexicon/getLexiconList', //术语类型-列表
+    'addType': 'api/knowledgeman/lexicon/addLexicon', //术语类型-添加
 	},
 	menuIconList: { //菜单对应图标
 		'YH-KZT': 'el-icon-menu',

+ 20 - 2
src/api/icss.js

@@ -220,7 +220,7 @@ export default {
     knowledgeName(param) {//命名维护
         return axios.post(urls.knowledgeName, param)
     },
-    allKnowledgeType(param) {//命名维护
+    allKnowledgeType(param) {//命名维护-类型列表
         return axios.post(urls.allKnowledgeType, param)
     },
     knowledgeUpload(param) {//命名维护--导入
@@ -229,15 +229,27 @@ export default {
     deletMedicalName(param) {//命名维护--删除
         return axios.post(urls.deletMedicalName, param)
     },
-    getMedicalDetail(param) {//命名维护--修改
+    getMedicalDetail(param) {//命名维护--获取详情
         return axios.post(urls.getMedicalDetail, param)
     },
+    addMedicalName(param) {//命名维护--新增、修改
+        return axios.post(urls.addMedicalName, param)
+    },
     knowledgeRelation(param) {//关系维护
         return axios.post(urls.knowledgeRelation, param)
     },
     delKnowledgeRelation(param) {//关系维护-删除
         return axios.post(urls.delKnowledgeRelation, param)
     },
+    getAllRelationType(param) {//关系维护-术语关系
+        return axios.post(urls.getAllRelationType, param)
+    },
+    addRelationConcept(param) {//关系维护-添加
+        return axios.post(urls.addRelationConcept, param)
+    },
+    RelationUpload(param) {//关系维护-导入
+        return axios.post(urls.RelationUpload, param)
+    },
     getAllConcept(param) {//查询所有术语名称
         return axios.post(urls.getAllConcept, param)
     },
@@ -283,5 +295,11 @@ export default {
     modifyLisMapping(param) {  //医学数据-化验大小项与公表项维护-修改
         return axios.post(urls.modifyLisMapping, param)
     },
+	getTypeList(param) {//术语类型-列表
+        return axios.post(urls.getTypeList, param)
+    },
+    addType(param) {//术语类型-添加
+        return axios.post(urls.addType, param)
+    },
 
 }

+ 48 - 2
src/components/icss/AddIndeptLabel.vue

@@ -161,7 +161,7 @@
         this.showSaveDialog(param);
       },
       showSaveDialog(param) {
-        this.showConfirmDialog('是否保存该标签?', () => {
+        /*this.showConfirmDialog('是否保存该标签?', () => {
           api.saveOrUpdate(param).then((res) => {
             if (res.data.code === '0') {
               this.warning(res.data.msg || '保存成功', 'success');
@@ -172,7 +172,49 @@
           }).catch((err) => {
             this.warning(err);
           })
-        });
+        });*/
+        const h = this.$createElement;
+        this.$msgbox({
+          title:'提示',
+          message:h('div',{style:'padding-bottom:10px'},[
+              h('p',{style:'font-size:15px;margin-bottom:10px'},'是否保存该标签?'),
+              h('span',{style:'color:red;font-size:12px'},'标签系统名称已经改变,请去别名维护中修改相关信息'),
+            ]),
+          showCancelButton: true,
+          distinguishCancelAndClose:true,
+          confirmButtonText: '确认并前往别名维护',
+          cancelButtonText:'确认',
+          // type: 'warning',
+          cancelButtonClass:'toast-cancel'
+        }).then(()=>{
+          api.saveOrUpdate(param).then((res) => {
+            if (res.data.code === '0') {
+              this.warning(res.data.msg || '保存成功', 'success');
+              this.$router.push({
+                name:'AddSimilarName',
+                params: {id:param.questionWrapper.id,name:param.questionWrapper.tagName}
+              })
+            } else {
+              this.warning(res.data.msg)
+            }
+          }).catch((err) => {
+            this.warning(err);
+          })
+        }).catch((action)=>{
+          // action :cancel--取消,close--关闭
+          if(action=='cancel'){
+            api.saveOrUpdate(param).then((res) => {
+              if (res.data.code === '0') {
+                this.warning(res.data.msg || '保存成功', 'success');
+                this.$router.push("/admin/LT-YXSJWH-DLLXBQWH");
+              } else {
+                this.warning(res.data.msg)
+              }
+            }).catch((err) => {
+              this.warning(err);
+            })
+          }
+        })
       },
       showConfirmDialog(msg, resolve) {
         this.$alert(msg, '提示', {
@@ -231,5 +273,9 @@
     }
     }
     }
+    .toast-cancel{
+      color: #22ccc8 !important;
+      // background: #22ccc8;
+    }
 </style>
 

+ 85 - 69
src/components/icss/AddMedicalName.vue

@@ -15,7 +15,7 @@
           <tr>
             <td class="ind">1</td>
             <td :title="data.name&&data.name.length>9?data.name:''">
-              <el-input v-model="data.name" placeholder="请输入术语" maxlength="30" size="small"></el-input>
+              <el-input v-model="data.name" placeholder="请输入术语" maxlength="30" size="small" @input="handleInput"></el-input>
             </td>
             <td>
               <el-select v-if="!id" v-model="data.type" filterable placeholder="请选择" size="small">
@@ -29,7 +29,7 @@
               <span v-else>{{data.type}}</span>
             </td>
             <td class="desc">
-              <el-input v-model="data.mark" placeholder="请输入术语说明" maxlength="120" size="small"></el-input>
+              <el-input v-model="data.remark" placeholder="请输入术语说明" maxlength="120" size="small" @input="handleRemark"></el-input>
             </td>
           </tr>
         </table>
@@ -45,7 +45,7 @@
           <tr v-for="(item,index) in synonymous">
             <td class="ind">{{index+1}}</td>
             <td :title="item.name&&item.name.length>9?item.name:''">
-              <el-input v-model="item.name" placeholder="请输入术语" maxlength="30" size="small"></el-input>
+              <el-input v-model="item.name" placeholder="请输入术语" maxlength="30" size="small" @input="handleInput(index,item.name)"></el-input>
             </td>
             <td>
               <!-- <el-select v-model="item.type" clearable placeholder="请选择">
@@ -59,7 +59,7 @@
               {{data.type}}
             </td>
             <td class="desc">
-              <el-input v-model="item.note" placeholder="请输入术语说明" maxlength="120" size="small"></el-input>
+              <el-input v-model="item.remark" placeholder="请输入术语说明" maxlength="120" size="small" @input="handleRemark(index,item.name)"></el-input>
             </td>
             <td v-if="id">
               <span @click="deleLine(index)" class="delete">删除</span>
@@ -89,26 +89,26 @@ import api from '@api/icss.js';
         data:{
           name:'',
           type:'',
-          mark:'', 
-          type:''
+          remark:'',
+          isConcept:1
         },
         typeList:[],
         id:null,
         synonymous:[//同义词
             {
               name:'',
-              id:1,
-              note:''
+              remark:'',
+              isConcept:0
             },
             {
               name:'',
-              id:2,
-              note:''
+              remark:'',
+              isConcept:0
             },
             {
               name:'',
-              id:3,
-              note:''
+              remark:'',
+              isConcept:0
             },
           ],
         colspan:4,
@@ -118,44 +118,37 @@ import api from '@api/icss.js';
     },
     created(){
       this.getTypeList();
-      const info = this.$route.params.info;
-      if(info){
+      const id = this.$route.params.id;
+      if(id){
         this.minTitle = '医学术语命名维护-修改';
-        this.id = info.id;
-        this.data.name = info.name;
-        this.data.type = info.type;
-        this.data.remark = info.remark;
+        this.id = id;
         this.colspan = 5;
         this.getDetail();
       }
     },
     methods:{
       getDetail(){
-        const params = {
-          term:this.data.name,
-          type:this.data.type
-        }
-        api.getMedicalDetail(params).then((res)=>{
-          const result = res.data;
-          if(result.code == 0){
-            this.synonymous = result.data.medicalInfo;
-          }else{
-            this.$message({
-              message:result.msg,
-              type:'warning'
-            });
-          }
-        })
+        if(this.id){
+          api.getMedicalDetail({'conceptId':this.id}).then((res)=>{
+            const result = res.data;
+            if(result.code == 0){
+              this.data = result.data.libName[0];
+              this.synonymous = result.data.otherNames;
+            }else{
+              this.$message({
+                message:result.msg,
+                type:'warning'
+              });
+            }
+          })
+        }  
       },
       getTypeList(){
-        const param = {
-          current: this.currentPage,
-          size: this.pageSize
-        }
-        api.allKnowledgeType(param).then((res)=>{
+        api.allKnowledgeType({'name':''}).then((res)=>{
           const data = res.data;
           if(data.code==0){
-            this.typeList = data.data.records;
+            // this.typeList = data.data.records;
+            this.typeList = data.data;
           }else{
             this.$message({
               message:data.msg,
@@ -166,21 +159,29 @@ import api from '@api/icss.js';
           console.log(error);
         });
       },
-      handleInput(){//限制输入类型
-
+      handleInput(index,name){
+        // 可输入内容:字母、数字、汉字、特殊字符:%  ——  其余不可输入;
+        if(!name){//标准词输入
+          this.data.name = this.data.name.replace(/[^%0-9a-zA-Z\u4e00-\u9fa5]/g,'');
+        }else{
+          this.synonymous[index].name = this.synonymous[index].name.replace(/[^%0-9a-zA-Z\u4e00-\u9fa5]/g,'');
+        }
+      },
+      handleRemark(index,name){
+      //说明只能输入中文
+        if(!name){//标准词输入
+          this.data.remark = this.data.remark.replace(/[^\u4e00-\u9fa5]/g,'');
+        }else{
+          this.synonymous[index].remark = this.synonymous[index].remark.replace(/[^\u4e00-\u9fa5]/g,'');
+        }
       },
       addSpan(){
-        // let index = this.synIndex;
-        // index++
         let singleSpan = {
-          // index:index,
-          term:'',
-          id:null,
-          type:'',
-          mark:''
+          name:'',
+          remark:'',
+          isConcept:0
         }
         this.synonymous.push(singleSpan);
-        // this.synIndex = index;
       },
       warning(msg,type){
         this.$message({
@@ -198,27 +199,42 @@ import api from '@api/icss.js';
         }).catch(() => {});
       },
       deleLine(index){
-        const item = this.synonymous[index];
-        const param = {
-          term:item.term,
-          type:item.type,
-          id:item.id
-        }
-        this.showConfirmDialog('是否删除该同义词?',()=>{
-          api.deletMedicalName(param).then((res)=>{
-            if(res.data.code=='0'){
-              this.warning(res.data.msg||'操作成功','success');
-              this.getDetail();
-            }else{
-              this.warning(res.data.msg);
-            }
-          }).catch((error)=>{
-            this.warning(error);
-          })
-        });
+        // 只在界面删除数据,待点确认 后参才真正删除
+        this.synonymous.splice(index,1);
       },
-      comfirn(){
-        console.log("修改数据:",this.synonymous);
+      comfirn(){  
+        if(!this.data.name){
+          this.warning('请输入标准词');
+          return
+        }
+        if(!this.data.type){
+          this.warning('请选择术语类型');
+          return
+        }
+        // 过滤同义词空数据
+        let realData = this.synonymous.filter((item)=>{
+          return item.name;
+        })
+        let detailList = [];
+        detailList[0] = this.data;
+        for(let i=0; i<realData.length; i++){
+          realData[i].type = this.data.type;
+          detailList.push(realData[i]);
+        }
+        const params = {
+          'name':this.data.name,
+          'type':this.data.type,
+          'detailList':detailList
+        }
+        api.addMedicalName(params).then((res)=>{
+          const result = res.data;
+          if(result.code==0){
+            this.warning(res.data.msg||'操作成功','success');
+            this.$router.push({name:'MedicalName'});
+          }else{
+            this.warning(res.data.msg);
+          }
+        })
       }
     }
   }

+ 71 - 52
src/components/icss/AddMedicalRelation.vue

@@ -8,7 +8,6 @@
           <span>起始术语搜索:</span>
           <el-input size="small" v-model="firstInput" placeholder="输入术语" @input="search(1)"></el-input>
           <ul v-if="showFlag==1">
-            <li>测试</li>
             <li v-for="it in searchDatas" :key="it.id" @click.stop="chooseFirst(it)" :title="it.name.length>10?it.name:''">{{it.name}}</li>
           </ul>
         </div>
@@ -16,7 +15,6 @@
           <span>终点术语搜索:</span>
           <el-input size="small" v-model="endInput" placeholder="输入术语" @input="search(2)"></el-input>
           <ul v-if="showFlag==2">
-            <li>测试2</li>
             <li v-for="it in searchDatas" :key="it.id" @click.stop="chooseEnd(it)" :title="it.name.length>10?it.name:''">{{it.name}}</li>
           </ul>
         </div>
@@ -30,26 +28,26 @@
           </tr>
           <tr>
             <td>
-              <span>{{data.start_name}}</span>
+              <span>{{data.startName}}</span>
             </td>
             <td>
-              <span>{{data.start_type}}</span>
+              <span>{{data.startType}}</span>
             </td>
             <td>
-              <el-select v-model="data.relation" clearable placeholder="请选择" size="mini">
+              <el-select v-model="data.relationName" clearable placeholder="请选择" size="mini">
                 <el-option
                   v-for="item in relationList"
-                  :key="item.key"
+                  :key="item.id"
                   :label="item.name"
-                  :value="item.key">
+                  :value="item.name">
                 </el-option>
               </el-select>
             </td>
             <td>
-              <span>{{data.end_name}}</span>
+              <span>{{data.endName}}</span>
             </td>
             <td>
-              <span>{{data.end_type}}</span>
+              <span>{{data.endType}}</span>
             </td>
           </tr>
         </table>
@@ -64,84 +62,104 @@
   </div>
 </template>
 <script type="text/javascript">
+  import api from '@api/icss.js';
   export default {
     name:'AddMedicalRelation',
     data(){
       return{
         data:{
-          start_name:'',
-          start_type:'',
-          relation:'',
-          end_name:'',
-          end_type:''
+          startName:'',
+          startType:'',
+          relationName:'',
+          endName:'',
+          endType:''
         },
-        relationList:[
-          {
-            name:"测试1",
-            key:1
-          },{
-            name:"测试2",
-            key:2
-          },{
-            name:"测试3",
-            key:3
-          }
-        ],
+        relationList:[],
         firstInput:'',
         endInput:'',
         showFlag:0,
-        searchDatas:[
-          {
-            name:"测试1",
-            id:1,
-            type:'药品'
-          },{
-            name:"测试2",
-            id:2,
-            type:'药品'
-          },{
-            name:"测试3",
-            id:3,
-            type:'药品小类'
-          }
-        ],
+        searchDatas:[],
       }
     },
+    created(){
+      this.getRelationList();
+    },
     methods:{
+      getRelationList(){//获取关系下拉
+        const param = {
+          'code':'',
+          'name':''
+        }
+        api.getAllRelationType(param).then((res)=>{
+          const result = res.data;
+          if(result.code==0){
+            this.relationList = result.data;
+          }else{
+            this.$message({
+              message:result.msg || "数据请求失败",
+              type:'warning'
+            })
+          }
+        })
+      },
       comfirn(){
-        console.log(444,this.data);
+        api.addRelationConcept(this.data).then((res)=>{
+          const result = res.data;
+          if(result.code==0){
+            this.$message({
+              type:'success',
+              message:result.msg||'添加成功'
+            })
+            this.$router.push({path: 'LT-YXSYKWH-YXSYGXWH'});
+          }else{
+            this.$message({
+              type:'warning',
+              message:result.msg
+            })
+          }
+        })
       },
       search(type){
         let item = type==1?this.firstInput:this.endInput;
-        if(item){
-          this.showFlag = type;
-          /*api.getAllConcept(item).then((res)=>{
+        const params = {
+          'isConcept':1,
+          'name':item.trim()
+        }
+        if(item.trim()){
+          // this.showFlag = type;
+          api.getAllConcept(params).then((res)=>{
             const result = res.data;
             if(result.code==0){
               this.searchDatas = result.data;
-              this.showFlag = type;
+              if(result.data&&result.data.length>0){
+                this.showFlag = type;
+              }else{
+                this.showFlag = 0;
+              }
             }else{
               this.$message({
                 type:'warning',
                 message:result.msg
               })
             }
-          })*/
+          })
         }
       },
       chooseFirst(item){
-        this.data.start_name = item.name;
-        this.data.start_type = item.type;
+        this.data.startName = item.name;
+        this.data.startType = item.type;
+        this.firstInput = "";
         this.closeSearch();
       },
       chooseEnd(item){
-        this.data.end_name = item.name;
-        this.data.end_type = item.type;
+        this.data.endName = item.name;
+        this.data.endType = item.type;
+        this.endInput = "";
         this.closeSearch();
       },
       closeSearch(){
         this.showFlag = 0;
-        // this.searchDatas = [];
+        this.searchDatas = [];
       }
     }
   }
@@ -176,6 +194,7 @@
           overflow: hidden;
           white-space: nowrap;
           text-overflow: ellipsis;
+          cursor: pointer;
         }
         li:hover{
           border-color:#22ccc8;

+ 1 - 1
src/components/icss/AddSimilarName.vue

@@ -132,7 +132,7 @@
       }
     },
     created(){
-      const id = this.$route.params.id;
+      const id = this.$route.params.id;console.log(66,this.$route.params);
       if(id){
         this.id = id;
         this.name = this.$route.params.name;

+ 26 - 27
src/components/icss/MedicalName.vue

@@ -40,22 +40,26 @@
                         width="60">
                 </el-table-column>
                 <el-table-column
-                        prop="gmtCreated"
+                        prop="operTime"
                         label="操作时间"
                         :show-overflow-tooltip="true">
                 </el-table-column>
                 <el-table-column
-                        prop="name"
+                        prop="libName"
                         label="医学标准术语"
                         show-overflow-tooltip>
                 </el-table-column>
                 <el-table-column
-                        prop="synonymous"
-                        label="其他术语"
+                        prop="libType"
+                        label="术语类型">
+                </el-table-column>
+                <el-table-column
+                        prop="otherNames"
+                        label="同义词"
                         show-overflow-tooltip>
                 </el-table-column>
                 <el-table-column
-                        prop="modifier"
+                        prop="operName"
                         label="操作人">
                 </el-table-column>
                 
@@ -107,7 +111,8 @@
       toEditProduct(row){
         this.$router.push({
           name:'AddMedicalName',
-          params: {info:row}
+          // params: {info:row}
+          params: {id:row.conceptId}
         })
       },
       filterDatas(){
@@ -116,10 +121,6 @@
       },
       getDataList() {
         const param = this.getFilterItems();
-        // const param = {
-        //   current: this.currentPage,
-        //   size: this.pageSize
-        // }
         api.knowledgeName(param).then((res) => {
           if (res.data.code == '0') {
             const data = res.data.data;
@@ -132,14 +133,10 @@
         });
       },
       getTypeList(){
-        const param = {
-          current: this.currentPage,
-          size: 60
-        }
-        api.allKnowledgeType(param).then((res)=>{
+        api.allKnowledgeType({'name':''}).then((res)=>{
           const data = res.data;
           if(data.code==0){
-            this.typeList = data.data.records;
+            this.typeList = data.data;
           }else{
             console.log(res.msg);
           }
@@ -147,13 +144,12 @@
           console.log(error);
         });
       },
-      getDetailList(id) {
-        const param = {'id': id,};
-        // this.$router.push({name:'DeptInfoDetail', params:{id: id}})
-      },
+      /*getDetailList(id) {
+        this.$router.push({name:'DeptInfoDetail', params:{id: id}})
+      },*/
       getFilterItems() {
         const param = {
-          term: this.filter.term,
+          name: this.filter.term,
           current: this.currentPage,
           size: this.pageSize,
           type:this.filter.type
@@ -187,12 +183,16 @@
         }).catch(() => {});
       },
       showDelDialog(item){
-        const param = {
+        /*const param = {
           term:item.term,
           type:item.type,
           id:item.id
+        }*/
+        const param = {
+          conceptId:item.conceptId
         }
-        this.showConfirmDialog('删除该标准词,可能造成相关联的医学信息、术语关系、医学静态知识等信息全部删除,是否删除?',()=>{
+        
+        this.showConfirmDialog('删除该标准术语,需要将所关联的医学属性、术语关系、医学静态知识等信息全部解除关联才可正常删除该信息,是否删除?',()=>{
           api.deletMedicalName(param).then((res)=>{
             if(res.data.code=='0'){
               this.warning(res.data.msg||'操作成功','success');
@@ -214,7 +214,6 @@
         e.preventDefault();
         let formData = new FormData();
         formData.append('uploadfile', fileInfo);
-        console.log(123,fileInfo,formData);
         const header = {
           headers:{
             'Content-Type': 'multipart/form-data'
@@ -226,6 +225,7 @@
               message: '上传成功',
               type: 'success',
             });
+            this.getDataList();
           }else{
             this.$message({
               message:res.data.msg,
@@ -233,11 +233,10 @@
             });
           }
         })
-        this.getDataList();
+        
         //解决上传相同文件不触发change
         let inp = document.getElementById("upFile");
-        inp.value = "";
-        
+        inp.value = "";   
       },
     }
   }

+ 43 - 41
src/components/icss/MedicalRelation.vue

@@ -9,17 +9,17 @@
                 <el-select v-model="type" clearable placeholder="请选择" size="mini">
                   <el-option
                     v-for="item in typeList"
-                    :key="item.key"
+                    :key="item.id"
                     :label="item.name"
-                    :value="item.key">
+                    :value="item.id">
                   </el-option>
                 </el-select>
               </el-form-item>
               <el-form-item label="起始术语:">
-                  <el-input size="mini" v-model="filter.proName" placeholder="输入术语"></el-input>
+                  <el-input size="mini" v-model="startName" placeholder="输入术语"></el-input>
               </el-form-item>
               <el-form-item label="终点术语:">
-                  <el-input size="mini" v-model="filter.proName" placeholder="输入术语"></el-input>
+                  <el-input size="mini" v-model="endName" placeholder="输入术语"></el-input>
               </el-form-item>
               <el-form-item>
                   <el-button size="mini" @click="filterDatas">确认</el-button>
@@ -42,7 +42,7 @@
                         width="60">
                 </el-table-column>
                 <el-table-column
-                        prop="gmtOperate"
+                        prop="operTime"
                         label="操作时间"
                         :show-overflow-tooltip="true">
                 </el-table-column>
@@ -72,7 +72,7 @@
                         show-overflow-tooltip>
                 </el-table-column>
                 <el-table-column
-                        prop="operatorName"
+                        prop="operName"
                         label="操作人">
                 </el-table-column>
                 
@@ -107,32 +107,16 @@
         currentPage: 1,
         pageSize: 10,
         total: 0,
-        filter: {
-          proName: ''
-        },
+        startName:'',
+        endName:'',
         type:'',
-        typeList:[
-          {
-            name:'类型1',
-            id:1,
-            key:1
-          },
-          {
-            name:'类型2',
-            id:2,
-            key:2
-          },
-          {
-            name:'类型3',
-            id:3,
-            key:3
-          },
-        ],
+        typeList:[],
         titleWidth:'1070px' //头部最小宽度
       }
     },
     created() {
       this.getDataList();
+      this.getRelationList();
     },
     methods: {
       toEditProduct(row){
@@ -147,7 +131,15 @@
       },
       getDataList() {
         const param = this.getFilterItems();
-        api.knowledgeRelation(param).then((res) => {
+        const param1 = {
+          "current": this.currentPage,
+          "endName": this.endName,
+          "relationId": this.type,
+          "size": this.pageSize,
+          "startName": this.startName
+        }
+        const params = this.type?param1:param;
+        api.knowledgeRelation(params).then((res) => {
           if (res.data.code == '0') {
             const data = res.data.data;
             this.list = data.records;
@@ -158,15 +150,29 @@
           console.log(error);
         });
       },
-      getDetailList(id) {
-        const param = {'id': id,};
-        // this.$router.push({name:'DeptInfoDetail', params:{id: id}})
+      getRelationList(){
+        const param = {
+          'code':'',
+          'name':''
+        }
+        api.getAllRelationType(param).then((res)=>{
+          const result = res.data;
+          if(result.code==0){
+            this.typeList = result.data;
+          }else{
+            this.$message({
+              message:result.msg || "数据请求失败",
+              type:'warning'
+            })
+          }
+        })
       },
       getFilterItems() {
         const param = {
-          // questionName: this.filter.proName,
           current: this.currentPage,
-          size: this.pageSize
+          size: this.pageSize,
+          startName: this.startName,
+          endName: this.endName
         };
         return param;
       },
@@ -198,11 +204,7 @@
       },
       showDelDialog(item){
         const params = {
-          start_term:item.startName,
-          start_type:item.startType,
-          end_term:item.endName,
-          end_type:item.endType,
-          relation_name:item.relationName
+          id:item.id
         }
         this.showConfirmDialog('是否删除该关系?可能对现有系统造成影响',()=>{
           api.delKnowledgeRelation(params).then((res)=>{
@@ -232,7 +234,7 @@
             'Content-Type': 'multipart/form-data'
           }
         }
-        /*api.uploadFile(formData,header).then((res)=>{
+        api.RelationUpload(formData,header).then((res)=>{
           if(res.data.code==0){
             this.$message({
               message: '上传成功',
@@ -245,11 +247,11 @@
             });
           }
         })
-        this.getDataList();*/
-        /*//解决上传相同文件不触发change
+        this.getDataList();
+        //解决上传相同文件不触发change
         let inp = document.getElementById("upFile");
         inp.value = "";
-        */
+        
       }
     }
   }

+ 141 - 0
src/components/icss/MedicalType.vue

@@ -0,0 +1,141 @@
+<template>
+    <div>
+        <crumbs title="医学术语类型维护">
+            <el-form :inline="true" class="demo-form-inline">
+                <el-form-item label="医学类型:">
+                    <el-input size="mini" v-model="name" placeholder="输入类型"></el-input>
+                </el-form-item>
+                <el-form-item>
+                    <el-button size="mini" @click="filterDatas">确认</el-button>
+                    <el-button size="mini" type="warning" @click="addType">添加类型</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="gmtModified"
+                        label="操作时间"
+                        :show-overflow-tooltip="true">
+                </el-table-column>
+                <el-table-column
+                        prop="name"
+                        label="医学类型"
+                        show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column
+                        prop="modifier"
+                        label="操作人">
+                </el-table-column>
+            </el-table>
+            <el-pagination v-if="total>pageSize"
+                           :current-page.sync="currentPage"
+                           @current-change="currentChange"
+                           background
+                           :page-size="pageSize"
+                           layout="total,prev, pager, next, jumper"
+                           :total="total">
+            </el-pagination>
+        </div>
+
+    </div>
+</template>
+
+<script>
+  import api from '@api/icss.js';
+  export default {
+    name: 'MedicalType',
+    data: function () {
+      return {
+        list: [],
+        cacheData: {},
+        currentPage: 1,
+        pageSize: 10,
+        total: 0,
+        name:''
+      }
+    },
+    created() {
+      this.getDataList();
+    },
+    methods: {
+      filterDatas(){
+        this.currentPage = 1;
+        this.getDataList();
+      },
+      getDataList() {
+        const param = this.getFilterItems();
+        api.getTypeList(param).then((res) => {
+          if (res.data.code == '0') {
+            const data = res.data.data;
+            this.list = data.records;
+            this.cacheData[param.current] = data.records;
+            this.total = data.total;
+          }
+        }).catch((error) => {
+          console.log(error);
+        });
+      },
+      getFilterItems() {
+        const param = {
+          name: this.name,
+          current: 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();
+        }
+      },
+      addType(){
+        this.$prompt('添加:','医学类型添加',{
+          confirmButtonText: '确定',
+          showCancelButton: false,
+          inputPattern:/^[\u4e00-\u9fa5]+$/,
+          inputErrorMessage: '术语类型只能输入汉字'
+        }).then(({value})=>{
+          console.log("添加的类型是:",value);
+          if(value.trim()){
+            api.addType({name:value.trim()}).then((res)=>{
+              if(res.data.code==0){
+                this.$message({
+                  message:res.data.msg||'添加成功',
+                  type:'success'
+                })
+                this.getDataList();
+              }
+            }).catch((error)=>{
+              console.log(error);
+            })
+          }
+        }).catch(()=>{
+
+        })
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+    @import "../../less/admin.less";
+    .el-table .cell{
+      overflow: hidden;
+      white-space: nowrap;
+    }
+</style>

+ 48 - 2
src/components/icss/NoiseTemplate.vue

@@ -214,7 +214,7 @@ export default {
       this.showDelDialog(param)
     },
     showDelDialog(param) {
-      this.showConfirmDialog('是否保存该标签组?', () => {
+      /*this.showConfirmDialog('是否保存该标签组?', () => {
         api.saveOrUpdate(param).then((res) => {
           if (res.data.code === '0') {
             this.warning(res.data.msg || '保存成功', 'success','1000')
@@ -229,7 +229,53 @@ export default {
         }).catch((err) => {
           this.warning(err);
         })
-      });
+      });*/
+      const h = this.$createElement;
+      this.$msgbox({
+        title:'提示',
+        message:h('div',{style:'padding-bottom:10px'},[
+            h('p',{style:'font-size:15px;margin-bottom:10px'},'是否保存该标签组?'),
+            h('span',{style:'color:red;font-size:12px'},'标签系统名称已经改变,请去别名维护中修改相关信息'),
+          ]),
+        showCancelButton: true,
+        distinguishCancelAndClose:true,
+        confirmButtonText: '确认并前往别名维护',
+        cancelButtonText:'确认',
+        // type: 'warning',
+        cancelButtonClass:'toast-cancel'
+      }).then(()=>{
+        api.saveOrUpdate(param).then((res) => {
+          if (res.data.code === '0') {
+            this.warning(res.data.msg || '保存成功', 'success');
+            this.$router.push({
+              name:'AddSimilarName',
+              params: {id:param.questionWrapper.id,name:param.questionWrapper.tagName}
+            })
+          } else {
+            this.warning(res.data.msg)
+          }
+        }).catch((err) => {
+          this.warning(err);
+        })
+      }).catch((action)=>{
+        // action :cancel--取消,close--关闭
+        if(action=='cancel'){
+          api.saveOrUpdate(param).then((res) => {
+            if (res.data.code === '0') {
+              this.warning(res.data.msg || '保存成功', 'success');
+              setTimeout(() => {
+                this.$router.push({
+                  path:'/admin/LT-YXSJWH-BQZWH'
+                })
+              }, 1000);
+            } else {
+              this.warning(res.data.msg)
+            }
+          }).catch((err) => {
+            this.warning(err);
+          })
+        }
+      })
     },
     showConfirmDialog(msg, resolve) {
       this.$alert(msg, '提示', {

+ 1 - 1
src/components/icss/PubTemplateGroup.vue

@@ -114,7 +114,7 @@ export default {
     let templateOwn = localStorage.getItem('icssEnumsData') ? JSON.parse(localStorage.getItem('icssEnumsData')).moduleTypeEnum : []
     let guisu = localStorage.getItem('guisu') ? JSON.parse(localStorage.getItem('guisu')) : []
     for(let k = 0;k < guisu.length;k++){
-      // templateOwn = templateOwn.filter(item => item.key != guisu[k])
+      templateOwn = templateOwn.filter(item => item.key != guisu[k])
     }
     this.Adscriptions = templateOwn;
   },

+ 2 - 0
src/routes.js

@@ -65,6 +65,7 @@ import MedicalInfo from '@components/icss/MedicalInfo.vue'//医学术语维护-
 import AddMedicalInfo from '@components/icss/AddMedicalInfo.vue'//医学术语维护-信息维护(属性维护)-添加
 import ChemicalAndCommonMapping from '@components/icss/ChemicalAndCommonMapping.vue'; //化验大小项与公表维护
 
+import MedicalType from '@components/icss/MedicalType.vue'//医学术语维护-类型维护
 export default [
   {
     path: '/',
@@ -195,6 +196,7 @@ export default [
       {path:'LT-YXSYKWH-SYYXSXWH',component:MedicalInfo,name:'MedicalInfo'},  //医学术语维护-信息维护(属性维护)
       {path:'LT-YXSYKWH-TJYXSYXX',component:AddMedicalInfo,name:'AddMedicalInfo'},  //医学术语维护-信息维护(属性维护) -- 添加
       {path:'LT-YXSJWH-HYDXXYGBXDY',component:ChemicalAndCommonMapping,name:'ChemicalAndCommonMapping'},  //化验大小项与公表维护
+      {path:'LT-YXSYKWH-YXSYLXWH',component:MedicalType,name:'MedicalType'},     //医学术语--类型维护
     ]
   }
 ]

+ 1 - 1
vue.config.js

@@ -1,6 +1,6 @@
 const path = require('path');
 // const proxy_path = 'http://192.168.2.236:80';
-const proxy_path = 'http://192.168.2.241:88';
+const proxy_path = 'http://192.168.2.236:88';
 // const proxy_path = 'http://192.168.2.236:88';
 // const proxy_path = 'http://192.168.3.101:5050';
 // const proxy_path = 'http://192.168.3.117:5050';//周铁刚