diff --git a/ruoyi-ui/src/api/perception/meteorologyCheck.js b/ruoyi-ui/src/api/perception/meteorologyCheck.js new file mode 100644 index 00000000..f179d38f --- /dev/null +++ b/ruoyi-ui/src/api/perception/meteorologyCheck.js @@ -0,0 +1,32 @@ +import request from "@/utils/request"; + +// 查询天气状况 +export function getWeatherFacts() { + return request({ + url: "/weatherForecast/weatherFacts", + method: "post", + }); +} + +// 按小时查询天气状况 +export function getHourlyWeather() { + return request({ + url: "/weatherForecast/hourlyWeather", + method: "post", + }); +} + +// 查询气象预警 +export function getMeteorologicalEarlyWarning() { + return request({ + url: "/weatherForecast/meteorologicalEarlyWarning", + method: "post", + }); +} +// 查询气象预警数量 +export function getQueryTheNumberOfMeteorologicalWarning() { + return request({ + url: "/weatherForecast/queryTheNumberOfMeteorologicalWarning", + method: "post", + }); +} diff --git a/ruoyi-ui/src/assets/styles/JiHeExpressway.scss b/ruoyi-ui/src/assets/styles/JiHeExpressway.scss index 36e5c973..660da6bd 100644 --- a/ruoyi-ui/src/assets/styles/JiHeExpressway.scss +++ b/ruoyi-ui/src/assets/styles/JiHeExpressway.scss @@ -1,14 +1,17 @@ .theme-jihe { + $lightBlue: #3de8ff; $textColor: #f4f4f4; $inputHeight: 26px; color: $textColor; + .text-center{ text-align: center;} + .tc-lb{ color: $lightBlue;} .el-tabs__item { color: $textColor; } .el-form-item { - margin-bottom: 14px; + margin-bottom: 8px; } .el-form-item__label { @@ -47,11 +50,14 @@ // 多选框组 .el-checkbox-group { + // height: $inputHeight; .el-checkbox__label { color: $textColor; + padding-left: 6px; } .el-checkbox { + margin-right: 16px; .el-checkbox__inner { width: 20px; height: 20px; @@ -92,12 +98,17 @@ color: #fff; &.is-disabled { - color: #006a99; + color: #096d8c; } } .el-input { margin: 0; + .el-input__inner{ + height: calc($inputHeight + 2px); + background-color: #096d8c; + padding:0 28px; + } } } // 单选按钮 diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js index cdf37ddc..937504c4 100644 --- a/ruoyi-ui/src/main.js +++ b/ruoyi-ui/src/main.js @@ -1,83 +1,90 @@ -import Vue from 'vue' -import CollapseTransition from 'element-ui/lib/transitions/collapse-transition'; -import Cookies from 'js-cookie' - -import Element from 'element-ui' -import './assets/styles/element-variables.scss' -import './views/iot/css/iot.css' -import '@/assets/styles/index.scss' // global css -import '@/assets/styles/ruoyi.scss' // ruoyi css -import App from './App' -import store from './store' -import router from './router/routerCreater' -import directive from './directive' //directive -import plugins from './plugins' // plugins -import './assets/icon/iconfont.css' // 阿里巴巴icon -import './assets/icons' // icon -import './permission' // permission control -import { Socket } from './utils/socket' +import Vue from "vue"; +import CollapseTransition from "element-ui/lib/transitions/collapse-transition"; +import Cookies from "js-cookie"; + +import Element from "element-ui"; +import "./assets/styles/element-variables.scss"; +import "./views/iot/css/iot.css"; +import "@/assets/styles/index.scss"; // global css +import "@/assets/styles/ruoyi.scss"; // ruoyi css +import App from "./App"; +import store from "./store"; +import router from "./router/routerCreater"; +import directive from "./directive"; //directive +import plugins from "./plugins"; // plugins +import "./assets/icon/iconfont.css"; // 阿里巴巴icon +import "./assets/icons"; // icon +import "./permission"; // permission control +import { Socket } from "./utils/socket"; import { getDicts } from "@/api/system/dict/data"; import { getConfigKey } from "@/api/system/config"; -import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree, numberMul } from "@/utils/ruoyi"; +import { + parseTime, + resetForm, + addDateRange, + selectDictLabel, + selectDictLabels, + handleTree, + numberMul, +} from "@/utils/ruoyi"; // 分页组件 import Pagination from "@/components/Pagination"; // 自定义表格工具组件 -import RightToolbar from "@/components/RightToolbar" +import RightToolbar from "@/components/RightToolbar"; // 富文本组件 -import Editor from "@/components/Editor" +import Editor from "@/components/Editor"; // 文件上传组件 -import FileUpload from "@/components/FileUpload" +import FileUpload from "@/components/FileUpload"; // 图片上传组件 -import ImageUpload from "@/components/ImageUpload" +import ImageUpload from "@/components/ImageUpload"; // 字典标签组件 -import DictTag from '@/components/DictTag' +import DictTag from "@/components/DictTag"; // 头部标签组件 -import VueMeta from 'vue-meta' +import VueMeta from "vue-meta"; // 字典数据组件 -import DictData from '@/components/DictData' +import DictData from "@/components/DictData"; // 无缝滚动组件 -import VueSeamlessScroll from 'vue-seamless-scroll' -import VueAwesomeSwiper from 'vue-awesome-swiper' -import 'swiper/css/swiper.css' +import VueSeamlessScroll from "vue-seamless-scroll"; +import VueAwesomeSwiper from "vue-awesome-swiper"; +import "swiper/css/swiper.css"; //el-table无线滚动 // 事件弹窗组件 -import eventDialog from '@/components/eventDialogTable/eventDialog.vue' -import eventDialogTable from '@/components/eventDialogTable' -import evtDialogOneThing from '@/components/eventDialogTable/evtDialogOneThing.vue' -import evtDialogVideo from '@/components/eventDialogTable/video.vue' +import eventDialog from "@/components/eventDialogTable/eventDialog.vue"; +import eventDialogTable from "@/components/eventDialogTable"; +import evtDialogOneThing from "@/components/eventDialogTable/evtDialogOneThing.vue"; +import evtDialogVideo from "@/components/eventDialogTable/video.vue"; // 大屏适配 -import dataV from '@jiaminghi/data-view' - +import dataV from "@jiaminghi/data-view"; // 字典标签组件 // import reproductionImage from '@/components/reproductionImage' // jQuery -import $ from 'jquery' -import preventClick from './api/clickOnceAtime' +import $ from "jquery"; +import preventClick from "./api/clickOnceAtime"; // gisMap // import gisMap from 'gis-map-tunnel' // import gisMap from 'gis-map-admin' -import config from '../public/config' +import config from "../public/config"; -import request from '../public/config' -import moment from 'moment' -window.moment = moment -import dayjs from "dayjs" +import request from "../public/config"; +import moment from "moment"; +window.moment = moment; +import dayjs from "dayjs"; //定义全局过滤器 -Vue.filter('dateformat', function (dataStr, pattern = 'YYY-MM-DD HH:mm:ss') { +Vue.filter("dateformat", function (dataStr, pattern = "YYY-MM-DD HH:mm:ss") { if (dataStr === null || dataStr === "") { return ""; } - return moment(dataStr).format(pattern) + return moment(dataStr).format(pattern); //filter两个参数 第一个是函数名,第二个是时间格式化处理的函数 //(函数里面的参数 第一个是传递的数据,第二个是需要转换的时间格式) -}) +}); window.IS_TESTING = false; -if (process.env.NODE_ENV == 'development'){ +if (process.env.NODE_ENV == "development") { window.IS_TESTING = false; } @@ -86,47 +93,45 @@ Vue.component("Empty", Empty); // 全局方法挂载 Vue.prototype.dayjs = dayjs; -Vue.prototype.getDicts = getDicts -Vue.prototype.getConfigKey = getConfigKey -Vue.prototype.parseTime = parseTime -Vue.prototype.resetForm = resetForm -Vue.prototype.addDateRange = addDateRange -Vue.prototype.selectDictLabel = selectDictLabel -Vue.prototype.selectDictLabels = selectDictLabels -Vue.prototype.handleTree = handleTree -Vue.prototype.socket = Socket -Vue.prototype.numberMul = numberMul - -// gis -Vue.prototype.$GlobalConfig = config.GlobalConfig - -Vue.use(preventClick) -Vue.use(VueAwesomeSwiper) -Vue.use(dataV) +Vue.prototype.getDicts = getDicts; +Vue.prototype.getConfigKey = getConfigKey; +Vue.prototype.parseTime = parseTime; +Vue.prototype.resetForm = resetForm; +Vue.prototype.addDateRange = addDateRange; +Vue.prototype.selectDictLabel = selectDictLabel; +Vue.prototype.selectDictLabels = selectDictLabels; +Vue.prototype.handleTree = handleTree; +Vue.prototype.socket = Socket; +Vue.prototype.numberMul = numberMul; + +// gis +Vue.prototype.$GlobalConfig = config.GlobalConfig; + +Vue.use(preventClick); +Vue.use(VueAwesomeSwiper); +Vue.use(dataV); // 全局组件挂载 -Vue.component('DictTag', DictTag) -Vue.component('Pagination', Pagination) -Vue.component('RightToolbar', RightToolbar) -Vue.component('Editor', Editor) -Vue.component('FileUpload', FileUpload) -Vue.component('ImageUpload', ImageUpload) -Vue.component('VueSeamlessScroll', VueSeamlessScroll) -Vue.component('eventDialog', eventDialog) -Vue.component('eventDialogTable', eventDialogTable) -Vue.component('evtDialogOneThing', evtDialogOneThing) -Vue.component('evtDialogVideo', evtDialogVideo) - - - -Vue.component(CollapseTransition.name, CollapseTransition) +Vue.component("DictTag", DictTag); +Vue.component("Pagination", Pagination); +Vue.component("RightToolbar", RightToolbar); +Vue.component("Editor", Editor); +Vue.component("FileUpload", FileUpload); +Vue.component("ImageUpload", ImageUpload); +Vue.component("VueSeamlessScroll", VueSeamlessScroll); +Vue.component("eventDialog", eventDialog); +Vue.component("eventDialogTable", eventDialogTable); +Vue.component("evtDialogOneThing", evtDialogOneThing); +Vue.component("evtDialogVideo", evtDialogVideo); + +Vue.component(CollapseTransition.name, CollapseTransition); // Vue.component('reproductionImage', reproductionImage) -Vue.use(directive) -Vue.use(plugins) +Vue.use(directive); +Vue.use(plugins); // Vue.use(gisMap) -Vue.use(VueMeta) -DictData.install() +Vue.use(VueMeta); +DictData.install(); /** * If you don't want to use mock-server * you want to use MockJs for mock api @@ -137,14 +142,14 @@ DictData.install() */ Vue.use(Element, { - size: Cookies.get('size') || 'medium' // set element-ui default size -}) + size: Cookies.get("size") || "medium", // set element-ui default size +}); -Vue.config.productionTip = false +Vue.config.productionTip = false; new Vue({ - el: '#app', + el: "#app", router, store, - render: h => h(App) -}) \ No newline at end of file + render: (h) => h(App), +}); diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js index d31b22f7..1acab51b 100644 --- a/ruoyi-ui/src/utils/request.js +++ b/ruoyi-ui/src/utils/request.js @@ -141,6 +141,14 @@ service.interceptors.response.use(res => { else if (message.includes("Request failed with status code")) { message = "系统接口" + message.substr(message.length - 3) + "异常"; } + else if (message.includes("client_offline")) + { + message = "设备离线" + } + else if (message.includes("time_out")) + { + message = "连接超时" + } Message({ message: message, type: 'error', diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue b/ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue index ff5a269d..07ace08c 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue @@ -51,8 +51,8 @@ export default { return this.scale } }, - watch:{ - headerHeight(){ + watch: { + headerHeight() { } }, methods: { diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue b/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue index f8730268..16d177eb 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue @@ -1,20 +1,37 @@ - - diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js index eaab0514..be21983a 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js @@ -230,7 +230,7 @@ export const eventMap = { iconClass: "el-icon-loading", }); } - const data = await getPerceiveEventList() + const data = await getPerceiveEventList({warningState: 1}) .then(async (data) => { await delay(600); return data; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js index 16dc309f..0001db2e 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js @@ -297,12 +297,12 @@ export function getEventTopicList(eventType) { * 感知事件根据类型获取 * @param {number} eventType */ -export function getPerceiveEventList() { +export function getPerceiveEventList(data = {}) { return new Promise((resolve, reject) => { request({ url: `/perceivedEvents/warning/perceivedEventsList`, method: "POST", - data: {}, + data: {...data}, }) .then(({ code, rows }) => { if (code != 200) { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue index 54a0cfad..7bd3b707 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue @@ -1,6 +1,9 @@