乡村相册
This commit is contained in:
@@ -29,11 +29,13 @@
|
||||
<div class="photo-title">
|
||||
<h2>照片列表</h2>
|
||||
<div class="right">
|
||||
<div class="right-item">
|
||||
<span>所有日期</span>
|
||||
<image src="./images/down.png" />
|
||||
</div>
|
||||
<div class="right-item">
|
||||
<picker mode="date" @change="onChange">
|
||||
<div class="right-item">
|
||||
<span>{{ date || '所有日期' }}</span>
|
||||
<image src="./images/down.png" />
|
||||
</div>
|
||||
</picker>
|
||||
<div class="right-item" style="margin-right: 0;">
|
||||
<span>所有干部</span>
|
||||
<image src="./images/down.png" />
|
||||
</div>
|
||||
@@ -70,6 +72,7 @@
|
||||
type: '',
|
||||
info: {},
|
||||
name: '',
|
||||
date: '',
|
||||
coverImg: '',
|
||||
imgList: [],
|
||||
hideStatus: false,
|
||||
@@ -113,6 +116,11 @@
|
||||
})
|
||||
},
|
||||
|
||||
onChange (e) {
|
||||
console.log(e)
|
||||
this.date = e.detail.value
|
||||
},
|
||||
|
||||
getInfo (id) {
|
||||
this.$http.post(`/api/appalbum/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
@@ -230,15 +238,11 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
& > div {
|
||||
.right-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-right: 32px;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
span {
|
||||
color: #666666;
|
||||
font-size: 26px;
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
<div class="info">
|
||||
<div class="info-tab">
|
||||
<div class="left">
|
||||
<span @click="currIndex = 0" :class="[currIndex === 0 ? 'active' : '']">全部 10</span>
|
||||
<span @click="currIndex = 1" :class="[currIndex === 1 ? 'active' : '']">已出勤 10</span>
|
||||
<span @click="currIndex = 2" :class="[currIndex === 2 ? 'active' : '']">未出勤 10</span>
|
||||
<span @click="currIndex = 0" :class="[currIndex === 0 ? 'active' : '']">全部 {{ attendanceCount.all || 0 }}</span>
|
||||
<span @click="currIndex = 1" :class="[currIndex === 1 ? 'active' : '']">已出勤 {{ attendanceCount.hasIn || 0 }}</span>
|
||||
<span @click="currIndex = 2" :class="[currIndex === 2 ? 'active' : '']">未出勤 {{ attendanceCount.hasOut || 0 }}</span>
|
||||
</div>
|
||||
<div class="right" @click="linkTo('./AttendanceSetting')">考勤设置</div>
|
||||
</div>
|
||||
@@ -55,10 +55,10 @@
|
||||
|
||||
data () {
|
||||
return {
|
||||
photoTotal: {},
|
||||
date: '',
|
||||
currIndex: 0,
|
||||
list: []
|
||||
list: [],
|
||||
attendanceCount: {}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
created () {
|
||||
this.date = this.$dayjs(new Date).format('YYYY年MM月DD')
|
||||
this.getList()
|
||||
this.getTotal()
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -98,13 +99,21 @@
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getList()
|
||||
this.getTotal()
|
||||
})
|
||||
},
|
||||
|
||||
getTotal () {
|
||||
this.$http.post(`/api/appattendancerecord/attendanceCount?queryTime=${this.date.replace(/年|月/g, '-')}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.attendanceCount = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getList () {
|
||||
this.$http.post(`/api/appattendancerecord/userphotosort?queryTime=${this.date}`).then(res => {
|
||||
this.$http.post(`/api/appattendancerecord/alldetail?queryTime=${this.date.replace(/年|月/g, '-')}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.list = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -193,6 +193,8 @@
|
||||
|
||||
onWorkPointChange (e) {
|
||||
this.form.openWorkPoint = e.detail.value ? '1' : '0'
|
||||
this.form.workPointDesc = {}
|
||||
this.address = {}
|
||||
},
|
||||
|
||||
save () {
|
||||
|
||||
@@ -180,6 +180,8 @@
|
||||
|
||||
onWorkPointChange (e) {
|
||||
this.form.openWorkPoint = e.detail.value ? '1' : '0'
|
||||
this.form.workPointDesc = {}
|
||||
this.address = {}
|
||||
},
|
||||
|
||||
save () {
|
||||
|
||||
@@ -5,17 +5,17 @@
|
||||
<h2>成员拍照排名</h2>
|
||||
</div>
|
||||
<div class="info-rank__wrapper">
|
||||
<div class="rank-item" v-for="(item, index) in 100" :key="index">
|
||||
<div class="rank-item" v-for="(item, index) in list" :key="index">
|
||||
<div class="rank-item__left">
|
||||
<image src="./images/rank1.png" v-if="index === 0" />
|
||||
<image src="./images/rank2.png" v-else-if="index === 1" />
|
||||
<image src="./images/rank3.png" v-else-if="index === 2" />
|
||||
<span v-else>{{ index + 1 > 9 ? index + 1 : '0' + (index + 1) }}</span>
|
||||
<h2>贡平娟</h2>
|
||||
<h2><AiOpenData v-if="item.name" type="userName" :openid="item.name"/></h2>
|
||||
</div>
|
||||
<div class="rank-item__right">
|
||||
<span>已上传</span>
|
||||
<i>10</i>
|
||||
<i>{{ item.num }}</i>
|
||||
<span>张</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -32,16 +32,27 @@
|
||||
|
||||
data () {
|
||||
return {
|
||||
|
||||
list: []
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
|
||||
onLoad (query) {
|
||||
this.getList(query.date)
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
getList (date) {
|
||||
this.$http.post(`/api/appattendancerecord/userphotosort?queryTime=${date}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.list = Object.keys(res.data).map(v => {
|
||||
return {
|
||||
name: v,
|
||||
num: res.data[v]
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -4,14 +4,32 @@
|
||||
<div class="form-group__item" hover-class="bg-hover" v-for="(item, index) in config" :key="index">
|
||||
<div class="left">
|
||||
<switch color="#1088F9" :checked="item.status === '1'" :disabled="item.editEnable === '0'" @change="e => onChange(e, index)" />
|
||||
<div class="left-right" @click="toInput(item)">
|
||||
</div>
|
||||
<div class="right" @click="toInput(item)" v-if="['6', '7'].indexOf(item.fieldType) === -1">
|
||||
<div class="right-left">
|
||||
<h2>{{ mapFieldLable(item.type) }}</h2>
|
||||
<p>{{ item.defaultValue || '' }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right" @click="toInput(item)">
|
||||
<u-icon name="arrow-right" color="#E1E2E3" size="#E1E2E3"></u-icon>
|
||||
</div>
|
||||
<picker mode="date" style="flex: 1;" v-if="item.fieldType === '7'" :value="item.defaultValue" @change="e => onDateChange(e, index)">
|
||||
<div class="right">
|
||||
<div class="right-left">
|
||||
<h2>{{ mapFieldLable(item.type) }}</h2>
|
||||
<p>{{ item.defaultValue || '' }}</p>
|
||||
</div>
|
||||
<u-icon name="arrow-right" color="#E1E2E3" size="#E1E2E3"></u-icon>
|
||||
</div>
|
||||
</picker>
|
||||
<picker mode="time" style="flex: 1;" v-if="item.fieldType === '6'" :value="item.defaultValue" @change="e => onDateChange(e, index)">
|
||||
<div class="right">
|
||||
<div class="right-left">
|
||||
<h2>{{ mapFieldLable(item.type) }}</h2>
|
||||
<p>{{ item.defaultValue || '' }}</p>
|
||||
</div>
|
||||
<u-icon name="arrow-right" color="#E1E2E3" size="#E1E2E3"></u-icon>
|
||||
</div>
|
||||
</picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-btn" hover-class="text-hover" @click="save">保存</div>
|
||||
@@ -47,6 +65,10 @@
|
||||
})
|
||||
},
|
||||
|
||||
onDateChange (e, index) {
|
||||
this.$set(this.config[index], 'defaultValue', e.detail.value)
|
||||
},
|
||||
|
||||
onChange (e, index) {
|
||||
this.$set(this.config[index], 'status', e.detail.value ? '1' : '0')
|
||||
},
|
||||
@@ -120,15 +142,15 @@
|
||||
border: none;
|
||||
}
|
||||
|
||||
.left {
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
margin-right: 10px;
|
||||
margin-left: 36px;
|
||||
|
||||
.left-right {
|
||||
.right-left {
|
||||
flex: 1;
|
||||
margin-left: 36px;
|
||||
|
||||
h2 {
|
||||
margin-bottom: 12px;
|
||||
@@ -142,6 +164,13 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="userinfo">
|
||||
<image src="https://pica.zhimg.com/v2-abed1a8c04700ba7d72b45195223e0ff_is.jpg?source=32738c0c" />
|
||||
<div class="right">
|
||||
<h2>吴小米</h2>
|
||||
<h2><AiOpenData v-if="userInfo.wxOpenUserId" type="userName" :openid="userInfo.wxOpenUserId"></AiOpenData></h2>
|
||||
<p>欢迎使用乡村相册</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -81,7 +81,8 @@
|
||||
countPhotoNo: '',
|
||||
countPhotographer: '',
|
||||
list: [],
|
||||
msgInfo: {}
|
||||
msgInfo: {},
|
||||
userInfo: {}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -89,6 +90,7 @@
|
||||
this.getCountPhotoNo()
|
||||
this.getAlbumList()
|
||||
this.getMsgList()
|
||||
this.getUserInfo()
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -98,6 +100,14 @@
|
||||
})
|
||||
},
|
||||
|
||||
getUserInfo () {
|
||||
this.$http.post('/api/user/info').then(res => {
|
||||
if (res.code === 0) {
|
||||
this.userInfo = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getCountPhotoNo () {
|
||||
this.$http.post('/api/appalbumphoto/countPhotoNo').then(res => {
|
||||
if (res.code === 0) {
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<span>拍照数</span>
|
||||
<div class="info-total__item--bottom">
|
||||
<h3>{{ photoTotal.allPhoto }}</h3>
|
||||
<i>人</i>
|
||||
<i>张</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -54,34 +54,34 @@
|
||||
<div class="info-work__wrapper">
|
||||
<div class="top">
|
||||
<div class="left">
|
||||
<h2>8</h2>
|
||||
<h2>{{ attendanceCount.hasIn || 0 }}</h2>
|
||||
<span>人已打卡</span>
|
||||
<i>共12人</i>
|
||||
<i>共{{ attendanceCount.all || 0 }}人</i>
|
||||
</div>
|
||||
<span>66.6%</span>
|
||||
<span>{{ rate }}%</span>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div style="width: 60%"></div>
|
||||
<div :style="{width: rate + '%'}"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-item info-rank">
|
||||
<div class="info-item__title">
|
||||
<h2>成员拍照排名</h2>
|
||||
<image src="../images/right.png" @click="linkTo('./PhotoRank')" />
|
||||
<image src="../images/right.png" @click="linkTo('./PhotoRank?date=' + date.replace(/年|月/g, '-'))" />
|
||||
</div>
|
||||
<div class="info-rank__wrapper">
|
||||
<div class="rank-item" v-for="(item, index) in 10" :key="index">
|
||||
<div class="rank-item" v-for="(item, index) in list" :key="index">
|
||||
<div class="rank-item__left">
|
||||
<image src="../images/rank1.png" v-if="index === 0" />
|
||||
<image src="../images/rank2.png" v-else-if="index === 1" />
|
||||
<image src="../images/rank3.png" v-else-if="index === 2" />
|
||||
<span v-else>{{ index + 1 > 9 ? index + 1 : '0' + (index + 1) }}</span>
|
||||
<h2>贡平娟</h2>
|
||||
<h2><AiOpenData v-if="item.name" type="userName" :openid="item.name"/></h2>
|
||||
</div>
|
||||
<div class="rank-item__right">
|
||||
<span>已上传</span>
|
||||
<i>10</i>
|
||||
<i>{{ item.num }}</i>
|
||||
<span>张</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -99,7 +99,8 @@
|
||||
return {
|
||||
photoTotal: {},
|
||||
date: '',
|
||||
list: []
|
||||
list: [],
|
||||
attendanceCount: {}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -118,30 +119,44 @@
|
||||
}
|
||||
|
||||
return ''
|
||||
},
|
||||
|
||||
rate () {
|
||||
if (!this.attendanceCount.all) {
|
||||
return '0'
|
||||
}
|
||||
|
||||
return (this.attendanceCount.hasIn / this.attendanceCount.all * 100).toFixed(2)
|
||||
}
|
||||
},
|
||||
|
||||
onLoad () {
|
||||
mounted () {
|
||||
this.date = this.$dayjs(new Date).format('YYYY年MM月DD')
|
||||
this.getPhotoTotal()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getPhotoTotal () {
|
||||
this.$http.post(`/api/appattendancerecord/punchclocksum?queryTime=${this.date}`).then(res => {
|
||||
this.$http.post(`/api/appattendancerecord/punchclocksum?queryTime=${this.date.replace(/年|月/g, '-')}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.photoTotal = res.data
|
||||
}
|
||||
})
|
||||
|
||||
this.$http.post(`/api/appattendancerecord/alldetail?queryTime=${this.date}`).then(res => {
|
||||
this.$http.post(`/api/appattendancerecord/attendanceCount?queryTime=${this.date.replace(/年|月/g, '-')}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.attendanceCount = res.data
|
||||
}
|
||||
})
|
||||
|
||||
this.$http.post(`/api/appattendancerecord/userphotosort?queryTime=${this.date}`).then(res => {
|
||||
this.$http.post(`/api/appattendancerecord/userphotosort?queryTime=${this.date.replace(/年|月/g, '-')}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.list = res.data
|
||||
this.list = Object.keys(res.data).map(v => {
|
||||
return {
|
||||
name: v,
|
||||
num: res.data[v]
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user