diff --git a/.gitea/workflows/dev.yml b/.gitea/workflows/dev.yml index a70db09c..b0900e97 100644 --- a/.gitea/workflows/dev.yml +++ b/.gitea/workflows/dev.yml @@ -1,37 +1,37 @@ -name: Gitea Actions Demo run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 -on: [push] - +on: + push: + branches: + - master jobs: - Explore-Gitea-Actions: - runs-on: ubuntu-22.04 + runs-on: ubuntu steps: + - name: 拉取代码仓库 + uses: http://git.missmoc.top/mocheng/checkout@v4 - - name: Checkout code - uses: http://47.109.37.87:3000/bichangxiong/checkout@v4 # 使用 Gitea 镜像 - with: - fetch-depth: 1 # 只拉取最新一次提交 - - name: Set up Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: http://git.missmoc.top/mocheng/setup-node@v3 with: node-version: 20.x - - name: pnpm + - name: pnpm run: npm i pnpm -g - name: node - run: pnpm i + run: | + pnpm config set registry https://registry.npmmirror.com + pnpm install + - name: Build run: pnpm build:antd - name: copy file via ssh password - uses: appleboy/scp-action@v0.1.7 + uses: http://git.missmoc.top/mocheng/scp-action@v0.1.7 with: - host: 192.168.1.3 - username: root - password: by@2025! - port: 22 + host: 127.0.0.1 + username: ${ { SERVER_NAME } } + password: ${{ SERVER_PWD}} + port: 11001 source: "./apps/web-antd/dist" - target: "/project/wl/web/dist" - + target: "/www/wwwroot/183.230.235.66_11010/property" + diff --git a/apps/web-antd/package.json b/apps/web-antd/package.json index 0007c442..499e5d14 100644 --- a/apps/web-antd/package.json +++ b/apps/web-antd/package.json @@ -27,6 +27,9 @@ }, "dependencies": { "@ant-design/icons-vue": "^7.0.1", + "@dataview/datav-vue3": "0.0.0-test.1672506674342", + "@jiaminghi/charts": "^0.2.18", + "@jiaminghi/data-view": "^2.10.0", "@tinymce/tinymce-vue": "^6.0.1", "@vben/access": "workspace:*", "@vben/common-ui": "workspace:*", diff --git a/apps/web-antd/src/api/cockpit/cockpit.ts b/apps/web-antd/src/api/cockpit/cockpit.ts new file mode 100644 index 00000000..bad54c5a --- /dev/null +++ b/apps/web-antd/src/api/cockpit/cockpit.ts @@ -0,0 +1,48 @@ + +import { requestClient } from '#/api/request'; + +/** + * 大屏接口 + */ + +/** + * 访客 + */ +export function visitir() { + return requestClient.get('/property/cockpit/visitor'); +} + +/** + *费用 + */ +export function expenses() { + return requestClient.get('/property/cockpit/expenses'); +} + +/** + * 物业人员配置 + */ +export function propertyPerson() { + return requestClient.get('/property/cockpit/propertyperson'); +} + +/** + * sos报警 + */ +export function sos() { + return requestClient.get('/property/cockpit/sos'); +} + +/** + * sos报警记录 + */ +export function soslist() { + return requestClient.get('/property/cockpit/soslist'); +} + +/** + * 工单 + */ +export function workcount() { + return requestClient.get('/property/cockpit/workcount'); +} diff --git a/apps/web-antd/src/api/property/questionnaire/question/index.ts b/apps/web-antd/src/api/property/customerService/questionnaire/question/index.ts similarity index 100% rename from apps/web-antd/src/api/property/questionnaire/question/index.ts rename to apps/web-antd/src/api/property/customerService/questionnaire/question/index.ts diff --git a/apps/web-antd/src/api/property/questionnaire/question/model.d.ts b/apps/web-antd/src/api/property/customerService/questionnaire/question/model.d.ts similarity index 83% rename from apps/web-antd/src/api/property/questionnaire/question/model.d.ts rename to apps/web-antd/src/api/property/customerService/questionnaire/question/model.d.ts index c5367713..11d169dd 100644 --- a/apps/web-antd/src/api/property/questionnaire/question/model.d.ts +++ b/apps/web-antd/src/api/property/customerService/questionnaire/question/model.d.ts @@ -1,4 +1,7 @@ import type { PageQuery, BaseEntity } from '#/api/common'; +import type { + QuestionItemForm +} from "#/api/property/customerService/questionnaire/questionItem/model"; export interface QuestionVO { /** @@ -57,7 +60,7 @@ export interface QuestionForm extends BaseEntity { /** * 问题类型(1单行文本2多行文本3单选题4多选题5评分题6日期选择) */ - type?: string; + type: string; /** * 是否必填(1不必填2必填) @@ -74,6 +77,21 @@ export interface QuestionForm extends BaseEntity { */ sort?: number; + /** + * 选项 + */ + questionnaireQuestionItems:QuestionItemForm[] + + /** + * 评分预览 + */ + rate?:number; + + /** + * 时间预览 + */ + dateTime?:string; + } export interface QuestionQuery extends PageQuery { diff --git a/apps/web-antd/src/api/property/questionnaire/questionItem/index.ts b/apps/web-antd/src/api/property/customerService/questionnaire/questionItem/index.ts similarity index 100% rename from apps/web-antd/src/api/property/questionnaire/questionItem/index.ts rename to apps/web-antd/src/api/property/customerService/questionnaire/questionItem/index.ts diff --git a/apps/web-antd/src/api/property/questionnaire/questionItem/model.d.ts b/apps/web-antd/src/api/property/customerService/questionnaire/questionItem/model.d.ts similarity index 100% rename from apps/web-antd/src/api/property/questionnaire/questionItem/model.d.ts rename to apps/web-antd/src/api/property/customerService/questionnaire/questionItem/model.d.ts diff --git a/apps/web-antd/src/api/property/questionnaire/questionnaire/index.ts b/apps/web-antd/src/api/property/customerService/questionnaire/questionnaire/index.ts similarity index 100% rename from apps/web-antd/src/api/property/questionnaire/questionnaire/index.ts rename to apps/web-antd/src/api/property/customerService/questionnaire/questionnaire/index.ts diff --git a/apps/web-antd/src/api/property/questionnaire/questionnaire/model.d.ts b/apps/web-antd/src/api/property/customerService/questionnaire/questionnaire/model.d.ts similarity index 89% rename from apps/web-antd/src/api/property/questionnaire/questionnaire/model.d.ts rename to apps/web-antd/src/api/property/customerService/questionnaire/questionnaire/model.d.ts index d28fca41..97390bf9 100644 --- a/apps/web-antd/src/api/property/questionnaire/questionnaire/model.d.ts +++ b/apps/web-antd/src/api/property/customerService/questionnaire/questionnaire/model.d.ts @@ -1,4 +1,5 @@ import type { PageQuery, BaseEntity } from '#/api/common'; +import type {QuestionForm} from "#/api/property/customerService/questionnaire/question/model"; export interface QuestionnaireVO { /** @@ -74,6 +75,11 @@ export interface QuestionnaireForm extends BaseEntity { */ status?: string; + /** + * 问题 + */ + questionnaireQuestions:QuestionForm[]; + } export interface QuestionnaireQuery extends PageQuery { diff --git a/apps/web-antd/src/bootstrap.ts b/apps/web-antd/src/bootstrap.ts index a6d65a40..45d2df24 100644 --- a/apps/web-antd/src/bootstrap.ts +++ b/apps/web-antd/src/bootstrap.ts @@ -17,6 +17,8 @@ import { initSetupVbenForm } from './adapter/form'; import App from './app.vue'; import { router } from './router'; + + async function bootstrap(namespace: string) { // 初始化组件适配器 await initComponentAdapter(); @@ -43,6 +45,7 @@ async function bootstrap(namespace: string) { spinning: 'spinning', }); + // 国际化 i18n 配置 await setupI18n(app); @@ -59,6 +62,7 @@ async function bootstrap(namespace: string) { // 配置路由及路由守卫 app.use(router); + // 配置Motion插件 const { MotionPlugin } = await import('@vben/plugins/motion'); app.use(MotionPlugin); diff --git a/apps/web-antd/src/layouts/basic.vue b/apps/web-antd/src/layouts/basic.vue index fffb92c6..f87a5fbd 100644 --- a/apps/web-antd/src/layouts/basic.vue +++ b/apps/web-antd/src/layouts/basic.vue @@ -146,7 +146,7 @@ watch( :avatar :menus :text="userStore.userInfo?.realName" - description="ann.vben@gmail.com" + :description="userStore.userInfo?.roles[0]" tag-text="Pro" @logout="handleLogout" /> diff --git a/apps/web-antd/src/main.ts b/apps/web-antd/src/main.ts index f58a0b98..f3228461 100644 --- a/apps/web-antd/src/main.ts +++ b/apps/web-antd/src/main.ts @@ -1,6 +1,7 @@ import { initPreferences } from '@vben/preferences'; import { unmountGlobalLoading } from '@vben/utils'; import { overridesPreferences } from './preferences'; + /** * 应用初始化完成之后再进行页面加载渲染 */ diff --git a/apps/web-antd/src/router/routes/core.ts b/apps/web-antd/src/router/routes/core.ts index a966a897..4a15fc27 100644 --- a/apps/web-antd/src/router/routes/core.ts +++ b/apps/web-antd/src/router/routes/core.ts @@ -125,8 +125,18 @@ const coreRoutes: RouteRecordRaw[] = [ title: '物业大屏', requiresAuth: true, // 如果需要登录验证 }, - }, { - component: () => import('#/views/screen/security/index.vue'), + }, + // { + // component: () => import('#/views/screen/security/index.vue'), + // name: 'security', + // path: '/security', + // meta: { + // title: '安防大屏', + // requiresAuth: true, // 如果需要登录验证 + // }, + // }, + { + component: () => import('#/views/cockpit/security/index.vue'), name: 'security', path: '/security', meta: { @@ -143,15 +153,15 @@ const coreRoutes: RouteRecordRaw[] = [ requiresAuth: true, // 如果需要登录验证 }, }, - { - component: () => import('#/views/screen/security/index.vue'), - name: 'security', - path: '/security', - meta: { - title: '安防大屏', - requiresAuth: true, // 如果需要登录验证 - }, - }, + // { + // component: () => import('#/views/screen/security/index.vue'), + // name: 'security', + // path: '/security', + // meta: { + // title: '安防大屏', + // requiresAuth: true, // 如果需要登录验证 + // }, + // }, { component: () => import('#/views/screen/digitalIntelligence/index.vue'), name: 'digitalIntelligence', diff --git a/apps/web-antd/src/store/notify.ts b/apps/web-antd/src/store/notify.ts index 4fd0a951..a183ba15 100644 --- a/apps/web-antd/src/store/notify.ts +++ b/apps/web-antd/src/store/notify.ts @@ -24,7 +24,7 @@ export const useNotifyStore = defineStore( * return才会被持久化 存储全部消息 */ const notificationList = ref([]); - + const sseList = ref(["111"]); const userStore = useUserStore(); const userId = computed(() => { return userStore.userInfo?.userId || '0'; @@ -65,24 +65,33 @@ export const useNotifyStore = defineStore( if (!message) return; console.log(`接收到消息: ${message}`); - notification.success({ - description: message, - duration: 3, - message: $t('component.notice.received'), - }); + try { + // 尝试解析JSON + const obj = JSON.parse(message); + // 检查解析结果是否为对象且不为null + if (obj.getType() ==="yvjin"){ + sseList.value.join(message) + } + } catch (e) { + notification.success({ + description: message, + duration: 3, + message: $t('component.notice.received'), + }); - notificationList.value.unshift({ - // avatar: `https://api.multiavatar.com/${random(0, 10_000)}.png`, 随机头像 - avatar: SvgMessageUrl, - date: dayjs().format('YYYY-MM-DD HH:mm:ss'), - isRead: false, - message, - title: $t('component.notice.title'), - userId: userId.value, - }); + notificationList.value.unshift({ + // avatar: `https://api.multiavatar.com/${random(0, 10_000)}.png`, 随机头像 + avatar: SvgMessageUrl, + date: dayjs().format('YYYY-MM-DD HH:mm:ss'), + isRead: false, + message, + title: $t('component.notice.title'), + userId: userId.value, + }); - // 需要手动置空 vue3在值相同时不会触发watch - data.value = null; + // 需要手动置空 vue3在值相同时不会触发watch + data.value = null; + } }); } @@ -96,6 +105,10 @@ export const useNotifyStore = defineStore( item.isRead = true; }); } + function getsseList(){ + console.log(sseList.value) + return sseList.value + } /** * 设置单条消息已读 @@ -134,6 +147,8 @@ export const useNotifyStore = defineStore( $reset, clearAllMessage, notificationList, + sseList, + getsseList, notifications, setAllRead, setRead, diff --git a/apps/web-antd/src/views/cockpit/security/index.css b/apps/web-antd/src/views/cockpit/security/index.css new file mode 100644 index 00000000..c32d5ebb --- /dev/null +++ b/apps/web-antd/src/views/cockpit/security/index.css @@ -0,0 +1,116 @@ +/* 自定义滚动条样式 */ +.scrollbar-thin { + scrollbar-width: thin; +} + +.scrollbar-thumb-slate-700::-webkit-scrollbar-thumb { + background-color: #334155; + border-radius: 3px; +} + +.scrollbar-track-transparent::-webkit-scrollbar-track { + background-color: transparent; +} + +/* 动画效果 */ +@keyframes ping { + 0%, 100% { + opacity: 1; + } + 50% { + opacity: 0.5; + } +} + +.animate-ping { + animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; +} + +/* 淡入动画 */ +@keyframes fadeIn { + from { + opacity: 0; + transform: translateY(10px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +.animate-fadeIn { + animation: fadeIn 0.3s ease-out forwards; +} + +/* 数字计数器动画 */ +@keyframes countUp { + from { + opacity: 0; + transform: translateY(5px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +.counter-animation { + animation: countUp 0.5s ease-out forwards; +} + +/* 网格背景图案 */ +.pattern-grid { + background-image: linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px), + linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px); + background-size: 20px 20px; + background-position: center center; +} + +/* 确保Canvas元素占满容器 */ +canvas { + width: 100%; + height: 100%; + display: block; +} + +/* 自定义按钮反馈效果 */ +button:active { + transform: scale(0.98); +} + +/* 卡片悬停效果增强 */ +div[class*="bg-slate-800/60"] { + transition: all 0.3s ease; +} + +div[class*="bg-slate-800/60"]:hover { + box-shadow: 0 0 15px rgba(59, 130, 246, 0.1); +} + +/* 输入框焦点效果 */ +input:focus, textarea:focus { + box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.5); +} + +/* 列表项悬停效果 */ +div[class*="cursor-pointer"] { + transition: all 0.2s ease; +} + +div[class*="cursor-pointer"]:hover { + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); +} + +/* 平滑滚动 */ +html { + scroll-behavior: smooth; +} + +/* 状态徽章样式优化 */ +span[class*="rounded-full"][class*="text-xs"] { + transition: all 0.3s ease; +} + +span[class*="rounded-full"][class*="text-xs"]:hover { + transform: scale(1.05); +} diff --git a/apps/web-antd/src/views/cockpit/security/index.vue b/apps/web-antd/src/views/cockpit/security/index.vue new file mode 100644 index 00000000..d6b2d8a5 --- /dev/null +++ b/apps/web-antd/src/views/cockpit/security/index.vue @@ -0,0 +1,894 @@ + + + diff --git a/apps/web-antd/src/views/property/customerService/questionnaireAnalysis/data.ts b/apps/web-antd/src/views/property/customerService/questionnaireAnalysis/data.ts index e69de29b..f03a3b42 100644 --- a/apps/web-antd/src/views/property/customerService/questionnaireAnalysis/data.ts +++ b/apps/web-antd/src/views/property/customerService/questionnaireAnalysis/data.ts @@ -0,0 +1,32 @@ +import type { FormSchemaGetter } from "#/adapter/form"; +import type { VxeGridProps } from "@vben/plugins/vxe-table"; + +export const querySchema:FormSchemaGetter=()=>[ + { + component:'Input', + fieldName:'', + label:'回复者' + } +]; +export const columns:VxeGridProps['columns'] = [ + { + title:'序号', + field:'', + width:'auto', + }, + { + title:'回复者', + field:'', + + }, + { + title:'提交时间', + field:'' + }, + { + title:'操作', + field:'action', + slots:{default:'action'}, + + } +] \ No newline at end of file diff --git a/apps/web-antd/src/views/property/customerService/questionnaireAnalysis/index.vue b/apps/web-antd/src/views/property/customerService/questionnaireAnalysis/index.vue index 55d3a794..94fb8a29 100644 --- a/apps/web-antd/src/views/property/customerService/questionnaireAnalysis/index.vue +++ b/apps/web-antd/src/views/property/customerService/questionnaireAnalysis/index.vue @@ -8,13 +8,23 @@ import { CalendarTwoTone, ApiTwoTone, } from '@ant-design/icons-vue'; -import { Page } from '@vben/common-ui'; +import { Page, useVbenModal } from '@vben/common-ui'; +import questionnaireTableModal from './questionnaire-table-modal.vue'; + +const [QuestionnaireTableModal,modalApi] = useVbenModal({ + connectedComponent: questionnaireTableModal +} +) +function handleTable(){ + modalApi.setData({}); + modalApi.open(); +} diff --git a/apps/web-antd/src/views/property/customerService/questionnaireAnalysis/questionnaire-table-modal.vue b/apps/web-antd/src/views/property/customerService/questionnaireAnalysis/questionnaire-table-modal.vue index 9d13f383..b221cb62 100644 --- a/apps/web-antd/src/views/property/customerService/questionnaireAnalysis/questionnaire-table-modal.vue +++ b/apps/web-antd/src/views/property/customerService/questionnaireAnalysis/questionnaire-table-modal.vue @@ -1,4 +1,81 @@ - + diff --git a/apps/web-antd/src/views/screen/security/index.vue b/apps/web-antd/src/views/screen/security/index.vue index 94cb47ec..2e44f114 100644 --- a/apps/web-antd/src/views/screen/security/index.vue +++ b/apps/web-antd/src/views/screen/security/index.vue @@ -750,23 +750,23 @@ onBeforeUnmount(() => { align-items: center; display: flex; justify-content: space-between; - .left { - display: flex; - width: 18.3125rem; - .left-first { - padding-left: 2.3125rem; - font-size: 1.875rem; - width: 10.5rem; - color: #ffffff; + .left{ + display: flex; + width: 14.3125rem; + .left-first{ + padding-left: 2.3125rem; + padding-right: 3.5rem; + font-size: 1.875rem; + color: #FFFFFF; + } + .left-second{ + width: 6.5rem; + font-family: ShiShangZhongHeiJianTi; + font-weight: 400; + font-size: 1.25rem; + color: #FFFFFF; + } } - .left-second { - width: 6.5rem; - font-family: ShiShangZhongHeiJianTi; - font-weight: 400; - font-size: 1.25rem; - color: #ffffff; - } - } .center{ font-size: 1.9rem; color: #fff; diff --git a/apps/web-antd/vite.config.mts b/apps/web-antd/vite.config.mts index b55e2848..6aa8b8e1 100644 --- a/apps/web-antd/vite.config.mts +++ b/apps/web-antd/vite.config.mts @@ -27,7 +27,8 @@ export default defineConfig(async () => { changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, ''), // mock代理目标地址 - target: 'http://127.0.0.1:8080', + // target: 'http://127.0.0.1:8080', + target: 'http://183.230.235.66:11010/api', ws: true, }, }, diff --git a/package.json b/package.json index 777662d1..f64af8dd 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,3 @@ - { "name": "vben-admin-monorepo", "version": "5.5.6", @@ -59,6 +58,7 @@ "catalog": "pnpx codemod pnpm/catalog" }, "devDependencies": { + "@dataview/datav-vue3": "0.0.0-test.1672506674342", "@changesets/changelog-github": "catalog:", "@changesets/cli": "catalog:", "@playwright/test": "catalog:", @@ -118,6 +118,7 @@ }, "dependencies": { "@ant-design/icons-vue": "^7.0.1", + "@dataview/datav-vue3": "0.0.0-test.1672506674342", "ant-design-vue": "^4.2.6", "postcss-antd-fixes": "^0.2.0" } diff --git a/packages/effects/layouts/src/widgets/user-dropdown/user-dropdown.vue b/packages/effects/layouts/src/widgets/user-dropdown/user-dropdown.vue index 8b5f499f..4d8d93d5 100644 --- a/packages/effects/layouts/src/widgets/user-dropdown/user-dropdown.vue +++ b/packages/effects/layouts/src/widgets/user-dropdown/user-dropdown.vue @@ -68,12 +68,12 @@ defineOptions({ const props = withDefaults(defineProps(), { avatar: '', - description: '', enableShortcutKey: true, menus: () => [], showShortcutKey: true, tagText: '', text: '', + description: '', trigger: 'click', hoverDelay: 500, }); @@ -168,6 +168,7 @@ if (enableShortcutKey.value) { v-if="preferences.widget.lockScreen" :avatar="avatar" :text="text" + :description="description" @submit="handleSubmitLock" /> @@ -214,7 +215,7 @@ if (enableShortcutKey.value) { -
+
{{ description }}
diff --git a/packages/stores/src/modules/user.ts b/packages/stores/src/modules/user.ts index afc974a2..56810b4f 100644 --- a/packages/stores/src/modules/user.ts +++ b/packages/stores/src/modules/user.ts @@ -26,6 +26,10 @@ interface BasicUserInfo { * 用户名 */ username: string; + /** + * 邮箱 + */ + email: string; } interface AccessState { diff --git a/playground/src/store/auth.ts b/playground/src/store/auth.ts index 4adeb76e..8e840aff 100644 --- a/playground/src/store/auth.ts +++ b/playground/src/store/auth.ts @@ -47,8 +47,8 @@ export const useAuthStore = defineStore('auth', () => { ]); userInfo = fetchUserInfoResult; - userStore.setUserInfo(userInfo); + accessStore.setAccessCodes(accessCodes); if (accessStore.loginExpired) {