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,737 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-container class="userMange-content" style="height: 100%" v-show="show">
|
|
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.userNamePinYin" placeholder="中文、拼音全拼、简拼"></el-input>
|
|
9
|
+
</el-form-item>
|
|
10
|
+
<el-form-item label="用户状态">
|
|
11
|
+
<el-select v-model="crud.searchForm.userStatus" clearable>
|
|
12
|
+
<el-option v-for="item in searchFormUserStatus" :key="item.value" :value="item.value"
|
|
13
|
+
:label="item.label">
|
|
14
|
+
</el-option>
|
|
15
|
+
</el-select>
|
|
16
|
+
</el-form-item>
|
|
17
|
+
|
|
18
|
+
<el-form-item>
|
|
19
|
+
<el-button type="primary" icon="el-icon-search" @click="crud.doSearch()">查询</el-button>
|
|
20
|
+
<el-button icon="el-icon-close" @click="crud.resetSearch()">清空</el-button>
|
|
21
|
+
</el-form-item>
|
|
22
|
+
</el-form>
|
|
23
|
+
</div>
|
|
24
|
+
</el-header>
|
|
25
|
+
|
|
26
|
+
<el-main id="tableMain" style="height: 100%">
|
|
27
|
+
<el-container style="height:100%" class="table-list-container">
|
|
28
|
+
<el-header style="height: auto;" size="medium">
|
|
29
|
+
<el-button type="primary" size="small" round icon="el-icon-circle-plus" @click="addUser()">新增
|
|
30
|
+
</el-button>
|
|
31
|
+
<el-button type="warning" size="small" round
|
|
32
|
+
@click="toggleLockedUser('20')"><i class="saspiconfont pl-icon-pwd"></i><span></span>锁定用户
|
|
33
|
+
</el-button>
|
|
34
|
+
<el-button type="success" size="small" round
|
|
35
|
+
@click="toggleLockedUser('10')"><i class="saspiconfont pl-icon-08"></i><span></span>解锁用户
|
|
36
|
+
</el-button>
|
|
37
|
+
<el-button type="danger" size="small" round
|
|
38
|
+
icon="el-icon-delete" @click="remove()">删除
|
|
39
|
+
</el-button>
|
|
40
|
+
</el-header>
|
|
41
|
+
<el-main style="height: 100%;" ref="tableMain">
|
|
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" width="300"></el-table-column>
|
|
47
|
+
<el-table-column label="所在组织" :formatter="formatterOrgName" prop="orgName" align="center"></el-table-column>
|
|
48
|
+
<el-table-column label="当前状态" prop="userStatus" align="center" width="200">
|
|
49
|
+
<template slot-scope="scope">
|
|
50
|
+
<el-tag :type="userStatusColor[scope.row.userStatus]">
|
|
51
|
+
{{userStatusObj[scope.row.userStatus]}}
|
|
52
|
+
</el-tag>
|
|
53
|
+
</template>
|
|
54
|
+
</el-table-column>
|
|
55
|
+
<el-table-column label="操作" align="center" width="350">
|
|
56
|
+
<template slot-scope="scope">
|
|
57
|
+
<!--v-if="queryUserType != 'ent' && (scope.row.created == loginUser.id || mayOperate)"-->
|
|
58
|
+
<el-button size="small" icon="el-icon-edit" type="primary"
|
|
59
|
+
@click="updateData(scope.row)">
|
|
60
|
+
修改
|
|
61
|
+
</el-button>
|
|
62
|
+
<!--<el-button size="small" icon="el-icon-edit-outline" type="primary" v-if="queryUserType != 'ent'"-->
|
|
63
|
+
<!--@click="changePwd(scope.row)">-->
|
|
64
|
+
<!--修改密码-->
|
|
65
|
+
<!--</el-button>-->
|
|
66
|
+
<el-button size="small" icon="el-icon-setting" type="danger"
|
|
67
|
+
@click="resetPwd(scope.row)">
|
|
68
|
+
重置密码
|
|
69
|
+
</el-button>
|
|
70
|
+
<el-button size="small" icon="el-icon-zoom-in" type="warning"
|
|
71
|
+
v-if="queryUserType != 'dev'"
|
|
72
|
+
@click="viewMenu(scope.row)">
|
|
73
|
+
查看菜单
|
|
74
|
+
</el-button>
|
|
75
|
+
</template>
|
|
76
|
+
</el-table-column>
|
|
77
|
+
</el-table>
|
|
78
|
+
</el-main>
|
|
79
|
+
</el-container>
|
|
80
|
+
</el-main>
|
|
81
|
+
|
|
82
|
+
<el-footer>
|
|
83
|
+
<el-pagination
|
|
84
|
+
:ref="crud.pageRef"
|
|
85
|
+
:page-sizes="crud.pageSizes"
|
|
86
|
+
:page-size="crud.pageSize"
|
|
87
|
+
:current-page="crud.page"
|
|
88
|
+
:total="crud.dataStore.total"
|
|
89
|
+
@size-change="crud.sizeChange()"
|
|
90
|
+
@current-change="crud.currentPage()"
|
|
91
|
+
layout="total, sizes, prev, pager, next, jumper">
|
|
92
|
+
</el-pagination>
|
|
93
|
+
</el-footer>
|
|
94
|
+
|
|
95
|
+
<el-dialog :close-on-click-modal=false :title="title" top="20vh" :visible.sync="formDataDialog">
|
|
96
|
+
<el-form :model="formData" ref="formDataRef" :rules="rules">
|
|
97
|
+
<el-row>
|
|
98
|
+
|
|
99
|
+
<el-col :span="12">
|
|
100
|
+
<el-form-item label="用户账号" label-width="150px" prop="userAccount">
|
|
101
|
+
<el-input v-model="formData.userAccount"></el-input>
|
|
102
|
+
</el-form-item>
|
|
103
|
+
</el-col>
|
|
104
|
+
<el-col :span="12">
|
|
105
|
+
<el-form-item label="用户姓名" label-width="150px" prop="userName">
|
|
106
|
+
<el-input v-model="formData.userName"></el-input>
|
|
107
|
+
</el-form-item>
|
|
108
|
+
</el-col>
|
|
109
|
+
<el-col :span="12">
|
|
110
|
+
<el-form-item label="用户类型" label-width="150px" prop="userType">
|
|
111
|
+
<el-select v-model="formData.userType" style="width: 100%">
|
|
112
|
+
<el-option v-for="item in typeOptions" :key="item.value" :label="item.label"
|
|
113
|
+
:value="item.value">
|
|
114
|
+
</el-option>
|
|
115
|
+
</el-select>
|
|
116
|
+
</el-form-item>
|
|
117
|
+
</el-col>
|
|
118
|
+
|
|
119
|
+
<el-col :span="12">
|
|
120
|
+
<el-form-item label="手机号码" label-width="150px" prop="userPhone">
|
|
121
|
+
<el-input v-model="formData.userPhone"></el-input>
|
|
122
|
+
</el-form-item>
|
|
123
|
+
</el-col>
|
|
124
|
+
<el-col :span="12">
|
|
125
|
+
<el-form-item label="电子邮箱" label-width="150px" prop="userEmail">
|
|
126
|
+
<el-input v-model="formData.userEmail"></el-input>
|
|
127
|
+
</el-form-item>
|
|
128
|
+
</el-col>
|
|
129
|
+
|
|
130
|
+
<el-col :span="12">
|
|
131
|
+
<el-form-item label="身份证号" label-width="150px" prop="userIdcard" :rules="plValidate('idcard')">
|
|
132
|
+
<el-input v-model="formData.userIdcard"></el-input>
|
|
133
|
+
</el-form-item>
|
|
134
|
+
</el-col>
|
|
135
|
+
<el-col :span="12">
|
|
136
|
+
<el-form-item label="用户状态" label-width="150px" prop="userStatus">
|
|
137
|
+
<el-radio-group v-model="formData.userStatus" size="medium">
|
|
138
|
+
<el-radio-button label="10">正常</el-radio-button>
|
|
139
|
+
<el-radio-button label="20">锁定</el-radio-button>
|
|
140
|
+
</el-radio-group>
|
|
141
|
+
</el-form-item>
|
|
142
|
+
</el-col>
|
|
143
|
+
<!-- <el-col :span="12">-->
|
|
144
|
+
<!-- <el-form-item label="用户角色" label-width="150px" prop="userRoleId">-->
|
|
145
|
+
<!-- <el-select v-model="formData.userRoleId" style="width: 100%" clearable>-->
|
|
146
|
+
<!-- <el-option v-for="item in createPushRoleArr" :key="item.id" :label="item.roleName" :value="item.id">-->
|
|
147
|
+
|
|
148
|
+
<!-- </el-option>-->
|
|
149
|
+
<!-- </el-select>-->
|
|
150
|
+
<!-- </el-form-item>-->
|
|
151
|
+
<!-- </el-col>-->
|
|
152
|
+
</el-row>
|
|
153
|
+
<!--<div >-->
|
|
154
|
+
<!--<el-row>-->
|
|
155
|
+
|
|
156
|
+
<!--</el-row>-->
|
|
157
|
+
<!--</div>-->
|
|
158
|
+
</el-form>
|
|
159
|
+
<div slot="footer" class="dialog-footer">
|
|
160
|
+
<el-button type="primary" @click="submitForm()" size="small" icon="el-icon-success">确 定</el-button>
|
|
161
|
+
<el-button @click="formDataDialog = false" size="small" icon="el-icon-error">取 消</el-button>
|
|
162
|
+
</div>
|
|
163
|
+
</el-dialog>
|
|
164
|
+
|
|
165
|
+
<el-dialog :close-on-click-modal=false :title="menuUserName+'的菜单'" top="5vh" height="90%" width="80%"
|
|
166
|
+
:visible.sync="viewMenuDialog" class="userViewMenuClass">
|
|
167
|
+
<empower-user-view-menu-tree :user-id="menuUserId" :menu-model-obj="menuModelObj"
|
|
168
|
+
:data-dictionary-obj="dataDictionaryObj"
|
|
169
|
+
:menu-opt-all="menuOptAll" :current-role-opt-all="currentRoleOptAll"
|
|
170
|
+
:refresh-boolean-proper="viewMenuDialog" user-type="normal">
|
|
171
|
+
</empower-user-view-menu-tree>
|
|
172
|
+
<div slot="footer" class="dialog-footer">
|
|
173
|
+
<el-button type="primary" @click="viewMenuDialog = false" size="small" icon="el-icon-error">关闭
|
|
174
|
+
</el-button>
|
|
175
|
+
</div>
|
|
176
|
+
</el-dialog>
|
|
177
|
+
</el-container>
|
|
178
|
+
</template>
|
|
179
|
+
|
|
180
|
+
<script>
|
|
181
|
+
import viewMenu from './viewMenu/viewMenu.vue';
|
|
182
|
+
import EmpowerUserViewMenuTree from "./empowerUser/empowerUserListViewMenuTree";
|
|
183
|
+
import ElRadioGroup from "element-ui/packages/radio/src/radio-group";
|
|
184
|
+
|
|
185
|
+
export default { // 新增是否允许修改用户详情,为系统参数,需要新增flyway脚本
|
|
186
|
+
components: {ElRadioGroup, EmpowerUserViewMenuTree, viewMenu},
|
|
187
|
+
name: "user-manage",
|
|
188
|
+
data() {
|
|
189
|
+
let vm = this;
|
|
190
|
+
let validUserRepeat = (rule, value, callback) => { // 重名验证
|
|
191
|
+
// let obj = {"isExit": "true"};
|
|
192
|
+
// if (rule.field == "userAccount") {
|
|
193
|
+
// obj["isExitUserAccount"] = vm.formData.userAccount;
|
|
194
|
+
// }
|
|
195
|
+
// vm.axios.post(vm.api.sysUser.find, obj).then(res => {
|
|
196
|
+
// let result = res.data || [];
|
|
197
|
+
// if (result.length > 0 && result[0].id != vm.formData.id) {
|
|
198
|
+
// callback(new Error("账号重复"));
|
|
199
|
+
// } else {
|
|
200
|
+
callback();
|
|
201
|
+
// }
|
|
202
|
+
// })
|
|
203
|
+
};
|
|
204
|
+
return {
|
|
205
|
+
queryUserType: '', // 链接中传入的用户类型
|
|
206
|
+
show: true, // 当前页面是否有操作权限显示
|
|
207
|
+
crud: new this.CrudUtil({
|
|
208
|
+
vue: this,
|
|
209
|
+
entityName: "sysUser",
|
|
210
|
+
url:this.api.sysUser.url,
|
|
211
|
+
searchUrl: this.api.sysUser.findPageParam,
|
|
212
|
+
searchForm: {"orderSql": "TB.CREATE_TIME DESC,TB.USER_STATUS DESC", "getOrgName": "true","parentOrg": "true"}, // 加上排序
|
|
213
|
+
noClearSearchColumns: ["userType", "unsup", "ids", "order", "sort", "showCreated", "getOrgName","parentOrg","empowerUser","empowerOrgId"],
|
|
214
|
+
addDefaultData: {"userStatus": "10"},
|
|
215
|
+
initNoSearch: true,
|
|
216
|
+
uploadArr:['zd1']
|
|
217
|
+
}),
|
|
218
|
+
userStatusObj: {
|
|
219
|
+
'10': "正常",
|
|
220
|
+
'20': "锁定",
|
|
221
|
+
'30': "暂时锁定"
|
|
222
|
+
},
|
|
223
|
+
userStatusColor: {
|
|
224
|
+
'10': "success",
|
|
225
|
+
'20': "warning",
|
|
226
|
+
'30': "danger"
|
|
227
|
+
},
|
|
228
|
+
menuUserId: '', // 查看菜单时的userId
|
|
229
|
+
menuUserName: '', // 查看菜单时的用户名
|
|
230
|
+
viewMenuDialog: false, // 查看菜单的对话框
|
|
231
|
+
formDataDialog: false, // 用户信息对话框
|
|
232
|
+
loading: true, // 加载条
|
|
233
|
+
formData: {
|
|
234
|
+
id: "", 'userAccount': "", userName: "", 'userType': "", 'userStatus': "",
|
|
235
|
+
'userGender': "", 'userAge': "", 'userQQ': "", 'userPhone': "", 'userEmail': "",userIdcard:""
|
|
236
|
+
}, // 修改表单用户信息
|
|
237
|
+
typeOptions: [], // 用户类型下拉框
|
|
238
|
+
devTypeOptions: [{value: 'dev', label: '开发者'}], // dev用户类型仅可选一个
|
|
239
|
+
searchFormUserStatus: [
|
|
240
|
+
{value: '10', label: "正常"},
|
|
241
|
+
{value: '20', label: "锁定"},
|
|
242
|
+
{value: '30', label: "暂时锁定"}
|
|
243
|
+
],
|
|
244
|
+
statusOptions: [
|
|
245
|
+
{value: '10', label: "正常"},
|
|
246
|
+
{value: '20', label: "锁定"}
|
|
247
|
+
], // 用户状态下拉框
|
|
248
|
+
sexOptions: [
|
|
249
|
+
{value: '男', label: "男"},
|
|
250
|
+
{value: '女', label: "女"}
|
|
251
|
+
],
|
|
252
|
+
editUserDetail: false, // 是否可以编辑用户详情
|
|
253
|
+
title: "", // 表单标题
|
|
254
|
+
rules: {
|
|
255
|
+
userAccount: [
|
|
256
|
+
{
|
|
257
|
+
required: true,
|
|
258
|
+
message: '该输入项为必输项',
|
|
259
|
+
trigger: 'blur'
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
validator: validUserRepeat,
|
|
263
|
+
trigger: 'blur'
|
|
264
|
+
}
|
|
265
|
+
],
|
|
266
|
+
userName: [
|
|
267
|
+
{
|
|
268
|
+
required: true,
|
|
269
|
+
message: '该输入项为必输项',
|
|
270
|
+
trigger: 'blur'
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
validator: validUserRepeat,
|
|
274
|
+
trigger: 'blur'
|
|
275
|
+
}
|
|
276
|
+
],
|
|
277
|
+
userType: this.plValidate('required'),
|
|
278
|
+
userStatus: this.plValidate('required'),
|
|
279
|
+
userQQ: this.plValidate('qq'),
|
|
280
|
+
userPhone: this.plValidate('phone','required'),
|
|
281
|
+
userEmail: this.plValidate('email'),
|
|
282
|
+
},
|
|
283
|
+
menuModelObj: {},
|
|
284
|
+
dataDictionaryObj: {},
|
|
285
|
+
menuOptAll: {},
|
|
286
|
+
loginUser: {},
|
|
287
|
+
currentRoleOptAll: {},
|
|
288
|
+
mayOperate: false, // 是否可以操作当前数据,如果是开发者可以
|
|
289
|
+
createPushRoleArr:[],
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
created() { // 初始化时先获取数据操作权限,然后根据是否开启操作权限获取权限数据
|
|
293
|
+
let vm = this;
|
|
294
|
+
vm.initLoginUser();
|
|
295
|
+
//vm.initMenuModelObj();
|
|
296
|
+
vm.initDataDictionaryObj();
|
|
297
|
+
vm.initCreatePushRole(); // 初始化推送的用户角色数据
|
|
298
|
+
},
|
|
299
|
+
watch:{
|
|
300
|
+
// 'formData.userName'(){
|
|
301
|
+
// // this.formData.userAccount = this.formData.userName;
|
|
302
|
+
// }
|
|
303
|
+
},
|
|
304
|
+
methods: {
|
|
305
|
+
initCreatePushRole(){
|
|
306
|
+
this.axios.post(this.api.role.find,{"created":this.loginUser.id,"pushRole":"1"}).then(res => {
|
|
307
|
+
this.createPushRoleArr = res.data || [];
|
|
308
|
+
})
|
|
309
|
+
},
|
|
310
|
+
async initOriginData() {
|
|
311
|
+
let vm = this;
|
|
312
|
+
let urlParam = vm.COMMON_FUNC.getUrlParamBysplit(window.location.href);
|
|
313
|
+
let userType = vm.$route.params["userType"] || (urlParam["userType"] || "").toLowerCase();
|
|
314
|
+
vm.queryUserType = userType;
|
|
315
|
+
let dataOperation = (urlParam["sjqx"] || "").toLowerCase();
|
|
316
|
+
vm.$set(vm.crud.searchForm, "userType", userType); // 设置查询条件的用户类型
|
|
317
|
+
if (!userType) { // 当前url链接中没有传递用户类型
|
|
318
|
+
vm.$message("请设置菜单的用户类型!");
|
|
319
|
+
vm.show = false;
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
vm.typeOptions = [];
|
|
323
|
+
let skipUserManageOpt = false; // OA跳过用户管理权限
|
|
324
|
+
await vm.axios.post(vm.api.param.getSysParams,{"key":"SysUserType"}).then(function (res) { // 是否可以修改用户详情,获取用户的类型
|
|
325
|
+
// let sysParamObj = res.data;
|
|
326
|
+
// let paramValString = sysParamObj["SysUserType"];
|
|
327
|
+
let result = res.data;
|
|
328
|
+
if(typeof(result) != Object && typeof(result) != "object"){
|
|
329
|
+
result = JSON.parse(result.replace(/'/g, '"'));
|
|
330
|
+
}
|
|
331
|
+
for (let [key, value] of Object.entries(result)) {
|
|
332
|
+
vm.typeOptions.push({"label": value, "value": key})
|
|
333
|
+
}
|
|
334
|
+
vm.typeOptions = vm.typeOptions.filter(item => {
|
|
335
|
+
return item["value"] == userType;
|
|
336
|
+
});
|
|
337
|
+
if (userType != 'dev' && !result[userType]) { // 乱传的用户类型
|
|
338
|
+
vm.$message("请设置正确的用户类型!");
|
|
339
|
+
vm.show = false;
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
// if (sysParamObj["editUserDetail"]["paramVal"] == "是") {
|
|
343
|
+
// vm.editUserDetail = true;
|
|
344
|
+
// }
|
|
345
|
+
// skipUserManageOpt = (sysParamObj["skipUserManageOpt"] || {})["paramVal"] == "是";
|
|
346
|
+
});
|
|
347
|
+
if (userType != 'dev') { // 非开发者类型加入unsup参数,dev传入别的参数
|
|
348
|
+
vm.$set(vm.crud.searchForm, "unsup", "sup");
|
|
349
|
+
// vm.queryUserType == 'gov'?(vm.$set(vm.crud.searchForm,"getOrgName","yes")):"";
|
|
350
|
+
} else { // 查看开发者类型直接初始化,仅传递用户类型即可,上面已经传了
|
|
351
|
+
vm.$set(vm.crud.searchForm, "unsup", "");
|
|
352
|
+
vm.init();
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
355
|
+
if (dataOperation == "all" || skipUserManageOpt) {
|
|
356
|
+
vm.init();
|
|
357
|
+
} else {
|
|
358
|
+
if (vm.loginUser.userType == 'sup' || vm.loginUser.userType == 'dev') {
|
|
359
|
+
vm.init();
|
|
360
|
+
} else {
|
|
361
|
+
vm.crud.searchForm["showCreated"] = vm.loginUser.id;
|
|
362
|
+
vm.axios.post(vm.api.param.getSysParams, {"key": "SysDataOperation"}).then(function (res) {
|
|
363
|
+
let result = vm.platStringUtil.replaceAll(res.data.SysDataOperation, "'", "\"");
|
|
364
|
+
let operation = "";
|
|
365
|
+
result ? operation = JSON.parse(result).opt : operation;
|
|
366
|
+
if (operation == "是") { // 过滤当前组织用户
|
|
367
|
+
vm.axios.post(vm.api.sysOrgPosUser.findLowerUserIdsByOrg).then(posUserRes => {
|
|
368
|
+
if (posUserRes.data && posUserRes.data.length > 0) {
|
|
369
|
+
let idsArr = [];
|
|
370
|
+
posUserRes.data.forEach(sysOrgPosUser => {
|
|
371
|
+
idsArr.push(sysOrgPosUser.userId);
|
|
372
|
+
});
|
|
373
|
+
vm.crud.searchForm["ids"] = idsArr.join(",");
|
|
374
|
+
} else {
|
|
375
|
+
vm.crud.searchForm["ids"] = "$$$$";
|
|
376
|
+
}
|
|
377
|
+
vm.init();
|
|
378
|
+
})
|
|
379
|
+
} else { // 未开启数据权限视为拥有所有权限
|
|
380
|
+
vm.init();
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
init() {
|
|
387
|
+
this.crud.search();
|
|
388
|
+
},
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* 当前登录用户
|
|
393
|
+
*/
|
|
394
|
+
initLoginUser() {
|
|
395
|
+
let vm = this;
|
|
396
|
+
vm.loginUser = vm.USER_GLOBAL.getLoginUser() || {};
|
|
397
|
+
if (vm.loginUser.userType == "dev" || vm.loginUser.userType == "sup") {
|
|
398
|
+
vm.mayOperate = true;
|
|
399
|
+
}
|
|
400
|
+
if (vm.loginUser.userType == "empower") {
|
|
401
|
+
vm.crud.searchForm["empowerUser"] = "Y";
|
|
402
|
+
let loginDept = this.USER_GLOBAL.getLoginDept();
|
|
403
|
+
vm.crud.searchForm["empowerOrgId"] = loginDept.id;
|
|
404
|
+
|
|
405
|
+
}
|
|
406
|
+
vm.initOriginData(); // 初始化数据,这里的数据仅加载一次
|
|
407
|
+
vm.initOptAll(vm.loginUser.id);
|
|
408
|
+
},
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* 用户拥有的操作权限
|
|
412
|
+
*/
|
|
413
|
+
initOptAll(userId) {
|
|
414
|
+
let vm = this;
|
|
415
|
+
vm.axios.post(vm.api.sysOrgPosUser.find, {"userId": userId}).then(function (resPosUser) { // 获取当前用户的组织架构
|
|
416
|
+
let [orgIdArr, posIdArr] = [[], []];
|
|
417
|
+
resPosUser.data.forEach(function (posUser) {
|
|
418
|
+
posUser.orgId && (orgIdArr.push(posUser.orgId));
|
|
419
|
+
posUser.posId && (posIdArr.push(posUser.posId));
|
|
420
|
+
});
|
|
421
|
+
vm.axios.post(vm.api.roleMenuOpt.findAllOpt,
|
|
422
|
+
{
|
|
423
|
+
"userId": userId,
|
|
424
|
+
"orgId": orgIdArr.join(","),
|
|
425
|
+
"posId": posIdArr.join(",")
|
|
426
|
+
}).then(function (resOpt) {
|
|
427
|
+
let data = resOpt.data || [];
|
|
428
|
+
data.forEach(function (each) {
|
|
429
|
+
vm.menuOptAll[each["menuId"]] = each["operation"];
|
|
430
|
+
});
|
|
431
|
+
});
|
|
432
|
+
});
|
|
433
|
+
},
|
|
434
|
+
|
|
435
|
+
// /**
|
|
436
|
+
// * 菜单模块数据
|
|
437
|
+
// */
|
|
438
|
+
// initMenuModelObj() {
|
|
439
|
+
// let vm = this;
|
|
440
|
+
// vm.axios.post(vm.api.menuModule.find).then((res) => {
|
|
441
|
+
// let data = res.data;
|
|
442
|
+
// for (let item of data) {
|
|
443
|
+
// vm.menuModelObj[item.id] = item.moduleName || "无";
|
|
444
|
+
// }
|
|
445
|
+
// });
|
|
446
|
+
// },
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* 数据字典
|
|
450
|
+
*/
|
|
451
|
+
initDataDictionaryObj() {
|
|
452
|
+
let vm = this;
|
|
453
|
+
vm.axios.post(vm.api.dataType.find).then(res => {
|
|
454
|
+
let data = res.data;
|
|
455
|
+
data.forEach(item => {
|
|
456
|
+
vm.dataDictionaryObj[item.id] = item.typeName;
|
|
457
|
+
});
|
|
458
|
+
});
|
|
459
|
+
},
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
viewMenu(row) { // 查看用户拥有的菜单
|
|
463
|
+
let vm = this;
|
|
464
|
+
if (!row.id) { // 行数据id不存在
|
|
465
|
+
vm.$message("数据异常,请重新加载页面!");
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
vm.menuUserId = row.id;
|
|
469
|
+
vm.menuUserName = row.userName;
|
|
470
|
+
vm.viewMenuDialog = true;
|
|
471
|
+
},
|
|
472
|
+
updateData(row) { // 修改用户的基本信息(新增系统参数,是否允许修改用户详情)
|
|
473
|
+
let vm = this;
|
|
474
|
+
if (!row.id) {
|
|
475
|
+
vm.$message("数据异常,请重新加载页面!");
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
vm.title = "修改用户信息";
|
|
479
|
+
vm.formData = {}; // 先清除表单中的数据
|
|
480
|
+
vm.addUserInfo = false; // 默认不添加用户详情
|
|
481
|
+
let obj = Object.assign({}, row);
|
|
482
|
+
let arr = ['id', 'userAccount', 'userName', 'userType', 'userStatus','userPhone','userEmail','userIdcard','userRoleId'];
|
|
483
|
+
for (let elem of arr) {
|
|
484
|
+
vm.$set(vm.formData, elem, obj[elem]);
|
|
485
|
+
}
|
|
486
|
+
if (vm.editUserDetail) {
|
|
487
|
+
vm.axios.post(vm.api.sysUserInfo.find, {"userId": row.id}).then(function (res) {
|
|
488
|
+
if (res.data.length > 0) { // 按理说只有一条信息,如果没有那是旧数据,我们帮忙插入一条
|
|
489
|
+
let result = res.data[0];
|
|
490
|
+
let tempArr = ['userGender', 'userAge', 'userQq', 'userPhone', 'userEmail'];
|
|
491
|
+
for (let elem of tempArr) {
|
|
492
|
+
vm.$set(vm.formData, elem, result[elem]);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
})
|
|
496
|
+
}
|
|
497
|
+
vm.formDataDialog = true;
|
|
498
|
+
},
|
|
499
|
+
addUser() { // 添加
|
|
500
|
+
let vm = this;
|
|
501
|
+
vm.formData = {
|
|
502
|
+
'id': "", 'userAccount': "", 'userName': "", 'userType': "", 'userStatus': "",
|
|
503
|
+
'userGender': "", 'userAge': "", 'userQq': "", 'userPhone': "", 'userEmail': "",
|
|
504
|
+
};
|
|
505
|
+
if (vm.queryUserType == 'dev') { // 开发者添加用户类型仅可添加开发者
|
|
506
|
+
vm.$set(vm.formData, 'userType', 'dev');
|
|
507
|
+
} else {
|
|
508
|
+
vm.$set(vm.formData, 'userType', vm.queryUserType);
|
|
509
|
+
}
|
|
510
|
+
vm.formData = Object.assign({}, vm.formData, vm.crud.addDefaultData);
|
|
511
|
+
vm.title = "添加用户信息";
|
|
512
|
+
vm.formDataDialog = true;
|
|
513
|
+
vm.$nextTick(function () {
|
|
514
|
+
vm.$refs.formDataRef.clearValidate(); // 再次添加清除原先的验证
|
|
515
|
+
})
|
|
516
|
+
},
|
|
517
|
+
submitForm() {
|
|
518
|
+
let vm = this;
|
|
519
|
+
vm.$refs.formDataRef.validate(function (valid) { // 表单验证
|
|
520
|
+
if (valid) {
|
|
521
|
+
vm.axios.post(vm.api.sysUser.validateAccountIsNotExists,
|
|
522
|
+
{
|
|
523
|
+
"userAccount": vm.formData.userAccount,
|
|
524
|
+
"userId": (vm.formData.id || "")
|
|
525
|
+
}).then(function (resValid) { // 验证账号是否存在
|
|
526
|
+
if (resValid.data) {
|
|
527
|
+
if (vm.formData.id) { // update
|
|
528
|
+
vm.axios.post(vm.api.sysUser.updateUserAndInfo, vm.formData).then(function (res) {
|
|
529
|
+
vm.$message({
|
|
530
|
+
duration: 1000,
|
|
531
|
+
type: 'success',
|
|
532
|
+
message: res.data.operateMessage
|
|
533
|
+
});
|
|
534
|
+
vm.formDataDialog = false;
|
|
535
|
+
vm.crud.search();
|
|
536
|
+
})
|
|
537
|
+
} else { // add
|
|
538
|
+
vm.axios.post(vm.api.sysUser.addUserAndInfo, vm.formData).then(function (res) {
|
|
539
|
+
vm.$message({
|
|
540
|
+
duration: 1000,
|
|
541
|
+
type: 'success',
|
|
542
|
+
message: res.data.operateMessage
|
|
543
|
+
});
|
|
544
|
+
vm.formDataDialog = false;
|
|
545
|
+
vm.crud.search();
|
|
546
|
+
})
|
|
547
|
+
}
|
|
548
|
+
} else {
|
|
549
|
+
vm.$message({
|
|
550
|
+
message: "账号已存在!",
|
|
551
|
+
duration: 1200,
|
|
552
|
+
type: "warning"
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
});
|
|
558
|
+
},
|
|
559
|
+
changePwd(row) { // 修改密码
|
|
560
|
+
let vm = this;
|
|
561
|
+
vm.$prompt('请输入新密码', '修改密码', {
|
|
562
|
+
confirmButtonText: '确定',
|
|
563
|
+
cancelButtonText: '取消',
|
|
564
|
+
// inputPattern: /^[a-zA-Z0-9]{6,20}$/,
|
|
565
|
+
// inputErrorMessage: '密码格式不正确',
|
|
566
|
+
beforeClose: function (action, instance, done) {
|
|
567
|
+
if (action == 'confirm') {
|
|
568
|
+
vm.axios.post(vm.api.sysUserInterface.testPwd, {
|
|
569
|
+
userId: row.id,
|
|
570
|
+
pwd: instance.inputValue,
|
|
571
|
+
userName: row.userName
|
|
572
|
+
}).then(valRes => {
|
|
573
|
+
let isSuccess = valRes.data.operateSuccess;
|
|
574
|
+
if (!isSuccess) {
|
|
575
|
+
vm.$message({
|
|
576
|
+
type: 'warning',
|
|
577
|
+
duration: 2000,
|
|
578
|
+
message: valRes.data.operateMessage
|
|
579
|
+
});
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
vm.axios.post(vm.api.sysUser.updatePwdByDevoloper, {
|
|
583
|
+
"userId": row.id,
|
|
584
|
+
"newPWd": instance.inputValue
|
|
585
|
+
}).then(function (res) {
|
|
586
|
+
done(); // 修改完成后提示并关闭窗口
|
|
587
|
+
vm.$message({
|
|
588
|
+
type: 'success',
|
|
589
|
+
duration: 1500,
|
|
590
|
+
message: res.data.operateMessage
|
|
591
|
+
});
|
|
592
|
+
});
|
|
593
|
+
});
|
|
594
|
+
} else {
|
|
595
|
+
done();
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
}).catch(() => {
|
|
599
|
+
this.$message({
|
|
600
|
+
type: 'info',
|
|
601
|
+
message: '已取消修改'
|
|
602
|
+
});
|
|
603
|
+
});
|
|
604
|
+
},
|
|
605
|
+
resetPwd(row) { // 重置密码
|
|
606
|
+
let [vm, userNameText] = [this, row.userName ? row.userName : '用户'];
|
|
607
|
+
this.$confirm('确定要重置' + userNameText + '的密码?', '提示', {
|
|
608
|
+
confirmButtonText: '确定',
|
|
609
|
+
cancelButtonText: '取消',
|
|
610
|
+
type: 'warning',
|
|
611
|
+
beforeClose: function (action, instance, done) {
|
|
612
|
+
if (action == 'confirm') {
|
|
613
|
+
vm.axios.post(vm.api.sysUser.resetPwd, {"id": row.id}).then(function (res) {
|
|
614
|
+
done(); // 完成后提示并关闭窗口
|
|
615
|
+
vm.$message({
|
|
616
|
+
type: 'success',
|
|
617
|
+
duration: 1500,
|
|
618
|
+
message: res.data.operateMessage
|
|
619
|
+
});
|
|
620
|
+
});
|
|
621
|
+
} else {
|
|
622
|
+
done();
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}).catch(() => {
|
|
626
|
+
this.$message({
|
|
627
|
+
type: 'info',
|
|
628
|
+
message: '已取消'
|
|
629
|
+
});
|
|
630
|
+
});
|
|
631
|
+
},
|
|
632
|
+
toggleLockedUser(status) {
|
|
633
|
+
let vm = this;
|
|
634
|
+
let selection = vm.$refs[vm.crud.setting.tableRef].selection;
|
|
635
|
+
if ((selection || []).length === 0) {
|
|
636
|
+
vm.$message({
|
|
637
|
+
message: "请选择要操作的用户!",
|
|
638
|
+
duration: 1500
|
|
639
|
+
});
|
|
640
|
+
return;
|
|
641
|
+
}
|
|
642
|
+
let message = '锁定';
|
|
643
|
+
if (status == '10') {
|
|
644
|
+
message = '正常';
|
|
645
|
+
}
|
|
646
|
+
let lockCount = 0;
|
|
647
|
+
let arrIds = [];
|
|
648
|
+
selection.forEach(function (data) {
|
|
649
|
+
arrIds.push(data.id);
|
|
650
|
+
if(data.userStatus == '20'){ //已经锁定
|
|
651
|
+
lockCount ++;
|
|
652
|
+
}
|
|
653
|
+
});
|
|
654
|
+
if(status == '20' && lockCount == selection.length){ //锁定用户
|
|
655
|
+
vm.$message({
|
|
656
|
+
type:'warning',
|
|
657
|
+
message: "当前选中的用户已经锁定,无需再次锁定!",
|
|
658
|
+
duration: 1500
|
|
659
|
+
});
|
|
660
|
+
return;
|
|
661
|
+
}
|
|
662
|
+
vm.$confirm('是否要设置选中的<span style="color: red;">' + selection.length + '</span>个用户状态为' + message + '?', '提示', {
|
|
663
|
+
confirmButtonText: '确定',
|
|
664
|
+
cancelButtonText: '取消',
|
|
665
|
+
dangerouslyUseHTMLString: true
|
|
666
|
+
}).then(function () {
|
|
667
|
+
vm.crud.axios.post(vm.api.sysUser.settingLockedUser, {
|
|
668
|
+
"ids": arrIds.join(","),
|
|
669
|
+
"userStatus": status
|
|
670
|
+
}).then(function (response) {
|
|
671
|
+
vm.$message({
|
|
672
|
+
type: 'success',
|
|
673
|
+
message: response.data.operateMessage
|
|
674
|
+
});
|
|
675
|
+
vm.crud.search();
|
|
676
|
+
});
|
|
677
|
+
});
|
|
678
|
+
},
|
|
679
|
+
remove() {
|
|
680
|
+
let vm = this;
|
|
681
|
+
let selection = vm.$refs[vm.crud.setting.tableRef].selection;
|
|
682
|
+
if ((selection || []).length === 0) {
|
|
683
|
+
vm.$message({
|
|
684
|
+
duration: 1500,
|
|
685
|
+
type: 'info',
|
|
686
|
+
message: '请至少选择一条需要删除的数据!'
|
|
687
|
+
});
|
|
688
|
+
return;
|
|
689
|
+
}
|
|
690
|
+
if (vm.loginUser.userType == "sup" || vm.loginUser.userType == "dev") {
|
|
691
|
+
vm.crud.remove();
|
|
692
|
+
} else {
|
|
693
|
+
// 判断是否有不是自己创建的数据
|
|
694
|
+
let ifNoCreate = false;
|
|
695
|
+
let loginUserId = vm.loginUser.id;
|
|
696
|
+
selection.forEach(item => {
|
|
697
|
+
if (item.created != loginUserId) {
|
|
698
|
+
ifNoCreate = true;
|
|
699
|
+
}
|
|
700
|
+
});
|
|
701
|
+
if (ifNoCreate) { // 有不是本人创建的数据,不可以删除
|
|
702
|
+
vm.$message({
|
|
703
|
+
duration: 1500,
|
|
704
|
+
type: 'info',
|
|
705
|
+
message: '无法删除非当前用户创建的数据!'
|
|
706
|
+
});
|
|
707
|
+
return;
|
|
708
|
+
}
|
|
709
|
+
vm.crud.remove();
|
|
710
|
+
}
|
|
711
|
+
},
|
|
712
|
+
formatterOrgName(row, column, cellValue){
|
|
713
|
+
cellValue = "";
|
|
714
|
+
if(row["parentOrgName"]){
|
|
715
|
+
cellValue = row["parentOrgName"]+" -> "+row["orgName"];
|
|
716
|
+
if(row["parentOrgName"].indexOf('->') > -1){
|
|
717
|
+
let arr = row["parentOrgName"].split('->');
|
|
718
|
+
if(arr[arr.length -1] == row["orgName"] && arr.length -1 > 0){
|
|
719
|
+
let index = row["parentOrgName"].lastIndexOf(row["orgName"]);
|
|
720
|
+
let value = row["parentOrgName"].substring(0, index);
|
|
721
|
+
cellValue = value + row["orgName"];
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
}else {
|
|
725
|
+
cellValue = row["orgName"];
|
|
726
|
+
}
|
|
727
|
+
return cellValue;
|
|
728
|
+
},
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
</script>
|
|
732
|
+
|
|
733
|
+
<style scoped>
|
|
734
|
+
.viewMenuDialog /deep/ .el-dialog__body {
|
|
735
|
+
height: calc(100% - 60px);
|
|
736
|
+
}
|
|
737
|
+
</style>
|