|
@@ -59,7 +59,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="操作">
|
|
@@ -121,7 +123,7 @@ export default {
|
|
|
statusList: [
|
|
|
{ id: '', name: '全部' },
|
|
|
{ id: 1, name: '启用' },
|
|
|
- { id: 0, name: '禁用' },
|
|
|
+ { id: 0, name: '禁用' }
|
|
|
],
|
|
|
searched: false,
|
|
|
filter: {
|
|
@@ -129,7 +131,7 @@ export default {
|
|
|
hisDetailName: '', //检验细项
|
|
|
uniqueName: '', //标准检验项
|
|
|
match: '',
|
|
|
- status:''
|
|
|
+ status: ''
|
|
|
},
|
|
|
currentPage: 1,
|
|
|
pageSize: config.pageSize,
|
|
@@ -270,7 +272,7 @@ export default {
|
|
|
hisDetailName: this.filter.hisDetailName.trim(),
|
|
|
type: 1,
|
|
|
isMatch: this.filter.match,
|
|
|
- status:this.filter.status
|
|
|
+ status: this.filter.status
|
|
|
};
|
|
|
return param;
|
|
|
},
|
|
@@ -412,7 +414,8 @@ export default {
|
|
|
.then(() => {
|
|
|
api
|
|
|
.exportLisRecord({
|
|
|
- type: 1,isMatch:this.filter.match
|
|
|
+ type: 1,
|
|
|
+ isMatch: this.filter.match
|
|
|
})
|
|
|
.then(res => {
|
|
|
if (res.status === 200) {
|
|
@@ -427,7 +430,7 @@ export default {
|
|
|
},
|
|
|
// 导入模板
|
|
|
exportModule() {
|
|
|
- api.exportLisModule({type:1}).then(res => {
|
|
|
+ api.exportLisModule({ type: 1 }).then(res => {
|
|
|
if (res.status === 200) {
|
|
|
setTimeout(() => {
|
|
|
utils.downloadExportedData(res.data, '检验导入模板.xls');
|
|
@@ -463,7 +466,7 @@ export default {
|
|
|
'Content-Type': 'multipart/form-data'
|
|
|
}
|
|
|
};
|
|
|
- this.importLisRecord(formData, header)
|
|
|
+ this.importLisRecord(formData, header);
|
|
|
// this.uploadInfo = '导入中...';
|
|
|
// api.importExcelDataVerify(formData, header).then(res => {
|
|
|
// if (res.data.code === '00020001') {
|
|
@@ -504,66 +507,96 @@ export default {
|
|
|
inp.value = '';
|
|
|
},
|
|
|
importLisRecord(formData, header) {
|
|
|
- api.importLisRecord(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'
|
|
|
- });
|
|
|
- }
|
|
|
- // 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(() => {});
|
|
|
+ let that = this;
|
|
|
+ api
|
|
|
+ .importLisRecord(formData, header)
|
|
|
+ .then(res => {
|
|
|
+ if (res.headers['content-disposition']) {
|
|
|
+ this.downloadUrl(res);
|
|
|
+ this.getDataList();
|
|
|
+ } else {
|
|
|
+ let r = new FileReader();
|
|
|
+ r.onload = function() {
|
|
|
+ const code = JSON.parse(this.result);
|
|
|
+ if (code.code === '00020004') {
|
|
|
+ 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'
|
|
|
+ });
|
|
|
+ that.getDataList();
|
|
|
+ }
|
|
|
+ };
|
|
|
+ r.readAsText(res.data);
|
|
|
+ }
|
|
|
|
|
|
- // 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);
|
|
|
+ // }
|
|
|
+ })
|
|
|
+ .catch(error => {
|
|
|
+ console.log(error);
|
|
|
+
|
|
|
+ // this.$message({ message: '导出失败', type: 'waring' });
|
|
|
+ });
|
|
|
},
|
|
|
downloadUrl(res) {
|
|
|
var disposition = res.headers['content-disposition'];
|