chore: 🔨 用户管理临时提交
This commit is contained in:
@@ -90,6 +90,9 @@
|
||||
"watch": true,
|
||||
"watchEffect": true,
|
||||
"watchPostEffect": true,
|
||||
"watchSyncEffect": true
|
||||
"watchSyncEffect": true,
|
||||
"DirectiveBinding": true,
|
||||
"MaybeRef": true,
|
||||
"MaybeRefOrGetter": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
"postcss-html": "^1.7.0",
|
||||
"postcss-scss": "^4.0.9",
|
||||
"prettier": "^3.3.3",
|
||||
"sass": "^1.79.3",
|
||||
"sass": "1.79.3",
|
||||
"sass-loader": "^16.0.2",
|
||||
"stylelint": "^16.9.0",
|
||||
"stylelint-config-html": "^1.1.0",
|
||||
@@ -133,6 +133,5 @@
|
||||
"vite": "5.2.8",
|
||||
"vue-eslint-parser": "^9.4.3",
|
||||
"vue-tsc": "^1.0.24"
|
||||
},
|
||||
"packageManager": "pnpm@9.2.0+sha512.98a80fd11c2e7096747762304106432b3ddc67dcf54b5a8c01c93f68a2cd5e05e6821849522a06fb76284d41a2660d5e334f2ee3bbf29183bf2e739b1dafa771"
|
||||
}
|
||||
}
|
||||
|
||||
13372
pnpm-lock.yaml
generated
13372
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -43,12 +43,6 @@
|
||||
"navigationBarTitleText": "用户管理"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/user/edit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "编辑用户"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/log/index",
|
||||
"style": {
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
<template>
|
||||
<view> 编辑用户,ID:{{ id }} </view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
// uniapp 获取url参数 id 不使用vue-router
|
||||
|
||||
const pages = getCurrentPages();
|
||||
const currentPage = pages[pages.length - 1];
|
||||
const options = (currentPage as any).options;
|
||||
const id = ref(options.id);
|
||||
console.log("ID:", id);
|
||||
</script>
|
||||
@@ -8,7 +8,11 @@
|
||||
<view class="flex items-center">
|
||||
<image class="w-100rpx h-100rpx rounded-full" :src="item.avatar" />
|
||||
<view class="ml-2">
|
||||
<view class="font-bold">{{ item.nickname }}</view>
|
||||
<view class="font-bold">
|
||||
{{ item.nickname }}
|
||||
<wd-icon v-if="item.gender == 1" name="gender-male" class="color-#4D80F0" />
|
||||
<wd-icon v-else-if="item.gender == 2" name="gender-female" class="color-#fa4350" />
|
||||
</view>
|
||||
<view class="text-12px mt-1">{{ item.deptName }}</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -16,34 +20,63 @@
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view>
|
||||
<view class="flex items-center">
|
||||
<wd-icon name="usergroup" size="16" class="mr-1" />
|
||||
<view>{{ item.roleNames }}</view>
|
||||
<view class="flex justify-between">
|
||||
<view>
|
||||
<view class="flex items-center">
|
||||
<wd-icon name="usergroup" size="16" class="mr-1" />
|
||||
<view>{{ item.roleNames }}</view>
|
||||
</view>
|
||||
|
||||
<view class="flex items-center">
|
||||
<wd-icon name="mobile" size="16" class="mr-1" />
|
||||
<view>{{ item.mobile }}</view>
|
||||
</view>
|
||||
<view class="flex items-center">
|
||||
<wd-icon name="mail" size="16" class="mr-1" />
|
||||
<view>{{ item.email }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="flex items-center">
|
||||
<wd-icon name="mobile" size="16" class="mr-1" />
|
||||
<view>{{ item.mobile }}</view>
|
||||
</view>
|
||||
<view class="flex items-center">
|
||||
<wd-icon name="mail" size="16" class="mr-1" />
|
||||
<view>{{ item.email }}</view>
|
||||
<view>
|
||||
{{ item.status == 1 ? "启用" : "禁用" }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<template #footer>
|
||||
<wd-button size="small" plain>编辑</wd-button>
|
||||
<wd-button size="small" plain @click="handleOpenDialog(item.id)">编辑</wd-button>
|
||||
<wd-button type="warning" size="small" plain class="ml-2">删除</wd-button>
|
||||
</template>
|
||||
</wd-card>
|
||||
|
||||
<wd-loadmore :state="state" @reload="loadmore" />
|
||||
|
||||
<wd-popup v-model="dialog.visible" position="bottom" custom-style="min-height: 200px;">
|
||||
<wd-form :model="formData">
|
||||
<wd-cell-group>
|
||||
<wd-cell title="昵称" title-width="200rpx">
|
||||
<wd-input v-model="formData.nickname" />
|
||||
</wd-cell>
|
||||
<wd-cell title="手机号" title-width="200rpx">
|
||||
<wd-input v-model="formData.mobile" />
|
||||
</wd-cell>
|
||||
<wd-cell title="邮箱" title-width="200rpx">
|
||||
<wd-input v-model="formData.email" />
|
||||
</wd-cell>
|
||||
<wd-cell title="状态" title-width="200rpx">
|
||||
<wd-switch v-model="formData.status" />
|
||||
</wd-cell>
|
||||
</wd-cell-group>
|
||||
</wd-form>
|
||||
<view class="footer">
|
||||
<wd-button type="primary" block @click="handleSubmit">提交</wd-button>
|
||||
</view>
|
||||
</wd-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { LoadMoreState } from "wot-design-uni/components/wd-loadmore/types";
|
||||
import UserAPI, { type UserPageQuery, UserPageVO } from "@/api/system/user";
|
||||
import { LoadMoreState } from "wd-design-uni/components/wd-loadmore/types";
|
||||
import UserAPI, { type UserPageQuery, UserPageVO, UserForm } from "@/api/system/user";
|
||||
|
||||
const state = ref<LoadMoreState>("loading"); // 加载状态 loading, finished:, error
|
||||
const dataList = ref<UserPageVO[]>([]);
|
||||
@@ -55,6 +88,12 @@ const queryParams: UserPageQuery = {
|
||||
|
||||
const total = ref(0); // 总数
|
||||
|
||||
const dialog = reactive({
|
||||
visible: false,
|
||||
});
|
||||
|
||||
const formData = reactive<UserForm>({});
|
||||
|
||||
onReachBottom(() => {
|
||||
if (queryParams.pageNum * queryParams.pageSize < total.value) {
|
||||
loadmore();
|
||||
@@ -83,6 +122,13 @@ function handleSort() {
|
||||
dataList.value = dataList.value?.reverse();
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开弹窗
|
||||
*/
|
||||
function handleOpenDialog(id: number) {
|
||||
dialog.visible = true;
|
||||
}
|
||||
|
||||
function handleEdit(row: UserPageVO) {
|
||||
console.log("编辑", row);
|
||||
uni.navigateTo({
|
||||
@@ -94,6 +140,10 @@ function handleDelete(row: UserPageVO) {
|
||||
console.log("删除", row);
|
||||
}
|
||||
|
||||
function handleSubmit() {
|
||||
console.log("提交", formData);
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
loadmore();
|
||||
});
|
||||
|
||||
189
src/types/auto-imports.d.ts
vendored
189
src/types/auto-imports.d.ts
vendored
@@ -6,95 +6,110 @@
|
||||
// biome-ignore lint: disable
|
||||
export {}
|
||||
declare global {
|
||||
const EffectScope: typeof import('vue')['EffectScope']
|
||||
const computed: typeof import('vue')['computed']
|
||||
const createApp: typeof import('vue')['createApp']
|
||||
const customRef: typeof import('vue')['customRef']
|
||||
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
|
||||
const defineComponent: typeof import('vue')['defineComponent']
|
||||
const effectScope: typeof import('vue')['effectScope']
|
||||
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
|
||||
const getCurrentScope: typeof import('vue')['getCurrentScope']
|
||||
const h: typeof import('vue')['h']
|
||||
const inject: typeof import('vue')['inject']
|
||||
const isProxy: typeof import('vue')['isProxy']
|
||||
const isReactive: typeof import('vue')['isReactive']
|
||||
const isReadonly: typeof import('vue')['isReadonly']
|
||||
const isRef: typeof import('vue')['isRef']
|
||||
const markRaw: typeof import('vue')['markRaw']
|
||||
const nextTick: typeof import('vue')['nextTick']
|
||||
const onActivated: typeof import('vue')['onActivated']
|
||||
const onAddToFavorites: typeof import('@dcloudio/uni-app')['onAddToFavorites']
|
||||
const onBackPress: typeof import('@dcloudio/uni-app')['onBackPress']
|
||||
const onBeforeMount: typeof import('vue')['onBeforeMount']
|
||||
const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
|
||||
const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
|
||||
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
|
||||
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
|
||||
const onDeactivated: typeof import('vue')['onDeactivated']
|
||||
const onError: typeof import('@dcloudio/uni-app')['onError']
|
||||
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
|
||||
const onHide: typeof import('@dcloudio/uni-app')['onHide']
|
||||
const onLaunch: typeof import('@dcloudio/uni-app')['onLaunch']
|
||||
const onLoad: typeof import('@dcloudio/uni-app')['onLoad']
|
||||
const onMounted: typeof import('vue')['onMounted']
|
||||
const onNavigationBarButtonTap: typeof import('@dcloudio/uni-app')['onNavigationBarButtonTap']
|
||||
const onNavigationBarSearchInputChanged: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputChanged']
|
||||
const onNavigationBarSearchInputClicked: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputClicked']
|
||||
const onNavigationBarSearchInputConfirmed: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputConfirmed']
|
||||
const onNavigationBarSearchInputFocusChanged: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputFocusChanged']
|
||||
const onPageNotFound: typeof import('@dcloudio/uni-app')['onPageNotFound']
|
||||
const onPageScroll: typeof import('@dcloudio/uni-app')['onPageScroll']
|
||||
const onPullDownRefresh: typeof import('@dcloudio/uni-app')['onPullDownRefresh']
|
||||
const onReachBottom: typeof import('@dcloudio/uni-app')['onReachBottom']
|
||||
const onReady: typeof import('@dcloudio/uni-app')['onReady']
|
||||
const onRenderTracked: typeof import('vue')['onRenderTracked']
|
||||
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
|
||||
const onResize: typeof import('@dcloudio/uni-app')['onResize']
|
||||
const onScopeDispose: typeof import('vue')['onScopeDispose']
|
||||
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
|
||||
const onShareAppMessage: typeof import('@dcloudio/uni-app')['onShareAppMessage']
|
||||
const onShareTimeline: typeof import('@dcloudio/uni-app')['onShareTimeline']
|
||||
const onShow: typeof import('@dcloudio/uni-app')['onShow']
|
||||
const onTabItemTap: typeof import('@dcloudio/uni-app')['onTabItemTap']
|
||||
const onThemeChange: typeof import('@dcloudio/uni-app')['onThemeChange']
|
||||
const onUnhandledRejection: typeof import('@dcloudio/uni-app')['onUnhandledRejection']
|
||||
const onUnload: typeof import('@dcloudio/uni-app')['onUnload']
|
||||
const onUnmounted: typeof import('vue')['onUnmounted']
|
||||
const onUpdated: typeof import('vue')['onUpdated']
|
||||
const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
|
||||
const provide: typeof import('vue')['provide']
|
||||
const reactive: typeof import('vue')['reactive']
|
||||
const readonly: typeof import('vue')['readonly']
|
||||
const ref: typeof import('vue')['ref']
|
||||
const resolveComponent: typeof import('vue')['resolveComponent']
|
||||
const shallowReactive: typeof import('vue')['shallowReactive']
|
||||
const shallowReadonly: typeof import('vue')['shallowReadonly']
|
||||
const shallowRef: typeof import('vue')['shallowRef']
|
||||
const toRaw: typeof import('vue')['toRaw']
|
||||
const toRef: typeof import('vue')['toRef']
|
||||
const toRefs: typeof import('vue')['toRefs']
|
||||
const toValue: typeof import('vue')['toValue']
|
||||
const triggerRef: typeof import('vue')['triggerRef']
|
||||
const unref: typeof import('vue')['unref']
|
||||
const useAttrs: typeof import('vue')['useAttrs']
|
||||
const useCssModule: typeof import('vue')['useCssModule']
|
||||
const useCssVars: typeof import('vue')['useCssVars']
|
||||
const useId: typeof import('vue')['useId']
|
||||
const useLink: typeof import('vue-router')['useLink']
|
||||
const useModel: typeof import('vue')['useModel']
|
||||
const useRoute: typeof import('vue-router')['useRoute']
|
||||
const useRouter: typeof import('vue-router')['useRouter']
|
||||
const useSlots: typeof import('vue')['useSlots']
|
||||
const useTemplateRef: typeof import('vue')['useTemplateRef']
|
||||
const watch: typeof import('vue')['watch']
|
||||
const watchEffect: typeof import('vue')['watchEffect']
|
||||
const watchPostEffect: typeof import('vue')['watchPostEffect']
|
||||
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
|
||||
const EffectScope: (typeof import("vue"))["EffectScope"];
|
||||
const computed: (typeof import("vue"))["computed"];
|
||||
const createApp: (typeof import("vue"))["createApp"];
|
||||
const customRef: (typeof import("vue"))["customRef"];
|
||||
const defineAsyncComponent: (typeof import("vue"))["defineAsyncComponent"];
|
||||
const defineComponent: (typeof import("vue"))["defineComponent"];
|
||||
const effectScope: (typeof import("vue"))["effectScope"];
|
||||
const getCurrentInstance: (typeof import("vue"))["getCurrentInstance"];
|
||||
const getCurrentScope: (typeof import("vue"))["getCurrentScope"];
|
||||
const h: (typeof import("vue"))["h"];
|
||||
const inject: (typeof import("vue"))["inject"];
|
||||
const isProxy: (typeof import("vue"))["isProxy"];
|
||||
const isReactive: (typeof import("vue"))["isReactive"];
|
||||
const isReadonly: (typeof import("vue"))["isReadonly"];
|
||||
const isRef: (typeof import("vue"))["isRef"];
|
||||
const markRaw: (typeof import("vue"))["markRaw"];
|
||||
const nextTick: (typeof import("vue"))["nextTick"];
|
||||
const onActivated: (typeof import("vue"))["onActivated"];
|
||||
const onAddToFavorites: (typeof import("@dcloudio/uni-app"))["onAddToFavorites"];
|
||||
const onBackPress: (typeof import("@dcloudio/uni-app"))["onBackPress"];
|
||||
const onBeforeMount: (typeof import("vue"))["onBeforeMount"];
|
||||
const onBeforeRouteLeave: (typeof import("vue-router"))["onBeforeRouteLeave"];
|
||||
const onBeforeRouteUpdate: (typeof import("vue-router"))["onBeforeRouteUpdate"];
|
||||
const onBeforeUnmount: (typeof import("vue"))["onBeforeUnmount"];
|
||||
const onBeforeUpdate: (typeof import("vue"))["onBeforeUpdate"];
|
||||
const onDeactivated: (typeof import("vue"))["onDeactivated"];
|
||||
const onError: (typeof import("@dcloudio/uni-app"))["onError"];
|
||||
const onErrorCaptured: (typeof import("vue"))["onErrorCaptured"];
|
||||
const onHide: (typeof import("@dcloudio/uni-app"))["onHide"];
|
||||
const onLaunch: (typeof import("@dcloudio/uni-app"))["onLaunch"];
|
||||
const onLoad: (typeof import("@dcloudio/uni-app"))["onLoad"];
|
||||
const onMounted: (typeof import("vue"))["onMounted"];
|
||||
const onNavigationBarButtonTap: (typeof import("@dcloudio/uni-app"))["onNavigationBarButtonTap"];
|
||||
const onNavigationBarSearchInputChanged: (typeof import("@dcloudio/uni-app"))["onNavigationBarSearchInputChanged"];
|
||||
const onNavigationBarSearchInputClicked: (typeof import("@dcloudio/uni-app"))["onNavigationBarSearchInputClicked"];
|
||||
const onNavigationBarSearchInputConfirmed: (typeof import("@dcloudio/uni-app"))["onNavigationBarSearchInputConfirmed"];
|
||||
const onNavigationBarSearchInputFocusChanged: (typeof import("@dcloudio/uni-app"))["onNavigationBarSearchInputFocusChanged"];
|
||||
const onPageNotFound: (typeof import("@dcloudio/uni-app"))["onPageNotFound"];
|
||||
const onPageScroll: (typeof import("@dcloudio/uni-app"))["onPageScroll"];
|
||||
const onPullDownRefresh: (typeof import("@dcloudio/uni-app"))["onPullDownRefresh"];
|
||||
const onReachBottom: (typeof import("@dcloudio/uni-app"))["onReachBottom"];
|
||||
const onReady: (typeof import("@dcloudio/uni-app"))["onReady"];
|
||||
const onRenderTracked: (typeof import("vue"))["onRenderTracked"];
|
||||
const onRenderTriggered: (typeof import("vue"))["onRenderTriggered"];
|
||||
const onResize: (typeof import("@dcloudio/uni-app"))["onResize"];
|
||||
const onScopeDispose: (typeof import("vue"))["onScopeDispose"];
|
||||
const onServerPrefetch: (typeof import("vue"))["onServerPrefetch"];
|
||||
const onShareAppMessage: (typeof import("@dcloudio/uni-app"))["onShareAppMessage"];
|
||||
const onShareTimeline: (typeof import("@dcloudio/uni-app"))["onShareTimeline"];
|
||||
const onShow: (typeof import("@dcloudio/uni-app"))["onShow"];
|
||||
const onTabItemTap: (typeof import("@dcloudio/uni-app"))["onTabItemTap"];
|
||||
const onThemeChange: (typeof import("@dcloudio/uni-app"))["onThemeChange"];
|
||||
const onUnhandledRejection: (typeof import("@dcloudio/uni-app"))["onUnhandledRejection"];
|
||||
const onUnload: (typeof import("@dcloudio/uni-app"))["onUnload"];
|
||||
const onUnmounted: (typeof import("vue"))["onUnmounted"];
|
||||
const onUpdated: (typeof import("vue"))["onUpdated"];
|
||||
const onWatcherCleanup: (typeof import("vue"))["onWatcherCleanup"];
|
||||
const provide: (typeof import("vue"))["provide"];
|
||||
const reactive: (typeof import("vue"))["reactive"];
|
||||
const readonly: (typeof import("vue"))["readonly"];
|
||||
const ref: (typeof import("vue"))["ref"];
|
||||
const resolveComponent: (typeof import("vue"))["resolveComponent"];
|
||||
const shallowReactive: (typeof import("vue"))["shallowReactive"];
|
||||
const shallowReadonly: (typeof import("vue"))["shallowReadonly"];
|
||||
const shallowRef: (typeof import("vue"))["shallowRef"];
|
||||
const toRaw: (typeof import("vue"))["toRaw"];
|
||||
const toRef: (typeof import("vue"))["toRef"];
|
||||
const toRefs: (typeof import("vue"))["toRefs"];
|
||||
const toValue: (typeof import("vue"))["toValue"];
|
||||
const triggerRef: (typeof import("vue"))["triggerRef"];
|
||||
const unref: (typeof import("vue"))["unref"];
|
||||
const useAttrs: (typeof import("vue"))["useAttrs"];
|
||||
const useCssModule: (typeof import("vue"))["useCssModule"];
|
||||
const useCssVars: (typeof import("vue"))["useCssVars"];
|
||||
const useId: (typeof import("vue"))["useId"];
|
||||
const useLink: (typeof import("vue-router"))["useLink"];
|
||||
const useModel: (typeof import("vue"))["useModel"];
|
||||
const useRoute: (typeof import("vue-router"))["useRoute"];
|
||||
const useRouter: (typeof import("vue-router"))["useRouter"];
|
||||
const useSlots: (typeof import("vue"))["useSlots"];
|
||||
const useTemplateRef: (typeof import("vue"))["useTemplateRef"];
|
||||
const watch: (typeof import("vue"))["watch"];
|
||||
const watchEffect: (typeof import("vue"))["watchEffect"];
|
||||
const watchPostEffect: (typeof import("vue"))["watchPostEffect"];
|
||||
const watchSyncEffect: (typeof import("vue"))["watchSyncEffect"];
|
||||
}
|
||||
// for type re-export
|
||||
declare global {
|
||||
// @ts-ignore
|
||||
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
|
||||
import('vue')
|
||||
export type {
|
||||
Component,
|
||||
ComponentPublicInstance,
|
||||
ComputedRef,
|
||||
DirectiveBinding,
|
||||
ExtractDefaultPropTypes,
|
||||
ExtractPropTypes,
|
||||
ExtractPublicPropTypes,
|
||||
InjectionKey,
|
||||
PropType,
|
||||
Ref,
|
||||
MaybeRef,
|
||||
MaybeRefOrGetter,
|
||||
VNode,
|
||||
WritableComputedRef,
|
||||
} from "vue";
|
||||
import("vue");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user