|
@@ -2,7 +2,7 @@
|
|
|
<div id="read">
|
|
|
<admin-frame @search="search" :limit="limit" :total="total" topType="2" @back="back" @add="add" :useNav="false">
|
|
|
<template v-slot:info>
|
|
|
- <list-2 :list="list"></list-2>
|
|
|
+ <list-2 :list="list" @toDel="toDel"></list-2>
|
|
|
</template>
|
|
|
</admin-frame>
|
|
|
</div>
|
|
@@ -13,6 +13,7 @@ import list2 from './parts/list-2.vue';
|
|
|
import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: patentnotice } = createNamespacedHelpers('patentnotice');
|
|
|
+import { Dialog } from 'vant';
|
|
|
export default {
|
|
|
name: 'read',
|
|
|
props: {},
|
|
@@ -31,7 +32,7 @@ export default {
|
|
|
this.search();
|
|
|
},
|
|
|
methods: {
|
|
|
- ...patentnotice(['query']),
|
|
|
+ ...patentnotice(['query', 'delete']),
|
|
|
async search({ skip = 0, limit = this.limit, ...info } = {}) {
|
|
|
let res = await this.query({ skip, limit, ...info });
|
|
|
if (this.$checkRes(res)) {
|
|
@@ -43,6 +44,18 @@ export default {
|
|
|
add() {
|
|
|
this.$router.push({ path: '/patent/admin/message/notice_create' });
|
|
|
},
|
|
|
+ // 删除信息
|
|
|
+ async toDel(data) {
|
|
|
+ Dialog.confirm({ title: '信息提示', message: '删除操作不可恢复,您确定要继续么?' })
|
|
|
+ .then(async () => {
|
|
|
+ let res = await this.delete(data.id);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$toast({ type: `success`, message: `删除成功` });
|
|
|
+ this.search();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
// 返回
|
|
|
back() {
|
|
|
this.$router.push({ path: '/patent/index' });
|