Commit d311e949 authored by lshan's avatar lshan

消息管理修改

parent 0dbee512
...@@ -77,7 +77,10 @@ ...@@ -77,7 +77,10 @@
编辑 编辑
</a> </a>
<a-divider v-show="record.notify_status === 1" type="vertical" /> <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> </a>
</span> </span>
...@@ -277,6 +280,8 @@ export default Vue.extend({ ...@@ -277,6 +280,8 @@ export default Vue.extend({
}, },
resetForm() { resetForm() {
let form = this.form let form = this.form
form.title='',
form.content=''
type formtype = keyof typeof form type formtype = keyof typeof form
Object.keys(this.form).forEach(m=>{ Object.keys(this.form).forEach(m=>{
// this.form[m as formtype] = '' // this.form[m as formtype] = ''
......
...@@ -140,6 +140,7 @@ export default Vue.extend({ ...@@ -140,6 +140,7 @@ export default Vue.extend({
}, },
created() { created() {
this.getList() this.getList()
this.search()
}, },
methods:{ methods:{
tableChange(e: any) { tableChange(e: any) {
...@@ -154,7 +155,7 @@ export default Vue.extend({ ...@@ -154,7 +155,7 @@ export default Vue.extend({
offset: (this.pagination.current - 1) * this.pagination.defaultPageSize offset: (this.pagination.current - 1) * this.pagination.defaultPageSize
} }
news.articleList(params).then(res => { news.articleList(params).then(res => {
console.log(res) console.log(res,'this getlist')
this.list = res.data.items this.list = res.data.items
this.pagination.total = res.data.total this.pagination.total = res.data.total
// if (this.searchPageReqParams.title) { // if (this.searchPageReqParams.title) {
...@@ -164,11 +165,25 @@ export default Vue.extend({ ...@@ -164,11 +165,25 @@ export default Vue.extend({
}, },
findTitle() { findTitle() {
const searchParams = this.searchPageReqParams.article_type === 1 ? "searchByPolicy" : "searchByTitle" const searchParams = this.searchPageReqParams.article_type === 1 ? "searchByPolicy" : "searchByTitle"
console.log(searchParams,'this searchParams');
news[searchParams]({title: this.searchPageReqParams.title}).then(res => { news[searchParams]({title: this.searchPageReqParams.title}).then(res => {
console.log(res) console.log(res,'this res')
this.list = res.data.items this.list = res.data.items
this.pagination.total = res.data.total 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(){ query(){
console.log(this.searchPageReqParams); console.log(this.searchPageReqParams);
......
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