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.
Files changed (141) hide show
  1. package/index.js +227 -0
  2. package/package.json +19 -0
  3. package/router.js +83 -0
  4. package/src/assets/font/iconfont.css +1346 -0
  5. package/src/assets/font/iconfont.eot +0 -0
  6. package/src/assets/font/iconfont.js +1 -0
  7. package/src/assets/font/iconfont.svg +827 -0
  8. package/src/assets/font/iconfont.ttf +0 -0
  9. package/src/assets/font/iconfont.woff +0 -0
  10. package/src/assets/images/loading-bar.gif +0 -0
  11. package/src/assets/js/adminInstall.js +36 -0
  12. package/src/assets/js/api/apiAdmin.js +613 -0
  13. package/src/assets/js/global/dataGlobal.js +260 -0
  14. package/src/assets/js/global/logGlobal.js +22 -0
  15. package/src/assets/js/global/paramGlobal.js +67 -0
  16. package/src/assets/js/global/resGlobal.js +91 -0
  17. package/src/assets/js/global/userGlobal.js +283 -0
  18. package/src/components/complexViewRendering.vue +601 -0
  19. package/src/components/ifmLink.vue +71 -0
  20. package/src/components/public/data/plDataCascader.vue +85 -0
  21. package/src/components/public/data/plDataRadio.vue +73 -0
  22. package/src/components/public/data/plDataRadioGroup.vue +70 -0
  23. package/src/components/public/data/plDataSelect.vue +856 -0
  24. package/src/components/public/data/plDatePicker.vue +159 -0
  25. package/src/components/public/org/bg.png +0 -0
  26. package/src/components/public/org/sysOrgPosUserSelect.vue +1237 -0
  27. package/src/components/public/org/sysOrgPosUserSelectDark.vue +1402 -0
  28. package/src/components/public/org/sysOrgPosUserSelectNew.vue +1527 -0
  29. package/src/components/public/upload/images/compress.png +0 -0
  30. package/src/components/public/upload/images/emipty.png +0 -0
  31. package/src/components/public/upload/images/excel.png +0 -0
  32. package/src/components/public/upload/images/file.png +0 -0
  33. package/src/components/public/upload/images/pdf.png +0 -0
  34. package/src/components/public/upload/images/powerpoint.png +0 -0
  35. package/src/components/public/upload/images/project.png +0 -0
  36. package/src/components/public/upload/images/sound.png +0 -0
  37. package/src/components/public/upload/images/txt.png +0 -0
  38. package/src/components/public/upload/images/video.png +0 -0
  39. package/src/components/public/upload/images/visio.png +0 -0
  40. package/src/components/public/upload/images/word.png +0 -0
  41. package/src/components/public/upload/plImage.vue +287 -0
  42. package/src/components/public/upload/plImgUpload.vue +137 -0
  43. package/src/components/public/upload/plUpload.vue +1124 -0
  44. package/src/components/public/upload/uploadImg.js +8 -0
  45. package/src/main.js +0 -0
  46. package/src/views/VueMenuView.vue +143 -0
  47. package/src/views/cloudMenuView.vue +125 -0
  48. package/src/views/complex/config/complex.vue +501 -0
  49. package/src/views/complex/config/complexSetting.vue +1250 -0
  50. package/src/views/complex/rendering/complexShow.vue +16 -0
  51. package/src/views/data/dataManage.vue +560 -0
  52. package/src/views/data/sysData.vue +292 -0
  53. package/src/views/event/eventManager/vueEventDiy.vue +1184 -0
  54. package/src/views/event/eventManager/vueEventMain.vue +108 -0
  55. package/src/views/event/eventManager/vueEventSys.vue +296 -0
  56. package/src/views/event/js/apiEvent.js +22 -0
  57. package/src/views/fileLog/fileDownloadLog.vue +437 -0
  58. package/src/views/initData/initData.vue +4316 -0
  59. package/src/views/log/dblog/logdbDevelop.vue +306 -0
  60. package/src/views/log/dblog/logdbEnt.vue +331 -0
  61. package/src/views/log/dblog/logdbGov.vue +395 -0
  62. package/src/views/log/error/logError.vue +553 -0
  63. package/src/views/log/loginlog/logManageDevOrSup.vue +357 -0
  64. package/src/views/log/loginlog/logManageEnt.vue +343 -0
  65. package/src/views/log/loginlog/logManageGov.vue +328 -0
  66. package/src/views/log/sms/logSms.vue +308 -0
  67. package/src/views/menu/component/menuManageComponent.vue +2402 -0
  68. package/src/views/menu/component/menuModule.vue +449 -0
  69. package/src/views/menu/menuLocal.vue +223 -0
  70. package/src/views/menu/menuManage.vue +1135 -0
  71. package/src/views/menu/tenantMenuManage.vue +1132 -0
  72. package/src/views/menuRouter/cview/cviewShow.vue +18 -0
  73. package/src/views/menuRouter/cviewMenuRouter.vue +183 -0
  74. package/src/views/menuRouter/menuView.vue +132 -0
  75. package/src/views/menuRouter/urlMenuRouter.vue +160 -0
  76. package/src/views/org/entOrgTree.vue +1050 -0
  77. package/src/views/org/ownerMenu/ownerMenuTree.vue +269 -0
  78. package/src/views/org/safeValidate/safeValidate.vue +469 -0
  79. package/src/views/org/sysEntOrgUserDetail.vue +3390 -0
  80. package/src/views/org/sysOrgDimension.vue +832 -0
  81. package/src/views/org/sysOrgPosUserDetail.vue +1648 -0
  82. package/src/views/org/sysOrgPosUserTree.vue +1101 -0
  83. package/src/views/org/sysOrgTree.vue +864 -0
  84. package/src/views/param/sysParam.vue +987 -0
  85. package/src/views/preview/pdfViewer.vue +82 -0
  86. package/src/views/resources/js/resourcesCommon.js +137 -0
  87. package/src/views/resources/resRouter/resView.vue +161 -0
  88. package/src/views/resources/resourcesTabs.vue +82 -0
  89. package/src/views/resources/tabs/comp/pageResPreview.vue +309 -0
  90. package/src/views/resources/tabs/comp/pageResRegister.vue +1120 -0
  91. package/src/views/resources/tabs/dataResources.vue +843 -0
  92. package/src/views/resources/tabs/pageResources.vue +970 -0
  93. package/src/views/role/allowMenu.vue +148 -0
  94. package/src/views/role/authRole/authRole.vue +427 -0
  95. package/src/views/role/authRole/component/allocateSetting.vue +1056 -0
  96. package/src/views/role/authRole/component/authSetting.vue +1196 -0
  97. package/src/views/role/commonRole/commonRole.vue +677 -0
  98. package/src/views/role/commonRole/compoment/allocateRoleMenuSetting.vue +335 -0
  99. package/src/views/role/commonRole/compoment/authLinkMenuTree.vue +55 -0
  100. package/src/views/role/commonRole/compoment/authSettingNew.vue +190 -0
  101. package/src/views/role/commonRole/compoment/commonSetting.vue +1576 -0
  102. package/src/views/role/commonRole/compoment/commonSettingAdjust.vue +584 -0
  103. package/src/views/role/commonRole/compoment/commonSettingNew.vue +572 -0
  104. package/src/views/role/commonRole/compoment/roleMenuPower.vue +226 -0
  105. package/src/views/role/commonRole/compoment/roleMenuPowerSetting.vue +69 -0
  106. package/src/views/role/commonRole/compoment/roleMenuSetting.vue +365 -0
  107. package/src/views/role/commonRole/compoment/roleSourceSetting.vue +229 -0
  108. package/src/views/role/commonRole/tenantCommonRole.vue +768 -0
  109. package/src/views/role/role.vue +135 -0
  110. package/src/views/role/roleMenuOption.vue +898 -0
  111. package/src/views/role/roleSynchroRemind.vue +399 -0
  112. package/src/views/role/sysRole.vue +1525 -0
  113. package/src/views/role/viewMenuOptDetail.vue +182 -0
  114. package/src/views/sms/sendSms.vue +164 -0
  115. package/src/views/station/orgStation.vue +561 -0
  116. package/src/views/tenant/appContentManager.vue +938 -0
  117. package/src/views/tenant/appManager.vue +642 -0
  118. package/src/views/tenant/tenantRoleManager.vue +670 -0
  119. package/src/views/tenant/tenantUserManager.vue +615 -0
  120. package/src/views/threeinone/compoment/safeCascadeSelect.vue +327 -0
  121. package/src/views/threeinone/init/safeInitRegion.vue +203 -0
  122. package/src/views/threeinone/safeManager.vue +927 -0
  123. package/src/views/threeinone/safeMenuManage.vue +565 -0
  124. package/src/views/threeinone/safeOrgSpv.vue +364 -0
  125. package/src/views/threeinone/safeSpv/safeSpvLeftTree.vue +109 -0
  126. package/src/views/threeinone/safeSpv/safeSpvMain.vue +335 -0
  127. package/src/views/threeinone/safeSpvEconView.vue +569 -0
  128. package/src/views/threeinone/safeValidateRegion.vue +328 -0
  129. package/src/views/urlResource/urlResource.vue +856 -0
  130. package/src/views/user/empowerUser/empowerEntUserManage.vue +415 -0
  131. package/src/views/user/empowerUser/empowerOrgTree.vue +167 -0
  132. package/src/views/user/empowerUser/empowerUserList.vue +633 -0
  133. package/src/views/user/empowerUser/empowerUserListMenuDeatil.vue +656 -0
  134. package/src/views/user/empowerUser/empowerUserListViewMenuTree.vue +257 -0
  135. package/src/views/user/empowerUser/empowerUserManage.vue +99 -0
  136. package/src/views/user/stationUserManage.vue +934 -0
  137. package/src/views/user/userManage.vue +737 -0
  138. package/src/views/user/userMangement.vue +938 -0
  139. package/src/views/user/viewMenu/viewMenu.vue +113 -0
  140. package/src/views/versionupdatetool/versionUpdateTool.vue +225 -0
  141. package/src/views/versionupdatetool/versioninfomation/verisonInfomationManagement.vue +68 -0
@@ -0,0 +1,601 @@
1
+ <template>
2
+ <el-tabs type="border-card" style="height: 100%" class="complex-tabs" v-model="activeName" @tab-click="tabClick" v-if="!isPrint">
3
+ <el-tab-pane v-for="(item,index) in tagArrs" :key="index" :name="index + ''" v-if="tabSize>0 && (tagArrs.length == tabSize || tagArrs.length == tabSettingArrSize)">
4
+ <span slot="label"><i :class="item.tabIcon"></i>{{item.tabName}}</span>
5
+ <div class="p-tab-view">
6
+ <pl-lazy v-if="setClickTab.has(index + '') && refreshTab[index + '']">
7
+ <!--外部超链接-->
8
+ <ifm-link v-if="item.tabType == 'url' && (item.rangetUrl.indexOf('http://') > -1 || item.rangetUrl.indexOf('https://') > -1) "
9
+ :link-url="item.rangetUrl">
10
+ </ifm-link>
11
+ <!--内部也main链接超链接 -->
12
+ <keep-alive v-else-if="item.tabType == 'url' && item.rangetUrl.indexOf('http://') == -1 && item.rangetUrl.indexOf('https://') == -1 ">
13
+ <!--内部链接赋值操作权限和数据权限 -->
14
+ <component :is="activeIndex"
15
+ :optArr="item.operatePermis"
16
+ :dataArr="item.dataPermis"
17
+ :isRefresh="isRefresh"
18
+ :listOutParam="item.listOutParam ||{}"
19
+ style="height: 100%" ></component>
20
+ </keep-alive>
21
+ <component v-else
22
+ :is="VIEW_COMPONENTS[item.tabType].complex"
23
+ :listOutParam="item.listOutParam ||{}"
24
+ :equilibriumData="item.equilibriumData || {}"
25
+ :parentFormData="parentFormData"
26
+ :isCompositeView="isCompositeView"
27
+ :compositeObj="compositeObj"
28
+ :refreshPreview="refreshPreview"
29
+ :refreshPage="refreshPage"
30
+ :compositeFormOperate="compositeFormOperate"
31
+ :setting-data="item"></component>
32
+
33
+ </pl-lazy>
34
+ </div>
35
+ </el-tab-pane>
36
+ </el-tabs>
37
+ <div v-else>
38
+ <div v-for="(tagArrs,index) in tagPrintArr" :key="index" style="height: 100%">
39
+ <el-tabs type="border-card" style="height: 100%" class="complex-tabs" v-model="printActiveName" @tab-click="tabClick">
40
+ <el-tab-pane v-for="(item,index) in tagArrs" :key="index" :name="index + ''" v-if="tabSize>0 && tagArrs.length == 1">
41
+ <span slot="label"><i :class="item.tabIcon"></i>{{item.tabName}}</span>
42
+ <div class="p-tab-view">
43
+ <!--外部超链接-->
44
+ <ifm-link v-if="item.tabType == 'url' && (item.rangetUrl.indexOf('http://') > -1 || item.rangetUrl.indexOf('https://') > -1) "
45
+ :link-url="item.rangetUrl">
46
+ </ifm-link>
47
+ <!--内部也main链接超链接 -->
48
+ <keep-alive v-else-if="item.tabType == 'url' && item.rangetUrl.indexOf('http://') == -1 && item.rangetUrl.indexOf('https://') == -1 ">
49
+ <!--内部链接赋值操作权限和数据权限 -->
50
+ <component :is="activeIndex"
51
+ :optArr="item.operatePermis"
52
+ :dataArr="item.dataPermis"
53
+ :isRefresh="isRefresh"
54
+ :listOutParam="item.listOutParam ||{}"
55
+ style="height: 100%" ></component>
56
+ </keep-alive>
57
+ <component v-else
58
+ :is="VIEW_COMPONENTS[item.tabType].complex"
59
+ :listOutParam="item.listOutParam ||{}"
60
+ :equilibriumData="item.equilibriumData || {}"
61
+ :parentFormData="parentFormData"
62
+ :isCompositeView="isCompositeView"
63
+ :compositeObj="compositeObj"
64
+ :refreshPreview="refreshPreview"
65
+ :refreshPage="refreshPage"
66
+ :compositeFormOperate="compositeFormOperate"
67
+ :setting-data="item"></component>
68
+ </div>
69
+ </el-tab-pane>
70
+ </el-tabs>
71
+
72
+ </div>
73
+ </div>
74
+
75
+ </template>
76
+
77
+ <script>
78
+ import IfmLink from "./ifmLink";
79
+
80
+ //注:自定义功能 请放置在 views/framework 文件夹下。 后台配置自定义功能路径 例如 config/task/personalTask
81
+
82
+ export default {
83
+ name: "complex-view-rendering",
84
+ props: {
85
+ resourceId:{ //资源id
86
+ type:String,
87
+ default:''
88
+ },
89
+ operatePermis:{type :String, default:""}, //操作权限
90
+ dataPermis:{type :String,default:""}, //数据权限
91
+ id: {
92
+ type: String,
93
+ default: ""
94
+ },
95
+ menuId: {
96
+ type: String,
97
+ default: ""
98
+ },
99
+ isSup: {
100
+ type: Boolean,
101
+ default: false
102
+ },
103
+ listOutParam:{type:Object,default:() => {return {};}}, //外部传入参数
104
+ tabSettingArr:{type:Array,required:false,default:() => {return [];}},//选择页签
105
+ isCompositeView:{type: Boolean, default: false,required:false},//是否是复合视图组件
106
+ equilibriumObj:{type:Object,default:() => {return {};}},
107
+ parentFormData:{type:Object,default:() => {return {};}}, //父级表单对象
108
+ equiliInfoObj:{type:Object,default:() => {return {};}},//用于监听值改变
109
+ refreshUUId:{type:Object,default:()=>{return {};}},
110
+ compositeObj:{type:Object,default:()=>{return {};}}, //用户监听刷新
111
+ compositeFormOperate:{type:String,default:''}, //表单操作状态
112
+ },
113
+ components: {
114
+ IfmLink
115
+ },
116
+ data() {
117
+ return {
118
+ tagArrs: [],
119
+ activeName: '0',
120
+ activeTabId:'', //当前选择的tabId
121
+ operationJson: "",
122
+ activeIndex:{},
123
+ isRefresh:this.COMMON_FUNC.getUUID(),
124
+ setClickTab: new Set(["0"]), // 当前已被点击的选项卡
125
+ resourceObj:{}, //资源池对象
126
+ viewId:"", //复合视图模块id
127
+ operatePermisObj:{},//操作权限 Obj
128
+ dataPermisObj:{}, //数据权限 Obj
129
+ allRouterArr:this.$router.options.routes || [], //所有router配置
130
+ activeUrl: '',//实际路径
131
+ userType:'', //登录用户类型
132
+ tabSize:0,//
133
+ autoRefresh:false,
134
+ refreshTab: {},
135
+ tabSettingArrSize:0,//复合视图组件 tab个数
136
+ refreshPreview:'', //刷新表格数据
137
+ refreshPage:'', //刷新页面
138
+ tagPrintArr:[],
139
+ isPrint:false, //是否为打印 打印状态时候tag标签向下遍历
140
+ printActiveName:'0',//打印时候每个标签页只有一个
141
+
142
+ }
143
+ },
144
+ created() {
145
+ let loginUser = this.USER_GLOBAL.getLoginUser() || {};
146
+ this.RES_GLOBAL.getById(this.resourceId,loginUser.userType).then(res =>{
147
+ this.resourceObj[res.id] = res;
148
+ this.executShow();
149
+ });
150
+ if(this.isCompositeView){
151
+ Object.keys(this.equiliInfoObj).forEach(key=>{
152
+ this.$watch(function () {
153
+ return this.equiliInfoObj[key];
154
+ },function () {
155
+ this.executShow().then(()=>{
156
+ let nowTab = this.tagArrs[this.activeName] || {};
157
+ if(nowTab.id != this.activeTabId){
158
+ //当前tab 还没有查询
159
+ this.tabClick({name:this.activeName});
160
+ }
161
+ });
162
+ } );
163
+ });
164
+ }
165
+ },
166
+ watch: {
167
+ tabSettingArr(){
168
+ let tabLength = this.tabSettingArr.length;
169
+ if(tabLength <= Number(this.activeName) && tabLength > 0){
170
+ this.activeName = (tabLength - 1) + '';
171
+ this.activeTabId = (this.tabSettingArr[this.activeName] || {}).id || '';
172
+ this.tabClick({name:this.activeName});
173
+ }
174
+ this.executShow();//展示
175
+ },
176
+
177
+ resourceId(){
178
+ this.executShow();//展示
179
+ },
180
+ activeName(){ //点击tab 标签跳转
181
+ //执行跳转
182
+ let obj = this.tagArrs[this.activeName] || {};
183
+ let urlType = JSON.parse(obj.urlType || '[]');
184
+ if(urlType.length > 0 && urlType[0] == 'url'){
185
+ if((obj.rangetUrl || '').indexOf('http://') == -1 && (obj.rangetUrl || '').indexOf('https://') == -1 ){
186
+ let url = obj.rangetUrl || '';
187
+ this.isRefresh = this.COMMON_FUNC.getUUID();
188
+ this.activeUrl = '';
189
+ //递归遍历 router 路由 判断当前路由是否存在
190
+ let urlArr = url.split("/");
191
+ this.eachRouterSet(this.allRouterArr,urlArr,0);
192
+ }
193
+ }
194
+ },
195
+ tagArrs(){
196
+ if(this.tagArrs.length > 0){
197
+ if(this.tagArrs && this.tagArrs.length > 0){
198
+ //vue动态import组件
199
+ let obj = this.tagArrs[this.activeName] || {};
200
+ let urlType = JSON.parse(obj.urlType || '[]');
201
+ if(urlType.length > 0 && urlType[0] == 'url'){
202
+ if((obj.rangetUrl || '').indexOf('http://') == -1 && (obj.rangetUrl || '').indexOf('https://') == -1){
203
+ let url = obj.rangetUrl || '';
204
+ this.isRefresh = this.COMMON_FUNC.getUUID();
205
+ this.activeUrl = '';
206
+ //递归遍历 router 路由 判断当前路由是否存在
207
+ if(url){
208
+ let urlArr = url.split("/");
209
+ this.eachRouterSet(this.allRouterArr,urlArr,0);
210
+ }
211
+ }
212
+ }
213
+
214
+ }
215
+
216
+ }
217
+ }
218
+ },
219
+ isPrintParam:function (old,newd) {
220
+ this.isPrint = !this.isPrint;
221
+ //更新 tagPrintArr;
222
+ if(this.isPrint){
223
+ //遍历 this.tagArrs 赋值
224
+ this.tagPrintArr = [];
225
+ this.tagArrs.forEach(item =>{
226
+ this.tagPrintArr.push([item]);
227
+ });
228
+ }else {
229
+ this.executShow();//展示
230
+ this.tagPrintArr = [];
231
+ }
232
+ },
233
+
234
+
235
+ computed:{
236
+ isPrintParam(){
237
+ return this.$store.state.user.isPrintParam;
238
+ }
239
+ },
240
+
241
+
242
+ methods: {
243
+ /**
244
+ * 遍历匹配路由
245
+ * allRouterArr当前路由 arr,
246
+ * urlArr 链接arr
247
+ * index遍历层数
248
+ */
249
+ eachRouterSet(allRouterArr,urlArr,index){
250
+ allRouterArr.forEach(item =>{
251
+ if(urlArr[index + 1]){
252
+ if(urlArr[index +1] == (item.name ? item.name : item.path)){
253
+ //当前匹配
254
+ //判断 urlArr是否存在下级
255
+ if(index+2 >= urlArr.length){ //则当前地址为我需要的实际地址
256
+ let componentString = item.component.toString();
257
+ let arr = componentString.split("\"");
258
+ this.activeUrl = arr[arr.length - 2] || '';
259
+ this.activeIndex = item.component;
260
+ }else if(item.children && item.children.length > 0) {
261
+ //如果存在下级
262
+ allRouterArr = item.children || [];
263
+ index = index + 1;
264
+ this.eachRouterSet(allRouterArr,urlArr,index);
265
+ }
266
+ }
267
+ }
268
+
269
+ })
270
+ },
271
+
272
+ /**
273
+ * 复合视图展示
274
+ */
275
+ executShow(){
276
+ return new Promise(resolve => {
277
+ if(this.resourceId && this.resourceObj[this.resourceId]){
278
+ //作为跳板,跳转到 compelxRednding 复合视图预览页面
279
+ let resourceObj = this.resourceObj[this.resourceId];
280
+ let url = resourceObj.ragentUrl || '';
281
+ //根据 resourceObj 获取
282
+ //查询相关选项卡
283
+ //获取数据权限
284
+ let operateKeysArr = (this.operatePermis || '').split(",");
285
+ let dataKeysArr = (this.dataPermis || '').split(",");
286
+ let operateArr = []; //数据权限
287
+ let dataArr = []; //操作权限
288
+ let alloperatePermisObj = {};
289
+ let allDataPermisObj = {};
290
+ (resourceObj.operatePermisList || []).forEach(item =>{
291
+ alloperatePermisObj[item.id] = item;
292
+ if(operateKeysArr.indexOf(item.id) > -1){
293
+ operateArr.push(item);
294
+ }
295
+ });
296
+ (resourceObj.dataPermisList || []).forEach(item =>{
297
+ allDataPermisObj[item.id] = item;
298
+ if(dataKeysArr.indexOf(item.id) > -1){
299
+ dataArr.push(item);
300
+ }
301
+ });
302
+ this.axios.post(this.api.complex.getById,{id:resourceObj.rkey}).then(complexRes => {
303
+ this.autoRefresh = (complexRes.data || {}).autoRefresh == "1";
304
+ this.axios.post(this.api.complextab.getTabsById,{ "viewId": resourceObj.rkey || '',
305
+ "order": "SORT ASC"}).then(async res =>{
306
+ if(res && res.data){
307
+ this.tagPrintArr = [];
308
+ this.tagArrs = [];
309
+ this.tabSize = 0;
310
+ (res.data || []).forEach(tab =>{
311
+ this.$set(tab,'equilibriumData',{});
312
+ //获取选项卡类型, 根据选项卡类型进行跳转(选项卡的操作权限和数据权限也要加上)
313
+ if(tab.urlType){
314
+ let urlTypeArr = JSON.parse(tab.urlType || '[]');
315
+ //根据子页面的信息获取相关资源池中的信息
316
+ let tabType = urlTypeArr[0];
317
+ let tabResourceId = urlTypeArr[urlTypeArr.length -1];
318
+ let tabResourceObj = {};
319
+ let tabData = tab['dataPermis'];//数据权限
320
+ //获取页面的注册地址
321
+ this.RES_GLOBAL.getById(tabResourceId,this.userType).then(res =>{
322
+ tabResourceObj = res;
323
+ let rangetUrl = tabResourceObj.ragentUrl || ''; //资源地址
324
+ this.$set(tab,'rangetUrl',rangetUrl); //赋值资源地址
325
+ this.$set(tab,'tabType',tabType); //赋值标签项类型
326
+ //判断操作权限和数据权限
327
+ let operateKeyArr = [];
328
+ let dataKeyArr = [];
329
+ this.$set(tab,'operatePermis',operateKeyArr); //操作权限
330
+ this.$set(tab,'dataPermis',dataKeyArr); //操作权限
331
+ let hasOperate = false; //存在操作权限
332
+ let hasData = false; //存在数据权限
333
+ (operateArr || []).forEach(item =>{ //操作权限
334
+ if(alloperatePermisObj[item['parentId']]){
335
+ if(alloperatePermisObj[item['parentId']].powerKey == tab.id){ //当前标签下的权限
336
+ hasOperate = true;
337
+ operateKeyArr.push(item.powerCode);
338
+ }
339
+ }
340
+ });
341
+ if(hasOperate){ //如果存在操作权限
342
+ this.$set(tab,'operatePermis',operateKeyArr); //操作权限
343
+ }
344
+ (dataArr || []).forEach(item =>{ //数据权限
345
+ if(allDataPermisObj[item['parentId']]){
346
+ if(allDataPermisObj[item['parentId']].powerKey == tab.id){ //当前标签下的权限
347
+ hasData = true;
348
+ dataKeyArr.push(item.powerCode);
349
+ }
350
+ }
351
+ });
352
+ if(hasData){ //如果
353
+ this.$set(tab,'dataPermis',dataKeyArr); //操作权限
354
+ }
355
+ if(tab['tabType'] == 'form'){ //智能建表
356
+ //赋值条件定义
357
+ let formDefineKey = tabResourceObj.rclassId;
358
+ let listViewDefineKey = tabResourceObj.rkey;
359
+ this.FORM_GLOBAL.findListNewVersion({formDefineKey:formDefineKey,defineKey:listViewDefineKey}).then(res =>{
360
+ let resData = res.data ||{};
361
+ let listViewId = resData.id || ''; //表单视图的 definkeKey
362
+ let formId = resData.formId || ''; //表单id definkeKey
363
+ let conditionId = []; //数据权限
364
+ if(tab['operatePermis']){ //存在操作权限
365
+ let operateObj = {};
366
+ let operatePermisArr = [];
367
+ if(typeof tab['operatePermis'] == "string"){
368
+ operatePermisArr = (tab['operatePermis'] || "").split(",");
369
+ }else{
370
+ operatePermisArr = tab['operatePermis']|| []
371
+ }
372
+ operatePermisArr .forEach(key =>{
373
+ operateObj[key] = true;
374
+ });
375
+ this.$set(tab,'operateAuthority',operateObj);
376
+ }
377
+
378
+ if(tabData){ //存在数据权限
379
+ let tabDataArr = [];
380
+ if(typeof tabData == 'string'){
381
+ tabDataArr = (tabData || "").split(",");
382
+ }else{
383
+ tabDataArr = tabData || [];
384
+ }
385
+
386
+ let tabRermis = tabResourceObj["dataPermisList"];//取出数据权限集合
387
+ let tabRermisArr = [];
388
+ tabDataArr.forEach(data =>{
389
+ tabRermis.forEach(item =>{//遍历数据权限集合
390
+ if(data == item["id"]){ //数据权限跟
391
+ tabRermisArr.unshift(item.powerKey);//数据权限powerKey
392
+ }
393
+ })
394
+
395
+ })
396
+ conditionId = tabRermisArr || [];
397
+ }
398
+ this.$set(tab,'formId',formId);
399
+ this.$set(tab,'listViewId',listViewId);
400
+ //条件定义id
401
+ this.$set(tab,'conditionId',conditionId.join(","));
402
+ this.tabSize++;
403
+
404
+ resolve();
405
+ });
406
+ }else if(tab['tabType'] == 'flow'){ //工作流
407
+ let flowId = tabResourceObj.rkey;
408
+ let resOptList = tabResourceObj.operatePermisList;
409
+ let optMap = {};
410
+ if(resOptList&&resOptList.length>0){
411
+ resOptList.forEach(item=>{
412
+ optMap[item.powerKey]=item.powerCode;
413
+ })
414
+ }
415
+ this.FLOW_GLOBAL.getFlowDefineById(flowId).then(flowObj =>{
416
+ this.$set(tab,'flowObj',flowObj);
417
+ if(tab['operatePermis']){ //存在操作权限
418
+ let operatePermisArr = [];
419
+ let operateRootArr = [];
420
+ if(typeof tab['operatePermis'] == "string"){
421
+ operatePermisArr = (tab['operatePermis'] || "").split(",");
422
+ }else{
423
+ operatePermisArr = tab['operatePermis']|| []
424
+ }
425
+ operatePermisArr.forEach(operateKey =>{
426
+ if(optMap.hasOwnProperty(operateKey)){
427
+ operateRootArr.push({"powerCode":optMap[operateKey]});
428
+ }
429
+ });
430
+ this.$set(tab,'operateRootArr',operateRootArr);
431
+ }
432
+ this.$set(tab,'flowId',flowId);
433
+ this.tabSize++;
434
+ resolve();
435
+ });
436
+ }else {
437
+ this.tabSize++;
438
+ }
439
+
440
+ });
441
+ //解析相关外部参数
442
+ if(!tab.listOutParam){
443
+ tab.listOutParam = Object.assign(this.listOutParam,{}); //外部
444
+ }
445
+ if(!tab.equilibriumData){
446
+ this.$set(tab,'equilibriumData',{});
447
+ }
448
+ let equiliObj ={};
449
+ Object.keys(this.equilibriumObj).forEach(tabKey =>{
450
+ if(tabKey == tab.id){
451
+ (this.equilibriumObj[tabKey]||[]).forEach(item =>{
452
+ if(item.paramKey.indexOf("listoutCondition_") == -1){
453
+ this.$set(tab.listOutParam,item.paramKey,item.paramValue); //传入外部参数
454
+ }else {
455
+ let params = item.paramKey.split("listoutCondition_")[1];
456
+ this.$set(equiliObj,params,item.paramValue);
457
+ }
458
+ });
459
+ }
460
+ });
461
+ if(equiliObj.hasOwnProperty('conditionId')){ //传入
462
+ Object.assign(tab.equilibriumData,equiliObj);
463
+ this.refreshPreview = this.COMMON_FUNC.getUuidByParams(32);
464
+ }
465
+
466
+ this.tagArrs.push(tab);
467
+ }
468
+ });
469
+ if(this.isCompositeView){//是否是复合视图组件
470
+ let arr = [];
471
+ this.tabSettingArrSize = 0;
472
+ (this.tabSettingArr || []).forEach(item=>{//遍历复合视图组件传的tab
473
+ (this.tagArrs || []).forEach(data=>{//遍历查询tab
474
+ if(item == data.id){
475
+ arr.push(data);
476
+ this.tabSettingArrSize ++;//tab计数
477
+ }
478
+ });
479
+ });
480
+ this.tagArrs = arr;
481
+ }
482
+ }
483
+ this.tagArrs.forEach((item,index) => {
484
+ this.$set(this.refreshTab,index + '',true);
485
+ })
486
+ });
487
+ });
488
+ }
489
+ });
490
+ },
491
+
492
+
493
+
494
+ /**
495
+ * 获取资源池对象
496
+ */
497
+ getResources(){
498
+ return new Promise(resolve => {
499
+ this.RES_GLOBAL.getById(this.resourceId,this.userType).then(res =>{
500
+ resolve(res);
501
+ });
502
+ });
503
+
504
+ },
505
+
506
+
507
+ /**
508
+ * 点击选项卡panel时自动刷新选项卡内的数据
509
+ * @param tab
510
+ */
511
+ tabClick(tab) {
512
+ this.setClickTab.add(tab.name);
513
+ this.activeTabId = (this.tagArrs[tab.name] || {}).id || '';
514
+ if(this.autoRefresh){
515
+ this.refreshTab[tab.name] = false;
516
+ this.$nextTick(() => {
517
+ this.refreshTab[tab.name] = true;
518
+ if(!this.refreshTab[tab.name]){
519
+ this.$nextTick(() => {
520
+ this.refreshTab[tab.name] = true;
521
+ })
522
+ }
523
+ });
524
+ }
525
+ },
526
+
527
+
528
+ /**
529
+ * 判断obj对象是否为空
530
+ * @param obj
531
+ * @returns {boolean}
532
+ */
533
+ isEmptyObject(obj) {
534
+ for (let key in obj){
535
+ if (obj.hasOwnProperty(key)) {
536
+ return false;//返回false,不为空对象
537
+ }
538
+ }
539
+ return true;//返回true,为空对象
540
+ },
541
+
542
+
543
+ /**
544
+ * ajax 同步请求
545
+ * @param url
546
+ * @param params
547
+ * @returns {Promise<any> | Promise}
548
+ */
549
+ ayncMethodUrl(url,params){
550
+ let data = '';
551
+ Object.keys(params || {}).forEach(key => {
552
+ data += "&" + key + "=" + params[key];
553
+ });
554
+ if(data){
555
+ data = data.substring(1);
556
+ }
557
+ const xmlhttp = new XMLHttpRequest();
558
+
559
+ let result = null;
560
+ xmlhttp.open("POST", url, false);
561
+ xmlhttp.setRequestHeader("Authorization",localStorage["Authorization" + (window.projectSuffix || "")]||"");
562
+ xmlhttp.setRequestHeader('Content-Type',
563
+ 'application/x-www-form-urlencoded');
564
+ xmlhttp.onreadystatechange = function () {
565
+ if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
566
+ // 同步请求成功
567
+ result = xmlhttp.responseText;
568
+ }
569
+ };
570
+ xmlhttp.send(data);
571
+
572
+ return result;
573
+
574
+ },
575
+
576
+ }
577
+ }
578
+ </script>
579
+
580
+ <style scoped>
581
+ .complex-tabs /deep/ .el-tabs__content {
582
+ height: calc(100% - 70px);
583
+ }
584
+
585
+ .p-tab-view /deep/ .el-container:first-child {
586
+ height: 100%;
587
+ /*max-height: 800px;*/
588
+ }
589
+ .p-tab-view /deep/ .el-table{
590
+ /*min-height: 500px;*/
591
+ }
592
+
593
+ .complex-tabs /deep/ .el-tab-pane {
594
+ height: 100%;
595
+ }
596
+
597
+ .complex-tab-pane {
598
+ height: 100%;
599
+ }
600
+
601
+ </style>
@@ -0,0 +1,71 @@
1
+ <!--外部超链接-->
2
+ <template>
3
+ <div id="ifmLinkContrainer">
4
+ <div style="position: absolute;top:0;bottom:0;left:0;right:0;box-sizing: border-box;"
5
+ v-loading="loading"
6
+ element-loading-text="正在加载,请稍后..."
7
+ element-loading-spinner="el-icon-loading"
8
+ element-loading-background="rgba(0, 0, 0, 0.6)"
9
+ element-loading-custom-class="ifmLink-load">
10
+ <iframe :src="url" style="height:100%;width:100%;" frameborder="0" :class="{'show-iframe':showIframe}"
11
+ @load="onLoad"></iframe>
12
+ <!-- element-loading-text="页面君正在快马加鞭的赶过来~ φ(≧ω≦*)♪"-->
13
+ </div>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ export default {
19
+ name: "ifmLink",
20
+ props: {
21
+ linkUrl: ""
22
+ },
23
+ data(){
24
+ return{
25
+ url : this.linkUrl ? this.linkUrl : '',
26
+ loading: true,
27
+ showIframe: false,
28
+ }
29
+ },
30
+ watch: {
31
+ linkUrl() {
32
+ this.url = this.linkUrl ? this.linkUrl : '';
33
+ },
34
+
35
+
36
+ },
37
+ methods: {
38
+ onLoad() {
39
+ this.loading = false;
40
+ this.showIframe = true;
41
+ }
42
+ },
43
+ }
44
+ </script>
45
+
46
+ <style scoped lang="scss">
47
+ #ifmLinkContrainer /deep/ {
48
+ .ifmLink-load {
49
+ .el-loading-spinner {
50
+ .el-loading-text {
51
+ font-size: 16px;
52
+ }
53
+
54
+ .el-icon-loading {
55
+ font-size: 22px;
56
+ }
57
+ }
58
+ }
59
+ }
60
+
61
+ iframe {
62
+ transition: all 0.25s;
63
+ opacity: 0;
64
+ transform: scale(0.98);
65
+ }
66
+
67
+ iframe.show-iframe {
68
+ opacity: 1;
69
+ transform: scale(1);
70
+ }
71
+ </style>