mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-23 21:47:49 +08:00
1078-支持编辑通道
This commit is contained in:
parent
18cfba612b
commit
9c2c4a92b1
@ -65,18 +65,6 @@
|
|||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-divider direction="vertical"></el-divider>
|
<el-divider direction="vertical"></el-divider>
|
||||||
<el-button size="medium" icon="el-icon-s-open" type="text"
|
|
||||||
v-if="scope.row.subCount > 0 || scope.row.parental === 1"
|
|
||||||
@click="changeSubchannel(scope.row)">查看
|
|
||||||
</el-button>
|
|
||||||
<el-divider v-if="scope.row.subCount > 0 || scope.row.parental === 1" direction="vertical"></el-divider>
|
|
||||||
<!-- <el-button size="medium" v-bind:disabled="device == null || device.online === 0"-->
|
|
||||||
<!-- icon="el-icon-video-camera"-->
|
|
||||||
<!-- type="text" @click="queryRecords(scope.row)">设备录像-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
<!-- <el-button size="medium" v-bind:disabled="device == null || device.online === 0" icon="el-icon-cloudy"-->
|
|
||||||
<!-- type="text" @click="queryCloudRecords(scope.row)">云端录像-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
<el-dropdown @command="(command)=>{moreClick(command, scope.row)}">
|
<el-dropdown @command="(command)=>{moreClick(command, scope.row)}">
|
||||||
<el-button size="medium" type="text" >
|
<el-button size="medium" type="text" >
|
||||||
更多功能<i class="el-icon-arrow-down el-icon--right"></i>
|
更多功能<i class="el-icon-arrow-down el-icon--right"></i>
|
||||||
@ -230,7 +218,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$message.error(res.data.msg);
|
this.$message.error(res.data.msg);
|
||||||
}
|
}
|
||||||
}).catch(function (e) {
|
}).catch((e)=> {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
this.isLoging = false;
|
this.isLoging = false;
|
||||||
// that.$message.error("请求超时");
|
// that.$message.error("请求超时");
|
||||||
@ -405,11 +393,15 @@ export default {
|
|||||||
},
|
},
|
||||||
// 编辑
|
// 编辑
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
if (this.isEdit()) {
|
this.$refs.channelEdit.openDialog(row, this.deviceId, () => {
|
||||||
this.$message.warning('请保存当前编辑项!');
|
this.$refs.channelEdit.close();
|
||||||
} else {
|
this.$message({
|
||||||
row.edit = true;
|
showClose: true,
|
||||||
}
|
message: "修改成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
setTimeout(this.getList, 200)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -41,6 +41,7 @@ export default {
|
|||||||
showDialog: false,
|
showDialog: false,
|
||||||
isLoging: false,
|
isLoging: false,
|
||||||
form: {},
|
form: {},
|
||||||
|
row: "",
|
||||||
deviceId: "",
|
deviceId: "",
|
||||||
isEdit: false,
|
isEdit: false,
|
||||||
rules: {
|
rules: {
|
||||||
@ -53,26 +54,21 @@ export default {
|
|||||||
console.log(row)
|
console.log(row)
|
||||||
this.showDialog = true;
|
this.showDialog = true;
|
||||||
this.isEdit = false;
|
this.isEdit = false;
|
||||||
|
this.form = {};
|
||||||
if (row) {
|
if (row) {
|
||||||
this.isEdit = true;
|
this.isEdit = true;
|
||||||
}
|
|
||||||
this.form = {};
|
|
||||||
this.deviceId = deviceId;
|
|
||||||
this.listChangeCallback = callback;
|
|
||||||
if (row != null) {
|
|
||||||
this.form = row;
|
this.form = row;
|
||||||
}
|
}
|
||||||
|
this.deviceId = deviceId;
|
||||||
|
this.listChangeCallback = callback;
|
||||||
},
|
},
|
||||||
onSubmit: function () {
|
onSubmit: function () {
|
||||||
console.log("onSubmit");
|
console.log("onSubmit");
|
||||||
|
let params = this.form
|
||||||
this.$axios({
|
this.$axios({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
url:`/api/jt1078/terminal/channel/${this.isEdit?'update':'add'}/`,
|
url:`/api/jt1078/terminal/channel/${this.isEdit?'update':'add'}/`,
|
||||||
params: {
|
params: params
|
||||||
terminalDbId: this.deviceId,
|
|
||||||
name: this.form.name,
|
|
||||||
channelId: this.form.channelId,
|
|
||||||
}
|
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res.data)
|
console.log(res.data)
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user