Commit 8ff133ba by 匡雅琴

素材组修改

1 parent 12799a45
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
<el-form-item label="分组名称:" prop="materialGroupName"> <el-form-item label="分组名称:" prop="materialGroupName">
<el-input v-model="materialGroupAddForm.materialGroupName" maxlength="8" show-word-limit :size="size" placeholder="请输入分组名称" style="width: 567px"></el-input> <el-input v-model="materialGroupAddForm.materialGroupName" maxlength="8" show-word-limit :size="size" placeholder="请输入分组名称" style="width: 567px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="业务类型:" prop="businessType"> <!-- <el-form-item label="业务类型:" prop="businessType">
<el-checkbox-group class="checkbox-group" :max="3" v-model="materialGroupAddForm.businessType"> <el-checkbox-group class="checkbox-group" :max="3" v-model="materialGroupAddForm.businessType">
<el-checkbox v-for="item in businessTypes" :key="item.id" :label="item.dictLabel"></el-checkbox> <el-checkbox v-for="item in businessTypes" :key="item.id" :label="item.dictLabel"></el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<span class="tips">添加业务类型,该素材组里面的所有素材均会添加此业务类型</span> <span class="tips">添加业务类型,该素材组里面的所有素材均会添加此业务类型</span>
</el-form> </el-form> -->
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button> <el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="submitForm">确定</el-button> <el-button type="primary" @click="submitForm">确定</el-button>
...@@ -23,12 +23,12 @@ ...@@ -23,12 +23,12 @@
<script> <script>
export default { export default {
name: 'addMaterialGroupDia', name: 'addMaterialGroupDia',
props: { // props: {
eventBus: Object, // eventBus: Object,
businessTypes: { // businessTypes: {
type: Array // type: Array
} // }
}, // },
data() { data() {
return { return {
title: '创建素材组', title: '创建素材组',
...@@ -54,7 +54,7 @@ export default { ...@@ -54,7 +54,7 @@ export default {
this.dialogVisible = true this.dialogVisible = true
this.materialGroupAddForm = { this.materialGroupAddForm = {
materialGroupName: '', materialGroupName: '',
businessType: [] // businessType: []
} }
this.groupCounter = group this.groupCounter = group
if (addOrEdit == 2) { if (addOrEdit == 2) {
...@@ -68,28 +68,28 @@ export default { ...@@ -68,28 +68,28 @@ export default {
this.$apis.material.materialGroupDetail(params).then(res => { this.$apis.material.materialGroupDetail(params).then(res => {
console.log(res, '---') console.log(res, '---')
this.materialGroupAddForm = res this.materialGroupAddForm = res
if (res.businessType) { // if (res.businessType) {
this.materialGroupAddForm.businessType = this.materialGroupAddForm.businessType.split(',') // this.materialGroupAddForm.businessType = this.materialGroupAddForm.businessType.split(',')
} else { // } else {
this.materialGroupAddForm.businessType = [] // this.materialGroupAddForm.businessType = []
} // }
}) })
} }
// Object.assign(this.materialGroupAddForm, value) // Object.assign(this.materialGroupAddForm, value)
}, },
// 获取所有业务类型 // 获取所有业务类型
findAllDictData(dictType) { // findAllDictData(dictType) {
var params = { // var params = {
dictType // dictType
} // }
this.$apis.material.findAllDictData(params).then(res => { // this.$apis.material.findAllDictData(params).then(res => {
if (res) { // if (res) {
if (dictType == 'business_type') { // if (dictType == 'business_type') {
this.businessTypes = res // this.businessTypes = res
} // }
} // }
}) // })
}, // },
// 创建 // 创建
submitForm() { submitForm() {
console.log(this.materialGroupAddForm) console.log(this.materialGroupAddForm)
...@@ -125,11 +125,11 @@ export default { ...@@ -125,11 +125,11 @@ export default {
} }
}) })
}, },
handleCheckChange(val) { // handleCheckChange(val) {
console.log(val) // console.log(val)
this.materialGroupAddForm.businessType = val // this.materialGroupAddForm.businessType = val
// console.log(this.materialGroupAddForm); // // console.log(this.materialGroupAddForm);
} // }
} }
} }
</script> </script>
......
...@@ -13,9 +13,18 @@ ...@@ -13,9 +13,18 @@
<el-popover placement="right" trigger="hover"> <el-popover placement="right" trigger="hover">
<div> <div>
<ul> <ul>
<li @click="handleStick(item)">{{ item.orderTime ? '取消置顶' : '置顶' }}</li> <!-- <li @click="handleStick(item)">{{ item.orderTime ? '取消置顶' : '置顶' }}</li> -->
<li @click="handleAddGroup(2,item)">修改</li> <li>
<li @click="handleDeleteGroup(item.id)" v-if="item.isDefault == -1">删除</li> <GLButton :size="size" type="text" fn="置顶" @click="handleStick(item)">{{ item.orderTime ? '取消置顶' : '置顶' }}</GLButton>
</li>
<!-- <li @click="handleAddGroup(2,item)">修改</li> -->
<li>
<GLButton :size="size" type="text" fn="修改" @click="handleAddGroup(2,item)">修改</GLButton>
</li>
<!-- <li @click="handleDeleteGroup(item.id)" v-if="item.isDefault == -1">删除</li> -->
<li>
<GLButton :size="size" type="text" fn="删除" @click="handleAddGroup(2,item)">删除</GLButton>
</li>
</ul> </ul>
</div> </div>
<i slot="reference" class="el-icon-more"></i> <i slot="reference" class="el-icon-more"></i>
......
<template> <template>
<div class="main-container"> <div class="main-container">
<div class="top"> <div class="top">
<el-button type="primary" @click="addMaterial(1)" :size="size"> <!-- <el-button type="primary" @click="addMaterial(1)" :size="size">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
创建营销素材 创建营销素材
</el-button> </el-button> -->
<GLButton :size="size" type="primary" fn="新增营销素材" class="el-icon-plus" @click="addMaterial(1)">创建营销素材</GLButton>
</div>
<div class="container">
<span @click="showIntroductionDialog"> <span @click="showIntroductionDialog">
功能介绍 功能介绍
<i class="el-icon-arrow-right"></i> <i class="el-icon-arrow-right"></i>
...@@ -72,11 +75,21 @@ ...@@ -72,11 +75,21 @@
</div> </div>
<span slot="auth-button" slot-scope="scope"> <span slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">详情</el-button> <el-button type="text" @click="handleDetail(scope.scope)">详情</el-button>
<el-button type="text" @click="addMaterial(2, scope.scope)">编辑</el-button> <!-- <el-button type="text" @click="addMaterial(2, scope.scope)">编辑</el-button> -->
<GLButton :size="size" type="text" fn="编辑" @click="addMaterial(2, scope.scope)">编辑</GLButton>
<!-- <GLButton :size="size" type="text" fn="详情" class="el-icon-plus" @click="addMaterial(1)">详情</GLButton> -->
<el-popover placement="right" trigger="click"> <el-popover placement="right" trigger="click">
<ul> <ul>
<li @click="handleForbid(scope.scope)">{{ scope.scope.status == 0 ? '禁用' : '启用' }}</li> <!-- <li @click="handleForbid(scope.scope)">{{ scope.scope.status == 0 ? '禁用' : '启用' }}</li> -->
<li @click="handleDelete(scope.scope)">删除</li> <li>
<!-- <el-button :size="size" type="text" @click="handleForbid(scope.scope)">{{ scope.scope.status == 0 ? '禁用' : '启用' }}</el-button> -->
<GLButton :size="size" type="text" fn="禁用" @click="handleForbid(scope.scope)">{{ scope.scope.status == 0 ? '禁用' : '启用' }}</GLButton>
</li>
<!-- <li @click="handleDelete(scope.scope)">删除</li> -->
<li>
<!-- <el-button :size="size" type="text" @click="handleDelete(scope.scope)">删除</el-button> -->
<GLButton :size="size" type="text" fn="删除营销素材" @click="handleDelete(scope.scope)">删除</GLButton>
</li>
</ul> </ul>
<el-button type="text" slot="reference" class="btn-more">更多</el-button> <el-button type="text" slot="reference" class="btn-more">更多</el-button>
</el-popover> </el-popover>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!