af-mobile-client-vue3 1.2.25 → 1.2.27

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,33 +1,33 @@
1
- <script setup lang="ts">
2
- import { onMounted, ref } from 'vue'
3
- import XReport from './XReport.vue'
4
-
5
- const mainRef = ref()
6
-
7
- onMounted(() => {
8
- // 初始化逻辑
9
- })
10
- </script>
11
-
12
- <template>
13
- <div id="test">
14
- <van-card :bordered="false">
15
- <XReport
16
- ref="mainRef"
17
- :use-oss-for-img="false"
18
- config-name="nurseWorkstationCover"
19
- server-name="af-his"
20
- :show-img-in-cell="true"
21
- :display-only="true"
22
- :edit-mode="false"
23
- :show-save-button="false"
24
- :no-padding="true"
25
- :dont-format="true"
26
- />
27
- </van-card>
28
- </div>
29
- </template>
30
-
31
- <style scoped>
32
-
33
- </style>
1
+ <script setup lang="ts">
2
+ import { onMounted, ref } from 'vue'
3
+ import XReport from './XReport.vue'
4
+
5
+ const mainRef = ref()
6
+
7
+ onMounted(() => {
8
+ // 初始化逻辑
9
+ })
10
+ </script>
11
+
12
+ <template>
13
+ <div id="test">
14
+ <van-card :bordered="false">
15
+ <XReport
16
+ ref="mainRef"
17
+ :use-oss-for-img="false"
18
+ config-name="nurseWorkstationCover"
19
+ server-name="af-his"
20
+ :show-img-in-cell="true"
21
+ :display-only="true"
22
+ :edit-mode="false"
23
+ :show-save-button="false"
24
+ :no-padding="true"
25
+ :dont-format="true"
26
+ />
27
+ </van-card>
28
+ </div>
29
+ </template>
30
+
31
+ <style scoped>
32
+
33
+ </style>
@@ -1,184 +1,184 @@
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
- border-radius: 8px;
37
-
38
- .reportTitle {
39
- font-weight: bold;
40
- }
41
-
42
- .subTitle {
43
- display: flex;
44
- justify-content: space-between;
45
- margin-bottom: 1%;
46
-
47
- .subTitleItems {
48
- max-width: 30%;
49
- }
50
- }
51
-
52
- .inputsDiv {
53
- display: flex;
54
- justify-content: space-between;
55
- .inputsDivItem {
56
- display: flex;
57
- align-items: center;
58
- padding: 0 4px;
59
- white-space: nowrap;
60
- .inputsDivItemLabel {
61
- padding: 0 4px;
62
- }
63
- }
64
- }
65
-
66
- .reportTable {
67
- width: 100%;
68
- border-collapse: collapse;
69
- table-layout:fixed;
70
- word-break:break-all;
71
- text-align: center;
72
- }
73
- }
74
- .reportMainForDisplay {
75
- text-align: center;
76
- margin: 10% auto;
77
- font-size: 16px;
78
- color: #000;
79
- background-color: #fff;
80
- border-radius: 8px;
81
-
82
- .reportTitle {
83
- font-weight: bold;
84
- }
85
-
86
- .subTitle {
87
- display: flex;
88
- justify-content: space-between;
89
-
90
- .subTitleItems {
91
- max-width: 30%;
92
- }
93
- }
94
-
95
- .inputsDiv {
96
- display: flex;
97
- justify-content: space-around;
98
- .inputsDivItem {
99
- display: flex;
100
- align-items: center;
101
- padding: 0 4px;
102
- white-space: nowrap;
103
- .inputsDivItemLabel {
104
- padding: 0 4px;
105
- }
106
- }
107
- }
108
-
109
- .reportTable {
110
- width: 100%;
111
- border-collapse: collapse;
112
- table-layout:fixed;
113
- word-break:break-all;
114
- }
115
- }
116
- .reportMainNoPadding {
117
- text-align: center;
118
- margin: 0 auto;
119
- font-size: 16px;
120
- color: #000;
121
- background-color: #fff;
122
- border-radius: 8px;
123
-
124
- .reportTitle {
125
- font-weight: bold;
126
- }
127
-
128
- .subTitle {
129
- display: flex;
130
- justify-content: space-between;
131
-
132
- .subTitleItems {
133
- max-width: 30%;
134
- }
135
- }
136
-
137
- .inputsDiv {
138
- display: flex;
139
- justify-content: space-between;
140
- .inputsDivItem {
141
- display: flex;
142
- align-items: center;
143
- padding: 0 4px;
144
- white-space: nowrap;
145
- .inputsDivItemLabel {
146
- padding: 0 4px;
147
- }
148
- }
149
- }
150
-
151
- .reportTable {
152
- width: 100%;
153
- border-collapse: collapse;
154
- table-layout:fixed;
155
- word-break:break-all;
156
- }
157
- }
158
- .tools{
159
- position: fixed;
160
- right: 2%;
161
- text-align: right;
162
- width: 60%;
163
- cursor: pointer;
164
- .toolsItem{
165
- width: 15%;
166
- margin-right: 3%;
167
- display: inline-block;
168
- }
169
- }
170
- </style>
171
- </head>
172
- <body>
173
- <!-- 将需要打印的元素内容复制到新窗口中 -->
174
- ${elementToPrint.innerHTML}
175
- </body>
176
- </html>
177
- `)
178
- // 延迟执行打印,以确保新窗口的内容已加载完成
179
- printWindow.document.close() // 关闭文档流,确保内容完全加载
180
- setTimeout(() => {
181
- printWindow.print() // 调用打印方法
182
- printWindow.close()
183
- }, 500) // 延迟500毫秒后执行打印
184
- }
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
+ border-radius: 8px;
37
+
38
+ .reportTitle {
39
+ font-weight: bold;
40
+ }
41
+
42
+ .subTitle {
43
+ display: flex;
44
+ justify-content: space-between;
45
+ margin-bottom: 1%;
46
+
47
+ .subTitleItems {
48
+ max-width: 30%;
49
+ }
50
+ }
51
+
52
+ .inputsDiv {
53
+ display: flex;
54
+ justify-content: space-between;
55
+ .inputsDivItem {
56
+ display: flex;
57
+ align-items: center;
58
+ padding: 0 4px;
59
+ white-space: nowrap;
60
+ .inputsDivItemLabel {
61
+ padding: 0 4px;
62
+ }
63
+ }
64
+ }
65
+
66
+ .reportTable {
67
+ width: 100%;
68
+ border-collapse: collapse;
69
+ table-layout:fixed;
70
+ word-break:break-all;
71
+ text-align: center;
72
+ }
73
+ }
74
+ .reportMainForDisplay {
75
+ text-align: center;
76
+ margin: 10% auto;
77
+ font-size: 16px;
78
+ color: #000;
79
+ background-color: #fff;
80
+ border-radius: 8px;
81
+
82
+ .reportTitle {
83
+ font-weight: bold;
84
+ }
85
+
86
+ .subTitle {
87
+ display: flex;
88
+ justify-content: space-between;
89
+
90
+ .subTitleItems {
91
+ max-width: 30%;
92
+ }
93
+ }
94
+
95
+ .inputsDiv {
96
+ display: flex;
97
+ justify-content: space-around;
98
+ .inputsDivItem {
99
+ display: flex;
100
+ align-items: center;
101
+ padding: 0 4px;
102
+ white-space: nowrap;
103
+ .inputsDivItemLabel {
104
+ padding: 0 4px;
105
+ }
106
+ }
107
+ }
108
+
109
+ .reportTable {
110
+ width: 100%;
111
+ border-collapse: collapse;
112
+ table-layout:fixed;
113
+ word-break:break-all;
114
+ }
115
+ }
116
+ .reportMainNoPadding {
117
+ text-align: center;
118
+ margin: 0 auto;
119
+ font-size: 16px;
120
+ color: #000;
121
+ background-color: #fff;
122
+ border-radius: 8px;
123
+
124
+ .reportTitle {
125
+ font-weight: bold;
126
+ }
127
+
128
+ .subTitle {
129
+ display: flex;
130
+ justify-content: space-between;
131
+
132
+ .subTitleItems {
133
+ max-width: 30%;
134
+ }
135
+ }
136
+
137
+ .inputsDiv {
138
+ display: flex;
139
+ justify-content: space-between;
140
+ .inputsDivItem {
141
+ display: flex;
142
+ align-items: center;
143
+ padding: 0 4px;
144
+ white-space: nowrap;
145
+ .inputsDivItemLabel {
146
+ padding: 0 4px;
147
+ }
148
+ }
149
+ }
150
+
151
+ .reportTable {
152
+ width: 100%;
153
+ border-collapse: collapse;
154
+ table-layout:fixed;
155
+ word-break:break-all;
156
+ }
157
+ }
158
+ .tools{
159
+ position: fixed;
160
+ right: 2%;
161
+ text-align: right;
162
+ width: 60%;
163
+ cursor: pointer;
164
+ .toolsItem{
165
+ width: 15%;
166
+ margin-right: 3%;
167
+ display: inline-block;
168
+ }
169
+ }
170
+ </style>
171
+ </head>
172
+ <body>
173
+ <!-- 将需要打印的元素内容复制到新窗口中 -->
174
+ ${elementToPrint.innerHTML}
175
+ </body>
176
+ </html>
177
+ `)
178
+ // 延迟执行打印,以确保新窗口的内容已加载完成
179
+ printWindow.document.close() // 关闭文档流,确保内容完全加载
180
+ setTimeout(() => {
181
+ printWindow.print() // 调用打印方法
182
+ printWindow.close()
183
+ }, 500) // 延迟500毫秒后执行打印
184
+ }
@@ -1,142 +1,29 @@
1
1
  <script setup lang="ts">
2
2
  import XCellList from '@af-mobile-client-vue3/components/data/XCellList/index.vue'
3
- import { onMounted, ref } from 'vue'
3
+ import { defineEmits, ref } from 'vue'
4
4
  import { useRouter } from 'vue-router'
5
5
 
6
- const configName = ref('ApplyMobileProcessCRUD')
7
- const serviceName = ref('af-apply')
6
+ const emit = defineEmits(['addressSelected'])
8
7
  const router = useRouter()
9
-
10
- // 删除功能
11
- function phone(result) {
12
- // todo 调用真机进行通话
13
- }
14
- // 跳转流程处理
15
- function action(row) {
16
- router.push({ name: 'stepDetail', query: { workflowId: row.ab_f_workflow_id, stepId: row.ws_f_step_id } })
8
+ const configName = ref('userfiles_sel_address')
9
+ const xCellListRefPatrolPlan = ref()
10
+ // 详情
11
+ function toDetail(row) {
12
+ emit('addressSelected', {
13
+ f_address: row.tua_f_address,
14
+ f_address_id: row.tua_id,
15
+ })
17
16
  }
18
- // 工作日志
19
- function worklog(row) {
20
- router.push({ name: 'worklog', query: { workflowid: row.ab_f_workflow_id, defname: row.ws_f_name } })
21
- }
22
- onMounted(() => {
23
- })
24
17
  </script>
25
18
 
26
19
  <template>
27
20
  <XCellList
21
+ ref="xCellListRefPatrolPlan"
22
+ service-name="af-revenue"
28
23
  :config-name="configName"
29
- :service-name="serviceName"
30
- @phone="phone"
31
- @action="action"
32
- @worklog="worklog"
24
+ @to-detail="toDetail"
33
25
  />
34
26
  </template>
35
27
 
36
28
  <style scoped lang="less">
37
- .cell-search-after {
38
- padding: 0 12px 12px 12px;
39
- background-color: #fff;
40
- .van-row:first-child {
41
- align-items: center;
42
- margin-bottom: 8px;
43
- padding: 0 2px;
44
- h4 {
45
- font-size: 1.08rem;
46
- font-weight: 600;
47
- margin: 0;
48
- color: #222;
49
- letter-spacing: 1px;
50
- }
51
- .stat-date-range {
52
- display: flex;
53
- align-items: center;
54
- justify-content: flex-end;
55
- font-size: 0.92rem;
56
- color: #b0b3b8;
57
- font-weight: 400;
58
- span {
59
- margin-left: 4px;
60
- font-size: 0.92rem;
61
- color: #b0b3b8;
62
- }
63
- .van-icon {
64
- font-size: 1rem;
65
- color: #b0b3b8;
66
- margin-right: 2px;
67
- }
68
- }
69
- }
70
- .van-row:nth-child(2) {
71
- margin-top: 8px;
72
- // 统计卡片间距由gutter控制
73
- .van-col {
74
- // 让卡片宽度自适应
75
- .stat-card {
76
- width: 100%;
77
- }
78
- }
79
- }
80
- .stat-card {
81
- display: flex;
82
- flex-direction: column;
83
- align-items: center;
84
- justify-content: center;
85
- border-radius: 12px;
86
- padding: 6px 0 4px 0; // 压缩高度
87
- min-height: 44px; // 压缩高度
88
- position: relative;
89
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
90
- background: #f7f8fa;
91
- .stat-num {
92
- font-size: 1.08rem; // 缩小字体
93
- font-weight: 600;
94
- margin-bottom: 2px;
95
- }
96
- .stat-label {
97
- font-size: 0.82rem; // 缩小字体
98
- margin-bottom: 2px;
99
- }
100
- .stat-icon {
101
- position: absolute;
102
- top: 6px;
103
- right: 8px;
104
- font-size: 1rem;
105
- opacity: 0.4;
106
- }
107
- }
108
- .stat-total {
109
- background: #f0f5ff;
110
- color: #2f54eb;
111
- .stat-num,
112
- .stat-label {
113
- color: #2f54eb;
114
- }
115
- .stat-icon {
116
- color: #2f54eb;
117
- }
118
- }
119
- .stat-done {
120
- background: #e6fffb;
121
- color: #13c2c2;
122
- .stat-num,
123
- .stat-label {
124
- color: #13c2c2;
125
- }
126
- .stat-icon {
127
- color: #13c2c2;
128
- }
129
- }
130
- .stat-processing {
131
- background: #f9f0ff;
132
- color: #b37feb;
133
- .stat-num,
134
- .stat-label {
135
- color: #b37feb;
136
- }
137
- .stat-icon {
138
- color: #b37feb;
139
- }
140
- }
141
- }
142
29
  </style>
@@ -1,22 +1,14 @@
1
1
  <script setup lang="ts">
2
2
  import XFormGroup from '@af-mobile-client-vue3/components/data/XFormGroup/index.vue'
3
- import XFormView from '@af-mobile-client-vue3/views/component/XFormView/index.vue'
4
3
  import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
5
4
  import { showDialog } from 'vant'
6
5
  import { ref } from 'vue'
7
6
  import { useRoute } from 'vue-router'
8
7
 
9
8
  // 纯表单
10
- const configName = ref('appapplyuserinfoFormGroup')
9
+ const configName = ref('ApplyAddContractFormGroup')
11
10
  const serviceName = ref('af-apply')
12
11
 
13
- // const configName = ref("计划下发Form")
14
- // const serviceName = ref("af-linepatrol")
15
-
16
- // 表单组
17
- // const configName = ref('lngChargeAuditMobileFormGroup')
18
- // const serviceName = ref('af-gaslink')
19
-
20
12
  const formData = ref({})
21
13
  const formGroup = ref(null)
22
14
  const route = useRoute()
@@ -26,41 +18,6 @@ function submit(_result) {
26
18
  history.back()
27
19
  })
28
20
  }
29
- const myXForm = ref([])
30
- function setRef(value: any) {
31
- console.log('myXForm', myXForm)
32
- formGroup.value.setRef(myXForm.value)
33
- console.log(formGroup)
34
- }
35
- // 表单组——数据
36
- // function initComponents () {
37
- // runLogic('getlngChargeAuditMobileFormGroupData', {id: 29}, 'af-gaslink').then((res) => {
38
- // formData.value = {...res}
39
- // })
40
- // }
41
-
42
- // 纯表单——数据
43
- // function initComponents() {
44
- // formData.value = { plan_name: 'af-llllll', plan_point: '1号点位', plan_single: '1号点位', plan_range: '2024-12-12' }
45
- // }
46
-
47
- // function initComponents() {
48
- // runLogic('getlngChargeAuditMobileFormGroupData', { id: route.query?.id, o_id: route.query?.o_id }, 'af-gaslink').then((res) => {
49
- // console.log('res------', res)
50
- // formData.value = { ...res }
51
- // formGroup.value.init({
52
- // configName: configName.value,
53
- // serviceName: serviceName.value,
54
- // groupFormData: { ...res },
55
- // mode: "新增"
56
- // })
57
- // isInit.value = true
58
- // })
59
- // }
60
-
61
- // onBeforeMount(() => {
62
- // initComponents()
63
- // })
64
21
  </script>
65
22
 
66
23
  <template>
@@ -74,11 +31,7 @@ function setRef(value: any) {
74
31
  :group-form-data="formData"
75
32
  mode="新增"
76
33
  @submit="submit"
77
- >
78
- <template #device="{ setRef, removeRef, item, formData }">
79
- <XFormView :setRef="setRef" ref="myXForm"/>
80
- </template>
81
- </XFormGroup>
34
+ />
82
35
  </template>
83
36
  </NormalDataLayout>
84
37
  </template>