Commit 7ea7776f by 匡雅琴

素材组修改

1 parent 8ff133ba
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
<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: '创建素材组',
...@@ -90,14 +90,20 @@ export default { ...@@ -90,14 +90,20 @@ export default {
// } // }
// }) // })
// }, // },
getParams() {
var params = JSON.parse(JSON.stringify(this.materialGroupAddForm))
return params
},
// 创建 // 创建
submitForm() { submitForm() {
console.log(this.materialGroupAddForm) console.log(this.materialGroupAddForm)
this.$refs.materialGroupAddForm.validate(valid => { this.$refs.materialGroupAddForm.validate(valid => {
if (valid) { if (valid) {
var params = this.getParams()
params.orderFlag = true
// 判断是创建还是编辑 // 判断是创建还是编辑
if (this.materialGroupAddForm.id) { if (this.materialGroupAddForm.id) {
this.eventBus.$emit('editMaterialGroup', this.materialGroupAddForm) this.eventBus.$emit('editMaterialGroup', params)
this.dialogVisible = false this.dialogVisible = false
return return
} }
...@@ -114,7 +120,7 @@ export default { ...@@ -114,7 +120,7 @@ export default {
}) })
return return
} }
this.eventBus.$emit('addMaterialGroup', this.materialGroupAddForm) this.eventBus.$emit('addMaterialGroup', params)
this.dialogVisible = false this.dialogVisible = false
} else { } else {
this.$message({ this.$message({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!