4 changed files with 135 additions and 16 deletions
@ -0,0 +1,114 @@ |
|||
<template> |
|||
<div class="flex flex-wrap mb-4"> |
|||
<div class="flex flex-row mr-5 mb-4 align-center"> |
|||
标题: |
|||
<el-input |
|||
placeholder="请输入标题" |
|||
class="flex-1" |
|||
v-model="title" |
|||
@change="changeTitle($event, 'title')"> |
|||
</el-input> |
|||
</div> |
|||
<div class="flex flex-row mr-5 mb-4 align-center"> |
|||
责编: |
|||
<el-input |
|||
placeholder="请输入责编" |
|||
class="flex-1" |
|||
v-model="editor" |
|||
@change="changeTitle($event, 'editor')"> |
|||
</el-input> |
|||
</div> |
|||
<div class="flex flex-row mr-5 mb-4 align-center"> |
|||
发表时间: |
|||
<el-date-picker |
|||
v-model="publishTime" |
|||
@change="changeTime" |
|||
class="flex-1" |
|||
type="daterange" |
|||
range-separator="至" |
|||
start-placeholder="开始日期" |
|||
end-placeholder="结束日期"> |
|||
</el-date-picker> |
|||
</div> |
|||
<div class="flex flex-row mr-5 mb-4 align-center" v-show="show"> |
|||
页面显示位置: |
|||
<el-cascader |
|||
v-model="showPage" |
|||
class="w-230" |
|||
:options="tabList" |
|||
:props="props" |
|||
@change="handleChange"> |
|||
</el-cascader> |
|||
</div> |
|||
|
|||
<el-button |
|||
type="primary" |
|||
icon="el-icon-search" |
|||
class="mr-5 mb-4" |
|||
@click="$emit('getList', options)"> |
|||
搜索 |
|||
</el-button> |
|||
|
|||
<el-button |
|||
type="primary" |
|||
icon="el-icon-plus" |
|||
class="mb-4" |
|||
@click="$emit('addModal')" |
|||
> |
|||
添加 |
|||
</el-button> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import {tabList} from '../../filters/code'; |
|||
|
|||
export default{ |
|||
data() { |
|||
return { |
|||
tabList, |
|||
props: { |
|||
value: 'code', |
|||
label: 'title', |
|||
children: 'children' |
|||
}, |
|||
show: false, |
|||
title: '', |
|||
editor: '', |
|||
publishTime: '', |
|||
showPage: ['02','0203'], |
|||
options: { |
|||
title: '', |
|||
editor: '', |
|||
publishTimeStart: '', |
|||
publishTimeEnd: '', |
|||
showPage: '0203' |
|||
} |
|||
} |
|||
}, |
|||
|
|||
mounted(){ |
|||
const code = localStorage.getItem('code') |
|||
if(code === '0204'){ |
|||
this.show = true |
|||
} |
|||
}, |
|||
|
|||
methods: { |
|||
changeTitle(e, type){ |
|||
this[type] = e |
|||
this.options[type] = e |
|||
}, |
|||
|
|||
changeTime(e){ |
|||
this.options.publishTimeStart = this.$moment(e[0]).valueOf() |
|||
this.options.publishTimeEnd = this.$moment(e[1]).valueOf() |
|||
}, |
|||
|
|||
// 位置选择 |
|||
handleChange(value) { |
|||
this.options.showPage = value[1] |
|||
}, |
|||
} |
|||
} |
|||
</script> |
Loading…
Reference in new issue