فهرست منبع

提交护理相关修改

xiezhiming 3 سال پیش
والد
کامیت
ae587650d8

+ 1 - 0
src/api/config.js

@@ -162,6 +162,7 @@ export default {
     'zskSearchConcept': '/klDisease/searchConceptRuleClass', //知识库搜索术语
     'zskUpdateAll': '/cache/clearRuleAll', //更新数据
     'zskgetDict': '/kl/dictionary/getDictionarys', //禁止修改基础规则类型
+	'staticKnowledge':'/kl/conceptInfo/staticKnowledgeIndex', //获取关联静态知识
 	
 	'zskgetRulePage': '/klRule/getRulePage',//查询所有有效的规则
 	'zskgetRuleDetail': '/klRule/getRuleDetail',//根据录入内容查询有效规则的明细

+ 5 - 1
src/api/knowledgeLib.js

@@ -41,5 +41,9 @@ export default {
 	},
     getCallRecord(param){
         return axios.post(urls.getCallRecord, param)
-    }
+    },
+	//获取关联静态知识
+	getStaicTypes(param){
+		return axios.post(urls.staticKnowledge, param);
+	}
 }

+ 252 - 59
src/components/knowledgeExtra/AddNewRule.vue

@@ -263,6 +263,15 @@
           @ChildDataTypeChange="ChildDataTypeChange"
           @childSubCodeChange="childSubCodeChange"
         />
+		<AddNewRuleContent
+			ref='ruleContent'
+			v-if="(!form.parHasSub && !tableShow) || contentRuls" 
+			@ruleContent='ruleContent'
+		    :isContent="isEdit"
+			:formEidtCopy='formEidt'
+			:isError='isErr'
+		>	
+		</AddNewRuleContent>
         <el-form-item>
           <div class="form_btn">
             <el-button
@@ -281,10 +290,21 @@
 import api from "@api/knowledgeLib.js";
 import { formRules } from "./rules";
 import AddNewRuleTable from "./AddNewRuleTable";
+import AddNewRuleContent from "./AddNewRuleContent";
 export default {
   name: "AddRule",
   data() {
     return {
+	  isRedMsg:[],
+	  isErr:false, //控制护理开单项里面的错误提示
+	  staicData:{    //护理开单项里面的数据
+	  		  gljtxx:[],
+	  		  fjxx:''
+	  },
+	  formEidt:{},
+	  isEdit:false, //判断是否是编辑页面
+	  isStatic:false,  //判断关联静态知识的tabel列是否显示
+	  contentRuls:false, //判断规则内容为列表还是表单
       title: "规则维护-添加规则",
       ruleTypeList: [], //规则类型列表  1
       ruleTermTypeList: [], //规则术语类型列表  2
@@ -329,12 +349,19 @@ export default {
     }
   },
   methods: {
+	//护理开单项子组件里面的传过来的值
+	ruleContent(data){
+		this.staicData=data
+	},
     clearValidate(data) {
       this.$refs.ruleForm.clearValidate(data);
     },
     // 编辑初始化
     async initEdidData() {
-      // 规则术语类型初始化
+	  // 规则术语类型初始化
+	  this.contentRuls=false;
+	  this.isEdit=false;
+	  this.isRedMsg=[];
       const newruleTermTypeList = await this.ruleTypeList.find(
         (it) => it.id == this.form.parRuleType
       );
@@ -345,13 +372,43 @@ export default {
       );
       this.baseTypeList = obj.subMenuList;
       this.subRuleMaxNum = obj.number;
-
       this.conceptList = [
         {
           conceptName: this.form.parlibName,
           conceptId: this.form.parConceptId,
         },
       ];
+	  // 加载护理开单项的推送内容
+	  if(!this.form.klRuleByIdSub){
+	  		  this.isEdit=true;
+	  		  this.contentRuls=true;
+	  		  this.formEidt=JSON.parse(JSON.stringify(this.form))
+	  		 return 
+	  }
+	  //加载护理非开单项的关联静态知识
+	  if(this.form.parRuleType==8){
+	  		  this.isStatic=true;
+	  		  if(Array.isArray(this.form.klRuleByIdGroup)){
+	  			  let itemCopy={}
+	  			  this.form.klRuleByIdGroup.forEach((item,index)=>{
+	  					if(Array.isArray(item.klRuleStaticSub)){
+	  						item.klRuleStaticSub.forEach((items,ind)=>{
+	  							this.$set(this.form.klRuleByIdSub[index],'ruleStatic',[])
+	  							this.$set(this.form.klRuleByIdSub[index],'ruleStaticList',[])
+	  							let obj={
+	  								id:items.conceptId,
+	  								name:items.name
+	  							}
+	  							itemCopy=JSON.parse(JSON.stringify(obj))
+	  							this.form.klRuleByIdSub[index].ruleStatic.push(itemCopy.id);
+	  							this.form.klRuleByIdSub[index].ruleStaticList.push(itemCopy)
+	  						})
+	  										  
+	  					}
+	  			  })
+	  		  }
+	  }
+	  //加载列表规则内容
       if (this.form.parConceptId && this.checkFirstPlace && this.conceptList) {
         this.firstPlace = this.conceptList.find(
           (it) => it.conceptId === this.form.parConceptId
@@ -469,25 +526,47 @@ export default {
     //药品数据处理
     getDragData(info) {
       let dataArr = [];
-      let arr = JSON.parse(JSON.stringify(info.klRuleByIdSub));
-      arr.map((mapItem) => {
-        if (dataArr.length == 0) {
-          dataArr.push({ groupType: mapItem.groupType, List: [mapItem] });
-        } else {
-          let res = dataArr.some((item) => {
-            //判断相同日期,有就添加到当前项
-            if (item.groupType == mapItem.groupType) {
-              item.List.push(mapItem);
-              return true;
-            }
-          });
-          if (!res) {
-            //如果没找相同日期添加一个新对象
-            dataArr.push({ groupType: mapItem.groupType, List: [mapItem] });
-          }
-        }
-      });
-      this.getDragData2(info, dataArr);
+      //处理修改接口请求的数据
+    	//先将数据深拷贝,避免数据污染
+      let infoCopy=JSON.parse(JSON.stringify(info))
+      infoCopy.klRuleByIdSubCopy=[];
+      if(info.klRuleByIdGroup.length>0){
+    	  let klRuleByIdSub={}
+    		info.klRuleByIdGroup.forEach(item=>{
+    			if(item.klRuleByIdSub&&Array.isArray(item.klRuleByIdSub)){
+    				item.klRuleByIdSub.forEach(items=>{
+    					klRuleByIdSub=JSON.parse(JSON.stringify(items));
+    					infoCopy.klRuleByIdSubCopy.push(klRuleByIdSub)
+    				})
+    				infoCopy.klRuleByIdSub=[...item.klRuleByIdSub]
+    			}
+    		}) 
+      }
+      //判断是否存在klRuleByIdSub,没有就是护理开单项直接赋值
+      if(!info.klRuleByIdGroup[0].klRuleByIdSub){
+    	  this.form = JSON.parse(JSON.stringify(info));
+      }else{
+    	let arr = JSON.parse(JSON.stringify(infoCopy.klRuleByIdSubCopy));
+    	arr.map((mapItem) => {
+    	  if (dataArr.length == 0) {
+    	    dataArr.push({ groupType: mapItem.groupType, List: [mapItem] });
+    	  } else {
+    	    let res = dataArr.some((item) => {
+    	      //判断相同日期,有就添加到当前项
+    	      if (item.groupType == mapItem.groupType) {
+    	        item.List.push(mapItem);
+    	        return true;
+    	      }
+    	    });
+    	    if (!res) {
+    	      //如果没找相同日期添加一个新对象
+    	      dataArr.push({ groupType: mapItem.groupType, List: [mapItem] });
+    	    }
+    	  }
+    	});
+    	this.getDragData2(info, dataArr);  
+      }
+      
     },
     getDragData2(info, dataArr) {
       let arr = [];
@@ -505,34 +584,125 @@ export default {
     submitForm(formName) {
       this.$refs[formName].validate((valid) => {
         if (valid) {
+    		this.isErr=false;
+    		this.isRedMsg=[];
           let params = JSON.parse(JSON.stringify(this.form));
-          params.klRuleInfoSaveSub = params.klRuleByIdSub;
-          delete params.klRuleByIdSub;
-          params.klRuleInfoSaveSub.forEach((item, i, arr) => {
-            if (i === 0) {
-              item.groupType = 1;
-            } else {
-              if (item.groupId == arr[i - 1].groupId) {
-                item.groupType = arr[i - 1].groupType;
-                item.subMsg = arr[i - 1].subMsg;
-              } else {
-                item.groupType = arr[i - 1].groupType + 1;
-              }
-            }
-          });
-          params.klRuleInfoSaveSub.forEach((ite) => {
-            delete ite.groupId;
-            delete ite.groupChildId;
-            delete ite.rowIndex;
-            delete ite.baseTypes;
-            delete ite.baseTermTypeList;
-            delete ite.conceptList;
-          });
-          if (this.parId) {
-            params.parId = this.isCopy ? undefined : this.parId;
-            params.parStatus = this.isCopy ? 1 : this.form.parStatus;
-          }
-          this.saveRule(params);
+    	 if(params.klRuleByIdSub){
+    		 params.klRuleInfoSaveSub = params.klRuleByIdSub;
+    		 delete params.klRuleByIdSub;
+    		 params.klRuleInfoSaveSub.forEach((item, i, arr) => {
+    		   if (i === 0) {
+    		     item.groupType = 1;
+    		   } else {
+    		     if (item.groupId == arr[i - 1].groupId) {
+    		       item.groupType = arr[i - 1].groupType;
+    		       item.subMsg = arr[i - 1].subMsg;
+    		     } else {
+    		       item.groupType = arr[i - 1].groupType + 1;
+    		     }
+    		   }
+    		 });
+    		 params.klRuleInfoSaveSub.forEach((ite) => {
+    		   delete ite.groupId;
+    		   delete ite.groupChildId;
+    		   delete ite.rowIndex;
+    		   delete ite.baseTypes;
+    		   delete ite.baseTermTypeList;
+    		   delete ite.conceptList;
+    		 });
+    	 }
+    	 if (this.parId) {
+    	   params.parId = this.isCopy ? undefined : this.parId;
+    	   params.parStatus = this.isCopy ? 1 : this.form.parStatus;
+    	 }
+    	  //改造params,保存护理开单项类型的
+    	 let  paramsCopy=JSON.parse(JSON.stringify(params))
+    	 //先遍历子集klRuleInfoSaveSub
+    	 paramsCopy.klRuleInfoSaveGroup=[];
+    	 let obj={
+    		 groupType:0,
+    		 klRuleInfoSaveSub:[],
+    	 }
+    	 this.$set(obj,'ruleStatic',[])
+    	 if(params.klRuleInfoSaveSub&&Array.isArray(params.klRuleInfoSaveSub)){
+    		 if(params.klRuleInfoSaveSub.length>0){
+    			params.klRuleInfoSaveSub.forEach((item)=>{
+    				obj.groupType=item.groupType;
+    				obj.klRuleInfoSaveSub=[item]
+    				let objCopy=JSON.parse(JSON.stringify(obj))
+    				//可以处理objCopy,将groupType相同的放入klRuleInfoSaveSub里面
+    				paramsCopy.klRuleInfoSaveGroup.push(objCopy)		
+    			}) 
+    		 }else{
+    			 paramsCopy.klRuleInfoSaveGroup.push(obj)
+    		 }
+    	 }else{
+    		 paramsCopy.klRuleInfoSaveGroup.push(obj)	
+    	 }
+    	if(paramsCopy.klRuleInfoSaveSub&&Array.isArray(paramsCopy.klRuleInfoSaveSub)){
+    		//护理非开单项的关联静态知识的处理
+    		paramsCopy.klRuleInfoSaveSub.forEach((item,ind)=>{
+    			let ruleObj={}
+    			if(Array.isArray(item.ruleStatic)){
+    				item.ruleStatic.forEach((items,index)=>{
+    					ruleObj.conceptId=items;
+    					ruleObj.orderNo=index;
+    					let ruleObjCopy=JSON.parse(JSON.stringify(ruleObj))
+    					//将关联静态知识的对象放入数组内
+    					paramsCopy.klRuleInfoSaveGroup[ind].ruleStatic.push(ruleObjCopy)
+    				})
+    			}
+    		})
+    		//删除第二层的klRuleInfoSaveSub
+    		delete paramsCopy.klRuleInfoSaveSub
+    	}  
+    	//判断护理开单是否附加信息和关联静态信息是否都没存在值
+    	 let flagRule=false;
+    		//附加信息
+    	if(this.staicData.fjxx ){
+    		paramsCopy.klRuleInfoSaveGroup[0].groupType='1';
+    		paramsCopy.parMsg=this.staicData.fjxx ;	
+    		flagRule=true;
+    	}else{
+    		paramsCopy.parMsg='';
+    	}
+    	//关联静态知识
+    	if(this.staicData.gljtxx.length>0){
+    		paramsCopy.klRuleInfoSaveGroup[0].groupType='1';
+    		let rule={};
+    		this.staicData.gljtxx.forEach((item,index)=>{
+    			rule.conceptId=item;
+    			rule.orderNo=index;
+    			let ruleCopy=JSON.parse(JSON.stringify(rule))
+    			paramsCopy.klRuleInfoSaveGroup[0].ruleStatic.push(ruleCopy);	  				
+    		})	
+    		flagRule=true;	
+    	}
+    	//如果是护理项并且静态知识和附加信息都没有值
+    	if(this.contentRuls &&!flagRule){
+    		this.isErr=true
+    		return; 	  		
+    	}
+    	//如果护理非开单项关联静态知识和附加信息都没有值
+    	if(this.isStatic){
+    		if(Array.isArray(paramsCopy.klRuleInfoSaveGroup)){
+    			paramsCopy.klRuleInfoSaveGroup.forEach((item)=>{
+    				if(Array.isArray(item.klRuleInfoSaveSub)){
+    					item.klRuleInfoSaveSub.forEach(items=>{
+    						if(items.ruleStatic&&Array.isArray(items.ruleStatic)){
+    							if(items.ruleStatic.length>0||items.subMsg){
+    								this.isRedMsg.push(false)
+    							}else{
+    								this.isRedMsg.push(true)
+    								return
+    							}
+    						}
+    					})
+    				}
+    			})
+    		}
+    	}
+        this.saveRule(paramsCopy);
         } else {
           return false;
         }
@@ -544,6 +714,14 @@ export default {
     },
     // table_form 规则类型选中
     ruleTypeChange(val) {
+	  //先初始化
+	  this.contentRuls=false;
+	  this.isStatic=false;
+	  this.isRedMsg=[]
+	  //是否护理非开单项
+	  if(val===8){
+	     this.isStatic=true
+	  }
       this.form.parLenCode = "";
       const obj = this.ruleTypeList.find((it) => it.id === val);
       this.ruleTermTypeList = obj.subMenuList;
@@ -552,11 +730,23 @@ export default {
     },
     // table_form 规则术语类型选中
     ruleTermChange(val) {
+	  this.contentRuls=false;
+	  this.isRedMsg=[]
       const obj = this.ruleTermTypeList.find((it) => it.code === val);
       this.form.parLenName = obj.name;
       this.baseTypeList = obj.subMenuList;
       this.subRuleMaxNum = obj.number;
       this.form.parHasSub = obj.subMenuList.length ? 1 : 0;
+	  if(!this.form.parHasSub){
+	  		  this.contentRuls=true;
+	  }
+	  //初始化护理开单项的输入框
+	  if(this.contentRuls){
+	  		  this.$nextTick(()=>{
+	  			  this.isEdit=false
+	  			  this.$refs.ruleContent.clearFormData()
+	  		  })	 
+	  }
       this.isShow = obj.subMenuList.length ? 1 : 0;
       this.setInitGroupData();
     },
@@ -1203,18 +1393,21 @@ export default {
     },
   },
   watch: {
-    "form.klRuleByIdSub": {
+    form: {
       handler(val) {
-        this.form.klRuleByIdSub.forEach((item, i, arr) => {
-          if (i == 0) {
-            item.rowIndex = 1;
-          } else if (item.groupId == arr[i - 1].groupId) {
-            item.rowIndex = arr[i - 1].rowIndex;
-          } else {
-            item.rowIndex = arr[i - 1].rowIndex + 1;
-          }
-        });
+    	if(val.klRuleByIdSub){
+    		this.form.klRuleByIdSub.forEach((item, i, arr) => {
+    		  if (i == 0) {
+    		    item.rowIndex = 1;
+    		  } else if (item.groupId == arr[i - 1].groupId) {
+    		    item.rowIndex = arr[i - 1].rowIndex;
+    		  } else {
+    		    item.rowIndex = arr[i - 1].rowIndex + 1;
+    		  }
+    		});		  
+    	}  
       },
+      immediate: true,
       deep: true,
     },
   },
@@ -1266,6 +1459,6 @@ export default {
       return this.dict.indexOf(this.ruleTermCodeStrs) > -1;
     },
   },
-  components: { AddNewRuleTable },
+  components: { AddNewRuleTable,AddNewRuleContent },
 };
 </script>

+ 198 - 0
src/components/knowledgeExtra/AddNewRuleContent.vue

@@ -0,0 +1,198 @@
+<template>
+	<div class="contentRuls">
+		<p class="content_p">
+			<span class="strat_red">*</span>
+			<span class="content_ts">推送内容</span>
+			<span class="content_err" v-if="isError">静态信息和附加信息必须填写至少一项!</span>
+		</p>
+		<el-form :model="formData" label-width="120px"  ref="formData" :rules="rules" class="form-address">
+			<el-row>
+				<el-col :span='10'>
+					<el-form-item label="关联静态信息" prop="gljtxx">
+						<el-select 
+						  v-model.trim="formData.gljtxx" 
+						  placeholder="请选择" 
+						  multiple 
+						  collapse-tags 
+                          filterable
+                          remote
+                          :multiple-limit="50"
+                          reserve-keyword
+                          :remote-method="getStaicTypes"
+						  @visible-change="changeValue1"
+                          >
+							<el-option v-for="item in opts_type" :key="item.id" :label="item.name" :value="item.id"></el-option>
+						</el-select>
+					</el-form-item>
+				</el-col>
+			</el-row>
+			<el-row>
+				<el-col :span='24'>
+					<el-form-item label="附加信息" prop="fjxx">
+					    <el-input type="textarea" :rows="2" v-model.trim="formData.fjxx" resize="none" :maxlength='251'></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+		</el-form>
+	</div>
+</template>
+
+<script type="text/javascript">
+	import api from "@api/knowledgeLib.js";
+	export default {
+		name: "AddNewRuleContent",
+		props: {
+			isContent: {
+			  type: Boolean,
+			  default:false,
+			},
+			formEidtCopy:{
+				type:Object,
+			},
+			isError: {
+			  type: Boolean,
+			  default:false,
+			},
+		},
+		watch:{
+			isError:{
+				handler(val){
+					console.log(val)
+				}
+			}
+		},
+		data(){
+			return {
+				formData:{
+					gljtxx:[],//关联静态知识
+					fjxx:''  //附加信息			 
+				},
+				opts_type:[],
+				rules:{
+					fjxx:{min: 0,max: 250,message: '输入字符长度不能超过250位',trigger: 'change'}
+				},
+			} 		
+		},
+		  
+		created() {
+			console.log('formEidtCopy',this.formEidtCopy)
+			//编辑回显
+			if(this.isContent){
+				//关联静态知识
+				this.formEidtCopy.klRuleByIdGroup[0].klRuleStaticSub.forEach((item)=>{
+					let obj={}
+					obj.id=item.conceptId;
+					obj.name=item.name;
+					this.opts_type.push(obj)
+					this.formData.gljtxx.push(obj.id)
+				})
+				//附加信息
+				this.formData.fjxx=this.formEidtCopy.parMsg
+			}
+		},
+		mounted() {
+			this.getStaicTypes()
+		},
+		methods:{
+			//初始化
+			clearFormData(){
+			    this.formData={
+					gljtxx:[],//关联静态知识
+					fjxx:''  //附加信息			 
+				},
+				this.opts_type=[];
+				this.isErr=false;
+			},
+			//获取关联静态知识
+			getStaicTypes(query){
+				console.log(query)
+				let param={
+					inputStr: query,
+					types: [9]  
+				}
+				if (query == '') {
+				  return;
+				}
+				if (query){
+					api.getStaicTypes(param).then((res) => {
+						console.log(res)
+					  if (res.data.code == 0) {
+					    this.opts_type=res.data.data
+					  } else {
+					    this.$message({
+					      message: res.data.msg,
+					      type: "warning",
+					    });
+					  }
+					});
+				}
+				
+				
+			},
+			changeValue1(query){
+				console.log(this.formData.gljtxx)
+				if(this.formData.gljtxx.length==0){
+					this.opts_type=[]
+				}
+			},
+			 setName(val){
+				 if(val&&val.length>6){
+					val=val.substring(0,6)
+				 }
+				 return val
+			 }
+		},
+		watch:{
+			formData:{
+				handler(newName, oldName) {
+					if(newName){
+						this.$emit('ruleContent',this.formData)
+					}
+				},      
+				immediate: true,
+				deep: true    
+			}
+		}
+	}
+</script>
+
+<style  lang="less" scoped>
+	.contentRuls{
+		background: #fff;
+		padding: 20px;
+		padding-left: 30px;
+		padding-bottom:0px;
+		font-size: 14px;
+		color: #606266;
+		.content_p{
+			position: relative;
+			padding-bottom: 10px;
+			.strat_red{
+				color: #F56C6C;
+				position: absolute;
+				top: 0;
+				left: -10px;
+			}
+			.content_ts{
+				color: #333;
+				font-size: 16px;
+			}
+			.content_err{
+				color: red;
+				font-size: 14px;
+				margin-left: 20px;
+			}
+		}
+		.form-address{
+			/deep/.el-select{
+				width: 100%;
+			}
+			/deep/.el-select__tags-text {
+			    overflow: hidden;
+			    text-overflow: ellipsis;
+			    max-width: 90px;
+			}
+		}
+		
+	}
+</style>

+ 75 - 1
src/components/knowledgeExtra/AddNewRuleTable.vue

@@ -10,6 +10,18 @@
     width: 100%;
     font-size: 12px;
   }
+  .el-form-item.is-success{
+  	  .redMsg{
+  	  	  /deep/.el-textarea__inner{
+  	  		  border-color:#FF0000 !important;
+  	  	  }
+  	  }
+  }
+  .redMsg{
+  	  /deep/.el-input__inner{
+  		  border-color:#FF0000 !important;
+  	  }
+  }
   .btn_box {
     width: 100%;
     height: 100%;
@@ -123,6 +135,7 @@
 <template>
   <!-- :prop="`klRuleByIdSub[${scope.$index}].subDescription`" -->
   <div id="AddNewRuleTable">
+	<p v-if='isStaticChild' class="c_red">注:静态信息和附加信息必须填写至少一项!</p>
     <h4 style="margin-bottom: 24px">规则内容:</h4>
     <!-- 隔行换色  :row-style="rowStyle" -->
     <el-table
@@ -176,11 +189,42 @@
               type="textarea"
               :autosize="{ minRows: 1, maxRows: 2 }"
               placeholder="请输入附加信息"
+			  :class="(scope.row.subMsg|| !isRedMsg[scope.$index])?'':'redMsg'"
               v-model.trim="scope.row.subMsg"
+			  @change="subMsgChange(scope.row.subMsg,scope.$index)"
             ></el-input>
           </el-form-item>
         </template>
       </el-table-column>
+	  <el-table-column width="230px" label="关联静态信息" prop="ruleStatic" v-if='isStaticChild'>
+	    <template slot="header" slot-scope="scope">
+	      <div >关联静态信息</div>
+	    </template>
+	    <template slot-scope="scope">
+	     <el-form-item
+	        class="inp_box"
+	        :prop="`klRuleByIdSub[${scope.$index}].ruleStatic`"
+	  			:class="(!isRedMsg[scope.$index])?'':'redMsg'"
+	      >
+	        <el-select
+	  			  class="searchStatic"
+	          v-model.trim="scope.row.ruleStatic" 
+	          placeholder="请选择" 
+	          multiple 
+	          collapse-tags 
+	          filterable
+	          remote
+	          :multiple-limit="50"
+	          reserve-keyword
+	  			  @change="ruleStaticChanges(scope.$index)"
+	          :remote-method="(val)=>getStaicTypes(val,scope.row,scope.$index)"
+	  			  @visible-change="(val)=>changeValue1(val,scope.row,scope.$index)"
+	          >
+	        	<el-option v-for="item in scope.row.ruleStaticList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+	        </el-select>
+	      </el-form-item>
+	    </template>
+	  </el-table-column>
       <el-table-column
         width="80px"
         v-if="maxNum && maxNum > 1"
@@ -582,9 +626,22 @@ export default {
       rules: tableRules,
       theRef: null,
       code: "",
+	  isRedMsg:[], //附加信息和关联静态知识显示红色边框的判断值,替代品,修改是不能直接修改prop的值
     };
   },
   methods: {
+	//护理非开单项时附加信息和关联静态知识输入值时取消红色边框
+	subMsgChange(value,index){
+		if(this.isRedMsgs[index]&&value){
+			this.$set(this.isRedMsg,index,false)
+		}
+	}, 
+	//护理非开单项时附加信息和关联静态知识输入值时取消红色边框
+	ruleStaticChanges(index){
+		if(this.isRedMsgs[index]){
+			this.isRedMsg[index]=false
+		}
+	}, 
     setScrollRight() {
       this.$nextTick(() => {
         this.$refs.table.bodyWrapper.scrollLeft =
@@ -659,6 +716,7 @@ export default {
     cellStyle({ row, column, rowIndex, columnIndex }) {
       if (column.label == "组" || column.label == "基础规则") return {};
       if (column.label == "附加信息") return { "padding-top": "14px" };
+	  if (column.label == "关联静态信息") return { "padding-top": "0px" };
       return { "vertical-align": "top", "padding-top": "14px" };
     },
     // 最大值 选择rule
@@ -832,7 +890,7 @@ export default {
           };
         }
       } else {
-        if (columnIndex == 0 || columnIndex == 1) {
+        if (columnIndex == 0 || columnIndex == 1 || column.label==='关联静态信息') {
           const _row = this.spanArr[rowIndex];
           const _col = _row > 0 ? 1 : 0;
           return {
@@ -866,6 +924,7 @@ export default {
   },
   components: {},
   mounted() {
+	this.isRedMsg=this.isRedMsgs;
     // this.theRef
     // console.log('mounted');
     // let that = this;
@@ -875,6 +934,13 @@ export default {
     //   false
     // );
   },
+  watch:{
+  	isRedMsgs:{
+  		handler(val){
+  			this.isRedMsg=val;
+  		}
+  	}  
+  },
   created() {
     this.numTypes = localStorage.getItem("zskNumDict");
     this.getSpanArr(this.klRuleByIdSub);
@@ -918,6 +984,14 @@ export default {
     ruleTermCodeStr: {
       default: null,
     },
+	isStaticChild:{
+		type:Boolean,
+		default: false,
+	},
+	isRedMsgs:{
+		type:Array,
+		default: ()=>[],
+	},
   },
 };
 </script>

+ 18 - 0
src/components/knowledgeExtra/DiagCheckRule.vue

@@ -15,6 +15,9 @@
       <span v-if="baseLibName" class="span1"
         ><i>基础医学标准术语:</i>{{ baseLibName }}</span
       >
+	  <span v-if="staticName" class="span1"
+	    ><i>关联静态信息:</i>{{ staticName }}</span
+	  >
       <!--<el-form :inline="true" style="margin-top: 10px;height: 45px;">
 				<el-form-item label="基础规则术语类型:">
 					<el-select v-model="filter.baseLibType" clearable placeholder="请选择" size="mini">
@@ -55,6 +58,11 @@
           title="附加信息"
           show-overflow-tooltip
         ></ux-table-column>
+		<ux-table-column field="names" title="关联静态信息"  width="170" show-overflow-tooltip>
+		  <template slot-scope="scope">
+		    {{ transDataString(scope.row) }}
+		  </template>
+		</ux-table-column>
         <ux-table-column field="baseType" title="基础规则类型">
           <template slot-scope="scope">
             {{ transDataMap(baseTypeList)[scope.row.baseType] }}
@@ -159,8 +167,18 @@ export default {
     "description",
     "baseLibType",
     "baseLibName",
+	"staticName"
   ],
   methods: {
+	transDataString(data){
+		let array=[]
+		if(data.names&&Array.isArray(data.names)){
+			array=[...data.names];
+			array=array.join(',')
+			return array
+		}
+		return '';
+	},
     transDataMap(data) {
       const obj = {};
       data.map((it) => {

+ 16 - 2
src/components/knowledgeExtra/RuleCheck.vue

@@ -34,8 +34,8 @@
             size="mini"
           >
             <el-option
-              v-for="item in ruleTermTypeList"
-              :key="item.val"
+              v-for="(item,index) in ruleTermTypeList"
+              :key="index"
               :label="item.name"
               :value="item.val"
             >
@@ -76,6 +76,14 @@
             clearable
           ></el-input>
         </el-form-item>
+		<el-form-item label="关联静态信息:">
+		  <el-input
+		    size="mini"
+		    v-model.trim="filter.staticName"
+		    placeholder="请输入"
+		    clearable
+		  ></el-input>
+		</el-form-item>
         <el-form-item>
           <el-button size="mini" @click="filterDatas">确认</el-button>
         </el-form-item>
@@ -135,6 +143,7 @@
         :description="filter.description"
         :baseLibType="filter.baseLibType"
         :baseLibName="filter.baseLibName"
+		:staticName="filter.staticName"
       >
       </CheckRule>
       <div style="text-align: center">
@@ -169,6 +178,7 @@ export default {
         libName: "", //医学标准术语
         baseLibType: "", //基础规则术语类型
         baseLibName: "", //基础医学标准术语
+		staticName: "", //关联静态信息
       },
       ruleTeamNum: 0, //规则组个数
       ruleTypeList: [], //规则类型列表  1
@@ -293,6 +303,7 @@ export default {
         baseLibName: this.filter.baseLibName.trim(),
         baseLibType: this.filter.baseLibType,
         description: this.filter.description.trim(),
+		staticName:this.filter.staticName.trim(),
       };
       return param;
     },
@@ -327,6 +338,7 @@ export default {
         libName: row.libName,
         libType: row.libType,
         ruleType: row.ruleType,
+		staticName:this.filter.staticName,
       };
       const loading = this.$loading({
         lock: true,
@@ -364,6 +376,7 @@ export default {
                   colspan: isFirst ? 1 : 0,
                   ruleGroup: datai.ruleGroup,
                   hasSubCond: datai.hasSubCond,
+				  names:datai.names,
                   msg: datai.msg,
                   description: datai.description,
                   ...dtoList[j],
@@ -392,6 +405,7 @@ export default {
         libName: "",
         baseLibType: "",
         baseLibName: "",
+		staticName:""
       };
     },
   },

+ 1 - 1
vue.config.js

@@ -1,7 +1,7 @@
 const path = require('path');
 //const proxy_path = 'http://192.168.2.241:80';
 // const proxy_path = 'http://192.168.2.241:84';
-const proxy_path = 'http://192.168.2.241:6060';
+const proxy_path = 'http://192.168.2.236:6060';
 //const proxy_path = 'http://192.168.2.236:88';
 //const proxy_path = 'http://192.168.2.236:6060';
 //const proxy_path = 'http://192.168.2.241:6060';