|
@@ -21,12 +21,6 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
- <el-form-item style="marginbottom: 0px">
|
|
|
- <el-button size="mini" @click="handleAllTest"
|
|
|
- >所有术语类型映射测试</el-button
|
|
|
- >
|
|
|
- </el-form-item>
|
|
|
</el-form>
|
|
|
</crumbs>
|
|
|
<div style="margin: 60px 20px 0">
|
|
@@ -61,7 +55,7 @@
|
|
|
<el-button
|
|
|
type="text"
|
|
|
size="small"
|
|
|
- @click="goToInnerPage(scope.row,'noMap')"
|
|
|
+ @click="goToInnerPage(scope.row, 'noMap')"
|
|
|
>{{ scope.row.unMappingNum }}</el-button
|
|
|
>
|
|
|
</template>
|
|
@@ -71,13 +65,19 @@
|
|
|
<el-button
|
|
|
type="text"
|
|
|
size="small"
|
|
|
- @click="goToInnerPage(scope.row,'lessStatic')"
|
|
|
+ @click="goToInnerPage(scope.row, 'lessStatic')"
|
|
|
>{{ scope.row.withoutKnowledgeNum }}</el-button
|
|
|
>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
+ <input
|
|
|
+ type="file"
|
|
|
+ name="uploadfile "
|
|
|
+ id="upFile"
|
|
|
+ @change="uploadFile($event)"
|
|
|
+ />
|
|
|
<el-button type="text" size="small" @click="handleTest(scope.row)"
|
|
|
>执行测试</el-button
|
|
|
>
|
|
@@ -99,6 +99,8 @@ export default {
|
|
|
list: [],
|
|
|
hospitalData: [],
|
|
|
hospitalId: '', //选中医院
|
|
|
+ type: '',
|
|
|
+ caseId: '',
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -123,24 +125,92 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ handleType(caseName) {
|
|
|
+ switch (caseName) {
|
|
|
+ case '诊断':
|
|
|
+ return 1;
|
|
|
+ case '检验':
|
|
|
+ return 2;
|
|
|
+ case '检查':
|
|
|
+ return 3;
|
|
|
+ case '药品':
|
|
|
+ return 4;
|
|
|
+ case '手术/操作':
|
|
|
+ return 5;
|
|
|
+ default:
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ },
|
|
|
// 执行测试
|
|
|
- handleTest() {},
|
|
|
- // 所有规则测试
|
|
|
- handleAllTest() {},
|
|
|
+ handleTest(row) {
|
|
|
+ let inp = document.getElementById('upFile');
|
|
|
+ inp.click();
|
|
|
+ const { caseName, caseId } = row;
|
|
|
+ this.type = this.handleType(caseName); //术语类型(1:诊断、2:检验、3:检查、4:药品、5:手术/操作)
|
|
|
+ this.caseId = caseId; //测试用例id
|
|
|
+ },
|
|
|
+
|
|
|
+ // 导入数据
|
|
|
+ uploadFile(e) {
|
|
|
+ let fileInfo = e.target.files[0];
|
|
|
+ e.preventDefault();
|
|
|
+ let formData = new FormData();
|
|
|
+ formData.append('file', fileInfo);
|
|
|
+ formData.append('hospitalId', this.hospitalId);
|
|
|
+ formData.append('type', this.type);
|
|
|
+ formData.append('caseId', this.caseId);
|
|
|
+ const header = {
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'multipart/form-data',
|
|
|
+ },
|
|
|
+ };
|
|
|
+ api.staticKnowledgeTest(formData, header).then((res) => {
|
|
|
+ if (res.data.code === '00000001') {
|
|
|
+ this.$alert(`数据存在异常,测试失败,请修改后再试`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ .then(() => {})
|
|
|
+ .catch(() => {});
|
|
|
+ this.getDataList(this.hospitalId); // 重新获取列表
|
|
|
+ } else if (res.data === '' && res.status === 200) {
|
|
|
+ this.$alert(`测试成功`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ type: 'success',
|
|
|
+ })
|
|
|
+ .then(() => {})
|
|
|
+ .catch(() => {});
|
|
|
+ this.getDataList(this.hospitalId); // 重新获取列表
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.uploadInfo = '导入';
|
|
|
+ // }, 300);
|
|
|
+ } else {
|
|
|
+ this.$alert(`${res.data.msg}`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ .then(() => {})
|
|
|
+ .catch(() => {});
|
|
|
+ }
|
|
|
+ });
|
|
|
+ //解决上传相同文件不触发change
|
|
|
+ let inp = document.getElementById('upFile');
|
|
|
+ inp.value = '';
|
|
|
+ },
|
|
|
|
|
|
// 跳转至未映射到标准术语条数页面 / 缺少静态知识术语条数
|
|
|
- goToInnerPage(row,type) {
|
|
|
+ goToInnerPage(row, type) {
|
|
|
let hospital = this.hospitalData.find(
|
|
|
(item) => item.id === this.hospitalId
|
|
|
);
|
|
|
let hospitalName = hospital.name;
|
|
|
this.$router.push({
|
|
|
- name: 'LessStaticDisease',
|
|
|
+ name: 'LessStaticOrNoMap',
|
|
|
params: {
|
|
|
data: { ...row },
|
|
|
hospitalId: this.hospitalId,
|
|
|
hospitalName,
|
|
|
- type
|
|
|
+ type,
|
|
|
},
|
|
|
});
|
|
|
},
|
|
@@ -176,4 +246,7 @@ export default {
|
|
|
|
|
|
<style lang="less" scored>
|
|
|
@import '../../../less/admin.less';
|
|
|
+#upFile {
|
|
|
+ display: none !important;
|
|
|
+}
|
|
|
</style>
|