feat: 问卷分析
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
fyy
2025-08-14 17:19:58 +08:00
parent 575ee16a87
commit 78ff0f0c3d
8 changed files with 306 additions and 16 deletions

View File

@@ -178,9 +178,9 @@ export interface DeviceManageQuery extends PageQuery {
*/ */
deviceMac?: string; deviceMac?: string;
lon: number; lon?: number;
lat: number; lat?: number;
/** /**
* 设备在线状态 0:离线 1:在线 2:未知 * 设备在线状态 0:离线 1:在线 2:未知

View File

@@ -1,13 +1,12 @@
import type { FormSchemaGetter } from '#/adapter/form'; import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table'; import type { VxeGridProps } from '#/adapter/vxe-table';
import { deviceManageList } from '#/api/sis/deviceManage';
export const querySchema: FormSchemaGetter = () => [ export const querySchema: FormSchemaGetter = () => [
{ {
component: 'Input', component: 'Input',
fieldName: 'area', fieldName: 'area',
label: '区域', label: '区域',
} },
]; ];
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 // 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
@@ -54,10 +53,22 @@ export const modalSchema: FormSchemaGetter = () => [
component: 'Input', component: 'Input',
}, },
{ {
label: '摄像机id', label: '摄像机',
fieldName: 'deviceManageId', fieldName: 'deviceManageId',
component: 'Select', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => {
const res = await deviceManageList({
pageNum: 1,
pageSize: 10000,
deviceType: 1,
});
return res;
},
resultField: 'rows',
labelField: 'deviceName',
valueField: 'id',
mode: 'multiple',
}, },
}, },
{ {

View File

@@ -82,13 +82,13 @@ export const columns: VxeGridProps['columns'] = [
}, },
{ {
title: '人员', title: '人员',
field: 'sysUser.userName', field: 'remoteUserVo.userName',
width: 120, width: 120,
// width: 'auto', // width: 'auto',
}, },
{ {
title: '单位', title: '单位',
field: 'sysUser.deptName', field: 'deptName',
width: 'auto', width: 'auto',
}, },
// { // {

View File

@@ -87,7 +87,7 @@ async function handleClosed() {
:key="item.id" :key="item.id"
class="wrap-cell" class="wrap-cell"
> >
{{ item.sysUser.userName }} {{ item.remoteUserVo.userName }}
<span v-if="index !== row.userGroupList.length - 1"></span> <span v-if="index !== row.userGroupList.length - 1"></span>
</span> </span>
</template> </template>

View File

@@ -178,8 +178,8 @@ const [BasicModal, modalApi] = useVbenModal({
const deptMap = new Map(); const deptMap = new Map();
for (const item of record.userGroupList) { for (const item of record.userGroupList) {
const deptId = item.sysUser.deptId; const deptId = item.remoteUserVo.deptId;
const deptName = item.sysUser.deptName; const deptName = item.deptName;
if (!deptMap.has(deptId)) { if (!deptMap.has(deptId)) {
deptMap.set(deptId, { deptMap.set(deptId, {
@@ -188,8 +188,8 @@ const [BasicModal, modalApi] = useVbenModal({
}); });
} }
deptMap.get(deptId).users.push({ deptMap.get(deptId).users.push({
userId: item.sysUser.userId, userId: item.remoteUserVo.userId,
userName: item.sysUser.userName, userName: item.remoteUserVo.userName,
}); });
} }
// 转换为 tableData 格式 // 转换为 tableData 格式

View File

@@ -0,0 +1,275 @@
<script lang="ts" setup>
import { Button, Tag, Progress, Rate } from 'ant-design-vue';
import {
BarChartOutlined,
MessageOutlined,
EyeTwoTone,
ProjectTwoTone,
CalendarTwoTone,
ApiTwoTone,
} from '@ant-design/icons-vue';
import { Page } from '@vben/common-ui';
</script>
<template>
<Page :auto-content-height="true">
<div class="px-16">
<div class="flex justify-end pb-4">
<Button type="primary">查看所有回复</Button>
</div>
<div class="bg-white p-2">
<!-- 总览 -->
<div class="flex text-base font-bold">
<BarChartOutlined />
<div>总览</div>
</div>
<div class="flex justify-between">
<div
class="h-20 w-40 rounded-lg border-2 border-gray-200 p-2 shadow-[0px_1px_1px_1px_#e5e7eb]"
>
<div class="flex justify-between">
<div>总浏览量</div>
<EyeTwoTone />
</div>
<div class="mt-[20px] text-lg font-bold text-blue-600">1250</div>
</div>
<div
class="h-20 w-40 rounded-lg border-2 border-gray-200 p-2 shadow-[0px_1px_1px_1px_#e5e7eb]"
>
<div class="flex justify-between">
<div>完成率</div>
<ProjectTwoTone two-tone-color="#00A63E" />
</div>
<div
class="text-[#00A63E]text-blue-600 mt-[20px] text-lg font-bold"
>
1250
</div>
</div>
<div
class="h-20 w-40 rounded-lg border-2 border-gray-200 p-2 shadow-[0px_1px_1px_1px_#e5e7eb]"
>
<div class="flex justify-between">
<div>平均用时</div>
<CalendarTwoTone two-tone-color="#F54A20" />
</div>
<div class="mt-[20px] text-lg font-bold text-[#F54A20]">1250</div>
</div>
<div
class="h-20 w-40 rounded-lg border-2 border-gray-200 p-2 shadow-[0px_1px_1px_1px_#e5e7eb]"
>
<div class="flex justify-between">
<div>响应率</div>
<ApiTwoTone two-tone-color="#9810FA" />
</div>
<div class="mt-[20px] text-lg font-bold text-[#9810FA]">1250</div>
</div>
</div>
<!-- 问题分析 -->
<div class="flex justify-between py-2 text-base font-bold">
<div class="flex">
<MessageOutlined />
<div>问题分析</div>
</div>
<div>赛选</div>
</div>
<div class="flex flex-col gap-2">
<!-- 单选题 /多选题-->
<div
class="flex flex-col gap-2 rounded-lg border-2 border-gray-200 p-3 shadow-[0px_1px_1px_1px_#e5e7eb]"
>
<div>
<div class="flex justify-between">
<div class="text-xs font-black">问题1你对当前工资满意吗?</div>
<div><Tag>单选题</Tag></div>
</div>
<div class="text-gray-400">共收到156个回答</div>
</div>
<div class="flex flex-col gap-0.5">
<div>
<div class="flex justify-between">
<div>非常满意</div>
<div class="flex gap-1">
<div class="text-gray-400">45</div>
<div>28.8%</div>
</div>
</div>
<div>
<Progress
:percent="50"
:show-info="false"
stroke-color="#000"
></Progress>
</div>
</div>
<div>
<div class="flex justify-between">
<div>非常满意</div>
<div class="flex gap-1">
<div class="text-gray-400">45</div>
<div>28.8%</div>
</div>
</div>
<div>
<Progress
:percent="28.8"
:show-info="false"
stroke-color="#000"
></Progress>
</div>
</div>
<div>
<div class="flex justify-between">
<div>满意</div>
<div class="flex gap-1">
<div class="text-gray-400">62</div>
<div>39.7%</div>
</div>
</div>
<div>
<Progress
:percent="39.7"
:show-info="false"
stroke-color="#000"
></Progress>
</div>
</div>
<div>
<div class="flex justify-between">
<div>一般</div>
<div class="flex gap-1">
<div class="text-gray-400">35</div>
<div>22.4%</div>
</div>
</div>
<div>
<Progress
:percent="22.4"
:show-info="false"
stroke-color="#000"
></Progress>
</div>
</div>
</div>
</div>
<!-- 多行文本/单行文本 -->
<div
class="flex flex-col gap-2 rounded-lg border-2 border-gray-200 p-3 shadow-[0px_1px_1px_1px_#e5e7eb]"
>
<div>
<div class="flex justify-between">
<div class="text-xs font-black">问题1你对公司有什么建议?</div>
<div><Tag>多行文本</Tag></div>
</div>
<div class="text-gray-400">共收到156个回答</div>
</div>
<div class="flex flex-col gap-1">
<div class="flex">
<MessageOutlined two-tone-color="gray" />
<div>最新回复(8/156)</div>
</div>
<div class="rounded-lg border px-2 py-1">
<div class="border-b p-1">
<div class="text-[13px]">希望公司多一些团建</div>
<div class="text-[12px] text-gray-400">
2025-08-14 10:00:00
</div>
</div>
<div class="border-b p-1">
<div class="text-[13px]">减少不必要会议</div>
<div class="text-[12px] text-gray-400">
2025-08-14 10:00:00
</div>
</div>
<div class="border-b p-1">
<div class="text-[13px]">提升福利待遇</div>
<div class="text-[12px] text-gray-400">
2025-08-14 10:00:00
</div>
</div>
</div>
<div class="text-gray-400">还有148条回复未显示</div>
</div>
</div>
<!-- 评分题-->
<div
class="flex flex-col gap-2 rounded-lg border-2 border-gray-200 p-3 shadow-[0px_1px_1px_1px_#e5e7eb]"
>
<div>
<div class="flex justify-between">
<div class="text-xs font-black">问题1评价考勤制度?</div>
<div><Tag>评分题</Tag></div>
</div>
<div class="text-gray-400">共收到156个回答</div>
</div>
<div class="flex flex-col gap-0.5">
<div>
<div class="flex justify-between">
<Rate :value="5" disabled></Rate>
<div class="flex gap-1">
<div class="text-gray-400">45</div>
<div>28.8%</div>
</div>
</div>
<div>
<Progress
:percent="50"
:show-info="false"
stroke-color="#000"
></Progress>
</div>
</div>
<div>
<div class="flex justify-between">
<Rate :value="4" disabled></Rate>
<div class="flex gap-1">
<div class="text-gray-400">45</div>
<div>28.8%</div>
</div>
</div>
<div>
<Progress
:percent="28.8"
:show-info="false"
stroke-color="#000"
></Progress>
</div>
</div>
<div>
<div class="flex justify-between">
<Rate :value="3" disabled></Rate>
<div class="flex gap-1">
<div class="text-gray-400">62</div>
<div>39.7%</div>
</div>
</div>
<div>
<Progress
:percent="39.7"
:show-info="false"
stroke-color="#000"
></Progress>
</div>
</div>
<div>
<div class="flex justify-between">
<Rate :value="2" disabled></Rate>
<div class="flex gap-1">
<div class="text-gray-400">35</div>
<div>22.4%</div>
</div>
</div>
<div>
<Progress
:percent="22.4"
:show-info="false"
stroke-color="#000"
></Progress>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</Page>
</template>

View File

@@ -0,0 +1,4 @@
<script lang="ts" setup></script>
<template>
<div></div>
</template>