Commit d311e949 authored by lshan's avatar lshan

消息管理修改

parent 0dbee512
......@@ -77,7 +77,10 @@
编辑
</a>
<a-divider v-show="record.notify_status === 1" type="vertical" />
<a @click="onDelete(record)">
<a v-if="record.notify_status==1" @click="onDelete(record)">
删除
</a>
<a v-else-if="record.notify_status==2" style="color: rgba(249, 250, 251, var(--tw-text-opacity));">
删除
</a>
</span>
......@@ -277,6 +280,8 @@ export default Vue.extend({
},
resetForm() {
let form = this.form
form.title='',
form.content=''
type formtype = keyof typeof form
Object.keys(this.form).forEach(m=>{
// this.form[m as formtype] = ''
......
......@@ -140,6 +140,7 @@ export default Vue.extend({
},
created() {
this.getList()
this.search()
},
methods:{
tableChange(e: any) {
......@@ -154,7 +155,7 @@ export default Vue.extend({
offset: (this.pagination.current - 1) * this.pagination.defaultPageSize
}
news.articleList(params).then(res => {
console.log(res)
console.log(res,'this getlist')
this.list = res.data.items
this.pagination.total = res.data.total
// if (this.searchPageReqParams.title) {
......@@ -164,12 +165,26 @@ export default Vue.extend({
},
findTitle() {
const searchParams = this.searchPageReqParams.article_type === 1 ? "searchByPolicy" : "searchByTitle"
console.log(searchParams,'this searchParams');
news[searchParams]({title: this.searchPageReqParams.title}).then(res => {
console.log(res)
console.log(res,'this res')
this.list = res.data.items
this.pagination.total = res.data.total
console.log(this.list,'this.list');
})
},
search(){
this.getList
if(this.searchPageReqParams.article_type === 1){
this.list.filter(item=>{
console.log(item,'this item');
// return item.title.includes(this.searchPageReqParams.title);
})
}
},
query(){
console.log(this.searchPageReqParams);
if (this.searchPageReqParams.title) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment