|
@@ -39,6 +39,7 @@
|
|
|
<el-table v-loading="loading" :data="carouselList" @selection-change="handleSelectionChange" max-height="650">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="主键" width="55" align="center" prop="id" />
|
|
|
+ <el-table-column label="菜单类型" align="center" prop="dataType" :formatter="menuFormat"/>
|
|
|
<el-table-column label="活动名称" align="center" prop="pictureName" />
|
|
|
<el-table-column label="权重" align="center" prop="weight" />
|
|
|
<el-table-column label="活动海报" width="200" align="center" prop="fileUrl">
|
|
@@ -46,6 +47,7 @@
|
|
|
<img :src="scope.row.fileUrl" class="banner" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="描述" align="center" prop="dataDescribe" />
|
|
|
<el-table-column label="点击事件类型" align="center" prop="jumpUrlType" :formatter="cilckTypeFormat" />
|
|
|
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" />
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
@@ -82,6 +84,14 @@
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="描述" prop="dataDescribe">
|
|
|
+ <el-input v-model="form.dataDescribe" placeholder="请输入描述" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="菜单类型" prop="jumpUrlType">
|
|
|
+ <el-select v-model="form.dataType" placeholder="请输入菜单类型" clearable>
|
|
|
+ <el-option v-for="item in menuOptions" :key="item.dictCode" :label="item.dictLabel" :value="item.dictValue"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="事件类型" prop="jumpUrlType">
|
|
|
<el-select v-model="form.jumpUrlType" placeholder="请输入事件类型" clearable>
|
|
|
<el-option v-for="item in cilckTypeOptions" :key="item.dictCode" :label="item.dictLabel" :value="item.dictValue"></el-option>
|
|
@@ -174,7 +184,10 @@ export default {
|
|
|
cilckTypeFormat:null,
|
|
|
// 小程序状态开关
|
|
|
statusOptions: [],
|
|
|
- statusFormat: null
|
|
|
+ statusFormat: null,
|
|
|
+ // 菜单类型
|
|
|
+ menuOptions: [],
|
|
|
+ menuFormat: null
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -191,6 +204,12 @@ export default {
|
|
|
return this.selectDictLabel(this.statusOptions, row.status)
|
|
|
}
|
|
|
})
|
|
|
+ this.getDicts('wx_menu_type').then(response => {
|
|
|
+ this.menuOptions = response.data
|
|
|
+ this.menuFormat = (row, column) => {
|
|
|
+ return this.selectDictLabel(this.menuOptions, row.dataType)
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
//图标上传成功返回函数
|
|
@@ -241,7 +260,7 @@ export default {
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
- this.ids = selection.map(item => item.id)
|
|
|
+ this.ids = selection.map(item => item.id+'-'+item.type)
|
|
|
this.single = selection.length !== 1
|
|
|
this.multiple = !selection.length
|
|
|
},
|
|
@@ -283,7 +302,7 @@ export default {
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
- const ids = row.id || this.ids
|
|
|
+ const ids = row.id+'-'+row.type || this.ids
|
|
|
this.$confirm('是否确认删除轮播图编号为"' + ids + '"的数据项?', '警告', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|