vue2-client 1.20.20 → 1.20.21

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,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
+ }
@@ -1,102 +1,47 @@
1
- <template>
2
- <a-card :bordered="false">
3
- <x-form-table
4
- title="呼叫工单总汇"
5
- ref="xFormTable"
6
- :queryParamsName="queryParamsName"
7
- :fixed-query-form="{
8
- users_f_handler_id: currUser.id,
9
- }"
10
- serviceName="af-telephone"
11
- @toDeal="toDetail"
12
- @updateInfo="updateInfo"
13
- >
14
- </x-form-table>
15
- <WorkflowDetail
16
- ref="workFlow"
17
- @preClick="preClick"
18
- @success="success"
19
- @nextClick="nextClick"
20
- @x-form-item-emit-func="handleFormItemEvent"
21
- >
22
- </WorkflowDetail>
23
- <DealOrUpdate @refresh="refresh" ref="dealOrUpdate"/>
24
- </a-card>
25
- </template>
26
-
27
1
  <script>
28
2
  import WorkflowDetail from '@vue2-client/pages/WorkflowDetail/WorkflowDetail.vue'
29
- import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
30
- import DealOrUpdate from '@/pages/telephone/workFlow/dealOrUpdate.vue'
31
- // import { getConfigByName, runLogic } from 'vue2-client/src/services/api/common'
32
- import { mapState } from 'vuex'
33
3
 
34
4
  export default {
35
- name: 'Apply',
36
- components: {
37
- XFormTable,
38
- WorkflowDetail,
39
- DealOrUpdate
40
- },
41
- // 透传给子组件的方法(目前XFormTable接了)
42
- provide () {
43
- return {
44
- generalFunction: {}
45
- }
46
- },
47
- data () {
48
- return {
49
- // 查询配置文件名
50
- queryParamsName: 'teleProcessCRUD',
51
- // 发起报建弹框控制
52
- applyAddFlag: false,
53
- // 提交加载动画
54
- confirmLoading: false,
55
- refreshFn: null,
56
- chargeVisible: false
57
- }
58
- },
59
- computed: {
60
- ...mapState('account', { currUser: 'user' }),
5
+ name: 'WorkFlowDemo',
6
+ components: { WorkflowDetail },
7
+ mounted () {
8
+ this.$refs.workFlow.init({
9
+ workflowId: 6255
10
+ })
61
11
  },
62
12
  methods: {
63
- success () {
64
- console.log('完工')
65
- },
66
- toDetail (record) {
67
- // 修改第一步的工单
68
- if (record.ws_f_step_id === 1) {
69
- console.log('进入工单详情')
70
- this.$refs.dealOrUpdate.dealOrUpdate(record, '处理工单')
71
- } else {
72
- // 进入工单详情
73
- this.$refs.workFlow.init({
74
- workflowId: record.wo_f_workflow_id,
75
- stepId: record.ws_f_step_id
76
- })
77
- }
13
+ /**
14
+ * 流程详情页成功
15
+ * @param note 备注信息
16
+ * @param form 表单信息
17
+ * @param workflowId
18
+ */
19
+ success ({ note, form, workflowId }) {
20
+ console.log('success', note, form, workflowId)
78
21
  },
79
- updateInfo (record) {
80
- this.$refs.dealOrUpdate.dealOrUpdate(record, '修改信息')
81
- },
82
- // 退回的事件处理
83
- preClick (data) {
84
- console.log('退回事件处理', data)
85
- if (data.toStepId === 1) {
86
- this.$refs.workFlow.onClose()
87
- this.$refs.xFormTable.refreshTable(true)
88
- }
89
- },
90
- handleFormItemEvent (func, data, value) {
91
- console.log('打印一下:', func, data, value)
92
- },
93
- nextClick ({ form, formStep, workflowId }) {
94
- console.log('success', form, formStep, workflowId)
95
- this.$refs.xFormTable.refreshTable(true)
96
- },
97
- refresh () {
98
- this.$refs.xFormTable.refreshTable(true)
22
+ /**
23
+ * 流程详情页成功
24
+ * @param note 备注信息
25
+ * @param form 表单信息
26
+ * @param workflowId 工作流id
27
+ * @param fromStepId 起ID
28
+ * @param toStepId 往ID
29
+ * @param successStepId 完成步骤id
30
+ * @param successStep 完成步骤名称
31
+ * @param fromStep 起步骤名称
32
+ * @param toStep 往步骤名称
33
+ */
34
+ nextClick ({ note, form, workflowId, fromStepId, toStepId, fromStep, toStep, successStepId, successStep }) {
35
+ console.log('success', note, form, workflowId, fromStepId, toStepId, fromStep, toStep, successStepId, successStep)
99
36
  }
100
37
  }
101
38
  }
102
39
  </script>
40
+
41
+ <template>
42
+ <WorkflowDetail ref="workFlow" @success="success" @nextClick="nextClick"></WorkflowDetail>
43
+ </template>
44
+
45
+ <style scoped lang="less">
46
+
47
+ </style>
@@ -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>