|
@@ -4,13 +4,8 @@
|
|
|
<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)"
|
|
|
- />
|
|
|
- <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
|
|
|
+ <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
|
|
|
+ <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
|
|
|
<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)" />
|
|
@@ -41,7 +36,12 @@
|
|
|
<el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
|
|
|
<el-table-column :resizable="false" prop="hisName" label="医院中医疾病名称" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column :resizable="false" prop="code" label="中医疾病代码" 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="uniqueName"
|
|
|
+ label="标准中医疾病名称"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
<el-table-column :resizable="false" prop="operate" label="状态">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
|
|
@@ -101,7 +101,7 @@ export default {
|
|
|
filter: {
|
|
|
hisName: '', // 医院诊断名称
|
|
|
uniqueName: '', //标准诊断名称
|
|
|
- match:''
|
|
|
+ match: ''
|
|
|
},
|
|
|
matchList: [
|
|
|
{ id: '', name: '全部' },
|
|
@@ -127,14 +127,14 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
const param = this.$route.params;
|
|
|
- if(param.currentPage){
|
|
|
- this.inCurrentPage = param.currentPage
|
|
|
+ if (param.currentPage) {
|
|
|
+ this.inCurrentPage = param.currentPage;
|
|
|
}
|
|
|
- if(param.filter){
|
|
|
- this.filter = param.filter
|
|
|
+ if (param.filter) {
|
|
|
+ this.filter = param.filter;
|
|
|
}
|
|
|
//返回时避免参数未赋值就获取列表
|
|
|
- setTimeout(()=> {
|
|
|
+ setTimeout(() => {
|
|
|
this.getDataList();
|
|
|
});
|
|
|
// 非首页 编辑页返回 设置 this.currentPage
|
|
@@ -265,8 +265,8 @@ export default {
|
|
|
}
|
|
|
: { currentPage: this.currentPage, pageSize: this.pageSize };
|
|
|
// this.$router.push({ name: 'AddTcmdisease', params: pam });
|
|
|
- this.data = {}
|
|
|
- this.showModal()
|
|
|
+ this.data = {};
|
|
|
+ this.showModal();
|
|
|
},
|
|
|
// 修改诊断关联-跳转至编辑页面
|
|
|
modifyRelation(row) {
|
|
@@ -282,8 +282,8 @@ export default {
|
|
|
// name: 'AddTcmdisease',
|
|
|
// params: Object.assign(pam, { isEdit: true, data: item })
|
|
|
// });
|
|
|
- this.data = item
|
|
|
- this.showModal()
|
|
|
+ this.data = item;
|
|
|
+ this.showModal();
|
|
|
},
|
|
|
currentChange(next) {
|
|
|
this.currentPage = next;
|
|
@@ -387,19 +387,21 @@ export default {
|
|
|
// }
|
|
|
})
|
|
|
.then(() => {
|
|
|
- api.exportTcmRecord({type:12,isMatch:this.filter.match}).then(res => {
|
|
|
- if (res.status === 200) {
|
|
|
- this.$message({ message: '导出成功', type: 'success' });
|
|
|
- utils.downloadExportedData(res.data, '中医疾病关联数据.xls');
|
|
|
- }
|
|
|
- });
|
|
|
+ api
|
|
|
+ .exportTcmRecord({ type: 12, isMatch: this.filter.match })
|
|
|
+ .then(res => {
|
|
|
+ if (res.status === 200) {
|
|
|
+ this.$message({ message: '导出成功', type: 'success' });
|
|
|
+ utils.downloadExportedData(res.data, '中医疾病关联数据.xls');
|
|
|
+ }
|
|
|
+ });
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
},
|
|
|
|
|
|
// 导入模板
|
|
|
exportModule() {
|
|
|
- api.exportTcmModule({type:12}).then(res => {
|
|
|
+ api.exportTcmModule({ type: 12 }).then(res => {
|
|
|
if (res.status === 200) {
|
|
|
setTimeout(() => {
|
|
|
utils.downloadExportedData(res.data, '中医疾病导入模板.xls');
|
|
@@ -432,6 +434,31 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
this.uploadInfo = '导入中...';
|
|
|
+ api.importExcelDataVerify(formData, header).then(res => {
|
|
|
+ if (res.data.code === '00020001') {
|
|
|
+ this.$confirm(`${res.data.msg}`, '提示1', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.importTcmRecord(formData, header);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.uploadInfo = '导入';
|
|
|
+ }, 300);
|
|
|
+ });
|
|
|
+ } else if (res.data.data === true) {
|
|
|
+ this.importTcmRecord(formData, header);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ //解决上传相同文件不触发change
|
|
|
+ let inp = document.getElementById('upFile');
|
|
|
+ inp.value = '';
|
|
|
+ },
|
|
|
+ importTcmRecord(formData, header) {
|
|
|
api.importTcmRecord(formData, header).then(res => {
|
|
|
// console.log('导入文件结果', '===================', res);
|
|
|
if (res.data.code === '00000001') {
|
|
@@ -481,9 +508,6 @@ export default {
|
|
|
}, 300);
|
|
|
}
|
|
|
});
|
|
|
- //解决上传相同文件不触发change
|
|
|
- let inp = document.getElementById('upFile');
|
|
|
- inp.value = '';
|
|
|
},
|
|
|
/********新增编辑弹窗**********/
|
|
|
showModal() {
|
|
@@ -567,7 +591,7 @@ export default {
|
|
|
display: none;
|
|
|
}
|
|
|
}
|
|
|
-#upFileMatch{
|
|
|
+#upFileMatch {
|
|
|
display: none;
|
|
|
}
|
|
|
</style>
|