|
@@ -9,15 +9,15 @@
|
|
|
>
|
|
|
<el-select
|
|
|
size="mini"
|
|
|
- v-model="hospitalName"
|
|
|
+ v-model="hospitalId"
|
|
|
placeholder="选择医院"
|
|
|
- clearable
|
|
|
+ @change="handleChange"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in hospitalData"
|
|
|
:label="item.name"
|
|
|
- :value="item.val"
|
|
|
- :key="item.orderNo"
|
|
|
+ :value="item.id"
|
|
|
+ :key="item.id"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -42,8 +42,8 @@
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
:resizable="false"
|
|
|
- prop="hisName"
|
|
|
- label="测试类型"
|
|
|
+ prop="caseName"
|
|
|
+ label="规则类型"
|
|
|
show-overflow-tooltip
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
@@ -54,23 +54,27 @@
|
|
|
|
|
|
<el-table-column
|
|
|
:resizable="false"
|
|
|
- prop="uniqueName"
|
|
|
+ prop="ruleNum"
|
|
|
label="总条数"
|
|
|
show-overflow-tooltip
|
|
|
></el-table-column>
|
|
|
- <el-table-column
|
|
|
- :resizable="false"
|
|
|
- prop="uniqueName"
|
|
|
- label="成功条数"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
+ <el-table-column label="成功条数">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ @click="goToFailedOrSuccessPage(scope.row, 'success')"
|
|
|
+ >{{ scope.row.ruleSuccessNum }}</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="失败条数">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
type="text"
|
|
|
size="small"
|
|
|
- @click="goToErrorPage(scope.row)"
|
|
|
- >5</el-button
|
|
|
+ @click="goToFailedOrSuccessPage(scope.row, 'failed')"
|
|
|
+ >{{ scope.row.ruleFailedNum }}</el-button
|
|
|
>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -82,18 +86,6 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <div class="pagination pagepage">
|
|
|
- <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>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -107,62 +99,132 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
list: [],
|
|
|
- currentPage: 1,
|
|
|
- pageSize: config.pageSize,
|
|
|
- pageSizeArr: config.pageSizeArr,
|
|
|
- pageLayout: config.pageLayout,
|
|
|
- total: 0,
|
|
|
hospitalData: [],
|
|
|
- hospitalName: '', //选中医院
|
|
|
+ hospitalId: '', //选中医院
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.getDataList();
|
|
|
- // 非首页 编辑页返回 设置 this.currentPage
|
|
|
- if (Object.keys(this.$route.params).length !== 0) {
|
|
|
- this.currentPage = this.$route.params.currentPage;
|
|
|
- }
|
|
|
- },
|
|
|
- beforeRouteEnter(to, from, next) {
|
|
|
- next((vm) => {
|
|
|
- //const pm = to.param;
|
|
|
- Object.assign(vm, to.params);
|
|
|
- vm.inCurrentPage = to.params.currentPage;
|
|
|
- });
|
|
|
+ this._getHospitalInfoCDSS();
|
|
|
+ // this.getDataList();
|
|
|
},
|
|
|
methods: {
|
|
|
indexMethod(index) {
|
|
|
- return (this.currentPage - 1) * this.pageSize + index + 1;
|
|
|
- },
|
|
|
- currentChange(next) {
|
|
|
- this.currentPage = next;
|
|
|
- this.getDataList(true);
|
|
|
- },
|
|
|
- handleSizeChange(val) {
|
|
|
- this.pageSize = val;
|
|
|
- this.currentPage = utils.getCurrentPage(
|
|
|
- this.currentPage,
|
|
|
- this.total,
|
|
|
- this.pageSize
|
|
|
- );
|
|
|
- this.getDataList();
|
|
|
+ return index + 1;
|
|
|
},
|
|
|
// 执行测试
|
|
|
- handleTest() {},
|
|
|
+ handleTest(row) {
|
|
|
+ const { caseName, caseId } = row;
|
|
|
+ let billType; // 开单合理性规则类型 1 通用 2 输血
|
|
|
+ if (caseName === '开单合理性提醒_通用规则') {
|
|
|
+ billType = 1;
|
|
|
+ } else if (caseName === '开单类型提醒_输血规则') {
|
|
|
+ billType = 2;
|
|
|
+ }
|
|
|
+ let params = {
|
|
|
+ caseId,
|
|
|
+ billType,
|
|
|
+ hospitalId: this.hospitalId,
|
|
|
+ };
|
|
|
+ api.billRuleTest(params).then((res) => {
|
|
|
+ console.log(res, '测试结果');
|
|
|
+ });
|
|
|
+ },
|
|
|
// 所有规则测试
|
|
|
- handleAllTest() {},
|
|
|
+ handleAllTest() {
|
|
|
+ if (this.hospitalId === '') {
|
|
|
+ this.$message({
|
|
|
+ message: '请先选择医院',
|
|
|
+ type: 'warning',
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ api.ruleAllTest({ hospitalId: this.hospitalId }).then((res) => {
|
|
|
+ console.log(res, '所有规则测试测试结果');
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ // 跳转至失败/成功条数页面
|
|
|
+ goToFailedOrSuccessPage(row, type) {
|
|
|
+ const page = this.handleGoPage(row.caseName)
|
|
|
+ this.$router.push({
|
|
|
+ name: page,
|
|
|
+ params: { data: { ...row }, type },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 处理跳转到的页面
|
|
|
+ handleGoPage(caseName){
|
|
|
+ switch(caseName){
|
|
|
+ case '开单合理性提醒_通用规则':
|
|
|
+ return 'BillCommonTest'
|
|
|
+ case '开单类型提醒_输血规则':
|
|
|
+ return 'BillFusionTest'
|
|
|
+ default:
|
|
|
+ return null
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
- // 跳转至失败条数页面
|
|
|
- goToErrorPage() {},
|
|
|
+ // 获取医院信息
|
|
|
+ _getHospitalInfoCDSS() {
|
|
|
+ api.getHospitalInfo().then((res) => {
|
|
|
+ if (res.data.code === '0') {
|
|
|
+ this.hospitalData = res.data && res.data.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ // 选中医院
|
|
|
+ handleChange(val) {
|
|
|
+ if (val === '') return;
|
|
|
+ this.getDataList(val);
|
|
|
+ },
|
|
|
|
|
|
- getDataList() {},
|
|
|
+ // 获取列表数据
|
|
|
+ getDataList(id) {
|
|
|
+ const params = {
|
|
|
+ hospitalId: id,
|
|
|
+ };
|
|
|
+ this.searched = true;
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: 'Loading',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)',
|
|
|
+ });
|
|
|
+ api.getCaseResultList(params).then((res) => {
|
|
|
+ loading.close();
|
|
|
+ if (res.data.code === '0') {
|
|
|
+ this.list = res.data && res.data.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
// 导出
|
|
|
- exportData() {},
|
|
|
+ exportData() {
|
|
|
+ if (this.hospitalId === '') {
|
|
|
+ this.$message({
|
|
|
+ message: '请先选择医院',
|
|
|
+ type: 'warning',
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$alert('确定要导出规则未使用映射关系吗?', '', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ title: '提示',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ api.exportRuleExcel({ hospitalId: this.hospitalId }).then((res) => {
|
|
|
+ if (res.status === 200) {
|
|
|
+ this.$message({ message: '导出成功', type: 'success' });
|
|
|
+ utils.downloadExportedData(res.data, '规则未使用映射关系.xls');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scored>
|
|
|
@import '../../../less/admin.less';
|
|
|
-
|
|
|
</style>
|