|
|
@@ -215,10 +215,10 @@
|
|
|
display: inline-block;
|
|
|
width: 28px;
|
|
|
position: absolute;
|
|
|
- top: 13px;
|
|
|
+ top: -5px;
|
|
|
}
|
|
|
.ctl_btn_note {
|
|
|
- right: 55px;
|
|
|
+ right: 20px;
|
|
|
color: #ffb800;
|
|
|
}
|
|
|
.ctl_btn_edit {
|
|
|
@@ -229,6 +229,12 @@
|
|
|
right: -15px;
|
|
|
color: red;
|
|
|
}
|
|
|
+ .ctl_btn_move{
|
|
|
+ font-size: 22px;
|
|
|
+ }
|
|
|
+ .gdrag{
|
|
|
+ bottom:15px!important;
|
|
|
+ }
|
|
|
// 注释弹窗
|
|
|
/deep/.noteDialog .el-form-item__content {
|
|
|
margin-right: 0px !important;
|
|
|
@@ -313,6 +319,15 @@
|
|
|
// }
|
|
|
}
|
|
|
}
|
|
|
+.group_title{
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ padding:10px 0px;
|
|
|
+}
|
|
|
+.groupMain{
|
|
|
+ border:1px solid #ccc;
|
|
|
+ border-radius: 5px;
|
|
|
+}
|
|
|
</style>
|
|
|
<template>
|
|
|
<section>
|
|
|
@@ -383,9 +398,6 @@
|
|
|
class="wrapper"
|
|
|
v-model="widgetList"
|
|
|
handle=".dargBtn"
|
|
|
- @change="change"
|
|
|
- @start="start"
|
|
|
- @end="end"
|
|
|
>
|
|
|
<transition-group>
|
|
|
<el-form-item
|
|
|
@@ -415,11 +427,6 @@
|
|
|
<span class="ctl_btn ctl_btn_note" @click="addNote(item)"
|
|
|
>注释</span
|
|
|
>
|
|
|
- <span
|
|
|
- class="ctl_btn ctl_btn_edit"
|
|
|
- @click="item.edit = !item.edit"
|
|
|
- >{{ item.edit ? "编辑" : "保存" }}</span
|
|
|
- >
|
|
|
<span
|
|
|
class="ctl_btn ctl_btn_del"
|
|
|
@click="widgetList.splice(index, 1)"
|
|
|
@@ -451,11 +458,6 @@
|
|
|
<span class="ctl_btn ctl_btn_note" @click="addNote(item)"
|
|
|
>注释</span
|
|
|
>
|
|
|
- <span
|
|
|
- @click="item.edit = !item.edit"
|
|
|
- class="ctl_btn ctl_btn_edit"
|
|
|
- >{{ item.edit ? "编辑" : "保存" }}</span
|
|
|
- >
|
|
|
<span
|
|
|
@click="widgetList.splice(index, 1)"
|
|
|
class="ctl_btn ctl_btn_del"
|
|
|
@@ -480,7 +482,7 @@
|
|
|
<el-radio
|
|
|
:label="iitem.label"
|
|
|
v-for="(iitem, index) in item.items"
|
|
|
- :key="index"
|
|
|
+ :key="'r'+index"
|
|
|
>
|
|
|
<el-input
|
|
|
:readonly="item.edit"
|
|
|
@@ -506,11 +508,6 @@
|
|
|
<span class="ctl_btn ctl_btn_note" @click="addNote(item)"
|
|
|
>注释</span
|
|
|
>
|
|
|
- <span
|
|
|
- @click="item.edit = !item.edit"
|
|
|
- class="ctl_btn ctl_btn_edit"
|
|
|
- >{{ item.edit ? "编辑" : "保存" }}</span
|
|
|
- >
|
|
|
<span
|
|
|
@click="widgetList.splice(index, 1)"
|
|
|
class="ctl_btn ctl_btn_del"
|
|
|
@@ -535,7 +532,7 @@
|
|
|
<el-checkbox
|
|
|
:label="iitem.label"
|
|
|
v-for="(iitem, index) in item.items"
|
|
|
- :key="index"
|
|
|
+ :key="'c'+index"
|
|
|
>
|
|
|
<el-input
|
|
|
:readonly="item.edit"
|
|
|
@@ -561,11 +558,6 @@
|
|
|
<span class="ctl_btn ctl_btn_note" @click="addNote(item)"
|
|
|
>注释</span
|
|
|
>
|
|
|
- <span
|
|
|
- @click="item.edit = !item.edit"
|
|
|
- class="ctl_btn ctl_btn_edit"
|
|
|
- >{{ item.edit ? "编辑" : "保存" }}</span
|
|
|
- >
|
|
|
<span
|
|
|
@click="widgetList.splice(index, 1)"
|
|
|
class="ctl_btn ctl_btn_del"
|
|
|
@@ -602,11 +594,6 @@
|
|
|
<span class="ctl_btn ctl_btn_note" @click="addNote(item)"
|
|
|
>注释</span
|
|
|
>
|
|
|
- <span
|
|
|
- @click="item.edit = !item.edit"
|
|
|
- class="ctl_btn ctl_btn_edit"
|
|
|
- >{{ item.edit ? "编辑" : "保存" }}</span
|
|
|
- >
|
|
|
<span
|
|
|
@click="widgetList.splice(index, 1)"
|
|
|
class="ctl_btn ctl_btn_del"
|
|
|
@@ -614,8 +601,7 @@
|
|
|
>
|
|
|
</font>
|
|
|
<el-button type="primary" class="dargBtn drag" size="mini"
|
|
|
- >拖拽移动顺序</el-button
|
|
|
- >
|
|
|
+ >拖拽移动顺序</el-button>
|
|
|
</section>
|
|
|
<section v-if="item.type == 'file'">
|
|
|
<el-input
|
|
|
@@ -644,9 +630,6 @@
|
|
|
<!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
|
|
|
</el-upload>
|
|
|
<font>
|
|
|
- <span @click="item.edit = !item.edit">{{
|
|
|
- item.edit ? "编辑" : "保存"
|
|
|
- }}</span>
|
|
|
<span @click="widgetList.splice(index, 1)">删除</span>
|
|
|
</font>
|
|
|
<el-button type="primary" class="dargBtn drag" size="mini"
|
|
|
@@ -664,235 +647,225 @@
|
|
|
item.require ? 'require' : '',
|
|
|
]"
|
|
|
></el-input>
|
|
|
- <el-form-item
|
|
|
- v-for="(iitem, index) in item.children"
|
|
|
- :key="index"
|
|
|
- :prop="iitem.label"
|
|
|
+ <vuedraggable
|
|
|
+ class="wrapper"
|
|
|
+ v-model="item.children"
|
|
|
+ handle=".gdrag"
|
|
|
>
|
|
|
- <section v-if="iitem.type == 'input'">
|
|
|
- <el-input
|
|
|
- :readonly="iitem.edit"
|
|
|
- v-model="iitem.label"
|
|
|
- :class="[
|
|
|
- iitem.edit ? 'edit_label' : '',
|
|
|
- iitem.require ? 'require' : '',
|
|
|
- ]"
|
|
|
- ></el-input>
|
|
|
- <el-input
|
|
|
- placeholder="请输入"
|
|
|
- v-model="iitem.placeholder"
|
|
|
- ></el-input>
|
|
|
- <font>
|
|
|
- <el-checkbox
|
|
|
- class="item_require"
|
|
|
- v-model="iitem.require"
|
|
|
- >必填</el-checkbox
|
|
|
- >
|
|
|
- <span
|
|
|
- class="ctl_btn ctl_btn_note"
|
|
|
- @click="addNote(iitem)"
|
|
|
- >注释</span
|
|
|
- >
|
|
|
- <span
|
|
|
- class="ctl_btn ctl_btn_edit"
|
|
|
- @click="iitem.edit = !iitem.edit"
|
|
|
- >{{ iitem.edit ? "编辑" : "保存" }}</span
|
|
|
- >
|
|
|
- <span
|
|
|
- class="ctl_btn ctl_btn_del"
|
|
|
- @click="item.children.splice(index, 1)"
|
|
|
- >删除</span
|
|
|
- >
|
|
|
- </font>
|
|
|
- </section>
|
|
|
- <section v-if="iitem.type == 'textarea'">
|
|
|
- <el-input
|
|
|
- :readonly="iitem.edit"
|
|
|
- v-model="iitem.label"
|
|
|
- :class="[
|
|
|
- iitem.edit ? 'edit_label' : '',
|
|
|
- iitem.require ? 'require' : '',
|
|
|
- ]"
|
|
|
- ></el-input>
|
|
|
- <el-input
|
|
|
- type="textarea"
|
|
|
- placeholder="请输入"
|
|
|
- v-model="iitem.placeholder"
|
|
|
- ></el-input>
|
|
|
- <font>
|
|
|
- <span
|
|
|
- class="ctl_btn ctl_btn_note"
|
|
|
- @click="addNote(iitem)"
|
|
|
- >注释</span
|
|
|
- >
|
|
|
- <span
|
|
|
- class="ctl_btn ctl_btn_edit"
|
|
|
- @click="iitem.edit = !iitem.edit"
|
|
|
- >{{ iitem.edit ? "编辑" : "保存" }}</span
|
|
|
- >
|
|
|
- <span
|
|
|
- class="ctl_btn ctl_btn_del"
|
|
|
- @click="item.children.splice(index, 1)"
|
|
|
- >删除</span
|
|
|
- >
|
|
|
- </font>
|
|
|
- </section>
|
|
|
+ <transition-group>
|
|
|
+ <el-form-item
|
|
|
+ v-for="(iitem, index) in item.children"
|
|
|
+ :key="'g'+index"
|
|
|
+ :prop="iitem.label"
|
|
|
+ >
|
|
|
+ <section v-if="iitem.type == 'input'">
|
|
|
+ <el-input
|
|
|
+ :readonly="iitem.edit"
|
|
|
+ v-model="iitem.label"
|
|
|
+ :class="[
|
|
|
+ iitem.edit ? 'edit_label' : '',
|
|
|
+ iitem.require ? 'require' : '',
|
|
|
+ ]"
|
|
|
+ ></el-input>
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入"
|
|
|
+ v-model="iitem.placeholder"
|
|
|
+ ></el-input>
|
|
|
+ <font>
|
|
|
+ <el-checkbox
|
|
|
+ class="item_require"
|
|
|
+ v-model="iitem.require"
|
|
|
+ >必填</el-checkbox
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ class="ctl_btn ctl_btn_note"
|
|
|
+ @click="addNote(iitem)"
|
|
|
+ >注释</span
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ class="ctl_btn ctl_btn_del"
|
|
|
+ @click="item.children.splice(index, 1)"
|
|
|
+ >删除</span
|
|
|
+ >
|
|
|
+ </font>
|
|
|
+ <el-button type="primary" class="gdrag drag" size="mini">排序</el-button>
|
|
|
+ </section>
|
|
|
+ <section v-if="iitem.type == 'textarea'">
|
|
|
+ <el-input
|
|
|
+ :readonly="iitem.edit"
|
|
|
+ v-model="iitem.label"
|
|
|
+ :class="[
|
|
|
+ iitem.edit ? 'edit_label' : '',
|
|
|
+ iitem.require ? 'require' : '',
|
|
|
+ ]"
|
|
|
+ ></el-input>
|
|
|
+ <el-input
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入"
|
|
|
+ v-model="iitem.placeholder"
|
|
|
+ ></el-input>
|
|
|
+ <font>
|
|
|
+ <span
|
|
|
+ class="ctl_btn ctl_btn_note"
|
|
|
+ @click="addNote(iitem)"
|
|
|
+ >注释</span
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ class="ctl_btn ctl_btn_del"
|
|
|
+ @click="item.children.splice(index, 1)"
|
|
|
+ >删除</span
|
|
|
+ >
|
|
|
+ </font>
|
|
|
+ <el-button type="primary" class="gdrag drag" size="mini">排序</el-button>
|
|
|
+ </section>
|
|
|
|
|
|
- <section v-if="iitem.type == 'radio'" class="radio">
|
|
|
- <el-input
|
|
|
- :readonly="iitem.edit"
|
|
|
- v-model="iitem.label"
|
|
|
- :class="[
|
|
|
- iitem.edit ? 'edit_label' : '',
|
|
|
- iitem.require ? 'require' : '',
|
|
|
- ]"
|
|
|
- ></el-input
|
|
|
- >(单选)
|
|
|
- <el-radio-group>
|
|
|
- <el-radio
|
|
|
- :label="iiitem.label"
|
|
|
- v-for="(iiitem, index) in iitem.items"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- :readonly="iitem.edit"
|
|
|
- v-model="iiitem.label"
|
|
|
- :class="iitem.edit ? 'edit_label' : ''"
|
|
|
- ></el-input>
|
|
|
- <template v-if="!iitem.edit">
|
|
|
- <i
|
|
|
- class="el-icon-minus opicon"
|
|
|
- @click="minusOption(iitem.items, index)"
|
|
|
- ></i
|
|
|
- ><i
|
|
|
- class="el-icon-plus opicon"
|
|
|
- @click="plusOption(iitem.items, index)"
|
|
|
- ></i>
|
|
|
- </template>
|
|
|
- </el-radio>
|
|
|
- </el-radio-group>
|
|
|
- <font>
|
|
|
- <el-checkbox
|
|
|
- class="item_require"
|
|
|
- v-model="iitem.require"
|
|
|
- >必填</el-checkbox
|
|
|
- >
|
|
|
- <span
|
|
|
- class="ctl_btn ctl_btn_note"
|
|
|
- @click="addNote(iitem)"
|
|
|
- >注释</span
|
|
|
- >
|
|
|
- <span
|
|
|
- @click="iitem.edit = !iitem.edit"
|
|
|
- class="ctl_btn ctl_btn_edit"
|
|
|
- >{{ iitem.edit ? "编辑" : "保存" }}</span
|
|
|
- >
|
|
|
- <span
|
|
|
- @click="item.children.splice(index, 1)"
|
|
|
- class="ctl_btn ctl_btn_del"
|
|
|
- >删除</span
|
|
|
- >
|
|
|
- </font>
|
|
|
- </section>
|
|
|
+ <section v-if="iitem.type == 'radio'" class="radio">
|
|
|
+ <el-input
|
|
|
+ :readonly="iitem.edit"
|
|
|
+ v-model="iitem.label"
|
|
|
+ :class="[
|
|
|
+ iitem.edit ? 'edit_label' : '',
|
|
|
+ iitem.require ? 'require' : '',
|
|
|
+ ]"
|
|
|
+ ></el-input
|
|
|
+ >(单选)
|
|
|
+ <el-radio-group>
|
|
|
+ <el-radio
|
|
|
+ :label="iiitem.label"
|
|
|
+ v-for="(iiitem, rindex) in iitem.items"
|
|
|
+ :key="'gr'+rindex"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ :readonly="iitem.edit"
|
|
|
+ v-model="iiitem.label"
|
|
|
+ :class="iitem.edit ? 'edit_label' : ''"
|
|
|
+ ></el-input>
|
|
|
+ <template v-if="!iitem.edit">
|
|
|
+ <i
|
|
|
+ class="el-icon-minus opicon"
|
|
|
+ @click="minusOption(iitem.items, index)"
|
|
|
+ ></i
|
|
|
+ ><i
|
|
|
+ class="el-icon-plus opicon"
|
|
|
+ @click="plusOption(iitem.items, index)"
|
|
|
+ ></i>
|
|
|
+ </template>
|
|
|
+ </el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ <font>
|
|
|
+ <el-checkbox
|
|
|
+ class="item_require"
|
|
|
+ v-model="iitem.require"
|
|
|
+ >必填</el-checkbox
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ class="ctl_btn ctl_btn_note"
|
|
|
+ @click="addNote(iitem)"
|
|
|
+ >注释</span
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ @click="item.children.splice(index, 1)"
|
|
|
+ class="ctl_btn ctl_btn_del"
|
|
|
+ >删除</span
|
|
|
+ >
|
|
|
+ </font>
|
|
|
+ <el-button type="primary" class="gdrag drag" size="mini">排序</el-button>
|
|
|
+ </section>
|
|
|
|
|
|
- <section v-if="iitem.type == 'checkbox'" class="checkbox">
|
|
|
- <el-input
|
|
|
- :readonly="iitem.edit"
|
|
|
- v-model="iitem.label"
|
|
|
- :class="[
|
|
|
- iitem.edit ? 'edit_label' : '',
|
|
|
- iitem.require ? 'require' : '',
|
|
|
- ]"
|
|
|
- ></el-input
|
|
|
- >(多选)
|
|
|
- <el-radio-group>
|
|
|
- <el-checkbox
|
|
|
- :label="iiitem.label"
|
|
|
- v-for="(iiitem, index) in iitem.items"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- :readonly="iitem.edit"
|
|
|
- v-model="iiitem.label"
|
|
|
- :class="iitem.edit ? 'edit_label' : ''"
|
|
|
- ></el-input>
|
|
|
- <template v-if="!iitem.edit">
|
|
|
- <i
|
|
|
- class="el-icon-minus opicon"
|
|
|
- @click="minusOption(iitem.items, index)"
|
|
|
- ></i
|
|
|
- ><i
|
|
|
- class="el-icon-plus opicon"
|
|
|
- @click="plusOption(iitem.items, index)"
|
|
|
- ></i>
|
|
|
- </template>
|
|
|
- </el-checkbox>
|
|
|
- </el-radio-group>
|
|
|
- <font>
|
|
|
- <el-checkbox
|
|
|
- class="item_require"
|
|
|
- v-model="iitem.require"
|
|
|
- >必填</el-checkbox
|
|
|
- >
|
|
|
- <span
|
|
|
- class="ctl_btn ctl_btn_note"
|
|
|
- @click="addNote(iitem)"
|
|
|
- >注释</span
|
|
|
- >
|
|
|
- <span
|
|
|
- @click="iitem.edit = !iitem.edit"
|
|
|
- class="ctl_btn ctl_btn_edit"
|
|
|
- >{{ iitem.edit ? "编辑" : "保存" }}</span
|
|
|
- >
|
|
|
- <span
|
|
|
- @click="item.children.splice(index, 1)"
|
|
|
- class="ctl_btn ctl_btn_del"
|
|
|
- >删除</span
|
|
|
- >
|
|
|
- </font>
|
|
|
- </section>
|
|
|
+ <section v-if="iitem.type == 'checkbox'" class="checkbox">
|
|
|
+ <el-input
|
|
|
+ :readonly="iitem.edit"
|
|
|
+ v-model="iitem.label"
|
|
|
+ :class="[
|
|
|
+ iitem.edit ? 'edit_label' : '',
|
|
|
+ iitem.require ? 'require' : '',
|
|
|
+ ]"
|
|
|
+ ></el-input
|
|
|
+ >(多选)
|
|
|
+ <el-radio-group>
|
|
|
+ <el-checkbox
|
|
|
+ :label="iiitem.label"
|
|
|
+ v-for="(iiitem, index) in iitem.items"
|
|
|
+ :key="'gc'+index"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ :readonly="iitem.edit"
|
|
|
+ v-model="iiitem.label"
|
|
|
+ :class="iitem.edit ? 'edit_label' : ''"
|
|
|
+ ></el-input>
|
|
|
+ <template v-if="!iitem.edit">
|
|
|
+ <i
|
|
|
+ class="el-icon-minus opicon"
|
|
|
+ @click="minusOption(iitem.items, index)"
|
|
|
+ ></i
|
|
|
+ ><i
|
|
|
+ class="el-icon-plus opicon"
|
|
|
+ @click="plusOption(iitem.items, index)"
|
|
|
+ ></i>
|
|
|
+ </template>
|
|
|
+ </el-checkbox>
|
|
|
+ </el-radio-group>
|
|
|
+ <font>
|
|
|
+ <el-checkbox
|
|
|
+ class="item_require"
|
|
|
+ v-model="iitem.require"
|
|
|
+ >必填</el-checkbox
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ class="ctl_btn ctl_btn_note"
|
|
|
+ @click="addNote(iitem)"
|
|
|
+ >注释</span
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ @click="item.children.splice(index, 1)"
|
|
|
+ class="ctl_btn ctl_btn_del"
|
|
|
+ >删除</span
|
|
|
+ >
|
|
|
+ </font>
|
|
|
+ <el-button type="primary" class="gdrag drag" size="mini">排序</el-button>
|
|
|
+ </section>
|
|
|
|
|
|
- <section v-if="iitem.type == 'image'">
|
|
|
- <!-- <el-input :readonly="item.edit" v-model="item.label" :class="item.edit?'edit_label':''"></el-input> -->
|
|
|
- <el-input
|
|
|
- :readonly="iitem.edit"
|
|
|
- v-model="iitem.label"
|
|
|
- :class="[
|
|
|
- iitem.edit ? 'edit_label' : '',
|
|
|
- iitem.require ? 'require' : '',
|
|
|
- ]"
|
|
|
- ></el-input>
|
|
|
- <el-upload
|
|
|
- action="/api/admin/uploadfile"
|
|
|
- list-type="picture-card"
|
|
|
- :on-preview="handlePreview"
|
|
|
- :on-remove="handleRemove"
|
|
|
- limit="9"
|
|
|
- >
|
|
|
- <i class="el-icon-plus"></i>
|
|
|
- </el-upload>
|
|
|
- <font>
|
|
|
- <el-checkbox class="item_require" v-model="iitem.require"
|
|
|
- >必填</el-checkbox
|
|
|
+ <section v-if="iitem.type == 'image'">
|
|
|
+ <!-- <el-input :readonly="item.edit" v-model="item.label" :class="item.edit?'edit_label':''"></el-input> -->
|
|
|
+ <el-input
|
|
|
+ :readonly="iitem.edit"
|
|
|
+ v-model="iitem.label"
|
|
|
+ :class="[
|
|
|
+ iitem.edit ? 'edit_label' : '',
|
|
|
+ iitem.require ? 'require' : '',
|
|
|
+ ]"
|
|
|
+ ></el-input>
|
|
|
+ <el-upload
|
|
|
+ action="/api/admin/uploadfile"
|
|
|
+ list-type="picture-card"
|
|
|
+ :on-preview="handlePreview"
|
|
|
+ :on-remove="handleRemove"
|
|
|
+ limit="9"
|
|
|
>
|
|
|
- <span
|
|
|
- class="ctl_btn ctl_btn_note"
|
|
|
- @click="addNote(iitem)"
|
|
|
- >注释</span
|
|
|
- >
|
|
|
- <span
|
|
|
- @click="iitem.edit = !iitem.edit"
|
|
|
- class="ctl_btn ctl_btn_edit"
|
|
|
- >{{ iitem.edit ? "编辑" : "保存" }}</span
|
|
|
- >
|
|
|
- <span
|
|
|
- @click="item.children.splice(index, 1)"
|
|
|
- class="ctl_btn ctl_btn_del"
|
|
|
- >删除</span
|
|
|
- >
|
|
|
- </font>
|
|
|
- </section>
|
|
|
- </el-form-item>
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
+ </el-upload>
|
|
|
+ <font>
|
|
|
+ <el-checkbox
|
|
|
+ class="item_require"
|
|
|
+ v-model="iitem.require"
|
|
|
+ >必填</el-checkbox
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ class="ctl_btn ctl_btn_note"
|
|
|
+ @click="addNote(iitem)"
|
|
|
+ >注释</span
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ @click="item.children.splice(index, 1)"
|
|
|
+ class="ctl_btn ctl_btn_del"
|
|
|
+ >删除</span
|
|
|
+ >
|
|
|
+ </font>
|
|
|
+ <el-button type="primary" class="gdrag drag" size="mini">排序</el-button>
|
|
|
+ </section>
|
|
|
+ </el-form-item>
|
|
|
+ </transition-group>
|
|
|
+ </vuedraggable>
|
|
|
</section>
|
|
|
<font style="top: -18px" v-if="item.type == 'group'">
|
|
|
<span @click="widgetList.splice(index, 1)">删除</span>
|
|
|
@@ -932,7 +905,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<ul class="img_list">
|
|
|
- <li v-for="(item, index) in noteImgs" :key="index">
|
|
|
+ <li v-for="(item, index) in noteImgs" :key="'note'+index">
|
|
|
<img :src="item" alt="" />
|
|
|
<p class="move">
|
|
|
<i @click="remove(index)" class="el-icon-delete"></i>
|
|
|
@@ -977,8 +950,7 @@
|
|
|
<h5 align="center" class="tpl_title">{{ title }}</h5>
|
|
|
<el-form ref="form" :model="form" class="tpl_form over_y">
|
|
|
<template v-for="(item, index) in widgetList">
|
|
|
- <h6 v-if="item.type=='group'" align="center" class="tpl_title">----{{ item.label }}----</h6>
|
|
|
- <el-form-item :key="index" :label="item.label + item.cntype">
|
|
|
+ <el-form-item v-if="item.type!='group'" :key="'review'+index" :label="item.label + item.cntype">
|
|
|
<el-tooltip
|
|
|
class="item"
|
|
|
effect="dark"
|
|
|
@@ -986,7 +958,7 @@
|
|
|
placement="bottom-end"
|
|
|
>
|
|
|
<i
|
|
|
- v-if="item.noteDesc||item.noteImgs"
|
|
|
+ v-if="item.noteDesc || item.noteImgs"
|
|
|
class="el-icon-info"
|
|
|
style="position: absolute; top: -28px; right: 0px"
|
|
|
></i>
|
|
|
@@ -997,7 +969,7 @@
|
|
|
:src="item"
|
|
|
alt=""
|
|
|
v-for="(item, index) in item.noteImgs"
|
|
|
- :key="index"
|
|
|
+ :key="'noteimgs'+index"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -1023,7 +995,7 @@
|
|
|
<el-radio
|
|
|
:label="iitem.label"
|
|
|
v-for="(iitem, index) in item.items"
|
|
|
- :key="index"
|
|
|
+ :key="'review_r'+index"
|
|
|
>{{ iitem.label }}</el-radio
|
|
|
>
|
|
|
</el-radio-group>
|
|
|
@@ -1035,7 +1007,7 @@
|
|
|
<el-checkbox
|
|
|
:label="iitem.label"
|
|
|
v-for="(iitem, index) in item.items"
|
|
|
- :key="index"
|
|
|
+ :key="'review_c'+index"
|
|
|
>{{ iitem.label }}</el-checkbox
|
|
|
>
|
|
|
</el-radio-group>
|
|
|
@@ -1071,6 +1043,116 @@
|
|
|
<!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
+ <!-- 域组件展示 -->
|
|
|
+ <h6
|
|
|
+ v-if="item.type == 'group'"
|
|
|
+ align="center"
|
|
|
+ class="group_title"
|
|
|
+ :key="'revire_g'+index"
|
|
|
+ >
|
|
|
+ {{ item.label }}
|
|
|
+ </h6>
|
|
|
+ <section class="groupMain" v-if="item.type == 'group'" :key="'review_gi'+index">
|
|
|
+ <template v-for="(iitem, index) in item.children">
|
|
|
+ <el-form-item
|
|
|
+ :key="'review_gc'+index"
|
|
|
+ :label="iitem.label + iitem.cntype"
|
|
|
+ >
|
|
|
+ <el-tooltip
|
|
|
+ class="item"
|
|
|
+ effect="dark"
|
|
|
+ content="Left Bottom 提示文字"
|
|
|
+ placement="bottom-end"
|
|
|
+ >
|
|
|
+ <i
|
|
|
+ v-if="iitem.noteDesc || iitem.noteImgs"
|
|
|
+ class="el-icon-info"
|
|
|
+ style="position: absolute; top: -28px; right: 0px"
|
|
|
+ ></i>
|
|
|
+ <div slot="content" class="tool_text">
|
|
|
+ <p>{{ iitem.noteDesc }}</p>
|
|
|
+ <div class="toolText_img">
|
|
|
+ <img
|
|
|
+ :src="iitem"
|
|
|
+ alt=""
|
|
|
+ v-for="(iitem, index) in iitem.noteImgs"
|
|
|
+ :key="'review_gc_noteimgs'+index"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-tooltip>
|
|
|
+ <el-input
|
|
|
+ :class="iitem.require ? 'require' : ''"
|
|
|
+ v-if="iitem.type == 'input'"
|
|
|
+ v-model="form.label"
|
|
|
+ :placeholder="iitem.placeholder"
|
|
|
+ ></el-input>
|
|
|
+ <el-input
|
|
|
+ :class="iitem.require ? 'require' : ''"
|
|
|
+ v-if="iitem.type == 'textarea'"
|
|
|
+ type="textarea"
|
|
|
+ v-model="form.label"
|
|
|
+ :placeholder="iitem.placeholder"
|
|
|
+ ></el-input>
|
|
|
+ <el-radio-group
|
|
|
+ class="cus_select"
|
|
|
+ v-if="iitem.type == 'radio'"
|
|
|
+ :class="iitem.require ? 'require' : ''"
|
|
|
+ >
|
|
|
+ <el-radio
|
|
|
+ :label="iiitem.label"
|
|
|
+ v-for="(iiitem, index) in iitem.items"
|
|
|
+ :key="'review_gcr'+index"
|
|
|
+ >{{ iiitem.label }}</el-radio
|
|
|
+ >
|
|
|
+ </el-radio-group>
|
|
|
+ <el-radio-group
|
|
|
+ class="cus_select"
|
|
|
+ v-if="iitem.type == 'checkbox'"
|
|
|
+ :class="iitem.require ? 'require' : ''"
|
|
|
+ >
|
|
|
+ <el-checkbox
|
|
|
+ :label="iiitem.label"
|
|
|
+ v-for="(iiitem, index) in iitem.items"
|
|
|
+ :key="'review_gcc'+index"
|
|
|
+ >{{ iiitem.label }}</el-checkbox
|
|
|
+ >
|
|
|
+ </el-radio-group>
|
|
|
+ <el-upload
|
|
|
+ :class="iitem.require ? 'require' : ''"
|
|
|
+ v-if="iitem.type == 'image'"
|
|
|
+ action="/api/admin/uploadfile"
|
|
|
+ list-type="picture-card"
|
|
|
+ :on-preview="handlePreview"
|
|
|
+ :on-remove="handleRemove"
|
|
|
+ >
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
+ </el-upload>
|
|
|
+ <el-upload
|
|
|
+ v-if="iitem.type == 'file'"
|
|
|
+ class="upload-demo"
|
|
|
+ ref="upload"
|
|
|
+ action="/api/admin/uploadfile"
|
|
|
+ :on-preview="handlePreview"
|
|
|
+ :on-remove="handleRemove"
|
|
|
+ :file-list="fileList"
|
|
|
+ :auto-upload="false"
|
|
|
+ >
|
|
|
+ <!-- <el-button slot="trigger" size="small" type="primary">选取文件</el-button> -->
|
|
|
+ <el-button
|
|
|
+ style="margin-left: 10px"
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ @click="submitUpload"
|
|
|
+ >添加文件</el-button
|
|
|
+ >
|
|
|
+ <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </section>
|
|
|
+ <!-- 域组件end -->
|
|
|
</template>
|
|
|
<el-form-item v-if="this.widgetList.length">
|
|
|
<el-button
|
|
|
@@ -1122,7 +1204,7 @@ export default {
|
|
|
components: { vuedraggable, fuEditor },
|
|
|
data() {
|
|
|
return {
|
|
|
- fileList:[],
|
|
|
+ fileList: [],
|
|
|
noteDesc: "",
|
|
|
noteImgs: [],
|
|
|
realImgs: [],
|
|
|
@@ -1227,7 +1309,7 @@ export default {
|
|
|
{
|
|
|
type: "group",
|
|
|
cntype: "",
|
|
|
- label: "请输入域组件标题",
|
|
|
+ label: "域组件",
|
|
|
placeholder: "请输入",
|
|
|
edit: false,
|
|
|
require: true,
|
|
|
@@ -1238,8 +1320,8 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- limitUploadNum(files,fileList){
|
|
|
- this.$message.alert("最多只能上传9张图片!")
|
|
|
+ limitUploadNum(files, fileList) {
|
|
|
+ this.$message.alert("最多只能上传9张图片!");
|
|
|
},
|
|
|
showNoteInfo() {
|
|
|
// this.dialogTitle1 = true
|
|
|
@@ -1248,7 +1330,7 @@ export default {
|
|
|
activeItem(index) {
|
|
|
var widgetList = this.widgetList;
|
|
|
for (let i = 0; i < widgetList.length; i++) {
|
|
|
- if(widgetList[i].type=="group"){
|
|
|
+ if (widgetList[i].type == "group") {
|
|
|
if (i == index) {
|
|
|
this.$set(widgetList[i], "active", !widgetList[i].active);
|
|
|
} else {
|
|
|
@@ -1265,9 +1347,9 @@ export default {
|
|
|
upload() {},
|
|
|
imgchange(file, fileList) {
|
|
|
var img = this.noteImgs;
|
|
|
- if(img.length>8){
|
|
|
+ if (img.length > 8) {
|
|
|
this.$message.error("最多只能上传9张图片!");
|
|
|
- return
|
|
|
+ return;
|
|
|
}
|
|
|
img.push(fileList.response.data);
|
|
|
this.noteImgs = img;
|
|
|
@@ -1385,8 +1467,10 @@ export default {
|
|
|
return val.type == "group" && val.active == 1;
|
|
|
});
|
|
|
if (gwidget.length) {
|
|
|
+ item.label = item.label + (gwidget[0].children.length + 1).toString();
|
|
|
gwidget[0].children.push(item);
|
|
|
} else {
|
|
|
+ item.label = item.label + (this.widgetList.length + 1).toString();
|
|
|
this.widgetList.push(item);
|
|
|
}
|
|
|
},
|