From 367f240ac309c455aee521f1e6cfdd0e4fddd96e Mon Sep 17 00:00:00 2001
From: xy <271556543@qq.com>
Date: Tue, 14 Feb 2023 17:29:49 +0800
Subject: [PATCH] 2023-2-14
---
src/api/unifiedRecruitment/recruit.js | 11 +-
src/components/XyTable/index.vue | 9 +-
src/const/index.js | 6 +-
src/utils/auth.js | 2 +-
.../component/addRecruit.vue | 237 +++++++++++++--
.../component/addRecruit1.vue | 287 ------------------
.../component/importRecruitInfo.vue | 99 ++++++
.../unifiedRecruitment/component/setting.vue | 6 +-
src/views/unifiedRecruitment/recruit.vue | 79 ++++-
.../yearScore/component/addYearScore.vue | 47 +--
src/views/yearScore/yearScore.vue | 2 +-
11 files changed, 435 insertions(+), 350 deletions(-)
delete mode 100644 src/views/unifiedRecruitment/component/addRecruit1.vue
create mode 100644 src/views/unifiedRecruitment/component/importRecruitInfo.vue
diff --git a/src/api/unifiedRecruitment/recruit.js b/src/api/unifiedRecruitment/recruit.js
index 6879616..53ed26b 100644
--- a/src/api/unifiedRecruitment/recruit.js
+++ b/src/api/unifiedRecruitment/recruit.js
@@ -1,6 +1,6 @@
import request from "@/utils/request";
import { download } from "@/utils/downloadRequest";
-
+import qs from "qs";
export function index(params,isLoading = true){
return request({
url:"/api/admin/recruit/index",
@@ -23,8 +23,11 @@ export function save(data,isLoading = true){
return request({
url:"/api/admin/recruit/save",
method:"post",
- data,
- isLoading
+ data:qs.stringify(data),
+ isLoading,
+ headers:{
+ 'Content-Type':'application/x-www-form-urlencoded'
+ }
})
}
@@ -47,7 +50,7 @@ export function imports(data,isLoading = true){
}
export async function exports(params){
- await download('/api/admin/recruit/export','get',params,`统招生管理-${params.year}`)
+ await download('/api/admin/recruit/export','get',params,`统招生管理-${params.year}.xlsx`)
}
diff --git a/src/components/XyTable/index.vue b/src/components/XyTable/index.vue
index 4728026..9251311 100644
--- a/src/components/XyTable/index.vue
+++ b/src/components/XyTable/index.vue
@@ -256,6 +256,8 @@ export default {
this.loading = false;
});
break;
+ default:
+ return;
}
},
getByStrkey(obj, str) {
@@ -610,6 +612,11 @@ export default {
});
},
},
+ watch:{
+ tableItem(newVal){
+ this.checkTable = newVal.map((item) => item?.prop)
+ }
+ },
created() {
this.getTableData();
},
@@ -685,7 +692,7 @@ export default {
["expand-change"]: this.expandChange,
}}
>
- {this.tableFormat.map((item, index) => {
+ {this.tableItem.map((item, index) => {
if ($scopedSlots[item.prop]) {
return $scopedSlots[item.prop](item, index);
}
diff --git a/src/const/index.js b/src/const/index.js
index ecc7c9b..77f44b0 100644
--- a/src/const/index.js
+++ b/src/const/index.js
@@ -20,13 +20,11 @@ const data = {
"templateType":[
{
id: 1,
- value: "文本",
- type:"text"
+ value: "文本"
},
{
id:2,
- value:"年份",
- type:"year"
+ value:"年份"
}
]
}
diff --git a/src/utils/auth.js b/src/utils/auth.js
index 74ba1ab..3992224 100644
--- a/src/utils/auth.js
+++ b/src/utils/auth.js
@@ -1,6 +1,6 @@
import Cookies from 'js-cookie'
-const TokenKey = 'sishitongtang_token'
+const TokenKey = 'wsxy_token'
export function getToken() {
return Cookies.get(TokenKey)
diff --git a/src/views/unifiedRecruitment/component/addRecruit.vue b/src/views/unifiedRecruitment/component/addRecruit.vue
index 45e1dff..20049dd 100644
--- a/src/views/unifiedRecruitment/component/addRecruit.vue
+++ b/src/views/unifiedRecruitment/component/addRecruit.vue
@@ -12,11 +12,169 @@ export default {
loading={true}
on={{
["on-visible-change"]: (e) => this.$emit("update:isShow", e),
+ ["on-ok"]: (e) => {
+ this.$refs['oriElForm'].validate().then(res => {
+ if (res){
+ let fileds = []
+ for(let key in this.form){
+ let temp = {}
+ temp[key] = this.form[key]
+ fileds.push(temp)
+ }
+ this.$refs['elForm'].validate().then(res => {
+ Object.defineProperty(this.originalForm,'fileds',{
+ enumerable:true,
+ writable:true,
+ configurable:false,
+ value:fileds
+ })
+
+ save(this.originalForm).then(res => {
+ this.$message({
+ type:'success',
+ message:res.msg
+ })
+ this.$emit("refresh")
+ this.$emit("update:isShow", false)
+ })
+ })
+ }
+ })
+ },
}}
>
- {
- this.getTable()
- }
+
这是一段内容这是一段内容确定删除吗?
+确定删除该列吗?