diff --git a/src/api/batch-data/batch-data.js b/src/api/batch-data/batch-data.js new file mode 100644 index 0000000..26a47c7 --- /dev/null +++ b/src/api/batch-data/batch-data.js @@ -0,0 +1,37 @@ +import request from '@/utils/request' + +export function index(params,isLoading = true) { + return request({ + method: 'get', + url: '/api/admin/batch-data/index', + params, +isLoading + }) +} + +export function show(params,isLoading = true) { + return request({ + method: 'get', + url: '/api/admin/batch-data/show', + params, + isLoading + }) +} + +export function save(data, isLoading = true) { + return request({ + method: 'post', + url: '/api/admin/batch-data/save', + data, + isLoading + }) +} + +export function destroy(params, isLoading = true) { + return request({ + method: 'get', + url: '/api/admin/batch-data/destroy', + params, + isLoading + }) +} diff --git a/src/views/Area/Area.vue b/src/views/Area/Area.vue index 8c26e33..7ab6830 100644 --- a/src/views/Area/Area.vue +++ b/src/views/Area/Area.vue @@ -28,7 +28,7 @@ type="primary" plain size="small" - @click="getList" + @click="getList(true)" >搜索 @@ -361,7 +361,10 @@ export default { } }, - async getList() { + async getList(isRefresh) { + if(isRefresh) { + this.select.page = 1 + } this.loading = true; try { const res = await index(this.select, false); diff --git a/src/views/Aspiration/Aspiration.vue b/src/views/Aspiration/Aspiration.vue index 0dbdc1d..5d7fdc5 100644 --- a/src/views/Aspiration/Aspiration.vue +++ b/src/views/Aspiration/Aspiration.vue @@ -28,7 +28,7 @@ type="primary" plain size="small" - @click="getList" + @click="getList(true)" >搜索 @@ -165,6 +165,39 @@ :edit-render="{ name: 'input', attrs: { type: 'text' } }" /> + + + + + - + + + 点击上传 +
+ 文件不超过{{ formatFileSize(uploadSize) }} +
+
+
+ + { if (valid) { this.loading = true; diff --git a/src/views/Aspiration/components/ShowAspiration.vue b/src/views/Aspiration/components/ShowAspiration.vue index c7ab176..c9657e6 100644 --- a/src/views/Aspiration/components/ShowAspiration.vue +++ b/src/views/Aspiration/components/ShowAspiration.vue @@ -44,6 +44,14 @@
+ + + + + {{ [ @@ -97,6 +105,8 @@ export default { tip: "", + image_id: [], + need_sign: "", }, }; diff --git a/src/views/Banners/Banners.vue b/src/views/Banners/Banners.vue index 48d454e..a881756 100644 --- a/src/views/Banners/Banners.vue +++ b/src/views/Banners/Banners.vue @@ -28,7 +28,7 @@ type="primary" plain size="small" - @click="getList" + @click="getList(true)" >搜索 @@ -450,7 +450,10 @@ export default { } }, - async getList() { + async getList(isRefresh) { + if(isRefresh) { + this.select.page = 1 + } this.loading = true; try { const res = await index(this.select, false); diff --git a/src/views/Batch/Batch.vue b/src/views/Batch/Batch.vue index b1344b0..f8c2c0c 100644 --- a/src/views/Batch/Batch.vue +++ b/src/views/Batch/Batch.vue @@ -28,7 +28,7 @@ type="primary" plain size="small" - @click="getList" + @click="getList(true)" >搜索 @@ -414,7 +414,10 @@ export default { } }, - async getList() { + async getList(isRefresh=true) { + if(isRefresh) { + this.select.page = 1 + } this.loading = true; try { const res = await index(this.select, false); diff --git a/src/views/BatchData/BatchData.vue b/src/views/BatchData/BatchData.vue new file mode 100644 index 0000000..aa69682 --- /dev/null +++ b/src/views/BatchData/BatchData.vue @@ -0,0 +1,415 @@ + + + + + diff --git a/src/views/BatchData/components/AddBatchData.vue b/src/views/BatchData/components/AddBatchData.vue new file mode 100644 index 0000000..effec9a --- /dev/null +++ b/src/views/BatchData/components/AddBatchData.vue @@ -0,0 +1,168 @@ + + + + + diff --git a/src/views/BatchData/components/ShowBatchData.vue b/src/views/BatchData/components/ShowBatchData.vue new file mode 100644 index 0000000..b603805 --- /dev/null +++ b/src/views/BatchData/components/ShowBatchData.vue @@ -0,0 +1,179 @@ + + + + + diff --git a/src/views/BatchSub/BatchSub.vue b/src/views/BatchSub/BatchSub.vue index 51fed46..6f61c86 100644 --- a/src/views/BatchSub/BatchSub.vue +++ b/src/views/BatchSub/BatchSub.vue @@ -28,7 +28,7 @@ type="primary" plain size="small" - @click="getList" + @click="getList(true)" >搜索 @@ -106,6 +106,23 @@ }" /> + + + + + @@ -246,6 +264,7 @@ import axios from "axios"; import { getToken } from "@/utils/auth"; import { index as batchIndex } from "@/api/batch/batch"; +import { index as schoolIndex } from "@/api/school/school"; export default { name: "BatchSub", @@ -267,23 +286,19 @@ export default { page: 1, page_size: 20, keyword: "", - show_relation: [], + show_relation: ["aspiration.batchs"], }, total: 0, allAlign: null, tableData: [], form: { id: "", - name: "", - batch_id: "", - sort: "", - show_school_obey: "", - show_specialty_obey: "", + school: [] }, validRules: { name: [ @@ -302,6 +317,7 @@ export default { }, batch: [], + school: [], }; }, computed: { @@ -320,6 +336,7 @@ export default { }, created() { this.getBatch(); + this.getSchool(); this.getList(); }, @@ -394,6 +411,21 @@ export default { this.isShowDetail = true; }, + async getSchool() { + try { + const res = await schoolIndex( + { + page: 1, + page_size: 999, + }, + false + ); + this.school = res.data; + } catch (err) { + console.error(err); + } + }, + async getBatch() { try { const res = await batchIndex( @@ -457,7 +489,10 @@ export default { } }, - async getList() { + async getList(isRefresh) { + if(isRefresh) { + this.select.page = 1 + } this.loading = true; try { const res = await index(this.select, false); diff --git a/src/views/BatchSub/components/AddBatchSub.vue b/src/views/BatchSub/components/AddBatchSub.vue index 1ac692a..8f72184 100644 --- a/src/views/BatchSub/components/AddBatchSub.vue +++ b/src/views/BatchSub/components/AddBatchSub.vue @@ -67,6 +67,12 @@
+ + + + + + [] + } }, data() { return { @@ -163,13 +173,10 @@ export default { visible: false, form: { name: "", - batch_id: "", - + school: [], sort: "", - show_school_obey: "", - show_specialty_obey: "", }, rules: { @@ -271,13 +278,10 @@ export default { reset() { this.form = { name: "", - batch_id: "", - + school: [], sort: "", - show_school_obey: "", - show_specialty_obey: "", }; this.$refs["elForm"].resetFields(); diff --git a/src/views/BatchSubSchool/BatchSubSchool.vue b/src/views/BatchSubSchool/BatchSubSchool.vue index 7817a46..53a3ad2 100644 --- a/src/views/BatchSubSchool/BatchSubSchool.vue +++ b/src/views/BatchSubSchool/BatchSubSchool.vue @@ -28,7 +28,7 @@ type="primary" plain size="small" - @click="getList" + @click="getList(true)" >搜索 @@ -468,7 +468,10 @@ export default { } }, - async getList() { + async getList(isRefresh=false) { + if(isRefresh) { + this.select.page = 1 + } this.loading = true; try { const res = await index(this.select, false); diff --git a/src/views/IndependentRecruitment/IndependentRecruitment.vue b/src/views/IndependentRecruitment/IndependentRecruitment.vue index 74ce70e..231d645 100644 --- a/src/views/IndependentRecruitment/IndependentRecruitment.vue +++ b/src/views/IndependentRecruitment/IndependentRecruitment.vue @@ -28,7 +28,7 @@ type="primary" plain size="small" - @click="getList" + @click="getList(true)" >搜索 @@ -568,7 +568,10 @@ export default { } }, - async getList() { + async getList(isRefresh) { + if(isRefresh) { + this.select.page = 1 + } this.loading = true; try { const res = await index(this.select, false); diff --git a/src/views/MiddleSchoolIndicator/MiddleSchoolIndicator.vue b/src/views/MiddleSchoolIndicator/MiddleSchoolIndicator.vue index 6f94970..07f2939 100644 --- a/src/views/MiddleSchoolIndicator/MiddleSchoolIndicator.vue +++ b/src/views/MiddleSchoolIndicator/MiddleSchoolIndicator.vue @@ -36,7 +36,7 @@ type="primary" plain size="small" - @click="getList" + @click="getList(true)" >搜索 @@ -497,7 +497,10 @@ export default { } }, - async getList() { + async getList(isRefresh) { + if(isRefresh) { + this.select.page = 1 + } this.loading = true; try { const res = await index(this.select, false); diff --git a/src/views/Recommend/Recommend.vue b/src/views/Recommend/Recommend.vue index 52c059b..2f0aeea 100644 --- a/src/views/Recommend/Recommend.vue +++ b/src/views/Recommend/Recommend.vue @@ -28,7 +28,7 @@ type="primary" plain size="small" - @click="getList" + @click="getList(true)" >搜索 @@ -416,7 +416,10 @@ export default { } }, - async getList() { + async getList(isRefresh=false) { + if(isRefresh) { + this.select.page = 1 + } this.loading = true; try { const res = await index(this.select, false); diff --git a/src/views/RecommendForm/RecommendForm.vue b/src/views/RecommendForm/RecommendForm.vue index dd77229..004efa8 100644 --- a/src/views/RecommendForm/RecommendForm.vue +++ b/src/views/RecommendForm/RecommendForm.vue @@ -28,7 +28,7 @@ type="primary" plain size="small" - @click="getList" + @click="getList(true)" >搜索 @@ -561,7 +561,10 @@ export default { } }, - async getList() { + async getList(isRefresh=false) { + if(isRefresh) { + this.select.page = 1 + } this.loading = true; try { const res = await index(this.select, false); diff --git a/src/views/School/School.vue b/src/views/School/School.vue index 85039e9..dbd1298 100644 --- a/src/views/School/School.vue +++ b/src/views/School/School.vue @@ -22,7 +22,7 @@ > @@ -600,7 +600,10 @@ export default { } }, - async getList() { + async getList(isRefresh=false) { + if(isRefresh) { + this.select.page = 1 + } this.loading = true; try { const res = await index(this.select, false); diff --git a/src/views/Score/Score.vue b/src/views/Score/Score.vue index 170dd8f..5b185b5 100644 --- a/src/views/Score/Score.vue +++ b/src/views/Score/Score.vue @@ -28,7 +28,7 @@ type="primary" plain size="small" - @click="getList" + @click="getList(true)" >搜索 @@ -450,7 +450,10 @@ export default { } }, - async getList() { + async getList(isRefresh=false) { + if(isRefresh) { + this.select.page = 1 + } this.loading = true; try { const res = await index(this.select, false); diff --git a/src/views/Specialty/Specialty.vue b/src/views/Specialty/Specialty.vue index f3bda4f..899b5c6 100644 --- a/src/views/Specialty/Specialty.vue +++ b/src/views/Specialty/Specialty.vue @@ -28,7 +28,7 @@ type="primary" plain size="small" - @click="getList" + @click="getList(true)" >搜索 @@ -416,7 +416,10 @@ export default { } }, - async getList() { + async getList(isRefresh) { + if(isRefresh) { + this.select.page = 1 + } this.loading = true; try { const res = await index(this.select, false); diff --git a/src/views/User/User.vue b/src/views/User/User.vue index b51a151..0f15015 100644 --- a/src/views/User/User.vue +++ b/src/views/User/User.vue @@ -28,7 +28,7 @@ type="primary" plain size="small" - @click="getList" + @click="getList(true)" >搜索 @@ -539,7 +539,10 @@ export default { } }, - async getList() { + async getList(isRefresh) { + if(isRefresh) { + this.select.page = 1 + } this.loading = true; try { const res = await index(this.select, false); diff --git a/src/views/UserFollow/UserFollow.vue b/src/views/UserFollow/UserFollow.vue index 7d003b5..cfb36f3 100644 --- a/src/views/UserFollow/UserFollow.vue +++ b/src/views/UserFollow/UserFollow.vue @@ -28,7 +28,7 @@ type="primary" plain size="small" - @click="getList" + @click="getList(true)" >搜索 @@ -416,7 +416,10 @@ export default { } }, - async getList() { + async getList(isRefresh) { + if(isRefresh) { + this.select.page = 1 + } this.loading = true; try { const res = await index(this.select, false);