fea: 打卡查看-支持出差打卡类型

This commit is contained in:
wangzhuo
2025-09-19 15:30:07 +08:00
parent 082d60e2da
commit af25a14c17
2 changed files with 123 additions and 107 deletions

View File

@@ -27,8 +27,9 @@
<view class="white-bg margin-bottom20" v-for="(item, index) in list"> <view class="white-bg margin-bottom20" v-for="(item, index) in list">
<view class="report-list"> <view class="report-list">
<view class="title" <view class="title"
:style="{color: item.mapType == 1 ? '#F5813A' : '#1989FA'}" :style="{color: MapType[item.mapType].color}"
>类型{{ item.mapType == 1 ? '签到' : '打卡' }}</view> >类型{{ MapType[item.mapType].label }}
</view><!--item.mapType == 1 ? '#F5813A' : '#1989FA'}-->
<view class="r-list"> <view class="r-list">
<view class="r-left">开始签到时间</view> <view class="r-left">开始签到时间</view>
<view class="r-right">{{ item.goVisistStartTime }}</view> <view class="r-right">{{ item.goVisistStartTime }}</view>
@@ -66,6 +67,7 @@ import { onMounted, ref } from 'vue';
import {getDate} from '@/utils/datetime.js' import {getDate} from '@/utils/datetime.js'
import {CheckInInformationViewing} from '../../../../api/crm/activity/map'; import {CheckInInformationViewing} from '../../../../api/crm/activity/map';
import {onLoad} from '@dcloudio/uni-app'; import {onLoad} from '@dcloudio/uni-app';
import {MapType} from "./dataMap";
const navBarPaddingTop = ref(0); const navBarPaddingTop = ref(0);
onMounted(() => { onMounted(() => {
@@ -83,6 +85,7 @@ let bindDateChange = (e) => {
//获取list集合信息 //获取list集合信息
let list = ref([]) let list = ref([])
function getList() { function getList() {
CheckInInformationViewing().then(res => { CheckInInformationViewing().then(res => {
list.value = res.rows list.value = res.rows
@@ -93,13 +96,17 @@ onLoad(() => {
getList() getList()
}) })
</script> </script>
<style scoped> <style scoped>
.r-left {
min-width: 6em;
}
.con-bg {
overflow-y: auto;
}
.search { .search {
display: flex; display: flex;
margin-bottom: 30rpx; margin-bottom: 30rpx;

View File

@@ -0,0 +1,9 @@
/**
* 签到/打卡/出差
* @type {{"1": {label: 签到, bgc: string}, "2": {label: 打卡, bgc: string}, "3": {label: 出差, bgc: string}}}
*/
export const MapType = {
'1': {label:'签到', color:'#F5813A'},
'2': {label:'打卡', color:'#1989FA'},
'3': {label:'出差', color:'#42b883'}
}