Browse Source

Merge branch 'master' into referMaster

1178232204@qq.com 3 years ago
parent
commit
3bff6ed1d6

+ 45 - 0
src/api/cdss.js

@@ -337,6 +337,51 @@ export default {
     });
   },
 
+  getRoutePage(param) {
+    //给药途径列表-列表
+    return axios.post(urls.getRoutePage, param);
+  },
+  saveOrUpdateRecordRT(param) {
+    //给药途径列表添加
+    return axios.post(urls.saveOrUpdateRecordRT, param);
+  },
+  RouteIsExistRecord(param) {
+    //给药途径-映射关系是否已存在
+    return axios.post(urls.RouteIsExistRecord, param);
+  },
+  deleteRouteRecord(param) {
+    //给药途径-删除
+  
+    return axios.post(urls.deleteRouteRecord, param);
+  },
+  exportRouteRecord(param) {
+    //给药途径-数据导出
+    return axios.post(urls.exportRouteRecord, param, {
+      responseType: 'blob',
+    });
+  },
+  importRouteRecord(param) {
+    //给药途径-数据导入
+    return axios.post(urls.importRouteRecord, param, {
+      responseType: 'blob',
+    });
+  },
+  exportRouteModule(param) {
+    //给药途径-数据导入模板导出
+    return axios.post(urls.exportRouteModule, param, {
+      responseType: 'blob',
+    });
+  },
+  dataRouteVerify(param) {
+    return axios.post(urls.dataRouteVerify, param);
+  },
+  precRouteDataMatch(param) {
+    return axios.post(urls.precRouteDataMatch, param, {
+      responseType: 'blob',
+    });
+  },
+
+
   getTcmdiseasePage(param) {
     //中医疾病列表-列表
     return axios.post(urls.getTcmdiseasePage, param);

+ 9 - 0
src/api/config.js

@@ -457,6 +457,15 @@ export default {
     'precNurseDataMatch': '/api/cdssman/tran/mappingConfig/precDataMatch',
     'dataNurseVerify': '/api/cdssman/tran/mappingConfig/dataVerify',
 
+	'getRoutePage': '/api/cdssman/tran/mappingConfig/getPage',   //给药途径列表
+	'RouteIsExistRecord': '/api/cdssman/tran/mappingConfig/isExistRecord',   //给药途径-映射关系是否已存在
+	'saveOrUpdateRecordRT': '/api/cdssman/tran/mappingConfig/saveOrUpdateRecord',   //给药途径列表添加
+	'deleteRouteRecord': '/api/cdssman/tran/mappingConfig/deleteRecord',   //给药途径-删除映射关系
+	'exportRouteRecord': '/api/cdssman/tran/mappingConfig/exportExcel',   //给药途径-数据导出
+	'importRouteRecord': '/api/cdssman/tran/mappingConfig/importExcel',   //给药途径-数据导入
+	'exportRouteModule': '/api/cdssman/tran/mappingConfig/exportExcelModule',   //给药途径-数据导入模板导出
+	'precRouteDataMatch': '/api/cdssman/tran/mappingConfig/precDataMatch',
+	'dataRouteVerify': '/api/cdssman/tran/mappingConfig/dataVerify',
 
     'getTcmdiseasePage': '/api/cdssman/tran/mappingConfig/getPage',   //中医疾病列表
     'tcmIsExistRecord': '/api/cdssman/tran/mappingConfig/isExistRecord',   //中医疾病-映射关系是否已存在

+ 27 - 1
src/components/cdssManage/MedicalTerm.vue

@@ -13,7 +13,7 @@
     </crumbs>
     <div class="contents">
       <el-table :data="list" border style="width: 100%">
-        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="60"></el-table-column>
+        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="50"></el-table-column>
         <el-table-column :resizable="false" prop="name" label="医院名称" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="connect" label="术语关联">
           <template slot-scope="scope">
@@ -54,6 +54,14 @@
             >{{scope.row.drugNum}}</span>
           </template>
         </el-table-column>
+        <el-table-column :resizable="false" prop="anesthesiaNum" label="麻醉关联">
+          <template slot-scope="scope">
+            <span
+              class="relation"
+              @click="goRelationPage('Hemp',scope.row)"
+            >{{scope.row.anesthesiaNum}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="scaleNum" label="量表关联">
           <template slot-scope="scope">
             <span
@@ -94,6 +102,22 @@
             >{{scope.row.nurseNum}}</span>
           </template>
         </el-table-column>
+		<el-table-column :resizable="false" prop="administrationRouteNum" label="给药途径关联">
+		  <template slot-scope="scope">
+		    <span
+		      class="relation"
+		      @click="goRelationPage('Drugroute',scope.row)"
+		    >{{scope.row.administrationRouteNum}}</span>
+		  </template>
+		</el-table-column>
+		<el-table-column :resizable="false" prop="anesthesiaNum" label="麻醉关联">
+		  <template slot-scope="scope">
+		    <span
+		      class="relation"
+		      @click="goRelationPage('Hemp',scope.row)"
+		    >{{scope.row.anesthesiaNum}}</span>
+		  </template>
+		</el-table-column>
         <el-table-column :resizable="false" prop="tcmdiseaseNum" label="中医疾病关联">
           <template slot-scope="scope">
             <span
@@ -197,8 +221,10 @@ export default {
       });
       api.getMappingListPageCDSS(params).then(res => {
         loading.close();
+		console.log(res)
         if (res.data.code === '0') {
           this.list = res.data.data && res.data.data.records;
+          console.log('术语关联维护:  ', this.list);
         }
         this.total = res.data.data && res.data.data.total;
         if (this.inCurrentPage !== undefined) {

+ 427 - 0
src/components/cdssManage/drugroute/AddDrugroute.vue

@@ -0,0 +1,427 @@
+<template>
+  <div class="AddChemicalAndCommonMappingWrapper clearfix">
+    <crumbs
+      :title="isEdit ? '给药途径关联维护--修改关联' : '给药途径关联维护--添加关联'"
+      class="topBack"
+      :param="$route.params"
+      linkTo="Nursing"
+    ></crumbs>
+    <el-form
+      :model="form"
+      :rules="rules"
+      label-position="right"
+      label-width="120px"
+      ref="relationForm"
+    >
+      <div class="AddChemicalAndCommonMappingBox clearfix">
+        <div class="titleBox clearfix">
+          <p class="title">医院术语</p>
+          <p class="title">标准术语</p>
+        </div>
+        <div class="leftBox clearfix">
+          <el-row>
+            <el-col :span="16">
+              <el-form-item label="给药途径名称:" prop="hisName">
+                <el-input v-model="form.hisName" clearable style="minWidth: 240px"></el-input>
+              </el-form-item>
+              <el-form-item label="给药途径名称预览:">
+                <span class="previewInfo" style="minWidth: 240px">{{form.hisName}}</span>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+        <div class="midBox">
+          <img class="midLogo" src="../../../images/relation.png" alt />
+          <p class="midTitle">相互关联</p>
+        </div>
+        <div class="rightBox">
+          <el-row>
+            <el-col :span="16">
+              <el-form-item label="给药途径名称:" prop="searchText">
+                <el-select
+                  style="width:100%; minWidth: 240px"
+                  v-model="form.searchText"
+                  filterable
+                  remote
+                  clearable
+                  :loading="showDrop"
+                  loading-text="加载中..."
+                  @change="changeWord"
+                  @visible-change="handleVisible"
+                  placeholder="搜索"
+                  :remote-method="searchTerms"
+                  reserve-keyword
+                >
+                  <el-option
+                    v-for="(item,idx) in uniqueNameList"
+                    :key="idx"
+                    :label="item.name"
+                    :value="item.name"
+                    :title="item.name"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="给药途径名称预览:">
+                <span class="previewInfo" style="minWidth: 240px">{{form.searchText}}</span>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+      </div>
+      <div class="btn">
+        <el-form-item>
+          <el-button type="primary" :disabled="saveDisable" @click="submitForm">确定</el-button>
+        </el-form-item>
+      </div>
+    </el-form>
+  </div>
+</template>
+<script>
+import api from '@api/cdss.js';
+export default {
+  name: 'AddNursing',
+  data() {
+    return {
+      isEdit: false,
+      editId: '',
+      uniqueNameList: [],
+      form: {
+        searchText: '', //搜索字段
+        hisName: ''
+      },
+      rules: {
+        hisName: [
+          { required: true, message: '请输入给药途径名称', trigger: 'change' },
+          { max: 80, message: '给药途径名称最多80字', trigger: 'change' }
+        ],
+        searchText: [
+          { required: true, message: '请选择给药途径名称', trigger: 'change' }
+        ]
+      },
+      saveDisable: false, //保存按钮禁止点击
+      showDrop: false, //下拉框显示文字
+      searchInfo: ''
+    };
+  },
+  created() {
+    //修改
+    const { isEdit, data, hospitaiName } = this.$route.params;
+    this.hospitaiName = hospitaiName;
+    this.hospitalId = data && data.hospitalId;
+    if (isEdit) {
+      this.isEdit = isEdit;
+      this.editId = data.id;
+      this.form.hisName = data.hisName;
+      this.form.searchText = data.uniqueName;
+    }
+  },
+  methods: {
+    // 搜索列表
+    searchTerms(query) {
+      if (!query) {
+        this.uniqueNameList = [];
+        return;
+      }
+      this.searchInfo = query;
+      this.showDrop = true;
+      let params = {
+        type: 16, //科室
+        inputStr: query,
+        sex: 3,
+        age: 0
+      };
+      api.retrievalSearch(params).then(res => {
+        this.showDrop = false;
+        if (res.data.code === '0') {
+          this.uniqueNameList = res.data.data.nameList;
+        }
+      });
+    },
+    changeWord(newVal) {
+      console.log(newVal);
+    },
+    handleVisible(flag) {
+      if (!flag) {
+        this.uniqueNameList = [];
+      }
+    },
+
+    // 初始化表单数据
+    initForm() {
+      this.form.hisName = '';
+      this.form.searchText = '';
+    },
+
+    // 建立关联-参数处理
+    submitForm() {
+      this.$refs.relationForm.validate(valid => {
+        if (valid) {
+          const { searchText, hisName } = this.form;
+          let params = {
+            hisName: hisName,
+            uniqueName: searchText,
+            hospitalId: this.hospitalId
+          };
+          this.showSaveDialog(params);
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    // 建立关联-映射关系是否已存在
+    showSaveDialog(params) {
+      this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+      api
+        .RouteIsExistRecord(params)
+        .then(res => {
+          if (!res.data.data) {
+            // 不存在,创建新的关联
+            // 如果是编辑时,需要携带id
+            if (this.isEdit) {
+              params = { ...params, id: this.editId };
+            }
+            this.saveLisMapping(params, '保存成功', 'success');
+          } else {
+            // 已存在,提示修改
+            this.warning('该条关联已存在,无法添加');
+            this.saveDisable = false;
+          }
+        })
+        .catch(err => {
+          if (err.code === '900010001') {
+            return false;
+          }
+          this.warning(err);
+        });
+    },
+
+    // 映射关系不存在-建立关联
+    saveLisMapping(params, msg, type) {
+      api.saveOrUpdateRecordRT(params).then(res => {
+        if (res.data.code === '0') {
+          this.warning(res.data.msg || msg, type);
+          this.initForm();
+          this.$router.push({
+            name: 'Nursing',
+            params: Object.assign({}, this.$route.params, {
+              currentPage: 1
+            })
+          });
+        } else {
+          this.warning(res.data.msg);
+        }
+        this.saveDisable = false;
+      });
+    },
+    // 关联已存在模态框
+    showConfirmDialog(msg, resolve) {
+      this.$confirm(msg, '提示', {
+        customClass: 'confirmRealation',
+        confirmButtonText: '是',
+        cancelButtonText: '否',
+        cancelButtonClass: 'cancelButton',
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {
+          this.saveDisable = false;
+          this.warning('建立失败', 'error');
+        });
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning'
+      });
+    }
+  }
+};
+</script>
+<style lang="less">
+.AddChemicalAndCommonMappingWrapper {
+  .AddChemicalAndCommonMappingBox {
+    min-width: 940px;
+  }
+  color: #606266;
+  .topBack {
+    top: 0;
+  }
+  .titleBox {
+    padding: 0 0 10px 0px;
+  }
+  .title {
+    width: 50%;
+    float: left;
+    font-size: 14px;
+  }
+  .AddChemicalAndCommonMappingBox {
+    padding: 20px 30px 20px 30px;
+    margin: 70px 20px 0 20px;
+    background: #fff;
+  }
+  .leftBox,
+  .midBox,
+  .rightBox {
+    width: 40%;
+    float: left;
+    min-height: 200px;
+    font-size: 14px;
+  }
+  .midBox {
+    width: 6%;
+    padding: 50px 0 0 0;
+    text-align: center;
+  }
+  .midTitle {
+    width: 40px;
+    margin: 0 auto;
+  }
+  .midLogo {
+    margin: 0 auto;
+  }
+  .leftBox,
+  .rightBox {
+    border: 1px solid #dcdfe6;
+    padding: 20px 20px;
+  }
+  .itemLabel {
+    width: 100%;
+    min-height: 50px;
+    line-height: 50px;
+    position: relative;
+  }
+  .itemLabelName,
+  .searchInput,
+  .searchName {
+    float: left;
+    color: #606266;
+  }
+  .itemLabelName {
+    width: 150px;
+  }
+  .isRequired::before {
+    content: '*';
+    color: red;
+  }
+  .searchInput,
+  .mealNameItem {
+    padding: 0 5px;
+  }
+  .searchInput,
+  .searchName {
+    display: inline-block;
+    height: 32px;
+    line-height: 32px;
+    border: 1px solid #a9a9a9;
+    margin: 8px 0 0 0;
+  }
+
+  .searchName {
+    text-align: center;
+    border-left: none;
+    cursor: pointer;
+    padding: 0 12px;
+    font-size: 16px;
+  }
+  .itemList {
+    position: absolute;
+    background: #fff;
+    width: 162px;
+    max-height: 150px;
+    border: 1px solid #a9a9a9;
+    left: 150px;
+    top: 42px;
+    z-index: 2;
+    overflow-y: auto;
+  }
+  .itemList {
+    width: calc(100% - 131px);
+  }
+  .mealNameItem {
+    height: 30px;
+    line-height: 30px;
+    font-size: 14px;
+    cursor: pointer;
+  }
+  .mealNameItem:hover {
+    background: #f5f7fa;
+  }
+  // .selectItemName {
+  //   padding-left: 4px;
+  //   display: inline-block;
+  //   margin-top: 8px;
+  //   // width: calc(100% - 160px);s
+  //   line-height: 24px;
+  //   overflow: hidden;
+  //   word-wrap: break-word;
+  //   word-break: break-all;
+  // }
+  .previewInfo {
+    padding-left: 4px;
+    display: inline-block;
+    margin-top: 8px;
+    // width: calc(100% - 160px);s
+    line-height: 24px;
+    overflow: hidden;
+    word-wrap: break-word;
+    word-break: break-all;
+  }
+  .btn {
+    position: relative;
+    background-color: #fff;
+    margin: 0px 20px;
+    padding: 20px;
+    min-width: 960px;
+    height: 80px;
+    .el-button {
+      position: absolute;
+      right: 80px;
+      top: 20px;
+    }
+  }
+  .sumbit {
+    position: absolute;
+    display: inline-block;
+    width: 80px;
+    height: 30px;
+    line-height: 30px;
+    border: 1px solid #a9a9a9;
+    text-align: center;
+    right: 100px;
+  }
+}
+.confirmRealation {
+  .cancelButton {
+    border: 1px solid #a9a9a9;
+    span {
+      color: #606266;
+    }
+  }
+}
+body {
+  .el-select-dropdown {
+    /deep/ .el-select-dropdown__item {
+      span {
+        color: #333;
+      }
+    }
+    ul {
+      max-width: 300px;
+    }
+
+    /deep/ .el-scrollbar {
+      border: 1px solid #dcdfe6;
+    }
+    /deep/ .popper__arrow {
+      border-bottom-color: #a5a5a5 !important;
+    }
+  }
+  /deep/ .el-popper[x-placement^='bottom'] {
+    margin-top: 8px !important;
+  }
+}
+</style>

+ 711 - 0
src/components/cdssManage/drugroute/Drugroute.vue

@@ -0,0 +1,711 @@
+<template>
+  <div>
+    <crumbs :title="title + hospitaiName" linkTo="MedicalTermCDSS">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item style="marginBottom: 0px">
+          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
+          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div class="searchBar">
+      <div class="searchContent">
+        <el-form :inline="true" class="demo-form-inline">
+          <el-form-item class="selectMedicine" label="标准术语状态:">
+            <el-select size="mini" v-model="filter.status" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in statusList"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="匹配状态:" class="selectMedicine">
+            <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in matchList"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="医院给药途径名称:">
+            <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="标准给药途径名称:">
+            <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
+          </el-form-item>
+          <el-form-item class="dododo">
+            <el-button size="mini" @click="filterDatas">检索</el-button>
+            <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
+          </el-form-item>
+        </el-form>
+      </div>
+    </div>
+    <div class="contentsOther">
+      <el-table :data="list" border style="width: 100%">
+        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
+        <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
+        <el-table-column :resizable="false" prop="hisName" label="医院给药途径名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="uniqueName" label="标准给药途径名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="标准术语状态">
+          <template slot-scope="scope">
+            <span v-if="scope.row.uniqueName && scope.row.uniqueName!=''">{{scope.row.status == 0?'禁用':'启用'}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="匹配状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="操作">
+          <template slot-scope="scope">
+            <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
+            <span style="margin:0 3px;">|</span>
+            <el-button
+              @click="showDelDialog(scope.row.id)"
+              class="delete"
+              type="text"
+              size="small"
+            >删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="pagination pagepage">
+        <el-pagination
+          :current-page.sync="currentPage"
+          @current-change="currentChange"
+          background
+          :page-size="pageSize"
+          :page-sizes="pageSizeArr"
+          @size-change="handleSizeChange"
+          :layout="pageLayout"
+          :total="total"
+        ></el-pagination>
+      </div>
+    </div>
+
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'给药途径名称'"
+      :standard="'给药途径名称'"
+      :tip="'给药途径关联'"
+      :type="16"
+      :hospitalId="hospitalId"
+      :data="data"
+    ></LtModal>
+  </div>
+</template>
+
+<script>
+import api from '@api/cdss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+import LtModal from '@base/LtModal';
+export default {
+  name: 'Drugroute', //化验大小项和公表维护
+  data: function() {
+    return {
+      list: [],
+      searched: false,
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
+      filter: {
+        hisName: '', // 医院诊断名称
+        uniqueName: '', //标准诊断名称
+        match: '',
+        status:''
+      },
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      uploadInfo: '导入',
+      title: '给药途径关联维护 | ',
+      hospitaiName: '',
+      hospitalId: '',
+      modalVisiable: false,
+      data: {}
+    };
+  },
+  components: {
+    LtModal
+  },
+  created() {
+    const { data } = this.$route.params;
+    this.hospitaiName = (data && data.name) || localStorage.getItem('name');
+    this.hospitalId = (data && data.hospitalId) || localStorage.getItem('hospitalId');
+    const that = this;
+    //返回时避免参数未赋值就获取列表
+    setTimeout(function() {
+      that.getDataList();
+    });
+    // 非首页 编辑页返回 设置 this.currentPage
+    if (Object.keys(this.$route.params).length !== 0) {
+      this.currentPage = this.$route.params.currentPage;
+    }
+  },
+  watch: {
+    filter: {
+      handler: function() {
+        this.searched = false;
+      },
+      deep: true
+    }
+  },
+  beforeRouteEnter(to, from, next) {
+    next(vm => {
+      //const pm = to.param;
+      Object.assign(vm, to.params);
+      vm.inCurrentPage = to.params.currentPage;
+    });
+  },
+  methods: {
+    // 预匹配
+    handleMatchData() {
+      let inp = document.getElementById('upFileMatch');
+      inp.click();
+    },
+    // 导入数据
+    uploadFileMatch(e) {
+      let fileInfo = e.target.files[0];
+      let extend = fileInfo.name.substring(fileInfo.name.lastIndexOf('.') + 1);
+      if (extend != 'xls' && extend != 'xlsx') {
+        this.$message({ message: '请根据模板进行导入', type: 'error' });
+        return;
+      }
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      formData.append('type', 16);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      const loading = this.$loading({
+        lock: true,
+        text: '预匹配中...',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.dataRouteVerify(formData, header).then(res => {
+        if (res.data.code === '00020007' || res.data.code === '00020004') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precRouteDataMatch(formData, header).then(res => {
+            setTimeout(() => {
+              loading.close();
+            }, 800);
+            if (res.status === 200) {
+              utils.downloadExportedData(
+                res.data,
+                '给药途径关联数据(预匹配).xls'
+              );
+            }
+          });
+        }
+      });
+
+      let inp = document.getElementById('upFileMatch');
+      inp.value = '';
+    },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    // 获取列表数据
+    getDataList(isTurnPage) {
+      const params = this.getFilterItems(isTurnPage);
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.getRoutePage(params).then(res => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+
+    // 处理列表请求数据参数
+    getFilterItems(isTurnPage) {
+      const { data } = this.$route.params;
+      //翻页时筛选条件没点确定则清空
+      if (isTurnPage && !this.searched) {
+        this.clearFilter();
+      }
+      const param = {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        hisName: this.filter.hisName.trim(),
+        uniqueName: this.filter.uniqueName.trim(),
+        uniqueCode: '',
+        hospitalId: (data && data.hospitalId) || localStorage.getItem('hospitalId'),
+        type: 16,
+        isMatch: this.filter.match,
+        status: this.filter.status,
+      };
+      return param;
+    },
+
+    filterDatas() {
+      this.currentPage = 1;
+      this.getDataList();
+    },
+    addRelation() {
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      // this.$router.push({
+      //   name: 'AddDrugroute',
+      //   params: Object.assign(pam, {
+      //     isEdit: false,
+      //     data: { hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
+      this.data = {};
+      this.showModal();
+    },
+    // 修改诊断关联-跳转至编辑页面
+    modifyRelation(row) {
+      const item = Object.assign({}, row);
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      // this.$router.push({
+      //   name: 'AddDrugroute',
+      //   params: Object.assign(pam, {
+      //     isEdit: true,
+      //     data: { ...item, hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
+      this.data = item;
+      this.showModal();
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+      // if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
+      //     this.list = this.cacheData[next];
+      // } else {
+      //     this.getDataList();
+      // }
+    },
+    // 清空搜索参数
+    clearFilter() {
+      this.filter = {
+        hisName: '',
+        uniqueName: ''
+      };
+    },
+
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    getTagType(val) {
+      return val;
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning'
+      });
+    },
+    showConfirmDialog(msg, resolve) {
+      this.$alert(msg, '提示', {
+        confirmButtonText: '删除',
+        // cancelButtonText: '取消',
+        // cancelButtonClass: 'cancelBtn',
+        // confirmButtonClass: 'confirmC',
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {});
+    },
+    // 删除关联
+    showDelDialog(id) {
+      this.showConfirmDialog('是否删除该关联?', () => {
+        api
+          .deleteRouteRecord({ id: id })
+          .then(res => {
+            if (res.data.code == '0') {
+              if (!this.searched) {
+                //未点确认时清空搜索条件
+                this.clearFilter();
+              }
+              if (this.list.length == 1) {
+                //当前在最后一页且只有一条数据时,删除后跳到前一页
+                this.currentPage =
+                  this.currentPage === 1 ? 1 : this.currentPage - 1;
+              }
+              this.getDataList();
+              this.warning(res.data.msg || '操作成功', 'success');
+            } else {
+              this.warning(res.data.msg);
+            }
+          })
+          .catch(error => {
+            if (error.code === '900010001') {
+              return false;
+            }
+            this.warning(error);
+          });
+      });
+    },
+
+    // 导出数据
+    exportData() {
+      this.$alert('确定要导出全部给药途径关联数据吗?', '', {
+        confirmButtonText: '确定',
+        // cancelButtonText: '取消',
+        // cancelButtonClass: 'leftbtn',
+        // customClass: 'exportBox6',
+        title: '提示',
+        type: 'warning'
+        // beforeClose: (action, instance, done) => {
+        //   if (action === 'confirm') {
+        //     // instance.confirmButtonLoading = true;
+        //     instance.confirmButtonText = '导出中...';
+        //     api.exportFusionRecord().then(res => {
+        //       if (res.status === 200) {
+        //         setTimeout(() => {
+        //           utils.downloadExportedData(res.data, '输血关联数据.xls');
+        //           done();
+        //         }, 1500);
+        //       }
+        //     });
+        //   } else {
+        //     done();
+        //   }
+        // }
+      })
+        .then(() => {
+          api
+            .exportRouteRecord({
+              hospitalId: this.hospitalId,
+              type: 16,
+              isMatch: this.filter.match
+            })
+            .then(res => {
+              if (res.status === 200) {
+                this.$message({ message: '导出成功', type: 'success' });
+                utils.downloadExportedData(res.data, '给药途径关联数据.xls');
+              }
+            });
+        })
+        .catch(() => {
+          // this.$message({ message: '导出失败', type: 'waring' });
+        });
+    },
+    // 导入模板
+    exportModule() {
+      api.exportRouteModule({ type: 16 }).then(res => {
+        if (res.status === 200) {
+          setTimeout(() => {
+            utils.downloadExportedData(res.data, '给药途径导入模板.xls');
+          }, 1500);
+        }
+      });
+    },
+
+    // 点击导入
+    importPage() {
+      let inp = document.getElementById('upFile');
+      inp.click();
+    },
+    // 导入数据
+    uploadFile(e) {
+      let fileInfo = e.target.files[0];
+      let extend = fileInfo.name.substring(fileInfo.name.lastIndexOf('.') + 1);
+      if (extend != 'xls' && extend != 'xlsx') {
+        this.$message({ message: '请根据模板进行导入', type: 'error' });
+        return;
+      }
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      formData.append('hospitalId', this.hospitalId);
+      formData.append('type', 16);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      // this.uploadInfo = '导入中...';
+      this.importRouteRecord(formData, header)
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+      // api.importExcelDataVerify(formData, header).then(res => {
+      //   if (res.data.code === '00020001') {
+      //     this.$confirm(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       cancelButtonText: '取消',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {
+      //         this.importRouteRecord(formData, header);
+      //       })
+      //       .catch(() => {
+      //         setTimeout(() => {
+      //           this.uploadInfo = '导入';
+      //         }, 300);
+      //       });
+      //   } else if (res.data.data === true) {
+      //     this.importRouteRecord(formData, header);
+      //   }else {
+      //     this.$alert(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       // cancelButtonText: '取消',
+      //       // cancelButtonClass: 'cancelSure',
+      //       // confirmButtonClass: 'sure',
+      //       // customClass: 'exportConfirm',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {})
+      //       .catch(() => {});
+
+      //     setTimeout(() => {
+      //       this.uploadInfo = '导入';
+      //     }, 300);
+      //   }
+      // });
+    },
+    importRouteRecord(formData, header) {
+      let that = this
+      api.importRouteRecord(formData, header).then(res => {
+        if (res.headers['content-disposition']) {
+          this.downloadUrl(res);
+          this.getDataList();
+        } else {
+          let r = new FileReader();
+          r.onload = function() {
+            if (this.result) {
+              const code = JSON.parse(this.result);
+              if (code.code === '00020007') {
+                that
+                  .$alert(`${code.msg}`, '提示', {
+                    confirmButtonText: '确定',
+                    // cancelButtonText: '取消',
+                    // cancelButtonClass: 'cancelSure',
+                    // confirmButtonClass: 'sure',
+                    // customClass: 'exportConfirm',
+                    type: 'warning'
+                  })
+                  .then(() => {})
+                  .catch(() => {});
+              }
+            } else {
+              that.$alert(`导入成功`, '提示', {
+                confirmButtonText: '确定',
+                // cancelButtonText: '取消',
+                // cancelButtonClass: 'cancelSure',
+                // confirmButtonClass: 'sure',
+                // customClass: 'exportConfirm',
+                type: 'success'
+              });
+              that.getDataList();
+            }
+          };
+          r.readAsText(res.data);
+        }
+        // if ((res.data.code === '00020007')) {
+        //   this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
+        //     confirmButtonText: '确定',
+        //     // cancelButtonText: '取消',
+        //     // cancelButtonClass: 'cancelSure',
+        //     // confirmButtonClass: 'sure',
+        //     // customClass: 'exportConfirm',
+        //     type: 'warning'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+        //   this.getDataList(); // 重新获取列表
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // } else if (res.data.data === true && res.status === 200) {
+        //   this.$alert(`导入成功`, '提示', {
+        //     confirmButtonText: '确定',
+        //     // cancelButtonText: '取消',
+        //     // cancelButtonClass: 'cancelSure',
+        //     // confirmButtonClass: 'sure',
+        //     // customClass: 'exportConfirm',
+        //     type: 'success'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+        //   this.getDataList(); // 重新获取列表
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // } else {
+        //   this.$alert(`${res.data.msg}`, '提示', {
+        //     confirmButtonText: '确定',
+        //     // cancelButtonText: '取消',
+        //     // cancelButtonClass: 'cancelSure',
+        //     // confirmButtonClass: 'sure',
+        //     // customClass: 'exportConfirm',
+        //     type: 'warning'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // }
+      });
+    },
+    downloadUrl(res) {
+      var disposition = res.headers['content-disposition'];
+      var fileName = decodeURI(
+        disposition.split('filename=')[1].split(';filename*=')[0]
+      );
+      let blob = new Blob([res.data], { type: 'application/.xls' }); //.xls是我和后台约定好的文件格式
+      let link = document.createElement('a');
+      link.href = window.URL.createObjectURL(blob);
+      link.download = fileName;
+      link.click();
+      link.remove();
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
+    }
+  }
+};
+</script>
+
+
+<style lang="less" scoped>
+@import '../../../less/admin.less';
+.delete {
+  color: red;
+}
+.delete:hover {
+  color: red;
+}
+.pagination {
+  min-width: 1010px;
+}
+.downTemplate {
+  margin-right: 8px;
+  span {
+    color: #02a7f0;
+  }
+}
+#upFile {
+  display: none !important;
+}
+#upFileMatch {
+  display: none;
+}
+.el-message-box {
+  /deep/.cancelBtn {
+    background-color: #d7d7d7;
+    border-color: transparent;
+  }
+  /deep/.confirmC {
+    background-color: #ff545b !important;
+    border-color: transparent !important;
+  }
+}
+.exportBox6 {
+  /deep/ .el-message-box__btns {
+    margin-top: 20px;
+  }
+  /deep/ .el-message-box__message {
+    // text-align: center;
+  }
+  /deep/.leftbtn {
+    background-color: #d7d7d7;
+    border-color: transparent !important;
+  }
+  /deep/ .el-message-box__header {
+    border-bottom: 1px solid #dcdfe6;
+  }
+}
+.searchBar {
+  min-width: 980px;
+  height: 60px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  background-color: #dee2ea;
+  z-index: 9999;
+  padding: 40px 20px 0;
+  .searchContent {
+    height: 40px;
+    flex: 1;
+    background-color: #fff;
+    display: flex;
+    justify-content: flex-end;
+    float: right;
+  }
+}
+.contentsOther {
+  padding: 0 20px;
+}
+</style>

+ 447 - 0
src/components/cdssManage/hemp/AddHemp.vue

@@ -0,0 +1,447 @@
+<template>
+  <div class="AddChemicalAndCommonMappingWrapper clearfix">
+    <crumbs
+      :title="isEdit ? '麻醉关联维护--修改关联 | '+ hospitaiName : '麻醉关联维护--添加关联 | ' + hospitaiName"
+      class="topBack"
+      :param="$route.params"
+      linkTo="DrugManage"
+    ></crumbs>
+    <el-form
+      :model="form"
+      :rules="rules"
+      label-position="right"
+      label-width="120px"
+      ref="relationForm"
+    >
+      <div class="AddChemicalAndCommonMappingBox clearfix">
+        <div class="titleBox clearfix">
+          <p class="title">医院术语</p>
+          <p class="title">标准术语</p>
+        </div>
+        <div class="leftBox clearfix">
+          <el-row>
+            <el-col :span="16">
+              <el-form-item label="麻醉名称:" prop="hisName">
+                <el-input v-model.trim="form.hisName" clearable style="minWidth: 240px"></el-input>
+              </el-form-item>
+              <el-form-item label="麻醉名称预览:">
+                <span class="previewInfo" style="minWidth: 240px">{{form.hisName}}</span>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+        <div class="midBox">
+          <img class="midLogo" src="../../../images/relation.png" alt />
+          <p class="midTitle">相互关联</p>
+        </div>
+        <div class="rightBox">
+          <el-row>
+            <el-col :span="16">
+              <el-form-item label="麻醉名称:" prop="searchText">
+                <el-select
+                  style="width:100%;minWidth: 240px"
+                  v-model="form.searchText"
+                  filterable
+                  remote
+                  clearable
+                  :loading="showDrop"
+                  loading-text="加载中..."
+                  @change="changeWord"
+                  @focus="handleFocus"
+                  @visible-change="handleVisible"
+                  placeholder="搜索"
+                  :remote-method="searchTerms"
+                  reserve-keyword
+                >
+                  <el-option
+                    v-for="(item,idx) in uniqueNameList"
+                    :key="idx"
+                    :label="item.name"
+                    :value="item.name"
+                    :title="item.name"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="麻醉名称预览:">
+                <span class="previewInfo" style="minWidth: 240px">{{form.searchText}}</span>
+              </el-form-item>
+              <el-form-item label="麻醉剂型:">
+                <el-select
+                  v-model="form.form"
+                  placeholder="请选择"
+                  clearable
+                  style="width:100%;minWidth: 240px"
+                >
+                  <el-option
+                    v-for="item in drugList"
+                    :key="item.val"
+                    :label="item.name"
+                    :value="item.name"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+      </div>
+      <div class="btn">
+        <el-form-item>
+          <el-button type="primary" :disabled="saveDisable" @click="submitForm">确定</el-button>
+        </el-form-item>
+      </div>
+    </el-form>
+  </div>
+</template>
+<script>
+import api from '@api/cdss.js';
+import config from '@api/config';
+export default {
+  name: 'AddDrug',
+  data() {
+    return {
+      isEdit: false,
+      hospitaiName: '',
+      editId: '',
+      uniqueNameList: [],
+      form: {
+        searchText: '', //搜索字段
+        hisName: '',
+        form: ''
+      },
+      rules: {
+        hisName: [
+          { required: true, message: '请输入麻醉名称', trigger: 'change' },
+          { max: 80, message: '麻醉名称最多80字', trigger: 'change' }
+        ],
+        searchText: [
+          { required: true, message: '请选择麻醉名称', trigger: 'change' }
+        ]
+      },
+      saveDisable: false, //保存按钮禁止点击
+      showDrop: false, //下拉框显示文字
+      drugForm: config.drugForm,
+      drugList: [],
+      hospitalId: ''
+    };
+  },
+  created() {
+    //修改
+    const { isEdit, data, hospitaiName } = this.$route.params;
+    this.hospitaiName = hospitaiName;
+    this.hospitalId = data && data.hospitalId;
+    if (isEdit) {
+      this.isEdit = isEdit;
+      this.editId = data.id;
+      this.form.hisName = data.hisName;
+      this.form.searchText = data.uniqueName;
+      this.form.form = data.form;
+    }
+
+    this.getListDicCDSS()
+  },
+  methods: {
+    getListDicCDSS() {
+      api.getListDicCDSS().then(res => {
+        if (res.data.code === '0') {
+          let dragData = []
+          res.data.data && res.data.data['9'].forEach(item=>{
+            if(item.val !== '0'){
+              dragData.push(item)
+            }
+          })
+          this.drugList = dragData
+        }
+      });
+    },
+
+
+    // 搜索列表
+    searchTerms(query) {
+      if (!query) {
+        this.uniqueNameList = [];
+        return;
+      }
+      this.showDrop = true;
+      let params = {
+        type: 14, //药品
+        inputStr: query,
+        sex: 3,
+        age: 0
+      };
+      api.retrievalSearch(params).then(res => {
+        this.showDrop = false;
+        if (res.data.code === '0') {
+          this.uniqueNameList = res.data.data.drugNames;
+        }
+      });
+    },
+    changeWord() {
+      
+    },
+    // 获取焦点
+    handleFocus() {},
+
+    handleVisible(flag) {
+      if (!flag) {
+        this.uniqueNameList = [];
+      }
+    },
+
+    // 初始化表单数据
+    initForm() {
+      this.form.hisName = '';
+      this.form.searchText = '';
+    },
+
+    // 建立关联-参数处理
+    submitForm() {
+      this.$refs.relationForm.validate(valid => {
+        if (valid) {
+          const { searchText, hisName, form } = this.form;
+          let params = {
+            hisName: hisName,
+            uniqueName: searchText,
+            form: form,
+            hospitalId: this.hospitalId
+          };
+          this.showSaveDialog(params);
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    // 建立关联-映射关系是否已存在
+    showSaveDialog(params) {
+      this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+      api
+        .drugIsExistRecord(params)
+        .then(res => {
+          if (!res.data.data) {
+            // 不存在,创建新的关联
+            // 如果是编辑时,需要携带id
+            if (this.isEdit) {
+              params = { ...params, id: this.editId };
+            }
+            this.saveLisMapping(params, '保存成功', 'success');
+          } else {
+            // 已存在,提示修改
+            this.warning('该条关联已存在,无法添加');
+            this.saveDisable = false;
+          }
+        })
+        .catch(err => {
+          if (err.code === '900010001') {
+            return false;
+          }
+          this.warning(err);
+        });
+    },
+
+    // 映射关系不存在-建立关联
+    saveLisMapping(params, msg, type) {
+      api.saveOrUpdateDrugRecord(params).then(res => {
+        if (res.data.code === '0') {
+          this.warning(res.data.msg || msg, type);
+          this.initForm();
+          this.$router.push({
+            name: 'DrugManage',
+            params: Object.assign({}, this.$route.params, {
+              currentPage: 1
+            })
+          });
+        } else {
+          this.warning(res.data.msg);
+        }
+        this.saveDisable = false;
+      });
+    },
+    // 关联已存在模态框
+    showConfirmDialog(msg, resolve) {
+      this.$alert(msg, '提示', {
+        // customClass: 'confirmRealation',
+        confirmButtonText: '是',
+        // cancelButtonText: '否',
+        // cancelButtonClass: 'cancelButton',
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {
+          this.saveDisable = false;
+          this.warning('建立失败', 'error');
+        });
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning'
+      });
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+.AddChemicalAndCommonMappingWrapper {
+  .AddChemicalAndCommonMappingBox {
+    min-width: 940px;
+  }
+  color: #606266;
+  .topBack {
+    top: 0;
+  }
+  .titleBox {
+    padding: 0 0 10px 0px;
+  }
+  .title {
+    width: 50%;
+    float: left;
+    font-size: 14px;
+  }
+  .AddChemicalAndCommonMappingBox {
+    padding: 20px 30px 20px 30px;
+    margin: 70px 20px 0 20px;
+    background: #fff;
+  }
+  .leftBox,
+  .midBox,
+  .rightBox {
+    width: 40%;
+    float: left;
+    min-height: 200px;
+    font-size: 14px;
+  }
+  .midBox {
+    width: 6%;
+    padding: 50px 0 0 0;
+    text-align: center;
+  }
+  .midTitle {
+    width: 40px;
+    margin: 0 auto;
+  }
+  .midLogo {
+    margin: 0 auto;
+  }
+  .leftBox,
+  .rightBox {
+    border: 1px solid #dcdfe6;
+    padding: 20px 20px;
+  }
+  .itemLabel {
+    width: 100%;
+    min-height: 50px;
+    line-height: 50px;
+    position: relative;
+  }
+  .itemLabelName,
+  .searchInput,
+  .searchName {
+    float: left;
+    color: #606266;
+  }
+  .itemLabelName {
+    width: 150px;
+  }
+  .isRequired::before {
+    content: '*';
+    color: red;
+  }
+  .searchInput,
+  .mealNameItem {
+    padding: 0 5px;
+  }
+  .searchInput,
+  .searchName {
+    display: inline-block;
+    height: 32px;
+    line-height: 32px;
+    border: 1px solid #a9a9a9;
+    margin: 8px 0 0 0;
+  }
+
+  .searchName {
+    text-align: center;
+    border-left: none;
+    cursor: pointer;
+    padding: 0 12px;
+    font-size: 16px;
+  }
+  .itemList {
+    position: absolute;
+    background: #fff;
+    width: 162px;
+    max-height: 150px;
+    border: 1px solid #a9a9a9;
+    left: 150px;
+    top: 42px;
+    z-index: 2;
+    overflow-y: auto;
+  }
+  .itemList {
+    width: calc(100% - 131px);
+  }
+  .mealNameItem {
+    height: 30px;
+    line-height: 30px;
+    font-size: 14px;
+    cursor: pointer;
+  }
+  .mealNameItem:hover {
+    background: #f5f7fa;
+  }
+  // .selectItemName {
+  //   padding-left: 4px;
+  //   display: inline-block;
+  //   margin-top: 8px;
+  //   // width: calc(100% - 160px);s
+  //   line-height: 24px;
+  //   overflow: hidden;
+  //   word-wrap: break-word;
+  //   word-break: break-all;
+  // }
+  .previewInfo {
+    padding-left: 4px;
+    display: inline-block;
+    margin-top: 8px;
+    // width: calc(100% - 160px);s
+    line-height: 24px;
+    overflow: hidden;
+    word-wrap: break-word;
+    word-break: break-all;
+  }
+  .btn {
+    position: relative;
+    background-color: #fff;
+    margin: 0px 20px;
+    padding: 20px;
+    min-width: 960px;
+    height: 80px;
+    .el-button {
+      position: absolute;
+      right: 80px;
+      top: 20px;
+    }
+  }
+  .sumbit {
+    position: absolute;
+    display: inline-block;
+    width: 80px;
+    height: 30px;
+    line-height: 30px;
+    border: 1px solid #a9a9a9;
+    text-align: center;
+    right: 100px;
+  }
+}
+.confirmRealation {
+  .cancelButton {
+    border: 1px solid #a9a9a9;
+    span {
+      color: #606266;
+    }
+  }
+}
+</style>

+ 753 - 0
src/components/cdssManage/hemp/Hemp.vue

@@ -0,0 +1,753 @@
+<template>
+  <div>
+    <crumbs :title="title + hospitaiName" linkTo="MedicalTermCDSS">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item style="marginBottom: 0px">
+          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
+          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div class="searchBar">
+      <div class="searchContent">
+        <el-form :inline="true" class="demo-form-inline">
+          <el-form-item class="selectMedicine" label="标准术语状态:">
+            <el-select size="mini" v-model="filter.status" placeholder="请选择">
+              <el-option
+                v-for="item in statusList"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <!-- <el-form-item label="剂型术语状态:" class="selectMedicine">
+            <el-select size="mini" v-model="filter.formStatus" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in formstatusList"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item> -->
+          <el-form-item label="匹配状态:" class="selectMedicine">
+            <el-select size="mini" v-model="filter.match" placeholder="请选择">
+              <el-option
+                v-for="item in matchList"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="医院麻醉名称:">
+            <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="标准麻醉名称:">
+            <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
+          </el-form-item>
+        </el-form>
+        <el-form :inline="true" class="demo-form-inline">
+          <el-form-item class="dododo">
+            <el-button size="mini" @click="filterDatas">检索</el-button>
+            <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
+          </el-form-item>
+        </el-form>
+      </div>
+    </div>
+
+    <div class="contentsOther">
+      <el-table :data="list" border style="width: 100%">
+        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
+        <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
+        <el-table-column :resizable="false" prop="hisName" label="医院麻醉名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="uniqueName" label="标准麻醉名称" show-overflow-tooltip></el-table-column>
+        <!-- <el-table-column :resizable="false" prop="form" label="麻醉剂型" show-overflow-tooltip></el-table-column> -->
+
+        <el-table-column :resizable="false" prop="operate" label="标准术语状态">
+          <template slot-scope="scope">
+            <span
+              v-if="scope.row.uniqueName && scope.row.uniqueName!=''"
+            >{{scope.row.status == 0?'禁用':'启用'}}</span>
+          </template>
+        </el-table-column>
+        
+        <!-- <el-table-column :resizable="false" prop="operate" label="剂型术语状态">
+          <template slot-scope="scope">
+            <span
+              v-if="scope.row.form && scope.row.form!=''"
+            >{{scope.row.formStatus == 0?'禁用':'启用'}}</span>
+          </template>
+        </el-table-column> -->
+
+        
+        <el-table-column :resizable="false" prop="operate" label="匹配状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="操作">
+          <template slot-scope="scope">
+            <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
+            <span style="margin:0 3px;">|</span>
+            <el-button
+              @click="showDelDialog(scope.row.id)"
+              class="delete"
+              type="text"
+              size="small"
+            >删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="pagination pagepage">
+        <el-pagination
+          :current-page.sync="currentPage"
+          @current-change="currentChange"
+          background
+          :page-size="pageSize"
+          :page-sizes="pageSizeArr"
+          @size-change="handleSizeChange"
+          :layout="pageLayout"
+          :total="total"
+        ></el-pagination>
+      </div>
+    </div>
+
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'麻醉名称'"
+      :standard="'麻醉名称'"
+      :tip="'麻醉关联'"
+      :type="14"
+      :hospitalId="hospitalId"
+      :data="data"
+    ></LtModal>
+  </div>
+</template>
+
+<script>
+import api from '@api/cdss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+import LtModal from '@base/LtModal';
+export default {
+  name: 'Hemp', //化验大小项和公表维护
+  data: function() {
+    return {
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
+      list: [],
+      searched: false,
+      filter: {
+        hisName: '', // 医院诊断名称
+        uniqueName: '', //标准诊断名称
+        match: '',
+        status: '',
+        formStatus: ''
+      },
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' }
+      ],
+      formstatusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' }
+      ],
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      uploadInfo: '导入',
+      title: '麻醉关联维护 | ',
+      hospitaiName: '',
+      hospitalId: '',
+      modalVisiable: false,
+      data: {}
+    };
+  },
+  components: {
+    LtModal
+  },
+  created() {
+    const { data } = this.$route.params;
+    this.hospitaiName = (data && data.name) || localStorage.getItem('name');
+    this.hospitalId =
+      (data && data.hospitalId) || localStorage.getItem('hospitalId');
+    const that = this;
+    //返回时避免参数未赋值就获取列表
+    setTimeout(function() {
+      that.getDataList();
+    });
+    // 非首页 编辑页返回 设置 this.currentPage
+    if (Object.keys(this.$route.params).length !== 0) {
+      this.currentPage = this.$route.params.currentPage;
+    }
+  },
+  watch: {
+    filter: {
+      handler: function() {
+        this.searched = false;
+      },
+      deep: true
+    }
+  },
+  beforeRouteEnter(to, from, next) {
+    next(vm => {
+      //const pm = to.param;
+      Object.assign(vm, to.params);
+      vm.inCurrentPage = to.params.currentPage;
+    });
+  },
+  methods: {
+    // 预匹配
+    handleMatchData() {
+      let inp = document.getElementById('upFileMatch');
+      inp.click();
+    },
+
+    // 导入数据
+    uploadFileMatch(e) {
+      let fileInfo = e.target.files[0];
+      let extend = fileInfo.name.substring(fileInfo.name.lastIndexOf('.') + 1);
+      if (extend != 'xls' && extend != 'xlsx') {
+        this.$message({ message: '请根据模板进行导入', type: 'error' });
+        return;
+      }
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      formData.append('type', 5);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      const loading = this.$loading({
+        lock: true,
+        text: '预匹配中...',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.dataDrugVerify(formData, header).then(res => {
+        if (res.data.code === '00020007' || res.data.code === '00020004') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precDrugDataMatch(formData, header).then(res => {
+            setTimeout(() => {
+              loading.close();
+            }, 800);
+            if (res.status === 200) {
+              utils.downloadExportedData(
+                res.data,
+                '麻醉关联数据(预匹配).xls'
+              );
+            }
+          });
+        }
+      });
+
+      let inp = document.getElementById('upFileMatch');
+      inp.value = '';
+    },
+
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+
+    // 获取列表数据
+    getDataList(isTurnPage) {
+      const params = this.getFilterItems(isTurnPage);
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.getDrugPage(params).then(res => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+          console.log('获取列表数据', this.list);
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+
+    // 处理列表请求数据参数
+    getFilterItems(isTurnPage) {
+      const { data } = this.$route.params;
+      //翻页时筛选条件没点确定则清空
+      if (isTurnPage && !this.searched) {
+        this.clearFilter();
+      }
+      const param = {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        hisName: this.filter.hisName.trim(),
+        uniqueName: this.filter.uniqueName.trim(),
+        uniqueCode: '',
+        hospitalId:
+          (data && data.hospitalId) || localStorage.getItem('hospitalId'),
+        type: 14,
+        isMatch: this.filter.match,
+        status: this.filter.status,
+        formStatus: this.filter.formStatus
+      };
+      return param;
+    },
+
+    filterDatas() {
+      this.currentPage = 1;
+      this.getDataList();
+    },
+    addRelation() {
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      // this.$router.push({
+      //   name: 'AddDrug',
+      //   params: Object.assign(pam, {
+      //     isEdit: false,
+      //     data: { hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
+      this.data = {};
+      this.showModal();
+    },
+    // 修改诊断关联-跳转至编辑页面
+    modifyRelation(row) {
+      const item = Object.assign({}, row);
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      // this.$router.push({
+      //   name: 'AddDrug',
+      //   params: Object.assign(pam, {
+      //     isEdit: true,
+      //     data: { ...item, hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
+      this.data = item;
+      this.showModal();
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      this.getDataList(true);
+      // if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
+      //     this.list = this.cacheData[next];
+      // } else {
+      //     this.getDataList();
+      // }
+    },
+    // 清空搜索参数
+    clearFilter() {
+      this.filter = {
+        hisName: '',
+        uniqueName: ''
+      };
+    },
+
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    getTagType(val) {
+      return val;
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning'
+      });
+    },
+    showConfirmDialog(msg, resolve) {
+      this.$alert(msg, '提示', {
+        confirmButtonText: '删除',
+        // cancelButtonText: '取消',
+        // cancelButtonClass: 'cancelBtn',
+        // confirmButtonClass: 'confirmC',
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {});
+    },
+    // 删除关联
+    showDelDialog(id) {
+      this.showConfirmDialog('是否删除该关联?', () => {
+        api
+          .deleteDrugRecord({ id: id })
+          .then(res => {
+            if (res.data.code == '0') {
+              if (!this.searched) {
+                //未点确认时清空搜索条件
+                this.clearFilter();
+              }
+              if (this.list.length == 1) {
+                //当前在最后一页且只有一条数据时,删除后跳到前一页
+                this.currentPage =
+                  this.currentPage === 1 ? 1 : this.currentPage - 1;
+              }
+              this.getDataList();
+              this.warning(res.data.msg || '操作成功', 'success');
+            } else {
+              this.warning(res.data.msg);
+            }
+          })
+          .catch(error => {
+            if (error.code === '900010001') {
+              return false;
+            }
+            this.warning(error);
+          });
+      });
+    },
+
+    // 导出数据
+    exportData() {
+      this.$alert('确定要导出全部麻醉关联数据吗?', '', {
+        confirmButtonText: '确定',
+        // cancelButtonText: '取消',
+        // cancelButtonClass: 'leftbtn',
+        // customClass: 'exportBox6',
+        title: '提示',
+        type: 'warning'
+        // beforeClose: (action, instance, done) => {
+        //   if (action === 'confirm') {
+        //     // instance.confirmButtonLoading = true;
+        //     instance.confirmButtonText = '导出中...';
+        //     api.exportDrugRecord().then(res => {
+        //       if (res.status === 200) {
+        //         setTimeout(() => {
+        //           utils.downloadExportedData(res.data, '麻醉关联数据.xls');
+        //           done();
+        //         }, 1500);
+        //       }
+        //     });
+        //   } else {
+        //     done();
+        //   }
+        // }
+      })
+        .then(() => {
+          api
+            .exportDrugRecord({
+              hospitalId: this.hospitalId,
+              type: 14,
+              isMatch: this.filter.match
+            })
+            .then(res => {
+              if (res.status === 200) {
+                this.$message({ message: '导出成功', type: 'success' });
+                utils.downloadExportedData(res.data, '麻醉关联数据.xls');
+              }
+            });
+        })
+        .catch(() => {
+          // this.$message({ message: '导出失败', type: 'waring' });
+        });
+    },
+
+    // 导入模板
+    exportModule() {
+      api.exportDrugModule({ type: 14 }).then(res => {
+        if (res.status === 200) {
+          setTimeout(() => {
+            utils.downloadExportedData(res.data, '麻醉导入模板.xls');
+          }, 1500);
+        }
+      });
+    },
+
+    // 点击导入
+    importPage() {
+      let inp = document.getElementById('upFile');
+      inp.click();
+    },
+    // 导入数据
+    uploadFile(e) {
+      let fileInfo = e.target.files[0];
+      let extend = fileInfo.name.substring(fileInfo.name.lastIndexOf('.') + 1);
+      if (extend != 'xls' && extend != 'xlsx') {
+        this.$message({ message: '请根据模板进行导入', type: 'error' });
+        return;
+      }
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      formData.append('hospitalId', this.hospitalId);
+      formData.append('type', 14);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      // this.uploadInfo = '导入中...';
+      // api.importExcelDataVerify(formData, header).then(res => {
+      //   if (res.data.code === '00020001') {
+      //     this.$confirm(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       cancelButtonText: '取消',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {
+      //         this.importDrugRecord(formData, header)
+      //       })
+      //       .catch(() => {
+      //         setTimeout(() => {
+      //           this.uploadInfo = '导入';
+      //         }, 300);
+      //       });
+      //   } else if (res.data.data === true) {
+      //     this.importDrugRecord(formData, header)
+      //   } else {
+      //     this.$alert(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       // cancelButtonText: '取消',
+      //       // cancelButtonClass: 'cancelSure',
+      //       // confirmButtonClass: 'sure',
+      //       // customClass: 'exportConfirm',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {})
+      //       .catch(() => {});
+
+      //     setTimeout(() => {
+      //       this.uploadInfo = '导入';
+      //     }, 300);
+      //   }
+      // });
+      this.importDrugRecord(formData, header);
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+    },
+    importDrugRecord(formData, header) {
+      let that = this;
+      api.importDrugRecord(formData, header).then(res => {
+        if (res.headers['content-disposition']) {
+          this.downloadUrl(res);
+          this.getDataList();
+        } else {
+          let r = new FileReader();
+          r.onload = function() {
+            console.log(this.result);
+            if (this.result) {
+              const code = JSON.parse(this.result);
+              if (code.code === '00020007') {
+                that
+                  .$alert(`${code.msg}`, '提示', {
+                    confirmButtonText: '确定',
+                    // cancelButtonText: '取消',
+                    // cancelButtonClass: 'cancelSure',
+                    // confirmButtonClass: 'sure',
+                    // customClass: 'exportConfirm',
+                    type: 'warning'
+                  })
+                  .then(() => {})
+                  .catch(() => {});
+              }
+            } else {
+              that.$alert(`导入成功`, '提示', {
+                confirmButtonText: '确定',
+                // cancelButtonText: '取消',
+                // cancelButtonClass: 'cancelSure',
+                // confirmButtonClass: 'sure',
+                // customClass: 'exportConfirm',
+                type: 'success'
+              });
+              that.getDataList();
+            }
+          };
+          r.readAsText(res.data);
+        }
+        // if ((res.data.code === '00020007')) {
+        //   this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
+        //     confirmButtonText: '确定',
+        //     // cancelButtonText: '取消',
+        //     // cancelButtonClass: 'cancelSure',
+        //     // confirmButtonClass: 'sure',
+        //     // customClass: 'exportConfirm',
+        //     type: 'warning'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+        //   this.getDataList(); // 重新获取列表
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // } else if (res.data.data === true && res.status === 200) {
+        //   this.$alert(`导入成功`, '提示', {
+        //     confirmButtonText: '确定',
+        //     // cancelButtonText: '取消',
+        //     // cancelButtonClass: 'cancelSure',
+        //     // confirmButtonClass: 'sure',
+        //     // customClass: 'exportConfirm',
+        //     type: 'success'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+        //   this.getDataList(); // 重新获取列表
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // } else {
+        //   this.$alert(`${res.data.msg}`, '提示', {
+        //     confirmButtonText: '确定',
+        //     // // cancelButtonText: '取消',
+        //     // cancelButtonClass: 'cancelSure',
+        //     // confirmButtonClass: 'sure',
+        //     // customClass: 'exportConfirm',
+        //     type: 'warning'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // }
+      });
+    },
+    downloadUrl(res) {
+      var disposition = res.headers['content-disposition'];
+      var fileName = decodeURI(
+        disposition.split('filename=')[1].split(';filename*=')[0]
+      );
+      let blob = new Blob([res.data], { type: 'application/.xls' }); //.xls是我和后台约定好的文件格式
+      let link = document.createElement('a');
+      link.href = window.URL.createObjectURL(blob);
+      link.download = fileName;
+      link.click();
+      link.remove();
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
+    }
+  }
+};
+</script>
+
+
+<style lang="less" scoped>
+@import '../../../less/admin.less';
+.delete {
+  color: red;
+}
+.delete:hover {
+  color: red;
+}
+.pagination {
+  min-width: 1010px;
+}
+.downTemplate {
+  margin-right: 8px;
+  span {
+    color: #02a7f0;
+  }
+}
+#upFile {
+  display: none !important;
+}
+#upFileMatch {
+  display: none;
+}
+.el-message-box {
+  /deep/.cancelBtn {
+    background-color: #d7d7d7;
+    border-color: transparent;
+  }
+  /deep/.confirmC {
+    background-color: #ff545b !important;
+    border-color: transparent !important;
+  }
+}
+.exportBox6 {
+  /deep/ .el-message-box__btns {
+    margin-top: 20px;
+  }
+  /deep/ .el-message-box__message {
+    // text-align: center;
+  }
+  /deep/.leftbtn {
+    background-color: #d7d7d7;
+    border-color: transparent !important;
+  }
+  /deep/ .el-message-box__header {
+    border-bottom: 1px solid #dcdfe6;
+  }
+}
+.searchBar {
+  min-width: 980px;
+  height: 120px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  background-color: #dee2ea;
+  z-index: 9999;
+  padding: 40px 20px 0;
+  .searchContent {
+    height: 80px;
+    flex: 1;
+    background-color: #fff;
+    .demo-form-inline {
+      display: flex;
+      justify-content: flex-end;
+    }
+  }
+}
+.contentsOther {
+  padding: 0 20px;
+}
+</style>

+ 22 - 20
src/components/common/HomePage.vue

@@ -89,9 +89,9 @@ export default {
   components: {
     "lt-badge": LtBadge,
     "lt-menu": LtMenu,
-    console: Console
+    console: Console,
   },
-  data: function () {
+  data: function() {
     return {
       menuWrappers: null,
       organization: null,
@@ -104,22 +104,22 @@ export default {
       versionInfo: "",
       isNewV: false,
       version: null, //版本信息接口返回的数据
-      onshow: true
+      onshow: true,
     };
   },
   computed: {
-    getRole: function () {
+    getRole: function() {
       return this.userLoginDTO && this.userLoginDTO.type == "0"
         ? "user"
         : "admin";
-    }
+    },
   },
   created() {
     //获取菜单
     this.getMenuList();
   },
   watch: {
-    $route: function (to, from) {
+    $route: function(to, from) {
       if (from.name == "login") {
         this.getMenuList();
       }
@@ -128,21 +128,23 @@ export default {
         this.menuWrappers = [];
         this.isNewV = false;
       }
-    }
+    },
   },
   mounted() {
-    let elSide = document.querySelector(".el-aside"),
-      tabWidth = document.querySelector(".collect-left");
-    tabWidth.style.left = elSide.offsetWidth - 36 + "px";
-    window.onresize = () => {
-      return (() => {
-        tabWidth.style.left = elSide.offsetWidth - 36 + "px";
-      })();
-    };
+    // let elSide = document.querySelector(".el-aside"),
+    //   tabWidth = document.querySelector(".collect-left");
+    // tabWidth.style.left = elSide.offsetWidth - 36 + "px";
+    // window.onresize = () => {
+    //   return (() => {
+    //     tabWidth.style.left = elSide.offsetWidth - 36 + "px";
+    //   })();
+    // };
   },
   methods: {
     collect() {
+      let tabWidth = document.querySelector(".collect-left");
       this.onshow = !this.onshow;
+      tabWidth.style.left = this.onshow ? 300 - 36 + "px" : 300 + "px";
     },
     getMenuList() {
       api
@@ -263,8 +265,8 @@ export default {
       localStorage.removeItem("token");
       localStorage.removeItem("menuPath");
       this.$router.push({ path: "/" });
-    }
-  }
+    },
+  },
 };
 </script>
 
@@ -282,7 +284,7 @@ export default {
   width: 36px;
   height: 32px;
   position: fixed;
-  // left: calc(20% - 36px);
+  left: 264px;
   top: 65%;
   z-index: 20;
 }
@@ -314,7 +316,7 @@ export default {
 .version {
   position: fixed;
   bottom: 0;
-  width: @aside-width;
+  width: 300px;
   min-width: 270px;
   font-size: 12px;
   /*text-indent: 50px;*/
@@ -372,4 +374,4 @@ export default {
 .el-button {
   margin-left: 15px;
 }
-</style>
+</style>

File diff suppressed because it is too large
+ 580 - 208
src/components/knowledgeExtra/AddNewRule.vue


+ 103 - 95
src/components/knowledgeExtra/AddNewRuleTable.vue

@@ -87,7 +87,7 @@
   .custom_table_header {
     vertical-align: middle;
     &::before {
-      content: '*';
+      content: "*";
       color: red;
       font-size: 12px;
       margin-right: 4px;
@@ -184,9 +184,10 @@
             <div class="btn_div" v-if="!isMax(scope.row.groupId)">
               <img @click="addChildGroup(scope)" src="../../images/add-new-rule-sub.png" alt />
             </div>
+            
             <div class="btn_div" v-if="klRuleByIdSub.length > 1 && !scope.row.disabled">
               <img
-                @click="$emit('delGroupChild', scope.row.groupChildId)"
+                @click="$emit('delGroupChild', scope.row.groupChildId,scope.$index,scope.row.groupId,scope.row.del,scope.row.key,scope.row.baseTermTypeList.length)"
                 src="../../images/add-new-rule-del.png"
                 alt
               />
@@ -228,9 +229,9 @@
               v-model="scope.row.subType"
               :disabled="scope.row.disabled"
               placeholder="请选择"
-              @change="subTypeChange($event, scope.$index)"
+              @change="subTypeChange($event, scope.$index,scope.row.groupId,scope.row.key)"
               @focus="
-                setTheRef($event, `klRuleByIdSub[${scope.$index}].subType`)
+                setTheRef($event, `klRuleByIdSub[${scope.$index}].subType`,'')
               "
               :ref="`klRuleByIdSub[${scope.$index}].subType`"
             >
@@ -259,9 +260,9 @@
               v-model="scope.row.subLenCode"
               placeholder="请选择"
               :ref="`klRuleByIdSub[${scope.$index}].subLenCode`"
-              @change="subCodeChange($event, scope.$index)"
+              @change="subCodeChange($event, scope.$index,scope.row.groupId,scope.row.key,scope.row.baseTermTypeList.length)"
               @focus="
-                setTheRef($event, `klRuleByIdSub[${scope.$index}].subLenCode`)
+                setTheRef($event, `klRuleByIdSub[${scope.$index}].subLenCode`,scope.row.subLenCode,true)
               "
             >
               <el-option
@@ -319,7 +320,7 @@
                 placeholder="选择类型"
                 @change="dataTypeChange($event, scope.$index)"
                 @focus="
-                  setTheRef($event, `klRuleByIdSub[${scope.$index}].dataType`)
+                  setTheRef($event, `klRuleByIdSub[${scope.$index}].dataType`,'')
                 "
                 :ref="`klRuleByIdSub[${scope.$index}].dataType`"
               >
@@ -357,7 +358,7 @@
                         setTheRef(
                           $event,
                           `klRuleByIdSub[${scope.$index}].subMaxOperator`
-                        )
+                        ),''
                       "
                       :ref="`klRuleByIdSub[${scope.$index}].subMaxOperator`"
                     >
@@ -433,7 +434,7 @@
                         setTheRef(
                           $event,
                           `klRuleByIdSub[${scope.$index}].subMinOperator`
-                        )
+                        ),''
                       "
                     >
                       <el-option
@@ -549,24 +550,19 @@
 </template>
 
 <script>
-import api from '@api/knowledgeLib.js';
-import { tableRules } from './rules';
+import api from "@api/knowledgeLib.js";
+import { tableRules } from "./rules";
 export default {
-  name: 'AddNewRuleTable',
+  name: "AddNewRuleTable",
   data() {
     return {
-      numTypes: '',
-      subConceptIdIndex: '',
-      operMaxList: [
-        { name: '<=', key: '<=' },
-        { name: '<', key: '<' }
-      ],
-      operMinList: [
-        { name: '>', key: '>' },
-        { name: '>=', key: '>=' }
-      ],
+      numTypes: "",
+      subConceptIdIndex: "",
+      operMaxList: [{ name: "<=", key: "<=" }, { name: "<", key: "<" }],
+      operMinList: [{ name: ">", key: ">" }, { name: ">=", key: ">=" }],
       rules: tableRules,
-      theRef: null
+      theRef: null,
+      code: "",
     };
   },
   methods: {
@@ -577,54 +573,54 @@ export default {
     },
     maxChange(e, val, type) {
       if (
-        type === 'i' &&
+        type === "i" &&
         this.klRuleByIdSub[val].subMaxOperator &&
-        this.klRuleByIdSub[val].subMaxOperator != ''
+        this.klRuleByIdSub[val].subMaxOperator != ""
       ) {
-        this.$emit('clearValidate', [
+        this.$emit("clearValidate", [
           `klRuleByIdSub[${val}].subMinValue`,
-          `klRuleByIdSub[${val}].subMinOperator`
+          `klRuleByIdSub[${val}].subMinOperator`,
         ]);
       } else if (
-        type === 's' &&
+        type === "s" &&
         this.klRuleByIdSub[val].subMaxValue &&
-        this.klRuleByIdSub[val].subMaxValue != ''
+        this.klRuleByIdSub[val].subMaxValue != ""
       ) {
-        this.$emit('clearValidate', [
+        this.$emit("clearValidate", [
           `klRuleByIdSub[${val}].subMinValue`,
-          `klRuleByIdSub[${val}].subMinOperator`
+          `klRuleByIdSub[${val}].subMinOperator`,
         ]);
       }
       this.setScrollRight();
     },
     minChange(e, val, type) {
       if (
-        type === 'i' &&
+        type === "i" &&
         this.klRuleByIdSub[val].subMinOperator &&
-        this.klRuleByIdSub[val].subMinOperator != ''
+        this.klRuleByIdSub[val].subMinOperator != ""
       ) {
-        this.$emit('clearValidate', [
+        this.$emit("clearValidate", [
           `klRuleByIdSub[${val}].subMaxOperator`,
-          `klRuleByIdSub[${val}].subMaxValue`
+          `klRuleByIdSub[${val}].subMaxValue`,
         ]);
       } else if (
-        type === 's' &&
+        type === "s" &&
         this.klRuleByIdSub[val].subMinValue &&
-        this.klRuleByIdSub[val].subMinValue != ''
+        this.klRuleByIdSub[val].subMinValue != ""
       ) {
-        this.$emit('clearValidate', [
+        this.$emit("clearValidate", [
           `klRuleByIdSub[${val}].subMaxOperator`,
-          `klRuleByIdSub[${val}].subMaxValue`
+          `klRuleByIdSub[${val}].subMaxValue`,
         ]);
       }
       this.setScrollRight();
     },
     addGroup(scope) {
-      this.$emit('addGroup', null, { groupId: scope.row.groupId });
+      this.$emit("addGroup", null,scope.row.key, { groupId: scope.row.groupId });
       this.$refs.table.bodyWrapper.scrollLeft = 0;
     },
     addChildGroup(scope) {
-      this.$emit('addGroup', scope.row.groupId, { index: scope.$index });
+      this.$emit("addGroup", scope.row.groupId,scope.row.key, { index: scope.$index });
       this.$refs.table.bodyWrapper.scrollLeft = 0;
     },
     scrollFun() {
@@ -641,16 +637,16 @@ export default {
     // },
     // cellStyle
     cellStyle({ row, column, rowIndex, columnIndex }) {
-      if (column.label == '组' || column.label == '基础规则') return {};
-      if (column.label == '附加信息') return { 'padding-top': '14px' };
-      return { 'vertical-align': 'top', 'padding-top': '14px' };
+      if (column.label == "组" || column.label == "基础规则") return {};
+      if (column.label == "附加信息") return { "padding-top": "14px" };
+      return { "vertical-align": "top", "padding-top": "14px" };
     },
     // 最大值 选择rule
     subMaxOperator(scope, rule, value, callback) {
       const { subMaxValue, subMinOperator, subMinValue } = scope.row;
       const val = value + subMinOperator + subMinValue + subMaxValue;
-      if (!val || (!value && subMaxValue !== '')) {
-        callback(new Error('最大值和最小值至少完整填写一个,单位不必填'));
+      if (!val || (!value && subMaxValue !== "")) {
+        callback(new Error("最大值和最小值至少完整填写一个,单位不必填"));
       } else {
         callback();
       }
@@ -660,10 +656,10 @@ export default {
       const { subMaxOperator, subMinOperator, subMinValue } = scope.row;
       const val = value + subMaxOperator + subMinValue + subMinOperator;
       const isNum = /^(\-|\+)?\d+(\.\d+)?$/.test(value);
-      if (!val || (value == '' && subMaxOperator)) {
-        callback(new Error('最大值和最小值至少完整填写一个,单位不必填'));
-      } else if (value !== '' && !isNum) {
-        callback(new Error('只能输入数字'));
+      if (!val || (value == "" && subMaxOperator)) {
+        callback(new Error("最大值和最小值至少完整填写一个,单位不必填"));
+      } else if (value !== "" && !isNum) {
+        callback(new Error("只能输入数字"));
       } else {
         callback();
       }
@@ -672,8 +668,8 @@ export default {
     subMinOperatorRule(scope, rule, value, callback) {
       const { subMaxValue, subMaxOperator, subMinValue } = scope.row;
       const val = value + subMaxOperator + subMinValue + subMaxValue;
-      if (!val || (!value && subMinValue !== '')) {
-        callback(new Error('最大值和最小值至少完整填写一个,单位不必填'));
+      if (!val || (!value && subMinValue !== "")) {
+        callback(new Error("最大值和最小值至少完整填写一个,单位不必填"));
       } else {
         callback();
       }
@@ -683,84 +679,97 @@ export default {
       const { subMaxValue, subMinOperator, subMaxOperator } = scope.row;
       const val = value + subMaxOperator + subMaxValue + subMinOperator;
       const isNum = /^(\-|\+)?\d+(\.\d+)?$/.test(value);
-      if (!val || (value == '' && subMinOperator)) {
-        callback(new Error('最大值和最小值至少完整填写一个,单位不必填'));
-      } else if (value !== '' && !isNum) {
-        callback(new Error('只能输入数字'));
+      if (!val || (value == "" && subMinOperator)) {
+        callback(new Error("最大值和最小值至少完整填写一个,单位不必填"));
+      } else if (value !== "" && !isNum) {
+        callback(new Error("只能输入数字"));
       } else {
         callback();
       }
     },
     // 医学内容rule
     subEqValue(scope, rule, value, callback) {
-      if (value === '') {
-        callback(new Error('请输入' + this.textName(scope.$index)));
+      if (value === "") {
+        callback(new Error("请输入" + this.textName(scope.$index)));
       } else if (value.length > 200) {
-        callback(new Error(this.textName(scope.$index) + '不能超过200字'));
+        callback(new Error(this.textName(scope.$index) + "不能超过200字"));
       } else {
         callback();
       }
     },
     // 判断是否为最后一条规则
     isLastDate(id) {
-      const tableLength = this.klRuleByIdSub.filter(item => item.groupId !== id)
-        .length;
+      const tableLength = this.klRuleByIdSub.filter(
+        (item) => item.groupId !== id
+      ).length;
       return tableLength === 0;
     },
     // 是否超出最大规则数
     isMax(id) {
-      const typeNum = this.klRuleByIdSub.filter(item => item.groupId === id)
+      const typeNum = this.klRuleByIdSub.filter((item) => item.groupId === id)
         .length;
       return typeNum >= this.maxNum;
     },
     // 基础规则类型选择
-    subTypeChange(e, index) {
-      this.$emit('subTypeChange', e, index);
+    subTypeChange(e, index, groupId, key) {
+      this.$emit("subTypeChange", e, index, groupId, key);
     },
     //
-    setTheRef(e, val) {
+    setTheRef(e, val, code, type) {
       this.theRef = val;
+      if (type) {
+        this.code = code ? code : "";
+      }
     },
     // 规则术语类型
-    subCodeChange(val, index) {
+    subCodeChange(val, index, groupId, key,lens) {
       //基础规则术语类型修改
-      this.$emit('childSubCodeChange', val, index, this.numTypes);
+      this.$emit(
+        "childSubCodeChange",
+        val,
+        index,
+        this.numTypes,
+        groupId,
+        key,
+        this.code,
+        lens
+      );
     },
     clearConcept(index) {
-      this.$emit('childClearConcept', index);
+      this.$emit("childClearConcept", index);
     },
     clearNumText(index) {
-      this.$emit('childClearNumText', index);
+      this.$emit("childClearNumText", index);
     },
     //医学标准术语change
     subConceptIdfocus(index) {
-      this.subConceptIdIndex = '';
+      this.subConceptIdIndex = "";
       this.subConceptIdIndex = index;
-      this.setTheRef(1, `klRuleByIdSub[${index}].subConceptId`);
+      this.setTheRef(1, `klRuleByIdSub[${index}].subConceptId`, "");
     },
     // 医学标准术语
     searchConcept(val) {
       const param = {
         excludedConceptIds: [
-          this.klRuleByIdSub[this.subConceptIdIndex].subType
+          this.klRuleByIdSub[this.subConceptIdIndex].subType,
         ],
         libType: this.klRuleByIdSub[this.subConceptIdIndex].subLenCode,
         name: val,
       };
       api
         .searchConcept(param)
-        .then(res => {
-          if (res.data.code == '0') {
+        .then((res) => {
+          if (res.data.code == "0") {
             const data = res.data.data;
-            this.$emit('setFormData', this.subConceptIdIndex, data);
+            this.$emit("setFormData", this.subConceptIdIndex, data);
           }
         })
-        .catch(error => {
+        .catch((error) => {
           console.log(error);
         });
     },
     dataTypeChange(val, index) {
-      this.$emit('ChildDataTypeChange', val, index);
+      this.$emit("ChildDataTypeChange", val, index);
     },
     // 处理要合并相同行的列
     getSpanArr(data) {
@@ -793,13 +802,13 @@ export default {
     },
     // 合并单元格
     ObjectSpanMethod({ row, column, rowIndex, columnIndex }) {
-      if (this.ruleTermCodeStr == '3-108-1') {
+      if (this.ruleTermCodeStr == "3-108-1") {
         if (columnIndex == 0) {
           const _row = this.spanArr[rowIndex];
           const _col = _row > 0 ? 1 : 0;
           return {
             rowspan: _row,
-            colspan: _col
+            colspan: _col,
           };
         }
       } else {
@@ -808,23 +817,23 @@ export default {
           const _col = _row > 0 ? 1 : 0;
           return {
             rowspan: _row,
-            colspan: _col
+            colspan: _col,
           };
         }
       }
     },
     showDataType(index) {
       return (
-        (this.numTypes + ',').indexOf(
-          this.klRuleByIdSub[index].subLenCode + ','
+        (this.numTypes + ",").indexOf(
+          this.klRuleByIdSub[index].subLenCode + ","
         ) === -1
       );
     },
     textName(index) {
       return this.klRuleByIdSub[index].subType !== 6 &&
-        this.klRuleByIdSub[index].dataType == '2'
-        ? '医学内容'
-        : '正则表达式';
+        this.klRuleByIdSub[index].dataType == "2"
+        ? "医学内容"
+        : "正则表达式";
     },
     blurRef() {
       if (this.theRef) {
@@ -833,7 +842,7 @@ export default {
         // document.getElementById(this.theRef).focus()
         // document.getElementById(this.theRef).value = 123
       }
-    }
+    },
   },
   components: {},
   mounted() {
@@ -847,7 +856,7 @@ export default {
     // );
   },
   created() {
-    this.numTypes = localStorage.getItem('zskNumDict');
+    this.numTypes = localStorage.getItem("zskNumDict");
     this.getSpanArr(this.klRuleByIdSub);
   },
   beforeUpdate() {
@@ -875,21 +884,20 @@ export default {
   props: {
     klRuleByIdSub: {
       type: Array,
-      required: true
+      required: true,
     },
     maxNum: {
-      default: null
+      default: null,
     },
     showMsg: {
-      default: null
+      default: null,
     },
-    showMsg2:{
-      default: null
+    showMsg2: {
+      default: null,
     },
     ruleTermCodeStr: {
-      default: null
+      default: null,
     },
-  }
+  },
 };
 </script>
-

+ 1 - 0
src/components/knowledgeExtra/RuleManager.vue

@@ -202,6 +202,7 @@ export default {
             );
             localStorage.setItem('zskNumDict', data['22'][0].val);
             localStorage.setItem('zskSubDict', (data['23'].map(it => it.val) || []).join(','));
+            localStorage.setItem('zskDragDict', (data['27'].map(it => it.val) || []).join(','));
             localStorage.setItem('zskDelDict', data['26'][0].val);
           }
         })

+ 1 - 2
src/less/common.less

@@ -38,8 +38,7 @@
 
 .el-aside {
   background: #fff;
-  min-width: @aside-min-width;
-  width: @aside-width !important;
+  width: 300px;
   min-height: 220px;
   border-right: 1px @gray solid;
   height: 100%;

+ 8 - 0
src/routes.js

@@ -159,6 +159,8 @@ import Pacs from '@components/cdssManage/pacs/Pacs.vue'; //检查关联维护
 import AddPacs from '@components/cdssManage/pacs/AddPacs.vue'; //检查关联维护--添加关联
 import DrugManage from '@components/cdssManage/drug/DrugManage.vue'; //药品关联维护
 import AddDrug from '@components/cdssManage/drug/AddDrug.vue'; //药品关联维护--添加关联
+import Hemp from '@components/cdssManage/hemp/Hemp.vue'; //麻醉关联维护
+import AddHemp from '@components/cdssManage/hemp/AddHemp.vue'; //麻醉关联维护--添加关联
 import ScaleManage from '@components/cdssManage/scale/ScaleManage.vue'; //量表关联维护
 import AddScale from '@components/cdssManage/scale/AddScale.vue'; //量表关联维护--添加关联
 import Operation from '@components/cdssManage/operation/Operation.vue'; //手术/操作关联维护
@@ -169,6 +171,8 @@ import DeptManage from '@components/cdssManage/dept/DeptManage.vue'; //科室关
 import AddDept from '@components/cdssManage/dept/AddDept.vue'; //科室关联维护--添加关联
 import Nursing from '@components/cdssManage/nursing/nursing.vue';  //护理关联维护
 import AddNursing from '@components/cdssManage/nursing/Addnursing.vue';  //护理关联维护--添加关联
+import Drugroute from '@components/cdssManage/drugroute/Drugroute.vue';  //给药途径关联维护
+import AddDrugroute from '@components/cdssManage/drugroute/AddDrugroute.vue';  //给药途径关联维护--添加关联
 import Tcmdisease from '@components/cdssManage/tcmdisease/tcmdisease.vue';  //中医疾病关联维护
 import AddTcmdisease from '@components/cdssManage/tcmdisease/Addtcmdisease.vue';  //中医疾病关联维护--添加关联
 import Tcmdrome from '@components/cdssManage/tcmdrome/tcmdrome.vue';  //中医疾病关联维护
@@ -502,6 +506,8 @@ export default [
             { path: 'LT-JCGLWH-TJHYDXXYGBXDY', component: AddPacs, name: 'AddPacs' }, //检查关联维护--添加关联
             { path: 'YXSYK-YPGLWH', component: DrugManage, name: 'DrugManage' }, //药品关联维护
             { path: 'LT-YPGLWH-TJHYDXXYGBXDY', component: AddDrug, name: 'AddDrug' }, //药品关联维护--添加关联
+            { path: 'YXSYK-HEMP', component: Hemp, name: 'Hemp' }, //麻醉关联维护
+            { path: 'LT-HEMP-TJHYDXXYGBXDY', component: AddHemp, name: 'AddHemp' }, //麻醉关联维护--添加关联
             { path: 'YXSYK-LBGLWH', component: ScaleManage, name: 'ScaleManage' }, //量表关联维护
             { path: 'LT-LBGLWH-TJHYDXXYGBXDY', component: AddScale, name: 'AddScale' }, //量表关联维护--添加关联
             { path: 'YXSYK-SSCZGLWH', component: Operation, name: 'Operation' }, //手术/操作关联维护
@@ -512,6 +518,8 @@ export default [
             { path: 'LT-KSGLWH-TJHYDXXYGBXDY', component: AddDept, name: 'AddDept' }, //科室关联维护--添加关联
             { path: 'YXSYK-HLGLWH', component: Nursing, name: 'Nursing' }, //护理关联维护
             { path: 'LT-HLGLWH-TJHYDXXYGBXDY', component: AddNursing, name: 'AddNursing' }, //护理关联维护--添加关联
+			{ path: 'YXSYK-GYTJGLWH', component: Drugroute, name: 'Drugroute' }, //给药途径关联维护
+			{ path: 'LT-GYTJGLWH-TJHYDXXYGBXDY', component: AddDrugroute, name: 'AddDrugroute' }, //给药途径关联维护--添加关联
             { path: 'YXSYK-ZYJBGLWH', component: Tcmdisease, name: 'Tcmdisease' }, //中医疾病关联维护
             { path: 'LT-ZYJBGLWH-TJHYDXXYGBXDY', component: AddTcmdisease, name: 'AddTcmdisease' }, //中医疾病关联维护
             { path: 'YXSYK-ZYZHGLWH', component: Tcmdrome, name: 'Tcmdrome' }, //中医疾病关联维护

+ 2 - 2
vue.config.js

@@ -1,6 +1,6 @@
 const path = require('path');
-const proxy_path = 'http://192.168.2.241:88';
-// const proxy_path = 'http://192.168.2.236:5050';
+// const proxy_path = 'http://192.168.2.241:88';
+const proxy_path = 'http://192.168.2.236: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.113:5050'; //王峰