feat
This commit is contained in:
@@ -37,6 +37,24 @@ export function getAccessControl() {
|
||||
export function getCamera() {
|
||||
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
|
||||
|
@@ -8,6 +8,7 @@ import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
import {renderDict} from "#/utils/render";
|
||||
import {workOrdersInfo} from "#/api/property/businessManagement/workOrders";
|
||||
import type {WorkOrdersVO} from "#/api/property/businessManagement/workOrders/model";
|
||||
import {ossInfo} from "#/api/system/oss";
|
||||
|
||||
dayjs.extend(duration);
|
||||
dayjs.extend(relativeTime);
|
||||
@@ -35,6 +36,25 @@ async function handleOpenChange(open: boolean) {
|
||||
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);
|
||||
}
|
||||
</script>
|
||||
@@ -61,6 +81,10 @@ async function handleOpenChange(open: boolean) {
|
||||
<DescriptionsItem label="创建时间">
|
||||
{{ orderDetail.createTime }}
|
||||
</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="计划完成时间">-->
|
||||
<!-- {{ orderDetail.planCompleTime }}-->
|
||||
<!-- </DescriptionsItem>-->
|
||||
|
@@ -8,6 +8,7 @@ import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
import {renderDict} from "#/utils/render";
|
||||
import {workOrdersInfo} from "#/api/property/businessManagement/workOrders";
|
||||
import type {WorkOrdersVO} from "#/api/property/businessManagement/workOrders/model";
|
||||
import {ossInfo} from "#/api/system/oss";
|
||||
|
||||
dayjs.extend(duration);
|
||||
dayjs.extend(relativeTime);
|
||||
@@ -35,6 +36,25 @@ async function handleOpenChange(open: boolean) {
|
||||
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);
|
||||
}
|
||||
</script>
|
||||
@@ -85,6 +105,10 @@ async function handleOpenChange(open: boolean) {
|
||||
<img v-for="item in orderDetail.orderImgPath" :src="item" alt="图片加载失败"
|
||||
class="orders-img"/>
|
||||
</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="备注">
|
||||
{{ orderDetail.remark }}
|
||||
</DescriptionsItem>
|
||||
|
@@ -11,7 +11,6 @@ import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||
|
||||
import { modalSchema } from './data';
|
||||
import {personList} from "#/api/property/resident/person";
|
||||
import {renderDictValue} from "#/utils/render";
|
||||
import {userList} from "#/api/system/user";
|
||||
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
@@ -105,11 +104,23 @@ async function queryPersonData() {
|
||||
pageSize: 1000,
|
||||
pageNum: 1,
|
||||
}
|
||||
const res = await userList(params);
|
||||
const options = res.rows.map((user) => ({
|
||||
label: user.nickName + '-' + renderDictValue(user.sex, 'sys_user_sex')
|
||||
+ '-' + user.phonenumber,
|
||||
value: user.userId.toString(),
|
||||
const user = await userList(params);
|
||||
const resident = await personList(params);
|
||||
|
||||
const residentPerson = user.rows.map(item => ({
|
||||
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([{
|
||||
componentProps: () => ({
|
||||
|
@@ -34,22 +34,22 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{ type: 'checkbox', width: 60 },
|
||||
{
|
||||
title: '巡检计划',
|
||||
field: 'planId',
|
||||
field: 'planText',
|
||||
minWidth:200
|
||||
},
|
||||
{
|
||||
title: '巡检任务',
|
||||
field: 'taskId',
|
||||
field: 'taskText',
|
||||
width:150
|
||||
},
|
||||
{
|
||||
title: '巡检路线',
|
||||
field: 'routeId',
|
||||
field: 'routeText',
|
||||
width:150
|
||||
},
|
||||
{
|
||||
title: '巡检点',
|
||||
field: 'pointId',
|
||||
field: 'pointText',
|
||||
width:150
|
||||
},
|
||||
{
|
||||
|
@@ -42,6 +42,10 @@ export const columns: VxeGridProps['columns'] = [
|
||||
title: '巡检项目',
|
||||
field: 'itemName',
|
||||
},
|
||||
{
|
||||
title: '巡检位置',
|
||||
field: 'inspectionLocation',
|
||||
},
|
||||
{
|
||||
title: 'nfc编码',
|
||||
field: 'nfcCode',
|
||||
|
@@ -47,6 +47,9 @@ async function handleOpenChange(open: boolean) {
|
||||
<DescriptionsItem label="巡检项目">
|
||||
{{pointDetail.itemName}}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="巡检位置">
|
||||
{{pointDetail.inspectionLocation}}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="nfc编码">
|
||||
{{ pointDetail.nfcCode}}
|
||||
</DescriptionsItem>
|
||||
|
@@ -177,7 +177,7 @@
|
||||
</template>
|
||||
|
||||
<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 { Radio } from 'ant-design-vue';
|
||||
import {EchartsUI, useEcharts} from "@vben/plugins/echarts";
|
||||
@@ -369,7 +369,6 @@ const camera = ref();
|
||||
const { renderEcharts: renderCamera } = useEcharts(camera);
|
||||
async function fetchCamera() {
|
||||
const data = await getCamera()
|
||||
console.log(data,111)
|
||||
const cameraData = [
|
||||
{ name: '离线', value: data.off },
|
||||
{ name: '在线', value: data.on }
|
||||
@@ -577,17 +576,20 @@ const initPowerChart = () => {
|
||||
addChartToResizeManager(chart);
|
||||
};
|
||||
|
||||
// 初始化环境图表
|
||||
const initEnvChart = () => {
|
||||
// 人流车流
|
||||
const initEnvChart = async () => {
|
||||
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 option = {
|
||||
tooltip: { trigger: 'axis' },
|
||||
grid: { left: 40, right: 20, top: 40, bottom: 30 },
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: Array.from({ length: 8 }, (_, i) => (i + 1) * 3),
|
||||
data: staticTimeStrs,
|
||||
axisLine: { lineStyle: { color: '#3ec6ff' } },
|
||||
axisLabel: { color: '#fff' },
|
||||
},
|
||||
@@ -599,8 +601,8 @@ const initEnvChart = () => {
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '今年',
|
||||
data: [100, 200, 150, 300, 250, 200, 100, 80],
|
||||
name: '车流',
|
||||
data: inCounts,
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
itemStyle: { color: '#b388ff' },
|
||||
@@ -609,17 +611,17 @@ const initEnvChart = () => {
|
||||
symbol: 'circle',
|
||||
symbolSize: 0,
|
||||
},
|
||||
{
|
||||
name: '去年',
|
||||
data: [80, 120, 100, 180, 150, 120, 60, 40],
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
itemStyle: { color: '#ffb300' },
|
||||
lineStyle: { width: 3 },
|
||||
areaStyle: { color: 'rgba(255,179,0,0.15)' },
|
||||
symbol: 'circle',
|
||||
symbolSize: 0,
|
||||
},
|
||||
// {
|
||||
// name: '去年',
|
||||
// data: [80, 120, 100, 180, 150, 120, 60, 40],
|
||||
// type: 'line',
|
||||
// smooth: true,
|
||||
// itemStyle: { color: '#ffb300' },
|
||||
// lineStyle: { width: 3 },
|
||||
// areaStyle: { color: 'rgba(255,179,0,0.15)' },
|
||||
// symbol: 'circle',
|
||||
// symbolSize: 0,
|
||||
// },
|
||||
],
|
||||
};
|
||||
chart.setOption(option);
|
||||
|
@@ -27,7 +27,7 @@ export default defineConfig(async () => {
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||
// mock代理目标地址
|
||||
target: 'http://localhost:8080',
|
||||
target: 'http://192.168.1.113:8080',
|
||||
ws: true,
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user