vue2-client 1.12.2 → 1.12.3-9.alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/.env.iot +19 -0
  2. package/babel.config.js +4 -1
  3. package/docs//345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +175 -174
  4. package/package.json +2 -2
  5. package/src/base-client/components/common/XCardSet/XCardSet.vue +300 -0
  6. package/src/base-client/components/common/XCollapse/XCollapse.vue +154 -0
  7. package/src/base-client/components/common/XConversation/XConversation.vue +87 -2
  8. package/src/base-client/components/common/XConversation/XConversationDemo.vue +28 -28
  9. package/src/base-client/components/common/XDataCard/XDataCard.vue +47 -21
  10. package/src/base-client/components/common/XDatePicker/index.vue +13 -3
  11. package/src/base-client/components/common/XForm/XForm.vue +1 -1
  12. package/src/base-client/components/common/XForm/XFormItem.vue +17 -7
  13. package/src/base-client/components/common/XForm/XTreeSelect.vue +263 -264
  14. package/src/base-client/components/common/XForm/demo.vue +105 -0
  15. package/src/base-client/components/common/XFormTable/demo.vue +11 -3
  16. package/src/base-client/components/common/XPrint/Demo.vue +41 -41
  17. package/src/base-client/components/common/XRate/demo.vue +102 -0
  18. package/src/base-client/components/common/XRate/index.vue +136 -0
  19. package/src/base-client/components/common/XReportGrid/XReport.vue +240 -305
  20. package/src/base-client/components/common/XReportGrid/XReportDemo.vue +0 -2
  21. package/src/base-client/components/common/XReportGrid/XReportDesign.vue +115 -345
  22. package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +100 -723
  23. package/src/base-client/components/common/XTable/XTable.vue +3 -0
  24. package/src/base-client/components/common/XTable/XTableWrapper.vue +7 -3
  25. package/src/base-client/components/his/XHDescriptions/XHDescriptions.vue +172 -0
  26. package/src/base-client/components/his/XHisEditor/XHisEditor.vue +360 -359
  27. package/src/layouts/GridView.vue +43 -45
  28. package/src/logic/plugins/common/DateTools.js +3 -0
  29. package/src/logic/plugins/common/VueTools.js +30 -0
  30. package/src/logic/plugins/index.js +3 -1
  31. package/src/pages/LogicCallExample/index.vue +10 -0
  32. package/src/pages/WorkflowDetail/WorkFlowDemo.vue +47 -32
  33. package/src/pages/WorkflowDetail/WorkflowDetail.vue +5 -0
  34. package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowHandle.vue +876 -864
  35. package/src/pages/userInfoDetailManage/index.vue +82 -82
  36. package/src/plugins/HiPrintPlugin.js +164 -124
  37. package/src/router/async/router.map.js +3 -2
  38. package/src/services/v3Api.js +116 -116
  39. package/src/utils/EncryptUtil.js +6 -7
  40. package/src/utils/indexedDB.js +3 -1
  41. package/src/utils/request.js +4 -8
  42. package/src/utils/routerUtil.js +17 -0
  43. package/.babelrc +0 -3
  44. package/src/base-client/components/common/XReportGrid/XReportJsonRender.vue +0 -380
@@ -1,82 +1,82 @@
1
- <template>
2
- <a-drawer
3
- id="agencyManageDetail"
4
- title="用户详情信息"
5
- placement="right"
6
- :body-style="{padding:0}"
7
- :destroy-on-close="true"
8
- :z-index="200"
9
- width="85vw"
10
- :closable="false"
11
- :visible="userInfoDetailVisible"
12
- @close="onClose">
13
- <a-page-header v-if="userInfoDetailVisible && userInfo" :title="`用户编号:${ userInfo ? userInfo.f_userinfo_code : '' }`">
14
- <x-descriptions
15
- :title="null"
16
- :content="userInfo"
17
- serviceName="af-revenue"
18
- :getRealData="true"
19
- :column="4"
20
- config-name="User_Info_Desc_Config">
21
- <template #addonAfter>
22
- <div style="text-align: right">
23
- <a-statistic title="用户状态" :value="userInfo.f_user_state || 0"/>
24
- <a-statistic title="表具状态" :precision="0" :value="userInfo.f_table_state || 0"/>
25
- </div>
26
- </template>
27
- </x-descriptions>
28
- <user-info-detail-query-tabs :userInfo="userInfo"/>
29
- <template #extra>
30
- <a-button type="dashed" @click="refresh">刷新</a-button>
31
- </template>
32
- </a-page-header>
33
- </a-drawer>
34
- </template>
35
-
36
- <script>
37
- import XDescriptions from '@vue2-client/base-client/components/common/XDescriptions/XDescriptions.vue'
38
- import { mapState } from 'vuex'
39
- import { runLogic } from '@vue2-client/services/api/common'
40
- import userInfoDetailQueryTabs from '@vue2-client/pages/userInfoDetailManage/userInfoDetailQueryTabs'
41
-
42
- export default {
43
- name: 'UserInfoDetailManage',
44
- components: {
45
- XDescriptions,
46
- userInfoDetailQueryTabs
47
- },
48
- data () {
49
- return {
50
- userInfo: undefined,
51
- userInfoDetailVisible: false
52
- }
53
- },
54
- methods: {
55
- refresh () {
56
- return runLogic('getUserInfoDetailV4', this.userInfo, 'af-revenue').then(res => {
57
- this.userInfo = res
58
- })
59
- },
60
- init (user) {
61
- this.userInfo = user
62
- this.userInfoDetailVisible = true
63
- this.refresh()
64
- },
65
- onClose () {
66
- this.userInfoDetailVisible = false
67
- this.$emit('close')
68
- }
69
- },
70
- created () {
71
- },
72
- mounted () {},
73
- computed: {
74
- ...mapState('account', { currUser: 'user' }),
75
- ...mapState('setting', { isMobile: 'isMobile' })
76
- }
77
- }
78
- </script>
79
-
80
- <style scoped>
81
-
82
- </style>
1
+ <template>
2
+ <a-drawer
3
+ id="agencyManageDetail"
4
+ title="用户详情信息"
5
+ placement="right"
6
+ :body-style="{padding:0}"
7
+ :destroy-on-close="true"
8
+ :z-index="200"
9
+ width="85vw"
10
+ :closable="false"
11
+ :visible="userInfoDetailVisible"
12
+ @close="onClose">
13
+ <a-page-header v-if="userInfoDetailVisible && userInfo" :title="`用户编号:${ userInfo ? userInfo.f_userinfo_code : '' }`">
14
+ <x-descriptions
15
+ :title="null"
16
+ :content="userInfo"
17
+ serviceName="af-revenue"
18
+ :getRealData="true"
19
+ :column="4"
20
+ config-name="User_Info_Desc_Config">
21
+ <template #addonAfter>
22
+ <div style="text-align: right">
23
+ <a-statistic title="用户状态" :value="userInfo.f_user_state || 0"/>
24
+ <a-statistic title="表具状态" :precision="0" :value="userInfo.f_table_state || 0"/>
25
+ </div>
26
+ </template>
27
+ </x-descriptions>
28
+ <user-info-detail-query-tabs :userInfo="userInfo"/>
29
+ <template #extra>
30
+ <a-button type="dashed" @click="refresh">刷新</a-button>
31
+ </template>
32
+ </a-page-header>
33
+ </a-drawer>
34
+ </template>
35
+
36
+ <script>
37
+ import XDescriptions from '@vue2-client/base-client/components/common/XDescriptions/XDescriptions.vue'
38
+ import { mapState } from 'vuex'
39
+ import { runLogic } from '@vue2-client/services/api/common'
40
+ import userInfoDetailQueryTabs from '@vue2-client/pages/userInfoDetailManage/userInfoDetailQueryTabs'
41
+
42
+ export default {
43
+ name: 'UserInfoDetailManage',
44
+ components: {
45
+ XDescriptions,
46
+ userInfoDetailQueryTabs
47
+ },
48
+ data () {
49
+ return {
50
+ userInfo: undefined,
51
+ userInfoDetailVisible: false
52
+ }
53
+ },
54
+ methods: {
55
+ refresh () {
56
+ return runLogic('getUserInfoDetailV4', this.userInfo, 'af-revenue').then(res => {
57
+ this.userInfo = res
58
+ })
59
+ },
60
+ async init (user) {
61
+ this.userInfo = user
62
+ await this.refresh()
63
+ this.userInfoDetailVisible = true
64
+ },
65
+ onClose () {
66
+ this.userInfoDetailVisible = false
67
+ this.$emit('close')
68
+ }
69
+ },
70
+ created () {
71
+ },
72
+ mounted () {},
73
+ computed: {
74
+ ...mapState('account', { currUser: 'user' }),
75
+ ...mapState('setting', { isMobile: 'isMobile' })
76
+ }
77
+ }
78
+ </script>
79
+
80
+ <style scoped>
81
+
82
+ </style>
@@ -1,124 +1,164 @@
1
- import {
2
- autoConnect,
3
- disAutoConnect,
4
- hiprint,
5
- defaultElementTypeProvider,
6
- } from '@afwenming123/vue-plugin-hiprint'
7
- import { getConfigByNameAsync } from '@vue2-client/services/api/common'
8
- import hiPrintCss from '@vue2-client/base-client/components/common/XPrint/css/hiPrintCss'
9
-
10
- const hiPrintPlugin = {
11
- disAutoConnect,
12
- install: function (Vue, autoConnect = true, name = '$hiPrint') {
13
- if (!autoConnect) {
14
- disAutoConnect()
15
- }
16
- const globalVue = Vue.prototype || Vue.config.globalProperties
17
- globalVue[name] = hiprint
18
- /**
19
- * 预览打印,调起系统打印预览
20
- * provider 左侧拖拽元素
21
- * template 模版json字符串
22
- * args 打印数据data, options,
23
- */
24
- globalVue.$print = function (provider = defaultElementTypeProvider, template, ...args) {
25
- hiprint.init({
26
- // eslint-disable-next-line new-cap
27
- providers: [new provider()]
28
- })
29
- const hiprintTemplate = new hiprint.PrintTemplate({
30
- template: template,
31
- })
32
- hiprintTemplate.print(...args)
33
- return hiprintTemplate
34
- }
35
- /**
36
- * 单模版直接打印, 需客户端支持
37
- * provider 左侧拖拽项对象
38
- * template 模版json字符串
39
- * args 打印数据data, options,
40
- */
41
- globalVue.$print2 = function (provider = defaultElementTypeProvider, template, ...args) {
42
- hiprint.init({
43
- // eslint-disable-next-line new-cap
44
- providers: [new provider()]
45
- })
46
- const hiprintTemplate = new hiprint.PrintTemplate({
47
- template: template,
48
- })
49
- hiprintTemplate.print2(...args)
50
- return hiprintTemplate
51
- }
52
- /**
53
- * 通用打印方法
54
- * @param {string} templateName 模板名称
55
- * @param {object} printData 打印数据
56
- * @param {boolean} isClient 是否客户端打印
57
- */
58
- const _commonPrint = async function (templateName, printData, isClient = false) {
59
- return new Promise((resolve, reject) => {
60
- try {
61
- getConfigByNameAsync(templateName).then((template) => {
62
- if (!template) {
63
- this.$message.error(`${templateName} 打印模板不存在`)
64
- reject(new Error(`${templateName} 打印模板不存在`))
65
- return
66
- }
67
- hiprint.init({
68
- // eslint-disable-next-line new-cap
69
- providers: [new defaultElementTypeProvider()]
70
- })
71
- const hiprintTemplate = new hiprint.PrintTemplate({
72
- template: template,
73
- })
74
- const printMethod = isClient ? 'print2' : 'print'
75
- if (isClient) {
76
- console.log(hiprintTemplate.getPrinterList())
77
- }
78
- hiprintTemplate[printMethod](printData, {}, {
79
- callback: () => {
80
- resolve(hiprintTemplate)
81
- },
82
- styleHandler: () => {
83
- return hiPrintCss()
84
- }
85
- })
86
- }).catch((error) => {
87
- reject(error)
88
- })
89
- } catch (error) {
90
- reject(error)
91
- }
92
- })
93
- }
94
-
95
- /**
96
- * 浏览器打印
97
- */
98
- globalVue.$printB = async function (templateName, printData) {
99
- return _commonPrint(templateName, printData, false)
100
- }
101
-
102
- /**
103
- * 客户端打印
104
- */
105
- globalVue.$printC = async function (templateName, printData) {
106
- if (window.hiwebSocket.opened) {
107
- return _commonPrint(templateName, printData, true)
108
- } else {
109
- this.$message.error('请确保打印服务已经启动')
110
- return Promise.reject(new Error('客户端打印失败,未连接打印服务'))
111
- }
112
- }
113
- }
114
- }
115
-
116
- window.hiprint = hiprint
117
-
118
- export {
119
- autoConnect,
120
- disAutoConnect,
121
- hiprint,
122
- hiPrintPlugin,
123
- defaultElementTypeProvider,
124
- }
1
+ import {
2
+ autoConnect,
3
+ disAutoConnect,
4
+ hiprint,
5
+ defaultElementTypeProvider,
6
+ } from '@afwenming123/vue-plugin-hiprint'
7
+ import { getConfigByNameAsync, runLogic } from '@vue2-client/services/api/common'
8
+ import hiPrintCss from '@vue2-client/base-client/components/common/XPrint/css/hiPrintCss'
9
+ import { uuid } from '@vue2-client/utils/util'
10
+
11
+ const hiPrintPlugin = {
12
+ disAutoConnect,
13
+ install: function (Vue, autoConnect = true, name = '$hiPrint') {
14
+ if (!autoConnect) {
15
+ disAutoConnect()
16
+ }
17
+ const globalVue = Vue.prototype || Vue.config.globalProperties
18
+ globalVue[name] = hiprint
19
+ /**
20
+ * 预览打印,调起系统打印预览
21
+ * provider 左侧拖拽元素
22
+ * template 模版json字符串
23
+ * args 打印数据data, options,
24
+ */
25
+ globalVue.$print = function (provider = defaultElementTypeProvider, template, ...args) {
26
+ hiprint.init({
27
+ // eslint-disable-next-line new-cap
28
+ providers: [new provider()]
29
+ })
30
+ const hiprintTemplate = new hiprint.PrintTemplate({
31
+ template: template,
32
+ })
33
+ hiprintTemplate.print(...args)
34
+ return hiprintTemplate
35
+ }
36
+ /**
37
+ * 单模版直接打印, 需客户端支持
38
+ * provider 左侧拖拽项对象
39
+ * template 模版json字符串
40
+ * args 打印数据data, options,
41
+ */
42
+ globalVue.$print2 = function (provider = defaultElementTypeProvider, template, ...args) {
43
+ hiprint.init({
44
+ // eslint-disable-next-line new-cap
45
+ providers: [new provider()]
46
+ })
47
+ const hiprintTemplate = new hiprint.PrintTemplate({
48
+ template: template,
49
+ })
50
+ hiprintTemplate.print2(...args)
51
+ return hiprintTemplate
52
+ }
53
+ /**
54
+ * 通用打印方法
55
+ * @param {string} templateName 模板名称
56
+ * @param {object} printData 打印数据
57
+ * @param {string} type 打印类型
58
+ */
59
+ const _commonPrint = async function (templateName, printData, type = 'B', customOption = {}) {
60
+ return new Promise((resolve, reject) => {
61
+ try {
62
+ getConfigByNameAsync(templateName).then(async (template) => {
63
+ if (!template) {
64
+ this.$message.error(`${templateName} 打印模板不存在`)
65
+ reject(new Error(`${templateName} 打印模板不存在`))
66
+ return
67
+ }
68
+ if (template.dataLogicName) {
69
+ const remoteData = await runLogic(template.dataLogicName, printData).catch(() => {
70
+ this.$message.error(`${template.dataLogicName} 打印数据逻辑获取失败`)
71
+ return {}
72
+ })
73
+ printData = Object.assign({}, printData, remoteData)
74
+ }
75
+ console.log('打印数据', printData)
76
+ const printConfig = {
77
+ callback: () => resolve(hiprintTemplate),
78
+ styleHandler: () => hiPrintCss(),
79
+ title: '打印测试',
80
+ pageSize: {
81
+ height: template.panels[0].height * 1000,
82
+ width: template.panels[0].width * 1000
83
+ },
84
+ ...customOption
85
+ }
86
+ hiprint.init({
87
+ // eslint-disable-next-line new-cap
88
+ providers: [new defaultElementTypeProvider()]
89
+ })
90
+ const hiprintTemplate = new hiprint.PrintTemplate({
91
+ template: template,
92
+ })
93
+ if (type === 'H') {
94
+ resolve(hiprintTemplate.getHtml(printData).html())
95
+ } else if (type === 'C') {
96
+ hiprintTemplate.print2(printData, printConfig)
97
+ } else {
98
+ hiprintTemplate.print(printData, {}, printConfig)
99
+ }
100
+ }).catch((error) => {
101
+ reject(error)
102
+ })
103
+ } catch (error) {
104
+ reject(error)
105
+ }
106
+ })
107
+ }
108
+
109
+ /**
110
+ * 浏览器打印
111
+ */
112
+ globalVue.$printB = async function (templateName, printData, customOption) {
113
+ return _commonPrint(templateName, printData, 'B', customOption)
114
+ }
115
+
116
+ /**
117
+ * 客户端打印
118
+ */
119
+ globalVue.$printC = async function (templateName, printData, customOption) {
120
+ if (window.hiwebSocket.opened) {
121
+ return _commonPrint(templateName, printData, 'C', customOption)
122
+ } else {
123
+ this.$message.error('请确保打印服务已经启动')
124
+ return Promise.reject(new Error('客户端打印失败,未连接打印服务'))
125
+ }
126
+ }
127
+
128
+ /**
129
+ * 返回打印模板生成的 html
130
+ */
131
+ globalVue.$getHtml = async function (templateName, printData, customOption) {
132
+ return _commonPrint(templateName, printData, 'H', customOption)
133
+ }
134
+
135
+ /**
136
+ * 打印html
137
+ */
138
+ globalVue.$printHtml = async function (html, customOption = {}) {
139
+ if (window.hiwebSocket.opened) {
140
+ return window.hiwebSocket.send({
141
+ title: '打印内容',
142
+ html,
143
+ imgToBase64: false,
144
+ templateId: uuid(),
145
+ id: uuid(),
146
+ ...customOption
147
+ })
148
+ } else {
149
+ this.$message.error('请确保打印服务已经启动')
150
+ return Promise.reject(new Error('客户端打印失败,未连接打印服务'))
151
+ }
152
+ }
153
+ }
154
+ }
155
+
156
+ window.hiprint = hiprint
157
+
158
+ export {
159
+ autoConnect,
160
+ disAutoConnect,
161
+ hiprint,
162
+ hiPrintPlugin,
163
+ defaultElementTypeProvider,
164
+ }
@@ -54,12 +54,13 @@ routerResource.example = {
54
54
  name: '示例主页面',
55
55
  // component: () => import('@vue2-client/base-client/components/common/XDescriptions/demo.vue'),
56
56
  // component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
57
- component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
57
+ // component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
58
58
  // component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
59
59
  // component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
60
60
  // component: () => import('@vue2-client/base-client/components/common/XDatePicker/demo.vue'),
61
61
  // component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
62
- // component: () => import('@vue2-client/base-client/components/common/XReportGrid/XReportDemo.vue'),
62
+ component: () => import('@vue2-client/base-client/components/common/XRate/demo.vue'),
63
+ // component: () => import('@vue2-client/base-client/components/common/XForm/demo.vue'),
63
64
  // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
64
65
  // component: () => import('@vue2-client/base-client/components/common/XConversation/XConversationDemo.vue'),
65
66
  // component: () => import('@vue2-client/base-client/components/common/XButtons/XButtonDemo.vue'),