guhongwei 3 년 전
부모
커밋
fd38d90279
3개의 변경된 파일37개의 추가작업 그리고 4개의 파일을 삭제
  1. 29 1
      src/layout/patentInfo/search-1.vue
  2. 6 2
      src/layout/patentInfo/speed-1.vue
  3. 2 1
      src/views/patent/admin/patent/index.vue

+ 29 - 1
src/layout/patentInfo/search-1.vue

@@ -92,6 +92,13 @@
               @click="changeCreate('empower_date@end')"
               @click="changeCreate('empower_date@end')"
             />
             />
             <van-field v-model="searchForm.create_number" name="create_number" label="申请号" placeholder="请输入申请号" />
             <van-field v-model="searchForm.create_number" name="create_number" label="申请号" placeholder="请输入申请号" />
+
+            <van-field readonly clickable name="所属管理机构" :value="searchForm.pid" style="display: none" />
+            <van-field readonly clickable name="所属管理机构" :value="searchForm.pname" label="所属管理机构" placeholder="点击选择" @click="thrShow = true" />
+            <van-popup v-model="thrShow" position="bottom">
+              <van-picker show-toolbar :columns="adminList" value-key="name" @confirm="pidFim" @cancel="thrShow = false" />
+            </van-popup>
+
             <van-calendar v-model="oneShow" @confirm="oneChange" position="right" :min-date="minDate" :max-date="maxDate" />
             <van-calendar v-model="oneShow" @confirm="oneChange" position="right" :min-date="minDate" :max-date="maxDate" />
             <div class="btn">
             <div class="btn">
               <van-button type="info" size="small" @click="reseat">重置条件</van-button>
               <van-button type="info" size="small" @click="reseat">重置条件</van-button>
@@ -107,6 +114,7 @@
 <script>
 <script>
 const { apply_personal } = require('@frame/src/layout/applyCom');
 const { apply_personal } = require('@frame/src/layout/applyCom');
 import { mapState, createNamespacedHelpers } from 'vuex';
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: adminLogin } = createNamespacedHelpers('adminLogin');
 const moment = require('moment');
 const moment = require('moment');
 export default {
 export default {
   name: 'search-1',
   name: 'search-1',
@@ -124,10 +132,16 @@ export default {
       // 申请人单位
       // 申请人单位
       twoShow: false,
       twoShow: false,
       apply_personalList: apply_personal,
       apply_personalList: apply_personal,
+      // 所属管理机构
+      thrShow: false,
+      adminList: [],
     };
     };
   },
   },
-  created() {},
+  created() {
+    this.searchOther();
+  },
   methods: {
   methods: {
+    ...adminLogin(['query']),
     reseat() {
     reseat() {
       this.$emit('reseat');
       this.$emit('reseat');
     },
     },
@@ -148,6 +162,20 @@ export default {
       this.$set(this.searchForm, `apply_personal`, value.name);
       this.$set(this.searchForm, `apply_personal`, value.name);
       this.twoShow = false;
       this.twoShow = false;
     },
     },
+    // 选择所属管理机构
+    pidFim(value) {
+      this.$set(this.searchForm, `pid`, value.id);
+      this.$set(this.searchForm, `pname`, value.name);
+
+      this.thrShow = false;
+    },
+    // 查询其他信息
+    async searchOther() {
+      let res = await this.query({ role: '1' });
+      if (this.$checkRes(res)) {
+        this.$set(this, `adminList`, res.data);
+      }
+    },
   },
   },
   computed: {
   computed: {
     ...mapState(['user']),
     ...mapState(['user']),

+ 6 - 2
src/layout/patentInfo/speed-1.vue

@@ -11,11 +11,11 @@
               下载进度:<span>{{ item.progress || '暂无' }}</span>
               下载进度:<span>{{ item.progress || '暂无' }}</span>
             </van-col>
             </van-col>
             <van-col span="24" class="otherInfo">
             <van-col span="24" class="otherInfo">
-              创建时间:<span>{{ item.create_time || '暂无' }}</span>
+              创建时间:<span>{{ getDate(item.meta) || '暂无' }}</span>
             </van-col>
             </van-col>
           </van-col>
           </van-col>
           <van-col span="24" class="btn">
           <van-col span="24" class="btn">
-            <van-button type="info" size="small" @click="download(item.uri)">下载文件</van-button>
+            <van-button type="info" size="small" @click="download(item.uri)" v-if="item.progress == '100'">下载文件</van-button>
           </van-col>
           </van-col>
         </van-col>
         </van-col>
       </van-col>
       </van-col>
@@ -42,6 +42,10 @@ export default {
         this.$toast({ type: `fail`, message: `未上传文件` });
         this.$toast({ type: `fail`, message: `未上传文件` });
       }
       }
     },
     },
+    getDate(data) {
+      let newDate = moment(data.createdAt).format('YYYY-MM-DD hh:mm:ss');
+      if (newDate) return newDate;
+    },
   },
   },
   computed: {
   computed: {
     ...mapState(['user']),
     ...mapState(['user']),

+ 2 - 1
src/views/patent/admin/patent/index.vue

@@ -94,7 +94,8 @@ export default {
     },
     },
     // 下载专利
     // 下载专利
     async downPatent() {
     async downPatent() {
-      let res = await this.toExport({ ...this.searchForm, user: this.user.id });
+      let res = await this.toExport({ query: this.searchForm, user: this.user.id });
+      console.log(res);
       if (this.$checkRes(res)) {
       if (this.$checkRes(res)) {
         this.$toast({ type: `success`, message: `操作完成` });
         this.$toast({ type: `success`, message: `操作完成` });
       }
       }