From 9ecd6ca9817dcc98fe404a1434529307c5f3ced4 Mon Sep 17 00:00:00 2001 From: qingzhengli <1204552371@qq.com> Date: Tue, 16 Apr 2024 10:11:24 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=20=E6=8B=86=E5=88=86=E5=B0=81=E8=A3=85?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=8E=A7=E5=88=B6=E7=9A=84=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=20&=20readMe=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/README.md | 88 +------ .../Broadcast/components/BroadcastParam.vue | 220 ++++++++++++++++++ .../components/BroadcastReleases.vue | 71 +++--- .../components/Dialogs/Broadcast/index.vue | 18 +- .../Home/components/HomeFilter/index.vue | 1 - .../components/HomeFrameControl/index.vue | 7 +- .../Home/components/RoadAndEvents/index.vue | 1 - .../views/JiHeExpressway/pages/Home/index.vue | 32 +-- 8 files changed, 275 insertions(+), 163 deletions(-) create mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastParam.vue 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 @@ + +