BUG 29300

This commit is contained in:
aixianling
2022-04-28 10:00:09 +08:00
parent b6bcf204f5
commit a6c9430a42

View File

@@ -5,20 +5,26 @@
@change="page.current=1,getTableData()"> @change="page.current=1,getTableData()">
</ai-title> </ai-title>
<template #content> <template #content>
<div class="flex"> <div class="flex fill">
<div class="type"> <div class="type">
<div class="title">宣传板块<span><el-button type="text" @click="addType(0, typeList.length+1, '')">添加</el-button></span></div> <div class="title">宣传板块<span><el-button type="text"
@click="addType(0, typeList.length+1, '')">添加</el-button></span>
</div>
<div class="list"> <div class="list">
<div class="item" v-for="(item, index) in typeList" :key="index" :class="typeIndex == index ? 'active' : ''" @click="typeClick(index)"> <div class="item" v-for="(item, index) in typeList" :key="index"
:class="typeIndex == index ? 'active' : ''" @click="typeClick(index)">
{{ item.categoryName }} {{ item.categoryName }}
</div> </div>
<div class="item" v-if="!typeList.length">暂无数据</div> <div class="item" v-if="!typeList.length">暂无数据</div>
</div> </div>
</div> </div>
<div class="type mini-type"> <div class="type mini-type">
<div class="title">模块名称<span><el-button type="text" @click="addType(1, miniTypeList.length+1, typeList[typeIndex].id)">添加</el-button></span></div> <div class="title">模块名称<span><el-button type="text"
@click="addType(1, miniTypeList.length+1, typeList[typeIndex].id)">添加</el-button></span>
</div>
<div class="list"> <div class="list">
<div class="item" v-for="(item, index) in miniTypeList" :key="index" :class="miniTypeIndex == index ? 'active' : ''" @click="miniTypeClick(index)"> <div class="item" v-for="(item, index) in miniTypeList" :key="index"
:class="miniTypeIndex == index ? 'active' : ''" @click="miniTypeClick(index)">
<span class="text">{{ item.categoryName }}</span> <span class="text">{{ item.categoryName }}</span>
<span class="icon"> <span class="icon">
<i class="el-icon-circle-plus-outline" @click="addNewType(index)"></i> <i class="el-icon-circle-plus-outline" @click="addNewType(index)"></i>
@@ -32,12 +38,15 @@
<div class="content"> <div class="content">
<ai-search-bar> <ai-search-bar>
<template #right> <template #right>
<el-input size="small" placeholder="请输入标题" v-model="search.title" clearable @change="page.current=1,getTableData()"/> <el-input size="small" placeholder="请输入标题" v-model="search.title" clearable
@change="page.current=1,getTableData()"/>
</template> </template>
</ai-search-bar> </ai-search-bar>
<ai-search-bar> <ai-search-bar>
<template #left> <template #left>
<el-button type="primary" icon="iconfont iconAdd" @click="showEdit('')" v-if="typeList.length && miniTypeList.length">添加</el-button> <el-button type="primary" icon="iconfont iconAdd" @click="showEdit('')"
v-if="typeList.length && miniTypeList.length">添加
</el-button>
<!-- <el-button icon="iconfont iconDelete" :disabled="!ids.length" @click="handleDelete(ids)">删除</el-button> --> <!-- <el-button icon="iconfont iconDelete" :disabled="!ids.length" @click="handleDelete(ids)">删除</el-button> -->
</template> </template>
</ai-search-bar> </ai-search-bar>
@@ -53,7 +62,6 @@
</ai-table> </ai-table>
</div> </div>
</div> </div>
</template> </template>
</ai-list> </ai-list>
<ai-dialog :visible.sync="dialog" :title="dialogTitle" @closed="form={}" @onConfirm="submitDialog" width="600px"> <ai-dialog :visible.sync="dialog" :title="dialogTitle" @closed="form={}" @onConfirm="submitDialog" width="600px">
@@ -65,7 +73,8 @@
<el-input-number v-model="form.showIndex" @change="handleChange" :min="1" :max="100"></el-input-number> <el-input-number v-model="form.showIndex" @change="handleChange" :min="1" :max="100"></el-input-number>
</el-form-item> </el-form-item>
</el-form> </el-form>
<ai-table :tableData="newTypeList" :total="newPage.total" :current.sync="newPage.current" :size.sync="newPage.size" <ai-table :tableData="newTypeList" :total="newPage.total" :current.sync="newPage.current"
:size.sync="newPage.size"
:col-configs="colConfigsNew" v-if="type == 2"> :col-configs="colConfigsNew" v-if="type == 2">
<el-table-column slot="options" label="操作" fixed="right" align="center"> <el-table-column slot="options" label="操作" fixed="right" align="center">
<template slot-scope="{row}"> <template slot-scope="{row}">
@@ -139,7 +148,13 @@ export default {
}) })
}, },
showEdit(id) { showEdit(id) {
this.$router.push({query: {id: id, parentId: this.typeList[this.typeIndex].id, moduleId: this.miniTypeList[this.miniTypeIndex].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) { handleDelete(ids) {
this.$confirm("是否删除该条宣传资讯信息").then(() => { this.$confirm("是否删除该条宣传资讯信息").then(() => {
@@ -261,18 +276,22 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.List { .List {
height: 100%; height: 100%;
.flex { .flex {
display: flex; display: flex;
.type { .type {
width: 250px; width: 250px;
border: 1px solid #ddd; border: 1px solid #ddd;
box-sizing: border-box; box-sizing: border-box;
.title { .title {
font-size: 16px; font-size: 16px;
line-height: 40px; line-height: 40px;
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
padding: 0 16px; padding: 0 16px;
font-weight: 600; font-weight: 600;
span { span {
color: #26f; color: #26f;
font-size: 12px; font-size: 12px;
@@ -280,6 +299,7 @@ export default {
float: right; float: right;
} }
} }
.list { .list {
.item { .item {
padding: 0 16px; padding: 0 16px;
@@ -289,38 +309,51 @@ export default {
font-size: 14px; font-size: 14px;
color: #333; color: #333;
box-sizing: border-box; box-sizing: border-box;
.text { .text {
width: calc(100% - 70px); width: calc(100% - 70px);
cursor: pointer; cursor: pointer;
} }
.icon { .icon {
width: 70px; width: 70px;
text-align: right; text-align: right;
i { i {
font-size: 14px; font-size: 14px;
cursor: pointer; cursor: pointer;
margin-left: 8px; margin-left: 8px;
} }
.el-icon-delete { .el-icon-delete {
color: #f46; color: #f46;
} }
.el-icon-circle-plus-outline { .el-icon-circle-plus-outline {
color: #26f; color: #26f;
} }
} }
} }
.active { .active {
// color: #26f; // color: #26f;
background-color: #f3f6f9; background-color: #f3f6f9;
} }
} }
} }
.mini-type { .mini-type {
margin-right: 16px; margin-right: 16px;
} }
.content { .content {
width: calc(100% - 516px); width: calc(100% - 516px);
} }
} }
::v-deep .ai-list__content--right-wrapper {
min-height: calc(100% - 6px) !important;
display: flex;
}
} }
</style> </style>