|
@@ -62,7 +62,9 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column :resizable="false" prop="operate" label="标准术语状态">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.uniqueName && scope.row.uniqueName!=''">{{scope.row.status == 0?'禁用':'启用'}}</span>
|
|
|
+ <span
|
|
|
+ v-if="scope.row.uniqueName && scope.row.uniqueName!=''"
|
|
|
+ >{{scope.row.status == 0?'禁用':'启用'}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column :resizable="false" prop="operate" label="操作">
|
|
@@ -122,7 +124,7 @@ export default {
|
|
|
statusList: [
|
|
|
{ id: '', name: '全部' },
|
|
|
{ id: 1, name: '启用' },
|
|
|
- { id: 0, name: '禁用' },
|
|
|
+ { id: 0, name: '禁用' }
|
|
|
],
|
|
|
list: [],
|
|
|
searched: false,
|
|
@@ -285,7 +287,7 @@ export default {
|
|
|
(data && data.hospitalId) || localStorage.getItem('hospitalId'),
|
|
|
type: 4,
|
|
|
isMatch: this.filter.match,
|
|
|
- status: this.filter.status,
|
|
|
+ status: this.filter.status
|
|
|
};
|
|
|
return param;
|
|
|
},
|
|
@@ -450,7 +452,6 @@ export default {
|
|
|
// 点击导入
|
|
|
importPage(e) {
|
|
|
let inp = document.getElementById('upFile');
|
|
|
-
|
|
|
inp.click();
|
|
|
},
|
|
|
// 导入数据
|
|
@@ -508,24 +509,57 @@ export default {
|
|
|
// }
|
|
|
// });
|
|
|
this.importDiseaseRecord(formData, header);
|
|
|
+ this.getDataList();
|
|
|
//解决上传相同文件不触发change
|
|
|
let inp = document.getElementById('upFile');
|
|
|
inp.value = '';
|
|
|
},
|
|
|
importDiseaseRecord(formData, header) {
|
|
|
+ let that = this
|
|
|
api.importDiseaseRecord(formData, header).then(res => {
|
|
|
if (res.headers['content-disposition']) {
|
|
|
this.downloadUrl(res);
|
|
|
} else {
|
|
|
- this.$alert(`导入成功`, '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- // cancelButtonText: '取消',
|
|
|
- // cancelButtonClass: 'cancelSure',
|
|
|
- // confirmButtonClass: 'sure',
|
|
|
- // customClass: 'exportConfirm',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
+ let r = new FileReader();
|
|
|
+ r.onload = function() {
|
|
|
+ const code = JSON.parse(this.result);
|
|
|
+ if (code.code === '00020007') {
|
|
|
+ that
|
|
|
+ .$alert(`${code.msg}`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ // cancelButtonText: '取消',
|
|
|
+ // cancelButtonClass: 'cancelSure',
|
|
|
+ // confirmButtonClass: 'sure',
|
|
|
+ // customClass: 'exportConfirm',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {})
|
|
|
+ .catch(() => {});
|
|
|
+ } else {
|
|
|
+ that.$alert(`导入成功`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ // cancelButtonText: '取消',
|
|
|
+ // cancelButtonClass: 'cancelSure',
|
|
|
+ // confirmButtonClass: 'sure',
|
|
|
+ // customClass: 'exportConfirm',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ };
|
|
|
+ r.readAsText(res.data);
|
|
|
}
|
|
|
+ // if (res.headers['content-disposition']) {
|
|
|
+ // this.downloadUrl(res);
|
|
|
+ // } else {
|
|
|
+ // this.$alert(`导入成功`, '提示', {
|
|
|
+ // confirmButtonText: '确定',
|
|
|
+ // // cancelButtonText: '取消',
|
|
|
+ // // cancelButtonClass: 'cancelSure',
|
|
|
+ // // confirmButtonClass: 'sure',
|
|
|
+ // // customClass: 'exportConfirm',
|
|
|
+ // type: 'success'
|
|
|
+ // });
|
|
|
+ // }
|
|
|
// if (res.data.code === '00020007') {
|
|
|
// this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
|
|
|
// confirmButtonText: '确定',
|