vue2-client 1.17.33 → 1.17.35

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.
@@ -1,89 +1,89 @@
1
- <template>
2
- <a-card :bordered="false">
3
- <x-form-table
4
- title="示例表单"
5
- :queryParamsName="queryParamsName"
6
- :fixedAddForm="fixedAddForm"
7
- :externalSelectedRowKeys="selectedKeys"
8
- @action="action"
9
- @selectRow="selectRow"
10
- @columnClick="columnClick"
11
- serviceName="af-system"
12
- ref="xFormTable">
13
- </x-form-table>
14
- </a-card>
15
- </template>
16
-
17
- <script>
18
- import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'
19
- import { microDispatch } from '@vue2-client/utils/microAppUtils'
20
-
21
- export default {
22
- name: 'Demo',
23
- components: {
24
- XFormTable
25
- },
26
- data () {
27
- return {
28
- // 查询配置文件名
29
- queryParamsName: 'ceshiCRUD',
30
- // 查询配置左侧tree
31
- xTreeConfigName: 'addressType',
32
- // 新增表单固定值
33
- fixedAddForm: {},
34
- // 是否显示详情抽屉
35
- detailVisible: false,
36
- // 当前记录
37
- record: {},
38
- // 选中的行keys
39
- selectedKeys: [],
40
- selected: {
41
- keys: [],
42
- rows: []
43
- }
44
- }
45
- },
46
- methods: {
47
- test () {
48
- this.$refs.xFormTable.setTableData([])
49
- },
50
- defaultF () {
51
- this.$refs.xFormTable.setTableSize('default')
52
- },
53
- middleF () {
54
- this.$refs.xFormTable.setTableSize('middle')
55
- },
56
- smallF () {
57
- this.$refs.xFormTable.setTableSize('small')
58
- },
59
- columnClick (key, value, record) {
60
- microDispatch({
61
- type: 'v3route',
62
- path: '/bingliguanli/dianzibingliluru',
63
- props: { selected: arguments[0].his_f_admission_id }
64
- })
65
- },
66
- action (record, id, actionType) {
67
- this.detailVisible = true
68
- console.log('触发了详情操作', record, id, actionType)
69
- },
70
- onClose () {
71
- this.detailVisible = false
72
- // 关闭详情之后重新查询表单
73
- this.$refs.xFormTable.refreshTable(true)
74
- },
75
- selectRow (selectedRowKeys, selectedRows) {
76
- this.selected = {
77
- keys: selectedRowKeys,
78
- rows: selectedRows
79
- }
80
- console.log('selectedDemo', this.selected)
81
- },
82
- },
83
- computed: {},
84
- }
85
- </script>
86
-
87
- <style scoped>
88
-
89
- </style>
1
+ <template>
2
+ <a-card :bordered="false">
3
+ <x-form-table
4
+ title="示例表单"
5
+ :queryParamsName="queryParamsName"
6
+ :fixedAddForm="fixedAddForm"
7
+ :externalSelectedRowKeys="selectedKeys"
8
+ @action="action"
9
+ @selectRow="selectRow"
10
+ @columnClick="columnClick"
11
+ serviceName="af-system"
12
+ ref="xFormTable">
13
+ </x-form-table>
14
+ </a-card>
15
+ </template>
16
+
17
+ <script>
18
+ import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'
19
+ import { microDispatch } from '@vue2-client/utils/microAppUtils'
20
+
21
+ export default {
22
+ name: 'Demo',
23
+ components: {
24
+ XFormTable
25
+ },
26
+ data () {
27
+ return {
28
+ // 查询配置文件名
29
+ queryParamsName: 'ceshiCRUD',
30
+ // 查询配置左侧tree
31
+ xTreeConfigName: 'addressType',
32
+ // 新增表单固定值
33
+ fixedAddForm: {},
34
+ // 是否显示详情抽屉
35
+ detailVisible: false,
36
+ // 当前记录
37
+ record: {},
38
+ // 选中的行keys
39
+ selectedKeys: [],
40
+ selected: {
41
+ keys: [],
42
+ rows: []
43
+ }
44
+ }
45
+ },
46
+ methods: {
47
+ test () {
48
+ this.$refs.xFormTable.setTableData([])
49
+ },
50
+ defaultF () {
51
+ this.$refs.xFormTable.setTableSize('default')
52
+ },
53
+ middleF () {
54
+ this.$refs.xFormTable.setTableSize('middle')
55
+ },
56
+ smallF () {
57
+ this.$refs.xFormTable.setTableSize('small')
58
+ },
59
+ columnClick (key, value, record) {
60
+ microDispatch({
61
+ type: 'v3route',
62
+ path: '/bingliguanli/dianzibingliluru',
63
+ props: { selected: arguments[0].his_f_admission_id }
64
+ })
65
+ },
66
+ action (record, id, actionType) {
67
+ this.detailVisible = true
68
+ console.log('触发了详情操作', record, id, actionType)
69
+ },
70
+ onClose () {
71
+ this.detailVisible = false
72
+ // 关闭详情之后重新查询表单
73
+ this.$refs.xFormTable.refreshTable(true)
74
+ },
75
+ selectRow (selectedRowKeys, selectedRows) {
76
+ this.selected = {
77
+ keys: selectedRowKeys,
78
+ rows: selectedRows
79
+ }
80
+ console.log('selectedDemo', this.selected)
81
+ },
82
+ },
83
+ computed: {},
84
+ }
85
+ </script>
86
+
87
+ <style scoped>
88
+
89
+ </style>
@@ -1,186 +1,186 @@
1
- // print.js
2
-
3
- export function printElement (elementToPrint) {
4
- // 创建一个新的浏览器窗口
5
- const printWindow = window.open('', '_blank', 'height=1024,width=768')
6
- // 设置新窗口的文档内容
7
- printWindow.document.write(`
8
- <html>
9
- <head>
10
- <title>Print</title>
11
- <style>
12
- @page {
13
- size: auto;
14
- margin: 0mm;
15
- }
16
- html, body {
17
- margin: 0;
18
- padding: 0;
19
- width: 100%;
20
- height: 100%;
21
- }
22
- #print-container {
23
- display: none
24
- }
25
- .img{
26
- width: 95%;
27
- height: 180px;
28
- object-fit: cover;
29
- }
30
- .reportMain {
31
- text-align: center;
32
- margin: 0 auto;
33
- font-size: 16px;
34
- color: #000;
35
- background-color: #fff;
36
- padding: 15px;
37
- border-radius: 8px;
38
-
39
- .reportTitle {
40
- font-weight: bold;
41
- }
42
-
43
- .subTitle {
44
- display: flex;
45
- justify-content: space-between;
46
- margin-bottom: 1%;
47
-
48
- .subTitleItems {
49
- max-width: 30%;
50
- }
51
- }
52
-
53
- .inputsDiv {
54
- display: flex;
55
- justify-content: space-between;
56
- .inputsDivItem {
57
- display: flex;
58
- align-items: center;
59
- padding: 0 4px;
60
- white-space: nowrap;
61
- .inputsDivItemLabel {
62
- padding: 0 4px;
63
- }
64
- }
65
- }
66
-
67
- .reportTable {
68
- width: 100%;
69
- border-collapse: collapse;
70
- table-layout:fixed;
71
- word-break:break-all;
72
- text-align: center;
73
- }
74
- }
75
- .reportMainForDisplay {
76
- text-align: center;
77
- margin: 10% auto;
78
- font-size: 16px;
79
- color: #000;
80
- background-color: #fff;
81
- padding: 15px;
82
- border-radius: 8px;
83
-
84
- .reportTitle {
85
- font-weight: bold;
86
- }
87
-
88
- .subTitle {
89
- display: flex;
90
- justify-content: space-between;
91
-
92
- .subTitleItems {
93
- max-width: 30%;
94
- }
95
- }
96
-
97
- .inputsDiv {
98
- display: flex;
99
- justify-content: space-around;
100
- .inputsDivItem {
101
- display: flex;
102
- align-items: center;
103
- padding: 0 4px;
104
- white-space: nowrap;
105
- .inputsDivItemLabel {
106
- padding: 0 4px;
107
- }
108
- }
109
- }
110
-
111
- .reportTable {
112
- width: 100%;
113
- border-collapse: collapse;
114
- table-layout:fixed;
115
- word-break:break-all;
116
- }
117
- }
118
- .reportMainNoPadding {
119
- text-align: center;
120
- margin: 0 auto;
121
- font-size: 16px;
122
- color: #000;
123
- background-color: #fff;
124
- border-radius: 8px;
125
-
126
- .reportTitle {
127
- font-weight: bold;
128
- }
129
-
130
- .subTitle {
131
- display: flex;
132
- justify-content: space-between;
133
-
134
- .subTitleItems {
135
- max-width: 30%;
136
- }
137
- }
138
-
139
- .inputsDiv {
140
- display: flex;
141
- justify-content: space-between;
142
- .inputsDivItem {
143
- display: flex;
144
- align-items: center;
145
- padding: 0 4px;
146
- white-space: nowrap;
147
- .inputsDivItemLabel {
148
- padding: 0 4px;
149
- }
150
- }
151
- }
152
-
153
- .reportTable {
154
- width: 100%;
155
- border-collapse: collapse;
156
- table-layout:fixed;
157
- word-break:break-all;
158
- }
159
- }
160
- .tools{
161
- position: fixed;
162
- right: 2%;
163
- text-align: right;
164
- width: 60%;
165
- cursor: pointer;
166
- .toolsItem{
167
- width: 15%;
168
- margin-right: 3%;
169
- display: inline-block;
170
- }
171
- }
172
- </style>
173
- </head>
174
- <body>
175
- <!-- 将需要打印的元素内容复制到新窗口中 -->
176
- ${elementToPrint.innerHTML}
177
- </body>
178
- </html>
179
- `)
180
- // 延迟执行打印,以确保新窗口的内容已加载完成
181
- printWindow.document.close() // 关闭文档流,确保内容完全加载
182
- setTimeout(() => {
183
- printWindow.print() // 调用打印方法
184
- printWindow.close()
185
- }, 500) // 延迟500毫秒后执行打印
186
- }
1
+ // print.js
2
+
3
+ export function printElement (elementToPrint) {
4
+ // 创建一个新的浏览器窗口
5
+ const printWindow = window.open('', '_blank', 'height=1024,width=768')
6
+ // 设置新窗口的文档内容
7
+ printWindow.document.write(`
8
+ <html>
9
+ <head>
10
+ <title>Print</title>
11
+ <style>
12
+ @page {
13
+ size: auto;
14
+ margin: 0mm;
15
+ }
16
+ html, body {
17
+ margin: 0;
18
+ padding: 0;
19
+ width: 100%;
20
+ height: 100%;
21
+ }
22
+ #print-container {
23
+ display: none
24
+ }
25
+ .img{
26
+ width: 95%;
27
+ height: 180px;
28
+ object-fit: cover;
29
+ }
30
+ .reportMain {
31
+ text-align: center;
32
+ margin: 0 auto;
33
+ font-size: 16px;
34
+ color: #000;
35
+ background-color: #fff;
36
+ padding: 15px;
37
+ border-radius: 8px;
38
+
39
+ .reportTitle {
40
+ font-weight: bold;
41
+ }
42
+
43
+ .subTitle {
44
+ display: flex;
45
+ justify-content: space-between;
46
+ margin-bottom: 1%;
47
+
48
+ .subTitleItems {
49
+ max-width: 30%;
50
+ }
51
+ }
52
+
53
+ .inputsDiv {
54
+ display: flex;
55
+ justify-content: space-between;
56
+ .inputsDivItem {
57
+ display: flex;
58
+ align-items: center;
59
+ padding: 0 4px;
60
+ white-space: nowrap;
61
+ .inputsDivItemLabel {
62
+ padding: 0 4px;
63
+ }
64
+ }
65
+ }
66
+
67
+ .reportTable {
68
+ width: 100%;
69
+ border-collapse: collapse;
70
+ table-layout:fixed;
71
+ word-break:break-all;
72
+ text-align: center;
73
+ }
74
+ }
75
+ .reportMainForDisplay {
76
+ text-align: center;
77
+ margin: 10% auto;
78
+ font-size: 16px;
79
+ color: #000;
80
+ background-color: #fff;
81
+ padding: 15px;
82
+ border-radius: 8px;
83
+
84
+ .reportTitle {
85
+ font-weight: bold;
86
+ }
87
+
88
+ .subTitle {
89
+ display: flex;
90
+ justify-content: space-between;
91
+
92
+ .subTitleItems {
93
+ max-width: 30%;
94
+ }
95
+ }
96
+
97
+ .inputsDiv {
98
+ display: flex;
99
+ justify-content: space-around;
100
+ .inputsDivItem {
101
+ display: flex;
102
+ align-items: center;
103
+ padding: 0 4px;
104
+ white-space: nowrap;
105
+ .inputsDivItemLabel {
106
+ padding: 0 4px;
107
+ }
108
+ }
109
+ }
110
+
111
+ .reportTable {
112
+ width: 100%;
113
+ border-collapse: collapse;
114
+ table-layout:fixed;
115
+ word-break:break-all;
116
+ }
117
+ }
118
+ .reportMainNoPadding {
119
+ text-align: center;
120
+ margin: 0 auto;
121
+ font-size: 16px;
122
+ color: #000;
123
+ background-color: #fff;
124
+ border-radius: 8px;
125
+
126
+ .reportTitle {
127
+ font-weight: bold;
128
+ }
129
+
130
+ .subTitle {
131
+ display: flex;
132
+ justify-content: space-between;
133
+
134
+ .subTitleItems {
135
+ max-width: 30%;
136
+ }
137
+ }
138
+
139
+ .inputsDiv {
140
+ display: flex;
141
+ justify-content: space-between;
142
+ .inputsDivItem {
143
+ display: flex;
144
+ align-items: center;
145
+ padding: 0 4px;
146
+ white-space: nowrap;
147
+ .inputsDivItemLabel {
148
+ padding: 0 4px;
149
+ }
150
+ }
151
+ }
152
+
153
+ .reportTable {
154
+ width: 100%;
155
+ border-collapse: collapse;
156
+ table-layout:fixed;
157
+ word-break:break-all;
158
+ }
159
+ }
160
+ .tools{
161
+ position: fixed;
162
+ right: 2%;
163
+ text-align: right;
164
+ width: 60%;
165
+ cursor: pointer;
166
+ .toolsItem{
167
+ width: 15%;
168
+ margin-right: 3%;
169
+ display: inline-block;
170
+ }
171
+ }
172
+ </style>
173
+ </head>
174
+ <body>
175
+ <!-- 将需要打印的元素内容复制到新窗口中 -->
176
+ ${elementToPrint.innerHTML}
177
+ </body>
178
+ </html>
179
+ `)
180
+ // 延迟执行打印,以确保新窗口的内容已加载完成
181
+ printWindow.document.close() // 关闭文档流,确保内容完全加载
182
+ setTimeout(() => {
183
+ printWindow.print() // 调用打印方法
184
+ printWindow.close()
185
+ }, 500) // 延迟500毫秒后执行打印
186
+ }
@@ -0,0 +1,127 @@
1
+ <template>
2
+ <a-card :bordered="false">
3
+ <a-tabs default-active-key="1" @change="changeTab">
4
+ <a-tab-pane key="1" tab="待办">
5
+ <x-form-table
6
+ title="站点工单(待办)"
7
+ ref="xFormTable"
8
+ queryParamsName="teleProcessCRUD"
9
+ :fixed-query-form="{
10
+ wo_f_department_id: currUser.depids,
11
+ }"
12
+ serviceName="af-telephone"
13
+ @toDeal="toDetail"
14
+ @updateInfo="updateInfo"
15
+ @transfer="transfer"
16
+ @toFinish="toFinish"
17
+ >
18
+ </x-form-table>
19
+ </a-tab-pane>
20
+ <a-tab-pane key="2" tab="已办">
21
+ <x-form-table
22
+ title="站点工单(已办)"
23
+ ref="xFormTableDone"
24
+ queryParamsName="teleProcessDoneCRUD"
25
+ :fixed-query-form="{
26
+ wo_f_department_id: currUser.depids,
27
+ }"
28
+ serviceName="af-telephone"
29
+ @action="toView"
30
+ @reminder="toReminder"
31
+ >
32
+ </x-form-table>
33
+ </a-tab-pane>
34
+ </a-tabs>
35
+ <WorkflowDetail
36
+ ref="workFlow"
37
+ @preClick="preClick"
38
+ @success="success"
39
+ @nextClick="nextClick"
40
+ @x-form-item-emit-func="handleFormItemEvent"
41
+ >
42
+ </WorkflowDetail>
43
+ </a-card>
44
+ </template>
45
+
46
+ <script>
47
+ import WorkflowDetail from '@vue2-client/pages/WorkflowDetail/WorkflowDetail.vue'
48
+ import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
49
+ import { mapState } from 'vuex'
50
+ import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
51
+
52
+ export default {
53
+ name: 'Telephone',
54
+ components: {
55
+ XFormTable,
56
+ WorkflowDetail,
57
+ XAddNativeForm
58
+ },
59
+ // 透传给子组件的方法(目前XFormTable接了)
60
+ provide () {
61
+ return {
62
+ generalFunction: {}
63
+ }
64
+ },
65
+ data () {
66
+ return {
67
+ // 当前工单id
68
+ currentWorkOrderId: '',
69
+ // 提交加载动画
70
+ confirmLoading: false,
71
+ chargeVisible: false,
72
+ // 环节人员信息
73
+ chargePerson: {},
74
+ chargePersonOptions: [],
75
+ transferData: {
76
+ optionsValue: '',
77
+ remark: ''
78
+ },
79
+ record: {},
80
+ define: {},
81
+ // 是否展示催单结案弹窗
82
+ showReminder: false,
83
+ // 弹窗类型 催单/ 结案
84
+ modelType: ''
85
+ }
86
+ },
87
+ computed: {
88
+ ...mapState('account', { currUser: 'user' }),
89
+ },
90
+ methods: {
91
+ changeTab (key) {
92
+ console.log('切换tab', key)
93
+ if (key === '1') {
94
+ this.$refs.xFormTable.refreshTable(true)
95
+ } else if (key === '2') {
96
+ this.$refs.xFormTableDone.refreshTable(true)
97
+ }
98
+ },
99
+ success () {
100
+ console.log('完工')
101
+ },
102
+ toDetail (record) {
103
+ // 修改第一步的工单
104
+ if (record.ws_f_step_id === 1 && record.w_f_state === 0) {
105
+ console.log('进入工单详情')
106
+ if (record.w_f_workflow_define_name === '报修单处理流程') {
107
+ this.$refs.dealOrUpdate.dealOrUpdate(record, '处理工单')
108
+ } else if (record.w_f_workflow_define_name === '投诉单处理流程') {
109
+ this.$refs.dealComplaint.dealComplaintOrder(record)
110
+ } else if (record.w_f_workflow_define_name === '咨询单处理流程') {
111
+ this.$refs.dealConsultation.dealConsultationOrder(record)
112
+ } else {
113
+ this.$message.warn('未知流程类型')
114
+ }
115
+ } else {
116
+ // 记录流程节点名称
117
+ this.currentWorkOrderId = record.wo_id
118
+ // 进入流程详情
119
+ this.$refs.workFlow.init({
120
+ workflowId: record.wo_f_workflow_id,
121
+ stepId: record.ws_f_step_id
122
+ })
123
+ }
124
+ },
125
+ }
126
+ }
127
+ </script>