af-mobile-client-vue3 1.1.11 → 1.1.13

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.
@@ -228,7 +228,7 @@ function confirmOption() {
228
228
  const isEmptyObject = Object.keys(conditionParams.value).length === 0
229
229
  emit('update:conditionParams', isEmptyObject ? undefined : conditionParams.value)
230
230
  emit('onRefresh', {})
231
- listFilterMenu.value.toggle(false)
231
+ listFilterMenu.value.close(false)
232
232
  }
233
233
  }
234
234
 
@@ -265,6 +265,10 @@ function handleCloseScanButton() {
265
265
 
266
266
  <!-- 显示选项卡 -->
267
267
  <div class="scan-tab-wrapper">
268
+ <div class="dropdown-title">
269
+ <VanIcon name="scan" class="title-icon" />
270
+ <span class="title-text">扫码功能</span>
271
+ </div>
268
272
  <div class="scan-tabs">
269
273
  <!-- 动态生成扫描模式选项卡 -->
270
274
  <div
@@ -308,6 +312,10 @@ function handleCloseScanButton() {
308
312
  <VanIcon name="filter-o" size="24" class="filter-icon" />
309
313
  </div>
310
314
  </template>
315
+ <div class="dropdown-title">
316
+ <VanIcon name="filter-o" class="title-icon" />
317
+ <span class="title-text">筛选条件</span>
318
+ </div>
311
319
  <div class="order-condition">
312
320
  <template v-if="props.orderList.length > 0">
313
321
  <VanRow justify="space-between" class="filter-title">
@@ -374,14 +382,35 @@ function handleCloseScanButton() {
374
382
  gap: 8px;
375
383
  }
376
384
 
385
+ .dropdown-title {
386
+ padding: 16px;
387
+ background-color: #fff;
388
+ border-bottom: 1px solid #ebedf0;
389
+ margin-bottom: 8px;
390
+ display: flex;
391
+ align-items: center;
392
+ gap: 8px;
393
+ .title-icon {
394
+ font-size: 20px;
395
+ color: #646566;
396
+ }
397
+ .title-text {
398
+ font-size: 18px;
399
+ font-weight: 600;
400
+ color: #323233;
401
+ line-height: 1.4;
402
+ }
403
+ }
404
+
377
405
  .scan-tab-wrapper {
378
- padding: 12px 16px;
406
+ padding: 0;
379
407
  background-color: #fff;
380
408
  .scan-tabs {
381
409
  display: flex;
382
410
  background: #f5f5f5;
383
411
  border-radius: 8px;
384
412
  padding: 2px;
413
+ margin-top: 8px;
385
414
  .scan-tab-item {
386
415
  flex: 1;
387
416
  height: 44px;
@@ -413,21 +442,37 @@ function handleCloseScanButton() {
413
442
  :deep(.van-dropdown-menu__bar) {
414
443
  box-shadow: none;
415
444
  height: auto;
445
+ position: relative;
446
+ z-index: 1;
416
447
  }
417
448
  :deep(.van-dropdown-menu__item) {
418
449
  display: flex;
419
450
  align-items: center;
420
451
  justify-content: center;
452
+ position: relative;
453
+ z-index: 1;
421
454
  }
422
455
  // 隐藏下拉箭头
423
456
  :deep(.van-dropdown-menu__title::after) {
424
457
  display: none !important;
425
458
  }
459
+ // 下拉菜单内容
460
+ :deep(.van-dropdown-item__content) {
461
+ position: fixed;
462
+ z-index: 10;
463
+ background-color: white;
464
+ }
465
+ // 下拉菜单遮罩层
466
+ :deep(.van-overlay) {
467
+ z-index: 9
468
+ }
426
469
  }
427
470
 
428
471
  .filter-icon {
429
472
  color: #333;
430
473
  background-color: rgba(245,245,245);
474
+ position: relative;
475
+ z-index: 1;
431
476
  }
432
477
 
433
478
  .filter-icon-box {
@@ -439,12 +484,14 @@ function handleCloseScanButton() {
439
484
  border-radius: 10px;
440
485
  background-color: rgba(245,245,245);
441
486
  cursor: pointer;
487
+ position: relative;
488
+ z-index: 1;
442
489
  &:active {
443
490
  opacity: 0.7;
444
491
  }
445
492
  }
446
493
  .order-condition {
447
- // padding-bottom: 10px;
494
+ padding: 0 16px 16px;
448
495
  max-height: calc(var(--van-picker-toolbar-height) + var(--van-padding-base) + var(--van-tabs-line-height) + 35vh);
449
496
  overflow-y: auto;
450
497
  width: 100%;
@@ -232,6 +232,8 @@ function updateFile(files, _index) {
232
232
 
233
233
  // 表单校验的类型校验
234
234
  function formTypeCheck(attr, value) {
235
+ if (this.mode === '查询')
236
+ return
235
237
  switch (attr.rule.type) {
236
238
  case 'string':
237
239
  if (value.length === 0) {
@@ -1,11 +1,11 @@
1
1
  import type { RouteLocationNormalized } from 'vue-router'
2
2
  import routes from '@af-mobile-client-vue3/router/routes'
3
+ import useRouteCache from '@af-mobile-client-vue3/stores/modules/routeCache'
3
4
  import useRouteTransitionNameStore from '@af-mobile-client-vue3/stores/modules/routeTransitionName'
4
5
  import setPageTitle from '@af-mobile-client-vue3/utils/set-page-title'
5
6
  // https://router.vuejs.org/zh/
6
7
  import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
7
8
  import 'nprogress/nprogress.css'
8
- import useRouteCache from "@af-mobile-client-vue3/stores/modules/routeCache";
9
9
 
10
10
  const baseUrl = import.meta.env.VITE_APP_PUBLIC_PATH
11
11
  // 创建路由实例并传递 `routes` 配置
@@ -49,7 +49,7 @@ router.beforeEach((to: toRouteType, _from: toRouteType, next) => {
49
49
  }
50
50
  routeTransitionNameStore.setName(name)
51
51
  // 路由缓存
52
- useRouteCache.addRoute(to)
52
+ useRouteCache().addRoute(to)
53
53
  // 页面 title
54
54
  setPageTitle(to.meta.title)
55
55
  next()
@@ -24,6 +24,10 @@ export interface UserInfo {
24
24
  avatar: string
25
25
  functions: Array<any>
26
26
  rolestr: string
27
+ f_operator: string
28
+ f_operatorid: string
29
+ f_orgid: string
30
+ f_orgname: string
27
31
  }
28
32
 
29
33
  interface IUserState {
@@ -1,19 +1,23 @@
1
1
  <script setup lang="ts">
2
2
  import XCellList from '@af-mobile-client-vue3/components/data/XCellList/index.vue'
3
3
  import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
4
+ import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
4
5
  import { defineEmits, ref } from 'vue'
5
6
  import { useRouter } from 'vue-router'
6
7
 
7
8
  // 定义事件
8
9
  const emit = defineEmits(['deleteRow'])
10
+ const userInfo = useUserStore().getUserInfo()
9
11
  // 访问路由
10
12
  const router = useRouter()
11
13
  // 获取默认值
12
14
  const idKey = ref('o_id')
13
15
 
14
16
  // 简易crud表单测试
15
- const configName = ref('crud_oper_log_manage')
16
- const serviceName = ref('af-system')
17
+ // const configName = ref('orderCarInMobileCRUD')
18
+ // const serviceName = ref('af-gaslink')
19
+ const configName = ref('lngPriceManageMobileCRUD')
20
+ const serviceName = ref('af-gaslink')
17
21
 
18
22
  // 资源权限测试
19
23
  // const configName = ref('crud_sources_test')
@@ -49,11 +53,11 @@ const serviceName = ref('af-system')
49
53
  function toDetail(item) {
50
54
  router.push({
51
55
  name: 'XFormGroupView',
52
- query: {
53
- id: item[idKey.value],
54
- // id: item.rr_id,
55
- // o_id: item.o_id,
56
- },
56
+ // query: {
57
+ // id: item[idKey.value],
58
+ // id: item.rr_id,
59
+ // o_id: item.o_id,
60
+ // },
57
61
  })
58
62
  }
59
63
 
@@ -69,19 +73,40 @@ function toDetail(item) {
69
73
  // },
70
74
  // })
71
75
  // }
76
+ function addOption(callback) {
77
+ router.push({
78
+ name: 'XFormGroupView',
79
+ // params: { id: totalCount.value },
80
+ // query: {
81
+ // configName: configName.value,
82
+ // serviceName: serviceName.value,
83
+ // mode: '新增',
84
+ // },
85
+ })
86
+ // 如果存在回调函数,调用它并传递true表示已处理
87
+ if (typeof callback === 'function') {
88
+ callback(true)
89
+ }
90
+ }
72
91
 
73
92
  // 修改功能
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
- // }
93
+ function updateRow(result, callback) {
94
+ console.log('用户----', userInfo)
95
+ router.push({
96
+ name: 'XFormGroupView',
97
+ // params: { id: result.o_id, openid: result.o_id },
98
+ // query: {
99
+ // configName: configName.value,
100
+ // serviceName: serviceName.value,
101
+ // mode: '修改',
102
+ // },
103
+ })
104
+
105
+ // 如果存在回调函数,调用它并传递true表示已处理
106
+ if (typeof callback === 'function') {
107
+ callback(true)
108
+ }
109
+ }
85
110
 
86
111
  // 删除功能
87
112
  function deleteRow(result) {
@@ -95,11 +120,20 @@ function deleteRow(result) {
95
120
  <XCellList
96
121
  :config-name="configName"
97
122
  :service-name="serviceName"
98
- :fix-query-form="{ o_f_oper_name: 'edu_test' }"
99
123
  :id-key="idKey"
100
124
  @to-detail="toDetail"
101
125
  @delete-row="deleteRow"
126
+ @update="updateRow"
127
+ @add="addOption"
102
128
  />
129
+ <!-- <XCellList -->
130
+ <!-- :config-name="configName" -->
131
+ <!-- :service-name="serviceName" -->
132
+ <!-- :fix-query-form="{ o_f_oper_name: 'edu_test' }" -->
133
+ <!-- :id-key="idKey" -->
134
+ <!-- @to-detail="toDetail" -->
135
+ <!-- @delete-row="deleteRow" -->
136
+ <!-- /> -->
103
137
  </template>
104
138
  </NormalDataLayout>
105
139
  </template>
@@ -44,13 +44,13 @@ const formData = reactive({
44
44
  const route = useRoute()
45
45
  const setting = useSettingStore()
46
46
 
47
- const getShow = computed(() => (unref(getLoginState) === LoginStateEnum.LOGIN) && !isWechat())
47
+ const getShow = computed(() => (unref(getLoginState) === LoginStateEnum.LOGIN))
48
48
 
49
49
  const login: any = inject('$login')
50
50
  onBeforeMount(async () => {
51
51
  if (isWechat()) {
52
52
  // 检测是否要开放微信登录
53
- if (setting.getSetting()?.wechatLogin || true) {
53
+ if (setting.getSetting()?.wechatLogin) {
54
54
  try {
55
55
  wxloading.value = true
56
56
  if (route.query.code && route.query.state) {
@@ -159,6 +159,7 @@ function closeWindows() {
159
159
  }
160
160
 
161
161
  async function afterGeneral(result) {
162
+ console.log('用户根本---', result)
162
163
  const user: UserInfo = {
163
164
  id: result.id,
164
165
  username: result.ename,
@@ -167,6 +168,10 @@ async function afterGeneral(result) {
167
168
  avatar: result.avatar ? result.avatar : setting.getSetting()?.defaultAvatarUrl,
168
169
  functions: result.functions,
169
170
  rolestr: result.rolestr,
171
+ f_operator: result.name,
172
+ f_operatorid: result.id,
173
+ f_orgid: result.orgid,
174
+ f_orgname: result.orgs,
170
175
  }
171
176
  userState.setUserInfo(user)
172
177
  // 如果result中没有返回 权限 需要主动获取权限列表