api临时提交

dev
lilu 2 years ago
parent 9e0537d3e9
commit 40aaa4db81

@ -0,0 +1,53 @@
import { axios } from '@/utils/request'
/**
* 查询品名台账
*
*/
export function GetApiPage (parameter) {
return axios({
url: '/DjyApiAuth/page',
method: 'get',
params: parameter
})
}
export function SaveApi (parameter) {
return axios({
url: '/DjyApiAuth/save',
method: 'post',
data: parameter
})
}
export function DeleteApi (parameter) {
return axios({
url: '/DjyApiAuth/delete',
method: 'post',
data: parameter
})
}
export function GetApiDetail (parameter) {
return axios({
url: '/DjyApiAuth/detail',
method: 'get',
params: parameter
})
}
export function ResetApi (parameter) {
return axios({
url: '/DjyApiAuth/SecretReset',
method: 'post',
data: parameter
})
}
export function DisableApi (parameter) {
return axios({
url: '/DjyApiAuth/SetDisable',
method: 'post',
data: parameter
})
}

@ -6,26 +6,64 @@
<div slot="content" class="table-page-search-wrapper">
<a-form layout="inline" :form="form">
<a-row :gutter="48">
<a-col :md="6" :sm="24">
<a-form-item label="品名分类">
<a-col :md="4" :sm="24">
<a-form-item label="接口代码">
<a-input
placeholder="请输入品名分类"
v-decorator="['goodsCategory', { rules: [{ required: false, message: '请输入品名分类' }] }]"
placeholder="请输入接口代码"
v-decorator="['ApiCode', { rules: [{ required: false, message: '请输入接口代码' }] }]"
/>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="品名分类名称">
<a-col :md="4" :sm="24">
<a-form-item label="接口名称">
<a-input
placeholder="请输入品名分类名称"
placeholder="请输入接口名称"
v-decorator="[
'goodsCategoryName',
{ rules: [{ required: false, message: '请输入品名分类名称' }] },
'ApiName',
{ rules: [{ required: false, message: '请输入接口名称' }] },
]"
/>
</a-form-item>
</a-col>
<a-col :md="12" :sm="24" :labelCol="{ span: 2, offset: 12 }">
<a-col :md="4" :sm="24">
<a-form-item label="是否禁用">
<a-switch v-decorator="['IsDisable']"/>
</a-form-item>
</a-col>
<a-col :md="4" :sm="24">
<a-form-item label="租户名称">
<a-input
placeholder="请输入租户名称"
v-decorator="[
'TenantName',
{ rules: [{ required: false, message: '请输入租户名称' }] },
]"
/>
</a-form-item>
</a-col>
<a-col :md="4" :sm="24">
<a-form-item label="用户姓名">
<a-input
placeholder="请输入用户姓名"
v-decorator="[
'UserName',
{ rules: [{ required: false, message: '请输入用户姓名' }] },
]"
/>
</a-form-item>
</a-col>
<!-- <a-col :md="6" :sm="24">
<a-form-item label="搜索值">
<a-input
placeholder="请输入搜索值"
v-decorator="[
'SearchValue',
{ rules: [{ required: false, message: '请输入搜索值' }] },
]"
/>
</a-form-item>
</a-col> -->
<a-col :md="4" :sm="24" :labelCol="{ span: 2, offset: 12 }">
<span class="table-page-search-submitButtons" style="text-align: right">
<a-button type="primary" @click="tableRefresh"></a-button>
<a-button style="margin-left: 8px" @click="tableReset"></a-button>
@ -37,7 +75,7 @@
</x-card>
<x-card class="content-table">
<div slot="content" class="table-page-search-wrapper" :style="{ marginTop: '-8px' }">
<vxe-toolbar>
<!-- <vxe-toolbar>
<template #buttons>
<a-button type="primary" icon="edit" @click="addProject"></a-button>
</template>
@ -48,7 +86,7 @@
</span>
</div>
</template>
</vxe-toolbar>
</vxe-toolbar> -->
<vxe-grid
ref="xGrid"
v-bind="gridOptions"
@ -74,11 +112,11 @@ import initData from './modules/initData'
import columnSetting from '@/components/tableColumnSetting'
import addForm from './modules/addFrom'
import {
GetParaGoodsCategoryPage,
SaveParaGoodsCategoryInfo,
DeleteParaGoodsCategoryInfo,
GetParaGoodsCategoryInfo,
} from '@/api/modular/main/ProductCategoryList'
GetApiPage,
SaveApi,
DeleteApi,
GetApiDetail,
} from '@/api/modular/main/DjyApiAuth'
export default {
name: 'BookingLedger',
@ -91,7 +129,7 @@ export default {
return {
form: this.$form.createForm(this),
setVisible: false,
showColumns: null,
// showColumns: null,
gridOptions: {
border: false,
resizable: true,
@ -117,7 +155,7 @@ export default {
}
},
created() {
this.showColumns = JSON.parse(JSON.stringify(initData.columns))
// this.showColumns = JSON.parse(JSON.stringify(initData.columns))
this.getList()
},
mounted() {},
@ -162,15 +200,20 @@ export default {
})
},
getList(queryParam = {}) {
debugger
const { currentPage, pageSize } = this.gridOptions.pagerConfig
GetParaGoodsCategoryPage({
goodsCategory: queryParam.goodsCategory,
goodsCategoryName: queryParam.goodsCategoryName,
GetApiPage({
ApiCode: queryParam.ApiCode,
ApiName: queryParam.ApiName,
IsDisable: queryParam.IsDisable,
TenantName: queryParam.TenantName,
UserName: queryParam.UserName,
pageNo: currentPage,
pageSize: pageSize,
pageSize: pageSize
})
.then((res) => {
const _data = res.data.items.map((item, index) => {
debugger
const _data = res.data.rows.map((item, index) => {
item.row_id = (currentPage - 1) * pageSize + index
return item
})
@ -186,7 +229,7 @@ export default {
editColumns(data) {
this.addFromType = 'edit'
this.addFromId = data.id
GetParaGoodsCategoryInfo({
GetApiDetail({
id: this.addFromId,
}).then((res) => {
if (res.success) {
@ -199,7 +242,7 @@ export default {
})
},
removeColumns(data) {
DeleteParaGoodsCategoryInfo(data.id).then((res) => {
DeleteApi(data.id).then((res) => {
if (res.success) {
this.$message.success('删除成功')
const {
@ -240,7 +283,7 @@ export default {
return Number(item.id)
})
console.log(pkIdArr)
DeleteParaGoodsCategoryInfo({
DeleteApi({
Ids: pkIdArr,
}).then((res) => {
if (res.success) {
@ -267,7 +310,7 @@ export default {
form.validateFields((errors, values) => {
if (!errors) {
console.log('values', values)
SaveParaGoodsCategoryInfo({
SaveApi({
id: this.addFromId,
goodsCode: values.goodsCode,
goodsNameCN: values.goodsNameCN,

@ -1,11 +1,13 @@
export default {
columns: [
{ type: 'seq', width: 60, noDraggable: true },
{ field: 'goodsCategory', title: '品名分类', showHeaderOverflow: true, sortable: true },
{ field: 'goodsCategoryName', title: '品名分类名称', showHeaderOverflow: true, sortable: true },
{ field: 'createUserName', title: '创建者名称', showHeaderOverflow: true, sortable: true },
{ field: 'createTime', title: '创建时间', showHeaderOverflow: true, sortable: true },
{ field: 'updateTime', title: '更新时间', showHeaderOverflow: true, sortable: true },
{ field: 'apiCode', title: '接口代码', showHeaderOverflow: true, sortable: true },
{ field: 'apiName', title: '接口名称', showHeaderOverflow: true, sortable: true },
{ field: 'isDisable', title: '是否禁用', showHeaderOverflow: true, sortable: true },
{ field: 'tenantName', title: '租户名称', showHeaderOverflow: true, sortable: true },
{ field: 'userCode', title: '用户代码', showHeaderOverflow: true, sortable: true },
{ field: 'userName', title: '用户名', showHeaderOverflow: true, sortable: true },
{ field: 'createdTime', title: '创建时间', showHeaderOverflow: true, sortable: true },
{ field: 'operate', title: '操作', width: 150, noDraggable: true, slots: { default: 'operate' }, fixed: 'right', resizable: false }
]
}

Loading…
Cancel
Save