From 0076869deb832639e01674c5fcd802ecc09592da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=AE=97=E6=B4=8B?= Date: Mon, 17 Apr 2023 16:21:06 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=E8=A1=A8?= =?UTF-8?q?=EF=BC=9A=E5=A6=82=E6=9E=9C=E4=BF=AE=E6=94=B9=E7=9A=84=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E6=98=AF=E4=B8=BB=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mayfly_go_web/src/views/ops/db/component/DbTable.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mayfly_go_web/src/views/ops/db/component/DbTable.vue b/mayfly_go_web/src/views/ops/db/component/DbTable.vue index 2d3c5522..4ea13239 100644 --- a/mayfly_go_web/src/views/ops/db/component/DbTable.vue +++ b/mayfly_go_web/src/views/ops/db/component/DbTable.vue @@ -268,6 +268,10 @@ const submitUpdateFields = () => { let primaryKeyName = a.primaryKeyName; a.fields.forEach(f => { sql += ` ${f.fieldName} = ${DbInst.wrapColumnValue(f.fieldType, f.newValue)},` + // 如果修改的字段是主键 + if(f.fieldName === primaryKeyName){ + primaryKey = f.oldValue + } divs.push(f.div) }) sql = sql.substring(0, sql.length - 1)