diff --git a/ruoyi-ui/README.md b/ruoyi-ui/README.md index 6f9886d8..82cc4cbe 100644 --- a/ruoyi-ui/README.md +++ b/ruoyi-ui/README.md @@ -84,84 +84,13 @@ data.js 表单封装,里面会使用PresetFormItems的一些FormItem. Form表单属性介绍:
- { - key: "ServiceAreaAbnormal", //唯一标识 一般tabs才需要 - label: "服务区异常",//表单标题 - formConfig: { - formOptions: {//element中表单配置参数 - column: 2, //一行放多少元素(基于:style grid布局实现) - }, - list: [//FormItem定义 - { - label: "异常分类:", - key: "eventSubclass", - type: "RadioGroup", - isAlone: true, - required: true, - options: { - activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", - options: [ - { - key: "8-1", - label: "封闭、暂停营业", - }, - { - key: "8-2", - label: "重要设施停用", - }, - { - key: "8-3", - label: "其他异常", - }, - ], - }, - }, - PresetFormItems.freeway, - PresetFormItems.direction, - { - label: "服务区:", - key: "dcEventServiceArea.facilityId", - type: "select", - isAlone: true, - required: true, - options: { - options: [ - { - value: "选项1", - label: "黄金糕", - }, - ], - }, - }, - { - label: "出入口:", - key: "dcEventServiceArea.exitsInlets", - type: "RadioGroup", - isAlone: true, - required: true, - options: { - activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", - options: [ - { - key: "1", - label: "出口", - }, - { - key: "2", - label: "入口", - }, - ], - }, - }, - PresetFormItems.startTime, - PresetFormItems.expectedEndTime, - PresetFormItems.remark, - PresetFormItems.source, - ], - }, - } +/* + column: 一行放多少元素(基于:style grid布局实现) + formList: 表单项(FormItem)配置集合 + v-model: 双向绑定的表单数据(可以获取到表单数据(同步表单数据this.$emit("update:value", this.formData)), 也可修改表单数据) +*/ -FormItem属性介绍: +FormItem属性介绍 & ons 事件监听: export const additionalNotes = { label: "补充说明:", // 标题 @@ -184,8 +113,9 @@ export const additionalNotes = { }, ons: { //on监听 element事件 change(value, ...args) { - const { data, formList } = args.slice(-1)\[0]; //data 为数据 formList为传入的配置项 - mileCal(data); + const { data, formList } = args.slice(-1)\[0]; //data 为表单数据 formList为传入的配置项 + formList[4].options.options = []; //调整配置项 修改下拉框options选项 + this.$set(this.data, 'deviceState', undefined); //更新v-model双向绑定的表单数据 } }, }; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastParam.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastParam.vue new file mode 100644 index 00000000..e6b921b7 --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastParam.vue @@ -0,0 +1,220 @@ + + + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue index 019b76c1..01cbfb3f 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue @@ -1,51 +1,37 @@ @@ -55,7 +41,7 @@ import Dialog from "@screen/components/Dialog/index.vue"; import Button from "@screen/components/Buttons/Button.vue"; import Video from "@screen/components/Video"; import CheckboxGroup from "@screen/components/FormConfig/components/ElCheckboxGroup.vue"; - +import BroadcastParam from "./BroadcastParam.vue"; import request from "@/utils/request"; import { getDeviceList } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"; @@ -68,6 +54,7 @@ export default { Button, Video, CheckboxGroup, + BroadcastParam }, model: { prop: "visible", @@ -75,9 +62,7 @@ export default { }, props: { visible: Boolean, - deviceId: String, pileNum: String, - currentId: [String, Number], otherConfig: String, }, data() { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/index.vue index 21008c8e..033773fa 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/index.vue @@ -10,11 +10,7 @@ - + @@ -23,13 +19,7 @@ - + @@ -131,7 +121,7 @@ export default { if (roadInfo) this.data.roadName = roadInfo.roadName; }, methods: { - handleClickTabs() {}, + handleClickTabs() { }, }, }; @@ -171,7 +161,7 @@ export default { align-items: center; justify-content: end; - > div { + >div { font-size: 16px; padding: 6px 12px; } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFilter/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFilter/index.vue index e24e8e8a..2fc0ff81 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFilter/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFilter/index.vue @@ -90,7 +90,6 @@ export default { watch: { activeDeviceTypes: { handler(val) { - console.log(val, this.activeDeviceTypes, 'xxx') const options = [] for (let id of DeviceTypeIds) { if (this.activeDeviceTypes.indexOf(`路测设备_${id}`) >= 0) { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFrameControl/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFrameControl/index.vue index 31acbadd..78bf3965 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFrameControl/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFrameControl/index.vue @@ -37,10 +37,11 @@ import { delay } from "@screen/utils/common"; import { initSearch } from "@screen/utils/enum/common.js" import { DeviceForMap } from "@screen/pages/Home/components/RoadAndEvents/utils/buttonEvent" -const DeviceTopics = {} +const controlMulti = ["情报板", "行车诱导", "疲劳唤醒", "合流区", "设备箱", "语音广播"]; +const DeviceTopics = {};//6种批量控制 事件专题 {key:label} Object.keys(DeviceForMap).forEach(DeviceLabel => { - DeviceTopics[DeviceForMap[DeviceLabel].deviceType] = DeviceLabel; + controlMulti.indexOf(DeviceLabel) !== -1 && (DeviceTopics[DeviceForMap[DeviceLabel].deviceType] = DeviceLabel); }); async function setDeviceOptions(config, filterData, formList) { const data = await getDeviceList(config.deviceType, filterData).then(async (data) => { @@ -248,7 +249,7 @@ export default { const match = activeDeviceType.match(/路测设备_(\d+)/); if (match) { const deviceType = match[1]; - activeTopicOptions.push({ label: DeviceTopics[deviceType], value: deviceType }); + DeviceTopics[deviceType] && activeTopicOptions.push({ label: DeviceTopics[deviceType], value: deviceType }); } }); diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue index 74a6d568..b1ff7993 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue @@ -246,7 +246,6 @@ export default { this.emitter.emit("selectedCompleted", item); return this.$emit("onClickItem", item); } - console.log(`${key}${status ? "_close" : ""}`, this.filterData, isDefault) await eventMap[`${key}${status ? "_close" : ""}`]?.call(this, item, this.filterData, isDefault, this.cb); }, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue index b0fd17c3..fc62b317 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue @@ -1,13 +1,9 @@