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,415 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-container style="height: 100%" v-if="isLoad">
|
|
3
|
+
<el-header style="height: auto">
|
|
4
|
+
<div class="search-form-parent el-card">
|
|
5
|
+
<el-form :inline="true" :model="crud.searchForm" size="small"
|
|
6
|
+
@keyup.enter.native="crud.doSearch()" onSubmit="return false;"
|
|
7
|
+
class="demo-form-inline">
|
|
8
|
+
<el-form-item label="用户名称">
|
|
9
|
+
<el-input v-model="crud.searchForm.userNamePinYin"
|
|
10
|
+
placeholder="中文、拼音全拼、简拼"></el-input>
|
|
11
|
+
</el-form-item>
|
|
12
|
+
<el-form-item label="用户账号">
|
|
13
|
+
<el-input v-model="crud.searchForm.userAccountLike"></el-input>
|
|
14
|
+
</el-form-item>
|
|
15
|
+
<el-form-item label="用户状态">
|
|
16
|
+
<el-select v-model="crud.searchForm.userStatus" size="small">
|
|
17
|
+
<el-option v-for="item in statusOptions" :key="item.value"
|
|
18
|
+
:label="item.label" :value="item.value"></el-option>
|
|
19
|
+
</el-select>
|
|
20
|
+
</el-form-item>
|
|
21
|
+
<el-form-item>
|
|
22
|
+
<el-button type="primary" icon="el-icon-search"
|
|
23
|
+
@click="crud.doSearch()">查询
|
|
24
|
+
</el-button>
|
|
25
|
+
<el-button icon="el-icon-close" @click="crud.resetSearch()">清空
|
|
26
|
+
</el-button>
|
|
27
|
+
</el-form-item>
|
|
28
|
+
</el-form>
|
|
29
|
+
</div>
|
|
30
|
+
</el-header>
|
|
31
|
+
<el-main style="height: 100%">
|
|
32
|
+
<el-container style="height:100%" class="table-list-container">
|
|
33
|
+
<!--操作按钮 start-->
|
|
34
|
+
<el-header style="height: auto;" size="medium">
|
|
35
|
+
<el-button type="primary" size="small" icon="el-icon-check" @click="add()">新增</el-button>
|
|
36
|
+
<el-button type="danger" size="small" icon="el-icon-delete" @click="remove()">删除</el-button>
|
|
37
|
+
</el-header>
|
|
38
|
+
<!--操作按钮 end-->
|
|
39
|
+
|
|
40
|
+
<!--数据 start-->
|
|
41
|
+
<el-main style="height: 100%;">
|
|
42
|
+
<el-table :data="crud.dataStore.records" :ref="crud.tableRef" stripe border height="100%"
|
|
43
|
+
style="width: 100%;">
|
|
44
|
+
<el-table-column type="selection" width="40" align="center"></el-table-column>
|
|
45
|
+
<el-table-column type="index" label="序号" align="center" width="60"></el-table-column>
|
|
46
|
+
<el-table-column label="用户名称" prop="userName" align="center"></el-table-column>
|
|
47
|
+
<el-table-column label="用户账号" prop="userAccount" align="center" width="200"></el-table-column>
|
|
48
|
+
<el-table-column label="所属组织" prop="orgName" align="center"></el-table-column>
|
|
49
|
+
<el-table-column label="关联角色权限" prop="roleName" align="center"
|
|
50
|
+
:show-overflow-tooltip="true" width="200"></el-table-column>
|
|
51
|
+
<el-table-column label="当前状态" prop="userStatus" align="center" width="100">
|
|
52
|
+
<template slot-scope="scope">
|
|
53
|
+
<el-tag :type="userStatusColor[scope.row.userStatus]">{{userStatusObj[scope.row.userStatus]}}</el-tag>
|
|
54
|
+
</template>
|
|
55
|
+
</el-table-column>
|
|
56
|
+
<el-table-column label="操作" align="center" width="220">
|
|
57
|
+
<template slot-scope="scope">
|
|
58
|
+
<el-button size="small" icon="el-icon-edit" type="primary" @click="update(scope.row)">
|
|
59
|
+
修改
|
|
60
|
+
</el-button>
|
|
61
|
+
<el-button size="small" icon="el-icon-setting" type="primary" @click="resetPwd(scope.row)">
|
|
62
|
+
重置密码
|
|
63
|
+
</el-button>
|
|
64
|
+
</template>
|
|
65
|
+
</el-table-column>
|
|
66
|
+
</el-table>
|
|
67
|
+
</el-main>
|
|
68
|
+
<!--数据 end-->
|
|
69
|
+
</el-container>
|
|
70
|
+
</el-main>
|
|
71
|
+
<el-footer>
|
|
72
|
+
<el-pagination style="padding: 0;box-sizing: border-box;"
|
|
73
|
+
:ref="crud.pageRef"
|
|
74
|
+
:page-sizes="crud.pageSizes"
|
|
75
|
+
:page-size="crud.pageSize"
|
|
76
|
+
:current-page="crud.page"
|
|
77
|
+
:total="crud.dataStore.total"
|
|
78
|
+
@size-change="crud.sizeChange()"
|
|
79
|
+
@current-change="crud.currentPage()"
|
|
80
|
+
layout="total, sizes, prev, pager, next, jumper">
|
|
81
|
+
</el-pagination>
|
|
82
|
+
</el-footer>
|
|
83
|
+
|
|
84
|
+
<!--添加修改弹框 start-->
|
|
85
|
+
<el-dialog :close-on-click-modal=false :title="addOrUpdateTitle" top="20vh" :visible.sync="addOrUpdateDialog">
|
|
86
|
+
<el-form :model="formData" ref="formDataRef" :rules="rules">
|
|
87
|
+
<el-row>
|
|
88
|
+
<el-col :span="12">
|
|
89
|
+
<el-form-item label="用户名称" label-width="100px" prop="userName">
|
|
90
|
+
<el-input v-model="formData.userName" size="small"></el-input>
|
|
91
|
+
</el-form-item>
|
|
92
|
+
</el-col>
|
|
93
|
+
<el-col :span="12">
|
|
94
|
+
<el-form-item label="用户账号" label-width="100px" prop="userAccount">
|
|
95
|
+
<el-input v-model="formData.userAccount" size="small"></el-input>
|
|
96
|
+
</el-form-item>
|
|
97
|
+
</el-col>
|
|
98
|
+
</el-row>
|
|
99
|
+
<el-row>
|
|
100
|
+
<el-col :span="12">
|
|
101
|
+
<el-form-item label="用户类型" label-width="100px" prop="userType">
|
|
102
|
+
<el-select v-model="formData.userType" style="width: 100%" disabled size="small">
|
|
103
|
+
<el-option v-for="item in userTypeArr" :key="item.value" :label="item.label" :value="item.value">
|
|
104
|
+
</el-option>
|
|
105
|
+
</el-select>
|
|
106
|
+
</el-form-item>
|
|
107
|
+
</el-col>
|
|
108
|
+
<el-col :span="12">
|
|
109
|
+
<el-form-item label="用户状态" label-width="100px" prop="userStatus">
|
|
110
|
+
<el-select v-model="formData.userStatus" style="width: 100%" size="small">
|
|
111
|
+
<el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value">
|
|
112
|
+
</el-option>
|
|
113
|
+
</el-select>
|
|
114
|
+
</el-form-item>
|
|
115
|
+
</el-col>
|
|
116
|
+
</el-row>
|
|
117
|
+
<el-row>
|
|
118
|
+
<el-col :span="12">
|
|
119
|
+
<el-form-item label="性别" label-width="100px" prop="userGender">
|
|
120
|
+
<el-select v-model="formData.userGender" style="width: 100%" size="small">
|
|
121
|
+
<el-option v-for="item in sexTypeArr" :key="item.value" :label="item.label" :value="item.value">
|
|
122
|
+
|
|
123
|
+
</el-option>
|
|
124
|
+
</el-select>
|
|
125
|
+
</el-form-item>
|
|
126
|
+
</el-col>
|
|
127
|
+
<el-col :span="12">
|
|
128
|
+
<el-form-item label="出生日期" label-width="100px" prop="userAge">
|
|
129
|
+
<el-date-picker v-model="formData.userAge" type="date" placeholder="选择日期"
|
|
130
|
+
:editable="false" style="width: 100%" size="small">
|
|
131
|
+
</el-date-picker>
|
|
132
|
+
</el-form-item>
|
|
133
|
+
</el-col>
|
|
134
|
+
</el-row>
|
|
135
|
+
<el-row>
|
|
136
|
+
<el-col :span="12">
|
|
137
|
+
<el-form-item label="联系QQ" label-width="100px" prop="userQQ">
|
|
138
|
+
<el-input v-model="formData.userQQ" size="small"></el-input>
|
|
139
|
+
</el-form-item>
|
|
140
|
+
</el-col>
|
|
141
|
+
<el-col :span="12">
|
|
142
|
+
<el-form-item label="联系电话" label-width="100px" prop="userPhone">
|
|
143
|
+
<el-input v-model="formData.userPhone" size="small"></el-input>
|
|
144
|
+
</el-form-item>
|
|
145
|
+
</el-col>
|
|
146
|
+
</el-row>
|
|
147
|
+
<el-row>
|
|
148
|
+
<el-col :span="24">
|
|
149
|
+
<el-form-item label="电子邮箱" label-width="100px" prop="userEmail">
|
|
150
|
+
<el-input v-model="formData.userEmail" size="small"></el-input>
|
|
151
|
+
</el-form-item>
|
|
152
|
+
</el-col>
|
|
153
|
+
</el-row>
|
|
154
|
+
</el-form>
|
|
155
|
+
<div slot="footer" class="dialog-footer">
|
|
156
|
+
<el-button type="primary" @click="submitForm()" size="small" icon="el-icon-success">确 定</el-button>
|
|
157
|
+
<el-button @click="addOrUpdateDialog = false" size="small" icon="el-icon-error">取 消</el-button>
|
|
158
|
+
</div>
|
|
159
|
+
</el-dialog>
|
|
160
|
+
<!--添加修改弹框 start-->
|
|
161
|
+
</el-container>
|
|
162
|
+
</template>
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
<script>
|
|
166
|
+
export default {
|
|
167
|
+
name: "empower-ent-user-manage",
|
|
168
|
+
data(){
|
|
169
|
+
return{
|
|
170
|
+
crud: new this.CrudUtil({
|
|
171
|
+
vue: this,
|
|
172
|
+
entityName: "sysUser",
|
|
173
|
+
url: this.api.sysUser.url,
|
|
174
|
+
searchForm: {empowerUser:"Y",userType:"empower",empowerOrgId:""},
|
|
175
|
+
noClearSearchColumns: ["empowerUser","userType","empowerOrgDim","created","empowerOrgId"],
|
|
176
|
+
initNoSearch: true
|
|
177
|
+
}),
|
|
178
|
+
isLoad:false,
|
|
179
|
+
loginUser:{},
|
|
180
|
+
orgDim:"",
|
|
181
|
+
statusOptions:[
|
|
182
|
+
{value : '10',label : "正常"},
|
|
183
|
+
{value : '20',label : "锁定"}
|
|
184
|
+
], //用户状态下拉框
|
|
185
|
+
userStatusObj : {
|
|
186
|
+
'10' : "正常",
|
|
187
|
+
'20' : "锁定",
|
|
188
|
+
},
|
|
189
|
+
userStatusColor : {
|
|
190
|
+
'10' : "success",
|
|
191
|
+
'20' : "warning",
|
|
192
|
+
},
|
|
193
|
+
//新增修改弹窗标题
|
|
194
|
+
addOrUpdateTitle:"添加授权用户",
|
|
195
|
+
addOrUpdateDialog:false,//新增修改弹窗是否显示
|
|
196
|
+
rules:{
|
|
197
|
+
userAccount:this.plValidate('required'),
|
|
198
|
+
userName:this.plValidate('required'),
|
|
199
|
+
userType:this.plValidate('required'),
|
|
200
|
+
userStatus:this.plValidate('required'),
|
|
201
|
+
userQQ:this.plValidate('qq'),
|
|
202
|
+
userPhone:this.plValidate('phone'),
|
|
203
|
+
userEmail:this.plValidate('email')
|
|
204
|
+
},//验证
|
|
205
|
+
userTypeArr:[],//用户类型
|
|
206
|
+
sexTypeArr:[
|
|
207
|
+
{value : '男',label : "男"},
|
|
208
|
+
{value : '女',label : "女"}
|
|
209
|
+
],//性别
|
|
210
|
+
formData:{
|
|
211
|
+
userAccount:"",userName:"",userType:"empower",userStatus:"10",orgId:""
|
|
212
|
+
},//表单数据初始化
|
|
213
|
+
developerId:"",
|
|
214
|
+
entEmpUserRole:"",
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
created(){
|
|
218
|
+
this.initLoginUser();
|
|
219
|
+
this.getData()
|
|
220
|
+
},
|
|
221
|
+
watch:{
|
|
222
|
+
isLoad(){
|
|
223
|
+
if(this.isLoad){
|
|
224
|
+
this.crud.search();
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
methods:{
|
|
229
|
+
/**
|
|
230
|
+
* 当前登录用户
|
|
231
|
+
*/
|
|
232
|
+
initLoginUser(){
|
|
233
|
+
let vm = this;
|
|
234
|
+
vm.axios.post(vm.api.sysUser.getLoginUser).then(function (res) {
|
|
235
|
+
vm.loginUser = res.data;
|
|
236
|
+
vm.getOrgDim();
|
|
237
|
+
vm.getEntDeptOrgId();
|
|
238
|
+
});
|
|
239
|
+
},
|
|
240
|
+
resetPwd(row){ // 重置密码
|
|
241
|
+
let [vm,userNameText] = [this,row.userName?row.userName:'用户'];
|
|
242
|
+
this.$confirm('确定要重置'+userNameText+'的密码?', '提示', {
|
|
243
|
+
confirmButtonText: '确定',
|
|
244
|
+
cancelButtonText: '取消',
|
|
245
|
+
type: 'warning',
|
|
246
|
+
beforeClose:function (action, instance, done) {
|
|
247
|
+
if(action == 'confirm'){
|
|
248
|
+
vm.axios.post(vm.api.sysUser.resetPwd,{"id":row.id}).then(function (res) {
|
|
249
|
+
done(); // 完成后提示并关闭窗口
|
|
250
|
+
vm.$message({
|
|
251
|
+
type:'success',
|
|
252
|
+
duration:1500,
|
|
253
|
+
message:res.data.operateMessage
|
|
254
|
+
});
|
|
255
|
+
});
|
|
256
|
+
}else{
|
|
257
|
+
done();
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}).catch(() => {
|
|
261
|
+
this.$message({
|
|
262
|
+
type: 'info',
|
|
263
|
+
message: '已取消'
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
},
|
|
267
|
+
getOrgDim(){
|
|
268
|
+
let vm = this;
|
|
269
|
+
vm.axios.post(vm.api.sysUser.getEntDeptDim).then(res => {
|
|
270
|
+
vm.orgDim = res.data;
|
|
271
|
+
vm.initCrud();
|
|
272
|
+
});
|
|
273
|
+
},
|
|
274
|
+
|
|
275
|
+
initCrud(){
|
|
276
|
+
let vm = this;
|
|
277
|
+
vm.crud.searchForm["empowerOrgDim"] = vm.orgDim;
|
|
278
|
+
vm.crud.searchForm["created"] = vm.loginUser.id;
|
|
279
|
+
vm.isLoad = true;
|
|
280
|
+
},
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* 初始化数据
|
|
284
|
+
*/
|
|
285
|
+
getData(){
|
|
286
|
+
let vm = this;
|
|
287
|
+
vm.axios.post(vm.api.param.getSysParams).then(function (res) {
|
|
288
|
+
let sysParamObj = res.data;
|
|
289
|
+
//用户类型
|
|
290
|
+
let paramValString = sysParamObj["SysUserType"]["paramVal"];
|
|
291
|
+
let result = JSON.parse(vm.platStringUtil.replaceAll(paramValString,"'","\""));
|
|
292
|
+
for(let [key,value] of Object.entries(result)){
|
|
293
|
+
vm.userTypeArr.push({"label":value,"value":key})
|
|
294
|
+
}
|
|
295
|
+
let developerId = sysParamObj["developerId"]["paramVal"];
|
|
296
|
+
vm.developerId = developerId;
|
|
297
|
+
|
|
298
|
+
let entEmpUserRole = sysParamObj["entEmpowerUserRole"]["paramVal"];
|
|
299
|
+
vm.entEmpUserRole = entEmpUserRole;
|
|
300
|
+
});
|
|
301
|
+
},
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* 当前登录用户对应的部门组织
|
|
305
|
+
*/
|
|
306
|
+
getEntDeptOrgId(){
|
|
307
|
+
let vm = this;
|
|
308
|
+
vm.axios.post(vm.api.sysUser.getUserEntDeptOrgId,{userName:vm.loginUser.userName}).then(res => {
|
|
309
|
+
vm.orgId = res.data.id;
|
|
310
|
+
});
|
|
311
|
+
},
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* 新增
|
|
315
|
+
*/
|
|
316
|
+
add(){
|
|
317
|
+
let vm = this;
|
|
318
|
+
vm.formData = {};
|
|
319
|
+
vm.formData = {userAccount:"",userName:"",userType:"empower",userStatus:"10",orgId:vm.orgId};
|
|
320
|
+
vm.addOrUpdateDialog = true;
|
|
321
|
+
vm.addOrUpdateTitle = "添加授权用户";
|
|
322
|
+
vm.$nextTick(function () {
|
|
323
|
+
vm.$refs.formDataRef.clearValidate(); // 再次添加清除原先的验证
|
|
324
|
+
});
|
|
325
|
+
},
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* 修改
|
|
329
|
+
*/
|
|
330
|
+
update(data){
|
|
331
|
+
let vm = this;
|
|
332
|
+
vm.formData = {};
|
|
333
|
+
vm.formData = {
|
|
334
|
+
id:data.id,orgId:data.orgId,userAccount:data.userAccount,
|
|
335
|
+
userName:data.userName,userStatus:data.userStatus,
|
|
336
|
+
userGender:data.userGender,userAge:data.userAge,
|
|
337
|
+
userQQ:data.userQQ,userPhone:data.userPhone,
|
|
338
|
+
userType:data.userType,userEmail:data.userEmail
|
|
339
|
+
};
|
|
340
|
+
vm.addOrUpdateDialog = true;
|
|
341
|
+
vm.addOrUpdateTitle = "修改授权用户";
|
|
342
|
+
},
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* 提交数据
|
|
346
|
+
*/
|
|
347
|
+
submitForm(){
|
|
348
|
+
let vm = this;
|
|
349
|
+
vm.$refs.formDataRef.validate(function (valid) {
|
|
350
|
+
if(valid){
|
|
351
|
+
vm.formData.parentUserTree = vm.developerId;
|
|
352
|
+
vm.formData.empowerId = vm.entEmpUserRole;
|
|
353
|
+
vm.formData.orgId = vm.orgId;
|
|
354
|
+
vm.formData.saveType = "ent";
|
|
355
|
+
|
|
356
|
+
vm.axios.post(vm.api.sysUser.saveEmpowerUser,vm.formData).then(res => {
|
|
357
|
+
if(res.data){
|
|
358
|
+
let type = "error";
|
|
359
|
+
if(res.data.operateSuccess){
|
|
360
|
+
type = "success";
|
|
361
|
+
vm.addOrUpdateDialog = false;
|
|
362
|
+
vm.crud.search();
|
|
363
|
+
}
|
|
364
|
+
vm.$message({
|
|
365
|
+
duration: 1000,
|
|
366
|
+
type: type,
|
|
367
|
+
message: res.data.operateMessage
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
},
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* 删除
|
|
377
|
+
*/
|
|
378
|
+
remove(){
|
|
379
|
+
let vm = this;
|
|
380
|
+
let selection = vm.$refs[vm.crud.setting.tableRef].selection ||[];
|
|
381
|
+
if(selection.length === 0){
|
|
382
|
+
vm.$message({
|
|
383
|
+
message:"请选择要删除的数据!",
|
|
384
|
+
duration:1500
|
|
385
|
+
});
|
|
386
|
+
return false;
|
|
387
|
+
}
|
|
388
|
+
vm.$confirm('用户删除时,该用户及其下级授权用户相关权限也将被删除且无法恢复,确认删除吗?', '提示', {
|
|
389
|
+
confirmButtonText: '确定',
|
|
390
|
+
cancelButtonText: '取消',
|
|
391
|
+
dangerouslyUseHTMLString: true
|
|
392
|
+
}).then(function () {
|
|
393
|
+
let arrIds = [];
|
|
394
|
+
selection.forEach(function (data) {
|
|
395
|
+
arrIds.push(data.id);
|
|
396
|
+
});
|
|
397
|
+
vm.axios.post(vm.api.sysUser.deleteEmowerUser,{"userIds": arrIds.join(",")}).then(res => {
|
|
398
|
+
let type = "error";
|
|
399
|
+
let msg = "删除失败!";
|
|
400
|
+
if(res.data.operateSuccess){
|
|
401
|
+
type = "success";
|
|
402
|
+
msg = "删除成功!";
|
|
403
|
+
}
|
|
404
|
+
vm.$message({
|
|
405
|
+
type: type,
|
|
406
|
+
message:msg
|
|
407
|
+
});
|
|
408
|
+
vm.crud.search();
|
|
409
|
+
});
|
|
410
|
+
});
|
|
411
|
+
},
|
|
412
|
+
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
</script>
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
|
|
3
|
+
<div class="empower-org-tree">
|
|
4
|
+
<div class="empower-user-tree-one">
|
|
5
|
+
<div class="empower-user-tree-two">
|
|
6
|
+
<pl-lazy style="height: 100%;width: 100%;display: inline-block;">
|
|
7
|
+
<el-aside style="width: 100%;height: 100%">
|
|
8
|
+
<el-header style=" width: 100%;height: auto;">
|
|
9
|
+
<el-select v-model="currentOrgDim" size="small" :disabled="dimIsDisabled" >
|
|
10
|
+
<el-option v-for="item in sysOrgDimArr" :key="item.id"
|
|
11
|
+
:label="item.dimName" :value="item.id"></el-option>
|
|
12
|
+
</el-select>
|
|
13
|
+
<el-input placeholder="组织名称" v-model="orgNameSearch" size="small">
|
|
14
|
+
</el-input>
|
|
15
|
+
</el-header>
|
|
16
|
+
<el-main style="height: calc(100% - 85px)">
|
|
17
|
+
<common-tree :request-url="api.sysOrg.listNopageDim" v-if="showTree"
|
|
18
|
+
:request-param="{'orgDim': currentOrgDim?currentOrgDim:sysOrgDimArr[0].id,'orgTreeId':orgTreeId}"
|
|
19
|
+
:parent-id="parentId" :default-props="defaultProps" :refreshProper="currentOrgDim"
|
|
20
|
+
:filter-text="orgNameSearch" :node-click="nodeClick" :checkbox="false" :deal-tree-data="dealTreeData"
|
|
21
|
+
:expand-onclick-node="false"
|
|
22
|
+
></common-tree>
|
|
23
|
+
</el-main>
|
|
24
|
+
</el-aside>
|
|
25
|
+
</pl-lazy>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script>
|
|
32
|
+
export default {
|
|
33
|
+
name: "empower-org-tree",
|
|
34
|
+
props:{
|
|
35
|
+
nodeClickCallBackFunc:{type:Function,default:null},//节点点击事件回调函数
|
|
36
|
+
initCallBackFunc:{type:Function,default:null},//初始化方法的回调函数
|
|
37
|
+
dealTreeDataCallBackFunc:{type:Function,default:null},//自定义数据回调函数
|
|
38
|
+
loginUser:{type:Object,default:function () {return {};}}//当前登录用户
|
|
39
|
+
},
|
|
40
|
+
data(){
|
|
41
|
+
return{
|
|
42
|
+
sysOrgDimArr: [], //所有组织维度
|
|
43
|
+
currentOrgDim: "", //当前选中的组织维度
|
|
44
|
+
defaultProps:{children: 'children', label: 'orgName'}, // 树组件的配置信息
|
|
45
|
+
showTree:false,
|
|
46
|
+
orgNameSearch:"",
|
|
47
|
+
parentId:"orgParentId",
|
|
48
|
+
dimIsDisabled: false,
|
|
49
|
+
orgTreeId:"",
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
created(){
|
|
53
|
+
this.initOrgDim();
|
|
54
|
+
},
|
|
55
|
+
watch:{
|
|
56
|
+
currentOrgDim(){
|
|
57
|
+
this.initCallBackFunc && this.initCallBackFunc(this.currentOrgDim);
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
methods:{
|
|
61
|
+
//初始化组织维度数据
|
|
62
|
+
initOrgDim() {
|
|
63
|
+
let vm = this;
|
|
64
|
+
vm.showTree = false;
|
|
65
|
+
vm.axios.post(vm.api.sysOrgDimension.find).then(res => {
|
|
66
|
+
let data = res.data;
|
|
67
|
+
for (let item of data) {
|
|
68
|
+
if (item.isUse === '1') {
|
|
69
|
+
vm.sysOrgDimArr.push(item);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
vm.initDefaultDimAndOrg();
|
|
74
|
+
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
initDefaultDimAndOrg(){
|
|
79
|
+
let vm = this;
|
|
80
|
+
if("sup" == vm.loginUser.userType){
|
|
81
|
+
vm.dimIsDisabled = false;
|
|
82
|
+
vm.currentOrgDim = vm.sysOrgDimArr[0].id;
|
|
83
|
+
vm.orgTreeId = "";
|
|
84
|
+
vm.loadTree();
|
|
85
|
+
}else{
|
|
86
|
+
vm.axios.post(vm.api.sysOrgPosUser.findNoPage,{userId:vm.loginUser.id,empowerUser:"true"}).then(res => {
|
|
87
|
+
let orgPosUserInfo = res.data[0];
|
|
88
|
+
vm.orgTreeId = orgPosUserInfo.orgId;
|
|
89
|
+
vm.dimIsDisabled = true;
|
|
90
|
+
vm.currentOrgDim = orgPosUserInfo.orgDim;
|
|
91
|
+
vm.loadTree();
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
loadTree(){
|
|
98
|
+
let vm = this;
|
|
99
|
+
(vm.sysOrgDimArr.length > 0) && (vm.showTree = true);
|
|
100
|
+
vm.initCallBackFunc && vm.initCallBackFunc(vm.currentOrgDim);
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
//节点点击事件
|
|
104
|
+
nodeClick(data,node){
|
|
105
|
+
let vm = this;
|
|
106
|
+
vm.nodeClickCallBackFunc && vm.nodeClickCallBackFunc(data,node);
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
//自定义数据
|
|
110
|
+
dealTreeData(dataArr){
|
|
111
|
+
let vm = this;
|
|
112
|
+
let treeDataArr = [];
|
|
113
|
+
for(let data of dataArr){
|
|
114
|
+
if(data.orgType == "ogn"){
|
|
115
|
+
data.className = "saspiconfont pl-icon-organ";
|
|
116
|
+
}
|
|
117
|
+
if(data.orgType == "dept"){
|
|
118
|
+
data.className = "saspiconfont pl-icon-msnui-alarm-inverse";
|
|
119
|
+
}
|
|
120
|
+
data.label = data.orgName;
|
|
121
|
+
treeDataArr.push(data);
|
|
122
|
+
}
|
|
123
|
+
let paramSetting = {};
|
|
124
|
+
paramSetting["id"] = "id";
|
|
125
|
+
paramSetting["pId"] = vm.parentId;
|
|
126
|
+
paramSetting["children"] = vm.defaultProps["children"]; // 设置children可配置
|
|
127
|
+
let data = vm.COMMON_FUNC.buildElTree(treeDataArr,paramSetting);
|
|
128
|
+
vm.dealTreeDataCallBackFunc && vm.dealTreeDataCallBackFunc(data);
|
|
129
|
+
},
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
</script>
|
|
133
|
+
|
|
134
|
+
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
135
|
+
.empower-org-tree{
|
|
136
|
+
.empower-user-tree-one{
|
|
137
|
+
width: 350px;
|
|
138
|
+
height: 100%;
|
|
139
|
+
position: relative;
|
|
140
|
+
box-sizing: border-box;
|
|
141
|
+
padding:10px 5px 8px 10px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.empower-user-tree-two{
|
|
145
|
+
border: 1px solid #ddd;
|
|
146
|
+
box-sizing: border-box;
|
|
147
|
+
padding: 5px;
|
|
148
|
+
width: 100%;
|
|
149
|
+
height: 100%;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.el-select{
|
|
153
|
+
width: 100%;
|
|
154
|
+
padding-top: 10px
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.el-input{
|
|
158
|
+
width: 100%;
|
|
159
|
+
margin-top: 10px
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.el-main{
|
|
163
|
+
padding-top: 10px;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
</style>
|