Commit e2551b5f by ext.wangyuman1

内容中心bug修复

1 parent 009c3a02
This diff could not be displayed because it is too large.
......@@ -62,12 +62,12 @@ export default {
},
list: [], // 列表
total: 0, // 总条数
treeData: [{}], // 树
// treeData: [{}], // 树
// 树props
treeProps: {
children: 'children',
label: 'name',
},
// treeProps: {
// children: 'children',
// label: 'name',
// },
treeForm: {}, // 树表格
treeDialogVisible: false, // 树表格对话框显隐
......@@ -107,7 +107,7 @@ export default {
computed: {},
created() {
this.query.mediaType = this.type
this.getTree()
// this.getTree()
// this.getList()
// 开始
this.getCodeCategoryListFn()
......@@ -150,20 +150,20 @@ export default {
},
// 结束
// 获取类目树
getTree() {
getTree(this.type).then(({ data }) => {
this.treeData = [
{
id: '',
name: '全部',
parentId: '0',
hasParent: false,
hasChildren: true,
children: data || [],
},
]
})
},
// getTree() {
// getTree(this.type).then(({ data }) => {
// this.treeData = [
// {
// id: '',
// name: '全部',
// parentId: '0',
// hasParent: false,
// hasChildren: true,
// children: data || [],
// },
// ]
// })
// },
// 获取素材列表
getList(page) {
page && (this.query.pageNum = page)
......@@ -173,7 +173,7 @@ export default {
this.list = rows.sort((a, b) => +new Date(b.updateTime) - +new Date(a.updateTime))
this.total = +total
this.loading = false
this.$emit('listChange', this.list)
this.$emit('listChange', this.list, this.type)
})
.catch(() => {
this.loading = false
......@@ -197,7 +197,8 @@ export default {
:class="{ active: groupIndex == key }"
v-for="(group, key) in groupList"
:key="group.id"
@click="switchGroup(key, group)">
@click="switchGroup(key, group)"
>
<div class="name">{{ group.name + ' (' + group.number + ')' }}</div>
</div>
</div>
......@@ -211,7 +212,8 @@ export default {
clearable
prefix-icon="el-icon-search"
style="width: 300px"
@keyup.enter="search()" />
@keyup.enter="search()"
/>
<el-button class="ml10" @click="getList(1)" type="primary">查询</el-button>
<!-- v-hasPermi="['wecom:material:list']" -->
<el-button @click="resetQuery">重置</el-button>
......@@ -225,7 +227,8 @@ export default {
:total="total"
v-model:page="query.pageNum"
v-model:limit="query.pageSize"
@pagination="getList()" />
@pagination="getList()"
/>
</div>
</el-col>
</el-row>
......
......@@ -16,7 +16,7 @@
:key="index"
:label="item.label + '(' + item.list.length + ')'"
:name="item.name">
<MaPage ref="page" :type="item.type" v-slot="{ list }">
<MaPage ref="page" :type="item.type" v-slot="{ list }" @listChange="listChange">
<div v-if="item.type === '0'">
<div v-if="list && list.length">
<el-checkbox-group v-model="paneList[picindex].list" class="imgStyle">
......@@ -136,6 +136,19 @@ export default {
}
return str
},
listChange(list, type) {
this.paneList = this.paneList.map((item) => {
if (type === item.type) {
item.list.forEach((one) => {
this.ids = this.ids.filter((two) => {
return two.id !== one.id
})
})
item.list = []
}
return item
})
},
dealList() {
this.paneList = [
{ list: [], label: '文本', name: 'text', type: '4' },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!