宣传资讯
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
@selection-change="v=>ids=v.map(e=>e.id)">
|
||||
<el-table-column slot="options" label="操作" fixed="right" align="center" width='150px'>
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="text" @click="showDetail(row.id)">编辑</el-button>
|
||||
<el-button type="text" @click="showEdit(row.id)">编辑</el-button>
|
||||
<el-button type="text" @click="handleDelete(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -130,7 +130,7 @@ export default {
|
||||
methods: {
|
||||
getTableData() {
|
||||
this.instance.post("/app/apppublicityinfo/list", null, {
|
||||
params: {...this.page, ...this.search}
|
||||
params: {...this.page, ...this.search, moduleId: this.miniTypeList[this.miniTypeIndex].id || ''}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data?.records
|
||||
@@ -139,7 +139,7 @@ export default {
|
||||
})
|
||||
},
|
||||
showEdit(id) {
|
||||
this.$router.push({query: {id: id, parentId: this.typeList[this.typeIndex].id}, hash: "#add"})
|
||||
this.$router.push({query: {id: id, parentId: this.typeList[this.typeIndex].id, moduleId: this.miniTypeList[this.miniTypeIndex].id}, hash: "#add"})
|
||||
},
|
||||
handleDelete(ids) {
|
||||
this.$confirm("是否删除该条宣传资讯信息").then(() => {
|
||||
@@ -197,6 +197,10 @@ export default {
|
||||
this.instance.post(`/app/apppublicitycategory/list?categoryType=1&size=100&parentId=${parentId}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.miniTypeList = res.data.records
|
||||
if(res.data.records && res.data.records.length) {
|
||||
this.miniTypeClick(0)
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -214,6 +218,9 @@ export default {
|
||||
},
|
||||
miniTypeClick(e) {
|
||||
this.miniTypeIndex = e
|
||||
this.current = 1
|
||||
this.tableData = []
|
||||
this.getTableData()
|
||||
},
|
||||
editMini(index) {
|
||||
this.form = {...this.miniTypeList[index]}
|
||||
|
||||
Reference in New Issue
Block a user