From 40aaa4db816163048512787487f060ff1a0a6ef0 Mon Sep 17 00:00:00 2001 From: lilu Date: Thu, 12 Jan 2023 10:21:09 +0800 Subject: [PATCH] =?UTF-8?q?api=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modular/main/DjyApiAuth.js | 53 ++++++++++ src/views/main/DjyApiAuth/index.vue | 99 +++++++++++++------ src/views/main/DjyApiAuth/modules/initData.js | 12 ++- 3 files changed, 131 insertions(+), 33 deletions(-) diff --git a/src/api/modular/main/DjyApiAuth.js b/src/api/modular/main/DjyApiAuth.js index e69de29..9528e3a 100644 --- a/src/api/modular/main/DjyApiAuth.js +++ b/src/api/modular/main/DjyApiAuth.js @@ -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 + }) +} \ No newline at end of file diff --git a/src/views/main/DjyApiAuth/index.vue b/src/views/main/DjyApiAuth/index.vue index a1df171..6c22c2b 100644 --- a/src/views/main/DjyApiAuth/index.vue +++ b/src/views/main/DjyApiAuth/index.vue @@ -6,26 +6,64 @@
- - + + - - + + - + + + + + + + + + + + + + + + + + 查询 重置 @@ -37,7 +75,7 @@
- + { - 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, diff --git a/src/views/main/DjyApiAuth/modules/initData.js b/src/views/main/DjyApiAuth/modules/initData.js index 905ed79..08cf1d5 100644 --- a/src/views/main/DjyApiAuth/modules/initData.js +++ b/src/views/main/DjyApiAuth/modules/initData.js @@ -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 } ] }