济菏高速业务端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
3.1 KiB

<template>
<Dialog v-model="modelVisible" :title="data ? '修改' : '新增'" width="550px">
1 year ago
<div class="AddNEditDialog">
<Form
v-model="formData"
class="form"
ref="FormConfigRef"
:formList="formList"
column="1"
labelWidth="90px"
/>
</div>
<template #footer>
1 year ago
<Button
style="background-color: rgba(0, 179, 204, 0.3)"
@click.native="(modelVisible = false), (submitting = false)"
>
取消
</Button>
1 year ago
<Button @click.native="handleSubmit" :loading="submitting"> 确定 </Button>
</template>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue";
1 year ago
import Button from "@screen/components/Buttons/Button.vue";
import Form from "@screen/components/FormConfig";
import request from "@/utils/request";
import { getSelectOptionsStation } from "@screen/pages/control/event/businessDataManagement/utils.js";
import { Message } from "element-ui";
import * as PresetFormItems from "@screen/common/PresetFormItems.js";
export default {
1 year ago
name: "AddNEditDialog",
components: {
Dialog,
Button,
1 year ago
Form,
},
model: {
1 year ago
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
1 year ago
data: Object,
},
1 year ago
inject: ["setCurrentPage"],
data() {
return {
submitting: false,
formData: {},
formList: [
{
label: "信息级别:",
key: "level",
type: "RadioGroup",
isAlone: true,
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "1",
label: "影响通行",
},
{
key: "2",
label: "不影响通行",
},
],
},
},
PresetFormItems.releaseChannel,
{
label: "审核方式:",
1 year ago
key: "process",
type: "RadioGroup",
isAlone: true,
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "1",
label: "单人审核",
},
{
key: "2",
label: "双人审核",
},
],
},
},
{
label: "启用日期:",
key: "startDate",
type: "DatePicker",
1 year ago
required: true,
},
],
};
},
computed: {
modelVisible: {
get() {
1 year ago
return this.visible;
},
set(val) {
1 year ago
this.$emit("update:value", val);
},
},
},
watch: {
modelVisible: {
immediate: true,
handler(bool) {
if (!bool) return;
this.formData = {
1 year ago
...this.data,
};
this.getOptions();
1 year ago
},
},
},
methods: {
1 year ago
getOptions() {},
handleSubmit() {},
},
1 year ago
};
</script>
1 year ago
<style lang="scss" scoped>
.AddNEditDialog {
width: 450px;
height: 200px;
display: flex;
flex-direction: column;
gap: 15px;
.tips {
font-size: 12px;
}
}
</style>