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

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

Loading…
Cancel
Save