From f356d795fa1df53540907ff7e438e2b696a4593a Mon Sep 17 00:00:00 2001 From: wesley <470822125@qq.com> Date: Thu, 1 Dec 2022 14:53:46 +0800 Subject: [PATCH] 11 --- src/utils/routerList.js | 2 +- src/views/user/userlist.vue | 152 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----- vue.config.js | 4 ++-- 3 files changed, 150 insertions(+), 8 deletions(-) diff --git a/src/utils/routerList.js b/src/utils/routerList.js index 47f0e28..2ae0448 100644 --- a/src/utils/routerList.js +++ b/src/utils/routerList.js @@ -557,7 +557,7 @@ export function getRoutes() { { path: '*', redirect: '/404', - hidden: true + hidden: true } ] } diff --git a/src/views/user/userlist.vue b/src/views/user/userlist.vue index dfe44b0..ea30c47 100644 --- a/src/views/user/userlist.vue +++ b/src/views/user/userlist.vue @@ -128,7 +128,9 @@ @@ -373,6 +375,108 @@ + + + + + + + + + + + + {{index+1}}. + + + + + + + + + + + 删除 + 新增 + + + + + + + + + + + + + + + + + {{index+1}}. + + + + + + + + + + + + + + + + + + 删除 + 新增 + + + + + + + + + + + + + + + + + {{index+1}}. + + + + + + + + + + + + + + + + 删除 + 新增 + + + + + + @@ -569,8 +673,13 @@ dialogVisiblecat: false, filterText: "", gridData: [], + Dataform:{}, Count: 0, - adminUserInfo: {}, + adminUserInfo: { + skillAdvantages: [{}],// 技能优势 + workExperience: [{}],// 工作经历 + educationalExperience: [{}],// 教育经历 + }, temp: { ParentId: 0, }, @@ -700,6 +809,15 @@ this.loadTree(); }, methods: { + removeInfo(type, item) { + var index = this.adminUserInfo[type].indexOf(item) + if (index !== -1) { + this.adminUserInfo[type].splice(index, 1) + } + }, + addInfo(type) { + this.adminUserInfo[type].push({}); + }, handleChangeCat() { var rows = this.$refs.userList.selection; if (!rows || rows.length < 1) { @@ -872,7 +990,15 @@ let formData = { ...this.adminUserInfo }; - console.log('submitForm', JSON.stringify(formData)); + if(formData.skillAdvantages) formData.skillAdvantages = JSON.stringify(formData.skillAdvantages); + if(formData.workExperience) formData.workExperience = JSON.stringify(formData.workExperience); + if(formData.educationalExperience) formData.educationalExperience = JSON.stringify(formData.educationalExperience); + + +// 技能优势 +// 工作经历 +// 教育经历 + if (formData.id) { SelectPhoneBool(formData.id, formData.phone).then(res => { @@ -903,13 +1029,29 @@ } }, handleEdit(data) { + debugger; this.dialogClassIVIsible = true; console.log(" -_- ", data); if (data == -1) { - this.adminUserInfo = { userClassId: (this.query.userClassId || 0) }; + this.adminUserInfo = { + userClassId: (this.query.userClassId || 0), + skillAdvantages: [{}],// 技能优势 + workExperience: [{}],// 工作经历 + educationalExperience: [{}],// 教育经历 + }; } - else + else { + if (!data.skillAdvantages) data.skillAdvantages = [{}]; + else if(typeof(data.skillAdvantages)=='string')data.skillAdvantages = JSON.parse(data.skillAdvantages);; + if (!data.workExperience) data.workExperience = [{}]; + else if(typeof(data.workExperience)=='string')data.workExperience = JSON.parse(data.workExperience);; + if (!data.educationalExperience) data.educationalExperience = [{}]; + else if(typeof(data.educationalExperience)=='string')data.educationalExperience = JSON.parse(data.educationalExperience);; + this.adminUserInfo = data; + + } + }, handleTestHitory(row) { GetHistoryList({ diff --git a/vue.config.js b/vue.config.js index fe7e4ca..ab8ce42 100644 --- a/vue.config.js +++ b/vue.config.js @@ -38,8 +38,8 @@ module.exports = { }, proxy: { '/development': { - target: `http://admin.7-stars.com.cn/`, //后台服务地址 - // target:'http://localhost:8877', + // target: `http://admin.7-stars.com.cn/`, //后台服务地址 + target:'http://localhost:8877', // target:'http://localhost:8009', changeOrigin: true, pathRewrite: { -- libgit2 0.21.4