Browse Source

修改提交

wangqin
Joe 10 months ago
parent
commit
77928007e4
  1. 23
      ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue
  2. 8
      ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index.vue
  3. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue
  4. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue
  5. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue

23
ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue

@ -18,7 +18,7 @@
<script> <script>
import { resolveName, defaultComponentOptions } from "./utils/index"; import { resolveName, defaultComponentOptions } from "./utils/index";
import { reduceDefaultValue } from "./utils/defaultValue"; import { reduceDefaultValue } from "./utils/defaultValue";
import { set as pathSet, get as pathGet } from "lodash"; import { set as pathSet, get as pathGet, cloneDeep } from "lodash";
import ProxyCom from "./Proxy.vue"; import ProxyCom from "./Proxy.vue";
@ -163,11 +163,20 @@ export default {
return components[componentKey] || components[ElComponentKey] || ElComponentKey; return components[componentKey] || components[ElComponentKey] || ElComponentKey;
}, },
getRules(item) { getRules(item) {
// if (this.rules?.[item.key]) return this.rules[item.key]; //
// if (item.rules) return item.rules; /**
* validator 手动情况下 此方法需要改传参 ({
// console.log(item.required) * //
* data,
* //
* value,
* // el
* callback,
* // item config
* config
* })
*/
if (item.required) return [ if (item.required) return [
{ {
@ -183,8 +192,8 @@ export default {
}, },
validate() { validate() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.$refs.ElFormRef.validate((bool, data) => { this.$refs.ElFormRef.validate((bool) => {
if (bool) resolve(data) if (bool) resolve(cloneDeep(this.modelFormData))
else reject() else reject()
}) })
}) })

8
ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index.vue

@ -80,7 +80,13 @@ export default {
this.$emit('handleSearch', cloneDeep(this.$refs.FormConfigRef?.formData)); this.$emit('handleSearch', cloneDeep(this.$refs.FormConfigRef?.formData));
}, },
handleSearch() { handleSearch() {
this.$emit('handleSearch', cloneDeep(this.$refs.FormConfigRef?.formData)); this.$refs.FormConfigRef.validate()
.then((result) => {
this.$emit('handleSearch', result);
})
.catch((err) => {
console.log("catch")
});
} }
} }
} }

2
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue

@ -40,7 +40,6 @@
<script> <script>
import Dialog from "@screen/components/Dialog/index.vue"; import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue" import Button from "@screen/components/Buttons/Button.vue"
import Form from '@screen/components/FormConfig';
import Video from "@screen/components/Video" import Video from "@screen/components/Video"
import CheckboxGroup from "@screen/components/FormConfig/components/ElCheckboxGroup.vue" import CheckboxGroup from "@screen/components/FormConfig/components/ElCheckboxGroup.vue"
@ -54,7 +53,6 @@ export default {
components: { components: {
Dialog, Dialog,
Button, Button,
Form,
Video, Video,
CheckboxGroup CheckboxGroup
}, },

6
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue

@ -87,16 +87,16 @@ export default {
type: "RadioGroup", type: "RadioGroup",
default: "00", default: "00",
ons: { ons: {
input: (value, data, that) => { input: (value, { data }) => {
const oldFormData = this.oldFormData; const oldFormData = this.oldFormData;
if (!oldFormData) return; if (!oldFormData) return;
that.formList[1].options.options.splice(-1, 1, { this.formList[1].options.options.splice(-1, 1, {
...workStatus.slice(-1)[0], ...workStatus.slice(-1)[0],
disabled: value != "00" disabled: value != "00"
}) })
that.formList[1].options.options.splice(0, 1, { this.formList[1].options.options.splice(0, 1, {
...workStatus[0], ...workStatus[0],
disabled: value != "00" disabled: value != "00"
}) })

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

@ -80,9 +80,9 @@ export default {
options: WarningTypeList options: WarningTypeList
}, },
ons: { ons: {
change: (value, formData) => { change: (value, { data }) => {
this.formList[4].options.options = WarningSubclassList[value] || []; this.formList[4].options.options = WarningSubclassList[value] || [];
formData.warningSubclass = null; data.warningSubclass = null;
} }
} }
}, },

Loading…
Cancel
Save