wyq 4 سال پیش
والد
کامیت
aecaa0ae39
33فایلهای تغییر یافته به همراه4135 افزوده شده و 1469 حذف شده
  1. 1 0
      .gitignore
  2. 1 13
      src/api/cdss.js
  3. 18 14
      src/api/config.js
  4. 1 1
      src/api/index.js
  5. 14 1
      src/api/knowledgeTree.js
  6. 6 46
      src/components/base/LtModal.vue
  7. 21 63
      src/components/cdssManage/dept/DeptManage.vue
  8. 14 66
      src/components/cdssManage/disease/Disease.vue
  9. 21 74
      src/components/cdssManage/drug/DrugManage.vue
  10. 21 74
      src/components/cdssManage/fusion/Fusion.vue
  11. 21 74
      src/components/cdssManage/lis/Lis.vue
  12. 21 68
      src/components/cdssManage/nursing/nursing.vue
  13. 21 74
      src/components/cdssManage/operation/Operation.vue
  14. 21 74
      src/components/cdssManage/pacs/Pacs.vue
  15. 4 5
      src/components/cdssManage/plan/AddPlan.vue
  16. 21 74
      src/components/cdssManage/scale/ScaleManage.vue
  17. 23 76
      src/components/cdssManage/tcmdisease/tcmdisease.vue
  18. 22 76
      src/components/cdssManage/tcmdrome/tcmdrome.vue
  19. 97 61
      src/components/common/HomePage.vue
  20. 290 0
      src/components/knowledgeExtra/AddAssess/ScoreResultsTable.vue
  21. 1345 0
      src/components/knowledgeExtra/AddAssess/index.vue
  22. 53 0
      src/components/knowledgeExtra/AddAssess/rules.js
  23. 748 0
      src/components/knowledgeExtra/AddAssess/scale-table.vue
  24. 35 0
      src/components/knowledgeExtra/AddAssess/util.js
  25. 592 187
      src/components/knowledgeExtra/AddDevKnow.vue
  26. 292 85
      src/components/knowledgeExtra/AddDiagBase.vue
  27. 237 65
      src/components/knowledgeExtra/DevInfo.vue
  28. 167 196
      src/components/login/Login.vue
  29. BIN
      src/images/msg_close.png
  30. BIN
      src/images/tab_add.png
  31. BIN
      src/images/tab_close.png
  32. 2 2
      vue.config.js
  33. 5 0
      yarn.lock

+ 1 - 0
.gitignore

@@ -1,6 +1,7 @@
 .DS_Store
 node_modules
 /dist
+vue.config.js
 
 # local env files
 .env.local

+ 1 - 13
src/api/cdss.js

@@ -3,7 +3,7 @@ import config from '@api/config.js';
 const urls = config.urls;
 function request(config) {
   const instance = axios.create({
-    baseURL: "http://192.168.2.121:7010",
+    //baseURL: "http://192.168.2.121:7010",
     timeout: 500000,
     headers: {
       'Content-Type': "application/json;charset=utf-8"
@@ -714,16 +714,4 @@ export default {
   updateRunningStatus(param) {
     return axios.post(urls.updateRunningStatus, param);
   },
-
-
-
-  getRelatedMapping(param) {
-    //查询已映射关系
-    return axios.post(urls.getRelatedMapping, param);
-  },
-  getTermMatching(param) {
-    //推荐匹配
-    return axios.post(urls.getTermMatching, param);
-  },
-  
 };

+ 18 - 14
src/api/config.js

@@ -3,8 +3,9 @@ const testUrl = ''
 
 export default {
   host: 'http://192.168.2.121:5050',
+   //imgHost: 'http://192.168.2.236:82',      //富文本编辑器图片回传地址
   // imgHost: 'http://192.168.2.121:82',      //富文本编辑器图片回传地址
-  imgHost: 'http://192.168.2.241:82',      //富文本编辑器图片回传地址
+  imgHost:'http://192.168.2.121:82',      //富文本编辑器图片回传地址
   delayTime: 500,
   urls: {
     /* 登录注册相关接口 */
@@ -394,6 +395,7 @@ export default {
     'exportPacsModuleCDSS': '/api/cdssman/tran/mappingConfig/exportExcelModule',
     'precPacsDataMatch': '/api/cdssman/tran/mappingConfig/precDataMatch',
     'dataPacsVerify': '/api/cdssman/tran/mappingConfig/dataVerify',
+    
 
     'getDrugPageCDSS': '/api/cdssman/tran/mappingConfig/getPage',   //药品列表
     'drugIsExistRecordCDSS': '/api/cdssman/tran/mappingConfig/isExistRecord',   //药品-映射关系是否已存在
@@ -531,11 +533,11 @@ export default {
     'getKlmEnumsDataCDSS': '/api/cdssman/getKlmEnumsData',   //枚举数据获取
 
 
-    'getCaseResultList': '/api/cdssman/test/rule/getCaseResultList',
-    'billRuleTest': '/api/cdssman/test/rule/billRuleTest',
-    'getResultBillPage': '/api/cdssman/test/rule/getResultBillPage',
-    'exportRuleExcel': '/api/cdssman/test/rule/exportExcel',
-    'ruleAllTest': '/api/cdssman/test/rule/ruleTest',
+    'getCaseResultList': '/api/cdssman/test/rule/getCaseResultList', 
+    'billRuleTest': '/api/cdssman/test/rule/billRuleTest',   
+    'getResultBillPage': '/api/cdssman/test/rule/getResultBillPage', 
+    'exportRuleExcel': '/api/cdssman/test/rule/exportExcel', 
+    'ruleAllTest': '/api/cdssman/test/rule/ruleTest', 
     'getResultCriticalPage': '/api/cdssman/test/rule/getResultCriticalPage',   //危急值测试列表
     'criticalRuleTest': '/api/cdssman/test/rule/criticalRuleTest',   //危急值规则测试
     'getResultHighriskDrugPage': '/api/cdssman/test/rule/getResultHighriskDrugPage',   //高危药品测试列表
@@ -545,7 +547,7 @@ export default {
     'getResultOtherPacsPage': '/api/cdssman/test/rule/getResultOtherPacsPage',   //其他值提醒(辅检)测试列表
     'getResultOtherTransfusionPage': '/api/cdssman/test/rule/getResultOtherTransfusionPage',   //其他值提醒(输血)测试列表
     'otherRuleTest': '/api/cdssman/test/rule/otherRuleTest',   //其他值提醒规则测试
-
+    
     'billExportExcel': '/api/cdssman/test/rule/billExportExcel',   //开单合理性规则测试结果导出
     'criticalExportExcel': '/api/cdssman/test/rule/criticalExportExcel',   //危急值规则测试结果导出
     'highriskDrugExportExcel': '/api/cdssman/test/rule/highriskDrugExportExcel',   //高危药品规则测试结果导出
@@ -606,19 +608,21 @@ export default {
     'saveBaseOrUpdateRecord': '/api/cdssman/kl/conceptInfo/saveOrUpdateRecord',
     'staticKnowledgeBaseInfo': '/api/cdssman/kl/conceptInfo/staticKnowledgeIndexWithoutInfo',
     //规则测试相关
-    'allRuleTest': '/api/cdssman/test/rule/allRuleTest',
-    'autoGetCaseResultList': '/api/cdssman/test/rule/getCaseResultList',
-    'getDroplistData': '/api/cdssman/test/rule/getDroplistData',
-    'getResultRulePage': '/api/cdssman/test/rule/getResultRulePage',
-    'ruleExportExcel': '/api/cdssman/test/rule/ruleExportExcel',
-    'autoRuleTest': '/api/cdssman/test/rule/ruleTest',
-    'clearDrug': '/api/cdssman/cache/clearDrug',
+    'allRuleTest':'/api/cdssman/test/rule/allRuleTest',
+    'autoGetCaseResultList':'/api/cdssman/test/rule/getCaseResultList',
+    'getDroplistData':'/api/cdssman/test/rule/getDroplistData',
+    'getResultRulePage':'/api/cdssman/test/rule/getResultRulePage',
+    'ruleExportExcel':'/api/cdssman/test/rule/ruleExportExcel',
+    'autoRuleTest':'/api/cdssman/test/rule/ruleTest',
+    'clearDrug':'/api/cdssman/cache/clearDrug',
     //药品维护
     'getPageList': '/api/cdssman/klDrugRegister/getPage',
     'getsearchDrug': '/api/cdssman/klDrugRegister/searchDrug',
     'saveOrUpdate': '/api/cdssman/klDrugRegister/saveOrUpdate',
     'getByParam': '/api/cdssman/klDrugRegister/getByParam',
     'paramDelete': '/api/cdssman/klDrugRegister/delete',
+    'klRegulation': '/api/cdssman/klRegulation/index'
+
   },
   menuIconList: { //菜单对应图标
     'YH-KZT': 'el-icon-menu',

+ 1 - 1
src/api/index.js

@@ -3,7 +3,7 @@ import config from './config.js';
 
 axios.default.timeout = 500000;
 axios.defaults.headers.post['Content-Type'] = "application/json;charset=utf-8";
-//  axios.defaults.baseURL = 'http://192.168.2.236:5050';
+ //axios.defaults.baseURL = 'http://192.168.2.236:5050';
 // axios.defaults.baseURL = 'http://192.168.2.241';
 // axios.defaults.baseURL = 'http://192.168.3.117:5050';
 

+ 14 - 1
src/api/knowledgeTree.js

@@ -146,7 +146,20 @@ export default {
       responseType: 'blob'//必须添加,否则会乱码
     })
   },
+  // /klRegulation/index
+  searchRuleCode(param) {
+    return axios.post(urls.klRegulation, param);
+  },
   getRunningState(param) {
     return axios.post(urls.getRunningState, param);
   },
-};
+  uploadFile(param) {
+    return axios({
+      url: urls.promptServer,
+      method: 'post',
+      contentType: "multipart/form-data",
+      data: param,
+    })
+  }
+};
+

+ 6 - 46
src/components/base/LtModal.vue

@@ -1,3 +1,4 @@
+<!----通用弹窗组件---->
 <template>
   <div class="modal-container">
     <div class="cover"></div>
@@ -33,9 +34,6 @@
                   <el-form-item :label="meal+'预览:'">
                     <span class="previewInfo" style="minWidth: 240px">{{form.hisName}}</span>
                   </el-form-item>
-                  <el-form-item label="科室编码:" prop="hisCode" v-if="type==7">
-                    <el-input v-model.trim="form.hisCode" clearable style="minWidth: 240px"></el-input>
-                  </el-form-item>
                 </el-col>
                 <el-col :span="16" v-if="type == 1">
                   <el-form-item :label="detail+':'" prop="hisDetailName">
@@ -97,7 +95,7 @@
                       <el-table-column prop="name" :show-overflow-tooltip="true" label="词名"></el-table-column>
                       <el-table-column prop="address" :show-overflow-tooltip="true" label="来源">
                         <template slot-scope="scope">
-                          <p>{{scope.row.source == 1?'标准词匹配':scope.row.source == 2?'同义词匹配':scope.row.source == 5?'相似词匹配':''}}</p>
+                          <span>{{scope.row.source == 1?'标准词匹配':scope.row.source == 2?'同义词匹配':scope.row.source == 5?'相似词匹配':''}}</span>
                         </template>
                       </el-table-column>
                     </el-table>
@@ -415,50 +413,13 @@ export default {
         } 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'
-      });
-    },
-    closeModal() {
-      this.$emit('func', 'close');
     }
-  }
-};
 </script>
 <style lang="less" scoped>
-.modal-container {
-  position: fixed;
-  top: 0;
-  left: 0;
-  width: 100%;
-  height: 100%;
-  z-index: 21;
-  .cover {
-    background: #000;
-    opacity: 0.2;
+.modal-container{
+    position: fixed;
+    top:0;
+    left: 0;
     width: 100%;
     height: 100%;
   }
@@ -693,6 +654,5 @@ export default {
     span {
       color: #606266;
     }
-  }
 }
 </style>

+ 21 - 63
src/components/cdssManage/dept/DeptManage.vue

@@ -71,15 +71,6 @@
         ></el-pagination>
       </div>
     </div>
-    <LtModal
-      v-if="modalVisiable"
-      @func="getMsgFormSon"
-      :meal="'科室名称'"
-      :standard="'科室名称'"
-      :type="7"
-      :hospitalId="hospitalId"
-      :data="data"
-    ></LtModal>
   </div>
 </template>
 
@@ -87,7 +78,7 @@
 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: 'DeptManage',
   data: function() {
@@ -96,15 +87,8 @@ export default {
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '', //标准诊断名称
-        match: ''
+        uniqueName: '' //标准诊断名称
       },
-      matchList: [
-        { id: '', name: '全部' },
-        { id: 1, name: '已匹配' },
-        { id: 0, name: '未匹配' },
-        { id: 2, name: '多项匹配' }
-      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -116,14 +100,9 @@ export default {
       uploadInfo: '导入',
       title: '科室关联维护 | ',
       hospitaiName: '',
-      hospitalId: '',
-      modalVisiable: false,
-      data: {}
+      hospitalId: ''
     };
   },
-  components: {
-    LtModal
-  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -165,7 +144,6 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
-      formData.append('type', 7);
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -251,9 +229,7 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
-        hospitalId: data && data.hospitalId,
-        type: 7,
-        isMatch: this.filter.match
+        hospitalId: data && data.hospitalId
       };
       return param;
     },
@@ -270,16 +246,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      // this.$router.push({
-      //   name: 'AddDept',
-      //   params: Object.assign(pam, {
-      //     isEdit: false,
-      //     data: { hospitalId: this.hospitalId },
-      //     hospitaiName: this.hospitaiName
-      //   })
-      // });
-      this.data = {};
-      this.showModal();
+      this.$router.push({
+        name: 'AddDept',
+        params: Object.assign(pam, {
+          isEdit: false,
+          data: { hospitalId: this.hospitalId },
+          hospitaiName: this.hospitaiName
+        })
+      });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -291,16 +265,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      // this.$router.push({
-      //   name: 'AddDept',
-      //   params: Object.assign(pam, {
-      //     isEdit: true,
-      //     data: { ...item, hospitalId: this.hospitalId },
-      //     hospitaiName: this.hospitaiName
-      //   })
-      // });
-      this.data = item;
-      this.showModal();
+      this.$router.push({
+        name: 'AddDept',
+        params: Object.assign(pam, {
+          isEdit: true,
+          data: { ...item, hospitalId: this.hospitalId },
+          hospitaiName: this.hospitaiName
+        })
+      });
     },
     currentChange(next) {
       this.currentPage = next;
@@ -418,7 +390,7 @@ export default {
 
     // 导入模板
     exportModule() {
-      api.exportDeptModule({type:7}).then(res => {
+      api.exportDeptModule().then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '科室导入模板.xls');
@@ -440,8 +412,6 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
-      formData.append('type', 7);
-      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -487,18 +457,6 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
-    },
-    /********新增编辑弹窗**********/
-    showModal() {
-      this.modalVisiable = true;
-    },
-    getMsgFormSon(data) {
-      if (data == 'close') {
-        this.modalVisiable = false;
-      } else {
-        this.modalVisiable = false;
-        this.getDataList();
-      }
     }
   }
 };

+ 14 - 66
src/components/cdssManage/disease/Disease.vue

@@ -15,16 +15,6 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <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>
@@ -43,7 +33,7 @@
         <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="code" label="ICD-10编码" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="icdCode" label="ICD-10编码" 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">
@@ -71,15 +61,6 @@
         ></el-pagination>
       </div>
     </div>
-    <LtModal
-      v-if="modalVisiable"
-      @func="getMsgFormSon"
-      :meal="'诊断名称'"
-      :standard="'诊断名称'"
-      :type="4"
-      :hospitalId="hospitalId"
-      :data="data"
-    ></LtModal>
   </div>
 </template>
 
@@ -87,23 +68,16 @@
 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: 'Disease', //化验大小项和公表维护
   data: function() {
     return {
-      matchList: [
-        { id: '', name: '全部' },
-        { id: 1, name: '已匹配' },
-        { id: 0, name: '未匹配' },
-        { id: 2, name: '多项匹配' }
-      ],
       list: [],
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '',//标准诊断名称
-        match: ''
+        uniqueName: '' //标准诊断名称
       },
       currentPage: 1,
       pageSize: config.pageSize,
@@ -113,16 +87,9 @@ export default {
       uploadInfo: '导入',
       title: '诊断关联维护 | ',
       hospitaiName: '',
-      hospitalId: '',
-      isEdit: false,
-      editId: '',
-      modalVisiable: false,
-      data: {}
+      hospitalId: ''
     };
   },
-  components: {
-    LtModal
-  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -164,7 +131,6 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
-      formData.append('type', 4);
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -249,9 +215,7 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         icdCode: '',
-        hospitalId: data && data.hospitalId,
-        type: 4,
-        isMatch:this.filter.match
+        hospitalId: data && data.hospitalId
       };
       return param;
     },
@@ -268,16 +232,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-        this.data={}
-      this.showModal();
-      /*this.$router.push({
+      this.$router.push({
         name: 'AddDisease',
         params: Object.assign(pam, {
           isEdit: false,
           data: { hospitalId: this.hospitalId },
           hospitaiName: this.hospitaiName
         })
-      });*/
+      });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -289,16 +251,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      /*this.$router.push({
+      this.$router.push({
         name: 'AddDisease',
         params: Object.assign(pam, {
           isEdit: true,
           data: { ...item, hospitalId: this.hospitalId },
           hospitaiName: this.hospitaiName
         })
-      });*/
-      this.data = item;
-      this.showModal();
+      });
     },
     currentChange(next) {
       this.currentPage = next;
@@ -400,7 +360,7 @@ export default {
 
     // 导入模板
     exportModule() {
-      api.exportDiseaseModule({type:4}).then(res => {
+      api.exportDiseaseModule().then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '诊断导入模板.xls');
@@ -421,8 +381,6 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
-      formData.append('type', 4);
-      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -480,26 +438,16 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
-    },
-    /********新增编辑弹窗**********/
-    showModal() {
-      this.modalVisiable = true;
-    },
-    getMsgFormSon(data) {
-      if (data == 'close') {
-        this.modalVisiable = false;
-      } else {
-        this.modalVisiable = false;
-        this.getDataList();
-      }
-    },
+    }
   }
 };
 </script>
 
-<style lang="less" scoped>
+<style lang="less">
 @import '../../../less/admin.less';
+</style>
 
+<style lang="less" scoped>
 .delete {
   color: red;
 }

+ 21 - 74
src/components/cdssManage/drug/DrugManage.vue

@@ -15,16 +15,6 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <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>
@@ -71,16 +61,6 @@
         ></el-pagination>
       </div>
     </div>
-
-    <LtModal
-      v-if="modalVisiable"
-      @func="getMsgFormSon"
-      :meal="'药品名称'"
-      :standard="'药品名称'"
-      :type="5"
-      :hospitalId="hospitalId"
-      :data="data"
-    ></LtModal>
   </div>
 </template>
 
@@ -88,23 +68,16 @@
 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: 'DrugManage', //化验大小项和公表维护
   data: function() {
     return {
-      matchList: [
-        { id: '', name: '全部' },
-        { id: 1, name: '已匹配' },
-        { id: 0, name: '未匹配' },
-        { id: 2, name: '多项匹配' }
-      ],
       list: [],
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '', //标准诊断名称
-        match:''
+        uniqueName: '' //标准诊断名称
       },
       currentPage: 1,
       pageSize: config.pageSize,
@@ -114,14 +87,9 @@ export default {
       uploadInfo: '导入',
       title: '药品关联维护 | ',
       hospitaiName: '',
-      hospitalId: '',
-      modalVisiable: false,
-      data: {}
+      hospitalId: ''
     };
   },
-  components:{
-    LtModal
-  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -163,7 +131,6 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
-      formData.append('type', 5);
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -249,9 +216,7 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
-        hospitalId: data && data.hospitalId,
-        type: 5,
-        isMatch:this.filter.match
+        hospitalId: data && data.hospitalId
       };
       return param;
     },
@@ -268,16 +233,14 @@ export default {
             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()
+      this.$router.push({
+        name: 'AddDrug',
+        params: Object.assign(pam, {
+          isEdit: false,
+          data: { hospitalId: this.hospitalId },
+          hospitaiName: this.hospitaiName
+        })
+      });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -289,16 +252,14 @@ export default {
             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()
+      this.$router.push({
+        name: 'AddDrug',
+        params: Object.assign(pam, {
+          isEdit: true,
+          data: { ...item, hospitalId: this.hospitalId },
+          hospitaiName: this.hospitaiName
+        })
+      });
     },
     currentChange(next) {
       this.currentPage = next;
@@ -415,7 +376,7 @@ export default {
 
     // 导入模板
     exportModule() {
-      api.exportDrugModule({type:5}).then(res => {
+      api.exportDrugModule().then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '药品导入模板.xls');
@@ -436,8 +397,6 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
-      formData.append('type', 5);
-      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -496,18 +455,6 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
-    },
-    /********新增编辑弹窗**********/
-    showModal() {
-      this.modalVisiable = true;
-    },
-    getMsgFormSon(data) {
-      if (data == 'close') {
-        this.modalVisiable = false;
-      } else {
-        this.modalVisiable = false;
-        this.getDataList();
-      }
     }
   }
 };

+ 21 - 74
src/components/cdssManage/fusion/Fusion.vue

@@ -15,16 +15,6 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <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>
@@ -70,16 +60,6 @@
         ></el-pagination>
       </div>
     </div>
-
-    <LtModal
-      v-if="modalVisiable"
-      @func="getMsgFormSon"
-      :meal="'输血类型'"
-      :standard="'输血类型'"
-      :type="8"
-      :hospitalId="hospitalId"
-      :data="data"
-    ></LtModal>
   </div>
 </template>
 
@@ -87,7 +67,7 @@
 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: 'Fusion', //化验大小项和公表维护
   data: function() {
@@ -96,15 +76,8 @@ export default {
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '', //标准诊断名称
-        match:''
+        uniqueName: '' //标准诊断名称
       },
-      matchList: [
-        { id: '', name: '全部' },
-        { id: 1, name: '已匹配' },
-        { id: 0, name: '未匹配' },
-        { id: 2, name: '多项匹配' }
-      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -113,14 +86,9 @@ export default {
       uploadInfo: '导入',
       title: '输血关联维护 | ',
       hospitaiName: '',
-      hospitalId: '',
-      modalVisiable: false,
-      data: {}
+      hospitalId: ''
     };
   },
-  components: {
-    LtModal
-  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -162,7 +130,6 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
-      formData.append('type', 8);
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -247,9 +214,7 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
-        hospitalId: data && data.hospitalId,
-        type: 8,
-        isMatch:this.filter.match
+        hospitalId: data && data.hospitalId
       };
       return param;
     },
@@ -266,16 +231,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      // this.$router.push({
-      //   name: 'AddFusion',
-      //   params: Object.assign(pam, {
-      //     isEdit: false,
-      //     data: { hospitalId: this.hospitalId },
-      //     hospitaiName: this.hospitaiName
-      //   })
-      // });
-      this.data={}
-      this.showModal()
+      this.$router.push({
+        name: 'AddFusion',
+        params: Object.assign(pam, {
+          isEdit: false,
+          data: { hospitalId: this.hospitalId },
+          hospitaiName: this.hospitaiName
+        })
+      });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -287,16 +250,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      // this.$router.push({
-      //   name: 'AddFusion',
-      //   params: Object.assign(pam, {
-      //     isEdit: true,
-      //     data: { ...item, hospitalId: this.hospitalId },
-      //     hospitaiName: this.hospitaiName
-      //   })
-      // });
-      this.data = item
-      this.showModal()
+      this.$router.push({
+        name: 'AddFusion',
+        params: Object.assign(pam, {
+          isEdit: true,
+          data: { ...item, hospitalId: this.hospitalId },
+          hospitaiName: this.hospitaiName
+        })
+      });
     },
     currentChange(next) {
       this.currentPage = next;
@@ -412,7 +373,7 @@ export default {
     },
     // 导入模板
     exportModule() {
-      api.exportFusionModule({type:8}).then(res => {
+      api.exportFusionModule().then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '输血导入模板.xls');
@@ -433,8 +394,6 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
-      formData.append('type', 8);
-      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -492,18 +451,6 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
-    },
-    /********新增编辑弹窗**********/
-    showModal() {
-      this.modalVisiable = true;
-    },
-    getMsgFormSon(data) {
-      if (data == 'close') {
-        this.modalVisiable = false;
-      } else {
-        this.modalVisiable = false;
-        this.getDataList();
-      }
     }
   }
 };

+ 21 - 74
src/components/cdssManage/lis/Lis.vue

@@ -15,16 +15,6 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <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>
@@ -74,16 +64,6 @@
         ></el-pagination>
       </div>
     </div>
-    <LtModal
-      v-if="modalVisiable"
-      @func="getMsgFormSon"
-      :meal="'检验套餐'"
-      :detail="'检验细项'"
-      :standard="'检验标准术语'"
-      :type="1"
-      :hospitalId="hospitalId"
-      :data="data"
-    ></LtModal>
   </div>
 </template>
 
@@ -91,7 +71,7 @@
 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: 'Lis', //化验大小项和公表维护
   data: function() {
@@ -101,15 +81,8 @@ export default {
       filter: {
         hisName: '', // 检验套餐
         hisDetailName: '', //检验细项
-        uniqueName: '', //标准检验项
-        match: ''
+        uniqueName: '' //标准检验项
       },
-      matchList: [
-        { id: '', name: '全部' },
-        { id: 1, name: '已匹配' },
-        { id: 0, name: '未匹配' },
-        { id: 2, name: '多项匹配' }
-      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -118,14 +91,9 @@ export default {
       uploadInfo: '导入',
       title: '检验关联维护 | ',
       hospitaiName: '',
-      hospitalId: '',
-      modalVisiable: false,
-      data: {}
+      hospitalId: ''
     };
   },
-  components: {
-    LtModal
-  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -167,7 +135,6 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
-      formData.append('type', 1);
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -253,9 +220,7 @@ export default {
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
         hisDetailName: this.filter.hisDetailName.trim(),
-        hospitalId: data && data.hospitalId,
-        type: 1,
-        isMatch: this.filter.match
+        hospitalId: data && data.hospitalId
       };
       return param;
     },
@@ -272,16 +237,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.data = {};
-      this.showModal();
-      // this.$router.push({
-      //   name: 'AddLis',
-      //   params: Object.assign(pam, {
-      //     isEdit: false,
-      //     data: { hospitalId: this.hospitalId },
-      //     hospitaiName: this.hospitaiName
-      //   })
-      // });
+      this.$router.push({
+        name: 'AddLis',
+        params: Object.assign(pam, {
+          isEdit: false,
+          data: { hospitalId: this.hospitalId },
+          hospitaiName: this.hospitaiName
+        })
+      });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -293,16 +256,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      // this.$router.push({
-      //   name: 'AddLis',
-      //   params: Object.assign(pam, {
-      //     isEdit: true,
-      //     data: { ...item, hospitalId: this.hospitalId },
-      //     hospitaiName: this.hospitaiName
-      //   })
-      // });
-      this.data = item;
-      this.showModal();
+      this.$router.push({
+        name: 'AddLis',
+        params: Object.assign(pam, {
+          isEdit: true,
+          data: { ...item, hospitalId: this.hospitalId },
+          hospitaiName: this.hospitaiName
+        })
+      });
     },
     currentChange(next) {
       this.currentPage = next;
@@ -419,7 +380,7 @@ export default {
     },
     // 导入模板
     exportModule() {
-      api.exportLisModule({type:1}).then(res => {
+      api.exportLisModule().then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '检验导入模板.xls');
@@ -440,8 +401,6 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
-      formData.append('type', 1);
-      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -499,18 +458,6 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
-    },
-    /********新增编辑弹窗**********/
-    showModal() {
-      this.modalVisiable = true;
-    },
-    getMsgFormSon(data) {
-      if (data == 'close') {
-        this.modalVisiable = false;
-      } else {
-        this.modalVisiable = false;
-        this.getDataList();
-      }
     }
   }
 };

+ 21 - 68
src/components/cdssManage/nursing/nursing.vue

@@ -15,16 +15,6 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <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>
@@ -70,16 +60,6 @@
         ></el-pagination>
       </div>
     </div>
-
-    <LtModal
-      v-if="modalVisiable"
-      @func="getMsgFormSon"
-      :meal="'护理名称'"
-      :standard="'护理名称'"
-      :type="11"
-      :hospitalId="hospitalId"
-      :data="data"
-    ></LtModal>
   </div>
 </template>
 
@@ -87,7 +67,7 @@
 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: 'Nursing', //化验大小项和公表维护
   data: function() {
@@ -102,8 +82,7 @@ export default {
       ],
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '', //标准诊断名称
-        match:''
+        uniqueName: '' //标准诊断名称
       },
       currentPage: 1,
       pageSize: config.pageSize,
@@ -113,14 +92,9 @@ export default {
       uploadInfo: '导入',
       title: '护理关联维护 | ',
       hospitaiName: '',
-      hospitalId: '',
-      modalVisiable: false,
-      data: {}
+      hospitalId: ''
     };
   },
-  components: {
-    LtModal
-  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -162,7 +136,6 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
-      formData.append('type', 11);
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -247,9 +220,7 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
-        hospitalId: data && data.hospitalId,
-        type: 11,
-        isMatch:this.filter.match
+        hospitalId: data && data.hospitalId
       };
       return param;
     },
@@ -266,16 +237,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      // this.$router.push({
-      //   name: 'AddNursing',
-      //   params: Object.assign(pam, {
-      //     isEdit: false,
-      //     data: { hospitalId: this.hospitalId },
-      //     hospitaiName: this.hospitaiName
-      //   })
-      // });
-      this.data={}
-      this.showModal()
+      this.$router.push({
+        name: 'AddNursing',
+        params: Object.assign(pam, {
+          isEdit: false,
+          data: { hospitalId: this.hospitalId },
+          hospitaiName: this.hospitaiName
+        })
+      });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -287,16 +256,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      // this.$router.push({
-      //   name: 'AddNursing',
-      //   params: Object.assign(pam, {
-      //     isEdit: true,
-      //     data: { ...item, hospitalId: this.hospitalId },
-      //     hospitaiName: this.hospitaiName
-      //   })
-      // });
-      this.data = item
-      this.showModal()
+      this.$router.push({
+        name: 'AddNursing',
+        params: Object.assign(pam, {
+          isEdit: true,
+          data: { ...item, hospitalId: this.hospitalId },
+          hospitaiName: this.hospitaiName
+        })
+      });
     },
     currentChange(next) {
       this.currentPage = next;
@@ -412,7 +379,7 @@ export default {
     },
     // 导入模板
     exportModule() {
-      api.exportNurseModule({type:11}).then(res => {
+      api.exportNurseModule().then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '护理导入模板.xls');
@@ -433,8 +400,6 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
-      formData.append('type', 11);
-      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -492,18 +457,6 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
-    },
-    /********新增编辑弹窗**********/
-    showModal() {
-      this.modalVisiable = true;
-    },
-    getMsgFormSon(data) {
-      if (data == 'close') {
-        this.modalVisiable = false;
-      } else {
-        this.modalVisiable = false;
-        this.getDataList();
-      }
     }
   }
 };

+ 21 - 74
src/components/cdssManage/operation/Operation.vue

@@ -15,16 +15,6 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <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>
@@ -75,16 +65,6 @@
         ></el-pagination>
       </div>
     </div>
-
-    <LtModal
-      v-if="modalVisiable"
-      @func="getMsgFormSon"
-      :meal="'手术/操作名称'"
-      :standard="'手术/操作名称'"
-      :type="6"
-      :hospitalId="hospitalId"
-      :data="data"
-    ></LtModal>
   </div>
 </template>
 
@@ -92,7 +72,7 @@
 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: 'Operation', //化验大小项和公表维护
   data: function() {
@@ -101,15 +81,8 @@ export default {
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '', //标准诊断名称
-        match:''
+        uniqueName: '' //标准诊断名称
       },
-      matchList: [
-        { id: '', name: '全部' },
-        { id: 1, name: '已匹配' },
-        { id: 0, name: '未匹配' },
-        { id: 2, name: '多项匹配' }
-      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -118,14 +91,9 @@ export default {
       uploadInfo: '导入',
       title: '手术/操作关联维护 | ',
       hospitaiName: '',
-      hospitalId: '',
-      modalVisiable: false,
-      data: {}
+      hospitalId: ''
     };
   },
-  components: {
-    LtModal
-  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -167,7 +135,6 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
-      formData.append('type', 6);
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -252,9 +219,7 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
-        hospitalId: data && data.hospitalId,
-        type: 6,
-        isMatch:this.filter.match
+        hospitalId: data && data.hospitalId
       };
       return param;
     },
@@ -271,16 +236,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      // this.$router.push({
-      //   name: 'AddOperation',
-      //   params: Object.assign(pam, {
-      //     isEdit: false,
-      //     data: { hospitalId: this.hospitalId },
-      //     hospitaiName: this.hospitaiName
-      //   })
-      // });
-      this.data={}
-      this.showModal()
+      this.$router.push({
+        name: 'AddOperation',
+        params: Object.assign(pam, {
+          isEdit: false,
+          data: { hospitalId: this.hospitalId },
+          hospitaiName: this.hospitaiName
+        })
+      });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -292,16 +255,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      // this.$router.push({
-      //   name: 'AddOperation',
-      //   params: Object.assign(pam, {
-      //     isEdit: true,
-      //     data: { ...item, hospitalId: this.hospitalId },
-      //     hospitaiName: this.hospitaiName
-      //   })
-      // });
-      this.data = item
-      this.showModal()
+      this.$router.push({
+        name: 'AddOperation',
+        params: Object.assign(pam, {
+          isEdit: true,
+          data: { ...item, hospitalId: this.hospitalId },
+          hospitaiName: this.hospitaiName
+        })
+      });
     },
     currentChange(next) {
       this.currentPage = next;
@@ -420,7 +381,7 @@ export default {
 
     // 导入模板
     exportModule() {
-      api.exportOperationModule({type:6}).then(res => {
+      api.exportOperationModule().then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '手术/操作导入模板.xls');
@@ -441,8 +402,6 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
-      formData.append('type', 6);
-      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -500,18 +459,6 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
-    },
-    /********新增编辑弹窗**********/
-    showModal() {
-      this.modalVisiable = true;
-    },
-    getMsgFormSon(data) {
-      if (data == 'close') {
-        this.modalVisiable = false;
-      } else {
-        this.modalVisiable = false;
-        this.getDataList();
-      }
     }
   }
 };

+ 21 - 74
src/components/cdssManage/pacs/Pacs.vue

@@ -15,16 +15,6 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <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>
@@ -70,16 +60,6 @@
         ></el-pagination>
       </div>
     </div>
-
-    <LtModal
-      v-if="modalVisiable"
-      @func="getMsgFormSon"
-      :meal="'检查项目'"
-      :standard="'检查项目'"
-      :type="3"
-      :hospitalId="hospitalId"
-      :data="data"
-    ></LtModal>
   </div>
 </template>
 
@@ -87,7 +67,7 @@
 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: 'Pacs', //化验大小项和公表维护
   data: function() {
@@ -96,15 +76,8 @@ export default {
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '', //标准诊断名称
-        match: ''
+        uniqueName: '' //标准诊断名称
       },
-      matchList: [
-        { id: '', name: '全部' },
-        { id: 1, name: '已匹配' },
-        { id: 0, name: '未匹配' },
-        { id: 2, name: '多项匹配' }
-      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -113,14 +86,9 @@ export default {
       uploadInfo: '导入',
       title: '检查关联维护 | ',
       hospitaiName: '',
-      hospitalId: '',
-      modalVisiable: false,
-      data: {}
+      hospitalId: ''
     };
   },
-  components: {
-    LtModal
-  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -162,7 +130,6 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
-      formData.append('type', 3);
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -247,9 +214,7 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
-        hospitalId: data && data.hospitalId,
-        type: 3,
-        isMatch: this.filter.match
+        hospitalId: data && data.hospitalId
       };
       return param;
     },
@@ -266,16 +231,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.data = {};
-      this.showModal();
-      // this.$router.push({
-      //   name: 'AddPacs',
-      //   params: Object.assign(pam, {
-      //     isEdit: false,
-      //     data: { hospitalId: this.hospitalId },
-      //     hospitaiName: this.hospitaiName
-      //   })
-      // });
+      this.$router.push({
+        name: 'AddPacs',
+        params: Object.assign(pam, {
+          isEdit: false,
+          data: { hospitalId: this.hospitalId },
+          hospitaiName: this.hospitaiName
+        })
+      });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -287,16 +250,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.data = item;
-      this.showModal();
-      // this.$router.push({
-      //   name: 'AddPacs',
-      //   params: Object.assign(pam, {
-      //     isEdit: true,
-      //     data: { ...item, hospitalId: this.hospitalId },
-      //     hospitaiName: this.hospitaiName
-      //   })
-      // });
+      this.$router.push({
+        name: 'AddPacs',
+        params: Object.assign(pam, {
+          isEdit: true,
+          data: { ...item, hospitalId: this.hospitalId },
+          hospitaiName: this.hospitaiName
+        })
+      });
     },
     currentChange(next) {
       this.currentPage = next;
@@ -412,7 +373,7 @@ export default {
     },
     // 导入模板
     exportModule() {
-      api.exportPacsModule({type:3}).then(res => {
+      api.exportPacsModule().then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '检查导入模板.xls');
@@ -433,8 +394,6 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
-      formData.append('type', 3);
-      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -493,18 +452,6 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
-    },
-    /********新增编辑弹窗**********/
-    showModal() {
-      this.modalVisiable = true;
-    },
-    getMsgFormSon(data) {
-      if (data == 'close') {
-        this.modalVisiable = false;
-      } else {
-        this.modalVisiable = false;
-        this.getDataList();
-      }
     }
   }
 };

+ 4 - 5
src/components/cdssManage/plan/AddPlan.vue

@@ -436,13 +436,13 @@ export default {
           params.planDetailParent = params.planDetailParent.map((item) => {
             let newArr = [];
             if (item.planDetails) {
-              newArr = item.planDetails.map((child) => {
+              newArr = item.planDetails.map((child, index) => {
                 return {
                   code: child.code,
                   hospitalId: this.form.hospitalId,
                   name: child.name,
                   number: child.number,
-                  orderNo: child.orderNo,
+                  orderNo: index + 1,
                   planId: child.planId,
                   remark: child.remark,
                   status: child.status,
@@ -550,7 +550,7 @@ export default {
         return j === -1;
       });
       let obj = { list };
-      list.forEach((child) => {
+      obj.list.forEach((child) => {
         if (child.name === "开单合理性") {
           obj.orderNo = child.orderNo;
           obj.name = child.name;
@@ -574,7 +574,7 @@ export default {
         for (let i = arr.length - 1; i > 0; i--) {
           for (let j = 0; j < i; j++) {
             if (arr[j].orderNo > arr[j + 1].orderNo) {
-              [arr[j], arr[j + 1]] = [arr[j + 1], arr[j]];
+              [arr[j], arr[j + 1]] = [{ ...arr[j + 1] }, { ...arr[j] }];
             }
           }
         }
@@ -596,7 +596,6 @@ export default {
             planDetailSub: obj.sysSetInfo,
             id: data.id
           };
-
           const defaultRes = await api.getDefaultPlans();
           if (defaultRes.data.code === "0") {
             // 合并默认数据

+ 21 - 74
src/components/cdssManage/scale/ScaleManage.vue

@@ -15,16 +15,6 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <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>
@@ -70,16 +60,6 @@
         ></el-pagination>
       </div>
     </div>
-
-    <LtModal
-      v-if="modalVisiable"
-      @func="getMsgFormSon"
-      :meal="'量表名称'"
-      :standard="'量表名称'"
-      :type="10"
-      :hospitalId="hospitalId"
-      :data="data"
-    ></LtModal>
   </div>
 </template>
 
@@ -87,7 +67,7 @@
 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: 'ScaleManage', //化验大小项和公表维护
   data: function() {
@@ -96,15 +76,8 @@ export default {
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '', //标准诊断名称
-        match:''
+        uniqueName: '' //标准诊断名称
       },
-      matchList: [
-        { id: '', name: '全部' },
-        { id: 1, name: '已匹配' },
-        { id: 0, name: '未匹配' },
-        { id: 2, name: '多项匹配' }
-      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -113,14 +86,9 @@ export default {
       uploadInfo: '导入',
       title: '量表关联维护 | ',
       hospitaiName: '',
-      hospitalId: '',
-      modalVisiable: false,
-      data: {}
+      hospitalId: ''
     };
   },
-  components:{
-    LtModal
-  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -162,7 +130,6 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
-      formData.append('type', 10);
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -248,9 +215,7 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
-        hospitalId: data && data.hospitalId,
-        type: 10,
-        isMatch:this.filter.match
+        hospitalId: data && data.hospitalId
       };
       return param;
     },
@@ -267,16 +232,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      // this.$router.push({
-      //   name: 'AddScale',
-      //   params: Object.assign(pam, {
-      //     isEdit: false,
-      //     data: { hospitalId: this.hospitalId },
-      //     hospitaiName: this.hospitaiName
-      //   })
-      // });
-      this.data={}
-      this.showModal()
+      this.$router.push({
+        name: 'AddScale',
+        params: Object.assign(pam, {
+          isEdit: false,
+          data: { hospitalId: this.hospitalId },
+          hospitaiName: this.hospitaiName
+        })
+      });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -288,16 +251,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      // this.$router.push({
-      //   name: 'AddScale',
-      //   params: Object.assign(pam, {
-      //     isEdit: true,
-      //     data: { ...item, hospitalId: this.hospitalId },
-      //     hospitaiName: this.hospitaiName
-      //   })
-      // });
-      this.data = item
-      this.showModal()
+      this.$router.push({
+        name: 'AddScale',
+        params: Object.assign(pam, {
+          isEdit: true,
+          data: { ...item, hospitalId: this.hospitalId },
+          hospitaiName: this.hospitaiName
+        })
+      });
     },
     currentChange(next) {
       this.currentPage = next;
@@ -395,7 +356,7 @@ export default {
 
     // 导入模板
     exportModule() {
-      api.exportScaleModule({type:10}).then(res => {
+      api.exportScaleModule().then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '量表导入模板.xls');
@@ -416,8 +377,6 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
-      formData.append('type', 10);
-      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -476,18 +435,6 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
-    },
-    /********新增编辑弹窗**********/
-    showModal() {
-      this.modalVisiable = true;
-    },
-    getMsgFormSon(data) {
-      if (data == 'close') {
-        this.modalVisiable = false;
-      } else {
-        this.modalVisiable = false;
-        this.getDataList();
-      }
     }
   }
 };

+ 23 - 76
src/components/cdssManage/tcmdisease/tcmdisease.vue

@@ -15,16 +15,6 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <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>
@@ -43,7 +33,7 @@
         <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="code" label="中医疾病代码" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="uniqueCode" 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">
@@ -71,17 +61,6 @@
         ></el-pagination>
       </div>
     </div>
-
-    <LtModal
-      v-if="modalVisiable"
-      @func="getMsgFormSon"
-      :meal="'中医疾病名称'"
-      :standard="'中医疾病名称'"
-      :detail="'中医疾病代码'"
-      :type="12"
-      :hospitalId="hospitalId"
-      :data="data"
-    ></LtModal>
   </div>
 </template>
 
@@ -89,7 +68,7 @@
 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: 'Tcmdisease', //化验大小项和公表维护
   data: function() {
@@ -98,15 +77,8 @@ export default {
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '', //标准诊断名称
-        match:''
+        uniqueName: '' //标准诊断名称
       },
-      matchList: [
-        { id: '', name: '全部' },
-        { id: 1, name: '已匹配' },
-        { id: 0, name: '未匹配' },
-        { id: 2, name: '多项匹配' }
-      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -115,14 +87,9 @@ export default {
       uploadInfo: '导入',
       title: '中医疾病关联维护 | ',
       hospitaiName: '',
-      hospitalId: '',
-      modalVisiable: false,
-      data: {}
+      hospitalId: ''
     };
   },
-  components: {
-    LtModal
-  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -164,7 +131,6 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
-      formData.append('type', 12);
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -249,9 +215,7 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
-        hospitalId: data && data.hospitalId,
-        type: 12,
-        isMatch:this.filter.match
+        hospitalId: data && data.hospitalId
       };
       return param;
     },
@@ -261,6 +225,7 @@ export default {
       this.getDataList();
     },
     addRelation() {
+      console.log(11)
       const pam = this.searched
         ? {
             currentPage: this.currentPage,
@@ -268,16 +233,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-        this.data={}
-        this.showModal()
-      // this.$router.push({
-      //   name: 'AddTcmdisease',
-      //   params: Object.assign(pam, {
-      //     isEdit: false,
-      //     data: { hospitalId: this.hospitalId },
-      //     hospitaiName: this.hospitaiName
-      //   })
-      // });
+      this.$router.push({
+        name: 'AddTcmdisease',
+        params: Object.assign(pam, {
+          isEdit: false,
+          data: { hospitalId: this.hospitalId },
+          hospitaiName: this.hospitaiName
+        })
+      });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -289,16 +252,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      // this.$router.push({
-      //   name: 'AddTcmdisease',
-      //   params: Object.assign(pam, {
-      //     isEdit: true,
-      //     data: { ...item, hospitalId: this.hospitalId },
-      //     hospitaiName: this.hospitaiName
-      //   })
-      // });
-      this.data = item
-      this.showModal()
+      this.$router.push({
+        name: 'AddTcmdisease',
+        params: Object.assign(pam, {
+          isEdit: true,
+          data: { ...item, hospitalId: this.hospitalId },
+          hospitaiName: this.hospitaiName
+        })
+      });
     },
     currentChange(next) {
       this.currentPage = next;
@@ -414,7 +375,7 @@ export default {
     },
     // 导入模板
     exportModule() {
-      api.exportTcmModule({type:12}).then(res => {
+      api.exportTcmModule().then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '中医疾病导入模板.xls');
@@ -435,8 +396,6 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
-      formData.append('type', 12);
-      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -494,18 +453,6 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
-    },
-    /********新增编辑弹窗**********/
-    showModal() {
-      this.modalVisiable = true;
-    },
-    getMsgFormSon(data) {
-      if (data == 'close') {
-        this.modalVisiable = false;
-      } else {
-        this.modalVisiable = false;
-        this.getDataList();
-      }
     }
   }
 };

+ 22 - 76
src/components/cdssManage/tcmdrome/tcmdrome.vue

@@ -15,16 +15,6 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <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>
@@ -43,7 +33,7 @@
         <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="code" label="中医证候代码" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="uniqueCode" 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">
@@ -71,16 +61,6 @@
         ></el-pagination>
       </div>
     </div>
-    <LtModal
-      v-if="modalVisiable"
-      @func="getMsgFormSon"
-      :meal="'中医证候名称'"
-      :standard="'中医证候名称'"
-      :detail="'中医证候代码'"
-      :type="13"
-      :hospitalId="hospitalId"
-      :data="data"
-    ></LtModal>
   </div>
 </template>
 
@@ -88,7 +68,7 @@
 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: 'Tcmdrome', //化验大小项和公表维护
   data: function() {
@@ -97,15 +77,8 @@ export default {
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '', //标准诊断名称
-        match:''
+        uniqueName: '' //标准诊断名称
       },
-      matchList: [
-        { id: '', name: '全部' },
-        { id: 1, name: '已匹配' },
-        { id: 0, name: '未匹配' },
-        { id: 2, name: '多项匹配' }
-      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -114,14 +87,9 @@ export default {
       uploadInfo: '导入',
       title: '中医证候关联维护 | ',
       hospitaiName: '',
-      hospitalId: '',
-      modalVisiable: false,
-      data: {}
+      hospitalId: ''
     };
   },
-  components: {
-    LtModal
-  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -163,8 +131,6 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
-      formData.append('type', 13);
-      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -249,9 +215,7 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
-        hospitalId: data && data.hospitalId,
-        type: 13,
-        isMatch:this.filter.match
+        hospitalId: data && data.hospitalId
       };
       return param;
     },
@@ -269,16 +233,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-        this.data={}
-        this.showModal()
-      // this.$router.push({
-      //   name: 'AddTcmdrome',
-      //   params: Object.assign(pam, {
-      //     isEdit: false,
-      //     data: { hospitalId: this.hospitalId },
-      //     hospitaiName: this.hospitaiName
-      //   })
-      // });
+      this.$router.push({
+        name: 'AddTcmdrome',
+        params: Object.assign(pam, {
+          isEdit: false,
+          data: { hospitalId: this.hospitalId },
+          hospitaiName: this.hospitaiName
+        })
+      });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -290,16 +252,14 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      // this.$router.push({
-      //   name: 'AddTcmdrome',
-      //   params: Object.assign(pam, {
-      //     isEdit: true,
-      //     data: { ...item, hospitalId: this.hospitalId },
-      //     hospitaiName: this.hospitaiName
-      //   })
-      // });
-      this.data = item
-      this.showModal()
+      this.$router.push({
+        name: 'AddTcmdrome',
+        params: Object.assign(pam, {
+          isEdit: true,
+          data: { ...item, hospitalId: this.hospitalId },
+          hospitaiName: this.hospitaiName
+        })
+      });
     },
     currentChange(next) {
       this.currentPage = next;
@@ -415,7 +375,7 @@ export default {
     },
     // 导入模板
     exportModule() {
-      api.exportTcmdromeModule({type:13}).then(res => {
+      api.exportTcmdromeModule().then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '中医证候导入模板.xls');
@@ -436,8 +396,6 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
-      formData.append('type', 13);
-      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -495,18 +453,6 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
-    },
-    /********新增编辑弹窗**********/
-    showModal() {
-      this.modalVisiable = true;
-    },
-    getMsgFormSon(data) {
-      if (data == 'close') {
-        this.modalVisiable = false;
-      } else {
-        this.modalVisiable = false;
-        this.getDataList();
-      }
     }
   }
 };

+ 97 - 61
src/components/common/HomePage.vue

@@ -2,90 +2,116 @@
   <el-container :class="getRole">
     <el-aside v-show="onshow">
       <div class="logo">
-        <p v-if="userLoginDTO&&userLoginDTO.type=='1'">
+        <p v-if="userLoginDTO && userLoginDTO.type == '1'">
           <b>朗通后台管理系统</b>
         </p>
-        <p v-if="userLoginDTO&&userLoginDTO.type=='0'">
+        <p v-if="userLoginDTO && userLoginDTO.type == '0'">
           <b>DiagbotCloud</b>
         </p>
-        <p v-if="userLoginDTO&&userLoginDTO.type=='0'">
+        <p v-if="userLoginDTO && userLoginDTO.type == '0'">
           <b>后台管理系统</b>
         </p>
       </div>
 
       <lt-menu
-        v-if="menuWrappers&&menuWrappers.length"
+        v-if="menuWrappers && menuWrappers.length"
         v-bind:role="getRole"
         v-bind:data="menuWrappers"
       ></lt-menu>
       <div class="version">
         <p>
           <span>版本信息:</span>
-          <a href="javascript:void(0)" @click="showVersion">{{versionName}}</a>
+          <a href="javascript:void(0)" @click="showVersion">{{
+            versionName
+          }}</a>
           <i v-if="isNewV">
             <img src="../../images/new.png" alt />
           </i>
         </p>
       </div>
     </el-aside>
-    <img src="../../images/icon-collect-right.png" v-show="!onshow" class="collect" @click="collect" />
-    <img src="../../images/icon-collect-left.png" v-show="onshow" class="collect-left" @click="collect" />
+    <img
+      src="../../images/icon-collect-right.png"
+      v-show="!onshow"
+      class="collect"
+      @click="collect"
+    />
+    <img
+      src="../../images/icon-collect-left.png"
+      v-show="onshow"
+      class="collect-left"
+      @click="collect"
+    />
     <el-container>
       <el-header class="clearfix">
         <div class="title fl">
-          <h2>{{organization&&organization.name}}</h2>
+          <h2>{{ organization && organization.name }}</h2>
         </div>
         <div class="userInfo fr">
-          <span class="username" @click="goCenter">{{userLoginDTO&&userLoginDTO.linkman}}</span>
-          <lt-badge v-if="getRole=='user'" class="green" :authStatus="authStatus">{{authStatusName}}</lt-badge>
-          <el-button type="info" size="small" plain @click="logout">退出</el-button>
+          <span class="username" @click="goCenter">{{
+            userLoginDTO && userLoginDTO.linkman
+          }}</span>
+          <lt-badge
+            v-if="getRole == 'user'"
+            class="green"
+            :authStatus="authStatus"
+            >{{ authStatusName }}</lt-badge
+          >
+          <el-button type="info" size="small" plain @click="logout"
+            >退出</el-button
+          >
         </div>
       </el-header>
       <el-main>
         <router-view v-if="ok" v-on:status-change="changeStatus"></router-view>
       </el-main>
     </el-container>
-    <el-dialog title="版本信息" :visible.sync="versionVisible" width="50%" class="version-info">
+    <el-dialog
+      title="版本信息"
+      :visible.sync="versionVisible"
+      width="50%"
+      class="version-info"
+    >
       <div v-html="versionInfo"></div>
     </el-dialog>
   </el-container>
 </template>
 
 <script>
-import LtMenu from '../common/Menu.vue';
-import LtBadge from '@base/LtBadge.vue';
-import api from '@api/index.js';
-import userApi from '@api/user.js';
-import Console from '@components/user/Console.vue';
-import newIcon from '../../images/new.png';
+import LtMenu from "../common/Menu.vue";
+import LtBadge from "@base/LtBadge.vue";
+import api from "@api/index.js";
+import userApi from "@api/user.js";
+import Console from "@components/user/Console.vue";
+import newIcon from "../../images/new.png";
 export default {
-  name: 'homepage',
+  name: "homepage",
   components: {
-    'lt-badge': LtBadge,
-    'lt-menu': LtMenu,
+    "lt-badge": LtBadge,
+    "lt-menu": LtMenu,
     console: Console
   },
-  data: function() {
+  data: function () {
     return {
       menuWrappers: null,
       organization: null,
       userLoginDTO: null,
       authStatus: null,
-      authStatusName: '',
+      authStatusName: "",
       ok: false, //是否已获取到菜单
-      versionName: '',
+      versionName: "",
       versionVisible: false,
-      versionInfo: '',
+      versionInfo: "",
       isNewV: false,
       version: null, //版本信息接口返回的数据
       onshow: true
     };
   },
   computed: {
-    getRole: function() {
-      return this.userLoginDTO && this.userLoginDTO.type == '0'
-        ? 'user'
-        : 'admin';
+    getRole: function () {
+      return this.userLoginDTO && this.userLoginDTO.type == "0"
+        ? "user"
+        : "admin";
     }
   },
   created() {
@@ -93,17 +119,27 @@ export default {
     this.getMenuList();
   },
   watch: {
-    $route: function(to, from) {
-      if (from.name == 'login') {
+    $route: function (to, from) {
+      if (from.name == "login") {
         this.getMenuList();
       }
-      if (to.path == '/') {
+      if (to.path == "/") {
         // 退出时清空菜单
         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";
+      })();
+    };
+  },
   methods: {
     collect() {
       this.onshow = !this.onshow;
@@ -111,31 +147,31 @@ export default {
     getMenuList() {
       api
         .getAccessdMenu()
-        .then(res => {
-          if (res.data.code == '0') {
+        .then((res) => {
+          if (res.data.code == "0") {
             const data = res.data.data;
             this.ok = true;
-            const hasConcole = data.menuWrappers.find(it => {
-              return it.code.indexOf('-KZT') > -1;
+            const hasConcole = data.menuWrappers.find((it) => {
+              return it.code.indexOf("-KZT") > -1;
             });
             //this.hasConcole = hasConcole!=-1;
             this.menuWrappers = data.menuWrappers;
             this.organization = data.organization;
             this.userLoginDTO = data.userLoginDTO;
             localStorage.setItem(
-              'userLoginDTO',
+              "userLoginDTO",
               JSON.stringify(data.userLoginDTO)
             );
-            this.getRole == 'user' && this.getAuthStatus();
+            this.getRole == "user" && this.getAuthStatus();
             if (hasConcole) {
               const url =
-                this.getRole == 'user' ? '/user/YH-KZT' : '/admin/LT-KZT';
+                this.getRole == "user" ? "/user/YH-KZT" : "/admin/LT-KZT";
               this.$router.push({ path: url });
             }
             this.getVersionInfo();
           }
         })
-        .catch(error => {
+        .catch((error) => {
           console.log(error);
         });
     },
@@ -144,9 +180,9 @@ export default {
     },
     getVersionInfo() {
       const getInfo =
-        this.getRole == 'user' ? api.getVersionOuter : api.getVersionInner;
-      getInfo().then(res => {
-        if (res.data.code == '0') {
+        this.getRole == "user" ? api.getVersionOuter : api.getVersionInner;
+      getInfo().then((res) => {
+        if (res.data.code == "0") {
           const data = res.data.data;
           this.fillVersionInfo(data);
         } else {
@@ -158,16 +194,16 @@ export default {
       //进入时获取版本信息,如版本时间与localStorage中不一致或者一致但localStorage中未被点过,
       // 则要显示更新图标
       let htl = data.refreshTime
-        ? '<h3>当前版本:' +
+        ? "<h3>当前版本:" +
           data.name +
-          '<span>' +
+          "<span>" +
           data.refreshTime.substr(0, 10) +
-          '</span></h3>'
-        : '<h3>当前版本:' + data.name + '</h3>';
+          "</span></h3>"
+        : "<h3>当前版本:" + data.name + "</h3>";
       let prags = data.detail || [];
       this.versionName = data.name;
       const versionTime = JSON.parse(
-        localStorage.getItem('versionInfo-' + this.userLoginDTO.username)
+        localStorage.getItem("versionInfo-" + this.userLoginDTO.username)
       );
       if (
         !versionTime ||
@@ -179,7 +215,7 @@ export default {
       }
       for (let i = 0; i < prags.length; i++) {
         htl +=
-          '<p>' + prags[i].title + '</p><p>' + prags[i].description + '</p>';
+          "<p>" + prags[i].title + "</p><p>" + prags[i].description + "</p>";
       }
       this.versionInfo = htl;
       this.version = { date: data.refreshTime };
@@ -189,7 +225,7 @@ export default {
       this.version.showed = true;
       this.isNewV = false;
       localStorage.setItem(
-        'versionInfo-' + this.userLoginDTO.username,
+        "versionInfo-" + this.userLoginDTO.username,
         JSON.stringify(this.version)
       );
     },
@@ -203,37 +239,37 @@ export default {
       this.authStatusName = text;
     },
     goCenter() {
-      const url = this.getRole == 'user' ? '' : '/admin/LT-GRZX';
+      const url = this.getRole == "user" ? "" : "/admin/LT-GRZX";
       this.$router.push({ path: url });
     },
     getAuthStatus() {
       //获取用户认证状态
       userApi
         .getUserAuthStatus()
-        .then(res => {
-          if (res.data.code == '0') {
+        .then((res) => {
+          if (res.data.code == "0") {
             const data = res.data.data;
             // this.authStatus = data[0];
             this.authStatusName = data.authStatusName;
             this.authStatus = data.authStatus;
           }
         })
-        .catch(error => {
+        .catch((error) => {
           console.log(error);
         });
     },
     logout() {
       //退出
-      localStorage.removeItem('token');
-      localStorage.removeItem('menuPath');
-      this.$router.push({ path: '/' });
+      localStorage.removeItem("token");
+      localStorage.removeItem("menuPath");
+      this.$router.push({ path: "/" });
     }
   }
 };
 </script>
 
 <style lang="less">
-@import '../../less/common.less';
+@import "../../less/common.less";
 .collect {
   width: 36px;
   height: 32px;
@@ -242,11 +278,11 @@ export default {
   top: 70%;
   z-index: 20;
 }
-.collect-left{
+.collect-left {
   width: 36px;
   height: 32px;
   position: fixed;
-  left:calc(20% - 36px); 
+  // left: calc(20% - 36px);
   top: 65%;
   z-index: 20;
 }
@@ -270,7 +306,7 @@ export default {
 }
 </style>
 <style lang="less" scoped>
-@import '../../less/common.less';
+@import "../../less/common.less";
 .el-menu-vertical-demo.el-menu {
   height: calc(100% - 120px);
   overflow-y: auto;

+ 290 - 0
src/components/knowledgeExtra/AddAssess/ScoreResultsTable.vue

@@ -0,0 +1,290 @@
+<style lang="less" scoped>
+.ScoreResults {
+  width: 100%;
+  // padding: 30px 30px 0 30px;
+  box-sizing: border-box;
+  border-top: 10px solid rgba(203, 207, 212, 0.3);
+  h4 {
+    font-size: 14px;
+    border-bottom: 1px solid rgba(203, 207, 212, 0.3);
+    padding: 10px 35px;
+  }
+  .table_box {
+    padding: 0 35px;
+    margin-top: -10px;
+  }
+  /deep/.el-table th,
+  .el-table tr {
+    height: 50px;
+    background: #e3eaf4;
+  }
+  /deep/.el-table th {
+    padding: 0;
+  }
+  .btn_box {
+    width: 100%;
+    height: 100%;
+    padding: 20px 0;
+    display: flex;
+    align-items: center;
+    justify-content: space-around;
+    .btn_div {
+      flex: 1;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+    }
+    img {
+      width: 16px;
+      height: 16px;
+      cursor: pointer;
+    }
+  }
+  .range_box {
+    display: flex;
+    position: relative;
+    .range_child {
+      flex: 1;
+      &:nth-child(1) {
+        margin-right: 20px;
+      }
+      /deep/.el-form-item__content {
+        position: static;
+      }
+      /deep/ .is-error .el-form-item__error {
+        left: 70px;
+      }
+    }
+  }
+  /deep/.el-input--mini .el-input__inner {
+    width: 100%;
+  }
+  /deep/.el-form-item--mini.el-form-item,
+  .el-form-item--small.el-form-item {
+    padding: 18px 0;
+  }
+  .custom_table_header {
+    vertical-align: middle;
+    &::before {
+      content: "*";
+      color: red;
+      font-size: 12px;
+      margin-right: 4px;
+    }
+  }
+}
+/deep/ .el-textarea__inner {
+  overflow-y: hidden;
+}
+.showScroll {
+  /deep/ .el-textarea__inner {
+    overflow-y: auto;
+  }
+}
+/deep/ .el-input--mini {
+  font-size: 14px;
+}
+/deep/ .el-form-item.is-success .el-input__inner,
+.el-form-item.is-success .el-textarea__inner {
+  border-color: #c9c9c9 !important;
+}
+/deep/ .el-form-item.is-success .el-textarea__inner {
+  border-color: #c9c9c9 !important;
+}
+/deep/ .el-form-item.is-success .el-textarea__inner {
+  border-color: #c9c9c9 !important;
+}
+</style>
+<template>
+  <div class="ScoreResults">
+    <h4>得分结果:</h4>
+    <div class="table_box">
+      <el-table
+        :data="list"
+        header-row-class-name="header_row_class_name"
+        border
+        style="width: 100%; margin: 20px 0"
+      >
+        <el-table-column prop="orderNo" width="70px" label="">
+          <template slot-scope="scope">
+            <div class="btn_box">
+              <div class="btn_div">
+                <img
+                  @click="$emit('CHANEG_SCORE_RESULT', 1, scope.$index)"
+                  src="@/images/add-new-rule-sub.png"
+                  alt=""
+                />
+              </div>
+              <div class="btn_div" v-if="list.length > 1">
+                <img
+                  @click="$emit('CHANEG_SCORE_RESULT', 0, scope.$index)"
+                  src="@/images/add-new-rule-del.png"
+                  alt=""
+                />
+              </div>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="content">
+          <template slot="header">
+            <div class="custom_table_header">得分范围</div>
+          </template>
+          <template slot-scope="scope">
+            <!-- <div>{{ scope.row.content.max }},{{ scope.row.content.min }}</div> -->
+            <div class="range_box">
+              <div class="range_child">
+                <el-form-item
+                  label="大于等于:"
+                  label-width="80px"
+                  :prop="`scoreresultsdatas[${scope.$index}].content.min`"
+                  :rules="[
+                    {
+                      validator: (rule, value, callback) => {
+                        validateMinMax(scope, rule, value, callback);
+                      },
+                      trigger: ['blur']
+                    }
+                  ]"
+                >
+                  <el-input
+                    type="text"
+                    maxlength="7"
+                    :id="`scoreresultsdatas[${scope.$index}].content.min`"
+                    @input="
+                      handleInput($event, scope.$index);
+                      scope.row.content.min = numInputChange(
+                        scope.row.content.min
+                      );
+                    "
+                    v-model="scope.row.content.min"
+                    clearable
+                    placeholder="请输入"
+                  ></el-input>
+                </el-form-item>
+              </div>
+              <div class="range_child">
+                <el-form-item
+                  label="小于等于:"
+                  label-width="80px"
+                  :prop="`scoreresultsdatas[${scope.$index}].content.max`"
+                  :rules="[
+                    {
+                      validator: (rule, value, callback) => {
+                        validateMinMax(scope, rule, value, callback);
+                      },
+                      trigger: ['blur']
+                    }
+                  ]"
+                >
+                  <el-input
+                    type="text"
+                    maxlength="7"
+                    :id="`scoreresultsdatas[${scope.$index}].content.max`"
+                    @input="
+                      handleInput($event, scope.$index);
+                      scope.row.content.max = numInputChange(
+                        scope.row.content.max
+                      );
+                    "
+                    v-model="scope.row.content.max"
+                    clearable
+                    placeholder="请输入"
+                  ></el-input>
+                </el-form-item>
+              </div>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="result">
+          <template slot="header">
+            <div class="custom_table_header">结果</div>
+          </template>
+          <template slot-scope="scope">
+            <el-form-item
+              :prop="`scoreresultsdatas[${scope.$index}].result`"
+              :rules="rules.soureResult"
+            >
+              <el-input
+                :id="`scoreresultsdatas[${scope.$index}].result`"
+                type="textarea"
+                rows="1"
+                :autosize="true"
+                resize="none"
+                v-model="scope.row.result"
+                clearable
+                maxlength="10"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </template>
+        </el-table-column>
+        <el-table-column prop="pushInfo" label="建议">
+          <template slot-scope="scope">
+            <el-form-item
+              :prop="`scoreresultsdatas[${scope.$index}].pushInfo`"
+              :rules="rules.sourePushInfo"
+              class="showScroll"
+            >
+              <el-input
+                :id="`scoreresultsdatas[${scope.$index}].pushInfo`"
+                type="textarea"
+                rows="2"
+                resize="none"
+                v-model="scope.row.pushInfo"
+                clearable
+                maxlength="500"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+import rules from "./rules";
+import { numInputChange } from "./util";
+export default {
+  data() {
+    return {
+      rules: rules
+    };
+  },
+  methods: {
+    numInputChange,
+    handleInput(val, i) {
+      // `scoreresultsdatas[${scope.$index}].content.min`
+      this.$emit("clearValidate", [
+        `scoreresultsdatas[${i}].content.max`,
+        `scoreresultsdatas[${i}].content.min`
+      ]);
+    },
+    resizeTable() {
+      setTimeout(() => {
+        this.list.forEach((item, index) => {
+          this.$refs[`scoreresultsdatas[${index}].pushInfo`] &&
+            this.$refs[`scoreresultsdatas[${index}].pushInfo`].resizeTextarea();
+          this.$refs[`scoreresultsdatas[${index}].result`] &&
+            this.$refs[`scoreresultsdatas[${index}].result`].resizeTextarea();
+        });
+      }, 500);
+    },
+    validateMinMax(scope, rule, value, callback) {
+      const { min, max } = scope.row.content;
+      if (min || max) {
+        callback();
+      } else {
+        callback(new Error("大于和小于至少完整填写一个"));
+      }
+    }
+  },
+  props: {
+    list: {
+      default: []
+    }
+  }
+};
+</script>
+

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1345 - 0
src/components/knowledgeExtra/AddAssess/index.vue


+ 53 - 0
src/components/knowledgeExtra/AddAssess/rules.js

@@ -0,0 +1,53 @@
+export default {
+  title: [
+    { required: true, message: "请输入标题", trigger: ["blur"] },
+  ],
+  tableFactor: [
+    { required: true, message: "请输入系数", trigger: ["blur"] },
+  ],
+  tableConstant: [
+    { required: true, message: "请输入常数", trigger: ["blur"] },
+  ],
+  // 问题选项
+  issueContent: [
+    { required: true, message: "请输入问题内容", trigger: ["blur"] },
+  ],
+  issueFactor: [
+    { required: true, message: "请输入系数", trigger: ["blur"] },
+  ],
+  issueConstant: [
+    { required: true, message: "请输入常数", trigger: ["blur"] },
+  ],
+  content: [
+    { required: true, message: "请输入选项内容", trigger: ["blur"] },
+  ],
+  score: [
+    { required: true, message: "请输入分值", trigger: ["blur"] },
+  ],
+  ruleCode:[
+    { required: true, message: "请输入编码", trigger: ["change"] },
+  ],
+  result: [
+    { required: true, message: "请输入结果", trigger: ["blur"] },
+  ],
+  pushInfo: [
+    { required: true, message: "请输入建议", trigger: ["blur"] },
+  ],
+  // 概述
+  fwbContent: [
+    { required: true, message: "请输入概述", trigger: ["blur"] },
+  ],
+  // 得分结果
+  max: [
+    { required: true, message: "请输入大于值", trigger: ["blur"] },
+  ],
+  min: [
+    { required: true, message: "请输入小于值", trigger: ["blur"] },
+  ],
+  soureResult: [
+    { required: true, message: "请输入结果", trigger: ["blur"] },
+  ],
+  sourePushInfo: [
+    { required: true, message: "请输入建议", trigger: ["blur"] },
+  ],
+}

+ 748 - 0
src/components/knowledgeExtra/AddAssess/scale-table.vue

@@ -0,0 +1,748 @@
+
+<style lang="less" scoped>
+.scaleTable {
+  min-height: 100px;
+  margin-top: -10px;
+  .table_box {
+    padding: 0 35px;
+  }
+  .btn_box {
+    width: 100%;
+    height: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: space-around;
+    .btn_div {
+      flex: 1;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+    }
+    img {
+      width: 16px;
+      height: 16px;
+      cursor: pointer;
+    }
+  }
+  .table_select_btn {
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    /deep/ .el-button--text {
+      padding: 3px 0;
+      margin: 0;
+    }
+  }
+  /deep/.el-input--mini .el-input__inner {
+    width: 100%;
+  }
+  /deep/.el-table th {
+    padding: 0;
+  }
+}
+/deep/.el-table th,
+.el-table tr {
+  height: 50px;
+  background: #e3eaf4;
+}
+/deep/.el-table th {
+  padding: 0;
+}
+.custom_table_header {
+  vertical-align: middle;
+  &::before {
+    content: "*";
+    color: red;
+    font-size: 12px;
+    margin-right: 4px;
+  }
+}
+/deep/.el-form-item--mini.el-form-item,
+.el-form-item--small.el-form-item {
+  padding: 18px 0;
+  position: static;
+}
+/deep/ .el-textarea__inner {
+  overflow-y: hidden;
+}
+.showScroll {
+  /deep/ .el-textarea__inner {
+    overflow-y: auto;
+  }
+}
+.cell_center_box {
+  /deep/ .el-input__inner {
+    // width: 40px;
+    text-align: center;
+  }
+}
+/deep/.el-select--mini {
+  width: 100%;
+}
+/deep/ .el-input--mini {
+  font-size: 14px;
+}
+/deep/ .el-form-item.is-success .el-input__inner,
+.el-form-item.is-success .el-textarea__inner {
+  border-color: #c9c9c9 !important;
+}
+/deep/ .el-form-item.is-success .el-textarea__inner {
+  border-color: #c9c9c9 !important;
+}
+/deep/ .el-form-item.is-success .el-textarea__inner {
+  border-color: #c9c9c9 !important;
+}
+</style>
+<template>
+  <div class="scaleTable" :id="`scaleTableRef[${tableIndex}]`">
+    <div class="table_box">
+      <el-table
+        v-if="tableShow"
+        :data="tableData"
+        header-row-class-name="header_row_class_name"
+        border
+        style="width: 100%; margin: 20px 0"
+        :span-method="objectSpanMethod"
+        :ref="`scaleTableRef[${tableIndex}]`"
+      >
+        <el-table-column prop="issueId" label="组" width="90px">
+          <template slot-scope="scope">
+            <div class="btn_box">
+              <div class="btn_div">
+                <img
+                  @click="
+                    $emit('CHANGE_TABLE_ROW', {
+                      type: 4,
+                      tableIndex,
+                      rowIndex: scope.$index,
+                      groupId: scope.row.groupId
+                    })
+                  "
+                  src="@/images/icon-copy.png"
+                  alt=""
+                  title="复制"
+                />
+              </div>
+              <div class="btn_div">
+                <img
+                  @click="
+                    $emit('CHANGE_TABLE_ROW', {
+                      type: 1,
+                      tableIndex,
+                      rowIndex: scope.$index,
+                      groupId: scope.row.groupId
+                    })
+                  "
+                  src="@/images/add-new-rule-sub.png"
+                  alt=""
+                  title="添加"
+                />
+              </div>
+              <div
+                class="btn_div"
+                v-if="imposeRestrictionsRemoveOnGroup(scope.row.groupId)"
+              >
+                <img
+                  @click="
+                    $emit('CHANGE_TABLE_ROW', {
+                      type: -1,
+                      tableIndex,
+                      groupId: scope.row.groupId
+                    })
+                  "
+                  src="@/images/add-new-rule-del.png"
+                  alt=""
+                  title="删除"
+                />
+              </div>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="groupId" label="问题" width="90px">
+          <template slot-scope="scope">
+            <div class="btn_box">
+              <div class="btn_div">
+                <img
+                  @click="
+                    $emit('CHANGE_TABLE_ROW', {
+                      type: 5,
+                      tableIndex,
+                      rowIndex: scope.$index,
+                      groupId: scope.row.groupId,
+                      issueId: scope.row.issueId
+                    })
+                  "
+                  src="@/images/icon-copy.png"
+                  alt=""
+                  title="复制"
+                />
+              </div>
+              <div class="btn_div">
+                <img
+                  @click="
+                    $emit('CHANGE_TABLE_ROW', {
+                      type: 2,
+                      tableIndex,
+                      rowIndex: scope.$index,
+                      groupId: scope.row.groupId,
+                      issueId: scope.row.issueId
+                    })
+                  "
+                  src="@/images/add-new-rule-sub.png"
+                  alt=""
+                  title="添加"
+                />
+              </div>
+              <div
+                class="btn_div"
+                v-if="
+                  imposeRestrictionsRemoveOnIssue({
+                    groupId: scope.row.groupId,
+                    issueId: scope.row.issueId
+                  })
+                "
+              >
+                <img
+                  @click="
+                    $emit('CHANGE_TABLE_ROW', {
+                      type: -2,
+                      tableIndex,
+                      issueId: scope.row.issueId
+                    })
+                  "
+                  src="@/images/add-new-rule-del.png"
+                  alt=""
+                  title="删除"
+                />
+              </div>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="two_selectType" label="选择" width="70px">
+          <template slot-scope="scope">
+            <div class="table_select_btn">
+              <el-button
+                @click="handleSelectTypeBtn(scope.$index, 21)"
+                :style="scope.row.two_selectType != 21 ? { color: '#999' } : ''"
+                type="text"
+                >单选</el-button
+              >
+              <el-button
+                :style="scope.row.two_selectType != 22 ? { color: '#999' } : ''"
+                @click="handleSelectTypeBtn(scope.$index, 22)"
+                type="text"
+                >多选</el-button
+              >
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="two_content">
+          <template slot="header">
+            <div class="custom_table_header">问题内容</div>
+          </template>
+          <template slot-scope="scope">
+            <el-form-item
+              :prop="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].two_content`"
+              :rules="rules.issueContent"
+            >
+              <el-input
+                :ref="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].two_content`"
+                :id="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].two_content`"
+                type="textarea"
+                rows="1"
+                :autosize="true"
+                resize="none"
+                v-model="scope.row.two_content"
+                clearable
+                maxlength="300"
+                placeholder="请输入"
+                @input="
+                  changeDataFun($event, tableIndex, scope.$index, 'two_content')
+                "
+              ></el-input>
+            </el-form-item>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="two_factor"
+          width="60px"
+          v-if="tableResultType === 1"
+        >
+          <template slot="header">
+            <div class="custom_table_header">系数</div>
+          </template>
+          <template slot-scope="scope">
+            <div class="cell_center_box">
+              <el-form-item
+                :prop="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].two_factor`"
+                :rules="rules.issueFactor"
+                :show-message="false"
+              >
+                <el-input
+                  :id="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].two_factor`"
+                  type="text"
+                  maxlength="7"
+                  v-model="scope.row.two_factor"
+                  placeholder="请输入"
+                  title=""
+                  @input="
+                    changeDataFun(
+                      $event,
+                      tableIndex,
+                      scope.$index,
+                      'two_factor'
+                    );
+                    scope.row.two_factor = numInputChange(scope.row.two_factor);
+                  "
+                ></el-input>
+              </el-form-item>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="two_constant"
+          width="60px"
+          v-if="tableResultType === 1"
+        >
+          <template slot="header">
+            <div class="custom_table_header">常数</div>
+          </template>
+          <template slot-scope="scope">
+            <div class="cell_center_box">
+              <el-form-item
+                :prop="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].two_constant`"
+                :rules="rules.issueConstant"
+                :show-message="false"
+              >
+                <el-input
+                  type="text"
+                  maxlength="7"
+                  :id="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].two_constant`"
+                  v-model="scope.row.two_constant"
+                  placeholder="请输入"
+                  style="text-align: center"
+                  @input="
+                    changeDataFun(
+                      $event,
+                      tableIndex,
+                      scope.$index,
+                      'two_constant'
+                    );
+                    scope.row.two_constant = numInputChange(
+                      scope.row.two_constant
+                    );
+                  "
+                ></el-input>
+              </el-form-item>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="issueId" label="选项个数" width="80px">
+          <template slot-scope="scope">
+            <div>
+              {{ optionLength(scope.row.issueId) }}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="orderNo" label="选项" width="70px">
+          <template slot-scope="scope">
+            <div class="btn_box">
+              <div class="btn_div">
+                <img
+                  @click="
+                    $emit('CHANGE_TABLE_ROW', {
+                      type: 3,
+                      tableIndex,
+                      rowIndex: scope.$index,
+                      groupId: scope.row.groupId,
+                      issueId: scope.row.issueId
+                    })
+                  "
+                  src="@/images/add-new-rule-sub.png"
+                  alt=""
+                  title="添加"
+                />
+              </div>
+              <div
+                class="btn_div"
+                v-if="imposeRestrictionsRemoveOnOption(scope.row.issueId)"
+              >
+                <img
+                  @click="
+                    $emit('CHANGE_TABLE_ROW', {
+                      type: -3,
+                      tableIndex,
+                      rowIndex: scope.$index
+                    })
+                  "
+                  src="@/images/add-new-rule-del.png"
+                  alt=""
+                  title="删除"
+                />
+              </div>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="content"
+          :width="tableResultType === 1 ? '200px' : ''"
+        >
+          <template slot="header">
+            <div class="custom_table_header">选项内容</div>
+          </template>
+          <template slot-scope="scope">
+            <el-form-item
+              :prop="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].content`"
+              :rules="rules.content"
+            >
+              <el-input
+                :id="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].content`"
+                type="textarea"
+                rows="1"
+                :autosize="true"
+                resize="none"
+                v-model="scope.row.content"
+                clearable
+                maxlength="300"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="content"
+          label="编码"
+          :width="tableResultType === 2 ? '200px' : '100px'"
+          v-if="tableResultType === 1"
+        >
+          <template slot-scope="scope">
+            <el-form-item
+              ><el-select
+                clearable
+                remote
+                filterable
+                :remote-method="searchRuleCode"
+                @focus="ruleCodeFocus(scope.$index)"
+                v-model.trim="scope.row.ruleCode"
+              >
+                <el-option
+                  v-for="item in scope.row.ruleCodeList"
+                  :key="item.code"
+                  :value="item.code"
+                >
+                  <span>{{ item.name }}</span>
+                  <span>({{ item.code }})</span>
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="content"
+          width="90px"
+          v-if="tableResultType === 1"
+        >
+          <template slot="header">
+            <div class="custom_table_header">分值</div>
+          </template>
+          <template slot-scope="scope">
+            <el-form-item
+              :prop="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].score`"
+              :rules="rules.score"
+            >
+              <el-input
+                :id="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].score`"
+                type="text"
+                maxlength="7"
+                @input="scope.row.score = numInputChange(scope.row.score)"
+                v-model="scope.row.score"
+                clearable
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="result"
+          width="200px"
+          v-if="tableResultType === 2"
+        >
+          <template slot="header">
+            <div class="custom_table_header">结果</div>
+          </template>
+          <template slot-scope="scope">
+            <el-form-item
+              :prop="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].result`"
+              :rules="rules.result"
+            >
+              <el-input
+                :id="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].result`"
+                type="textarea"
+                rows="1"
+                :autosize="true"
+                resize="none"
+                v-model="scope.row.result"
+                clearable
+                maxlength="10"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="pushInfo"
+          label="建议"
+          v-if="tableResultType === 2"
+        >
+          <template slot-scope="scope">
+            <el-form-item
+              :prop="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].pushInfo`"
+              :rules="rules.pushInfo"
+              class="showScroll"
+            >
+              <el-input
+                :id="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].pushInfo`"
+                type="textarea"
+                rows="2"
+                resize="none"
+                v-model="scope.row.pushInfo"
+                clearable
+                maxlength="500"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+import rules from "./rules";
+import api from "@api/knowledgeTree.js";
+import { numInputChange } from "./util";
+export default {
+  name: "scaleTable",
+  data() {
+    return {
+      tableShow: true,
+      rules: rules,
+      ruleCodeIndex: null
+    };
+  },
+  methods: {
+    numInputChange,
+    changeDataFun(val, tableIndex, rowIndex, name) {
+      this.$emit("CHANGE_ISSUE_CONTENT", {
+        value: val,
+        tableIndex,
+        rowIndex,
+        name
+      });
+    },
+    resizeTable() {
+      setTimeout(() => {
+        this.tableData.forEach((item, index) => {
+          this.$refs[
+            `klScaleParent[${this.tableIndex}].klScaleSaveGroup[${index}].content`
+          ] &&
+            this.$refs[
+              `klScaleParent[${this.tableIndex}].klScaleSaveGroup[${index}].content`
+            ].resizeTextarea();
+          this.$refs[
+            `klScaleParent[${this.tableIndex}].klScaleSaveGroup[${index}].two_content`
+          ] &&
+            this.$refs[
+              `klScaleParent[${this.tableIndex}].klScaleSaveGroup[${index}].two_content`
+            ].resizeTextarea();
+          this.$refs[
+            `klScaleParent[${this.tableIndex}].klScaleSaveGroup[${index}].result`
+          ] &&
+            this.$refs[
+              `klScaleParent[${this.tableIndex}].klScaleSaveGroup[${index}].result`
+            ].resizeTextarea();
+          this.$refs[
+            `klScaleParent[${this.tableIndex}].klScaleSaveGroup[${index}].pushInfo`
+          ] &&
+            this.$refs[
+              `klScaleParent[${this.tableIndex}].klScaleSaveGroup[${index}].pushInfo`
+            ].resizeTextarea();
+        });
+      }, 100);
+    },
+    ruleCodeFocus(index) {
+      this.ruleCodeIndex = index;
+    },
+    searchRuleCode(val) {
+      api
+        .searchRuleCode({ name: val === "" ? null : val, type: 1 })
+        .then((res) => {
+          if (res.data.code == "0") {
+            this.$emit(
+              "CHANGE_FORM_DATA",
+              this.tableIndex,
+              this.ruleCodeIndex,
+              "ruleCodeList",
+              res.data.data
+            );
+          }
+        });
+    },
+    addGroup() {},
+    // 单选、多选
+    handleSelectTypeBtn(index, type) {
+      this.$emit(
+        "CHANGE_FORM_DATA",
+        this.tableIndex,
+        index,
+        "two_selectType",
+        type
+      );
+      this.changeDataFun(type, this.tableIndex, index, "two_selectType");
+    },
+    // 计算表格选项内容的值
+    optionLength(val) {
+      if (val || val === 0) {
+        const accordWithThis = this.tableData.filter(
+          (item) => item.issueId === val
+        );
+        return accordWithThis.length ? accordWithThis.length : 0;
+      }
+    },
+    // 表格合并单元格逻辑
+    getSpanArr(data) {
+      this.spanArr = [];
+      this.spanArr1 = [];
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          // 如果是第一条记录(即索引是0的时候),向数组中加入1
+          /** *
+           * 例子:
+           * name:1
+           * name:1
+           * name:2
+           * name:2
+           * 最终结果:spanArr = [2,0,2,0]
+           */
+          this.spanArr.push(1);
+          this.pos = 0;
+          this.spanArr1.push(1);
+          this.pos1 = 0;
+        } else {
+          if (data[i].groupId === data[i - 1].groupId) {
+            // 如果remark相等就累加,并且push 0
+            this.spanArr[this.pos] += 1;
+            this.spanArr.push(0);
+          } else {
+            // 不相等push 1,并且pos 要换成当前下标
+            this.spanArr.push(1);
+            this.pos = i;
+          }
+
+          if (data[i].issueId === data[i - 1].issueId) {
+            // 如果remark相等就累加,并且push 0
+            this.spanArr1[this.pos1] += 1;
+            this.spanArr1.push(0);
+          } else {
+            // 不相等push 1,并且pos 要换成当前下标
+            this.spanArr1.push(1);
+            this.pos1 = i;
+          }
+        }
+      }
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex == 0) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      } else if (
+        column.label == "问题" ||
+        column.label == "选择" ||
+        column.label == "问题内容" ||
+        column.label == "系数" ||
+        column.label == "常数" ||
+        column.label == "选项个数"
+      ) {
+        const _row = this.spanArr1[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+    },
+    // 删除组限制:剩余一组时隐藏删除按钮
+    imposeRestrictionsRemoveOnGroup(groupId) {
+      // 查找有没有其他组存在 如果为0的话则不存在
+      const otherGroupLength = this.tableData.filter(
+        (item) => item.groupId !== groupId
+      ).length;
+      return otherGroupLength;
+    },
+    // 删除问题限制:该组剩余一个问题时隐藏删除按钮
+    imposeRestrictionsRemoveOnIssue(val) {
+      const { groupId, issueId } = val;
+      // 获取该组所有的issus
+      const thisGroups = this.tableData.filter(
+        (item) => item.groupId === groupId
+      );
+      // 查找该组有没有其他问题 otherIssueLength为0表示只有当前一个问题存在 所以隐藏删除按钮
+      const otherIssueLength = thisGroups.filter(
+        (item) => item.issueId !== issueId
+      ).length;
+
+      if (otherIssueLength) {
+        return true;
+      }
+      return false;
+    },
+    // 删除选项限制:该问题剩余一个选项时隐藏删除按钮
+    imposeRestrictionsRemoveOnOption(issueId) {
+      // 查找同组的问题,如果只有一个问题则隐藏删除按钮
+      const thisOptionByissueIdLenth = this.tableData.filter(
+        (item) => item.issueId === issueId
+      ).length;
+      if (thisOptionByissueIdLenth > 1) {
+        return true;
+      }
+      return false;
+    }
+  },
+  created() {
+    this.getSpanArr(this.tableData);
+  },
+  watch: {
+    tableData: {
+      handler() {
+        this.getSpanArr(this.tableData);
+      },
+      deep: true
+    },
+    tableResultType() {
+      this.tableShow = false;
+
+      setTimeout(() => {
+        this.tableShow = true;
+      });
+    }
+  },
+  props: {
+    tableData: {
+      default: []
+    },
+    tableIndex: {
+      required: true
+    },
+    tableResultType: {
+      required: true,
+      default: 2
+    }
+  }
+};
+</script>

+ 35 - 0
src/components/knowledgeExtra/AddAssess/util.js

@@ -0,0 +1,35 @@
+export const numInputChange = (value, len = 5, decimals = 1) => {
+  // value:修改的数字  len 总长度   decimals:允许小数点后几位
+  //todo 5位整数数加一位小数
+  let isMinus = false;
+  value += "";
+  if (value[0] == '-') {
+    isMinus = true;
+    len = len - 1;
+  }
+  value = value.replace(/[^\d.]/g, '');
+  let index = value.lastIndexOf(".");
+
+  if (index != -1) {
+    let [int, dec] = value.split(".");
+    if (dec.length > decimals) {
+      dec = dec.slice(0, dec.length - 1);
+    }
+
+    if (int.length > len) {
+      int = int.slice(0, int.length - 1);
+    }
+    if (int.length == 0) {
+      int = 0;
+    }
+    value = int + "." + dec;
+  } else {
+    if (value.length > len) {
+      value = value.slice(0, value.length - 1);
+    }
+  }
+  let res = value
+  if (isMinus) { res = '-' + res };
+  if (parseFloat(res) == 'NaN') res = 0;
+  return res;
+}

+ 592 - 187
src/components/knowledgeExtra/AddDevKnow.vue

@@ -2,104 +2,203 @@
   <el-scrollbar style="height: 100%" ref="elscrollbar" id="message-container">
     <div class="NoiseTemplateWrapper TemplateWrapper knowledgeWrapper">
       <crumbs
-        :title="'医学术语静态知识维护-'+title"
+        :title="'医学术语静态知识维护-' + title"
         class="topBack"
         :param="$route.params"
         linkTo="StaticInfo"
       ></crumbs>
+
       <div class="info-container">
-        <el-form :rules="rules" :model="form" label-width="160px" ref="groups">
-          <el-form-item v-if="!isEdit" label="选择标准术语:" prop="selectedTerm">
-            <el-select
-              v-model="form.selectedTerm"
-              filterable
-              remote
-              clearable
-              :loading="showDrop"
-              loading-text="加载中..."
-              @change="changeWord"
-              @visible-change="handleVisible"
-              value-key="id"
-              @clear="handleClear"
-              ref="termName"
-              placeholder="搜索"
-              :remote-method="searchTerms"
+        <el-form :rules="rules1" :model="form" label-width="160px" ref="groups1" size="mini">
+          <div class="container_top">
+            <div v-if="!isEdit" style="margin-right: 40px">
+              <el-form-item label="选择标准术语:" prop="selectedTerm">
+                <el-select
+                  v-model="form.selectedTerm"
+                  filterable
+                  remote
+                  clearable
+                  :loading="showDrop"
+                  loading-text="加载中..."
+                  @change="changeWord"
+                  @visible-change="handleVisible"
+                  value-key="id"
+                  @clear="handleClear"
+                  ref="termName"
+                  placeholder="搜索"
+                  :remote-method="searchTerms"
+                >
+                  <el-option
+                    v-for="(term, idx) in terms"
+                    :key="idx"
+                    :label="
+                      term.name +
+                      (term.typeName ? '(' + term.typeName + ')' : '')
+                    "
+                    :value="term"
+                    :title="
+                      term.name +
+                      (term.typeName ? '(' + term.typeName + ')' : '')
+                    "
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </div>
+
+            <el-form-item label="已选择标准术语:" label-width="160px">
+              {{
+              form.selectedTermName
+              }}
+            </el-form-item>
+          </div>
+        </el-form>
+        <div class="tabs_box">
+          <div class="tabs">
+            <div
+              class="tabs_pane"
+              :style="
+                tabActive == 'one'
+                  ? { color: '#fff', background: '#00c7da' }
+                  : ''
+              "
+              @click="tabActiveChange('one')"
+              v-if="staticTabShow"
             >
-              <el-option
-                v-for="(term,idx) in terms"
-                :key="idx"
-                :label="term.name+(term.typeName?'('+term.typeName+')':'')"
-                :value="term"
-                :title="term.name+(term.typeName?'('+term.typeName+')':'')"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="已选择标准术语:" label-width="160px">{{form.selectedTermName}}</el-form-item>
-          <el-form-item
-            v-if="form.selectedTerm&&(form.typeId==1||form.typeId==3||form.typeId==4||form.typeId==5||form.typeId==6)"
-            :label="titleChange"
-            prop="titleChange"
-            label-width="160px"
-          >
-            <el-input v-model="form.titleChange"></el-input>
-          </el-form-item>
-          <p class="line"></p>
-          <DevInfo
-            v-for="(f,i) in form.prags"
-            v-if="!upload"
-            :key="(i+1)*10000 + showType"
-            :data="f"
-            :index="i"
-            :total="form.prags.length"
-            :isEdit="isEdit"
-            :isCopy="isCopy"
-            ref="subForm"
-            @add="addParagraph(i)"
-            @del="delParagraph"
-            @reOrder="reOrder"
-            :showType="showType"
-          ></DevInfo>
-          <el-form-item v-if="upload" label="标题名称搜索:" prop="fileTitle" label-width="160px">
-            <el-input v-model="form.fileTitle"></el-input>
-          </el-form-item>
-          <el-form-item
-            v-if="upload"
-            label="上传文件:"
-            ref="upload"
-            prop="fileList"
-            label-width="160px"
-          >
-            <el-upload
-              @mouseenter.native="handleMouseenter"
-              @mouseleave.native="handleMouseleave"
-              class="upload-demo"
-              :action="config.urls.promptServer"
-              name="upfile"
-              :multiple="false"
-              :limit="1"
-              :on-preview="handlePreview"
-              :on-remove="handleRemove"
-              :before-upload="handleBeforeUpLoad"
-              :before-remove="beforeRemove"
-              :on-change="handleChange"
-              :on-success="handleSuccess"
-              :show-file-list="showFileList"
-              :file-list="form.fileList"
+              静态信息
+              <img
+                @click.stop="handleStaticTab"
+                src="@/images/tab_add.png"
+                alt
+                v-if="AssesComSHow && !AssesTabSHow"
+              />
+              <img
+                v-if="AssesTabSHow && AssesComSHow"
+                @click.stop="closeStaticTab"
+                src="@/images/tab_close.png"
+                alt
+              />
+            </div>
+            <div
+              class="tabs_pane"
+              :style="
+                tabActive == 'two'
+                  ? { color: '#fff', background: '#00c7da' }
+                  : ''
+              "
+              @click="tabActiveChange('two')"
+              v-if="AssesTabSHow && AssesComSHow"
             >
-              <el-button size="small" type="primary" v-if="showUpLoad">点击上传</el-button>
-              <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
-            </el-upload>
-            <span class="tipInfo" v-show="isShowTip">{{form.fileList[0]&&form.fileList[0].name}}</span>
-            <!-- <el-button size="small" type="primary" >点击上传</el-button> -->
-          </el-form-item>
-          <el-form-item label-width="160px">
-            <div class="uploadInfo" v-if="isSuccessUpload===1">文件上传中,请稍等...</div>
-          </el-form-item>
-        </el-form>
-        <div class="btn">
-          <el-button type="primary" :disabled="saveDisable" @click="submitForm">确 定</el-button>
+              评估内容
+              <img
+                v-if="!staticTabShow"
+                @click.stop="handleAssesTab"
+                src="@/images/tab_add.png"
+                alt
+              />
+              <img
+                v-if="staticTabShow"
+                @click.stop="closeAssesTab"
+                src="@/images/tab_close.png"
+                alt
+              />
+            </div>
+          </div>
+        </div>
+
+        <p class="line"></p>
+        <div class="tab_box_left" v-show="tabActive == 'one'" v-if="staticTabShow">
+          <el-form :rules="rules" :model="form" label-width="160px" ref="groups" size="mini">
+            <div
+              v-if="
+                form.selectedTerm &&
+                (form.typeId == 1 ||
+                  form.typeId == 3 ||
+                  form.typeId == 4 ||
+                  form.typeId == 5 ||
+                  form.typeId == 6)
+              "
+            >
+              <el-form-item
+                :label="titleChange"
+                prop="titleChange"
+                label-width="160px"
+                style="margin-bottom: 20px"
+              >
+                <el-input v-model="form.titleChange"></el-input>
+              </el-form-item>
+            </div>
+            <div v-if="!upload">
+              <DevInfo
+                v-for="(f, i) in form.prags"
+                :key="(i + 1) * 10000 + showType"
+                :data="f"
+                :index="i"
+                :total="form.prags.length"
+                :isEdit="isEdit"
+                :isCopy="isCopy"
+                ref="subForm"
+                @add="addParagraph(i)"
+                @del="delParagraph"
+                @reOrder="reOrder"
+                :showType="showType"
+              ></DevInfo>
+            </div>
+
+            <div v-if="upload">
+              <el-form-item label="标题名称搜索:" prop="fileTitle" label-width="160px">
+                <el-input v-model="form.fileTitle"></el-input>
+              </el-form-item>
+            </div>
+
+            <div>
+              <el-form-item
+                v-if="upload"
+                label="上传文件:"
+                ref="upload"
+                prop="fileList"
+                label-width="160px"
+              >
+                <el-upload
+                  @mouseenter.native="handleMouseenter"
+                  @mouseleave.native="handleMouseleave"
+                  class="upload-demo"
+                  :action="config.urls.promptServer"
+                  name="upfile"
+                  :multiple="false"
+                  :limit="1"
+                  :on-preview="handlePreview"
+                  :on-remove="handleRemove"
+                  :before-upload="handleBeforeUpLoad"
+                  :before-remove="beforeRemove"
+                  :on-change="handleChange"
+                  :on-success="handleSuccess"
+                  :show-file-list="showFileList"
+                  :file-list="form.fileList"
+                >
+                  <el-button size="small" type="primary" v-if="showUpLoad">点击上传</el-button>
+                  <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
+                </el-upload>
+                <span class="tipInfo" v-show="isShowTip">
+                  {{
+                  form.fileList[0] && form.fileList[0].name
+                  }}
+                </span>
+                <!-- <el-button size="small" type="primary" >点击上传</el-button> -->
+              </el-form-item>
+            </div>
+            <el-form-item label-width="160px">
+              <div class="uploadInfo" v-if="isSuccessUpload === 1">文件上传中,请稍等...</div>
+            </el-form-item>
+          </el-form>
+        </div>
+        <div v-if="AssesComSHow && AssesTabSHow" v-show="tabActive == 'two'">
+          <AddAssess @scrollTo="scrollTo" :childScaleData="scaleData" ref="assessRef" />
         </div>
       </div>
+
+      <div class="btn">
+        <el-button type="primary" :disabled="saveDisable" @click="submitForm">确 定</el-button>
+      </div>
     </div>
   </el-scrollbar>
 </template>
@@ -111,14 +210,22 @@ import api from '@api/knowledgeTree.js';
 import DevInfo from './DevInfo';
 import config from '@api/config';
 import $ from 'jquery';
+import AddAssess from './AddAssess';
 
 export default {
   name: 'AddDevKnow',
   components: {
-    DevInfo
+    DevInfo,
+    AddAssess
   },
   data() {
     return {
+      staticTabShow: true,
+      AssesTabSHow: true,
+      staticComShow: true,
+      AssesComSHow: false,
+      toAssesTermId: null,
+      scaleData: null,
       isFixedTop: true,
       isEdit: false,
       isCopy: false,
@@ -150,10 +257,12 @@ export default {
         fileTitle: '',
         titleChange: ''
       },
-      rules: {
+      rules1: {
         selectedTerm: [
           { required: true, message: '请选择标准术语', trigger: 'change' }
-        ],
+        ]
+      },
+      rules: {
         fileTitle: [
           { required: true, message: '请输入标题名称', trigger: 'change' },
           {
@@ -198,7 +307,8 @@ export default {
       showType: -1, // 1 诊断  2  药品   3检验套餐 4检验细项  5检查 6检查子   7手术和操作 8量表
       editCount: -1, // 页面会否被编辑 >0被编辑   =0 未编辑
       startCount: -1,
-      isSaveSuccess: false // 是否保存成功
+      isSaveSuccess: false, // 是否保存成功
+      tabActive: 'one'
     };
   },
   watch: {
@@ -222,21 +332,33 @@ export default {
   created: function() {
     const { isEdit, data, isCopy } = this.$route.params;
     if (isEdit || isCopy) {
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
       this.showType = data.type; // 编辑页确认显示类型
       this.isEdit = isEdit;
       this.isCopy = isCopy;
       this.title = isEdit ? '修改' : isCopy ? '复制' : '添加';
       (isEdit || isCopy) && this.changeWord(data);
-      if (isCopy) {
-        const _this = this;
-        setTimeout(() => {
-          _this.handleClear();
-        }, 300);
-      }
-      api.getBaseRecordById({ id: data.id })
+
+      api
+        .getBaseRecordById({ id: data.id })
         .then(res => {
           if (res.data.code == '0') {
             const data = res.data.data;
+            console.log('dwadfesvgeosboau13131213h', data.scale);
+            if (data.type === 8) {
+              this.AssesComSHow = true;
+              if (data.scale) {
+                this.scaleData = data.scale;
+                this.AssesTabSHow = true;
+              } else {
+                this.AssesTabSHow = false;
+              }
+            }
             if (this.form.typeId === 82 || this.form.typeId === 83) {
               // console.log('data',data)
               this.form.fileList =
@@ -263,25 +385,37 @@ export default {
                 data.name + (data.typeName ? '(' + data.typeName + ')' : '');
               this.form.selectedTerm =
                 data.name + (data.typeName ? '(' + data.typeName + ')' : '');
-              this.form.prags =
-                data &&
-                data.details.map(it => {
-                  return {
-                    title: it.title,
-                    position: this.mapStringToNum(it.contentType),
-                    content: it.content.replace(
-                      /{imageUrlPrefix}/g,
-                      config.imgHost
-                    ),
-                    // isReason:it.isReason,
-                    text: it.text,
-                    disabled: true
-                  };
-                });
+              if (isCopy) {
+                this.handleClear();
+              }
+              if (data.details.length) {
+                this.form.prags =
+                  data &&
+                  data.details.map(it => {
+                    return {
+                      title: it.title,
+                      position: this.mapStringToNum(it.contentType),
+                      content: it.content.replace(
+                        /{imageUrlPrefix}/g,
+                        config.imgHost
+                      ),
+                      // isReason:it.isReason,
+                      text: it.text,
+                      disabled: true
+                    };
+                  });
+              } else {
+                this.staticTabShow = false;
+                this.tabActiveChange('two');
+              }
             }
           }
+          setTimeout(() => {
+            loading.close();
+          }, 200);
         })
         .catch(error => {
+          loading.close();
           if (error.code === '900010001') {
             return false;
           }
@@ -338,11 +472,75 @@ export default {
     }
   },
   methods: {
+    scrollTo(dom) {
+      var div = this.$refs['elscrollbar'].$refs['wrap'];
+      if (dom >= 0) {
+        div.scrollTop += dom - 120;
+      } else {
+        div.scrollTop -= Math.abs(dom) + 120;
+      }
+    },
+    handleStaticTab() {
+      this.AssesTabSHow = true;
+      this.AssesComSHow = true;
+      this.tabActiveChange('two');
+    },
+    handleAssesTab() {
+      this.staticTabShow = true;
+      this.form.prags = [
+        {
+          //单个段落相关
+          title: '',
+          content: '',
+          isReason: 0,
+          orderNo: 0,
+          position: [],
+          text: ''
+        }
+      ];
+      this.tabActiveChange('one');
+    },
+    closeStaticTab() {
+      this.$alert('确定要删除该标签?删除后该标签内容将会被清空!', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        // cancelButtonClass: 'leaveBtn',
+        // customClass: 'leaveBox',
+        type: 'warning'
+      })
+        .then(() => {
+          this.staticTabShow = false;
+          this.tabActiveChange('two');
+        })
+        .catch(() => {});
+    },
+    closeAssesTab() {
+      this.$alert('确定要删除该标签?删除后该标签内容将会被清空!', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        // cancelButtonClass: 'leaveBtn',
+        // customClass: 'leaveBox',
+        type: 'warning'
+      })
+        .then(() => {
+          this.AssesTabSHow = false;
+          // this.AssesComSHow = false;
+          this.tabActiveChange('one');
+        })
+        .catch(() => {});
+    },
+    tabActiveChange(type) {
+      this.tabActive = type;
+      if (type == 'two') {
+        setTimeout(() => {
+          this.$refs.assessRef.resizeTable();
+        }, 200);
+      }
+    },
     handleClear() {
       this.form.selectedTermName = '';
       this.form.selectedTerm = '';
       this.form.titleChange = '';
-      // console.log('处理清空的操作');
     },
 
     handleMouseenter() {
@@ -354,12 +552,20 @@ export default {
       this.isShowTip = false;
     },
     changeWord(newVal) {
-      // console.log(newVal, '选中');
+      if (newVal.typeName == '量表') {
+        this.AssesComSHow = true;
+      } else {
+        this.staticTabShow = true;
+        this.AssesComSHow = false;
+        this.tabActive = 'one';
+      }
+      this.toAssesTermId = newVal.id;
       this.showType = newVal.type || -1;
       const name = newVal.name;
       const typeName = newVal.typeName;
       const type = newVal.type;
-      this.form.selectedTermName = name + (typeName ? '(' + typeName + ')' : '');
+      this.form.selectedTermName =
+        name + (typeName ? '(' + typeName + ')' : '');
       // this.form.selectedTerm = name + (typeName ? '(' + typeName + ')' : '');
       this.form.name = name;
       this.form.fileList = [];
@@ -445,14 +651,16 @@ export default {
       }
       //搜索术语列表
       this.showDrop = true;
-      api.staticKnowledgeBaseInfo({ inputStr: query.trim(), types: [0] }).then(res => {
-        this.showDrop = false;
-        if (res.data.code === '0') {
-          this.terms = res.data.data;
-        } else {
-          this.warning('数据获取失败');
-        }
-      });
+      api
+        .staticKnowledgeBaseInfo({ inputStr: query.trim(), types: [0] })
+        .then(res => {
+          this.showDrop = false;
+          if (res.data.code === '0') {
+            this.terms = res.data.data;
+          } else {
+            this.warning('数据获取失败');
+          }
+        });
     },
     mapStringToNum(str) {
       return str.split(',').map(it => {
@@ -468,11 +676,11 @@ export default {
       let positionArr = positiontemp.reduce(function(a, b) {
         return a.concat(b);
       }); // 所有被选中的值集合
-      console.log(positionArr, 'positionArr');
-      console.log(this.showType, '当前页的显示类型');
+      // console.log(positionArr, "positionArr");
+      // console.log(this.showType, "当前页的显示类型");
       let isVisFlag = positionArr.some(item => item === 2);
       let isDiagFlag = positionArr.some(item => item === 3);
-      console.log(isVisFlag, 'isVisFlag是否显示');
+      // console.log(isVisFlag, "isVisFlag是否显示");
       if (
         (this.showType == 3 ||
           this.showType == 4 ||
@@ -480,16 +688,16 @@ export default {
           this.showType == 6) &&
         isVisFlag
       ) {
-        console.log('进入校验');
+        // console.log("进入校验");
         //若医学术语为检验/检查,且内容类型选择了注意事项,此时“注意事项标题”是必填项
-        this.$refs.groups.clearValidate();
+        this.$refs.groups && this.$refs.groups.clearValidate();
         this.rules.titleChange.push({
           required: true,
           message: '请输入注意事项标题',
           trigger: 'change'
         });
-        this.$refs.groups.validateField('titleChange');
-        this.$refs.groups.validateField('selectedTerm');
+        this.$refs.groups && this.$refs.groups.validateField('titleChange');
+        this.$refs.groups && this.$refs.groups.validateField('selectedTerm');
         this.rules.titleChange = this.rules.titleChange.slice(0, 1);
 
         if (this.form.titleChange.trim() !== '') {
@@ -505,14 +713,14 @@ export default {
         // return;
       } else if (isDiagFlag && this.showType == 1) {
         // 若医学术语为诊断,且内容类型选择了临床路径,此时“临床路径标题”是必填项
-        this.$refs.groups.clearValidate();
+        this.$refs.groups && this.$refs.groups.clearValidate();
         this.rules.titleChange.push({
           required: true,
           message: '请输入临床路径标题',
           trigger: 'change'
         });
-        this.$refs.groups.validateField('titleChange');
-        this.$refs.groups.validateField('selectedTerm');
+        this.$refs.groups && this.$refs.groups.validateField('titleChange');
+        this.$refs.groups && this.$refs.groups.validateField('selectedTerm');
         this.rules.titleChange = this.rules.titleChange.slice(0, 1);
 
         if (this.form.titleChange.trim() !== '') {
@@ -527,59 +735,171 @@ export default {
         }
       }
     },
-
-    submitForm() {
-      if (this.isSuccessUpload === 1) {
-        this.warning('文件上传中,请稍等');
-        return;
-      }
-      let flagVal = this.formVal(); // 额外的表单校验
-      if (flagVal === false) return;
-      //验证外层表单
+    async submitForm() {
+      let all = [];
       let goOn = true,
         it = null;
-      let outIsVia = true; // 外层验证是否通过
-      this.$refs.groups.validate(valid => {
-        if (!valid) {
-          goOn = false;
-          outIsVia = false;
-          return false;
-        }
-      });
-      //验证段落表单
+      let assessRule = false;
       let viewHeight = 0; // 定位到表单校验的高度
       let viewHeightArr = []; // 表单校验出错高度的所有数组
-      if (this.form.typeId !== 82 && this.form.typeId !== 83) {
-        for (let i = 0; i < this.$refs.subForm.length; i++) {
-          it = this.$refs.subForm[i];
-          viewHeight += it.$el.offsetHeight;
-          it.$refs.form.validate(valid => {
-            if (!valid) {
-              goOn = false;
-              viewHeightArr.push(viewHeight);
-            }
-          });
+      let outIsVia = true; // 外层验证是否通过
+      let fvalidate1 = new Promise((resolve, reject) => {
+        //wanglei 添加promise
+        this.$refs.groups1.validate((valid, object) => {
+          if (valid) {
+            resolve(true);
+          } else {
+            reject('top', object);
+            return false;
+          }
+        });
+      });
+      all.push(fvalidate1);
+      if (this.staticTabShow) {
+        if (this.isSuccessUpload === 1) {
+          this.warning('文件上传中,请稍等');
+          return;
+        }
+        let flagVal = this.formVal(); // 额外的表单校验
+        if (flagVal === false) return;
+        //验证外层表单
+
+        let fvalidate = new Promise((resolve, reject) => {
+          //wanglei 添加promise
+          this.$refs.groups &&
+            this.$refs.groups.validate((valid, object) => {
+              if (valid) {
+                resolve(true);
+              } else {
+                reject('f', object);
+                return false;
+              }
+            });
+        });
+
+        // end....
+        //验证段落表单
+        // return;
+        all.push(fvalidate);
+        if (this.form.typeId !== 82 && this.form.typeId !== 83) {
+          for (let i = 0; i < this.$refs.subForm.length; i++) {
+            all.push(
+              new Promise((resolve, reject) => {
+                it = this.$refs.subForm[i];
+                // viewHeight += it.$el.getBoundingClientRect().top;
+                it.$refs.form.validate((valid, object) => {
+                  if (!valid) {
+                    reject('f', object);
+                    goOn = false;
+                    viewHeightArr.push(it.$el);
+                  } else {
+                    resolve(true);
+                  }
+                });
+              })
+            );
+          }
         }
       }
-      // console.log(viewHeightArr,'viewHeightArr');
-      if (!goOn) {
-        var div = this.$refs['elscrollbar'].$refs['wrap'];
-        if (outIsVia) {
-          // 外层校验通过,跳转至下层校验具体位置
+
+      // 表单验证
+
+      if (this.$refs.assessRef) {
+        all.push(...this.$refs.assessRef.assessCommit());
+      }
+      // 批量处理Promise返回
+      let transferedPromises = promises => {
+        // 返回一个处理之后的promise数组
+        return promises.map(promise => {
+          return promise.then(res => res).catch(err => err);
+        });
+      };
+      let promiseArr = transferedPromises(all);
+      await Promise.all(promiseArr).then(resArr => {
+        let cErrIndex = resArr.findIndex(item => item.type == 'c');
+        let fErrIndex = resArr.findIndex(item => item == 'f');
+        let topErrIndex = resArr.findIndex(item => item == 'top');
+        if (topErrIndex != -1) {
+          outIsVia = false;
+          var div = this.$refs['elscrollbar'].$refs['wrap'];
           this.$nextTick(() => {
-            div.scrollTop = +viewHeightArr[0] - 150;
+            div.scrollTop = 0;
           });
-        } else {
-          // 外层校验没通过,页面滚动到顶部
+        } else if (cErrIndex != -1 && fErrIndex != -1) {
+          if (this.staticTabShow) {
+            goOn = false;
+          }
+          this.tabActive = 'one';
+          this.$message({
+            showClose: true,
+            message: `"静态信息"和"评估内容"标签内有未填写项目,请填写完整或者删除该标签!`,
+            type: 'warning'
+          });
+        } else if (cErrIndex != -1 && fErrIndex == -1) {
+          this.tabActive = 'two';
+          this.$message({
+            showClose: true,
+            message: `"评估内容"标签内有未填写项目,请填写完整或者删除该标签!`,
+            type: 'warning'
+          });
+          let cErrArr = resArr.filter(item => item.type == 'c');
+          if (cErrArr) {
+            cErrArr = Object.keys(cErrArr[0].object);
+          }
+
           this.$nextTick(() => {
-            div.scrollTop = 0;
+            setTimeout(() => {
+              let domTop = this.$refs.assessRef.getDom(cErrArr[0]);
+              var div = this.$refs['elscrollbar'].$refs['wrap'];
+              if (domTop >= 0) {
+                div.scrollTop += domTop - 120;
+              } else {
+                div.scrollTop -= Math.abs(domTop) + 120;
+              }
+            }, 100);
+          });
+        } else if (cErrIndex == -1 && fErrIndex != -1) {
+          this.tabActive = 'one';
+          this.$message({
+            showClose: true,
+            message: `"静态信息"标签内有未填写项目,请填写完整或者删除该标签!`,
+            type: 'warning'
           });
+        } else {
+          assessRule = true;
         }
+      });
+      if (this.staticTabShow && !goOn) {
+        setTimeout(() => {
+          var div = this.$refs['elscrollbar'].$refs['wrap'];
+          if (outIsVia) {
+            // 外层校验通过,跳转至下层校验具体位置
+            let sTop = viewHeightArr[0].getBoundingClientRect().top;
+            this.$nextTick(() => {
+              if (sTop >= 0) {
+                div.scrollTop += sTop - 120;
+              } else {
+                div.scrollTop -= Math.abs(sTop) + 120;
+              }
+            });
+          } else {
+            // 外层校验没通过,页面滚动到顶部
+            this.$nextTick(() => {
+              div.scrollTop = 0;
+            });
+          }
+        }, 200);
+
         return;
       }
+
+      if (!assessRule) return;
+
       //通过必填验证,提交保存
-      const item = this.form.prags;
+
       let param = [];
+      // const item = this.form.prags;
+
       if (this.form.typeId === 82 || this.form.typeId === 83) {
         if (this.form.fileList.length === 0) {
           this.warning('文件未上传,不存储数据');
@@ -598,6 +918,8 @@ export default {
           )
         );
       } else {
+        // if (this.staticTabShow) {
+        // }
         let data = this.form.prags,
           tempArr = [],
           paramsAll = {},
@@ -620,11 +942,38 @@ export default {
             ? this.form.titleChange
             : '';
         paramsAll.type = this.form.typeId;
-        paramsAll.details = tempArr;
+        if (this.staticTabShow) {
+          paramsAll.details = tempArr;
+        } else {
+          paramsAll.details = null;
+        }
         param = paramsAll;
+        if (!param.details) param.details = [];
+        param.details.forEach(item => {
+          let regExp = new RegExp(config.imgHost, 'g');
+          item.content = item.content.replace(regExp, '{imageUrlPrefix}');
+        });
+        // 评估内容的数据
+        param.scale = {};
+        console.log(
+          'this.AssesComSHow',
+          this.AssesComSHow,
+          'AssesTabSHow',
+          this.AssesTabSHow
+        );
+        if (this.AssesComSHow && this.AssesTabSHow) {
+          const assessParam = this.$refs.assessRef.formtParams();
+          param.scale = assessParam;
+          param.scale.conceptId = this.toAssesTermId;
+          const userInfo = localStorage.getItem('userLoginDTO');
+          param.scale.modifier = userInfo.linkman;
+        }
       }
+      // return;
       // this.showSaveDialog(param,'是否'+(this.isEdit?'修改':'保存')+'该静态知识?');
-
+      console.log('param-------');
+      console.dir(param);
+      // return;
       if (!this.isEdit) {
         // 新增页面
         this.saveDisable = true;
@@ -646,7 +995,9 @@ export default {
     //保存编辑 接口
     sendSaveOrEdit(param) {
       this.isCopy && (param.id = undefined);
-      api.saveBaseOrUpdateRecord(param)
+      param.source = 1; //0:医院端  1:云平台
+      api
+        .saveBaseOrUpdateRecord(param)
         .then(res => {
           if (res.data.code === '0') {
             this.isSuccessUpload = 0; // 修改文件上传状态为0
@@ -770,9 +1121,10 @@ export default {
   top: 0;
 }
 .info-container {
-  background: #fff;
-  padding: 20px;
-  margin: 70px 20px -20px 20px;
+  // background: #fff;
+  // padding: 20px 0;
+  margin: 60px 20px -20px 20px;
+  min-width: 960px;
   .el-input__inner {
     width: 200px;
   }
@@ -782,17 +1134,17 @@ export default {
   .add-prg .el-form-item {
     margin-bottom: 20px;
   }
-  .el-form-item {
-    margin-bottom: 8px !important;
-  }
+  // .el-form-item {
+  //   margin-bottom: 8px !important;
+  // }
 }
 // .cancel span {
 //   color: #22ccc8;
 // }
 .line {
-  border-top: 1px #dcdfe6 solid;
-  margin-bottom: 25px;
-  margin-top: 25px;
+  // border-top: 1px #dcdfe6 solid;
+  background: #dcdfe6;
+  height: 12px;
 }
 .NoiseTemplateWrapper .info-container .el-input__inner {
   width: 250px;
@@ -855,7 +1207,9 @@ export default {
 }
 .btn {
   text-align: right;
-  padding-right: 20px;
+  margin: 10px 20px;
+  padding: 30px;
+  background: #fff;
 }
 .el-message-box {
   /deep/ .el-icon-warning {
@@ -882,5 +1236,56 @@ export default {
     }
   }
 }
+/deep/ .el-tabs__header {
+  padding: 0 10px !important;
+}
+.container_top {
+  display: flex;
+  padding: 20px 30px;
+}
+.tabs_box {
+  display: flex;
+  align-items: center;
+}
+.tabs {
+  display: flex;
+  margin: 0px 30px;
+  font-size: 14px;
+  height: 31px;
+  .tabs_pane {
+    position: relative;
+    width: 92px;
+    height: 32px;
+    border-radius: 6px 6px 0px 0px;
+    border: 1px solid #00c7da;
+    text-align: center;
+    line-height: 32px;
+    margin-right: 32px;
+    box-sizing: border-box;
+    color: #00c7da;
+    cursor: pointer;
+    img {
+      position: absolute;
+      right: -18px;
+      bottom: 0;
+      width: 18px;
+      height: 18px;
+    }
+  }
+}
+.tab_box_left {
+  padding: 30px;
+}
+
+/deep/ .el-form-item.is-success .el-input__inner,
+.el-form-item.is-success .el-textarea__inner {
+  border-color: #c9c9c9 !important;
+}
+/deep/ .el-form-item.is-success .el-textarea__inner {
+  border-color: #c9c9c9 !important;
+}
+/deep/ .el-form-item.is-success .el-textarea__inner {
+  border-color: #c9c9c9 !important;
+}
 </style>
 

+ 292 - 85
src/components/knowledgeExtra/AddDiagBase.vue

@@ -250,8 +250,9 @@
 
                     <div
                       v-if="v.title == '医学标准术语'"
-                      class="box-2"
-                      :class="items.basType===3 || items.basType===4|| items.basType===5 || items.basType===6? 'tmall' : 'taobao'"
+                      v-show="items.basType == 1"
+                      class="box-2 box-o"
+                      :class="(items.basType===3 || items.basType===4 || items.basType===5 || items.basType===6)&& items.basType == 1? 'tmall' : 'taobao'"
                     >
                       <el-form-item
                         v-if="items.basType==1 || items.basType==2 || items.basType==''"
@@ -260,15 +261,57 @@
                         '.groupVO.' +
                         index +
                         '.klDiagnoseDetail.'+i+'.basConceptId'"
-                        :rules="rules.subConceptId"
+                        :rules="items.basType == 1?rules.subConceptId : []"
                       >
                         <el-select
+                          class="searchselect"
+                          v-model.trim="items.basConceptId"
+                          multiple
+                          filterable
+                          remote
+                          :multiple-limit="50"
+                          collapse-tags
+                          reserve-keyword
+                          placeholder="请选择"
+                          :remote-method="(val)=>searchConcept(val,scope.$index,index,i)"
+                          @change="(val)=>conceptChange(val,scope.$index,index,i,items.basType)"
+                          @visible-change="(val)=>changeValue1(val,scope.$index,index,i)"
+                        >
+                          <el-option
+                            v-for="item in items.conceptList"
+                            :title="item.conceptName"
+                            :key="item.conceptId"
+                            :label="item.conceptName"
+                            :value="item.conceptId"
+                          ></el-option>
+                        </el-select>
+                      </el-form-item>
+                    </div>
+                    <div
+                      v-if="v.title == '医学标准术语'"
+                      v-show="items.basType != 1"
+                      class="box-2 box-o"
+                      :class="(items.basType===3 || items.basType===4 || items.basType===5 || items.basType===6) && items.basType != 1? 'tmall' : 'taobao'"
+                    >
+                      <el-form-item
+                        v-if="items.basType==1 || items.basType==2 || items.basType==''"
+                        :prop="'klDiagnoseTypeVO.' +
+                        scope.$index +
+                        '.groupVO.' +
+                        index +
+                        '.klDiagnoseDetail.'+i+'.conceptId'"
+                        :rules="items.basType != 1?[
+                          { required: true, message: '请选择医学标准术语', trigger: 'blur' }
+                        ]:[]"
+                      >
+                        <el-select
+                        v-show="items.basType != 1"
                           clearable
                           remote
                           filterable
                           :remote-method="(val)=>searchConcept(val,scope.$index,index,i)"
-                          v-model.trim="items.basConceptId"
-                          @change="(val)=>conceptChange(val,scope.$index,index,i)"
+                          v-model.trim="items.conceptId"
+                          @change="(val)=>conceptChange(val,scope.$index,index,i,items.basType)"
                         >
                           <el-option
                             v-for="item in items.conceptList"
@@ -429,7 +472,7 @@
                         '.groupVO.' +
                         index +
                         '.klDiagnoseDetail.'+i+'.eqValue'"
-                          v-if="items.basType===4 || items.basType===3||items.basType===6 || items.basType===5"
+                          v-if="items.basType===4 || items.basType===3 || items.basType===5 || items.basType===6"
                           maxlength="200"
                           label="正则表达式:"
                           class="discDesc"
@@ -495,7 +538,7 @@ export default {
         { title: '基础依据名称', width: 160, istar: true },
         { title: '基础依据类型', width: 130, istar: true },
         { title: '基础依据术语类型', width: 160, istar: true },
-        { title: '医学标准术语', width: 130, istar: true },
+        { title: '医学标准术语', width: 230, istar: true },
         { title: '依据具体内容', width: 850 }
       ],
       dicts: {},
@@ -527,7 +570,9 @@ export default {
                     onlyNumType: false,
                     onlyTxtType: false,
                     basTypeName: '',
-                    basConceptId: '',
+                    basConceptId: [],
+                    conceptId: '',
+                    basConceptList: [],
                     basDescription: '',
                     basLename: '',
                     basLibName: '',
@@ -568,7 +613,10 @@ export default {
       spanArr: [],
       list: [], //提交数据数组,
       i: 1,
-      onshow: true
+      onshow: true,
+      arr: [],
+      basConceptId: [],
+      conceptId: ''
     };
   },
   created() {
@@ -599,36 +647,68 @@ export default {
         item => item.ruleType === this.form.klDiagnoseTypeVO[0].conditionType
       );
       this.baseTermTypeList = this.baseTypes[index2].subMenuList;
-      const klDiagnoseTypeVO =this.form.klDiagnoseTypeVO;
-      let groupVOi,klDiagnoseDetailj;
+      const klDiagnoseTypeVO = this.form.klDiagnoseTypeVO;
+      let groupVOi, klDiagnoseDetailj;
       for (let i = 0; i < klDiagnoseTypeVO.length; i++) {
-          groupVOi =  klDiagnoseTypeVO[i].groupVO;
+        groupVOi = klDiagnoseTypeVO[i].groupVO;
         for (let j = 0; j < groupVOi.length; j++) {
           klDiagnoseDetailj = groupVOi[j].klDiagnoseDetail;
-          for (let k = 0;k <groupVOi[j].klDiagnoseDetail.length;k++) {
+          for (let k = 0; k < groupVOi[j].klDiagnoseDetail.length; k++) {
+            this.arr = [];
             var index2 = this.baseTermTypeList.findIndex(
-              item =>item.type ===klDiagnoseDetailj[k].basType
+              item => item.type === klDiagnoseDetailj[k].basType
+            );
+            klDiagnoseDetailj[k].basLibTypeList = this.baseTermTypeList[
+              index2
+            ].subMenuList;
+            // klDiagnoseDetailj[k].conceptList = this.formatData2(
+            //   klDiagnoseDetailj[k].libNameList
+            // );
+            // klDiagnoseDetailj[k].basConceptList = this.formatData2(
+            //   klDiagnoseDetailj[k].libNameList
+            // );
+            this.$set(
+              klDiagnoseDetailj[k],
+              'conceptList',
+              this.formatData2(klDiagnoseDetailj[k].libNameList)
+            );
+            this.$set(
+              klDiagnoseDetailj[k],
+              'basConceptList',
+              this.formatData2(klDiagnoseDetailj[k].libNameList)
             );
-              klDiagnoseDetailj[k].basLibTypeList = this.baseTermTypeList[index2].subMenuList;
+            if (klDiagnoseDetailj[k].basType == 1) {
+              klDiagnoseDetailj[k].libNameList.forEach(item => {
+                this.arr.push(item.basConceptId);
+              });
+              this.$set(klDiagnoseDetailj[k], 'basConceptId', this.arr);
+            } else if (klDiagnoseDetailj[k].basType == 2) {
+              klDiagnoseDetailj[k].libNameList.forEach(item => {
+                this.arr.push(item.basConceptId);
+              });
+              this.$set(klDiagnoseDetailj[k], 'conceptId', this.arr[0]);
+            }
 
-              klDiagnoseDetailj[k].conceptList = [
-              {
-                conceptName: klDiagnoseDetailj[k].basLibName,
-                conceptId: klDiagnoseDetailj[k].basConceptId
-              }
-            ];
-            if (klDiagnoseDetailj[k].maxOperator || klDiagnoseDetailj[k].minOperator) {
-                klDiagnoseDetailj[k].dataType = '1';
-            } else if (
-                klDiagnoseDetailj[k].eqValue) {
-                klDiagnoseDetailj[k].dataType = '2';
+            if (
+              klDiagnoseDetailj[k].maxOperator ||
+              klDiagnoseDetailj[k].minOperator
+            ) {
+              klDiagnoseDetailj[k].dataType = '1';
+            } else if (klDiagnoseDetailj[k].eqValue) {
+              klDiagnoseDetailj[k].dataType = '2';
             }
-            if (klDiagnoseDetailj[k].basType == 3 || klDiagnoseDetailj[k].basType == 4||klDiagnoseDetailj[k].basType == 5 || klDiagnoseDetailj[k].basType == 6) {
-                klDiagnoseDetailj[k].basTypeName = klDiagnoseDetailj[k].basLibTypeList[0].name;
-                klDiagnoseDetailj[k].basNameType = true;
+            if (
+              klDiagnoseDetailj[k].basType == 3 ||
+              klDiagnoseDetailj[k].basType == 4 ||
+              klDiagnoseDetailj[k].basType == 5 ||
+              klDiagnoseDetailj[k].basType == 6
+            ) {
+              klDiagnoseDetailj[k].basTypeName =
+                klDiagnoseDetailj[k].basLibTypeList[0].name;
+              klDiagnoseDetailj[k].basNameType = true;
             } else {
-                klDiagnoseDetailj[k].basTypeName = '';
-                klDiagnoseDetailj[k].basNameType = false;
+              klDiagnoseDetailj[k].basTypeName = '';
+              klDiagnoseDetailj[k].basNameType = false;
             }
             const onlyNum = this.dicts['onlyNum'] || '&';
             const onlyTxt = this.dicts['onlyTxt'] || '&';
@@ -636,8 +716,10 @@ export default {
             const code = onlyTxt + ',';
             let type = klDiagnoseDetailj[k].basLibType;
             let a = klDiagnoseDetailj[k].basLibType;
-              klDiagnoseDetailj[k].onlyNumType = type && codes.indexOf(a + ',') > -1;
-              klDiagnoseDetailj[k].onlyTxtType = type && code.indexOf(a + ',') > -1;
+            klDiagnoseDetailj[k].onlyNumType =
+              type && codes.indexOf(a + ',') > -1;
+            klDiagnoseDetailj[k].onlyTxtType =
+              type && code.indexOf(a + ',') > -1;
           }
         }
       }
@@ -765,8 +847,6 @@ export default {
           newArr = arr;
         }
       });
-      // console.log(newArr)
-      // this.$set(this, 'form.klDiagnoseTypeVO', newArr);
       this.getSpanArr(newArr);
     },
     getSpanArr(data) {
@@ -798,7 +878,7 @@ export default {
       }
     },
     getInitData() {
-      this.i++
+      this.i++;
       return {
         conditionType: '',
         depart_id: this.i,
@@ -814,7 +894,9 @@ export default {
                 onlyNumType: false,
                 onlyTxtType: false,
                 basTypeName: '',
-                basConceptId: '',
+                basConceptId: [],
+                conceptId: '',
+                basConceptList: [],
                 basDescription: '',
                 basLename: '',
                 basLibName: '',
@@ -851,7 +933,7 @@ export default {
     },
     //复制依据
     copyDiag(id) {
-      this.i++
+      this.i++;
       const formData = JSON.parse(JSON.stringify(this.form));
       let i = -1;
       let arr = [];
@@ -865,7 +947,6 @@ export default {
         item.depart_id = this.i;
         this.form.klDiagnoseTypeVO.splice(i + index + 1, 0, item);
       });
-      // console.log(this.form.klDiagnoseTypeVO);
     },
     //删除依据
     delDiag(id, inx) {
@@ -891,7 +972,9 @@ export default {
             onlyNumType: false,
             onlyTxtType: false,
             basTypeName: '',
-            basConceptId: '',
+            basConceptId: [],
+            conceptId: '',
+            basConceptList: [],
             basDescription: '',
             basLename: '',
             basLibName: '',
@@ -915,12 +998,14 @@ export default {
       this.form.klDiagnoseTypeVO.splice(i, 1);
     },
     //新增基础依据
-    addRule(row, index, inx,i) {
+    addRule(row, index, inx, i) {
       let temp = {
         dataType: '',
         basNameType: false,
         basTypeName: '',
-        basConceptId: '',
+        basConceptId: [],
+        conceptId: '',
+        basConceptList: [],
         basDescription: '',
         basLename: '',
         basLibName: '',
@@ -934,21 +1019,28 @@ export default {
         maxVal: '',
         minOperator: '',
         minUnit: '',
-        minVal: '',
+        minVal: ''
       };
-      this.form.klDiagnoseTypeVO[index].groupVO[inx].klDiagnoseDetail.splice(i + 1, 0, temp);
-      this.form.klDiagnoseTypeVO = JSON.parse(JSON.stringify(this.form.klDiagnoseTypeVO))   //8525更新对象触发滚动条更新
+      this.form.klDiagnoseTypeVO[index].groupVO[inx].klDiagnoseDetail.splice(
+        i + 1,
+        0,
+        temp
+      );
+      this.form.klDiagnoseTypeVO = JSON.parse(
+        JSON.stringify(this.form.klDiagnoseTypeVO)
+      ); //8525更新对象触发滚动条更新
     },
     delRule(row, inx, index, i) {
-        const klDiagnoseDetail =  this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail;
+      const klDiagnoseDetail = this.form.klDiagnoseTypeVO[inx].groupVO[index]
+        .klDiagnoseDetail;
       if (klDiagnoseDetail.length === 1) {
         return;
       } else {
-        klDiagnoseDetail.splice(i,1);
+        klDiagnoseDetail.splice(i, 1);
         const numArr = this.numArr[inx].num[0];
-        const fitNo=this.form.klDiagnoseTypeVO[inx].groupVO[0].fitNo;
-        if(numArr[numArr.length-1].name<fitNo){
-            this.form.klDiagnoseTypeVO[inx].groupVO[0].fitNo="";
+        const fitNo = this.form.klDiagnoseTypeVO[inx].groupVO[0].fitNo;
+        if (numArr[numArr.length - 1].name < fitNo) {
+          this.form.klDiagnoseTypeVO[inx].groupVO[0].fitNo = '';
         }
       }
     },
@@ -978,7 +1070,10 @@ export default {
       ].dataType = '';
       this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
         i
-      ].conceptList = [];
+      ].basConceptId = [];
+      this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
+        i
+      ].conceptId = '';
       this.clearConcept(val, inx, index, i); //清空医学标准术语
       this.clearNumText(val, inx, index, i); //清空数值、医学内容
       var index2 = this.baseTermTypeList.findIndex(item => item.type === val);
@@ -988,7 +1083,7 @@ export default {
       this.form.klDiagnoseTypeVO[inx].groupVO[
         index
       ].baseTermTypeList = this.baseTermTypeList;
-      if (val == 3 || val == 4||val == 5 || val == 6) {
+      if (val == 3 || val == 4 || val == 5 || val == 6) {
         this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
           i
         ].basTypeName = this.form.klDiagnoseTypeVO[inx].groupVO[
@@ -1027,7 +1122,7 @@ export default {
 
       this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
         i
-      ].basConceptId = '';
+      ].basConceptId = [];
       if ((this.numTypes + ',').indexOf(val + ',') > -1) {
         this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
           i
@@ -1054,27 +1149,53 @@ export default {
       this.clearConcept(val, inx, index, i);
       this.clearNumText2(val, inx, index, i);
     },
-    //医学标准术语
-    conceptChange(val, inx, index, i) {
+    changeValue1(val, inx, index, i) {
+      const formData = JSON.parse(
+        JSON.stringify(
+          this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[i]
+        )
+      );
+      console.log(val);
+      let basConceptId = [];
+      // let data2 = formData.basConceptList.filter(it => {
+      //   let arr = formData.basConceptId.map(v => v);
+      //   return !arr.includes(it.conceptId);
+      // });
+      formData.basConceptId.forEach(item => {
+        formData.basConceptList.forEach(it => {
+          if (item == it.conceptId) {
+            basConceptId.push(it);
+          }
+        });
+      });
       this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
         i
-      ].basConceptId = val;
-      if (val) {
-        this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
-          i
-        ].basLibName = this.form.klDiagnoseTypeVO[inx].groupVO[
-          index
-        ].klDiagnoseDetail[i].conceptList.find(
-          it => it.conceptId === val
-        ).conceptName;
-      } else {
+      ].conceptList = basConceptId;
+      // this.searchConcept(val, inx, index, i)
+    },
+    //医学标准术语
+    conceptChange(val, inx, index, i, basType) {
+      if (basType == 1) {
+        this.$set(
+          this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[i],
+          'basConceptId',
+          val
+        );
+      } else if (basType == 2) {
         this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
           i
-        ].basLibName = '';
+        ].conceptId = val;
       }
     },
     searchConcept(val, inx, index, i) {
       const formData = JSON.parse(JSON.stringify(this.form));
+      const basConceptId =
+        formData.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[i]
+          .basConceptId;
+      if (val == '') {
+        this.changeValue1(val, inx, index, i);
+        return;
+      }
       const param = {
         excludedConceptIds: [
           formData.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[i]
@@ -1089,13 +1210,40 @@ export default {
         .searchConcept(param)
         .then(res => {
           if (res.data.code == '0') {
-            const data = res.data.data;
-
+            let data = res.data.data;
             this.$nextTick(() => {
               // dom元素更新后执行,因此这里能正确打印更改之后的值
-              formData.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
-                i
-              ].conceptList = data; // 改变了的值
+              if (
+                formData.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
+                  i
+                ].basType == 1
+              ) {
+                let data2 = data.filter(it => {
+                  let arr = basConceptId.map(v => v);
+                  return !arr.includes(it.conceptId);
+                });
+                let obj = {};
+                let arr = formData.klDiagnoseTypeVO[inx].groupVO[
+                  index
+                ].klDiagnoseDetail[i].basConceptList.concat(data2);
+                arr = arr.reduce(function(item, next) {
+                  obj[next.conceptId]
+                    ? ''
+                    : (obj[next.conceptId] = true && item.push(next));
+                  return item;
+                }, []);
+
+                formData.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
+                  i
+                ].conceptList = data2; // 改变了的值
+                formData.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
+                  i
+                ].basConceptList = arr;
+              } else {
+                formData.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
+                  i
+                ].conceptList = data;
+              }
             });
             this.form = formData;
           }
@@ -1116,13 +1264,16 @@ export default {
     clearConcept(val, inx, index, i) {
       this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
         i
-      ].basConceptId = '';
+      ].basConceptId = [];
       this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
         i
       ].basLibName = '';
       this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
         i
       ].conceptList = [];
+      this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
+        i
+      ].conceptId = '';
     },
     clearNumText2(val, inx, index, i) {
       this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
@@ -1190,6 +1341,14 @@ export default {
       //console.log(JSON.parse(str))
       return JSON.parse(str);
     },
+    formatData2(data) {
+      //转换字段名
+      let str = JSON.stringify(data)
+        .replace(/basLibName/g, 'conceptName')
+        .replace(/basConceptId/g, 'conceptId');
+      //console.log(JSON.parse(str))
+      return JSON.parse(str);
+    },
     searchDiag(val) {
       const param = {
         diseaseName: val
@@ -1349,8 +1508,8 @@ export default {
       });
     },
     confirm() {
-      
       const formData = JSON.parse(JSON.stringify(this.form));
+
       const _this = this;
       for (let i = 0; i < formData.klDiagnoseTypeVO.length; i++) {
         for (let j = 0; j < formData.klDiagnoseTypeVO[i].groupVO.length; j++) {
@@ -1364,6 +1523,17 @@ export default {
               .basLibTypeList;
             delete formData.klDiagnoseTypeVO[i].groupVO[j].klDiagnoseDetail[k]
               .conceptList;
+            formData.klDiagnoseTypeVO[i].groupVO[j].klDiagnoseDetail[
+              k
+            ].basConceptId =
+              formData.klDiagnoseTypeVO[i].groupVO[j].klDiagnoseDetail[k]
+                .basType == 2
+                ? JSON.stringify(
+                    formData.klDiagnoseTypeVO[i].groupVO[j].klDiagnoseDetail[k]
+                      .conceptId
+                  ).split('')
+                : formData.klDiagnoseTypeVO[i].groupVO[j].klDiagnoseDetail[k]
+                    .basConceptId;
           }
         }
       }
@@ -1408,6 +1578,47 @@ export default {
 </script>
 <style lang="less" scoped>
 @import '../../less/admin.less';
+
+.box-o {
+  /deep/ .el-select {
+    width: 210px;
+  }
+  /deep/.el-input--suffix .el-input__inner {
+    height: 30px !important;
+  }
+}
+/deep/ .el-select-dropdown__list, .el-select-dropdown__item {
+  padding: 6px 33px 6px 6px;
+}
+/deep/ .searchselect {
+  .el-select__tags {
+    max-width: 210px !important;
+  }
+  .el-tag {
+    min-width: 40px !important;
+    max-width: 75px !important;
+    .el-select__tags-text {
+      min-width: 40px !important;
+      max-width: 75px !important;
+      display: block;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+    }
+    .el-tag__close {
+      top: -22px;
+      right: -28px;
+    }
+  }
+  .el-tag:last-child {
+    min-width: 40px !important;
+    max-width: 75px !important;
+    .el-select__tags-text {
+      min-width: 40px !important;
+      max-width: 75px !important;
+    }
+  }
+}
 .contents {
   height: 100%;
   .content {
@@ -1433,17 +1644,15 @@ export default {
       height: calc(100vh - 370px);
     }
     /deep/ .el-input {
-      height: 24px;
-      line-height: 24px;
+      height: 30px;
+      line-height: 30px;
       .el-input__inner {
-        height: 24px;
-        line-height: 24px;
+        height: 30px;
+        line-height: 30px;
         font-size: 12px;
-        border-radius: 2px;
-        border-color: #c9c9c9;
       }
     }
-    /deep/ .el-select .el-input .el-icon-arrow-up{
+    /deep/ .el-select .el-input .el-icon-arrow-up {
       line-height: 25px;
     }
     .inps {
@@ -1463,8 +1672,8 @@ export default {
       }
     }
   }
-  /deep/.is-error .el-form-item__error{
-    top:30px;
+  /deep/.is-error .el-form-item__error {
+    top: 30px;
   }
   .content-2 {
     margin-top: 10px;
@@ -1489,7 +1698,7 @@ export default {
       }
     }
     .el-form-item {
-      margin-top: 8px;
+      margin-bottom: 10px;
       margin-right: 0;
     }
     .discDesc {
@@ -1603,7 +1812,6 @@ export default {
     .icon {
       padding: 0 3px;
       cursor: pointer;
-      vertical-align: middle;
     }
     .star {
       color: #ff545b;
@@ -1619,7 +1827,6 @@ export default {
   }
   .name {
     font-size: 14px;
-
     font-weight: 400;
     color: #333333;
     line-height: 20px;

+ 237 - 65
src/components/knowledgeExtra/DevInfo.vue

@@ -4,6 +4,7 @@
     :model="data"
     ref="form"
     class="sub-form"
+    size="mini"
     :validate-on-rule-change="false"
   >
     <!--<el-input v-model="form.orderNo" :value="index" type="hidden"></el-input>-->
@@ -13,12 +14,19 @@
                 <el-option label="是" :value="1"></el-option>
             </el-select>
     </el-form-item>-->
-    <el-form-item label="段落标题:" prop="title" label-width="160px" class="is-required">
+    <el-form-item
+      label="段落标题:"
+      prop="title"
+      label-width="160px"
+      class="is-required"
+    >
       <el-input v-model="data.title"></el-input>
     </el-form-item>
     <el-form-item label="内容类型:" prop="position" label-width="160px">
       <el-checkbox-group v-model="data.position">
-        <el-checkbox v-for="it in positions" :key="it.key" :label="it.key">{{it.name}}</el-checkbox>
+        <el-checkbox v-for="it in positions" :key="it.key" :label="it.key">{{
+          it.name
+        }}</el-checkbox>
       </el-checkbox-group>
     </el-form-item>
     <el-form-item label="内容" prop="content" label-width="160px" ref="editor">
@@ -29,41 +37,94 @@
         ref="quillEditor"
       ></quillEditor>
     </el-form-item>
-    <div class="order-btn">
-      <a v-if="index!==0" :class="index===total-1?'order-spc':'order-up'" @click="reOrder(1)">上升</a>
-      <a v-if="index!==total-1" :class="index===0?'order-spc':'order-down'" @click="reOrder(0)">下降</a>
+    <!-- <div class="order-btn">
+      <a
+        v-if="index !== 0"
+        :class="index === total - 1 ? 'order-spc' : 'order-up'"
+        @click="reOrder(1)"
+        >上升</a
+      >
+      <a
+        v-if="index !== total - 1"
+        :class="index === 0 ? 'order-spc' : 'order-down'"
+        @click="reOrder(0)"
+        >下降</a
+      >
+    </div> -->
+    <div class="move_btn">
+      <div
+        v-if="index !== 0"
+        @mouseover="moveTopHover = true"
+        @mouseout="moveTopHover = false"
+        title="上升"
+        @click="reOrder(1)"
+      >
+        <img
+          :src="
+            moveTopHover
+              ? require('@/images/icon_hover_top.png')
+              : require('@/images/icon_default_top.png')
+          "
+          alt=""
+        />
+      </div>
+      <div
+        v-if="index !== total - 1"
+        @mouseover="moveBottomHover = true"
+        @mouseout="moveBottomHover = false"
+        title="下降"
+        @click="reOrder(0)"
+      >
+        <img
+          :src="
+            moveBottomHover
+              ? require('@/images/icon_hover_down.png')
+              : require('@/images/icon_default_down.png')
+          "
+          alt=""
+        />
+      </div>
     </div>
     <el-form-item label-width="160px" class="btns">
-      <el-button @click="addEmit">添加段落</el-button>
-      <el-button @click="delEmit" type="info">删除本段落</el-button>
+      <!-- <el-button size="small" @click="addEmit">添加段落</el-button>
+      <el-button size="small" @click="delEmit" type="info"
+        >删除本段落</el-button
+      > -->
+      <div class="change_btns">
+        <div @click="addEmit">添加段落</div>
+        <div @click="delEmit">删除本段落</div>
+      </div>
     </el-form-item>
   </el-form>
 </template>
 
 <script>
-import 'quill/dist/quill.core.css';
-import 'quill/dist/quill.snow.css';
-import 'quill/dist/quill.bubble.css';
-import { quillEditor, Quill } from 'vue-quill-editor';
-import config from '@api/config';
-import { container, ImageExtend, QuillWatch } from 'quill-image-extend-module';
-Quill.register('modules/ImageExtend', ImageExtend);
+import api from "@api/knowledgeTree.js";
+import "quill/dist/quill.core.css";
+import "quill/dist/quill.snow.css";
+import "quill/dist/quill.bubble.css";
+import { quillEditor, Quill } from "vue-quill-editor";
+import config from "@api/config";
+import { container, ImageExtend, QuillWatch } from "quill-image-extend-module";
+Quill.register("modules/ImageExtend", ImageExtend);
 export default {
-  props: ['data', 'index', 'isEdit', 'isCopy', 'total', 'showType'],
-  name: 'DevInfo',
+  props: ["data", "index", "isEdit", "isCopy", "total", "showType"],
+  name: "DevInfo",
   components: {
     quillEditor
   },
   data() {
     return {
+      moveTopHover: false,
+      moveBottomHover: false,
       toolbars: [
         [
-          ['bold', 'underline', 'strike'],
-          [{ list: 'ordered' }, { list: 'bullet' }],
-          [{ script: 'sub' }, { script: 'super' }],
+          ["bold", "underline", "strike"],
+          [{ list: "ordered" }, { list: "bullet" }],
+          [{ script: "sub" }, { script: "super" }],
           [{ color: [] }, { background: [] }],
           [{ align: [] }],
-          ['image']
+          ["image"]
         ]
       ],
       toolbarMode: 0,
@@ -71,24 +132,24 @@ export default {
         modules: {
           ImageExtend: {
             loading: true,
-            name: 'upfile',
+            name: "upfile",
             size: 1,
             sizeError: () => {
               this.$message({
                 showClose: true,
-                message: '请上传 1M 以内的图片!',
-                type: 'warning'
+                message: "请上传 1M 以内的图片!",
+                type: "warning"
               });
             },
             action: config.urls.promptServer,
-            response: res => {
-              if (res.code == '0') {
+            response: (res) => {
+              if (res.code == "0") {
                 return config.imgHost + res.data.url;
               } else {
                 this.$message({
                   showClose: true,
                   message: res.msg,
-                  type: 'warning'
+                  type: "warning"
                 });
               }
             }
@@ -96,7 +157,7 @@ export default {
           toolbar: {
             container: container,
             handlers: {
-              image: function() {
+              image: function () {
                 QuillWatch.emit(this.quill.id);
               }
             }
@@ -112,103 +173,150 @@ export default {
     };
   },
   watch: {
-    'data.content': function() {
-      if (this.data.content !== '') {
+    "data.content": function () {
+      if (this.data.content !== "") {
         this.$refs.editor && this.$refs.editor.clearValidate(); // 清除校验
       }
-      if (this.data.content === '') {
+      if (this.data.content === "") {
         // console.log('内容为空');
-        this.$refs['form'].validateField('content'); // 手动校验
+        this.$refs["form"].validateField("content"); // 手动校验
       }
       this.data.text = this.$refs.quillEditor.quill.root.innerText;
-    },
+    }
   },
   created() {
     // console.log(this.showType, 'showType','需要显示的类型');
-    this.editorOption.modules.toolbar.container = this.toolbars[
-      this.toolbarMode
-    ];
+    this.editorOption.modules.toolbar.container =
+      this.toolbars[this.toolbarMode];
     this.renderPositions();
-    if (this.isEdit||this.isCopy) {
+    if (this.isEdit || this.isCopy) {
       setTimeout(() => {
         this.rules = {
           position: [
-            { required: true, message: '请选择内容类型', trigger: 'change' }
+            { required: true, message: "请选择内容类型", trigger: "change" }
           ],
           title: [
             {
               validator: (rule, value, callback) => {
                 if (!value.trim()) {
-                  callback(new Error('请输入段落标题'));
+                  callback(new Error("请输入段落标题"));
                 } else {
                   callback();
                 }
               },
-              trigger: 'change'
+              trigger: "change"
             },
-            { max: 30, message: '标题名称不能超过30字', trigger: 'change' }
+            { max: 30, message: "标题名称不能超过30字", trigger: "change" }
           ],
           content: [
-            { required: true, message: '请输入段落内容', trigger: 'change' }
+            { required: true, message: "请输入段落内容", trigger: "change" }
           ]
         };
       }, 100);
     } else {
       this.rules = {
         position: [
-          { required: true, message: '请选择内容类型', trigger: 'change' }
+          { required: true, message: "请选择内容类型", trigger: "change" }
         ],
         title: [
           {
             validator: (rule, value, callback) => {
               if (!value.trim()) {
-                callback(new Error('请输入段落标题'));
+                callback(new Error("请输入段落标题"));
               } else {
                 callback();
               }
             },
-            trigger: 'change'
+            trigger: "change"
           },
-          { max: 30, message: '标题名称不能超过30字', trigger: 'change' }
+          { max: 30, message: "标题名称不能超过30字", trigger: "change" }
         ],
         content: [
-          { required: true, message: '请输入段落内容', trigger: 'change' }
+          { required: true, message: "请输入段落内容", trigger: "change" }
         ]
       };
     }
-      setTimeout(()=>{
-          this.filterHiddenPosition();
-      },200)
+    setTimeout(() => {
+      this.filterHiddenPosition();
+    }, 200);
   },
   mounted() {
+    let quill = this.$refs.quillEditor.quill;
+    console.log(quill);
+    quill.root.addEventListener(
+      "paste",
+      (evt) => {
+        console.log("evt", evt);
+        if (
+          evt.clipboardData &&
+          evt.clipboardData.files &&
+          evt.clipboardData.files.length
+        ) {
+          console.log("ddadada");
+          evt.preventDefault();
+          [].forEach.call(evt.clipboardData.files, (file) => {
+            console.log("file", file);
+            if (!file.type.match(/^image\/(gif|jpe?g|a?png|bmp)/i)) return;
+            if (file.size > 1024 * 1000) return;
+            let formData = new FormData();
+            formData.append("upfile", file);
+            api.uploadFile(formData).then((res) => {
+              console.log("formData", res);
+              if (res.data.code == "0") {
+                let imgUrl = config.imgHost + res.data.data.url;
+                var range = quill.getSelection();
+                console.log("range", range);
+                if (range) {
+                  // this.uploadAttachment(res, file, null);
+                  let length = quill.getSelection().index;
+                  quill.insertEmbed(length, "image", imgUrl);
+                  quill.setSelection(length + 1);
+                  //  将光标移动到图片后面
+                  this.$refs.quillEditor.quill.setSelection(range.index + 1);
+                }
+              } else {
+                this.$message({
+                  showClose: true,
+                  message: res.msg,
+                  type: "warning"
+                });
+              }
+            });
+          });
+        }
+      },
+      false
+    );
   },
   methods: {
     reOrder(i) {
-      this.$emit('reOrder', i, this.index);
+      this.$emit("reOrder", i, this.index);
     },
     addEmit() {
-      this.$emit('add');
+      this.$emit("add");
     },
     delEmit() {
-      this.$emit('del', this.index);
+      this.$emit("del", this.index);
     },
-    filterHiddenPosition(){
-        const pos = this.data.position;
-        const pArr = this.positions.map((it)=>{return it.key});
-        const pStr = pArr.join(",");
-        const arr=pos.filter((it)=>{
-            return pStr.indexOf(it)>-1;
-        });
-        this.data.position=arr;
+    filterHiddenPosition() {
+      const pos = this.data.position;
+      const pArr = this.positions.map((it) => {
+        return it.key;
+      });
+      const pStr = pArr.join(",");
+      const arr = pos.filter((it) => {
+        return pStr.indexOf(it) > -1;
+      });
+      this.data.position = arr;
     },
     // 渲染内容类型
     renderPositions() {
       //显示位置枚举列表
-      const pos = localStorage.getItem('knowledgeEnumsData');
+      const pos = localStorage.getItem("knowledgeEnumsData");
       let positions = config.contentTypes;
       if (this.showType == 1) {
         // 诊断
-        this.positions = positions.filter(item => item.key !== 2);
+        this.positions = positions.filter((item) => item.key !== 2);
       } else if (
         this.showType == 3 ||
         this.showType == 4 ||
@@ -216,12 +324,18 @@ export default {
         this.showType == 6
       ) {
         // 检验/检查
-        this.positions = positions.filter(item => {
+        this.positions = positions.filter((item) => {
           return item.key <= 2;
         });
-      } else if (this.showType == 2 || this.showType == 7 || this.showType == 8 || this.showType == 9) {
+      } else if (
+        this.showType == 2 ||
+        this.showType == 7 ||
+        this.showType == 8 ||
+        this.showType == 9 ||
+        this.showType == 10
+      ) {
         // 药品/手术
-        this.positions = positions.filter(item => item.key === 1);
+        this.positions = positions.filter((item) => item.key === 1);
       } else {
         this.positions = positions;
       }
@@ -294,4 +408,62 @@ it .ql-editor,
 .btns {
   margin-top: 20px;
 }
+.move_btn {
+  position: absolute;
+  top: 12px;
+  right: 0;
+  font-size: 14px;
+  margin-left: 10px;
+  display: flex;
+  div {
+    width: 12px;
+    height: 16px;
+    margin-right: 8px;
+    img {
+      width: 100%;
+      height: 100%;
+      cursor: pointer;
+    }
+  }
+}
+/deep/ .el-form-item.is-success .el-input__inner,
+.el-form-item.is-success .el-textarea__inner {
+  border-color: #c9c9c9 !important;
+}
+/deep/ .el-form-item.is-success .el-textarea__inner {
+  border-color: #c9c9c9 !important;
+}
+/deep/ .el-form-item.is-success .el-textarea__inner {
+  border-color: #c9c9c9 !important;
+}
+.change_btns {
+  // width: 100%;
+  margin-top: 10px;
+  display: flex;
+  box-sizing: border-box;
+  div {
+    width: 90px;
+    height: 30px;
+    line-height: 30px;
+    text-align: center;
+    border-radius: 2px;
+    border: 1px solid #21cbc7;
+    color: #21cbc7;
+    font-size: 14px;
+    margin-right: 30px;
+    cursor: pointer;
+    &:nth-child(1) {
+      &:hover {
+        background: rgba(97, 218, 215, 0.1);
+      }
+    }
+    &:nth-child(2) {
+      border-color: #ff5b5b;
+      color: #ff5b5b;
+      &:hover {
+        background: rgba(255, 91, 91, 0.1);
+      }
+    }
+  }
+}
 </style>

+ 167 - 196
src/components/login/Login.vue

@@ -1,203 +1,177 @@
 <template>
-  <div class="login-container">
-    <banner></banner>
-    <div class="login-img fl">
-      <img src="../../images/loginImg.png" />
-    </div>
-    <div class="login-box">
-      <!-- <div class="box-le"><img src="../../images/left.jpg"/></div> -->
-      <div class="box-ri">
-        <div class="title-box clearfix">
-          <h3 class="login-title fl">登录</h3>
-          <h4 class="num fr" @click="toRegister">立即注册</h4>
-        </div>
-
-        <div class="ri-center">
-          <el-form :model="ruleForm2" :rules="rules2" ref="ruleFormReg">
-            <el-form-item prop="tel">
-              <el-input
-                v-model="ruleForm2.tel"
-                name="username"
-                autocomplete="off"
-                maxlength="11"
-                placeholder="请输入用户名或手机号"
-                clearable
-                class="ri-tel"
-                @keyup.enter.native="submitForm('ruleForm2')"
-                ref="username"
-              ></el-input>
-            </el-form-item>
-            <div style="height: 20px;"></div>
-            <el-form-item prop="pwd">
-              <el-input
-                v-model="ruleForm2.pwd"
-                name="password"
-                autocomplete="off"
-                maxlength="16"
-                placeholder="请输入密码"
-                clearable
-                type="password"
-                class="ri-pwd"
-                @keyup.enter.native="submitForm('ruleForm2')"
-                ref="password"
-              ></el-input>
-            </el-form-item>
-            <el-form-item>
-              <!-- <span class="num" @click="toRegister">注册账号</span> -->
-              <span class="pwd" @click="toForgetPsw">忘记密码?</span>
-            </el-form-item>
-            <el-form-item>
-              <el-button plain v-if="otherCor">登录</el-button>
-              <el-button ref="btn" v-else class="otherCor" plain @click="submitForm('ruleForm2')">登录</el-button>
-            </el-form-item>
-          </el-form>
+    <div class="login-container">
+        <banner></banner>
+        <div class="login-img fl"><img src="../../images/loginImg.png"/></div>
+        <div class="login-box">
+            <!-- <div class="box-le"><img src="../../images/left.jpg"/></div> -->
+            <div class="box-ri">
+                <div class="title-box clearfix"> <h3 class="login-title fl">登录</h3> <h4 class="num fr" @click="toRegister">立即注册</h4></div>
+               
+                <div class="ri-center">
+                    <el-form :model="ruleForm2" :rules="rules2" ref="ruleFormReg">
+                        <el-form-item prop="tel">
+                            <el-input v-model="ruleForm2.tel" name="username" autocomplete="off" maxlength="11"
+                                      placeholder="请输入用户名或手机号"
+                                      clearable class="ri-tel" @keyup.enter.native="submitForm('ruleForm2')"
+                                      ref="username"></el-input>
+                        </el-form-item>
+                        <div style="height: 20px;"></div>
+                        <el-form-item prop="pwd">
+                            <el-input v-model="ruleForm2.pwd" name="password" autocomplete="off" maxlength="16"
+                                      placeholder="请输入密码"
+                                      clearable type="password" class="ri-pwd"
+                                      @keyup.enter.native="submitForm('ruleForm2')" ref="password"></el-input>
+                        </el-form-item>
+                        <el-form-item>
+                            <!-- <span class="num" @click="toRegister">注册账号</span> -->
+                            <span class="pwd" @click="toForgetPsw">忘记密码?</span>
+                        </el-form-item>
+                        <el-form-item>
+                            <el-button plain v-if="otherCor" >登录</el-button>
+                            <el-button ref="btn" v-else class="otherCor" plain @click="submitForm('ruleForm2')">登录
+                            </el-button>
+                        </el-form-item>
+                    </el-form>
+                </div>
+            </div>
         </div>
-      </div>
+        <copy-right-info></copy-right-info>
     </div>
-    <copy-right-info></copy-right-info>
-  </div>
 </template>
 
 <script>
-import Vue from 'vue';
-import banner from '../common/Banner.vue';
-import copyRightInfo from '../common/CopyRightInfo.vue';
-import api from '../../api/index.js';
-import './login.less';
-import md5 from 'js-md5';
+  import Vue from 'vue';
+  import banner from '../common/Banner.vue';
+  import copyRightInfo from '../common/CopyRightInfo.vue';
+  import api from '../../api/index.js';
+  import './login.less';
+  import md5 from 'js-md5'
+	
+  export default {
+    name: 'Login',
+    data() {
+      //手机号码验证
+      var myreg = /^1[0-9]{10}$/;
+      //密码验证 纯字母纯英文
+      var numreg = /^(?![0-9]+$)(?![a-zA-Z]+$)/;
+      //密码验证 密码长度
+      var lengreg = /^[0-9A-Za-z]{6,16}$/;
+      var validatePass = (rule, value, callback) => {
+        // if(isNaN(value) == false){   //手机号
+        // 正常情况
 
-export default {
-  name: 'Login',
-  data() {
-    //手机号码验证
-    var myreg = /^1[0-9]{10}$/;
-    //密码验证 纯字母纯英文
-    var numreg = /^(?![0-9]+$)(?![a-zA-Z]+$)/;
-    //密码验证 密码长度
-    var lengreg = /^[0-9A-Za-z]{6,16}$/;
-    var validatePass = (rule, value, callback) => {
-      // if(isNaN(value) == false){   //手机号
-      // 正常情况
-
-      if (value.trim() == '') {
-        callback(new Error('用户名不能为空'));
-        this.$refs.username.value = '';
-      }
-      // 手机号
-      if (isNaN(value) == false) {
-        if (value.length !== 11 || !myreg.test(value)) {
-          callback(new Error('手机号格式有误'));
+        if (value.trim() == '') {
+          callback(new Error('用户名不能为空'));
+          this.$refs.username.value = "";
+        }
+        // 手机号
+        if (isNaN(value) == false) {
+          if (value.length !== 11 || !myreg.test(value)) {
+            callback(new Error('手机号格式有误'));
+          } else {
+            callback();
+          }
+        } else if (isNaN(value) == true) {
+          callback();
+        }
+      };
+      var validatePass2 = (rule, value, callback) => {
+        if (value.trim() == '') {
+          callback(new Error('密码不能为空'));
+          this.$refs.password.value = "";
+        } else if (value.length < 6) {
+          callback(new Error('密码长度应为6位至16位之间'));
+        } else if (!numreg.test(value)) {
+          callback(new Error('密码不能为纯数字或纯英文'));
         } else {
           callback();
         }
-      } else if (isNaN(value) == true) {
-        callback();
-      }
-    };
-    var validatePass2 = (rule, value, callback) => {
-      if (value.trim() == '') {
-        callback(new Error('密码不能为空'));
-        this.$refs.password.value = '';
-      } else if (value.length < 6) {
-        callback(new Error('密码长度应为6位至16位之间'));
-      } else if (!numreg.test(value)) {
-        callback(new Error('密码不能为纯数字或纯英文'));
-      } else {
-        callback();
-      }
-    };
-    return {
-      otherCor: true,
-      ruleForm2: {
-        tel: '',
-        pwd: ''
-      },
-      rules2: {
-        tel: [
-          {
+      };
+      return {
+        otherCor: true,
+        ruleForm2: {
+          tel: '',
+          pwd: ''
+        },
+        rules2: {
+          tel: [{
             required: true,
             validator: validatePass,
             trigger: 'blur'
-          }
-        ],
-        pwd: [
-          {
+          }],
+          pwd: [{
             required: true,
             validator: validatePass2,
             trigger: 'blur'
-          }
-        ]
-      }
-    };
-  },
-  mounted() {
-    if (window.history && window.history.pushState) {
-      history.pushState(null, null, document.URL);
-      window.addEventListener('popstate', function() {
-        history.pushState(null, null, document.URL);
-      });
-    }
-  },
-  computed: {
-    nextButton() {
-      const { tel, pwd } = this.ruleForm2;
-      return {
-        tel,
-        pwd
+          }],
+        }
       };
-    }
-  },
-  watch: {
-    nextButton: {
-      handler: function(val) {
-        if (val.tel.trim() && val.pwd.trim()) {
-          this.otherCor = false;
-        } else {
-          this.otherCor = true;
+    },
+    mounted() {
+      if (window.history && window.history.pushState) {
+        history.pushState(null, null, document.URL);
+        window.addEventListener('popstate', function () {
+            history.pushState(null, null, document.URL);
+        });
+      }
+    },
+    computed: {
+      nextButton() {
+        const {
+          tel,
+          pwd
+        } = this.ruleForm2;
+        return {
+          tel,
+          pwd
         }
-      },
-      deep: true
-    }
-  },
-  methods: {
-    CalcuMD5(password) {
-      // password = password.toUpperCase();
-      password = md5(password);
-      return password;
+      }
     },
-    submitForm: function() {
-      const username = this.ruleForm2.tel;
-      const password = this.CalcuMD5(this.ruleForm2.pwd);
-      let params = {
-        username: username,
-        password: password
-      };
-      //重新登录清空原有token;
-      localStorage.removeItem('token');
-      this.$refs.ruleFormReg.validate(valid => {
-        if (valid) {
-          api
-            .loginMess(params)
-            .then(res => {
+    watch: {
+      nextButton: {
+        handler: function (val) {
+          if (val.tel.trim() && val.pwd.trim()) {
+            this.otherCor = false;
+          } else {
+            this.otherCor = true;
+          }
+        },
+        deep: true
+      }
+    },
+    methods: {
+      CalcuMD5(password){
+        // password = password.toUpperCase();
+        password = md5(password);
+        return password;
+      },
+      submitForm: function () {
+        const username = this.ruleForm2.tel;
+        const password = this.CalcuMD5(this.ruleForm2.pwd);
+        let params = {
+          "username": username,
+          "password": password
+        }
+        //重新登录清空原有token;
+        localStorage.removeItem('token');
+        this.$refs.ruleFormReg.validate((valid) => {
+          if (valid) {
+            api.loginMess(params).then((res) => {
               if (res.status == 200) {
-                // console.log(res)
-                if (res.data.code == '10020000') {
-                  //未注册
+								// console.log(res)
+                if (res.data.code == '10020000') { //未注册
                   // this.$message.error(res.data.msg);
-                  this.$message.error('该账号或手机号未注册!');
-                } else if (res.data.code == '10020001') {
-                  //密码错误
+									this.$message.error("该账号或手机号未注册!")
+                } else if (res.data.code == '10020001') { //密码错误
                   this.$message.error(res.data.msg);
                 } else if (res.data.code == '0') {
                   const token = JSON.stringify(res.data.data);
-                  localStorage.setItem('token', token);
-                  const uesrId = JSON.stringify(res.data.data.type);
-                  localStorage.setItem('uesrId', uesrId);
+                  localStorage.setItem("token", token);
                   this.$message({
                     message: '登录成功!',
                     type: 'success',
                     duration: 1000,
-                    onClose: function() {
+                    onClose: function () {
                       const type = res.data.data.type;
                       if (type == 0) {
                         this.$router.push({
@@ -212,32 +186,29 @@ export default {
                   });
                 }
               }
-            })
-            .catch(err => {
+            }).catch((err) => {
               console.log(err);
-            });
-        } else {
-          console.log('faild');
-          return false;
-        }
-      });
+            })
+          } else {
+            console.log('faild')
+            return false;
+          }
+        });
+      },
+      toRegister() { //点击注册
+        this.$router.push({
+          path: '/register'
+        });
+      },
+      toForgetPsw() {//忘记密码
+        this.$router.push({
+          path: '/forgetPassword'
+        });
+      }
     },
-    toRegister() {
-      //点击注册
-      this.$router.push({
-        path: '/register'
-      });
+    components: {
+      'banner': banner,
+      'copyRightInfo': copyRightInfo
     },
-    toForgetPsw() {
-      //忘记密码
-      this.$router.push({
-        path: '/forgetPassword'
-      });
-    }
-  },
-  components: {
-    banner: banner,
-    copyRightInfo: copyRightInfo
   }
-};
 </script>

BIN
src/images/msg_close.png


BIN
src/images/tab_add.png


BIN
src/images/tab_close.png


+ 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:88';
 // 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'; //王峰

+ 5 - 0
yarn.lock

@@ -8285,6 +8285,11 @@ vue@^2.5.17:
   resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.12.tgz#f5ebd4fa6bd2869403e29a896aed4904456c9123"
   integrity sha512-uhmLFETqPPNyuLLbsKz6ioJ4q7AZHzD8ZVFNATNyICSZouqP2Sz0rotWQC8UNBF6VGSCs5abnKJoStA6JbCbfg==
 
+vuex@^3.6.2:
+  version "3.6.2"
+  resolved "https://registry.yarnpkg.com/vuex/-/vuex-3.6.2.tgz#236bc086a870c3ae79946f107f16de59d5895e71"
+  integrity sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw==
+
 watchpack-chokidar2@^2.0.1:
   version "2.0.1"
   resolved "https://registry.yarnpkg.com/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz#38500072ee6ece66f3769936950ea1771be1c957"