增加dhcp4开关
This commit is contained in:
parent
70009aef25
commit
2d4294e049
|
@ -42,7 +42,15 @@
|
||||||
<span style="margin-left: 10px">接通</span>
|
<span style="margin-left: 10px">接通</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<!-- <p class="title">IPV4</p> -->
|
<div style="margin-bottom: 24px;">
|
||||||
|
<p class="title">dhcp4</p>
|
||||||
|
<el-switch
|
||||||
|
v-model="dhcp4"
|
||||||
|
active-text="开"
|
||||||
|
inactive-text="关">
|
||||||
|
</el-switch>
|
||||||
|
</div>
|
||||||
|
<div v-show="dhcp4">
|
||||||
<p class="title">静态地址</p>
|
<p class="title">静态地址</p>
|
||||||
<el-button type="primary" @click="addRowsTableData()" style="margin-bottom:10px" v-if="!disable">新增</el-button>
|
<el-button type="primary" @click="addRowsTableData()" style="margin-bottom:10px" v-if="!disable">新增</el-button>
|
||||||
<el-table :data="sizeForm.tableData" border style="width: 95%">
|
<el-table :data="sizeForm.tableData" border style="width: 95%">
|
||||||
|
@ -51,7 +59,7 @@
|
||||||
<!-- <el-input v-model="scope.row.address" @change="changeVal(scope.row,scope.$index)"></el-input> -->
|
<!-- <el-input v-model="scope.row.address" @change="changeVal(scope.row,scope.$index)"></el-input> -->
|
||||||
<el-form-item :prop="'tableData.'+ scope.$index + '.address'" :rules="rules.address" class="tableFormItem">
|
<el-form-item :prop="'tableData.'+ scope.$index + '.address'" :rules="rules.address" class="tableFormItem">
|
||||||
<el-input v-model.trim="scope.row.address"
|
<el-input v-model.trim="scope.row.address"
|
||||||
placeholder="例:172.1.1.16/24" :disabled="scope.$index ==0 || disable"/>
|
placeholder="例:172.1.1.16/24" :disabled="disable"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -85,6 +93,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
</div>
|
||||||
<!-- <p style="margin-top: 10px" class="title">DHCP</p>
|
<!-- <p style="margin-top: 10px" class="title">DHCP</p>
|
||||||
<el-form-item label="启用:">
|
<el-form-item label="启用:">
|
||||||
<el-col :span="2" style="diaplay: flex">
|
<el-col :span="2" style="diaplay: flex">
|
||||||
|
@ -318,6 +327,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
dhcp4:false,
|
||||||
columnLabel: '', //要增加的列名
|
columnLabel: '', //要增加的列名
|
||||||
columnPropIndex: 0, //列属性自增
|
columnPropIndex: 0, //列属性自增
|
||||||
columnData: [],//列标题数组
|
columnData: [],//列标题数组
|
||||||
|
@ -582,7 +592,7 @@ export default {
|
||||||
var ner = {
|
var ner = {
|
||||||
type:"netplanSet",
|
type:"netplanSet",
|
||||||
ethName:sizeForm.name,
|
ethName:sizeForm.name,
|
||||||
dhcp4: false,
|
dhcp4: this.dhcp4,
|
||||||
addresses:tableDataN,//静态地址
|
addresses:tableDataN,//静态地址
|
||||||
gateway4:sizeForm.gateway4,
|
gateway4:sizeForm.gateway4,
|
||||||
nameservers:tableDataDNSN,//DNS
|
nameservers:tableDataDNSN,//DNS
|
||||||
|
@ -744,6 +754,10 @@ export default {
|
||||||
console.log("msg",msg)
|
console.log("msg",msg)
|
||||||
// var optionsDataN = this.optionsData
|
// var optionsDataN = this.optionsData
|
||||||
console.log(" msg.netstates[this.optionsData]",this.optionsData)
|
console.log(" msg.netstates[this.optionsData]",this.optionsData)
|
||||||
|
if(msg.netplan[this.optionsData]!=undefined){
|
||||||
|
this.dhcp4 = msg.netplan[this.optionsData].dhcp4||false
|
||||||
|
}
|
||||||
|
|
||||||
if(msg.netstates[this.optionsData]!=undefined){
|
if(msg.netstates[this.optionsData]!=undefined){
|
||||||
this.sizeForm.name = this.optionsData
|
this.sizeForm.name = this.optionsData
|
||||||
this.sizeForm.mtu = msg.netstates[this.optionsData].mtu
|
this.sizeForm.mtu = msg.netstates[this.optionsData].mtu
|
||||||
|
|
Loading…
Reference in New Issue