af-mobile-client-vue3 1.2.56 → 1.2.57

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "af-mobile-client-vue3",
3
3
  "type": "module",
4
- "version": "1.2.56",
4
+ "version": "1.2.57",
5
5
  "packageManager": "pnpm@10.12.3",
6
6
  "description": "Vue + Vite component lib",
7
7
  "engines": {
@@ -1,6 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import XBadge from '@af-mobile-client-vue3/components/data/XBadge/index.vue'
3
3
  import XCellListFilter from '@af-mobile-client-vue3/components/data/XCellListFilter/index.vue'
4
+ import XForm from '@af-mobile-client-vue3/components/data/XForm/index.vue'
4
5
  import { getConfigByName, query } from '@af-mobile-client-vue3/services/api/common'
5
6
  import useUserStore from '@af-mobile-client-vue3/stores/modules/user'
6
7
  import { getRangeByType } from '@af-mobile-client-vue3/utils/queryFormDefaultRangePicker'
@@ -14,6 +15,7 @@ import {
14
15
  Icon as VanIcon,
15
16
  List as VanList,
16
17
  Popover as VanPopover,
18
+ Popup as VanPopup,
17
19
  PullRefresh as VanPullRefresh,
18
20
  Row as VanRow,
19
21
  Search as VanSearch,
@@ -149,6 +151,9 @@ const slots = useSlots()
149
151
  // 当前组件实例(不推荐使用,可能会在后续的版本更迭中调整,暂时用来绑定函数的上下文)
150
152
  const currInst = getCurrentInstance()
151
153
 
154
+ // 控制抽屉显示
155
+ const showDrawer = ref(false)
156
+
152
157
  // 列表底部的文字显示
153
158
  function finishedBottomText() {
154
159
  if (buttonState.value?.add && buttonState.value.add === true && (filterButtonPermissions('add').state === false || ((filterButtonPermissions('add').state === true && userState.f.resources.f_role_name.includes((filterButtonPermissions('add').roleStr))))))
@@ -464,16 +469,7 @@ function addOption() {
464
469
  emit('add')
465
470
  }
466
471
  else {
467
- // 默认行为 - 导航到XForm页面
468
- router.push({
469
- name: 'XForm',
470
- query: {
471
- groupFormItems: JSON.stringify(groupFormItems.value),
472
- serviceName,
473
- formData: JSON.stringify({}),
474
- mode: '新增',
475
- },
476
- })
472
+ showDrawer.value = true
477
473
  }
478
474
  }
479
475
 
@@ -748,6 +744,23 @@ defineExpose({
748
744
  </VanPullRefresh>
749
745
  <VanBackTop />
750
746
  </div>
747
+ <VanPopup v-model:show="showDrawer" position="bottom" :style="{ height: '90vh', borderTopLeftRadius: '10px', borderTopRightRadius: '10px', overflow: 'hidden', padding: 0 }">
748
+ <div class="drawer-header">
749
+ <span class="drawer-title">{{ title || '新增' }}</span>
750
+ <van-icon name="cross" class="drawer-close" @click="showDrawer = false" />
751
+ </div>
752
+ <div class="drawer-content-scroll">
753
+ <XForm
754
+ :config-name="configName"
755
+ :service-name="serviceName"
756
+ :form-data="{}"
757
+ :group-form-items="groupFormItems"
758
+ mode="新增"
759
+ @on-submit="showDrawer = false"
760
+ @close="showDrawer = false"
761
+ />
762
+ </div>
763
+ </VanPopup>
751
764
  </div>
752
765
  </template>
753
766
 
@@ -1068,4 +1081,37 @@ defineExpose({
1068
1081
  }
1069
1082
  }
1070
1083
  }
1084
+ .drawer-header {
1085
+ position: sticky;
1086
+ top: 0;
1087
+ left: 0;
1088
+ right: 0;
1089
+ z-index: 2;
1090
+ display: flex;
1091
+ align-items: center;
1092
+ justify-content: center;
1093
+ height: 48px;
1094
+ border-bottom: 1px solid #f0f0f0;
1095
+ background: #fff;
1096
+ box-shadow: 0 2px 8px rgba(0,0,0,0.03);
1097
+ }
1098
+ .drawer-title {
1099
+ font-size: 18px;
1100
+ font-weight: 600;
1101
+ color: #222;
1102
+ }
1103
+ .drawer-close {
1104
+ position: absolute;
1105
+ right: 16px;
1106
+ top: 50%;
1107
+ transform: translateY(-50%);
1108
+ font-size: 22px;
1109
+ color: #888;
1110
+ cursor: pointer;
1111
+ }
1112
+ .drawer-content-scroll {
1113
+ height: calc(90vh - 48px);
1114
+ overflow-y: auto;
1115
+ background: #fff;
1116
+ }
1071
1117
  </style>
@@ -119,4 +119,4 @@ onUnmounted(() => {
119
119
  color: #ff976a;
120
120
  }
121
121
  }
122
- </style>
122
+ </style>
@@ -99,4 +99,4 @@ onUnmounted(() => {
99
99
  .user-form {
100
100
  padding: 16px;
101
101
  }
102
- </style>
102
+ </style>
@@ -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
+ }
@@ -10,7 +10,6 @@ import XCellDetailView from '@af-mobile-client-vue3/views/component/XCellDetailV
10
10
  import XCellListView from '@af-mobile-client-vue3/views/component/XCellListView/index.vue'
11
11
  import XFormAppraiseView from '@af-mobile-client-vue3/views/component/XFormAppraiseView/index.vue'
12
12
  import XFormGroupView from '@af-mobile-client-vue3/views/component/XFormGroupView/index.vue'
13
- import xformgroup222 from '@af-mobile-client-vue3/views/component/XFormGroupView/xformgroup222.vue'
14
13
  import XFormView from '@af-mobile-client-vue3/views/component/XFormView/index.vue'
15
14
  import XOlMapView from '@af-mobile-client-vue3/views/component/XOlMapView/index.vue'
16
15
  import XLocationPicker from '@af-mobile-client-vue3/views/component/XOlMapView/XLocationPicker/index.vue'
@@ -67,11 +66,6 @@ const routes: Array<RouteRecordRaw> = [
67
66
  name: 'XCellDetailView',
68
67
  component: XCellDetailView,
69
68
  },
70
- {
71
- path: '/xformgroup222',
72
- name: 'xformgroup222',
73
- component: xformgroup222,
74
- },
75
69
  {
76
70
  path: '/Component/XFormGroupView',
77
71
  name: 'XFormGroupView',
@@ -1,10 +1,12 @@
1
1
  import { getConfigByNameAsync } from '@af-mobile-client-vue3/services/api/common'
2
2
  import { APP_WEB_CONFIG_KEY } from '@af-mobile-client-vue3/stores/mutation-type'
3
+ import { secureStorageBatchWrite } from '@af-mobile-client-vue3/utils/secureStorage'
3
4
  import { createStorage } from '@af-mobile-client-vue3/utils/Storage'
4
5
  import { defineStore } from 'pinia'
5
6
  import { ref } from 'vue'
6
7
 
7
8
  export interface WebConfig {
9
+ isAttendance: boolean | false
8
10
  systemName: string
9
11
  routerName: string
10
12
  systemDesc: string
@@ -14,6 +16,9 @@ export interface WebConfig {
14
16
  wxLoginAge: boolean
15
17
  wxAutoLogin: string
16
18
  tenantName: string
19
+ systemLogo: string
20
+ homeAppList: Array<any>
21
+ slideshowList: Array<any>
17
22
  }
18
23
 
19
24
  // 存放 webConfig 中的 setting 配置
@@ -45,6 +50,15 @@ export const useSettingStore = defineStore('setting', () => {
45
50
  useStore.set(APP_WEB_CONFIG_KEY, res)
46
51
  console.log('res.setting', res.setting)
47
52
  setSetting(res.setting)
53
+ // 如果有pos相关的配置存储到app安全存储中
54
+ if (res.setting.posConfig) {
55
+ secureStorageBatchWrite([
56
+ {
57
+ key: 'posConfig',
58
+ value: res.setting.posConfig,
59
+ },
60
+ ])
61
+ }
48
62
  }
49
63
  }
50
64