Commit 0f60bdcc authored by 彭松's avatar 彭松

1

parent 1748f3e6
...@@ -626,6 +626,15 @@ const routes = [ ...@@ -626,6 +626,15 @@ const routes = [
), ),
meta: { title: "接口信息" }, meta: { title: "接口信息" },
}, },
{
path: "dictionary",
name: "dictionary",
component: () =>
import(
/* webpackChunkName: "portDocument" */ "@/views/thePlatformIsSet/components/dictionary/dictionary.vue"
),
meta: { title: "字典管理" },
},
{ {
path: "permissionsModel", path: "permissionsModel",
name: "permissionsModel", name: "permissionsModel",
......
...@@ -3,11 +3,7 @@ ...@@ -3,11 +3,7 @@
<div class="search_box" ref="search_box"> <div class="search_box" ref="search_box">
<h3>API服务</h3> <h3>API服务</h3>
<h4> <h4>
<a-input <a-input placeholder="请输入API名称搜索" v-model="searchVal" @pressEnter="getServiceApiList" />
placeholder="请输入API名称搜索"
v-model="searchVal"
@pressEnter="getServiceApiList"
/>
<button class="search_btn btn" @click="handleSearch"> <button class="search_btn btn" @click="handleSearch">
<span>{{ isSearch ? "重置" : "搜索" }}</span> <span>{{ isSearch ? "重置" : "搜索" }}</span>
</button> </button>
...@@ -16,13 +12,9 @@ ...@@ -16,13 +12,9 @@
<div class="stepbox" :style="{ height: contentHigh + 'px' }"> <div class="stepbox" :style="{ height: contentHigh + 'px' }">
<div class="_left"> <div class="_left">
<a-steps progress-dot direction="vertical"> <a-steps progress-dot direction="vertical">
<a-step <a-step v-for="(item, index) in stepsList" :status="active === index ? 'process' : 'wait'" :key="index">
v-for="(item, index) in stepsList"
:status="active === index ? 'process' : 'wait'"
:key="index"
>
<span slot="title" @click="handleChange(item, index)">{{ <span slot="title" @click="handleChange(item, index)">{{
item.serviceName item.productName
}}</span> }}</span>
</a-step> </a-step>
</a-steps> </a-steps>
...@@ -30,17 +22,13 @@ ...@@ -30,17 +22,13 @@
<div class="_right"> <div class="_right">
<div class="list_box step_sign"> <div class="list_box step_sign">
<div class="title-box"> <div class="title-box">
<span class="list_title">{{ curApiInfo.serviceName }}</span> <span class="list_title">{{ curApiInfo.name }}</span>
<span class="count primary">{{ curApiInfo.count }}</span> <span class="count primary">{{ curApiInfo.total }}</span>
</div> </div>
<div <div class="list flex aic jcb" v-for="v in curApiInfo.list" :key="v.id">
class="list flex aic jcb" <div class="api-name">{{ v.interfaceName }}</div>
v-for="v in curApiInfo.serviceList" <span class="service-name">{{ v.description }}</span>
:key="v.id" <a-button icon="read" type="primary" class="addclass" @click="pushroeuter(v)">
>
<div class="api-name">{{ v.apiName }}</div>
<span class="service-name">{{ v.systemServiceName }}</span>
<a-button icon="read" type="primary" class="addclass" @click="pushroeuter(v)">
查看文档 查看文档
</a-button> </a-button>
</div> </div>
...@@ -51,7 +39,8 @@ ...@@ -51,7 +39,8 @@
</template> </template>
<script> <script>
import { serviceApiList } from "@/api/APIServe.js"; // import { serviceApiList } from "@/api/APIServe.js";
import { getProduct, getInterfaceList } from "@/api/thePlatformIsSet.js";
import common from "@/mixins/common"; import common from "@/mixins/common";
export default { export default {
name: "PortalAdminVueAPIServe", name: "PortalAdminVueAPIServe",
...@@ -62,6 +51,7 @@ export default { ...@@ -62,6 +51,7 @@ export default {
stepsList: [], stepsList: [],
isSearch: false, isSearch: false,
active: 0, active: 0,
curApiInfo: {}, // 当前api信息 curApiInfo: {}, // 当前api信息
}; };
}, },
...@@ -74,22 +64,35 @@ export default { ...@@ -74,22 +64,35 @@ export default {
methods: { methods: {
getServiceApiList() { getServiceApiList() {
serviceApiList({ getProduct({
page: 1, page: 1,
size: -1, //每页条数 size: -1, //每页条数
apiName: `%${this.searchVal}%`, productName: `%${this.searchVal}%`,
}).then((res) => { }).then((res) => {
let { code, data } = res; let { code, data } = res;
if (code == 1) { if (code == 1) {
if (data.data.length) { if (data.data.length) {
this.stepsList = data.data; this.stepsList = data.data;
this.curApiInfo = data.data[0]; this.getApiDetail(data.data[0])
} else { } else {
this.curApiInfo = {}; this.curApiInfo = {};
} }
} }
}); });
}, },
getApiDetail(item) {
getInterfaceList({ page: 1, size: -1, productId: item.id }).then((res) => {
let { code, data } = res;
if (code == 1) {
this.curApiInfo = {
name: item.productName,
list: data.data,
total: data.total
}
}
});
},
handleSearch() { handleSearch() {
this.isSearch = !this.isSearch; this.isSearch = !this.isSearch;
if (this.isSearch) { if (this.isSearch) {
...@@ -104,15 +107,14 @@ export default { ...@@ -104,15 +107,14 @@ export default {
// 切换设备 // 切换设备
handleChange(row, index) { handleChange(row, index) {
this.active = index; this.active = index;
this.curApiInfo = row;
this.searchVal = ""; this.searchVal = "";
this.getApiDetail(row)
}, },
pushroeuter() { pushroeuter(v) {
this.$message.warning("暂未开通文档查看"); this.$router.push({
// this.$router.push({ path: "/home/thePlatformIsSet/portDocument",
// path: "/home/thePlatformIsSet/portDocument", query: { id: v.id },
// // query: { testoption: "test001" }, });
// });
}, },
}, },
}; };
...@@ -120,12 +122,14 @@ export default { ...@@ -120,12 +122,14 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
@headerH: 4.5rem; @headerH: 4.5rem;
.Container { .Container {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
background: #f5f5f5; background: #f5f5f5;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.search_box { .search_box {
height: 300px; height: 300px;
background: url("~@/assets/images/u210.png") top no-repeat; background: url("~@/assets/images/u210.png") top no-repeat;
...@@ -134,16 +138,19 @@ export default { ...@@ -134,16 +138,19 @@ export default {
align-items: center; align-items: center;
display: flex; display: flex;
flex-flow: column; flex-flow: column;
h3 { h3 {
font-size: 2.4rem; font-size: 2.4rem;
color: #fff; color: #fff;
font-weight: bold; font-weight: bold;
padding: 4rem 0 2rem; padding: 4rem 0 2rem;
} }
h4 { h4 {
display: flex; display: flex;
align-items: center; align-items: center;
} }
/deep/.ant-input { /deep/.ant-input {
width: 30rem !important; width: 30rem !important;
margin-right: 2rem; margin-right: 2rem;
...@@ -169,7 +176,8 @@ export default { ...@@ -169,7 +176,8 @@ export default {
line-height: 42px; line-height: 42px;
padding: 0; padding: 0;
border: none; border: none;
& > span {
&>span {
position: relative; position: relative;
display: block; display: block;
width: 100%; width: 100%;
...@@ -213,8 +221,8 @@ export default { ...@@ -213,8 +221,8 @@ export default {
width: 100%; width: 100%;
} }
& > span:before, &>span:before,
& > span:after { &>span:after {
position: absolute; position: absolute;
content: ""; content: "";
left: 0; left: 0;
...@@ -227,39 +235,43 @@ export default { ...@@ -227,39 +235,43 @@ export default {
transition: all 0.3s ease; transition: all 0.3s ease;
} }
& > span:before { &>span:before {
width: 2px; width: 2px;
height: 0%; height: 0%;
} }
& > span:after { &>span:after {
height: 2px; height: 2px;
width: 0%; width: 0%;
} }
& > span:hover:before { &>span:hover:before {
height: 100%; height: 100%;
} }
& > span:hover:after { &>span:hover:after {
width: 100%; width: 100%;
} }
} }
} }
.stepbox { .stepbox {
width: 90%; width: 90%;
margin-left: 5%; margin-left: 5%;
flex: 1; flex: 1;
display: flex; display: flex;
/deep/.ant-steps-item-content { /deep/.ant-steps-item-content {
cursor: pointer; cursor: pointer;
} }
._left { ._left {
width: 300px; width: 300px;
height: 100%; height: 100%;
padding: 20px; padding: 20px;
margin-right: 20px; margin-right: 20px;
overflow: auto; overflow: auto;
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 3px; width: 3px;
height: 3px; height: 3px;
...@@ -282,6 +294,7 @@ export default { ...@@ -282,6 +294,7 @@ export default {
height: 100%; height: 100%;
padding: 20px; padding: 20px;
overflow-y: auto; overflow-y: auto;
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 3px; width: 3px;
height: 3px; height: 3px;
...@@ -297,16 +310,20 @@ export default { ...@@ -297,16 +310,20 @@ export default {
border-radius: 3px; border-radius: 3px;
background: #fff; background: #fff;
} }
.title-box { .title-box {
font-size: 24px; font-size: 24px;
.list_title { .list_title {
margin-right: 10px; margin-right: 10px;
font-weight: 600; font-weight: 600;
} }
.count { .count {
font-weight: 600; font-weight: 600;
} }
} }
.list { .list {
width: 100%; width: 100%;
height: 80px; height: 80px;
...@@ -314,38 +331,35 @@ export default { ...@@ -314,38 +331,35 @@ export default {
padding: 0px 20px; padding: 0px 20px;
background-color: #fff; background-color: #fff;
border-radius: 4px; border-radius: 4px;
.api-name { .api-name {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
} }
.service-name { .service-name {
font-size: 14px; font-size: 14px;
} }
} }
} }
} }
&::before { &::before {
content: ""; content: "";
display: block; display: block;
width: 100%; width: 100%;
height: @headerH; height: @headerH;
background: rgb(59, 135, 255); background: rgb(59, 135, 255);
background: -moz-linear-gradient( background: -moz-linear-gradient(174deg,
174deg, rgba(59, 135, 255, 1) 24%,
rgba(59, 135, 255, 1) 24%, rgba(108, 53, 247, 1) 85%);
rgba(108, 53, 247, 1) 85% background: -webkit-linear-gradient(174deg,
); rgba(59, 135, 255, 1) 24%,
background: -webkit-linear-gradient( rgba(108, 53, 247, 1) 85%);
174deg, background: linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85% rgba(108, 53, 247, 1) 85%);
); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff", endColorstr="#6c35f7", GradientType=1);
background: linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff",endColorstr="#6c35f7",GradientType=1);
} }
} }
</style> </style>
\ No newline at end of file
<template>
<div class="Container">
<div class="my-card">
<div class="head-menu">
<div>属性字典</div>
</div>
<div class="pd20">
<div class="from-item">
<div class="name">排队机分辨率:</div>
<div>
<a-tag color="blue" closable v-for="item, index in fblList" :key="index">
{{ item.name }}
</a-tag>
</div>
<a-button icon="plus" size="small" @click="addZdShow('fblList', '排队机分辨率')">添加字典值</a-button>
</div>
<div class="from-item">
<div class="name">接口标签:</div>
<div>
<a-tag color="blue" closable v-for="item, index in bqList" :key="index">
{{ item.name }}
</a-tag>
</div>
<a-button icon="plus" size="small" @click="addZdShow('bqList', '接口标签')">添加字典值</a-button>
</div>
</div>
</div>
<a-modal :title="VisibleTitle" :centered="true" :destroyOnClose="true" :visible="Visible" @cancel="Visible = false"
width="30%">
<a-form-model :label-col="{ span: 5 }" :wrapper-col="{ span: 19 }" layout="horizontal" ref="appInfoFome"
:model="appInfoFome" :rules="appInfoRules">
<a-form-model-item label="字典值" prop="productName">
<a-input placeholder="请输入字典值" allowClear v-model="appInfoFome.productName" />
</a-form-model-item>
</a-form-model>
<template slot="footer">
<a-button type="primary" class="addclass" @click="Modal_Ok">确定</a-button>
<a-button @click="resetForm">重置</a-button>
</template>
</a-modal>
</div>
</template>
<script>
import common from "@/mixins/common";
export default {
name: "dictionary",
mixins: [common],
data() {
return {
fblList: [{
name: "1920*1080"
}, {
name: "1080*1920"
}, {
name: "1280*1280"
}],
bqList: [
{ name: "政务外网" },
{ name: "便民服务" },
{ name: "三化建设" },
],
VisibleTitle: "",
Visible: false,
appInfoFome: {
productName: undefined,
siteId: JSON.parse(localStorage.getItem("siteId"))
}, //页面表单信息
appInfoRules: {
productName: [
{
required: true, //是否必选
whitespace: true, //必选时,空格是否会被视为错误
message: "请输入字典值",
trigger: "blur",
}
],
},
keyName: ""
};
},
created() {
},
mounted() {
},
methods: {
addZdShow(key, title) {
this.Visible = true
this.resetForm()
this.keyName = key
this.VisibleTitle = title
},
Modal_Ok() {
this.$refs.appInfoFome.validate((valid) => {
if (valid) {
this[this.keyName].push({
name: this.appInfoFome.productName
})
this.Visible = false
this.resetForm()
} else {
this.$message.error(`请完善表单信息!`);
return false;
}
});
},
resetForm() {
this.$nextTick(() => {
this.appInfoFome.productName = ''
});
},
},
};
</script>
<style lang="less" scoped>
.from-item {
display: flex;
align-items: center;
margin-bottom: 20px;
.name {
width: 150px;
text-align: right;
padding-right: 20px;
}
}
.Container {
width: 100%;
min-height: 100vh;
background: #f5f5f5;
padding-top: 72px;
.my-card {
margin: 40px 80px;
background: #fff;
border-radius: 6px;
overflow: hidden;
min-height: 500px;
}
.head-menu {
display: flex;
align-items: center;
border-bottom: 1px solid #efefef;
div {
height: 52px;
line-height: 52px;
font-size: 16px;
font-weight: bold;
color: #0595FD;
border-bottom: 2px solid #0595FD;
padding: 0 30px;
margin-left: 20px;
}
}
}
</style>
\ No newline at end of file
...@@ -124,7 +124,8 @@ export default { ...@@ -124,7 +124,8 @@ export default {
query: { query: {
interfaceName: undefined, interfaceName: undefined,
interfaceSource: "", interfaceSource: "",
interfaceTag: "" interfaceTag: "",
productId: this.$route.query.id,
}, },
tablePagination: { tablePagination: {
current: 1, current: 1,
......
...@@ -104,7 +104,8 @@ export default { ...@@ -104,7 +104,8 @@ export default {
pageSize: 10 pageSize: 10
}, },
searchForm: { searchForm: {
deveLanguage: "" deveLanguage: "",
productId: this.$route.query.id,
}, },
dict: { dict: {
deveLanguage: {}, deveLanguage: {},
......
...@@ -101,6 +101,7 @@ export default { ...@@ -101,6 +101,7 @@ export default {
page: this.tablePagination.current, page: this.tablePagination.current,
size: this.tablePagination.pageSize, size: this.tablePagination.pageSize,
docName: this.searchName, docName: this.searchName,
productId: this.$route.query.id,
...search, ...search,
}).then((res) => { }).then((res) => {
if (res.code == 1) { if (res.code == 1) {
......
...@@ -91,12 +91,6 @@ export default { ...@@ -91,12 +91,6 @@ export default {
this.listData = res.data.data this.listData = res.data.data
}) })
}, },
pushroeuter() {
this.$router.push({
path: "/home/thePlatformIsSet/portDocument",
// query: { testoption: "test001" },
});
},
showModal(item) { showModal(item) {
if (item) { if (item) {
this.$refs.AddEditAppName.VisibleTitle = "编辑"; this.$refs.AddEditAppName.VisibleTitle = "编辑";
......
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