|
@@ -55,7 +55,7 @@ export default {
|
|
|
this.searchOther();
|
|
|
},
|
|
|
methods: {
|
|
|
- ...adminLogin({ adminQuery: 'query' }),
|
|
|
+ ...adminLogin({ adminQuery: 'query', adminFetch: 'fetch' }),
|
|
|
...patentanalysis(['query', 'fetch', 'create', 'update']),
|
|
|
async onSubmit(values) {
|
|
|
if (values) {
|
|
@@ -72,22 +72,27 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async searchOther() {
|
|
|
- let res = await this.adminQuery({ code: 'JLKQadmin' });
|
|
|
- if (this.$checkRes(res)) this.$set(this, `adminInfo`, res.data[0]);
|
|
|
- let data = {
|
|
|
- user_id: this.user._id,
|
|
|
- user_name: this.user.name,
|
|
|
- admin_id: this.adminInfo.id,
|
|
|
- admin_name: this.adminInfo.name,
|
|
|
- apply_name: this.user.name,
|
|
|
- inventor: this.user.name,
|
|
|
- contact: this.user.name,
|
|
|
- phone: this.user.phone,
|
|
|
- email: this.user.email,
|
|
|
- questions: {},
|
|
|
- status: '0',
|
|
|
- };
|
|
|
- this.$set(this, `form`, data);
|
|
|
+ let res = await this.adminQuery({ code: this.user.code });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ let arr = await this.adminFetch(res.data[0].pid);
|
|
|
+ if (this.$checkRes(arr)) {
|
|
|
+ this.$set(this, `adminInfo`, arr.data);
|
|
|
+ let data = {
|
|
|
+ user_id: this.user._id,
|
|
|
+ user_name: this.user.name,
|
|
|
+ admin_id: this.adminInfo.id,
|
|
|
+ admin_name: this.adminInfo.name,
|
|
|
+ apply_name: this.user.name,
|
|
|
+ inventor: this.user.name,
|
|
|
+ contact: this.user.name,
|
|
|
+ phone: this.user.phone,
|
|
|
+ email: this.user.email,
|
|
|
+ questions: {},
|
|
|
+ status: '0',
|
|
|
+ };
|
|
|
+ this.$set(this, `form`, data);
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
computed: {
|