|
@@ -4,22 +4,10 @@
|
|
<el-form :inline="true" class="demo-form-inline">
|
|
<el-form :inline="true" class="demo-form-inline">
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
|
|
<el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
|
|
- <input
|
|
|
|
- type="file"
|
|
|
|
- name="uploadfile "
|
|
|
|
- id="upFile"
|
|
|
|
- @change="uploadFile($event)"
|
|
|
|
-
|
|
|
|
- />
|
|
|
|
|
|
+ <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
|
|
<el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
|
|
<el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
|
|
- <input
|
|
|
|
- type="file"
|
|
|
|
- name="uploadfile "
|
|
|
|
- id="upFileMatch"
|
|
|
|
- @change="uploadFileMatch($event)"
|
|
|
|
-
|
|
|
|
- />
|
|
|
|
- <el-button size="mini" @click="handleMatchData">预匹配</el-button>
|
|
|
|
|
|
+ <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
|
|
|
|
+ <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
|
|
<el-button size="mini" @click="exportData">导出</el-button>
|
|
<el-button size="mini" @click="exportData">导出</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="医院科室名称:">
|
|
<el-form-item label="医院科室名称:">
|
|
@@ -146,7 +134,15 @@ export default {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
api.precDeptDataMatch(formData, header).then(res => {
|
|
api.precDeptDataMatch(formData, header).then(res => {
|
|
- if (res.status === 200) {
|
|
|
|
|
|
+ console.log(res, 'res');
|
|
|
|
+ if (res.data.code === '00020007') {
|
|
|
|
+ this.$alert(`${res.msg}`, '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ })
|
|
|
|
+ .then(() => {})
|
|
|
|
+ .catch(() => {});
|
|
|
|
+ } else if (res.status === 200) {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
utils.downloadExportedData(res.data, '科室关联数据(预匹配).xls');
|
|
utils.downloadExportedData(res.data, '科室关联数据(预匹配).xls');
|
|
}, 1500);
|
|
}, 1500);
|
|
@@ -390,14 +386,9 @@ export default {
|
|
};
|
|
};
|
|
this.uploadInfo = '导入中...';
|
|
this.uploadInfo = '导入中...';
|
|
api.importDeptRecord(formData, header).then(res => {
|
|
api.importDeptRecord(formData, header).then(res => {
|
|
- // console.log('导入文件结果', '===================', res);
|
|
|
|
if (res.data.code === '00000001') {
|
|
if (res.data.code === '00000001') {
|
|
this.$alert(`数据存在异常,导入失败,请修改后再试`, '提示', {
|
|
this.$alert(`数据存在异常,导入失败,请修改后再试`, '提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
- // cancelButtonText: '取消',
|
|
|
|
- // cancelButtonClass: 'cancelSure',
|
|
|
|
- // confirmButtonClass: 'sure',
|
|
|
|
- // customClass: 'exportConfirm',
|
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
})
|
|
})
|
|
.then(() => {})
|
|
.then(() => {})
|
|
@@ -409,11 +400,7 @@ export default {
|
|
} else if (res.data === '' && res.status === 200) {
|
|
} else if (res.data === '' && res.status === 200) {
|
|
this.$alert(`导入成功`, '提示', {
|
|
this.$alert(`导入成功`, '提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
- // cancelButtonText: '取消',
|
|
|
|
- // cancelButtonClass: 'cancelSure',
|
|
|
|
- // confirmButtonClass: 'sure',
|
|
|
|
- // customClass: 'exportConfirm',
|
|
|
|
- type: 'warning'
|
|
|
|
|
|
+ type: 'success'
|
|
})
|
|
})
|
|
.then(() => {})
|
|
.then(() => {})
|
|
.catch(() => {});
|
|
.catch(() => {});
|
|
@@ -424,10 +411,6 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.$alert(`${res.data.msg}`, '提示', {
|
|
this.$alert(`${res.data.msg}`, '提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
- // cancelButtonText: '取消',
|
|
|
|
- // cancelButtonClass: 'cancelSure',
|
|
|
|
- // confirmButtonClass: 'sure',
|
|
|
|
- // customClass: 'exportConfirm',
|
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
})
|
|
})
|
|
.then(() => {})
|
|
.then(() => {})
|