|
@@ -33,6 +33,13 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* 选项样式 */
|
|
/* 选项样式 */
|
|
|
|
|
+ .el-form-item {
|
|
|
|
|
+ padding: 10px 20px;
|
|
|
|
|
+ border:1px solid #ccc;
|
|
|
|
|
+ border-radius: 5px;
|
|
|
|
|
+ margin-bottom:10px!important;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.el-form-item__content {
|
|
.el-form-item__content {
|
|
|
line-height: 1;
|
|
line-height: 1;
|
|
|
}
|
|
}
|
|
@@ -117,12 +124,19 @@
|
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
padding: 10px 0px;
|
|
padding: 10px 0px;
|
|
|
|
|
+ margin:0px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.groupMain {
|
|
.groupMain {
|
|
|
border: 1px solid #ccc;
|
|
border: 1px solid #ccc;
|
|
|
border-radius: 5px;
|
|
border-radius: 5px;
|
|
|
}
|
|
}
|
|
|
|
|
+ .groupMain .el-form-item{
|
|
|
|
|
+ border:0px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .el-message-box{
|
|
|
|
|
+ width: 315px!important;
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|
|
|
|
|
|
|
|
<body>
|
|
<body>
|
|
@@ -219,7 +233,7 @@
|
|
|
</section>
|
|
</section>
|
|
|
<!-- 域组件end -->
|
|
<!-- 域组件end -->
|
|
|
</template>
|
|
</template>
|
|
|
- <el-form-item v-if="widgetList.length">
|
|
|
|
|
|
|
+ <el-form-item v-if="widgetList.length" style="border:0px;">
|
|
|
<el-button size="medium" type="primary" @click="saveResult"
|
|
<el-button size="medium" type="primary" @click="saveResult"
|
|
|
style="width: 100%;height: 45px;font-size: 16px;margin-top:20px;" :disabled="form2.status==0">
|
|
style="width: 100%;height: 45px;font-size: 16px;margin-top:20px;" :disabled="form2.status==0">
|
|
|
{{this.form2.status==1?"提交":"该问卷已禁用"}}</el-button>
|
|
{{this.form2.status==1?"提交":"该问卷已禁用"}}</el-button>
|
|
@@ -254,6 +268,8 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ handlePreview() { },
|
|
|
|
|
+ handleRemove() { },
|
|
|
getData() {
|
|
getData() {
|
|
|
let url = "/api/admin/message"
|
|
let url = "/api/admin/message"
|
|
|
if (this.type == 1) {
|
|
if (this.type == 1) {
|
|
@@ -271,31 +287,31 @@
|
|
|
let widgetList = res.data.widget;
|
|
let widgetList = res.data.widget;
|
|
|
this.messageData = res.data;
|
|
this.messageData = res.data;
|
|
|
let rules1 = {};
|
|
let rules1 = {};
|
|
|
- for (let i = 0; i < widgetList.length; i++) {
|
|
|
|
|
- if (widgetList[i].type == 'checkbox') {
|
|
|
|
|
- let key = widgetList[i].label
|
|
|
|
|
- this.$set(this.form2, key, [])
|
|
|
|
|
|
|
+ let _this = this;
|
|
|
|
|
+ widgetList.forEach((i) => {
|
|
|
|
|
+ if (i.type == "checkbox") {
|
|
|
|
|
+ // _this.form2[i.label] = [] ;
|
|
|
|
|
+ _this.$set(_this.form2, i.label, []);
|
|
|
}
|
|
}
|
|
|
//组装rules
|
|
//组装rules
|
|
|
- var item = widgetList[i];
|
|
|
|
|
- if (item.type == "input" && item.require) {
|
|
|
|
|
- rules1[item.label] = [
|
|
|
|
|
- { required: true, message: item.placeholder, trigger: "blur" },
|
|
|
|
|
|
|
+ if (i.type == "input" && i.require) {
|
|
|
|
|
+ rules1[i.label] = [
|
|
|
|
|
+ { required: true, message: i.placeholder, trigger: "blur" },
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
|
- if (item.type == "textarea" && item.require) {
|
|
|
|
|
- rules1[item.label] = [
|
|
|
|
|
- { required: true, message: item.placeholder, trigger: "blur" },
|
|
|
|
|
|
|
+ if (i.type == "textarea" && i.require) {
|
|
|
|
|
+ rules1[i.label] = [
|
|
|
|
|
+ { required: true, message: i.placeholder, trigger: "blur" },
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
|
- if (item.type == "radio" && item.require) {
|
|
|
|
|
- rules1[item.label] = [
|
|
|
|
|
- { required: true, message: item.placeholder, trigger: "change" },
|
|
|
|
|
|
|
+ if (i.type == "radio" && i.require) {
|
|
|
|
|
+ rules1[i.label] = [
|
|
|
|
|
+ { required: true, message: i.placeholder, trigger: "change" },
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
|
- if (item.type == "checkbox" && item.require) {
|
|
|
|
|
- rules1[item.label] = [
|
|
|
|
|
- { required: true, message: item.placeholder, trigger: "change" },
|
|
|
|
|
|
|
+ if (i.type == "checkbox" && i.require) {
|
|
|
|
|
+ rules1[i.label] = [
|
|
|
|
|
+ { required: true, message: i.placeholder, trigger: "change" },
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
|
if (i.type == "image" && i.require) {
|
|
if (i.type == "image" && i.require) {
|
|
@@ -353,7 +369,8 @@
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
this.$set(this.rules1, "rules", rules1);
|
|
this.$set(this.rules1, "rules", rules1);
|
|
|
this.title = res.data.name
|
|
this.title = res.data.name
|
|
|
this.widgetList = widgetList
|
|
this.widgetList = widgetList
|