sasp-admin 0.2.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +227 -0
- package/package.json +19 -0
- package/router.js +83 -0
- package/src/assets/font/iconfont.css +1346 -0
- package/src/assets/font/iconfont.eot +0 -0
- package/src/assets/font/iconfont.js +1 -0
- package/src/assets/font/iconfont.svg +827 -0
- package/src/assets/font/iconfont.ttf +0 -0
- package/src/assets/font/iconfont.woff +0 -0
- package/src/assets/images/loading-bar.gif +0 -0
- package/src/assets/js/adminInstall.js +36 -0
- package/src/assets/js/api/apiAdmin.js +613 -0
- package/src/assets/js/global/dataGlobal.js +260 -0
- package/src/assets/js/global/logGlobal.js +22 -0
- package/src/assets/js/global/paramGlobal.js +67 -0
- package/src/assets/js/global/resGlobal.js +91 -0
- package/src/assets/js/global/userGlobal.js +283 -0
- package/src/components/complexViewRendering.vue +601 -0
- package/src/components/ifmLink.vue +71 -0
- package/src/components/public/data/plDataCascader.vue +85 -0
- package/src/components/public/data/plDataRadio.vue +73 -0
- package/src/components/public/data/plDataRadioGroup.vue +70 -0
- package/src/components/public/data/plDataSelect.vue +856 -0
- package/src/components/public/data/plDatePicker.vue +159 -0
- package/src/components/public/org/bg.png +0 -0
- package/src/components/public/org/sysOrgPosUserSelect.vue +1237 -0
- package/src/components/public/org/sysOrgPosUserSelectDark.vue +1402 -0
- package/src/components/public/org/sysOrgPosUserSelectNew.vue +1527 -0
- package/src/components/public/upload/images/compress.png +0 -0
- package/src/components/public/upload/images/emipty.png +0 -0
- package/src/components/public/upload/images/excel.png +0 -0
- package/src/components/public/upload/images/file.png +0 -0
- package/src/components/public/upload/images/pdf.png +0 -0
- package/src/components/public/upload/images/powerpoint.png +0 -0
- package/src/components/public/upload/images/project.png +0 -0
- package/src/components/public/upload/images/sound.png +0 -0
- package/src/components/public/upload/images/txt.png +0 -0
- package/src/components/public/upload/images/video.png +0 -0
- package/src/components/public/upload/images/visio.png +0 -0
- package/src/components/public/upload/images/word.png +0 -0
- package/src/components/public/upload/plImage.vue +287 -0
- package/src/components/public/upload/plImgUpload.vue +137 -0
- package/src/components/public/upload/plUpload.vue +1124 -0
- package/src/components/public/upload/uploadImg.js +8 -0
- package/src/main.js +0 -0
- package/src/views/VueMenuView.vue +143 -0
- package/src/views/cloudMenuView.vue +125 -0
- package/src/views/complex/config/complex.vue +501 -0
- package/src/views/complex/config/complexSetting.vue +1250 -0
- package/src/views/complex/rendering/complexShow.vue +16 -0
- package/src/views/data/dataManage.vue +560 -0
- package/src/views/data/sysData.vue +292 -0
- package/src/views/event/eventManager/vueEventDiy.vue +1184 -0
- package/src/views/event/eventManager/vueEventMain.vue +108 -0
- package/src/views/event/eventManager/vueEventSys.vue +296 -0
- package/src/views/event/js/apiEvent.js +22 -0
- package/src/views/fileLog/fileDownloadLog.vue +437 -0
- package/src/views/initData/initData.vue +4316 -0
- package/src/views/log/dblog/logdbDevelop.vue +306 -0
- package/src/views/log/dblog/logdbEnt.vue +331 -0
- package/src/views/log/dblog/logdbGov.vue +395 -0
- package/src/views/log/error/logError.vue +553 -0
- package/src/views/log/loginlog/logManageDevOrSup.vue +357 -0
- package/src/views/log/loginlog/logManageEnt.vue +343 -0
- package/src/views/log/loginlog/logManageGov.vue +328 -0
- package/src/views/log/sms/logSms.vue +308 -0
- package/src/views/menu/component/menuManageComponent.vue +2402 -0
- package/src/views/menu/component/menuModule.vue +449 -0
- package/src/views/menu/menuLocal.vue +223 -0
- package/src/views/menu/menuManage.vue +1135 -0
- package/src/views/menu/tenantMenuManage.vue +1132 -0
- package/src/views/menuRouter/cview/cviewShow.vue +18 -0
- package/src/views/menuRouter/cviewMenuRouter.vue +183 -0
- package/src/views/menuRouter/menuView.vue +132 -0
- package/src/views/menuRouter/urlMenuRouter.vue +160 -0
- package/src/views/org/entOrgTree.vue +1050 -0
- package/src/views/org/ownerMenu/ownerMenuTree.vue +269 -0
- package/src/views/org/safeValidate/safeValidate.vue +469 -0
- package/src/views/org/sysEntOrgUserDetail.vue +3390 -0
- package/src/views/org/sysOrgDimension.vue +832 -0
- package/src/views/org/sysOrgPosUserDetail.vue +1648 -0
- package/src/views/org/sysOrgPosUserTree.vue +1101 -0
- package/src/views/org/sysOrgTree.vue +864 -0
- package/src/views/param/sysParam.vue +987 -0
- package/src/views/preview/pdfViewer.vue +82 -0
- package/src/views/resources/js/resourcesCommon.js +137 -0
- package/src/views/resources/resRouter/resView.vue +161 -0
- package/src/views/resources/resourcesTabs.vue +82 -0
- package/src/views/resources/tabs/comp/pageResPreview.vue +309 -0
- package/src/views/resources/tabs/comp/pageResRegister.vue +1120 -0
- package/src/views/resources/tabs/dataResources.vue +843 -0
- package/src/views/resources/tabs/pageResources.vue +970 -0
- package/src/views/role/allowMenu.vue +148 -0
- package/src/views/role/authRole/authRole.vue +427 -0
- package/src/views/role/authRole/component/allocateSetting.vue +1056 -0
- package/src/views/role/authRole/component/authSetting.vue +1196 -0
- package/src/views/role/commonRole/commonRole.vue +677 -0
- package/src/views/role/commonRole/compoment/allocateRoleMenuSetting.vue +335 -0
- package/src/views/role/commonRole/compoment/authLinkMenuTree.vue +55 -0
- package/src/views/role/commonRole/compoment/authSettingNew.vue +190 -0
- package/src/views/role/commonRole/compoment/commonSetting.vue +1576 -0
- package/src/views/role/commonRole/compoment/commonSettingAdjust.vue +584 -0
- package/src/views/role/commonRole/compoment/commonSettingNew.vue +572 -0
- package/src/views/role/commonRole/compoment/roleMenuPower.vue +226 -0
- package/src/views/role/commonRole/compoment/roleMenuPowerSetting.vue +69 -0
- package/src/views/role/commonRole/compoment/roleMenuSetting.vue +365 -0
- package/src/views/role/commonRole/compoment/roleSourceSetting.vue +229 -0
- package/src/views/role/commonRole/tenantCommonRole.vue +768 -0
- package/src/views/role/role.vue +135 -0
- package/src/views/role/roleMenuOption.vue +898 -0
- package/src/views/role/roleSynchroRemind.vue +399 -0
- package/src/views/role/sysRole.vue +1525 -0
- package/src/views/role/viewMenuOptDetail.vue +182 -0
- package/src/views/sms/sendSms.vue +164 -0
- package/src/views/station/orgStation.vue +561 -0
- package/src/views/tenant/appContentManager.vue +938 -0
- package/src/views/tenant/appManager.vue +642 -0
- package/src/views/tenant/tenantRoleManager.vue +670 -0
- package/src/views/tenant/tenantUserManager.vue +615 -0
- package/src/views/threeinone/compoment/safeCascadeSelect.vue +327 -0
- package/src/views/threeinone/init/safeInitRegion.vue +203 -0
- package/src/views/threeinone/safeManager.vue +927 -0
- package/src/views/threeinone/safeMenuManage.vue +565 -0
- package/src/views/threeinone/safeOrgSpv.vue +364 -0
- package/src/views/threeinone/safeSpv/safeSpvLeftTree.vue +109 -0
- package/src/views/threeinone/safeSpv/safeSpvMain.vue +335 -0
- package/src/views/threeinone/safeSpvEconView.vue +569 -0
- package/src/views/threeinone/safeValidateRegion.vue +328 -0
- package/src/views/urlResource/urlResource.vue +856 -0
- package/src/views/user/empowerUser/empowerEntUserManage.vue +415 -0
- package/src/views/user/empowerUser/empowerOrgTree.vue +167 -0
- package/src/views/user/empowerUser/empowerUserList.vue +633 -0
- package/src/views/user/empowerUser/empowerUserListMenuDeatil.vue +656 -0
- package/src/views/user/empowerUser/empowerUserListViewMenuTree.vue +257 -0
- package/src/views/user/empowerUser/empowerUserManage.vue +99 -0
- package/src/views/user/stationUserManage.vue +934 -0
- package/src/views/user/userManage.vue +737 -0
- package/src/views/user/userMangement.vue +938 -0
- package/src/views/user/viewMenu/viewMenu.vue +113 -0
- package/src/views/versionupdatetool/versionUpdateTool.vue +225 -0
- package/src/views/versionupdatetool/versioninfomation/verisonInfomationManagement.vue +68 -0
|
@@ -0,0 +1,1525 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-container style="height: 100%">
|
|
3
|
+
<el-header style="height: auto;">
|
|
4
|
+
<div class="search-form-parent el-card">
|
|
5
|
+
<el-form :inline="true" :model="crud.searchForm" size="small" class="demo-form-inline"
|
|
6
|
+
@keyup.enter.native="crud.doSearch()" onSubmit="return false;">
|
|
7
|
+
<el-form-item label="角色名">
|
|
8
|
+
<el-input v-model="crud.searchForm.roleName"></el-input>
|
|
9
|
+
</el-form-item>
|
|
10
|
+
<el-form-item label="菜单名">
|
|
11
|
+
<el-input v-model="crud.searchForm.menuName"></el-input>
|
|
12
|
+
</el-form-item>
|
|
13
|
+
<el-form-item label="角色类型" v-if="loginUser.userType == 'dev' || loginUser.userType == 'sup'">
|
|
14
|
+
<el-select v-model="crud.searchForm.roleType">
|
|
15
|
+
<el-option v-for="item in roleTypeOption" :key="item.id" :value="item.id" :label="item.name">
|
|
16
|
+
</el-option>
|
|
17
|
+
</el-select>
|
|
18
|
+
</el-form-item>
|
|
19
|
+
|
|
20
|
+
<el-form-item label="角色状态" prop="roleStatus">
|
|
21
|
+
<el-select v-model="crud.searchForm.roleStatus" placeholder="请选择" clearable>
|
|
22
|
+
<el-option label="正常" value="10"></el-option>
|
|
23
|
+
<el-option label="锁定" value="20"></el-option>
|
|
24
|
+
</el-select>
|
|
25
|
+
</el-form-item>
|
|
26
|
+
|
|
27
|
+
<el-form-item>
|
|
28
|
+
<el-button type="primary" icon="el-icon-search" @click="crud.doSearch()">查询</el-button>
|
|
29
|
+
<el-button icon="el-icon-close" @click="crud.resetSearch()">清空</el-button>
|
|
30
|
+
</el-form-item>
|
|
31
|
+
</el-form>
|
|
32
|
+
</div>
|
|
33
|
+
</el-header>
|
|
34
|
+
|
|
35
|
+
<el-main id="tableMain" style="height: 100%">
|
|
36
|
+
<el-container style="height:100%" class="table-list-container">
|
|
37
|
+
<el-header style="height: auto;" size="medium">
|
|
38
|
+
|
|
39
|
+
<el-button v-if="adminAuth" type="primary" size="small" round icon="el-icon-circle-plus" @click="add()">新增
|
|
40
|
+
</el-button>
|
|
41
|
+
<!-- <el-button v-if="loginUser.userType == 'dev' || loginUser.userType == 'sup'" type="success" size="small" round @click="openGIS()" ><i class="saspiconfont pl-icon-map"></i> GIS权限配置-->
|
|
42
|
+
<!-- </el-button>-->
|
|
43
|
+
<el-button v-if="adminAuth" type="warning" size="small" round @click="toggleLockedUser('20')" ><i class="saspiconfont pl-icon-pwd"></i> 设为锁定
|
|
44
|
+
</el-button>
|
|
45
|
+
<el-button v-if="adminAuth" type="success" size="small" round @click="toggleLockedUser('10')" ><i class="saspiconfont pl-icon-08" style="position: relative;top:-1px"></i> 解锁
|
|
46
|
+
</el-button>
|
|
47
|
+
|
|
48
|
+
<el-button v-if="adminAuth" type="danger" size="small" round icon="el-icon-delete" @click="remove()">删除
|
|
49
|
+
</el-button>
|
|
50
|
+
|
|
51
|
+
<!-- <el-button v-if="adminAuth" type="primary" size="small" round icon="el-icon-download" @click="allocateRole()">下发-->
|
|
52
|
+
<!-- </el-button>-->
|
|
53
|
+
<el-button v-if="isDeveloper && adminAuth" type="primary" size="small" round icon="el-icon-download" @click="authAllocate()">下发
|
|
54
|
+
</el-button>
|
|
55
|
+
|
|
56
|
+
<el-button v-if="!isDeveloper && adminAuth" type="primary" size="small" round icon="el-icon-download" @click="allocateRole()">批量授权
|
|
57
|
+
</el-button>
|
|
58
|
+
|
|
59
|
+
</el-header>
|
|
60
|
+
<el-main style="height: 100%;" ref="tableMain">
|
|
61
|
+
<el-table :data="crud.dataStore.records" :ref="crud.tableRef" stripe border height="100%" header-row-class-name="list-default-row"
|
|
62
|
+
:row-style="rowStyle" :cell-style="cellStyle" style="width: 100%;" >
|
|
63
|
+
<el-table-column type="selection" width="40" align="center"></el-table-column>
|
|
64
|
+
<!--<el-table-column type="index" label="序号" align="center" width="60"></el-table-column>-->
|
|
65
|
+
<el-table-column label="角色编号" prop="roleNumber" width="150" ></el-table-column>
|
|
66
|
+
<el-table-column label="角色名" prop="roleName"></el-table-column>
|
|
67
|
+
<el-table-column label="角色类型" prop="roleType" width="150" :formatter="roleTypeFormatter"></el-table-column>
|
|
68
|
+
<el-table-column label="管理员角色" prop="adminRole" width="150" v-if="loginUser.userType == 'sup'" align="center">
|
|
69
|
+
<template slot-scope="scope">
|
|
70
|
+
<el-tag :type="scope.row.adminRole == '1'?'':'info'">
|
|
71
|
+
{{adminRoleFormatter(scope.row)}}
|
|
72
|
+
</el-tag>
|
|
73
|
+
</template>
|
|
74
|
+
</el-table-column>
|
|
75
|
+
|
|
76
|
+
<!-- <el-table-column label="创建人" prop="roleCreater" width="150" :formatter="createFormatter"></el-table-column>-->
|
|
77
|
+
|
|
78
|
+
<el-table-column label="角色来源" prop="roleCreater" width="150" :formatter="createFormatter" v-if="!isDeveloper" align="center">
|
|
79
|
+
</el-table-column>
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
<el-table-column label="角色状态" prop="roleStatus" width="100" align="center">
|
|
83
|
+
<template slot-scope="scope">
|
|
84
|
+
<el-tag :type="scope.row.roleStatus == '20'?'warning':'success'">
|
|
85
|
+
{{roleStatusObj[(scope.row.roleStatus || "10")]}}
|
|
86
|
+
</el-tag>
|
|
87
|
+
</template>
|
|
88
|
+
</el-table-column>
|
|
89
|
+
|
|
90
|
+
<el-table-column label="操作" align="center" width="300">
|
|
91
|
+
<template slot-scope="scope">
|
|
92
|
+
<div v-if="adminAuth">
|
|
93
|
+
<el-tooltip class="item" effect="dark" content="修改"
|
|
94
|
+
v-if="((loginUser.linkId || loginUser.mainOrgId) == scope.row.roleAttach) || isDeveloper" placement="top-end">
|
|
95
|
+
<el-button type="primary" @click="update(scope.row)" size="small"><i class="el-icon-edit"></i></el-button>
|
|
96
|
+
</el-tooltip>
|
|
97
|
+
<el-tooltip class="item" effect="dark" content="权限设置"
|
|
98
|
+
v-if="((loginUser.linkId || loginUser.mainOrgId) == scope.row.roleAttach) || isDeveloper" placement="top-end">
|
|
99
|
+
<el-button type="primary" @click="roleSetting(scope.row)" size="small"><i class="saspiconfont pl-icon-quanxianshezhi"></i></el-button>
|
|
100
|
+
</el-tooltip>
|
|
101
|
+
<el-tooltip class="item" effect="dark" content="可分配权限设置" placement="top-end" v-if="'1' == scope.row.adminRole && loginUser.id == scope.row.created">
|
|
102
|
+
<el-button type="primary" @click="setAllocateMenu(scope.row)"
|
|
103
|
+
size="small" icon="el-icon-document"></el-button>
|
|
104
|
+
</el-tooltip>
|
|
105
|
+
<el-tooltip class="item" effect="dark" content="人员设置" placement="top-end">
|
|
106
|
+
<el-button type="primary" @click="roleUserSetting(scope.row)" size="small" icon="el-icon-setting"></el-button>
|
|
107
|
+
</el-tooltip>
|
|
108
|
+
|
|
109
|
+
<el-tooltip class="item" effect="dark" v-if="isDeveloper" content="下发管理员设置" placement="top-end">
|
|
110
|
+
<el-button type="primary" @click="authAllocateSetting(scope.row)" size="small" icon="el-icon-download"></el-button>
|
|
111
|
+
</el-tooltip>
|
|
112
|
+
|
|
113
|
+
<el-tooltip class="item" effect="dark" content="查看已有菜单" placement="top-end"
|
|
114
|
+
v-if="!isDeveloper">
|
|
115
|
+
<el-button type="primary" @click="viewRemark(scope.row)" size="small" icon="el-icon-zoom-in"></el-button>
|
|
116
|
+
</el-tooltip>
|
|
117
|
+
</div>
|
|
118
|
+
<div v-else>
|
|
119
|
+
<el-tooltip class="item" effect="dark" content="查看已有菜单" placement="top-end">
|
|
120
|
+
<el-button type="primary" @click="viewRemark(scope.row)" size="small" icon="el-icon-zoom-in"></el-button>
|
|
121
|
+
</el-tooltip>
|
|
122
|
+
</div>
|
|
123
|
+
</template>
|
|
124
|
+
</el-table-column>
|
|
125
|
+
</el-table>
|
|
126
|
+
</el-main>
|
|
127
|
+
</el-container>
|
|
128
|
+
</el-main>
|
|
129
|
+
<el-footer>
|
|
130
|
+
<el-pagination
|
|
131
|
+
:ref="crud.pageRef"
|
|
132
|
+
:page-sizes="crud.pageSizes"
|
|
133
|
+
:page-size="crud.pageSize"
|
|
134
|
+
:current-page="crud.page"
|
|
135
|
+
:total="crud.dataStore.total"
|
|
136
|
+
@size-change="crud.sizeChange()"
|
|
137
|
+
@current-change="crud.currentPage()"
|
|
138
|
+
layout="total, sizes, prev, pager, next, jumper">
|
|
139
|
+
</el-pagination>
|
|
140
|
+
</el-footer>
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
<el-dialog :close-on-click-modal=false title="角色权限" width="60%" top="20vh" :visible.sync="crud.dialogVisible">
|
|
145
|
+
<el-form :model="crud.formData" :ref="crud.addFormRef">
|
|
146
|
+
<el-row>
|
|
147
|
+
<el-col :span="12">
|
|
148
|
+
<el-form-item label="角色编号" label-width="150px" prop="roleNumber" :rules="plValidate('number','required')">
|
|
149
|
+
<el-input v-model="crud.formData.roleNumber"></el-input>
|
|
150
|
+
</el-form-item>
|
|
151
|
+
</el-col>
|
|
152
|
+
<el-col :span="12">
|
|
153
|
+
<el-form-item label="角色名" label-width="150px" prop="roleName" :rules="rules.roleName">
|
|
154
|
+
<el-input v-model="crud.formData.roleName"></el-input>
|
|
155
|
+
</el-form-item>
|
|
156
|
+
</el-col>
|
|
157
|
+
</el-row>
|
|
158
|
+
<el-row v-if="loginUser.userType == 'dev' || loginUser.userType == 'sup' || loginUser.userType == 'empower' ">
|
|
159
|
+
<el-col :span="12">
|
|
160
|
+
<el-form-item label="角色类型" label-width="150px" prop="roleType" :rules="plValidate('required')">
|
|
161
|
+
<el-select v-model="crud.formData.roleType" style="width: 100%">
|
|
162
|
+
<el-option v-for="item in roleTypeOption" :key="item.id" :value="item.id" :label="item.name">
|
|
163
|
+
</el-option>
|
|
164
|
+
</el-select>
|
|
165
|
+
</el-form-item>
|
|
166
|
+
</el-col>
|
|
167
|
+
<el-col :span="12">
|
|
168
|
+
<el-form-item label="角色状态" label-width="150px" prop="roleStatus" :rules="plValidate('required')">
|
|
169
|
+
<el-radio-group v-model="crud.formData.roleStatus" size="medium">
|
|
170
|
+
<el-radio-button label="10">正常</el-radio-button>
|
|
171
|
+
<el-radio-button label="20">锁定</el-radio-button>
|
|
172
|
+
</el-radio-group>
|
|
173
|
+
</el-form-item>
|
|
174
|
+
</el-col>
|
|
175
|
+
</el-row>
|
|
176
|
+
<el-row v-if="loginUser.userType == 'dev' || loginUser.userType == 'sup'">
|
|
177
|
+
<el-col :span="12">
|
|
178
|
+
<el-form-item label="管理员角色" label-width="150px" prop="adminRole" :rules="plValidate('required')">
|
|
179
|
+
<el-radio-group v-model="crud.formData.adminRole" size="medium" @change="changeAdminRole" :disabled="crud.optCode != 'add'">
|
|
180
|
+
<el-radio-button label="1">是</el-radio-button>
|
|
181
|
+
<el-radio-button label="0">否</el-radio-button>
|
|
182
|
+
</el-radio-group>
|
|
183
|
+
</el-form-item>
|
|
184
|
+
</el-col>
|
|
185
|
+
</el-row>
|
|
186
|
+
</el-form>
|
|
187
|
+
<div slot="footer" class="dialog-footer">
|
|
188
|
+
<el-button type="primary" @click="formSubmit()" size="small" icon="el-icon-success">确 定</el-button>
|
|
189
|
+
<el-button @click="crud.dialogVisible = false" size="small" icon="el-icon-error">取 消</el-button>
|
|
190
|
+
</div>
|
|
191
|
+
</el-dialog>
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
<!--普通角色权限配置-->
|
|
197
|
+
|
|
198
|
+
<el-dialog :close-on-click-modal=false title="权限设置" width="80%" height="90%" top="5vh" :visible.sync="roleSettingDialog" class="role-setting-class">
|
|
199
|
+
<common-setting-adjust ref="commonsettingRef"
|
|
200
|
+
v-if="roleSettingDialog" :isAdminRole="currentRowObj.adminRole == '1'"
|
|
201
|
+
:role-id="currentRowObj.id" :roleType="currentRoleType">
|
|
202
|
+
</common-setting-adjust>
|
|
203
|
+
|
|
204
|
+
<!--<common-setting ref="authRef"
|
|
205
|
+
:currentRowObj="currentRowObj"
|
|
206
|
+
:roleSettingDialog="roleSettingDialog"
|
|
207
|
+
:roleType="currentRoleType"
|
|
208
|
+
:uuIdkey="uuIdKey"
|
|
209
|
+
@closeSettingDialog="closeSettingDialog()">
|
|
210
|
+
</common-setting>-->
|
|
211
|
+
<div slot="footer" class="dialog-footer">
|
|
212
|
+
<el-button type="primary" @click="saveSetting()" :disabled="saveBtnDisabled" size="small" icon="el-icon-success">保 存</el-button>
|
|
213
|
+
<el-button @click="roleSettingDialog = false" size="small" icon="el-icon-error">取 消</el-button>
|
|
214
|
+
</div>
|
|
215
|
+
</el-dialog>
|
|
216
|
+
|
|
217
|
+
<!-- <el-dialog :close-on-click-modal=false title="gis权限设置" width="80%" height="80%" top="5vh" :visible.sync="gisDialogVisible" class="gis-dialog">-->
|
|
218
|
+
<!-- <gis-role-list :gis-uuid="uuIdKey"></gis-role-list>-->
|
|
219
|
+
<!-- </el-dialog>-->
|
|
220
|
+
|
|
221
|
+
<!--查看当前菜单-->
|
|
222
|
+
<el-dialog :close-on-click-modal=false title="查看当前角色菜单" width="400px" height="80%" top="10vh" :visible.sync="viewMenuDialog" class="view-menu-dialog">
|
|
223
|
+
<view-menu-opt-detail :role-id="viewMenuRoleId" v-if="viewMenuDialog"></view-menu-opt-detail>
|
|
224
|
+
<div slot="footer" class="dialog-footer">
|
|
225
|
+
<el-button type="primary" @click="viewMenuDialog = false" saize="small" icon="el-icon-error">关闭</el-button>
|
|
226
|
+
</div>
|
|
227
|
+
</el-dialog>
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
<el-dialog :close-on-click-modal=false title="可分配权限设置" width="80%" height="90%" top="5vh" :visible.sync="allocateSettingDialog" class="allocate-setting-class">
|
|
231
|
+
<allocate-setting ref="allocateRef" :currentRowObj="currentRowObj" :roleSettingDialog="allocateSettingDialog"
|
|
232
|
+
v-if="allocateSettingDialog"
|
|
233
|
+
@closeSettingDialog="closeAllocateSettingDialog">
|
|
234
|
+
</allocate-setting>
|
|
235
|
+
<div slot="footer" class="dialog-footer">
|
|
236
|
+
<el-button type="primary" @click="saveAllocateSetting()" size="small" icon="el-icon-success">保 存</el-button>
|
|
237
|
+
<el-button @click="allocateSettingDialog = false" size="small" icon="el-icon-error">取 消</el-button>
|
|
238
|
+
</div>
|
|
239
|
+
</el-dialog>
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
<el-dialog :close-on-click-modal=false :title="issuedTitle" width="80%" height="80%" top="10vh" :visible.sync="issuedVisible">
|
|
243
|
+
<sys-org-pos-user-select-new
|
|
244
|
+
v-if="issuedVisible"
|
|
245
|
+
ref="commonUserRef" :isAdminRole="currentRowObj.adminRole == '1'"
|
|
246
|
+
:choose-param="userChooseParam"
|
|
247
|
+
:choose-url="api.roleUser.find"
|
|
248
|
+
choose-field="userAttach"
|
|
249
|
+
choose-field-cascade-data="cascadeData"
|
|
250
|
+
:filterUserParam="{'commonUserType':'common' }"
|
|
251
|
+
:expRoleId="roleIdArr.join(',')"
|
|
252
|
+
:org-tree-ids="orgTreeIds"
|
|
253
|
+
:org-dims="orgDims"
|
|
254
|
+
:open-low-level-checkbox="true"
|
|
255
|
+
:pos-enable="!(currentRowObj.adminRole == '1' && isDeveloper)"
|
|
256
|
+
:ogn-enable="!(currentRowObj.adminRole == '1' && isDeveloper)">
|
|
257
|
+
</sys-org-pos-user-select-new>
|
|
258
|
+
|
|
259
|
+
<div slot="footer" class="dialog-footer">
|
|
260
|
+
<el-button type="primary" @click="saveIssued(issuedPosition)" size="small" icon="el-icon-success">保 存</el-button>
|
|
261
|
+
<el-button @click="issuedVisible = false" size="small" icon="el-icon-error">取 消</el-button>
|
|
262
|
+
</div>
|
|
263
|
+
</el-dialog>
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
<el-dialog :close-on-click-modal=false title="下发管理员设置" width="80%" height="80%" top="10vh" :visible.sync="allocateVisible">
|
|
267
|
+
<sys-org-pos-user-select-new
|
|
268
|
+
v-if="allocateVisible"
|
|
269
|
+
ref="authAllocateRef"
|
|
270
|
+
:default-choose-ids="authAllocateIds"
|
|
271
|
+
choose-field="userAttach"
|
|
272
|
+
:filterUserParam="{'commonUserType':'common' }"
|
|
273
|
+
:org-tree-ids="orgTreeIds"
|
|
274
|
+
:org-dims="orgDims"
|
|
275
|
+
isAuthAllocate
|
|
276
|
+
:pos-enable="false"
|
|
277
|
+
:ogn-enable="false">
|
|
278
|
+
</sys-org-pos-user-select-new>
|
|
279
|
+
|
|
280
|
+
<div slot="footer" class="dialog-footer">
|
|
281
|
+
<el-button type="primary" @click="saveAuthAllocate()" size="small" icon="el-icon-success">保 存</el-button>
|
|
282
|
+
<el-button @click="allocateVisible = false" size="small" icon="el-icon-error">取 消</el-button>
|
|
283
|
+
</div>
|
|
284
|
+
</el-dialog>
|
|
285
|
+
</el-container>
|
|
286
|
+
</template>
|
|
287
|
+
|
|
288
|
+
<script>
|
|
289
|
+
import ViewMenuOptDetail from "./viewMenuOptDetail"; //关联菜单
|
|
290
|
+
import commonSettingAdjust from "./commonRole/compoment/commonSettingAdjust";
|
|
291
|
+
import AllocateSetting from "./authRole/component/allocateSetting";
|
|
292
|
+
import SysOrgPosUserSelectNew from "../../components/public/org/sysOrgPosUserSelectNew";
|
|
293
|
+
|
|
294
|
+
export default {
|
|
295
|
+
name: "sys-role",
|
|
296
|
+
components: {SysOrgPosUserSelectNew, AllocateSetting, commonSettingAdjust,ViewMenuOptDetail},
|
|
297
|
+
data(){
|
|
298
|
+
//表单视图名称唯一性验证
|
|
299
|
+
let roleNameValidate =(rule,value,callback) => {
|
|
300
|
+
if(!value){
|
|
301
|
+
callback();
|
|
302
|
+
}
|
|
303
|
+
this.axios.post(this.api.role.find,{noEqRoleType:'empower',roleNameEq:value,created:this.loginUser.id}).then(res =>{
|
|
304
|
+
if((res.data ||[]).length == 0 || (this.operate == 'update' && this.oldRoleName == value)){
|
|
305
|
+
callback();
|
|
306
|
+
}else{
|
|
307
|
+
return callback(new Error('该角色名称已经存在!'));
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
};
|
|
311
|
+
return{
|
|
312
|
+
crud:new this.CrudUtil({
|
|
313
|
+
vue: this,
|
|
314
|
+
entityName: "role",
|
|
315
|
+
url: this.api.role.url,
|
|
316
|
+
searchUrl:this.api.role.findPage,
|
|
317
|
+
noClearSearchColumns:["created","searchOrg","noEqRoleType","order","allocateAdminRoles","roleAttach","userIdsSearch","entOrgIdsLike"],
|
|
318
|
+
initNoSearch:true,
|
|
319
|
+
searchForm:{"order":"ROLE_NUMBER ASC"},
|
|
320
|
+
beforeSubmit:this.addGovType,
|
|
321
|
+
}),
|
|
322
|
+
loginUser:{}, // 当前登录用户信息
|
|
323
|
+
rowStyle:{'height':'40px'},
|
|
324
|
+
cellStyle:{"height":"30px"},
|
|
325
|
+
roleType:{}, // 角色id对应类型
|
|
326
|
+
roleTypeOption:[], // 角色id对应类型数组
|
|
327
|
+
gisDialogVisible:false,
|
|
328
|
+
roleMenuDialogVisible:false,
|
|
329
|
+
nocdss:"", // 可分配菜单数据过滤条件
|
|
330
|
+
currentRoleId:"", // 当前角色id
|
|
331
|
+
currentRoleType:"", // 当前角色type
|
|
332
|
+
userMap:{}, // 已选择信息的map
|
|
333
|
+
uuIdKey:'', //唯一标志 UUID
|
|
334
|
+
menuUUid:'', //权限设置页面中的 uuid
|
|
335
|
+
viewMenuDialog:false,//拥有的菜单
|
|
336
|
+
roleSettingDialog:false, // 关联权限设置对话框
|
|
337
|
+
viewMenuRoleId:"", //菜单的角色ID
|
|
338
|
+
roleStatusColor: {
|
|
339
|
+
'10' : "success",
|
|
340
|
+
'20' : "warning",
|
|
341
|
+
},
|
|
342
|
+
roleStatusObj:{
|
|
343
|
+
'10':"正常",
|
|
344
|
+
'20':"锁定"
|
|
345
|
+
},
|
|
346
|
+
currentRowObj:{} ,
|
|
347
|
+
allocateSettingDialog:false,
|
|
348
|
+
tabsChange:Object,
|
|
349
|
+
roleTypeTemp:[], //定义全局变量
|
|
350
|
+
roleTypeOptionTemp:[],
|
|
351
|
+
roleTypeUpdate:"", //每次修改时候的角色类型
|
|
352
|
+
saveBtnDisabled:false, // 保存按钮禁用
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
//唯一标识验证
|
|
356
|
+
rules:{
|
|
357
|
+
//表单视图唯一性
|
|
358
|
+
roleName:[
|
|
359
|
+
{required: true, message: '该输入项为必输项'},
|
|
360
|
+
{validator:roleNameValidate,trigger:'blur'}
|
|
361
|
+
],
|
|
362
|
+
},
|
|
363
|
+
operate:'add', //操作
|
|
364
|
+
oldRoleName:'',
|
|
365
|
+
issuedVisible:false, //下发人员
|
|
366
|
+
allocateVisible:false,
|
|
367
|
+
authAllocateIds:"",
|
|
368
|
+
selectionAuthRoleIds:"",
|
|
369
|
+
isAppend:"0",
|
|
370
|
+
|
|
371
|
+
orgDims:'', //选中维度
|
|
372
|
+
orgTreeIds:'', //选中的组织
|
|
373
|
+
roleIdArr:[],//选中的角色
|
|
374
|
+
checkRoleIds:'', //默认选中
|
|
375
|
+
ognEnable:false, //是否开启组织
|
|
376
|
+
posEnable:false, //是否开启岗位
|
|
377
|
+
issuedTitle:"",//
|
|
378
|
+
issuedPosition:"head", //头部下发
|
|
379
|
+
parentRoleTree:"-1", // 管理员角色上级角色树
|
|
380
|
+
adminAuth:false, // 是否有管理员权限或开发者权限
|
|
381
|
+
isDeveloper:false, // 是否是开发者权限
|
|
382
|
+
userChooseParam:{'roleIds':this.checkRoleIds},
|
|
383
|
+
roleIds:""
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
watch:{
|
|
387
|
+
//监听
|
|
388
|
+
roleTypeTemp(){
|
|
389
|
+
let vm = this;
|
|
390
|
+
vm.roleTypeTemp.forEach(function (roleType1) {
|
|
391
|
+
vm.roleTypeOptionTemp.forEach(function (roleType2) {
|
|
392
|
+
//遍历 roleTypeTemp
|
|
393
|
+
if(roleType2 == roleType1){
|
|
394
|
+
vm.roleTypeOption.push({"id":roleType2,"name":vm.roleType[roleType2]}); //保存当前的 roleType
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
created(){
|
|
401
|
+
this.RES_GLOBAL.getAllRoleId(this.initMethod);
|
|
402
|
+
},
|
|
403
|
+
|
|
404
|
+
methods:{
|
|
405
|
+
initMethod(roleIds){
|
|
406
|
+
this.roleIds = roleIds;
|
|
407
|
+
let vm = this;
|
|
408
|
+
vm.axios.post(vm.api.param.getSysParams,{"key":"userDimension"}).then(function (res) {
|
|
409
|
+
vm.roleType = JSON.parse(vm.platStringUtil.replaceAll(res.data,"'","\"") || "{}");
|
|
410
|
+
Object.keys(vm.roleType).forEach(function (key) {
|
|
411
|
+
vm.roleTypeOptionTemp.push(key);
|
|
412
|
+
});
|
|
413
|
+
//解决异步问题 从回调中拿roleType
|
|
414
|
+
vm.loginUser = vm.USER_GLOBAL.getLoginUser();
|
|
415
|
+
if(vm.loginUser.userType == 'sup' || vm.loginUser.userType == 'dev'){
|
|
416
|
+
vm.adminAuth = true;
|
|
417
|
+
vm.isDeveloper = true;
|
|
418
|
+
vm.$nextTick(function () {
|
|
419
|
+
//如果是开发者则可以获取所有的类型
|
|
420
|
+
Object.keys(vm.roleType).forEach(function (key) {
|
|
421
|
+
vm.roleTypeOption.push({"id":key,"name":vm.roleType[key]});
|
|
422
|
+
});
|
|
423
|
+
vm.crud.searchForm["created"] = vm.loginUser.id;
|
|
424
|
+
vm.crud.searchForm["noEqRoleType"] = 'empower';
|
|
425
|
+
vm.crud.search();
|
|
426
|
+
});
|
|
427
|
+
}else{
|
|
428
|
+
if(vm.loginUser.commonEmpowerId){
|
|
429
|
+
vm.adminAuth = true;
|
|
430
|
+
}
|
|
431
|
+
vm.axios.post(vm.api.sysOrgPosUser.findNoPage,{"userId":vm.loginUser.id}).then(function (resPosUser) {
|
|
432
|
+
if(resPosUser.data){
|
|
433
|
+
resPosUser.data.forEach(function (posUser) {
|
|
434
|
+
let orgDim = posUser.orgDim;
|
|
435
|
+
//查询 sysOrgDimensionController listNopage
|
|
436
|
+
vm.axios.post(vm.api.sysOrgDimension.find,{"id":orgDim}).then(function (resOrgDim) {
|
|
437
|
+
if(resOrgDim.data){
|
|
438
|
+
resOrgDim.data.forEach(function (each) {
|
|
439
|
+
vm.roleTypeTemp.push(each.id);
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
});
|
|
446
|
+
//获取该用户组织创建的角色信息
|
|
447
|
+
// vm.crud.searchForm["created"] = vm.loginUser.id;
|
|
448
|
+
vm.crud.searchForm["noEqRoleType"] = 'empower';
|
|
449
|
+
let roleAttach = vm.loginUser.linkId || vm.loginUser.mainOrgId;
|
|
450
|
+
vm.crud.searchForm["roleAttach"] = roleAttach;
|
|
451
|
+
// if(vm.loginUser.commonEmpowerId){
|
|
452
|
+
// vm.crud.searchForm["allocateAdminRoles"] = roleIds;
|
|
453
|
+
// }
|
|
454
|
+
|
|
455
|
+
vm.crud.searchForm["entOrgIdsLike"] = vm.loginUser.mainOrgId;
|
|
456
|
+
vm.crud.search();
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
});
|
|
460
|
+
},
|
|
461
|
+
|
|
462
|
+
createFormatter(row){ // 格式化列数据
|
|
463
|
+
if((row["created"] == this.loginUser.id) || row["roleAttach"] == (this.loginUser.linkId || this.loginUser.mainOrgId)){
|
|
464
|
+
return row.roleCreater || "自定义";
|
|
465
|
+
}
|
|
466
|
+
return "系统下发";
|
|
467
|
+
// return row["roleCreater"] || row["createName"];
|
|
468
|
+
},
|
|
469
|
+
roleTypeFormatter(row){
|
|
470
|
+
let vm = this;
|
|
471
|
+
return vm.roleType[row["roleType"]] || row["roleType"];
|
|
472
|
+
},
|
|
473
|
+
adminRoleFormatter(row){
|
|
474
|
+
let adminRole = row.adminRole || "0";
|
|
475
|
+
let obj = {
|
|
476
|
+
"1":"是",
|
|
477
|
+
"0":"否"
|
|
478
|
+
}
|
|
479
|
+
return obj[adminRole];
|
|
480
|
+
},
|
|
481
|
+
|
|
482
|
+
//普通角色配置
|
|
483
|
+
roleSetting(row){
|
|
484
|
+
let vm = this;
|
|
485
|
+
//每次打开时候。生成UUId,作为重置页面凭证
|
|
486
|
+
if(row.roleStatus == "20"){
|
|
487
|
+
vm.$message({
|
|
488
|
+
duration:1200,
|
|
489
|
+
message:"该角色已被锁定,请解除锁定后继续操作!"
|
|
490
|
+
});
|
|
491
|
+
return;
|
|
492
|
+
}
|
|
493
|
+
vm.uuIdKey = this.COMMON_FUNC.getUUID();
|
|
494
|
+
vm.currentRowObj = row;
|
|
495
|
+
vm.currentRoleType = row.roleType;
|
|
496
|
+
vm.saveBtnDisabled = false;
|
|
497
|
+
vm.roleSettingDialog = true;
|
|
498
|
+
},
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* 设置可分配菜单
|
|
502
|
+
*/
|
|
503
|
+
setAllocateMenu(row){
|
|
504
|
+
this.currentRowObj = row;
|
|
505
|
+
this.allocateSettingDialog = true;
|
|
506
|
+
},
|
|
507
|
+
|
|
508
|
+
//查看已有菜单
|
|
509
|
+
viewRemark(row){
|
|
510
|
+
let vm = this;
|
|
511
|
+
if(row.roleStatus == "20"){
|
|
512
|
+
vm.$message({
|
|
513
|
+
duration:1200,
|
|
514
|
+
message:"该角色已被锁定,请解除锁定后继续操作!"
|
|
515
|
+
});
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
this.viewMenuRoleId = row.id;
|
|
519
|
+
this.viewMenuDialog = true;
|
|
520
|
+
},
|
|
521
|
+
|
|
522
|
+
//当关闭权限配置弹窗时重新触发查询方法
|
|
523
|
+
closeSettingDialog(){
|
|
524
|
+
this.saveBtnDisabled = false;
|
|
525
|
+
this.roleSettingDialog = false;
|
|
526
|
+
this.crud.search();
|
|
527
|
+
},
|
|
528
|
+
//保存关联菜单以及关联人员
|
|
529
|
+
saveSetting(){
|
|
530
|
+
this.saveBtnDisabled = true;
|
|
531
|
+
this.$refs.commonsettingRef.saveData();
|
|
532
|
+
this.roleSettingDialog = false;
|
|
533
|
+
this.saveBtnDisabled = false;
|
|
534
|
+
},
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
addGovType(){ // 添加,修改时,如果是gov用户,设置默认角色类型
|
|
538
|
+
let vm = this;
|
|
539
|
+
if(vm.loginUser.userType == 'gov'){
|
|
540
|
+
vm.crud.formData["roleType"] = "01dadc68a1924d21b22f0fcbc64a7e94";
|
|
541
|
+
}
|
|
542
|
+
return true;
|
|
543
|
+
},
|
|
544
|
+
|
|
545
|
+
handleClickDialog(tab, event) {
|
|
546
|
+
let vm = this;
|
|
547
|
+
vm.tabsChange = tab;
|
|
548
|
+
},
|
|
549
|
+
|
|
550
|
+
//设置角色锁定状态
|
|
551
|
+
toggleLockedUser(status){
|
|
552
|
+
let vm = this;
|
|
553
|
+
let selection = vm.$refs[vm.crud.setting.tableRef].selection;
|
|
554
|
+
if((selection || []).length == 0){
|
|
555
|
+
vm.$message({
|
|
556
|
+
message:"请选择要操作的角色!",
|
|
557
|
+
duration:1500
|
|
558
|
+
});
|
|
559
|
+
return;
|
|
560
|
+
}
|
|
561
|
+
let message = '锁定';
|
|
562
|
+
if(status == '10'){
|
|
563
|
+
message = '正常';
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
if(vm.loginUser.userType != 'sup' && vm.loginUser.userType != 'dev'){
|
|
567
|
+
let flag = false;
|
|
568
|
+
selection.forEach(function (data) {
|
|
569
|
+
if(data.adminRole == '1' || data["roleAttach"] != (vm.loginUser.linkId || vm.loginUser.mainOrgId)){
|
|
570
|
+
flag = true;
|
|
571
|
+
}
|
|
572
|
+
});
|
|
573
|
+
if(flag){
|
|
574
|
+
this.$message.error("系统下发角色无法操作!");
|
|
575
|
+
return;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
let tips = "";
|
|
580
|
+
if(status == '10'){
|
|
581
|
+
//锁定状态
|
|
582
|
+
tips = '是否要将选中的角色设置为正常?';
|
|
583
|
+
}else{
|
|
584
|
+
//正常状态
|
|
585
|
+
tips = '角色锁定时,该角色所有权限都将锁定,无法使用,确认锁定吗?';
|
|
586
|
+
}
|
|
587
|
+
vm.$confirm(tips, '提示', {
|
|
588
|
+
confirmButtonText: '确定',
|
|
589
|
+
cancelButtonText: '取消',
|
|
590
|
+
dangerouslyUseHTMLString: true
|
|
591
|
+
}).then(function () {
|
|
592
|
+
let arrIds = [];
|
|
593
|
+
selection.forEach(function (data) {
|
|
594
|
+
arrIds.push(data.id);
|
|
595
|
+
});
|
|
596
|
+
vm.crud.axios.post(vm.api.role.settingLockedRole, {"ids": arrIds.join(","),"roleStatus":status}).then(function (response) {
|
|
597
|
+
let obj = {"10":"解锁","20":"锁定"};
|
|
598
|
+
let remindMessage = obj[status] + (response.data.operateSuccess ? "成功" : "失败");
|
|
599
|
+
vm.$message({
|
|
600
|
+
type: 'success',
|
|
601
|
+
message: remindMessage
|
|
602
|
+
});
|
|
603
|
+
vm.crud.search();
|
|
604
|
+
});
|
|
605
|
+
});
|
|
606
|
+
},
|
|
607
|
+
//新增角色1
|
|
608
|
+
add(){
|
|
609
|
+
let vm = this;
|
|
610
|
+
vm.operate = "add";
|
|
611
|
+
if(vm.loginUser.userType == "sup" || vm.loginUser.userType == "dev"){ // 用户是开发者,
|
|
612
|
+
this.parentRoleTree = "-1";
|
|
613
|
+
vm.$nextTick(function () {
|
|
614
|
+
vm.$set(vm.crud.formData,"roleType",vm.roleTypeOption[0].id); //设置默认选中值
|
|
615
|
+
vm.$set(vm.crud.formData,"roleStatus","10"); //设置默认选中值
|
|
616
|
+
vm.$set(vm.crud.formData,"adminRole","0"); //设置默认选中值
|
|
617
|
+
vm.$set(vm.crud.formData,"parentRoleTree",'-1'); //设置默认选中值
|
|
618
|
+
});
|
|
619
|
+
vm.crud.add();
|
|
620
|
+
}else{
|
|
621
|
+
this.axios.post(this.api.sysUser.getById,{id:vm.loginUser.id}).then(userRes => {
|
|
622
|
+
let commonEmpowerId = userRes.data.commonEmpowerId;
|
|
623
|
+
if(commonEmpowerId){ // 管理员用户
|
|
624
|
+
vm.axios.post(vm.api.role.getById,{"id":commonEmpowerId}).then(res => {
|
|
625
|
+
let data = res.data;
|
|
626
|
+
vm.parentRoleTree = data.parentRoleTree + "," + data.id;
|
|
627
|
+
vm.$nextTick(function () {
|
|
628
|
+
vm.$set(vm.crud.formData,"roleAttach",vm.loginUser.linkId || vm.loginUser.mainOrgId);
|
|
629
|
+
vm.$set(vm.crud.formData,"roleType",vm.roleTypeOption[0].id); //设置默认选中值
|
|
630
|
+
vm.$set(vm.crud.formData,"roleStatus","10"); //设置默认选中值
|
|
631
|
+
vm.$set(vm.crud.formData,"adminRole","0"); //设置默认选中值
|
|
632
|
+
vm.$set(vm.crud.formData,"parentRoleTree",vm.parentRoleTree); //设置默认选中值
|
|
633
|
+
});
|
|
634
|
+
vm.crud.add();
|
|
635
|
+
})
|
|
636
|
+
}else{
|
|
637
|
+
vm.$nextTick(function () {
|
|
638
|
+
vm.$set(vm.crud.formData,"roleType",vm.roleTypeOption[0].id); //设置默认选中值
|
|
639
|
+
vm.$set(vm.crud.formData,"roleStatus","10"); //设置默认选中值
|
|
640
|
+
vm.$set(vm.crud.formData,"adminRole","0"); //设置默认选中值
|
|
641
|
+
});
|
|
642
|
+
vm.crud.add();
|
|
643
|
+
}
|
|
644
|
+
})
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
},
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* 管理员角色切换事件
|
|
651
|
+
*/
|
|
652
|
+
changeAdminRole(value){
|
|
653
|
+
if(value == "1"){
|
|
654
|
+
this.crud.formData["parentRoleTree"] = this.parentRoleTree;
|
|
655
|
+
}else{
|
|
656
|
+
this.crud.formData["parentRoleTree"] = "";
|
|
657
|
+
}
|
|
658
|
+
},
|
|
659
|
+
|
|
660
|
+
//删除角色
|
|
661
|
+
remove(){
|
|
662
|
+
let vm = this;
|
|
663
|
+
let selection = vm.$refs[vm.crud.setting.tableRef].selection;
|
|
664
|
+
if ((selection || []).length === 0) {
|
|
665
|
+
vm.$message({
|
|
666
|
+
duration: 1500,
|
|
667
|
+
type: 'info',
|
|
668
|
+
message: '请至少选择一条需要删除的数据!'
|
|
669
|
+
});
|
|
670
|
+
return;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
if(!this.isDeveloper){ // 不是开发者无法删除系统下发角色
|
|
674
|
+
let flag = false;
|
|
675
|
+
selection.forEach(item => {
|
|
676
|
+
if(item.adminRole == "1" || item["roleAttach"] != (this.loginUser.linkId || this.loginUser.mainOrgId)){
|
|
677
|
+
flag = true;
|
|
678
|
+
}
|
|
679
|
+
})
|
|
680
|
+
if(flag){
|
|
681
|
+
this.$message.error("无法删除系统下发角色!");
|
|
682
|
+
return;
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
// 如果当前删除的数据与dataStore中的数据条目相同,那么将页码置为第一页重新查询
|
|
687
|
+
if(selection.length == vm.crud.dataStore.records.length){
|
|
688
|
+
vm.crud.searchForm.page = '1';
|
|
689
|
+
vm.$refs[vm.crud.setting.pageRef]["internalCurrentPage"] = 1;
|
|
690
|
+
}
|
|
691
|
+
vm.$confirm('是否确定删除?这将会清空所有下级关联数据包括权限数据!', '警告', {
|
|
692
|
+
confirmButtonText: '确定',
|
|
693
|
+
cancelButtonText: '取消',
|
|
694
|
+
}).then(function () {
|
|
695
|
+
// 避免重复遮罩
|
|
696
|
+
vm.crud.searchLoading && vm.crud.searchLoading.close();
|
|
697
|
+
vm.crud.searchLoading = vm.$loading({
|
|
698
|
+
target: vm.$refs[vm.crud.tableRef].$el,
|
|
699
|
+
lock: true,
|
|
700
|
+
text: '正在删除,请稍后...',
|
|
701
|
+
spinner: 'el-icon-loading',
|
|
702
|
+
background: 'rgba(0, 0, 0, 0.6)'
|
|
703
|
+
});
|
|
704
|
+
let arrIds = [];
|
|
705
|
+
selection.forEach(function (data) {
|
|
706
|
+
arrIds.push(data.id);
|
|
707
|
+
});
|
|
708
|
+
vm.axios.post(vm.api.role.linkRemoveNew,{"ids":arrIds.join(",")}).then(res => {
|
|
709
|
+
vm.crud.searchLoading && vm.crud.searchLoading.close();
|
|
710
|
+
vm.$message({
|
|
711
|
+
type: 'success',
|
|
712
|
+
message: res.data.operateMessage
|
|
713
|
+
});
|
|
714
|
+
vm.crud.search();
|
|
715
|
+
})
|
|
716
|
+
});
|
|
717
|
+
|
|
718
|
+
},
|
|
719
|
+
//编辑权限
|
|
720
|
+
update(row){
|
|
721
|
+
let vm = this;
|
|
722
|
+
if(row.roleStatus == "20"){
|
|
723
|
+
vm.$message({
|
|
724
|
+
duration:1200,
|
|
725
|
+
message:"该角色已被锁定,请解除锁定后继续操作!"
|
|
726
|
+
});
|
|
727
|
+
return;
|
|
728
|
+
}
|
|
729
|
+
if(!row.adminRole){
|
|
730
|
+
this.$set(row,"adminRole","0");
|
|
731
|
+
}
|
|
732
|
+
vm.roleTypeUpdate = row.roleType; //保存原角色类型
|
|
733
|
+
this.operate = "update";
|
|
734
|
+
this.oldRoleName = row.roleName; //赋值上次角色名
|
|
735
|
+
vm.crud.update(row);
|
|
736
|
+
},
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
formSubmit(){
|
|
740
|
+
let vm = this;
|
|
741
|
+
vm.$refs[vm.crud.addFormRef].validate(valid => {
|
|
742
|
+
if(!valid){
|
|
743
|
+
return;
|
|
744
|
+
}
|
|
745
|
+
let formData = vm.crud.formData;
|
|
746
|
+
if(formData.id){
|
|
747
|
+
vm.crud.axios.post(vm.api.role.settingLockedRole, {"ids": formData.id,"roleStatus":formData.roleStatus});
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
if(vm.crud.optCode === "update"){
|
|
751
|
+
vm.crud.formData["updated"] = this.loginUser.id;
|
|
752
|
+
//当前是编辑状态
|
|
753
|
+
if(formData.roleType !== vm.roleTypeUpdate){
|
|
754
|
+
//当前角色类型发生变化
|
|
755
|
+
vm.$confirm('是否确认变更角色类型?这将会清空所有下级关联数据包括权限数据!', '警告', {
|
|
756
|
+
confirmButtonText: '确定',
|
|
757
|
+
cancelButtonText: '取消',
|
|
758
|
+
}).then(function () {
|
|
759
|
+
|
|
760
|
+
//删除关联菜单和关联人员
|
|
761
|
+
vm.axios.post(vm.api.role.updateRoleTypeRemoveDatas,{"ids":formData.id}).then(res => {
|
|
762
|
+
vm.crud.formSubmit();
|
|
763
|
+
});
|
|
764
|
+
});
|
|
765
|
+
}else{
|
|
766
|
+
vm.crud.formSubmit();
|
|
767
|
+
}
|
|
768
|
+
}else{
|
|
769
|
+
vm.crud.formData["created"] = this.loginUser.id;
|
|
770
|
+
vm.crud.formData.roleCreater = vm.loginUser.userName;
|
|
771
|
+
//新增类型
|
|
772
|
+
vm.crud.formSubmit();
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
});
|
|
777
|
+
},
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* 角色下发
|
|
781
|
+
*/
|
|
782
|
+
allocateRole(){
|
|
783
|
+
//弹出人员选择
|
|
784
|
+
let vm = this;
|
|
785
|
+
vm.currentRowObj = {};
|
|
786
|
+
let selection = vm.$refs[vm.crud.setting.tableRef].selection;
|
|
787
|
+
if((selection || []).length == 0){
|
|
788
|
+
vm.$message({
|
|
789
|
+
message:"请选择需要授权的角色!",
|
|
790
|
+
duration:1500
|
|
791
|
+
});
|
|
792
|
+
return;
|
|
793
|
+
}
|
|
794
|
+
let orgDimSet = new Set();
|
|
795
|
+
let roleIdArr = [];
|
|
796
|
+
let flag = false;
|
|
797
|
+
//是否是开发者
|
|
798
|
+
let caseSup = this.loginUser.userType == "sup";
|
|
799
|
+
(selection || []).forEach(item =>{
|
|
800
|
+
orgDimSet.add(item.roleType);
|
|
801
|
+
roleIdArr.push(item.id);
|
|
802
|
+
if(item.adminRole == "1" && caseSup){ // 开发者不可以直接下发角色
|
|
803
|
+
flag = true;
|
|
804
|
+
}
|
|
805
|
+
});
|
|
806
|
+
if(flag){
|
|
807
|
+
this.$message.error("无法下发管理员角色!");
|
|
808
|
+
return;
|
|
809
|
+
}
|
|
810
|
+
this.checkRoleIds = "$$$$$$$$$$$$$$$";
|
|
811
|
+
this.userChooseParam = {'roleIds':this.checkRoleIds};
|
|
812
|
+
// this.checkRoleIds = roleIdArr.join(",");
|
|
813
|
+
this.ognEnable = true;
|
|
814
|
+
this.posEnable = true;
|
|
815
|
+
this.issuedTitle = "下发人员选择";
|
|
816
|
+
this.issuedPosition = "head";
|
|
817
|
+
this.roleIdArr = roleIdArr;
|
|
818
|
+
let orgDimArr = Array.from(orgDimSet);
|
|
819
|
+
this.orgDims = orgDimArr.join(",");
|
|
820
|
+
//用户类型
|
|
821
|
+
let userType = this.loginUser.userType;
|
|
822
|
+
if(!caseSup){
|
|
823
|
+
this.axios.post(this.api.sysOrgPosUser.find,{"userId":this.loginUser.id}).then(res => {
|
|
824
|
+
let orgTreeId = ""; // 组织树上级
|
|
825
|
+
let dim = ""; // 所在维度
|
|
826
|
+
for(let i = 0; i<res.data.length;i++){
|
|
827
|
+
if(res.data[i].orgId){
|
|
828
|
+
if(!dim){
|
|
829
|
+
dim = res.data[i].orgDim;
|
|
830
|
+
}
|
|
831
|
+
if(res.data[i].orgDim==dim){
|
|
832
|
+
orgTreeId += ","+res.data[i].orgId;
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
if(orgTreeId.length>0){
|
|
837
|
+
orgTreeId = orgTreeId.substring(1);
|
|
838
|
+
}
|
|
839
|
+
this.orgTreeIds = orgTreeId;
|
|
840
|
+
this.issuedVisible = true;
|
|
841
|
+
});
|
|
842
|
+
}else {
|
|
843
|
+
this.issuedVisible = true;
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
|
|
847
|
+
/**
|
|
848
|
+
* 角色下发
|
|
849
|
+
*/
|
|
850
|
+
authAllocate(){
|
|
851
|
+
let selection = this.$refs[this.crud.setting.tableRef].selection;
|
|
852
|
+
if(selection.length == 0){
|
|
853
|
+
this.$message.error("请选择需要下发的数据!");
|
|
854
|
+
return;
|
|
855
|
+
}
|
|
856
|
+
// let flag = true;
|
|
857
|
+
let arr = [];
|
|
858
|
+
selection.forEach(item => {
|
|
859
|
+
// if(item.adminRole == "1"){
|
|
860
|
+
// flag = false;
|
|
861
|
+
// }
|
|
862
|
+
arr.push(item.id);
|
|
863
|
+
})
|
|
864
|
+
// if(!flag){
|
|
865
|
+
// this.$message.error("不能下发管理员角色!");
|
|
866
|
+
// return;
|
|
867
|
+
// }
|
|
868
|
+
this.selectionAuthRoleIds = arr.join(",");
|
|
869
|
+
this.isAppend = "1";
|
|
870
|
+
this.authAllocateIds = "";
|
|
871
|
+
this.allocateVisible = true;
|
|
872
|
+
},
|
|
873
|
+
|
|
874
|
+
authAllocateSetting(row){
|
|
875
|
+
this.selectionAuthRoleIds = row.id;
|
|
876
|
+
this.isAppend = "0";
|
|
877
|
+
this.authAllocateIds = row.userAttach;
|
|
878
|
+
this.allocateVisible = true;
|
|
879
|
+
},
|
|
880
|
+
|
|
881
|
+
saveAuthAllocate(){
|
|
882
|
+
let checkedUsers = this.$refs.authAllocateRef.getCheckedInfo("user");
|
|
883
|
+
// if(checkedUsers.length == 0 && this.isAppend == '1'){
|
|
884
|
+
// this.$message.error("请选择需要下发的管理员!");
|
|
885
|
+
// return;
|
|
886
|
+
// }
|
|
887
|
+
let userIds = [];
|
|
888
|
+
let userAttachs = [];
|
|
889
|
+
checkedUsers.forEach(item => {
|
|
890
|
+
userAttachs.push(item.id);
|
|
891
|
+
if(userIds.indexOf(item.userId) == -1){
|
|
892
|
+
userIds.push(item.userId);
|
|
893
|
+
}
|
|
894
|
+
})
|
|
895
|
+
this.axios.post(this.api.role.authRoleAllocate,{userIds:userIds.join(","),isAppend:this.isAppend,
|
|
896
|
+
userAttachs:userAttachs.join(","),roleIds:this.selectionAuthRoleIds}).then(res => {
|
|
897
|
+
if(res.data.operateSuccess){
|
|
898
|
+
this.$message.success("保存成功!");
|
|
899
|
+
this.crud.search();
|
|
900
|
+
this.allocateVisible = false;
|
|
901
|
+
}else{
|
|
902
|
+
this.$message.error("保存失败!");
|
|
903
|
+
}
|
|
904
|
+
})
|
|
905
|
+
},
|
|
906
|
+
|
|
907
|
+
/**
|
|
908
|
+
* 保存人员设置
|
|
909
|
+
* position 位置 head 头部 row 行
|
|
910
|
+
*/
|
|
911
|
+
saveIssued(position){
|
|
912
|
+
//解析
|
|
913
|
+
//先清除 创建人是 开发者的
|
|
914
|
+
let vm = this;
|
|
915
|
+
if (!vm.$refs.commonUserRef) {
|
|
916
|
+
return;
|
|
917
|
+
}
|
|
918
|
+
//删除
|
|
919
|
+
let userType = this.loginUser.userType;
|
|
920
|
+
//是否是开发者
|
|
921
|
+
let caseSup = userType == "sup";
|
|
922
|
+
//查询当前选中角色下的所有用户关联
|
|
923
|
+
if(position == 'head'){ //头部下发
|
|
924
|
+
let arr = vm.$refs.commonUserRef.getCheckedInfo("user");
|
|
925
|
+
let userArr = []; //用户对象
|
|
926
|
+
let addEmpowerIdUserIdArr = []; // 添加用户时需要将用户的角色关联id加上
|
|
927
|
+
//遍历角色
|
|
928
|
+
(vm.roleIdArr || []).forEach(roleId =>{
|
|
929
|
+
arr.forEach((data,index)=> {
|
|
930
|
+
userArr.push({
|
|
931
|
+
userAttach:data.id,
|
|
932
|
+
roleType:'user',
|
|
933
|
+
userId:data.userId || '',
|
|
934
|
+
roleId:roleId,
|
|
935
|
+
})
|
|
936
|
+
if(index == 0 && data.userId){ //因为当前选中的人一致所以取第一个就行
|
|
937
|
+
addEmpowerIdUserIdArr.push(data.userId);
|
|
938
|
+
}
|
|
939
|
+
});
|
|
940
|
+
});
|
|
941
|
+
vm.initRoleUser().then(res =>{
|
|
942
|
+
let userMap = {};
|
|
943
|
+
let userDataMap = {};
|
|
944
|
+
let caseDataMap = {};
|
|
945
|
+
let caseDataParentData = {};
|
|
946
|
+
let oldRoleUserData = res.data || [];
|
|
947
|
+
let removeRoleUserIdArr = []; //需要删除的
|
|
948
|
+
let removeUserAttachIdObj = {}; //需要删除的人员对象
|
|
949
|
+
if(!caseSup){
|
|
950
|
+
oldRoleUserData.forEach(roleUser =>{
|
|
951
|
+
if(roleUser.created == vm.loginUser.id){ //当前创建者为登录用户
|
|
952
|
+
removeRoleUserIdArr.push(roleUser.id);
|
|
953
|
+
if(roleUser.userAttach){
|
|
954
|
+
if(!removeUserAttachIdObj[roleUser.userAttach]){
|
|
955
|
+
removeUserAttachIdObj[roleUser.userAttach] = [];
|
|
956
|
+
}
|
|
957
|
+
removeUserAttachIdObj[roleUser.userAttach].push(roleUser.roleId);
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
});
|
|
961
|
+
}else { //当前是管理员
|
|
962
|
+
//删除当前角色下所有的用户角色
|
|
963
|
+
oldRoleUserData.forEach(roleUser =>{
|
|
964
|
+
removeRoleUserIdArr.push(roleUser.id);
|
|
965
|
+
if(roleUser.userAttach){
|
|
966
|
+
if(!removeUserAttachIdObj[roleUser.userAttach]){
|
|
967
|
+
removeUserAttachIdObj[roleUser.userAttach] = [];
|
|
968
|
+
}
|
|
969
|
+
removeUserAttachIdObj[roleUser.userAttach].push(roleUser.roleId);
|
|
970
|
+
}
|
|
971
|
+
});
|
|
972
|
+
}
|
|
973
|
+
let resultArr = [];
|
|
974
|
+
let levelParentOrgArr = []; // 所有的父级数据
|
|
975
|
+
let levelChildrenOrgArr = []; //保存所有勾选的子级
|
|
976
|
+
let typeArr = ["user","org","pos"];
|
|
977
|
+
typeArr.forEach(type=>{
|
|
978
|
+
let arr = vm.$refs.commonUserRef.getCheckedInfo(type);
|
|
979
|
+
arr.forEach(function (data) {
|
|
980
|
+
data["roleType"] = type; // 设置角色类型
|
|
981
|
+
});
|
|
982
|
+
resultArr = resultArr.concat(arr);
|
|
983
|
+
});
|
|
984
|
+
let levelOrg = vm.$refs.commonUserRef.getCheckedInfo("levelOrg");
|
|
985
|
+
levelParentOrgArr = levelOrg[0]; // levelParentOrg
|
|
986
|
+
levelChildrenOrgArr = levelOrg[1]; // levelParentOrg
|
|
987
|
+
let levelChildrenOrgIds = []; // 级联隐藏数据id
|
|
988
|
+
let parentOrgIdArr = []; // 当前选中的父级数据的Ids
|
|
989
|
+
levelParentOrgArr.forEach(item => {
|
|
990
|
+
item["roleType"] = "levelParentOrg";
|
|
991
|
+
parentOrgIdArr.push(item.id);
|
|
992
|
+
});
|
|
993
|
+
levelChildrenOrgArr.forEach(item => {
|
|
994
|
+
item["roleType"] = "levelChildrenOrg";
|
|
995
|
+
levelChildrenOrgIds.push(item.id);
|
|
996
|
+
});
|
|
997
|
+
let newAttachArr = []; // 当前保存的数据归属集合
|
|
998
|
+
let newMap = {}; // 当前保存的所有数据集合
|
|
999
|
+
resultArr.forEach(data=>{
|
|
1000
|
+
if(levelParentOrgArr.indexOf(data.id) == -1){
|
|
1001
|
+
newMap[data.id] = data;
|
|
1002
|
+
newAttachArr.push(data.id);
|
|
1003
|
+
}
|
|
1004
|
+
});
|
|
1005
|
+
let tempAttachArr = []; // 新增的数据集合
|
|
1006
|
+
let removeEmpowerIdUserIdArr = []; // 移除用户时需要将用户的角色关联id去除EmpowerId
|
|
1007
|
+
for(let [key] of Object.entries(userMap)){ // 移除无效的用户归属,userMap用户旧归属合集,新归属不存在则移除
|
|
1008
|
+
if(newAttachArr.indexOf(key) == -1){
|
|
1009
|
+
removeEmpowerIdUserIdArr.push((userDataMap[key] || {})["userId"]);
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
let tempArr = Object.keys(userMap);
|
|
1013
|
+
for(let [key,val] of Object.entries(newMap)){ // 原归属中已存在的,但当前选择的归属中不存在,则新增
|
|
1014
|
+
if(tempArr.indexOf(key) == -1 && parentOrgIdArr.indexOf(key) == -1){
|
|
1015
|
+
tempAttachArr.push(val);
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
let addAttachArr = [];
|
|
1020
|
+
let removeUserAttachIdKeys = Object.keys(removeUserAttachIdObj);
|
|
1021
|
+
let tobj = {"org":"orgId","area":"orgId","ogn":"orgId","dept":"orgId","pos":"posId","user":"userAttach"};
|
|
1022
|
+
let addEmpowerIdUserIdSet = new Set(); // 添加用户时需要将用户的角色关联id加上
|
|
1023
|
+
(vm.roleIdArr || []).forEach(roleId =>{
|
|
1024
|
+
tempAttachArr.forEach(function (data) {
|
|
1025
|
+
if(data.roleType != "levelParentOrg" &&data.roleType != "levelChildrenOrg"){
|
|
1026
|
+
let obj = {};
|
|
1027
|
+
// 提交只需要几个有效属性,id->userAttach
|
|
1028
|
+
obj["userAttach"] = data["id"];
|
|
1029
|
+
if(data.nodeType){
|
|
1030
|
+
obj[tobj[data.nodeType]] = data["id"];
|
|
1031
|
+
}
|
|
1032
|
+
obj["roleType"] = data.roleType;
|
|
1033
|
+
obj["userId"] = data["userId"];
|
|
1034
|
+
obj["roleId"] = roleId;
|
|
1035
|
+
let dataIdTmp = data["id"];
|
|
1036
|
+
if(removeUserAttachIdKeys.indexOf(dataIdTmp) == -1 ||
|
|
1037
|
+
(removeUserAttachIdObj[dataIdTmp] || []).indexOf(roleId) == -1){
|
|
1038
|
+
if(data["userId"]){
|
|
1039
|
+
addEmpowerIdUserIdSet.add(data["userId"])
|
|
1040
|
+
}
|
|
1041
|
+
addAttachArr.push(obj);
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
});
|
|
1045
|
+
});
|
|
1046
|
+
let addEmpowerIdUserIdArr = Array.from(addEmpowerIdUserIdSet); //新增得用户id
|
|
1047
|
+
let addArr = [];
|
|
1048
|
+
removeEmpowerIdUserIdArr.forEach(id =>{
|
|
1049
|
+
id && (addArr.push(id));
|
|
1050
|
+
});
|
|
1051
|
+
//需要移除的下级部门子数据
|
|
1052
|
+
let removeArrOrg = [];
|
|
1053
|
+
//需要更新的原父级数据数据
|
|
1054
|
+
// let updateParentOrgKey = [];
|
|
1055
|
+
let removedateParentOrgKey = [];
|
|
1056
|
+
Object.keys(caseDataParentData).forEach(key => {
|
|
1057
|
+
if(parentOrgIdArr.indexOf(key) == -1){
|
|
1058
|
+
removedateParentOrgKey.push(caseDataParentData[key]);
|
|
1059
|
+
}
|
|
1060
|
+
});
|
|
1061
|
+
//保存已经选中的数据
|
|
1062
|
+
let addLevelOrgArr = []; //保存开启上下级组织的信息
|
|
1063
|
+
levelChildrenOrgArr.forEach(function (data) {
|
|
1064
|
+
if(!caseDataMap[data["id"]]){ // 新增
|
|
1065
|
+
let obj = {};
|
|
1066
|
+
// 提交只需要几个有效属性,
|
|
1067
|
+
obj["cascadeData"] = "true"; //这里我只保存已经选中的
|
|
1068
|
+
obj["userAttach"] = data["id"];
|
|
1069
|
+
if(data.nodeType){
|
|
1070
|
+
obj[tobj[data.nodeType]] = data["id"];
|
|
1071
|
+
}
|
|
1072
|
+
obj["roleType"] = data.roleType;
|
|
1073
|
+
obj["userId"] = data["userId"];
|
|
1074
|
+
obj["roleId"] = vm.currentRowObj.id;
|
|
1075
|
+
addLevelOrgArr.push(obj);
|
|
1076
|
+
}
|
|
1077
|
+
});
|
|
1078
|
+
//保存所有的父级数据(后台直接执行更新方法)
|
|
1079
|
+
let updateLevelParentOrgArr = []; //后台批量更新父级数据
|
|
1080
|
+
(vm.roleIdArr || []).forEach(roleId =>{
|
|
1081
|
+
levelParentOrgArr.forEach(function (data) {
|
|
1082
|
+
let obj = {};
|
|
1083
|
+
//提交
|
|
1084
|
+
obj["cascadeData"] = "parent"; // 其中 cascadeData 为 parent 为了 区别子集数据
|
|
1085
|
+
obj["userAttach"] = data["id"];
|
|
1086
|
+
if(data.nodeType) {
|
|
1087
|
+
obj[tobj[data.nodeType]] = data["id"];
|
|
1088
|
+
}
|
|
1089
|
+
obj["roleType"] = data.roleType;
|
|
1090
|
+
obj["userId"] = data["userId"];
|
|
1091
|
+
obj["roleId"] = roleId;
|
|
1092
|
+
updateLevelParentOrgArr.push(obj);
|
|
1093
|
+
});
|
|
1094
|
+
});
|
|
1095
|
+
let param = {
|
|
1096
|
+
roleId:vm.roleIdArr.join(","),
|
|
1097
|
+
userId:vm.loginUser.id,
|
|
1098
|
+
userList:JSON.stringify(addAttachArr),
|
|
1099
|
+
removeRoleUserIds:"",
|
|
1100
|
+
removeEmpowerIdUserIds:"",
|
|
1101
|
+
addEmpowerIdUserIds:"",
|
|
1102
|
+
leveParentOrgUserList:JSON.stringify(updateLevelParentOrgArr),
|
|
1103
|
+
removeLevelOrgUserList:"",
|
|
1104
|
+
leveOrgUserList:JSON.stringify(addLevelOrgArr)
|
|
1105
|
+
};
|
|
1106
|
+
vm.axios.post(vm.api.roleUser.saveData,param).then(res =>{
|
|
1107
|
+
if(res.data && res.data.operateSuccess){
|
|
1108
|
+
vm.$message({
|
|
1109
|
+
type: 'success',
|
|
1110
|
+
message: "保存成功!"
|
|
1111
|
+
});
|
|
1112
|
+
}else {
|
|
1113
|
+
vm.$message({
|
|
1114
|
+
type: 'error',
|
|
1115
|
+
message: "保存失败!"
|
|
1116
|
+
});
|
|
1117
|
+
}
|
|
1118
|
+
vm.issuedVisible = false;
|
|
1119
|
+
vm.crud.search();
|
|
1120
|
+
});
|
|
1121
|
+
});
|
|
1122
|
+
}else { //行下发
|
|
1123
|
+
vm.initRoleUser().then(res =>{
|
|
1124
|
+
let userMap = {};
|
|
1125
|
+
let userDataMap = {};
|
|
1126
|
+
let caseDataMap = {};
|
|
1127
|
+
let caseDataParentData = {};
|
|
1128
|
+
let roleId = vm.roleIdArr.join(",");
|
|
1129
|
+
(res.data||[]).forEach(info => {
|
|
1130
|
+
if(info.cascadeData == 'true'){
|
|
1131
|
+
caseDataMap[info.userAttach] = info.id;
|
|
1132
|
+
}else if(info.cascadeData == 'parent'){
|
|
1133
|
+
//保存原勾选的父菜单(为了方便更新)
|
|
1134
|
+
caseDataParentData[info.userAttach] = info.id; //保存原选中的父级信息
|
|
1135
|
+
}
|
|
1136
|
+
else{
|
|
1137
|
+
userMap[info.userAttach] = info.id;
|
|
1138
|
+
userDataMap[info.userAttach] = info;
|
|
1139
|
+
}
|
|
1140
|
+
});
|
|
1141
|
+
|
|
1142
|
+
let resultArr = [];
|
|
1143
|
+
let levelChildrenOrgArr = []; //保存所有勾选的子级
|
|
1144
|
+
let levelParentOrgArr = []; // 所有的父级数据
|
|
1145
|
+
let typeArr = ["user","org","pos"];
|
|
1146
|
+
typeArr.forEach(type=>{
|
|
1147
|
+
let arr = vm.$refs.commonUserRef.getCheckedInfo(type);
|
|
1148
|
+
arr.forEach(function (data) {
|
|
1149
|
+
data["roleType"] = type; // 设置角色类型
|
|
1150
|
+
});
|
|
1151
|
+
resultArr = resultArr.concat(arr);
|
|
1152
|
+
});
|
|
1153
|
+
let levelOrg = vm.$refs.commonUserRef.getCheckedInfo("levelOrg");
|
|
1154
|
+
levelParentOrgArr = levelOrg[0]; // levelParentOrg
|
|
1155
|
+
levelChildrenOrgArr = levelOrg[1]; // levelChildrenOrg
|
|
1156
|
+
let levelChildrenOrgIds = []; // 级联隐藏数据id
|
|
1157
|
+
let parentOrgIdArr = []; // 当前选中的父级数据的Ids
|
|
1158
|
+
levelParentOrgArr.forEach(item => {
|
|
1159
|
+
item["roleType"] = "levelParentOrg";
|
|
1160
|
+
parentOrgIdArr.push(item.id);
|
|
1161
|
+
});
|
|
1162
|
+
levelChildrenOrgArr.forEach(item => {
|
|
1163
|
+
item["roleType"] = "levelChildrenOrg";
|
|
1164
|
+
levelChildrenOrgIds.push(item.id);
|
|
1165
|
+
});
|
|
1166
|
+
let newAttachArr = []; // 当前保存的数据归属集合
|
|
1167
|
+
let newMap = {}; // 当前保存的所有数据集合
|
|
1168
|
+
|
|
1169
|
+
resultArr.forEach(data=>{
|
|
1170
|
+
if(levelParentOrgArr.indexOf(data.id) == -1){
|
|
1171
|
+
newMap[data.id] = data;
|
|
1172
|
+
newAttachArr.push(data.id);
|
|
1173
|
+
}
|
|
1174
|
+
});
|
|
1175
|
+
let removeIdArr = []; // 删除的数据集合
|
|
1176
|
+
let tempAttachArr = []; // 新增的数据集合
|
|
1177
|
+
let removeEmpowerIdUserIdArr = []; // 移除用户时需要将用户的角色关联id去除EmpowerId
|
|
1178
|
+
for(let [key] of Object.entries(userMap)){ // 移除无效的用户归属,userMap用户旧归属合集,新归属不存在则移除
|
|
1179
|
+
if(newAttachArr.indexOf(key) == -1){
|
|
1180
|
+
removeIdArr.push(userMap[key]);
|
|
1181
|
+
removeEmpowerIdUserIdArr.push((userDataMap[key] || {})["userId"]);
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
let tempArr = Object.keys(userMap);
|
|
1185
|
+
for(let [key,val] of Object.entries(newMap)){ // 原归属中已存在的,但当前选择的归属中不存在,则新增
|
|
1186
|
+
if(tempArr.indexOf(key) == -1 && parentOrgIdArr.indexOf(key) == -1){
|
|
1187
|
+
tempAttachArr.push(val);
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
let addEmpowerIdUserIdSet = new Set(); // 添加用户时需要将用户的角色关联id加上
|
|
1192
|
+
let addAttachArr = [];
|
|
1193
|
+
let tobj = {"org":"orgId","area":"orgId","ogn":"orgId","dept":"orgId","pos":"posId","user":"userAttach"};
|
|
1194
|
+
tempAttachArr.forEach(function (data) {
|
|
1195
|
+
if(data.roleType != "levelParentOrg" &&data.roleType != "levelChildrenOrg"){
|
|
1196
|
+
let obj = {};
|
|
1197
|
+
// 提交只需要几个有效属性,id->userAttach
|
|
1198
|
+
obj["userAttach"] = data["id"];
|
|
1199
|
+
if(data.nodeType){
|
|
1200
|
+
obj[tobj[data.nodeType]] = data["id"];
|
|
1201
|
+
}
|
|
1202
|
+
obj["roleType"] = data.roleType;
|
|
1203
|
+
obj["userId"] = data["userId"];
|
|
1204
|
+
obj["roleId"] = roleId;
|
|
1205
|
+
if(data["userId"]){
|
|
1206
|
+
addEmpowerIdUserIdSet.add(data["userId"])
|
|
1207
|
+
}
|
|
1208
|
+
addAttachArr.push(obj);
|
|
1209
|
+
}
|
|
1210
|
+
});
|
|
1211
|
+
|
|
1212
|
+
let addEmpowerIdUserIdArr = Array.from(addEmpowerIdUserIdSet); //新增得用户id
|
|
1213
|
+
let addArr = [];
|
|
1214
|
+
removeEmpowerIdUserIdArr.forEach(id =>{
|
|
1215
|
+
id && (addArr.push(id));
|
|
1216
|
+
});
|
|
1217
|
+
|
|
1218
|
+
//需要移除的下级部门子数据
|
|
1219
|
+
let removeArrOrg = [];
|
|
1220
|
+
for(let [key,value] of Object.entries(caseDataMap)){
|
|
1221
|
+
//移除现在取消的组织
|
|
1222
|
+
if(levelChildrenOrgIds.indexOf(key) == -1){
|
|
1223
|
+
//不存在则需要删除
|
|
1224
|
+
removeArrOrg.push(value);
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
removeIdArr = removeIdArr.concat(removeArrOrg);
|
|
1228
|
+
//需要更新的原父级数据数据
|
|
1229
|
+
// let updateParentOrgKey = [];
|
|
1230
|
+
let removedateParentOrgKey = [];
|
|
1231
|
+
Object.keys(caseDataParentData).forEach(key => {
|
|
1232
|
+
if(parentOrgIdArr.indexOf(key) == -1){
|
|
1233
|
+
removedateParentOrgKey.push(caseDataParentData[key]);
|
|
1234
|
+
}
|
|
1235
|
+
});
|
|
1236
|
+
//保存已经选中的数据
|
|
1237
|
+
let addLevelOrgArr = []; //保存开启上下级组织的信息
|
|
1238
|
+
levelChildrenOrgArr.forEach(function (data) {
|
|
1239
|
+
if(!caseDataMap[data["id"]]){ // 新增
|
|
1240
|
+
let obj = {};
|
|
1241
|
+
// 提交只需要几个有效属性,
|
|
1242
|
+
obj["cascadeData"] = "true"; //这里我只保存已经选中的
|
|
1243
|
+
obj["userAttach"] = data["id"];
|
|
1244
|
+
if(data.nodeType){
|
|
1245
|
+
obj[tobj[data.nodeType]] = data["id"];
|
|
1246
|
+
}
|
|
1247
|
+
obj["roleType"] = data.roleType;
|
|
1248
|
+
obj["userId"] = data["userId"];
|
|
1249
|
+
obj["roleId"] = vm.currentRowObj.id;
|
|
1250
|
+
addLevelOrgArr.push(obj);
|
|
1251
|
+
}
|
|
1252
|
+
});
|
|
1253
|
+
|
|
1254
|
+
//保存所有的父级数据(后台直接执行更新方法)
|
|
1255
|
+
let updateLevelParentOrgArr = []; //后台批量更新父级数据
|
|
1256
|
+
levelParentOrgArr.forEach(function (data) {
|
|
1257
|
+
if(!caseDataParentData[data["id"]]){
|
|
1258
|
+
let obj = {};
|
|
1259
|
+
//提交
|
|
1260
|
+
obj["cascadeData"] = "parent"; // 其中 cascadeData 为 parent 为了 区别子集数据
|
|
1261
|
+
obj["userAttach"] = data["id"];
|
|
1262
|
+
if(data.nodeType) {
|
|
1263
|
+
obj[tobj[data.nodeType]] = data["id"];
|
|
1264
|
+
}
|
|
1265
|
+
obj["roleType"] = data.roleType;
|
|
1266
|
+
obj["userId"] = data["userId"];
|
|
1267
|
+
obj["roleId"] = roleId;
|
|
1268
|
+
updateLevelParentOrgArr.push(obj);
|
|
1269
|
+
}
|
|
1270
|
+
});
|
|
1271
|
+
|
|
1272
|
+
let param = {
|
|
1273
|
+
roleId:vm.roleIdArr.join(","),
|
|
1274
|
+
userId:vm.loginUser.id,
|
|
1275
|
+
userList:JSON.stringify(addAttachArr),
|
|
1276
|
+
removeRoleUserIds:removeIdArr.join(","),
|
|
1277
|
+
removeEmpowerIdUserIds:addArr.join(","),
|
|
1278
|
+
addEmpowerIdUserIds:addEmpowerIdUserIdArr.join(","),
|
|
1279
|
+
leveParentOrgUserList:JSON.stringify(updateLevelParentOrgArr),
|
|
1280
|
+
removeLevelOrgUserList:removedateParentOrgKey.join(","),
|
|
1281
|
+
leveOrgUserList:JSON.stringify(addLevelOrgArr)
|
|
1282
|
+
};
|
|
1283
|
+
vm.axios.post(vm.api.roleUser.saveDataNew,param).then(res =>{
|
|
1284
|
+
if(res.data && res.data.operateSuccess){
|
|
1285
|
+
vm.$message({
|
|
1286
|
+
type: 'success',
|
|
1287
|
+
message: "保存成功!"
|
|
1288
|
+
});
|
|
1289
|
+
}else {
|
|
1290
|
+
vm.$message({
|
|
1291
|
+
type: 'error',
|
|
1292
|
+
message: "保存失败!"
|
|
1293
|
+
});
|
|
1294
|
+
}
|
|
1295
|
+
vm.issuedVisible = false;
|
|
1296
|
+
vm.crud.search();
|
|
1297
|
+
});
|
|
1298
|
+
|
|
1299
|
+
});
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
},
|
|
1303
|
+
|
|
1304
|
+
/**
|
|
1305
|
+
* 保存可分配菜单
|
|
1306
|
+
*/
|
|
1307
|
+
saveAllocateSetting(){
|
|
1308
|
+
this.$refs.allocateRef.save();
|
|
1309
|
+
},
|
|
1310
|
+
|
|
1311
|
+
closeAllocateSettingDialog(){
|
|
1312
|
+
this.allocateSettingDialog = false;
|
|
1313
|
+
},
|
|
1314
|
+
|
|
1315
|
+
/**
|
|
1316
|
+
*
|
|
1317
|
+
* @param row
|
|
1318
|
+
*/
|
|
1319
|
+
roleUserSetting(row){
|
|
1320
|
+
//弹出人员选择
|
|
1321
|
+
let vm = this;
|
|
1322
|
+
vm.currentRowObj = row;
|
|
1323
|
+
vm.checkRoleIds = row.id; //默认关联的
|
|
1324
|
+
vm.ognEnable = true;
|
|
1325
|
+
vm.posEnable = true;
|
|
1326
|
+
vm.issuedTitle = "人员设置";
|
|
1327
|
+
vm.issuedPosition = "row";
|
|
1328
|
+
let roleIdArr = [];
|
|
1329
|
+
roleIdArr.push(row.id);
|
|
1330
|
+
vm.roleIdArr = roleIdArr;
|
|
1331
|
+
vm.orgDims = row.roleType;
|
|
1332
|
+
//用户类型
|
|
1333
|
+
let userType = this.loginUser.userType;
|
|
1334
|
+
//是否是开发者
|
|
1335
|
+
let caseSup = userType == "sup";
|
|
1336
|
+
this.userChooseParam = {'roleIds':this.checkRoleIds};
|
|
1337
|
+
|
|
1338
|
+
if(caseSup){
|
|
1339
|
+
this.userChooseParam = {'roleIds':this.checkRoleIds,"created":this.loginUser.id};
|
|
1340
|
+
}else{
|
|
1341
|
+
this.userChooseParam = {'roleIds':this.checkRoleIds,"createOrg":this.loginUser.mainOrgId};
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
if(!caseSup){
|
|
1345
|
+
vm.axios.post(vm.api.sysOrgPosUser.find,{"userId":vm.loginUser.id}).then(res => {
|
|
1346
|
+
let orgTreeId = ""; // 组织树上级
|
|
1347
|
+
let dim = ""; // 所在维度
|
|
1348
|
+
for(let i = 0; i<res.data.length;i++){
|
|
1349
|
+
if(res.data[i].orgId){
|
|
1350
|
+
if(!dim){
|
|
1351
|
+
dim = res.data[i].orgDim;
|
|
1352
|
+
}
|
|
1353
|
+
if(res.data[i].orgDim==dim){
|
|
1354
|
+
orgTreeId += ","+res.data[i].orgId;
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
if(orgTreeId.length>0){
|
|
1359
|
+
orgTreeId = orgTreeId.substring(1);
|
|
1360
|
+
}
|
|
1361
|
+
vm.orgTreeIds = orgTreeId;
|
|
1362
|
+
vm.issuedVisible = true;
|
|
1363
|
+
});
|
|
1364
|
+
}else {
|
|
1365
|
+
vm.issuedVisible = true;
|
|
1366
|
+
}
|
|
1367
|
+
},
|
|
1368
|
+
|
|
1369
|
+
/**
|
|
1370
|
+
* 查询用户角色
|
|
1371
|
+
*/
|
|
1372
|
+
initRoleUser(){
|
|
1373
|
+
let vm = this;
|
|
1374
|
+
return new Promise(resolve => {
|
|
1375
|
+
//用户类型
|
|
1376
|
+
let userType = this.loginUser.userType;
|
|
1377
|
+
//是否是开发者
|
|
1378
|
+
let caseSup = userType == "sup";
|
|
1379
|
+
let userChooseParam = {'roleIds':vm.roleIdArr.join(",")};
|
|
1380
|
+
|
|
1381
|
+
if(caseSup){
|
|
1382
|
+
Object.assign(userChooseParam,{"created":this.loginUser.id});
|
|
1383
|
+
}else{
|
|
1384
|
+
if(this.loginUser.commonEmpowerId){
|
|
1385
|
+
Object.assign(userChooseParam,{"createOrg":this.loginUser.mainOrgId});
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
vm.axios.post(vm.api.roleUser.find,userChooseParam).then(res =>{
|
|
1389
|
+
resolve(res);
|
|
1390
|
+
});
|
|
1391
|
+
});
|
|
1392
|
+
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
}
|
|
1397
|
+
</script>
|
|
1398
|
+
|
|
1399
|
+
<style scoped>
|
|
1400
|
+
#tableMain /deep/ .remark-class{
|
|
1401
|
+
cursor: pointer;
|
|
1402
|
+
}
|
|
1403
|
+
/*#tableMain >>> .remark-class{ 穿透,与/deep/一致,但是>>>在scss中与它的原生样式重合了,所以使用deep*/
|
|
1404
|
+
/*cursor: pointer;*/
|
|
1405
|
+
/*}*/
|
|
1406
|
+
.gis-dialog /deep/ .el-dialog__body{
|
|
1407
|
+
height: calc(100% - 45px);
|
|
1408
|
+
}
|
|
1409
|
+
.allow-menu-dialog /deep/ .el-dialog__body{
|
|
1410
|
+
padding-top: 0;
|
|
1411
|
+
padding-left: 5px;
|
|
1412
|
+
height: calc(100% - 50px);
|
|
1413
|
+
}
|
|
1414
|
+
.menu-opt-dialog /deep/ .el-dialog__body{
|
|
1415
|
+
height: calc(100% - 55px);
|
|
1416
|
+
padding-bottom: 60px;
|
|
1417
|
+
box-sizing: border-box;
|
|
1418
|
+
}
|
|
1419
|
+
.member-dialog /deep/ .el-dialog__body{
|
|
1420
|
+
padding: 0;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
|
|
1424
|
+
.role-setting-class /deep/ .el-dialog__body{
|
|
1425
|
+
padding: 0;
|
|
1426
|
+
top:44px!important;
|
|
1427
|
+
}
|
|
1428
|
+
.role-setting-class /deep/ .el-dialog__headerbtn{
|
|
1429
|
+
top: 10px;
|
|
1430
|
+
}
|
|
1431
|
+
.role-setting-class /deep/ .el-tabs{
|
|
1432
|
+
height: 100%;
|
|
1433
|
+
}
|
|
1434
|
+
/*.role-setting-class /deep/ .el-tabs__content{
|
|
1435
|
+
height: calc(100% - 60px);
|
|
1436
|
+
}*/
|
|
1437
|
+
.role-setting-class /deep/ .el-tab-pane{
|
|
1438
|
+
height: 100%;
|
|
1439
|
+
}
|
|
1440
|
+
/*.role-setting-class /deep/ .el-card__header{
|
|
1441
|
+
background-color: white;
|
|
1442
|
+
color:black;
|
|
1443
|
+
height: 30px;
|
|
1444
|
+
line-height: 30px;
|
|
1445
|
+
padding: 5px;
|
|
1446
|
+
font-size: 16px;
|
|
1447
|
+
box-sizing: border-box;
|
|
1448
|
+
border: 0;
|
|
1449
|
+
}*/
|
|
1450
|
+
.role-setting-class /deep/ .el-card__body{
|
|
1451
|
+
/*padding: 0;*/
|
|
1452
|
+
/*min-height: 50px;*/
|
|
1453
|
+
}
|
|
1454
|
+
.role-setting-class /deep/ .el-card{
|
|
1455
|
+
padding: 5px;
|
|
1456
|
+
box-sizing: border-box;
|
|
1457
|
+
min-height: 50px;
|
|
1458
|
+
}
|
|
1459
|
+
.role-setting-class /deep/ .role-menu-opt-card-card{
|
|
1460
|
+
min-height: 50px;
|
|
1461
|
+
text-align: center;
|
|
1462
|
+
line-height: 50px;
|
|
1463
|
+
}
|
|
1464
|
+
.role-setting-class /deep/ .el-dialog__header{
|
|
1465
|
+
border: 0;
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
.role-setting-class /deep/ .el-dialog > .el-dialog__body{
|
|
1469
|
+
top: 30px;
|
|
1470
|
+
}
|
|
1471
|
+
.role-setting-class /deep/ .el-dialog__headerbtn{
|
|
1472
|
+
z-index: 99;
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
|
|
1476
|
+
|
|
1477
|
+
.allocate-setting-class /deep/ .el-dialog__body{
|
|
1478
|
+
padding: 0;
|
|
1479
|
+
}
|
|
1480
|
+
.allocate-setting-class /deep/ .el-tabs{
|
|
1481
|
+
height: 100%;
|
|
1482
|
+
}
|
|
1483
|
+
.allocate-setting-class /deep/ .el-tabs__content{
|
|
1484
|
+
height: calc(100% - 60px);
|
|
1485
|
+
}
|
|
1486
|
+
.allocate-setting-class /deep/ .el-tab-pane{
|
|
1487
|
+
height: 100%;
|
|
1488
|
+
}
|
|
1489
|
+
/*.allocate-setting-class /deep/ .el-card__header{
|
|
1490
|
+
background-color: white;
|
|
1491
|
+
color:black;
|
|
1492
|
+
height: 30px;
|
|
1493
|
+
line-height: 30px;
|
|
1494
|
+
font-size: 16px;
|
|
1495
|
+
box-sizing: border-box;
|
|
1496
|
+
border: 0;
|
|
1497
|
+
}*/
|
|
1498
|
+
.allocate-setting-class /deep/ .el-card__body{
|
|
1499
|
+
min-height: 50px;
|
|
1500
|
+
}
|
|
1501
|
+
.allocate-setting-class /deep/ .el-card{
|
|
1502
|
+
padding: 5px;
|
|
1503
|
+
box-sizing: border-box;
|
|
1504
|
+
min-height: 50px;
|
|
1505
|
+
}
|
|
1506
|
+
.allocate-setting-class /deep/ .role-menu-opt-card-card{
|
|
1507
|
+
min-height: 50px;
|
|
1508
|
+
text-align: center;
|
|
1509
|
+
line-height: 50px;
|
|
1510
|
+
}
|
|
1511
|
+
.allocate-setting-class /deep/ .el-dialog__header{
|
|
1512
|
+
border: 0;
|
|
1513
|
+
padding: 10px;
|
|
1514
|
+
}
|
|
1515
|
+
.allocate-setting-class /deep/ .el-dialog__body{
|
|
1516
|
+
height: calc(100% - 88px);
|
|
1517
|
+
}
|
|
1518
|
+
.allocate-setting-class /deep/ .el-dialog > .el-dialog__body{
|
|
1519
|
+
top: 40px;
|
|
1520
|
+
}
|
|
1521
|
+
.allocate-setting-class /deep/ .el-dialog__headerbtn{
|
|
1522
|
+
z-index: 99;
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
</style>
|