zhangxc 6 лет назад
Родитель
Сommit
28336ac745

Разница между файлами не показана из-за своего большого размера
+ 2010 - 2010
package-lock.json


+ 6 - 0
src/api/config.js

@@ -100,6 +100,12 @@ export default {
     'delPromptInfo':'api/icssman/introduceInfo/deleteRecord',//删除提示信息
     'PromptInfoDetail':'api/icssman/introduceDetail/getByIntroduceId',//提示信息详情
     'getIcssEnumsData':'api/icssman/getIcssEnumsData',//icss枚举
+	  'similarName': 'api/icssman/retrieval/retrievalList', //别名维护
+    'delSimilarName': 'api/icssman/retrieval/delRetrievalsByQuesId', //别名维护-删除
+    'similarNameDetl': 'api/icssman/retrieval/getRetrievalsByTag', //别名维护-详情
+    'addSimilarName': 'api/icssman/retrieval/addTagRetrieval', //别名维护-添加、修改
+    'searchLable': 'api/icssman/questionInfo/index', //标签检索
+    'uploadFile': 'api/icssman/retrieval/retrievalExcelIm', //别名维护-导入
 	},
 	menuIconList: { //菜单对应图标
 		'YH-KZT': 'el-icon-menu',

+ 19 - 1
src/api/icss.js

@@ -74,5 +74,23 @@ export default {
       }else {
         return null
       }
-    }
+    },
+    similarName(param) {//别名维护
+        return axios.post(urls.similarName, param)
+    },
+    delSimilarName(param) {//别名维护-删除
+        return axios.post(urls.delSimilarName, param)
+    },
+    similarNameDetl(param) {//别名维护-详情
+        return axios.post(urls.similarNameDetl, param)
+    },
+    addSimilarName(param) {//别名维护-添加、修改
+        return axios.post(urls.addSimilarName, param)
+    },
+    searchLable(param) {//别名维护-搜索标签
+        return axios.post(urls.searchLable, param)
+    },
+    uploadFile(param) {//别名维护-导入
+        return axios.post(urls.uploadFile, param)
+    },
 }

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

@@ -4,11 +4,11 @@
         <crumbs :title="topInfo" linkTo="/admin/LT-YXSJWH-KSWH">
         </crumbs>
         <div class="contents">
-            <el-form ref="form" :model="form" :rules="rules" label-width="120" class="add-admin-form">
+            <el-form ref="form" :label-position="labelPosition" :model="form" :rules="rules" label-width="100px" class="add-admin-form">
                 <el-form-item label="科室名称:" prop="name">
                     <el-input v-model="form.name" placeholder="请输入科室名称"></el-input>
                 </el-form-item>
-                <el-form-item label="描述:" prop="remark" class="desc">
+                <el-form-item label="描述:" prop="remark">
                     <el-input type="textarea" :rows="3" placeholder="请输入科室描述" v-model="form.remark" maxlength="1024"></el-input>
                 </el-form-item>
                 <el-button size="small" type="primary" @click="addOrga">{{text}}</el-button>
@@ -38,6 +38,7 @@
       };
       return {
         id:null,
+        labelPosition:'right',
         form: {
           name: '',
           remark: '' //描述
@@ -150,10 +151,7 @@
       cursor: pointer;
     }
   }
-  .desc{
-    padding-left: 39px;
-  }
   .el-textarea{
-    width: 90%;
+    width: 97%;
   }
 </style>

+ 333 - 0
src/components/icss/AddSimilarName.vue

@@ -0,0 +1,333 @@
+<template>
+  <div>
+    <crumbs :title="minTitle" linkTo="/admin/LT-YXSJWH-BMWH"></crumbs>
+    <div class="contents">
+      <div class="content" @click="close">
+        <h3>选择标签</h3>
+        <p :class="['ename',{'name':flag}]">{{name}}</p>
+        <div v-if="!flag" class="searchBox">
+          <input type="text" name="" v-model="searchStr" class="name">
+          <span class="search" @click.stop="search">搜索</span>
+          <ul v-if="showFlag">
+            <li v-for="it in searchDatas" :key="it.id" @click="choose(it)" :title="it.tagName.length>10?it.tagName:''">{{it.tagName}}</li>
+          </ul>
+        </div>   
+        <span></span>
+        <h3>添加别名</h3>
+        <p class="subtitle">本体添加:</p>
+        <table class="deptbox">
+          <tr>
+            <td>本体</td>
+            <td>拼音</td>
+          </tr>
+          <tr v-if="flag" v-for="item in selfName">
+           <!--  <td class="desc">{{item.retrievalName}}</td>
+            <td>{{item.retrievalSpell}}</td> -->
+            <td><input type="text" name="" v-model="item.retrievalName"></td>
+            <td><input type="text" name="" v-model="item.retrievalSpell"></td>
+          </tr>
+          <tr v-if="!flag" v-for="(i,index) in selfEmpty">
+            <td><input type="text" name="" v-model="selfEmpty[index].retrievalName"></td>
+            <td><input type="text" name="" v-model="selfEmpty[index].retrievalSpell"></td>
+          </tr>
+        </table>
+        <p class="subtitle">别名添加:</p>
+        <table class="deptbox">
+          <tr>
+            <td>别名</td>
+            <td>拼音</td>
+          </tr>
+          <tr v-if="retrievalNames.length>0" v-for="it in retrievalNames">
+            <td><input type="text" name="" v-model="it.retrievalName"></td>
+            <td><input type="text" name="" v-model="it.retrievalSpell"></td>
+          </tr>
+          <tr v-for="(i,index) in retrievalEmpty">
+            <td><input type="text" name="" v-model="retrievalEmpty[index].retrievalName"></td>
+            <td><input type="text" name="" v-model="retrievalEmpty[index].retrievalSpell"></td>
+          </tr>
+          <tr @click="addSpan(2)">
+            <td colspan="2" class="addSpan">+</td>
+          </tr>
+        </table>
+        <p class="subtitle">子项添加:</p>
+        <table class="deptbox">
+          <tr>
+            <td>子项</td>
+            <td>拼音</td>
+          </tr>
+          <tr v-if="retrievalSonNames.length>0" v-for="v in retrievalSonNames">
+            <td><input type="text" name="" v-model="v.retrievalName"></td>
+            <td><input type="text" name="" v-model="v.retrievalSpell"></td>
+          </tr>
+          <tr v-for="(k,index) in sonEmpty">
+            <td><input type="text" name="" v-model="sonEmpty[index].retrievalName"></td>
+            <td><input type="text" name="" v-model="sonEmpty[index].retrievalSpell"></td>
+          </tr>
+          <tr @click="addSpan(3)">
+            <td colspan="2" class="addSpan">+</td>
+          </tr>
+        </table>
+        <div class="btn">
+          <el-button
+            type="primary"
+            @click="comfirn"
+          >确 定</el-button>
+        </div>
+      </div>
+    </div>   
+  </div>
+</template>
+<script type="text/javascript">
+  import api from '@api/icss.js';
+  export default{
+    name:'AddSimilarName',
+    data(){
+      return{
+        selfName:[], //本体
+        retrievalNames:[],  //别名 
+        retrievalSonNames:[],  //子项
+        id:null,
+        name:"",
+        minTitle:"别名维护-添加别名",
+        toast:'',
+        flag:false, //添加修改的标识,true-修改
+        selfEmpty:[ //本体 新增
+          {
+            questionName: '',
+            questionId:'',
+            retrievalName:'',
+            retrievalSpell:'',
+            retrievalType:1
+          }
+        ],
+        retrievalEmpty:[ //别名新增
+          {
+            questionName:'',
+            questionId:'',
+            retrievalName:'',
+            retrievalSpell:'',
+            retrievalType:2
+          }
+        ],
+        sonEmpty:[ //子项新增
+          {
+            questionName:'',
+            questionId:'',
+            retrievalName:'',
+            retrievalSpell:'',
+            retrievalType:3
+          }
+        ],
+        searchDatas:[],
+        searchStr:'',
+        showFlag:false
+      }
+    },
+    created(){
+      const id = this.$route.params.id;
+      if(id){
+        this.id = id;
+        this.name = this.$route.params.name;
+        this.selfEmpty[0].questionId = this.retrievalEmpty[0].questionId = this.sonEmpty[0].questionId = this.$route.params.id;
+        this.selfEmpty[0].questionName = this.retrievalEmpty[0].questionName = this.sonEmpty[0].questionName = this.$route.params.name;
+        this.flag = true;
+        this.minTitle = "别名维护-修改别名";
+        this.getDetail();
+      }
+      
+    },
+    methods:{
+      getDetail(){
+        const param = {'questionId':this.id,'questionName':this.name}
+        api.similarNameDetl(param).then((res)=>{
+          let result = res.data;
+          if(result.code==0){
+            const data = result.data;
+            for(let i in data){
+              if(i==1){
+                this.selfName = data[i];
+              }else if(i==2){
+                this.retrievalNames = data[i];
+              }else if(i==3){
+                this.retrievalSonNames = data[i];
+              }
+            }
+          }else{
+            console.log(result.msg);
+          }
+        })
+      },
+      addSpan(type){
+        let emptySpan = {
+          questionName:this.name,
+          questionId:this.id,
+          retrievalName:'',
+          retrievalSpell:'',
+          retrievalType:type
+        }
+        if(type == 2){
+          this.retrievalEmpty.push(emptySpan);
+        }else if(type == 3){
+          this.sonEmpty.push(emptySpan);
+        }
+      },
+      comfirn(){
+        const {selfName,selfEmpty,retrievalNames,retrievalEmpty,retrievalSonNames,sonEmpty} = this;
+        let dataList = [];
+        if(this.flag){ //修改
+          dataList = selfName.concat(retrievalNames,retrievalEmpty,retrievalSonNames,sonEmpty);
+          this.toast = "修改成功";
+        }else{
+          dataList = selfEmpty.concat(retrievalNames,retrievalEmpty,retrievalSonNames,sonEmpty);
+          this.toast = "添加成功";
+        }
+        // 过滤掉空数据
+        let filterData = dataList.filter((item)=>{
+          return item.retrievalName;
+        })
+        console.log(111,dataList,filterData);
+        const params = {
+          'itemList':filterData,
+          'questionId':this.id,
+          'questionName':this.name
+        }
+        api.addSimilarName(params).then((res)=>{
+          const result = res.data;
+          if(result.code==0){
+            this.$message({
+              message: this.toast,
+              type: 'success',
+            });
+            this.$router.push({path:'LT-YXSJWH-BMWH'});
+          }else{
+            console.log(result.msg);
+            this.$message.error(result.msg);
+          }
+        })
+      },
+      search(){
+        const param = {
+          'tagName':this.searchStr,
+          'notTagType':[8,10,11]
+        }
+        api.searchLable(param).then((res)=>{
+          const result = res.data;
+          console.log(123,result);
+          if(result.code==0){
+            this.searchDatas = result.data;
+            if(result.data.length>0){
+              this.showFlag = true;
+            }
+          }else{
+            console.log(result.msg);
+          }
+        })
+      },
+      choose(item){
+        console.log(item);
+        this.name = item.tagName;
+        this.id = item.id;
+        this.showFlag = false;
+        this.searchStr = "";
+      },
+      close(){
+        this.showFlag = false;
+        this.searchStr = "";
+      }
+    },
+    watch:{
+      name:function(newVal,oldVal){
+        this.selfEmpty[0].questionName = this.retrievalEmpty[0].questionName = this.sonEmpty[0].questionName = newVal;
+      }
+    }
+  }
+</script>
+<style lang="less" scoped>
+  @import "../../less/admin.less";
+  .content{
+    background: #fff;
+    padding: 20px 20px 30px;
+    color: #545455;
+  }
+  .name{
+    width: 221px;
+    height: 30px;
+    margin:20px 0 30px 0;
+    padding-left: 7px;
+  }
+  .search{
+    display: inline-block;
+    width: 56px;
+    height: 32px;
+    border-left: 1px solid #ccc;
+    position: relative;
+    left: -57px;
+    vertical-align: middle;
+    line-height: 32px;
+    bottom: 2px;
+    text-align: center;
+    cursor: default;
+  }
+  h3{
+    font-size: 16px;
+  }
+  .subtitle{
+    // font-size: 12px;
+    margin: 21px 0 10px 0;
+  }
+  .deptbox{
+    // width: 100%;
+    background: #fff;
+    padding: 20px 10px 30px;
+    font-size: 14px;
+    text-align: left;
+    border-collapse: collapse;
+    >tr{
+      height: 30px;
+      td{
+        width: 111px;
+        border: 1px solid #666;
+        padding-left: 7px;
+      }
+      input{
+        border:none;
+        width: 100%;
+      }
+    }
+    .addSpan{
+      text-align: center;
+      cursor: pointer;
+    } 
+  }
+  .btn {
+    text-align: right;
+  }
+  .ename{
+    height: 20px;
+    margin-top: 10px;
+  }
+  .searchBox{
+    position: relative;
+    ul{
+      width: 175px;
+      position: absolute;
+      top: 55px;
+      border:1px solid #ccc;
+      background: #fff;
+      max-height: 291px;
+      overflow-y: scroll;
+      li{
+        border:1px solid #fff;
+        padding-left: 7px;
+        height: 27px;
+        line-height: 27px;
+        overflow: hidden;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+      }
+      li:hover{
+        border-color:#22ccc8;
+      }
+    }
+  }
+</style>

+ 4 - 1
src/components/icss/DeptInfo.vue

@@ -43,7 +43,7 @@
                     <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" @click="showDelDialog(scope.row.id)">删除</el-button>
+                        <el-button type="text" size="small" class="delete" @click="showDelDialog(scope.row.id)">删除</el-button>
                     </template>
                 </el-table-column>
                 <el-table-column
@@ -194,4 +194,7 @@
         margin-right:10px;
         color: unset;
     }
+    .delete{
+        color: red
+    }
 </style>

+ 252 - 0
src/components/icss/SimilarName.vue

@@ -0,0 +1,252 @@
+<template>
+    <div>
+        <crumbs title="别名维护系统">
+            <el-form :inline="true" class="demo-form-inline">
+                <el-form-item label="标签名称:">
+                    <el-input size="mini" v-model="filter.proName" placeholder="标签名称"></el-input>
+                </el-form-item>
+                <el-form-item>
+                    <el-button size="mini" @click="filterDatas">确认</el-button>
+                    <el-button size="mini" @click="uploadClick">导入</el-button>
+                    <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
+                    <router-link to="/admin/LT-YXSJWH-TJBM" style="margin:0 10px">
+                        <el-button size="mini" type="warning">添加别名</el-button>
+                    </router-link>
+                </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="gmtOperate"
+                        label="操作时间"
+                        :show-overflow-tooltip="true">
+                </el-table-column>
+                <el-table-column
+                        prop="questionName"
+                        label="标签名称"
+                        show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column
+                        prop="retrievalSelfName"
+                        label="本体"
+                        show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column
+                        prop="retrievalNames"
+                        label="别名"
+                        show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column
+                        prop="retrievalSonNames"
+                        label="子项"
+                        show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column
+                        prop="operatorName"
+                        label="操作人">
+                </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.questionId)">删除</el-button>
+                    </template>
+                </el-table-column>
+                <!-- <el-table-column
+                        label="详情">
+                    <template slot-scope="scope">
+                        <el-button type="text" size="small" @click="getDetailList(scope.row.questionId)">详情</el-button>
+                    </template>
+                </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';
+  import utils from '@api/utils.js';
+  import axios from 'axios';
+  export default {
+    name: 'SimilarName',
+    data: function () {
+      return {
+        list: [],
+        cacheData: {},
+        currentPage: 1,
+        pageSize: 10,
+        total: 0,
+        linkIn:[],
+        pays:[],
+        filter: {
+          proName: ''
+        }
+      }
+    },
+    created() {
+      this.getDataList();
+    },
+    methods: {
+      toEditProduct(row){
+        this.$router.push({
+          name:'AddSimilarName',
+          params: {id:row.questionId,name:row.questionName}
+        })
+      },
+      filterDatas(){
+        this.currentPage = 1;
+        this.getDataList();
+      },
+      getDataList() {
+        const param = this.getFilterItems();
+        api.similarName(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);
+        });
+      },
+      getDetailList(id) {
+        const param = {'id': id,};
+        this.$router.push({name:'DeptInfoDetail', params:{id: id}})
+        /*api.getDeptInfoDetials(param).then((res) => {
+          if (res.data.code == '0') {
+            this.$router.push({name:'DeptInfoDetail', params:{id: id}})
+            // console.log("详情接口调用成功");
+          } else {
+            this.$message({
+              showClose: true,
+              message:res.data.msg,
+              type:'warning'
+            });
+            this.getDataList()  //刷新列表
+          }
+        }).catch((error) => {
+          console.log(error);
+        });*/
+      },
+      getFilterItems() {
+        const param = {
+          questionName: this.filter.proName,
+          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();
+        }
+      },
+      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(id){
+        this.showConfirmDialog('是否删除该标签名?',()=>{
+          api.delSimilarName({questionId:id}).then((res)=>{
+            if(res.data.code=='0'){
+              this.warning(res.data.msg||'操作成功','success');
+              this.getDataList();
+            }else{
+              this.warning(res.data.msg);
+            }
+          }).catch((error)=>{
+            this.warning(error);
+          })
+        });
+      },
+      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);
+        console.log(123,fileInfo,formData);
+        const header = {
+          headers:{
+            'Content-Type': 'multipart/form-data'
+          }
+        }
+        api.uploadFile(formData,header).then((res)=>{
+          if(res.data.code==0){
+            this.$message({
+              message: '上传成功',
+              type: 'success',
+            });
+          }else{
+            this.$message.error(res.data.msg);
+          }
+        })
+        this.getDataList();
+        /*//解决上传相同文件不触发change
+        let inp = document.getElementById("upFile");
+        inp.value = "";
+        */
+      }
+    }
+  }
+</script>
+
+<style lang="less">
+    @import "../../less/admin.less";
+    .status-span{
+        font-size: 12px;
+        margin-right:10px;
+        color: unset;
+    }
+    .delete{
+        color: red
+    }
+    .el-table .cell{
+      overflow: hidden;
+      white-space: nowrap;
+    }
+    #upFile{
+      display: none;
+    }
+</style>

+ 4 - 2
src/routes.js

@@ -38,7 +38,8 @@ import IndeptLabel from '@components/icss/IndeptLabel.vue';//独立标签
 import AddIndeptLabel from '@components/icss/AddIndeptLabel.vue'//独立标签-添加
 import PromptInfo from '@components/icss/PromptInfo.vue'//提示信息
 import AddPromptInfo from '@components/icss/AddPromptInfo.vue'//添加提示信息
-
+import SimilarName from '@components/icss/SimilarName.vue'//别名维护
+import AddSimilarName from '@components/icss/AddSimilarName.vue'//别名维护-详情
 export default [
   {
     path: '/',
@@ -145,7 +146,8 @@ export default [
       {path:'LT-YXSJWH-TJDLBQ',component:AddIndeptLabel,name:'AddIndeptLabel'},     //独立标签维护--添加
       {path:'LT-YXSJWH-TSXXWH',component:PromptInfo,name:'PromptInfo'},         //提示信息维护
       {path:'LT-YXSJWH-TJTSXX',component:AddPromptInfo,name:'AddPromptInfo'},         //提示信息维护
-
+	  {path:'LT-YXSJWH-BMWH',component:SimilarName,name:'SimilarName'},     //别名维护
+      {path:'LT-YXSJWH-TJBM',component:AddSimilarName,name:'AddSimilarName'},     //别名维护-详情
     ]
   }
 ]

+ 1 - 1
vue.config.js

@@ -2,7 +2,7 @@ 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.3.100:5050';
+// const proxy_path = 'http://192.168.3.101:5050';
 // const proxy_path = 'http://192.168.3.117:5050';//周铁刚
 // const proxy_path = 'http://192.168.3.115:5050';