From 68fca07951be68ad2c1a863378bb40a97fa203ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E4=B8=BD=E5=90=9B?= <664953382@qq.com> Date: Wed, 13 Oct 2021 14:36:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E8=97=8F=E6=9F=A5=E7=9C=8B=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=8C=E5=AF=86=E7=A0=81md5=E5=8A=A0=E5=AF=86?= =?UTF-8?q?=EF=BC=8C=E9=87=8D=E7=BD=AE=E5=AF=86=E7=A0=81=E7=9A=84=E6=AD=A3?= =?UTF-8?q?=E5=88=99=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/customer.js | 7 +++++++ src/views/account/index.vue | 14 ++++++++++--- src/views/customer/add.vue | 17 +++++++++++++--- src/views/customer/index.vue | 33 ++++++++---------------------- src/views/login.vue | 5 +++-- src/views/policy/library/add.vue | 5 ++++- src/views/policy/tag/index.vue | 1 + src/views/ums/admin/index.vue | 35 +++++++++++++++++++++++++++++--- src/views/ums/role/index.vue | 1 + 9 files changed, 81 insertions(+), 37 deletions(-) diff --git a/src/api/customer.js b/src/api/customer.js index 8f96a4d..7cdf748 100644 --- a/src/api/customer.js +++ b/src/api/customer.js @@ -6,6 +6,13 @@ export function getCategoryList(params) { params }); } +// 分页查询个人收藏 +export function getPolicyCollect(params) { + return request({ + url: '/companyUser/getPolicyCollect', + params + }); +} // 禁用/启用企业 isOpen = true代表启用 export function handleCompanyUser(params) { return request({ diff --git a/src/views/account/index.vue b/src/views/account/index.vue index 9e5129e..7cf12b8 100644 --- a/src/views/account/index.vue +++ b/src/views/account/index.vue @@ -65,11 +65,19 @@ >启用 升级 + 已升级 { - resetPw({ userId, password: value }).then(({ data }) => { + resetPw({ userId, password: this.md5(value) }).then(({ data }) => { this.msgSuccess(data); }); }) diff --git a/src/views/customer/add.vue b/src/views/customer/add.vue index 2f1966d..ba7a26b 100644 --- a/src/views/customer/add.vue +++ b/src/views/customer/add.vue @@ -13,7 +13,7 @@ @@ -22,6 +22,8 @@ @@ -29,6 +31,8 @@ @@ -36,6 +40,8 @@ @@ -80,6 +86,8 @@ @@ -87,6 +95,8 @@ @@ -117,8 +127,8 @@ - - + + { if (data === 500) return this.msgError('该手机号已被注册'); + formData.password = this.md5(formData.password) addCompanyUser(formData).then(({ message }) => { this.msgSuccess(message); this.$router.go(-1); diff --git a/src/views/customer/index.vue b/src/views/customer/index.vue index 6ed35a3..e4279e2 100644 --- a/src/views/customer/index.vue +++ b/src/views/customer/index.vue @@ -484,7 +484,8 @@ import { getCategoryList, handleCompanyUser, deleteCompanyUser, - resetPw + resetPw, + getPolicyCollect } from '@/api/customer'; import { parseTime } from '@/utils/ruoyi'; import { getToken } from '@/utils/auth'; @@ -570,6 +571,7 @@ export default { pageNum: 1, pageSize: 10 }, + rouId: null, dialogTotal: 0, dialogData: [], formA: {}, @@ -658,33 +660,14 @@ export default { }, handleCollecDialog(row) { this.openDialog = true; - console.log(row.id); + this.rouId = row.userId this.getCollecList(); }, getCollecList() { - this.dialogData = [ - { - id: '1447500160736436224', - method: 1, - title: - '关于公开征求《合肥市外国专家“合肥友谊奖”考核暂行办法》(修订版)意见的通知', - level: 3, - attribute: 'KJJ', - listDate: '2021-10-11', - source: '外国专家与科技人才管理服务处' - }, - { - id: '1447500160736436225', - method: 1, - title: - '关于公开征求《合肥市外国专家“合肥友谊奖”考核暂行办法》(修订版)意见的通知', - level: 3, - attribute: 'KJJ', - listDate: '2021-10-11', - source: '外国专家与科技人才管理服务处' - } - ]; - this.dialogTotal = this.dialogData.length; + getPolicyCollect(Object.assign({},this.query,{userId:this.rouId})).then(({data})=>{ + this.dialogData = data.list + this.dialogTotal = data.total + }) }, /** 下载模板操作 */ importTemplate() { diff --git a/src/views/login.vue b/src/views/login.vue index 6a3d408..9f5535c 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -146,9 +146,10 @@ export default { Cookies.remove('password'); Cookies.remove('rememberMe'); } - console.log(this.md5(this.loginForm.password)); + let loginForm = Object.assign({},this.loginForm) + loginForm.password = this.md5(loginForm.password) this.$store - .dispatch('Login', this.loginForm) + .dispatch('Login', loginForm) .then(() => { this.$router.push({ path: this.redirect || '/' }); }) diff --git a/src/views/policy/library/add.vue b/src/views/policy/library/add.vue index e849a4f..ae7ac93 100644 --- a/src/views/policy/library/add.vue +++ b/src/views/policy/library/add.vue @@ -176,7 +176,7 @@ export default { editSatus: false, ruleForm: { title: '', - ids: '', + ids: [], attribute: '', listDate: '', source: '', @@ -297,6 +297,9 @@ export default { if (id) { this.editPage = true; getPolicyInfo({ policyId: id }).then(({ data }) => { + // if(!data.ids.length){ + // data.ids=['1'] + // } this.ruleForm = data; if(data.method==1){ this.editPage = true; diff --git a/src/views/policy/tag/index.vue b/src/views/policy/tag/index.vue index 7aac125..9e2b0c6 100644 --- a/src/views/policy/tag/index.vue +++ b/src/views/policy/tag/index.vue @@ -76,6 +76,7 @@ :ref="'editableInput' + index" size="small" placeholder="请输入标签信息" + maxlength="10" @keyup.enter.native="handleEditableInputConfirm(tag, index)" @change="handleEditableInputConfirm(tag, index)" @blur="handleEditableInputBlur(tag, index)" diff --git a/src/views/ums/admin/index.vue b/src/views/ums/admin/index.vue index a5f09d8..dff6053 100644 --- a/src/views/ums/admin/index.vue +++ b/src/views/ums/admin/index.vue @@ -83,7 +83,8 @@ @@ -134,7 +144,7 @@ - + { + updateAdmin(userId, {password:this.md5(value)}).then(({message}) => { + this.msgSuccess(message); + }); + }) + .catch(() => {}); + }, handleDelete(index, row) { this.$confirm('是否要删除该用户?', '提示', { confirmButtonText: '确定', @@ -313,6 +339,7 @@ export default { handleUpdate(index, row) { this.dialogVisible = true; this.isEdit = true; + delete row.password this.admin = Object.assign({}, row); }, submitForm(formName){ @@ -338,7 +365,9 @@ export default { this.getList(); }); } else { - createAdmin(this.admin).then(response => { + let admin = Object.assign({},this.admin) + admin.password = this.md5(admin.password) + createAdmin(admin).then(response => { this.$message({ message: '添加成功!', type: 'success' diff --git a/src/views/ums/role/index.vue b/src/views/ums/role/index.vue index 2a0b071..c9fbcfe 100644 --- a/src/views/ums/role/index.vue +++ b/src/views/ums/role/index.vue @@ -30,6 +30,7 @@