From de03aaf72f7ea700c5e60c9953c3cf439c84a8d8 Mon Sep 17 00:00:00 2001 From: wangxia <779219182@qq.com> Date: Fri, 10 Nov 2023 09:27:22 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=E7=AE=A1=E7=90=86=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/job.js | 6 + src/components/FirstJob/joblist.vue | 16 +- src/components/FirstJob/recordBill.vue | 134 ++++-- .../merchantManagement/addRoleManagement.vue | 462 +++++++++++++++++++++ src/components/merchantManagement/agencyList.vue | 3 - .../merchantManagement/brokerageConfig.vue | 3 - src/components/merchantManagement/firmInfo.vue | 3 - src/components/merchantManagement/homePage.vue | 3 - src/components/merchantManagement/infoList.vue | 3 - src/components/merchantManagement/jobList.vue | 3 - src/components/merchantManagement/mineBill.vue | 3 - .../merchantManagement/navigationConfig.vue | 3 - .../merchantManagement/notificationCenter.vue | 4 +- src/components/merchantManagement/orderList.vue | 3 - src/components/merchantManagement/qiwei.vue | 3 - .../merchantManagement/roleManagement.vue | 340 ++------------- .../merchantManagement/roleManagementDetail.vue | 445 ++++++++++++++++++++ .../merchantManagement/serviceMarket.vue | 3 - src/components/merchantManagement/townsmanList.vue | 3 - src/components/merchantManagement/workBench.vue | 3 - .../accountsetting/components/loginpsw.vue | 65 ++- .../userinfo/usercenter/components/mybill.vue | 2 +- src/router/index.js | 12 + src/views/merchantBack.vue | 4 +- 24 files changed, 1138 insertions(+), 391 deletions(-) create mode 100644 src/components/merchantManagement/addRoleManagement.vue create mode 100644 src/components/merchantManagement/roleManagementDetail.vue diff --git a/src/api/job.js b/src/api/job.js index c652d4a..28a9bb2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -108,3 +108,9 @@ export function getHotStoreApi() { url: `/yishoudan/store/getHotStore`, }); } +// 获取筛选分类 +export function getClassifyListApi() { + return request({ + url: `/yishoudan/labels/type/95`, + }); +} diff --git a/src/components/FirstJob/joblist.vue b/src/components/FirstJob/joblist.vue index 3a80082..2a9bd33 100644 --- a/src/components/FirstJob/joblist.vue +++ b/src/components/FirstJob/joblist.vue @@ -516,6 +516,7 @@ import { getHotCityApi, getCityWhichHasJobApi, getHotStoreApi, + getClassifyListApi, // getCityApi, } from '../../api/job' import $ from 'jquery' @@ -797,6 +798,8 @@ export default { this.getHotCity() this.getCityWhichHasJob() this.getHotStore() + this.getClassifyList() + this.hideFilterContent() if (isNotEmptyCheck(localStorage.getItem('POSITION_INFO'))) { let position = JSON.parse(localStorage.getItem('POSITION_INFO')) @@ -1326,6 +1329,17 @@ export default { // console.log(error); } }, + async getClassifyList() { + try { + const { data } = await getClassifyListApi() + console.log(data); + if (data.status == 200) { + console.log(data); + } + } catch (error) { + // console.log(error); + } + }, changeCurrentCity(index) { this.currentCityList = this.hasJobCityList.cityList[index] // console.log(index); @@ -2954,7 +2968,7 @@ export default { } } } -p{ +p { margin-bottom: 0; } diff --git a/src/components/FirstJob/recordBill.vue b/src/components/FirstJob/recordBill.vue index 582360a..2196c89 100644 --- a/src/components/FirstJob/recordBill.vue +++ b/src/components/FirstJob/recordBill.vue @@ -165,6 +165,17 @@ --> +
{{form.policy }}
+
+ +
+ + + {{item.name}} + +
+
+
-
{{ form.policy }}
+
@@ -224,7 +235,7 @@ import { nationlist } from '../../utils/datalist' import moment from 'moment' import { isEmptyCheck, getAgeFromBirthday } from '../../utils/commonUtil' import timepicker from './components/timepicker.vue' -import { recordBillApi, getProxyInfoApi, getStoreAliasApi, getStoreJobApi, getPolicyByJobIdApi, getPolicyListByJobIdApi } from '@/api/job' +import { recordBillApi, getProxyInfoApi, getStoreAliasApi, getStoreJobApi, getPolicyByJobIdApi, getPolicyListByJobIdApi, getJobDetailApi } from '@/api/job' import request from '@/utils/request' import qs from 'qs' // import axios from "axios"; @@ -366,6 +377,8 @@ export default { proxyinfo: {}, firminfo: {}, + zhengceTextList: [], + policyNum: 0, // 政策的数目 } }, // 计算属性 @@ -393,10 +406,12 @@ export default { if (this.proxyinfo.roleOfPmd) { this.isMaster = true } - console.log(this.proxyinfo); + console.log(this.proxyinfo) this.getProxyInfo(this.proxyinfo.id) this.getJob(this.firminfo) - this.getPolicyByJobId(this.firminfo.id) + this.getPolicyByJobId(this.firminfo.id || '').then(() => { + this.getJobDetail(this.firminfo.id || '') + }) // this.getPolicyListByJobId(this.firminfo.id) }, /** @@ -417,18 +432,18 @@ export default { let that = this const policy = document.querySelector('.policy') // this.$nextTick(()=>{ - setTimeout(() => { - console.log(policy.offsetHeight) - console.log(policy.innerHTML) - if (policy.offsetHeight >= 230) { - policy.style.maxHeight = '230px' - policy.style.marginBottom = '24px' - that.isContainerShow = true - } else { - policy.style.minHeight = '230px' - that.isContainerShow = false - } - }, 100) + // setTimeout(() => { + // console.log(policy.offsetHeight) + // console.log(policy.innerHTML) + // if (policy.offsetHeight >= 230) { + // policy.style.maxHeight = '230px' + // policy.style.marginBottom = '24px' + // that.isContainerShow = true + // } else { + // policy.style.minHeight = '230px' + // that.isContainerShow = false + // } + // }, 100) } } catch (error) { console.log(error) @@ -464,17 +479,73 @@ export default { console.log(error) } }, - async getPolicyByJobId(value) { - console.log(value) + async getJobDetail(value) { try { - const { data } = await getPolicyByJobIdApi(value) + const { data } = await getJobDetailApi(value) + console.log(data) + if (data.status === 200) { + this.form.policyNum = data.data.storeJob.policyNum + console.log(this.form.policyNum) + if (this.form.policyNum == '' && this.form.policy != '') { + this.form.policyNum = 1 + console.log(this.form.policyNum) + } + let list = [] + for (let i = 0; i < this.form.policyNum; i++) { + let pickerStr + if (i <= 9) { + switch (i) { + case 0: + pickerStr = '政策一' + break + case 1: + pickerStr = '政策二' + break + case 2: + pickerStr = '政策三' + break + case 3: + pickerStr = '政策四' + break + case 4: + pickerStr = '政策五' + break + case 5: + pickerStr = '政策六' + break + case 6: + pickerStr = '政策七' + break + case 7: + pickerStr = '政策八' + break + case 8: + pickerStr = '政策九' + break + case 9: + pickerStr = '政策十' + break + default: + pickerStr = '政策' + (index + 1) + break + } + list[i] = { value: i + 1, name: pickerStr } + } + } + console.log(list) + // policy: res.data.data, + // isShowZhedie: true, + this.zhengceTextList = list + } + } catch (error) {} + }, + async getPolicyByJobId(value) { + return getPolicyByJobIdApi(value).then(({ data }) => { console.log(data) if (data.status === 200) { this.form.policy = data.data } - } catch (error) { - console.log(error) - } + }) }, onClose() { this.form = { @@ -515,7 +586,7 @@ export default { let dataObj = qs.stringify({ ...this.form, storeJobId: this.firminfo.id, - // storeJobPolicyId: this.currentPolicy, + policyIdx: this.currentPolicy, // policy: '', }) console.log(dataObj) @@ -712,8 +783,8 @@ export default { let _self = this this.loading = true var formData = new FormData() - let str = file.file.name.replace(/\s/g, "") - _self.dataObj.key = _self.dataObj.key + str + let str = file.file.name.replace(/\s/g, '') + _self.dataObj.key = _self.dataObj.key + str //注意formData里append添加的键的大小写 formData.append('key', _self.dataObj.key) //存储在oss的文件路径 formData.append('OSSAccessKeyId', _self.dataObj.ossaccessKeyId) //accessKeyId @@ -802,8 +873,8 @@ export default { let _self = this var formData = new FormData() - let str = file.file.name.replace(/\s/g, "") - _self.dataObj.key = _self.dataObj.key + str + let str = file.file.name.replace(/\s/g, '') + _self.dataObj.key = _self.dataObj.key + str //注意formData里append添加的键的大小写 formData.append('key', _self.dataObj.key) //存储在oss的文件路径 formData.append('OSSAccessKeyId', _self.dataObj.ossaccessKeyId) //accessKeyId @@ -939,7 +1010,9 @@ export default { // this.storeJobList = []; // if(!isEmptyCheck(this.form.qiyeId)){ // this.getPolicyListByJobId(value.id) - this.getPolicyByJobId(value.id) + this.getPolicyByJobId(value.id).then(() => { + this.getJobDetail(value.id) + }) this.form.storeJobId = value.id this.jobnameStatus = '' this.firminfo.jobName = value.jobName @@ -1663,4 +1736,7 @@ export default { /deep/ .ant-select-selection { border-radius: 0px !important; } +.policyRadios{ + flex-wrap: wrap; +} diff --git a/src/components/merchantManagement/addRoleManagement.vue b/src/components/merchantManagement/addRoleManagement.vue new file mode 100644 index 0000000..29a4565 --- /dev/null +++ b/src/components/merchantManagement/addRoleManagement.vue @@ -0,0 +1,462 @@ + + + + + diff --git a/src/components/merchantManagement/agencyList.vue b/src/components/merchantManagement/agencyList.vue index 816113d..831f45e 100644 --- a/src/components/merchantManagement/agencyList.vue +++ b/src/components/merchantManagement/agencyList.vue @@ -53,8 +53,5 @@ export default { diff --git a/src/components/merchantManagement/brokerageConfig.vue b/src/components/merchantManagement/brokerageConfig.vue index 311276a..5be3953 100644 --- a/src/components/merchantManagement/brokerageConfig.vue +++ b/src/components/merchantManagement/brokerageConfig.vue @@ -55,9 +55,6 @@ export default { diff --git a/src/components/merchantManagement/firmInfo.vue b/src/components/merchantManagement/firmInfo.vue index b5338e5..353b9c9 100644 --- a/src/components/merchantManagement/firmInfo.vue +++ b/src/components/merchantManagement/firmInfo.vue @@ -55,9 +55,6 @@ export default { diff --git a/src/components/merchantManagement/homePage.vue b/src/components/merchantManagement/homePage.vue index e44b610..22d9ad3 100644 --- a/src/components/merchantManagement/homePage.vue +++ b/src/components/merchantManagement/homePage.vue @@ -53,8 +53,5 @@ export default { diff --git a/src/components/merchantManagement/infoList.vue b/src/components/merchantManagement/infoList.vue index 4f01a90..98ae59e 100644 --- a/src/components/merchantManagement/infoList.vue +++ b/src/components/merchantManagement/infoList.vue @@ -55,9 +55,6 @@ export default { diff --git a/src/components/merchantManagement/jobList.vue b/src/components/merchantManagement/jobList.vue index cf6d521..f8a5a93 100644 --- a/src/components/merchantManagement/jobList.vue +++ b/src/components/merchantManagement/jobList.vue @@ -56,9 +56,6 @@ export default { diff --git a/src/components/merchantManagement/mineBill.vue b/src/components/merchantManagement/mineBill.vue index 26ed1e6..a6dd42a 100644 --- a/src/components/merchantManagement/mineBill.vue +++ b/src/components/merchantManagement/mineBill.vue @@ -55,9 +55,6 @@ export default { diff --git a/src/components/merchantManagement/navigationConfig.vue b/src/components/merchantManagement/navigationConfig.vue index 20a9596..fc98627 100644 --- a/src/components/merchantManagement/navigationConfig.vue +++ b/src/components/merchantManagement/navigationConfig.vue @@ -55,9 +55,6 @@ export default { diff --git a/src/components/merchantManagement/notificationCenter.vue b/src/components/merchantManagement/notificationCenter.vue index 9f86fd3..fd4d3ab 100644 --- a/src/components/merchantManagement/notificationCenter.vue +++ b/src/components/merchantManagement/notificationCenter.vue @@ -430,9 +430,7 @@ export default { diff --git a/src/components/merchantManagement/qiwei.vue b/src/components/merchantManagement/qiwei.vue index ee5ec2e..5642910 100644 --- a/src/components/merchantManagement/qiwei.vue +++ b/src/components/merchantManagement/qiwei.vue @@ -55,9 +55,6 @@ export default { diff --git a/src/components/merchantManagement/roleManagement.vue b/src/components/merchantManagement/roleManagement.vue index 5ff85ab..e00f62a 100644 --- a/src/components/merchantManagement/roleManagement.vue +++ b/src/components/merchantManagement/roleManagement.vue @@ -30,70 +30,7 @@
- -
- -
-
- - -
角色信息
- - - - - - - - -
功能权限
- -
- 在 - - {{item.roleName}} - - 的基础上编辑权限 -
-
-
- {{item.label}} -
-
- {{subItem.label}} -
- -
- - 取消 - 保存 - -
-
-
-
-
角色详情
-
角色信息
-
-
角色名称:
-
{{ currentRole.roleName }}
-
-
-
角色描述:
-
{{ currentRole.desp }}
-
-
功能权限
-
- {{item.label}} -
-
- {{subItem.label}} -
- +
@@ -124,8 +61,8 @@ export default { ), }, secondBreadcrumb: '', - roleForm: this.$form.createForm(this), roleList: [1, 2, 3, 4], + pagination: { pageNum: 1, pageSize: 20, @@ -141,181 +78,7 @@ export default { // searchTag: 1, }, isspinning: false, - roleList: [ - { - roleDesp: '', - roleCreateTime: '2023-10-20 14:27:17', - classify: 0, - aliasName: '', - userNum: 21, - labelId: 672, - pName: '稻田内测备注', - roleId: 145, - roleName: '稻田内测用户', - sort: 1, - roleType: 1, - labelName: '稻田内测用户', - }, - { - roleDesp: '', - roleCreateTime: '2023-10-12 09:34:33', - classify: 0, - aliasName: '', - userNum: 2, - labelId: 670, - pName: '稻田内测备注', - roleId: 144, - roleName: '稻田内测用户1', - sort: 2, - roleType: 1, - labelName: '稻田内测用户1', - }, - { - roleDesp: '', - roleCreateTime: '2023-10-12 09:34:33', - classify: 0, - aliasName: '', - userNum: 2, - labelId: 670, - pName: '稻田内测备注', - roleId: 144, - roleName: '稻田内测用户2', - sort: 2, - roleType: 1, - labelName: '稻田内测用户2', - }, - ], - middleauthor: null, - authorityList: { - dtzw: { - id: 1, - label: '稻田职位', - checked: false, - children: [ - { - id: 1, - label: '查看职位列表', - checked: false, - }, - { - id: 2, - label: '职位详情页', - checked: false, - }, - { - id: 3, - label: '报名', - checked: false, - }, - ], - }, - wdbm: { - id: 2, - label: '我的报名', - checked: false, - children: [ - { - id: 1, - label: '查看报名信息', - checked: false, - }, - { - id: 2, - label: '修改报名详情', - checked: false, - }, - ], - }, - wdlx: { - id: 3, - label: '我的老乡', - checked: false, - children: [ - { - id: 1, - label: '查看老乡信息', - checked: false, - }, - { - id: 2, - label: '修改老乡详情', - checked: false, - }, - ], - }, - tdsj: { - id: 4, - label: '团队数据', - checked: false, - children: [ - { - id: 1, - label: '查看数据', - checked: false, - }, - ], - }, - xx: { - id: 5, - label: '消息', - checked: false, - children: [ - { - id: 1, - label: '系统消息', - checked: false, - }, - { - id: 2, - label: '团队消息', - checked: false, - }, - ], - }, - sjht: { - id: 6, - label: '商家后台', - checked: false, - children: [ - { - id: 1, - label: '我的团队', - checked: false, - }, - { - id: 2, - label: '新增成员', - checked: false, - }, - { - id: 3, - label: '修改成员信息', - checked: false, - }, - { - id: 4, - label: '删除成员', - checked: false, - }, - { - id: 5, - label: '伯才TV', - checked: false, - }, - { - id: 6, - label: '数据大屏', - checked: false, - }, - ], - }, - gzt: { - id: 7, - label: '工作台', - checked: false, - children: [], - }, - }, + roleList: [], } }, // 计算属性 @@ -399,7 +162,6 @@ export default { beforeCreate() {}, created() { this.$emit('setTitle', '角色管理') - this.middleauthor = JSON.parse(JSON.stringify(this.authorityList)) this.getRoleList() console.log(this.middleauthor) }, @@ -450,22 +212,51 @@ export default { } }, showDetail(val) { + let that = this this.secondBreadcrumb = '角色详情' console.log(val) - this.currentRole = val + that.$router.push({ + name: 'RoleManagementDetail', + query: { + item: JSON.stringify(val), + }, + }) }, addRole(type, val) { + let that = this this.currentRole = val if (type == 'add') { - this.secondBreadcrumb = '添加角色' + this.$confirm({ + title: '添加角色', + content: '【添加角色】属高敏感权限,基于账户安全考虑,请再次确认是否创建', + onOk() { + that.$router.push({ + name: 'AddRoleManagement', + query: { + // item: val, + type: 'add', + roleList: JSON.stringify(that.roleList), + }, + }) + }, + onCancel() {}, + }) + // this.secondBreadcrumb = '添加角色' } else { - this.secondBreadcrumb = '编辑角色' - setTimeout(() => { - this.roleForm.setFieldsValue({ - roleName: val.roleName, - desp: val.desp, - }) - }, 10) + this.$router.push({ + name: 'AddRoleManagement', + query: { + item: JSON.stringify(val), + roleList: JSON.stringify(this.roleList), + }, + }) + // this.secondBreadcrumb = '编辑角色' + // setTimeout(() => { + // this.roleForm.setFieldsValue({ + // roleName: val.roleName, + // desp: val.desp, + // }) + // }, 10) } this.$forceUpdate() }, @@ -496,49 +287,12 @@ export default { } }) }, - /** - * 添加角色信息表单提交 - */ - addSubmit() { - this.roleForm.validateFields(async (err) => { - console.log(err) - console.log(this.roleForm.getFieldsValue()) - if (err == null) { - let formData = this.roleForm.getFieldsValue() - delete formData.agencyTeamId - if (this.secondBreadcrumb == '添加角色') { - addRoleApi({ - ...formData, - }).then(({ data }) => { - console.log(data) - if (data.status == 200) { - this.secondBreadcrumb = '' - this.$message.success('添加成功') - this.getRoleList() - } - }) - } else { - updateRoleApi({ - ...formData, - recordId: currentRole.id, - }).then(({ data }) => { - console.log(data) - if (data.status == 200) { - this.secondBreadcrumb = '' - this.$message.success('修改成功') - this.getRoleList() - } - }) - } - } - }) - }, /** * 删除角色信息表单提交 */ delSubmit(val) { - console.log(val); + console.log(val) delRoleApi(val.id).then(({ data }) => { console.log(data) if (data.status == 200) { @@ -547,7 +301,6 @@ export default { this.getRoleList() } else { this.$message.fail('删除失败') - } }) }, @@ -557,16 +310,13 @@ export default { cancelAdd() { this.secondBreadcrumb = '' - this.authorityList = JSON.parse(JSON.stringify(this.middleauthor)) + // this.authorityList = JSON.parse(JSON.stringify(this.middleauthor)) }, }, } diff --git a/src/components/merchantManagement/serviceMarket.vue b/src/components/merchantManagement/serviceMarket.vue index c714589..dc90aac 100644 --- a/src/components/merchantManagement/serviceMarket.vue +++ b/src/components/merchantManagement/serviceMarket.vue @@ -55,9 +55,6 @@ export default { diff --git a/src/components/merchantManagement/townsmanList.vue b/src/components/merchantManagement/townsmanList.vue index 0c5e359..1cc5b41 100644 --- a/src/components/merchantManagement/townsmanList.vue +++ b/src/components/merchantManagement/townsmanList.vue @@ -55,9 +55,6 @@ export default { diff --git a/src/components/merchantManagement/workBench.vue b/src/components/merchantManagement/workBench.vue index dbfe03e..4d6d9df 100644 --- a/src/components/merchantManagement/workBench.vue +++ b/src/components/merchantManagement/workBench.vue @@ -39,9 +39,6 @@ export default { diff --git a/src/components/userinfo/accountsetting/components/loginpsw.vue b/src/components/userinfo/accountsetting/components/loginpsw.vue index be6e50d..d3bbc49 100644 --- a/src/components/userinfo/accountsetting/components/loginpsw.vue +++ b/src/components/userinfo/accountsetting/components/loginpsw.vue @@ -60,7 +60,7 @@ - 确定 + 确定 +
- +