|
@@ -1,30 +1,49 @@
|
|
|
<template>
|
|
|
<div id="index">
|
|
|
- <admin-frame @search="search" :limit="limit" :total="total" :useNav="false">
|
|
|
+ <admin-frame @search="search" :limit="limit" :total="total" topType="2" :leftArrow="false" :rightArrow="false" :useNav="false">
|
|
|
<template v-slot:info>
|
|
|
- <list-1 :list="list" @detail="detail"></list-1>
|
|
|
+ <van-col :span="24" class="one">
|
|
|
+ <van-button type="info" size="small" @click="toSearch">查询条件</van-button>
|
|
|
+ </van-col>
|
|
|
+ <van-col :span="24" class="two">
|
|
|
+ <list-1 :list="list" @detail="detail"></list-1>
|
|
|
+ </van-col>
|
|
|
</template>
|
|
|
</admin-frame>
|
|
|
+ <van-dialog class="dialog" v-model="show" title="查询条件" :show-cancel-button="false" :show-confirm-button="false">
|
|
|
+ <search-1 :searchForm="searchForm" @toClose="toClose" @reseat="reseat" @onSubmit="onSubmit" @changeCreate="changeCreate"></search-1>
|
|
|
+ </van-dialog>
|
|
|
+ <van-calendar v-model="oneShow" @confirm="oneChange" :min-date="minDate" :max-date="maxDate" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import search1 from './parts/search-1.vue';
|
|
|
import list1 from './parts/list-1.vue';
|
|
|
import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: patentinfo } = createNamespacedHelpers('patentinfo');
|
|
|
+const moment = require('moment');
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
|
components: {
|
|
|
adminFrame,
|
|
|
list1,
|
|
|
+ search1,
|
|
|
},
|
|
|
data: function () {
|
|
|
return {
|
|
|
list: [],
|
|
|
limit: 5,
|
|
|
total: 0,
|
|
|
+ // 查询条件
|
|
|
+ show: false,
|
|
|
+ searchForm: {},
|
|
|
+ // 选择申请日
|
|
|
+ oneShow: false,
|
|
|
+ minDate: new Date(1900, 1, 1),
|
|
|
+ maxDate: new Date(2050, 1, 1),
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
@@ -43,6 +62,33 @@ export default {
|
|
|
detail(data) {
|
|
|
this.$router.push({ path: '/market/patentInfo/detail', query: { id: data.id } });
|
|
|
},
|
|
|
+ // 查询
|
|
|
+ toSearch() {
|
|
|
+ this.show = true;
|
|
|
+ },
|
|
|
+ // 取消查询
|
|
|
+ toClose() {
|
|
|
+ this.show = false;
|
|
|
+ },
|
|
|
+ // 重置条件
|
|
|
+ reseat() {
|
|
|
+ this.searchForm = {};
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ // 提交查询
|
|
|
+ onSubmit({ data }) {
|
|
|
+ this.search(data);
|
|
|
+ this.show = false;
|
|
|
+ },
|
|
|
+ changeCreate() {
|
|
|
+ this.oneShow = true;
|
|
|
+ },
|
|
|
+ // 选择申请日
|
|
|
+ oneChange(value) {
|
|
|
+ let date = moment(value).format('YYYY-MM-DD');
|
|
|
+ this.$set(this.searchForm, `create_date`, date);
|
|
|
+ this.oneShow = false;
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|
|
@@ -60,4 +106,16 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style lang="less" scoped></style>
|
|
|
+<style lang="less" scoped>
|
|
|
+.one {
|
|
|
+ background-color: #fff;
|
|
|
+ padding: 10px 0;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+.dialog {
|
|
|
+ /deep/.van-dialog__content {
|
|
|
+ // height: 300px;
|
|
|
+ // overflow-y: auto;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|