提交 980fbc66 authored 作者: FC's avatar FC

合并分支 'fc' 到 'master'

测试 查看合并请求 !1
...@@ -2,9 +2,22 @@ ...@@ -2,9 +2,22 @@
<!-- <van-calendar v-model:show="show" @confirm="onConfirm" :default-date="defaultDate" :min-date="minDate" <!-- <van-calendar v-model:show="show" @confirm="onConfirm" :default-date="defaultDate" :min-date="minDate"
:show-confirm="false" color="rgb(99, 142, 255)" /> --> :show-confirm="false" color="rgb(99, 142, 255)" /> -->
<!-- <van-cell is-link @click="showPopup" position="top">展示弹出层</van-cell> --> <!-- <van-cell is-link @click="showPopup" position="top">展示弹出层</van-cell> -->
<van-popup v-model:show='show' round position="bottom" :style="{ width: '100%', height: '40%' }"> <van-popup
<van-datetime-picker v-model="currentDate" type="year-month" title="选择年月" :min-date="minDate" :max-date="maxDate" v-model:show="show"
:formatter="formatter" @cancel="dateCancel" @confirm="onConfirm" /> round
position="bottom"
:style="{ width: '100%', height: '40%' }"
>
<van-datetime-picker
v-model="currentDate"
type="year-month"
title="选择年月"
:min-date="minDate"
:max-date="maxDate"
:formatter="formatter"
@cancel="dateCancel"
@confirm="onConfirm"
/>
</van-popup> </van-popup>
<!-- <van-loading size="64px" vertical style="position: absolute" v-show="flag1"--> <!-- <van-loading size="64px" vertical style="position: absolute" v-show="flag1"-->
<!-- >加载中...</van-loading--> <!-- >加载中...</van-loading-->
...@@ -14,10 +27,19 @@ ...@@ -14,10 +27,19 @@
<span class="date" @click="show = true">{{ showDate }}</span> <span class="date" @click="show = true">{{ showDate }}</span>
<!-- <span class="border">|</span> --> <!-- <span class="border">|</span> -->
<!-- <span class="day" @click="show = true">{{ $filters.showDay(dayNum) }}</span> --> <!-- <span class="day" @click="show = true">{{ $filters.showDay(dayNum) }}</span> -->
<img @click="show = true" class="calendar-btn" src="@/assets/images/calendar.png" /> <img
@click="show = true"
class="calendar-btn"
src="@/assets/images/calendar.png"
/>
</div> </div>
<conf-list v-show="list.length > 0" :list="list" /> <conf-list v-show="list.length > 0" :list="list" />
<van-empty v-show="noDataFlag && !permission" class="noConf" image="network" description="暂无会议" /> <van-empty
v-show="noDataFlag && !permission"
class="noConf"
image="network"
description="暂无会议"
/>
<van-empty image="error" v-if="permission" class="noConf" :description="tishi" /> <van-empty image="error" v-if="permission" class="noConf" :description="tishi" />
<div v-if="permission" class="shiBtn" @click="downData">点击刷新</div> <div v-if="permission" class="shiBtn" @click="downData">点击刷新</div>
</div> </div>
...@@ -28,6 +50,7 @@ import { Toast } from 'vant' ...@@ -28,6 +50,7 @@ import { Toast } from 'vant'
import confList from '@/components/conf-list/index.vue' import confList from '@/components/conf-list/index.vue'
import topNav from '@/components/top-nav/index.vue' import topNav from '@/components/top-nav/index.vue'
import moment from 'moment' import moment from 'moment'
import dd from 'gdt-jsapi' import dd from 'gdt-jsapi'
import { findProcessByDate, LoginIn } from '@/utils/api' import { findProcessByDate, LoginIn } from '@/utils/api'
...@@ -87,22 +110,24 @@ export default { ...@@ -87,22 +110,24 @@ export default {
watch: { watch: {
show(newVal) { show(newVal) {
if (newVal) { if (newVal) {
this.currentDate = this.$store.state.startDate != '' ? new Date(this.$store.state.startDate) : new Date() this.currentDate =
this.$store.state.startDate != ''
? new Date(this.$store.state.startDate)
: new Date()
} }
} }
}, },
methods: { methods: {
formatter(type, val) { formatter(type, val) {
if (type === 'year') { if (type === 'year') {
return `${val}年`; return `${val}年`
} else if (type === 'month') { } else if (type === 'month') {
return `${val}月`; return `${val}月`
} }
return val; return val
}, },
dateCancel() { dateCancel() {
this.show = false this.show = false
}, },
downData() { downData() {
...@@ -142,7 +167,7 @@ export default { ...@@ -142,7 +167,7 @@ export default {
this.unfold = !this.unfold this.unfold = !this.unfold
}, },
onConfirm(date) { onConfirm(date) {
console.log(date); console.log(date)
// let dayNum = date.getDay() // let dayNum = date.getDay()
// let startDate = // let startDate =
// `${1900 + date.getYear()}-${date.getMonth() + 1}-${date.getDate()}` + // `${1900 + date.getYear()}-${date.getMonth() + 1}-${date.getDate()}` +
...@@ -150,10 +175,11 @@ export default { ...@@ -150,10 +175,11 @@ export default {
// '00:00:00' // '00:00:00'
let year = date.getFullYear() let year = date.getFullYear()
let month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 let month =
date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
let startDate = year + '-' + month let startDate = year + '-' + month
this.$store.commit('saveSelectDate', startDate) this.$store.commit('saveSelectDate', startDate)
console.log(startDate); console.log(startDate)
let params = { let params = {
startDate startDate
} }
...@@ -235,7 +261,7 @@ export default { ...@@ -235,7 +261,7 @@ export default {
// Toast.fail(res.data.data) // Toast.fail(res.data.data)
} }
}) })
.catch((err) => { }) .catch((err) => {})
this.showDate = this.$store.state.startDate this.showDate = this.$store.state.startDate
? `${timeArr2[0]}${timeArr2[1]}月` ? `${timeArr2[0]}${timeArr2[1]}月`
: `${timeArr[2]}${timeArr[0]}月` : `${timeArr[2]}${timeArr[0]}月`
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论