Browse Source

更改

wangqin
zhangzhang 9 months ago
parent
commit
2365b13795
  1. 90
      ruoyi-ui/src/api/MonthlyEquipment/index.js
  2. 2
      ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index.vue
  3. 166
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/index.vue
  4. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/assets/charts.js
  5. 36
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/data.js
  6. 41
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/index.vue

90
ruoyi-ui/src/api/MonthlyEquipment/index.js

@ -1,49 +1,55 @@
import request from '@/utils/request'
import { download } from '../../utils/request'
import request from "@/utils/request";
import { download } from "../../utils/request";
// 全景数据 - 运行环境接口
// 设备状态柱状图按时间和类型
export function getSystemStatusList(query) {
return request({
url: '/system/status/list',
method: 'get',
params: {
...query,
}
})
}
//设备状态列表按时间和类型
export function getSystemStatusTabList(query) {
//system/status/tablist
return request({
url: '/system/status/tablist',
method: 'get',
params: {
...query,
}
})
}
return request({
url: "/system/status/list",
method: "get",
params: {
...query,
},
});
}
//设备状态列表按时间和类型
export function getSystemStatusTabList(query) {
//system/status/tablist
return request({
url: "/system/status/tablist",
method: "get",
params: {
...query,
},
});
}
//设备状态列表按类型
export function getSystemStatusType() {
//system/status/tablist
return request({
url: '/system/status/type',
method: 'get',
params: {
// ...query,
}
})
}
//system/status/type
//设备状态列表按类型
export function getSystemStatusType() {
//system/status/tablist
return request({
url: "/system/status/type",
method: "get",
});
}
//system/status/type
//设备状态列表按类型
export function getSystemStatusExport(query) {
//system/status/export
//return download('/system/status/export',query,"file.xlsx");
return request.post('/system/status/export?startTime='+query.startTime+"&time="+ query.time +"&type="+query.type,{},{ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
responseType: 'blob'})
}
//设备状态列表按类型
export function getSystemStatusExport(query) {
//system/status/export
//return download('/system/status/export',query,"file.xlsx");
return request.post(
"/system/status/export?startTime=" +
query.startTime +
"&time=" +
query.time +
"&type=" +
query.type,
{},
{
headers: { "Content-Type": "application/x-www-form-urlencoded" },
responseType: "blob",
}
);
}

2
ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index.vue

@ -118,7 +118,7 @@ export default {
},
};
},
emit: ["handleSearch"],
emit: ["handleSearch", "handleResetForm"],
computed: {
getFormConfigOptions() {
return {

166
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/index.vue

@ -1,5 +1,5 @@
<template>
<div class='DutyOfficer'>
<div class="DutyOfficer">
<div class="filter">
<div>
<ButtonGradient @click.native="handleExport">
@ -34,25 +34,28 @@
</ButtonGradient>
</div>
<InputSearch
style="width: 402px;"
:formList="searchFormList"
<InputSearch
style="width: 402px"
:formList="searchFormList"
:formConfigOptions="{ labelWidth: '100px' }"
placeholder="请输入姓名、电话,回车搜索"
type="input"
:params="params"
@handleSearch="handleSearch" />
@handleSearch="handleSearch"
/>
</div>
<div class="body">
<ElEmpty v-if="!data.length && !isFirst" description="暂无数据" style="width: 100%;height: 100%;position: absolute;" />
<ElEmpty
v-if="!data.length && !isFirst"
description="暂无数据"
style="width: 100%; height: 100%; position: absolute"
/>
<!-- <div v-if="!data.length && !isFirst" class="no-data" style="position: absolute">暂无数据</div> -->
<SpecialTable v-else :columns="columns" :data="data" class="body">
<template #title-DateDuty>
<div class="special-title">
值班中心
</div>
<div class="special-title">值班中心</div>
</template>
<template #content-date="{ data }">
<div class="item">
@ -64,46 +67,62 @@
<div class="parent">
<div class="item">
<img src="@screen/images/form/location.svg" />
{{ data['organizationName'] }}
{{ data["organizationName"] }}
</div>
</div>
</template>
<template #content-dayShift="{ data }">
<div class="item-parent" v-if="data.dayShift && data.dayShift.length">
<div class="item" v-for="(item,index) in data.dayShift" :key="index" >
<div
class="item"
v-for="(item, index) in data.dayShift"
:key="index"
>
<img src="@screen/images/form/people.svg" />
{{ item.name }}
</div>
</div>
<div class="no-data" v-else>
无值班人员
</div>
<div class="no-data" v-else>无值班人员</div>
</template>
<template #content-graveyardShift="{ data }">
<div class="item-parent" v-if="data.graveyardShift && data.graveyardShift.length">
<div class="item" v-for="(item,index) in data.graveyardShift" :key="index">
<div
class="item-parent"
v-if="data.graveyardShift && data.graveyardShift.length"
>
<div
class="item"
v-for="(item, index) in data.graveyardShift"
:key="index"
>
<img src="@screen/images/form/people.svg" />
{{ item.name }}
</div>
</div>
<div class="no-data" v-else>
无值班人员
</div>
<div class="no-data" v-else>无值班人员</div>
</template>
<template #operation-content="{ data }">
<ButtonGradient class="operate-button" @click.native="handleModifyDutyInformationTable(true, data)">
<ButtonGradient
class="operate-button"
@click.native="handleModifyDutyInformationTable(true, data)"
>
<template #prefix>
<img src="@screen/images/form/edit.svg" />
</template>
修改
</ButtonGradient>
<ButtonGradient class="operate-button" @click.native="handleOperateRecord(true, data)">
<ButtonGradient
class="operate-button"
@click.native="handleOperateRecord(true, data)"
>
<template #prefix>
<img src="@screen/images/form/record.svg" />
</template>
记录
</ButtonGradient>
<ButtonGradient class="operate-button" @click.native="handleDelete(data)">
<ButtonGradient
class="operate-button"
@click.native="handleDelete(data)"
>
<template #prefix>
<img src="@screen/images/form/delete.svg" />
</template>
@ -112,61 +131,67 @@
</template>
</SpecialTable>
</div>
<OperateRecord :visible="operateRecordVisible" @close="handleOperateRecord(false)" :data="dialogData" />
<OperateRecord
:visible="operateRecordVisible"
@close="handleOperateRecord(false)"
:data="dialogData"
/>
<ModifyDutyInformationTable :visible="modifyDutyInformationTableVisible" :data="dialogData"
@close="handleModifyDutyInformationTable(false)" />
<ModifyDutyInformationTable
:visible="modifyDutyInformationTableVisible"
:data="dialogData"
@close="handleModifyDutyInformationTable(false)"
/>
</div>
</template>
<script>
import SpecialTable from "./../../components/SpecialTable.vue"
import OperateRecord from "./components/OperateRecord.vue"
import ModifyDutyInformationTable from "./components/ModifyDutyInformationTable.vue"
import ButtonGradient from '@screen/components/Buttons/ButtonGradient.vue';
import InputSearch from '@screen/components/InputSearch/index.vue';
import SpecialTable from "./../../components/SpecialTable.vue";
import OperateRecord from "./components/OperateRecord.vue";
import ModifyDutyInformationTable from "./components/ModifyDutyInformationTable.vue";
import ButtonGradient from "@screen/components/Buttons/ButtonGradient.vue";
import InputSearch from "@screen/components/InputSearch/index.vue";
import { searchFormList } from "./data";
import request from "@/utils/request";
import { setLoading } from "@screen/utils/index.js"
import { setLoading } from "@screen/utils/index.js";
import { delay, exportFile, confirm, uploadFile } from "@screen/utils/common";
import { Message } from "element-ui";
import { getSelectOptionsStation } from "@screen/pages/control/event/businessDataManagement/utils.js";
export default {
name: 'DutyOfficer',
name: "DutyOfficer",
components: {
SpecialTable,
OperateRecord,
ModifyDutyInformationTable,
ButtonGradient,
InputSearch
InputSearch,
},
inject: ['getPagination', 'setTotal', 'setCurrentPage'],
inject: ["getPagination", "setTotal", "setCurrentPage"],
data() {
return {
columns: [
{
key: "date",
title: "值班日期",
width: "210px"
width: "210px",
},
{
key: "organizationName",
title: "驻点",
width: "240px"
width: "240px",
},
{
key: "dayShift",
title: "白班",
width: "510px"
width: "510px",
},
{
key: "graveyardShift",
title: "夜班",
width: "510px"
width: "510px",
},
],
data: [],
@ -177,8 +202,8 @@ export default {
required: false,
type: "datePicker",
options: {
valueFormat: "yyyy-MM-dd"
}
valueFormat: "yyyy-MM-dd",
},
},
{
label: "驻点:",
@ -195,7 +220,7 @@ export default {
dialogData: null,
isFirst: true,
params: "name",
}
};
},
created() {
this.getData();
@ -203,7 +228,6 @@ export default {
},
methods: {
async getOptions() {
const result = await getSelectOptionsStation(2);
this.searchFormList[1].options.options = result;
@ -230,8 +254,8 @@ export default {
filename: "机构值班表",
data: {
...this.searchData,
...this.getPagination()
}
...this.getPagination(),
},
});
},
handleExportTemplate() {
@ -240,8 +264,8 @@ export default {
filename: "机构值班表面板",
data: {
...this.searchData,
...this.getPagination()
}
...this.getPagination(),
},
});
},
handleSearch(data) {
@ -258,35 +282,36 @@ export default {
method: "get",
params: {
...this.searchData,
...this.getPagination()
}
...this.getPagination(),
},
})
.then(result => {
.then((result) => {
if (result.code != 200) return;
this.data = result.rows.map(item => {
this.data = result.rows.map((item) => {
const result = {
date: item.date,
organizationName: item.organizationName,
station: item.station,
id: item.id
}
id: item.id,
};
item.shiftsList.forEach(item => {
const key = { 1: 'dayShift', 2: 'graveyardShift' }[item.scheduling];
item.shiftsList.forEach((item) => {
const key = { 1: "dayShift", 2: "graveyardShift" }[
item.scheduling
];
if (!result[key]) result[key] = [];
result[key].push(item);
})
});
return result
return result;
});
this.setTotal(result.total);
})
.finally(() => {
this.isFirst = false;
closeLoading();
})
});
},
async handleDelete(data) {
await confirm({ message: "是否要删除该值班信息?" });
@ -297,31 +322,30 @@ export default {
data: {
date: data.date,
station: data.station,
}
},
})
.then(result => {
.then((result) => {
if (result.code != 200) return Message.error("删除失败");
this.setCurrentPage(1)
this.setCurrentPage(1);
Message.success("删除成功")
Message.success("删除成功");
})
.catch(() => {
Message.error("删除失败")
})
Message.error("删除失败");
});
},
uploadFile() {
uploadFile({ url: "/business/shifts/importEquipment" });
}
}
}
},
},
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.DutyOfficer {
.special-title {
background: linear-gradient(180deg, #FFC071 0%, #D68D00 100%);
background: linear-gradient(180deg, #ffc071 0%, #d68d00 100%);
background-clip: text;
color: transparent;
}

4
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/assets/charts.js

@ -48,9 +48,7 @@ let options = {
},
yAxis: [
{
min: 0,
max: 100,
type: "value",
type: "category",
minInterval: 20,
maxInterval: 20,
name: "",

36
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/data.js

@ -43,75 +43,75 @@ export const searchFormList = [
key: "type",
required: true,
type: "select",
default: "1",
default: "1-1",
options: {
options: [
{
value: "1",
value: "1-1",
label: "高清网络枪型固定摄像机",
},
{
value: "2",
value: "1-2",
label: "高清网络球形摄像机",
},
{
value: "3",
value: "1-3",
label: "桥下高清网络球形摄像机",
},
{
value: "4",
value: "1-4",
label: "360°全景摄像机",
},
{
value: "5",
value: "1-5",
label: "180°全景摄像机",
},
{
value: "6",
value: "2-1",
label: "门架式可变信息标志",
},
{
value: "7",
value: "2-3",
label: "雨棚可变信息标志",
},
{
value: "8",
value: "2-4",
label: "站前悬臂式可变信息标志",
},
{
value: "9",
value: "3",
label: "气象检测器",
},
{
value: "10",
value: "5",
label: "路段语音广播系统",
},
{
value: "11",
value: "6",
label: "护栏碰撞预警系统",
},
{
value: "12",
value: "7",
label: "毫米波雷达",
},
{
value: "13",
value: "8",
label: "合流区预警系统",
},
{
value: "14",
value: "10",
label: "激光疲劳唤醒",
},
{
value: "15",
value: "11",
label: "一类交通量调查站",
},
{
value: "16",
value: "12",
label: "智能行车诱导系统",
},
{
value: "17",
value: "13",
label: "智能设备箱",
},
],

41
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/index.vue

@ -80,23 +80,23 @@
</el-table-column>
<el-table-column prop="type" label="型号" width="">
<template slot-scope="scope">
<div v-if="scope.row.type == 1">高清网络枪型固定摄像机</div>
<div v-if="scope.row.type == 2">高清网络球形摄像机</div>
<div v-if="scope.row.type == 3">桥下高清网络球形摄像机</div>
<div v-if="scope.row.type == 4">360°全景摄像机</div>
<div v-if="scope.row.type == 5">180°全景摄像机</div>
<div v-if="scope.row.type == 6">门架式可变信息标志</div>
<div v-if="scope.row.type == 7">雨棚可变信息标志</div>
<div v-if="scope.row.type == 8">站前悬臂式可变信息标志</div>
<div v-if="scope.row.type == 9">气象检测器</div>
<div v-if="scope.row.type == 10">路段语音广播系统</div>
<div v-if="scope.row.type == 11">护栏碰撞预警系统</div>
<div v-if="scope.row.type == 12">毫米波雷达</div>
<div v-if="scope.row.type == 13">合流区预警系统</div>
<div v-if="scope.row.type == 14">激光疲劳唤醒</div>
<div v-if="scope.row.type == 15">一类交通量调查站</div>
<div v-if="scope.row.type == 16">智能行车诱导系统</div>
<div v-if="scope.row.type == 17">智能设备箱</div>
<div v-if="scope.row.type == '1-1'">高清网络枪型固定摄像机</div>
<div v-if="scope.row.type == '1-2'">高清网络球形摄像机</div>
<div v-if="scope.row.type == '1-3'">桥下高清网络球形摄像机</div>
<div v-if="scope.row.type == '1-4'">360°全景摄像机</div>
<div v-if="scope.row.type == '1-5'">180°全景摄像机</div>
<div v-if="scope.row.type == '2-1'">门架式可变信息标志</div>
<div v-if="scope.row.type == '2-3'">雨棚可变信息标志</div>
<div v-if="scope.row.type == '2-4'">站前悬臂式可变信息标志</div>
<div v-if="scope.row.type == '3'">气象检测器</div>
<div v-if="scope.row.type == '5'">路段语音广播系统</div>
<div v-if="scope.row.type == '6'">护栏碰撞预警系统</div>
<div v-if="scope.row.type == '7'">毫米波雷达</div>
<div v-if="scope.row.type == '8'">合流区预警系统</div>
<div v-if="scope.row.type == '10'">激光疲劳唤醒</div>
<div v-if="scope.row.type == '11'">一类交通量调查站</div>
<div v-if="scope.row.type == '12'">智能行车诱导系统</div>
<div v-if="scope.row.type == '13'">智能设备箱</div>
</template>
</el-table-column>
<el-table-column prop="network" label="网段" width="">
@ -249,7 +249,7 @@ export default {
this.startTime = moment(data.time[0]).format("YYYY-MM-DD HH:mm:ss");
this.time = moment(data.time[1]).format("YYYY-MM-DD HH:mm:ss");
let typeText =
this.searchFormList[1].options.options[this.typeQuery - 1].label;
this.searchFormList[1].options.options[this.typeQuery - 1]?.label;
this.searchText = `${moment(this.startTime).format(
"YYYY年MM月DD日"
)}-${moment(this.time).format("YYYY年MM月DD日")},${typeText}`;
@ -327,6 +327,7 @@ export default {
}
}
this.equipments = allList;
console.log("Equipments", allList);
});
},
setStatus(id, status) {
@ -413,8 +414,10 @@ export default {
},
},
async mounted() {
console.log("__________________", searchFormList[0].default);
await this.initData();
let data = [1, 5, 10, 88, 9, 5, 52, 35];
let a = Array.from(5, 10, 88, 9, 5);
console.log(888, a);
},
};
</script>

Loading…
Cancel
Save