|
@@ -105,11 +105,13 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
+ <el-upload :limit="1" v-model:file-list="fileList" :auto-upload="false" :on-change="inportexcel3">
|
|
|
<el-button
|
|
|
type="success"
|
|
|
- @click.stop="inportexcel3()"
|
|
|
+
|
|
|
>导入
|
|
|
</el-button>
|
|
|
+ </el-upload>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="1.5">
|
|
@@ -449,6 +451,7 @@ import {
|
|
|
delFacilities,
|
|
|
addFacilities,
|
|
|
updateFacilities,
|
|
|
+ uploadFacilities
|
|
|
} from "@/api/system/facilities";
|
|
|
import ImageUpload from "@/components/ImageUpload";
|
|
|
import { useDict } from "@/utils/dict";
|
|
@@ -550,6 +553,9 @@ const facilities_obj = ref({
|
|
|
|
|
|
const alldept = ref([]);
|
|
|
|
|
|
+const fileList = ref([])
|
|
|
+
|
|
|
+
|
|
|
listDept().then((response) => {
|
|
|
alldept.value = cloneDeep(response.data);
|
|
|
});
|
|
@@ -663,7 +669,13 @@ const exportexcel3 = () => {
|
|
|
|
|
|
}
|
|
|
|
|
|
-const inportexcel3 = () => {
|
|
|
+const inportexcel3 = (files, uploadFiles) => {
|
|
|
+ // console.log(files)
|
|
|
+ // console.log(uploadFiles)
|
|
|
+ uploadFacilities(files.raw).then(() => {
|
|
|
+ proxy.$modal.msgSuccess("上传成功");
|
|
|
+ getList();
|
|
|
+ })
|
|
|
|
|
|
}
|
|
|
|