af-mobile-client-vue3 1.1.42 → 1.1.43

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.1.42",
4
+ "version": "1.1.43",
5
5
  "description": "Vue + Vite component lib",
6
6
  "license": "MIT",
7
7
  "engines": {
@@ -734,7 +734,7 @@ defineExpose({
734
734
 
735
735
  <style scoped lang="less">
736
736
  #XCellList {
737
- height: calc(100vh - var(--van-nav-bar-height) - 5px);
737
+ height: calc(100vh - var(--van-nav-bar-height) - 20px);
738
738
  display: flex;
739
739
  flex-direction: column;
740
740
  --van-search-padding: 3px;
@@ -953,6 +953,7 @@ defineExpose({
953
953
 
954
954
  .action-btn {
955
955
  min-width: 76px;
956
+ height: 40px;
956
957
  border-radius: 10px;
957
958
  font-size: 1rem;
958
959
  transition: all 0.2s ease;
@@ -218,7 +218,7 @@ defineExpose({ init, form, formGroupName, validate })
218
218
  </VanCellGroup>
219
219
  </div>
220
220
  <div v-if="resolvedSubmitButton && props.mode !== '预览'" class="form-footer-fixed">
221
- <VanButton round block type="primary" native-type="submit">
221
+ <VanButton class="action-btn" round block type="primary" native-type="submit">
222
222
  {{ props.groupFormItems?.btnName ? props.groupFormItems.btnName : '提交' }}
223
223
  </VanButton>
224
224
  <slot />
@@ -228,7 +228,7 @@ defineExpose({ init, form, formGroupName, validate })
228
228
 
229
229
  <style scoped>
230
230
  .x-form-container {
231
- height: calc(100vh - var(--van-nav-bar-height) - 5px);
231
+ height: calc(100vh - var(--van-nav-bar-height) - 20px);
232
232
  display: flex;
233
233
  flex-direction: column;
234
234
  max-height: 100vh;
@@ -239,11 +239,13 @@ defineExpose({ init, form, formGroupName, validate })
239
239
  flex: 1;
240
240
  overflow-y: auto;
241
241
  min-height: 0;
242
- padding: 0 16px;
243
242
  }
244
243
 
245
244
  .form-footer-fixed {
246
245
  margin: 16px;
247
246
  flex-shrink: 0;
247
+ .action-btn {
248
+ border-radius: 10px;
249
+ }
248
250
  }
249
251
  </style>
@@ -837,7 +837,7 @@ function handleAddressConfirm(location) {
837
837
  :rules="[{ required: attr.rule.required === 'true', message: '请选择' }]"
838
838
  @click="readonly ? null : showPicker = true"
839
839
  />
840
- <VanPopup v-model:show="showPicker" round position="bottom" teleport="body">
840
+ <VanPopup v-model:show="showPicker" round position="bottom" teleport="body" overlay-class="date-picker-overlay">
841
841
  <VanPicker
842
842
  v-model="(localValue as Numeric[])"
843
843
  :title="attr.name"
@@ -870,6 +870,7 @@ function handleAddressConfirm(location) {
870
870
  switch-mode="year-month"
871
871
  type="range"
872
872
  teleport="body"
873
+ overlay-class="date-picker-overlay"
873
874
  :show-confirm="attr.showConfirm"
874
875
  @confirm="onCalendarConfirm"
875
876
  />
@@ -888,7 +889,7 @@ function handleAddressConfirm(location) {
888
889
  :rules="[{ required: attr.rule.required === 'true', message: '请选择' }]"
889
890
  @click="readonly ? null : showDataTimePicker()"
890
891
  />
891
- <VanPopup v-model:show="showDatePicker" position="bottom" teleport="body">
892
+ <VanPopup v-model:show="showDatePicker" position="bottom" teleport="body" overlay-class="date-picker-overlay">
892
893
  <VanPickerGroup
893
894
  :title="attr.name"
894
895
  :tabs="['选择日期', '选择时间']"
@@ -925,7 +926,7 @@ function handleAddressConfirm(location) {
925
926
  :rules="[{ required: attr.rule.required === 'true', message: '请选择' }]"
926
927
  @click="showDatePicker = true"
927
928
  />
928
- <VanPopup v-model:show="showDatePicker" position="bottom" teleport="body">
929
+ <VanPopup v-model:show="showDatePicker" position="bottom" teleport="body" overlay-class="date-picker-overlay">
929
930
  <VanPickerGroup
930
931
  :title="attr.name"
931
932
  :tabs="['选择日期', '选择时间']"
@@ -962,7 +963,7 @@ function handleAddressConfirm(location) {
962
963
  :rules="[{ required: attr.rule.required === 'true', message: '请选择' }]"
963
964
  @click="showTimePicker = true"
964
965
  />
965
- <VanPopup v-model:show="showTimePicker" position="bottom" teleport="body">
966
+ <VanPopup v-model:show="showTimePicker" position="bottom" teleport="body" overlay-class="date-picker-overlay">
966
967
  <VanTimePicker
967
968
  v-model="localValue as string[]"
968
969
  :title="attr.name"
@@ -989,7 +990,7 @@ function handleAddressConfirm(location) {
989
990
  :rules="[{ required: attr.rule.required === 'true', message: '请选择' }]"
990
991
  @click="readonly ? null : showArea = true"
991
992
  />
992
- <VanPopup v-model:show="showArea" position="bottom" teleport="body">
993
+ <VanPopup v-model:show="showArea" position="bottom" teleport="body" overlay-class="date-picker-overlay">
993
994
  <VanArea
994
995
  v-model="localValue as string" :title="attr.name" :area-list="areaList"
995
996
  @confirm="onAreaConfirm"
@@ -1063,6 +1064,7 @@ function handleAddressConfirm(location) {
1063
1064
  position="bottom"
1064
1065
  :style="{ height: '80vh' }"
1065
1066
  teleport="body"
1067
+ overlay-class="date-picker-overlay"
1066
1068
  >
1067
1069
  <XLocationPicker
1068
1070
  :default-center="defaultMapCenter"
@@ -1073,5 +1075,7 @@ function handleAddressConfirm(location) {
1073
1075
  </template>
1074
1076
 
1075
1077
  <style scoped>
1076
-
1078
+ .date-picker-overlay {
1079
+ background-color: rgba(0, 0, 0, 0.2); /* 设置为半透明的黑色 */
1080
+ }
1077
1081
  </style>
@@ -1,107 +1,24 @@
1
1
  <script setup lang="ts">
2
2
  import XCellList from '@af-mobile-client-vue3/components/data/XCellList/index.vue'
3
- import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
4
- import { defineEmits, ref } from 'vue'
3
+ import { ref } from 'vue'
5
4
  import { useRouter } from 'vue-router'
6
5
 
7
- // 定义事件
8
- const emit = defineEmits(['deleteRow'])
9
- // 访问路由
10
- const router = useRouter()
11
- // 获取默认值
12
- const idKey = ref('o_id')
6
+ // 巡检计划
7
+ defineOptions({
8
+ name: 'PatrolPlan',
9
+ })
13
10
 
14
- // 简易crud表单测试
11
+ const router = useRouter()
15
12
  const configName = ref('crud_patroltask_managePhoneCRUD')
16
- const serviceName = ref('af-linepatrol')
17
-
18
- // 资源权限测试
19
- // const configName = ref('crud_sources_test')
20
- // const serviceName = ref('af-system')
21
-
22
- // 实际业务测试
23
- // const configName = ref('lngChargeAuditMobileCRUD')
24
- // const serviceName = ref('af-gaslink')
25
-
26
- // 跳转到详情页面
27
- // function toDetail(item) {
28
- // router.push({
29
- // name: 'XCellDetailView',
30
- // params: { id: item[idKey.value] }, // 如果使用命名路由,推荐使用路由参数而不是直接构建 URL
31
- // query: {
32
- // operName: item[operNameKey.value],
33
- // method:item[methodKey.value],
34
- // requestMethod:item[requestMethodKey.value],
35
- // operatorType:item[operatorTypeKey.value],
36
- // operUrl:item[operUrlKey.value],
37
- // operIp:item[operIpKey.value],
38
- // costTime:item[costTimeKey.value],
39
- // operTime:item[operTimeKey.value],
40
- //
41
- // title: item[titleKey.value],
42
- // businessType: item[businessTypeKey.value],
43
- // status:item[statusKey.value]
44
- // }
45
- // })
46
- // }
47
-
48
- // 跳转到表单——以表单组来渲染纯表单
49
- function toDetail(item) {
50
- router.push({
51
- name: 'XFormGroupView',
52
- query: {
53
- id: item[idKey.value],
54
- // id: item.rr_id,
55
- // o_id: item.o_id,
56
- },
57
- })
58
- }
59
-
60
- // 新增功能
61
- // function addOption(totalCount) {
62
- // router.push({
63
- // name: 'XFormView',
64
- // params: { id: totalCount, openid: totalCount },
65
- // query: {
66
- // configName: configName.value,
67
- // serviceName: serviceName.value,
68
- // mode: '新增',
69
- // },
70
- // })
71
- // }
72
-
73
- // 修改功能
74
- // function updateRow(result) {
75
- // router.push({
76
- // name: 'XFormView',
77
- // params: { id: result.o_id, openid: result.o_id },
78
- // query: {
79
- // configName: configName.value,
80
- // serviceName: serviceName.value,
81
- // mode: '修改',
82
- // },
83
- // })
84
- // }
85
-
86
- // 删除功能
87
- function deleteRow(result) {
88
- emit('deleteRow', result.o_id)
89
- }
13
+ const xCellListRefPatrolPlan = ref()
90
14
  </script>
91
15
 
92
16
  <template>
93
- <NormalDataLayout id="XCellListView" title="工作计划">
94
- <template #layout_content>
95
- <XCellList
96
- :config-name="configName"
97
- :service-name="serviceName"
98
- :fix-query-form="{ o_f_oper_name: 'edu_test' }"
99
- :id-key="idKey"
100
- @to-detail="toDetail"
101
- @delete-row="deleteRow"
102
- />
103
- </template>
104
- </NormalDataLayout>
17
+ <XCellList
18
+ ref="xCellListRefPatrolPlan"
19
+ service-name="af-linepatrol"
20
+ :config-name="configName"
21
+ />
105
22
  </template>
106
23
 
107
24
  <style scoped lang="less">
@@ -12,16 +12,19 @@ const formGroupAddConstruction = ref(null)
12
12
  <template>
13
13
  <NormalDataLayout id="XFormGroupView" title="纯表单">
14
14
  <template #layout_content>
15
- <XForm
15
+ <div class="form"> <XForm
16
16
  ref="formGroupAddConstruction"
17
17
  mode="新增"
18
18
  :config-name="configName"
19
19
  :service-name="serviceName"
20
- />
20
+ /></div>
21
+
21
22
  </template>
22
23
  </NormalDataLayout>
23
24
  </template>
24
25
 
25
26
  <style scoped lang="less">
26
-
27
+ .form {
28
+ margin-top: 2px;
29
+ }
27
30
  </style>
package/vite.config.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import type { ConfigEnv, UserConfig } from 'vite'
2
2
  import path from 'node:path'
3
3
  import process from 'node:process'
4
- // import autoprefixer from 'autoprefixer'
5
- // import viewport from 'postcss-mobile-forever'
4
+ import autoprefixer from 'autoprefixer'
5
+ import viewport from 'postcss-mobile-forever'
6
6
  import { loadEnv } from 'vite'
7
7
  import { createVitePlugins } from './build/vite'
8
8
 
@@ -95,15 +95,15 @@ export default ({ mode }: ConfigEnv): UserConfig => {
95
95
  postcss: {
96
96
  plugins: [
97
97
  // 自动获取浏览器的流行度和能够支持的属性,并为 CSS 规则添加前缀
98
- // autoprefixer(),
99
- // viewport({
100
- // appSelector: '#system-app',
101
- // viewportWidth: 375,
102
- // maxDisplayWidth: 800,
103
- // appContainingBlock: 'auto',
104
- // necessarySelectorWhenAuto: '.app-wrapper',
105
- // rootContainingBlockSelectorList: ['van-tabbar', 'van-popup'],
106
- // }),
98
+ autoprefixer(),
99
+ viewport({
100
+ appSelector: '#system-app',
101
+ viewportWidth: 375,
102
+ maxDisplayWidth: 800,
103
+ appContainingBlock: 'auto',
104
+ necessarySelectorWhenAuto: '.app-wrapper',
105
+ rootContainingBlockSelectorList: ['van-tabbar', 'van-popup'],
106
+ }),
107
107
  ],
108
108
  },
109
109
  },