瀏覽代碼

医学术语-关系维护接口完成;命名维护还缺导入和新增修改;新增医学术语类型维护

liucf 6 年之前
父節點
當前提交
244e4ac78b

+ 3 - 0
src/api/config.js

@@ -160,7 +160,10 @@ export default {
     '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', //查询所有术语名称
+    'getTypeList': 'api/knowledgeman/lexicon/getLexiconList', //术语类型-列表
+    'addType': 'api/knowledgeman/lexicon/addLexicon', //术语类型-添加
 	},
 	menuIconList: { //菜单对应图标
 		'YH-KZT': 'el-icon-menu',

+ 14 - 1
src/api/icss.js

@@ -223,7 +223,8 @@ export default {
         return axios.post('http://192.168.3.101:5050/api/knowledgeman/lexicon/getAllLexicon', param)
     },
     knowledgeUpload(param) {//命名维护--导入
-        return axios.post(urls.knowledgeUpload, param)
+        // return axios.post(urls.knowledgeUpload, param)
+        return axios.post('http://192.168.3.101:5050/api/knowledgeman/concept/conceptInfoExcelIm', param)
     },
     deletMedicalName(param) {//命名维护--删除
         // return axios.post(urls.deletMedicalName, param)
@@ -249,8 +250,20 @@ export default {
         // return axios.post(urls.addRelationConcept, param)
         return axios.post('http://192.168.3.101:5050/api/knowledgeman/relation/addRelationInfo', param)
     },
+    RelationUpload(param) {//关系维护-导入
+        // return axios.post(urls.RelationUpload, param)
+        return axios.post('http://192.168.3.101:5050/api/knowledgeman/relation/relationInfoExcelIm', param)
+    },
     getAllConcept(param) {//查询所有术语名称
         // return axios.post(urls.getAllConcept, param)
         return axios.post('http://192.168.3.101:5050/api/knowledgeman/concept/getAllConcept', param)
     },
+    getTypeList(param) {//术语类型-列表
+        // return axios.post(urls.getTypeList, param)
+        return axios.post('http://192.168.3.101:5050/api/knowledgeman/lexicon/getLexiconList', param)
+    },
+    addType(param) {//术语类型-添加
+        // return axios.post(urls.addType, param)
+        return axios.post('http://192.168.3.101:5050/api/knowledgeman/lexicon/addLexicon', param)
+    },
 }

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

@@ -145,7 +145,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');
@@ -156,7 +156,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, '提示', {
@@ -215,5 +257,9 @@
     }
     }
     }
+    .toast-cancel{
+      color: #22ccc8 !important;
+      // background: #22ccc8;
+    }
 </style>
 

+ 6 - 4
src/components/icss/AddMedicalRelation.vue

@@ -103,7 +103,6 @@
         })
       },
       comfirn(){
-        console.log(444,this.data);
         api.addRelationConcept(this.data).then((res)=>{
           const result = res.data;
           if(result.code==0){
@@ -111,6 +110,7 @@
               type:'success',
               message:result.msg||'添加成功'
             })
+            this.$router.push({path: 'LT-YXSYKWH-YXSYGXWH'});
           }else{
             this.$message({
               type:'warning',
@@ -123,16 +123,18 @@
         let item = type==1?this.firstInput:this.endInput;
         const params = {
           'isConcept':1,
-          'name':item
+          'name':item.trim()
         }
-        if(item){
-          this.showFlag = type;
+        if(item.trim()){
+          // this.showFlag = type;
           api.getAllConcept(params).then((res)=>{
             const result = res.data;
             if(result.code==0){
               this.searchDatas = result.data;
               if(result.data&&result.data.length>0){
                 this.showFlag = type;
+              }else{
+                this.showFlag = 0;
               }
             }else{
               this.$message({

+ 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;

+ 3 - 8
src/components/icss/MedicalName.vue

@@ -121,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;
@@ -148,10 +144,9 @@
           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 = {
           name: this.filter.term,

+ 4 - 4
src/components/icss/MedicalRelation.vue

@@ -234,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: '上传成功',
@@ -247,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

@@ -212,7 +212,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')
@@ -227,7 +227,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, '提示', {

+ 2 - 0
src/routes.js

@@ -63,6 +63,7 @@ import MedicalRelation from '@components/icss/MedicalRelation.vue'//医学术语
 import AddMedicalRelation from '@components/icss/AddMedicalRelation.vue'//医学术语维护-关系维护-添加
 import MedicalInfo from '@components/icss/MedicalInfo.vue'//医学术语维护-信息维护(属性维护)
 import AddMedicalInfo from '@components/icss/AddMedicalInfo.vue'//医学术语维护-信息维护(属性维护)-添加
+import MedicalType from '@components/icss/MedicalType.vue'//医学术语维护-类型维护
 export default [
   {
     path: '/',
@@ -192,6 +193,7 @@ export default [
       {path:'LT-YXSYKWH-TJYXSYGX',component:AddMedicalRelation,name:'AddMedicalRelation'},     //医学术语--关系维护-添加
       {path:'LT-YXSYKWH-YXSYXXWH',component:MedicalInfo,name:'MedicalInfo'},  //医学术语维护-信息维护(属性维护)
       {path:'LT-YXSYKWH-TJYXSYXX',component:AddMedicalInfo,name:'AddMedicalInfo'},  //医学术语维护-信息维护(属性维护) -- 添加
+      {path:'LT-YXSYKWH-YXSYLXWH',component:MedicalType,name:'MedicalType'},     //医学术语--类型维护
     ]
   }
 ]