fix: labeltemplate 列表打码器列合并展示, 提交时空 IP 转 null
- 列表 IP 与端口合并为单列, 无 IP 则整列留空 - submitHandle 提交前空 coder_ip 转 null, 避免后端 IPAddressField 拒空串 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ecd8fd8bec
commit
c8fe283ff5
|
|
@ -13,8 +13,11 @@
|
||||||
<scTable ref="table" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" hidePagination>
|
<scTable ref="table" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" hidePagination>
|
||||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||||
<el-table-column label="模板名称" prop="name" min-width="100"></el-table-column>
|
<el-table-column label="模板名称" prop="name" min-width="100"></el-table-column>
|
||||||
<el-table-column label="打码器IP" prop="coder_ip" min-width="130"></el-table-column>
|
<el-table-column label="打码器" min-width="170">
|
||||||
<el-table-column label="端口" prop="coder_port" width="80"></el-table-column>
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.coder_ip">{{ scope.row.coder_ip }}:{{ scope.row.coder_port }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" prop="create_time" min-width="150"></el-table-column>
|
<el-table-column label="创建时间" prop="create_time" min-width="150"></el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="140">
|
<el-table-column label="操作" fixed="right" align="center" width="140">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
@ -125,6 +128,7 @@
|
||||||
let arr = [];
|
let arr = [];
|
||||||
arr = that.addForm.commands.split("\n");
|
arr = that.addForm.commands.split("\n");
|
||||||
that.addForm.commands = arr;
|
that.addForm.commands = arr;
|
||||||
|
if (!that.addForm.coder_ip) that.addForm.coder_ip = null;
|
||||||
if(this.type==='add'){
|
if(this.type==='add'){
|
||||||
this.$API.cm.labeltemplate.create.req(that.addForm).then(res=>{
|
this.$API.cm.labeltemplate.create.req(that.addForm).then(res=>{
|
||||||
this.isSaveing = false;
|
this.isSaveing = false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue