fix: 修复批量修改 label 级联选择器 ,下拉框及复选框,选择报错问题
This commit is contained in:
@@ -43,8 +43,8 @@
|
||||
<el-form-item :label="$t('asset.pin')" prop="authPin">
|
||||
<el-input v-model="editData.authPin" size="small" type="password" autocomplete="new-password"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('asset.port')" prop="port">
|
||||
<el-input v-model="editData.port" size="small"/>
|
||||
<el-form-item :label="$t('asset.port')" prop="authProtocolPort">
|
||||
<el-input v-model="editData.authProtocolPort" size="small"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
</template>
|
||||
<template v-if="label.action !== 1">
|
||||
<template v-if="label.type.toUpperCase() === assetConstants.labelTypeData.TEXT">
|
||||
<el-input v-model="label.value[0]" size="small"/>
|
||||
<el-input v-model="label.value" size="small"/>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.MULTITEXT">
|
||||
<div v-for="(value, i) in label.value" :key="i" class="label__multi-text">
|
||||
@@ -92,10 +92,10 @@
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.TEXTAREA">
|
||||
<el-input v-model="label.value[0]" :maxlength="4096" size="small" type="textarea"/>
|
||||
<el-input v-model="label.value" :maxlength="4096" size="small" type="textarea"/>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.RADIO">
|
||||
<el-radio v-for="item in JSON.parse(label.param).items" :key="item.name" v-model="label.value[0]" :label="item.name">{{item.name}}</el-radio>
|
||||
<el-radio v-for="item in JSON.parse(label.param).items" :key="item.name" v-model="label.value" :label="item.name">{{item.name}}</el-radio>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.CHECKBOX">
|
||||
<el-checkbox-group v-model="label.value">
|
||||
@@ -103,31 +103,31 @@
|
||||
</el-checkbox-group>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.SELECT">
|
||||
<el-select v-model="label.value[0]" class="right-box__select" popper-class="right-box-select-top right-public-box-dropdown-top prevent-clickoutside" size="small">
|
||||
<el-select v-model="label.value" class="right-box__select" popper-class="right-box-select-top right-public-box-dropdown-top prevent-clickoutside" size="small">
|
||||
<el-option v-for="item in JSON.parse(label.param).items" :key="item.name" :label="item.name" :value="item.name"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.INTEGER">
|
||||
<el-input v-model="label.value[0]" oninput="value=value.replace(/[^\d]/g,'')" size="small"></el-input>
|
||||
<el-input v-model="label.value" oninput="value=value.replace(/[^\d]/g,'')" size="small"></el-input>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.DOUBLE">
|
||||
<el-input v-model="label.value[0]" oninput="value=value.replace(/[^0-9.]/g,'')" size="small"></el-input>
|
||||
<el-input v-model="label.value" oninput="value=value.replace(/[^0-9.]/g,'')" size="small"></el-input>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.DATETIME">
|
||||
<template v-if="JSON.parse(label.param).subType === assetConstants.labelSubTypeData.time">
|
||||
<div v-if="label.interval" style="display: flex; justify-content: space-between">
|
||||
<el-time-select v-model="label.value[0]" size="small"></el-time-select>
|
||||
<el-time-select v-model="label.value[1]" size="small"></el-time-select>
|
||||
<el-time-select v-model="label.value" size="small"></el-time-select>
|
||||
<el-time-select v-model="label.value" size="small"></el-time-select>
|
||||
</div>
|
||||
<template v-else>
|
||||
<el-time-select v-model="label.value[0]" size="small" style="width: 100%"></el-time-select>
|
||||
<el-time-select v-model="label.value" size="small" style="width: 100%"></el-time-select>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-if="label.interval">
|
||||
<my-date-picker
|
||||
id="asset-box-input-purchase-date"
|
||||
v-model="label.value[0]"
|
||||
v-model="label.value"
|
||||
:type="JSON.parse(label.param).subType === assetConstants.labelSubTypeData.date ? 'dateRange' : 'datetimerange'"
|
||||
placeholder=""
|
||||
popper-class="right-box-select-top right-public-box-dropdown-top"
|
||||
@@ -138,7 +138,7 @@
|
||||
<template v-else>
|
||||
<my-date-picker
|
||||
id="asset-box-input-parchase-date"
|
||||
v-model="label.value[0]"
|
||||
v-model="label.value"
|
||||
:type="JSON.parse(label.param).subType"
|
||||
placeholder=""
|
||||
popper-class="right-box-select-top right-public-box-dropdown-top"
|
||||
@@ -150,7 +150,7 @@
|
||||
</template>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.EMAIL">
|
||||
<input v-model="label.value[0]" size="small"></input>
|
||||
<input v-model="label.value" size="small"></input>
|
||||
</template>
|
||||
</template>
|
||||
</el-form-item>
|
||||
@@ -249,6 +249,7 @@ export default {
|
||||
editData: {
|
||||
editType: 1,
|
||||
authProtocol: 1,
|
||||
authProtocolPort: 22,
|
||||
authType: 1,
|
||||
fields: [],
|
||||
port: 22,
|
||||
|
||||
Reference in New Issue
Block a user