From 2812f1eef3f5bb56c97773d51f92a1a74538281f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BE=99=E8=BF=90=E6=A8=A1?= <1724894114@qq.com>
Date: Fri, 13 Sep 2024 22:19:26 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=A7=92=E8=89=B2=E7=AE=A1?=
=?UTF-8?q?=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/model/system.js | 28 +++++
src/components/scTable/columnSetting.vue | 4 +-
src/components/scTable/index.vue | 18 ++-
src/style/fix.scss | 6 +-
src/views/cost/feeRecords/index.vue | 15 ++-
src/views/login/userRegister.vue | 2 +-
src/views/setting/role/index.vue | 49 ++++----
src/views/setting/role/roleSort.vue | 107 +++++++++++++++++
src/views/setting/user/index.vue | 91 +++++++++++----
src/views/setting/user/review.vue | 143 +++++++++++++++++++++++
src/views/setting/user/save.vue | 52 ++++-----
11 files changed, 433 insertions(+), 82 deletions(-)
create mode 100644 src/views/setting/role/roleSort.vue
create mode 100644 src/views/setting/user/review.vue
diff --git a/src/api/model/system.js b/src/api/model/system.js
index 2c120a1..8d25b4c 100644
--- a/src/api/model/system.js
+++ b/src/api/model/system.js
@@ -70,6 +70,13 @@ export default {
return await http.post(this.url, params);
},
},
+ sort:{
+ url: `${config.API_URL}/roles.sort`,
+ name: "角色排序",
+ post: async function (params) {
+ return await http.post(this.url, params);
+ },
+ },
users:{
url: `${config.API_URL}/roles.users`,
name: "角色成员",
@@ -336,6 +343,13 @@ export default {
return await http.post(this.url, params);
},
},
+ userType:{
+ url: `${config.API_URL}/user.type.list`,
+ name: "用户类型常量",
+ post: async function (params) {
+ return await http.post(this.url, params);
+ },
+ },
status:{
url: `${config.API_URL}/user.status.update`,
name: "用户状态",
@@ -343,6 +357,20 @@ export default {
return await http.post(this.url, params);
},
},
+ auditStatus:{
+ url: `${config.API_URL}/user.audit.status.list`,
+ name: "用户审核常量",
+ post: async function (params) {
+ return await http.post(this.url, params);
+ }
+ },
+ audit:{
+ url: `${config.API_URL}/user.audit`,
+ name: "用户审核",
+ post: async function (params) {
+ return await http.post(this.url, params);
+ }
+ },
allocatRole: {
url: `${config.API_URL}/auth.user.role`,
name: "用户分配角色",
diff --git a/src/components/scTable/columnSetting.vue b/src/components/scTable/columnSetting.vue
index f2c5b9e..ca42796 100644
--- a/src/components/scTable/columnSetting.vue
+++ b/src/components/scTable/columnSetting.vue
@@ -25,7 +25,7 @@
-
+
@@ -114,7 +114,7 @@
.setting-column__list li.ghost {opacity: 0.3;}
.setting-column__bottom {border-top: 1px solid #EBEEF5;padding-top:15px;text-align: right;}
-
+
.dark .setting-column__title {border-color: var(--el-border-color-light);}
.dark .setting-column__bottom {border-color: var(--el-border-color-light);}
diff --git a/src/components/scTable/index.vue b/src/components/scTable/index.vue
index 0763ed6..916acfa 100644
--- a/src/components/scTable/index.vue
+++ b/src/components/scTable/index.vue
@@ -13,8 +13,8 @@
-
-
+
+
{{scope.row[item.prop]}}
@@ -28,6 +28,9 @@
+
+
+
-
+
@@ -62,6 +62,19 @@
+
+
+
汇总合计:
+
+ 数量
+ {{params.total_quantity}}单
+
+
+ 金额
+ {{params.total_cost}}
+
+
+
diff --git a/src/views/login/userRegister.vue b/src/views/login/userRegister.vue
index 694b6f4..d553a65 100644
--- a/src/views/login/userRegister.vue
+++ b/src/views/login/userRegister.vue
@@ -108,7 +108,7 @@
},
methods: {
async getYzm() {
- const validate = await this.$refs.stepForm_0.validateField("mobile").catch(() => {});
+ const validate = await this.$refs.stepForm_1.validateField("mobile").catch(() => {});
if (!validate) {
return false
}
diff --git a/src/views/setting/role/index.vue b/src/views/setting/role/index.vue
index 395b164..4a85a16 100644
--- a/src/views/setting/role/index.vue
+++ b/src/views/setting/role/index.vue
@@ -10,25 +10,14 @@
-
+
-
-
-
+
+
+
-
-
+
@@ -112,6 +101,7 @@
import dataPermissions from "./dataPermissions";
import members from "./members";
import treeUser from "./tree"
+ import roleSort from "./roleSort";
export default {
components: {
@@ -120,7 +110,8 @@
dataTree,
dataPermissions,
members,
- treeUser
+ treeUser,
+ roleSort
},
watch:{
groupFilterText(val) {
@@ -282,17 +273,21 @@
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
- //树选中事件
- // groupChange(data,isCheck){
- // let list = JSON.parse(JSON.stringify(this.roleCheckList));
- // if(isCheck){
- // this.roleCheckList.push(data.id);
- // }else{
- // this.roleCheckList = list.filter(em=>em != data.id);
- // }
- // },
+ //角色拖动事件
+ groupChange(data){
+ let params = {
+ sort_info:data.map((item,index)=>({
+ id:item.id,
+ sort:index+1
+ }))
+ }
+ const res = this.$API.system.role.sort.post(params);
+ if(res.code === 200){
+ this.$message.success('保存成功');
+ }
+ },
//树点击事件
- groupClick(data){
+ roleClick(data){
this.role_id = data.id;
this.getMenu();
this.getRoleList();
diff --git a/src/views/setting/role/roleSort.vue b/src/views/setting/role/roleSort.vue
new file mode 100644
index 0000000..c01f5cc
--- /dev/null
+++ b/src/views/setting/role/roleSort.vue
@@ -0,0 +1,107 @@
+
+
+
+
+ -
+
+
+
+ {{ item.role_name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/setting/user/index.vue b/src/views/setting/user/index.vue
index f5f1e80..f3a2ad3 100644
--- a/src/views/setting/user/index.vue
+++ b/src/views/setting/user/index.vue
@@ -1,15 +1,15 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -63,6 +63,20 @@
+
+ 在线
+ 离线
+
+
+
+ {{item.label}}
+
+
+
+
+ {{item.label}}
+
+
@@ -76,6 +90,9 @@
编辑用户
+
+ 审核用户
+
查看权限
@@ -93,6 +110,7 @@
+
@@ -100,24 +118,28 @@
-
diff --git a/src/views/setting/user/review.vue b/src/views/setting/user/review.vue
new file mode 100644
index 0000000..db68891
--- /dev/null
+++ b/src/views/setting/user/review.vue
@@ -0,0 +1,143 @@
+
+
+
+
+
+
+
+ 取 消
+ 拒 绝
+ 通 过
+
+
+
+
+
+
+
diff --git a/src/views/setting/user/save.vue b/src/views/setting/user/save.vue
index 5c9f19c..fd459e1 100644
--- a/src/views/setting/user/save.vue
+++ b/src/views/setting/user/save.vue
@@ -39,21 +39,21 @@
-
-
-
+
+
+
+
+
+
+
+
取 消
@@ -85,7 +85,7 @@
email:"",
avatar: "",
password:"",
- dept_id: "",
+ // dept_id: "",
role_ids: []
},
//验证规则
@@ -127,9 +127,9 @@
}
}}
],
- dept_id: [
- {required: true, message: '请选择所属部门'}
- ],
+ // dept_id: [
+ // {required: true, message: '请选择所属部门'}
+ // ],
role_ids: [
{required: true, message: '请选择所属角色', trigger: 'change'}
]
@@ -141,17 +141,17 @@
multiple: true,
checkStrictly: true
},
- depts: [],
- deptsProps: {
- value: "id",
- checkStrictly: false,
- emitPath:false
- }
+ // depts: [],
+ // deptsProps: {
+ // value: "id",
+ // checkStrictly: false,
+ // emitPath:false
+ // }
}
},
mounted() {
this.getGroup()
- this.getDept()
+ // this.getDept()
},
methods: {
//显示
@@ -167,12 +167,12 @@
this.groups = res.data.rows;
}
},
- async getDept(){
- const res = await this.$API.system.dept.active.post();
- if(res.code == 200){
- this.depts = res.data;
- }
- },
+ // async getDept(){
+ // const res = await this.$API.system.dept.active.post();
+ // if(res.code == 200){
+ // this.depts = res.data;
+ // }
+ // },
parentParams(item){
this.form.avatar = item;
},
@@ -202,7 +202,7 @@
this.form.mobile = data.mobile
this.form.email = data.email
this.form.avatar = data.avatar
- this.form.dept_id = data.dept_id
+ // this.form.dept_id = data.dept_id
this.form.group = data.group
this.form.role_ids = data.user_roles && data.user_roles.role_ids?data.user_roles.role_ids:[]