af-mobile-client-vue3 1.2.57 → 1.2.59

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.57",
4
+ "version": "1.2.59",
5
5
  "packageManager": "pnpm@10.12.3",
6
6
  "description": "Vue + Vite component lib",
7
7
  "engines": {
@@ -1,7 +1,6 @@
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'
5
4
  import { getConfigByName, query } from '@af-mobile-client-vue3/services/api/common'
6
5
  import useUserStore from '@af-mobile-client-vue3/stores/modules/user'
7
6
  import { getRangeByType } from '@af-mobile-client-vue3/utils/queryFormDefaultRangePicker'
@@ -15,7 +14,6 @@ import {
15
14
  Icon as VanIcon,
16
15
  List as VanList,
17
16
  Popover as VanPopover,
18
- Popup as VanPopup,
19
17
  PullRefresh as VanPullRefresh,
20
18
  Row as VanRow,
21
19
  Search as VanSearch,
@@ -151,9 +149,6 @@ const slots = useSlots()
151
149
  // 当前组件实例(不推荐使用,可能会在后续的版本更迭中调整,暂时用来绑定函数的上下文)
152
150
  const currInst = getCurrentInstance()
153
151
 
154
- // 控制抽屉显示
155
- const showDrawer = ref(false)
156
-
157
152
  // 列表底部的文字显示
158
153
  function finishedBottomText() {
159
154
  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))))))
@@ -469,7 +464,16 @@ function addOption() {
469
464
  emit('add')
470
465
  }
471
466
  else {
472
- showDrawer.value = true
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
+ })
473
477
  }
474
478
  }
475
479
 
@@ -744,23 +748,6 @@ defineExpose({
744
748
  </VanPullRefresh>
745
749
  <VanBackTop />
746
750
  </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>
764
751
  </div>
765
752
  </template>
766
753
 
@@ -1081,37 +1068,4 @@ defineExpose({
1081
1068
  }
1082
1069
  }
1083
1070
  }
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
- }
1117
1071
  </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,6 +10,7 @@ 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'
13
14
  import XFormView from '@af-mobile-client-vue3/views/component/XFormView/index.vue'
14
15
  import XOlMapView from '@af-mobile-client-vue3/views/component/XOlMapView/index.vue'
15
16
  import XLocationPicker from '@af-mobile-client-vue3/views/component/XOlMapView/XLocationPicker/index.vue'
@@ -66,6 +67,11 @@ const routes: Array<RouteRecordRaw> = [
66
67
  name: 'XCellDetailView',
67
68
  component: XCellDetailView,
68
69
  },
70
+ {
71
+ path: '/xformgroup222',
72
+ name: 'xformgroup222',
73
+ component: xformgroup222,
74
+ },
69
75
  {
70
76
  path: '/Component/XFormGroupView',
71
77
  name: 'XFormGroupView',
@@ -1,57 +1,57 @@
1
- /**
2
- * 根据类型获取日期区间字符串
3
- * @param type '当年' | 'curMonth' | '当日'
4
- * @param show 区分实际值还是显示值, true为实际值, false为显示值
5
- * @returns [start, end] 例:['2024-01-01 00:00:00', '2024-12-31 23:59:59']
6
- */
7
- export function getRangeByType(type: string, show: boolean): [string, string] {
8
- const now = new Date()
9
- const year = now.getFullYear()
10
- const month = (now.getMonth() + 1).toString().padStart(2, '0')
11
- const day = now.getDate().toString().padStart(2, '0')
12
-
13
- if (!show) {
14
- if (type === 'curYear') {
15
- return [
16
- `${year}-01-01 00:00:00`,
17
- `${year}-12-31 23:59:59`,
18
- ]
19
- }
20
- if (type === 'curMonth') {
21
- const lastDay = new Date(year, now.getMonth() + 1, 0).getDate()
22
- return [
23
- `${year}-${month}-01 00:00:00`,
24
- `${year}-${month}-${lastDay.toString().padStart(2, '0')} 23:59:59`,
25
- ]
26
- }
27
- if (type === 'curDay') {
28
- return [
29
- `${year}-${month}-${day} 00:00:00`,
30
- `${year}-${month}-${day} 23:59:59`,
31
- ]
32
- }
33
- }
34
- if (show) {
35
- if (type === 'curYear') {
36
- return [
37
- `${year}-01-01`,
38
- `${year}-12-31`,
39
- ]
40
- }
41
- if (type === 'curMonth') {
42
- const lastDay = new Date(year, now.getMonth() + 1, 0).getDate()
43
- return [
44
- `${year}-${month}-01`,
45
- `${year}-${month}-${lastDay.toString().padStart(2, '0')}`,
46
- ]
47
- }
48
- if (type === 'curDay') {
49
- return [
50
- `${year}-${month}-${day}`,
51
- `${year}-${month}-${day}`,
52
- ]
53
- }
54
- }
55
- // 兜底返回空字符串数组
56
- return ['', '']
57
- }
1
+ /**
2
+ * 根据类型获取日期区间字符串
3
+ * @param type '当年' | 'curMonth' | '当日'
4
+ * @param show 区分实际值还是显示值, true为实际值, false为显示值
5
+ * @returns [start, end] 例:['2024-01-01 00:00:00', '2024-12-31 23:59:59']
6
+ */
7
+ export function getRangeByType(type: string, show: boolean): [string, string] {
8
+ const now = new Date()
9
+ const year = now.getFullYear()
10
+ const month = (now.getMonth() + 1).toString().padStart(2, '0')
11
+ const day = now.getDate().toString().padStart(2, '0')
12
+
13
+ if (!show) {
14
+ if (type === 'curYear') {
15
+ return [
16
+ `${year}-01-01 00:00:00`,
17
+ `${year}-12-31 23:59:59`,
18
+ ]
19
+ }
20
+ if (type === 'curMonth') {
21
+ const lastDay = new Date(year, now.getMonth() + 1, 0).getDate()
22
+ return [
23
+ `${year}-${month}-01 00:00:00`,
24
+ `${year}-${month}-${lastDay.toString().padStart(2, '0')} 23:59:59`,
25
+ ]
26
+ }
27
+ if (type === 'curDay') {
28
+ return [
29
+ `${year}-${month}-${day} 00:00:00`,
30
+ `${year}-${month}-${day} 23:59:59`,
31
+ ]
32
+ }
33
+ }
34
+ if (show) {
35
+ if (type === 'curYear') {
36
+ return [
37
+ `${year}-01-01`,
38
+ `${year}-12-31`,
39
+ ]
40
+ }
41
+ if (type === 'curMonth') {
42
+ const lastDay = new Date(year, now.getMonth() + 1, 0).getDate()
43
+ return [
44
+ `${year}-${month}-01`,
45
+ `${year}-${month}-${lastDay.toString().padStart(2, '0')}`,
46
+ ]
47
+ }
48
+ if (type === 'curDay') {
49
+ return [
50
+ `${year}-${month}-${day}`,
51
+ `${year}-${month}-${day}`,
52
+ ]
53
+ }
54
+ }
55
+ // 兜底返回空字符串数组
56
+ return ['', '']
57
+ }
@@ -1,147 +1,157 @@
1
1
  <script setup lang="ts">
2
2
  import XCellList from '@af-mobile-client-vue3/components/data/XCellList/index.vue'
3
- import { defineOptions, onActivated, onMounted, ref } from 'vue'
3
+ import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
4
+ import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
5
+ import { defineEmits, ref } from 'vue'
4
6
  import { useRouter } from 'vue-router'
5
7
 
6
- defineOptions({ name: 'XCellListView' })
7
- const configName = ref('ApplyMobileProcessCRUD')
8
- const serviceName = ref('af-apply')
8
+ // 定义事件
9
+ const emit = defineEmits(['deleteRow'])
10
+ const userInfo = useUserStore().getUserInfo()
11
+ // 访问路由
9
12
  const router = useRouter()
10
- // 删除功能
11
- function phone(result) {
12
- // todo 调用真机进行通话
13
+ // 获取默认值
14
+ const idKey = ref('o_id')
15
+
16
+ // 简易crud表单测试
17
+ // const configName = ref('orderCarInMobileCRUD')
18
+ // const serviceName = ref('af-gaslink')
19
+ // const configName = ref('lngPriceManageMobileCRUD')
20
+ const configName = ref('测试2')
21
+ const serviceName = ref('af-gaslink')
22
+ // const configName = ref('mobile_liushuiQueryCRUD')
23
+ // const serviceName = ref('af-revenue')
24
+
25
+ // 资源权限测试
26
+ // const configName = ref('crud_sources_test')
27
+ // const serviceName = ref('af-system')
28
+
29
+ // 实际业务测试
30
+ // const configName = ref('lngChargeAuditMobileCRUD')
31
+ // const serviceName = ref('af-gaslink')
32
+
33
+ // 跳转到详情页面
34
+ // function toDetail(item) {
35
+ // router.push({
36
+ // name: 'XCellDetailView',
37
+ // params: { id: item[idKey.value] }, // 如果使用命名路由,推荐使用路由参数而不是直接构建 URL
38
+ // query: {
39
+ // operName: item[operNameKey.value],
40
+ // method:item[methodKey.value],
41
+ // requestMethod:item[requestMethodKey.value],
42
+ // operatorType:item[operatorTypeKey.value],
43
+ // operUrl:item[operUrlKey.value],
44
+ // operIp:item[operIpKey.value],
45
+ // costTime:item[costTimeKey.value],
46
+ // operTime:item[operTimeKey.value],
47
+ //
48
+ // title: item[titleKey.value],
49
+ // businessType: item[businessTypeKey.value],
50
+ // status:item[statusKey.value]
51
+ // }
52
+ // })
53
+ // }
54
+
55
+ // 跳转到表单——以表单组来渲染纯表单
56
+ function toDetail(item) {
57
+ router.push({
58
+ name: 'xformgroup222',
59
+ // query: {
60
+ // id: item[idKey.value],
61
+ // id: item.rr_id,
62
+ // o_id: item.o_id,
63
+ // },
64
+ })
13
65
  }
14
- // 跳转流程处理
15
- function action(row) {
16
- router.push({ name: 'XFormGroupView', query: { workflowId: row.ab_f_workflow_id, stepId: row.ws_f_step_id } })
66
+
67
+ // 新增功能
68
+ // function addOption(totalCount) {
69
+ // router.push({
70
+ // name: 'XFormView',
71
+ // params: { id: totalCount, openid: totalCount },
72
+ // query: {
73
+ // configName: configName.value,
74
+ // serviceName: serviceName.value,
75
+ // mode: '新增',
76
+ // },
77
+ // })
78
+ // }
79
+ function addOption() {
80
+ console.log('用户----', userInfo)
81
+ router.push({
82
+ name: 'XFormGroupView',
83
+ // params: { id: totalCount.value },
84
+ // query: {
85
+ // configName: configName.value,
86
+ // serviceName: serviceName.value,
87
+ // mode: '新增',
88
+ // },
89
+ })
90
+ // 如果存在回调函数,调用它并传递true表示已处理
91
+ // if (typeof callback === 'function') {
92
+ // callback(true)
93
+ // }
17
94
  }
18
- // 工作日志
19
- function worklog(row) {
20
- router.push({ name: 'worklog', query: { workflowid: row.ab_f_workflow_id, defname: row.ws_f_name } })
95
+
96
+ // 修改功能
97
+ function updateRow(result) {
98
+ console.log('用户----', userInfo)
99
+ router.push({
100
+ name: 'XFormView',
101
+ params: { id: 1, openid: 2 },
102
+ query: {
103
+ configName: configName.value,
104
+ serviceName: serviceName.value,
105
+ mode: '修改',
106
+ },
107
+ })
108
+ }
109
+
110
+ // 删除功能
111
+ function deleteRow(result) {
112
+ emit('deleteRow', result.o_id)
21
113
  }
22
- onMounted(() => {
23
- console.log('初始化页面===')
24
- })
25
- onActivated(() => {
26
- // 每次回到页面都会触发
27
- console.log('activated: 每次回到页面都会触发')
28
- })
29
114
  </script>
30
115
 
31
116
  <template>
32
- <XCellList
33
- :config-name="configName"
34
- :service-name="serviceName"
35
- @phone="phone"
36
- @action="action"
37
- @worklog="worklog"
38
- />
117
+ <NormalDataLayout id="XCellListView" title="工作计划">
118
+ <template #layout_content>
119
+ <!-- <XCellList -->
120
+ <!-- :config-name="configName" -->
121
+ <!-- :service-name="serviceName" -->
122
+ <!-- :custom-add="true" -->
123
+ <!-- :custom-edit="true" -->
124
+ <!-- :id-key="idKey" -->
125
+ <!-- @to-detail="toDetail" -->
126
+ <!-- @delete-row="deleteRow" -->
127
+ <!-- @update="updateRow" -->
128
+ <!-- @add="addOption" -->
129
+ <!-- /> -->
130
+
131
+ <!-- :fix-query-form="{ u_f_price_state: ['生效', '待生效'] }" -->
132
+
133
+ <!-- <XCellList -->
134
+ <!-- config-name="ApplyMobileSuperviseCRUD" -->
135
+ <!-- service-name="af-apply" -->
136
+ <!-- @to-detail="toDetail" -->
137
+ <!-- @delete-row="deleteRow" -->
138
+ <!-- /> -->
139
+
140
+ <!-- <XCellList -->
141
+ <!-- service-name="af-revenue" -->
142
+ <!-- config-name="userfiles_sel_address" -->
143
+ <!-- @to-detail="toDetail" -->
144
+ <!-- /> -->
145
+ <XCellList
146
+ service-name="af-apply"
147
+ config-name="ApplyMobileProcessCRUD"
148
+ :custom-add="true"
149
+ @to-detail="toDetail"
150
+ @add="addOption"
151
+ />
152
+ </template>
153
+ </NormalDataLayout>
39
154
  </template>
40
155
 
41
156
  <style scoped lang="less">
42
- .cell-search-after {
43
- padding: 0 12px 12px 12px;
44
- background-color: #fff;
45
- .van-row:first-child {
46
- align-items: center;
47
- margin-bottom: 8px;
48
- padding: 0 2px;
49
- h4 {
50
- font-size: 1.08rem;
51
- font-weight: 600;
52
- margin: 0;
53
- color: #222;
54
- letter-spacing: 1px;
55
- }
56
- .stat-date-range {
57
- display: flex;
58
- align-items: center;
59
- justify-content: flex-end;
60
- font-size: 0.92rem;
61
- color: #b0b3b8;
62
- font-weight: 400;
63
- span {
64
- margin-left: 4px;
65
- font-size: 0.92rem;
66
- color: #b0b3b8;
67
- }
68
- .van-icon {
69
- font-size: 1rem;
70
- color: #b0b3b8;
71
- margin-right: 2px;
72
- }
73
- }
74
- }
75
- .van-row:nth-child(2) {
76
- margin-top: 8px;
77
- // 统计卡片间距由gutter控制
78
- .van-col {
79
- // 让卡片宽度自适应
80
- .stat-card {
81
- width: 100%;
82
- }
83
- }
84
- }
85
- .stat-card {
86
- display: flex;
87
- flex-direction: column;
88
- align-items: center;
89
- justify-content: center;
90
- border-radius: 12px;
91
- padding: 6px 0 4px 0; // 压缩高度
92
- min-height: 44px; // 压缩高度
93
- position: relative;
94
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
95
- background: #f7f8fa;
96
- .stat-num {
97
- font-size: 1.08rem; // 缩小字体
98
- font-weight: 600;
99
- margin-bottom: 2px;
100
- }
101
- .stat-label {
102
- font-size: 0.82rem; // 缩小字体
103
- margin-bottom: 2px;
104
- }
105
- .stat-icon {
106
- position: absolute;
107
- top: 6px;
108
- right: 8px;
109
- font-size: 1rem;
110
- opacity: 0.4;
111
- }
112
- }
113
- .stat-total {
114
- background: #f0f5ff;
115
- color: #2f54eb;
116
- .stat-num,
117
- .stat-label {
118
- color: #2f54eb;
119
- }
120
- .stat-icon {
121
- color: #2f54eb;
122
- }
123
- }
124
- .stat-done {
125
- background: #e6fffb;
126
- color: #13c2c2;
127
- .stat-num,
128
- .stat-label {
129
- color: #13c2c2;
130
- }
131
- .stat-icon {
132
- color: #13c2c2;
133
- }
134
- }
135
- .stat-processing {
136
- background: #f9f0ff;
137
- color: #b37feb;
138
- .stat-num,
139
- .stat-label {
140
- color: #b37feb;
141
- }
142
- .stat-icon {
143
- color: #b37feb;
144
- }
145
- }
146
- }
147
157
  </style>
@@ -1,36 +1,35 @@
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
 
8
+ // const configName = ref('reviewFormGroup')
9
+ // const serviceName = ref('af-revenue')
10
+
9
11
  // 纯表单
10
- const configName = ref('appapplyuserinfoFormGroup')
11
- const serviceName = ref('af-apply')
12
+ // const configName = ref('form_check_test')
13
+ // const serviceName = ref('af-system')
12
14
 
13
15
  // const configName = ref("计划下发Form")
14
16
  // const serviceName = ref("af-linepatrol")
15
17
 
16
18
  // 表单组
17
- // const configName = ref('lngChargeAuditMobileFormGroup')
18
- // const serviceName = ref('af-gaslink')
19
+ const configName = ref('lngChargeAuditMobileFormGroup')
20
+ const serviceName = ref('af-gaslink')
19
21
 
20
22
  const formData = ref({})
21
23
  const formGroup = ref(null)
22
24
  const route = useRoute()
23
25
  const isInit = ref(false)
24
26
  function submit(_result) {
25
- showDialog({ message: '提交成功' })
26
- history.back()
27
- }
28
- const myXForm = ref([])
29
- function setRef(value: any) {
30
- console.log('myXForm', myXForm)
31
- formGroup.value.setRef(myXForm.value)
32
- console.log(formGroup)
27
+ showDialog({ message: '提交成功' }).then(() => {
28
+ console.log('12121')
29
+ // history.back()
30
+ })
33
31
  }
32
+
34
33
  // 表单组——数据
35
34
  // function initComponents () {
36
35
  // runLogic('getlngChargeAuditMobileFormGroupData', {id: 29}, 'af-gaslink').then((res) => {
@@ -68,16 +67,12 @@ function setRef(value: any) {
68
67
  <!-- v-if="isInit" -->
69
68
  <XFormGroup
70
69
  ref="formGroup"
71
- :config-name="configName"
72
- :service-name="serviceName"
70
+ config-name="ceshi11111FormGroup"
71
+ service-name="af-apply"
73
72
  :group-form-data="formData"
74
73
  mode="新增"
75
74
  @submit="submit"
76
- >
77
- <!-- <template #device="{ setRef, removeRef, item, formData }">
78
- <XFormView :setRef="setRef" :formGroupName="'myXForm'"/>
79
- </template>-->
80
- </XFormGroup>
75
+ />
81
76
  </template>
82
77
  </NormalDataLayout>
83
78
  </template>
@@ -0,0 +1,97 @@
1
+ <script setup lang="ts">
2
+ import XFormGroup from '@af-mobile-client-vue3/components/data/XFormGroup/index.vue'
3
+ import { runLogic } from '@af-mobile-client-vue3/services/api/common'
4
+ import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
5
+ import dayjs from 'dayjs/esm/index'
6
+ import { showToast } from 'vant'
7
+ import { onMounted, ref } from 'vue'
8
+ import { useRoute } from 'vue-router'
9
+
10
+ const configName = ref('appapplyuserinfoFormGroup')
11
+ const serviceName = ref('af-apply')
12
+ const route = useRoute()
13
+ const userInfo = useUserStore().getUserInfo()
14
+ const workflowId = ref('3045')
15
+ const userinfoid = ref('93116')
16
+ const model = ref('编辑')
17
+ const groupFormData = ref({})
18
+
19
+ function submit(res) {
20
+ if (model.value === '新增') {
21
+ res.t_userinfo.f_operate_date = dayjs().format('YYYY-MM-DD HH:mm:ss')
22
+ res.t_userinfo.f_orgid = userInfo.f_orgid
23
+ res.t_userinfo.f_orgname = userInfo.f_orgname
24
+ res.t_userinfo.f_depid = userInfo.f_depid
25
+ res.t_userinfo.f_depname = userInfo.f_depname
26
+ res.t_userinfo.f_operatorid = userInfo.f_operatorid
27
+ res.t_userinfo.f_operator = userInfo.f_operator
28
+ res.t_userinfo.f_workflow_id = this.f_workflow_id
29
+ res.t_userinfo.f_user_state = '预备'
30
+
31
+ res.t_userfiles.f_operate_date = dayjs().format('YYYY-MM-DD HH:mm:ss')
32
+ res.t_userfiles.f_orgid = userInfo.f_orgid
33
+ res.t_userfiles.f_orgname = userInfo.f_orgname
34
+ res.t_userfiles.f_depid = userInfo.f_depid
35
+ res.t_userfiles.f_depname = userInfo.f_depname
36
+ res.t_userfiles.f_operatorid = userInfo.f_operatorid
37
+ res.t_userfiles.f_operator = userInfo.f_operator
38
+ res.t_userfiles.f_workflow_id = this.f_workflow_id
39
+ res.t_userfiles.f_table_state = '待开通'
40
+ }
41
+ let saveData = res
42
+ if (saveData.t_userfiles.f_gasbrand_id.length > 0) {
43
+ saveData.t_userfiles.f_gasbrand_id = saveData.t_userfiles.f_gasbrand_id[0]
44
+ }
45
+ if (saveData.t_userfiles.f_price_id.length > 0) {
46
+ saveData.t_userfiles.f_price_id = saveData.t_userfiles.f_price_id[0]
47
+ }
48
+ if (model.value === '编辑') {
49
+ saveData = Object.assign(saveData, {
50
+ f_operator_record: userInfo.f_operator,
51
+ f_operatorid_record: userInfo.f_operatorid,
52
+ f_orgid_record: userInfo.f_orgid,
53
+ f_orgname_record: userInfo.f_orgname,
54
+ f_depid_record: userInfo.f_depid,
55
+ f_depname_record: userInfo.f_depname,
56
+ })
57
+ }
58
+ runLogic('userFIleSaveLogic', saveData, 'af-revenue').then((res) => {
59
+ showToast('操作成功!')
60
+ history.back()
61
+ })
62
+ }
63
+ const isInit = ref(false)
64
+ function init() {
65
+ if (model.value === '编辑') {
66
+ runLogic('getFileDetailForEdit', { f_userinfo_id: userinfoid.value }, 'af-revenue').then((res) => {
67
+ // if (res.t_userfiles.f_gasmodel_id) {
68
+ // res.t_userfiles.f_gasmodel_id = 76
69
+ // }
70
+ // if (res.t_userfiles.f_price_id) {
71
+ // res.t_userfiles.f_price_id = [res.t_userfiles.f_price_id]
72
+ // }
73
+ console.log('1111111----,', res)
74
+ groupFormData.value = res
75
+ isInit.value = true
76
+ })
77
+ }
78
+ }
79
+ onMounted(() => {
80
+ init()
81
+ })
82
+ </script>
83
+
84
+ <template>
85
+ <XFormGroup
86
+ v-if="isInit"
87
+ mode="修改"
88
+ :config-name="configName"
89
+ :service-name="serviceName"
90
+ :group-form-data="groupFormData"
91
+ @submit="submit"
92
+ />
93
+ </template>
94
+
95
+ <style scoped lang="less">
96
+
97
+ </style>
@@ -1,105 +1,25 @@
1
1
  <script setup lang="ts">
2
- // 组件顶部功能说明:本组件为表单视图,支持通过 setRef 注册自身到父组件
3
2
  import XForm from '@af-mobile-client-vue3/components/data/XForm/index.vue'
4
- import { post } from '@af-mobile-client-vue3/services/restTools'
5
- import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
6
- import dayjs from 'dayjs/esm/index'
7
- import { showFailToast, showToast } from 'vant'
8
- import {computed, defineExpose, defineProps, onMounted, onUnmounted, ref} from 'vue'
9
- import { useRoute } from 'vue-router'
3
+ import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
4
+ import { ref } from 'vue'
10
5
 
11
- const props = withDefaults(defineProps<{
12
- setRef?: (refValue: any) => void
13
- removeRef?: (refValue: any) => void
14
- formGroupName?: string
15
- }>(), {
16
- setRef: () => {},
17
- removeRef: () => {},
18
- formGroupName: '',
19
- })
20
- const configName = ref('mobile_OtherChargeCancelForm')
6
+ const configName = ref('addappapplychargeForm')
21
7
  const serviceName = ref('af-apply')
22
- const route = useRoute()
23
- const userInfo = useUserStore().getUserInfo()
24
- const workflowId = computed(() => route.query.workflowid)
25
- const formData = ref({
26
- f_cancel_reason: '1111',
27
- })
28
8
 
29
- const xFormRef = ref()
30
- const aaa = ref({})
31
- function submit(res: any) {
32
- if (Number(res.charge_money) > Number(res.surplus_money)) {
33
- showFailToast('收费金额不能大于未结金额!!')
34
- return
35
- }
36
- const saveData = {
37
- f_payment_type: res.payment_type,
38
- f_charge_money: res.charge_money,
39
- f_amount_words: res.amount_words,
40
- f_payment_method: res.payment_method,
41
- f_actual_date: res.actual_date,
42
- f_charge_status: '有效',
43
- f_workflow_id: workflowId.value,
44
- f_charge_collectors: userInfo.f_operator,
45
- f_charge_collectors_id: userInfo.f_operatorid,
46
- f_charge_date: dayjs().format('YYYY-MM-DD HH:mm:ss'),
47
- f_filialeid: userInfo.f_orgid,
48
- f_filiale: userInfo.f_orgname,
49
- }
50
- post('api/af-apply/entity/save/t_charge_record', saveData).then((_res) => {
51
- showToast('提交成功!')
52
- history.back()
53
- })
54
- }
55
- function init() {
56
- // runLogic('getApplyBusinessrecode', { f_workflow_id: 854 }, 'af-apply').then((res) => {
57
- // // formData.value = res
58
- // console.log('res==', res)
59
- // }).catch((err) => {
60
- //
61
- // })
62
- setTimeout(() => {
63
- Object.assign(formData.value, { f_cancel_reason: '2222222' })
64
- }, 5000)
65
- }
66
- function validate() {
67
- // 调用 XForm 的 validate 方法
68
- return xFormRef.value?.validate?.() ?? Promise.resolve()
69
- }
70
- function getFormData() {
71
- console.log('自定义表单=====', xFormRef.value.getFormData())
72
- // 获取 XForm 的表单数据
73
- return xFormRef.value?.getFormData?.() ?? {}
74
- }
75
- onMounted(() => {
76
- init()
77
- })
78
- const exposeObj = { validate, getFormData, init, formGroupName: props.formGroupName }
79
- defineExpose(exposeObj)
80
- onMounted(() => {
81
- props.setRef && props.setRef(exposeObj)
82
- })
83
- onUnmounted(() => {
84
- props.removeRef && props.removeRef(exposeObj)
85
- })
86
- // watch(() => props.formData, (newVal) => {
87
- // console.log('变更了===', newVal)
88
- // if (newVal) {
89
- // Object.assign(form, newVal)
90
- // }
91
- // })
9
+ const formGroupAddConstruction = ref(null)
92
10
  </script>
93
11
 
94
12
  <template>
95
- <XForm
96
- ref="xFormRef"
97
- mode="新增"
98
- :config-name="configName"
99
- :service-name="serviceName"
100
- :form-data="formData"
101
- @on-submit="submit"
102
- />
13
+ <NormalDataLayout id="XFormGroupView" title="纯表单">
14
+ <template #layout_content>
15
+ <XForm
16
+ ref="formGroupAddConstruction"
17
+ mode="新增"
18
+ :config-name="configName"
19
+ :service-name="serviceName"
20
+ />
21
+ </template>
22
+ </NormalDataLayout>
103
23
  </template>
104
24
 
105
25
  <style scoped lang="less">
@@ -268,7 +268,7 @@ onMounted(() => {
268
268
  })
269
269
  }
270
270
  catch (e) {
271
- console.debug('读取本地缓存失败', e)
271
+ console.warn('读取本地缓存失败', e)
272
272
  // 未拿到跳过
273
273
  }
274
274
  })
@@ -317,9 +317,9 @@ onMounted(() => {
317
317
  <span>记住密码</span>
318
318
  </div>
319
319
  </VanCol>
320
- <VanCol>
320
+ <!-- <VanCol>
321
321
  <a class="extra_setting_for_reset_password" @click="setLoginState(LoginStateEnum.RESET_PASSWORD)">忘记密码?</a>
322
- </VanCol>
322
+ </VanCol> -->
323
323
  </VanRow>
324
324
  <VanButton class="login_btn btn" type="primary" block native-type="submit" :loading="loading">
325
325
  登 录
package/vite.config.ts CHANGED
@@ -11,8 +11,8 @@ export default ({ mode }: ConfigEnv): UserConfig => {
11
11
 
12
12
  const appProxys = {}
13
13
 
14
- const v4Server = 'http://192.168.50.67:31577'
15
- const v3Server = 'https://wkf.qhgas.com'
14
+ const v4Server = 'http://aote-office.8866.org:31567'
15
+ const v3Server = 'http://aote-office.8866.org:31567'
16
16
  const OSSServerDev = 'http://192.168.50.67:30351'
17
17
  const geoserver = 'http://39.104.49.8:30372'
18
18
  // const OSSServerProd = 'http://192.168.50.67:31351'