Commit 8ff133ba by 匡雅琴

素材组修改

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