|
@@ -15,7 +15,17 @@
|
|
|
<div class="searchBar">
|
|
|
<div class="searchContent">
|
|
|
<el-form :inline="true" class="demo-form-inline">
|
|
|
- <el-form-item label class="selectMedicine">
|
|
|
+ <el-form-item class="selectMedicine" label="标准术语状态:">
|
|
|
+ <el-select size="mini" v-model="filter.status" placeholder="请选择" clearable>
|
|
|
+ <el-option
|
|
|
+ v-for="item in statusList"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ :key="item.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="匹配状态:" class="selectMedicine">
|
|
|
<el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
|
|
|
<el-option
|
|
|
v-for="item in matchList"
|
|
@@ -45,11 +55,16 @@
|
|
|
<el-table-column :resizable="false" prop="hisName" label="医院诊断名称" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column :resizable="false" prop="code" label="ICD-10编码" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column :resizable="false" prop="uniqueName" label="标准诊断名称" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column :resizable="false" prop="operate" label="状态">
|
|
|
+ <el-table-column :resizable="false" prop="operate" label="匹配状态">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column :resizable="false" prop="operate" label="标准术语状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{scope.row.status == 0?'禁用':'启用'}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column :resizable="false" prop="operate" label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
|
|
@@ -104,6 +119,11 @@ export default {
|
|
|
{ id: 0, name: '未匹配' },
|
|
|
{ id: 2, name: '多项匹配' }
|
|
|
],
|
|
|
+ statusList: [
|
|
|
+ { id: '', name: '全部' },
|
|
|
+ { id: 1, name: '启用' },
|
|
|
+ { id: 0, name: '禁用' },
|
|
|
+ ],
|
|
|
list: [],
|
|
|
searched: false,
|
|
|
filter: {
|
|
@@ -132,7 +152,8 @@ export default {
|
|
|
created() {
|
|
|
const { data } = this.$route.params;
|
|
|
this.hospitaiName = (data && data.name) || localStorage.getItem('name');
|
|
|
- this.hospitalId = (data && data.hospitalId) || localStorage.getItem('hospitalId');
|
|
|
+ this.hospitalId =
|
|
|
+ (data && data.hospitalId) || localStorage.getItem('hospitalId');
|
|
|
const that = this;
|
|
|
//返回时避免参数未赋值就获取列表
|
|
|
setTimeout(function() {
|
|
@@ -260,9 +281,11 @@ export default {
|
|
|
hisName: this.filter.hisName.trim(),
|
|
|
uniqueName: this.filter.uniqueName.trim(),
|
|
|
icdCode: '',
|
|
|
- hospitalId: (data && data.hospitalId) || localStorage.getItem('hospitalId'),
|
|
|
+ hospitalId:
|
|
|
+ (data && data.hospitalId) || localStorage.getItem('hospitalId'),
|
|
|
type: 4,
|
|
|
- isMatch: this.filter.match
|
|
|
+ isMatch: this.filter.match,
|
|
|
+ status: this.filter.status,
|
|
|
};
|
|
|
return param;
|
|
|
},
|
|
@@ -449,64 +472,51 @@ export default {
|
|
|
'Content-Type': 'multipart/form-data'
|
|
|
}
|
|
|
};
|
|
|
- this.uploadInfo = '导入中...';
|
|
|
- api.importExcelDataVerify(formData, header).then(res => {
|
|
|
- if (res.data.code === '00020001') {
|
|
|
- this.$confirm(`${res.data.msg}`, '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.importDiseaseRecord(formData, header)
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- setTimeout(() => {
|
|
|
- this.uploadInfo = '导入';
|
|
|
- }, 300);
|
|
|
- });
|
|
|
- } else if (res.data.data === true) {
|
|
|
- this.importDiseaseRecord(formData, header)
|
|
|
- } else {
|
|
|
- this.$alert(`${res.data.msg}`, '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- // cancelButtonText: '取消',
|
|
|
- // cancelButtonClass: 'cancelSure',
|
|
|
- // confirmButtonClass: 'sure',
|
|
|
- // customClass: 'exportConfirm',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- .then(() => {})
|
|
|
- .catch(() => {});
|
|
|
-
|
|
|
- setTimeout(() => {
|
|
|
- this.uploadInfo = '导入';
|
|
|
- }, 300);
|
|
|
- }
|
|
|
- });
|
|
|
+ // this.uploadInfo = '导入中...';
|
|
|
+ // api.importExcelDataVerify(formData, header).then(res => {
|
|
|
+ // if (res.data.code === '00020001') {
|
|
|
+ // this.$confirm(`${res.data.msg}`, '提示', {
|
|
|
+ // confirmButtonText: '确定',
|
|
|
+ // cancelButtonText: '取消',
|
|
|
+ // type: 'warning'
|
|
|
+ // })
|
|
|
+ // .then(() => {
|
|
|
+ // this.importDiseaseRecord(formData, header);
|
|
|
+ // })
|
|
|
+ // .catch(() => {
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.uploadInfo = '导入';
|
|
|
+ // }, 300);
|
|
|
+ // });
|
|
|
+ // } else if (res.data.data === true) {
|
|
|
+ // this.importDiseaseRecord(formData, header);
|
|
|
+ // } else {
|
|
|
+ // this.$alert(`${res.data.msg}`, '提示', {
|
|
|
+ // confirmButtonText: '确定',
|
|
|
+ // // cancelButtonText: '取消',
|
|
|
+ // // cancelButtonClass: 'cancelSure',
|
|
|
+ // // confirmButtonClass: 'sure',
|
|
|
+ // // customClass: 'exportConfirm',
|
|
|
+ // type: 'warning'
|
|
|
+ // })
|
|
|
+ // .then(() => {})
|
|
|
+ // .catch(() => {});
|
|
|
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.uploadInfo = '导入';
|
|
|
+ // }, 300);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ this.importDiseaseRecord(formData, header);
|
|
|
//解决上传相同文件不触发change
|
|
|
let inp = document.getElementById('upFile');
|
|
|
inp.value = '';
|
|
|
},
|
|
|
importDiseaseRecord(formData, header) {
|
|
|
api.importDiseaseRecord(formData, header).then(res => {
|
|
|
- if ((res.data.code === '00020007')) {
|
|
|
- this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- // cancelButtonText: '取消',
|
|
|
- // cancelButtonClass: 'cancelSure',
|
|
|
- // confirmButtonClass: 'sure',
|
|
|
- // customClass: 'exportConfirm',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- .then(() => {})
|
|
|
- .catch(() => {});
|
|
|
- this.getDataList(); // 重新获取列表
|
|
|
- setTimeout(() => {
|
|
|
- this.uploadInfo = '导入';
|
|
|
- }, 300);
|
|
|
- } else if (res.data.data === true && res.status === 200) {
|
|
|
+ if (res.headers['content-disposition']) {
|
|
|
+ this.downloadUrl(res);
|
|
|
+ } else {
|
|
|
this.$alert(`导入成功`, '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
// cancelButtonText: '取消',
|
|
@@ -514,31 +524,68 @@ export default {
|
|
|
// confirmButtonClass: 'sure',
|
|
|
// customClass: 'exportConfirm',
|
|
|
type: 'success'
|
|
|
- })
|
|
|
- .then(() => {})
|
|
|
- .catch(() => {});
|
|
|
- this.getDataList(); // 重新获取列表
|
|
|
- setTimeout(() => {
|
|
|
- this.uploadInfo = '导入';
|
|
|
- }, 300);
|
|
|
- } else {
|
|
|
- this.$alert(`${res.data.msg}`, '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- // cancelButtonText: '取消',
|
|
|
- // cancelButtonClass: 'cancelSure',
|
|
|
- // confirmButtonClass: 'sure',
|
|
|
- // customClass: 'exportConfirm',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- .then(() => {})
|
|
|
- .catch(() => {});
|
|
|
-
|
|
|
- setTimeout(() => {
|
|
|
- this.uploadInfo = '导入';
|
|
|
- }, 300);
|
|
|
+ });
|
|
|
}
|
|
|
+ // if (res.data.code === '00020007') {
|
|
|
+ // this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
|
|
|
+ // confirmButtonText: '确定',
|
|
|
+ // // cancelButtonText: '取消',
|
|
|
+ // // cancelButtonClass: 'cancelSure',
|
|
|
+ // // confirmButtonClass: 'sure',
|
|
|
+ // // customClass: 'exportConfirm',
|
|
|
+ // type: 'warning'
|
|
|
+ // })
|
|
|
+ // .then(() => {})
|
|
|
+ // .catch(() => {});
|
|
|
+ // this.getDataList(); // 重新获取列表
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.uploadInfo = '导入';
|
|
|
+ // }, 300);
|
|
|
+ // } else if (res.data.data === true && res.status === 200) {
|
|
|
+ // this.$alert(`导入成功`, '提示', {
|
|
|
+ // confirmButtonText: '确定',
|
|
|
+ // // cancelButtonText: '取消',
|
|
|
+ // // cancelButtonClass: 'cancelSure',
|
|
|
+ // // confirmButtonClass: 'sure',
|
|
|
+ // // customClass: 'exportConfirm',
|
|
|
+ // type: 'success'
|
|
|
+ // })
|
|
|
+ // .then(() => {})
|
|
|
+ // .catch(() => {});
|
|
|
+ // this.getDataList(); // 重新获取列表
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.uploadInfo = '导入';
|
|
|
+ // }, 300);
|
|
|
+ // } else {
|
|
|
+ // this.$alert(`${res.data.msg}`, '提示', {
|
|
|
+ // confirmButtonText: '确定',
|
|
|
+ // // cancelButtonText: '取消',
|
|
|
+ // // cancelButtonClass: 'cancelSure',
|
|
|
+ // // confirmButtonClass: 'sure',
|
|
|
+ // // customClass: 'exportConfirm',
|
|
|
+ // type: 'warning'
|
|
|
+ // })
|
|
|
+ // .then(() => {})
|
|
|
+ // .catch(() => {});
|
|
|
+
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.uploadInfo = '导入';
|
|
|
+ // }, 300);
|
|
|
+ // }
|
|
|
});
|
|
|
},
|
|
|
+ downloadUrl(res) {
|
|
|
+ var disposition = res.headers['content-disposition'];
|
|
|
+ var fileName = decodeURI(
|
|
|
+ disposition.split('filename=')[1].split(';filename*=')[0]
|
|
|
+ );
|
|
|
+ let blob = new Blob([res.data], { type: 'application/.xls' }); //.xls是我和后台约定好的文件格式
|
|
|
+ let link = document.createElement('a');
|
|
|
+ link.href = window.URL.createObjectURL(blob);
|
|
|
+ link.download = fileName;
|
|
|
+ link.click();
|
|
|
+ link.remove();
|
|
|
+ },
|
|
|
/********新增编辑弹窗**********/
|
|
|
showModal() {
|
|
|
this.modalVisiable = true;
|