Browse Source

修改

wangqin
Joe 1 year ago
parent
commit
8e0cc2db24
  1. 4
      ruoyi-ui/src/views/JiHeExpressway/components/Title/index.vue
  2. 85
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFilter/index.vue
  3. 3
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js

4
ruoyi-ui/src/views/JiHeExpressway/components/Title/index.vue

@ -34,8 +34,10 @@ export default {
background-image: url(./images/bg.svg); background-image: url(./images/bg.svg);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: auto; background-size: auto;
font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
.left {
font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
}
>div { >div {
display: flex; display: flex;

85
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFilter/index.vue

@ -29,6 +29,7 @@
import Button from '@screen/components/Buttons/Button.vue'; import Button from '@screen/components/Buttons/Button.vue';
import Form from '@screen/components/FormConfig'; import Form from '@screen/components/FormConfig';
import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js"; import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js";
import { merge, cloneDeep } from "lodash"
export default { export default {
name: 'HomeFilter', name: 'HomeFilter',
@ -40,24 +41,88 @@ export default {
return { return {
activeIcon: null, activeIcon: null,
formList: [ formList: [
{ merge(cloneDeep(PresetFormItems.station), {
...PresetFormItems.station,
key: "23",
required: false, required: false,
label: "起始桩号" label: "起始桩号:",
}, options: {
{ options: [
...PresetFormItems.station, {
key: "s", rules: [
{
message: "请补全桩号",
callback(value, data) {
if (!value?.trim() && data.startStakeMark[1]?.trim())
return false;
else return true;
},
},
],
key: "startStakeMark[0]",
},
{
rules: [
{
message: "请补全桩号",
callback(value, data) {
if (!value?.trim() && data.startStakeMark[0]?.trim())
return false;
else return true;
},
},
],
key: "startStakeMark[1]",
},
],
},
}),
merge(cloneDeep(PresetFormItems.station), {
required: false, required: false,
label: "结束桩号" label: "结束桩号:",
} options: {
options: [
{
rules: [
{
message: "请补全桩号",
callback(value, data) {
if (!value?.trim() && data.endStakeMark[1]?.trim())
return false;
else return true;
},
},
],
key: "endStakeMark[0]",
},
{
rules: [
{
message: "请补全桩号",
callback(value, data) {
if (!value?.trim() && data.endStakeMark[0]?.trim())
return false;
else return true;
},
},
],
key: "endStakeMark[1]",
},
],
},
}),
] ]
} }
}, },
methods: { methods: {
handleClick(type) { handleClick(type) {
this.activeIcon = this.activeIcon === type ? null : type; this.activeIcon = this.activeIcon === type ? null : type;
},
async handleResetForm() {
this.$refs.FormConfigRef?.reset();
this.activeIcon = null;
},
async handleSearch() {
const data = await this.$refs.FormConfigRef.validate();
this.activeIcon = null;
} }
} }
} }

3
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js

@ -173,7 +173,7 @@ const DeviceTypeMap = {
13: "智能设备箱", 13: "智能设备箱",
14: "光线在线监测", 14: "光线在线监测",
*/ */
export function getDeviceList(deviceType) { export function getDeviceList(deviceType, options) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (!deviceType) { if (!deviceType) {
Message.error(`${DeviceTypeMap[deviceType]}设备加载失败!`); Message.error(`${DeviceTypeMap[deviceType]}设备加载失败!`);
@ -185,6 +185,7 @@ export function getDeviceList(deviceType) {
method: "get", method: "get",
params: { params: {
deviceType, deviceType,
...options,
}, },
}) })
.then(({ code, data }) => { .then(({ code, data }) => {

Loading…
Cancel
Save