Commit ea4ed6b3 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 0eb01748 e921e769
...@@ -28,6 +28,7 @@ body { ...@@ -28,6 +28,7 @@ body {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
</style> </style>
</head> </head>
......
/* 颜色 */
.primary {
color: #1890FF;
}
.delete {
color: #FF4D4F;
}
.green {
color: #1BBC9B;
}
.clofff {
color: #fff;
}
.orange {
color: orange;
}
.bgdel {
background-color: #FF4D4F;
}
.bgpr {
background-color: #1890FF;
}
.bgg {
background-color: #1BBC9B;
}
/* 版心 */
.container {
width: 1200px;
}
/* 弹性布局 */
.flex {
display: flex;
}
.flex1 {
flex: 1
}
.flexc {
flex-direction: column;
}
.flexwrap {
flex-wrap: wrap;
}
.jcc {
justify-content: center;
}
.jca {
justify-content: space-around;
}
.jcb {
justify-content: space-between;
}
.jce {
justify-content: space-evenly;
}
.aic {
align-items: center;
}
.aca {
align-content: space-around;
}
.acb {
align-content: space-between;
}
.ace {
align-content: space-evenly;
}
/* margin */
.m10 {
margin: 10px
}
.m15 {
margin: 15px;
}
.m20 {
margin: 20px;
}
.mt10 {
margin-top: 10px;
}
.mt15 {
margin-top: 15px;
}
.mt20 {
margin-top: 20px;
}
.mt50 {
margin-top: 50px;
}
.ml10 {
margin-left: 10px;
}
.ml15 {
margin-left: 15px;
}
.ml20 {
margin-left: 20px;
}
.ml25 {
margin-left: 25px;
}
.mr10 {
margin-right: 10px;
}
.mr15 {
margin-right: 15px;
}
.mr20 {
margin-right: 20px;
}
.mr25 {
margin-right: 25px;
}
.mr50 {
margin-right: 50px;
}
.mb10 {
margin-bottom: 10px;
}
.mb15 {
margin-bottom: 15px;
}
.mb20 {
margin-bottom: 20px;
}
.mb25 {
margin-bottom: 25px;
}
/* padding */
.pd10 {
padding: 10px;
}
.pd15 {
padding: 15px;
}
.pd20 {
padding: 20px;
}
.pdt10 {
padding-top: 10px;
}
.pdt15 {
padding-top: 15px;
}
.pdt20 {
padding-top: 20px;
}
.pdt30 {
padding-top: 30px;
}
.pdl8 {
padding-left: 8px;
}
.pdl10 {
padding-left: 10px;
}
.pdl15 {
padding-left: 15px;
}
.pdl20 {
padding-left: 20px;
}
.pdr10 {
padding-right: 10px;
}
.pdr15 {
padding-right: 15px;
}
.pdr20 {
padding-right: 20px;
}
.pdb10 {
padding-bottom: 10px;
}
.pdb15 {
padding-bottom: 15px;
}
.pdb20 {
padding-bottom: 20px;
}
/* 字体大小 */
.font16 {
font-size: 16px;
}
.font18 {
font-size: 18px;
}
.font20 {
font-size: 20px;
}
.font22 {
font-size: 22px;
}
.font24 {
font-size: 24px;
}
.font26 {
font-size: 26px;
}
.font28 {
font-size: 28px;
}
.font30 {
font-size: 30px;
}
/* 字体位置 */
.tac {
text-align: center;
}
.tal {
text-align: left;
}
.tar {
text-align: right;
}
/* 加粗 */
.fontw600 {
font-weight: 600;
}
.fontw700 {
font-weight: 700;
}
.fontw800 {
font-weight: 800;
}
/* 手型鼠标 */
.pointer {
cursor: pointer;
}
.pagination {
margin-top: 10px;
text-align: right;
}
.color_title {
margin-left: 15px;
position: relative;
margin-bottom: 15px;
color: #1890ff;
}
.color_title::before {
content: "";
width: 4px;
height: 20px;
position: absolute;
top: 0px;
left: -16px;
background-color: rgba(5, 149, 253, 1);
}
::-webkit-scrollbar {
width: 6px;
height:6px;
overflow-y: auto;
}
::-webkit-scrollbar-thumb {
border-radius: 6px;
background-color: rgba(144, 147, 153, .5);
}
::-webkit-scrollbar-track {
border-radius: 6px;
background: #fff;
}
\ No newline at end of file
import 'babel-polyfill' import "babel-polyfill";
import Vue from 'vue' import Vue from "vue";
import App from './App.vue' import App from "./App.vue";
import router from './router' import router from "./router";
import store from './store' import store from "./store";
import Antd from "ant-design-vue";
import Antd from 'ant-design-vue'; import "ant-design-vue/dist/antd.css";
import 'ant-design-vue/dist/antd.css';
Vue.use(Antd); Vue.use(Antd);
import GlobalComponents from './utils/js/globalComponents'; import GlobalComponents from "./utils/js/globalComponents";
Vue.use(GlobalComponents) Vue.use(GlobalComponents);
import common from './utils/commin' import common from "./utils/commin";
Vue.use(common) Vue.use(common);
import "@/assets/css/common.css";
// 引入注册全局指令 // 引入注册全局指令
import * as directives from "@/directive" import * as directives from "@/directive";
Object.keys(directives).forEach(name => Vue.directive(name, directives[name])) Object.keys(directives).forEach((name) =>
Vue.directive(name, directives[name])
);
// 全局过滤器 // 全局过滤器
import * as filters from "@/filters" import * as filters from "@/filters";
Object.keys(filters).forEach(key => { Object.keys(filters).forEach((key) => {
Vue.filter(key, filters[key]) Vue.filter(key, filters[key]);
}) });
Vue.prototype.$bus = new Vue Vue.prototype.$bus = new Vue();
Vue.config.productionTip = false; Vue.config.productionTip = false;
new Vue({ new Vue({
router, router,
store, store,
render: h => h(App) render: (h) => h(App),
}).$mount('#app') }).$mount("#app");
...@@ -3,38 +3,49 @@ ...@@ -3,38 +3,49 @@
<div class="search_box" ref="search_box"> <div class="search_box" ref="search_box">
<h3>API服务</h3> <h3>API服务</h3>
<h4> <h4>
<a-input placeholder="请输入API名称搜索" v-model="searchVal" /> <a-input
<button class="search_btn btn" @click="getServiceApiList"> placeholder="请输入API名称搜索"
<span>搜索</span> v-model="searchVal"
@pressEnter="getServiceApiList"
/>
<button class="search_btn btn" @click="handleSearch">
<span>{{ isSearch ? "重置" : "搜索" }}</span>
</button> </button>
</h4> </h4>
</div> </div>
<div class="stepbox" :style="{ height: contentHigh + 'px' }"> <div class="stepbox" :style="{ height: contentHigh + 'px' }">
<div class="_left"> <div class="_left">
<a-steps direction="vertical" status="wait" v-model="activeStep"> <a-steps progress-dot direction="vertical">
<a-step <a-step
v-for="(item, index) in stepsList" v-for="(item, index) in stepsList"
:status="active === index ? 'process' : 'wait'"
:key="index" :key="index"
@click.native="stepChange(index)"
> >
<span slot="title">{{ item.serviceName }}</span> <span slot="title" @click="handleChange(item, index)">{{
<span class="stepIcon" slot="icon"></span> item.serviceName
}}</span>
</a-step> </a-step>
</a-steps> </a-steps>
</div> </div>
<el-scrollbar class="_right" ref="scroll"> <div class="_right">
<div v-for="(item, index) of stepsList" class="list_box step_sign"> <div class="list_box step_sign">
<h1 class="list_title">{{ item.serviceName }}</h1> <div class="title-box">
<div class="list" v-for="(itm, idx) of item.serviceList"> <span class="list_title">{{ curApiInfo.serviceName }}</span>
<b>{{ itm.apiName }}</b> <span class="count primary">{{ curApiInfo.count }}</span>
<span>{{ itm.systemServiceName }}</span> </div>
<!-- <i>失效时间:{{ $moment(itm.lapseTime).format("YYYY-MM-DD") }}</i> --> <div
<button class="examine_btn" @click="pushroeuter"> class="list flex aic jcb"
<i class="fa fa-file-o"></i> 查看文档 v-for="v in curApiInfo.serviceList"
</button> :key="v.id"
>
<div class="api-name">{{ v.apiName }}</div>
<span class="service-name">{{ v.systemServiceName }}</span>
<a-button icon="read" type="primary" @click="pushroeuter(v)">
查看文档
</a-button>
</div>
</div> </div>
</div> </div>
</el-scrollbar>
</div> </div>
</div> </div>
</template> </template>
...@@ -42,54 +53,66 @@ ...@@ -42,54 +53,66 @@
<script> <script>
import { serviceApiList } from "@/api/APIServe.js"; import { serviceApiList } from "@/api/APIServe.js";
import common from "@/mixins/common"; import common from "@/mixins/common";
import Vue from "vue";
import { Scrollbar } from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
Vue.use(Scrollbar);
export default { export default {
name: "PortalAdminVueAPIServe", name: "PortalAdminVueAPIServe",
mixins: [common], mixins: [common],
data() { data() {
return { return {
searchVal: undefined, searchVal: "",
stepsList: [], stepsList: [],
isSearch: false,
active: 0,
curApiInfo: {}, // 当前api信息
}; };
}, },
created() { created() {
this.getServiceApiList(); this.getServiceApiList();
}, },
mounted() { mounted() {
this.$nextTick(() => {
this.handleScroll();
this.setContentHigh(); this.setContentHigh();
});
window.addEventListener("resize", this.setContentHigh);
},
destroyed() {
window.removeEventListener("resize", this.setContentHigh);
}, },
methods: { methods: {
getServiceApiList() { getServiceApiList() {
serviceApiList({ serviceApiList({
page: 1, page: 1,
size: 10, //每页条数 size: -1, //每页条数
apiName: this.searchVal, apiName: `%${this.searchVal}%`,
}).then((res) => { }).then((res) => {
// console.log(res);
let { code, data } = res; let { code, data } = res;
if (code == 1) { if (code == 1) {
// this.$message.success(res.msg); if (data.data.length) {
this.stepsList = data.data; this.stepsList = data.data;
// console.log(this.stepsList); this.curApiInfo = data.data[0];
this.searchVal = undefined; } else {
this.curApiInfo = {};
}
} }
}); });
}, },
handleSearch() {
this.isSearch = !this.isSearch;
if (this.isSearch) {
this.active = -1;
this.getServiceApiList();
} else {
this.searchVal = "";
this.active = 0;
this.getServiceApiList();
}
},
// 切换设备
handleChange(row, index) {
this.active = index;
this.curApiInfo = row;
this.searchVal = "";
},
pushroeuter() { pushroeuter() {
this.$router.push({ this.$message.warning("暂未开通文档查看");
path: "/home/thePlatformIsSet/portDocument", // this.$router.push({
// query: { testoption: "test001" }, // path: "/home/thePlatformIsSet/portDocument",
}); // // query: { testoption: "test001" },
// });
}, },
}, },
}; };
...@@ -98,11 +121,13 @@ export default { ...@@ -98,11 +121,13 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
@headerH: 4.5rem; @headerH: 4.5rem;
.Container { .Container {
height: 100%; width: 100%;
height: 100vh;
background: #f5f5f5; background: #f5f5f5;
display: flex;
flex-direction: column;
.search_box { .search_box {
// height: 20rem; height: 300px;
height: 14rem;
background: url("~@/assets/images/u210.png") top no-repeat; background: url("~@/assets/images/u210.png") top no-repeat;
background-size: cover; background-size: cover;
text-align: center; text-align: center;
...@@ -124,6 +149,7 @@ export default { ...@@ -124,6 +149,7 @@ export default {
margin-right: 2rem; margin-right: 2rem;
height: 3rem !important; height: 3rem !important;
} }
.search_btn { .search_btn {
width: 9rem; width: 9rem;
height: 3rem; height: 3rem;
...@@ -221,116 +247,79 @@ export default { ...@@ -221,116 +247,79 @@ export default {
} }
} }
.stepbox { .stepbox {
width: 90%;
margin-left: 5%;
flex: 1;
display: flex; display: flex;
overflow-y: auto; /deep/.ant-steps-item-content {
overflow-x: hidden; cursor: pointer;
&::-webkit-scrollbar {
display: none !important;
} }
._left { ._left {
padding-top: 2rem; width: 300px;
width: 20rem; height: 100%;
.stepIcon { padding: 20px;
height: 8px; margin-right: 20px;
width: 8px; overflow: auto;
display: inline-block; &::-webkit-scrollbar {
background: #b3b3b3; width: 3px;
border-radius: 50%; height: 3px;
-webkit-box-shadow: 0 0 2px 5px rgb(231, 232, 236); overflow-y: auto;
box-shadow: 0 0 2px 5px rgb(231, 232, 236);
}
}
._right {
overflow: hidden !important;
padding-left: 2rem;
flex: 1;
.list_box {
padding-top: 2rem;
& + .list_box {
// margin-top: 1rem;
}
&:last-child {
margin-bottom: 10rem;
}
.list_title {
font-weight: bold;
font-size: 1.2rem;
margin-bottom: 0.7rem;
span {
color: #1890ff;
} }
&::-webkit-scrollbar-thumb {
border-radius: 3px;
background-color: rgba(144, 147, 153, 0.5);
} }
.list {
margin-right: 2rem; &::-webkit-scrollbar-track {
padding: 1rem; border-radius: 3px;
background: #fff; background: #fff;
display: flex;
border-radius: 8px;
justify-content: space-between;
align-items: center;
& + .list {
margin-top: 1rem;
} }
b {
font-weight: bold;
color: #333;
max-width: 300px;
text-align: justify;
hyphens: auto;
overflow: hidden;
line-height: 1.5em;
white-space: nowrap;
word-wrap: normal;
text-overflow: ellipsis;
}
span {
color: #666;
max-width: 500px;
text-align: justify;
hyphens: auto;
overflow: hidden;
line-height: 1.5em;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
} }
.examine_btn { ._right {
background-image: linear-gradient( flex: 1;
45deg, height: 100%;
#2d6feb 0%, padding: 20px;
#477ee4 51%, overflow-y: auto;
#5885da 100% &::-webkit-scrollbar {
); width: 3px;
height: 3px;
overflow-y: auto;
} }
.examine_btn { &::-webkit-scrollbar-thumb {
margin: 10px; border-radius: 3px;
padding: 12px 26px; background-color: rgba(144, 147, 153, 0.5);
text-align: center;
cursor: pointer;
text-transform: uppercase;
transition: 0.5s;
background-size: 200% auto;
color: white;
border-radius: 10px;
display: block;
border: 0px;
font-size: 0.4rem;
box-shadow: 0px 0px 14px -7px #3673e4;
} }
.examine_btn:hover { &::-webkit-scrollbar-track {
background-position: right center; border-radius: 3px;
/* change the direction of the change here */ background: #fff;
color: #fff;
text-decoration: none;
} }
.title-box {
.examine_btn:active { font-size: 24px;
transform: scale(0.95); .list_title {
margin-right: 10px;
font-weight: 600;
}
.count {
font-weight: 600;
}
}
.list {
width: 100%;
height: 80px;
margin-top: 20px;
padding: 0px 20px;
background-color: #fff;
border-radius: 4px;
.api-name {
font-size: 16px;
font-weight: 600;
} }
.service-name {
font-size: 14px;
} }
} }
} }
...@@ -358,33 +347,5 @@ export default { ...@@ -358,33 +347,5 @@ export default {
); );
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff",endColorstr="#6c35f7",GradientType=1); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff",endColorstr="#6c35f7",GradientType=1);
} }
.el-scrollbar__wrap {
overflow-x: hidden !important;
}
.ant-steps-item-tail {
left: 288px !important ;
padding: 23px 0 1px !important;
}
.ant-steps-item-icon {
float: right;
margin-top: -8px;
}
.ant-steps-item-content {
text-align: right !important;
}
.ant-steps-item-finish {
.ant-steps-item-title {
color: #1890ff !important;
}
.stepIcon {
height: 8px;
width: 8px;
display: inline-block;
border-radius: 50%;
background: #1890ff !important;
-webkit-box-shadow: 0 0 2px 5px #c9dbff !important;
box-shadow: 0 0 2px 5px #c9dbff !important;
}
}
} }
</style> </style>
\ No newline at end of file
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