Commit 6d217452 authored by xj's avatar xj

.

parent d5fd6361
......@@ -24,3 +24,19 @@ export function deleteProduct(params) {
//-------------xj: --------------------
// 产品接口
export function getInterfaceList(params) {
return http.post(`${baseURL}/zwfw/product/interface/list`, params);
}
// 新增编辑产品接口
export function getInterfaceSave(params) {
return http.post(`${baseURL}/zwfw/product/interface/save`, params);
}
// 查看产品接口
export function getInterfaceInfo(params) {
return http.get(`${baseURL}/zwfw/product/interface/info`, params);
}
// 删除产品接口
export function getInterfaceDelete(params) {
return http.get(`${baseURL}/zwfw/product/interface/delete`, params);
}
\ No newline at end of file
......@@ -2,14 +2,14 @@
<div class="PoliticsShow-Container">
<div class="header_box">
<div>
<button class="add_btn">
<button class="add_btn" @click="openDetails('新增',{})">
<span>新增</span>
</button>
</div>
<span>
<a-input
allowClear
v-model="searchName"
v-model="query.interfaceName"
placeholder="请输入接口名称查询"
>
<a-icon slot="prefix" type="search" />
......@@ -67,14 +67,14 @@
:dataSource="tableSourceData"
>
<template slot="operation" slot-scope="text, record, index">
<a-button type="link" @click="openDetails"
>详情{{ index + 1 }}</a-button
<a-button type="link" @click="openDetails('详情',record)"
>详情</a-button
>
<a-button type="link" @click="openDetails"
>编辑{{ index + 1 }}</a-button
<a-button type="link" @click="openDetails('编辑',record)"
>编辑</a-button
>
<a-button type="link" style="color: #ff4420"
>删除{{ index + 1 }}</a-button
>删除</a-button
>
</template>
</a-table>
......@@ -86,6 +86,7 @@
<script>
import table from "@/mixins/table";
import Details from "./components/Details.vue";
import {getInterfaceList} from '@/api/thePlatformIsSet.js'
export default {
mixins: [table],
name: "PortalAdminVueAlerting",
......@@ -103,42 +104,47 @@ export default {
{
title: "API名称",
align: "center",
dataIndex: "API名称",
dataIndex: "interfaceName",
},
{
title: "请求类型",
align: "center",
dataIndex: "请求类型",
dataIndex: "requestType",
customRender: (text, record, index) => `${record.requestType == 1 ? 'POST' : 'GET'}`,
},
{
title: "标签",
align: "center",
dataIndex: "标签",
dataIndex: "interfaceTag",
},
{
title: "请求协议",
align: "center",
dataIndex: "请求协议",
dataIndex: "requestProtocol",
customRender: (text, record, index) => `${record.requestProtocol == 1 ? 'HTTP' : 'HTTPS'}`,
},
{
title: "版本",
align: "center",
dataIndex: "版本",
dataIndex: "versionNumber",
},
{
title: "来源",
align: "center",
dataIndex: "来源",
dataIndex: "interfaceSource",
customRender: (text, record, index) => `${record.interfaceSource == 1 ? '自有' : '非自有'}`,
},
{
title: "策略",
align: "center",
dataIndex: "策略",
dataIndex: "limitStrategy",
customRender: (text, record, index) => `${record.limitStrategy == 1 ? '分钟' : '小时'}`,
},
{
title: "访问网络",
align: "center",
dataIndex: "访问网络",
dataIndex: "network",
customRender: (text, record, index) => `${record.network == 1 ? '互联网' : '政务网'}`,
},
{
......@@ -151,29 +157,26 @@ export default {
},
},
],
searchName: undefined,
query:{
interfaceName: undefined,
page:1,
size:10,
},
total:0
};
},
components: {
Details,
},
mounted() {
this.setMoment();
for (let key = 0; key < 20; key++) {
this.tableSourceData.push({
id: `00${key + 1}`,
API名称: `排队信息查询接口${key + 1}`,
请求类型: `POST${key + 1}`,
标签: `政务外网${key + 1}`,
请求协议: `HTTP${key + 1}`,
版本: `v1.0${key + 1}`,
来源: `自有${key + 1}`,
策略: `--${key + 1}`,
访问网络: `互联网${key + 1}`,
});
}
this.getList();
},
methods: {
getList() {
getInterfaceList(this.query).then(res=>{
this.tableSourceData = res.data.data
})
},
QueueState(type) {
switch (type) {
case 0:
......@@ -185,8 +188,8 @@ export default {
return "type0";
}
},
openDetails() {
this.$refs.Details.modalInfo.title = "新增接口";
openDetails(type) {
this.$refs.Details.modalInfo.title = type;
this.$refs.Details.modalInfo.visible = true;
this.$refs.Details.modalInfo.width = "55%";
},
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment