|
@@ -336,7 +336,9 @@ function cancel() {
|
|
}
|
|
}
|
|
// 复制按钮
|
|
// 复制按钮
|
|
function copyForm(){
|
|
function copyForm(){
|
|
- copyFormVal.value = form.value;
|
|
|
|
|
|
+ let _obj = form.value;
|
|
|
|
+ delete _obj["camera_id"];
|
|
|
|
+ copyFormVal.value = _obj;
|
|
proxy.$modal.msgSuccess("复制成功");
|
|
proxy.$modal.msgSuccess("复制成功");
|
|
}
|
|
}
|
|
// 粘贴按钮
|
|
// 粘贴按钮
|
|
@@ -362,21 +364,22 @@ function reset() {
|
|
function submitForm() {
|
|
function submitForm() {
|
|
proxy.$refs["cameraRef"].validate((valid) => {
|
|
proxy.$refs["cameraRef"].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- if (form.value.camera_id != null) {
|
|
|
|
- updateCamera(form.value).then((response) => {
|
|
|
|
- proxy.$modal.msgSuccess("修改成功");
|
|
|
|
- open.value = false;
|
|
|
|
- getList();
|
|
|
|
- reStart();
|
|
|
|
- });
|
|
|
|
- } else {
|
|
|
|
- addCamera(form.value).then((response) => {
|
|
|
|
- proxy.$modal.msgSuccess("新增成功");
|
|
|
|
- open.value = false;
|
|
|
|
- getList();
|
|
|
|
- reStart();
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ console.log(form.value)
|
|
|
|
+ // if (form.value.camera_id != null) {
|
|
|
|
+ // updateCamera(form.value).then((response) => {
|
|
|
|
+ // proxy.$modal.msgSuccess("修改成功");
|
|
|
|
+ // open.value = false;
|
|
|
|
+ // getList();
|
|
|
|
+ // reStart();
|
|
|
|
+ // });
|
|
|
|
+ // } else {
|
|
|
|
+ // addCamera(form.value).then((response) => {
|
|
|
|
+ // proxy.$modal.msgSuccess("新增成功");
|
|
|
|
+ // open.value = false;
|
|
|
|
+ // getList();
|
|
|
|
+ // reStart();
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|