|
@@ -14,6 +14,7 @@ const { textname } = require('@frame/src/layout/test');
|
|
|
import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: personal } = createNamespacedHelpers('personal');
|
|
|
+const moment = require('moment');
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
@@ -80,7 +81,30 @@ export default {
|
|
|
textname: textname,
|
|
|
};
|
|
|
},
|
|
|
- async created() {},
|
|
|
+ async created() {
|
|
|
+ // 申请日-2020-11-09
|
|
|
+ // 加一年-2021-11-09
|
|
|
+ // console.log(moment('2021-11-07').isBetween('2021-08-09', '2021-11-09'));
|
|
|
+ let create_date = '2020-11-09';
|
|
|
+ // 取专利日期
|
|
|
+ const month = moment(create_date).format('MM-DD');
|
|
|
+ console.log(month + '月份');
|
|
|
+ // // 取得当前年份
|
|
|
+ const nowYear = moment('2020').format('YYYY');
|
|
|
+ console.log(nowYear + '当前年份');
|
|
|
+ // // 当前年份+一年
|
|
|
+ const afterYear = moment('2020').add(1, 'year').format('YYYY');
|
|
|
+ console.log(afterYear + '当前年份+1');
|
|
|
+ // // 开始时间(先组合日期,减去三个月)
|
|
|
+ const nowDate = afterYear + '-' + month;
|
|
|
+ const start = moment(nowDate).subtract(3, 'months').format('YYYY-MM-DD');
|
|
|
+ console.log(start + '开始时间');
|
|
|
+ // 结束时间
|
|
|
+ const end = afterYear + '-' + month;
|
|
|
+ console.log(end + '结束时间');
|
|
|
+ const r = moment().isBetween(start, end, null, '[]');
|
|
|
+ console.log(r);
|
|
|
+ },
|
|
|
methods: {
|
|
|
...personal(['create', 'query']),
|
|
|
async search({ skip = 0, limit = this.limit, ...info } = {}) {
|