feat: 1.星寓考勤模块--考勤设备设置
This commit is contained in:
parent
02c4636a42
commit
da0ec92b78
@ -36,4 +36,13 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
.uni-scroll-view-refresher {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
.wd-tabs__nav {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
.wd-tabs {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -56,6 +56,18 @@
|
|||||||
import CommonItem from '@/components/CommonItemItem/CommonItem.vue'
|
import CommonItem from '@/components/CommonItemItem/CommonItem.vue'
|
||||||
|
|
||||||
const times = ref([
|
const times = ref([
|
||||||
|
{
|
||||||
|
times: ['07:00', '09:00'],
|
||||||
|
switch: [true, false]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
times: ['07:00', '09:00'],
|
||||||
|
switch: [true, false]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
times: ['07:00', '09:00'],
|
||||||
|
switch: [true, false]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
times: ['07:00', '09:00'],
|
times: ['07:00', '09:00'],
|
||||||
switch: [true, false]
|
switch: [true, false]
|
||||||
|
|||||||
@ -135,6 +135,7 @@
|
|||||||
:value="wayList[wayIndex].title"
|
:value="wayList[wayIndex].title"
|
||||||
></CommonItem>
|
></CommonItem>
|
||||||
<CommonItem
|
<CommonItem
|
||||||
|
@click="goDevice"
|
||||||
text="打卡设备"
|
text="打卡设备"
|
||||||
:isMust="wayIndex == 0"
|
:isMust="wayIndex == 0"
|
||||||
:noLine="wayIndex == 0"
|
:noLine="wayIndex == 0"
|
||||||
@ -218,6 +219,11 @@
|
|||||||
url: '/pages/attendance/attendance-add-group/attendance-time'
|
url: '/pages/attendance/attendance-add-group/attendance-time'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const goDevice = () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/attendance/attendance-add-group/attendance-device'
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@ -0,0 +1,95 @@
|
|||||||
|
<route lang="json5" type="page">
|
||||||
|
{
|
||||||
|
layout: 'default',
|
||||||
|
style: {
|
||||||
|
navigationStyle: 'custom'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</route>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<view class="h-100vh flex flex-col">
|
||||||
|
<TopNavigation title="选择考勤机/门禁点"></TopNavigation>
|
||||||
|
<view class="bg-white flex flex flex-row flex-justify-center items-center rounded-1 m-3 p-1.5">
|
||||||
|
<wd-icon name="search" class="color-gray text-3.3 ml-2"></wd-icon>
|
||||||
|
<view class="color-gray ml-2">搜索</view>
|
||||||
|
</view>
|
||||||
|
<view class="m-3 mt-2 color-gray">全部</view>
|
||||||
|
<scroll-view scroll-y>
|
||||||
|
<view
|
||||||
|
v-for="(device, index) in deviceList"
|
||||||
|
:key="index"
|
||||||
|
class="bg-white px-3 py-2 flex flex-row items-center border-solid border-0 border-t-1 border-gray-100"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
@click="
|
||||||
|
() => {
|
||||||
|
if (selectIndex == index) {
|
||||||
|
selectIndex = -1
|
||||||
|
} else {
|
||||||
|
selectIndex = index
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"
|
||||||
|
class="text-5"
|
||||||
|
:class="
|
||||||
|
selectIndex == index
|
||||||
|
? 'i-carbon-checkmark-filled color-[#3372FA]'
|
||||||
|
: 'i-carbon-circle-outline color-gray'
|
||||||
|
"
|
||||||
|
></view>
|
||||||
|
<image src="/static/images/icon_one_key_door.png" mode="aspectFit" class="h-9 w-11" />
|
||||||
|
<view>{{ device.name }}</view>
|
||||||
|
<view class="ml-a color-gray">{{ device.type }}</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
<view class="p-3 box-border border-solid border-0 border-t-1 border-gray-200 text-end">
|
||||||
|
<wd-button :round="false">确定</wd-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref } from 'vue'
|
||||||
|
const selectIndex = ref(0)
|
||||||
|
const deviceList = ref([
|
||||||
|
{
|
||||||
|
name: 'DK-K(L40231232)',
|
||||||
|
type: '公共门'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'DK-K(L40231233)',
|
||||||
|
type: '私人门'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'DK-K(L40231233)',
|
||||||
|
type: '私人门'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'DK-K(L40231233)',
|
||||||
|
type: '私人门'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'DK-K(L40231233)',
|
||||||
|
type: '私人门'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'DK-K(L40231233)',
|
||||||
|
type: '私人门'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'DK-K(L40231233)',
|
||||||
|
type: '私人门'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'DK-K(L40231233)',
|
||||||
|
type: '私人门'
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add more devices as needed
|
||||||
|
])
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
//
|
||||||
|
</style>
|
||||||
@ -15,46 +15,44 @@
|
|||||||
<wd-tab :title="item.title"></wd-tab>
|
<wd-tab :title="item.title"></wd-tab>
|
||||||
</block>
|
</block>
|
||||||
</wd-tabs>
|
</wd-tabs>
|
||||||
<view class="flex-1 flex flex-col p-3">
|
<scroll-view scroll-y class="flex-1 box-border p-3">
|
||||||
<scroll-view scroll-y class="flex-1 box-border">
|
<view class="bg-white rounded-2">
|
||||||
<view class="bg-white rounded-2">
|
<CommonItem
|
||||||
<CommonItem
|
text="添加"
|
||||||
text="添加"
|
@click="
|
||||||
@click="
|
tabsIndex == 0 ? mustDate.push(cloneBestDate()) : unMustDate.push(cloneBestDate())
|
||||||
tabsIndex == 0 ? mustDate.push(cloneBestDate()) : unMustDate.push(cloneBestDate())
|
"
|
||||||
"
|
|
||||||
>
|
|
||||||
<template v-slot:child>
|
|
||||||
<wd-icon name="add-circle" class="ml-a" size="18"></wd-icon>
|
|
||||||
</template>
|
|
||||||
</CommonItem>
|
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
class="mt-5"
|
|
||||||
v-for="(item, index) in tabsIndex == 0 ? mustDate : unMustDate"
|
|
||||||
:key="index"
|
|
||||||
>
|
>
|
||||||
<view class="flex flex-justify-between px-3 mb-2">
|
<template v-slot:child>
|
||||||
<view class="color-gray text-3">{{ tabs[tabsIndex].title }}({{ index + 1 }})</view>
|
<wd-icon name="add-circle" class="ml-a" size="18"></wd-icon>
|
||||||
<view
|
</template>
|
||||||
@click="tabsIndex == 0 ? mustDate.splice(index, 1) : unMustDate.splice(index, 1)"
|
</CommonItem>
|
||||||
class="color-red text-3"
|
</view>
|
||||||
>
|
<view
|
||||||
删除
|
class="mt-5"
|
||||||
</view>
|
v-for="(item, index) in tabsIndex == 0 ? mustDate : unMustDate"
|
||||||
</view>
|
:key="index"
|
||||||
<view class="bg-white rounded-2">
|
>
|
||||||
<CommonItem text="日期" :value="item.data" :noLine="tabsIndex != 0"></CommonItem>
|
<view class="flex flex-justify-between px-3 mb-2">
|
||||||
<CommonItem
|
<view class="color-gray text-3">{{ tabs[tabsIndex].title }} ({{ index + 1 }})</view>
|
||||||
v-show="tabsIndex == 0"
|
<view
|
||||||
text="上下班时间"
|
@click="tabsIndex == 0 ? mustDate.splice(index, 1) : unMustDate.splice(index, 1)"
|
||||||
:value="item.time"
|
class="color-red text-3"
|
||||||
noLine
|
>
|
||||||
></CommonItem>
|
删除
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
<view class="bg-white rounded-2">
|
||||||
</view>
|
<CommonItem text="日期" :value="item.data" :noLine="tabsIndex != 0"></CommonItem>
|
||||||
|
<CommonItem
|
||||||
|
v-show="tabsIndex == 0"
|
||||||
|
text="上下班时间"
|
||||||
|
:value="item.time"
|
||||||
|
noLine
|
||||||
|
></CommonItem>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
<view class="mt-a w-full p-3 box-border border-solid border-0 border-t-1 border-gray-200">
|
<view class="mt-a w-full p-3 box-border border-solid border-0 border-t-1 border-gray-200">
|
||||||
<wd-button :round="false" block>确定</wd-button>
|
<wd-button :round="false" block>确定</wd-button>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -33,7 +33,6 @@
|
|||||||
scroll-y
|
scroll-y
|
||||||
class="mt-2 flex-1 px-3 box-border"
|
class="mt-2 flex-1 px-3 box-border"
|
||||||
refresher-enabled
|
refresher-enabled
|
||||||
:refresher-threshold="45"
|
|
||||||
@refresherrefresh="onRefresh()"
|
@refresherrefresh="onRefresh()"
|
||||||
:refresher-triggered="scrollViewStatus"
|
:refresher-triggered="scrollViewStatus"
|
||||||
>
|
>
|
||||||
@ -88,10 +87,10 @@
|
|||||||
const key = ref('')
|
const key = ref('')
|
||||||
const onRefresh = () => {
|
const onRefresh = () => {
|
||||||
console.log('refresh')
|
console.log('refresh')
|
||||||
|
scrollViewStatus.value = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
scrollViewStatus.value = true
|
|
||||||
scrollViewStatus.value = false
|
scrollViewStatus.value = false
|
||||||
}, 2000)
|
}, 500)
|
||||||
}
|
}
|
||||||
onLoad(options => {
|
onLoad(options => {
|
||||||
isSelect.value = options.isSelect ?? false
|
isSelect.value = options.isSelect ?? false
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user