This commit is contained in:
yanran200730
2022-05-24 11:14:29 +08:00
parent 72d814c913
commit e01eb4fe28
15 changed files with 168 additions and 48 deletions

View File

@@ -13,6 +13,9 @@ instance.interceptors.request.use(config => {
if (/AppCountryAlbum/.test(location.pathname)) {
config.url = config.url.replace(/(app|auth|admin)\//, "api/")
}
if (sessionStorage.getItem("prj") == "saas") {
config.url = config.url.replace(/(app|auth|admin)\//, "api/")
}
if (!config.withoutToken && store.state.token) {
config.headers["Authorization"] = store.state.token
}

View File

@@ -26,7 +26,7 @@ export default {
<style lang="scss" scoped>
.emptyWrap {
width: 100vw;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;

View File

@@ -36,7 +36,7 @@
}
},
"/online": {
"target": "http://192.168.1.34:19898",
"target": "https://test87xcxc.cunwuyun.cn",
"changeOrigin": true,
"pathRewrite": {
"^/online": "/"
@@ -53,7 +53,9 @@
"target": "https://apis.map.qq.com",
"changeOrigin": true,
"secure": false,
"ws": true
"pathRewrite": {
"^/online/tmap/": "/"
}
}
}
},

View File

@@ -33,13 +33,13 @@
<span>工作时长</span>
</div>
<div class="table-body">
<div class="table-row" v-for="(item, index) in 10" :key="index">
<div class="table-row" v-for="(item, index) in list" :key="index">
<div class="table-row__left">
<h2>陶白白</h2>
<p>已上传1</p>
<h2><AiOpenData v-if="item.userId" type="userName" :openid="item.userId"></AiOpenData></h2>
<p>已上传{{ item.photoCount || 0 }}</p>
</div>
<span>8:30-6:00</span>
<span>10.5小时</span>
<span>{{ item.workInTime }}-{{ item.workOutTime || '' }}</span>
<span>{{ item.workHours || 0 }}小时</span>
</div>
</div>
</div>
@@ -114,6 +114,13 @@
getList () {
this.$http.post(`/api/appattendancerecord/alldetail?queryTime=${this.date.replace(/年|月/g, '-')}`).then(res => {
if (res.code === 0) {
this.list = res.data.map(v => {
return {
...v,
workInTime: v.workInTime ? v.workInTime.split(' ')[1] : '',
workOutTime: v.workOutTime ? v.workOutTime.split(' ')[1] : ''
}
})
}
})
}

View File

@@ -6,10 +6,10 @@
<image src="./images/fanhui.png" />
<span>返回</span>
</div>
<div class="item" @click="back">
<!-- <div class="item" @click="share">
<image src="./images/fenxiang.png" />
<span>分享</span>
</div>
</div> -->
<div class="item" @click="remove">
<image src="./images/shanchu.png" />
<span>删除</span>
@@ -19,6 +19,7 @@
</template>
<script>
import {mapActions} from 'vuex'
export default {
name: 'Photo',
@@ -37,12 +38,43 @@
},
methods: {
...mapActions(['wxInvoke']),
back () {
uni.navigateBack({
delta: 1
})
},
share () {
uni.showActionSheet({
itemList: ['分享', '微信分享'],
success: data => {
if (data.tapIndex === 0 || data.tapIndex === 1) {
if (data.tapIndex === 0) {
this.wxInvoke(['shareAppMessage', {
title: this.info.title,
desc: this.info.tableExplain,
link: this.linkUrl,
imgUrl: this.info.headPicture
}, () => {
this.isShow = false
}])
} else {
this.wxInvoke(['shareWechatMessage', {
title: this.info.title,
desc: this.info.tableExplain,
link: this.linkUrl,
imgUrl: this.info.headPicture
}, () => {
this.isShow = false
}])
}
}
}
})
},
remove () {
this.$confirm('确定删除该数据?').then(() => {
this.$http.post(`/api/appalbumphoto/delete?ids=${this.id}`).then(res => {

View File

@@ -19,6 +19,7 @@
<span></span>
</div>
</div>
<AiEmpty v-if="!list.length"></AiEmpty>
</div>
</div>
</div>

View File

@@ -58,6 +58,7 @@
import Watermark6 from './components/watermark/Watermark6'
import Watermark7 from './components/watermark/Watermark7'
import Watermark8 from './components/watermark/Watermark8'
import { mapActions } from 'vuex'
export default {
name: 'Watermark',
@@ -115,9 +116,17 @@
this.height = uni.getSystemInfoSync().windowHeight
this.getWatermarkList()
this.getLocation()
this.$http.post('/api/appdvcpconfig/apiForward', 'https://apis.map.qq.com/ws/geocoder/v1/?location=39.984154,116.307490&key=3RZBZ-LZUCF-CT6J5-NWKZH-FCWOQ-UUFKY&get_poi=1').then(res => {
console.log(res)
})
},
methods: {
...mapActions(['injectJWeixin']),
save () {
this.isHide = true
this.$loading()
@@ -161,6 +170,27 @@
})
},
getLocation () {
this.injectJWeixin(['getLocation']).then(res => {
console.log(res)
wx.getLocation({
type: 'wgs84',
success: function (res) {
var lat = res.latitude
var lng = res.longitude
console.log(lat, lng)
this.$http.post('/api/appdvcpconfig/apiForward',
`https://apis.map.qq.com/ws/geocoder/v1/?location=${lat},${lng}&key=3RZBZ-LZUCF-CT6J5-NWKZH-FCWOQ-UUFKY&get_poi=1`).then(res => {
console.log(res)
})
},
error: res => {
console.log(res)
}
})
})
},
dataURLtoFile (dataurl, filename) {
let arr = dataurl.split(',')
let mime = arr[0].match(/:(.*?);/)[1]

View File

@@ -84,7 +84,7 @@
save () {
for (let i = 0; i < this.config.length; i ++) {
if ((this.config[i].fieldType === '0' || this.config[i].fieldType === '1') && !this.config[i].defaultValue && this.config[i].status === '1') {
if (['2', '3', '4', '5'].indexOf(this.config[i].fieldType) === -1 && !this.config[i].defaultValue && this.config[i].status === '1') {
return this.$u.toast(`请输入${this.mapFieldLable(this.config[i].type)}`)
}
}

View File

@@ -85,6 +85,7 @@
<span></span>
</div>
</div>
<AiEmpty v-if="!list.length && isMore"></AiEmpty>
</div>
</div>
</div>
@@ -100,6 +101,7 @@
photoTotal: {},
date: '',
list: [],
isMore: false,
attendanceCount: {}
}
},
@@ -157,6 +159,8 @@
num: res.data[v]
}
})
this.isMore = true
}
})
},

View File

@@ -85,7 +85,7 @@
this.week = new Date().getDay()
}, 1000)
this.getLocation()
// this.getLocation()
uni.$on('change', e => {
this.configList = e
@@ -98,32 +98,21 @@
methods: {
...mapActions(['injectJWeixin']),
getLocation () {
this.injectJWeixin(['getLocation']).then(res => {
console.log(res)
wx.getLocation({
type: 'wgs84',
success: function (res) {
var lat = res.latitude
var lng = res.longitude
console.log(lat, lng)
},
error: res => {
console.log(res)
var latitude = res.latitude
var longitude = res.longitude
var speed = res.speed
var accuracy = res.accuracy
}
})
})
// uni.getLocation({
// type: 'wgs84',
// success: res => {
// console.log(res)
// this.$http.get('https://apis.map.qq.com/ws/geocoder/v1/?location=39.984154,116.307490&key=3RZBZ-LZUCF-CT6J5-NWKZH-FCWOQ-UUFKY&get_poi=1').then(res => {
// console.log(res)
// })
// },
// fail: error => {
// console.log(error)
// }
// })
},
linkTo (url) {

View File

@@ -9,7 +9,7 @@
<span v-if="isShowWeather">{{ weather }}</span>
</div>
<p v-if="isShowDate">{{ date }} {{ weekCn }}</p>
<div class="text" v-if="isShowMatters">
<div class="text" v-if="isShowMatters && matters">
<span>{{ matters }}</span>
<image src="./../../images/quotes.png" />
</div>
@@ -76,6 +76,7 @@
const title = v.filter(v => v.type === '5')[0]
const name = v.filter(v => v.type === '6')[0]
const matters = v.filter(v => v.type === '7')[0]
this.isShowWeather = weather.status === '1'
this.isShowDate = date.status === '1'
this.isShowTitle = title.status === '1'
@@ -84,7 +85,10 @@
this.isShowMatters = matters.status === '1'
this.title = title.defaultValue || ''
this.name = name.defaultValue || ''
this.date = date.defaultValue || this.$dayjs(new Date).format('YYYY-MM-DD')
this.time = time.defaultValue || this.$dayjs().format('HH:mm')
this.matters = matters.defaultValue || ''
this.week = date.defaultValue ? this.$dayjs(date.defaultValue).day() : new Date().getDay()
}
},
deep: true
@@ -92,15 +96,23 @@
},
created () {
this.configList = JSON.parse(JSON.stringify(this.config))
this.date = this.$dayjs(new Date).format('YYYY-MM-DD')
this.time = this.$dayjs().format('HH:mm')
this.configList = JSON.parse(JSON.stringify(this.config)).map(v => {
if (v.fieldType === '7') {
v.defaultValue = this.$dayjs().format('YYYY-MM-DD')
this.week = new Date().getDay()
}
if (v.fieldType === '6') {
v.defaultValue = this.$dayjs().format('HH:mm')
}
this.timer = setInterval(() => {
this.date = this.$dayjs().format('YYYY-MM-DD')
this.time = this.$dayjs().format('HH:mm')
this.week = new Date().getDay()
}, 1000)
return v
})
// this.timer = setInterval(() => {
// this.date = this.$dayjs().format('YYYY-MM-DD')
// this.time = this.$dayjs().format('HH:mm')
// this.week = new Date().getDay()
// }, 1000)
uni.$on('change', e => {
this.configList = e
@@ -142,7 +154,7 @@
image {
position: absolute;
bottom: 14px;
top: -6px;
left: 0;
width: 28px;
height: 24px;

View File

@@ -73,7 +73,18 @@
},
created () {
this.configList = JSON.parse(JSON.stringify(this.config))
this.configList = JSON.parse(JSON.stringify(this.config)).map(v => {
if (v.fieldType === '7') {
v.defaultValue = this.$dayjs().format('YYYY-MM-DD')
this.week = new Date().getDay()
}
if (v.fieldType === '6') {
v.defaultValue = this.$dayjs().format('HH:mm')
}
return v
})
this.date = this.$dayjs(new Date).format('YYYY-MM-DD')
this.time = this.$dayjs().format('HH:mm')

View File

@@ -69,7 +69,17 @@
},
created () {
this.configList = JSON.parse(JSON.stringify(this.config))
this.configList = JSON.parse(JSON.stringify(this.config)).map(v => {
if (v.fieldType === '7') {
v.defaultValue = this.$dayjs().format('YYYY-MM-DD')
this.week = new Date().getDay()
}
if (v.fieldType === '6') {
v.defaultValue = this.$dayjs().format('HH:mm')
}
return v
})
this.date = this.$dayjs(new Date).format('YYYY-MM-DD')
this.time = this.$dayjs().format('HH:mm')
this.week = new Date().getDay()

View File

@@ -67,10 +67,10 @@
configList: {
handler: function (v) {
if (v.length) {
const title = v.filter(v => v.type === '3')[0]
const address = v.filter(v => v.type === '4')[0]
const date = v.filter(v => v.type === '4')[0]
const time = v.filter(v => v.type === '4')[0]
const title = v.filter(v => v.type === '5')[0]
const address = v.filter(v => v.type === '3')[0]
const date = v.filter(v => v.type === '1')[0]
const time = v.filter(v => v.type === '0')[0]
this.isShowAddress = address.status === '1'
this.isShowDate = date.status === '1'
this.isShowTime = time.status === '1'
@@ -82,7 +82,17 @@
},
created () {
this.configList = JSON.parse(JSON.stringify(this.config))
this.configList = JSON.parse(JSON.stringify(this.config)).map(v => {
if (v.fieldType === '7') {
v.defaultValue = this.$dayjs().format('YYYY-MM-DD')
this.week = new Date().getDay()
}
if (v.fieldType === '6') {
v.defaultValue = this.$dayjs().format('HH:mm')
}
return v
})
this.date = this.$dayjs(new Date).format('YYYY-MM-DD')
this.time = this.$dayjs().format('HH:mm')

View File

@@ -64,7 +64,6 @@
if (v.length) {
const address = v.filter(v => v.type === '3')[0]
const title = v.filter(v => v.type === '5')[0]
console.log(address)
this.isShowAddress = address.status === '1'
this.title = title.defaultValue || ''
}
@@ -74,7 +73,17 @@
},
created () {
this.configList = JSON.parse(JSON.stringify(this.config))
this.configList = JSON.parse(JSON.stringify(this.config)).map(v => {
if (v.fieldType === '7') {
v.defaultValue = this.$dayjs().format('YYYY-MM-DD')
this.week = new Date().getDay()
}
if (v.fieldType === '6') {
v.defaultValue = this.$dayjs().format('HH:mm')
}
return v
})
this.date = this.$dayjs(new Date).format('YYYY-MM-DD')
this.time = this.$dayjs().format('HH:mm')