|
@@ -2,15 +2,17 @@
|
|
|
<div>
|
|
|
<crumbs title="诊断关联维护" style="min-width: 980px" class="knowledgeTitle">
|
|
|
<el-form :inline="true" class="demo-form-inline">
|
|
|
- <el-form-item>
|
|
|
- <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
|
|
|
- <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
|
|
|
- <el-button size="mini" @click="handleMatchData">预匹配</el-button>
|
|
|
- <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
|
|
|
- <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
|
|
|
- <el-button size="mini" @click="exportData">导出</el-button>
|
|
|
+ <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-form-item label="匹配状态:" class="selectMedicine">
|
|
|
<el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
|
|
|
<el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
|
|
|
</el-select>
|
|
@@ -21,10 +23,20 @@
|
|
|
<el-form-item label="标准诊断名称:">
|
|
|
<el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
- </el-form>
|
|
|
- <el-form class="secLine">
|
|
|
<el-form-item>
|
|
|
<el-button size="mini" @click="filterDatas">检索</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-form class="secLine" :inline="true">
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
|
|
|
+ <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
|
|
|
+ <el-button size="mini" @click="handleMatchData">预匹配</el-button>
|
|
|
+ <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
|
|
|
+ <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
|
|
|
+ <el-button size="mini" @click="exportData">导出</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
<el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -36,11 +48,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>
|
|
@@ -96,11 +113,17 @@ export default {
|
|
|
{ id: 0, name: '未匹配' },
|
|
|
{ id: 2, name: '多项匹配' }
|
|
|
],
|
|
|
+ statusList: [
|
|
|
+ { id: '', name: '全部' },
|
|
|
+ { id: 1, name: '启用' },
|
|
|
+ { id: 0, name: '禁用' },
|
|
|
+ ],
|
|
|
searched: false,
|
|
|
filter: {
|
|
|
hisName: '', // 医院诊断名称
|
|
|
uniqueName: '', //标准诊断名称
|
|
|
- match: ''
|
|
|
+ match: '',
|
|
|
+ status:''
|
|
|
},
|
|
|
currentPage: 1,
|
|
|
pageSize: config.pageSize,
|
|
@@ -246,7 +269,8 @@ export default {
|
|
|
uniqueName: this.filter.uniqueName.trim(),
|
|
|
icdCode: '',
|
|
|
type: 4,
|
|
|
- isMatch: this.filter.match
|
|
|
+ isMatch: this.filter.match,
|
|
|
+ status:this.filter.status
|
|
|
};
|
|
|
return param;
|
|
|
},
|
|
@@ -385,12 +409,14 @@ export default {
|
|
|
// }
|
|
|
})
|
|
|
.then(() => {
|
|
|
- api.exportDiseaseRecord({type:4,isMatch:this.filter.match}).then(res => {
|
|
|
- if (res.status === 200) {
|
|
|
- this.$message({ message: '导出成功', type: 'success' });
|
|
|
- utils.downloadExportedData(res.data, '诊断关联数据.xls');
|
|
|
- }
|
|
|
- });
|
|
|
+ api
|
|
|
+ .exportDiseaseRecord({ type: 4, isMatch: this.filter.match })
|
|
|
+ .then(res => {
|
|
|
+ if (res.status === 200) {
|
|
|
+ this.$message({ message: '导出成功', type: 'success' });
|
|
|
+ utils.downloadExportedData(res.data, '诊断关联数据.xls');
|
|
|
+ }
|
|
|
+ });
|
|
|
})
|
|
|
.catch(() => {
|
|
|
// this.$message({ message: '导出失败', type: 'waring' });
|
|
@@ -399,7 +425,7 @@ export default {
|
|
|
|
|
|
// 导入模板
|
|
|
exportModule() {
|
|
|
- api.exportDiseaseModule({type:4}).then(res => {
|
|
|
+ api.exportDiseaseModule({ type: 4 }).then(res => {
|
|
|
if (res.status === 200) {
|
|
|
setTimeout(() => {
|
|
|
utils.downloadExportedData(res.data, '诊断导入模板.xls');
|
|
@@ -435,63 +461,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(() => {});
|
|
|
+ this.importDiseaseRecord(formData, header);
|
|
|
+ // 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);
|
|
|
- }
|
|
|
- });
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.uploadInfo = '导入';
|
|
|
+ // }, 300);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
//解决上传相同文件不触发change
|
|
|
let inp = document.getElementById('upFile');
|
|
|
inp.value = '';
|
|
|
},
|
|
|
importDiseaseRecord(formData, header) {
|
|
|
api.importDiseaseRecord(formData, header).then(res => {
|
|
|
- if (res.data.code === '00000001') {
|
|
|
- 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: '取消',
|
|
@@ -499,31 +513,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 === '00000001') {
|
|
|
+ // 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;
|