feat
This commit is contained in:
@@ -37,6 +37,24 @@ export function getAccessControl() {
|
|||||||
export function getCamera() {
|
export function getCamera() {
|
||||||
return requestClient.get<any>('/sis/deviceManage/online');
|
return requestClient.get<any>('/sis/deviceManage/online');
|
||||||
}
|
}
|
||||||
|
//车流
|
||||||
|
export async function queryTwentyfourRunningDatasByPlNos() {
|
||||||
|
let params = {
|
||||||
|
"orgId": "10012",
|
||||||
|
"plNos": [
|
||||||
|
"PFN000000012",
|
||||||
|
"PFN000000025"
|
||||||
|
]
|
||||||
|
};
|
||||||
|
const response = await fetch('https://server.cqnctc.com:6081/web/thirdParty/queryTwentyfourRunningDatasByPlNos', {
|
||||||
|
method: 'POST', // 指定请求方法为POST
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json', // 设置内容类型为JSON
|
||||||
|
},
|
||||||
|
body: JSON.stringify(params), // 将参数对象转换为JSON字符串并作为请求体发送
|
||||||
|
});
|
||||||
|
return response.json();
|
||||||
|
}
|
||||||
// /**
|
// /**
|
||||||
// * 导出资产管理列表
|
// * 导出资产管理列表
|
||||||
// * @param params
|
// * @param params
|
||||||
|
@@ -8,6 +8,7 @@ import relativeTime from 'dayjs/plugin/relativeTime';
|
|||||||
import {renderDict} from "#/utils/render";
|
import {renderDict} from "#/utils/render";
|
||||||
import {workOrdersInfo} from "#/api/property/businessManagement/workOrders";
|
import {workOrdersInfo} from "#/api/property/businessManagement/workOrders";
|
||||||
import type {WorkOrdersVO} from "#/api/property/businessManagement/workOrders/model";
|
import type {WorkOrdersVO} from "#/api/property/businessManagement/workOrders/model";
|
||||||
|
import {ossInfo} from "#/api/system/oss";
|
||||||
|
|
||||||
dayjs.extend(duration);
|
dayjs.extend(duration);
|
||||||
dayjs.extend(relativeTime);
|
dayjs.extend(relativeTime);
|
||||||
@@ -35,6 +36,25 @@ async function handleOpenChange(open: boolean) {
|
|||||||
handlerName: index === 0 ? item.initiatorPeople : item.handlerName
|
handlerName: index === 0 ? item.initiatorPeople : item.handlerName
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
if (orderDetail.value.orderImgUrl) {
|
||||||
|
const res = await ossInfo([orderDetail.value.orderImgUrl]);
|
||||||
|
let imgUrls = [] as string[];
|
||||||
|
res.forEach(item => {
|
||||||
|
imgUrls.push(item.url)
|
||||||
|
})
|
||||||
|
orderDetail.value.orderImgPath = imgUrls;
|
||||||
|
}
|
||||||
|
if (orderDetail.value.imgUrl) {
|
||||||
|
const res = await ossInfo([orderDetail.value.imgUrl]);
|
||||||
|
let imgUrls = [] as string[];
|
||||||
|
res.forEach(item => {
|
||||||
|
imgUrls.push(item.url)
|
||||||
|
})
|
||||||
|
orderDetail.value.evaluateImgPath = imgUrls
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
modalApi.modalLoading(false);
|
modalApi.modalLoading(false);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -61,6 +81,10 @@ async function handleOpenChange(open: boolean) {
|
|||||||
<DescriptionsItem label="创建时间">
|
<DescriptionsItem label="创建时间">
|
||||||
{{ orderDetail.createTime }}
|
{{ orderDetail.createTime }}
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="工单图片" v-if="orderDetail.orderImgPath" :span="2">
|
||||||
|
<img v-for="item in orderDetail.orderImgPath" :src="item" alt="图片加载失败"
|
||||||
|
class="orders-img"/>
|
||||||
|
</DescriptionsItem>
|
||||||
<!-- <DescriptionsItem label="计划完成时间">-->
|
<!-- <DescriptionsItem label="计划完成时间">-->
|
||||||
<!-- {{ orderDetail.planCompleTime }}-->
|
<!-- {{ orderDetail.planCompleTime }}-->
|
||||||
<!-- </DescriptionsItem>-->
|
<!-- </DescriptionsItem>-->
|
||||||
|
@@ -8,6 +8,7 @@ import relativeTime from 'dayjs/plugin/relativeTime';
|
|||||||
import {renderDict} from "#/utils/render";
|
import {renderDict} from "#/utils/render";
|
||||||
import {workOrdersInfo} from "#/api/property/businessManagement/workOrders";
|
import {workOrdersInfo} from "#/api/property/businessManagement/workOrders";
|
||||||
import type {WorkOrdersVO} from "#/api/property/businessManagement/workOrders/model";
|
import type {WorkOrdersVO} from "#/api/property/businessManagement/workOrders/model";
|
||||||
|
import {ossInfo} from "#/api/system/oss";
|
||||||
|
|
||||||
dayjs.extend(duration);
|
dayjs.extend(duration);
|
||||||
dayjs.extend(relativeTime);
|
dayjs.extend(relativeTime);
|
||||||
@@ -35,6 +36,25 @@ async function handleOpenChange(open: boolean) {
|
|||||||
handlerName: index === 0 ? item.initiatorPeople : item.handlerName
|
handlerName: index === 0 ? item.initiatorPeople : item.handlerName
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
if (orderDetail.value.orderImgUrl) {
|
||||||
|
const res = await ossInfo([orderDetail.value.orderImgUrl]);
|
||||||
|
let imgUrls = [] as string[];
|
||||||
|
res.forEach(item => {
|
||||||
|
imgUrls.push(item.url)
|
||||||
|
})
|
||||||
|
orderDetail.value.orderImgPath = imgUrls;
|
||||||
|
}
|
||||||
|
if (orderDetail.value.imgUrl) {
|
||||||
|
const res = await ossInfo([orderDetail.value.imgUrl]);
|
||||||
|
let imgUrls = [] as string[];
|
||||||
|
res.forEach(item => {
|
||||||
|
imgUrls.push(item.url)
|
||||||
|
})
|
||||||
|
orderDetail.value.evaluateImgPath = imgUrls
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
modalApi.modalLoading(false);
|
modalApi.modalLoading(false);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -85,6 +105,10 @@ async function handleOpenChange(open: boolean) {
|
|||||||
<img v-for="item in orderDetail.orderImgPath" :src="item" alt="图片加载失败"
|
<img v-for="item in orderDetail.orderImgPath" :src="item" alt="图片加载失败"
|
||||||
class="orders-img"/>
|
class="orders-img"/>
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="评价图片" v-if="orderDetail.evaluateImgPath" :span="2">
|
||||||
|
<img v-for="item in orderDetail.evaluateImgPath" :src="item" alt="图片加载失败"
|
||||||
|
class="orders-img"/>
|
||||||
|
</DescriptionsItem>
|
||||||
<DescriptionsItem label="备注">
|
<DescriptionsItem label="备注">
|
||||||
{{ orderDetail.remark }}
|
{{ orderDetail.remark }}
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
|
@@ -11,7 +11,6 @@ import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
|||||||
|
|
||||||
import { modalSchema } from './data';
|
import { modalSchema } from './data';
|
||||||
import {personList} from "#/api/property/resident/person";
|
import {personList} from "#/api/property/resident/person";
|
||||||
import {renderDictValue} from "#/utils/render";
|
|
||||||
import {userList} from "#/api/system/user";
|
import {userList} from "#/api/system/user";
|
||||||
|
|
||||||
const emit = defineEmits<{ reload: [] }>();
|
const emit = defineEmits<{ reload: [] }>();
|
||||||
@@ -105,11 +104,23 @@ async function queryPersonData() {
|
|||||||
pageSize: 1000,
|
pageSize: 1000,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
}
|
}
|
||||||
const res = await userList(params);
|
const user = await userList(params);
|
||||||
const options = res.rows.map((user) => ({
|
const resident = await personList(params);
|
||||||
label: user.nickName + '-' + renderDictValue(user.sex, 'sys_user_sex')
|
|
||||||
+ '-' + user.phonenumber,
|
const residentPerson = user.rows.map(item => ({
|
||||||
value: user.userId.toString(),
|
name: item.nickName,
|
||||||
|
phone: item.phonenumber,
|
||||||
|
id: item.userId
|
||||||
|
}));
|
||||||
|
const userPerson = resident.rows.map(item => ({
|
||||||
|
name: item.userName,
|
||||||
|
phone: item.phone,
|
||||||
|
id: item.id
|
||||||
|
}));
|
||||||
|
const person = residentPerson.concat(userPerson);
|
||||||
|
const options = person.map((user) => ({
|
||||||
|
label: user.name + '-' + user.phone,
|
||||||
|
value: user.id.toString(),
|
||||||
}));
|
}));
|
||||||
formApi.updateSchema([{
|
formApi.updateSchema([{
|
||||||
componentProps: () => ({
|
componentProps: () => ({
|
||||||
|
@@ -34,22 +34,22 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
{ type: 'checkbox', width: 60 },
|
{ type: 'checkbox', width: 60 },
|
||||||
{
|
{
|
||||||
title: '巡检计划',
|
title: '巡检计划',
|
||||||
field: 'planId',
|
field: 'planText',
|
||||||
minWidth:200
|
minWidth:200
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '巡检任务',
|
title: '巡检任务',
|
||||||
field: 'taskId',
|
field: 'taskText',
|
||||||
width:150
|
width:150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '巡检路线',
|
title: '巡检路线',
|
||||||
field: 'routeId',
|
field: 'routeText',
|
||||||
width:150
|
width:150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '巡检点',
|
title: '巡检点',
|
||||||
field: 'pointId',
|
field: 'pointText',
|
||||||
width:150
|
width:150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@@ -42,6 +42,10 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
title: '巡检项目',
|
title: '巡检项目',
|
||||||
field: 'itemName',
|
field: 'itemName',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '巡检位置',
|
||||||
|
field: 'inspectionLocation',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: 'nfc编码',
|
title: 'nfc编码',
|
||||||
field: 'nfcCode',
|
field: 'nfcCode',
|
||||||
|
@@ -47,6 +47,9 @@ async function handleOpenChange(open: boolean) {
|
|||||||
<DescriptionsItem label="巡检项目">
|
<DescriptionsItem label="巡检项目">
|
||||||
{{pointDetail.itemName}}
|
{{pointDetail.itemName}}
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="巡检位置">
|
||||||
|
{{pointDetail.inspectionLocation}}
|
||||||
|
</DescriptionsItem>
|
||||||
<DescriptionsItem label="nfc编码">
|
<DescriptionsItem label="nfc编码">
|
||||||
{{ pointDetail.nfcCode}}
|
{{ pointDetail.nfcCode}}
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
|
@@ -177,7 +177,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {getStatistics,getworkOrder,getTodayMeetCount,getHydropower,getAccessControl,getCamera} from '#/api/analytics';
|
import {getStatistics,getworkOrder,getTodayMeetCount,getHydropower,getAccessControl,getCamera,queryTwentyfourRunningDatasByPlNos} from '#/api/analytics';
|
||||||
import AnalyticsTrends from './analytics-trends.vue';
|
import AnalyticsTrends from './analytics-trends.vue';
|
||||||
import { Radio } from 'ant-design-vue';
|
import { Radio } from 'ant-design-vue';
|
||||||
import {EchartsUI, useEcharts} from "@vben/plugins/echarts";
|
import {EchartsUI, useEcharts} from "@vben/plugins/echarts";
|
||||||
@@ -369,7 +369,6 @@ const camera = ref();
|
|||||||
const { renderEcharts: renderCamera } = useEcharts(camera);
|
const { renderEcharts: renderCamera } = useEcharts(camera);
|
||||||
async function fetchCamera() {
|
async function fetchCamera() {
|
||||||
const data = await getCamera()
|
const data = await getCamera()
|
||||||
console.log(data,111)
|
|
||||||
const cameraData = [
|
const cameraData = [
|
||||||
{ name: '离线', value: data.off },
|
{ name: '离线', value: data.off },
|
||||||
{ name: '在线', value: data.on }
|
{ name: '在线', value: data.on }
|
||||||
@@ -577,17 +576,20 @@ const initPowerChart = () => {
|
|||||||
addChartToResizeManager(chart);
|
addChartToResizeManager(chart);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 初始化环境图表
|
// 人流车流
|
||||||
const initEnvChart = () => {
|
const initEnvChart = async () => {
|
||||||
if (!envChart.value) return;
|
if (!envChart.value) return;
|
||||||
|
const data = await queryTwentyfourRunningDatasByPlNos()
|
||||||
|
const inCounts = data.data.inCounts
|
||||||
|
const staticTimeStrs = data.data.staticTimeStrs
|
||||||
|
console.log(data)
|
||||||
const chart = echarts.init(envChart.value);
|
const chart = echarts.init(envChart.value);
|
||||||
const option = {
|
const option = {
|
||||||
tooltip: { trigger: 'axis' },
|
tooltip: { trigger: 'axis' },
|
||||||
grid: { left: 40, right: 20, top: 40, bottom: 30 },
|
grid: { left: 40, right: 20, top: 40, bottom: 30 },
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: Array.from({ length: 8 }, (_, i) => (i + 1) * 3),
|
data: staticTimeStrs,
|
||||||
axisLine: { lineStyle: { color: '#3ec6ff' } },
|
axisLine: { lineStyle: { color: '#3ec6ff' } },
|
||||||
axisLabel: { color: '#fff' },
|
axisLabel: { color: '#fff' },
|
||||||
},
|
},
|
||||||
@@ -599,8 +601,8 @@ const initEnvChart = () => {
|
|||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '今年',
|
name: '车流',
|
||||||
data: [100, 200, 150, 300, 250, 200, 100, 80],
|
data: inCounts,
|
||||||
type: 'line',
|
type: 'line',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
itemStyle: { color: '#b388ff' },
|
itemStyle: { color: '#b388ff' },
|
||||||
@@ -609,17 +611,17 @@ const initEnvChart = () => {
|
|||||||
symbol: 'circle',
|
symbol: 'circle',
|
||||||
symbolSize: 0,
|
symbolSize: 0,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
name: '去年',
|
// name: '去年',
|
||||||
data: [80, 120, 100, 180, 150, 120, 60, 40],
|
// data: [80, 120, 100, 180, 150, 120, 60, 40],
|
||||||
type: 'line',
|
// type: 'line',
|
||||||
smooth: true,
|
// smooth: true,
|
||||||
itemStyle: { color: '#ffb300' },
|
// itemStyle: { color: '#ffb300' },
|
||||||
lineStyle: { width: 3 },
|
// lineStyle: { width: 3 },
|
||||||
areaStyle: { color: 'rgba(255,179,0,0.15)' },
|
// areaStyle: { color: 'rgba(255,179,0,0.15)' },
|
||||||
symbol: 'circle',
|
// symbol: 'circle',
|
||||||
symbolSize: 0,
|
// symbolSize: 0,
|
||||||
},
|
// },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
chart.setOption(option);
|
chart.setOption(option);
|
||||||
|
@@ -27,7 +27,7 @@ export default defineConfig(async () => {
|
|||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||||
// mock代理目标地址
|
// mock代理目标地址
|
||||||
target: 'http://localhost:8080',
|
target: 'http://192.168.1.113:8080',
|
||||||
ws: true,
|
ws: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user