@@ -15,11 +11,7 @@
-
+
@@ -30,7 +22,7 @@
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 @@ + +