Browse Source

data.js

develop
lau572 4 months ago
parent
commit
744788bfdf
  1. 138
      ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index2.vue
  2. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeTraffic/index.vue
  3. 20
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
  4. 67
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/record/data.js
  5. 11
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/police/data.js
  6. 42
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/data.js
  7. 32
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/statisticalAnalysis/query/data.js
  8. 29
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/statisticalAnalysis/query/index.vue
  9. 57
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/meteorologyCheck/data.js
  10. 32
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/noStakeWaning/data.js
  11. 31
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/statistics/data.js
  12. 62
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSituation/query/data.js
  13. 15
      ruoyi-ui/src/views/JiHeExpressway/pages/safe/files/data.js
  14. 2453
      ruoyi-ui/src/views/JiHeExpressway/utils/enum_event/data.js

138
ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index copy.vue → ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index2.vue

@ -1,32 +1,29 @@
<template>
<div class="from-content" style="width: 100%">
<div class="InputSearch input" v-if="params && types == 'input'">
<ElInput
style="width: 100%"
v-model="value"
:placeholder="placeholder"
@change="handleSearch"
></ElInput>
<img src="./search.svg" @click="handleFormShow" />
</div>
<div class="from-content" style="width: 300px">
<!-- <div ref="mask" style="position: fixed; z-index: 9999999; left: 0; top:0; bottom: 0; right: 0; background: rgba(0, 0, 0, 0.5);" @click.prevent="onClickMask" v-if="visible"></div> -->
<ElPopover
v-else
ref="PopoverRef"
placement="bottom"
placement="bottom-end"
popper-class="global-input-search-popover"
:popperOptions="popperOptions"
:visibleArrow="false"
:width="this.width"
trigger="click"
width="300px"
trigger="manual"
v-model="visible"
@show="handleShow"
style="width: 100%"
style="width: 300px"
>
<div
class="InputSearch"
style="width: 160px"
slot="reference"
ref="ReferenceInputRef"
@click="onOpenPop"
>
<div class="InputSearch" slot="reference" ref="ReferenceInputRef">
<span>{{ placeholder }}</span>
<img src="./search.svg" @click="handleFormShow" />
<img src="./search.svg" />
</div>
<div style="width: 100%; max-height: 360px">
<div style="width: 300px; max-height: 360px" v-show="visible">
<slot>
<Form
v-if="formList && formList.length"
@ -65,6 +62,7 @@ export default {
Form,
},
props: {
//
type: {
type: String,
default: "form",
@ -73,15 +71,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,
@ -93,8 +91,10 @@ export default {
},
data() {
return {
isClickedBtn: false,
visible: false,
types: this.type,
value: this.valueData,
value: "",
width: null,
popperOptions: {
popHideCallBack: () => {
@ -103,7 +103,7 @@ export default {
},
};
},
emit: ["handleSearch"],
emit: ["handleSearch", "handleResetForm"],
computed: {
getFormConfigOptions() {
return {
@ -113,46 +113,83 @@ export default {
};
},
},
methods: {
handleFormShow() {
console.log(this.params, this.types);
if (this.params) {
if (this.types == "form") {
this.types = "input";
} else {
this.types = "form";
mounted() {
// document.getElementById("app")
document.addEventListener(
"click",
() => {
if (!this.isClickedBtn) {
setTimeout(() => {
this.visible = false;
}, 100);
}
} else {
this.types = "form";
}
console.log(this.params, this.types);
this.isClickedBtn = false;
},
false
);
},
methods: {
onOpenPop() {
this.isClickedBtn = true;
this.visible = !this.visible;
},
onClickMask() {
this.visible = false;
},
handleShow() {
if (this.width) return;
this.width = this.$refs.ReferenceInputRef.getBoundingClientRect().width;
// this.width = this.$refs.ReferenceInputRef.getBoundingClientRect().width;
},
handleResetForm() {
if(this.params && this.types == 'input'){
this.value = "";
}
console.log(this.$refs.FormConfigRef?.formData , "重置前");
// this.visible = true;
this.$refs.FormConfigRef?.reset();
this.$refs.FormConfigRef?.$refs.ElFormRef.resetFields();
// this.$refs.PopoverRef.doClose();
const param = cloneDeep(this.$refs.FormConfigRef?.formData);
if (this.types === "input") {
param[this.params] = null
}
console.log(this.$refs.FormConfigRef?.formData , "重置后");
this.$emit(
"handleSearch",
param,
"reset"
);
},
async handleSearch(value) {
if (this.types === "input") {
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");
});
}
this.$emit("handleSearch", cloneDeep(this.$refs.FormConfigRef?.formData));
},
handleSearch() {
if (this.types == "form") {
let resultParams = { ...result, ...params };
this.$emit("handleSearch", resultParams, "search");
} else {
this.$refs.FormConfigRef.validate()
.then((result) => {
this.$refs.PopoverRef.doClose();
this.$emit("handleSearch", result);
this.$emit("handleSearch", result, "search");
})
.catch((err) => {
console.log("catch");
});
} else {
let params = {};
params[this.params] = this.value;
this.$emit("handleSearch", params);
}
},
},
@ -161,7 +198,6 @@ export default {
<style lang="scss" scoped>
.InputSearch {
width: 100%;
height: 26px;
background: linear-gradient(180deg, #005c79 0%, #009bcc 100%) !important;
color: #fff;
@ -170,7 +206,6 @@ export default {
align-items: center;
justify-content: space-between;
padding: 3px 15px;
padding-right: 9px;
cursor: pointer;
font-size: 12px;
@ -178,6 +213,9 @@ export default {
font-weight: 400;
color: #ffffff;
line-height: 14px;
> span {
margin-left: 10px;
}
}
.input ::v-deep .el-input__inner {
background: none;

6
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeTraffic/index.vue

@ -175,8 +175,10 @@ export default {
cid:0,
}};
let total = list.length>9?9:list.length;
for(let i = 0; i<total;i++){
marks[(i+1).toString()] = {
let idx = 0;
for(let i = list.length-1; i>=0;i--){
idx++;
marks[idx] = {
style,
label: list[i].createTime.substr(11,5),
remark: list[i].createTime,

20
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js

@ -3,6 +3,9 @@ import { loadAMap } from "@screen/pages/Home/components/AMapContainer/loadAMap.j
import Vue from "vue";
import { lngLatMap } from "./buttonEvent";
import { upperFirst, filter } from "lodash";
import {
WarningSubclassOptions,
} from "@screen/utils/enum.js";
/**
* @typedef {Object} Point
* @property {number} weight - The weight of the item.
@ -107,6 +110,18 @@ export class MarkerCluster {
}
let _stake = e.extData.stakeMark;
const state = getState(e);
console.log(e.extData,3334)
let _title = '';
if(e.extData.stakeMark && e.extData.direction){
if(e.extData.warningSubclass){
let arySubClass = e.extData.warningSubclass.split('-')
console.log(arySubClass,3334)
_title = `${e.extData.stakeMark} ${e.extData.direction==='1'?'菏泽方向':'济南方向'} ${_.find(WarningSubclassOptions[arySubClass[0]],{value:e.extData.warningSubclass}).label}事件`
} else {
_title = `${e.extData.stakeMark} ${e.extData.direction==='1'?'菏泽方向':'济南方向'} ${e.config?.item.title}事件`
}
}
aryPoints.push({
type: 'event', //类型。例如:交通事件、故障停车、摄像机等 【必传字段】
longitude: e.lnglat[0], //点坐标经度 【必传字段】
@ -114,13 +129,14 @@ export class MarkerCluster {
iconUrl: getIcon(e,'b'), // 图标 【必传字段】
// offset:[0,-65],
// size:[64,120],
otherInfo: {
...e,
stake: _stake,
state: state?1:0,
name: e.extData.deviceName ||
e.extData.warningTitle ||
e.config?.item.title,
_title
}
})
}

67
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/record/data.js

@ -0,0 +1,67 @@
// import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js";
import * as PresetFormItems from "@screen/common/PresetFormItems.js";
// import { merge, cloneDeep } from "lodash";
import {directionOptions} from '@screen/utils/enum.js';
export const searchFormList = [
{
label: "管控方式:",
key: "operType",
type: "select",
clearable: true,
options: {
options: [
{ key: "0", label: "手动控制" },
{ key: "1", label: "定时控制" },
{ key: "2", label: "批量控制" },
{ key: "3", label: "预案控制" }
],
},
},
{
label: "管控时间:",
key: "operTime",
required: false,
type: "datePicker",
options: {
type: "daterange",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd",
},
}, {
label: "设备类型:",
key: "dcDeviceType",
type: "select",
clearable: true,
options: {
options: [
{
key: 2,
label: "可变信息标志",
},
{
key: 5,
label: "语音广播",
},
{
key: 10,
label: "疲劳唤醒",
},
{
key: 12,
label: "行车诱导",
},
{
key: 13,
label: "设备箱",
},
{
key: 16,
label: "远端机",
},
],
},
},
];

11
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/police/data.js

@ -0,0 +1,11 @@
// import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js";
export const searchFormList = [
{
label: "姓名:",
key: "name",
},{
label: "电话:",
key: "phone",
},
];

42
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/data.js

@ -0,0 +1,42 @@
import {
eventSubClassMap,
trafficKV
} from "@screen/utils/enum.js";
export const _formList = [
{
label: "预案名称:",
key: "planName",
type: "input",
required: true,
options: {
maxlength: 10
},
},
{
label: "事件类型:",
key: "eventType",
type: "select",
required: true,
options: {
clearable: true,
options: trafficKV,
},
ons: {
change(value, ...args) {
const { data, formList } = args.slice(-1)[0];
formList[2].options.options = eventSubClassMap[1][value];
data.triggerMechanism =''
},
},
},
{
label: "细分类型:",
key: "triggerMechanism",
type: "select",
required: true,
options: {
clearable: true,
options: [],
},
},
];

32
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/statisticalAnalysis/query/data.js

@ -150,6 +150,38 @@ export const searchFormList = [
// }
];
export const searchFormList2 = [
{
label: "桩号:",
key: "stakeMark",
},
{
label: "使用状态:",
key: "deviceStatus",
type: "select",
options: {
options: [
{ key: "1", label: "使用中" },
{ key: "0", label: "未使用" }
],
},
},
{
label: "设备状态:",
key: "useState",
type: "select",
options: {
options: [
{ key: "1", label: "在线" },
{ key: "0", label: "离线" }
],
},
},{
label: "IP地址:",
key: "deviceIp",
}
];
export const testDeviceData = {
"msg": "操作成功",
"code": 200,

29
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/statisticalAnalysis/query/index.vue

@ -43,7 +43,7 @@
</ElTableColumn>
<ElTableColumn prop="deviceIp" width="120" label="IP"> </ElTableColumn>
<!-- <ElTableColumn prop="statisticalDate" width="200" label="监测时间"> </ElTableColumn> -->
<ElTableColumn prop="deviceStatus" width="120" label="状态" >
<ElTableColumn prop="deviceStatus" width="120" label="设备状态" >
<template slot-scope="scope" >
<div v-if="scope.row.deviceStatus == '1'">在线</div>
<div v-else style="color: #bbb">
@ -58,7 +58,14 @@
<template slot-scope="scope">
<span>{{ scope.row.onlineRate }}%</span>
</template> </ElTableColumn>
<ElTableColumn prop="id" width="120" label="日志">
<ElTableColumn prop="id" width="200" label="日志">
<template slot="header" slot-scope="scope">
<InputSearch2
placeholder="搜索"
:formList="searchFormList2"
@handleSearch="handleSearch2" />
</template>
<template slot-scope="scope">
<span class="el-icon-view btnRecord" @click="showRecord(scope.row)" > 网络日志</span>
</template> </ElTableColumn>
@ -78,11 +85,12 @@
<script>
import * as echarts from "echarts";
import { searchFormList,deviceType } from "./data";
import { searchFormList,searchFormList2,deviceType } from "./data";
import { Loading } from "element-ui";
import Table from '@screen/components/Table.vue';
import Pagination from "@screen/components/Pagination.vue";
import InputSearch from "@screen/components/InputSearch/index.vue";
import InputSearch2 from "@screen/components/InputSearch/index2.vue";
import chartsOption from "./charts";
import request from "@/utils/request";
import DialogRecord from './dialogRecord.vue'
@ -98,7 +106,9 @@ export default {
Table,
Pagination,
InputSearch,
InputSearch2,
searchFormList,
searchFormList2,
DialogRecord
},
data() {
@ -116,6 +126,7 @@ export default {
interval: null,
sectionData: [],
searchFormList,
searchFormList2,
startTime: "",
time: "",
deviceName: null,
@ -128,7 +139,8 @@ export default {
order:'desc',
orderField: 'time',
dialogVisible: false,
dialogData: {}
dialogData: {},
tabelSearch: {}
};
},
destroyed() {
@ -242,7 +254,8 @@ export default {
pageNum: this.searchData.pageNum,
pageSize: this.searchData.pageSize,
orderByField:this.orderField,
orderDirection:this.order
orderDirection:this.order,
...this.tabelSearch
};
if(this.deviceName){
@ -298,6 +311,12 @@ export default {
this.direction = data.direction
this.initQueryChart();
},
handleSearch2(data){
this.searchData.pageNum = 1;
this.tabelSearch = data;
this.initQueryTable();
},
//

57
ruoyi-ui/src/views/JiHeExpressway/pages/perception/meteorologyCheck/data.js

@ -0,0 +1,57 @@
import moment from "moment/moment";
const weather={
'00':'晴',
'11':'阴',
'12':'小雨',
'13':'中雨',
'14':'大雨',
'15':'暴雨',
'21':'阴',
'22':'雨夹雪',
'31':'阴',
'32':'小雪',
'33':'中雪',
'34':'大雪',
}
export function getWeatherFormat(data,unit=false) {
let icon = data['weatherConditionCode']
let text = data['weatherCondition']
// let ms = data.pph.toString()+data.preLevel.toString();
// if(weather[ms]){
// icon = ms;
// text = weather[ms];
// }
const res = {
stakeMark: data.stakeNum,
name: data.sectionName,
orgName: data.orgName,
icon,
text,
temp:data.tem.toFixed(1), //温度
windDir: data.windDirection,//风想
windScale: data.windLevel, //风力
windSpeed: data.windSpeed.toFixed(2),
feelsLike:data.tem,
humidity:data.rhu,
precip: data.pre,
vis: (data.vis/1000).toFixed(1), //能见度
visDesc: data.visDescription,
lat:data.lat,
lon:data.lon,
obsTime: data.weatherTime
};
if(unit){
res.temp += '℃'
res.windScale += '级'
res.precip += '㎜'
res.vis += '㎞'
res.humidity += '%'
res.windSpeed += 'm/s'
res.obsTime = moment(res.obsTime).format('YYYY-MM-DD HH:mm:ss')
}
return res;
}

32
ruoyi-ui/src/views/JiHeExpressway/pages/perception/noStakeWaning/data.js

@ -0,0 +1,32 @@
// import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js";
import * as PresetFormItems from "@screen/common/PresetFormItems.js";
// import { merge, cloneDeep } from "lodash";
import {directionOptions} from '@screen/utils/enum.js';
export const searchFormList = [
{
label: "预警类型:",
key: "warningType",
type: "select",
options: {
clearable: true,
options: [
{key:1, label:'交通流预警'},
{key:2, label:'气象预警'}
],
},
},
{
label: "预警时间:",
key: "warningTime",
required: false,
type: "datePicker",
options: {
type: "daterange",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd",
},
},
];

31
ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/statistics/data.js

@ -0,0 +1,31 @@
export const searchFormList = [
{
label: "方向:",
key: "direction",
type: "select",
options: {
options: [
{
value: 1,
label: "菏泽方向",
},
{
value: 3,
label: "济南方向",
},{
value: '',
label: "双向",
}
],
},
},
{
label: "时间范围:",
key: "time",
type: "datePicker",
options: {
format: "yyyy-MM-dd",
type: "daterange",
},
},
];

62
ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSituation/query/data.js

@ -0,0 +1,62 @@
export const searchFormList = [
{
label: "路段名称:",
key: "intervalName",
clearable: true,
type: "select",
options: {
options: [],
},
}, {
label: "方向:",
key: "direction",
type: "select",
options: {
options: [
{
value: 1,
label: "菏泽方向",
},
{
value: 3,
label: "济南方向",
}
],
},
},
// {
// label: "指标名称:",
// key: "type",
// // required: true,
// type: "select",
// options: {
// options: [
// {
// value: "1",
// label: "拥挤度",
// },
// {
// value: "2",
// label: "饱和度",
// },
// {
// value: "3",
// label: "交通组成特征指数",
// },
// ],
// },
// },
{
label: "时间范围:",
key: "time",
type: "datePicker",
default: [
moment().format("YYYY-MM-DD"),
moment().format("YYYY-MM-DD"),
],
options: {
format: "yyyy-MM-dd",
type: "daterange",
},
},
];

15
ruoyi-ui/src/views/JiHeExpressway/pages/safe/files/data.js

@ -0,0 +1,15 @@
// import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js";
import * as PresetFormItems from "@screen/common/PresetFormItems.js";
// import { merge, cloneDeep } from "lodash";
import {directionOptions} from '@screen/utils/enum.js';
export const searchFormList = [
{
label: "文件名称:",
key: "fileName",
type: "input",
default: ""
},
];

2453
ruoyi-ui/src/views/JiHeExpressway/utils/enum_event/data.js

File diff suppressed because it is too large
Loading…
Cancel
Save