Merge branch 'develop_mzh' into 'develop'
Develop mzh See merge request StarlockTeam/starwork-uniapp!10
This commit is contained in:
commit
5e64561338
@ -36,4 +36,13 @@
|
||||
height: 100%;
|
||||
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>
|
||||
|
||||
@ -56,6 +56,18 @@
|
||||
import CommonItem from '@/components/CommonItemItem/CommonItem.vue'
|
||||
|
||||
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'],
|
||||
switch: [true, false]
|
||||
|
||||
@ -135,6 +135,7 @@
|
||||
:value="wayList[wayIndex].title"
|
||||
></CommonItem>
|
||||
<CommonItem
|
||||
@click="goDevice"
|
||||
text="打卡设备"
|
||||
:isMust="wayIndex == 0"
|
||||
:noLine="wayIndex == 0"
|
||||
@ -218,6 +219,11 @@
|
||||
url: '/pages/attendance/attendance-add-group/attendance-time'
|
||||
})
|
||||
}
|
||||
const goDevice = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/attendance/attendance-add-group/attendance-device'
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
131
src/pages/attendance/attendance-add-group/attendance-device.vue
Normal file
131
src/pages/attendance/attendance-add-group/attendance-device.vue
Normal file
@ -0,0 +1,131 @@
|
||||
<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="
|
||||
() => {
|
||||
device.isSelect = !device.isSelect
|
||||
if (device.isSelect) {
|
||||
selectList.push(device)
|
||||
} else {
|
||||
selectList = selectList.filter(item => item.id !== device.id)
|
||||
}
|
||||
}
|
||||
"
|
||||
class="text-5"
|
||||
:class="
|
||||
device.isSelect
|
||||
? '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="flex p-3 box-border border-solid border-0 border-t-1 border-gray-200 items-center">
|
||||
<view
|
||||
class="items-center flex flex-1"
|
||||
:style="selectList.length != 0 ? '' : 'visibility: hidden;'"
|
||||
>
|
||||
<view class="color-[#3372FA]">已选中:{{ selectList.length }}个</view>
|
||||
<view class="i-carbon-chevron-right color-[#3372FA] ml-2"></view>
|
||||
</view>
|
||||
<wd-button class="ml-a" :round="false">确定</wd-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
const selectList = ref([])
|
||||
const deviceList = ref([
|
||||
{
|
||||
name: 'DK-K(L40231232)',
|
||||
id: 0,
|
||||
type: '公共门',
|
||||
isSelect: false
|
||||
},
|
||||
{
|
||||
name: 'DK-K(L40231233)',
|
||||
id: 1,
|
||||
type: '公共门',
|
||||
isSelect: false
|
||||
},
|
||||
{
|
||||
name: 'DK-K(L40231234)',
|
||||
id: 2,
|
||||
type: '公共门',
|
||||
isSelect: false
|
||||
},
|
||||
{
|
||||
name: 'DK-K(L40231235)',
|
||||
id: 3,
|
||||
type: '公共门',
|
||||
isSelect: false
|
||||
},
|
||||
{
|
||||
name: 'DK-K(L40231236)',
|
||||
id: 4,
|
||||
type: '公共门',
|
||||
isSelect: false
|
||||
},
|
||||
{
|
||||
name: 'DK-K(L40231237)',
|
||||
id: 5,
|
||||
type: '公共门',
|
||||
isSelect: false
|
||||
},
|
||||
{
|
||||
name: 'DK-K(L40231238)',
|
||||
id: 6,
|
||||
type: '公共门',
|
||||
isSelect: false
|
||||
},
|
||||
{
|
||||
name: 'DK-K(L40231239)',
|
||||
id: 7,
|
||||
type: '公共门',
|
||||
isSelect: false
|
||||
},
|
||||
{
|
||||
name: 'DK-K(L40231240)',
|
||||
id: 8,
|
||||
type: '公共门',
|
||||
isSelect: false
|
||||
},
|
||||
{
|
||||
name: 'DK-K(L40231241)',
|
||||
id: 9,
|
||||
type: '公共门',
|
||||
isSelect: false
|
||||
}
|
||||
|
||||
// Add more devices as needed
|
||||
])
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
//
|
||||
</style>
|
||||
@ -15,46 +15,44 @@
|
||||
<wd-tab :title="item.title"></wd-tab>
|
||||
</block>
|
||||
</wd-tabs>
|
||||
<view class="flex-1 flex flex-col p-3">
|
||||
<scroll-view scroll-y class="flex-1 box-border">
|
||||
<view class="bg-white rounded-2">
|
||||
<CommonItem
|
||||
text="添加"
|
||||
@click="
|
||||
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"
|
||||
<scroll-view scroll-y class="flex-1 box-border p-3">
|
||||
<view class="bg-white rounded-2">
|
||||
<CommonItem
|
||||
text="添加"
|
||||
@click="
|
||||
tabsIndex == 0 ? mustDate.push(cloneBestDate()) : unMustDate.push(cloneBestDate())
|
||||
"
|
||||
>
|
||||
<view class="flex flex-justify-between px-3 mb-2">
|
||||
<view class="color-gray text-3">{{ tabs[tabsIndex].title }}({{ index + 1 }})</view>
|
||||
<view
|
||||
@click="tabsIndex == 0 ? mustDate.splice(index, 1) : unMustDate.splice(index, 1)"
|
||||
class="color-red text-3"
|
||||
>
|
||||
删除
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-white rounded-2">
|
||||
<CommonItem text="日期" :value="item.data" :noLine="tabsIndex != 0"></CommonItem>
|
||||
<CommonItem
|
||||
v-show="tabsIndex == 0"
|
||||
text="上下班时间"
|
||||
:value="item.time"
|
||||
noLine
|
||||
></CommonItem>
|
||||
<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">
|
||||
<view class="color-gray text-3">{{ tabs[tabsIndex].title }} ({{ index + 1 }})</view>
|
||||
<view
|
||||
@click="tabsIndex == 0 ? mustDate.splice(index, 1) : unMustDate.splice(index, 1)"
|
||||
class="color-red text-3"
|
||||
>
|
||||
删除
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="bg-white rounded-2">
|
||||
<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">
|
||||
<wd-button :round="false" block>确定</wd-button>
|
||||
</view>
|
||||
|
||||
@ -33,7 +33,6 @@
|
||||
scroll-y
|
||||
class="mt-2 flex-1 px-3 box-border"
|
||||
refresher-enabled
|
||||
:refresher-threshold="45"
|
||||
@refresherrefresh="onRefresh()"
|
||||
:refresher-triggered="scrollViewStatus"
|
||||
>
|
||||
@ -88,10 +87,10 @@
|
||||
const key = ref('')
|
||||
const onRefresh = () => {
|
||||
console.log('refresh')
|
||||
scrollViewStatus.value = true
|
||||
setTimeout(() => {
|
||||
scrollViewStatus.value = true
|
||||
scrollViewStatus.value = false
|
||||
}, 2000)
|
||||
}, 500)
|
||||
}
|
||||
onLoad(options => {
|
||||
isSelect.value = options.isSelect ?? false
|
||||
|
||||
@ -167,7 +167,8 @@
|
||||
{
|
||||
id: 382,
|
||||
icon: 'https://file.hikmall.com/prod/image/9e2b6e95c2904540a9a3dc675d25cc13.png',
|
||||
name: '考勤设置'
|
||||
name: '考勤设置',
|
||||
url: '/pages/attendance/attendance'
|
||||
},
|
||||
{
|
||||
id: 383,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user