feat: 1.考勤设备修改
This commit is contained in:
parent
da0ec92b78
commit
85aff7d423
@ -24,16 +24,17 @@
|
|||||||
<view
|
<view
|
||||||
@click="
|
@click="
|
||||||
() => {
|
() => {
|
||||||
if (selectIndex == index) {
|
device.isSelect = !device.isSelect
|
||||||
selectIndex = -1
|
if (device.isSelect) {
|
||||||
|
selectList.push(device)
|
||||||
} else {
|
} else {
|
||||||
selectIndex = index
|
selectList = selectList.filter(item => item.id !== device.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
class="text-5"
|
class="text-5"
|
||||||
:class="
|
:class="
|
||||||
selectIndex == index
|
device.isSelect
|
||||||
? 'i-carbon-checkmark-filled color-[#3372FA]'
|
? 'i-carbon-checkmark-filled color-[#3372FA]'
|
||||||
: 'i-carbon-circle-outline color-gray'
|
: 'i-carbon-circle-outline color-gray'
|
||||||
"
|
"
|
||||||
@ -43,47 +44,82 @@
|
|||||||
<view class="ml-a color-gray">{{ device.type }}</view>
|
<view class="ml-a color-gray">{{ device.type }}</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="p-3 box-border border-solid border-0 border-t-1 border-gray-200 text-end">
|
<view class="flex p-3 box-border border-solid border-0 border-t-1 border-gray-200 items-center">
|
||||||
<wd-button :round="false">确定</wd-button>
|
<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>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
const selectIndex = ref(0)
|
const selectList = ref([])
|
||||||
const deviceList = ref([
|
const deviceList = ref([
|
||||||
{
|
{
|
||||||
name: 'DK-K(L40231232)',
|
name: 'DK-K(L40231232)',
|
||||||
type: '公共门'
|
id: 0,
|
||||||
|
type: '公共门',
|
||||||
|
isSelect: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'DK-K(L40231233)',
|
name: 'DK-K(L40231233)',
|
||||||
type: '私人门'
|
id: 1,
|
||||||
|
type: '公共门',
|
||||||
|
isSelect: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'DK-K(L40231233)',
|
name: 'DK-K(L40231234)',
|
||||||
type: '私人门'
|
id: 2,
|
||||||
|
type: '公共门',
|
||||||
|
isSelect: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'DK-K(L40231233)',
|
name: 'DK-K(L40231235)',
|
||||||
type: '私人门'
|
id: 3,
|
||||||
|
type: '公共门',
|
||||||
|
isSelect: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'DK-K(L40231233)',
|
name: 'DK-K(L40231236)',
|
||||||
type: '私人门'
|
id: 4,
|
||||||
|
type: '公共门',
|
||||||
|
isSelect: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'DK-K(L40231233)',
|
name: 'DK-K(L40231237)',
|
||||||
type: '私人门'
|
id: 5,
|
||||||
|
type: '公共门',
|
||||||
|
isSelect: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'DK-K(L40231233)',
|
name: 'DK-K(L40231238)',
|
||||||
type: '私人门'
|
id: 6,
|
||||||
|
type: '公共门',
|
||||||
|
isSelect: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'DK-K(L40231233)',
|
name: 'DK-K(L40231239)',
|
||||||
type: '私人门'
|
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
|
// Add more devices as needed
|
||||||
|
|||||||
@ -190,7 +190,8 @@
|
|||||||
{
|
{
|
||||||
id: 382,
|
id: 382,
|
||||||
icon: 'https://file.hikmall.com/prod/image/9e2b6e95c2904540a9a3dc675d25cc13.png',
|
icon: 'https://file.hikmall.com/prod/image/9e2b6e95c2904540a9a3dc675d25cc13.png',
|
||||||
name: '考勤设置'
|
name: '考勤设置',
|
||||||
|
url: '/pages/attendance/attendance'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 383,
|
id: 383,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user