cloud-web-corejs 1.0.122 → 1.0.124

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.122",
4
+ "version": "1.0.124",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -1,105 +1,131 @@
1
1
  <template>
2
- <form-item-wrapper :designer="designer" :field="field" :rules="rules" :design-state="designState"
3
- :parent-widget="parentWidget" :parent-list="parentList" :index-of-parent-list="indexOfParentList"
4
- :sub-form-row-index="subFormRowIndex" :sub-form-col-index="subFormColIndex" :sub-form-row-id="subFormRowId">
5
- <el-input-number ref="fieldEditor" v-model="fieldModel" class="full-width-input"
6
- :disabled="field.options.disabled"
7
- :size="field.options.size" :controls-position="field.options.controlsPosition"
8
- :placeholder="getI18nLabel(field.options.placeholder)"
9
- :min="field.options.min" :max="field.options.max"
10
- :precision="field.options.precision" :step="field.options.step"
11
- @focus="handleFocusCustomEvent" @blur="handleBlurCustomEvent"
12
- @change="handleChangeEvent"
13
- :class="[field.options.showbutton ? '' : 'noButton']"
14
- >
2
+ <form-item-wrapper
3
+ :designer="designer"
4
+ :field="field"
5
+ :rules="rules"
6
+ :design-state="designState"
7
+ :parent-widget="parentWidget"
8
+ :parent-list="parentList"
9
+ :index-of-parent-list="indexOfParentList"
10
+ :sub-form-row-index="subFormRowIndex"
11
+ :sub-form-col-index="subFormColIndex"
12
+ :sub-form-row-id="subFormRowId"
13
+ >
14
+ <el-input-number
15
+ ref="fieldEditor"
16
+ v-model="numberValue"
17
+ class="full-width-input"
18
+ :disabled="field.options.disabled"
19
+ :size="field.options.size"
20
+ :controls-position="field.options.controlsPosition"
21
+ :placeholder="getI18nLabel(field.options.placeholder)"
22
+ :min="field.options.min"
23
+ :max="field.options.max"
24
+ :precision="field.options.precision"
25
+ :step="field.options.step"
26
+ @focus="handleFocusCustomEvent"
27
+ @blur="handleBlurCustomEvent"
28
+ @change="handleChangeEvent"
29
+ :class="[field.options.showbutton ? '' : 'noButton']"
30
+ >
15
31
  </el-input-number>
16
32
  </form-item-wrapper>
17
33
  </template>
18
34
 
19
35
  <script>
20
- import FormItemWrapper from './form-item-wrapper'
21
- import emitter from '../../../../../components/xform/utils/emitter'
22
- import i18n from "../../../../../components/xform/utils/i18n";
23
- import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
36
+ import FormItemWrapper from "./form-item-wrapper";
37
+ import emitter from "../../../../../components/xform/utils/emitter";
38
+ import i18n from "../../../../../components/xform/utils/i18n";
39
+ import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
24
40
 
25
- export default {
26
- name: "number-widget",
27
- componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
28
- mixins: [emitter, fieldMixin, i18n],
29
- props: {
30
- field: Object,
31
- parentWidget: Object,
32
- parentList: Array,
33
- indexOfParentList: Number,
34
- designer: Object,
35
-
36
- designState: {
37
- type: Boolean,
38
- default: false
39
- },
40
-
41
- subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
42
- type: Number,
43
- default: -1
44
- },
45
- subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
46
- type: Number,
47
- default: -1
48
- },
49
- subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
50
- type: String,
51
- default: ''
52
- },
41
+ export default {
42
+ name: "number-widget",
43
+ componentName: "FieldWidget", //必须固定为FieldWidget,用于接收父级组件的broadcast事件
44
+ mixins: [emitter, fieldMixin, i18n],
45
+ props: {
46
+ field: Object,
47
+ parentWidget: Object,
48
+ parentList: Array,
49
+ indexOfParentList: Number,
50
+ designer: Object,
53
51
 
52
+ designState: {
53
+ type: Boolean,
54
+ default: false,
54
55
  },
55
- components: {
56
- FormItemWrapper,
56
+
57
+ subFormRowIndex: {
58
+ /* 子表单组件行索引,从0开始计数 */ type: Number,
59
+ default: -1,
57
60
  },
58
- inject: ['refList', 'globalOptionData', 'globalModel'],
59
- data() {
60
- return {
61
- oldFieldValue: null, //field组件change之前的值
62
- fieldModel: undefined,
63
- rules: [],
64
- }
61
+ subFormColIndex: {
62
+ /* 子表单组件列索引,从0开始计数 */ type: Number,
63
+ default: -1,
65
64
  },
66
- computed: {
67
-
65
+ subFormRowId: {
66
+ /* 子表单组件行Id,唯一id且不可变 */ type: String,
67
+ default: "",
68
68
  },
69
- beforeCreate() {
70
- /* 这里不能访问方法和属性!! */
69
+ },
70
+ components: {
71
+ FormItemWrapper,
72
+ },
73
+ inject: ["refList", "globalOptionData", "globalModel"],
74
+ data() {
75
+ return {
76
+ oldFieldValue: null, //field组件change之前的值
77
+ fieldModel: null,
78
+ rules: [],
79
+ };
80
+ },
81
+ computed: {
82
+ numberValue: {
83
+ get() {
84
+ let fieldModel = this.fieldModel;
85
+ return fieldModel === null ? undefined : fieldModel;
86
+ },
87
+ set(val) {
88
+ let newValue = val === undefined ? null : val;
89
+ this.fieldModel = newValue
90
+ let currentData =
91
+ this.tableParam && this.tableParam.row
92
+ ? this.tableParam.row
93
+ : this.formModel;
94
+ currentData[this.fieldKeyName] = newValue;
95
+ },
71
96
  },
97
+ },
98
+ beforeCreate() {
99
+ /* 这里不能访问方法和属性!! */
100
+ },
72
101
 
73
- created() {
74
- /* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
102
+ created() {
103
+ /* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
75
104
  需要在父组件created中初始化!! */
76
- this.registerToRefList()
77
- this.initFieldModel()
78
- this.initEventHandler()
79
- this.buildFieldRules()
105
+ this.registerToRefList();
106
+ this.initFieldModel();
107
+ this.initEventHandler();
108
+ this.buildFieldRules();
80
109
 
81
- this.handleOnCreated()
82
- },
110
+ this.handleOnCreated();
111
+ },
83
112
 
84
- mounted() {
85
- this.handleOnMounted()
86
- },
113
+ mounted() {
114
+ this.handleOnMounted();
115
+ },
87
116
 
88
- beforeDestroy() {
89
- this.unregisterFromRefList()
90
- },
91
-
92
- methods: {
117
+ beforeDestroy() {
118
+ this.unregisterFromRefList();
119
+ },
93
120
 
94
- }
95
- }
121
+ methods: {},
122
+ };
96
123
  </script>
97
124
 
98
125
  <style lang="scss" scoped>
99
- @import "~@/styles/global.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
100
-
101
- .full-width-input {
102
- width: 100% !important;
103
- }
126
+ @import "~@/styles/global.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
104
127
 
128
+ .full-width-input {
129
+ width: 100% !important;
130
+ }
105
131
  </style>
@@ -20,12 +20,15 @@
20
20
  ></outLink>
21
21
  </template>
22
22
  <unreadDialog></unreadDialog>
23
+ <watermark></watermark>
23
24
  </section>
24
25
  </template>
25
26
 
26
27
  <script>
27
28
  import outLink from '@base/views/user/outLink/index.vue';
28
29
  import unreadDialog from "../../layout/components/notify_message/unreadDialog.vue";
30
+ import watermark from "./watermark";
31
+
29
32
 
30
33
  export default {
31
34
  name: 'AppMain',
@@ -43,7 +46,8 @@ export default {
43
46
  },
44
47
  components: {
45
48
  outLink,
46
- unreadDialog
49
+ unreadDialog,
50
+ watermark
47
51
  },
48
52
  data() {
49
53
  return {
@@ -0,0 +1,83 @@
1
+ <template>
2
+ <div class="watermarkFlag" :style="'background:url('+imgUrl+')'"></div>
3
+ </template>
4
+ <script>
5
+ import {
6
+ getParameterVauleByCode,
7
+ } from '@base/api/user'
8
+ export default {
9
+ data() {
10
+ return {
11
+ imgUrl: null,
12
+ isFormDev:false
13
+ }
14
+ },
15
+ created() {
16
+ this.init();
17
+ },
18
+ methods: {
19
+ initIsFormDev() {
20
+ let userFlag = this.$store.getters.userFlag
21
+ this.isFormDev = userFlag == 6 || userFlag == 7 || userFlag == 8;
22
+ },
23
+ init() {
24
+ this.initIsFormDev();
25
+ if(this.isFormDev)return;
26
+ getParameterVauleByCode({
27
+ data: {"code": "showWatermark"},
28
+ success: res => {
29
+ let value = (!res.objx || !res.objx.value) ? "0" : res.objx.value;
30
+ if (value == "1") {
31
+ this.watermarkImg();
32
+ }
33
+ }
34
+ })
35
+ },
36
+ watermarkImg() {
37
+ let that = this
38
+ const testName = this.$store.getters.nickName
39
+ var nameL = ''
40
+ if (testName.match(/[^\x00-\xff]/ig) != null){
41
+ nameL = testName.length
42
+ }else{
43
+ nameL = testName.length / 2
44
+ }
45
+ // 通过canvas将文本生成图片
46
+ const canvas = document.createElement('canvas')
47
+ canvas.width = nameL * 32 * 2
48
+ canvas.height = nameL * 32
49
+ const ctx = canvas.getContext('2d')
50
+
51
+ ctx.font = '18px PingFangSC'
52
+ ctx.textAlign = 'center'
53
+ ctx.fillStyle = '#EEEEEE'
54
+ // 设置倾斜角度
55
+ ctx.rotate(-30 * Math.PI / 180)
56
+ // 调整偏移量,让文本完整显示
57
+ ctx.translate(-50, 30)
58
+ ctx.fillText(testName, 100, 58)
59
+ // 将canvas转为base64图片
60
+ const url = canvas.toDataURL()
61
+ that.imgUrl = url
62
+ console.log(that.imgUrl)
63
+ }
64
+ }
65
+ }
66
+ </script>
67
+ <style scoped>
68
+ .watermarkFlag {
69
+ /* 设置全屏宽高,覆盖于页面上方 */
70
+ position: fixed;
71
+ top: 0;
72
+ left: 0;
73
+ height: 100vh;
74
+ width: 100vw;
75
+ opacity: 0.8;
76
+ /* 生成的图片是有一张,开启repeat自动填充 */
77
+ background: repeat;
78
+ pointer-events: none;
79
+ /* 核心部分,决定水印层与内容部分的结合方式 */
80
+ mix-blend-mode: multiply;
81
+ z-index: 9999999;
82
+ }
83
+ </style>
@@ -1,1034 +0,0 @@
1
- <template>
2
- <div class="index-home">
3
- <el-row>
4
- <el-col :span="8">
5
- <div class="i-user-info">
6
- <img class="img" v-if="headPhotoUrl" :src="headPhotoUrl"/>
7
- <p class="name">{{ $t1('您好') }},{{ userInfo.nickName }}</p>
8
- <p>{{ companyInfo.companyName }}</p>
9
- </div>
10
- <div class="notice-box">
11
- <div class="txt" @click="openMoreNotifyMessage()">
12
- <i class="iconfont icon-xiaoxitongzhi"></i>
13
- <span v-if="unreadMessageNum>0"
14
- v-html="$t1('您 有{number}条 未读消息,请及时查看。',{number: `<b>${(unreadMessageNum > 99 ? '99+' : unreadMessageNum)}</b>`})">
15
- </span>
16
- <span v-else-if="unreadMessageNum==0">
17
- {{ $t1('您 暂无 未读消息。') }}
18
- </span>
19
- </div>
20
- <el-tooltip class="item" effect="dark" :content="$t1('刷新')" placement="top">
21
- <el-button type="text" @click="getUnreadMessageNum(true)"><i class="el-icon-refresh"></i></el-button>
22
- </el-tooltip>
23
- <el-tooltip class="item" effect="dark" :content="$t1('查看更多')" placement="top">
24
- <el-button type="text" @click="openMoreNotifyMessage()" class="more">
25
- <i class="el-icon-news"></i>
26
- </el-button>
27
- </el-tooltip>
28
- </div>
29
- <el-card class="box-card">
30
- <div slot="header" class="clearfix">
31
- <span style="float:left">
32
- <i class="el-icon-chat-line-round ico"></i>
33
- {{ $t1('公告') }}
34
- </span>
35
- <el-button type="text" @click="openSystemNoticeDialog()"><span class="more">MORE+</span></el-button>
36
- </div>
37
- <div class="home-notice-list">
38
- <div v-for="(systemNotice,index) in systemNotices" :key="index" class="item"
39
- @click="openSystemNoticeDialog(systemNotice)"
40
- :title="systemNotice.title">
41
- {{ systemNotice.title }}
42
- <span class="time">{{ systemNotice.modifyDate.substring(0, 10) }}</span>
43
- </div>
44
- </div>
45
- </el-card>
46
- </el-col>
47
- <el-col :span="homeConfig.toDoSpan || 16" style="padding-left:6px;">
48
- <el-card class="box-card">
49
- <div slot="header" class="clearfix">
50
- <span style="float:left">
51
- <i class="el-icon-chat-line-round ico"></i>
52
- {{ $t1('待办事项') }}
53
- </span>
54
- <el-tooltip class="item" effect="dark" :content="$t1('刷新')" placement="top">
55
- <el-button type="text" @click="getWfInfoList(true)" class="more" style="right:107px">
56
- <i class="el-icon-refresh"></i>
57
- </el-button>
58
- </el-tooltip>
59
- <el-button type="text" @click="toWfManageList" class="more">
60
- <i class="el-icon-news"></i>
61
- <span>{{ $t1('查看更多+') }}</span>
62
- </el-button>
63
- </div>
64
- <div class="need-to">
65
- <vxe-grid :data="unDoWfRows" ref="table-wf" v-bind="wfOption"
66
- @resizable-change="$vxeTableUtil.onColumnWitchChange"
67
- @custom="$vxeTableUtil.customHandle"></vxe-grid>
68
- </div>
69
- </el-card>
70
- </el-col>
71
- </el-row>
72
- <el-row>
73
- <el-col :span="8" v-show="homeConfig.showFastTrack!==false">
74
- <el-card class="box-card">
75
- <div slot="header" class="clearfix">
76
- <span style="float:left">
77
- <i class="el-icon-star-off ico"></i>
78
- {{ $t1('快捷通道') }}
79
- </span>
80
- <el-button type="text" @click="showCommMenuDialog = true"><span class="more">MORE+</span></el-button>
81
- </div>
82
- <div class="fast-box" style="height: 372px;">
83
- <div class="item" v-for="commMenu in commMenus" :key="commMenu.id">
84
- <a href="javascript:void(0);" @click="rourteTo(commMenu)">
85
- <p><i :class="!!commMenu.menuImg?('iconfont '+commMenu.menuImg):null"></i><span>{{
86
- commMenu.menuName
87
- }}</span></p>
88
- </a>
89
- </div>
90
- </div>
91
- </el-card>
92
- </el-col>
93
- <el-col :span="16" style="padding-left:6px;">
94
- <el-card class="box-card">
95
- <div slot="header" class="clearfix">
96
- <span style="float:left">
97
- <i class="el-icon-message ico"></i>
98
- 消息通知
99
- </span>
100
- <!-- <el-button type="text" @click="openNotifyTemplateGroupDialog" class="more" style="right:100px">
101
- <i class="el-icon-receiving"></i>
102
- <span>选择分组</span>
103
- </el-button> -->
104
- <el-tooltip class="item" effect="dark" :content="$t1('刷新')" placement="top">
105
- <el-button type="text" @click="initNotifyMessage(true)" class="more" style="right:107px">
106
- <i class="el-icon-refresh"></i>
107
- </el-button>
108
- </el-tooltip>
109
- <el-button type="text" @click="openMoreNotifyMessage()" class="more">
110
- <i class="el-icon-news"></i>
111
- <span>查看更多+</span>
112
- </el-button>
113
- </div>
114
- <div class="home-notice-list to-reed" style="height: 400px;">
115
- <div v-for="(notifyMessage,index) in notifyMessages" class="item" :key="index"
116
- :class="{noread:notifyMessage.readed == 0}"
117
- :title="notifyMessage.content" @click="checkNotifyMessage(notifyMessage,index)">
118
- <div class="clearfix">
119
- <el-tag type="warning">{{
120
- notifyMessage.notifyTypeName
121
- }}
122
- </el-tag>
123
- <span class="time">{{
124
- notifyMessage.createDate
125
- }}</span>
126
- <div class="btns fr">
127
- <el-link type="primary" @click.stop="openNotifyMessageDialog(notifyMessage)"><i class="el-icon-files"></i>
128
- </el-link>
129
- </div>
130
- </div>
131
- <span class="name">{{ notifyMessage.content }}</span>
132
- </div>
133
- </div>
134
- </el-card>
135
- </el-col>
136
- </el-row>
137
- <slot></slot>
138
- <systemNoticeInfoDialog v-if="showSystemNoticeInfoDialog" :visiable.sync="showSystemNoticeInfoDialog"
139
- :param="csnRow" :appendToTop="true"></systemNoticeInfoDialog>
140
-
141
- <commMenuDialog v-if="showCommMenuDialog" :visiable.sync="showCommMenuDialog"
142
- @confirm="commMenuCallBack"></commMenuDialog>
143
- <wfContentDialog v-if="showWfDialog" :visible.sync="showWfDialog" @close="wfClose"
144
- :option.sync="wfContentOption"></wfContentDialog>
145
-
146
- <notifyMessageDialog ref="notifyMessageDialog"></notifyMessageDialog>
147
-
148
- <notifyMessageInfoDialog v-if="showNoticeDialog" :visiable.sync="showNoticeDialog"
149
- :dataId.sync="notifyMessageInfoId"
150
- @readHanlde="notifyMessageReadHanlde"></notifyMessageInfoDialog>
151
-
152
-
153
- <el-dialog
154
- :title="$t1('选择分组')"
155
- :append-to-body="true"
156
- :modal-append-to-body="true"
157
- :close-on-click-modal="false"
158
- v-if="showGroupDialog"
159
- :visible.sync="showGroupDialog"
160
- :modal="false"
161
- custom-class="el-dialog dialog-style list-dialog"
162
- width="355px"
163
- :destroy-on-close="true"
164
- >
165
- <div class="cont group-list">
166
- <div class="item" v-for="(notifyTemplate,index) in notifyTemplates" :key="index"
167
- @click="openMoreNotifyMessage(notifyTemplate.notifyType)">
168
- <i class="iconfont icon-fenzu"></i>
169
- <span class="name">{{ notifyTemplate.ntName }}</span>
170
- <!-- <span class="nums">99+</span>-->
171
- </div>
172
- </div>
173
- </el-dialog>
174
-
175
- </div>
176
- </template>
177
-
178
- <script>
179
- import systemNoticeInfoDialog from '@base/views/user/system_notice/infoDialog.vue';
180
- import commMenuDialog from '@base/views/user/commMenu/index.vue';
181
- import notifyMessageDialog from '@base/views/user/notify_message/dialog.vue';
182
- import notifyMessageInfoDialog from '@base/views/user/notify_message/infoDialog';
183
-
184
- import {getToken} from "@base/utils/auth";
185
- import wfContentDialog from "@base/views/user/wf/wf_manage/wfContentDialog";
186
- import corejsConfig from "@/corejsConfig";
187
-
188
- export default {
189
- name: 'home',
190
- props: {
191
- wf_manage_url: String
192
- },
193
- components: {
194
- systemNoticeInfoDialog,
195
- commMenuDialog,
196
- notifyMessageDialog,
197
- notifyMessageInfoDialog,
198
- wfContentDialog
199
- },
200
- data() {
201
- return {
202
- showNoticeDialog: false,
203
- showGroupDialog: false,
204
- notifyTemplates: [],
205
- userInfo: {},
206
- companyInfo: {},
207
- systemNotices: [],
208
- showSystemNoticeInfoDialog: false,
209
- csnRow: null,
210
- headPhotoUrl: '',
211
- dialogVisible: true,
212
- unDoWfRows: [],
213
- wfOption: {},
214
- showWfDialog: false,
215
- wfContentOption: {},
216
- showWfContent: true,
217
- wfContent: null,
218
- wfDataId: '',
219
- showCommMenuDialog: false,
220
- commMenus: [],
221
- notifyMessages: [],
222
- notifyMessageInfoIndex: null,
223
- notifyMessageInfoId: null,
224
- unreadMessageNum: 0,
225
- activating: true,
226
- wfTimer: null,
227
- homeConfig: corejsConfig.homeConfig || {}
228
- };
229
- },
230
- activated() {
231
- this.activating = true;
232
- if (this.wfTimer) {
233
- this.timerExcFun(true);
234
- }
235
- },
236
- deactivated() {
237
- this.activating = false;
238
- },
239
- beforeDestroy() {
240
- this.clearTimer();
241
- },
242
- created() {
243
- this.getUserInfo();
244
- this.initSystemNotice();
245
- this.initCommMenu();
246
- this.initNotifyMessage();
247
- this.initWfParam();
248
- this.initWfTimer();
249
- },
250
- methods: {
251
- wfClose() {
252
- this.timerExcFun(true);
253
- },
254
- initWfTimer() {
255
- this.wfTimer = setInterval(() => {
256
- this.timerExcFun(false);
257
- }, 10000);
258
- this.timerExcFun(true);
259
- },
260
- timerExcFun(isLoading) {
261
- if (!this.activating) {
262
- return;
263
- }
264
- this.getWfInfoList(isLoading);
265
- this.getUnreadMessageNum(isLoading);
266
- this.initNotifyMessage(isLoading)
267
- this.$emit('timerHandle')
268
- },
269
- clearTimer() {
270
- clearInterval(this.wfTimer);
271
- this.wfTimer = null;
272
- },
273
- getUserInfo() {
274
- this.$http({
275
- url: USER_PREFIX + '/user/currentUser',
276
- method: 'post',
277
- success: res => {
278
- let userInfo = res.objx;
279
- this.headPhotoUrl = userInfo.headPhotoUrl ? userInfo.headPhotoUrl : require('@/resources/images' + '/default-header.png');
280
-
281
- this.userInfo = userInfo;
282
- }
283
- });
284
- this.$http({
285
- url: USER_PREFIX + '/company_info/getCurrent',
286
- method: `post`,
287
- success: res => {
288
- this.companyInfo = res.objx || {};
289
- }
290
- });
291
- },
292
- initSystemNotice() {
293
- this.$http({
294
- url: USER_PREFIX + '/system_notice/listPage',
295
- data: {publish: true, searchCount: false},
296
- method: 'post',
297
- success: res => {
298
- this.systemNotices = res.objx && res.objx.records ? res.objx.records : [];
299
- }
300
- });
301
- },
302
- openSystemNoticeDialog(row) {
303
- this.csnRow = row || null;
304
- this.showSystemNoticeInfoDialog = true;
305
- },
306
- initUnDoWfInfo() {
307
- this.$http({
308
- url: AGILEBPM_PREFIX + '/wf_manage/listPage',
309
- data: {type: 0, searchCount: false},
310
- method: 'post',
311
- success: res => {
312
- this.unDoWfRows = res.objx.records || [];
313
- }
314
- });
315
- },
316
- initWfTableList() {
317
- let that = this;
318
- let paramColumns = this.wfParamDTOs.map(item => {
319
- return {
320
- title: this.$t1(item.paramName),
321
- field: item.paramKey,
322
- width: 150
323
- };
324
- })
325
- var statuses = {running: this.$t1('审核中'), back: this.$t1('已驳回'), end: this.$t1('已完成')};
326
- let tableOption = {
327
- vue: this,
328
- tableRef: 'table-wf',
329
- tableName: 'home-table-wf',
330
- config: {
331
- height: 'auto'
332
- },
333
- columns: [
334
- {type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
335
- {
336
- title: this.$t1('单据类型'),
337
- field: 'objTypeName',
338
- width: 150,
339
- fixed: 'left'
340
- },
341
- {
342
- title: this.$t1('流程主题'),
343
- field: 'name',
344
- width: 150
345
- },
346
- {
347
- title: this.$t1('启动人'),
348
- field: 'starterName',
349
- width: 150
350
- },
351
- {
352
- title: this.$t1('当前任务'),
353
- field: 'taskName',
354
- width: 150
355
- },
356
- {
357
- title: this.$t1('当前任务用户'),
358
- field: 'candidateNames',
359
- width: 150
360
- },
361
- {
362
- title: this.$t1('启动时间'),
363
- field: 'createDate',
364
- width: 150
365
- },
366
- ...paramColumns,
367
- {
368
- width: 47,
369
- fixed: 'right',
370
- title: '',
371
- sortable: false,
372
- slots: {
373
- default: ({row}) => {
374
- return [
375
- <a
376
- href="javascript:void(0);"
377
- class="a-link"
378
- onclick={() => {
379
- this.openWfDialog(row);
380
- }}
381
- >
382
- <el-tooltip enterable={false} effect="dark" content={this.$t1('查看')} placement="top"
383
- popper-class="tooltip-skin">
384
- <i class="el-icon-edit"/>
385
- </el-tooltip>
386
- </a>
387
- ];
388
- }
389
- }
390
- }
391
- ]
392
- };
393
- this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
394
- this.wfOption = opts;
395
- });
396
- },
397
- openWfDialog(row) {
398
- this.wfContentOption = {
399
- objId: row.objId,
400
- url: row.url,
401
- objTypeCode: row.objTypeCode
402
- };
403
- this.showWfDialog = true;
404
- },
405
- commMenuCallBack(datas) {
406
- this.commMenus = datas || [];
407
- },
408
- initCommMenu() {
409
- this.$http({
410
- url: USER_PREFIX + '/comm_menu/currentList',
411
- data: {longOne: 0},
412
- method: 'POST'
413
- }).then(resultMsg => {
414
- this.commMenus = resultMsg.objx || [];
415
- });
416
- },
417
- initNotifyMessage(isLoading) {
418
- this.$http({
419
- url: USER_PREFIX + '/notify_message/listPage',
420
- data: {
421
- readed: 0,
422
- searchCount: false,
423
- pageSize: 10
424
- },
425
- method: 'post',
426
- isLoading,
427
- success: res => {
428
- this.notifyMessages = res.objx && res.objx.records ? res.objx.records : [];
429
- }
430
- });
431
- },
432
- openNotifyMessageDialog(row) {
433
- if (row.jumpContent) {
434
- this.$refs.notifyMessageDialog.open(row, () => {
435
- row.readed = 1;
436
- });
437
- }
438
- },
439
- openMoreNotifyMessage(notifyType) {
440
- let data = {notifyType: (notifyType || '')};
441
- let view = {
442
- name: 'notify_message:list',
443
- query: data
444
- };
445
- this.$store.dispatch('tagsView/delCachedView', view).then(() => {
446
- this.$router.replace(view);
447
- });
448
-
449
- if (notifyType) {
450
- this.showGroupDialog = false;
451
- }
452
- },
453
- checkNotifyMessage(row, index) {
454
- this.showNoticeDialog = true;
455
- this.notifyMessageInfoIndex = index;
456
- this.notifyMessageInfoId = row.id;
457
- },
458
- notifyMessageReadHanlde() {
459
- this.notifyMessages[this.notifyMessageInfoIndex].readed = 1;
460
- },
461
- openNotifyTemplateGroupDialog() {
462
- this.$http({
463
- url: USER_PREFIX + `/notify_template/listPage`,
464
- method: `post`,
465
- data: {searchCount: false},
466
- isLoading: true,
467
- // loadingTarget: document.body,
468
- success: res => {
469
- this.notifyTemplates = res.objx && res.objx.records ? res.objx.records : [];
470
- this.showGroupDialog = true;
471
- }
472
- });
473
- },
474
- rourteTo(route) {
475
- if (route.type == 4) {
476
- this.jumpOutLink(route)
477
- } else if (route.type == 3) {
478
- let menuCode = route.menuCode;
479
- let path = "/user/outLink/index/" + menuCode;
480
- this.$router.push({path: path, query: {url: route.url}});
481
- } else {
482
- let path = this.getPath(route)
483
- if (!path) return
484
- this.$router.push(path);
485
- }
486
- },
487
- getPath(route3) {
488
- let item = null;
489
- let path = null
490
- if (route3.type == 0) {
491
- //普通菜单
492
- if (route3.url) {
493
- path = route3.route || route3.url;
494
- let str = "/report/vform/render/";
495
- if (path.indexOf(str) == 0) {
496
- } else {
497
- let pIndex = path.indexOf('?');
498
- if (pIndex > 0) {
499
- path = path.substring(0, pIndex);
500
- }
501
- }
502
- }
503
- } else if (route3.type == 5) {
504
- //动态表单
505
- let url = route3.route || route3.url;
506
- path = url;
507
- }
508
- if (path && path.startsWith("@")) {
509
- path = null
510
- }
511
- return path;
512
- },
513
- jumpOutLink(route) {
514
- let path = route.url;
515
- if (route.type == 4 && path) {
516
- if (path.indexOf('token={token}') >= 0) {
517
- path = path.replace('token={token}', 'token=' + getToken())
518
- }
519
- window.open(path);
520
- }
521
- },
522
- initWfParam() {
523
- return this.$http({
524
- url: USER_PREFIX + '/wf_param/list',
525
- method: `post`,
526
- data: {},
527
- isLoading: true,
528
- // loadingTarget: document.body,
529
- modalStrictly: true,
530
- success: res => {
531
- this.wfParamDTOs = res.objx || [];
532
- this.initWfTableList();
533
- }
534
- });
535
- },
536
- getWfInfoList(isLoading) {
537
- if (!this.activating) {
538
- return;
539
- }
540
- this.$http({
541
- url: USER_PREFIX + '/wf_info/listPage',
542
- data: {type: 0, size: 20, searchCount: false},
543
- method: 'post',
544
- isLoading: isLoading,
545
- modal: isLoading || false,
546
- // loadingTarget: document.body,
547
- success: res => {
548
- this.unDoWfRows = res.objx && res.objx.records ? res.objx.records : [];
549
- },
550
- failMsg: false,
551
- errorMsg: false,
552
- fail: (res, response) => {
553
- if (response && response.status == 200) {
554
- this.$errorMsg(res);
555
- }
556
- }
557
- });
558
- },
559
- getUnreadMessageNum(isLoading) {
560
- if (!this.activating) {
561
- return;
562
- }
563
- return this.$http({
564
- url: USER_PREFIX + '/notify_message/countMessage',
565
- method: `post`,
566
- data: {},
567
- isLoading: isLoading,
568
- modal: isLoading || false,
569
- // loadingTarget: document.body,
570
- success: res => {
571
- this.unreadMessageNum = res.objx || 0;
572
- },
573
- failMsg: false,
574
- errorMsg: false,
575
- fail: (res, response) => {
576
- if (response && response.status == 200) {
577
- this.$errorMsg(res);
578
- }
579
- }
580
- });
581
- },
582
- wfhandleCallback(flag) {
583
- if ([1, 2, 3].includes(flag)) {
584
- this.showWfDialog = false;
585
- this.wfClose();
586
- }
587
- },
588
- toWfManageList() {
589
- let url = this.wf_manage_url || '/basic/wf/wf_manage/list'
590
- this.$router.push(url)
591
- }
592
- }
593
- };
594
- </script>
595
- <style lang="scss" scoped>
596
- @import '~@/styles/variables.scss';
597
-
598
- body #app .index-home {
599
- margin: 3px 10px;
600
- height: calc(100vh - 38px);
601
- overflow: auto;
602
-
603
- #containt {
604
- margin: 0;
605
- background: none;
606
- height: auto;
607
- box-shadow: none;
608
- }
609
-
610
- .i-user-info {
611
- background: url(~@/resources/images/home-img.png) #2a6494 no-repeat 116% 45px;
612
- margin-bottom: 6px;
613
- background-size: 181px;
614
- padding: 14px 38px 11px 16px;
615
- border-radius: 4px 4px;
616
- color: #fff;
617
- font-size: 12px;
618
- margin-top: 3px;
619
- height: 95px;
620
- overflow: hidden;
621
-
622
- .name {
623
- opacity: 1;
624
- font-weight: 600;
625
- margin: 9px 0 14px;
626
- font-size: 14px;
627
- }
628
-
629
- .img {
630
- width: 60px;
631
- height: 60px;
632
- float: left;
633
- border-radius: 50%;
634
- border: solid 4px rgba(255, 255, 255, 0.28);
635
- margin-right: 10px;
636
- }
637
- }
638
-
639
- .home-notice-list {
640
- height: 182px;
641
- margin: 0 -12px;
642
-
643
- .item {
644
- padding: 6px 12px;
645
- font-size: 12px;
646
- cursor: pointer;
647
- overflow: hidden;
648
- text-overflow: ellipsis;
649
- white-space: nowrap;
650
-
651
- .time {
652
- color: #b9b9b9;
653
- font-size: 12px;
654
- right: 12px;
655
- }
656
-
657
- &:hover {
658
- color: $baseColor;
659
- background-color: transparentize($baseColor, 0.97);
660
-
661
- .time {
662
- color: $baseColor
663
- }
664
- }
665
-
666
- &.no-read:before {
667
- content: "";
668
- width: 6px;
669
- height: 6px;
670
- background-color: $red;
671
- border-radius: 50%;
672
- vertical-align: middle;
673
- display: inline-block;
674
- margin-bottom: 1px;
675
- }
676
- }
677
-
678
- &.to-reed {
679
- height: 300px;
680
- overflow: auto;
681
- margin: -8px -12px;
682
-
683
-
684
- .item {
685
- white-space: initial;
686
- padding: 8px 22px 2px;
687
- position: relative;
688
-
689
- &:after {
690
- content: "";
691
- position: absolute;
692
- left: 22px;
693
- right: 22px;
694
- border-top: dashed 1px #eee;
695
- height: 1px;
696
- bottom: 0;
697
- }
698
-
699
- &.noread {
700
- &:before {
701
- content: "";
702
- width: 6px;
703
- height: 6px;
704
- background-color: $red;
705
- border-radius: 50%;
706
- margin-right: 5px;
707
- display: inline-block;
708
- position: absolute;
709
- left: 10px;
710
- top: 16px;
711
- }
712
- }
713
-
714
- .el-tag {
715
- zoom: 0.95;
716
- padding: 0 5px;
717
- height: 24px;
718
- line-height: 24px;
719
- }
720
-
721
- // .noread{
722
- // position: absolute;right:0;top:0;
723
- // span{transform: rotate(47deg);
724
- // -ms-transform: rotate(47deg);
725
- // -moz-transform: rotate(47deg);
726
- // -webkit-transform: rotate(47deg);
727
- // -o-transform: rotate(47deg);
728
- // z-index: 3;
729
- // color: #FFF;
730
- // position: absolute;
731
- // right: 1px;
732
- // top: 2px;}
733
- // &:after{
734
- // content: "\e618";
735
- // font-size: 62px;
736
- // font-family: "iconfont";
737
- // color:$red
738
- // }
739
- // }
740
- .time {
741
- position: relative;
742
- right: 0;
743
- margin-left: 12px;
744
- }
745
-
746
- .name {
747
- overflow: hidden;
748
- text-overflow: ellipsis;
749
- white-space: nowrap;
750
- margin-top: 3px;
751
- display: block;
752
- margin-bottom: 4px;
753
- }
754
-
755
- &:hover .name {
756
- color: $baseColor
757
- }
758
-
759
- &:first-child:before {
760
- border-top: none
761
- }
762
-
763
- .btns {
764
- text-align: right;
765
-
766
- .el-link {
767
- font-size: 12px;
768
- display: inline-block;
769
- margin-left: 14px;
770
-
771
- i {
772
- font-size: 12px;
773
- margin-right: 3px;
774
- }
775
- }
776
- }
777
- }
778
-
779
- }
780
- }
781
-
782
- .fast-box {
783
- margin: 6px 4px 4px;
784
- overflow: hidden;
785
-
786
- .item {
787
- width: 118px;
788
- text-align: center;
789
- float: left;
790
- margin-right: 14px;
791
-
792
- p {
793
- color: #2a6494;
794
- border: solid 1px #e2e2e2;
795
- margin: 3.5px 4px;
796
- width: calc(100% - 4px);
797
- border-radius: 6px;
798
- position: relative;
799
- height: 54px;
800
- line-height: 54px;
801
- text-align: left;
802
- padding-left: 14px;
803
- font-size: 12px;
804
-
805
- i {
806
- font-size: 14px;
807
- vertical-align: middle;
808
- margin-right: 2px;
809
- }
810
-
811
- span {
812
- vertical-align: middle;
813
- }
814
-
815
- &:before {
816
- content: '';
817
- width: 4px;
818
- height: 24px;
819
- display: inline-block;
820
- background: #225279b8;
821
- position: absolute;
822
- left: -1px;
823
- top: 50%;
824
- margin-top: -12px;
825
- }
826
-
827
- &:hover {
828
- background-color: $baseColor;
829
- color: #fff;
830
- border-color: $baseColor;
831
-
832
- &:before {
833
- background: #fff;
834
- }
835
- }
836
- }
837
- }
838
- }
839
-
840
- .need-to {
841
- height: 332px;
842
- }
843
-
844
- .table-box {
845
- width: 100%;
846
- font-size: 12px;
847
-
848
- th {
849
- line-height: 32px;
850
- background: #f7f7f7;
851
- font-weight: 400;
852
- color: #808080;
853
- padding: 0 6px;
854
- }
855
-
856
- td {
857
- text-align: center;
858
- line-height: 34px;
859
- color: #424242;
860
- border-bottom: solid 1px #eee;
861
- padding: 0 6px;
862
- }
863
-
864
- tr:last-child td {
865
- border-bottom: none;
866
- }
867
- }
868
- }
869
-
870
- .box-card .more {
871
- background-color: #f7f7f7;
872
- }
873
-
874
- .group-list {
875
- padding: 18px 18px 6px 32px !important;
876
- height: 400px;
877
- overflow: auto;
878
-
879
- .item {
880
- position: relative;
881
- height: 36px;
882
- border: solid 1px #eee;
883
- line-height: 34px;
884
- border-radius: 2px;
885
- padding: 0 42px 0 14px;
886
- margin-bottom: 10px;
887
- cursor: pointer;
888
-
889
- &::before {
890
- content: "";
891
- width: 8px;
892
- height: 8px;
893
- border: solid 1px #eee;
894
- border-radius: 50%;
895
- display: inline-block;
896
- position: absolute;
897
- left: -16px;
898
- top: 13px;
899
- }
900
-
901
- &.checked {
902
- &:before {
903
- content: "";
904
- background-color: $baseColor;
905
- border-color: $baseColor
906
- }
907
-
908
- background-color: transparentize($baseColor, 0.9);
909
- color: $baseColor;
910
- border-color: $baseColor;
911
- }
912
-
913
- i {
914
- font-size: 12px;
915
- vertical-align: middle;
916
- }
917
-
918
- .name {
919
- font-size: 12px;
920
- margin-left: 8px;
921
- vertical-align: middle;
922
- }
923
-
924
- .nums {
925
- width: 22px;
926
- height: 22px;
927
- border-radius: 50%;
928
- display: inline-block;
929
- position: absolute;
930
- right: 5px;
931
- top: 6px;
932
- color: #FFF;
933
- font-size: 12px;
934
- background-color: $red;
935
- line-height: 22px;
936
- text-align: center;
937
- }
938
- }
939
- }
940
-
941
- .notice-box {
942
- background-color: #2a649429;
943
- border-radius: 0 0 4px 4px;
944
- padding: 9px 12px;
945
- margin-bottom: 5px;
946
- margin-top: -6px;
947
- position: relative;
948
- z-index: 2;
949
- font-size: 13px;
950
- color: #212121;
951
- overflow: hidden;
952
-
953
- .txt {
954
- line-height: 28px;
955
- font-size: 12px;
956
- position: relative;
957
- display: inline-block;
958
- cursor: pointer;
959
-
960
- &:before {
961
- content: "";
962
- background-color: $baseColor;
963
- width: 4px;
964
- height: 20px;
965
- border-radius: 2px;
966
- display: inline-block;
967
- vertical-align: middle;
968
- margin-right: 18px;
969
- }
970
-
971
- i {
972
- font-size: 14px;
973
- margin-right: 12px;
974
- vertical-align: middle;
975
- }
976
-
977
- > span {
978
- vertical-align: middle;
979
- height: 22px;
980
- line-height: 22px;
981
- display: inline-block;
982
-
983
- b {
984
- color: #FFF;
985
- margin: 0 4px;
986
- font-size: 16px;
987
- vertical-align: middle;
988
- background: #FF5615;
989
- border-radius: 50%;
990
- display: inline-block;
991
- padding: 4px;
992
- font-weight: 200;
993
- line-height: 1;
994
- }
995
- }
996
-
997
- }
998
-
999
- .el-button {
1000
- position: absolute;
1001
- right: 46px;
1002
- padding: 0;
1003
- height: 22px;
1004
- line-height: 22px;
1005
- min-width: 22px;
1006
- text-align: center;
1007
- border-radius: 2px;
1008
- top: 50%;
1009
- margin-top: -11px;
1010
-
1011
- i {
1012
- font-size: 15px;
1013
- }
1014
-
1015
- &:hover {
1016
- background-color: $baseColor;
1017
- color: #FFF;
1018
- }
1019
-
1020
- &.more {
1021
- right: 12px;
1022
- background: #f7f7f7;
1023
-
1024
- &:hover {
1025
- color: $baseColor
1026
- }
1027
- }
1028
- }
1029
-
1030
- ::v-deep .el-card.is-always-shadow {
1031
- box-shadow: 0 2px 2px 0 rgb(0 0 0 / 6%);
1032
- }
1033
- }
1034
- </style>