Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -32,30 +32,30 @@ instance.interceptors.request.use(config => {
|
||||
|
||||
instance.interceptors.response.use(res => {
|
||||
if (res.data) {
|
||||
if (res.data.code) {
|
||||
if (res.data.code == 0) {
|
||||
return res.data
|
||||
} else if (res.data.code === 1) {
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
duration: 2000,
|
||||
icon: 'none'
|
||||
})
|
||||
|
||||
return res.data
|
||||
} else if (res.data.code == 401) {
|
||||
store.commit("logout");
|
||||
uni.navigateTo({url: "/pages/login"})
|
||||
} else {
|
||||
console.error(res.data.msg || "请求失败!")
|
||||
return Promise.reject(res.data.msg)
|
||||
}
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
if (res.data.access_token) {
|
||||
return res.data
|
||||
}
|
||||
if (res.data.code == 0) {
|
||||
return res.data
|
||||
} else if (res.data.code === 1) {
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
duration: 2000,
|
||||
icon: 'none'
|
||||
})
|
||||
|
||||
return res.data
|
||||
} else if (res.data.code == 401) {
|
||||
store.commit("logout");
|
||||
uni.navigateTo({url: "/pages/login"})
|
||||
} else {
|
||||
console.error(res.data.msg || "请求失败!")
|
||||
return Promise.reject(res.data.msg)
|
||||
}
|
||||
} else {
|
||||
console.error("服务器异常,请联系管理员!")
|
||||
return Promise.reject(res.data)
|
||||
return res.data
|
||||
}
|
||||
}, err => {
|
||||
uni.hideLoading()
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<span>照片来源</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<span>{{ photoSource == 1 ? '仅限乡村相册拍摄' : '不限' }}</span>
|
||||
<span>{{ photoSource == 1 ? '仅限工作相册拍摄' : '不限' }}</span>
|
||||
<image src="./images/right.png" v-if="!id || isAdmin" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
export default {
|
||||
name: 'AlbumDetail',
|
||||
appName: '乡村相册',
|
||||
appName: '工作相册',
|
||||
|
||||
data () {
|
||||
return {
|
||||
@@ -139,6 +139,8 @@
|
||||
uni.hideLoading()
|
||||
if (res.userList && res.userList) {
|
||||
this.userId = res.userList[0].openUserId
|
||||
} else {
|
||||
this.$u.toast('该用户未授权')
|
||||
}
|
||||
|
||||
this.isMore = false
|
||||
|
||||
@@ -10,7 +10,7 @@ import { mapActions } from "vuex"
|
||||
|
||||
export default {
|
||||
name: 'AppCountryAlbum',
|
||||
appName: '乡村相册',
|
||||
appName: '工作相册',
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -61,32 +61,26 @@
|
||||
all: '1',
|
||||
hasIn: '',
|
||||
hasOut: '',
|
||||
yyyyMM: '',
|
||||
DD: '',
|
||||
isShow: false,
|
||||
isAdmin: false
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
yyyyMM () {
|
||||
if (this.date) {
|
||||
return this.date.substr(0, 8)
|
||||
}
|
||||
|
||||
return ''
|
||||
},
|
||||
|
||||
DD () {
|
||||
if (this.date) {
|
||||
return this.date.substr(8)
|
||||
}
|
||||
|
||||
return ''
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
onLoad (query) {
|
||||
this.isAdmin = !!this.$store.state.user.adminAuthType
|
||||
this.date = this.$dayjs(new Date).format('YYYY年MM月DD')
|
||||
|
||||
if (query.date) {
|
||||
this.date = this.$dayjs(query.date).format('YYYY年MM月DD')
|
||||
this.yyyyMM = this.$dayjs(query.date).format('YYYY年MM月')
|
||||
this.DD = this.$dayjs(query.date).format('DD')
|
||||
} else {
|
||||
this.date = this.$dayjs(new Date).format('YYYY年MM月DD')
|
||||
this.yyyyMM = this.$dayjs(new Date).format('YYYY年MM月')
|
||||
this.DD = this.$dayjs(new Date).format('DD')
|
||||
}
|
||||
|
||||
this.getList()
|
||||
this.getTotal()
|
||||
},
|
||||
@@ -119,7 +113,10 @@
|
||||
},
|
||||
|
||||
onDateChange (e) {
|
||||
this.date = `${e.year}年${e.month}月${e.day}`
|
||||
this.date = `${e.year}年${e.month > 9 ? e.month : '0' + e.month}月${e.day > 9 ? e.day : '0' + e.day}`
|
||||
|
||||
this.yyyyMM = `${e.year}年${e.month > 9 ? e.month : '0' + e.month}月`
|
||||
this.DD = e.day > 9 ? e.day : '0' + e.day
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getList()
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<script>
|
||||
export default {
|
||||
name: 'Message',
|
||||
appName: '乡村相册',
|
||||
appName: '工作相册',
|
||||
|
||||
data () {
|
||||
return {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
<div class="cell-item" hover-class="bg-hover" @click="currIndex = 1">
|
||||
<div class="cell-item__left">
|
||||
<h2>仅限乡村相册拍摄</h2>
|
||||
<h2>仅限工作相册拍摄</h2>
|
||||
</div>
|
||||
<div class="cell-item__check" :class="[currIndex === 1 ? 'active' : '']"></div>
|
||||
</div>
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class="tips">
|
||||
选择不限后:
|
||||
1. 成员可以同步手机原相机、数码相机等拍摄的照片和视频;
|
||||
2. 仅乡村相册拍摄的照片或者视频会计入考勤,保证考勤统计真实性。
|
||||
2. 仅工作相册拍摄的照片或者视频会计入考勤,保证考勤统计真实性。
|
||||
</div>
|
||||
<div class="form-btn" hover-class="text-hover" @click="save">保存</div>
|
||||
</div>
|
||||
|
||||
@@ -69,11 +69,11 @@
|
||||
<scroll-view scroll-y class="album-list__wrapper">
|
||||
<div
|
||||
class="item"
|
||||
@click="currIndex = index"
|
||||
@click="albumIndex = index"
|
||||
v-for="(item, index) in albumList"
|
||||
:key="index"
|
||||
:class="[currIndex === index ? 'active' : '']">
|
||||
<image class="checked" v-if="currIndex === index" src="./images/xuanzhong.png" />
|
||||
:class="[albumIndex === index ? 'active' : '']">
|
||||
<image class="checked" v-if="albumIndex === index" src="./images/xuanzhong.png" />
|
||||
<image class="icon" v-if="!item.lastPhotoUrl" src="./images/icon.png" />
|
||||
<image class="img" v-if="item.lastPhotoUrl" :src="item.lastPhotoUrl" mode="aspectFill" />
|
||||
<div class="item-bottom">
|
||||
@@ -134,6 +134,7 @@
|
||||
waterSrc: '',
|
||||
albumId: '1',
|
||||
albumName: '',
|
||||
albumIndex: 0,
|
||||
watermarkList: [],
|
||||
isShowAlbum: false,
|
||||
albumList: [],
|
||||
@@ -314,8 +315,8 @@
|
||||
},
|
||||
|
||||
onConfirm () {
|
||||
this.albumId = this.albumList[this.currIndex].value
|
||||
this.albumName = this.albumList[this.currIndex].label
|
||||
this.albumId = this.albumList[this.albumIndex].value
|
||||
this.albumName = this.albumList[this.albumIndex].label
|
||||
|
||||
this.isShowAlbum = false
|
||||
},
|
||||
@@ -341,7 +342,12 @@
|
||||
}
|
||||
})
|
||||
|
||||
this.albumName = this.albumList.filter(v => v.value === this.albumId)[0].label
|
||||
this.albumName = this.albumList.filter((v, index) => {
|
||||
if (v.value === this.albumId) {
|
||||
this.albumIndex = index
|
||||
}
|
||||
return v.value === this.albumId
|
||||
})[0].label
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<image src="https://pica.zhimg.com/v2-abed1a8c04700ba7d72b45195223e0ff_is.jpg?source=32738c0c" />
|
||||
<div class="right">
|
||||
<h2><AiOpenData v-if="user.wxOpenUserId" type="userName" :openid="user.wxOpenUserId"></AiOpenData></h2>
|
||||
<p>欢迎使用乡村相册</p>
|
||||
<p>欢迎使用工作相册</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="album-total">
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<div class="info-item info-work">
|
||||
<div class="info-item__title">
|
||||
<h2>考勤统计</h2>
|
||||
<image src="../images/right.png" @click="linkTo('./Attendance')" />
|
||||
<image src="../images/right.png" @click="linkTo('./Attendance?date=' + date.replace(/年|月/g, '-'))" />
|
||||
</div>
|
||||
<div class="info-work__wrapper">
|
||||
<div class="top">
|
||||
@@ -102,27 +102,13 @@
|
||||
list: [],
|
||||
isMore: false,
|
||||
isShow: false,
|
||||
yyyyMM: '',
|
||||
DD: '',
|
||||
attendanceCount: {}
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
yyyyMM () {
|
||||
if (this.date) {
|
||||
return this.date.substr(0, 8)
|
||||
}
|
||||
|
||||
return ''
|
||||
},
|
||||
|
||||
DD () {
|
||||
if (this.date) {
|
||||
return this.date.substr(8)
|
||||
}
|
||||
|
||||
return ''
|
||||
},
|
||||
|
||||
rate () {
|
||||
if (!this.attendanceCount.all) {
|
||||
return '0'
|
||||
@@ -134,6 +120,8 @@
|
||||
|
||||
mounted () {
|
||||
this.date = this.$dayjs(new Date).format('YYYY年MM月DD')
|
||||
this.yyyyMM = this.$dayjs(new Date).format('YYYY年MM月')
|
||||
this.DD = this.$dayjs(new Date).format('DD')
|
||||
this.getPhotoTotal()
|
||||
},
|
||||
|
||||
@@ -166,7 +154,10 @@
|
||||
},
|
||||
|
||||
onDateChange (e) {
|
||||
this.date = `${e.year}年${e.month}月${e.day}`
|
||||
this.date = `${e.year}年${e.month > 9 ? e.month : '0' + e.month}月${e.day > 9 ? e.day : '0' + e.day}`
|
||||
|
||||
this.yyyyMM = `${e.year}年${e.month > 9 ? e.month : '0' + e.month}月`
|
||||
this.DD = e.day > 9 ? e.day : '0' + e.day
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getPhotoTotal()
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
export default {
|
||||
name: 'Tabbar',
|
||||
appName: '乡村相册',
|
||||
appName: '工作相册',
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
<template>
|
||||
<div class="Daily" ref="report">
|
||||
<div class="top" @click="linkTo">
|
||||
<div class="top" @click="linkTo" v-if="isShowUnit">
|
||||
<span>{{ unit }}</span>
|
||||
</div>
|
||||
<div class="body" @click="linkTo">
|
||||
<h2>{{ title }}</h2>
|
||||
<div class="subtitle">{{ subTitle }}</div>
|
||||
<h2 v-if="isShowTitle">{{ title }}</h2>
|
||||
<div class="subtitle" v-if="subTitle">{{ subTitle }}</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="bottom-item__wrapper">
|
||||
<div class="bottom-item" @click="linkTo">
|
||||
<div class="left">
|
||||
<div class="left" v-if="isShowReporter">
|
||||
<label>汇报人:</label>
|
||||
<span>{{ reporter }}</span>
|
||||
</div>
|
||||
<i>{{ date }}</i>
|
||||
<i v-if="isShowDate">{{ date }}</i>
|
||||
</div>
|
||||
<div class="bottom-item bottom-item__remark" @click="linkTo">
|
||||
<div class="bottom-item bottom-item__remark" @click="linkTo" v-if="isShowRemark">
|
||||
<label>总结:</label>
|
||||
<span class="">{{ remark }}</span>
|
||||
</div>
|
||||
|
||||
@@ -148,6 +148,7 @@
|
||||
let formData = new FormData()
|
||||
formData.append('file', res.tempFiles[0])
|
||||
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
|
||||
console.log(res)
|
||||
if (res.code === 0) {
|
||||
this.richList.push({
|
||||
type: 'img',
|
||||
|
||||
Reference in New Issue
Block a user