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,856 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-select v-model="dataValue"
|
|
4
|
+
:disabled="disabled"
|
|
5
|
+
:filterable="filterable"
|
|
6
|
+
:clearable="clearable"
|
|
7
|
+
:allowCreate="allowCreate"
|
|
8
|
+
:multiple="multiple"
|
|
9
|
+
:size="size" v-if="!showText && isDiy"
|
|
10
|
+
@change="onChange" :placeholder="disabled ? '' : placeholder" style="width: 100%;">
|
|
11
|
+
<el-option
|
|
12
|
+
v-for="(item,index) in valueArr"
|
|
13
|
+
:label="item.label"
|
|
14
|
+
:value="item.value"
|
|
15
|
+
:key="index">
|
|
16
|
+
</el-option>
|
|
17
|
+
</el-select>
|
|
18
|
+
<el-select v-model="dataValue"
|
|
19
|
+
:disabled="disabled"
|
|
20
|
+
:filterable="filterable"
|
|
21
|
+
:clearable="clearable"
|
|
22
|
+
:allowCreate="allowCreate"
|
|
23
|
+
:multiple="multiple"
|
|
24
|
+
:size="size" v-if="!showText && !isUsertree && !isDiy && !isPostree && !isOrgtree&&isTreeData=='0' "
|
|
25
|
+
@change="onChange" :placeholder="disabled ? '' : placeholder" style="width: 100%;">
|
|
26
|
+
<el-option
|
|
27
|
+
v-for="item in arrDatas"
|
|
28
|
+
:key="item.id"
|
|
29
|
+
v-if="!filterNotIds || filterNotIds.indexOf(item.id)==-1"
|
|
30
|
+
:label="item[dataName]"
|
|
31
|
+
:value="item[dataId]">
|
|
32
|
+
</el-option>
|
|
33
|
+
</el-select>
|
|
34
|
+
<!--开启树下拉框-->
|
|
35
|
+
<pl-select-tree v-if="(isOrgtree || isPostree)&&!showText&&showSelectTree" v-model="dataValue" :options="arrDatas" :props="isPostree?posSelectTreeProps:defaultSelectTreeProps" :change-data="changeData"
|
|
36
|
+
:multiple="multiple" :readonly="disabled" :filterable="filterable">
|
|
37
|
+
</pl-select-tree>
|
|
38
|
+
<pl-select-tree v-if="isTreeData=='1'&&treeDataType&&!showText&&showSelectTree" v-model="dataValue" :options="arrDatas" :props="treeDataTypeBak" :change-data="changeDataTree"
|
|
39
|
+
:multiple="multiple" :readonly="disabled" :backParentName="backParentName" :filterable="filterable">
|
|
40
|
+
</pl-select-tree>
|
|
41
|
+
<!--开启树下拉框 end-->
|
|
42
|
+
<el-select v-model="dataValue"
|
|
43
|
+
:disabled="disabled"
|
|
44
|
+
:filterable="filterable"
|
|
45
|
+
:clearable="clearable"
|
|
46
|
+
:allowCreate="allowCreate"
|
|
47
|
+
:multiple="multiple"
|
|
48
|
+
:collapse-tags="collapseTags"
|
|
49
|
+
:filter-method="changeUser" clearable @clear="changeUser('')"
|
|
50
|
+
@blur="changeUserBlur"
|
|
51
|
+
ref="userTreeRef"
|
|
52
|
+
:size="size" v-if="!showText && isUsertree && !isDiy&&showSelect"
|
|
53
|
+
@change="onChange" :placeholder="disabled ? '' : placeholder" style="width: 100%;">
|
|
54
|
+
<el-option
|
|
55
|
+
v-for="item in arrDatas"
|
|
56
|
+
:key="item.id"
|
|
57
|
+
v-if="!filterNotIds || filterNotIds.indexOf(item.id)==-1"
|
|
58
|
+
:label="item[dataName]"
|
|
59
|
+
:value="item[dataId]">
|
|
60
|
+
<span>{{item[dataName] + (userOrgObj[item.userId] ? '-' : '') + (userOrgObj[item.userId] || '')}}</span>
|
|
61
|
+
</el-option>
|
|
62
|
+
</el-select>
|
|
63
|
+
<div v-if="showText" style="height: 36px;">
|
|
64
|
+
<span v-if="(isOrgtree|| isPostree ||isUsertree)">
|
|
65
|
+
{{dataValueUser}}
|
|
66
|
+
</span>
|
|
67
|
+
<span v-if="multiple && !isOrgtree &&! isPostree && !isUsertree" v-for="(value,index) in dataValue" :key="index">
|
|
68
|
+
{{(arrDatasObj[value] || value) + ((index == (dataValue.length - 1)) ? "" : ",")}}
|
|
69
|
+
</span>
|
|
70
|
+
<span v-if="!multiple && !isOrgtree &&! isPostree && !isUsertree ">
|
|
71
|
+
{{arrDatasObj[dataValue] || dataValue}}
|
|
72
|
+
</span>
|
|
73
|
+
<div v-if="measurementShow" style="display: inline-block">
|
|
74
|
+
{{measurementShow}}
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</template>
|
|
79
|
+
|
|
80
|
+
<script>
|
|
81
|
+
import {PlSelectTree} from 'sasp-base';
|
|
82
|
+
const PinyinMatch = require('pinyin-match').default;
|
|
83
|
+
|
|
84
|
+
export default {
|
|
85
|
+
name: "pl-data-select",
|
|
86
|
+
components: {
|
|
87
|
+
PlSelectTree
|
|
88
|
+
},
|
|
89
|
+
props: {
|
|
90
|
+
typeId: {required: false, default: ""},
|
|
91
|
+
field: {required: false, default: ""},
|
|
92
|
+
parentId: {required: false, default: "-1"},
|
|
93
|
+
value: {required: false, default: ""},
|
|
94
|
+
disabled: {required: false, default: false},
|
|
95
|
+
size: {required: false},
|
|
96
|
+
filterable: {required: false, default: false, type: Boolean},
|
|
97
|
+
clearable: {required: false, default: false, type: Boolean},
|
|
98
|
+
multiple: {required: false, default: false, type: Boolean},
|
|
99
|
+
change: {required: false, type: Function},
|
|
100
|
+
filterNotIds: {required: false},
|
|
101
|
+
defultValue: {required: false},
|
|
102
|
+
reqUrl:{default:""}, // 请求路径
|
|
103
|
+
labelField:{default:"dataName"}, // 值域
|
|
104
|
+
valueField:{default:"id"}, // 文本域
|
|
105
|
+
placeholder:{default:"请选择"},
|
|
106
|
+
showText:{required: false, default: false, type: Boolean}, // 自定义下拉框查看时显示文本
|
|
107
|
+
allowCreate:{default:false},
|
|
108
|
+
measurementShow:{default:false},// 自定义下拉框显示单位
|
|
109
|
+
rememberSysDataObj:{type:Function},
|
|
110
|
+
isOrgtree:{required: false, default: false, type: Boolean},//组织下拉框
|
|
111
|
+
isPostree:{required: false, default: false, type: Boolean},//岗位下拉框
|
|
112
|
+
isUsertree:{required: false, default: false, type: Boolean},//用户下拉框
|
|
113
|
+
orgDim:{required: false, default: ""},
|
|
114
|
+
orgLevel:{required: false, default: ""},
|
|
115
|
+
saveType:{required: false, default: ""},
|
|
116
|
+
backfillField:{required: false, default: ""},
|
|
117
|
+
formData:{type:Object},
|
|
118
|
+
listOutParam:{type:Object},//外部传入参数
|
|
119
|
+
isDiy:{required: false, default: false, type: Boolean},//自定义下拉框
|
|
120
|
+
valueArr:{required: false, type: Array},
|
|
121
|
+
openTree:{required: false, type: false},
|
|
122
|
+
changeField:{type:Function},
|
|
123
|
+
userData:{required:false,type:Array},//用户数据 外部传入内部就不再查询数据
|
|
124
|
+
isTreeData:{type:String,default:"0"},//是否需要处理为树数据
|
|
125
|
+
treeDataType:{type:String},//是否需要处理为树数据
|
|
126
|
+
backParentName:{type:String,default:"0"},//是否回填上级名称
|
|
127
|
+
collapseTags:{type:Boolean,default:false},
|
|
128
|
+
showLockUser:{type:Boolean,default:false},//是否显示已锁定用户
|
|
129
|
+
},
|
|
130
|
+
data() {
|
|
131
|
+
return {
|
|
132
|
+
// 需要定义个内部变量接收传入的值,选择下拉框的时候改的也是这个值,如果不用内部变量接收的情况下,直接改传入的value的值会报警告
|
|
133
|
+
dataValue: this.value,
|
|
134
|
+
arrDatas: [],
|
|
135
|
+
objDataVuleToData: {},
|
|
136
|
+
dataName:"dataName",
|
|
137
|
+
dataId:"id",
|
|
138
|
+
currentParentId:"",
|
|
139
|
+
arrDatasObj:{}, // 下拉数据的对象
|
|
140
|
+
dataValueUser:"",
|
|
141
|
+
usersNameArr:[],
|
|
142
|
+
arrDatasCopy:[],
|
|
143
|
+
defaultSelectTreeProps: {
|
|
144
|
+
parent: 'parentId', // 父级唯一标识
|
|
145
|
+
value: 'id', // 唯一标识
|
|
146
|
+
label: 'orgName', // 标签显示
|
|
147
|
+
children: 'children', // 子级
|
|
148
|
+
},
|
|
149
|
+
posSelectTreeProps: {
|
|
150
|
+
parent: 'parentId', // 父级唯一标识
|
|
151
|
+
value: 'id', // 唯一标识
|
|
152
|
+
label: 'orgName', // 标签显示
|
|
153
|
+
children: 'children', // 子级
|
|
154
|
+
disabledd:"posName",//不可点击的判断属性
|
|
155
|
+
disabled:"orgParentId",//不可点击的判断属性
|
|
156
|
+
},
|
|
157
|
+
showSelectTree:false,//树显示
|
|
158
|
+
showSelect:false,
|
|
159
|
+
treeDataTypeBak:{},
|
|
160
|
+
userOrgObj:{},
|
|
161
|
+
userIdObj:{},
|
|
162
|
+
};
|
|
163
|
+
},
|
|
164
|
+
mounted(){
|
|
165
|
+
if(!this.isUsertree){
|
|
166
|
+
if(this.multiple){
|
|
167
|
+
// 多选情况下:
|
|
168
|
+
// 添加表单初始化时如果没有值时设置为[],修改表单初始化时为string需要转化
|
|
169
|
+
if(this.isOrgtree || this.isPostree){//组织岗位默认值不需要转
|
|
170
|
+
if(!this.dataValue){
|
|
171
|
+
this.dataValue = "";
|
|
172
|
+
//this.dataValue = this.value;
|
|
173
|
+
}
|
|
174
|
+
}else if(this.value && this.value.constructor == Array){
|
|
175
|
+
this.dataValue = this.value;
|
|
176
|
+
}else if(this.value){
|
|
177
|
+
this.dataValue = this.value.split(",");
|
|
178
|
+
}else{
|
|
179
|
+
this.dataValue = [];
|
|
180
|
+
}
|
|
181
|
+
}else{
|
|
182
|
+
if(this.value==undefined || this.value==''){
|
|
183
|
+
this.dataValue =this.defultValue;
|
|
184
|
+
}else{
|
|
185
|
+
this.dataValue=this.value;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
watch: {
|
|
191
|
+
typeId() {
|
|
192
|
+
this.initDataSelect();
|
|
193
|
+
},
|
|
194
|
+
parentId() {
|
|
195
|
+
this.initDataSelect();
|
|
196
|
+
},
|
|
197
|
+
/*value() {
|
|
198
|
+
if(this.value==undefined || this.value==''){
|
|
199
|
+
this.dataValue =this.defultValue;
|
|
200
|
+
}else{
|
|
201
|
+
this.dataValue=this.value;
|
|
202
|
+
}
|
|
203
|
+
},*/
|
|
204
|
+
reqUrl() {
|
|
205
|
+
this.initDataSelect();
|
|
206
|
+
},
|
|
207
|
+
filterNotIds() {
|
|
208
|
+
if (this.filterNotIds && this.filterNotIds.indexOf(this.value) > -1) {
|
|
209
|
+
this.dataValue = "";
|
|
210
|
+
this.onChange();
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
value(){ //监听值变化重新赋值
|
|
214
|
+
if(this.value==undefined || this.value==''){
|
|
215
|
+
this.dataValue = this.defultValue;
|
|
216
|
+
}else{
|
|
217
|
+
this.dataValue= this.value;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
created() {
|
|
222
|
+
if(this.value==undefined || this.value==''){
|
|
223
|
+
this.dataValue = this.defultValue;
|
|
224
|
+
}else{
|
|
225
|
+
this.dataValue= this.value;
|
|
226
|
+
}
|
|
227
|
+
if(this.isOrgtree){
|
|
228
|
+
this.initOrgTree();
|
|
229
|
+
}else if(this.isPostree){
|
|
230
|
+
this.initPosTree();
|
|
231
|
+
}else if(this.isUsertree){
|
|
232
|
+
if( this.multiple && !Array.isArray(this.value)){
|
|
233
|
+
try{
|
|
234
|
+
if(this.value){
|
|
235
|
+
this.dataValue =JSON.parse(this.value);
|
|
236
|
+
}
|
|
237
|
+
}catch (e) {
|
|
238
|
+
this.dataValue =this.value.split(",");
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
if(!this.dataValue && this.multiple){//多选为空需要手动赋值[]
|
|
242
|
+
this.dataValue=[];
|
|
243
|
+
}
|
|
244
|
+
this.initUserTree();
|
|
245
|
+
}else{
|
|
246
|
+
this.initDataSelect();
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
methods: {
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* 加载数据字典下拉框
|
|
253
|
+
*/
|
|
254
|
+
initDataSelect() {
|
|
255
|
+
let vm = this;
|
|
256
|
+
if (!vm.typeId && !vm.reqUrl) {
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
vm.objDataVuleToData = {};
|
|
260
|
+
vm.currentParentId = vm.parentId || "-1";
|
|
261
|
+
vm.arrDatasObj = {};
|
|
262
|
+
if(vm.reqUrl){
|
|
263
|
+
vm.dataName = vm.labelField;
|
|
264
|
+
vm.dataId = vm.valueField;
|
|
265
|
+
let url=vm.reqUrl;
|
|
266
|
+
let requestParam={};
|
|
267
|
+
if(url.includes("?")){//分割参数
|
|
268
|
+
let httpurl=url.split("?")[0];
|
|
269
|
+
let params=url.split("?")[1];
|
|
270
|
+
requestParam=this.getParamToObj(requestParam,params);
|
|
271
|
+
url=httpurl;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
let serviceName = (window.SERVICE_NAME || {});
|
|
275
|
+
let adminServeName = serviceName.admin || "/admin/";
|
|
276
|
+
let formServeName = serviceName.form || "/form/";
|
|
277
|
+
let flowServeName = serviceName.flow || "/flow/";
|
|
278
|
+
let oaServeName = serviceName.oa || "/oaproject/";
|
|
279
|
+
url = window.JAVA_URL + "/" + url;
|
|
280
|
+
url = vm.platStringUtil.replaceAll(url,"/admin/",adminServeName);
|
|
281
|
+
url = vm.platStringUtil.replaceAll(url,"/form/",formServeName);
|
|
282
|
+
url = vm.platStringUtil.replaceAll(url,"/flow/",flowServeName);
|
|
283
|
+
url = vm.platStringUtil.replaceAll(url,"/oaproject/",oaServeName);
|
|
284
|
+
url = vm.platStringUtil.replaceAll(url,"/oaadmin/",adminServeName);
|
|
285
|
+
url = vm.platStringUtil.replaceAll(url,"/oaform/",formServeName);
|
|
286
|
+
url = vm.platStringUtil.replaceAll(url,"/oaflow/",flowServeName);
|
|
287
|
+
vm.axios.post(url,requestParam).then(res => {
|
|
288
|
+
let arr=[];
|
|
289
|
+
if(res&&res.data){
|
|
290
|
+
if(res.data.hasOwnProperty("operateObj")){
|
|
291
|
+
arr=res.data.operateObj||[];
|
|
292
|
+
}else{
|
|
293
|
+
arr=res.data||[];
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
arr.forEach( item => {
|
|
297
|
+
if(!item.id && item.ID){
|
|
298
|
+
vm.$set(item,"id",item.ID);
|
|
299
|
+
}
|
|
300
|
+
})
|
|
301
|
+
let arrBak=[];
|
|
302
|
+
if(Array.isArray(arr)){
|
|
303
|
+
arrBak=JSON.parse(JSON.stringify(arr));
|
|
304
|
+
}
|
|
305
|
+
vm.showSelectTree=false;
|
|
306
|
+
if(vm.isTreeData =='1' && vm.treeDataType){//处理为树数据
|
|
307
|
+
let obj=JSON.parse(vm.treeDataType);
|
|
308
|
+
let paramSetting = {"id":vm.valueField,"pId":obj.parent,"children":obj.children,"label":vm.labelField,"value":vm.valueField,"parentTree":obj.parentTree};
|
|
309
|
+
vm.treeDataTypeBak=paramSetting;
|
|
310
|
+
vm.arrDatas=this.COMMON_FUNC.buildElTree(arr, paramSetting);
|
|
311
|
+
this.$nextTick(() => {
|
|
312
|
+
vm.showSelectTree=true;
|
|
313
|
+
})
|
|
314
|
+
}else{
|
|
315
|
+
vm.arrDatas=arr;
|
|
316
|
+
this.$nextTick(() => {
|
|
317
|
+
vm.showSelectTree=true;
|
|
318
|
+
})
|
|
319
|
+
}
|
|
320
|
+
arrBak.forEach(item => {
|
|
321
|
+
vm.$set(vm.arrDatasObj,item[vm.valueField],item[vm.labelField]);
|
|
322
|
+
});
|
|
323
|
+
if(this.backParentName=='1'&&this.value.includes("-")){//开启回填上级名称需要额外处理数据
|
|
324
|
+
let arr = this.value.split("-");
|
|
325
|
+
let label="";
|
|
326
|
+
arr.forEach(item =>{
|
|
327
|
+
if(vm.arrDatasObj[item]){
|
|
328
|
+
label +="-"+vm.arrDatasObj[item];
|
|
329
|
+
}else{
|
|
330
|
+
label+="";
|
|
331
|
+
}
|
|
332
|
+
})
|
|
333
|
+
vm.$set(vm.arrDatasObj,this.value,label.substring(1));
|
|
334
|
+
}
|
|
335
|
+
vm.rememberSysDataObj && vm.rememberSysDataObj(vm.field,arrBak);
|
|
336
|
+
})
|
|
337
|
+
}else{
|
|
338
|
+
let proimise = this.DATA_GLOBAL.getDatas(this.typeId,this.currentParentId);
|
|
339
|
+
if(this.showText){
|
|
340
|
+
proimise = this.DATA_GLOBAL.getDatasContainOutDate(this.typeId,this.currentParentId);
|
|
341
|
+
}
|
|
342
|
+
proimise.then(datas => {
|
|
343
|
+
vm.arrDatas = datas || [];
|
|
344
|
+
vm.arrDatas.forEach((dataEach) => {
|
|
345
|
+
vm.objDataVuleToData[dataEach.id] = dataEach;
|
|
346
|
+
//存入key name
|
|
347
|
+
vm.DATA_GLOBAL.setKeyName(dataEach.id, dataEach.dataName);
|
|
348
|
+
vm.$set(vm.arrDatasObj,dataEach.id,dataEach.dataName);
|
|
349
|
+
});
|
|
350
|
+
vm.rememberSysDataObj && vm.rememberSysDataObj(vm.field,vm.arrDatasObj);
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
/**
|
|
355
|
+
* 处理get请求参数,返回对象
|
|
356
|
+
*/
|
|
357
|
+
getParamToObj(result,params){
|
|
358
|
+
if(params.includes("&")){
|
|
359
|
+
let arr=params.split("&");
|
|
360
|
+
arr.forEach(data =>{
|
|
361
|
+
let key=data.split("=")[0];
|
|
362
|
+
let value=data.substring(data.indexOf("=")+1);
|
|
363
|
+
if(value.includes("${listOutParam.")){
|
|
364
|
+
let str1=value.split("${listOutParam.")[0];
|
|
365
|
+
let str2=value.split("${listOutParam.")[1];
|
|
366
|
+
value=str1+"'"+this.listOutParam[str2.split("}")[0]]+"'"+str2.split("}")[1];
|
|
367
|
+
}
|
|
368
|
+
this.$set(result,key,value);
|
|
369
|
+
})
|
|
370
|
+
}else{
|
|
371
|
+
let key=params.split("=")[0];
|
|
372
|
+
let value=params.substring(params.indexOf("=")+1);
|
|
373
|
+
this.$set(result,key,value);
|
|
374
|
+
}
|
|
375
|
+
return result;
|
|
376
|
+
},
|
|
377
|
+
onChange() {
|
|
378
|
+
let vm = this;
|
|
379
|
+
let label = "";
|
|
380
|
+
vm.arrDatas.forEach(item => {
|
|
381
|
+
if(item[this.valueField] === vm.dataValue ){
|
|
382
|
+
label = item[this.labelField];
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
|
|
386
|
+
if(this.isUsertree && this.saveType == "text"){
|
|
387
|
+
let text = this.userIdObj[this.dataValue];
|
|
388
|
+
// 把值通过返回给父组件的值
|
|
389
|
+
this.$emit('input', text);
|
|
390
|
+
this.change && this.change(text, label);
|
|
391
|
+
this.$emit('change', text);
|
|
392
|
+
}else{
|
|
393
|
+
// 把值通过返回给父组件的值
|
|
394
|
+
this.$emit('input', this.dataValue);
|
|
395
|
+
this.change && this.change(this.dataValue, label);
|
|
396
|
+
this.$emit('change', this.dataValue);
|
|
397
|
+
}
|
|
398
|
+
//调用回调方法,回调赋值
|
|
399
|
+
this.initBackField();
|
|
400
|
+
},
|
|
401
|
+
// 回调赋值
|
|
402
|
+
async initBackField() {
|
|
403
|
+
if (this.backfillField && this.formData) {//回调字段
|
|
404
|
+
if (this.saveType && this.saveType == 'text') {
|
|
405
|
+
if(this.isUsertree){
|
|
406
|
+
let text = this.userIdObj[this.dataValue];
|
|
407
|
+
this.$set(this.formData, this.backfillField, text);
|
|
408
|
+
}else{
|
|
409
|
+
//存的是文本的话不用转 直接赋值
|
|
410
|
+
this.$set(this.formData, this.backfillField, this.dataValue);
|
|
411
|
+
}
|
|
412
|
+
} else if (this.saveType && this.saveType == 'dataId') {
|
|
413
|
+
let result = "";
|
|
414
|
+
this.arrDatasCopy.forEach(item => {
|
|
415
|
+
if (Array.isArray(this.dataValue)) {//多选情况
|
|
416
|
+
this.dataValue.forEach(posItem => {
|
|
417
|
+
if (posItem == item.id) {
|
|
418
|
+
result += "," + item.dataName;
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
} else if (this.dataValue && this.dataValue == item.id) {//单选
|
|
422
|
+
result = item.dataName;
|
|
423
|
+
}
|
|
424
|
+
})
|
|
425
|
+
if(result[0] == ","){
|
|
426
|
+
result = result.substring(1);
|
|
427
|
+
}
|
|
428
|
+
this.$set(this.formData, this.backfillField, result);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
//初始化组织树下拉框
|
|
433
|
+
initOrgTree(){
|
|
434
|
+
let param={};
|
|
435
|
+
this.arrDatas=[];
|
|
436
|
+
this.showSelectTree=false;
|
|
437
|
+
this.$set(param,"orgDim",this.orgDim);
|
|
438
|
+
if(this.orgLevel){
|
|
439
|
+
this.$set(param,"orgLevel",this.orgLevel);
|
|
440
|
+
}
|
|
441
|
+
let userDept = this.USER_GLOBAL.getLoginDept();
|
|
442
|
+
if(userDept && userDept.id){
|
|
443
|
+
this.$set(param,"id",userDept.id);
|
|
444
|
+
}
|
|
445
|
+
if(userDept && userDept.orgParentId){
|
|
446
|
+
this.$set(param,"orgParentId",userDept.orgParentId);
|
|
447
|
+
}
|
|
448
|
+
this.axios.post(this.api.sysOrg.findOrgTree,param).then(res=>{
|
|
449
|
+
if(res.data&&res.data.operateObj){
|
|
450
|
+
let resData=res.data.operateObj || [];
|
|
451
|
+
let result="";
|
|
452
|
+
resData.forEach(item=>{
|
|
453
|
+
if(this.saveType == "text"){
|
|
454
|
+
this.arrDatas.push(item);
|
|
455
|
+
if(!this.multiple && item.orgName == this.dataValue){//单选
|
|
456
|
+
result +=","+ item.id;
|
|
457
|
+
}else if(this.multiple){ //多选
|
|
458
|
+
if(this.dataValue.includes(",")){//多数据--字符串
|
|
459
|
+
( this.dataValue.split(",") || []).forEach(mulItem => {
|
|
460
|
+
if(mulItem == item.orgName){
|
|
461
|
+
result +=","+item.id;
|
|
462
|
+
}
|
|
463
|
+
})
|
|
464
|
+
}else if(Array.isArray(this.dataValue)){//多数据--数组
|
|
465
|
+
( this.dataValue || []).forEach(mulItem => {
|
|
466
|
+
if(mulItem == item.orgName){
|
|
467
|
+
result +=","+item.id;
|
|
468
|
+
}
|
|
469
|
+
})
|
|
470
|
+
} else if(this.dataValue == item.orgName){//单数据
|
|
471
|
+
result =","+item.id;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}else if(this.saveType == "dataId"){
|
|
475
|
+
this.arrDatas.push(item);
|
|
476
|
+
if(!this.multiple && item.id == this.dataValue){//单选
|
|
477
|
+
result +=","+ item.orgName;
|
|
478
|
+
}else if(this.multiple){ //多选
|
|
479
|
+
if(this.dataValue.includes(",")){//多数据--字符串
|
|
480
|
+
( this.dataValue.split(",") || []).forEach(mulItem => {
|
|
481
|
+
if(mulItem == item.id){
|
|
482
|
+
result +=","+item.orgName;
|
|
483
|
+
}
|
|
484
|
+
})
|
|
485
|
+
}else if(Array.isArray(this.dataValue)){//多数据--数组
|
|
486
|
+
( this.dataValue || []).forEach(mulItem => {
|
|
487
|
+
if(mulItem == item.id){
|
|
488
|
+
result +=","+item.orgName;
|
|
489
|
+
}
|
|
490
|
+
})
|
|
491
|
+
} else if(this.dataValue == item.id){//单数据
|
|
492
|
+
result =","+item.orgName;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
})
|
|
497
|
+
if(this.saveType == "text"){//文本格式的赋值
|
|
498
|
+
this.dataValueUser=this.dataValue;
|
|
499
|
+
this.dataValue=result.substring(1);
|
|
500
|
+
}
|
|
501
|
+
if(this.saveType == "dataId"){//关联标识的赋值
|
|
502
|
+
this.dataValueUser=result.substring(1);
|
|
503
|
+
}
|
|
504
|
+
if(this.backfillField){//回调初始化赋值
|
|
505
|
+
this.$set(this.formData, this.backfillField, this.dataValueUser);
|
|
506
|
+
}
|
|
507
|
+
if(this.openTree){
|
|
508
|
+
let paramSetting={};
|
|
509
|
+
paramSetting["id"] = "id";
|
|
510
|
+
paramSetting["pId"] = "orgParentId";
|
|
511
|
+
paramSetting["children"] = "children"; // 设置children可配置
|
|
512
|
+
if(!this.dataValue || this.dataValue.length==0){//空数据
|
|
513
|
+
this.dataValue="";
|
|
514
|
+
}else if(Array.isArray(this.dataValue)){
|
|
515
|
+
this.dataValue=this.dataValue.join(",")
|
|
516
|
+
}
|
|
517
|
+
this.arrDatasCopy=JSON.parse(JSON.stringify(this.arrDatas));
|
|
518
|
+
this.arrDatas=this.initTreeData(this.arrDatas,paramSetting);
|
|
519
|
+
this.showSelectTree=true;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
}
|
|
523
|
+
})
|
|
524
|
+
},
|
|
525
|
+
//初始化岗位树下拉框
|
|
526
|
+
initPosTree(){
|
|
527
|
+
let param={};
|
|
528
|
+
this.arrDatas=[];
|
|
529
|
+
this.showSelectTree=false;
|
|
530
|
+
this.$set(param,"orgDim",this.orgDim);
|
|
531
|
+
if(this.orgLevel){
|
|
532
|
+
this.$set(param,"orgLevel",this.orgLevel);
|
|
533
|
+
}
|
|
534
|
+
let userDept = this.USER_GLOBAL.getLoginDept();
|
|
535
|
+
if(userDept && userDept.id){
|
|
536
|
+
this.$set(param,"id",userDept.id);
|
|
537
|
+
}
|
|
538
|
+
if(userDept && userDept.orgParentId){
|
|
539
|
+
this.$set(param,"orgParentId",userDept.orgParentId);
|
|
540
|
+
}
|
|
541
|
+
this.axios.post(this.api.sysOrg.findOrgTree,param).then(res=>{
|
|
542
|
+
if(res.data&&res.data.operateObj){
|
|
543
|
+
let orgArr=res.data.operateObj;
|
|
544
|
+
let posArr=[];
|
|
545
|
+
this.axios.post(this.api.sysPos.findNoPage,{"orgDim":this.orgDim}).then(posres=>{
|
|
546
|
+
posArr=posres.data;
|
|
547
|
+
let result="";
|
|
548
|
+
posArr.forEach(item=>{
|
|
549
|
+
if(this.saveType == "text"){
|
|
550
|
+
if(!this.multiple && item.posName == this.dataValue){//单选
|
|
551
|
+
result +=","+ item.id;
|
|
552
|
+
}else if(this.multiple){ //多选
|
|
553
|
+
if(this.dataValue.includes(",")){//多数据--字符串
|
|
554
|
+
( this.dataValue.split(",") || []).forEach(mulItem => {
|
|
555
|
+
if(mulItem == item.posName){
|
|
556
|
+
result +=","+item.id;
|
|
557
|
+
}
|
|
558
|
+
})
|
|
559
|
+
}else if(Array.isArray(this.dataValue)){//多数据--数组
|
|
560
|
+
( this.dataValue || []).forEach(mulItem => {
|
|
561
|
+
if(mulItem == item.posName){
|
|
562
|
+
result +=","+item.id;
|
|
563
|
+
}
|
|
564
|
+
})
|
|
565
|
+
} else if(this.dataValue == item.posName){//单数据
|
|
566
|
+
result =","+item.id;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}else if(this.saveType == "dataId"){
|
|
570
|
+
if(!this.multiple && item.id == this.dataValue){//单选
|
|
571
|
+
result +=","+ item.posName;
|
|
572
|
+
}else if(this.multiple){ //多选
|
|
573
|
+
if(this.dataValue.includes(",")){//多数据--字符串
|
|
574
|
+
( this.dataValue.split(",") || []).forEach(mulItem => {
|
|
575
|
+
if(mulItem == item.id){
|
|
576
|
+
result +=","+item.posName;
|
|
577
|
+
}
|
|
578
|
+
})
|
|
579
|
+
}else if(Array.isArray(this.dataValue)){//多数据--数组
|
|
580
|
+
( this.dataValue || []).forEach(mulItem => {
|
|
581
|
+
if(mulItem == item.id){
|
|
582
|
+
result +=","+item.posName;
|
|
583
|
+
}
|
|
584
|
+
})
|
|
585
|
+
} else if(this.dataValue == item.id){//单数据
|
|
586
|
+
result =","+item.posName;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
})
|
|
591
|
+
if(this.saveType == "text"){//文本格式的赋值
|
|
592
|
+
this.dataValueUser=this.dataValue;
|
|
593
|
+
this.dataValue=result.substring(1);
|
|
594
|
+
}
|
|
595
|
+
if(this.saveType == "dataId"){//关联标识的赋值
|
|
596
|
+
this.dataValueUser=result.substring(1);
|
|
597
|
+
}
|
|
598
|
+
if(this.backfillField){//回调初始化赋值
|
|
599
|
+
this.$set(this.formData, this.backfillField, this.dataValueUser);
|
|
600
|
+
}
|
|
601
|
+
if(this.openTree){
|
|
602
|
+
let paramSetting={};
|
|
603
|
+
paramSetting["id"] = "id";
|
|
604
|
+
paramSetting["pId"] = "orgParentId";
|
|
605
|
+
paramSetting["children"] = "children"; // 设置children可配置
|
|
606
|
+
if(!this.dataValue || this.dataValue.length==0){//空数据
|
|
607
|
+
this.dataValue="";
|
|
608
|
+
}else if(Array.isArray(this.dataValue)){
|
|
609
|
+
this.dataValue=this.dataValue.join(",")
|
|
610
|
+
}
|
|
611
|
+
orgArr=this.initTreeData(orgArr,paramSetting);
|
|
612
|
+
this.dealData(orgArr,posArr);
|
|
613
|
+
this.arrDatas=orgArr;
|
|
614
|
+
this.showSelectTree=true;
|
|
615
|
+
}
|
|
616
|
+
})
|
|
617
|
+
}
|
|
618
|
+
})
|
|
619
|
+
},
|
|
620
|
+
/*
|
|
621
|
+
递归处理岗位数据
|
|
622
|
+
*/
|
|
623
|
+
dealData(arr,posArr){
|
|
624
|
+
if(Array.isArray(arr)){
|
|
625
|
+
arr.forEach(item =>{
|
|
626
|
+
if(item.children){//有下级
|
|
627
|
+
(posArr || []).forEach(pos => {
|
|
628
|
+
if(pos.orgId == item.id){
|
|
629
|
+
pos.orgName =pos.posName;
|
|
630
|
+
item.children.unshift(pos);
|
|
631
|
+
}
|
|
632
|
+
})
|
|
633
|
+
this.dealData(item.children,posArr);
|
|
634
|
+
}else{//无下级
|
|
635
|
+
(posArr || []).forEach(pos => {
|
|
636
|
+
if(pos.orgId == item.id){
|
|
637
|
+
pos.orgName =pos.posName;
|
|
638
|
+
if(item.children){
|
|
639
|
+
item.children.unshift(pos);
|
|
640
|
+
}else{
|
|
641
|
+
item.children=[];
|
|
642
|
+
item.children.push(pos)
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
})
|
|
646
|
+
return ;
|
|
647
|
+
}
|
|
648
|
+
})
|
|
649
|
+
}
|
|
650
|
+
},
|
|
651
|
+
//初始化用户树下拉框
|
|
652
|
+
initUserTree(){
|
|
653
|
+
// this.axios.post(this.api.param.getSysParams, {'key': 'userTreeDim'}).then(paramRes => {
|
|
654
|
+
this.PARAM_GLOBAL.getByKeyAsync("userTreeDim").then(res =>{
|
|
655
|
+
let currentDim = res.paramVal || "";
|
|
656
|
+
try{
|
|
657
|
+
if(typeof this.dataValue=='string' && this.dataValue.includes("[")){
|
|
658
|
+
this.dataValue=JSON.parse(this.dataValue);
|
|
659
|
+
}
|
|
660
|
+
}catch (e) {
|
|
661
|
+
console.log(e)
|
|
662
|
+
}
|
|
663
|
+
let userObj = {};
|
|
664
|
+
if(this.userData){
|
|
665
|
+
let arr=this.userData || [];
|
|
666
|
+
let result="";
|
|
667
|
+
arr.forEach(item=>{
|
|
668
|
+
if(userObj[item.userId]){
|
|
669
|
+
return;
|
|
670
|
+
}
|
|
671
|
+
if(currentDim){
|
|
672
|
+
if(currentDim == item.orgDim){
|
|
673
|
+
userObj[item.userId] = true;
|
|
674
|
+
}else{
|
|
675
|
+
return;
|
|
676
|
+
}
|
|
677
|
+
}else{
|
|
678
|
+
userObj[item.userId] = true;
|
|
679
|
+
}
|
|
680
|
+
this.userOrgObj[item.userId] = item.orgName;
|
|
681
|
+
this.userIdObj[item.userId] = item.userName;
|
|
682
|
+
if(this.saveType == "text"){
|
|
683
|
+
result=","+this.value;
|
|
684
|
+
this.arrDatasCopy.push({"id":item.userId,"userId":item.userId,"dataId":item.userName,"dataName":item.userName});
|
|
685
|
+
}else if(this.saveType == "dataId"){
|
|
686
|
+
this.arrDatasCopy.push({"id":item.userId,"userId":item.userId,"dataId":item.userId,"dataName":item.userName});
|
|
687
|
+
//当是查看时
|
|
688
|
+
if(this.showText){
|
|
689
|
+
let arr=[];
|
|
690
|
+
if(Array.isArray(this.value)){//数组格式
|
|
691
|
+
arr=this.value;
|
|
692
|
+
}else{
|
|
693
|
+
arr=this.value.split(",");
|
|
694
|
+
}
|
|
695
|
+
arr.forEach(posItem => {
|
|
696
|
+
if(posItem == item.userId){
|
|
697
|
+
result+=","+item.userName;
|
|
698
|
+
}
|
|
699
|
+
})
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
this.usersNameArr.push(item.userName);
|
|
703
|
+
})
|
|
704
|
+
this.dataValueUser=result.substring(1);
|
|
705
|
+
this.arrDatas=JSON.parse(JSON.stringify(this.arrDatasCopy));
|
|
706
|
+
this.initBackField();
|
|
707
|
+
this.showSelect=true;
|
|
708
|
+
}else{
|
|
709
|
+
this.USER_GLOBAL.getAllPosUser(this.showLockUser).then(res=>{//从缓存中读取用户列表
|
|
710
|
+
if(res){
|
|
711
|
+
let arr=res || [];
|
|
712
|
+
let result="";
|
|
713
|
+
arr.forEach(item=>{
|
|
714
|
+
if(userObj[item.userId]){
|
|
715
|
+
return;
|
|
716
|
+
}
|
|
717
|
+
if(currentDim){
|
|
718
|
+
if(currentDim == item.orgDim || (this.showLockUser && item.isLockUser)){
|
|
719
|
+
userObj[item.userId] = true;
|
|
720
|
+
}else{
|
|
721
|
+
return;
|
|
722
|
+
}
|
|
723
|
+
}else{
|
|
724
|
+
userObj[item.userId] = true;
|
|
725
|
+
}
|
|
726
|
+
this.userOrgObj[item.userId] = item.orgName;
|
|
727
|
+
this.userIdObj[item.userId] = item.userName;
|
|
728
|
+
if(this.saveType == "text"){
|
|
729
|
+
result=","+this.value;
|
|
730
|
+
this.arrDatasCopy.push({"id":item.userId,"userId":item.userId,"dataId":item.userName,"dataName":item.userName});
|
|
731
|
+
}else if(this.saveType == "dataId"){
|
|
732
|
+
this.arrDatasCopy.push({"id":item.userId,"userId":item.userId,"dataId":item.userId,"dataName":item.userName});
|
|
733
|
+
//当是查看时
|
|
734
|
+
if(this.showText){
|
|
735
|
+
let arr=[];
|
|
736
|
+
try {
|
|
737
|
+
this.value=JSON.parse(this.value);
|
|
738
|
+
}catch (e) {
|
|
739
|
+
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
if(Array.isArray(this.value)){//数组格式
|
|
743
|
+
arr=this.value;
|
|
744
|
+
}else{
|
|
745
|
+
arr=this.value.split(",");
|
|
746
|
+
}
|
|
747
|
+
arr.forEach(posItem => {
|
|
748
|
+
if(posItem == item.userId){
|
|
749
|
+
result+=","+item.userName;
|
|
750
|
+
}
|
|
751
|
+
})
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
this.usersNameArr.push(item.userName);
|
|
755
|
+
})
|
|
756
|
+
|
|
757
|
+
this.dataValueUser=result.substring(1);
|
|
758
|
+
this.arrDatas=JSON.parse(JSON.stringify(this.arrDatasCopy));
|
|
759
|
+
this.initBackField();
|
|
760
|
+
this.showSelect=true;
|
|
761
|
+
}
|
|
762
|
+
})
|
|
763
|
+
}
|
|
764
|
+
})
|
|
765
|
+
},
|
|
766
|
+
|
|
767
|
+
changeUserBlur(value){
|
|
768
|
+
// this.$nextTick(() => {
|
|
769
|
+
// this.arrDatas=JSON.parse(JSON.stringify( this.arrDatasCopy));
|
|
770
|
+
// })
|
|
771
|
+
},
|
|
772
|
+
|
|
773
|
+
//用户名搜索
|
|
774
|
+
changeUser(value){
|
|
775
|
+
if(this.$refs.userTreeRef.$refs.input){ // 处理多选时ELEMENTUI底层无法触发blur事件的问题
|
|
776
|
+
this.$refs.userTreeRef.$refs.input.blur = () => {
|
|
777
|
+
this.arrDatas=JSON.parse(JSON.stringify( this.arrDatasCopy));
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
if(value){
|
|
782
|
+
if (/[^\x00-\xff]/g.test(value)) {
|
|
783
|
+
//输入汉字
|
|
784
|
+
this.arrDatas = this.arrDatasCopy.filter(item => {//下拉框赋值
|
|
785
|
+
if(item.dataName.includes(value)){
|
|
786
|
+
return item;
|
|
787
|
+
}
|
|
788
|
+
});
|
|
789
|
+
} else {//拼音
|
|
790
|
+
let str = this.usersNameArr.join(",");
|
|
791
|
+
let arr = PinyinMatch.match(str, value);
|
|
792
|
+
let content = str.substring(arr[0], arr[1] + 1);
|
|
793
|
+
let contentArr = [];
|
|
794
|
+
while(content){
|
|
795
|
+
contentArr.push(content);
|
|
796
|
+
str = str.substring(arr[1] + 1);
|
|
797
|
+
arr = PinyinMatch.match(str, value);
|
|
798
|
+
content = str.substring(arr[0], arr[1] + 1);
|
|
799
|
+
}
|
|
800
|
+
if(contentArr.length > 0){
|
|
801
|
+
this.arrDatas = this.arrDatasCopy.filter(item => {//下拉框赋值
|
|
802
|
+
let flag = false;
|
|
803
|
+
for(let contentData of contentArr){
|
|
804
|
+
if(item.dataName.includes(contentData)){
|
|
805
|
+
flag = true;
|
|
806
|
+
break;
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
return flag;
|
|
810
|
+
});
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
}else{//为空,赋值所有
|
|
814
|
+
this.arrDatas=JSON.parse(JSON.stringify( this.arrDatasCopy));
|
|
815
|
+
}
|
|
816
|
+
},
|
|
817
|
+
/*
|
|
818
|
+
处理树数据 输入正常数组,返回树格式数据
|
|
819
|
+
*/
|
|
820
|
+
initTreeData(resData,paramSetting){
|
|
821
|
+
let vm =this;
|
|
822
|
+
if(!paramSetting){
|
|
823
|
+
paramSetting["id"] = "id";
|
|
824
|
+
paramSetting["pId"] = "parentId";
|
|
825
|
+
paramSetting["children"] = "children"; // 设置children可配置
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
return vm.COMMON_FUNC.buildElTree(resData,paramSetting);
|
|
829
|
+
},
|
|
830
|
+
/*
|
|
831
|
+
树回调
|
|
832
|
+
*/
|
|
833
|
+
changeData(label,val){
|
|
834
|
+
this.dataValue = val;
|
|
835
|
+
if(this.saveType == "text"){
|
|
836
|
+
this.changeField(this.field,label);
|
|
837
|
+
this.$set(this.formData, this.backfillField, label);
|
|
838
|
+
}else{
|
|
839
|
+
this.changeField(this.field,val);
|
|
840
|
+
this.$set(this.formData, this.backfillField, label);
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
},
|
|
844
|
+
/**
|
|
845
|
+
* 远程连接树数据回调
|
|
846
|
+
*/
|
|
847
|
+
changeDataTree(label,val){
|
|
848
|
+
this.dataValue = label;
|
|
849
|
+
this.changeField(this.field,val);
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
</script>
|
|
854
|
+
|
|
855
|
+
<style lang="scss">
|
|
856
|
+
</style>
|