295c4118 by xiaomiao

角色管理人员配置功能编写

1 parent 979d30be
1 import request from "@/utils/request";
2 import SERVER from "./config";
3 import { getParams } from './util'
4 import {
5 api,
6 getAction,
7 postAction,
8 deleteAction,
9 putAction
10 } from './manageApi'
11
12 /** 角色管理开始 */
13 // 获取角色列表 by categoryId
14 export const getRolesById = categoryId => {
15 const conditionGroup = {
16 conditions: [
17 {
18 property: 'category',
19 value: categoryId,
20 operator: 'EQ'
21 }
22 ],
23 queryRelation: 'AND'
24 }
25 const params = getParams(conditionGroup)
26 return getAction(api.roles, params)
27 }
28 // 人员列表
29 export const getUserRoles = (id) => {
30 return getAction(`${api.userRoles}/${id}/users`)
31 }
1 import request from '@/utils/request'
2 import SERVER from "./config";
3 const workflow = '/workflow'
4 const log = '/log'
5 const crud = '/crud'
6 export const api = {
7 userInfo: SERVER.MANAGEMENTAPI + '/rest/user-info', // 登录用户信息
8 permissionsUser: SERVER.MANAGEMENTAPI + '/rest/user-permissions', // 用户权限
9 baseDataCategory: SERVER.MANAGEMENTAPI + '/rest/base-data-category', // 数据字典类别
10 baseData: SERVER.MANAGEMENTAPI + '/rest/base-data', // 数据字典
11 districts: SERVER.MANAGEMENTAPI + '/rest/districts', // 行政区划
12 districtsAll: SERVER.MANAGEMENTAPI + '/rest/districts/parent-tree', // 条件查询所有行政区划
13 organizations: SERVER.MANAGEMENTAPI + '/rest/organizations', // 组织机构
14 departments: SERVER.MANAGEMENTAPI + '/rest/departments', // 部门
15 users: SERVER.MANAGEMENTAPI + '/rest/users', // 人员用户
16 roles: SERVER.MANAGEMENTAPI + '/rest/roles', // 角色
17 userRoles: SERVER.MANAGEMENTAPI + '/rest/user-roles', // 角色对应人员关系
18 productCategory: SERVER.MANAGEMENTAPI + '/rest/product-category', // 业务分类
19 resourceCategory: SERVER.MANAGEMENTAPI + '/rest/resource-category', // 资源分类
20 resources: SERVER.MANAGEMENTAPI + '/rest/resources', // 资源详情列表
21 subsystem: SERVER.MANAGEMENTAPI + '/rest/products', // 子系统管理
22 operations: SERVER.MANAGEMENTAPI + '/rest/operations', // 操作
23 menus: SERVER.MANAGEMENTAPI + '/rest/menus', // 菜单
24 organizationPermissions: SERVER.MANAGEMENTAPI + '/rest/organization-permissions', // 机构授权
25 departmentPermissions: SERVER.MANAGEMENTAPI + '/rest/department-permissions', // 部门授权
26 rolePermissions: SERVER.MANAGEMENTAPI + '/rest/role-permissions', // 角色授权
27 peoPermissions: SERVER.MANAGEMENTAPI + '/rest/user-permissions', // 用户授权
28 resourcePermissions: SERVER.MANAGEMENTAPI + '/rest/resource-permissions', // 资源授权查询
29 menuPermissions: SERVER.MANAGEMENTAPI + '/rest/menu-permissions', // 菜单授权查询
30 serviceCategory: SERVER.MANAGEMENTAPI + '/rest/service-category', // 服务分类
31 service: SERVER.MANAGEMENTAPI + '/rest/service', // 服务详情列表
32 databaseServer: workflow + '/rest/database-server', // 数据库服务器
33 materialCategory: workflow + '/rest/material-category', // 材料分类
34 material: workflow + '/rest/material', // 材料
35 function: workflow + '/rest/function', // 功能属性
36 eventCategory: workflow + '/rest/event-category', // 服务事件分类
37 event: workflow + '/rest/event', // 服务事件
38 formCategorys: workflow + '/rest/forms-category', // 表单分类
39 forms: workflow + '/rest/forms', // 表单
40 metadata: workflow + '/rest/metadata', // 元数据
41 dataObjectCategory: workflow + '/rest/data-object-category', // 对象管理类别
42 dataObject: workflow + '/rest/data-object', // 对象管理
43 workflowBusiness: workflow + '/rest/businesses', // 业务流程
44 // workflowModel: workflow+'/rest/workflow/model',//流程模型
45 modelcategorys: workflow + '/rest/model-categories', // 模型分类
46 models: workflow + '/rest/models', // 工作流模型表
47 businessesModels: workflow + '/rest/businesses-models', // 业务流程关系
48 pluginCategory: workflow + '/rest/plugin-category', // 流程插件分类管理
49 plugin: workflow + '/rest/plugins', // 流程插件分类管理
50 groups: workflow + '/rest/groups', // 用户组分类
51 groupUsers: workflow + '/rest/group-users', // 用户组人员
52 saveWorkflowGroupUser: workflow + '/rest/groups/sug', // 工作流设计器增加用户组
53 validate: workflow + '/rest/models/validate', // 流程验证
54 tokens: SERVER.MANAGEMENTAPI + '/rest/tokens', // token
55 session: '/rest/session', // session
56 pwdSetting: SERVER.MANAGEMENTAPI + '/rest/password-setting', //
57 singleSign: '/cas/rest/services', // 单点登录管理
58 attachments: SERVER.MANAGEMENTAPI + '/rest/attachments', // 文件上传服务
59 instances: workflow + '/rest/workflow/instances', // 实例
60 workflowTask: workflow + '/rest/workflow-task', // 任务
61 definitions: workflow + '/rest/workflow/definitions', // 流程实例
62 systemAccessLogs: log + '/rest/system-access-logs', // 系统访问日志
63 errorLogs: log + '/rest/common-log-statistics', // 错误日志
64 appAccess: log + '/rest/system-access-logs/count-app-access', // 系统访问数
65 userAccess: log + '/rest/system-access-logs/count-user-access', // 用户访问数
66 statisticMenus: log + '/rest/system-access-logs/statistic-menus', // 统计菜单访问数
67 statisticUsers: log + '/rest/system-access-logs/statistic-users', // 统计用户访问数
68 abnormal: log + '/rest/abnormal', // 统计平台报警
69 monitorConfig: log + '/rest/monitor-alert-config', // 监控预警配置
70 statisticTimes: log + '/rest/system-access-logs/statistic-times', // 监控预警配置
71 server: log + '/rest/server', // 服务器监控
72 serverStatistics: log + '/rest/server-statistics', // 服务器监控信息统计
73 avgTimes: log + '/rest/services-statistics/avg-times', // 根据时间查响应时间和访问次数
74 statisticDepts: log + '/rest/system-access-logs/statistic-depts', // 访问部门统计
75 crudHead: crud + '/rest/head', // crudhead
76 crudGet: crud + '/rest/get', // crudget
77 crudPost: crud + '/rest/post', // crudPost
78 crudPut: crud + '/rest/put', // crudPut
79 crudDel: crud + '/rest/delete', // crudDel
80 crudMetadata: crud + '/rest/metadata', //crudMetadata
81 crudBusiness : crud + '/rest/business', // crudBusiness
82 crudDatasources : crud + '/rest/datasources', // crudDatasources
83 }
84 // get公共方法
85 export function getAction(url, params = {}) {
86 return request({
87 url,
88 method: 'get',
89 params
90 })
91 }
92 // post公共方法
93 export function postAction(url, data = null) {
94 return request({
95 url,
96 method: 'post',
97 data
98 })
99 }
100 // method= {post | put}
101 export function httpAction(url, data, method) {
102 return request({
103 url,
104 method,
105 data
106 })
107 }
108 // put公共方法
109 export function putAction(url, data = null) {
110 return request({
111 url,
112 method: 'put',
113 data
114 })
115 }
116 // delete
117 export function deleteAction(url, data = null) {
118 return request({
119 url,
120 method: 'delete',
121 data
122 })
123 }
124
125 // 批量删除
126 export function deleteBranch(url, data) {
127 return request({
128 url,
129 method: 'delete',
130 data
131 })
132 }
133
134
135
136
137
138
139
140
1 // 默认生成参数
2 export const getParams = (
3 conditionGroup,
4 orderBys = [{ property: 'sort', direction: 'desc' }]
5 ) => {
6 const params = {}
7 const queryOptions = {
8 conditionGroup,
9 orderBys
10 }
11 params.queryOptions = JSON.stringify(queryOptions)
12 return params
13 }
...@@ -11,77 +11,11 @@ export default { ...@@ -11,77 +11,11 @@ export default {
11 cdata: { 11 cdata: {
12 legendItem: ['接入', '上报', '登簿'], 12 legendItem: ['接入', '上报', '登簿'],
13 color: [ 13 color: [
14 "#5324DA", 14 "#02D9FD",
15 "#E873B2", 15 "#FF7962",
16 "#F4AF6F " 16 "#F5C03D "
17 ], 17 ],
18 echartData: [{ 18 echartData: []
19 name: "2017-11",
20 value1: 1351,
21 value2: 600,
22 value3: 568,
23 },
24 {
25 name: "2017-11",
26 value1: 980,
27 value2: 1245,
28 value3: 1100,
29 },
30 {
31 name: "2017-11",
32 value1: 1127,
33 value2: 398,
34 value3: 568,
35 },
36 {
37 name: "2017-11",
38 value1: 1046,
39 value2: 689,
40 value3: 479
41 },
42 {
43 name: "2018-02",
44 value1: 780,
45 value2: 396,
46 value3: 655
47 },
48 {
49 name: "2018-08",
50 value1: 359,
51 value2: 1220,
52 value3: 540,
53 },
54 {
55 name: "2018-07",
56 value1: 229,
57 value2: 836,
58 value3: 1234,
59 },
60 {
61 name: "2018-09",
62 value1: 1176,
63 value2: 478,
64 value3: 755,
65 },
66 {
67 name: "2018-11",
68 value1: 515,
69 value2: 911,
70 value3: 806,
71 },
72 {
73 name: "2019-01",
74 value1: 658,
75 value2: 979,
76 value3: 813,
77 },
78 {
79 name: "2019-03",
80 value1: 364,
81 value2: 839,
82 value3: 886,
83 },
84 ]
85 } 19 }
86 } 20 }
87 }, 21 },
...@@ -90,18 +24,6 @@ export default { ...@@ -90,18 +24,6 @@ export default {
90 }, 24 },
91 mounted() { 25 mounted() {
92 26
93 window.addEventListener("resize", () => {
94 this.cdata=[],
95 this.cdata= {
96 legendItem: ['接入', '上报', '登簿'],
97 color: [
98 "#5324DA",
99 "#E873B2",
100 "#F4AF6F "
101 ],
102 echartData: []
103 }
104 });
105 window.addEventListener("resize", () => { 27 window.addEventListener("resize", () => {
106 this.dataTrend() 28 this.dataTrend()
107 }); 29 });
...@@ -113,8 +35,7 @@ export default { ...@@ -113,8 +35,7 @@ export default {
113 let { result: res } = await work.dataTrend(); 35 let { result: res } = await work.dataTrend();
114 this.cdata.echartData = []; 36 this.cdata.echartData = [];
115 this.cdata.echartData=res, 37 this.cdata.echartData=res,
116 res.map((item) => { 38 this.cdata.echartData.reverse()
117 });
118 } catch (error) { 39 } catch (error) {
119 console.log(error); 40 console.log(error);
120 } 41 }
......
...@@ -87,8 +87,7 @@ export default { ...@@ -87,8 +87,7 @@ export default {
87 }, 87 },
88 itemStyle: { 88 itemStyle: {
89 normal: { 89 normal: {
90 // 这里设置圆角 90 color: "#5fba7d",
91 color: "#16F4D2",
92 }, 91 },
93 }, 92 },
94 data: newData.barData, 93 data: newData.barData,
...@@ -113,7 +112,7 @@ export default { ...@@ -113,7 +112,7 @@ export default {
113 itemStyle: { 112 itemStyle: {
114 normal: { 113 normal: {
115 // 这里设置圆角 114 // 这里设置圆角
116 color: "#C99E68", 115 color: "#c97168",
117 }, 116 },
118 }, 117 },
119 data: newData.lineData, 118 data: newData.lineData,
......
...@@ -17,7 +17,7 @@ let mixin = { ...@@ -17,7 +17,7 @@ let mixin = {
17 ...mapGetters(['dicData']) 17 ...mapGetters(['dicData'])
18 }, 18 },
19 created () { 19 created () {
20 this.featchData() 20 // this.featchData()
21 }, 21 },
22 methods: { 22 methods: {
23 // 表格索引得问题 23 // 表格索引得问题
......
1 import { Message } from "element-ui"; 1 import { Message } from "element-ui";
2 export function removeTreeListItem (treeList, dictId, idName = 'bsmDict') { 2 export function removeTreeListItem (treeList, dictId, idName = 'bsmDict') {
3 3
4 if (!treeList || !treeList.length) { 4 if (!treeList || !treeList.length) {
5 return 5 return
6 } 6 }
...@@ -141,4 +141,4 @@ export function getFirstDayOfSeason (d) { ...@@ -141,4 +141,4 @@ export function getFirstDayOfSeason (d) {
141 } 141 }
142 date.setDate(1); 142 date.setDate(1);
143 return timeFormat(date); 143 return timeFormat(date);
144 }
...\ No newline at end of file ...\ No newline at end of file
144 }
......
...@@ -19,10 +19,6 @@ class data extends filter { ...@@ -19,10 +19,6 @@ class data extends filter {
19 width: 260, 19 width: 260,
20 label: "链接路径" 20 label: "链接路径"
21 }, 21 },
22 {
23 prop: "icon",
24 label: "图标"
25 }
26 ] 22 ]
27 } 23 }
28 } 24 }
......
...@@ -232,13 +232,6 @@ export default { ...@@ -232,13 +232,6 @@ export default {
232 tableData: { 232 tableData: {
233 columns: [].concat(data.columns()).concat([ 233 columns: [].concat(data.columns()).concat([
234 { 234 {
235 label: "排序",
236 width: 380,
237 render: (h, scope) => {
238 return <div></div>;
239 },
240 },
241 {
242 label: "操作", 235 label: "操作",
243 width: 380, 236 width: 380,
244 render: (h, scope) => { 237 render: (h, scope) => {
......
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
20 @size-change="handleSizeChange" 20 @size-change="handleSizeChange"
21 @p-current-change="handleCurrentChange" 21 @p-current-change="handleCurrentChange"
22 :column="tableData.columns" 22 :column="tableData.columns"
23 :data="tableData.data" 23 :data="listdata"
24 :expand-row-keys="keyList" 24 :expand-row-keys="keyList"
25 row-key="dictid" 25 row-key="id"
26 > 26 >
27 </lb-table> 27 </lb-table>
28 </div> 28 </div>
...@@ -38,8 +38,10 @@ import { ...@@ -38,8 +38,10 @@ import {
38 findParents, 38 findParents,
39 removeTreeListItem, 39 removeTreeListItem,
40 } from "@/utils/operation"; 40 } from "@/utils/operation";
41 import { getRolesById, getUserRoles } from "@/api/Rolemanagement";
41 import data from "./data"; 42 import data from "./data";
42 import sjsbTask from "@/api/sjsbTask.js"; 43 import sjsbTask from "@/api/sjsbTask.js";
44 import { api, getAction } from "@/api/manageApi";
43 import tableMixin from "@/mixins/tableMixin.js"; 45 import tableMixin from "@/mixins/tableMixin.js";
44 import EditDialog from "./edit-dialog.vue"; 46 import EditDialog from "./edit-dialog.vue";
45 import Roleslistdiglog from "./roleslistdiglog.vue"; 47 import Roleslistdiglog from "./roleslistdiglog.vue";
...@@ -52,8 +54,10 @@ export default { ...@@ -52,8 +54,10 @@ export default {
52 }, 54 },
53 data() { 55 data() {
54 return { 56 return {
55 taskData: null, 57 personlist: null,
58 waitMemberList: [],
56 keyList: [], 59 keyList: [],
60 listdata: [],
57 form: { 61 form: {
58 job_name: "", 62 job_name: "",
59 currentPage: 1, 63 currentPage: 1,
...@@ -141,7 +145,7 @@ export default { ...@@ -141,7 +145,7 @@ export default {
141 size="mini" 145 size="mini"
142 icon="el-icon-video-pause" 146 icon="el-icon-video-pause"
143 onClick={() => { 147 onClick={() => {
144 this.personnel(scope.row); 148 this.getUserList(scope.row);
145 }} 149 }}
146 > 150 >
147 人员 151 人员
...@@ -182,9 +186,69 @@ export default { ...@@ -182,9 +186,69 @@ export default {
182 }; 186 };
183 }, 187 },
184 created() { 188 created() {
185 this.featchData(); 189 this.getTableData();
186 }, 190 },
191 mounted() {},
187 methods: { 192 methods: {
193 // 获取角色列表
194 getTableData() {
195 getRolesById()
196 .then((res) => {
197 this.listdata = res.content;
198
199 this.listdata = judgeSort(this.listdata);
200 })
201 .catch((e) => console.error(e));
202 },
203
204 getUserList(row) {
205 const params = {};
206 const queryOptions = {
207 conditionGroup: {
208 conditions: [
209 {
210 property: "organizationId",
211 value: row.organizationId,
212 operator: "EQ",
213 },
214 {
215 property: "departmentId",
216 value: row.departmentId,
217 operator: "EQ",
218 },
219 ],
220 queryRelation: "AND",
221 },
222 orderBys: [{ property: "sort", direction: "desc" }],
223 };
224 params.queryOptions = JSON.stringify(queryOptions);
225 getUserRoles(row.id).then((res) => {
226 if (res.status === 1) {
227 this.personlist = res.content;
228 getAction(api.users, params).then((res) => {
229 if (res.status === 1) {
230 this.waitMemberList = res.content;
231 if (this.personlist) {
232 this.waitMemberList.forEach((item, i) => {
233 this.personlist.forEach((val) => {
234 if (item.id === val.id) {
235 this.waitMemberList[i].selectStatus = 0;
236 }
237 });
238 });
239 }
240
241 this.$refs.rolesForm.adds(this.waitMemberList,row.id);
242 } else {
243 this.$message.error({ message: res.message, showClose: true });
244 }
245 });
246 this.$refs.rolesForm.title = "人员配置";
247 } else this.$message.error({ message: res.message, showClose: true });
248 });
249
250
251 },
188 // 新增角色 252 // 新增角色
189 handleAdd() { 253 handleAdd() {
190 // this.$refs.addEditDialog.roleId = value.id 254 // this.$refs.addEditDialog.roleId = value.id
...@@ -205,76 +269,20 @@ export default { ...@@ -205,76 +269,20 @@ export default {
205 this.$refs.addEditDialog.showAddEditDialog = true; 269 this.$refs.addEditDialog.showAddEditDialog = true;
206 this.$refs.addEditDialog.dialogTitle = "修改"; 270 this.$refs.addEditDialog.dialogTitle = "修改";
207 }, 271 },
208 featchData() {
209 this.tableData.data = [
210 {
211 id: "2176e915-fdb4-414a-b8d6-6cf63171cffc",
212 isTop: true,
213 isBottom: false,
214 dictid: "51b9f487861671f77782c5a23b5fe52esasq",
215 createdAt: "2022-10-31T07:08:29.293+0000",
216 updatedAt: "2022-10-31T07:08:29.293+0000",
217 createdBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
218 updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
219 sort: 29,
220 name: "材料管理员",
221 type: "信息员",
222 category: 2,
223 description: "1二点三s",
224 _X_ROW_KEY: "row_365",
225 },
226 {
227 id: "2176e915-fdb4-414a-b8d6-6cf63171c222ffc",
228 isTop: false,
229 isBottom: false,
230 dictid: "51b9f487861671f77782c5a23b5fe52e11",
231 createdAt: "2022-10-31T07:08:29.293+0000",
232 updatedAt: "2022-10-31T07:08:29.293+0000",
233 createdBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
234 updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
235 sort: 29,
236 name: "人事管理员",
237 type: "管理",
238 category: 2,
239 description: "管qdq",
240 _X_ROW_KEY: "row_365",
241 },
242 {
243 id: "2176e915-fdb4-414a-b8324d6-6cf63171cffc",
244 isTop: false,
245 isBottom: true,
246 dictid: "51b9f487861671f72131ddd7782c5a23b5fe52e12ewsd",
247 createdAt: "2022-10-31T07:08:29.293+0000",
248 updatedAt: "2022-10-31T07:08:29.293+0000",
249 createdBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
250 updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
251 sort: 29,
252 name: "管理员",
253 type: "材料",
254 category: 2,
255 description: "sadq",
256 _X_ROW_KEY: "row_365",
257 },
258 ];
259 },
260 // 上移下移 272 // 上移下移
261 moveUpward(index, row) { 273 moveUpward(index, row) {
262 realMove(row.dictid, "UP", this.tableData.data); 274 realMove(row.id, "UP", this.listdata);
263 this.key++; 275 this.key++;
264 let id = findParents(this.tableData.data, row.dictid); 276 let id = findParents(this.listdata, row.id);
265 this.keyList = id; 277 this.keyList = id;
266 }, 278 },
267 moveDown(index, row) { 279 moveDown(index, row) {
268 realMove(row.dictid, "DOWN", this.tableData.data); 280 realMove(row.id, "DOWN", this.listdata);
269 this.key++; 281 this.key++;
270 let id = findParents(this.tableData.data, row.dictid); 282 let id = findParents(this.listdata, row.id);
271 this.keyList = id; 283 this.keyList = id;
272 }, 284 },
273 // 人员配置弹框 285
274 personnel() {
275 this.$refs.rolesForm.adds();
276 this.$refs.rolesForm.title = "人员配置";
277 },
278 // 删除 286 // 删除
279 handleDel(row) { 287 handleDel(row) {
280 this.$confirm("此操将进行删除操作, 是否继续?", "提示", { 288 this.$confirm("此操将进行删除操作, 是否继续?", "提示", {
...@@ -291,7 +299,7 @@ export default { ...@@ -291,7 +299,7 @@ export default {
291 type: "success", 299 type: "success",
292 message: res.message, 300 message: res.message,
293 }); 301 });
294 this.featchData(); 302 // this.featchData();
295 } 303 }
296 }) 304 })
297 .catch((error) => { 305 .catch((error) => {
...@@ -308,6 +316,7 @@ export default { ...@@ -308,6 +316,7 @@ export default {
308 }); 316 });
309 }); 317 });
310 }, 318 },
319
311 }, 320 },
312 }; 321 };
313 </script> 322 </script>
......
...@@ -30,25 +30,23 @@ import Dialog from "@/components/Dialog/"; ...@@ -30,25 +30,23 @@ import Dialog from "@/components/Dialog/";
30 export default { 30 export default {
31 name: "", 31 name: "",
32 components: { Dialog }, 32 components: { Dialog },
33 props: {},
34 data() { 33 data() {
35 return { 34 return {
36 title: "人员配置", 35 title: "人员配置",
37 visible: false, 36 visible: false,
38
39 hasSelectList: [ 37 hasSelectList: [
40 { 38 // {
41 name: "管理员", 39 // name: "管理员",
42 loginName: "admin1", 40 // loginName: "admin1",
43 departmentName: "研发部", 41 // departmentName: "研发部",
44 jobLevel: null, 42 // jobLevel: null,
45 }, 43 // },
46 { 44 // {
47 name: "测试账号", 45 // name: "测试账号",
48 loginName: "admin2", 46 // loginName: "admin2",
49 departmentName: "研发部", 47 // departmentName: "研发部",
50 jobLevel: null, 48 // jobLevel: null,
51 }, 49 // },
52 ], //已经选择的id组成的数组 50 ], //已经选择的id组成的数组
53 tableData: { 51 tableData: {
54 column: [ 52 column: [
...@@ -72,62 +70,23 @@ export default { ...@@ -72,62 +70,23 @@ export default {
72 label: "职务", 70 label: "职务",
73 }, 71 },
74 ], 72 ],
75 data: [ 73 data: [],
76 { 74 // 角色id
77 id: "3127e455-43ba-45ff-9326-0e02ef89485e", 75 roleId:""
78 createdAt: null,
79 updatedAt: "2022-08-04T03:38:27.626+0000",
80 createdBy: null,
81 updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
82 sort: 1,
83 name: "超级管理员",
84 loginName: "admin",
85 password: "05eb15777e8fd1d61c840472e7267f61d432f63340d86b59",
86 passwordSalt: "5178114777136485",
87 email: null,
88 lastLoginTime: null,
89 mobilePhone: "18291003568",
90 status: "ACTIVE",
91 passwordChangeTime: "2021-12-10T08:01:01.569+0000",
92 idCard: "612725202111021521",
93 departmentId: "2eae5304-544f-4f5b-b354-8f5d47433c9b",
94 organizationId: "0bca67ae-1d9e-4b41-b057-f165586d24aa",
95 sex: "0",
96 isDuty: true,
97 code: "123324",
98 jobLevel: null,
99 telephone: "028-87720898",
100 address: "办公地点修改测试",
101 isLocked: false,
102 departmentName: "研发部",
103 _X_ROW_KEY: "row_276",
104 },
105 {
106 name: "管理员",
107 loginName: "admin1",
108 departmentName: "研发部",
109 jobLevel: null,
110 selectStatus: 0,
111 },
112 {
113 name: "测试账号",
114 loginName: "admin2",
115 departmentName: "研发部",
116 jobLevel: null,
117 selectStatus: 0,
118 },
119 ],
120 }, 76 },
121 multipleSelection: [], 77 multipleSelection: [],
122 }; 78 };
123 }, 79 },
124 computed: {}, 80 computed: {},
125 watch: {}, 81
126 created() {}, 82 created() {},
127 mounted() {}, 83 mounted() {},
128 methods: { 84 methods: {
129 adds() { 85 adds(a,roleId) {
86 this.roleId=roleId
130 this.visible = true; 87 this.visible = true;
88 console.log("a",a);
89 this.tableData.data=a
131 this.tableData.data.forEach((item, index) => { 90 this.tableData.data.forEach((item, index) => {
132 if (item.selectStatus === 0) { 91 if (item.selectStatus === 0) {
133 this.$nextTick(() => { 92 this.$nextTick(() => {
...@@ -142,21 +101,14 @@ export default { ...@@ -142,21 +101,14 @@ export default {
142 close() { 101 close() {
143 this.visible = false; 102 this.visible = false;
144 }, 103 },
145 // 保存事件 104 // 保存
146 handleSaveMember() { 105 handleSaveMember() {
147 // if (this.memberList.length === 0) { 106 let arrlist= this.tableData.data.filter((item) => {
148 // this.$message.warning("请添加待选人员"); 107 return item.selectStatus==0
149 // return false; 108 })
150 // } 109 const idList = arrlist.map((item) => {
151 // const idList = this.memberList.map(item => item.id) 110 return item.id
152 // updateUser(this.roleId, idList).then(res => { 111 })
153 // if (res.status === 1) {
154 // this.$message.success({ message: '保存成功', showClose: true })
155 // this.showMemberConfigDialog = false
156 // this.$emit('setUsers', this.roleId)
157 // this.resetMemberConfig()
158 // } else this.$message.error({ message: res.message, showClose: true })
159 // })
160 }, 112 },
161 handleSelectionChange(val) { 113 handleSelectionChange(val) {
162 this.multipleSelection = val; 114 this.multipleSelection = val;
...@@ -165,12 +117,11 @@ export default { ...@@ -165,12 +117,11 @@ export default {
165 }; 117 };
166 </script> 118 </script>
167 <style scoped lang="scss"> 119 <style scoped lang="scss">
168 /deep/.el-dialog__header{ 120 /deep/.el-dialog__header {
169 text-align: center; 121 text-align: center;
170 margin-bottom: 10px; 122 margin-bottom: 10px;
171 .el-dialog__title{ 123 .el-dialog__title {
172 color: white; 124 color: white;
125 }
173 } 126 }
174 }
175
176 </style> 127 </style>
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
24 @p-current-change="handleCurrentChange" 24 @p-current-change="handleCurrentChange"
25 :column="tableData.columns" 25 :column="tableData.columns"
26 :data="tableData.data" 26 :data="tableData.data"
27 :expand-row-keys="keyList" row-key="dictid" 27 :expand-row-keys="keyList"
28 row-key="dictid"
28 > 29 >
29 </lb-table> 30 </lb-table>
30 </div> 31 </div>
...@@ -214,6 +215,7 @@ export default { ...@@ -214,6 +215,7 @@ export default {
214 this.$refs.dialogForm.title = "添加"; 215 this.$refs.dialogForm.title = "添加";
215 }, 216 },
216 featchData() { 217 featchData() {
218
217 this.tableData.data = [ 219 this.tableData.data = [
218 { 220 {
219 "dictid": "51b9f487861671f77782c5a23b5fe52e", 221 "dictid": "51b9f487861671f77782c5a23b5fe52e",
...@@ -224,8 +226,6 @@ export default { ...@@ -224,8 +226,6 @@ export default {
224 "DNAME": "小红", 226 "DNAME": "小红",
225 "SORT": null, 227 "SORT": null,
226 "index": 1, 228 "index": 1,
227 "isTop": true,
228 "isBottom": false
229 }, 229 },
230 { 230 {
231 "dictid": "2291d9e298274c1ea1f40df63fbcff47", 231 "dictid": "2291d9e298274c1ea1f40df63fbcff47",
...@@ -236,8 +236,6 @@ export default { ...@@ -236,8 +236,6 @@ export default {
236 "DNAME": "小李", 236 "DNAME": "小李",
237 "SORT": null, 237 "SORT": null,
238 "index": 2, 238 "index": 2,
239 "isTop": false,
240 "isBottom": false
241 }, 239 },
242 { 240 {
243 "dictid": "e6a5aeb8957b8029fa31586fb30dd5b8", 241 "dictid": "e6a5aeb8957b8029fa31586fb30dd5b8",
...@@ -248,11 +246,10 @@ export default { ...@@ -248,11 +246,10 @@ export default {
248 "DNAME": "小田", 246 "DNAME": "小田",
249 "SORT": null, 247 "SORT": null,
250 "index": 13, 248 "index": 13,
251 "isTop": false,
252 "isBottom": true
253 } 249 }
254 ]; 250 ]
255 }, 251 this.tableData.data=judgeSort(this.tableData.data)
252 },
256 253
257 // 更新用户解锁状态 254 // 更新用户解锁状态
258 updateLock(id, name) { 255 updateLock(id, name) {
......