提交 7c897c13 authored 作者: lihuihui's avatar lihuihui

update

上级 df2867b8
...@@ -67,7 +67,9 @@ ...@@ -67,7 +67,9 @@
<pages v-if="ruleForm.type == '2'" @selectionConfirm="pagesSelectionConfirm" :selectData="pagesList"></pages> <pages v-if="ruleForm.type == '2'" @selectionConfirm="pagesSelectionConfirm" :selectData="pagesList"></pages>
<div style="padding: 0 20px"> <div style="padding: 0 20px">
<el-input v-if="ruleForm.type == '3'" v-model="ruleForm.url" placeholder="请输入链接"></el-input> <el-input v-if="ruleForm.type == '3'" v-model="ruleForm.url" placeholder="请输入链接"></el-input>
<el-button style="margin-top: 20px;" @click="drawer = false" type="primary">确认</el-button> <el-button v-if="ruleForm.type == '3'" style="margin-top: 20px" @click="drawer = false" type="primary"
>确认</el-button
>
</div> </div>
</el-drawer> </el-drawer>
</div> </div>
...@@ -129,8 +131,31 @@ export default { ...@@ -129,8 +131,31 @@ export default {
hasPagination: false, hasPagination: false,
columns: [ columns: [
{ label: 'id', prop: 'id', align: 'center' }, { label: 'id', prop: 'id', align: 'center' },
{ label: '页面类型', prop: 'type_name', align: 'center' }, {
{ label: '页面模板', prop: 'layout_name', align: 'center' }, label: '页面类型',
prop: 'type',
align: 'center',
computed: scope => {
const data = {
1: '首页展示区',
2: '二级列表页'
}
return data[scope.row.type]
}
},
{
label: '页面模板',
prop: 'layout',
align: 'center',
computed: scope => {
const data = {
1: '左图又文字',
2: '上图下文',
3: '文本'
}
return data[scope.row.layout]
}
},
{ label: '标题', prop: 'title', align: 'center' }, { label: '标题', prop: 'title', align: 'center' },
{ label: '创建时间', prop: 'created_time', align: 'center' }, { label: '创建时间', prop: 'created_time', align: 'center' },
{ label: '操作', slots: 'table-x', align: 'center' } { label: '操作', slots: 'table-x', align: 'center' }
...@@ -200,6 +225,12 @@ export default { ...@@ -200,6 +225,12 @@ export default {
getDetails({ id: this.id }).then(res => { getDetails({ id: this.id }).then(res => {
this.status = !!parseInt(res.data.status) this.status = !!parseInt(res.data.status)
this.ruleForm = res.data this.ruleForm = res.data
if (this.ruleForm.type === '1') {
this.essayList = res.data.relation
}
if (this.ruleForm.type === '2') {
this.pagesList = res.data.relation
}
}) })
} }
}, },
......
...@@ -181,8 +181,31 @@ export default { ...@@ -181,8 +181,31 @@ export default {
hasPagination: false, hasPagination: false,
columns: [ columns: [
{ label: 'id', prop: 'id', align: 'center' }, { label: 'id', prop: 'id', align: 'center' },
{ label: '页面类型', prop: 'type_name', align: 'center' }, {
{ label: '页面模板', prop: 'layout_name', align: 'center' }, label: '页面类型',
prop: 'type_name',
align: 'center',
computed: scope => {
const data = {
1: '首页展示区',
2: '二级列表页'
}
return data[scope.row.type]
}
},
{
label: '页面模板',
prop: 'layout_name',
align: 'center',
computed: scope => {
const data = {
1: '左图又文字',
2: '上图下文',
3: '文本'
}
return data[scope.row.layout]
}
},
{ label: '标题', prop: 'title', align: 'center' }, { label: '标题', prop: 'title', align: 'center' },
{ label: '创建时间', prop: 'created_time', align: 'center' }, { label: '创建时间', prop: 'created_time', align: 'center' },
{ label: '操作', slots: 'table-x', align: 'center' } { label: '操作', slots: 'table-x', align: 'center' }
...@@ -277,6 +300,9 @@ export default { ...@@ -277,6 +300,9 @@ export default {
getDetails({ id: this.id }).then(res => { getDetails({ id: this.id }).then(res => {
this.status = !!parseInt(res.data.status) this.status = !!parseInt(res.data.status)
this.ruleForm = res.data this.ruleForm = res.data
this.bannerList = res.data.banners
this.menuList = res.data.menus
this.pagesList = res.data.pages
}) })
} }
}, },
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<pages v-if="ruleForm.type == '2'" @selectionConfirm="pagesSelectionConfirm" :selectData="pagesList"></pages> <pages v-if="ruleForm.type == '2'" @selectionConfirm="pagesSelectionConfirm" :selectData="pagesList"></pages>
<div style="padding: 0 20px"> <div style="padding: 0 20px">
<el-input v-if="ruleForm.type == '3'" v-model="ruleForm.url" placeholder="请输入链接"></el-input> <el-input v-if="ruleForm.type == '3'" v-model="ruleForm.url" placeholder="请输入链接"></el-input>
<el-button style="margin-top: 20px;" @click="drawer = false" type="primary">确认</el-button> <el-button v-if="ruleForm.type == '3'" style="margin-top: 20px;" @click="drawer = false" type="primary">确认</el-button>
</div> </div>
</el-drawer> </el-drawer>
</div> </div>
...@@ -134,8 +134,31 @@ export default { ...@@ -134,8 +134,31 @@ export default {
hasPagination: false, hasPagination: false,
columns: [ columns: [
{ label: 'id', prop: 'id', align: 'center' }, { label: 'id', prop: 'id', align: 'center' },
{ label: '页面类型', prop: 'type_name', align: 'center' }, {
{ label: '页面模板', prop: 'layout_name', align: 'center' }, label: '页面类型',
prop: 'type',
align: 'center',
computed: scope => {
const data = {
1: '首页展示区',
2: '二级列表页'
}
return data[scope.row.type]
}
},
{
label: '页面模板',
prop: 'layout',
align: 'center',
computed: scope => {
const data = {
1: '左图又文字',
2: '上图下文',
3: '文本'
}
return data[scope.row.layout]
}
},
{ label: '标题', prop: 'title', align: 'center' }, { label: '标题', prop: 'title', align: 'center' },
{ label: '创建时间', prop: 'created_time', align: 'center' }, { label: '创建时间', prop: 'created_time', align: 'center' },
{ label: '操作', slots: 'table-x', align: 'center' } { label: '操作', slots: 'table-x', align: 'center' }
...@@ -205,6 +228,12 @@ export default { ...@@ -205,6 +228,12 @@ export default {
getDetails({ id: this.id }).then(res => { getDetails({ id: this.id }).then(res => {
this.status = !!parseInt(res.data.status) this.status = !!parseInt(res.data.status)
this.ruleForm = res.data this.ruleForm = res.data
if (this.ruleForm.type === '1') {
this.essayList = res.data.relation
}
if (this.ruleForm.type === '2') {
this.pagesList = res.data.relation
}
}) })
} }
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论