Kaynağa Gözat

医学术语-添加命名页面、术语关系页面、添加术语关系页面

liucf 6 yıl önce
ebeveyn
işleme
1309a48988

+ 3 - 3
src/components/common/Crumbs.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="container clearfix">
+    <div class="container clearfix" :style="{'minWidth':minWidth?minWidth:'980px'}">
         <img v-if="linkTo" class="return-btn fl" src="../../images/return.png" alt="返回按钮" @click="goBack">
         <h4 class="fl">{{title}}</h4>
         <div class="contents fr">
@@ -11,7 +11,7 @@
 <script>
   export default {
     name: 'crumbs',
-    props: ['title','linkTo'],
+    props: ['title','linkTo','minWidth'],//minWidth-有些头部选项比较多,最小宽度需要调整
     data: function () {
       return {}
     },
@@ -38,7 +38,7 @@
         line-height: 40px;
         position: absolute;
         z-index: 5;
-        min-width: 980px;
+        // min-width: 980px;
     }
 
     .return-btn{

+ 213 - 0
src/components/icss/AddMedicalName.vue

@@ -0,0 +1,213 @@
+<template>
+  <div>
+    <crumbs :title="minTitle" linkTo="/admin/LT-YXSYKWH-YXSYMMWH"></crumbs>
+    <div class="contents">
+      <div class="content">
+        <h3>添加术语:</h3>
+        <p class="titl">标准术语:</p>
+        <table class="deptbox">
+          <tr>
+            <td class="ind">序号</td>
+            <td>标准词</td>
+            <td>类型</td>
+            <td class="desc">说明</td>
+          </tr>
+          <tr>
+            <td class="ind">1</td>
+            <td>
+              <el-input v-model="data.name" placeholder="请输入术语" maxlength="30"></el-input>
+            </td>
+            <td>
+              <el-select v-model="data.type" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in data.typeList"
+                  :key="item.key"
+                  :label="item.name"
+                  :value="item.key">
+                </el-option>
+              </el-select>
+            </td>
+            <td class="desc">
+              <el-input v-model="data.mark" placeholder="请输入术语说明" maxlength="120"></el-input>
+            </td>
+          </tr>
+        </table>
+        <p class="titl">同义词:</p>
+        <table class="deptbox">
+          <tr>
+            <td class="ind">序号</td>
+            <td>术语</td>
+            <td>类型</td>
+            <td class="desc">说明</td>
+            <td v-if="id">操作</td>
+          </tr>
+          <tr v-for="(item,index) in synonymous">
+            <td class="ind">{{index+1}}</td>
+            <td>
+              <el-input v-model="item.term" placeholder="请输入术语" maxlength="30"></el-input>
+            </td>
+            <td>
+              <el-select v-model="item.type" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in data.typeList"
+                  :key="item.key"
+                  :label="item.name"
+                  :value="item.key">
+                </el-option>
+              </el-select>
+            </td>
+            <td class="desc">
+              <el-input v-model="item.mark" placeholder="请输入术语说明" maxlength="120"></el-input>
+            </td>
+            <td v-if="id">
+              <span @click="deleLine(index)">删除</span>
+            </td>
+          </tr>
+          <tr @click="addSpan">
+            <td :colspan="colspan" 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">
+  export default {
+    name:'AddMedicalName',
+    data(){
+      return{
+        minTitle:'医学术语命名维护-添加',
+        data:{
+          name:'',
+          type:'',
+          mark:'', 
+          type:'',
+          typeList:[
+            {
+              name:'类型1',
+              id:1,
+              key:1
+            },
+            {
+              name:'类型2',
+              id:2,
+              key:2
+            },
+            {
+              name:'类型3',
+              id:3,
+              key:3
+            },
+          ]
+        },
+        id:null,
+        synonymous:[//同义词
+            {
+              term:'',
+              id:1,
+              type:'',
+              mark:''
+            },
+            {
+              term:'',
+              id:2,
+              type:'',
+              mark:''
+            },
+            {
+              term:'',
+              id:3,
+              type:'',
+              mark:''
+            },
+          ],
+        colspan:4
+      }
+    },
+    created(){
+      const info = this.$route.params.info;
+      if(info){
+        this.minTitle = '医学术语命名维护-修改';
+        this.id = info.id;
+        this.colspan = 5;
+      }
+    },
+    methods:{
+      handleInput(){//限制输入类型
+
+      },
+      addSpan(){
+        // let index = this.synIndex;
+        // index++
+        let singleSpan = {
+          // index:index,
+          term:'',
+          id:null,
+          type:'',
+          mark:''
+        }
+        this.synonymous.push(singleSpan);
+        // this.synIndex = index;
+      },
+      deleLine(index){
+        this.synonymous.splice(index,1);
+        console.log(123,index,this.synonymous);
+      },
+      comfirn(){
+
+      }
+    }
+  }
+</script>
+<style lang="less" scoped>
+   @import "../../less/admin.less";
+  .content{
+    background: #fff;
+    padding: 20px 20px 30px;
+    color: #545455;
+  }
+  .titl{
+    margin: 25px 0 10px;
+  }
+  .deptbox{
+    // width: 100%;
+    background: #fff;
+    padding: 20px 10px 30px;
+    font-size: 14px;
+    text-align: left;
+    border-collapse: collapse;
+    >tr{
+      height: 30px;
+      text-align: center;
+      td{
+        width: 135px;
+        border: 1px solid #666;
+        padding:5px;
+      }
+      input{
+        border:none;
+        width: 100%;
+      }
+      .ind{
+        width: 55px;
+      }
+      .desc{
+        width: 280px;
+      }
+    }
+    .addSpan{
+      text-align: center;
+      cursor: pointer;
+    } 
+  }
+  .btn {
+    text-align: right;
+    margin-top: 20px;
+  }
+</style>

+ 151 - 0
src/components/icss/AddMedicalRelation.vue

@@ -0,0 +1,151 @@
+<template>
+  <div>
+    <crumbs title="医学术语关系-添加" linkTo="/admin/LT-YXSYKWH-YXSYGXWH"></crumbs>
+    <div class="contents">
+      <div class="content">
+        <p>明细</p>
+        <div class="search">
+          <span>起始术语搜索:</span>
+          <el-input size="small" v-model="firstInput" placeholder="输入术语"></el-input>
+        </div>
+        <div class="search">
+          <span>终点术语搜索:</span>
+          <el-input size="small" v-model="endInput" placeholder="输入术语"></el-input>
+        </div>
+        <table class="deptbox">
+          <tr>
+            <td>起始术语</td>
+            <td>类型</td>
+            <td>关系</td>
+            <td>终点术语</td>
+            <td>类型</td>
+          </tr>
+          <tr>
+            <td>
+              <span>起始术语</span>
+            </td>
+            <td>
+              <el-select v-model="data.firstType" clearable placeholder="请选择" size="mini">
+                <el-option
+                  v-for="item in data.typeList"
+                  :key="item.key"
+                  :label="item.name"
+                  :value="item.key">
+                </el-option>
+              </el-select>
+            </td>
+            <td>
+              <el-select v-model="data.relation" clearable placeholder="请选择" size="mini">
+                <el-option
+                  v-for="item in data.typeList"
+                  :key="item.key"
+                  :label="item.name"
+                  :value="item.key">
+                </el-option>
+              </el-select>
+            </td>
+            <td>
+              <span>终点术语</span>
+            </td>
+            <td>
+              <el-select v-model="data.endType" clearable placeholder="请选择" size="mini">
+                <el-option
+                  v-for="item in data.typeList"
+                  :key="item.key"
+                  :label="item.name"
+                  :value="item.key">
+                </el-option>
+              </el-select>
+            </td>
+          </tr>
+        </table>
+        <div class="btn">
+          <el-button
+            type="primary"
+            @click="comfirn"
+          >确 定</el-button>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script type="text/javascript">
+  export default {
+    name:'AddMedicalRelation',
+    data(){
+      return{
+        data:{
+          type:'',
+          typeList:[
+            {
+              name:'类型1',
+              id:1,
+              key:1
+            },
+            {
+              name:'类型2',
+              id:2,
+              key:2
+            },
+            {
+              name:'类型3',
+              id:3,
+              key:3
+            },
+          ]
+        },
+        firstInput:'',
+        endInput:'',
+        relation:'',
+        firstType:'',
+        endType:''
+      }
+    },
+    methods:{
+      comfirn(){
+
+      }
+    }
+  }
+</script>
+<style lang="less" scoped>
+  @import "../../less/admin.less";
+  .content{
+    background: #fff;
+    padding: 20px 20px 30px;
+    color: #545455;
+    .search{
+      width: 185px;
+      display: inline-block;
+      margin: 20px 255px 25px 0;
+      .el-input--small{
+        margin-top: 8px;
+      }
+    }
+  }
+  .deptbox{
+    // width: 100%;
+    background: #fff;
+    padding: 20px 10px 30px;
+    font-size: 14px;
+    text-align: left;
+    border-collapse: collapse;
+    >tr{
+      height: 30px;
+      text-align: center;
+      td{
+        width: 135px;
+        border: 1px solid #666;
+        padding:5px;
+      }
+      input{
+        border:none;
+        width: 100%;
+      }
+    } 
+  }
+  .btn {
+    text-align: right;
+    margin-top: 20px;
+  }
+</style>

+ 6 - 6
src/components/icss/MedicalName.vue

@@ -9,7 +9,7 @@
                     <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">
+                    <router-link to="/admin/LT-YXSYKWH-TJYXSY" style="margin:0 10px">
                         <el-button size="mini" type="warning">添加术语</el-button>
                     </router-link>
                 </el-form-item>
@@ -88,10 +88,10 @@
     },
     methods: {
       toEditProduct(row){
-        this.$router.push({
-          name:'AddSimilarName',
-          params: {id:row.questionId,name:row.questionName}
-        })
+        // this.$router.push({
+        //   name:'AddSimilarName',
+        //   params: {id:row.questionId,name:row.questionName}
+        // })
       },
       filterDatas(){
         this.currentPage = 1;
@@ -149,7 +149,7 @@
         }).catch(() => {});
       },
       showDelDialog(id){
-        this.showConfirmDialog('是否删除?',()=>{
+        this.showConfirmDialog('删除该标准词,可能造成相关联的医学信息、术语关系、医学静态知识等信息全部删除,是否删除?',()=>{
           api.delSimilarName({questionId:id}).then((res)=>{
             if(res.data.code=='0'){
               this.warning(res.data.msg||'操作成功','success');

+ 240 - 0
src/components/icss/MedicalRelation.vue

@@ -0,0 +1,240 @@
+<template>
+    <div>
+        <crumbs title="医学术语关系维护" :minWidth="titleWidth">
+            <el-form :inline="true" class="demo-form-inline">
+              <el-form-item label="术语总条数:">
+                  <span>{{total}}条</span>
+              </el-form-item>
+              <el-form-item label="术语关系:">
+                <el-select v-model="type" clearable placeholder="请选择" size="mini">
+                  <el-option
+                    v-for="item in typeList"
+                    :key="item.key"
+                    :label="item.name"
+                    :value="item.key">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="起始术语:">
+                  <el-input size="mini" v-model="filter.proName" placeholder="输入术语"></el-input>
+              </el-form-item>
+              <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-YXSYKWH-TJYXSYGX" 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="operatorName"
+                        label="操作人">
+                </el-table-column>
+                
+                <el-table-column
+                        label="操作" width="160">
+                    <template slot-scope="scope">
+                        <el-button type="text" size="small" class="delete" @click="showDelDialog(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';
+  export default {
+    name: 'MedicalRelation',
+    data: function () {
+      return {
+        list: [],
+        cacheData: {},
+        currentPage: 1,
+        pageSize: 10,
+        total: 0,
+        filter: {
+          proName: ''
+        },
+        type:'',
+        typeList:[
+          {
+            name:'类型1',
+            id:1,
+            key:1
+          },
+          {
+            name:'类型2',
+            id:2,
+            key:2
+          },
+          {
+            name:'类型3',
+            id:3,
+            key:3
+          },
+        ],
+        titleWidth:'1060px' //头部最小宽度
+      }
+    },
+    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}})
+      },
+      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" scoped>
+    @import "../../less/admin.less";
+    .delete{
+        color: red;
+    }
+    .el-table .cell{
+      overflow: hidden;
+      white-space: nowrap;
+    }
+    #upFile{
+      display: none !important;
+    }
+</style>

+ 9 - 1
src/routes.js

@@ -57,6 +57,10 @@ import TemplateMaintenanceWrap from '@components/icss/TemplateMaintenanceWrap.vu
 import VersionInfo from '@components/icss/VersionInfo.vue'//版本信息
 import VersionDetail from '@components/icss/VersionDetail.vue'//版本信息-详情
 import AddVersion from '@components/icss/AddVersion.vue'//版本信息-添加/修改
+import MedicalName from '@components/icss/MedicalName.vue'//医学术语维护-命名维护
+import AddMedicalName from '@components/icss/AddMedicalName.vue'//医学术语维护-命名维护/添加修改
+import MedicalRelation from '@components/icss/MedicalRelation.vue'//医学术语维护-关系维护
+import AddMedicalRelation from '@components/icss/AddMedicalRelation.vue'//医学术语维护-关系维护-添加
 export default [
   {
     path: '/',
@@ -177,9 +181,13 @@ export default [
       {path:'LT-YXSJWH-TSXXXQ',component:PromptDetail,name:'PromptDetail'},         //提示信息维护详情
       {path:'LT-YXSYKWH-YXSYJTZSWH',component:MedicinePrompt,name:'MedicinePrompt'},         //医学术语提示信息维护
       {path:'LT-YXSYKWH-TJYXSYJTZS',component:AddMedicinePrompt,name:'AddMedicinePrompt'},         //医学术语提示信息维护添加
-	  {path:'LT-YXSJWH-BBXXWH',component:VersionInfo,name:'VersionInfo'},     //版本信息
+	    {path:'LT-YXSJWH-BBXXWH',component:VersionInfo,name:'VersionInfo'},     //版本信息
       {path:'LT-YXSJWH-BBXXXQ',component:VersionDetail,name:'VersionDetail'},     //版本信息-详情
       {path:'LT-YXSJWH-TJBBXX',component:AddVersion,name:'AddVersion'},     //版本信息-添加/修改
+      {path:'LT-YXSYKWH-YXSYMMWH',component:MedicalName,name:'MedicalName'},     //医学术语--命名维护
+      {path:'LT-YXSYKWH-TJYXSY',component:AddMedicalName,name:'AddMedicalName'},     //医学术语--命名维护
+      {path:'LT-YXSYKWH-YXSYGXWH',component:MedicalRelation,name:'MedicalRelation'},     //医学术语--关系维护
+      {path:'LT-YXSYKWH-TJYXSYGX',component:AddMedicalRelation,name:'AddMedicalRelation'},     //医学术语--关系维护-添加
 
     ]
   }