|
@@ -237,60 +237,11 @@
|
|
|
</el-row>
|
|
|
<!-- <el-divider /> -->
|
|
|
<!-- 添加或修改公告对话框 -->
|
|
|
- <el-dialog :title="title" :visible.sync="open" width="880px" append-to-body>
|
|
|
- <el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
|
+ <el-dialog :title="title" :visible.sync="open" width="980px" append-to-body>
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="160px">
|
|
|
<el-row>
|
|
|
- <el-col :span="12" v-for="(item,index) in inputList" :key="index">
|
|
|
- <el-form-item :label="item.columnComment" prop="noticeTitle">
|
|
|
- <el-input :type="item.html_type" v-model="item.columnName" placeholder="请输入" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12" v-for="(item,index) in dataList" :key="item.columnComment">
|
|
|
- <el-form-item :label="item.columnComment" prop="noticeTitle">
|
|
|
- <el-date-picker type="date" placeholder="选择日期" v-model="item.columnName" style="width: 100%;"></el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12" v-for="(item,index) in selectList" :key="item.columnComment">
|
|
|
- <el-form-item :label="item.columnComment" prop="columnName">
|
|
|
- <el-select v-model="item.columnName" placeholder="请选择">
|
|
|
- <el-option
|
|
|
- v-for="dict in item.sysDictData"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" v-for="(item,index) in radiolist " :key="item.columnComment">
|
|
|
- <el-form-item label="状态">
|
|
|
- <el-radio-group v-model="form.status">
|
|
|
- <el-radio
|
|
|
- v-for="dict in statusOptions"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictValue"
|
|
|
- >{{dict.dictLabel}}</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" v-for="(item,index) in chekbosList " :key="item.columnComment">
|
|
|
- <el-form-item label="状态">
|
|
|
- <!-- <el-radio-group v-model="form.status">
|
|
|
- <el-radio
|
|
|
- v-for="dict in statusOptions"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictValue"
|
|
|
- >{{dict.dictLabel}}</el-radio>
|
|
|
- </el-radio-group> -->
|
|
|
- <el-checkbox-group v-model="form.type">
|
|
|
- <el-checkbox label="美食/餐厅线上活动" name="type"></el-checkbox>
|
|
|
- </el-checkbox-group>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" v-for="(item,index) in editorList" :key="item.columnComment">
|
|
|
- <el-form-item label="内容">
|
|
|
- <editor v-model="form.noticeContent" :min-height="192"/>
|
|
|
- </el-form-item>
|
|
|
+ <el-col :span="24" >
|
|
|
+ <dynamic-forms :config="form" @inputs = "changeFn" :formConfig="item" v-for="(item,index) in form.columns" :key='index' />
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
@@ -435,6 +386,7 @@ export default {
|
|
|
|
|
|
},
|
|
|
computed: {
|
|
|
+
|
|
|
// 时间高亮的数组
|
|
|
brightDate () {
|
|
|
// let ary = []
|
|
@@ -668,7 +620,7 @@ export default {
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm: function() {
|
|
|
- console.log(this.inputList)
|
|
|
+ console.log(this.form)
|
|
|
// this.$refs["form"].validate(valid => {
|
|
|
// if (valid) {
|
|
|
// if (this.form.id != undefined) {
|
|
@@ -687,6 +639,12 @@ export default {
|
|
|
// }
|
|
|
// });
|
|
|
},
|
|
|
+ // 弹框
|
|
|
+ changeFn(obj) {
|
|
|
+ for(let key in obj){
|
|
|
+ this.form[key] = obj[key]
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|