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>
import { resolveName, defaultComponentOptions } from "./utils/index";
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";
@ -163,11 +163,20 @@ export default {
return components[componentKey] || components[ElComponentKey] || ElComponentKey;
},
getRules(item) {
// if (this.rules?.[item.key]) return this.rules[item.key];
//
// if (item.rules) return item.rules;
// console.log(item.required)
/**
* validator 手动情况下 此方法需要改传参 ({
* //
* data,
* //
* value,
* // el
* callback,
* // item config
* config
* })
*/
if (item.required) return [
{
@ -183,8 +192,8 @@ export default {
},
validate() {
return new Promise((resolve, reject) => {
this.$refs.ElFormRef.validate((bool, data) => {
if (bool) resolve(data)
this.$refs.ElFormRef.validate((bool) => {
if (bool) resolve(cloneDeep(this.modelFormData))
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));
},
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>
import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue"
import Form from '@screen/components/FormConfig';
import Video from "@screen/components/Video"
import CheckboxGroup from "@screen/components/FormConfig/components/ElCheckboxGroup.vue"
@ -54,7 +53,6 @@ export default {
components: {
Dialog,
Button,
Form,
Video,
CheckboxGroup
},

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

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

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

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

Loading…
Cancel
Save