refactor(sis): - 将原有的单一外部通道号拆分为上键通道号和下键通道号
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
parent
63d23bc447
commit
a048f3627e
@ -111,11 +111,12 @@ async function handleConfirm() {
|
||||
const data = cloneDeep(await formApi.getValues())
|
||||
// 通道信息
|
||||
const filteredChannels = dynamicValidateForm.floor
|
||||
.filter(item => !(item.out.length === 0 && item.in.length === 0))
|
||||
.filter(item => !(item.outUp.length === 0 && item.outDown.length === 0 && item.in.length === 0))
|
||||
.map(item => ({
|
||||
floorId: item.id,
|
||||
inChannel: item.in,
|
||||
outChannel: item.out
|
||||
upChannel: item.outUp,
|
||||
downChannel: item.outDown,
|
||||
}))
|
||||
|
||||
data.channels = filteredChannels
|
||||
@ -223,7 +224,8 @@ async function setupCommunitySelect() {
|
||||
}
|
||||
|
||||
interface floor {
|
||||
out: string
|
||||
outUp: string
|
||||
outDown: string
|
||||
in: string
|
||||
num: string | number
|
||||
id: string | number
|
||||
@ -238,7 +240,8 @@ async function handleGetFloor(unitId: string | number) {
|
||||
floorList.value = []
|
||||
res.forEach((item) => {
|
||||
floorList.value.push({
|
||||
out: '',
|
||||
outUp: '',
|
||||
outDown: '',
|
||||
in: '',
|
||||
num: item.floorNumber,
|
||||
id: item.id,
|
||||
@ -268,10 +271,14 @@ async function handleClosed() {
|
||||
<Form :model="dynamicValidateForm" layout="inline">
|
||||
<Space v-for="(floor, index) in dynamicValidateForm.floor" :key="floor.id"
|
||||
style="display: flex; margin-bottom: 8px" align="baseline">
|
||||
<FormItem :label="'楼层' + (floor.num)" :name="['floor', index, 'out']">
|
||||
<Input v-model:value="floor.out" placeholder="外部按键通道" />
|
||||
<span>{{ "楼层"+floor.num }}</span>
|
||||
<FormItem label="上键通道" :name="['floor', index, 'outUp']">
|
||||
<Input v-model:value="floor.outUp" placeholder="外部按键通道" />
|
||||
</FormItem>
|
||||
<FormItem :name="['floor', index, 'in']">
|
||||
<FormItem label="下键通道" :name="['floor', index, 'outDown']">
|
||||
<Input v-model:value="floor.outDown" placeholder="内部按键通道" />
|
||||
</FormItem>
|
||||
<FormItem label="楼层通道" :name="['floor', index, 'in']">
|
||||
<Input v-model:value="floor.in" placeholder="内部按键通道" />
|
||||
</FormItem>
|
||||
</Space>
|
||||
|
Loading…
Reference in New Issue
Block a user