From 7f86ec40cc7b9a982bb8274b9ec8751d860d2a85 Mon Sep 17 00:00:00 2001 From: TimSpan Date: Wed, 11 Sep 2024 10:25:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89tabbar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 自定义tabbar --- .DS_Store | Bin 8196 -> 8196 bytes collect_information/src/app.config.ts | 1 + .../src/custom-tab-bar/index.json.js | 3 + .../src/custom-tab-bar/index.vue | 91 ++++++++++++++++++ collect_information/src/store/index.ts | 12 ++- policeManagement/src/config/index.ts | 58 +++++------ .../src/views/user/user-weapp.vue | 37 +++++++ policeSecurityServer/.DS_Store | Bin 6148 -> 6148 bytes 8 files changed, 171 insertions(+), 31 deletions(-) create mode 100644 collect_information/src/custom-tab-bar/index.json.js create mode 100644 collect_information/src/custom-tab-bar/index.vue diff --git a/.DS_Store b/.DS_Store index 9f68f99cf98332be0912b88bbc5db46e58fca3e5..ed896a86dda3e6de6a35c22324c5bbb0f8276dd7 100644 GIT binary patch delta 522 zcmZp1XmOa}&nUk!U^hRb{A3;h$$EuIJq88_76v_rbcRfZlH7b3m!zEhB%l}vgXlcH zDIUihQRP$c$`@o91}Ep|76A1yFnA?^NLHZPnG7imsSJrZ=}58+0&ximd|+- z$v?wm@*#no`lRyW0;rpIBo*Xj7MB$S)5rNh~QXc1kRY z2Ju4j^K+75?8Kz7%+&ID0TJi?ypqJsywoDFhRl>yppuyI%)FHRa;N;#yp&?F-e8CX z2PX$-ynsZtYqf=?fsTTSp=qs-Lbat4h;3|ETg%BIs;qAv6rY`wo0s1O@+kuYBO`=n z;DypKs(Z4Xpw?tPL0)DBzKcM%8As<$Yl9iU&;@dIgb;y>B&;QX9GWWp3m8C#@RS7? z<>ln(rGu=SoFJq!`JV_c^Mj|MK(^XsKcN~XpgN%N<_|(vj7+!7HtUFNXWGmz@r`Bj LP2oU@z!oL|;}?u4 delta 298 zcmZp1XmOa}&nUYwU^hRb>|`DR$$I&xYzzzxEDU-K=?s|+CAs-7E=f80NkB1;@IyfXVNLRVO=$ z@-jcTnmGA`u*&2D;X1~K&F_Wd8JTV^*c>3booQo%3gc#WiEk{M6~&%0ZY)q_1ON|x BP>28k diff --git a/collect_information/src/app.config.ts b/collect_information/src/app.config.ts index 39ddf66..aec9800 100644 --- a/collect_information/src/app.config.ts +++ b/collect_information/src/app.config.ts @@ -14,6 +14,7 @@ export default defineAppConfig({ navigationBarTextStyle: 'black', }, tabBar: { + custom: true, list: [ { pagePath: 'pages/projectManager/index/index', diff --git a/collect_information/src/custom-tab-bar/index.json.js b/collect_information/src/custom-tab-bar/index.json.js new file mode 100644 index 0000000..29210de --- /dev/null +++ b/collect_information/src/custom-tab-bar/index.json.js @@ -0,0 +1,3 @@ +export default { + "component": true +} diff --git a/collect_information/src/custom-tab-bar/index.vue b/collect_information/src/custom-tab-bar/index.vue new file mode 100644 index 0000000..b6f6e33 --- /dev/null +++ b/collect_information/src/custom-tab-bar/index.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/collect_information/src/store/index.ts b/collect_information/src/store/index.ts index 2c2c89c..7562b84 100644 --- a/collect_information/src/store/index.ts +++ b/collect_information/src/store/index.ts @@ -3,9 +3,17 @@ import {defineStore} from 'pinia' export const useCounterStore = defineStore('counter', { state: () => { return { - userInfo:{} + userInfo: {}, + selected: 0 } }, - actions: {}, + actions: { + setSelected(index: number) { + this.selected = index + } + }, + getters: { + getSelected: (state) => state.selected + } }) diff --git a/policeManagement/src/config/index.ts b/policeManagement/src/config/index.ts index 5df59a0..84191a1 100644 --- a/policeManagement/src/config/index.ts +++ b/policeManagement/src/config/index.ts @@ -1,33 +1,33 @@ export const CLIENT_TYPE = "MANAGEMENT_POLICE"; //登录平台类型 export const ROUTER_WHITE_LIST: string[] = ['/login', '/test', '/register-index']; export const SYSTEM_MENUS: SystemMenu[] = [ - { - title: '首页', - name: 'index', - path: '/index', - type: "menu", - component: () => import('@/views/index.vue') - }, { - title: '单位管理', - name: 'unitManage', - path: '/unitManage', - type: 'dir', - children: [ - { - title: '公安单位', - name: 'policeUnit', - path: '/policeUnit', - type: 'menu', - // icon: 'icon-policeman-full', - // size: '16', - component: () => import('@/views/unitManage/policeUnit/index.vue') - }, { - title: '保安单位', - name: 'securityUnit', - path: '/securityUnit', - type: 'menu', - component: () => import('@/views/unitManage/securityUnit/index.vue') - } - ] - } + // { + // title: '首页', + // name: 'index', + // path: '/index', + // type: "menu", + // component: () => import('@/views/index.vue') + // }, { + // title: '单位管理', + // name: 'unitManage', + // path: '/unitManage', + // type: 'dir', + // children: [ + // { + // title: '公安单位', + // name: 'policeUnit', + // path: '/policeUnit', + // type: 'menu', + // // icon: 'icon-policeman-full', + // // size: '16', + // component: () => import('@/views/unitManage/policeUnit/index.vue') + // }, { + // title: '保安单位', + // name: 'securityUnit', + // path: '/securityUnit', + // type: 'menu', + // component: () => import('@/views/unitManage/securityUnit/index.vue') + // } + // ] + // } ] diff --git a/policeManagement/src/views/user/user-weapp.vue b/policeManagement/src/views/user/user-weapp.vue index d236c38..d660bb4 100644 --- a/policeManagement/src/views/user/user-weapp.vue +++ b/policeManagement/src/views/user/user-weapp.vue @@ -60,6 +60,43 @@ const columns: TableProps['columns'] = [ dataIndex: 'createTime', title: '创建时间', }, + { + dataIndex: 'opt', + title: '操作', + customRender({record}) { + if (record.checkStatus.value === 1) { + return + { + const resp = await api.post('/management/passMiniProgramUser', { + dataId: record.snowFlakeId, + unitOptType: 'POLICE_UNIT' + }) + message.success(resp.message) + await tableRef.value?.requestGetTableData() + }}> + 审核通过 + + + + } + return + + { + const resp = await api.post('/management/disableOrEnable', { + dataId: record.snowFlakeId, + unitOptType: UNIT_TYPE.police + }) + message.success(resp.message) + await tableRef.value?.requestGetTableData() + }} + >{record.isEnable.value === 0 ? '禁用' : '启用'} + + }, + } ] const x: number = columns.reduce((a, b) => a + (b.width as number), 0) diff --git a/policeSecurityServer/.DS_Store b/policeSecurityServer/.DS_Store index 03dd5c3aa2ba99d7392e3c7cd63f8b40dc301d67..307530018fa0c9307fa4a92c6383dc5013a3df5b 100644 GIT binary patch delta 345 zcmZoMXfc=|#>B!ku~2NHo}#b-0|Nsi0|Sss%t<#4PR`FQ*sRFBlDQrv!OEb=kjaq3 zkcyB5iUI+@Dv&^u&CPdlNy^Dj0*Z1d+=}3S<$lZ&T}2836$Kd(>w)@!fXRVjG7nR6 zJsU#_Ln1>FLpsnAB`_C)6fiJcTL~mkB)qu~2NHo}wrR0|Nsi1A_pAVQ_MOZUKnC` p!kcHY<}z(;;9%a&&cV+C)Vf)a<2&6AAzT