Browse Source

修改字段

wangqin
Joe 1 year ago
parent
commit
5608621e6b
  1. 6
      ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/ElCheckboxGroup.vue
  2. 9
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue

6
ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/ElCheckboxGroup.vue

@ -1,5 +1,5 @@
<template> <template>
<ElCheckboxGroup v-bind="$attrs" v-on="$listeners" class='ElCheckboxGroup'> <ElCheckboxGroup v-bind="$attrs" v-on="$listeners" class='ElCheckboxGroup' :style="{ gap }">
<ElCheckbox v-for="item in options" :label="item[id] || item[label]" :key="item[id] || item[label]"> <ElCheckbox v-for="item in options" :label="item[id] || item[label]" :key="item[id] || item[label]">
<slot :name="item[id] || item[label]" :data="item">{{ item[label] }}</slot> <slot :name="item[id] || item[label]" :data="item">{{ item[label] }}</slot>
</ElCheckbox> </ElCheckbox>
@ -28,6 +28,9 @@ export default {
type: String, type: String,
default: 'label' default: 'label'
}, },
gap: {
default: "24px"
}
} }
} }
</script> </script>
@ -36,7 +39,6 @@ export default {
.ElCheckboxGroup { .ElCheckboxGroup {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 24px;
::v-deep { ::v-deep {
.el-checkbox { .el-checkbox {

9
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue

@ -119,10 +119,11 @@ export default {
{ {
label: "影响车道:", label: "影响车道:",
key: "lane", key: "lane",
type: "RadioGroup", type: "CheckboxGroup",
options: { options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", // activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: LaneOccupancyList, options: LaneOccupancyList,
gap: "12px"
}, },
}, },
{ {
@ -204,7 +205,7 @@ export default {
// "latitude": "36.291145" // "latitude": "36.291145"
// }; // };
this.data = { ...data, roadName: null }; this.data = { ...data, roadName: null, lane: data.lane?.split(",") || [] };
this.formList[4].options.options = WarningSubclassList[data.warningType] || []; this.formList[4].options.options = WarningSubclassList[data.warningType] || [];
@ -240,7 +241,7 @@ export default {
warningSubclass: this.data.warningSubclass, warningSubclass: this.data.warningSubclass,
vehicleType: this.data.vehicleType, vehicleType: this.data.vehicleType,
remark: this.data.remark, remark: this.data.remark,
lane: this.data.lane lane: this.data.lane.join(",")
} }
}) })
.then(() => { .then(() => {

Loading…
Cancel
Save