cloud-web-corejs 1.0.244 → 1.0.246

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.
@@ -0,0 +1,1148 @@
1
+ <template>
2
+ <div class="workbenches">
3
+ <div class="workbenches-head">
4
+ <span class="f-blue">欢迎您</span>
5
+
6
+ <el-link
7
+ class="fr"
8
+ icon="iconfont icon-tuichudenglu"
9
+ :underline="false"
10
+ @click="logout"
11
+ >退出登录</el-link
12
+ >
13
+ <!-- <el-link class="fr" icon="el-icon-set-up" :underline="false" @click="openCompanyDialog" style="margin-right:10px">切换组织</el-link> -->
14
+ <span class="fr">您好,{{ userInfo.nickName }}</span>
15
+ </div>
16
+ <div class="workbenches-box">
17
+ <el-row>
18
+ <el-col :span="16">
19
+ <div class="w-box" style="margin-right: 16px">
20
+ <div class="w-b-head">
21
+ <div class="tit fl">
22
+ <b>应用场景</b>
23
+ </div>
24
+ <!-- <div class="fr">
25
+ <el-link icon="iconfont icon-shuaxin" :underline="false">刷新</el-link>
26
+ <el-link :underline="false">查看更多 +</el-link>
27
+ </div> -->
28
+ </div>
29
+
30
+ <div class="use-cases">
31
+ <template v-for="workbenchMenu in workbenchMenus">
32
+ <div class="item" :key="workbenchMenu.id">
33
+ <div class="t">
34
+ <span>{{ workbenchMenu.menuName }}</span>
35
+ </div>
36
+ <div class="c">
37
+ <div
38
+ class="i-block"
39
+ v-for="(router2, index1) in workbenchMenu.children"
40
+ :key="index1"
41
+ @click="openRoutePath(router2)"
42
+ >
43
+ <i
44
+ class="icon iconfont"
45
+ :class="router2.menuImg || 'icon-charge-fill'"
46
+ :style="
47
+ 'background-color: ' +
48
+ (router2.menuImgColor || '#3B82F6') +
49
+ ';'
50
+ "
51
+ ></i>
52
+ <span>{{ router2.menuName }}</span>
53
+ <span class="tips" v-if="!!router2.note">{{
54
+ router2.note
55
+ }}</span>
56
+ </div>
57
+ <!-- <div class="i-block">
58
+ <i class="icon iconfont icon-charge-fill" style="background-color:#3B82F6"></i>
59
+
60
+ <span>研发费用付款</span>
61
+ <span class="tips">(技术转让费、设计开发费、检测费、试验费、信息费、标准化费用)</span>
62
+ </div> -->
63
+ </div>
64
+ </div>
65
+ </template>
66
+ </div>
67
+
68
+ <!-- <template v-for="menuModule in $baseEventBus.menuModules">
69
+ <div class="use-cases" style="height: calc(100vh - 193px);" :key="menuModule.id" v-show="menuModule.id === $baseEventBus.currentMenuId">
70
+
71
+ <div class="item" v-for="router1 in menuModule.children" :key="router1.id">
72
+ <div class="t"><span>{{router1.menuName}}</span></div>
73
+ <div class="c">
74
+ <div class="i-block" v-for="(router2, index1) in router1.children"
75
+ :key="index1" @click="rourteTo(router2)"><i class="icon" style="background-color: #3B82F6;">{{router2.menuName.substring(0,1)}}</i><span>{{router2.menuName}}</span></div>
76
+ </div>
77
+ </div>
78
+ </div>
79
+ </template> -->
80
+ </div>
81
+ </el-col>
82
+ <el-col :span="8">
83
+ <div class="w-box" style="height: 60%">
84
+ <div class="w-b-head">
85
+ <div class="tit fl">
86
+ <b>待办事项</b>
87
+ <i class="nums">{{ unDoWfRows.length }}</i>
88
+ </div>
89
+ <div class="fr">
90
+ <el-link :underline="false" @click="toWfManageList"
91
+ >查看更多 +</el-link
92
+ >
93
+ </div>
94
+ </div>
95
+ <div class="agenda-box">
96
+ <div
97
+ class="item"
98
+ v-for="item in unDoWfRows"
99
+ :key="item.id"
100
+ @click="openWfDialog(item)"
101
+ >
102
+ <p class="name">{{ item.name }}</p>
103
+ <p class="info">
104
+ <span>单据类型:{{ item.objTypeName }}</span>
105
+ <span>启动人:{{ item.starterName }}</span>
106
+ </p>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ <div class="w-box" style="margin-top: 16px; height: calc(40% - 16px)">
111
+ <div class="w-b-head">
112
+ <div class="tit fl">
113
+ <b>通知公告</b>
114
+ <i class="nums">{{ systemNotices.length }}</i>
115
+ </div>
116
+ <div class="fr">
117
+ <el-link :underline="false" @click="openSystemNoticeDialog()"
118
+ >查看更多 +</el-link
119
+ >
120
+ </div>
121
+ </div>
122
+ <div class="wnotice-box">
123
+ <!-- <div class="item">
124
+ <i class="no-read">未读</i>
125
+ <span class="name">紧急通知</span>
126
+ <span class="date">2025-10-12</span>
127
+ </div> -->
128
+ <div
129
+ class="item"
130
+ v-for="systemNotice in systemNotices"
131
+ :key="systemNotice.id"
132
+ @click="openSystemNoticeDialog(systemNotice)"
133
+ >
134
+ <span class="name">{{ systemNotice.title }}</span>
135
+ <span class="date">{{
136
+ systemNotice.modifyDate.substring(0, 10)
137
+ }}</span>
138
+ </div>
139
+ </div>
140
+ </div>
141
+ </el-col>
142
+ </el-row>
143
+ </div>
144
+ <!-- <div class="workbenches-info">
145
+ <div class="w-left">
146
+ <span>角色申请:李鹏00575023 (“项目预算与费用管理”模块:郑潇涵19010359)</span>
147
+ <span>运维人员:林上家A1010633 | 王瑾瑾01499274<i style="padding-left:24px"></i>©2023 海尔新能源 版权所有</span>
148
+ </div>
149
+ </div>
150
+ -->
151
+ <systemNoticeInfoDialog
152
+ v-if="showSystemNoticeInfoDialog"
153
+ :visiable.sync="showSystemNoticeInfoDialog"
154
+ :param="csnRow"
155
+ :appendToTop="true"
156
+ ></systemNoticeInfoDialog>
157
+ <wfContentDialog
158
+ v-if="showWfDialog"
159
+ :visible.sync="showWfDialog"
160
+ @close="wfClose"
161
+ :option.sync="wfContentOption"
162
+ ></wfContentDialog>
163
+ <el-dialog
164
+ title="切换组织"
165
+ width="355px"
166
+ custom-class="dialog-style list-dialog"
167
+ v-if="showCompanyDialog"
168
+ :visible.sync="showCompanyDialog"
169
+ :append-to-body="true"
170
+ :modal-append-to-body="true"
171
+ :close-on-click-modal="false"
172
+ v-el-drag-dialog
173
+ v-el-dialog-center
174
+ @close="changeCompanyClose"
175
+ >
176
+ <div class="cont">
177
+ <el-input
178
+ placeholder="搜索"
179
+ class="search-btn"
180
+ v-model="filterText"
181
+ ></el-input>
182
+ <el-tree
183
+ :props="defaultProps"
184
+ :load="loadNode"
185
+ node-key="id"
186
+ ref="tree"
187
+ highlight-current
188
+ lazy
189
+ :expand-on-click-node="true"
190
+ @node-click="handleNodeClick"
191
+ class="organization-tree"
192
+ icon-class="el-icon-arrow-right"
193
+ :filter-node-method="filterNode"
194
+ ></el-tree>
195
+ </div>
196
+ </el-dialog>
197
+ </div>
198
+ </template>
199
+
200
+ <script>
201
+ import systemNoticeInfoDialog from "@base/views/user/system_notice/infoDialog.vue";
202
+ import commMenuDialog from "@base/views/user/commMenu/index.vue";
203
+ import notifyMessageDialog from "@base/views/user/notify_message/dialog.vue";
204
+ import notifyMessageInfoDialog from "@base/views/user/notify_message/infoDialog";
205
+
206
+ import { getToken } from "@base/utils/auth";
207
+ import wfContentDialog from "@base/views/user/wf/wf_manage/wfContentDialog";
208
+ import corejsConfig from "@/corejsConfig";
209
+ import { mapGetters } from "vuex";
210
+
211
+ export default {
212
+ name: "home",
213
+ props: {
214
+ wf_manage_url: String,
215
+ },
216
+ components: {
217
+ systemNoticeInfoDialog,
218
+ commMenuDialog,
219
+ notifyMessageDialog,
220
+ notifyMessageInfoDialog,
221
+ wfContentDialog,
222
+ },
223
+ data() {
224
+ return {
225
+ defaultProps: {
226
+ label: "label", //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
227
+ children: [],
228
+ isLeaf: "leaf",
229
+ },
230
+ filterText: null,
231
+ showCompanyDialog: false,
232
+ choose_company_info: "",
233
+
234
+ showNoticeDialog: false,
235
+ showGroupDialog: false,
236
+ notifyTemplates: [],
237
+ userInfo: {},
238
+ companyInfo: {},
239
+ systemNotices: [],
240
+ showSystemNoticeInfoDialog: false,
241
+ csnRow: null,
242
+ headPhotoUrl: "",
243
+ dialogVisible: true,
244
+ unDoWfRows: [],
245
+ wfOption: {},
246
+ showWfDialog: false,
247
+ wfContentOption: {},
248
+ showWfContent: true,
249
+ wfContent: null,
250
+ wfDataId: "",
251
+ showCommMenuDialog: false,
252
+ commMenus: [],
253
+ notifyMessages: [],
254
+ notifyMessageInfoIndex: null,
255
+ notifyMessageInfoId: null,
256
+ unreadMessageNum: 0,
257
+ activating: true,
258
+ wfTimer: null,
259
+ homeConfig: corejsConfig.homeConfig || {},
260
+ menuModules: [],
261
+ workbenchMenus: [],
262
+ };
263
+ },
264
+ watch: {
265
+ filterText(val) {
266
+ this.$refs.tree.filter(val);
267
+ },
268
+ },
269
+ computed: {
270
+ ...mapGetters(["sidebarRouters"]),
271
+ },
272
+ activated() {
273
+ this.activating = true;
274
+ if (this.wfTimer) {
275
+ this.timerExcFun(true);
276
+ }
277
+ },
278
+ deactivated() {
279
+ this.activating = false;
280
+ },
281
+ beforeDestroy() {
282
+ this.clearTimer();
283
+ },
284
+ created() {
285
+ this.getUserInfo();
286
+ this.initSystemNotice();
287
+ this.initCommMenu();
288
+ this.initNotifyMessage();
289
+ this.initWfParam();
290
+ this.initWfTimer();
291
+ this.initMenu();
292
+ this.initWorkbenchMenu();
293
+ },
294
+ mounted() {
295
+ // setTimeout(() => {
296
+ // debugger
297
+ // this.filterRoute();
298
+ // }, 100);
299
+ },
300
+ methods: {
301
+ handleNodeClick(data, node, v) {
302
+ if (!data.hasChild) {
303
+ this.choose_company_info = data;
304
+ this.changeCompany();
305
+ } else {
306
+ this.choose_company_info = {};
307
+ }
308
+ },
309
+ // 异步树叶子节点懒加载逻辑
310
+ loadNode(node, resolve) {
311
+ let companyCode =
312
+ node && node.data && node.data.companyCode
313
+ ? node.data.companyCode || ""
314
+ : "";
315
+ let url = !companyCode
316
+ ? USER_PREFIX + "/user_company_info/getAllList"
317
+ : USER_PREFIX + "/user_company_info/getChildren";
318
+
319
+ this.$http({
320
+ url: url,
321
+ method: "post",
322
+ data: {
323
+ parentCompanyCode: companyCode,
324
+ },
325
+ success: (res) => {
326
+ let datas = res.objx || [];
327
+ let parentLabel = companyCode ? node.label : null;
328
+ datas.forEach((item) => {
329
+ item.leaf = !item.hasChild;
330
+ let label = item.companyName;
331
+ /*if(companyCode){
332
+ label = label + '('+companyTypeMap[item.companyType]+')'
333
+ }*/
334
+ item.label = label;
335
+ item.parentLabel = parentLabel;
336
+ });
337
+
338
+ if (node.level === 0) {
339
+ if (datas.length > 0 && datas[0].hasChild) {
340
+ this.$nextTick(() => {
341
+ let nodedata = node.childNodes[0];
342
+ nodedata.expanded = true;
343
+ nodedata.loadData();
344
+ });
345
+ }
346
+ }
347
+ resolve(datas);
348
+ },
349
+ });
350
+ },
351
+ filterNode(value, data) {
352
+ if (!value) return true;
353
+ let flag1 = data.label.indexOf(value) !== -1;
354
+ let flag2 = data.parentLabel && data.parentLabel.indexOf(value) !== -1;
355
+ return flag1 || flag2;
356
+ },
357
+ openCompanyDialog() {
358
+ this.filterText = null;
359
+ this.showCompanyDialog = true;
360
+ },
361
+ getWebPrefix(callback) {
362
+ this.$http({
363
+ url: USER_PREFIX + "/auth/getWebPrefix",
364
+ method: `post`,
365
+ data: {},
366
+ isLoading: true,
367
+ success: (res) => {
368
+ let webPrefix = res.objx;
369
+ callback && callback(webPrefix);
370
+ },
371
+ });
372
+ },
373
+ changeCompany() {
374
+ let row = this.choose_company_info;
375
+ let query = this.$route.query;
376
+ let flag = query && query.flag === 1 ? 1 : null;
377
+ this.showCompanyDialog = false;
378
+ if (row && row.companyCode) {
379
+ this.$baseLoading({ target: document.body, fullscreen: true });
380
+ this.$http({
381
+ url: USER_PREFIX + "/auth/switchCompany",
382
+ method: "post",
383
+ data: { stringOne: row.companyCode },
384
+ isLoading: true,
385
+ success: (res) => {
386
+ this.getWebPrefix((prefix) => {
387
+ let webPrefix = prefix ? "/" + prefix : window.MAIN_WEB_PREFIX;
388
+ sessionStorage.removeItem("out-token");
389
+ this.$store.dispatch("user/changeCompanyInfo", row);
390
+ this.$store.dispatch("tagsView/delAllViews");
391
+ window.location.href = webPrefix + "/index.html";
392
+ });
393
+ },
394
+ });
395
+ } else {
396
+ if (flag === 1) {
397
+ this.$router.push({
398
+ path: "/",
399
+ });
400
+ }
401
+ }
402
+ },
403
+ changeCompanyClose() {
404
+ let query = this.$route.query;
405
+ let flag = query && query.flag === 1 ? 1 : null;
406
+ if (flag === 1) {
407
+ this.$router.push({
408
+ path: "/",
409
+ });
410
+ }
411
+ this.showCompanyDialog = false;
412
+ },
413
+ initWorkbenchMenu() {
414
+ this.$http({
415
+ url: USER_PREFIX + "/workbench_menu/getAll",
416
+ method: "post",
417
+ data: {},
418
+ success: (res) => {
419
+ let workbenchMenus = res.objx || [];
420
+ this.workbenchMenus = workbenchMenus;
421
+ },
422
+ });
423
+ },
424
+ jumpOutLink(route) {
425
+ let path = route.url || route.path;
426
+ if (route.type === 4 && path) {
427
+ let params = this.getCustomReqUrlAndCleanUrl(path);
428
+ let reqUrl = params.custom_req_url;
429
+ if (reqUrl) {
430
+ this.$http({
431
+ url: reqUrl,
432
+ method: `post`,
433
+ data: { thirdUrl: params.newUrl },
434
+ isLoading: true,
435
+ success: (res) => {
436
+ path = res.objx;
437
+ window.open(path);
438
+ },
439
+ });
440
+ } else {
441
+ if (path.indexOf("token={token}") >= 0) {
442
+ path = path.replace("token={token}", "token=" + getToken());
443
+ }
444
+ window.open(path);
445
+ }
446
+ }
447
+ },
448
+ flattenTree(data) {
449
+ const result = [];
450
+
451
+ // 使用深度优先遍历递归函数
452
+ function dfs(node) {
453
+ if (!node) return;
454
+
455
+ // 将当前节点添加到结果数组(排除children属性)
456
+ const { children, ...rest } = node;
457
+ result.push(rest);
458
+
459
+ // 递归处理子节点
460
+ if (children && children.length > 0) {
461
+ children.forEach((child) => dfs(child));
462
+ }
463
+ }
464
+
465
+ // 处理输入数据(支持数组和单个对象)
466
+ if (Array.isArray(data)) {
467
+ data.forEach((item) => dfs(item));
468
+ } else if (data) {
469
+ dfs(data);
470
+ }
471
+
472
+ return result;
473
+ },
474
+ getRoute(row) {
475
+ let menuCode = row.menuCode;
476
+ let routes = this.flattenTree(this.$baseEventBus.menuModules);
477
+ let route = routes.find((item) => item.menuCode === menuCode);
478
+ return route;
479
+ },
480
+ openRoutePath(row) {
481
+ let menuCode = row.menuCode;
482
+ if (menuCode === "todo") {
483
+ this.$message.error("功能正在完善,敬请期待。");
484
+ return;
485
+ }
486
+ let routes = this.flattenTree(this.sidebarRouters);
487
+ let route = routes.find((item) => item.menuCode === menuCode);
488
+ if (!route) {
489
+ this.$message.error("菜单没有访问权限");
490
+ return;
491
+ }
492
+ this.rourteTo(route);
493
+ },
494
+ rourteTo(route) {
495
+ let path = route.url || route.path;
496
+ if (!path) {
497
+ return;
498
+ }
499
+ this.showMenuModal = true;
500
+ setTimeout(() => {
501
+ this.showMenuModal = false;
502
+ }, 200);
503
+ try {
504
+ if (route.linkType === 4) {
505
+ this.jumpOutLink(route);
506
+ } else if (route.linkType === 3) {
507
+ this.$router.push({
508
+ path: path,
509
+ query: { url: route.outLink, route: route.route },
510
+ });
511
+ } else {
512
+ this.$router.push(path);
513
+ }
514
+ } catch (e) {
515
+ console.error(e);
516
+ }
517
+ },
518
+
519
+ initMenu() {
520
+ this.$baseEventBus.$on("reloadHomeMenu", (menuId) => {
521
+ this.$forceUpdate();
522
+ });
523
+ },
524
+ filterRoute() {
525
+ let oldRoutes = JSON.parse(JSON.stringify(this.sidebarRouters));
526
+ let nRoute1s = [];
527
+ oldRoutes.forEach((route1, index1) => {
528
+ let nRoute2s = [];
529
+ if (!route1.hidden) {
530
+ route1.children.forEach((route2, index2) => {
531
+ let nRoute3s = [];
532
+ if (!route2.hidden) {
533
+ route2.children.forEach((route3, index3) => {
534
+ if (!route3.hidden) {
535
+ nRoute3s.push(route3);
536
+ }
537
+ });
538
+ }
539
+ if (route2.type === 4 || route2.url || nRoute3s.length > 0) {
540
+ route2.children = nRoute3s;
541
+ nRoute2s.push(route2);
542
+ }
543
+ });
544
+ }
545
+ if (route1.type === 4 || route1.url || nRoute2s.length > 0) {
546
+ route1.children = nRoute2s;
547
+ nRoute1s.push(route1);
548
+ }
549
+ });
550
+
551
+ this.menuModules = nRoute1s || [];
552
+ },
553
+ logout() {
554
+ this.$store.dispatch("user/logout2").then((res) => {
555
+ this.$router.push(`/login?redirect=${this.$route.fullPath}`);
556
+ });
557
+ },
558
+ wfClose() {
559
+ this.timerExcFun(true);
560
+ },
561
+ initWfTimer() {
562
+ this.wfTimer = setInterval(() => {
563
+ this.timerExcFun(false);
564
+ }, 10000);
565
+ this.timerExcFun(true);
566
+ },
567
+ timerExcFun(isLoading) {
568
+ if (!this.activating) {
569
+ return;
570
+ }
571
+ this.getWfInfoList(isLoading);
572
+ this.getUnreadMessageNum(isLoading);
573
+ this.$emit("timerHandle");
574
+ },
575
+ clearTimer() {
576
+ clearInterval(this.wfTimer);
577
+ this.wfTimer = null;
578
+ },
579
+ getUserInfo() {
580
+ this.$http({
581
+ url: USER_PREFIX + "/user/currentUser",
582
+ method: "post",
583
+ success: (res) => {
584
+ let userInfo = res.objx;
585
+ this.headPhotoUrl = userInfo.headPhotoUrl
586
+ ? userInfo.headPhotoUrl
587
+ : require("@/resources/images" + "/default-header.png");
588
+
589
+ this.userInfo = userInfo;
590
+ },
591
+ });
592
+ this.$http({
593
+ url: USER_PREFIX + "/company_info/getCurrent",
594
+ method: `post`,
595
+ success: (res) => {
596
+ this.companyInfo = res.objx || {};
597
+ },
598
+ });
599
+ },
600
+ initSystemNotice() {
601
+ this.$http({
602
+ url: USER_PREFIX + "/system_notice/listPage",
603
+ data: { publish: true, searchCount: false },
604
+ method: "post",
605
+ success: (res) => {
606
+ this.systemNotices =
607
+ res.objx && res.objx.records ? res.objx.records : [];
608
+ },
609
+ });
610
+ },
611
+ openSystemNoticeDialog(row) {
612
+ this.csnRow = row || null;
613
+ this.showSystemNoticeInfoDialog = true;
614
+ },
615
+ initUnDoWfInfo() {
616
+ this.$http({
617
+ url: AGILEBPM_PREFIX + "/wf_manage/listPage",
618
+ data: { type: 0, searchCount: false },
619
+ method: "post",
620
+ success: (res) => {
621
+ this.unDoWfRows = res.objx.records || [];
622
+ },
623
+ });
624
+ },
625
+ initWfTableList() {
626
+ let that = this;
627
+ let paramColumns = this.wfParamDTOs.map((item) => {
628
+ return {
629
+ title: this.$t1(item.paramName),
630
+ field: item.paramKey,
631
+ width: 150,
632
+ };
633
+ });
634
+ let statuses = {
635
+ running: this.$t1("审核中"),
636
+ back: this.$t1("已驳回"),
637
+ end: this.$t1("已完成"),
638
+ };
639
+ let tableOption = {
640
+ vue: this,
641
+ tableRef: "table-wf",
642
+ tableName: "home-table-wf",
643
+ config: {
644
+ height: "auto",
645
+ scrollY: {
646
+ enabled: false,
647
+ },
648
+ },
649
+ columns: [
650
+ { type: "checkbox", width: 48, resizable: false, fixed: "left" },
651
+ {
652
+ title: this.$t1("单据类型"),
653
+ field: "objTypeName",
654
+ width: 150,
655
+ fixed: "left",
656
+ },
657
+ {
658
+ title: this.$t1("流程主题"),
659
+ field: "name",
660
+ width: 150,
661
+ },
662
+ {
663
+ title: this.$t1("启动人"),
664
+ field: "starterName",
665
+ width: 150,
666
+ },
667
+ {
668
+ title: this.$t1("当前任务"),
669
+ field: "taskName",
670
+ width: 150,
671
+ },
672
+ {
673
+ title: this.$t1("当前任务用户"),
674
+ field: "candidateNames",
675
+ width: 150,
676
+ },
677
+ {
678
+ title: this.$t1("启动时间"),
679
+ field: "createDate",
680
+ width: 150,
681
+ },
682
+ ...paramColumns,
683
+ {
684
+ width: 47,
685
+ fixed: "right",
686
+ title: "",
687
+ sortable: false,
688
+ slots: {
689
+ default: ({ row }) => {
690
+ return [
691
+ <a
692
+ href="javascript:void(0);"
693
+ class="a-link"
694
+ onclick={() => {
695
+ this.openWfDialog(row);
696
+ }}
697
+ >
698
+ <el-tooltip
699
+ enterable={false}
700
+ effect="dark"
701
+ content={this.$t1("查看")}
702
+ placement="top"
703
+ popper-class="tooltip-skin"
704
+ >
705
+ <i class="el-icon-view" />
706
+ </el-tooltip>
707
+ </a>,
708
+ ];
709
+ },
710
+ },
711
+ },
712
+ ],
713
+ };
714
+ this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
715
+ this.wfOption = opts;
716
+ });
717
+ },
718
+ openWfDialog(row) {
719
+ this.wfContentOption = {
720
+ objId: row.objId,
721
+ url: row.url,
722
+ objTypeCode: row.objTypeCode,
723
+ };
724
+ this.showWfDialog = true;
725
+ },
726
+ commMenuCallBack(datas) {
727
+ this.commMenus = datas || [];
728
+ },
729
+ initCommMenu() {
730
+ this.$http({
731
+ url: USER_PREFIX + "/comm_menu/currentList",
732
+ data: { longOne: 0 },
733
+ method: "POST",
734
+ }).then((resultMsg) => {
735
+ this.commMenus = resultMsg.objx || [];
736
+ });
737
+ },
738
+ initNotifyMessage() {
739
+ return;
740
+ this.$http({
741
+ url: USER_PREFIX + "/notify_message/listPage",
742
+ data: { searchCount: false },
743
+ method: "post",
744
+ success: (res) => {
745
+ this.notifyMessages =
746
+ res.objx && res.objx.records ? res.objx.records : [];
747
+ },
748
+ });
749
+ },
750
+ openNotifyMessageDialog(row) {
751
+ if (row.jumpContent) {
752
+ this.$refs.notifyMessageDialog.open(row, () => {
753
+ row.readed = 1;
754
+ });
755
+ }
756
+ },
757
+ openMoreNotifyMessage(notifyType) {
758
+ let data = { notifyType: notifyType || "" };
759
+ let view = {
760
+ name: "notify_message:list",
761
+ query: data,
762
+ };
763
+ this.$store.dispatch("tagsView/delCachedView", view).then(() => {
764
+ this.$router.replace(view);
765
+ });
766
+
767
+ if (notifyType) {
768
+ this.showGroupDialog = false;
769
+ }
770
+ },
771
+ checkNotifyMessage(row, index) {
772
+ this.showNoticeDialog = true;
773
+ this.notifyMessageInfoIndex = index;
774
+ this.notifyMessageInfoId = row.id;
775
+ },
776
+ notifyMessageReadHanlde() {
777
+ this.notifyMessages[this.notifyMessageInfoIndex].readed = 1;
778
+ },
779
+ openNotifyTemplateGroupDialog() {
780
+ this.$http({
781
+ url: USER_PREFIX + `/notify_template/listPage`,
782
+ method: `post`,
783
+ data: { searchCount: false },
784
+ isLoading: true,
785
+ // loadingTarget: document.body,
786
+ success: (res) => {
787
+ this.notifyTemplates =
788
+ res.objx && res.objx.records ? res.objx.records : [];
789
+ this.showGroupDialog = true;
790
+ },
791
+ });
792
+ },
793
+ rourteTo(route) {
794
+ if (route.type === 4) {
795
+ this.jumpOutLink(route);
796
+ } else if (route.type === 3) {
797
+ let menuCode = route.menuCode;
798
+ let path = "/user/outLink/index/" + menuCode;
799
+ this.$router.push({ path: path, query: { url: route.url } });
800
+ } else {
801
+ let path = this.getPath(route);
802
+ if (!path) return;
803
+ this.$router.push(path);
804
+ }
805
+ },
806
+ getPath(route3) {
807
+ let item = null;
808
+ let path = null;
809
+ if (route3.type === 0) {
810
+ //普通菜单
811
+ if (route3.url) {
812
+ path = route3.route || route3.url;
813
+ let str = "/report/vform/render/";
814
+ if (path.indexOf(str) === 0) {
815
+ } else {
816
+ let pIndex = path.indexOf("?");
817
+ if (pIndex > 0) {
818
+ path = path.substring(0, pIndex);
819
+ }
820
+ }
821
+ }
822
+ } else if (route3.type === 5) {
823
+ //动态表单
824
+ let url = route3.route || route3.url;
825
+ path = url;
826
+ }
827
+ if (path && path.startsWith("@")) {
828
+ path = null;
829
+ }
830
+ return path;
831
+ },
832
+ jumpOutLink(route) {
833
+ let path = route.url;
834
+ if (route.type === 4 && path) {
835
+ if (path.indexOf("token={token}") >= 0) {
836
+ path = path.replace("token={token}", "token=" + getToken());
837
+ }
838
+ window.open(path);
839
+ }
840
+ },
841
+ initWfParam() {
842
+ return this.$http({
843
+ url: USER_PREFIX + "/wf_param/list",
844
+ method: `post`,
845
+ data: {},
846
+ isLoading: true,
847
+ // loadingTarget: document.body,
848
+ modalStrictly: true,
849
+ success: (res) => {
850
+ this.wfParamDTOs = res.objx || [];
851
+ // this.initWfTableList();
852
+ },
853
+ });
854
+ },
855
+ getWfInfoList(isLoading) {
856
+ if (!this.activating) {
857
+ return;
858
+ }
859
+ this.$http({
860
+ url: USER_PREFIX + "/wf_info/listPage",
861
+ data: { type: 0, size: 20, searchCount: false },
862
+ method: "post",
863
+ isLoading: isLoading,
864
+ modal: isLoading || false,
865
+ // loadingTarget: document.body,
866
+ success: (res) => {
867
+ this.unDoWfRows =
868
+ res.objx && res.objx.records ? res.objx.records : [];
869
+ },
870
+ failMsg: false,
871
+ errorMsg: false,
872
+ fail: (res, response) => {
873
+ if (response && response.status === 200) {
874
+ this.$errorMsg(res);
875
+ }
876
+ },
877
+ });
878
+ },
879
+ getUnreadMessageNum(isLoading) {
880
+ if (!this.activating) {
881
+ return;
882
+ }
883
+ return this.$http({
884
+ url: USER_PREFIX + "/notify_message/countMessage",
885
+ method: `post`,
886
+ data: {},
887
+ isLoading: isLoading,
888
+ modal: isLoading || false,
889
+ // loadingTarget: document.body,
890
+ success: (res) => {
891
+ this.unreadMessageNum = res.objx || 0;
892
+ },
893
+ failMsg: false,
894
+ errorMsg: false,
895
+ fail: (res, response) => {
896
+ if (response && response.status === 200) {
897
+ this.$errorMsg(res);
898
+ }
899
+ },
900
+ });
901
+ },
902
+ wfhandleCallback(flag) {
903
+ if ([1, 2, 3].includes(flag)) {
904
+ this.showWfDialog = false;
905
+ this.wfClose();
906
+ }
907
+ },
908
+ toWfManageList() {
909
+ let url = this.wf_manage_url || "/basic/wf/wf_manage/list";
910
+ this.$router.push(url);
911
+ },
912
+ },
913
+ };
914
+ </script>
915
+ <style lang="scss" scoped>
916
+ @import "~@/styles/variables.scss";
917
+ ::v-deep .el-link {
918
+ color: rgba(0, 0, 0, 0.65);
919
+ .iconfont {
920
+ margin-right: 4px;
921
+ font-size: 14px;
922
+ }
923
+ &:hover {
924
+ color: $baseColor;
925
+ }
926
+ }
927
+ .workbenches {
928
+ padding: 18px 24px 0px;
929
+ }
930
+ .workbenches-head {
931
+ color: rgba(0, 0, 0, 0.65);
932
+ margin-bottom: 16px;
933
+ line-height: 1;
934
+ font-size: 14px;
935
+ .icon-haier {
936
+ color: $baseColor;
937
+ font-size: 24px;
938
+ margin-right: 16px;
939
+ }
940
+ .logo {
941
+ height: 30px;
942
+ vertical-align: middle;
943
+ }
944
+ > span {
945
+ margin-right: 16px;
946
+ &.f-blue {
947
+ font-size: 16px;
948
+ vertical-align: middle;
949
+ line-height: 1;
950
+ display: inline-block;
951
+ }
952
+ }
953
+ }
954
+ .workbenches-box {
955
+ height: calc(100vh - 94px); /**margin-bottom: 16px;*/
956
+ > .el-row {
957
+ height: 100%;
958
+ > .el-col {
959
+ height: 100%;
960
+ }
961
+ }
962
+ .w-box {
963
+ background: #fff;
964
+ border-radius: 4px;
965
+ overflow: hidden;
966
+ height: 100%;
967
+ .w-b-head {
968
+ overflow: hidden;
969
+ margin: 16px 24px;
970
+ .tit {
971
+ b {
972
+ font-size: 16px;
973
+ font-weight: 600;
974
+ vertical-align: middle;
975
+ }
976
+ .nums {
977
+ margin-left: 8px;
978
+ border-radius: 4px;
979
+ width: 20px;
980
+ height: 20px;
981
+ display: inline-block;
982
+ background-color: #ff4d4f;
983
+ color: #fff;
984
+ text-align: center;
985
+ line-height: 20px;
986
+ font-style: inherit;
987
+ font-size: 12px;
988
+ vertical-align: middle;
989
+ }
990
+ }
991
+ .el-link {
992
+ margin-left: 24px;
993
+ }
994
+ }
995
+ }
996
+ .wnotice-box {
997
+ padding: 0 24px 4px;
998
+ overflow: auto;
999
+ height: calc(100% - 52px);
1000
+ .item {
1001
+ border: solid 1px rgba(0, 0, 0, 0.15);
1002
+ border-radius: 4px;
1003
+ padding: 12px;
1004
+ display: flex;
1005
+ margin-bottom: 12px;
1006
+ line-height: 18px;
1007
+ cursor: pointer;
1008
+ font-size: 14px;
1009
+ .no-read {
1010
+ background-color: #faad14;
1011
+ border-radius: 4px;
1012
+ color: #fff;
1013
+ font-size: 12px;
1014
+ font-style: inherit;
1015
+ line-height: 18px;
1016
+ padding: 0 4px;
1017
+ margin-right: 8px;
1018
+ }
1019
+ .name {
1020
+ flex: 1;
1021
+ }
1022
+ .date {
1023
+ color: rgba(0, 0, 0, 0.45);
1024
+ font-size: 12px;
1025
+ }
1026
+ &:hover {
1027
+ border-color: $baseColor;
1028
+ .name {
1029
+ color: $baseColor;
1030
+ }
1031
+ }
1032
+ }
1033
+ }
1034
+ .agenda-box {
1035
+ padding: 0 24px 4px;
1036
+ overflow: auto;
1037
+ height: calc(100% - 52px);
1038
+ .item {
1039
+ border: solid 1px rgba(0, 0, 0, 0.15);
1040
+ border-radius: 4px;
1041
+ padding: 12px;
1042
+ margin-bottom: 12px;
1043
+ cursor: pointer;
1044
+ p {
1045
+ margin: 0;
1046
+ }
1047
+ .name {
1048
+ margin-bottom: 8px;
1049
+ font-size: 14px;
1050
+ }
1051
+ .info {
1052
+ font-size: 12px;
1053
+ > span {
1054
+ margin-right: 32px;
1055
+ color: rgba(0, 0, 0, 0.45);
1056
+ }
1057
+ }
1058
+ &:hover {
1059
+ border-color: $baseColor;
1060
+ .name {
1061
+ color: $baseColor;
1062
+ }
1063
+ }
1064
+ }
1065
+ }
1066
+ .use-cases {
1067
+ overflow: auto;
1068
+ padding: 0 24px 4px;
1069
+ height: calc(100% - 52px);
1070
+ .item {
1071
+ margin-bottom: 32px;
1072
+ .t {
1073
+ &:before {
1074
+ content: "";
1075
+ width: 4px;
1076
+ height: 15px;
1077
+ border-radius: 4px;
1078
+ background: $baseColor;
1079
+ margin-right: 8px;
1080
+ vertical-align: middle;
1081
+ display: inline-block;
1082
+ }
1083
+ span {
1084
+ vertical-align: middle;
1085
+ font-size: 14px;
1086
+ }
1087
+ }
1088
+ .c {
1089
+ padding: 2px 12px;
1090
+ .i-block {
1091
+ display: inline-block;
1092
+ width: 84px;
1093
+ margin-right: 52px;
1094
+ text-align: center;
1095
+ font-size: 12px;
1096
+ margin-top: 18px;
1097
+ cursor: pointer;
1098
+ vertical-align: top;
1099
+ .icon {
1100
+ width: 44px;
1101
+ height: 44px;
1102
+ border-radius: 8px;
1103
+ color: #fff;
1104
+ display: block;
1105
+ margin: 0 auto 8px;
1106
+ font-size: 20px;
1107
+ font-style: inherit;
1108
+ line-height: 44px;
1109
+ }
1110
+ &:hover {
1111
+ color: $baseColor;
1112
+ }
1113
+ .tips {
1114
+ zoom: 0.8;
1115
+ display: inline-block;
1116
+ line-height: 1.2;
1117
+ margin: 0 -42px 8px;
1118
+ }
1119
+ }
1120
+ }
1121
+ }
1122
+ }
1123
+ }
1124
+ .workbenches-info {
1125
+ padding: 0 24px;
1126
+ margin: 0 -24px;
1127
+ background: #fff;
1128
+ height: 50px;
1129
+ display: flex;
1130
+ font-size: 12px;
1131
+ color: rgba(0, 0, 0, 0.65);
1132
+ .w-left {
1133
+ padding: 10px 0;
1134
+ height: 100%;
1135
+ text-align: right;
1136
+ vertical-align: middle;
1137
+ flex: 1;
1138
+ zoom: 0.9;
1139
+ span {
1140
+ margin: 3px 0px;
1141
+ display: block;
1142
+ }
1143
+ }
1144
+ .w-right {
1145
+ line-height: 74px;
1146
+ }
1147
+ }
1148
+ </style>