Commit 7ea7776f by 匡雅琴

素材组修改

1 parent 8ff133ba
......@@ -10,8 +10,8 @@
<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> -->
<span class="tips">添加业务类型,该素材组里面的所有素材均会添加此业务类型</span> -->
</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: '创建素材组',
......@@ -90,14 +90,20 @@ export default {
// }
// })
// },
getParams() {
var params = JSON.parse(JSON.stringify(this.materialGroupAddForm))
return params
},
// 创建
submitForm() {
console.log(this.materialGroupAddForm)
this.$refs.materialGroupAddForm.validate(valid => {
if (valid) {
var params = this.getParams()
params.orderFlag = true
// 判断是创建还是编辑
if (this.materialGroupAddForm.id) {
this.eventBus.$emit('editMaterialGroup', this.materialGroupAddForm)
this.eventBus.$emit('editMaterialGroup', params)
this.dialogVisible = false
return
}
......@@ -114,7 +120,7 @@ export default {
})
return
}
this.eventBus.$emit('addMaterialGroup', this.materialGroupAddForm)
this.eventBus.$emit('addMaterialGroup', params)
this.dialogVisible = false
} else {
this.$message({
......
......@@ -132,7 +132,7 @@ export default {
materialName: ''
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
layout: 'sizes, prev, pager, next, jumper, ->, total',
layout: 'sizes, prev, pager, next, jumper, ->, total',
materialTableData: [],
materialGroupDialog: false,
introductionDialog: false,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!