Commit 2557e1b0 authored by 彭松's avatar 彭松

产品管理

parent f165714b
......@@ -31,6 +31,9 @@
<p>
<span>预约方式:</span>{{ orderInfo.up_type=='phone'?'微官网':orderInfo.up_type=='app'?'自助终端':orderInfo.up_type=='tftb'?'天府通办':'--' }}
</p>
<p>
<span>预约事项:</span>--
</p>
</div>
<div class="qrcode">
<!-- <img src="~@/assets/images/logo.png" alt="" /> -->
......
......@@ -2,83 +2,44 @@
<div class="PoliticsShow-Container">
<div class="header_box">
<div>
<button class="add_btn" @click="openDetails('新增',{})">
<button class="add_btn" @click="openDetails()">
<span>新增</span>
</button>
</div>
<span>
<a-input
allowClear
v-model="query.interfaceName"
placeholder="请输入接口名称查询"
>
<a-input allowClear v-model="query.interfaceName" placeholder="请输入接口名称查询">
<a-icon slot="prefix" type="search" />
</a-input>
<a-select default-value="001">
<!-- <a-select-option
v-for="(item, index) of selectOptions"
:key="index"
:value="item.value"
>
{{ item.label }}
</a-select-option> -->
<a-select-option value="001"> 来源001 </a-select-option>
<a-select-option value="002"> 来源002 </a-select-option>
<a-select v-model="query.interfaceSource">
<a-select-option value="">所有来源</a-select-option>
<a-select-option v-for="(item, index) of dict.interfaceSource" :key="index" :value="index">
{{ item }}
</a-select-option>
</a-select>
<a-select default-value="001">
<!-- <a-select-option
v-for="(item, index) of selectOptions"
:key="index"
:value="item.value"
>
{{ item.label }}
</a-select-option> -->
<a-select-option value="001"> 标签001 </a-select-option>
<a-select-option value="002"> 标签002 </a-select-option>
<a-select v-model="query.interfaceTag">
<a-select-option value="">所有标签</a-select-option>
<a-select-option v-for="(item, index) of dict.interfaceTag" :key="index" :value="index">
{{ item }}
</a-select-option>
</a-select>
<a-select default-value="001">
<!-- <a-select-option
v-for="(item, index) of selectOptions"
:key="index"
:value="item.value"
>
{{ item.label }}
</a-select-option> -->
<a-select-option value="001"> 策略001 </a-select-option>
<a-select-option value="002"> 策略002 </a-select-option>
</a-select>
<button class="search_btn">搜索</button>
<button class="search_btn" @click="getList()">搜索</button>
</span>
</div>
<div class="main">
<a-table
size="small"
bordered
:row-key="(record) => record.id"
:scroll="{ y: 590 }"
:pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<a-table size="small" bordered :row-key="(record) => record.id" :scroll="{ y: 590 }" :pagination="tablePagination"
@change="pagTableChange" :loading="tableLoading" :columns="tableHeaders" :dataSource="tableSourceData">
<template slot="network" slot-scope="text, record,index">
<span v-for="item, idx of dict.network" v-show="text.indexOf(idx) != -1" :key="idx"> {{ item }} </span>
</template>
<template slot="operation" slot-scope="text, record, index">
<a-button type="link" @click="openDetails('详情',record)"
>详情</a-button
>
<a-button type="link" @click="openDetails('编辑',record)"
>编辑</a-button
>
<a-button type="link" style="color: #ff4420"
>删除</a-button
>
<a-button type="link" @click="openDetails(record)">编辑</a-button>
<a-popconfirm title="确定要删除此应用吗?" ok-text="确定" cancel-text="取消" @confirm="delRow(record)">
<a-button type="link" style="color: #ff4420">删除{{ index + 1 }}</a-button>
</a-popconfirm>
</template>
</a-table>
<Details ref="Details" />
<Details ref="Details" :dict="dict" />
</div>
</div>
</template>
......@@ -86,7 +47,7 @@
<script>
import table from "@/mixins/table";
import Details from "./components/Details.vue";
import {getInterfaceList} from '@/api/thePlatformIsSet.js'
import { getInterfaceList, getInterfaceDelete } from '@/api/thePlatformIsSet.js'
export default {
mixins: [table],
name: "PortalAdminVueAlerting",
......@@ -116,12 +77,13 @@ export default {
title: "标签",
align: "center",
dataIndex: "interfaceTag",
customRender: (text, record, index) => this.dict.interfaceTag[text]
},
{
title: "请求协议",
align: "center",
dataIndex: "requestProtocol",
customRender: (text, record, index) => `${record.requestProtocol == 1 ? 'HTTP' : 'HTTPS'}`,
customRender: (text, record, index) => this.dict.requestProtocol[text]
},
{
title: "版本",
......@@ -132,7 +94,7 @@ export default {
title: "来源",
align: "center",
dataIndex: "interfaceSource",
customRender: (text, record, index) => `${record.interfaceSource == 1 ? '自有' : '非自有'}`,
customRender: (text, record, index) => this.dict.interfaceSource[text]
},
{
title: "策略",
......@@ -144,7 +106,9 @@ export default {
title: "访问网络",
align: "center",
dataIndex: "network",
customRender: (text, record, index) => `${record.network == 1 ? '互联网' : '政务网'}`,
scopedSlots: {
customRender: "network",
}
},
{
......@@ -157,12 +121,19 @@ export default {
},
},
],
query:{
query: {
interfaceName: undefined,
page:1,
size:10,
interfaceSource: "",
interfaceTag: ""
},
total:0
tablePagination: {
current: 1,
pageSize: 10
},
dict: {
},
total: 0
};
},
components: {
......@@ -173,8 +144,22 @@ export default {
},
methods: {
getList() {
getInterfaceList(this.query).then(res=>{
this.tableSourceData = res.data.data
getInterfaceList({
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
...this.query
}).then(res => {
if (res.code == 1) {
let {
data,
total,
dict
} = res.data;
this.dict = dict;
this.tableSourceData = data;
this.tablePagination.total = total;
return data
}
})
},
QueueState(type) {
......@@ -188,11 +173,35 @@ export default {
return "type0";
}
},
openDetails(type) {
this.$refs.Details.modalInfo.title = type;
delRow(item) {
getInterfaceDelete({
id: item.id
}).then((res) => {
let { code, msg } = res
if (code == 1) {
this.$message.success('删除成功');
this.getList()
} else {
this.$message.error(msg);
}
})
},
openDetails(item) {
if (item) {
this.$refs.Details.modalInfo.title = "编辑接口";
this.$refs.Details.getInfo(item.id)
} else {
this.$refs.Details.modalInfo.title = "新增接口";
}
this.$refs.Details.modalInfo.visible = true;
this.$refs.Details.modalInfo.width = "55%";
},
//分页
pagTableChange(page) {
this.tablePagination.current = page.current
this.tablePagination.pageSize = page.pageSize
this.getList();
},
},
};
</script>
......@@ -201,13 +210,15 @@ export default {
/deep/.ant-spin-container {
display: block;
}
.PoliticsShow-Container {
.header_box {
padding-bottom: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
& > div {
&>div {
display: flex;
justify-content: flex-start;
align-items: center;
......@@ -227,6 +238,7 @@ export default {
overflow: hidden;
background: #43a4ff;
color: ghostwhite;
& span {
position: relative;
z-index: 10;
......@@ -262,7 +274,7 @@ export default {
}
}
& > span {
&>span {
display: flex;
justify-content: space-between;
align-items: center;
......@@ -271,21 +283,26 @@ export default {
width: 15rem !important;
margin-right: 1rem !important;
}
/deep/.ant-input {
height: 2.3rem !important;
}
/deep/.ant-select-selection {
width: 170px !important;
height: 2.3rem !important;
margin-right: 1rem !important;
}
/deep/.ant-select-selection__rendered {
height: 100% !important;
}
/deep/.ant-select-selection-selected-value {
height: 100% !important;
line-height: 2.3rem !important;
}
.search_btn {
padding: 0.8rem 1.2rem;
border: 0;
......@@ -317,13 +334,16 @@ export default {
}
}
}
.main {
.type0 {
color: #888888;
}
.type1 {
color: #f94545;
}
.levelState {
padding: 5px 8px;
border-radius: 8px;
......@@ -331,12 +351,15 @@ export default {
background: #ffedeb;
border: 1px solid #f94545;
}
.type2 {
color: #04ca8f;
}
/deep/.ant-btn-link {
padding: 0 !important;
& + .ant-btn-link {
&+.ant-btn-link {
margin-left: 1rem !important;
}
}
......
......@@ -28,7 +28,7 @@
<a-button type="link" v-if="record.appFileUrl"
@click="handleDowload(record.appFileUrl)">下载应用{{ index + 1 }}</a-button>
<a-button type="link" @click="openDetails(record)">编辑{{ index + 1 }}</a-button>
<a-popconfirm title="确定要删除此应用吗?" ok-text="Yes" cancel-text="No" @confirm="delRow(record)">
<a-popconfirm title="确定要删除此应用吗?" ok-text="确定" cancel-text="取消" @confirm="delRow(record)">
<a-button type="link" style="color: #ff4420">删除{{ index + 1 }}</a-button>
</a-popconfirm>
......
......@@ -20,7 +20,7 @@
<a-button type="link" v-if="record.docFileUrl" @click="handleDowload(record.docFileUrl)">下载{{ index + 1
}}</a-button>
<a-button type="link" @click="openDetails(record)">编辑{{ index + 1 }}</a-button>
<a-popconfirm title="确定要删除此应用吗?" ok-text="Yes" cancel-text="No" @confirm="delRow(record)">
<a-popconfirm title="确定要删除此应用吗?" ok-text="确定" cancel-text="取消" @confirm="delRow(record)">
<a-button type="link" style="color: #ff4420">删除{{ index + 1 }}</a-button>
</a-popconfirm>
</template>
......
......@@ -24,7 +24,7 @@
</a-button>
</p>
<p>
<a-popconfirm title="确定要删除此产品吗?" ok-text="Yes" cancel-text="No" @confirm="delModal(item)">
<a-popconfirm title="确定要删除此产品吗?" ok-text="确定" cancel-text="取消" @confirm="delModal(item)">
<a-button type="link" size="small" style="color: #ff4d4f">
删除
</a-button>
......
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