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,1101 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-container style="height: 100%;box-sizing: border-box;padding: 10px 10px 10px 5px">
|
|
3
|
+
<el-tabs type="border-card" class="orgTab">
|
|
4
|
+
<el-tab-pane :label="pageObj.ognName+'信息'">
|
|
5
|
+
<!--<span slot="label">-->
|
|
6
|
+
<!--<i class="el-icon-date"></i>-->
|
|
7
|
+
<!--{{pageObj.ognName}}信息-->
|
|
8
|
+
<!--<!–组织信息–>-->
|
|
9
|
+
<!--</span>-->
|
|
10
|
+
<el-container style="height: 100%">
|
|
11
|
+
<el-header style="height: auto;padding: 0px;padding-left: 5px;padding-right: 5px;">
|
|
12
|
+
<el-collapse class="org-collapse">
|
|
13
|
+
<el-collapse-item style="text-align: center;">
|
|
14
|
+
<template slot="title">
|
|
15
|
+
<i class="header-icon el-icon-info"></i>组织基本信息
|
|
16
|
+
</template>
|
|
17
|
+
<el-form :model="orgUser.orgObj" class="demo-form-inline">
|
|
18
|
+
<input type="hidden" v-model="orgUser.orgObj.id"/>
|
|
19
|
+
<el-form-item>
|
|
20
|
+
<el-row :gutter="20"
|
|
21
|
+
style="border-top: 1px solid #dddddd; border-left: 1px solid #dddddd">
|
|
22
|
+
<el-col :span="4">
|
|
23
|
+
<div class="grid-content bg-purple">组织名称:</div>
|
|
24
|
+
</el-col>
|
|
25
|
+
<el-col :span="8">
|
|
26
|
+
<div class="grid-content">
|
|
27
|
+
<el-input placeholder="请输入内容" style="width: 90%"
|
|
28
|
+
v-model="orgUser.orgObj.orgName"></el-input>
|
|
29
|
+
</div>
|
|
30
|
+
</el-col>
|
|
31
|
+
<el-col :span="4">
|
|
32
|
+
<div class="grid-content bg-purple">组织类型:</div>
|
|
33
|
+
</el-col>
|
|
34
|
+
<el-col :span="8">
|
|
35
|
+
<div class="grid-content">
|
|
36
|
+
<el-select v-model="orgUser.orgObj.orgTypeName" placeholder="请选择"
|
|
37
|
+
style="width: 90%" disabled></el-select>
|
|
38
|
+
</div>
|
|
39
|
+
</el-col>
|
|
40
|
+
</el-row>
|
|
41
|
+
<el-row :gutter="20" style=" border-left: 1px solid #dddddd" >
|
|
42
|
+
<el-col :span="4" v-if="orgUser.orgObj.orgType == 'dept'">
|
|
43
|
+
<div class="grid-content bg-purple">部门分类:</div>
|
|
44
|
+
</el-col>
|
|
45
|
+
<el-col :span="8" v-if="orgUser.orgObj.orgType == 'dept'">
|
|
46
|
+
<div class="grid-content">
|
|
47
|
+
<el-select v-model="orgUser.orgObj.orgClassify" placeholder="请选择"
|
|
48
|
+
style="width: 90%">
|
|
49
|
+
<el-option
|
|
50
|
+
v-for="item in orgClassify"
|
|
51
|
+
:key="item.value"
|
|
52
|
+
:label="item.label"
|
|
53
|
+
:value="item.value">
|
|
54
|
+
</el-option>
|
|
55
|
+
</el-select>
|
|
56
|
+
</div>
|
|
57
|
+
</el-col>
|
|
58
|
+
<el-col :span="4" v-if="orgUser.orgObj.orgType == 'dept'">
|
|
59
|
+
<div class="grid-content bg-purple">上级组织:</div>
|
|
60
|
+
</el-col>
|
|
61
|
+
<el-col :span="8" v-if="orgUser.orgObj.orgType == 'dept'">
|
|
62
|
+
<div class="grid-content">
|
|
63
|
+
<el-input style="width: 90%" :disabled="true"
|
|
64
|
+
v-model="orgUser.orgObj.orgParentName">
|
|
65
|
+
</el-input>
|
|
66
|
+
</div>
|
|
67
|
+
</el-col>
|
|
68
|
+
<el-col :span="4" v-if="orgUser.orgObj.orgType == 'ogn'">
|
|
69
|
+
<div class="grid-content bg-purple">上级组织:</div>
|
|
70
|
+
</el-col>
|
|
71
|
+
<el-col :span="20" v-if="orgUser.orgObj.orgType == 'ogn'">
|
|
72
|
+
<div class="grid-content">
|
|
73
|
+
<el-input style="width: 96%" :disabled="true"
|
|
74
|
+
v-model="orgUser.orgObj.orgParentName">
|
|
75
|
+
</el-input>
|
|
76
|
+
</div>
|
|
77
|
+
</el-col>
|
|
78
|
+
</el-row>
|
|
79
|
+
<el-row :gutter="20" style=" border-left: 1px solid #dddddd">
|
|
80
|
+
<el-col :span="4">
|
|
81
|
+
<div class="grid-content bg-purple">所属维度:</div>
|
|
82
|
+
</el-col>
|
|
83
|
+
<el-col :span="8">
|
|
84
|
+
<div class="grid-content">
|
|
85
|
+
<el-input style="width: 90%" v-model="orgUser.orgObj.orgDimName"
|
|
86
|
+
placeholder="请输入内容"
|
|
87
|
+
:disabled="true">
|
|
88
|
+
</el-input>
|
|
89
|
+
</div>
|
|
90
|
+
</el-col>
|
|
91
|
+
<el-col :span="4">
|
|
92
|
+
<div class="grid-content bg-purple">所在地区:</div>
|
|
93
|
+
</el-col>
|
|
94
|
+
<el-col :span="8">
|
|
95
|
+
<div class="grid-content">
|
|
96
|
+
<el-select v-model="orgUser.orgObj.streetName ||
|
|
97
|
+
orgUser.orgObj.areaName ||
|
|
98
|
+
orgUser.orgObj.cityName ||
|
|
99
|
+
orgUser.orgObj.provinceName" placeholder="请选择" :disabled="true"
|
|
100
|
+
style="width: 90%">
|
|
101
|
+
</el-select>
|
|
102
|
+
</div>
|
|
103
|
+
</el-col>
|
|
104
|
+
</el-row>
|
|
105
|
+
<el-button type="primary" @click="onSubmitOrg" style="margin-top: 10px;">保存</el-button>
|
|
106
|
+
</el-form-item>
|
|
107
|
+
</el-form>
|
|
108
|
+
</el-collapse-item>
|
|
109
|
+
</el-collapse>
|
|
110
|
+
</el-header>
|
|
111
|
+
<el-main style="height: 100%;">
|
|
112
|
+
<pl-page-table class="orgTable" ref="orgTable" :refreshTableByParam="orgId"
|
|
113
|
+
:showFieldArr="orgUser.showFieldArr" :tableHeight="orgUser.tableHeight"
|
|
114
|
+
:searchFormDataArr="orgUser.searchFormDataArr"
|
|
115
|
+
:searchParam="orgUser.searchParam" :initNoSearch="orgUser.initNoSearch"
|
|
116
|
+
:isShowClearCheck="false"
|
|
117
|
+
:noClearSearchColumns="orgUser.noClearSearchColumns"
|
|
118
|
+
:url="orgUser.url" :entityName="orgUser.entityName" :buttonArr="orgUser.buttonArr"
|
|
119
|
+
style="width: 100%;height: auto;border: 1px solid #dddddd"></pl-page-table>
|
|
120
|
+
</el-main>
|
|
121
|
+
</el-container>
|
|
122
|
+
</el-tab-pane>
|
|
123
|
+
<el-tab-pane class="tabPane2" :label="pageObj.posName+'信息'" v-if="!pageObj.closePos">
|
|
124
|
+
<!--<span slot="label">-->
|
|
125
|
+
<!--<i class="el-icon-date"></i>-->
|
|
126
|
+
<!--{{pageObj.posName}}信息-->
|
|
127
|
+
<!--</span>-->
|
|
128
|
+
<el-container>
|
|
129
|
+
<el-aside width="280px" style="line-height:0px;" class="commonTreeAside">
|
|
130
|
+
<el-row>
|
|
131
|
+
<el-button type="danger" icon="el-icon-delete" size="small" @click="getCheckedNodes">删除
|
|
132
|
+
</el-button>
|
|
133
|
+
<el-button type="success" icon="el-icon-check" size="small">保存</el-button>
|
|
134
|
+
<el-button type="warning" icon="el-icon-plus" size="small" @click="addPosOne">一级岗位</el-button>
|
|
135
|
+
</el-row>
|
|
136
|
+
<el-popover
|
|
137
|
+
placement="right"
|
|
138
|
+
width="100"
|
|
139
|
+
trigger="manual"
|
|
140
|
+
v-model="rightMenu">
|
|
141
|
+
<el-menu
|
|
142
|
+
class="el-menu-vertical-demo"
|
|
143
|
+
background-color="#545c64"
|
|
144
|
+
text-color="#fff"
|
|
145
|
+
@select="rightMenuSelect"
|
|
146
|
+
active-text-color="#ffd04b">
|
|
147
|
+
<el-menu-item index="1">
|
|
148
|
+
<i class="saspiconfont pl-icon-account"></i>
|
|
149
|
+
<span slot="title">添加同级岗位</span>
|
|
150
|
+
</el-menu-item>
|
|
151
|
+
<el-menu-item index="2">
|
|
152
|
+
<i class="saspiconfont pl-icon-yonghu2"></i>
|
|
153
|
+
<span slot="title">添加下级岗位</span>
|
|
154
|
+
</el-menu-item>
|
|
155
|
+
</el-menu>
|
|
156
|
+
<common-tree class="posTree" :requestUrl="treeUrl" :requestParam="requestParam"
|
|
157
|
+
parentId="parentPosId" slot="reference"
|
|
158
|
+
:nodeClick="nodeClick" :expandOnclickNode="false" ref="posTree"
|
|
159
|
+
:rightClick="rightClick"
|
|
160
|
+
:defaultProps="defaultProps"></common-tree>
|
|
161
|
+
</el-popover>
|
|
162
|
+
</el-aside>
|
|
163
|
+
<el-main style="border: 1px solid #dddddd;">
|
|
164
|
+
<el-container>
|
|
165
|
+
<el-header style="height: auto;text-align: center;">
|
|
166
|
+
<el-form :model="posObj" class="demo-form-inline">
|
|
167
|
+
<el-form-item>
|
|
168
|
+
<el-row :gutter="20"
|
|
169
|
+
style="border-top: 1px solid #dddddd; border-left: 1px solid #dddddd">
|
|
170
|
+
<el-col :span="4">
|
|
171
|
+
<div class="grid-content bg-purple">岗位名称:</div>
|
|
172
|
+
</el-col>
|
|
173
|
+
<el-col :span="8">
|
|
174
|
+
<div class="grid-content">
|
|
175
|
+
<el-input placeholder="请输入内容" style="width: 90%"
|
|
176
|
+
v-model="posObj.posName"></el-input>
|
|
177
|
+
</div>
|
|
178
|
+
</el-col>
|
|
179
|
+
<el-col :span="4">
|
|
180
|
+
<div class="grid-content bg-purple">是否是主岗位:</div>
|
|
181
|
+
</el-col>
|
|
182
|
+
<el-col :span="8">
|
|
183
|
+
<div class="grid-content">
|
|
184
|
+
<el-radio v-model="posObj.isMainpos" label="1">是</el-radio>
|
|
185
|
+
<el-radio v-model="posObj.isMainpos" label="0">否</el-radio>
|
|
186
|
+
</div>
|
|
187
|
+
</el-col>
|
|
188
|
+
</el-row>
|
|
189
|
+
<el-row :gutter="20" style=" border-left: 1px solid #dddddd">
|
|
190
|
+
<el-col :span="4">
|
|
191
|
+
<div class="grid-content bg-purple">所属组织:</div>
|
|
192
|
+
</el-col>
|
|
193
|
+
<el-col :span="8">
|
|
194
|
+
<div class="grid-content">
|
|
195
|
+
<el-input style="width: 90%" v-model="posObj.orgName"
|
|
196
|
+
:disabled="true"></el-input>
|
|
197
|
+
</div>
|
|
198
|
+
</el-col>
|
|
199
|
+
<el-col :span="4">
|
|
200
|
+
<div class="grid-content bg-purple">上级岗位:</div>
|
|
201
|
+
</el-col>
|
|
202
|
+
<el-col :span="8">
|
|
203
|
+
<div class="grid-content">
|
|
204
|
+
<el-input style="width: 90%" placeholder="请输入内容" :disabled="true"
|
|
205
|
+
v-model="posObj.parentPosName">
|
|
206
|
+
</el-input>
|
|
207
|
+
</div>
|
|
208
|
+
</el-col>
|
|
209
|
+
</el-row>
|
|
210
|
+
<el-button type="primary" @click="onSubmitPos" style="margin-top: 10px;">保存</el-button>
|
|
211
|
+
</el-form-item>
|
|
212
|
+
</el-form>
|
|
213
|
+
<el-dialog :close-on-click-modal=false title="添加岗位" class="addPos" :visible.sync="posUser.selPosUserDialog" width="50%"
|
|
214
|
+
center>
|
|
215
|
+
<el-row :gutter="20" style="margin-bottom: 10px;">
|
|
216
|
+
<el-col :span="6" style="text-align: center;line-height: 24px;">岗位名称:</el-col>
|
|
217
|
+
<el-col :span="6" style="text-align: left;">
|
|
218
|
+
<el-input style="line-height: 24px;" v-model="addPosObj.posName"></el-input>
|
|
219
|
+
</el-col>
|
|
220
|
+
<el-col :span="6" style="text-align: center;line-height: 24px;">是否是主岗位:</el-col>
|
|
221
|
+
<el-col :span="6" style="text-align: left;">
|
|
222
|
+
<el-radio v-model="addPosObj.isMainpos" label="1">是</el-radio>
|
|
223
|
+
<el-radio v-model="addPosObj.isMainpos" label="0">否</el-radio>
|
|
224
|
+
</el-col>
|
|
225
|
+
</el-row>
|
|
226
|
+
<el-row :gutter="20" style="margin-bottom: 10px;">
|
|
227
|
+
<el-col :span="6" style="text-align: center;line-height: 24px;">所属组织:</el-col>
|
|
228
|
+
<el-col :span="6" style="text-align: left;">
|
|
229
|
+
<el-input style="line-height: 24px;" v-model="addPosObj.orgName"
|
|
230
|
+
:disabled="true"></el-input>
|
|
231
|
+
</el-col>
|
|
232
|
+
<el-col :span="6" style="text-align: center;line-height: 24px;">上级岗位:</el-col>
|
|
233
|
+
<el-col :span="6" style="text-align: left;">
|
|
234
|
+
<el-input style="line-height: 24px;" v-model="addPosObj.parentPosName"
|
|
235
|
+
:disabled="true"></el-input>
|
|
236
|
+
</el-col>
|
|
237
|
+
</el-row>
|
|
238
|
+
<span slot="footer" class="dialog-footer">
|
|
239
|
+
<el-button type="primary" @click="addPos" size="small" icon="el-icon-success">确 定</el-button>
|
|
240
|
+
<el-button type="primary" @click="posUser.selPosUserDialog=false" size="small" icon="el-icon-error">取 消</el-button>
|
|
241
|
+
</span>
|
|
242
|
+
</el-dialog>
|
|
243
|
+
</el-header>
|
|
244
|
+
<el-main style="height: 100%;">
|
|
245
|
+
<pl-page-table class="posTable" ref="posTable"
|
|
246
|
+
:searchParam="posUser.searchParam" :initNoSearch="posUser.initNoSearch"
|
|
247
|
+
:noClearSearchColumns="posUser.noClearSearchColumns"
|
|
248
|
+
:showFieldArr="posUser.showFieldArr" :tableHeight="posUser.tableHeight"
|
|
249
|
+
:isShowClearCheck="false"
|
|
250
|
+
:url="posUser.url" :entityName="posUser.entityName"
|
|
251
|
+
:buttonArr="posUser.buttonArr" style="width: 100%;"></pl-page-table>
|
|
252
|
+
</el-main>
|
|
253
|
+
</el-container>
|
|
254
|
+
</el-main>
|
|
255
|
+
</el-container>
|
|
256
|
+
</el-tab-pane>
|
|
257
|
+
|
|
258
|
+
<el-dialog :close-on-click-modal=false title="选择用户" class="selectOrgUser" :visible.sync="selectOrgUser" width="80%" height="95%" top="2vh">
|
|
259
|
+
<pl-page-table class="selUser" ref="selUser"
|
|
260
|
+
:showFieldArr="orgUserSelect.showFieldArr" :tableHeight="orgUserSelect.tableHeight"
|
|
261
|
+
:searchFormDataArr="orgUserSelect.searchFormDataArr"
|
|
262
|
+
:searchParam="orgUserSelect.searchParam" :isShowClearCheck="false"
|
|
263
|
+
:noClearSearchColumns="orgUserSelect.noClearSearchColumns"
|
|
264
|
+
:url="orgUserSelect.url" :entityName="orgUserSelect.entityName"
|
|
265
|
+
:buttonArr="orgUserSelect.buttonArr" :formatterFunc="formatterColumn"
|
|
266
|
+
style="width: 100%;height: auto;border: 1px solid #dddddd"></pl-page-table>
|
|
267
|
+
</el-dialog>
|
|
268
|
+
<el-dialog :close-on-click-modal=false title="用户排序" class="updateOrgUser" :visible.sync="orgUserSelect.selOrgUserDialog" width="30%" center>
|
|
269
|
+
<el-row :gutter="20" v-for="(user,index) in orgUserSelect.selOrgUserArr" :key="index" style="margin-bottom: 10px;">
|
|
270
|
+
<el-col :span="12" style="text-align: center;line-height: 24px;">{{user.userName}}</el-col>
|
|
271
|
+
<el-col :span="12">
|
|
272
|
+
<el-input style="line-height: 24px;"
|
|
273
|
+
v-model="orgUserSelect.orgPosUserArr.length+index+1"></el-input>
|
|
274
|
+
</el-col>
|
|
275
|
+
</el-row>
|
|
276
|
+
<span slot="footer" class="dialog-footer">
|
|
277
|
+
<el-button type="primary" @click="addSelOrgUser" size="small" icon="el-icon-success">确 定</el-button>
|
|
278
|
+
</span>
|
|
279
|
+
</el-dialog>
|
|
280
|
+
<el-dialog :close-on-click-modal=false title="修改用户顺序" class="updateOrgUser" :visible.sync="selOrgUserDialog" width="30%" center >
|
|
281
|
+
<el-row :gutter="20" v-for="user,index in selOrgUserArr" :key="index" style="margin-bottom: 10px;">
|
|
282
|
+
<el-col :span="12" style="text-align: center;line-height: 24px;">{{user.userName}}</el-col>
|
|
283
|
+
<el-col :span="12">
|
|
284
|
+
<el-input style="line-height: 24px;" v-model="user.userLayer"></el-input>
|
|
285
|
+
</el-col>
|
|
286
|
+
</el-row>
|
|
287
|
+
<span slot="footer" class="dialog-footer">
|
|
288
|
+
<el-button type="primary" @click="updateOrgUserLayer" size="small" icon="el-icon-success">确 定</el-button>
|
|
289
|
+
</span>
|
|
290
|
+
</el-dialog>
|
|
291
|
+
</el-tabs>
|
|
292
|
+
<el-dialog :close-on-click-modal=false title="添加用户" :visible.sync="addUserDialog">
|
|
293
|
+
<el-form :model="addUserForm" ref="addUserRef">
|
|
294
|
+
<el-row>
|
|
295
|
+
<el-col :span="12">
|
|
296
|
+
<el-form-item label="用户账号" label-width="150px" prop="userAccount" :rules="plValidate('required')">
|
|
297
|
+
<el-input v-model="addUserForm.userAccount"></el-input>
|
|
298
|
+
</el-form-item>
|
|
299
|
+
</el-col>
|
|
300
|
+
<el-col :span="12">
|
|
301
|
+
<el-form-item label="用户名称" label-width="150px" prop="userName" :rules="plValidate('required')">
|
|
302
|
+
<el-input v-model="addUserForm.userName"></el-input>
|
|
303
|
+
</el-form-item>
|
|
304
|
+
</el-col>
|
|
305
|
+
<el-col :span="12">
|
|
306
|
+
<el-form-item label="用户类型" label-width="150px" prop="userType" :rules="plValidate('required')">
|
|
307
|
+
<el-select v-model="addUserForm.userType" style="width: 100%">
|
|
308
|
+
<el-option v-for="(item,index) in userTypeOptions" :key="index" :label="item.label" :value="item.value">
|
|
309
|
+
</el-option>
|
|
310
|
+
</el-select>
|
|
311
|
+
</el-form-item>
|
|
312
|
+
</el-col>
|
|
313
|
+
<el-col :span="12">
|
|
314
|
+
<el-form-item label="用户状态" label-width="150px" prop="userStatus" :rules="plValidate('required')">
|
|
315
|
+
<el-select v-model="addUserForm.userStatus" style="width: 100%">
|
|
316
|
+
<el-option v-for="(item,index) in statusOptions" :key="index" :label="item.label" :value="item.value">
|
|
317
|
+
</el-option>
|
|
318
|
+
</el-select>
|
|
319
|
+
</el-form-item>
|
|
320
|
+
</el-col>
|
|
321
|
+
</el-row>
|
|
322
|
+
</el-form>
|
|
323
|
+
<div slot="footer" class="dialog-footer">
|
|
324
|
+
<el-button type="primary" @click="saveUser()" size="small" icon="el-icon-success">确 定</el-button>
|
|
325
|
+
<el-button @click="addUserDialog = false" size="small" icon="el-icon-error">取 消</el-button>
|
|
326
|
+
</div>
|
|
327
|
+
</el-dialog>
|
|
328
|
+
</el-container>
|
|
329
|
+
</template>
|
|
330
|
+
|
|
331
|
+
<script>
|
|
332
|
+
|
|
333
|
+
export default {
|
|
334
|
+
name: "sys-org-pos-user-tree",
|
|
335
|
+
props: {
|
|
336
|
+
orgId: {type: String, default: '$'},
|
|
337
|
+
orgDim: {type: String, default: '$'},
|
|
338
|
+
orgObj: {type: Object, default: function () {return {}}},
|
|
339
|
+
pageObj:{type:Object,default:function(){return {}}},
|
|
340
|
+
updateCallBack:{type:Function,default:null}
|
|
341
|
+
},
|
|
342
|
+
data() {
|
|
343
|
+
return {
|
|
344
|
+
orgUser: {
|
|
345
|
+
url: this.api.sysOrgPosUser.url,
|
|
346
|
+
entityName: 'sysOrgPosUser',
|
|
347
|
+
showFieldArr: [
|
|
348
|
+
{'fieldName': '用户名称', 'field': 'userName'},
|
|
349
|
+
{'fieldName': '所属组织', 'field': 'orgName'},
|
|
350
|
+
{'fieldName': '用户账号', 'field': 'userAccount'},
|
|
351
|
+
{'fieldName': '用户顺序', 'field': 'userLayer'}],
|
|
352
|
+
searchParam: {
|
|
353
|
+
"orgId": this.$props.orgId,
|
|
354
|
+
"posIdIsNull": "Y"
|
|
355
|
+
},
|
|
356
|
+
initNoSearch: false,
|
|
357
|
+
noClearSearchColumns: ['orgId', 'posIdIsNull'],
|
|
358
|
+
searchFormDataArr: [{type: 'el-input', field: 'userName', fieldName: '用户名称'}, {
|
|
359
|
+
type: 'el-input',
|
|
360
|
+
field: 'userAccount',
|
|
361
|
+
fieldName: '用户账号'
|
|
362
|
+
}],
|
|
363
|
+
buttonArr: [{type: 'success', name: "从用户列表选择", icon: "el-icon-check", clickFn: this.OrgUserselect},
|
|
364
|
+
{type: 'primary ', name: "调整用户顺序", icon: "el-icon-edit", clickFn: this.userOrgLayerUpdate},
|
|
365
|
+
{type: 'danger', name: "删除", icon: "el-icon-delete", clickFn: this.deleteOrgUser}],
|
|
366
|
+
tableHeight: '100%',
|
|
367
|
+
orgObj: {},
|
|
368
|
+
optOrgObj:{
|
|
369
|
+
'orgName':'',
|
|
370
|
+
'orgParentId':'',
|
|
371
|
+
'orgParentTree':'',
|
|
372
|
+
'orgDim':'',
|
|
373
|
+
'orgType':'',
|
|
374
|
+
'sort':'',
|
|
375
|
+
'layer':'',
|
|
376
|
+
'orgClassify':'',
|
|
377
|
+
'regionId':'',
|
|
378
|
+
'id':''
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
orgUserSelect: {
|
|
382
|
+
url: this.api.sysUser.url,
|
|
383
|
+
entityName: 'sysUser',
|
|
384
|
+
showFieldArr: [
|
|
385
|
+
{'fieldName': '用户账号', 'field': 'userAccount'},
|
|
386
|
+
{'fieldName': '用户名称', 'field': 'userName'},
|
|
387
|
+
{'fieldName': '用户类型', 'field': 'userType'},
|
|
388
|
+
{'fieldName': '当前状态', 'field': 'userStatus'}],
|
|
389
|
+
searchParam: {
|
|
390
|
+
"unsup": 'sup',
|
|
391
|
+
"userType": this.$props.pageObj.chooseUserType,
|
|
392
|
+
'noSearchUserByOrgId': this.$props.orgId,
|
|
393
|
+
'noSearchUserByPosId': this.posId,
|
|
394
|
+
'orgDim': this.$props.orgDim
|
|
395
|
+
},
|
|
396
|
+
noClearSearchColumns: ['unsup', 'userType', 'noSearchUserByOrgId', 'noSearchUserByPosId', 'orgDim'],
|
|
397
|
+
initNoSearch: false,
|
|
398
|
+
searchFormDataArr: [
|
|
399
|
+
{type: 'el-input', field: 'userNamePinYin', fieldName: '用户名称'},
|
|
400
|
+
{type: 'el-input', field: 'userAccountsearch', fieldName: '用户账号'},
|
|
401
|
+
{type: 'el-input', field: 'userStatus', fieldName: '用户状态'}
|
|
402
|
+
],
|
|
403
|
+
buttonArr: [{type: 'success', name: "选择", icon: "el-icon-check", clickFn: this.onSelOrgUserLayer},
|
|
404
|
+
{type: 'primary ', name: "添加", icon: "el-icon-edit", clickFn: this.addOrgUser}],
|
|
405
|
+
tableHeight: '100%',
|
|
406
|
+
selOrgUserArr: [],
|
|
407
|
+
orgPosUserArr: [],
|
|
408
|
+
sort: 0,
|
|
409
|
+
selOrgUserDialog: false,
|
|
410
|
+
userStatusMap:{
|
|
411
|
+
10:"正常",
|
|
412
|
+
20:"锁定",
|
|
413
|
+
30:"暂时锁定"
|
|
414
|
+
},
|
|
415
|
+
userTypeMap:{
|
|
416
|
+
'ent':'企业用户',
|
|
417
|
+
'gov':'政府用户',
|
|
418
|
+
'sup':'开发用户',
|
|
419
|
+
'dev':'开发用户',
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
posUser: {
|
|
423
|
+
url: this.api.sysOrgPosUser.url,
|
|
424
|
+
entityName: 'sysUser',
|
|
425
|
+
showFieldArr: [
|
|
426
|
+
{'fieldName': '用户名称', 'field': 'userName'},
|
|
427
|
+
{'fieldName': '所属组织', 'field': 'orgName'},
|
|
428
|
+
{'fieldName': '所属岗位', 'field': 'posName'},
|
|
429
|
+
{'fieldName': '用户顺序', 'field': 'userLayer'}],
|
|
430
|
+
searchParam: {
|
|
431
|
+
"unsup": 'sup',
|
|
432
|
+
"userType": this.$props.pageObj.chooseUserType,
|
|
433
|
+
'orgId': this.$props.orgId,
|
|
434
|
+
'posId': this.posId,
|
|
435
|
+
'orgDim': this.$props.orgDim
|
|
436
|
+
},
|
|
437
|
+
initNoSearch: false,
|
|
438
|
+
noClearSearchColumns: ['orgId', 'posIdIsNull'],
|
|
439
|
+
buttonArr: [{type: 'success', name: "从用户列表选择", icon: "el-icon-check", clickFn: this.OrgUserselect},
|
|
440
|
+
{type: 'primary ', name: "调整用户顺序", icon: "el-icon-edit", clickFn: this.userOrgLayerUpdate},
|
|
441
|
+
{type: 'danger', name: "删除", icon: "el-icon-delete", clickFn: this.deleteOrgUser}],
|
|
442
|
+
tableHeight: '100%',
|
|
443
|
+
selOrgUserArr: [],
|
|
444
|
+
orgPosUserArr: [],
|
|
445
|
+
sort: 0,
|
|
446
|
+
selPosUserDialog: false
|
|
447
|
+
},
|
|
448
|
+
treeUrl: this.api.sysPos.find,
|
|
449
|
+
requestParam: {"conditionMap.orgId": this.$props.orgId || '&'},
|
|
450
|
+
defaultProps: {'label': 'posName'},
|
|
451
|
+
selectOrgUser: false,
|
|
452
|
+
selOrgUserDialog: false,
|
|
453
|
+
selOrgUserArr: [],
|
|
454
|
+
posObj: {},
|
|
455
|
+
optPosObj:{
|
|
456
|
+
'orgId':'',
|
|
457
|
+
'parentPosId':'',
|
|
458
|
+
'parentPosTree':'',
|
|
459
|
+
'posName':'',
|
|
460
|
+
'id':'',
|
|
461
|
+
'isMainpos':'',
|
|
462
|
+
'layer':'',
|
|
463
|
+
'sort':''
|
|
464
|
+
},
|
|
465
|
+
addPosObj: {
|
|
466
|
+
orgId: '',
|
|
467
|
+
parentPosId: '-1',
|
|
468
|
+
parentPosTree: '-1',
|
|
469
|
+
posName: '',
|
|
470
|
+
isMainpos: '1',
|
|
471
|
+
sort: '1',
|
|
472
|
+
layer: '1',
|
|
473
|
+
orgDim: '',
|
|
474
|
+
orgName: '',
|
|
475
|
+
parentPosName: '无',
|
|
476
|
+
id: ''
|
|
477
|
+
},
|
|
478
|
+
rightMenu: false,
|
|
479
|
+
rightNode: null,
|
|
480
|
+
posId: '&',
|
|
481
|
+
orgClassify:[{value:'0',label:'普通部门'},{value:'1',label:'处室'},{value:'2',label:'安监局'}],
|
|
482
|
+
addUserDialog:false,
|
|
483
|
+
addUserForm:{},
|
|
484
|
+
statusOptions:[
|
|
485
|
+
{value : '10',label : "正常"},
|
|
486
|
+
{value : '20',label : "锁定"}
|
|
487
|
+
], // 用户状态下拉框
|
|
488
|
+
userTypeOptions:[], // 用户类型下拉框
|
|
489
|
+
typeOptions:[]
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
watch: {
|
|
493
|
+
orgId() {
|
|
494
|
+
this.initList();
|
|
495
|
+
},
|
|
496
|
+
orgDim(){
|
|
497
|
+
this.initList();
|
|
498
|
+
},
|
|
499
|
+
},
|
|
500
|
+
created() {
|
|
501
|
+
let vm = this;
|
|
502
|
+
vm.axios.post(vm.api.param.getSysParams).then(function (res) { // 是否可以修改用户详情,获取用户的类型
|
|
503
|
+
let sysParamObj = res.data;
|
|
504
|
+
let paramValString = sysParamObj["SysUserType"]["paramVal"];
|
|
505
|
+
let result = JSON.parse(vm.platStringUtil.replaceAll(paramValString, "'", "\""));
|
|
506
|
+
for (let key in result) {
|
|
507
|
+
if (result.hasOwnProperty(key)) {
|
|
508
|
+
vm.typeOptions.push({"label": result[key], "value": key})
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
this.initList();
|
|
513
|
+
},
|
|
514
|
+
methods: {
|
|
515
|
+
initList() {
|
|
516
|
+
let vm = this;
|
|
517
|
+
vm.orgUser.orgObj = vm.$props.orgObj;
|
|
518
|
+
vm.orgUser.searchParam['orgId'] = vm.$props.orgId || '&';
|
|
519
|
+
vm.posUser.searchParam['orgId'] = vm.$props.orgId || '&';
|
|
520
|
+
vm.orgUserSelect.searchParam['userType'] = vm.$props.pageObj.chooseUserType;
|
|
521
|
+
vm.orgUserSelect.searchParam['noSearchUserByOrgId'] = vm.$props.orgId;
|
|
522
|
+
vm.orgUserSelect.searchParam['noSearchUserByPosId'] = vm.posId;
|
|
523
|
+
vm.orgUserSelect.searchParam['orgDim'] = vm.$props.orgDim;
|
|
524
|
+
vm.requestParam['conditionMap.orgId'] = vm.$props.orgId || '&';
|
|
525
|
+
if(Object.keys(vm.$refs).length && !vm.pageObj.closePos){
|
|
526
|
+
vm.$nextTick(function () {
|
|
527
|
+
vm.$refs.posTree.init();
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
},
|
|
531
|
+
OrgUserselect() {
|
|
532
|
+
let vm = this;
|
|
533
|
+
if(!vm.orgId){
|
|
534
|
+
vm.$message({
|
|
535
|
+
duration:1500,
|
|
536
|
+
message:"请选择左侧组织后再操作!"
|
|
537
|
+
});
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
this.selectOrgUser = true;
|
|
541
|
+
this.$nextTick(function () {
|
|
542
|
+
this.$refs.selUser.refreshTable();
|
|
543
|
+
})
|
|
544
|
+
},
|
|
545
|
+
userOrgLayerUpdate() {
|
|
546
|
+
let vm = this;
|
|
547
|
+
let url = '';
|
|
548
|
+
let param = {};
|
|
549
|
+
if(!vm.orgId){
|
|
550
|
+
vm.$message({
|
|
551
|
+
duration:1500,
|
|
552
|
+
message:"请选择左侧组织后再操作!"
|
|
553
|
+
});
|
|
554
|
+
return;
|
|
555
|
+
}
|
|
556
|
+
vm.selOrgUserArr = [];
|
|
557
|
+
if(vm.posId && vm.posId != '&'){
|
|
558
|
+
url = vm.posUser.url;
|
|
559
|
+
param = vm.posUser.searchParam;
|
|
560
|
+
}else{
|
|
561
|
+
url = vm.orgUser.url;
|
|
562
|
+
param = vm.orgUser.searchParam;
|
|
563
|
+
}
|
|
564
|
+
vm.axios.post(url + '/listNoPage',
|
|
565
|
+
param).then(function (returnData) {
|
|
566
|
+
vm.selOrgUserArr = returnData.data;
|
|
567
|
+
vm.selOrgUserDialog = true;
|
|
568
|
+
if(vm.posId && vm.posId != '&'){
|
|
569
|
+
vm.$refs.posTable.refreshTable();
|
|
570
|
+
}else{
|
|
571
|
+
vm.$refs.orgTable.refreshTable();
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
},
|
|
575
|
+
updateOrgUserLayer() {
|
|
576
|
+
let vm = this;
|
|
577
|
+
let datas = {};
|
|
578
|
+
for (let i = 0; i < vm.selOrgUserArr.length; i++) {
|
|
579
|
+
datas["sysOrgPosUsers[" + i + "].id"] = vm.selOrgUserArr[i].id;
|
|
580
|
+
datas["sysOrgPosUsers[" + i + "].userLayer"] = vm.selOrgUserArr[i].userLayer;
|
|
581
|
+
}
|
|
582
|
+
vm.axios.post(vm.api.sysOrgPosUser.batchUpdate,
|
|
583
|
+
datas).then(function (returnData) {
|
|
584
|
+
let operate = returnData.data;
|
|
585
|
+
let type = 'success';
|
|
586
|
+
let msg = operate.operateMessage;
|
|
587
|
+
if (operate.operateSuccess) {
|
|
588
|
+
type = 'warning';
|
|
589
|
+
}
|
|
590
|
+
vm.$message({
|
|
591
|
+
message: msg,
|
|
592
|
+
type: type
|
|
593
|
+
});
|
|
594
|
+
if(vm.posId && vm.posId!='&'){
|
|
595
|
+
vm.$refs.posTable.refreshTable();
|
|
596
|
+
}else{
|
|
597
|
+
vm.$refs.orgTable.refreshTable();
|
|
598
|
+
}
|
|
599
|
+
vm.selOrgUserDialog = false;
|
|
600
|
+
});
|
|
601
|
+
},
|
|
602
|
+
deleteOrgUser() {
|
|
603
|
+
let vm = this;
|
|
604
|
+
let multipleSelection = vm.$refs.orgTable.multipleSelection;
|
|
605
|
+
let idArr = [];
|
|
606
|
+
for (let k in multipleSelection) {
|
|
607
|
+
if (multipleSelection.hasOwnProperty(k)) {
|
|
608
|
+
idArr.push(k);
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
if(idArr.length == 0){
|
|
612
|
+
vm.$message({
|
|
613
|
+
duration: 1500,
|
|
614
|
+
type: 'info',
|
|
615
|
+
message: '请至少选择一条需要删除的数据!'
|
|
616
|
+
});
|
|
617
|
+
return;
|
|
618
|
+
}
|
|
619
|
+
vm.axios.post(vm.api.sysOrgPosUser.delete,
|
|
620
|
+
{'ids': idArr.toString()}).then(function (returnData) {
|
|
621
|
+
let operate = returnData.data;
|
|
622
|
+
let type = 'success';
|
|
623
|
+
let msg = operate.operateMessage;
|
|
624
|
+
if (operate.operateSuccess) {
|
|
625
|
+
type = 'warning';
|
|
626
|
+
}
|
|
627
|
+
vm.$message({
|
|
628
|
+
message: msg,
|
|
629
|
+
type: type
|
|
630
|
+
});
|
|
631
|
+
vm.$refs.orgTable.refreshTable();
|
|
632
|
+
});
|
|
633
|
+
},
|
|
634
|
+
onSelOrgUserLayer() {
|
|
635
|
+
let vm = this;
|
|
636
|
+
let multipleSelection = vm.$refs.selUser.multipleSelection;
|
|
637
|
+
if(Object.keys(multipleSelection).length == 0){
|
|
638
|
+
vm.$message({
|
|
639
|
+
duration:1200,
|
|
640
|
+
message:"请至少选择一个用户",
|
|
641
|
+
});
|
|
642
|
+
return;
|
|
643
|
+
}
|
|
644
|
+
vm.orgUserSelect.selOrgUserArr = [];
|
|
645
|
+
for (let key in multipleSelection) {
|
|
646
|
+
if (multipleSelection.hasOwnProperty(key)) {
|
|
647
|
+
vm.orgUserSelect.selOrgUserArr.push(multipleSelection[key]);
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
// 获取当前系统中已有的排序
|
|
651
|
+
if (vm.posId && vm.posId != '&') {
|
|
652
|
+
vm.axios.post(vm.api.sysOrgPosUser.find,
|
|
653
|
+
{
|
|
654
|
+
"sort": "TB.USER_LAYER",
|
|
655
|
+
"order": "1",
|
|
656
|
+
"conditionMap.posId": vm.posId
|
|
657
|
+
}).then(function (returnData) {
|
|
658
|
+
vm.orgUserSelect.orgPosUserArr = returnData.data;
|
|
659
|
+
vm.orgUserSelect.selOrgUserDialog = true;
|
|
660
|
+
vm.sort = Number(returnData.data.length) + 1;
|
|
661
|
+
});
|
|
662
|
+
} else {
|
|
663
|
+
vm.axios.post(vm.api.sysOrgPosUser.find,
|
|
664
|
+
{
|
|
665
|
+
"sort": "TB.USER_LAYER",
|
|
666
|
+
"order": "1",
|
|
667
|
+
"conditionMap.posIdIsNull": "Y",
|
|
668
|
+
"conditionMap.orgId": vm.$props.orgId
|
|
669
|
+
}).then(function (returnData) {
|
|
670
|
+
vm.orgUserSelect.orgPosUserArr = returnData.data;
|
|
671
|
+
vm.orgUserSelect.selOrgUserDialog = true;
|
|
672
|
+
vm.sort = Number(returnData.data.length || 0) + 1;
|
|
673
|
+
});
|
|
674
|
+
|
|
675
|
+
}
|
|
676
|
+
},
|
|
677
|
+
addSelOrgUser(str) {
|
|
678
|
+
let vm = this;
|
|
679
|
+
let idsArr = [];
|
|
680
|
+
let layerArr = [];
|
|
681
|
+
let datas = {};
|
|
682
|
+
let posId = '';
|
|
683
|
+
if(vm.posId && vm.posId != '&'){
|
|
684
|
+
posId = vm.posId;
|
|
685
|
+
}
|
|
686
|
+
for (let key in vm.orgUserSelect.selOrgUserArr) {
|
|
687
|
+
if (vm.orgUserSelect.selOrgUserArr.hasOwnProperty(key)) {
|
|
688
|
+
idsArr.push(vm.orgUserSelect.selOrgUserArr[key].id);
|
|
689
|
+
layerArr.push(Number(vm.sort) + Number(key));
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
for (let i = 0; i < idsArr.length; i++) {
|
|
694
|
+
datas["sysOrgPosUsers[" + i + "].userId"] = idsArr[i];
|
|
695
|
+
datas["sysOrgPosUsers[" + i + "].posId"] = posId;
|
|
696
|
+
datas["sysOrgPosUsers[" + i + "].orgId"] = vm.$props.orgId;
|
|
697
|
+
datas["sysOrgPosUsers[" + i + "].userLayer"] = layerArr[i];
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
vm.axios.post(vm.api.sysOrgPosUser.batchUpdate,
|
|
701
|
+
datas).then(function (returnData) {
|
|
702
|
+
let operate = returnData.data;
|
|
703
|
+
let type = 'success';
|
|
704
|
+
let msg = operate.operateMessage;
|
|
705
|
+
if (operate.operateSuccess) {
|
|
706
|
+
type = 'warning';
|
|
707
|
+
}
|
|
708
|
+
vm.$message({
|
|
709
|
+
message: msg,
|
|
710
|
+
type: type
|
|
711
|
+
});
|
|
712
|
+
if(vm.posId && vm.posId != '&'){
|
|
713
|
+
vm.$refs.posTable.refreshTable();
|
|
714
|
+
}else{
|
|
715
|
+
vm.$refs.orgTable.refreshTable();
|
|
716
|
+
}
|
|
717
|
+
vm.orgUserSelect.selOrgUserDialog = false;
|
|
718
|
+
vm.selectOrgUser = false;
|
|
719
|
+
});
|
|
720
|
+
},
|
|
721
|
+
addOrgUser() {// 添加用户
|
|
722
|
+
let vm = this;
|
|
723
|
+
vm.addUserForm = {};
|
|
724
|
+
vm.userTypeOptions = [];
|
|
725
|
+
let chooseUserTypeArr = (vm.pageObj["chooseUserType"] || "").split(",");
|
|
726
|
+
vm.typeOptions.forEach(function (type) {
|
|
727
|
+
if(chooseUserTypeArr.indexOf(type["value"]) > -1){
|
|
728
|
+
vm.userTypeOptions.push(type);
|
|
729
|
+
}
|
|
730
|
+
});
|
|
731
|
+
vm.$set(vm.addUserForm,"userType",chooseUserTypeArr[0]);
|
|
732
|
+
vm.addUserDialog = true;
|
|
733
|
+
vm.$nextTick(function () {
|
|
734
|
+
vm.$refs.addUserRef.clearValidate(); // 再次添加清除原先的验证
|
|
735
|
+
})
|
|
736
|
+
},
|
|
737
|
+
saveUser(){ // 保存用户
|
|
738
|
+
let vm = this;
|
|
739
|
+
vm.$refs.addUserRef.validate(function (valid) { // 表单验证
|
|
740
|
+
if (valid) {
|
|
741
|
+
vm.axios.post(vm.api.sysUser.validateAccountIsNotExists,
|
|
742
|
+
{"userAccount": vm.addUserForm.userAccount}).then(function (resValid) { // 验证账号是否存在
|
|
743
|
+
if (resValid.data) {
|
|
744
|
+
vm.axios.post(vm.api.sysUser.add,vm.addUserForm).then(function (res) {
|
|
745
|
+
vm.$message({
|
|
746
|
+
duration: 1000,
|
|
747
|
+
type: 'success',
|
|
748
|
+
message: res.data.operateMessage
|
|
749
|
+
});
|
|
750
|
+
vm.addUserDialog = false;
|
|
751
|
+
vm.$refs.selUser.refreshTable();
|
|
752
|
+
})
|
|
753
|
+
}else{
|
|
754
|
+
vm.$message({
|
|
755
|
+
message:"账号已存在!",
|
|
756
|
+
duration:1200,
|
|
757
|
+
type:"warning"
|
|
758
|
+
});
|
|
759
|
+
}
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
});
|
|
763
|
+
},
|
|
764
|
+
onSubmitOrg() {
|
|
765
|
+
let vm = this;
|
|
766
|
+
let datas = {};
|
|
767
|
+
|
|
768
|
+
if(!Object.keys(vm.orgUser.orgObj).length){
|
|
769
|
+
this.$message('当前无选中节点!');
|
|
770
|
+
return false;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
for (let key in vm.orgUser.optOrgObj) {
|
|
774
|
+
if(key!='children'){
|
|
775
|
+
datas['sysOrg.' + key] = vm.orgUser.orgObj[key];
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
vm.axios.post(vm.api.sysOrg.update,
|
|
779
|
+
datas).then(function (returnData) {
|
|
780
|
+
let operate = returnData.data;
|
|
781
|
+
let type = 'warning';
|
|
782
|
+
let msg = operate.operateMessage;
|
|
783
|
+
if (operate.operateSuccess) {
|
|
784
|
+
type = 'success';
|
|
785
|
+
vm.updateCallBack && vm.updateCallBack(operate.operateObj);
|
|
786
|
+
}
|
|
787
|
+
vm.$message({
|
|
788
|
+
message: msg,
|
|
789
|
+
type: type
|
|
790
|
+
});
|
|
791
|
+
});
|
|
792
|
+
},
|
|
793
|
+
onSubmitPos(){
|
|
794
|
+
let vm = this;
|
|
795
|
+
let datas = {};
|
|
796
|
+
let optStr = 'add';
|
|
797
|
+
if (vm.posObj.id) {
|
|
798
|
+
optStr = 'update';
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
if(!Object.keys(vm.posObj).length){
|
|
802
|
+
this.$message('当前无选中节点!');
|
|
803
|
+
return false;
|
|
804
|
+
}
|
|
805
|
+
for (let key in vm.optPosObj) {
|
|
806
|
+
if(key!='children'){
|
|
807
|
+
datas['sysPos.' + key] = vm.posObj[key];
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
vm.axios.post(vm.api.sysPos[optStr],
|
|
811
|
+
datas).then(function (returnData) {
|
|
812
|
+
let operate = returnData.data;
|
|
813
|
+
let type = 'success';
|
|
814
|
+
let msg = operate.operateMessage;
|
|
815
|
+
if (operate.operateSuccess) {
|
|
816
|
+
type = 'warning';
|
|
817
|
+
}
|
|
818
|
+
vm.$message({
|
|
819
|
+
message: msg,
|
|
820
|
+
type: type
|
|
821
|
+
});
|
|
822
|
+
});
|
|
823
|
+
},
|
|
824
|
+
addPosOne() {
|
|
825
|
+
let vm = this;
|
|
826
|
+
vm.addPosObj.orgId = vm.orgUser.orgObj.id;
|
|
827
|
+
vm.addPosObj.orgName = vm.orgUser.orgObj.orgName;
|
|
828
|
+
vm.addPosObj.orgDim = vm.orgUser.orgObj.orgDim;
|
|
829
|
+
vm.posUser.selPosUserDialog = true;
|
|
830
|
+
},
|
|
831
|
+
rightMenuSelect(index, indexPath) {
|
|
832
|
+
document.addEventListener('click', () => {
|
|
833
|
+
vm.rightMenu = !vm.rightMenu;
|
|
834
|
+
});
|
|
835
|
+
let vm = this;
|
|
836
|
+
vm.addPosObj.orgId = vm.orgUser.orgObj.id;
|
|
837
|
+
vm.addPosObj.orgName = vm.orgUser.orgObj.orgName;
|
|
838
|
+
vm.addPosObj.orgDim = vm.orgUser.orgObj.orgDim;
|
|
839
|
+
if (index == 1) {
|
|
840
|
+
vm.addPosObj.parentPosName = vm.rightNode.parentPosName;
|
|
841
|
+
vm.addPosObj.parentPosId = vm.rightNode.parentPosId;
|
|
842
|
+
vm.addPosObj.parentPosTree = vm.rightNode.parentPosTree;
|
|
843
|
+
vm.addPosObj.isMainpos = '0';
|
|
844
|
+
vm.addPosObj.sort = vm.rightNode.sort;
|
|
845
|
+
vm.addPosObj.layer = vm.rightNode.layer;
|
|
846
|
+
} else if (index == 2) {
|
|
847
|
+
vm.addPosObj.parentPosName = vm.rightNode.posName;
|
|
848
|
+
vm.addPosObj.parentPosId = vm.rightNode.id;
|
|
849
|
+
vm.addPosObj.parentPosTree = vm.rightNode.parentPosTree + vm.rightNode.id;
|
|
850
|
+
vm.addPosObj.isMainpos = '0';
|
|
851
|
+
if (vm.rightNode.children) {
|
|
852
|
+
vm.addPosObj.sort = vm.rightNode.children.length + 1;
|
|
853
|
+
} else {
|
|
854
|
+
vm.addPosObj.sort = 1;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
vm.addPosObj.layer = Number(vm.rightNode.layer) + 1;
|
|
858
|
+
}
|
|
859
|
+
vm.rightMenu = !vm.rightMenu;
|
|
860
|
+
vm.posUser.selPosUserDialog = true;
|
|
861
|
+
},
|
|
862
|
+
addPos() {
|
|
863
|
+
let vm = this;
|
|
864
|
+
let nodes = vm.$refs.posTree.getAllNode();
|
|
865
|
+
let mainNode = null;
|
|
866
|
+
let leyerArr = 0;
|
|
867
|
+
let beforeNode = null;
|
|
868
|
+
|
|
869
|
+
if (vm.addPosObj.layer == '1') {
|
|
870
|
+
for (let key in nodes) {
|
|
871
|
+
if (nodes[key].level == 1) {
|
|
872
|
+
if (leyerArr < Number(nodes[key].data.sort)) {
|
|
873
|
+
leyerArr = Number(nodes[key].data.sort);
|
|
874
|
+
beforeNode = nodes[key].data;
|
|
875
|
+
}
|
|
876
|
+
if (nodes[key].data.isMainpos == '1') {
|
|
877
|
+
mainNode = nodes[key].data;
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
} else {
|
|
882
|
+
nodes = vm.rightNode.children;
|
|
883
|
+
for (let key in nodes) {
|
|
884
|
+
if (leyerArr < Number(nodes[key].sort)) {
|
|
885
|
+
leyerArr = Number(nodes[key].sort);
|
|
886
|
+
beforeNode = nodes[key];
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
if (vm.addPosObj.isMainpos == '1' && mainNode) {
|
|
892
|
+
vm.$confirm('目前此组织内已存在主岗位[' + mainNode.posName + '],是否确定设置此岗位为主岗位(系统会自动把[' + mainNode.posName + ']设置为普通岗位)', '提示', {
|
|
893
|
+
confirmButtonText: '确定',
|
|
894
|
+
cancelButtonText: '取消',
|
|
895
|
+
type: 'warning'
|
|
896
|
+
}).then(() => {
|
|
897
|
+
vm.insertPos(leyerArr, nodes, beforeNode);
|
|
898
|
+
});
|
|
899
|
+
} else {
|
|
900
|
+
if (vm.addPosObj.isMainpos == '1') {
|
|
901
|
+
vm.$message('不是一级岗位,无法设置主岗位!');
|
|
902
|
+
return false;
|
|
903
|
+
} else {
|
|
904
|
+
vm.insertPos(leyerArr, nodes, beforeNode);
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
},
|
|
908
|
+
insertPos(leyerArr, nodes, beforeNode) {
|
|
909
|
+
let vm = this;
|
|
910
|
+
let datas = {};
|
|
911
|
+
vm.addPosObj.sort = leyerArr + 1;
|
|
912
|
+
for (let key in vm.addPosObj) {
|
|
913
|
+
datas['sysPos.' + key] = vm.addPosObj[key];
|
|
914
|
+
}
|
|
915
|
+
vm.axios.post(vm.api.sysPos.add,
|
|
916
|
+
datas).then(function (returnData) {
|
|
917
|
+
let operate = returnData.data;
|
|
918
|
+
let type = 'success';
|
|
919
|
+
let msg = operate.operateMessage;
|
|
920
|
+
if (operate.operateSuccess) {
|
|
921
|
+
type = 'warning';
|
|
922
|
+
}
|
|
923
|
+
vm.$message({
|
|
924
|
+
message: msg,
|
|
925
|
+
type: type
|
|
926
|
+
});
|
|
927
|
+
if (!Object.keys(nodes).length) {
|
|
928
|
+
vm.$refs.posTree.init();
|
|
929
|
+
} else {
|
|
930
|
+
vm.$refs.posTree.defaultTreeInsertAfter(returnData.data.operateObj, beforeNode);
|
|
931
|
+
}
|
|
932
|
+
vm.posUser.selPosUserDialog = false;
|
|
933
|
+
});
|
|
934
|
+
},
|
|
935
|
+
nodeClick(data, node) {
|
|
936
|
+
let vm = this;
|
|
937
|
+
vm.posObj = data;
|
|
938
|
+
vm.posUser.searchParam['posId'] = data.id;
|
|
939
|
+
vm.posId = data.id;
|
|
940
|
+
vm.$refs.posTable.refreshTable();
|
|
941
|
+
},
|
|
942
|
+
rightClick(event, data, node) {
|
|
943
|
+
let vm = this;
|
|
944
|
+
if (vm.rightNode == data) {
|
|
945
|
+
return;
|
|
946
|
+
} else {
|
|
947
|
+
vm.rightMenu = false;
|
|
948
|
+
vm.rightMenu = true;
|
|
949
|
+
}
|
|
950
|
+
vm.rightNode = data;
|
|
951
|
+
if (vm.rightMenu) {
|
|
952
|
+
setTimeout(function () {
|
|
953
|
+
document.getElementsByClassName("el-popover")[0].style.top = event.clientY - 50 + 'px';
|
|
954
|
+
document.getElementsByClassName("el-popover")[0].style.left = event.clientX + 'px';
|
|
955
|
+
document.getElementsByClassName("el-popover")[0].style.padding = 5 + 'px';
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
document.addEventListener('click', () => {
|
|
959
|
+
vm.rightMenu = false;
|
|
960
|
+
vm.rightNode = null;
|
|
961
|
+
});
|
|
962
|
+
},
|
|
963
|
+
getCheckedNodes() {
|
|
964
|
+
let vm = this;
|
|
965
|
+
let keyArr = [];
|
|
966
|
+
for (let v of vm.$refs.posTree.getTreeCheckedNodes()) {
|
|
967
|
+
keyArr.push(v.id);
|
|
968
|
+
}
|
|
969
|
+
vm.axios.post(vm.api.sysPos.delete,
|
|
970
|
+
{'ids': keyArr.toString()}).then(function (returnData) {
|
|
971
|
+
let operate = returnData.data;
|
|
972
|
+
let type = 'success';
|
|
973
|
+
let msg = operate.operateMessage;
|
|
974
|
+
if (operate.operateSuccess) {
|
|
975
|
+
type = 'warning';
|
|
976
|
+
}
|
|
977
|
+
vm.$message({
|
|
978
|
+
message: msg,
|
|
979
|
+
type: type
|
|
980
|
+
});
|
|
981
|
+
vm.$refs.posTree.defaultTreeRemove(keyArr);
|
|
982
|
+
});
|
|
983
|
+
},
|
|
984
|
+
formatterColumn(row, column, cellValue, index){
|
|
985
|
+
let vm = this;
|
|
986
|
+
if(column.property == 'userType'){
|
|
987
|
+
return vm.orgUserSelect.userTypeMap[cellValue];
|
|
988
|
+
}else if(column.property == 'userStatus'){
|
|
989
|
+
return vm.orgUserSelect.userStatusMap[cellValue];
|
|
990
|
+
}else{
|
|
991
|
+
return cellValue;
|
|
992
|
+
}
|
|
993
|
+
},
|
|
994
|
+
},
|
|
995
|
+
}
|
|
996
|
+
</script>
|
|
997
|
+
|
|
998
|
+
<style lang="scss">
|
|
999
|
+
.orgTab {
|
|
1000
|
+
height: 100%;
|
|
1001
|
+
width: 100%;
|
|
1002
|
+
border: 1px solid #ddd;
|
|
1003
|
+
border-radius: 8px;
|
|
1004
|
+
|
|
1005
|
+
.el-tab-pane {
|
|
1006
|
+
width: 100%;
|
|
1007
|
+
height: 100%;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
.tabPane2 {
|
|
1011
|
+
.el-container {
|
|
1012
|
+
width: 100%;
|
|
1013
|
+
height: 100%;
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
.el-tabs__content {
|
|
1018
|
+
height: 93%;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
.el-pagination {
|
|
1022
|
+
text-align: left;
|
|
1023
|
+
}
|
|
1024
|
+
.el-aside {
|
|
1025
|
+
color: #333;
|
|
1026
|
+
text-align: center;
|
|
1027
|
+
line-height: 200px;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
.el-main {
|
|
1031
|
+
color: #333;
|
|
1032
|
+
height: 100%;
|
|
1033
|
+
padding-left: 5px;
|
|
1034
|
+
padding-right: 5px;
|
|
1035
|
+
padding-top: 10px;
|
|
1036
|
+
padding-bottom: 0px;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
.el-collapse-item__header {
|
|
1040
|
+
background-color: #eeeeee;
|
|
1041
|
+
padding-left: 20px;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
.el-collapse-item__wrap {
|
|
1045
|
+
border: 1px solid #dddddd;
|
|
1046
|
+
border-top: 0px;
|
|
1047
|
+
height: auto;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
.demo-form-inline {
|
|
1051
|
+
padding: 0px 20px;
|
|
1052
|
+
margin-top: 5px;
|
|
1053
|
+
.el-col {
|
|
1054
|
+
border-right: 1px solid #dddddd;
|
|
1055
|
+
border-bottom: 1px solid #dddddd;
|
|
1056
|
+
padding: 5px;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
.grid-content {
|
|
1060
|
+
border-radius: 4px;
|
|
1061
|
+
min-height: 48px;
|
|
1062
|
+
text-align: left;
|
|
1063
|
+
}
|
|
1064
|
+
.bg-purple {
|
|
1065
|
+
text-align: right;
|
|
1066
|
+
padding-right: 10px;
|
|
1067
|
+
}
|
|
1068
|
+
.row-bg {
|
|
1069
|
+
padding: 10px 0;
|
|
1070
|
+
background-color: #f9fafc;
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
.el-dialog__wrapper[height*='%'] > .el-dialog > .el-dialog__body {
|
|
1074
|
+
bottom: 0;
|
|
1075
|
+
}
|
|
1076
|
+
.el-collapse-item__content {
|
|
1077
|
+
padding-bottom: 0px;
|
|
1078
|
+
}
|
|
1079
|
+
/*.el-form-item__content {
|
|
1080
|
+
line-height: 48px;
|
|
1081
|
+
}*/
|
|
1082
|
+
.commonTreeAside {
|
|
1083
|
+
position: relative;
|
|
1084
|
+
height: 100%;
|
|
1085
|
+
.el-row {
|
|
1086
|
+
height: 5%;
|
|
1087
|
+
}
|
|
1088
|
+
.posTree {
|
|
1089
|
+
height: 95%;
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
.org-collapse .el-form-item__content{
|
|
1095
|
+
line-height: 48px;
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
body > .el-container {
|
|
1099
|
+
margin-bottom: 40px;
|
|
1100
|
+
}
|
|
1101
|
+
</style>
|