|
|
@@ -4,6 +4,7 @@
|
|
|
<el-button type="primary" @click="showCameraData()">相机统计数据</el-button>
|
|
|
<PlatformTable
|
|
|
v-if="flattenedWorkshops.length > 0 && tableData !== undefined"
|
|
|
+ :department-list="departmentList"
|
|
|
:workshop-list="flattenedWorkshops"
|
|
|
:table-data="tableData"
|
|
|
table-label="访问次数"
|
|
|
@@ -39,7 +40,7 @@
|
|
|
import PlatformTable from '../common/PlatformTable.vue';
|
|
|
import DialogNavBar from '../common/DialogNavBar.vue';
|
|
|
import BarChart from '../../charts/BarChart.vue';
|
|
|
- import { ref, onBeforeMount, watch } from 'vue';
|
|
|
+ import { ref, onMounted, watch } from 'vue';
|
|
|
import { useSceneInfos } from '@/hooks/useSceneInfos';
|
|
|
import {
|
|
|
type UserAccessRecordQueryParams,
|
|
|
@@ -50,12 +51,22 @@
|
|
|
getWorkshopVisitedTimes,
|
|
|
} from '@/api/datamanagement/dataplatform';
|
|
|
import { formatWorkshopChart, formatCameraChart } from '@/utils/platformUtils';
|
|
|
+ import { deptTreeList } from '@/api/auth/dept';
|
|
|
+
|
|
|
+ const departmentList = ref<any[]>([]);
|
|
|
|
|
|
// 下拉菜单车间列表数据
|
|
|
const sceneInfos = useSceneInfos();
|
|
|
- const { flattenedWorkshops, getScenesTree } = sceneInfos;
|
|
|
- onBeforeMount(() => {
|
|
|
+ const { flattenedWorkshops, getScenesTree, calculateTreeData } = sceneInfos;
|
|
|
+ onMounted(() => {
|
|
|
getScenesTree({ level: 1, valueKey: 'code', labelKey: 'name', disabled: true });
|
|
|
+ deptTreeList().then((res) => {
|
|
|
+ departmentList.value = calculateTreeData(
|
|
|
+ res,
|
|
|
+ { level: 3, valueKey: 'deptId', labelKey: 'deptName' },
|
|
|
+ 1,
|
|
|
+ );
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
// dialog显示
|