国标级联通道共享支持自定义通道编号和名称

This commit is contained in:
648540858
2024-08-29 16:47:46 +08:00
parent e55cd08b08
commit 8dc27d1353
9 changed files with 680 additions and 311 deletions

View File

@@ -51,6 +51,26 @@
</el-table-column>
<el-table-column prop="gbDeviceId" label="编号" min-width="180">
</el-table-column>
<el-table-column v-if="hasShare ==='true'" label="自定义名称" min-width="180">
<template slot-scope="scope">
<div slot="—" class="name-wrapper">
<el-input size="mini" placeholder="不填按原名称" v-model:value="scope.row.customName"></el-input>
</div>
</template>
</el-table-column>
<el-table-column v-if="hasShare ==='true'" label="自定义编号" min-width="180">
<template slot-scope="scope">
<div slot="—" class="name-wrapper">
<el-input size="mini" placeholder="不填按原编号" v-model:value="scope.row.customDeviceId"></el-input>
</div>
</template>
</el-table-column>
<el-table-column v-if="hasShare ==='true'" label="" min-width="80">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="saveCustom(scope.row)">保存
</el-button>
</template>
</el-table-column>
<el-table-column prop="gbManufacturer" label="厂家" min-width="100">
</el-table-column>
<el-table-column label="类型" min-width="100">
@@ -415,6 +435,31 @@ export default {
});
},
saveCustom: function (row) {
this.$axios({
method: 'post',
url: `/api/platform/channel/custom/update`,
data: row
}).then((res)=> {
if (res.data.code === 0) {
this.$message.success({
showClose: true,
message: "保存成功"
})
this.initData()
}else {
this.$message.error({
showClose: true,
message: res.data.msg
})
}
}).catch((error)=> {
this.$message.error({
showClose: true,
message: error
})
});
},
search: function () {
this.currentPage = 1;
this.total = 0;