From aa4006cbf586ea68762bb427d19bb488b4148981 Mon Sep 17 00:00:00 2001
From: xy <271556543@qq.com>
Date: Fri, 21 Mar 2025 13:16:58 +0800
Subject: [PATCH] init
---
src/api/aspiration/aspiration.js | 9 +++++
src/views/Aspiration/Aspiration.vue | 25 +++++++++++-
.../MiddleSchoolIndicator.vue | 39 +++++++++++++++++++
src/views/School/School.vue | 39 +++++++++++++++++++
src/views/Specialty/Specialty.vue | 39 +++++++++++++++++++
5 files changed, 150 insertions(+), 1 deletion(-)
diff --git a/src/api/aspiration/aspiration.js b/src/api/aspiration/aspiration.js
index 5a11b03..9c52dbf 100644
--- a/src/api/aspiration/aspiration.js
+++ b/src/api/aspiration/aspiration.js
@@ -35,3 +35,12 @@ export function destroy(params, isLoading = true) {
isLoading
})
}
+
+export function clone(params, isLoading=true) {
+ return request({
+ method: 'get',
+ url: '/api/admin/aspiration/clone',
+ params,
+ isLoading
+ })
+}
diff --git a/src/views/Aspiration/Aspiration.vue b/src/views/Aspiration/Aspiration.vue
index 5d7fdc5..d12f685 100644
--- a/src/views/Aspiration/Aspiration.vue
+++ b/src/views/Aspiration/Aspiration.vue
@@ -235,6 +235,14 @@
>
+ 克隆
搜索
+
+
+ 导入
+
+
+
+ 选取文件
+ 上传到服务器
+ 只能上传xls/xlsx文件
+
+
+
@@ -312,6 +337,7 @@ export default {
},
data() {
return {
+ action: `${process.env.VUE_APP_BASE_API}/api/admin/middle-school-indicator/import`,
uploadSize,
examineKey: 0,
isShowAdd: false,
@@ -367,6 +393,19 @@ export default {
this.calcTableHeight();
},
methods: {
+ getToken,
+ uploadData() {
+ this.$refs.upload.submit();
+ },
+ uploadSuccess(response) {
+ console.log(response)
+ if (response.hasOwnProperty('errcode')) {
+ this.$message.error(response.errmsg)
+ } else {
+ this.$message.success(`已导入${response.total}条`)
+ this.getList(true)
+ }
+ },
exportMethod() {
this.$confirm("请选择导出方式", "提示", {
confirmButtonText: "全量导出",
diff --git a/src/views/School/School.vue b/src/views/School/School.vue
index 585fe79..f41da94 100644
--- a/src/views/School/School.vue
+++ b/src/views/School/School.vue
@@ -36,6 +36,31 @@
>搜索
+
+
+ 导入
+
+
+
+ 选取文件
+ 上传到服务器
+ 只能上传xls/xlsx文件
+
+
+
@@ -375,6 +400,7 @@ export default {
},
data() {
return {
+ action: `${process.env.VUE_APP_BASE_API}/api/admin/school/import`,
uploadSize,
examineKey: 0,
isShowAdd: false,
@@ -463,6 +489,19 @@ export default {
this.calcTableHeight();
},
methods: {
+ getToken,
+ uploadData() {
+ this.$refs.upload.submit();
+ },
+ uploadSuccess(response) {
+ console.log(response)
+ if (response.hasOwnProperty('errcode')) {
+ this.$message.error(response.errmsg)
+ } else {
+ this.$message.success(`已导入${response.total}条`)
+ this.getList(true)
+ }
+ },
exportMethod() {
this.$confirm("请选择导出方式", "提示", {
confirmButtonText: "全量导出",
diff --git a/src/views/Specialty/Specialty.vue b/src/views/Specialty/Specialty.vue
index 899b5c6..62ebb50 100644
--- a/src/views/Specialty/Specialty.vue
+++ b/src/views/Specialty/Specialty.vue
@@ -31,6 +31,31 @@
@click="getList(true)"
>搜索
+
+
+ 导入
+
+
+
+ 选取文件
+ 上传到服务器
+ 只能上传xls/xlsx文件
+
+
+
@@ -231,6 +256,7 @@ export default {
},
data() {
return {
+ action: `${process.env.VUE_APP_BASE_API}/api/admin/specialty/import`,
uploadSize,
examineKey: 0,
isShowAdd: false,
@@ -287,6 +313,19 @@ export default {
this.calcTableHeight();
},
methods: {
+ getToken,
+ uploadData() {
+ this.$refs.upload.submit();
+ },
+ uploadSuccess(response) {
+ console.log(response)
+ if (response.hasOwnProperty('errcode')) {
+ this.$message.error(response.errmsg)
+ } else {
+ this.$message.success(`已导入${response.total}条`)
+ this.getList(true)
+ }
+ },
exportMethod() {
this.$confirm("请选择导出方式", "提示", {
confirmButtonText: "全量导出",