提交
This commit is contained in:
@ -19,6 +19,13 @@
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="toggleExpandAll(false)">一键收起</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-upload ref="uploadRef" class="upload-demo" :http-request="importExcel" :show-file-list="false">
|
||||
<template #trigger>
|
||||
<el-button type="primary">导入excel</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</transition>
|
||||
@ -210,7 +217,34 @@ const toggleExpandAll = (isExpand: boolean) => {
|
||||
});
|
||||
isExpandAll.value = isExpand;
|
||||
};
|
||||
|
||||
//导入
|
||||
const importExcel = (options: any): any => {
|
||||
console.log(options);
|
||||
// let formData = new FormData();
|
||||
// formData.append('file', options.file);
|
||||
// state.loading.list = true;
|
||||
// importExcelFile({ workOrderType: state.work_order_type, projectId: currentProject.value?.id }, formData)
|
||||
// .then((res) => {
|
||||
// const { code } = res;
|
||||
// if (code == 200) {
|
||||
// proxy.$modal.msgSuccess(res.msg || '导入成功');
|
||||
// // 更新列表
|
||||
// if (state.work_order_type == 3) {
|
||||
// getVersionNums(false);
|
||||
// } else {
|
||||
// getVersionNums();
|
||||
// }
|
||||
// } else {
|
||||
// proxy.$modal.msgError(res.msg || '导入失败');
|
||||
// }
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// proxy.$modal.msgError(err.msg || '导入失败');
|
||||
// })
|
||||
// .finally(() => {
|
||||
// state.loading.list = false;
|
||||
// });
|
||||
};
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value?.id,
|
||||
|
Reference in New Issue
Block a user