mfmf 3 éve
szülő
commit
638a79111d

+ 3 - 0
src/api/config.js

@@ -162,6 +162,9 @@ export default {
     'zskSearchConcept': '/klDisease/searchConceptRuleClass', //知识库搜索术语
     'zskUpdateAll': '/cache/clearRuleAll', //更新数据
     'zskgetDict': '/kl/dictionary/getDictionarys', //禁止修改基础规则类型
+	
+	'zskgetRulePage': '/klRule/getRulePage',//查询所有有效的规则
+	'zskgetRuleDetail': '/klRule/getRuleDetail',//根据录入内容查询有效规则的明细
 
     'importExcelDataVerify': '/tran/mappingConfig/importExcelDataVerify', //数据导入校验
   },

+ 6 - 0
src/api/knowledgeLib.js

@@ -33,6 +33,12 @@ export default {
     zskgetDict(){
         return axios.post(urls.zskgetDict)
     },
+	zskgetRulePage(param) {
+	    return axios.post(urls.zskgetRulePage, param);
+	},
+	zskgetRuleDetail(param) {
+	    return axios.post(urls.zskgetRuleDetail, param);
+	},
     getCallRecord(param){
         return axios.post(urls.getCallRecord, param)
     }

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

@@ -0,0 +1,174 @@
+<template>
+	<div>
+		<div style="margin-top: 10px;">
+			<span class="span1">规则类型:</span>{{row.ruleTypeName||'-'}}
+			<span class="span1" style="margin-left:100px;">规则术语类型:</span>{{row.libTypeName||'-'}}
+			<span class="span1" style="margin-left:100px;">医学标准术语:</span>{{row.libName||'-'}}
+			<el-form :inline="true" style="margin-top: 10px;">
+				<el-form-item label="基础规则术语类型:">
+					<el-select v-model="filter.baseLibType" clearable placeholder="请选择" size="mini">
+						<el-option v-for="item in baseTermTypeList2" :key="item.val" :label="item.name"
+							:value="item.val">
+						</el-option>
+					</el-select>
+				</el-form-item>
+				<el-form-item label="基础医学标准术语:">
+					<el-input size="mini" v-model="filter.baseLibName" placeholder="请输入" clearable></el-input>
+				</el-form-item>
+				<el-form-item>
+					<el-button size="mini" @click="getRuleDetail">确认</el-button>
+				</el-form-item>
+			</el-form>
+		</div>
+		<el-main>
+			<el-table :data="tableData" :span-method="objectSpanMethod" border style="width: 100%;" height="600px">
+				<el-table-column prop="id" :label="'组(共'+total+'组)'" width="100"></el-table-column>
+				<el-table-column prop="description" label="规则名称"></el-table-column>
+				<el-table-column prop="msg" label="附加信息" show-overflow-tooltip></el-table-column>
+				<el-table-column prop="baseType" label="基础规则类型">
+					<template slot-scope="scope">
+						{{tofind(scope.row,1)}}
+					</template>
+				</el-table-column>
+				<el-table-column prop="baseLibType" label="基础规则术语类型">
+					<template slot-scope="scope">
+						{{tofind(scope.row,2)}}
+					</template>
+				</el-table-column>
+				<el-table-column prop="baseLibName" label="基础医学标准术语"></el-table-column>
+				<el-table-column prop="baseMinOperator" label="最小域比较符" width="80"></el-table-column>
+				<el-table-column prop="baseMinValue" label="最小域值" width="80"></el-table-column>
+				<el-table-column prop="baseMinUnit" label="最小域单位" width="80"></el-table-column>
+				<el-table-column prop="baseMaxOperator" label="最大域比较符" width="80"></el-table-column>
+				<el-table-column prop="baseMaxValue" label="最大域值" width="80"></el-table-column>
+				<el-table-column prop="baseMaxUnit" label="最大域单位" width="80"></el-table-column>
+				<el-table-column prop="baseEqOperator" label="等于阈值" width="80"></el-table-column>
+				<el-table-column prop="baseEqUnit" label="等于域单位" width="80"></el-table-column>
+			</el-table>
+		</el-main>
+	</div>
+</template>
+
+<script>
+	import api from '@api/knowledgeLib.js';
+	import config from '@api/config.js';
+	import utils from '@api/utils.js';
+	export default {
+		name: 'CheckRule',
+		data: function() {
+			return {
+				tableData: [],
+				spanArr: [],
+				pos: 0,
+				filter: {
+					baseLibType: "",
+					baseLibName: ""
+				},
+				baseTermTypeList2: [],
+				total: 0
+			};
+		},
+		created() {
+			const list = this.$props.rulelist
+			const baseTermTypeList1 = this.$props.baseTermTypeList
+			this.baseTermTypeList2 = baseTermTypeList1
+			this.filter.baseLibName=this.$props.baseLibName
+			this.filter.baseLibType=this.$props.baseLibType
+			this.tableData = list
+			this.getSpanArr(this.tableData)
+			this.total = this.tableData.slice(-1)[0].id
+		},
+		props: ['rulelist', 'baseTypeList', 'baseTermTypeList', 'row', 'description','baseLibType','baseLibName'],
+		methods: {
+			tofind(row, a) {
+				let type = ''
+				if (a == 1) {
+					type = this.$props.baseTypeList.find(it => it.val == row.baseType)
+				} else {
+					type = this.$props.baseTermTypeList.find(it => it.val == row.baseLibType)
+				}
+				return type.name
+			},
+			objectSpanMethod({
+				row,
+				column,
+				rowIndex,
+				columnIndex
+			}) {
+				if (columnIndex === 1 || columnIndex === 0 || columnIndex === 2) {
+					const _row = this.spanArr[rowIndex];
+					const _col = _row > 0 ? 1 : 0;
+					return {
+						rowspan: _row,
+						colspan: _col
+					}
+				}
+			},
+			getSpanArr(data) {
+				for (var i = 0; i < data.length; i++) {
+					if (i === 0) {
+						this.spanArr.push(1);
+						this.pos = 0
+					} else {
+						// 判断当前元素与上一个元素是否相同
+						if (data[i].id === data[i - 1].id) {
+							this.spanArr[this.pos] += 1;
+							this.spanArr.push(0);
+						} else {
+							this.spanArr.push(1);
+							this.pos = i;
+						}
+					}
+				}
+			},
+			getRuleDetail() {
+				const param = {
+					baseLibName: this.filter.baseLibName,
+					baseLibType: this.filter.baseLibType,
+					description: this.$props.description,
+					libName: this.$props.row.libName,
+					libType: this.$props.row.libType,
+					ruleType: this.$props.row.ruleType,
+				}
+				api.zskgetRuleDetail(param).then((res) => {
+						if (res.data.code == "0") {
+							// this.rulelist = res.data.data
+							console.log(res.data.data.ruleConditionDTOList)
+							let datalist = []
+							const data = res.data.data.ruleConditionDTOList
+							for (let i in data) {
+								for (let j of data[i].ruleBaseDTOList) {
+									let a = parseInt(i)
+									datalist.push({
+										id: a + 1,
+										msg: data[i].msg,
+										description: data[i].description,
+										...j
+									})
+								}
+							}
+							this.tableData = datalist
+						}
+					})
+					.catch((error) => {
+						console.log(error);
+					});
+			},
+		}
+	};
+</script>
+
+<style scoped lang="less">
+	/deep/.el-table .cell {
+		line-height: 25px;
+	}
+
+	.span1 {
+		font-weight: bolder;
+	}
+
+	/deep/.el-form--inline .el-form-item__label {
+		font-weight: bolder;
+		font-size: 14px;
+	}
+</style>

+ 370 - 0
src/components/knowledgeExtra/RuleCheck.vue

@@ -0,0 +1,370 @@
+<template>
+	<div>
+		<crumbs title="规则维护" :minWidth="titleWidth" class="knowledgeTitle">
+			<el-form :inline="true" class="demo-form-inline">
+				<el-form-item label="规则名称:">
+					<el-input size="mini" v-model="filter.description" placeholder="请输入" clearable></el-input>
+				</el-form-item>
+				<el-form-item label="规则类型:">
+					<el-select v-model="filter.ruleType" clearable placeholder="请选择" size="mini">
+						<el-option v-for="item in ruleTypeList" :key="item.val" :label="item.name" :value="item.val">
+						</el-option>
+					</el-select>
+				</el-form-item>
+				<el-form-item label="规则术语类型:">
+					<el-select v-model="filter.libType" clearable placeholder="请选择" size="mini">
+						<el-option v-for="item in ruleTermTypeList" :key="item.val" :label="item.name"
+							:value="item.val">
+						</el-option>
+					</el-select>
+				</el-form-item>
+				<el-form-item label="医学标准术语:">
+					<el-input size="mini" v-model="filter.libName" placeholder="请输入" clearable></el-input>
+				</el-form-item>
+			</el-form>
+			<el-form class="secLine" :inline="true">
+				<el-form-item label="基础规则术语类型:">
+					<el-select v-model="filter.baseLibType" clearable placeholder="请选择" size="mini">
+						<el-option v-for="item in baseTermTypeList" :key="item.val" :label="item.name" :value="item.val">
+						</el-option>
+					</el-select>
+				</el-form-item>
+				<el-form-item label="基础医学标准术语:">
+					<el-input size="mini" v-model="filter.baseLibName" placeholder="请输入" clearable></el-input>
+				</el-form-item>
+				<el-form-item>
+					<el-button size="mini" @click="filterDatas">确认</el-button>
+				</el-form-item>
+			</el-form>
+		</crumbs>
+		<div class="contents knowledgeContents">
+			<el-table :data="list" border style="width: 100%">
+				<el-table-column type="index" :index="indexMethod" label="编号" width="120"></el-table-column>
+				<el-table-column prop="ruleTypeName" label="规则类型" width="240">
+				</el-table-column>
+				<el-table-column prop="libTypeName" label="规则术语类型"></el-table-column>
+				<el-table-column prop="libName" label="医学标准术语">
+				</el-table-column>
+				<el-table-column label="操作" width="120" fixed="right">
+					<template slot-scope="scope">
+						<el-button type="text" size="small" @click="checkData(scope.row)">查看</el-button>
+					</template>
+				</el-table-column>
+			</el-table>
+			<el-pagination :current-page.sync="currentPage" @current-change="currentChange" background
+				:page-size="pageSize" :page-sizes="pageSizeArr" @size-change="handleSizeChange" :layout="pageLayout"
+				:total="total"></el-pagination>
+		</div>
+		<el-dialog title="查看" :visible.sync="dialogVisible" :before-close="closecheckDialog" width="80rem"
+			v-if="dialogVisible" :close-on-click-modal="false" :fullscreen="true">
+			<CheckRule :rulelist="rulelist" :baseTypeList="baseTypeList" :baseTermTypeList="baseTermTypeList"
+				:row="row" :description="filter.description" :baseLibType="filter.baseLibType" :baseLibName="filter.baseLibName">
+			</CheckRule>
+			<div style="text-align: center;">
+				<el-button @click="closecheckDialog" style="width: 180px;">关闭</el-button>
+			</div>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+	import api from '@api/knowledgeLib.js';
+	import config from '@api/config.js';
+	import utils from '@api/utils.js';
+	import CheckRule from "./DiagCheckRule.vue";
+
+
+	export default {
+		name: 'ZskRuleCheck',
+		data: function() {
+			return {
+				list: [],
+				searched: false,
+				filter: {
+					// 	parStatus: '',
+					// 	parDescription: '',
+					// 	parConceptName: '',
+					// 	parRuleType: '',
+					description: '', //规则名称
+					ruleType: '', //规则类型
+					libType: '', //规则术语类型
+					libName: '', //医学标准术语
+					baseLibType: '', //基础规则术语类型
+					baseLibName: '', //基础医学标准术语
+				},
+				ruleTypeList: [], //规则类型列表  1
+				ruleTermTypeList: [], //规则术语类型列表  2
+				conceptList: [], //医学标准术语列表 3
+				baseTypeList: [], //基础规则类型列表  4
+				baseTermTypeList: [], //基础规则术语类型列表 5
+				rulelist: [], //查看
+				cacheData: {},
+				currentPage: 1,
+				pageSize: config.pageSize,
+				pageSizeArr: config.pageSizeArr,
+				pageLayout: config.pageLayout,
+				total: 0,
+				titleWidth: '970px', //头部最小宽度
+				dialogVisible: false,
+				row:{},
+			};
+		},
+		components: {
+			CheckRule
+		},
+		created() {
+			// const param = this.$route.params;
+			// console.log(param)
+			// if (param.currentPage) {
+			// 	this.inCurrentPage = param.currentPage;
+			// }
+			// if (param.filter) {
+			// 	this.filter = param.filter;
+			// }
+			const that = this;
+			//返回时避免参数未赋值就获取列表
+			setTimeout(function() {
+				that.getDataList();
+			});
+			this.getDict();
+		},
+		watch: {
+			filter: {
+				handler: function() {
+					this.searched = false;
+				},
+				deep: true
+			}
+		},
+		// beforeRouteEnter(to, from, next) {
+		//     next(vm => {
+		//         //const pm = to.param;
+		//         Object.assign(vm, to.params);
+		//         vm.inCurrentPage=to.params.currentPage;
+		//     })
+		// },
+		methods: {
+			getDict() {
+				api.zskgetDict().then(res => {
+						if (res.data.code == '0') {
+							const data = res.data.data;
+							this.ruleTypeList = data[-101]
+							this.ruleTermTypeList = data[-102]
+							this.baseTypeList = data[-103]
+							this.baseTermTypeList = data[-104]
+							// 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(',')
+							// );
+							// localStorage.setItem('zskNumDict', data['22'][0].val);
+							// localStorage.setItem('zskSubDict', (data['23'].map(it => it.val) || []).join(','));
+							// localStorage.setItem('zskDragDict', (data['27'].map(it => it.val) || []).join(','));
+							// localStorage.setItem('zskDelDict', data['26'][0].val);
+						}
+					})
+					.catch(error => {
+						console.log(error);
+					});
+			},
+			statusTrans(type) {
+				const obj = this.ruleTypeList.find(it => it.type === type);
+				return obj && obj.name;
+			},
+			handleSizeChange(val) {
+				this.pageSize = val;
+				this.currentPage = utils.getCurrentPage(
+					this.currentPage,
+					this.total,
+					this.pageSize
+				);
+				this.getDataList();
+			},
+			filterDatas() {
+				this.currentPage = 1;
+				this.getDataList(1);
+			},
+			getDataList(flag, isTurnPage) {
+				const params = this.getFilterItems(isTurnPage);
+				this.searched = true;
+				const loading = this.$loading({
+					lock: true,
+					text: 'Loading',
+					spinner: 'el-icon-loading',
+					background: 'rgba(0, 0, 0, 0.7)'
+				});
+				api.zskgetRulePage(params).then(res => {
+						loading.close();
+						if (res.data.code == '0') {
+							const data = res.data.data;
+							this.list = data.records;
+							if (!flag) {
+								//搜索时不缓存
+								this.cacheData[params.current] = data.records;
+							} else {
+								this.cacheData = {};
+							}
+							this.total = data.total;
+							if (this.inCurrentPage !== undefined) {
+								this.currentPage = this.inCurrentPage;
+								this.inCurrentPage = undefined;
+							}
+						} else {
+							this.warning(res.data.msg || '获取列表数据失败');
+						}
+					})
+					.catch(error => {
+						loading.close();
+						console.log(error);
+					});
+			},
+			getFilterItems(isTurnPage) {
+				//翻页时筛选条件没点确定则清空
+				if (isTurnPage && !this.searched) {
+					this.clearFilter();
+				}
+				const param = {
+					current: this.inCurrentPage || this.currentPage,
+					size: this.pageSize,
+					libName: this.filter.libName.trim(),
+					libType: this.filter.libType,
+					ruleType: this.filter.ruleType,
+					baseLibName: this.filter.baseLibName.trim(),
+					baseLibType: this.filter.baseLibType,
+					description: this.filter.description.trim(),
+				};
+				return param;
+			},
+			indexMethod(index) {
+				return (this.currentPage - 1) * this.pageSize + index + 1;
+			},
+			currentChange(next) {
+				this.currentPage = next;
+				/*if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
+				            this.list = this.cacheData[next];
+				          } else {*/
+				this.getDataList(1, true);
+				//}
+			},
+			warning(msg, type) {
+				this.$message({
+					showClose: true,
+					message: msg,
+					type: type || 'warning'
+				});
+			},
+			checkData(row) {
+				console.log(row)
+				this.row=row
+				if(!this.searched) {
+					this.clearFilter();
+				}
+				const param = {
+					baseLibName: this.filter.baseLibName,
+					baseLibType: this.filter.baseLibType,
+					description: this.filter.description,
+					libName: row.libName,
+					libType: row.libType,
+					ruleType: row.ruleType,
+				}
+				api.zskgetRuleDetail(param).then((res) => {
+						if (res.data.code == "0") {
+							// this.rulelist = res.data.data
+							console.log(res.data.data.ruleConditionDTOList)
+							let datalist =[]
+							const data=res.data.data.ruleConditionDTOList
+							for(let i in data){
+								for(let j of data[i].ruleBaseDTOList){
+									let a = parseInt(i)
+									datalist.push({
+										id:a+1,
+										msg:data[i].msg,
+										description:data[i].description,
+										...j
+									})
+								}
+							}
+							this.rulelist=datalist
+							console.log(datalist)
+							this.dialogVisible = true
+						}
+					})
+					.catch((error) => {
+						console.log(error);
+					});
+			},
+			closecheckDialog() {
+				this.dialogVisible = false
+			},
+			clearFilter() {
+				this.filter = {
+					description: '',
+					ruleType: '',
+					libType: '',
+					libName: '',
+					baseLibType: '',
+					baseLibName: '',
+				};
+			},
+		}
+	};
+</script>
+
+<style lang="less" scoped>
+	@import '../../less/admin.less';
+
+	/deep/ .container.knowledgeTitle {
+		height: 80px;
+	}
+
+	/deep/ .contents.knowledgeContents {
+		padding: 104px 20px 0;
+	}
+
+	/deep/ .secLine.el-form {
+		float: right;
+		display: block;
+		position: relative;
+		top: -5px;
+	}
+
+	.delete {
+		color: red;
+	}
+
+	.review {
+		color: #22ccc8;
+	}
+
+	.el-table .cell {
+		overflow: hidden;
+		white-space: nowrap;
+	}
+
+	#upFile {
+		display: none !important;
+	}
+
+	.unvailable {
+		color: #fe7d3d;
+
+		&:hover {
+			color: #f19061;
+		}
+	}
+
+	/deep/.el-dialog__body{
+		 padding-top:0px
+	}
+	/deep/.el-dialog__title{
+		color: #333333;
+		font-weight: bold;
+		font-size: 16px;
+	}
+	/deep/.el-dialog__header{
+		border-left:4px #48C5D7 solid
+	}
+</style>

+ 6 - 0
src/routes.js

@@ -36,6 +36,7 @@ import AddPlan from '@components/icss/plan/AddPlan.vue';  //关联维护设置
 import Bill from '@components/icss/bill/Bill.vue';  //开单
 import AddBill from '@components/icss/bill/AddBill.vue';  //开单-编辑
 import ZskRuleManager from '@components/knowledgeExtra/RuleManager.vue';  //知识库规则维护
+import ZskRuleCheck from '@components/knowledgeExtra/RuleCheck.vue';  //知识库规则维护
 import AddZskRule from '@components/knowledgeExtra/AddNewRule.vue';   //知识库添加规则
 import SonHospital from '@components/icss/sonhospital/SonHospital.vue';  //子医院维护
 import CallRecordManager from '@components/callRecord/CallRecordManager.vue';  //知识库规则维护
@@ -95,6 +96,11 @@ export default [
         component: ZskRuleManager,
         name: 'ZskRuleManager',
       },
+	  {
+	    path: 'GZWH-GZCX',
+	    component: ZskRuleCheck,
+	    name: 'ZskRuleCheck',
+	  },
       { // 接口管理-调用记录
         path: 'JKGL-DYJL',
         component: CallRecordManager,

+ 2 - 1
vue.config.js

@@ -1,6 +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:84';
+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';