Commit 9aaef596 authored by xhx's avatar xhx

消息资讯

parent 3ba829d9
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<p class=" text-2xl font-bold mb-5">消息管理</p> <p class=" text-2xl font-bold mb-5">消息管理</p>
<!-- 消息分类 --> <!-- 消息分类 -->
<span class=" mr-3">消息分类</span> <span class=" mr-3">消息分类</span>
<a-select :default-value="1" style="width: 120px; margin-right:10px;" v-model="form.type"> <a-select :default-value="1" style="width: 120px; margin-right:10px;" v-model="types">
<a-select-option v-for="type in msgType" :key="type.value">{{ type.label }}</a-select-option> <a-select-option v-for="type in msgType" :key="type.value">{{ type.label }}</a-select-option>
</a-select> </a-select>
<!-- 操作 --> <!-- 操作 -->
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<a-input v-model="form.module" placeholder="请输入模板名称" style="width: 200px"/> <a-input v-model="form.module" placeholder="请输入模板名称" style="width: 200px"/>
</a-form-model-item> --> </a-form-model-item> -->
<a-form-model-item label="消息分类" :required="true" prop="type"> <a-form-model-item label="消息分类" :required="true" prop="type">
<a-select :default-value="1" style="width: 200px" v-model="form.type"> <a-select style="width: 200px" v-model="form.type" placeholder="请选择分类" >
<a-select-option v-for="type in msgType" :key="type.value">{{type.label}}</a-select-option> <a-select-option v-for="type in msgType" :key="type.value">{{type.label}}</a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
...@@ -147,8 +147,7 @@ export default Vue.extend({ ...@@ -147,8 +147,7 @@ export default Vue.extend({
limit: this.pagination.defaultPageSize, limit: this.pagination.defaultPageSize,
offset: (this.pagination.current - 1) * this.pagination.defaultPageSize, offset: (this.pagination.current - 1) * this.pagination.defaultPageSize,
notify_status: 0, notify_status: 0,
notify_type: this.form.type notify_type: this.types
// notify_type: 0
}).then(res => { }).then(res => {
this.list = res.data.items this.list = res.data.items
this.pagination.total = res.data.total this.pagination.total = res.data.total
...@@ -215,6 +214,7 @@ export default Vue.extend({ ...@@ -215,6 +214,7 @@ export default Vue.extend({
this.setStatus(1, '下架成功') this.setStatus(1, '下架成功')
} else if( this.type == modal.delete){ } else if( this.type == modal.delete){
this.removeNotify() this.removeNotify()
this.pagination.current = 1
} }
this.showActionModal = false this.showActionModal = false
...@@ -281,16 +281,8 @@ export default Vue.extend({ ...@@ -281,16 +281,8 @@ export default Vue.extend({
Object.keys(this.form).forEach(m=>{ Object.keys(this.form).forEach(m=>{
this.form[m as formtype] = '' this.form[m as formtype] = ''
}) })
this.form['type'] = 1
}, },
// edit(record:msg){
// let form = this.form
// type msgtype = keyof msg
// type formtype = keyof typeof form
// Object.keys(this.form).map(m=>{
// this.form[m as formtype] = record[m as msgtype ]
// })
// this.show = true
// },
}, },
data(){ data(){
const rules={ const rules={
...@@ -326,6 +318,7 @@ export default Vue.extend({ ...@@ -326,6 +318,7 @@ export default Vue.extend({
}, },
rules, rules,
uuid: "", uuid: "",
types: 1,
list: [], list: [],
pagination: { pagination: {
current: 1, current: 1,
......
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