Browse Source

Merge branch 'develop' of http://39.106.31.193:9211/mengff/jihe-hs into develop

wangqin
qingzhengli 1 year ago
parent
commit
b6bb0342ab
  1. 20
      ruoyi-ui/src/views/JiHeExpressway/common/PresetFormItems.js
  2. 230
      ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue
  3. 33
      ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index.vue
  4. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFrame/index.vue
  5. 27
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/index.vue
  6. 23
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/assets/charts.js
  7. 40
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/data.js
  8. 263
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/index.vue
  9. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue
  10. 99
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/components/flowstate/assets/charts.js
  11. 866
      ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue
  12. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/service/publicService/components/auditAnalytics/assets/charts.js
  13. 194
      ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/index.vue
  14. 4
      ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss

20
ruoyi-ui/src/views/JiHeExpressway/common/PresetFormItems.js

@ -132,6 +132,15 @@ export const startStation = {
},
},
key: "startStakeMark[0]",
rules: [
{
message: "请补全桩号",
callback(value, data) {
if (!value?.trim() && data.startStakeMark[1]?.trim()) return false
else return true
}
}
]
},
{
prefix: {
@ -140,7 +149,7 @@ export const startStation = {
color: "#3DE8FF",
},
},
key: "startStakeMark[1]",
key: "startStakeMark[1]"
},
],
}
@ -161,6 +170,15 @@ export const endStation = {
},
},
key: "endStakeMark[0]",
rules: [
{
message: "请补全桩号",
callback(value, data) {
if (!value?.trim() && data.endStakeMark[1]?.trim()) return false
else return true
}
}
]
},
{
prefix: {

230
ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue

@ -1,12 +1,29 @@
<template>
<ElForm :style="getStyle()" :model="modelFormData" :label-width="labelWidth" class="FormConfig" ref="ElFormRef"
size="mini">
<ElForm
:style="getStyle()"
:model="modelFormData"
:label-width="labelWidth"
class="FormConfig"
ref="ElFormRef"
size="mini"
>
<template v-for="(item, index) in formList">
<ElFormItem class="formItem" :rules="getRules(item)" v-if="formItemVisible(item)" :key="`${item.key}|${index}`"
:label="item.label" :style="gridStyle(item, index)" :prop="item.type !== 'MultipleLabelItem' ? item.key : void 0"
:required="item.required">
<ElFormItem
class="formItem"
:rules="getRules(item)"
v-if="formItemVisible(item)"
:key="`${item.key}|${index}`"
:label="item.label"
:style="gridStyle(item, index)"
:prop="item.type !== 'MultipleLabelItem' ? item.key : void 0"
:required="item.required"
>
<slot :name="item.key" :data="item" :formData="modelFormData">
<ProxyCom :value="getValue(item)" :item="item" @update:value="data => updateValue(item, data)" />
<ProxyCom
:value="getValue(item)"
:item="item"
@update:value="(data) => updateValue(item, data)"
/>
<!-- <component :is="getComponent(item.type)" v-bind="getBindData(item)" v-model="modelFormData[item.key]"
v-on="resolveListeners(item.ons)" /> -->
</slot>
@ -22,20 +39,27 @@ import { set as pathSet, get as pathGet, cloneDeep } from "lodash";
import ProxyCom from "./Proxy.vue";
const files = require.context('./components', true, /^.\/[^/]+\/index\.vue$|^.\/[^/]+.vue$/);
const files = require.context(
"./components",
true,
/^.\/[^/]+\/index\.vue$|^.\/[^/]+.vue$/
);
const components = files.keys().reduce((prev, key) => {
prev[key.match(/[^./]+/g)[0]] = files(key).default;
const components = files.keys().reduce(
(prev, key) => {
prev[key.match(/[^./]+/g)[0]] = files(key).default;
return prev;
}, {
Empty: 'div'
})
return prev;
},
{
Empty: "div",
}
);
export default {
name: 'FormConfig',
name: "FormConfig",
components: {
ProxyCom
ProxyCom,
},
provide() {
return {
@ -45,8 +69,8 @@ export default {
getValue: this.getValue,
updateValue: this.updateValue,
parent: this,
getRules: this.getRules
}
getRules: this.getRules,
};
},
props: {
/**
@ -62,7 +86,7 @@ export default {
*/
dFormData: {
type: Object,
default: () => { }
default: () => {},
},
/**
* {
@ -78,37 +102,37 @@ export default {
value: Object,
formList: {
type: Array,
default: () => []
default: () => [],
},
labelWidth: {
type: String,
default: "auto"
default: "auto",
},
rules: {
type: Object,
default: null
default: null,
},
column: {
type: [String, Number],
default: "3"
}
default: "3",
},
},
model: {
prop: 'value',
event: "update:value"
prop: "value",
event: "update:value",
},
data() {
return {
formData: {}
}
formData: {},
};
},
watch: {
formList: {
immediate: true,
handler() {
this.reset(true);
}
}
},
},
},
// created() {
// this.reset(true);
@ -120,60 +144,69 @@ export default {
},
set(data) {
this.formData = data;
this.$emit('update:value', this.formData);
}
this.$emit("update:value", this.formData);
},
},
gridStyle() {
return (item, index) => ({
gridRow: `span ${item.gridRow || 1}`,
gridColumn: `span ${item.gridColumn || item.isAlone && this.column || 1}`,
})
gridColumn: `span ${
item.gridColumn || (item.isAlone && this.column) || 1
}`,
});
},
formItemVisible() {
return item => {
const result = item && item.visible ? item.visible(this.modelFormData) : true;
return (item) => {
const result =
item && item.visible ? item.visible(this.modelFormData) : true;
// if (!result) {
// delete this.formData[item.key];
// }
return result;
}
}
};
},
},
methods: {
getValue(item) {
return pathGet(this.formData, item.key)
return pathGet(this.formData, item.key);
},
updateValue(item, data) {
//
this.modelFormData = { ...pathSet(this.modelFormData, item.key, data) }
this.modelFormData = { ...pathSet(this.modelFormData, item.key, data) };
},
reset(isFirst) {
return this.modelFormData = reduceDefaultValue(this.formList, isFirst ? this.value || this.dFormData : {});
console.log(23, isFirst);
return (this.modelFormData = reduceDefaultValue(
this.formList,
isFirst ? this.value || this.dFormData : {}
));
},
getStyle() {
return {
gridTemplateColumns: `repeat(${this.column}, 1fr)`,
}
};
},
getBindData(item) {
let componentKey = resolveName(item.type || 'input');
let componentKey = resolveName(item.type || "input");
return {
placeholder: "请输入",
...(defaultComponentOptions[componentKey]),
...item.options
}
...defaultComponentOptions[componentKey],
...item.options,
};
},
getComponent(type) {
if (!type) type = 'input';
if (!type) type = "input";
const componentKey = resolveName(type);
const ElComponentKey = `El${componentKey}`;
return components[componentKey] || components[ElComponentKey] || ElComponentKey;
return (
components[componentKey] || components[ElComponentKey] || ElComponentKey
);
},
getRules(item) {
//
@ -199,60 +232,72 @@ export default {
for (let index = 0; index < rules.length; index++) {
const rule = rules[index];
// true false
if (typeof rule.callback === 'function') {
if (!rule.callback(value, this.modelFormData)) return new Error(rule.message || "内容错误");
}
else if (RegexpMap[rule.type]) {
if (!RegexpMap[rule.type].reg.test(value)) return new Error(rule.message || RegexpMap[rule.type].message)
if (typeof rule.callback === "function") {
if (!rule.callback(value, this.modelFormData))
return new Error(rule.message || "内容错误");
} else if (RegexpMap[rule.type]) {
if (!RegexpMap[rule.type].reg.test(value))
return new Error(rule.message || RegexpMap[rule.type].message);
}
}
}
if (item.required) return [
{
validator: (_, __, callback) => {
const value = pathGet(this.modelFormData, item.key)
if (!value && typeof value != 'number' || typeof value === 'string' && !value.trim() || typeof value === 'object' && value.length == 0) return callback(new Error(`${item.options?.placeholder || `${item.label}不能为空`}`))
const err = ruleMatch(value);
if (err) return callback(err)
callback()
};
if (item.required)
return [
{
validator: (_, __, callback) => {
const value = pathGet(this.modelFormData, item.key);
if (
(!value && typeof value != "number") ||
(typeof value === "string" && !value.trim()) ||
(typeof value === "object" && value.length == 0)
)
return callback(
new Error(
`${item.options?.placeholder || `${item.label}不能为空`}`
)
);
const err = ruleMatch(value);
if (err) return callback(err);
callback();
},
trigger: ["blur", "change"],
},
trigger: ["blur", "change"],
},
]
else if (item.rules?.length) return [
{
validator: (_, __, callback) => {
/**
* @type {{ callback?: (value: any) => boolean; type?: "phone"; message: string; }[]}
*/
const err = ruleMatch(pathGet(this.modelFormData, item.key));
if (err) return callback(err)
callback()
];
else if (item.rules?.length)
return [
{
validator: (_, __, callback) => {
/**
* @type {{ callback?: (value: any) => boolean; type?: "phone"; message: string; }[]}
*/
const err = ruleMatch(pathGet(this.modelFormData, item.key));
if (err) return callback(err);
callback();
},
trigger: ["blur", "change"],
},
trigger: ["blur", "change"],
},
]
];
},
validate() {
return new Promise((resolve, reject) => {
this.$refs.ElFormRef.validate((bool) => {
if (bool) resolve(cloneDeep(this.modelFormData))
else reject("表单验证未通过")
})
})
}
}
}
if (bool) resolve(cloneDeep(this.modelFormData));
else reject("表单验证未通过");
});
});
},
},
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.list-item {
display: inline-block;
margin-right: 10px;
@ -283,7 +328,6 @@ export default {
align-items: center;
}
::v-deep {
.el-form-item {
align-items: center;
@ -307,7 +351,7 @@ export default {
font-size: 15px;
// font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #3DE8FF;
color: #3de8ff;
line-height: unset;
// -webkit-background-clip: text;
// -webkit-text-fill-color: transparent;

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

@ -23,7 +23,7 @@
:placeholder="placeholder"
@change="handleSearch"
></ElInput>
<img src="./search.svg" @click="visible = !visible" />
<img src="./search.svg" v-show="!disable" @click="visible = !visible" />
</div>
<div
class="InputSearch"
@ -75,6 +75,7 @@ export default {
Form,
},
props: {
//
type: {
type: String,
default: "form",
@ -83,15 +84,15 @@ export default {
type: String,
default: "请点击右侧图标筛选",
},
valueData: {
type: String,
// type input
disable: {
type: Boolean,
default: false,
},
// type input
params: {
type: String,
},
queryParams: {
type: Array,
},
formConfigOptions: {
type: Object,
default: null,
@ -133,7 +134,7 @@ export default {
},
handleResetForm() {
this.$refs.FormConfigRef?.reset();
this.$refs.FormConfigRef.$refs.ElFormRef.resetFields();
this.$refs.PopoverRef.doClose();
this.$emit("handleSearch", cloneDeep(this.$refs.FormConfigRef?.formData));
@ -143,15 +144,17 @@ export default {
let params = {};
params[this.params] = this.value;
let result = {};
if (!this.disable) {
await this.$refs.FormConfigRef.validate()
.then((res) => {
result = res;
this.$refs.PopoverRef.doClose();
})
.catch((err) => {
console.log("catch");
});
}
await this.$refs.FormConfigRef.validate()
.then((res) => {
result = res;
this.$refs.PopoverRef.doClose();
})
.catch((err) => {
console.log("catch");
});
let resultParams = { ...result, ...params };
this.$emit("handleSearch", resultParams);
} else {

2
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFrame/index.vue

@ -58,7 +58,7 @@ div.el-popper.global-input-search-popover {
position: relative;
padding-top: 36px;
transform: translateY(24px);
margin-top: 6vh;
// margin-top: 6vh;
.body {
.title {

27
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/index.vue

@ -22,7 +22,13 @@
</ButtonGradient>
</div>
<InputSearch style="width: 402px;" :formList="searchFormList" :formConfigOptions="{ labelWidth: '90px' }"
<InputSearch
style="width: 402px;"
:formList="searchFormList"
:formConfigOptions="{ labelWidth: '90px' }"
placeholder="请输入线路名称,回车搜索"
type="input"
:params="params"
@handleSearch="handleSearch" />
</div>
@ -120,7 +126,8 @@ export default {
data: [],
dialogData: null,
editEventInformationDialogVisible: false,
isFirst: true
isFirst: true,
params: "sectionName",
}
},
created() {
@ -134,11 +141,23 @@ export default {
...this.getPagination()
};
if (this.searchData?.startStakeMark) result.startStakeMark = `K${this.searchData?.startStakeMark}`;
if (this.searchData?.endStakeMark) result.endStakeMark = `K${this.searchData?.endStakeMark}`;
result.startStakeMark = this.joinStakeMark(this.searchData?.startStakeMark);
result.endStakeMark = this.joinStakeMark(this.searchData?.endStakeMark);
return result
},
//
joinStakeMark(datas) {
console.log("stakeMarks:",datas);
let stakeMark = null;
if (datas && datas[0]) {
if(!datas[1]){
datas[1] = 0;
}
stakeMark = `K${datas[0]}+${datas[1]}`;
}
return stakeMark;
},
async handleDelete(data) {
await confirm({ message: "是否要删除该辖段信息?" });

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

@ -3,15 +3,15 @@ import * as echarts from "echarts";
let options = {
tooltip: {
trigger: "axis",
backgroundColor: "rgba(17,95,182,0.5)",
textStyle: {
color: "#fff",
},
formatter: function (params) {
return (
params[0].name + params[0].seriesName + ": " + params[0].value + "%"
);
},
// backgroundColor: "rgba(17,95,182,0.5)",
// textStyle: {
// color: "#fff",
// },
// formatter: function (params) {
// return (
// params[0].name + params[0].seriesName + ": " + params[0].value + "%"
// );
// },
},
grid: {
left: "2%",
@ -135,7 +135,7 @@ let options = {
series: [
// 下半截柱状图
{
name: "",
name: "在线率",
type: "bar",
barWidth: 12,
barGap: "-100%",
@ -178,6 +178,9 @@ let options = {
opacity: 0.1,
},
data: [],
tooltip: {
show: false,
},
},
],
};

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

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

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

@ -1,41 +1,78 @@
<template>
<div class='statisticAnalysis'>
<div class="statisticAnalysis">
<el-tabs class="saContent" v-model="activeName" @tab-click="changeTabs">
<el-tab-pane label="设备分析" name="first" class="deviceAnalysis">
<DeviceSummary class="deviceSummary" :dataList="equipments"></DeviceSummary>
<DeviceSummary
class="deviceSummary"
:dataList="equipments"
></DeviceSummary>
<div class="bottomTabs">
<DeviceUptime :dataList="equipments" class="tabs-lo" />
<MonthlyEquipment class="tabs-mo" :dataList="equipments" />
</div>
</el-tab-pane>
<el-tab-pane label="设备查询" name="second">
<div class="topdiv">
<div class="left-div">
<el-button size="mini" icon="el-icon-refresh-left" class="btnSearch" @click="onRefreshData">刷新</el-button>
<el-button size="mini" icon="el-icon-download" class="btnSearch"
@click="SystemStatusExport">导出Excel</el-button>
<el-button
size="mini"
icon="el-icon-refresh-left"
class="btnSearch"
@click="onRefreshData"
>刷新</el-button
>
<el-button
size="mini"
icon="el-icon-download"
class="btnSearch"
@click="SystemStatusExport"
>导出Excel</el-button
>
</div>
<div class="right-div">
<InputSearch :formList="searchFormList" @handleSearch="handleSearch" />
<InputSearch
:formList="searchFormList"
@handleSearch="handleSearch"
/>
<!-- :placeholder="searchText" -->
</div>
</div>
<div class="queryChart">
<!-- v-if="isEmpty01" -->
<Empty v-if="isEmpty01" class="floatEmpty" :text="emptyText01"></Empty>
<div ref="queryChart" class="keep-ratio">
</div>
<Empty
v-if="isEmpty01"
class="floatEmpty"
:text="emptyText01"
></Empty>
<div ref="queryChart" class="keep-ratio"></div>
</div>
<div style="position: relative;">
<Empty v-if="isEmpty02" class="floatEmpty" :text="emptyText02"></Empty>
<el-table :border="false" :data="tableData" height="480" header-align="left" empty-text=" ">
<div style="position: relative">
<Empty
v-if="isEmpty02"
class="floatEmpty"
:text="emptyText02"
></Empty>
<el-table
:border="false"
:data="tableData"
height="480"
header-align="left"
empty-text=" "
>
<el-table-column prop="order" label="序号" width="80">
</el-table-column>
<el-table-column prop="deviceName" label="设备名称"></el-table-column>
<el-table-column
prop="deviceName"
label="设备名称"
></el-table-column>
<el-table-column prop="deviceNo" label="设备桩号" width="">
</el-table-column>
<el-table-column prop="direction" label="方向" class-name="showClass" width="">
<el-table-column
prop="direction"
label="方向"
class-name="showClass"
width=""
>
</el-table-column>
<el-table-column prop="deviceIp" label="设备IP" width="">
</el-table-column>
@ -69,13 +106,21 @@
<el-table-column prop="deviceStatus" label="设备状态" width="">
<template slot-scope="scope">
<div v-if="scope.row.deviceStatus == 1">在线</div>
<div v-if="scope.row.deviceStatus == 0" style="color: #BBB;">离线</div>
<div v-if="scope.row.deviceStatus == 0" style="color: #bbb">
离线
</div>
</template>
</el-table-column>
</el-table>
<div class="foot">
<Pagination @current-change="changePage" width="'100%'" :page-size="pageSize" :current-page.sync="pageIndex"
layout="total, sizes, prev, pager, next" :total="pageTotal">
<Pagination
@current-change="changePage"
width="'100%'"
:page-size="pageSize"
:current-page.sync="pageIndex"
layout="total, sizes, prev, pager, next"
:total="pageTotal"
>
</Pagination>
</div>
</div>
@ -83,30 +128,34 @@
</el-tabs>
</div>
</template>
<script>
<script>
import * as echarts from "echarts";
import chartsStatistics from "./assets/charts";
import DeviceUptime from './components/deviceUptime';
import MonthlyEquipment from './components/monthlyEquipment';
import DeviceSummary from './components/deviceSummary';
import { getSystemStatusList, getSystemStatusTabList, getSystemStatusType, getSystemStatusExport } from "../../../../../api/MonthlyEquipment";
import { download } from '../../../../../utils/request.js';
import Pagination from '@screen/components/Pagination.vue';
import InputSearch from '@screen/components/InputSearch/index.vue';
import DeviceUptime from "./components/deviceUptime";
import MonthlyEquipment from "./components/monthlyEquipment";
import DeviceSummary from "./components/deviceSummary";
import {
getSystemStatusList,
getSystemStatusTabList,
getSystemStatusType,
getSystemStatusExport,
} from "../../../../../api/MonthlyEquipment";
import { download } from "../../../../../utils/request.js";
import Pagination from "@screen/components/Pagination.vue";
import InputSearch from "@screen/components/InputSearch/index.vue";
import { searchFormList } from "./data";
import { Loading } from 'element-ui';
import { Loading } from "element-ui";
import { first } from "lodash";
export default {
name: 'publicService',
name: "publicService",
components: {
DeviceUptime,
MonthlyEquipment,
Pagination,
InputSearch,
DeviceSummary
DeviceSummary,
},
data() {
return {
@ -143,32 +192,35 @@ export default {
equipments: [],
activeName: "first",
tableData: [],
interval: null
}
interval: null,
};
},
destroyed() {
clearInterval(this.interval);
},
methods: {
initData() {
this.startTime = moment().startOf("month").format("YYYY-MM-DD HH:mm:ss");
this.time = moment().format("YYYY-MM-DD HH:mm:ss");
this.typeQuery = searchFormList[1].options.options[0].value;
console.log(8888, this.startTime, this.time, this.typeQuery);
clearInterval(this.interval);
if (this.activeName == "first") {
this.initDevice();
} else if (this.activeName == 'second') {
} else if (this.activeName == "second") {
this.queryChart = echarts.init(this.$refs["queryChart"]);
this.queryChart.setOption(chartsStatistics);
this.initQueryChart();
this.initQueryTable(1);
}
this.interval = setInterval(() => {
if (this.activeName == "first") {
this.initDevice();
}
}, 30000)
}, 30000);
},
changePage(page) {
this.initQueryTable(page);
},
formatDate(val) {
@ -185,19 +237,23 @@ export default {
if (!this.typeQuery || !this.startTime) {
this.$message({
message: "请先设置查询条件!",
type: "warning"
})
return
type: "warning",
});
return;
}
this.initQueryChart();
this.initQueryTable(1);
},
handleSearch(data) {
console.log(777, data);
this.typeQuery = data.type;
this.startTime = this.formatDate(data.time[0]);
this.time = this.formatDate(data.time[1]);
let typeText = 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}`;
let typeText =
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}`;
this.initQueryChart();
this.initQueryTable(1);
},
@ -210,45 +266,49 @@ export default {
},
//
SystemStatusExport() {
let loadingInstance = Loading.service({ fullscreen: true, background: "#00000052", text: "文件正在下载..." });
let loadingInstance = Loading.service({
fullscreen: true,
background: "#00000052",
text: "文件正在下载...",
});
getSystemStatusExport({
startTime: this.startTime,
time: this.time,
type: this.typeQuery,
}).then((res) => {
console.log(res);
const url = window.URL.createObjectURL(new Blob([res]))
let link = document.createElement('a')
link.style.display = 'none'
link.href = url
link.setAttribute('download', '设备统计信息.xlsx')
document.body.appendChild(link)
link.click()
URL.revokeObjectURL(link.href) // URL
document.body.removeChild(link)
link = null
loadingInstance.close();
}).catch(err => {
Message.error(err);
loadingInstance.close();
})
.then((res) => {
console.log(res);
const url = window.URL.createObjectURL(new Blob([res]));
let link = document.createElement("a");
link.style.display = "none";
link.href = url;
link.setAttribute("download", "设备统计信息.xlsx");
document.body.appendChild(link);
link.click();
URL.revokeObjectURL(link.href); // URL
document.body.removeChild(link);
link = null;
loadingInstance.close();
})
.catch((err) => {
Message.error(err);
loadingInstance.close();
});
},
initDevice() { //线线
initDevice() {
//线线
getSystemStatusType().then((res) => {
if (IS_TESTING && (!res.data || res.msg == "暂无数据")) {
this.equipments = [];
this.equipSeries.forEach(item => {
this.equipSeries.forEach((item) => {
this.equipments.push({
title: item,
total: Math.floor(Math.random() * 600) + 800,
pctOnl: Math.floor(100 * Math.random()) + "%",
pctOffl: "25%",
pctLose: "15%"
pctLose: "15%",
});
});
return;
}
@ -260,8 +320,8 @@ export default {
total: val.sum,
pctOnl: val.sucessRate,
pctLose: val.failRate,
pctOffl: val.lostRate
}
pctOffl: val.lostRate,
};
if (key.includes("全部设备")) {
allList.unshift(item);
} else {
@ -269,23 +329,21 @@ export default {
}
}
this.equipments = allList;
})
});
},
setStatus(id, status) {
if (status == "doing") {
this["isEmpty" + id] = true
this["emptyText" + id] = "数据查询中..."
this["isEmpty" + id] = true;
this["emptyText" + id] = "数据查询中...";
} else if (status == "empty") {
this["isEmpty" + id] = true
this["emptyText" + id] = "暂无数据..."
this["isEmpty" + id] = true;
this["emptyText" + id] = "暂无数据...";
} else if (status == "finish") {
this["isEmpty" + id] = false
this["emptyText" + id] = ""
this["isEmpty" + id] = false;
this["emptyText" + id] = "";
}
},
initQueryChart() {
this.setStatus("01", "doing");
getSystemStatusList({
@ -294,15 +352,13 @@ export default {
type: this.typeQuery,
}).then((res) => {
if (res.code == 200) {
if (res.data && Object.keys(res.data).length > 0) {
this.setStatus("01", "finish");
let origin = res.data;
let startStamp = +moment(this.startTime).startOf('day').format("x");
let endStamp = +moment(this.time).endOf('day').format("x");
let startStamp = +moment(this.startTime).startOf("day").format("x");
let endStamp = +moment(this.time).endOf("day").format("x");
let oneDay = 86400000;
let daysTotal = Math.ceil((endStamp - startStamp) / oneDay);
let queryChartData = [];
@ -325,16 +381,11 @@ export default {
this.$nextTick(() => {
this.queryChart.setOption(chartsStatistics);
});
} else {
this.setStatus("01", "empty");
}
}
})
});
},
//
initQueryTable(pageIndex, pageSize = 30) {
@ -354,24 +405,22 @@ export default {
this.pageTotal = res.total;
this.tableData = res.rows;
this.tableData.forEach((it, index) => {
it.order = (pageIndex - 1) * (pageSize) + index + 1;
})
it.order = (pageIndex - 1) * pageSize + index + 1;
});
} else {
this.setStatus("02", "empty");
}
}
})
}
});
},
},
mounted() {
this.initData();
},
}
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.floatEmpty {
position: absolute;
z-index: 100;
@ -407,7 +456,7 @@ export default {
}
.btnSearch {
background: linear-gradient(180deg, #005C79 0%, #009BCC 100%);
background: linear-gradient(180deg, #005c79 0%, #009bcc 100%);
margin-left: 10px;
border-color: transparent;
color: #fff;
@ -419,7 +468,7 @@ export default {
::v-deep .el-table .el-table__header-wrapper th {
background-color: #064258 !important;
color: #00D1FF;
color: #00d1ff;
border-color: #064258 !important;
border: 0px !important;
font-size: 14px;
@ -444,17 +493,17 @@ export default {
font-size: 14px;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #FFFFFF;
color: #ffffff;
}
::v-deep .el-table tr:hover td {
background: #1b2528 !important;
color: #00D1FF;
color: #00d1ff;
height: 47px;
}
::v-deep .el-table tr:nth-child(odd) td {
background-color: #13272F;
background-color: #13272f;
border: 0px !important;
}
@ -475,7 +524,7 @@ export default {
font-size: 16px;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #FFFFFF;
color: #ffffff;
min-width: 128px;
position: relative;
left: 10px;
@ -494,7 +543,8 @@ export default {
width: 100%;
height: 100%;
.deviceAnalysis {}
.deviceAnalysis {
}
}
.topdiv {
@ -519,7 +569,6 @@ export default {
margin: auto;
margin-top: 15px;
height: 160px;
}
.queryChart {
@ -533,7 +582,7 @@ export default {
margin-bottom: 30px;
--keep-ratio: scaleX(1);
>div {
> div {
display: inline-flex;
width: 100%;
height: 100%;
@ -548,7 +597,7 @@ export default {
pointer-events: none;
margin-top: 19px;
>div {
> div {
pointer-events: auto;
}
@ -556,7 +605,6 @@ export default {
width: calc(25%);
margin-right: 20px;
}
.content-mi {
@ -565,7 +613,6 @@ export default {
margin-right: 20px;
}
.content-m {
display: inline-flex;
flex-direction: column;
@ -583,7 +630,5 @@ export default {
width: 49.4%;
}
}
}
</style>

2
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue

@ -69,7 +69,7 @@ export default {
},
{
name: "行人",
warningType: 1,
warningType: 2,
value: 0,
},
{

99
ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/components/flowstate/assets/charts.js

@ -3,6 +3,14 @@ var options = {
tooltip: {
show: true,
trigger: "axis",
formatter: (params) => {
return `${params[0].name.replace(/-/g, "")}${params[1].name.replace(
/-/g,
""
)}<br/>${params[0].marker}${params[0].seriesName} : ${
params[0].value
} `;
},
},
axisPointer: {
link: [
@ -28,22 +36,38 @@ var options = {
{
type: "category",
data: [
"枢纽",
"立交",
"立交",
"枢纽",
"立交",
"立交",
"立交",
"枢纽",
"立交",
"立交",
"枢纽",
"立交",
"立交",
"枢纽",
"立交",
"枢纽",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
// "枢纽",
// "立交",
// "立交",
// "枢纽",
// "立交",
// "立交",
// "立交",
// "枢纽",
// "立交",
// "立交",
// "枢纽",
// "立交",
// "立交",
// "枢纽",
// "立交",
// "枢纽",
],
axisLabel: {
color: "#ffffff",
@ -63,26 +87,31 @@ var options = {
type: "category",
z: 10,
data: [
"殷家林",
"大学城",
"长清",
"松竹",
"孝里",
"安城",
"平阴",
"孔村",
"平阴南",
"东平",
"东平湖",
"韩岗",
"梁山",
"鄄郓",
"嘉祥西",
"王官中",
"殷家林-枢纽",
"大学城-枢纽",
"长清-枢纽",
"松竹-枢纽",
"孝里-枢纽",
"安城-枢纽",
"平阴-枢纽",
"孔村-枢纽",
"平阴南-枢纽",
"东平-枢纽",
"东平湖-枢纽",
"韩岗-枢纽",
"梁山-枢纽",
"鄄郓-枢纽",
"嘉祥西-枢纽",
"王官中-枢纽",
],
position: "top",
axisLabel: {
color: "#ffffff",
color: "#fff",
margin: -20,
formatter: function (params) {
let value = params.split("-");
return `${value[0]}\n\n${value[1]}`;
},
},
axisTick: {
show: false,
@ -131,7 +160,7 @@ var options = {
],
series: [
{
name: "",
name: "济南方向",
type: "line",
symbolSize: 0,
lineStyle: {
@ -164,7 +193,7 @@ var options = {
],
},
{
name: "",
name: "菏泽方向",
type: "line",
symbol: "circle",
symbolSize: 0,

866
ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue

File diff suppressed because it is too large

6
ruoyi-ui/src/views/JiHeExpressway/pages/service/publicService/components/auditAnalytics/assets/charts.js

@ -1,7 +1,7 @@
var res = [
{ value: 50, name: "情报板发布" },
{ value: 20, name: "微博发布" },
{ value: 30, name: "服务网站" },
{ value: 50, name: "审核通过" },
{ value: 20, name: "审核未通过" },
{ value: 30, name: "待审核" },
];
// var res = this.evaluatedCountList;
var data1 = [],

194
ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/index.vue

@ -1,5 +1,10 @@
<template>
<div class='sensitiveWord' v-loading="isLoading" element-loading-text="数据加载中" element-loading-background="rgba(0, 0, 0, 0.3)">
<div
class="sensitiveWord"
v-loading="isLoading"
element-loading-text="数据加载中"
element-loading-background="rgba(0, 0, 0, 0.3)"
>
<div class="filter">
<div>
<ButtonGradient @click.native="handleAddEdit(true)">
@ -22,16 +27,37 @@
</ButtonGradient>
</div>
<InputSearch style="width: 402px;" :formList="searchFormList" :formConfigOptions="{ labelWidth: '90px' }" :placeholder="searchText" @handleSearch="handleSearch" />
<InputSearch
style="width: 402px"
type="input"
params="word"
:disable="true"
:placeholder="searchText"
@handleSearch="handleSearch"
/>
</div>
<div class="body">
<Empty v-if="!data.length && !isFirst" class="no-data" style="position: absolute">暂无数据</Empty>
<Empty
v-if="!data.length && !isFirst"
class="no-data"
style="position: absolute"
>暂无数据</Empty
>
<template v-else>
<div class="cardBox" v-for="(item, index) in data" :key="index" style="overflow: hidden; height: 145px;">
<Card :buttonIcon="null" :keyMap="keyMap" :cardData="item" class="card"
buttonText="详情">
<div
class="cardBox"
v-for="(item, index) in data"
:key="index"
style="overflow: hidden; height: 145px"
>
<Card
:buttonIcon="null"
:keyMap="keyMap"
:cardData="item"
class="card"
buttonText="详情"
>
<template #form-word="{ data }">
<div class="keyword">
{{ data.word }}
@ -41,7 +67,10 @@
<Button @click.native="() => handleAddEdit(true, item)">
修改
</Button>
<Button style="background-color: #FF5F5F;" @click.native="handleDelete(item)">
<Button
style="background-color: #ff5f5f"
@click.native="handleDelete(item)"
>
删除
</Button>
</template>
@ -50,24 +79,34 @@
</template>
</div>
<!-- 分页 -->
<div class="footer" v-if="numTotal>0">
<Pagination :total="numTotal" :current-page.sync="currentPage" :page-size="pageSize" layout="prev, pager, next"
@size-change="handleSizeChange" @current-change="handleCurrentChange" />
<div class="footer" v-if="numTotal > 0">
<Pagination
:total="numTotal"
:current-page.sync="currentPage"
:page-size="pageSize"
layout="prev, pager, next,total, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
<AddNEditDialog v-model="isShowDialog" :data="dialogData" @onSuccess = "getData" :dataAll="data"/>
<AddNEditDialog
v-model="isShowDialog"
:data="dialogData"
@onSuccess="getData"
:dataAll="data"
/>
</div>
</template>
<script>
import Card from "@screen/components/Card1/index.vue"
import AddNEditDialog from "./components/AddNEditDialog.vue"
import InputSearch from '@screen/components/InputSearch/index.vue';
import ButtonGradient from '@screen/components/Buttons/ButtonGradient.vue';
import Button from '@screen/components/Buttons/Button.vue';
import Pagination from '@screen/components/Pagination.vue';
import Card from "@screen/components/Card1/index.vue";
import AddNEditDialog from "./components/AddNEditDialog.vue";
import InputSearch from "@screen/components/InputSearch/index.vue";
import ButtonGradient from "@screen/components/Buttons/ButtonGradient.vue";
import Button from "@screen/components/Buttons/Button.vue";
import Pagination from "@screen/components/Pagination.vue";
import { searchFormList } from "./data";
import request from "@/utils/request";
@ -77,44 +116,44 @@ import { Message } from "element-ui";
//
export default {
name: 'sensitiveWord',
name: "sensitiveWord",
components: {
Pagination,
Card,
ButtonGradient,
InputSearch,
AddNEditDialog,
Button
Button,
},
data() {
return {
isLoading:false,
searchText:"关键词搜索",
isLoading: false,
searchText: "请输入敏感词,回车搜索",
searchFormList,
numTotal:0,
pageSize:42,
currentPage:1,
numTotal: 0,
pageSize: 42,
currentPage: 1,
keyMap: [
{
key: "word",
label: "关键词"
label: "关键词",
},
{
key: "id",
label: "id"
label: "id",
},
{
key: "createTime",
label: "创建时间"
}
label: "创建时间",
},
],
data: [],
dialogData: null,
isShowDialog: false,
isFirst: true
}
isFirst: true,
};
},
created() {
this.getData();
@ -125,13 +164,13 @@ export default {
let params = {
word: this.searchData?.word,
pageSize: this.pageSize,
pageNum: this.currentPage
pageNum: this.currentPage,
};
// params = {
// pageSize: 1000000,
// pageNum: 1
// };
return params
return params;
},
async handleDelete(data) {
await confirm({ message: "是否要删除该敏感词?" });
@ -139,16 +178,16 @@ export default {
request({
url: `/business/dcInfoBoardVocabulary/${data.id}`,
method: "DELETE",
data: {}
data: {},
})
.then(result => {
.then((result) => {
if (result.code != 200) return Message.error("删除失败");
Message.success("删除成功")
Message.success("删除成功");
this.getData();
})
.catch(() => {
Message.error("删除失败")
})
Message.error("删除失败");
});
},
handleAddEdit(bool, data) {
this.isShowDialog = bool;
@ -158,7 +197,7 @@ export default {
exportFile({
url: "/business/dcInfoBoardVocabulary/export",
filename: "情报板敏感词",
data: this.getSearchData()
data: this.getSearchData(),
});
},
handleSearch(data) {
@ -174,19 +213,21 @@ export default {
request({
url: `/business/dcInfoBoardVocabulary/list`,
method: "get",
params: this.getSearchData()
}).then(result => {
this.searchText = this.searchData?.word || "关键词搜索";
if (result.code != 200) return;
this.data = result.rows;
this.numTotal = result.total;
// this.pageTotal = Math.ceil(result.total/this.pageSize);
}).finally(() => {
this.isFirst = false;
// closeLoading();
this.isLoading = false;
params: this.getSearchData(),
})
.then((result) => {
this.searchText = this.searchData?.word || "请输入敏感词,回车搜索";
if (result.code != 200) return;
this.data = result.rows;
this.numTotal = result.total;
// this.pageTotal = Math.ceil(result.total/this.pageSize);
})
.finally(() => {
this.isFirst = false;
// closeLoading();
this.isLoading = false;
});
},
handleSizeChange(size) {
@ -196,49 +237,54 @@ export default {
handleCurrentChange(currentPage) {
this.currentPage = currentPage;
this.getData();
}
}
}
},
},
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.sensitiveWord {
padding: 20px;
display: flex; flex-direction: column;
display: flex;
flex-direction: column;
.filter {
height: 60px;
display: flex;
justify-content: space-between;
align-items: center;
height: 60px;
display: flex;
justify-content: space-between;
align-items: center;
div {
display: flex;
gap: 6px;
}
div {
display: flex;
gap: 6px;
}
}
.body {
height: 0; flex: 1; overflow: hidden;
display: flex; flex-wrap: wrap; align-content: flex-start;
.cardBox{
flex-basis: percentage(1/7); width: 0; padding-right: 10px; padding-bottom: 10px;
height: 0;
flex: 1;
overflow: hidden;
display: flex;
flex-wrap: wrap;
align-content: flex-start;
.cardBox {
flex-basis: percentage(1/7);
width: 0;
padding-right: 10px;
padding-bottom: 10px;
}
.keyword {
font-size: 14px;
font-weight: bold;
color: #00B3CC;
color: #00b3cc;
}
}
.footer {
.footer {
margin-top: 15px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
}
}
</style>

4
ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss

@ -328,7 +328,9 @@ div.el-picker-panel.el-date-range-picker.el-popper {
}
}
}
.el-date-range-picker .el-picker-panel__body {
min-width: 405px;
}
div.el-scrollbar {
.el-scrollbar__wrap {
/**

Loading…
Cancel
Save