From 3ca1122ab463a42ec6435eabac60927cddbabf0a Mon Sep 17 00:00:00 2001 From: pixel <303176530@qq.com> Date: Mon, 30 Mar 2020 17:59:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=8A=A8=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=A0=A1=E9=AA=8C=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QMPlusServer/controller/api/sys_authority.go | 13 ++----------- .../src/view/systemTools/autoCode/index.vue | 7 +++++++ 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/QMPlusServer/controller/api/sys_authority.go b/QMPlusServer/controller/api/sys_authority.go index d86d50de..3c51a26e 100644 --- a/QMPlusServer/controller/api/sys_authority.go +++ b/QMPlusServer/controller/api/sys_authority.go @@ -8,17 +8,12 @@ import ( "github.com/gin-gonic/gin" ) -type CreateAuthorityParams struct { - AuthorityId string `json:"authorityId"` - AuthorityName string `json:"authorityName"` -} - // @Tags authority // @Summary 创建角色 // @Security ApiKeyAuth // @accept application/json // @Produce application/json -// @Param data body api.CreateAuthorityParams true "创建角色" +// @Param data body sysModel.SysAuthority true "创建角色" // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /authority/createAuthority [post] func CreateAuthority(c *gin.Context) { @@ -36,16 +31,12 @@ func CreateAuthority(c *gin.Context) { } } -type DeleteAuthorityPatams struct { - AuthorityId uint `json:"authorityId"` -} - // @Tags authority // @Summary 删除角色 // @Security ApiKeyAuth // @accept application/json // @Produce application/json -// @Param data body api.DeleteAuthorityPatams true "删除角色" +// @Param data body sysModel.SysAuthority true "删除角色" // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /authority/deleteAuthority [post] func DeleteAuthority(c *gin.Context) { diff --git a/QMPlusVuePage/src/view/systemTools/autoCode/index.vue b/QMPlusVuePage/src/view/systemTools/autoCode/index.vue index e04389cf..cbe36db8 100644 --- a/QMPlusVuePage/src/view/systemTools/autoCode/index.vue +++ b/QMPlusVuePage/src/view/systemTools/autoCode/index.vue @@ -142,6 +142,13 @@ export default { this.form.fields.splice(index,1) }, async enterForm(){ + if(this.form.fields.length<=0){ + this.$message({ + type:"error", + message:"请填写至少一个field" + }) + return false + } this.$refs.autoCodeForm.validate(async (valid) => { if (valid) { this.form.structName = toUpperCase(this.form.structName) -- GitLab