|
@@ -2,7 +2,7 @@
|
|
|
<div id="patent">
|
|
|
<admin-frame @search="search" :limit="limit" :total="total" topType="2" @back="back" :rightArrow="false" :useNav="false">
|
|
|
<template v-slot:info>
|
|
|
- <list-1 :list="list" @view="view" @relation="relation" @warning="warning" @examine="toExamine"></list-1>
|
|
|
+ <list-1 :list="list" @view="view" @relation="relation" @examine="toExamine"></list-1>
|
|
|
</template>
|
|
|
</admin-frame>
|
|
|
<van-dialog class="dialog" v-model="show" title="详细信息" :show-confirm-button="false" show-cancel-button>
|
|
@@ -18,26 +18,6 @@
|
|
|
<van-button type="info" size="small" @click="relationSubmit">确认关联</van-button>
|
|
|
</van-col>
|
|
|
</van-dialog>
|
|
|
- <van-dialog class="thrDialog" v-model="fourShow" title="专利预警信息" :show-confirm-button="false" :show-cancel-button="false">
|
|
|
- <van-form>
|
|
|
- <van-field v-model="warningForm.create_number" name="专利申请号" label="专利申请号" readonly />
|
|
|
- <van-field name="file_url" label="预警文件">
|
|
|
- <template #input>
|
|
|
- <van-uploader
|
|
|
- :fileList="warningForm.file_url"
|
|
|
- :max-count="1"
|
|
|
- :after-read="(file) => toUpload(file, 'file_url')"
|
|
|
- @delete="(file) => toDelete(file, 'file_url')"
|
|
|
- accept="file"
|
|
|
- />
|
|
|
- </template>
|
|
|
- </van-field>
|
|
|
- <van-col span="24" class="btn">
|
|
|
- <van-button type="danger" size="small" @click="fourShow = false">取消发送</van-button>
|
|
|
- <van-button type="info" size="small" @click="warningSubmit">确认发送</van-button>
|
|
|
- </van-col>
|
|
|
- </van-form>
|
|
|
- </van-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -48,9 +28,6 @@ import checkForm from './patent/checkForm.vue';
|
|
|
import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: patentapply } = createNamespacedHelpers('patentapply');
|
|
|
-const { mapActions: patentwarning } = createNamespacedHelpers('patentwarning');
|
|
|
-const { mapActions: upload } = createNamespacedHelpers('upload');
|
|
|
-var moment = require('moment');
|
|
|
export default {
|
|
|
name: 'patent',
|
|
|
props: {},
|
|
@@ -74,18 +51,13 @@ export default {
|
|
|
// 关联申请号
|
|
|
thrShow: false,
|
|
|
relationForm: {},
|
|
|
- // 专利预警信息
|
|
|
- fourShow: false,
|
|
|
- warningForm: {},
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
|
await this.search();
|
|
|
},
|
|
|
methods: {
|
|
|
- ...upload(['upload']),
|
|
|
...patentapply(['query', 'update', 'check']),
|
|
|
- ...patentwarning({ warningQuery: 'query', warningCreate: 'create' }),
|
|
|
async search({ skip = 0, limit = this.limit, ...info } = {}) {
|
|
|
info.admin_id = this.user._id;
|
|
|
let res = await this.query({ skip, limit, ...info });
|
|
@@ -116,30 +88,6 @@ export default {
|
|
|
this.$toast({ type: `success`, message: `${res.errmsg}` });
|
|
|
}
|
|
|
},
|
|
|
- // 专利申请预警
|
|
|
- warning(data) {
|
|
|
- this.$set(this, `warningForm`, data);
|
|
|
- this.fourShow = true;
|
|
|
- },
|
|
|
- // 确认发送
|
|
|
- async warningSubmit() {
|
|
|
- let data = this.warningForm;
|
|
|
- let arr = {
|
|
|
- to_id: data.user_id,
|
|
|
- to_name: data.apply_name,
|
|
|
- patent_id: data.id,
|
|
|
- patent_name: data.name,
|
|
|
- content: data.content,
|
|
|
- file_url: data.file_url,
|
|
|
- };
|
|
|
- let res = await this.warningCreate(arr);
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$toast({ type: `success`, message: `操作成功` });
|
|
|
- this.fourShow = false;
|
|
|
- } else {
|
|
|
- this.$toast({ type: `success`, message: `${res.errmsg}` });
|
|
|
- }
|
|
|
- },
|
|
|
// 审核
|
|
|
toExamine(data) {
|
|
|
this.$set(this, `form`, data);
|
|
@@ -158,17 +106,6 @@ export default {
|
|
|
this.$toast({ type: `fail`, message: `${res.errmsg}` });
|
|
|
}
|
|
|
},
|
|
|
- async toUpload({ file }, model) {
|
|
|
- // 上传,赋值
|
|
|
- const res = await this.upload({ file, dir: 'file' });
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$set(this.warningForm, model, [{ name: res.name, url: res.uri }]);
|
|
|
- }
|
|
|
- },
|
|
|
- toDelete(file, model) {
|
|
|
- const index = this.warningForm[model].findIndex((f) => _.isEqual(f, file));
|
|
|
- this.warningForm[model].splice(index, 1);
|
|
|
- },
|
|
|
// 返回
|
|
|
back() {
|
|
|
this.$router.push({ path: '/service/patent/index' });
|