updata->update
Updata->Update
This commit is contained in:
@@ -61,10 +61,10 @@ export const getApiById = (data) => {
|
||||
// @Produce application/json
|
||||
// @Param data body api.CreateApiParams true "更新api"
|
||||
// @Success 200 {string} json "{"success":true,"data":{},"msg":"更新成功"}"
|
||||
// @Router /api/updataApi [post]
|
||||
export const updataApi = (data) => {
|
||||
// @Router /api/updateApi [post]
|
||||
export const updateApi = (data) => {
|
||||
return service({
|
||||
url: "/api/updataApi",
|
||||
url: "/api/updateApi",
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
||||
@@ -7,11 +7,11 @@ import service from '@/utils/request'
|
||||
// @Produce application/json
|
||||
// @Param data body api.CreateAuthorityPatams true "更改角色api权限"
|
||||
// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
|
||||
// @Router /casbin/casbinPUpdata [post]
|
||||
// @Router /casbin/casbinPUpdate [post]
|
||||
|
||||
export const casbinPUpdata = (data) => {
|
||||
export const casbinPUpdate = (data) => {
|
||||
return service({
|
||||
url: "/casbin/casbinPUpdata",
|
||||
url: "/casbin/casbinPUpdate",
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
||||
@@ -25,10 +25,10 @@ export const createExaCustomer = (data) => {
|
||||
// @Produce application/json
|
||||
// @Param data body dbModel.ExaCustomer true "更新客户信息"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
||||
// @Router /customer/updataExaCustomer [post]
|
||||
export const updataExaCustomer = (data) => {
|
||||
// @Router /customer/updateExaCustomer [post]
|
||||
export const updateExaCustomer = (data) => {
|
||||
return service({
|
||||
url: "/customer/updataExaCustomer",
|
||||
url: "/customer/updateExaCustomer",
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
||||
@@ -90,10 +90,10 @@ export const deleteBaseMenu = (data) => {
|
||||
// @Summary 修改menu列表
|
||||
// @Produce application/json
|
||||
// @Param menu Object
|
||||
// @Router /menu/updataBaseMenu [post]
|
||||
export const updataBaseMenu = (data) => {
|
||||
// @Router /menu/updateBaseMenu [post]
|
||||
export const updateBaseMenu = (data) => {
|
||||
return service({
|
||||
url: "/menu/updataBaseMenu",
|
||||
url: "/menu/updateBaseMenu",
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<el-table-column label="接入人ID" prop="sysUserId" width="120"></el-table-column>
|
||||
<el-table-column label="按钮组">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="updataCustomer(scope.row)" size="small" type="text">变更</el-button>
|
||||
<el-button @click="updateCustomer(scope.row)" size="small" type="text">变更</el-button>
|
||||
<el-popover
|
||||
placement="top"
|
||||
width="160"
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
import {
|
||||
createExaCustomer,
|
||||
updataExaCustomer,
|
||||
updateExaCustomer,
|
||||
deleteExaCustomer,
|
||||
getExaCustomer,
|
||||
getExaCustomerList
|
||||
@@ -113,7 +113,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
async updataCustomer(row){
|
||||
async updateCustomer(row){
|
||||
const res = await getExaCustomer(row)
|
||||
this.type = "update"
|
||||
if(res.success){
|
||||
@@ -138,7 +138,7 @@ export default {
|
||||
res =await createExaCustomer(this.form)
|
||||
break;
|
||||
case "update":
|
||||
res =await updataExaCustomer(this.form)
|
||||
res =await updateExaCustomer(this.form)
|
||||
break;
|
||||
default:
|
||||
res =await createExaCustomer(this.form)
|
||||
|
||||
@@ -103,7 +103,7 @@ import {
|
||||
getApiById,
|
||||
getApiList,
|
||||
createApi,
|
||||
updataApi,
|
||||
updateApi,
|
||||
deleteApi
|
||||
} from '@/api/api'
|
||||
import infoList from '@/components/mixins/infoList'
|
||||
@@ -231,7 +231,7 @@ export default {
|
||||
break
|
||||
case 'edit':
|
||||
{
|
||||
const res = await updataApi(this.form)
|
||||
const res = await updateApi(this.form)
|
||||
if (res.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { getAllApis } from '@/api/api'
|
||||
import { casbinPUpdata, getPolicyPathByAuthorityId } from '@/api/casbin'
|
||||
import { casbinPUpdate, getPolicyPathByAuthorityId } from '@/api/casbin'
|
||||
export default {
|
||||
name: 'Apis',
|
||||
props: {
|
||||
@@ -72,7 +72,7 @@ export default {
|
||||
}
|
||||
casbinInfos.push(casbinInfo)
|
||||
})
|
||||
const res = await casbinPUpdata({
|
||||
const res = await casbinPUpdate({
|
||||
authorityId: this.activeUserId,
|
||||
casbinInfos
|
||||
})
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
// 获取列表内容封装在mixins内部 getTableData方法 初始化已封装完成
|
||||
|
||||
import {
|
||||
updataBaseMenu,
|
||||
updateBaseMenu,
|
||||
getMenuList,
|
||||
addBaseMenu,
|
||||
deleteBaseMenu,
|
||||
@@ -186,7 +186,7 @@ export default {
|
||||
let res
|
||||
this.form.name = this.form.path
|
||||
if (this.isEdit) {
|
||||
res = await updataBaseMenu(this.form)
|
||||
res = await updateBaseMenu(this.form)
|
||||
} else {
|
||||
res = await addBaseMenu(this.form)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user