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 data = cloneDeep(await formApi.getValues())
|
||||||
// 通道信息
|
// 通道信息
|
||||||
const filteredChannels = dynamicValidateForm.floor
|
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 => ({
|
.map(item => ({
|
||||||
floorId: item.id,
|
floorId: item.id,
|
||||||
inChannel: item.in,
|
inChannel: item.in,
|
||||||
outChannel: item.out
|
upChannel: item.outUp,
|
||||||
|
downChannel: item.outDown,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
data.channels = filteredChannels
|
data.channels = filteredChannels
|
||||||
@ -223,7 +224,8 @@ async function setupCommunitySelect() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface floor {
|
interface floor {
|
||||||
out: string
|
outUp: string
|
||||||
|
outDown: string
|
||||||
in: string
|
in: string
|
||||||
num: string | number
|
num: string | number
|
||||||
id: string | number
|
id: string | number
|
||||||
@ -238,7 +240,8 @@ async function handleGetFloor(unitId: string | number) {
|
|||||||
floorList.value = []
|
floorList.value = []
|
||||||
res.forEach((item) => {
|
res.forEach((item) => {
|
||||||
floorList.value.push({
|
floorList.value.push({
|
||||||
out: '',
|
outUp: '',
|
||||||
|
outDown: '',
|
||||||
in: '',
|
in: '',
|
||||||
num: item.floorNumber,
|
num: item.floorNumber,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
@ -268,10 +271,14 @@ async function handleClosed() {
|
|||||||
<Form :model="dynamicValidateForm" layout="inline">
|
<Form :model="dynamicValidateForm" layout="inline">
|
||||||
<Space v-for="(floor, index) in dynamicValidateForm.floor" :key="floor.id"
|
<Space v-for="(floor, index) in dynamicValidateForm.floor" :key="floor.id"
|
||||||
style="display: flex; margin-bottom: 8px" align="baseline">
|
style="display: flex; margin-bottom: 8px" align="baseline">
|
||||||
<FormItem :label="'楼层' + (floor.num)" :name="['floor', index, 'out']">
|
<span>{{ "楼层"+floor.num }}</span>
|
||||||
<Input v-model:value="floor.out" placeholder="外部按键通道" />
|
<FormItem label="上键通道" :name="['floor', index, 'outUp']">
|
||||||
|
<Input v-model:value="floor.outUp" placeholder="外部按键通道" />
|
||||||
</FormItem>
|
</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="内部按键通道" />
|
<Input v-model:value="floor.in" placeholder="内部按键通道" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Space>
|
</Space>
|
||||||
|
Loading…
Reference in New Issue
Block a user