vue2-client 1.9.9 → 1.9.11
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/docs/Logic/345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +1 -1
- package/docs//345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +2 -24
- package/package.json +1 -1
- package/src/base-client/components/common/XAddReport/XAddReport.vue +1 -0
- package/src/base-client/components/common/XFormTable/XFormTable.vue +3 -2
- package/src/base-client/components/common/XReport/index.js +3 -3
- package/src/base-client/components/common/XReportGrid/XReportDemo.vue +1 -1
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +35 -38
- package/src/base-client/components/common/XTab/XTab.vue +1 -1
- package/src/base-client/components/common/XTable/XTable.vue +84 -4
- package/src/base-client/components/his/XHisEditor/XHisEditor.vue +160 -56
- package/src/pages/DynamicStatistics/FavoriteList.vue +51 -51
- package/src/pages/WorkflowDetail/WorkFlowDemo.vue +12 -1
- package/src/pages/WorkflowDetail/WorkflowDetail.vue +9 -6
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowHandle.vue +24 -34
- package/src/router/async/router.map.js +2 -2
- package/src/services/api/entity.js +18 -18
- package/src/utils/waterMark.js +31 -31
- package/vue.config.js +2 -2
package/docs/Logic/345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* sql.query(sql别名 string,sql参数 string,页数 int,每页行数 int) 执行已经注册的sql 返回 org.json.JSONArray
|
|
17
17
|
* sql.querySQL(sql名称,sql语句) 执行一个没有注册的sql语句 返回 org.json.JSONArray
|
|
18
18
|
* sql.querySQL(sql名称,sql语句,页数 int,每页行数 int) ) 执行一个没有注册的sql语句 返回 org.json.JSONArray
|
|
19
|
-
* sql.execSQL(sql名称,sql
|
|
19
|
+
* sql.execSQL(sql名称,sql语句) 执行一个增删改sql语句 返回 org.json.JSONArray
|
|
20
20
|
- entity 对应 EntityService 类,其中有方法
|
|
21
21
|
* entity.partialSave(实体名称 string,保存参数 org.json.JSONObject) 返回整个实体 JSONObject
|
|
22
22
|
* entity.delete(实体名称 string,id Object)
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
- 用this.函数函数调用方式调用相应功能。
|
|
5
5
|
|
|
6
6
|
# 通过this可以调用的函数
|
|
7
|
+
- openDialog(configName, selectedId, mixinData):打开一个对话框,例如:this.openDialog('xxx', 5, {})
|
|
7
8
|
- openDialog(configName, selectedId, mixinData, outEnv):打开一个对话框:
|
|
8
9
|
* selectId:id号,formtable选择时,用selectId过滤数据 可以传递 json {a_id: 1} 或者 传递 1 ,传递数值会默认拼接查询条件 {selected_id:1}
|
|
9
10
|
* mixinData: form表单需要的数据
|
|
10
11
|
* outEnv: 传递给打开的界面的数据,在打开界面的js中通过this.outEnv可以访问
|
|
12
|
+
* getOutEnv 获取获取 outEnv
|
|
11
13
|
```js
|
|
12
14
|
this.openDialog('xxx', 5, {}, {})
|
|
13
15
|
```
|
|
@@ -17,31 +19,7 @@ this.openDialog('xxx', 5, {}, {})
|
|
|
17
19
|
- 先给组件起名字,命名规范:main,left,right,top,bottom
|
|
18
20
|
- 用 this.getComponentByName('main') 拿到组件。
|
|
19
21
|
|
|
20
|
-
# 特殊处理
|
|
21
|
-
- form表单提交数据到列表,而非后台。用 `this.outEnv.data.push(...[])`刷新列表数据。
|
|
22
|
-
|
|
23
22
|
# x-form-table 可以使用的函数/数据
|
|
24
|
-
- getTableData(): 获取所有数据
|
|
25
|
-
- 获取selectedid getSelectedId()
|
|
26
|
-
- 重新查询 refreshTable()
|
|
27
|
-
```js
|
|
28
|
-
假如组件名称叫 xtable
|
|
29
|
-
// 所有选中的id
|
|
30
|
-
const allid = this.$refs.xtable.table_selectedRowKeys
|
|
31
|
-
// 所有选中的行 table_selectedRowKeys
|
|
32
|
-
const allrecord = this.$refs.xtable.table_selectedRows
|
|
33
|
-
|
|
34
|
-
// xtable 所调用事件
|
|
35
|
-
// 新增修改后调用事件
|
|
36
|
-
afterSubmit( type(新增/修改/擦和讯), id: (所操作的主键id), form: (请求的表单内容))
|
|
37
|
-
// 查询后
|
|
38
|
-
afterQuery( res (查询后数据), querparams (查询参数))
|
|
39
|
-
// 删除后
|
|
40
|
-
afterDelete( res (删除接口返回数据))
|
|
41
|
-
// 操作按钮
|
|
42
|
-
action(record (当前记录), id (当前记录主键), actionType (操作类型))
|
|
43
|
-
```
|
|
44
|
-
|
|
45
23
|
- table_selectedRowKeys 获取选中的id /不用加 () 这是一个data 中的变量
|
|
46
24
|
- table_selectedRows 获取选中的行 /不用加 () 这是一个data 中的变量
|
|
47
25
|
- getSelectedId 获取获取selectedid
|
package/package.json
CHANGED
|
@@ -134,7 +134,7 @@ export default {
|
|
|
134
134
|
XAddReport,
|
|
135
135
|
XImportExcel
|
|
136
136
|
},
|
|
137
|
-
inject: ['getSelectedId', 'getSelectedData', 'getMixinData'],
|
|
137
|
+
inject: ['getSelectedId', 'getSelectedData', 'getMixinData', 'getOutEnv'],
|
|
138
138
|
data () {
|
|
139
139
|
return {
|
|
140
140
|
// 加载状态
|
|
@@ -374,7 +374,8 @@ export default {
|
|
|
374
374
|
env: this.env,
|
|
375
375
|
form: this.$refs.xForm.form,
|
|
376
376
|
allowedCardMode: res.allowedCardMode,
|
|
377
|
-
cardModeConfig: res.cardModeConfig
|
|
377
|
+
cardModeConfig: res.cardModeConfig,
|
|
378
|
+
summaryUpdate: true
|
|
378
379
|
})
|
|
379
380
|
}
|
|
380
381
|
this.loading = false
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import XReport from './XReport'
|
|
2
|
-
|
|
3
|
-
export default XReport
|
|
1
|
+
import XReport from './XReport'
|
|
2
|
+
|
|
3
|
+
export default XReport
|
|
@@ -490,44 +490,50 @@ export default {
|
|
|
490
490
|
// tableConfig: {}
|
|
491
491
|
}
|
|
492
492
|
},
|
|
493
|
-
inject: ['openDialog', 'registerComponent', 'getComponentByName', 'runLogic', 'getMixinData', 'getSelectedId', 'isInAModal', 'getConfigByName', 'getSelectedData'],
|
|
493
|
+
inject: ['openDialog', 'registerComponent', 'getComponentByName', 'runLogic', 'getMixinData', 'getSelectedId', 'isInAModal', 'getConfigByName', 'getSelectedData', 'getOutEnv'],
|
|
494
494
|
methods: {
|
|
495
495
|
onComponentMounted (h, cell, cellIndex) {
|
|
496
496
|
if (this.getMixinData && this.getMixinData()) {
|
|
497
497
|
this.mixinData = this.getMixinData()
|
|
498
498
|
}
|
|
499
|
+
if (cell.slotRef) {
|
|
500
|
+
this.registerComponent(cell.slotRef, this.$refs[`dynamicComponent_${cell.slotRef || cellIndex}`][0])
|
|
501
|
+
}
|
|
502
|
+
// 传递给祖先组件
|
|
499
503
|
console.log(`插槽组件已经初始化 slotType ${cell.slotType},ref= dynamicComponent_${cell.slotRef || cellIndex} , serviceName = ${cell.serviceName}`)
|
|
500
504
|
const shouldInit = cell.shouldInit == null ? true : cell.shouldInit
|
|
501
|
-
if (
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
if (
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
505
|
+
if (shouldInit) {
|
|
506
|
+
if (cell.slotType === 'x-add-native-form' && shouldInit) {
|
|
507
|
+
// 建议表单需要主动调用初始化方法
|
|
508
|
+
getConfigByName(cell.slotConfig, cell.serviceName, async (res) => {
|
|
509
|
+
// 如果配置了 表单初始化logic
|
|
510
|
+
// 调用 logic 获取参数
|
|
511
|
+
let param = { ...this.mixinData }
|
|
512
|
+
let selectedId
|
|
513
|
+
if (res.paramLogicName) {
|
|
514
|
+
if (!!this.getSelectedId) {
|
|
515
|
+
selectedId = this.getSelectedId()
|
|
516
|
+
if (typeof selectedId !== 'object') {
|
|
517
|
+
selectedId = { selectedId: selectedId }
|
|
518
|
+
}
|
|
513
519
|
}
|
|
520
|
+
param = Object.assign(param, await runLogic(res.paramLogicName, selectedId, cell.serviceName))
|
|
514
521
|
}
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
}, this.env === 'dev')
|
|
522
|
+
this.$refs[`dynamicComponent_${cell.slotRef || cellIndex}`][0].init({
|
|
523
|
+
serviceName: cell.serviceName,
|
|
524
|
+
formItems: res.formJson,
|
|
525
|
+
showSubmitBtn: !this.isInAModal,
|
|
526
|
+
businessType: param.businessType || '新增',
|
|
527
|
+
layout: res.xAddFormLayout,
|
|
528
|
+
...res,
|
|
529
|
+
fixedAddForm: param,
|
|
530
|
+
modifyModelData: {
|
|
531
|
+
files: param.files,
|
|
532
|
+
images: param.images
|
|
533
|
+
}
|
|
534
|
+
})
|
|
535
|
+
}, this.env === 'dev')
|
|
536
|
+
}
|
|
531
537
|
}
|
|
532
538
|
},
|
|
533
539
|
getEventHandlers (cell) {
|
|
@@ -883,15 +889,6 @@ export default {
|
|
|
883
889
|
}
|
|
884
890
|
},
|
|
885
891
|
mounted () {
|
|
886
|
-
this.$nextTick(() => {
|
|
887
|
-
// 使用 setTimeout 延迟访问 $refs
|
|
888
|
-
this.$nextTick(() => {
|
|
889
|
-
console.log('组件加载了', this.$refs)
|
|
890
|
-
console.log('组件加载了1', this.$refs.dynamicComponent_a0)
|
|
891
|
-
console.log('组件加载了2', Object.entries(this.$refs))
|
|
892
|
-
this.passComponentNamesToAncestor(this.$refs)
|
|
893
|
-
})
|
|
894
|
-
})
|
|
895
892
|
},
|
|
896
893
|
}
|
|
897
894
|
|
|
@@ -36,7 +36,7 @@ export default {
|
|
|
36
36
|
XAddNativeForm: () => import('@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'),
|
|
37
37
|
XReportGrid: () => import('@vue2-client/base-client/components/common/XReportGrid/XReport.vue')
|
|
38
38
|
},
|
|
39
|
-
inject: ['isInAModal', 'getSelectedId', 'getSelectedData'],
|
|
39
|
+
inject: ['isInAModal', 'getSelectedId', 'getSelectedData', 'getOutEnv'],
|
|
40
40
|
data () {
|
|
41
41
|
return {
|
|
42
42
|
activeKey: 0,
|
|
@@ -213,6 +213,7 @@
|
|
|
213
213
|
:closable="false"
|
|
214
214
|
:visible="summaryDrawerVisible"
|
|
215
215
|
:z-index="2000"
|
|
216
|
+
width="25%"
|
|
216
217
|
:after-visible-change="afterVisibleChange"
|
|
217
218
|
@close="onClose"
|
|
218
219
|
>
|
|
@@ -224,7 +225,15 @@
|
|
|
224
225
|
:title="f.title + ':'"
|
|
225
226
|
:value="f.value"
|
|
226
227
|
:precision="2"
|
|
227
|
-
style="margin-right: 50px"
|
|
228
|
+
style="margin-right: 50px">
|
|
229
|
+
<template #prefix>
|
|
230
|
+
<a-spin :spinning="f.loading">
|
|
231
|
+
</a-spin>
|
|
232
|
+
</template>
|
|
233
|
+
<template #suffix>
|
|
234
|
+
<a-icon v-show="!f.loading" :type="f.success !== false ? 'check-circle' : 'close-circle'" :style="{color: f.success !== false ? 'green' : 'red'}"/>
|
|
235
|
+
</template>
|
|
236
|
+
</a-statistic>
|
|
228
237
|
</div>
|
|
229
238
|
</template>
|
|
230
239
|
</a-drawer>
|
|
@@ -255,7 +264,9 @@ import {
|
|
|
255
264
|
querySummary,
|
|
256
265
|
queryWithResource,
|
|
257
266
|
remove,
|
|
258
|
-
asyncRunTask,
|
|
267
|
+
asyncRunTask,
|
|
268
|
+
editRowSave,
|
|
269
|
+
runLogic
|
|
259
270
|
} from '@vue2-client/services/api/common'
|
|
260
271
|
import XImportExcel from '@vue2-client/base-client/components/common/XImportExcel'
|
|
261
272
|
import { Modal } from 'ant-design-vue'
|
|
@@ -356,6 +367,8 @@ export default {
|
|
|
356
367
|
buttonPermissions: [],
|
|
357
368
|
// 是否展示汇总
|
|
358
369
|
showSummary: false,
|
|
370
|
+
// 自定义汇总
|
|
371
|
+
showCustomSummary: false,
|
|
359
372
|
summaryData: [],
|
|
360
373
|
// 图标样式
|
|
361
374
|
iconStyle: {
|
|
@@ -370,6 +383,7 @@ export default {
|
|
|
370
383
|
summaryDrawerVisible: false,
|
|
371
384
|
// 汇总更新标志
|
|
372
385
|
summaryUpdate: false,
|
|
386
|
+
customSummaryArray: [],
|
|
373
387
|
formItems: [],
|
|
374
388
|
// 是否为编辑模式
|
|
375
389
|
isEditMode: false,
|
|
@@ -535,15 +549,42 @@ export default {
|
|
|
535
549
|
form,
|
|
536
550
|
serviceName,
|
|
537
551
|
tableSummaryMap = {},
|
|
552
|
+
customTableSummaryArray = [
|
|
553
|
+
],
|
|
538
554
|
viewMode,
|
|
539
555
|
formItems,
|
|
540
556
|
env = 'prod',
|
|
541
557
|
createdQuery = true,
|
|
542
558
|
primaryKey,
|
|
543
559
|
allowedCardMode = false,
|
|
544
|
-
cardModeConfig
|
|
560
|
+
cardModeConfig,
|
|
561
|
+
summaryUpdate
|
|
545
562
|
} = params
|
|
546
563
|
this.showSummary = Object.keys(tableSummaryMap).length > 0
|
|
564
|
+
if (this.showSummary) {
|
|
565
|
+
Object.keys(tableSummaryMap).forEach(item => {
|
|
566
|
+
this.summaryData.push({
|
|
567
|
+
key: item,
|
|
568
|
+
title: tableSummaryMap[item],
|
|
569
|
+
value: ' ',
|
|
570
|
+
loading: true,
|
|
571
|
+
success: false
|
|
572
|
+
})
|
|
573
|
+
})
|
|
574
|
+
}
|
|
575
|
+
if (customTableSummaryArray.length > 0) {
|
|
576
|
+
customTableSummaryArray.forEach(item => {
|
|
577
|
+
this.summaryData.push({
|
|
578
|
+
key: item.key,
|
|
579
|
+
title: item.title,
|
|
580
|
+
value: ' ',
|
|
581
|
+
loading: true,
|
|
582
|
+
success: false
|
|
583
|
+
})
|
|
584
|
+
})
|
|
585
|
+
this.showCustomSummary = true
|
|
586
|
+
this.customSummaryArray = customTableSummaryArray
|
|
587
|
+
}
|
|
547
588
|
this.queryParams = queryParams
|
|
548
589
|
this.tableColumns = JSON.parse(JSON.stringify(tableColumns))
|
|
549
590
|
if (this.tableColumns.length === 0) {
|
|
@@ -562,6 +603,7 @@ export default {
|
|
|
562
603
|
this.rowKey = this.getPrimaryKeyName()
|
|
563
604
|
this.allowedCardMode = allowedCardMode
|
|
564
605
|
this.cardModeConfig = cardModeConfig
|
|
606
|
+
this.summaryUpdate = summaryUpdate
|
|
565
607
|
let totalWidth = 0
|
|
566
608
|
for (let i = 0; i < this.tableColumns.length; i++) {
|
|
567
609
|
const item = this.tableColumns[i]
|
|
@@ -979,11 +1021,49 @@ export default {
|
|
|
979
1021
|
},
|
|
980
1022
|
async retrieveSummaryData () {
|
|
981
1023
|
if (this.requestParameters.querySummary) {
|
|
982
|
-
|
|
1024
|
+
querySummary(Object.assign(this.requestParameters, { userId: this.currUser?.id }), this.serviceName, this.env === 'dev').then(res => {
|
|
1025
|
+
if (res.length > 0) {
|
|
1026
|
+
this.summaryData.forEach(item => {
|
|
1027
|
+
res.forEach(summary => {
|
|
1028
|
+
if (item.title === summary.title) {
|
|
1029
|
+
item.value = summary.value
|
|
1030
|
+
item.success = true
|
|
1031
|
+
item.loading = false
|
|
1032
|
+
}
|
|
1033
|
+
})
|
|
1034
|
+
})
|
|
1035
|
+
}
|
|
1036
|
+
})
|
|
1037
|
+
}
|
|
1038
|
+
if (this.showCustomSummary) {
|
|
1039
|
+
this.customSummaryArray.forEach(item => {
|
|
1040
|
+
runLogic(item.source, Object.assign(this.requestParameters, { userId: this.currUser?.id }), this.serviceName, this.env === 'dev').then((res) => {
|
|
1041
|
+
this.summaryData.forEach(summary => {
|
|
1042
|
+
if (item.key === summary.key) {
|
|
1043
|
+
summary.value = res.value
|
|
1044
|
+
summary.success = true
|
|
1045
|
+
summary.loading = false
|
|
1046
|
+
}
|
|
1047
|
+
})
|
|
1048
|
+
}).catch(e => {
|
|
1049
|
+
this.summaryData.forEach(summary => {
|
|
1050
|
+
if (item.key === summary.key) {
|
|
1051
|
+
summary.value = 0
|
|
1052
|
+
summary.success = false
|
|
1053
|
+
summary.loading = false
|
|
1054
|
+
}
|
|
1055
|
+
})
|
|
1056
|
+
})
|
|
1057
|
+
})
|
|
983
1058
|
}
|
|
984
1059
|
},
|
|
985
1060
|
showDrawer () {
|
|
986
1061
|
if (this.summaryUpdate) {
|
|
1062
|
+
this.summaryData.forEach(item => {
|
|
1063
|
+
item.loading = true
|
|
1064
|
+
item.success = false
|
|
1065
|
+
item.value = ' '
|
|
1066
|
+
})
|
|
987
1067
|
this.summaryDrawerVisible = true
|
|
988
1068
|
} else {
|
|
989
1069
|
this.$message.warning('请查询后再来查看')
|
|
@@ -1,92 +1,196 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<div
|
|
4
|
-
<a-space>
|
|
5
|
-
<a-
|
|
6
|
-
<a-radio-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
3
|
+
<div v-show="ready">
|
|
4
|
+
<a-row class="editor-action-container" type="flex" justify="space-between">
|
|
5
|
+
<a-col class="editor-tools">
|
|
6
|
+
<a-radio-group
|
|
7
|
+
v-show="showModeChoose"
|
|
8
|
+
button-style="solid"
|
|
9
|
+
@change="changeMode"
|
|
10
|
+
v-model="modeType">
|
|
11
|
+
<a-radio-button v-for="item of modeList" :key="item.value" :value="item.value">
|
|
12
|
+
{{ item.label }}
|
|
13
|
+
</a-radio-button>
|
|
14
|
+
</a-radio-group>
|
|
15
|
+
</a-col>
|
|
16
|
+
<a-col class="editor-action">
|
|
17
|
+
<a-space>
|
|
18
|
+
<template v-if="this.modeType !== 'readonly'">
|
|
19
|
+
<a-button type="primary" @click="save">
|
|
20
|
+
保存
|
|
21
|
+
</a-button>
|
|
22
|
+
</template>
|
|
23
|
+
<a-button type="primary" @click="print">
|
|
24
|
+
打印
|
|
25
|
+
</a-button>
|
|
26
|
+
<a-button @click="refresh">
|
|
27
|
+
刷新
|
|
28
|
+
</a-button>
|
|
29
|
+
</a-space>
|
|
30
|
+
<a-dropdown>
|
|
31
|
+
<a-menu slot="overlay" @click="handleExportMenuClick">
|
|
32
|
+
<a-menu-item key="exportPdf">导出为Pdf</a-menu-item>
|
|
33
|
+
<a-menu-item key="exportWord">导出为Word</a-menu-item>
|
|
34
|
+
<a-menu-item key="exportHtmlWithStyle">导出为Html</a-menu-item>
|
|
35
|
+
</a-menu>
|
|
36
|
+
<a-button style="margin-left: 8px"> 导出 <a-icon type="down" /> </a-button>
|
|
37
|
+
</a-dropdown>
|
|
38
|
+
</a-col>
|
|
39
|
+
</a-row>
|
|
40
|
+
<a-divider/>
|
|
41
|
+
<a-spin tip="加载中,马上好" :spinning="loading">
|
|
42
|
+
<iframe
|
|
43
|
+
id="x-editor"
|
|
44
|
+
src="/his/editor/editor.html"
|
|
45
|
+
v-bind="objectOfAttrs"
|
|
46
|
+
@load="onload"
|
|
47
|
+
style="height: calc(-200px - 3rem + 100vh);">
|
|
48
|
+
</iframe>
|
|
49
|
+
</a-spin>
|
|
50
|
+
</div>
|
|
51
|
+
<div v-show="!ready">
|
|
52
|
+
<a-empty description="请选择文书" />
|
|
19
53
|
</div>
|
|
20
|
-
<a-spin tip="加载中,马上好" :spinning="!isLoaded">
|
|
21
|
-
<iframe
|
|
22
|
-
id="x-editor"
|
|
23
|
-
src="/his/editor/editor.html"
|
|
24
|
-
v-bind="objectOfAttrs"
|
|
25
|
-
@load="onload"
|
|
26
|
-
style="height: calc(-200px - 3rem + 100vh);">
|
|
27
|
-
</iframe>
|
|
28
|
-
</a-spin>
|
|
29
54
|
</div>
|
|
30
55
|
</template>
|
|
31
56
|
|
|
32
57
|
<script>
|
|
33
58
|
|
|
59
|
+
import { runLogic } from '@vue2-client/services/api/common'
|
|
60
|
+
|
|
34
61
|
export default {
|
|
35
62
|
name: 'XHisEditor',
|
|
36
63
|
data () {
|
|
37
64
|
return {
|
|
38
|
-
|
|
39
|
-
|
|
65
|
+
ready: false,
|
|
66
|
+
loading: false,
|
|
40
67
|
objectOfAttrs: {
|
|
41
68
|
width: '100%',
|
|
42
69
|
height: '650vh',
|
|
43
|
-
frameborder: 0
|
|
44
|
-
mode: 'form'
|
|
70
|
+
frameborder: 0
|
|
45
71
|
},
|
|
72
|
+
// 数据模式
|
|
73
|
+
modeType: 'readonly',
|
|
74
|
+
// 是否显示模式切换功能
|
|
75
|
+
showModeChoose: true,
|
|
76
|
+
// 数据模式列表
|
|
77
|
+
modeList: [
|
|
78
|
+
{
|
|
79
|
+
label: '预览',
|
|
80
|
+
value: 'readonly'
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
label: '设计',
|
|
84
|
+
value: 'design'
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
// 编辑器实例
|
|
46
88
|
editorRef: null,
|
|
47
|
-
//
|
|
48
|
-
|
|
89
|
+
// 文档资源ID
|
|
90
|
+
resId: undefined,
|
|
91
|
+
// 文档链接
|
|
92
|
+
fileUrl: undefined,
|
|
93
|
+
// 文档绑定数据
|
|
94
|
+
bindObject: undefined,
|
|
95
|
+
// 数据模式 template:模板编辑;data:数据编辑
|
|
96
|
+
dataMode: undefined,
|
|
97
|
+
// 保存数据调用的Logic名称
|
|
98
|
+
saveDataLogicName: undefined,
|
|
99
|
+
// 服务名
|
|
100
|
+
serviceName: undefined
|
|
49
101
|
}
|
|
50
102
|
},
|
|
51
103
|
methods: {
|
|
104
|
+
// 初始化文档
|
|
105
|
+
onload: function (e) {
|
|
106
|
+
this.editorRef = e.target.contentWindow.editor
|
|
107
|
+
},
|
|
108
|
+
// 初始化组件
|
|
52
109
|
init (params) {
|
|
53
110
|
const {
|
|
54
|
-
fileUrl
|
|
111
|
+
fileUrl,
|
|
112
|
+
resId,
|
|
113
|
+
bindObject,
|
|
114
|
+
saveDataLogicName,
|
|
115
|
+
serviceName,
|
|
116
|
+
showModeChoose = true,
|
|
117
|
+
modeType = 'readonly'
|
|
55
118
|
} = params
|
|
56
|
-
this.
|
|
57
|
-
|
|
58
|
-
|
|
119
|
+
this.resId = resId
|
|
120
|
+
if (bindObject) {
|
|
121
|
+
this.dataMode = 'data'
|
|
122
|
+
this.bindObject = bindObject
|
|
123
|
+
} else {
|
|
124
|
+
this.dataMode = 'template'
|
|
125
|
+
}
|
|
126
|
+
this.saveDataLogicName = saveDataLogicName
|
|
127
|
+
this.serviceName = serviceName
|
|
128
|
+
this.showModeChoose = showModeChoose
|
|
129
|
+
this.modeType = modeType
|
|
130
|
+
this.ready = true
|
|
131
|
+
this.loadFile(fileUrl)
|
|
59
132
|
},
|
|
60
|
-
//
|
|
61
|
-
|
|
62
|
-
this.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
133
|
+
// 加载文档
|
|
134
|
+
loadFile (fileUrl) {
|
|
135
|
+
this.loading = true
|
|
136
|
+
this.editorRef.loadUrl(fileUrl).then(() => {
|
|
137
|
+
if (this.bindObject) {
|
|
138
|
+
this.editorRef.setBindObject(this.bindObject)
|
|
139
|
+
}
|
|
140
|
+
this.changeMode()
|
|
141
|
+
this.fileUrl = fileUrl
|
|
142
|
+
this.loading = false
|
|
143
|
+
})
|
|
71
144
|
},
|
|
145
|
+
// 修改模式
|
|
72
146
|
changeMode (e) {
|
|
73
|
-
this.
|
|
74
|
-
this.isModeSettingLoading = true
|
|
75
|
-
this.isLoaded = false
|
|
76
|
-
this.refreshFrame()
|
|
77
|
-
},
|
|
78
|
-
refreshFrame () {
|
|
79
|
-
const iframe = document.getElementById('x-editor')
|
|
80
|
-
iframe.contentWindow.location.reload()
|
|
147
|
+
this.editorRef.execCommand(this.modeType)
|
|
81
148
|
},
|
|
149
|
+
// 保存文档
|
|
82
150
|
save () {
|
|
83
|
-
//
|
|
151
|
+
// 验证必须输入项
|
|
152
|
+
if (this.editorRef.validate()) {
|
|
153
|
+
// 获取HTML文档和结构化数据(JSON)
|
|
154
|
+
const data = {
|
|
155
|
+
doc: this.editorRef.getHtml(),
|
|
156
|
+
dataObject: this.editorRef.getBindObject(),
|
|
157
|
+
dataMode: this.dataMode,
|
|
158
|
+
resId: this.resId
|
|
159
|
+
}
|
|
160
|
+
// 保存HTML文档和结构化数据到后端服务
|
|
161
|
+
runLogic(this.saveDataLogicName, data, this.serviceName).then(res => {
|
|
162
|
+
this.loadFile(res.url)
|
|
163
|
+
this.$message.success('保存成功')
|
|
164
|
+
})
|
|
165
|
+
} else {
|
|
166
|
+
this.$message.error('请检查未填写的项目')
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
// 打印文档
|
|
170
|
+
print () {
|
|
171
|
+
this.editorRef.execCommand('print')
|
|
172
|
+
},
|
|
173
|
+
// 关闭编辑器
|
|
174
|
+
close () {
|
|
175
|
+
this.ready = false
|
|
176
|
+
},
|
|
177
|
+
// 刷新文档
|
|
178
|
+
refresh () {
|
|
179
|
+
this.loadFile(this.fileUrl)
|
|
180
|
+
},
|
|
181
|
+
// 导出下拉菜单
|
|
182
|
+
handleExportMenuClick (e) {
|
|
183
|
+
const key = e.key
|
|
184
|
+
this.editorRef.execCommand(key)
|
|
84
185
|
}
|
|
85
186
|
}
|
|
86
187
|
}
|
|
87
188
|
</script>
|
|
88
189
|
<style scoped lang="less">
|
|
89
|
-
.editor-
|
|
190
|
+
.editor-action-container {
|
|
90
191
|
height: 40px;
|
|
91
192
|
}
|
|
193
|
+
:deep(.ant-divider-horizontal) {
|
|
194
|
+
margin: 4px 0;
|
|
195
|
+
}
|
|
92
196
|
</style>
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<a-list v-show="!loading" size="small" :data-source="data">
|
|
4
|
-
<a-list-item slot="renderItem" slot-scope="item">
|
|
5
|
-
<div>
|
|
6
|
-
<p><a @click="$emit('openFavorites', item.uuid)">{{ item.question }} </a></p>
|
|
7
|
-
<p>{{ item.date }}</p>
|
|
8
|
-
</div>
|
|
9
|
-
<a class="delete_item">
|
|
10
|
-
<a-icon type="close" @click="$emit('saveToFavorites', item.uuid)"/>
|
|
11
|
-
</a>
|
|
12
|
-
</a-list-item>
|
|
13
|
-
</a-list>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script>
|
|
18
|
-
import { indexedDB } from '@vue2-client/utils/indexedDB'
|
|
19
|
-
|
|
20
|
-
export default {
|
|
21
|
-
name: 'FavoriteList',
|
|
22
|
-
data () {
|
|
23
|
-
return {
|
|
24
|
-
data: [],
|
|
25
|
-
loading: false
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
mounted () {
|
|
29
|
-
this.loadData()
|
|
30
|
-
},
|
|
31
|
-
methods: {
|
|
32
|
-
loadData () {
|
|
33
|
-
console.warn(123)
|
|
34
|
-
indexedDB.getAll((data) => {
|
|
35
|
-
const realData = data.filter(item => item.data && item.data.uuid)
|
|
36
|
-
.map(item => item.data)
|
|
37
|
-
this.data = realData
|
|
38
|
-
})
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
</script>
|
|
43
|
-
<style lang="less" scoped>
|
|
44
|
-
.delete_item {
|
|
45
|
-
margin-left: 8px;
|
|
46
|
-
color: #333;
|
|
47
|
-
}
|
|
48
|
-
p {
|
|
49
|
-
margin: 0
|
|
50
|
-
}
|
|
51
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<a-list v-show="!loading" size="small" :data-source="data">
|
|
4
|
+
<a-list-item slot="renderItem" slot-scope="item">
|
|
5
|
+
<div>
|
|
6
|
+
<p><a @click="$emit('openFavorites', item.uuid)">{{ item.question }} </a></p>
|
|
7
|
+
<p>{{ item.date }}</p>
|
|
8
|
+
</div>
|
|
9
|
+
<a class="delete_item">
|
|
10
|
+
<a-icon type="close" @click="$emit('saveToFavorites', item.uuid)"/>
|
|
11
|
+
</a>
|
|
12
|
+
</a-list-item>
|
|
13
|
+
</a-list>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import { indexedDB } from '@vue2-client/utils/indexedDB'
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
name: 'FavoriteList',
|
|
22
|
+
data () {
|
|
23
|
+
return {
|
|
24
|
+
data: [],
|
|
25
|
+
loading: false
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
mounted () {
|
|
29
|
+
this.loadData()
|
|
30
|
+
},
|
|
31
|
+
methods: {
|
|
32
|
+
loadData () {
|
|
33
|
+
console.warn(123)
|
|
34
|
+
indexedDB.getAll((data) => {
|
|
35
|
+
const realData = data.filter(item => item.data && item.data.uuid)
|
|
36
|
+
.map(item => item.data)
|
|
37
|
+
this.data = realData
|
|
38
|
+
})
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
<style lang="less" scoped>
|
|
44
|
+
.delete_item {
|
|
45
|
+
margin-left: 8px;
|
|
46
|
+
color: #333;
|
|
47
|
+
}
|
|
48
|
+
p {
|
|
49
|
+
margin: 0
|
|
50
|
+
}
|
|
51
|
+
</style>
|
|
@@ -8,12 +8,23 @@ export default {
|
|
|
8
8
|
this.$refs.workFlow.init({
|
|
9
9
|
workflowId: '9'
|
|
10
10
|
})
|
|
11
|
+
},
|
|
12
|
+
methods: {
|
|
13
|
+
/**
|
|
14
|
+
* 流程详情页成功
|
|
15
|
+
* @param note 备注信息
|
|
16
|
+
* @param form 表单信息
|
|
17
|
+
* @param workflowId
|
|
18
|
+
*/
|
|
19
|
+
success ({ note, form, workflowId }) {
|
|
20
|
+
console.log('success', note, form, workflowId)
|
|
21
|
+
}
|
|
11
22
|
}
|
|
12
23
|
}
|
|
13
24
|
</script>
|
|
14
25
|
|
|
15
26
|
<template>
|
|
16
|
-
<WorkflowDetail ref="workFlow"></WorkflowDetail>
|
|
27
|
+
<WorkflowDetail ref="workFlow" @success="success"></WorkflowDetail>
|
|
17
28
|
</template>
|
|
18
29
|
|
|
19
30
|
<style scoped lang="less">
|
|
@@ -39,12 +39,15 @@
|
|
|
39
39
|
/>
|
|
40
40
|
</a-tab-pane>
|
|
41
41
|
<a-tab-pane key="2" tab="任务流转记录">
|
|
42
|
-
<workflow-log v-if="activeKey === '2'" :workflow-id="workflowId"
|
|
42
|
+
<workflow-log v-if="activeKey === '2'" :workflow-id="workflowId"/>
|
|
43
43
|
</a-tab-pane>
|
|
44
44
|
<a-tab-pane key="4">
|
|
45
45
|
<span slot="tab">
|
|
46
46
|
<span>任务留言</span>
|
|
47
|
-
<a-badge
|
|
47
|
+
<a-badge
|
|
48
|
+
:count="messageList.length"
|
|
49
|
+
:offset="[4, -4]"
|
|
50
|
+
:number-style="{ backgroundColor: '#b2b2b2' }"></a-badge>
|
|
48
51
|
</span>
|
|
49
52
|
<a-row>
|
|
50
53
|
<a-col :span="14">
|
|
@@ -117,8 +120,7 @@ export default {
|
|
|
117
120
|
...mapState('account', { currUser: 'user' }),
|
|
118
121
|
...mapState('setting', ['isMobile'])
|
|
119
122
|
},
|
|
120
|
-
props: {
|
|
121
|
-
},
|
|
123
|
+
props: {},
|
|
122
124
|
mounted () {
|
|
123
125
|
// this.init()
|
|
124
126
|
},
|
|
@@ -188,8 +190,9 @@ export default {
|
|
|
188
190
|
this.activeKey = id
|
|
189
191
|
},
|
|
190
192
|
// 提交完成后事件
|
|
191
|
-
success () {
|
|
192
|
-
this
|
|
193
|
+
success (res) {
|
|
194
|
+
this.visible = false
|
|
195
|
+
this.$emit('success', res)
|
|
193
196
|
}
|
|
194
197
|
}
|
|
195
198
|
}
|
|
@@ -418,29 +418,23 @@ export default {
|
|
|
418
418
|
},
|
|
419
419
|
// 完工按钮
|
|
420
420
|
async lastStepNextClick () {
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
} else {
|
|
425
|
-
return postByServiceName(workFlowViewApi.afterWorkFlowFinalStepSubmit, {
|
|
421
|
+
this.$refs.xAddForm.asyncSubmit().then((res) => {
|
|
422
|
+
this.submitForm(res)
|
|
423
|
+
postByServiceName(workFlowViewApi.afterWorkFlowFinalStepSubmit, {
|
|
426
424
|
workflowId: this.workflowId
|
|
427
|
-
})
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
this.$message.error('提交失败!')
|
|
441
|
-
}
|
|
442
|
-
)
|
|
443
|
-
}
|
|
425
|
+
}).then(_res => {
|
|
426
|
+
this.saveWorkflowLog('确认完工', '最后一步: ' + this.getStepNameByStepId(this.currentStepId), { notes: this.note.trim() })
|
|
427
|
+
this.$message.success('已完工!')
|
|
428
|
+
this.loading = true
|
|
429
|
+
this.loadingHistory = true
|
|
430
|
+
this.onClose()
|
|
431
|
+
this.$emit('success', { note: this.note.trim(), form: res.realForm, workflowId: this.workflowId })
|
|
432
|
+
},
|
|
433
|
+
() => {
|
|
434
|
+
this.$message.error('提交失败!')
|
|
435
|
+
}
|
|
436
|
+
)
|
|
437
|
+
})
|
|
444
438
|
},
|
|
445
439
|
// 三个按钮点击后逻辑
|
|
446
440
|
async nextClick () {
|
|
@@ -458,11 +452,9 @@ export default {
|
|
|
458
452
|
}
|
|
459
453
|
})
|
|
460
454
|
})
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
} else {
|
|
465
|
-
return postByServiceName(workFlowViewApi.submitToNextStep, extraData)
|
|
455
|
+
this.$refs.xAddForm.asyncSubmit().then(res => {
|
|
456
|
+
this.submitForm(res)
|
|
457
|
+
postByServiceName(workFlowViewApi.submitToNextStep, extraData)
|
|
466
458
|
.then(
|
|
467
459
|
res => {
|
|
468
460
|
const extra = {
|
|
@@ -483,7 +475,7 @@ export default {
|
|
|
483
475
|
console.log(err)
|
|
484
476
|
}
|
|
485
477
|
)
|
|
486
|
-
}
|
|
478
|
+
})
|
|
487
479
|
},
|
|
488
480
|
async preClick () {
|
|
489
481
|
const notes = this.note.trim()
|
|
@@ -516,11 +508,9 @@ export default {
|
|
|
516
508
|
if (!extraData) {
|
|
517
509
|
return
|
|
518
510
|
}
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
} else {
|
|
523
|
-
return postByServiceName(workFlowViewApi.submitToNextStep, extraData)
|
|
511
|
+
this.$refs.xAddForm.asyncSubmit().then(res => {
|
|
512
|
+
this.submitForm(res)
|
|
513
|
+
postByServiceName(workFlowViewApi.submitToNextStep, extraData)
|
|
524
514
|
.then(
|
|
525
515
|
res => {
|
|
526
516
|
const extra = {
|
|
@@ -541,7 +531,7 @@ export default {
|
|
|
541
531
|
console.log(err)
|
|
542
532
|
}
|
|
543
533
|
)
|
|
544
|
-
}
|
|
534
|
+
})
|
|
545
535
|
},
|
|
546
536
|
// 获取当前步骤节点,连通的节点
|
|
547
537
|
getDirection () {
|
|
@@ -83,8 +83,8 @@ routerResource.example = {
|
|
|
83
83
|
{
|
|
84
84
|
path: 'default',
|
|
85
85
|
name: '示例页面',
|
|
86
|
-
component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
|
|
87
|
-
|
|
86
|
+
// component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
|
|
87
|
+
component: () => import('@vue2-client/base-client/components/common/XReportGrid/XReportDemo.vue'),
|
|
88
88
|
// component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
|
|
89
89
|
meta: {
|
|
90
90
|
// 菜单中不显示
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { post } from '@vue2-client/services/api/restTools'
|
|
2
|
-
|
|
3
|
-
const entityApi = {
|
|
4
|
-
// 根据ID查询数据
|
|
5
|
-
getById: (entityName, id, data = {}, serviceName = process.env.VUE_APP_SYSTEM_NAME) => {
|
|
6
|
-
return post(`/api/${serviceName}/entity/query/${entityName}/${id}`, data)
|
|
7
|
-
},
|
|
8
|
-
// 根据ID集合查询所有数据
|
|
9
|
-
findAllByIds: (entityName, data, serviceName = process.env.VUE_APP_SYSTEM_NAME) => {
|
|
10
|
-
return post(`/api/${serviceName}/entity/query/${entityName}`, data)
|
|
11
|
-
},
|
|
12
|
-
// 查询实体的总数量
|
|
13
|
-
getCount: (entityName, serviceName = process.env.VUE_APP_SYSTEM_NAME) => {
|
|
14
|
-
return post(`/api/${serviceName}/entity/queryCount/${entityName}`, {})
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { entityApi }
|
|
1
|
+
import { post } from '@vue2-client/services/api/restTools'
|
|
2
|
+
|
|
3
|
+
const entityApi = {
|
|
4
|
+
// 根据ID查询数据
|
|
5
|
+
getById: (entityName, id, data = {}, serviceName = process.env.VUE_APP_SYSTEM_NAME) => {
|
|
6
|
+
return post(`/api/${serviceName}/entity/query/${entityName}/${id}`, data)
|
|
7
|
+
},
|
|
8
|
+
// 根据ID集合查询所有数据
|
|
9
|
+
findAllByIds: (entityName, data, serviceName = process.env.VUE_APP_SYSTEM_NAME) => {
|
|
10
|
+
return post(`/api/${serviceName}/entity/query/${entityName}`, data)
|
|
11
|
+
},
|
|
12
|
+
// 查询实体的总数量
|
|
13
|
+
getCount: (entityName, serviceName = process.env.VUE_APP_SYSTEM_NAME) => {
|
|
14
|
+
return post(`/api/${serviceName}/entity/queryCount/${entityName}`, {})
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { entityApi }
|
package/src/utils/waterMark.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description: createWaterMark.js 加水印功能
|
|
3
|
-
*/
|
|
4
|
-
let waterMarkDOM
|
|
5
|
-
|
|
6
|
-
const clearWaterMark = () => {
|
|
7
|
-
if (waterMarkDOM) waterMarkDOM.remove()
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* @description: 创建水印
|
|
11
|
-
* @param waterMarkName 水印内容
|
|
12
|
-
*/
|
|
13
|
-
export default function createWaterMark (waterMarkName) {
|
|
14
|
-
clearWaterMark()
|
|
15
|
-
if (!waterMarkName) {
|
|
16
|
-
return
|
|
17
|
-
}
|
|
18
|
-
const width = window.parseInt(document.body.clientWidth)
|
|
19
|
-
const canvasWidth = width / window.parseInt(width / 320)
|
|
20
|
-
const fontFamily = window.getComputedStyle(document.body)['font-family']
|
|
21
|
-
const fragment = document.createDocumentFragment()
|
|
22
|
-
waterMarkDOM = document.createElement('div')
|
|
23
|
-
waterMarkDOM.className = 'water-mark-wrap'
|
|
24
|
-
let spanStr = ''
|
|
25
|
-
for (let i = 0; i < 100; i++) {
|
|
26
|
-
spanStr += `<span class="water-word" style=width:${canvasWidth}px;height:200px;font: ${fontFamily}>${waterMarkName}</span>`
|
|
27
|
-
}
|
|
28
|
-
waterMarkDOM.innerHTML = spanStr
|
|
29
|
-
fragment.appendChild(waterMarkDOM)
|
|
30
|
-
document.body.appendChild(fragment)
|
|
31
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @description: createWaterMark.js 加水印功能
|
|
3
|
+
*/
|
|
4
|
+
let waterMarkDOM
|
|
5
|
+
|
|
6
|
+
const clearWaterMark = () => {
|
|
7
|
+
if (waterMarkDOM) waterMarkDOM.remove()
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @description: 创建水印
|
|
11
|
+
* @param waterMarkName 水印内容
|
|
12
|
+
*/
|
|
13
|
+
export default function createWaterMark (waterMarkName) {
|
|
14
|
+
clearWaterMark()
|
|
15
|
+
if (!waterMarkName) {
|
|
16
|
+
return
|
|
17
|
+
}
|
|
18
|
+
const width = window.parseInt(document.body.clientWidth)
|
|
19
|
+
const canvasWidth = width / window.parseInt(width / 320)
|
|
20
|
+
const fontFamily = window.getComputedStyle(document.body)['font-family']
|
|
21
|
+
const fragment = document.createDocumentFragment()
|
|
22
|
+
waterMarkDOM = document.createElement('div')
|
|
23
|
+
waterMarkDOM.className = 'water-mark-wrap'
|
|
24
|
+
let spanStr = ''
|
|
25
|
+
for (let i = 0; i < 100; i++) {
|
|
26
|
+
spanStr += `<span class="water-word" style=width:${canvasWidth}px;height:200px;font: ${fontFamily}>${waterMarkName}</span>`
|
|
27
|
+
}
|
|
28
|
+
waterMarkDOM.innerHTML = spanStr
|
|
29
|
+
fragment.appendChild(waterMarkDOM)
|
|
30
|
+
document.body.appendChild(fragment)
|
|
31
|
+
}
|
package/vue.config.js
CHANGED
|
@@ -11,11 +11,11 @@ const productionGzipExtensions = ['js', 'css']
|
|
|
11
11
|
const isProd = process.env.NODE_ENV === 'production'
|
|
12
12
|
|
|
13
13
|
// v4 产品演示
|
|
14
|
-
const v3Server = 'http://
|
|
14
|
+
const v3Server = 'http://aote-office.8866.org:31567'
|
|
15
15
|
const gateway = 'http://192.168.50.67:31467'
|
|
16
16
|
const testUpload = 'http://123.60.214.109:8406'
|
|
17
17
|
const OSSServerDev = 'http://192.168.50.67:30351'
|
|
18
|
-
const revenue = 'http://
|
|
18
|
+
const revenue = 'http://aote-office.8866.org:31567'
|
|
19
19
|
// const OSSServerProd = 'http://192.168.50.67:31351'
|
|
20
20
|
// const testUploadLocal = 'http://127.0.0.1:9001'
|
|
21
21
|
// v3 铜川
|