|
@@ -5,7 +5,16 @@
|
|
|
<el-col :span="8">
|
|
|
<div class="box_wrapper">
|
|
|
<el-input placeholder="输入关键字进行过滤" v-model="filterText"></el-input>
|
|
|
- <el-tree class="filter-tree" node-key="id" highlight-current :data="menus" :props="defaultProps" :filter-node-method="filterNode" ref="tree" @node-click="handleNodeClick"></el-tree>
|
|
|
+ <el-tree
|
|
|
+ class="filter-tree"
|
|
|
+ node-key="id"
|
|
|
+ highlight-current
|
|
|
+ :data="menuList"
|
|
|
+ :props="defaultProps"
|
|
|
+ :filter-node-method="filterNode"
|
|
|
+ ref="tree"
|
|
|
+ @node-click="handleNodeClick"
|
|
|
+ ></el-tree>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<!-- 右侧列表 -->
|
|
@@ -13,10 +22,19 @@
|
|
|
<div class="box_wrapper">
|
|
|
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
|
|
<el-form-item label="查询时间">
|
|
|
- <el-date-picker v-model="formInline.year" :clearable="false" type="year" :picker-options="pickerOptions" format="yyyy年" value-format="yyyy" placeholder="选择年份"></el-date-picker>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="formInline.year"
|
|
|
+ :clearable="false"
|
|
|
+ type="year"
|
|
|
+ :picker-options="pickerOptions"
|
|
|
+ format="yyyy年"
|
|
|
+ value-format="yyyy"
|
|
|
+ placeholder="选择年份"
|
|
|
+ ></el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="onSearch">查询</el-button>
|
|
|
+ <el-button v-if="$route.query.type === 'children'" type="text" @click="onBack">返回</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<el-table :data="tableData" style="width: 100%">
|
|
@@ -450,6 +468,22 @@ export default {
|
|
|
],
|
|
|
},
|
|
|
],
|
|
|
+ cMenus: [
|
|
|
+ {
|
|
|
+ id: 34,
|
|
|
+ name: '指标十、细菌培养检查记录符合率(子)',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ id: 341,
|
|
|
+ name: '细菌培养检查的医嘱、报告单、病程记录相对应的住院患者病历数',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 3432,
|
|
|
+ name: '同期开展细菌培养检查的住院患者病历总数',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
formInline: {
|
|
|
year: '',
|
|
|
},
|
|
@@ -457,56 +491,60 @@ export default {
|
|
|
filterText: '',
|
|
|
defaultProps: {
|
|
|
children: 'children',
|
|
|
- label: 'name'
|
|
|
+ label: 'name',
|
|
|
},
|
|
|
ruleId: '',
|
|
|
ruleName: '',
|
|
|
time: new Date(),
|
|
|
pickerOptions: {
|
|
|
disabledDate(time) {
|
|
|
- const date = new Date()
|
|
|
- const year = date.getFullYear();
|
|
|
- const timeYear = time.getFullYear();
|
|
|
- return year < timeYear
|
|
|
- }
|
|
|
- }
|
|
|
+ const date = new Date();
|
|
|
+ const year = date.getFullYear();
|
|
|
+ const timeYear = time.getFullYear();
|
|
|
+ return year < timeYear;
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
// 判断是取分子还是分母
|
|
|
judgeNum() {
|
|
|
- const str = `${this.ruleId}`
|
|
|
- const length = str.length
|
|
|
- const lastNum = str[length - 1]
|
|
|
+ const str = `${this.ruleId}`;
|
|
|
+ const length = str.length;
|
|
|
+ const lastNum = str[length - 1];
|
|
|
if (Number(lastNum) > 1) {
|
|
|
// 分母
|
|
|
- return 'denominator'
|
|
|
+ return 'denominator';
|
|
|
} else {
|
|
|
// 分子
|
|
|
- return 'numerator'
|
|
|
+ return 'numerator';
|
|
|
}
|
|
|
+ },
|
|
|
+ menuList() {
|
|
|
+ return this.$route.query.type === 'children' ? this.cMenus : this.menus
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
filterText(val) {
|
|
|
this.$refs.tree.filter(val);
|
|
|
},
|
|
|
- // $route(to, from) {
|
|
|
- // console.log(to.path, from.path)
|
|
|
- // if (from.path !== '/caseIndexList') {
|
|
|
- // console.log(1111)
|
|
|
- // this.$router.go(0)
|
|
|
- // console.log(1111)
|
|
|
- // } else {
|
|
|
- // console.log(2222)
|
|
|
- // }
|
|
|
- // }
|
|
|
+ $route(to, from) {
|
|
|
+ if (to.query.type === 'children' || from.query.type === 'children') {
|
|
|
+ }
|
|
|
+ // if (from.path == '/caseIndexList' && from.query.ruleId == 33) {
|
|
|
+ // this.$router.go(0)
|
|
|
+ // }
|
|
|
+ },
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 返回
|
|
|
+ onBack() {
|
|
|
+ this.$router.go(-1)
|
|
|
+ },
|
|
|
// 病案指标列表跳转
|
|
|
toCaseIndexPage(row) {
|
|
|
- const { time } = row
|
|
|
- this.$router.push({ path: '/caseIndexList', query: { time, ruleId: Number(`${this.ruleId}`.slice(0, 2)), type: this.judgeNum} })
|
|
|
+ const { time } = row;
|
|
|
+ this.$router.push({ path: '/caseIndexList', query: { time, ruleId: Number(`${this.ruleId}`.slice(0, 2)), type: this.judgeNum } });
|
|
|
},
|
|
|
// 菜单筛选
|
|
|
filterNode(value, data) {
|
|
@@ -514,53 +552,52 @@ export default {
|
|
|
return data.name.indexOf(value) !== -1;
|
|
|
},
|
|
|
handleNodeClick(data) {
|
|
|
- const { id, name } = data
|
|
|
- this.ruleId = id
|
|
|
- this.ruleName = name
|
|
|
- if (id>10 && this.formInline.year) {
|
|
|
- this.getList()
|
|
|
+ const { id, name } = data;
|
|
|
+ this.ruleId = id;
|
|
|
+ this.ruleName = name;
|
|
|
+ if (id > 10 && this.formInline.year) {
|
|
|
+ this.getList();
|
|
|
}
|
|
|
},
|
|
|
// 获取右侧列表数据
|
|
|
getList() {
|
|
|
- const { year } = this.formInline
|
|
|
+ const { year } = this.formInline;
|
|
|
const params = {
|
|
|
start_time: `${year}0101`,
|
|
|
end_time: `${year}1231`,
|
|
|
year,
|
|
|
- type: Number(`${this.ruleId}`.slice(0, 2))
|
|
|
- }
|
|
|
+ type: Number(`${this.ruleId}`.slice(0, 2)),
|
|
|
+ };
|
|
|
this.$axios2.post('/get_assessment_indicators', params).then(res => {
|
|
|
if (Array.isArray(res.data)) {
|
|
|
res.data.map(item => {
|
|
|
- item.name = this.ruleName
|
|
|
- })
|
|
|
- this.tableData = res.data
|
|
|
+ item.name = this.ruleName;
|
|
|
+ });
|
|
|
+ this.tableData = res.data;
|
|
|
} else {
|
|
|
- this.tableData = []
|
|
|
+ this.tableData = [];
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
// 查询
|
|
|
onSearch() {
|
|
|
- const { year } = this.formInline
|
|
|
+ const { year } = this.formInline;
|
|
|
if (!year) {
|
|
|
- this.$message.error('请选择查询时间')
|
|
|
- return
|
|
|
+ this.$message.error('请选择查询时间');
|
|
|
+ return;
|
|
|
}
|
|
|
if (!this.ruleId) {
|
|
|
- this.$message.error('请选择查询指标')
|
|
|
- return
|
|
|
+ this.$message.error('请选择查询指标');
|
|
|
+ return;
|
|
|
}
|
|
|
- this.getList()
|
|
|
+ this.getList();
|
|
|
},
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-
|
|
|
-.link{
|
|
|
+.link {
|
|
|
font-weight: 600;
|
|
|
color: #409eff;
|
|
|
cursor: pointer;
|