Przeglądaj źródła

Merge branch 'test' of http://192.168.2.236:10080/zhouna/platformFront into test

luolei 4 lat temu
rodzic
commit
80031d6dca

+ 35 - 21
src/components/knowledgeExtra/AddNewRule.vue

@@ -118,6 +118,7 @@
                     parRuleType:'',
                     parConceptId:'',
                     parlibName:'',
+                    parLenName:'',
                     parHasSub:undefined,
                     parLenCode:'',
                     parMsg:'',
@@ -152,7 +153,7 @@
         },
         created(){
             this.getTypeList();
-            this.getDict();
+            this.setDict();
             const param = this.$route.params;
             let info = param.data;
             if(info){
@@ -177,7 +178,7 @@
                 }
                 const obj = this.ruleTermTypeList.find((it)=>it.code===val);
                 this.baseTypeList = obj.subMenuList;
-
+                this.subRuleMaxNum=obj.number;
             },
             'form.parConceptId':function(val){
                 if(this.checkFirstPlace) {
@@ -203,18 +204,9 @@
             }
         },
         methods:{
-            getDict(){
-                api.zskgetDict().then((res) => {
-                    if (res.data.code == '0') {
-                        const data = res.data.data;
-                        const arr =data['20'].map((it)=>it.val);
-                        this.dict = arr.join(",");
-                        this.msgDict=(data['21'].map((it)=>it.val)||[]).join(",");
-                        localStorage.setItem("zskDicts",arr.join(","));
-                    }
-                }).catch((error) => {
-                    console.log(error);
-                });
+            setDict(){
+                this.dict = localStorage.getItem("zskDicts");
+                this.msgDict = localStorage.getItem("zskMsgDict");
             },
             showConfirmDialog(msg,resolve){
                 this.$alert(msg, '提示', {
@@ -228,13 +220,14 @@
                 let arr=[];
                 data.map((it)=>{
                     if(!arr[it.groupType]){arr[it.groupType]=[];}
-                    if(it.subMaxOperator){
+                    if(it.subMaxOperator||it.subMinOperator){
                         it.dataType='1';
                     }else if(it.subEqValue){
                         it.dataType='2';
                     }
                     arr[it.groupType].push(it);
-                })
+                });
+                arr = arr.filter((it)=>{if(it)return it});
                 return arr;
             },
             searchConcept(val){
@@ -262,6 +255,7 @@
             ruleTermChange(val){        //规则术语类型选中
                 this.form.parLenCode=val;
                 const obj = this.ruleTermTypeList.find((it)=>it.code===val);
+                this.form.parLenName=obj.name;
                 this.baseTypeList = obj.subMenuList;
                 this.subRuleMaxNum = obj.number;
                 this.setInitGroupData();
@@ -291,11 +285,12 @@
               this.conceptList=[];  //下拉列表清空
             },
             addGroup(){
-                this.subGroups.push([{
+                let temp = {
                     subDescription:'',
-                    parRuleType:'',
                     subConceptId:'',
                     subType:'',
+                    subLenCode:'',
+                    dataType:'',
                     subMaxOperator:'',
                     subMaxUnit:'',
                     subMaxValue:'',
@@ -303,9 +298,28 @@
                     subMinUnit:'',
                     subMinValue:'',
                     subEqValue:'',
-                    subLenCode:'',
-                    dataType:'',
-                }]);
+                };
+                if(this.checkFirstPlace){
+                    const obj=this.subGroups[0][0];
+                    temp = {
+                        subDescription:obj.subConceptName,
+                        subConceptId:obj.subConceptId,
+                        subConceptName:obj.subConceptName,
+                        subLenCode:this.form.parLenCode,
+                        subLenName: this.form.parLenName,
+                        subLibName: this.form.parlibName,
+                        subType:2,
+                        dataType:'',
+                        subMaxOperator:'',
+                        subMaxUnit:'',
+                        subMaxValue:'',
+                        subMinOperator:'',
+                        subMinUnit:'',
+                        subMinValue:'',
+                        subEqValue:'',
+                    };
+                }console.log(temp)
+                this.subGroups.push([temp]);
             },
             delGroup(i){
                 this.subGroups.splice(i,1);

+ 36 - 3
src/components/knowledgeExtra/RuleManager.vue

@@ -53,11 +53,17 @@
                         prop="parDescription"
                         label="规则名称"
                         width="160">
+                    <template slot-scope="scope">
+                        <el-tooltip v-if="scope.row.parDescription.length>8" class="item" effect="dark" :content="scope.row.parDescription" placement="top">
+                            <span>{{scope.row.parDescription.slice(0,8)+'...'}}</span>
+                        </el-tooltip>
+                        <span v-if="scope.row.parDescription.length<9">{{scope.row.parDescription}}</span>
+                    </template>
                 </el-table-column>
                 <el-table-column
                         prop="parRuleType"
                         label="规则类型"
-                        width="100">
+                        width="150">
                     <template slot-scope="scope">
                         {{statusTrans(scope.row.parRuleType)}}
                     </template>
@@ -66,11 +72,17 @@
                         prop="parConceptName"
                         label="医学标准术语"
                         width="160">
+                    <template slot-scope="scope">
+                        <el-tooltip v-if="scope.row.parConceptName.length>8" class="item" effect="dark" :content="scope.row.parConceptName" placement="top">
+                            <span>{{scope.row.parConceptName.slice(0,8)+'...'}}</span>
+                        </el-tooltip>
+                        <span v-if="scope.row.parConceptName.length<9">{{scope.row.parConceptName}}</span>
+                    </template>
                 </el-table-column>
                 <el-table-column
                         prop="parLibTypeName"
                         label="术语类型"
-                        width="130">
+                        width="150">
                 </el-table-column>
                 <el-table-column
                         prop="parHasSub"
@@ -84,6 +96,12 @@
                         prop="parMsg"
                         label="附加信息"
                         width="160">
+                    <template slot-scope="scope">
+                        <el-tooltip v-if="scope.row.parMsg.length>8" class="item" effect="dark" :content="scope.row.parMsg" placement="top">
+                            <span>{{scope.row.parMsg.slice(0,8)+'...'}}</span>
+                        </el-tooltip>
+                        <span v-if="scope.row.parMsg.length<9">{{scope.row.parMsg}}</span>
+                    </template>
                 </el-table-column>
                 <el-table-column
                         label="状态">
@@ -94,7 +112,7 @@
                     </template>
                 </el-table-column>
                 <el-table-column
-                        prop="modifier"
+                        prop="modifierName"
                         label="操作人">
                 </el-table-column>
                 <el-table-column
@@ -168,6 +186,7 @@
             setTimeout(function(){
                 that.getDataList();
             });
+            this.getDict();
         },
         watch: {
             'filter': {
@@ -185,6 +204,20 @@
             })
         },
         methods: {
+            getDict(){
+                api.zskgetDict().then((res) => {
+                    if (res.data.code == '0') {
+                        const data = res.data.data;
+                        const arr =data['20'].map((it)=>it.val);
+                        //this.dict = arr.join(",");
+                        //this.msgDict=(data['21'].map((it)=>it.val)||[]).join(",");
+                        localStorage.setItem("zskDicts",arr.join(","));
+                        localStorage.setItem("zskMsgDict",(data['21'].map((it)=>it.val)||[]).join(","));
+                    }
+                }).catch((error) => {
+                    console.log(error);
+                });
+            },
             statusTrans(type){
                 const obj = this.ruleTypeList.find((it)=>it.type===type);
                 return obj&&obj.name;

+ 24 - 22
src/components/knowledgeExtra/SubConditions.vue

@@ -134,7 +134,7 @@
                 typeList:[],
                 operMaxList:[
                     {name:'<=',key:'<='},
-                    {name:'=',key:'='},
+                    {name:'<',key:'<'},
                 ],
                 operMinList:[{name:'>',key:'>'},
                     {name:'>=',key:'>='},
@@ -170,7 +170,7 @@
                                 callback();
                             }}, trigger: 'blur'
                     }],
-                    subEqValue:[{ required: true, message: '请输入医学内容',trigger: ['blur'] }],
+                    subEqValue:[{ required: true, message: '请输入'+this.groupData.subType===6?"正则表达式":"医学内容",trigger: ['blur'] }],
                 },
             }
         },
@@ -182,44 +182,46 @@
                 deep:true
             },
             'baseTypes':{
-                handler:function(){
+                handler:function(val){
                     if(!this.groupData.subType){
                         this.baseTermTypeList =[];
                         return;
                     }
-                    const obj = this.baseTypes.find((it)=>it.type===this.groupData.subType);
+                    const obj = val.find((it)=>it.type===this.groupData.subType);
                     this.baseTermTypeList = obj.subMenuList;
                 },
                 deep:true
             },
-            'firstPlace':function(val){
-                if(!val)return;
-                const types= val.checkedType.split("-");
-                const sub = this.baseTypes.find((it)=>it.ruleType===+types[0]&&it.type===2);
-                this.groupData.subType=sub.type;
-                this.baseTermTypeList =sub.subMenuList;
-                this.groupData.subLenCode=this.baseTermTypeList.find((it)=>it.ruleType===+types[0]).code;
-                this.conceptList=[val];
-                this.groupData.subDescription=val.conceptName;
-                this.groupData.subConceptId = val.conceptId;
-                this.groupData.subConceptName = val.conceptName;
+            'firstPlace':{
+                handler:function(val) {
+                    if (!val) return;
+                    const dict = localStorage.getItem("zskDicts").match(new RegExp(val.checkedType+'-\\d+','g'))||[];
+                    const types = dict[0].split("-");
+                    const sub = this.baseTypes.find((it) => it.ruleType === +types[0] && it.type === +types[2]);
+                    this.groupData.subType = sub.type;
+                    this.baseTermTypeList = sub.subMenuList;
+                    this.groupData.subLenCode = this.baseTermTypeList.find((it) => it.ruleType === +types[0]).code;
+                    this.conceptList = [val];
+                    this.groupData.subDescription = val.conceptName;
+                    this.groupData.subConceptId = val.conceptId;
+                    this.groupData.subConceptName = val.conceptName;
+                },
+                deep:true
             }
         },
         created(){
-            this.conceptList=[{conceptName:this.groupData.subLibName,conceptId:this.groupData.subConceptId}];
+            this.conceptList=[{conceptName:this.groupData.subLibName||this.groupData.subConceptName,conceptId:this.groupData.subConceptId}];
+            if(this.groupData.subLenCode){
+                this.baseTermTypeList=[{name:this.groupData.subLenName,code:this.groupData.subLenCode}];
+            }
         },
         methods:{
-            minMaxValidate(rule, value, callback){
-                if(this.groupData.dataType==='1'){
-
-                }
-            },
             dataTypeChange(val){
                 this.groupData.subEqOperator=val==='2'?'=':undefined;
                 this.groupData.dataType=val;
                 this.clearNumText();
             },
-            subTypeChange(val){         //基础规则类型修改
+            subTypeChange(val){        //基础规则类型修改
                 this.groupData.subLenCode='';
                 this.groupData.dataType='';
                 this.clearConcept();

+ 5 - 1
src/components/knowledgeExtra/SubRulesGroup.vue

@@ -29,7 +29,7 @@
         },
         computed:{
           'disable':function(){
-              return Object.keys(this.firstPlace||{}).length>0&&this.inx===0;
+              return Object.keys(this.firstPlace||{}).length>0;
           }
         },
         methods:{
@@ -102,6 +102,10 @@
         border-top: 4px solid #F5F5F5;
         background: #fff;
     }
+    .el-button--danger.is-plain:focus, .el-button--danger.is-plain:hover{
+        color: #fbc4c4;
+        border-color:#fbc4c4;
+    }
     .el-button--danger.is-plain{
         background: none;
         &.is-disabled{

+ 0 - 109
src/routes.js

@@ -594,16 +594,6 @@ export default [
                 component: AddTerm,
                 name: 'AddTerm',
             },
-            {
-                path: 'LT-ZSKKZWH-JTXXWH',
-                component: StaticInfo,
-                name: 'StaticInfo',
-            },
-            {
-                path: 'LT-ZSKKZWH-JTXXWH-EDIT',
-                component: AddDevKnow,
-                name: 'AddDevKnow',
-            },
             {
                 path: 'LT-ZSKKZWH-GZWH',
                 component: ZskRuleManager,
@@ -614,105 +604,6 @@ export default [
                 component: AddZskRule,
                 name: 'AddZskRule',
             },
-
-    { path: 'LT-CDSSSJWH-YYGL', component: HospitalCDSS, name: 'HospitalCDSS' }, //医院管理
-    { path: 'LT-CDSSSJWH-YYGLEDIT', component: AddHospitalCDSS, name: 'AddHospitalCDSS' }, //医院管理--新增编辑
-    { path: 'LT-CDSSSJWH-YYYHGL', component: HospitalUserCDSS, name: 'HospitalUserCDSS' }, //医院用户管理
-    {
-        path: 'LT-CDSSSJWH-YYYHGLEDIT',
-        component: AddHospitalUserCDSS,
-        name: 'AddHospitalUserCDSS',
-    }, //医院用户管理--添加用户
-    { path: 'LT-CDSSSJWH-BBWH', component: VersionCDSS, name: 'VersionCDSS' }, //CDSS版本信息维护
-    { path: 'LT-CDSSSJWH-BBWHEDIT', component: AddVersionCDSS, name: 'AddVersionCDSS' }, //CDSS版本信息维护--新增编辑
-    { path: 'LT-CDSSSJWH-BBWHDETAIL', component: VersionDetailCDSS, name: 'VersionDetailCDSS' }, //CDSS版本信息维护--详情
-    { path: 'LT-CDSSSJWH-MZSMWH', component: DisclaimerCDSS, name: 'DisclaimerCDSS' }, //免责声明维护
-    { path: 'LT-CDSSSJWH-MZSMWHEDIT', component: AddDisclaimerCDSS, name: 'AddDisclaimerCDSS' }, //免责声明维护--新增编辑
-    {
-        path: 'LT-CDSSSJWH-MZSMWHDETAIL',
-        component: DisclaimerDetailCDSS,
-        name: 'DisclaimerDetailCDSS',
-    }, //免责声明维护--新增编辑
-    {
-        path: 'LT-YYSYZDHCS-ZSTPGZCS',
-        component: KnowledgeMapRuleTest,
-        name: 'KnowledgeMapRuleTest',
-    }, //知识图谱规则测试
-    {
-        path: 'LT-YYSYZDHCS-JTZSYSCS',
-        component: StaticKnowledgeMapTest,
-        name: 'StaticKnowledgeMapTest',
-    }, //静态知识映射测试
-    {
-        path: 'LT-YYSYZDHCS-ZSTPGZCS-TYGZCS',
-        component: BillCommonTest,
-        name: 'BillCommonTest',
-    },
-    {
-        path: 'LT-YYSYZDHCS-ZSTPGZCS-SXGZCS',
-        component: BillFusionTest,
-        name: 'BillFusionTest',
-    },
-    {
-        path: 'LT-YYSYZDHCS-ZSTPGZCS-SYSJCGZCS',
-        component: CriticalLabTest,
-        name: 'CriticalLabTest',
-    },
-    {
-        path: 'LT-YYSYZDHCS-ZSTPGZCS-FZJCGZCS',
-        component: CriticalAuxTest,
-        name: 'CriticalAuxTest',
-    },
-    {
-        path: 'LT-YYSYZDHCS-ZSTPGZCS-GWYPGZCS',
-        component: HighRiskDrugTest,
-        name: 'HighRiskDrugTest',
-    },
-    {
-        path: 'LT-YYSYZDHCS-ZSTPGZCS-GWSSZHGZCS',
-        component: HighRiskOperationTest,
-        name: 'HighRiskOperationTest',
-    },
-    {
-        path: 'LT-YYSYZDHCS-ZSTPGZCS-QTHYGZCS',
-        component: OtherAssayRuleTest,
-        name: 'OtherAssayRuleTest',
-    },
-    {
-        path: 'LT-YYSYZDHCS-ZSTPGZCS-QTFJGZCS',
-        component: OtherAuxRuleTest,
-        name: 'OtherAuxRuleTest',
-    },
-    {
-        path: 'LT-YYSYZDHCS-ZSTPGZCS-QTFXGZCS',
-        component: OtherFusionRuleTest,
-        name: 'OtherFusionRuleTest',
-    },
-    {
-        path: 'LT-YYSYZDHCS-JTZSYSCS-WYSZD',
-        component: LessStaticOrNoMap,
-        name: 'LessStaticOrNoMap',
-    },
-    {
-        path: 'LT-ZSKJCWH-JCSYWH',
-        component: BasicTermsMaintenance,
-        name: 'BasicTermsMaintenance',
-    },
-    {
-        path: 'LT-ZSKJCWH-JCCXWH',
-        component: BasicPartOfSpeech,
-        name: 'BasicPartOfSpeech',
-    },
-    {
-        path: 'LT-ZSKJCWH-JCGXLXWH',
-        component: BasicRelationship,
-        name: 'BasicRelationship',
-    },
-    {
-        path: 'LT-ZSKJCWH-JCSYWH-EDIT',
-        component: AddTerm,
-        name: 'AddTerm',
-    },
     {
         path: 'LT-ZSKKZWH-JTXXWH',
         component: StaticInfo,