Commit 6b5e33d8 authored by 张亚松's avatar 张亚松

Merge branch 'dev' into 'master'

Dev

See merge request apaas-v3/apaas-ui!4
parents 656f98cb ce67c131
...@@ -51,7 +51,7 @@ pipeline: ...@@ -51,7 +51,7 @@ pipeline:
base: hub.wodcloud.com/wod/ui-base:2.0-apaasv3 base: hub.wodcloud.com/wod/ui-base:2.0-apaasv3
dockerfile: .beagle/dockerfile dockerfile: .beagle/dockerfile
repo: wod/apaas-ui repo: wod/apaas-ui
version: v3.0.4 version: v3.0.5
channel: alpha channel: alpha
args: "TARGETOS=linux,TARGETARCH=amd64" ## 不同架构的构建参数 args: "TARGETOS=linux,TARGETARCH=amd64" ## 不同架构的构建参数
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
...@@ -70,8 +70,8 @@ pipeline: ...@@ -70,8 +70,8 @@ pipeline:
dns: 223.5.5.5 dns: 223.5.5.5
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.4-alpha source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.5-alpha
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.4 target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.5
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
secrets: secrets:
- source: REGISTRY_USER_ALIYUN - source: REGISTRY_USER_ALIYUN
...@@ -88,7 +88,7 @@ pipeline: ...@@ -88,7 +88,7 @@ pipeline:
dns: 223.5.5.5 dns: 223.5.5.5
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.4 source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.5
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0 target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
secrets: secrets:
...@@ -108,7 +108,7 @@ pipeline: ...@@ -108,7 +108,7 @@ pipeline:
base: hub.wodcloud.com/wod/ui-base:2.0-apaasv3-arm64 base: hub.wodcloud.com/wod/ui-base:2.0-apaasv3-arm64
dockerfile: .beagle/dockerfile dockerfile: .beagle/dockerfile
repo: wod/apaas-ui repo: wod/apaas-ui
version: v3.0.4 version: v3.0.5
channel: alpha-arm64 channel: alpha-arm64
args: "TARGETOS=linux,TARGETARCH=arm64" args: "TARGETOS=linux,TARGETARCH=arm64"
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
...@@ -127,8 +127,8 @@ pipeline: ...@@ -127,8 +127,8 @@ pipeline:
dns: 223.5.5.5 dns: 223.5.5.5
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.4-alpha-arm64 source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.5-alpha-arm64
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.4-arm64 target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.5-arm64
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
secrets: secrets:
- source: REGISTRY_USER_ALIYUN - source: REGISTRY_USER_ALIYUN
...@@ -145,7 +145,7 @@ pipeline: ...@@ -145,7 +145,7 @@ pipeline:
dns: 223.5.5.5 dns: 223.5.5.5
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.4-arm64 source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.5-arm64
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0-arm64 target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0-arm64
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
secrets: secrets:
...@@ -164,7 +164,7 @@ pipeline: ...@@ -164,7 +164,7 @@ pipeline:
base: hub.wodcloud.com/wod/ui-base:2.0-apaasv3-ppc64le base: hub.wodcloud.com/wod/ui-base:2.0-apaasv3-ppc64le
dockerfile: .beagle/dockerfile dockerfile: .beagle/dockerfile
repo: wod/apaas-ui repo: wod/apaas-ui
version: v3.0.4 version: v3.0.5
channel: alpha-ppc64le channel: alpha-ppc64le
args: "TARGETOS=linux,TARGETARCH=ppc64le" args: "TARGETOS=linux,TARGETARCH=ppc64le"
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
...@@ -182,8 +182,8 @@ pipeline: ...@@ -182,8 +182,8 @@ pipeline:
dns: 223.5.5.5 dns: 223.5.5.5
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.4-alpha-ppc64le source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.5-alpha-ppc64le
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.4-ppc64le target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.5-ppc64le
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
secrets: secrets:
- source: REGISTRY_USER_ALIYUN - source: REGISTRY_USER_ALIYUN
...@@ -199,7 +199,7 @@ pipeline: ...@@ -199,7 +199,7 @@ pipeline:
dns: 223.5.5.5 dns: 223.5.5.5
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.4-ppc64le source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.5-ppc64le
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0-ppc64le target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0-ppc64le
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
secrets: secrets:
...@@ -218,7 +218,7 @@ pipeline: ...@@ -218,7 +218,7 @@ pipeline:
base: hub.wodcloud.com/wod/ui-base:2.0-apaasv3-mips64le base: hub.wodcloud.com/wod/ui-base:2.0-apaasv3-mips64le
dockerfile: .beagle/dockerfile dockerfile: .beagle/dockerfile
repo: wod/apaas-ui repo: wod/apaas-ui
version: v3.0.4 version: v3.0.5
channel: alpha-mips64le channel: alpha-mips64le
args: "TARGETOS=linux,TARGETARCH=mips64le" args: "TARGETOS=linux,TARGETARCH=mips64le"
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
...@@ -236,8 +236,8 @@ pipeline: ...@@ -236,8 +236,8 @@ pipeline:
dns: 223.5.5.5 dns: 223.5.5.5
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.4-alpha-mips64le source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.5-alpha-mips64le
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.4-mips64le target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.5-mips64le
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
secrets: secrets:
- source: REGISTRY_USER_ALIYUN - source: REGISTRY_USER_ALIYUN
...@@ -253,7 +253,7 @@ pipeline: ...@@ -253,7 +253,7 @@ pipeline:
dns: 223.5.5.5 dns: 223.5.5.5
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.4-mips64le source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.5-mips64le
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0-mips64le target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0-mips64le
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
secrets: secrets:
...@@ -270,7 +270,7 @@ pipeline: ...@@ -270,7 +270,7 @@ pipeline:
namespace: apaas-v3 namespace: apaas-v3
deployment: apaas-ui deployment: apaas-ui
container: apaas-ui container: apaas-ui
registry: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.4-alpha registry: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.5-alpha
when: when:
branch: branch:
- dev - dev
...@@ -5,16 +5,30 @@ ...@@ -5,16 +5,30 @@
<span>{{ title || "-" }}</span> <span>{{ title || "-" }}</span>
<span>更新时间:{{ time || "-" }}</span> <span>更新时间:{{ time || "-" }}</span>
</h3> </h3>
<div class="part_content doc_content w-e-text w-e-text-container apaas_scroll">
<div <div
class="part_content doc_content w-e-text w-e-text-container apaas_scroll"
v-html="content" v-html="content"
ref="docContent" ref="docContent"
></div> >
</div>
<div v-if="doc_type">
<h3 class="doc_title">附件(点击下载):
<span v-if="fileList && fileList.length !== 0">
<span v-for="(e,idx) in fileList" :key="idx" class="file" :class="'file'+idx">
<span @click="download(e)">{{helper.downloadFileFormatNew(e)}}</span>
<br>
</span>
</span>
<span class="noFile" v-else>暂无</span>
</h3>
</div>
</div>
</div> </div>
<div class="part nav_part"> <div class="part nav_part">
<h3 class="part_title"> <h5 class="part_title">
<span>导航</span> <span>导航</span>
</h3> </h5>
<ul class="part_content nav_content apaas_scroll"> <ul class="part_content nav_content apaas_scroll">
<li <li
v-for="(item, index) in navTree" v-for="(item, index) in navTree"
...@@ -33,6 +47,8 @@ ...@@ -33,6 +47,8 @@
</template> </template>
<script> <script>
import helper from "@/services/helper"
export default { export default {
props: { props: {
richText: { richText: {
...@@ -47,21 +63,35 @@ export default { ...@@ -47,21 +63,35 @@ export default {
type: String, type: String,
defalut: "", defalut: "",
}, },
doc_type: {
type: Boolean,
default: false
},
doc_file: {
type: String,
defalut: "",
}
}, },
data() { data() {
return { return {
helper: helper,
content: "", content: "",
navTree: [], navTree: [],
curNav: "", curNav: "",
fileList: [],
}; };
}, },
watch: { watch: {
richText() { richText() {
this.translate(); this.translate();
}, },
doc_file() {
this.getFile()
}
}, },
mounted() { mounted() {
this.translate(); this.translate();
this.getFile()
}, },
methods: { methods: {
translate() { translate() {
...@@ -120,6 +150,17 @@ export default { ...@@ -120,6 +150,17 @@ export default {
this.curNav = (newTitles[0] && newTitles[0].id) || ""; this.curNav = (newTitles[0] && newTitles[0].id) || "";
} }
}, },
getFile() {
if (this.doc_file != "") {
this.fileList = this.doc_file.split(",")
}
},
download(e) {
const a = document.createElement("a"); // 创建a标签
a.setAttribute("download", ""); // download属性
a.setAttribute("href", e); // href链接
a.click(); // 自执行点击事件
}, // 下载附件
clickNav(item) { clickNav(item) {
let target = document.querySelector(`#${item.id}`); let target = document.querySelector(`#${item.id}`);
...@@ -164,6 +205,25 @@ export default { ...@@ -164,6 +205,25 @@ export default {
.doc_part { .doc_part {
flex-grow: 1; flex-grow: 1;
} }
.doc_title {
font-weight: 700;
padding-left: 32px;
margin-top: 60px;
}
.file {
font-weight: normal;
font-size: 14px;
margin-left: 152px;
cursor: pointer;
color: #515fe7;
}
.file0 {
margin-left: 0;
}
.noFile {
font-weight: normal;
font-size: 14px;
}
.nav_part { .nav_part {
width: 270px; width: 270px;
flex-shrink: 0; flex-shrink: 0;
......
...@@ -119,6 +119,7 @@ export default { ...@@ -119,6 +119,7 @@ export default {
methods: { methods: {
handleSizeChange(val) { handleSizeChange(val) {
this.pagination.rowsPerPage = val; this.pagination.rowsPerPage = val;
this.pagination.page = 1
this.refreshData(); this.refreshData();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
......
...@@ -182,6 +182,7 @@ ...@@ -182,6 +182,7 @@
> >
{{ item.name }} {{ item.name }}
</div> </div>
<div class="list_total">{{total}}条数据</div>
<!-- <div v-if="urlFilter == 'app'" class="btn_right_check"> <!-- <div v-if="urlFilter == 'app'" class="btn_right_check">
<el-checkbox v-model="couldTwice" @change="changeTwice"> <el-checkbox v-model="couldTwice" @change="changeTwice">
支持二次开发 支持二次开发
...@@ -197,16 +198,28 @@ ...@@ -197,16 +198,28 @@
" "
></div> --> ></div> -->
<!-- the list --> <!-- the list -->
<div class="shop_list">
<commodity-list <commodity-list
ref="commodity_list"
:datas="lists && lists.length != 0 ? lists : []" :datas="lists && lists.length != 0 ? lists : []"
:total="total" :total="total"
:url="url" :url="url"
:urlFilter="urlFilter" :urlFilter="urlFilter"
:paginationShow="false"
:pageSizeShow="true"
@refresh="getNewList" @refresh="getNewList"
></commodity-list> ></commodity-list>
</div> </div>
<div class="pagination_box">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page"
:page-sizes="[10, 20, 50]"
:page-size="limit"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
</div>
</div>
</template> </template>
<script> <script>
...@@ -242,6 +255,20 @@ export default { ...@@ -242,6 +255,20 @@ export default {
], ],
activeOptions: [[], [], [], []], activeOptions: [[], [], [], []],
activeChildOptions: [[], [], [], []], activeChildOptions: [[], [], [], []],
pageOptions: [
{
value: "10",
label: "10",
},
{
value: "20",
label: "20",
},
{
value: "50",
label: "50",
},
],
buttonFilter: [ buttonFilter: [
{ {
name: "综合排序", name: "综合排序",
...@@ -286,7 +313,7 @@ export default { ...@@ -286,7 +313,7 @@ export default {
}, },
], ],
page: 1, page: 1,
limit: 20, limit: 10,
couldTwice: false, couldTwice: false,
refresh_app_1: false, refresh_app_1: false,
refresh_app_2: false, refresh_app_2: false,
...@@ -297,11 +324,11 @@ export default { ...@@ -297,11 +324,11 @@ export default {
}), }),
mounted() { mounted() {
window.addEventListener("resize", this.judgeHeight); window.addEventListener("resize", this.judgeHeight);
window.addEventListener("scroll", this.menu, true); // window.addEventListener("scroll", this.menu, true);
}, },
destroyed() { destroyed() {
window.removeEventListener("resize", this.judgeHeight); window.removeEventListener("resize", this.judgeHeight);
window.removeEventListener("scroll", this.menu, true); // window.removeEventListener("scroll", this.menu, true);
}, },
watch: { watch: {
urlFilter: { urlFilter: {
...@@ -357,22 +384,31 @@ export default { ...@@ -357,22 +384,31 @@ export default {
}, },
}, },
methods: { methods: {
menu() { // menu() {
if (this.isKaiGuan) { // if (this.isKaiGuan) {
let scroll = // let scroll =
this.getScrollTop() + this.getWindowHeight() - this.getScrollHeight(); // this.getScrollTop() + this.getWindowHeight() - this.getScrollHeight();
if (scroll > -10) { // if (scroll > -10) {
if ( // if (
(this.total != 0 && this.page * this.limit < this.total) || // (this.total != 0 && this.page * this.limit < this.total) ||
this.total == 0 // this.total == 0
) { // ) {
this.page++; // this.page++;
this.getShopList(); // this.getShopList();
} // }
} // }
} // }
}, // },
//滚动条在Y轴上的滚动距离 //滚动条在Y轴上的滚动距离
handleSizeChange(val) {
this.limit = val;
this.page = 1
this.getShopList()
},
handleCurrentChange(val) {
this.page = val;
this.getShopList()
},
getScrollTop() { getScrollTop() {
var documentScrollTop = 0; var documentScrollTop = 0;
documentScrollTop = document.documentElement.scrollTop; documentScrollTop = document.documentElement.scrollTop;
...@@ -406,10 +442,11 @@ export default { ...@@ -406,10 +442,11 @@ export default {
}; };
this.$api.serviceShop.getAppList(query).then((response) => { this.$api.serviceShop.getAppList(query).then((response) => {
if (response.data.success == "1") { if (response.data.success == "1") {
this.lists = // this.lists =
this.page == 1 // this.page == 1
? response.data.data // ? response.data.data
: this.lists.concat(response.data.data); // : this.lists.concat(response.data.data);
this.lists = response.data.data
this.total = response.data.total; this.total = response.data.total;
this.isKaiGuan = true; this.isKaiGuan = true;
} else { } else {
...@@ -430,10 +467,11 @@ export default { ...@@ -430,10 +467,11 @@ export default {
}; };
this.$api.serviceShop.getServiceShopList(query).then((response) => { this.$api.serviceShop.getServiceShopList(query).then((response) => {
if (response.data.success == "1") { if (response.data.success == "1") {
this.lists = // this.lists =
this.page == 1 // this.page == 1
? response.data.data // ? response.data.data
: this.lists.concat(response.data.data); // : this.lists.concat(response.data.data);
this.lists = response.data.data
this.total = response.data.total; this.total = response.data.total;
this.isKaiGuan = true; this.isKaiGuan = true;
} else { } else {
...@@ -582,7 +620,7 @@ export default { ...@@ -582,7 +620,7 @@ export default {
getNewList(val) { getNewList(val) {
console.log(val); console.log(val);
this.page = 1; this.page = 1;
this.limit = 20; this.limit = 10;
this.getShopList(); this.getShopList();
}, },
clickAll(item) { clickAll(item) {
...@@ -771,6 +809,11 @@ export default { ...@@ -771,6 +809,11 @@ export default {
margin-left: 15px; margin-left: 15px;
position: relative; position: relative;
} }
.list_total {
position: absolute;
right: 16px;
top: 0;
}
.btn_right_check { .btn_right_check {
position: absolute; position: absolute;
right: 20px; right: 20px;
...@@ -785,8 +828,7 @@ export default { ...@@ -785,8 +828,7 @@ export default {
.head_flex .input_right .el-input--prefix .el-input__inner { .head_flex .input_right .el-input--prefix .el-input__inner {
padding-left: 40px; padding-left: 40px;
} }
.head_flex .input_right .el-input__prefix, .head_flex .input_right .el-input__prefix{
.el-input__suffix {
left: 10px; left: 10px;
} }
.head_flex .input_right .el-input--prefix .el-input__inner { .head_flex .input_right .el-input--prefix .el-input__inner {
...@@ -810,3 +852,22 @@ export default { ...@@ -810,3 +852,22 @@ export default {
border-color: #626de9; border-color: #626de9;
} }
</style> </style>
<style scoped>
.shop_list {
margin-bottom: 40px;
}
.pagination_box {
width: 1008px;
height: 50px;
position: fixed;
bottom: 0;
background-color: #f6f7fb;
text-align: center;
line-height: 50px;
}
.pagination_box /deep/.el-pagination>.btn-prev,
.pagination_box /deep/.el-pagination>.btn-next,
.pagination_box /deep/.el-pagination>.el-pager>li {
background-color: transparent!important;
}
</style>
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
<el-form-item prop="date"> <el-form-item prop="date">
<p class="formname">申请使用期限</p> <p class="formname">申请使用期限</p>
<el-date-picker <el-date-picker
:disabled="disabledDate"
v-model="formInline.date" v-model="formInline.date"
type="daterange" type="daterange"
range-separator="至" range-separator="至"
...@@ -48,6 +49,10 @@ export default { ...@@ -48,6 +49,10 @@ export default {
return {}; return {};
}, },
}, },
disabledDate: {
type: Boolean,
default: false
}
}, },
components: {}, components: {},
data() { data() {
......
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
<em <em
class="cur_pointer" class="cur_pointer"
v-else v-else
:class="btn.type" :class="btn.disabledRule ? btn.type : 'disabled_btn ' + btn.type"
:style="{ :style="{
color: btn.label == '删除' ? '#830f53' : '#0f2683', color: btn.label == '删除' ? '#830f53' : '#0f2683',
}" }"
...@@ -835,6 +835,10 @@ em { ...@@ -835,6 +835,10 @@ em {
.cur_pointer { .cur_pointer {
cursor: pointer; cursor: pointer;
} }
.disabled_btn {
cursor: not-allowed;
color: #999!important;
}
.ces-table .el-table--mini td, .ces-table .el-table--mini td,
.ces-table .el-table--mini th { .ces-table .el-table--mini th {
padding: 11px 0 !important; padding: 11px 0 !important;
......
<template> <template>
<section class="wangeditor_class"> <section class="wangeditor_class">
<div ref="toolbar" class="toolbar"></div> <div ref="toolbar" class="toolbar"></div>
<div>
<el-upload
class="upload-file"
action="/apaas/static/image/upload"
:on-success="uploadSuccess"
:on-remove="handleRemove"
:data="{directory: 'file' }"
:limit="5"
:file-list="fileArray">
<el-button ref="upload_file" id="upload_file" size="small" type="primary" v-show="false">点击上传</el-button>
</el-upload>
</div>
</section> </section>
</template> </template>
<script> <script>
import E from "wangeditor"; import E from "wangeditor";
const { BtnMenu } = E
//编辑器自定义按钮
class uploadMenu extends BtnMenu {
constructor(editor) {
const $elem = E.$(
`<div class="w-e-menu" data-title="文档上传">
<i class="el-icon-upload2"></i>
</div>`
)
super($elem, editor)
}
clickHandler() {
wangEuploadFile();
}
tryChangeActive() {
this.active()
}
}
export default { export default {
name: "editoritem", name: "editoritem",
data() { data() {
return { return {
// uploadPath, // uploadPath,
uploadMenu,
editor: null, editor: null,
info_: null info_: null,
}; };
}, },
model: { model: {
...@@ -31,6 +64,10 @@ export default { ...@@ -31,6 +64,10 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
fileArray: {
type: Array,
default: () => []
}
}, },
watch: { watch: {
isClear(val) { isClear(val) {
...@@ -59,6 +96,7 @@ export default { ...@@ -59,6 +96,7 @@ export default {
mounted() { mounted() {
this.seteditor(); this.seteditor();
this.editor.txt.html(this.value); this.editor.txt.html(this.value);
window.wangEuploadFile = this.wangEuploadFile
}, },
methods: { methods: {
seteditor() { seteditor() {
...@@ -109,9 +147,45 @@ export default { ...@@ -109,9 +147,45 @@ export default {
this.info_ = html; // 绑定当前逐渐地值 this.info_ = html; // 绑定当前逐渐地值
this.$emit("change", this.info_); // 将内容同步到父组件中 this.$emit("change", this.info_); // 将内容同步到父组件中
}; };
this.editor.menus.extend('uploadMenusKey',uploadMenu)
this.editor.config.menus.push('uploadMenusKey')
// 创建富文本编辑器 // 创建富文本编辑器
this.editor.create(); this.editor.create();
},
wangEuploadFile() {
// this.$refs.upload_file.handleClick();
document.getElementById('upload_file').click();
},
uploadSuccess(response, file, fileList) {
if (response.success == 1) {
this.fileArray.push({
url: response.data,
name: file.name,
});
this.$emit("getNewList", this.fileArray);
}
},
handleRemove(file, fileList) {
let url = file.url;
let detection = true;
if (url) detection = url.indexOf("blob") != -1;
if (detection) {
this.fileArray.forEach((item, i, arr) => {
if (item.url === file.url) {
this.fileArray.splice(i, 1);
} }
});
} else {
this.fileArray.forEach((item, i, arr) => {
if (item.url === file.url) {
this.fileArray.splice(i, 1);
}
});
}
this.$emit("getNewList", this.fileArray);
},
} }
}; };
</script> </script>
...@@ -142,4 +216,7 @@ export default { ...@@ -142,4 +216,7 @@ export default {
border: none!important; border: none!important;
height: calc(100% - 80px)!important; height: calc(100% - 80px)!important;
} }
.upload-file {
width: 50%;
}
</style> </style>
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<info-list :list_arr="module_arr"> <info-list :list_arr="module_arr">
<apply-form <apply-form
:formInline="formInline" :formInline="formInline"
:disabledDate="disabledDate"
ref="apply_info" ref="apply_info"
slot="apply_info" slot="apply_info"
></apply-form> ></apply-form>
...@@ -125,7 +126,8 @@ export default { ...@@ -125,7 +126,8 @@ export default {
val: "mg" val: "mg"
} }
], ],
temp_sub_arr: [] temp_sub_arr: [],
disabledDate: false,
}; };
}, },
watch: {}, watch: {},
...@@ -197,6 +199,15 @@ export default { ...@@ -197,6 +199,15 @@ export default {
let data = response.data.data; let data = response.data.data;
if (response.data.success && data) { if (response.data.success && data) {
//服务 //服务
if (data.interface_typ == 2 || data.interface_typ == 3) {
this.disabledDate = true
let yyyy = new Date().getFullYear()
let mm = new Date().getMonth() + 1 < 10 ? '0' + (new Date().getMonth() + 1) : new Date().getMonth() + 1
let dd = new Date().getDate() < 10 ? '0' + new Date().getDate() : new Date().getDate()
let date_now = yyyy + '-' + mm + '-' + dd
this.formInline.date = ["","2099-12-31"]
this.formInline.date[0] = date_now
}
this.post_arr = [data]; this.post_arr = [data];
this.post_arr[0].service_id = parseInt(service_data.service_id); this.post_arr[0].service_id = parseInt(service_data.service_id);
this.post_arr[0].spec_id = parseInt(service_data.spec_id); this.post_arr[0].spec_id = parseInt(service_data.spec_id);
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
</div> </div>
<div class="editpage"> <div class="editpage">
<wang-e v-model="content"></wang-e> <wang-e v-model="content" @getNewList="getNewList" :fileArray="fileArray"></wang-e>
<div class="apaas_button"> <div class="apaas_button pt_max">
<el-button type="defalut" size="mini" @click="cancelAction"> <el-button type="defalut" size="mini" @click="cancelAction">
取消 取消
</el-button> </el-button>
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<script> <script>
import wangE from "@/components/wangE"; import wangE from "@/components/wangE";
import helper from "@/services/helper.js";
export default { export default {
components: { components: {
wangE, wangE,
...@@ -37,6 +38,8 @@ export default { ...@@ -37,6 +38,8 @@ export default {
return { return {
title: "", title: "",
content: "", content: "",
fileList: [],
fileArray: []
}; };
}, },
computed: { computed: {
...@@ -56,6 +59,16 @@ export default { ...@@ -56,6 +59,16 @@ export default {
if (data.success === 1) { if (data.success === 1) {
this.title = data.data.title; this.title = data.data.title;
this.content = data.data.content; this.content = data.data.content;
let arr = [];
if (data.data.doc_file && data.data.doc_file != "") {
arr = data.data.doc_file.split(",")
arr.forEach(e => {
this.fileArray.push({
name: helper.downloadFileFormatNew(e),
url: e
})
})
}
} }
}); });
} }
...@@ -65,10 +78,18 @@ export default { ...@@ -65,10 +78,18 @@ export default {
this.$router.push("/technical_support/doc_manage"); this.$router.push("/technical_support/doc_manage");
}, },
submitAction() { submitAction() {
let arr = [];
if (this.fileList && this.fileList.length > 0 ) {
this.fileList.forEach(e => {
arr.push(e.url)
})
}
let doc_file = arr.join(",") || ""
this.$http this.$http
.put("/apaas/support/document/put", { .put("/apaas/support/document/put", {
id: this.id, id: this.id,
content: this.content, content: this.content,
doc_file: doc_file,
}) })
.then(({ data }) => { .then(({ data }) => {
if (data.success === 1) { if (data.success === 1) {
...@@ -83,6 +104,9 @@ export default { ...@@ -83,6 +104,9 @@ export default {
this.$message.error("保存失败"); this.$message.error("保存失败");
}); });
}, },
getNewList(fileList) {
this.fileList = fileList;
},
}, },
}; };
</script> </script>
...@@ -119,4 +143,10 @@ export default { ...@@ -119,4 +143,10 @@ export default {
.apaas_button .el-button + .el-button { .apaas_button .el-button + .el-button {
margin-right: 30px; margin-right: 30px;
} }
.editpage /deep/ .wangeditor_class {
height: calc(100% - 200px);
}
.pt_max {
padding-top: 130px;
}
</style> </style>
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
:title="title" :title="title"
:time="update_time" :time="update_time"
:rich-text="content" :rich-text="content"
:doc_type="true"
:doc_file="doc_file"
></doc-width-nav> ></doc-width-nav>
</div> </div>
</template> </template>
...@@ -42,6 +44,7 @@ export default { ...@@ -42,6 +44,7 @@ export default {
title: "", title: "",
update_time: "", update_time: "",
content: "", content: "",
doc_file: ""
}; };
}, },
computed: { computed: {
...@@ -85,6 +88,7 @@ export default { ...@@ -85,6 +88,7 @@ export default {
if (data.data.content) { if (data.data.content) {
this.content = data.data.content; this.content = data.data.content;
} }
this.doc_file = data.data.doc_file || ""
} }
}); });
}, },
......
...@@ -101,6 +101,12 @@ ...@@ -101,6 +101,12 @@
:readOnly="true" :readOnly="true"
></v-apaas-code> ></v-apaas-code>
</info-list> </info-list>
<!-- <info-list v-else-if="now_service == 2">
<process-card
:data="use_approval_arr"
slot="approval"
></process-card>
</info-list> -->
<info-list <info-list
v-else v-else
:list_arr=" :list_arr="
...@@ -110,9 +116,18 @@ ...@@ -110,9 +116,18 @@
: list_arr : list_arr
: now_service == 1 : now_service == 1
? servicead_arr ? servicead_arr
: now_service == 2
? jkwd_arr
: apply_arr : apply_arr
" "
> >
<table-um
:stripe="true"
:headers="jkwd_headers"
:datas="jkwd_datas"
@download="download"
slot="wd_table"
></table-um>
<table-um <table-um
v-if="res_table_arr.length" v-if="res_table_arr.length"
:headers="res_header_arr" :headers="res_header_arr"
...@@ -156,6 +171,7 @@ import infoList from "@/components/infoList"; ...@@ -156,6 +171,7 @@ import infoList from "@/components/infoList";
import tableUm from "@/components/table/table-um"; import tableUm from "@/components/table/table-um";
import processCard from "@/components/process-card"; import processCard from "@/components/process-card";
import codes from "@/components/general/codes"; import codes from "@/components/general/codes";
import helper from "@/services/helper";
export default { export default {
props: {}, props: {},
components: { components: {
...@@ -524,7 +540,7 @@ export default { ...@@ -524,7 +540,7 @@ export default {
], ],
}, },
], ],
service_arr: ["服务基本信息", "接口详细信息", "申请审批信息"], service_arr: ["服务基本信息", "接口详细信息","接口文档", "申请审批信息"],
data_service_type1: "", data_service_type1: "",
service_header_arr: { service_header_arr: {
id: "", id: "",
...@@ -659,6 +675,17 @@ export default { ...@@ -659,6 +675,17 @@ export default {
solt_name: "res_code", solt_name: "res_code",
}, },
], ],
jkwd_arr: [
{
title: "",
info: "",
type: "solt",
solt_name: "wd_table",
},
],
jkwd_headers: [],
jkwd_datas: [],
clickFlag: false,
apply_arr: [ apply_arr: [
{ {
title: "申请信息", title: "申请信息",
...@@ -754,6 +781,14 @@ export default { ...@@ -754,6 +781,14 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
download(row) {
if (this.clickFlag) {
const a = document.createElement("a"); // 创建a标签
a.setAttribute("download", ""); // download属性
a.setAttribute("href", row.url); // href链接
a.click(); // 自执行点击事件
}
}, // 下载接口文档
change_port(val) { change_port(val) {
this.port_options.forEach((e) => { this.port_options.forEach((e) => {
if (e.value == val) { if (e.value == val) {
...@@ -778,6 +813,37 @@ export default { ...@@ -778,6 +813,37 @@ export default {
return; return;
} }
let data = response.data.data; let data = response.data.data;
// 审批通过才可以下载接口文档,待审批、审批中、审批不通过不可以下载
if (data.service_apply_info.approval_status == 3) {
this.clickFlag = true
}else {
this.clickFlag = false
}
if (data.doc_file != '') {
this.jkwd_datas.push({
wd_name: helper.downloadFileFormat(data.doc_file),
url: data.doc_file
})
}
this.jkwd_headers = [
{
prop: "wd_name",
label: "文档名称",
align: "left",
},
{
label: "操作",
type: "Button",
align: "center",
btnList: [
{
type: "download",
label: "下载",
disabledRule: this.clickFlag == true
},
],
},
],
this.$set(this.service_header_arr, "portal_id", data.portal_id); // 时空服务id this.$set(this.service_header_arr, "portal_id", data.portal_id); // 时空服务id
this.$set(this.service_header_arr, "workflows_id", data.workflows_id); // 时空服务id this.$set(this.service_header_arr, "workflows_id", data.workflows_id); // 时空服务id
this.$set( this.$set(
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
:style=" :style="
now_service == index ? { borderBottom: '4px solid #f5ab4c' } : {} now_service == index ? { borderBottom: '4px solid #f5ab4c' } : {}
" "
v-if="index < 3 || in_origin_ser" v-if="index < 4 || in_origin_ser"
> >
{{ item }} {{ item }}
</div> </div>
...@@ -288,13 +288,19 @@ ...@@ -288,13 +288,19 @@
></list-pagination> ></list-pagination>
</div> </div>
<div v-show="now_service == 3"> <div v-show="now_service == 3">
<p style="color: #8890a7">服务规格:</p> <table-um
:stripe="true"
:headers="jkwd_headers"
:datas="jkwd_datas"
@download="download"
></table-um>
<!-- <p style="color: #8890a7">服务规格:</p>
<table-um <table-um
:stripe="true" :stripe="true"
:headers="service_size_arr" :headers="service_size_arr"
:datas="service_size_data" :datas="service_size_data"
></table-um> ></table-um>
<!-- <p style="color: #8890a7;">购买方式:</p> <p style="color: #8890a7;">购买方式:</p>
<p style="color: #242c43;margin:10px 0px;"> <p style="color: #242c43;margin:10px 0px;">
{{ {{
buy_type == 1 buy_type == 1
...@@ -303,7 +309,7 @@ ...@@ -303,7 +309,7 @@
? "按年购买" ? "按年购买"
: "按月购买&按年购买" : "按月购买&按年购买"
}} }}
</p> --> </p>
<div <div
class="editbtn" class="editbtn"
v-if="now_user == 1" v-if="now_user == 1"
...@@ -330,7 +336,7 @@ ...@@ -330,7 +336,7 @@
:datas="service_size_data" :datas="service_size_data"
@changeTable="now_size_data" @changeTable="now_size_data"
></table-um> ></table-um>
<!-- <p <p
v-if="now_user == 1 && sizeset_flag" v-if="now_user == 1 && sizeset_flag"
style="color: #8890a7;margin:10px 0;" style="color: #8890a7;margin:10px 0;"
> >
...@@ -347,11 +353,11 @@ ...@@ -347,11 +353,11 @@
:type="buy_style.indexOf(2) !== -1 ? 'primary' : ''" :type="buy_style.indexOf(2) !== -1 ? 'primary' : ''"
@click="change_buy(2)" @click="change_buy(2)"
>按年购买</el-button >按年购买</el-button
> --> >
<div class="savebtn" v-if="now_user == 1 && sizeset_flag"> <div class="savebtn" v-if="now_user == 1 && sizeset_flag">
<el-button @click="change_service_size">保存</el-button> <el-button @click="change_service_size">保存</el-button>
<el-button @click="sizeset_flag = false">取消</el-button> <el-button @click="sizeset_flag = false">取消</el-button>
</div> </div> -->
</div> </div>
<div v-show="now_service == 4"> <div v-show="now_service == 4">
<info-list :list_arr="trans_log_arr"> <info-list :list_arr="trans_log_arr">
...@@ -468,6 +474,26 @@ export default { ...@@ -468,6 +474,26 @@ export default {
times: 0, times: 0,
month: 0, month: 0,
}, },
jkwd_headers: [
{
prop: "wd_name",
label: "文档名称",
align: "left",
},
{
label: "操作",
type: "Button",
align: "center",
btnList: [
{
type: "download",
label: "下载",
disabledRule: true
},
],
},
],
jkwd_datas: [],
trans_log_arr: [ trans_log_arr: [
{ {
title: "服务交易概览", title: "服务交易概览",
...@@ -739,18 +765,19 @@ export default { ...@@ -739,18 +765,19 @@ export default {
workflows_id: "", //判断是否是流程服务 workflows_id: "", //判断是否是流程服务
sizeset_flag: false, //规格设置是否显示 sizeset_flag: false, //规格设置是否显示
service_arr: [ service_arr: [
["服务基本信息", "接口详细信息", "服务运行状态"], ["服务基本信息", "接口详细信息", "服务运行状态","接口文档"],
[ [
"服务基本信息", "服务基本信息",
"接口详细信息", "接口详细信息",
"服务运行状态", "服务运行状态",
// "服务计费规则", // "服务计费规则",
// "服务交易记录", // "服务交易记录",
"接口文档"
], ],
[ [
"服务基本信息", "服务基本信息",
"接口详细信息", "接口详细信息",
"服务运行状态", "服务运行状态","接口文档"
// "服务规格", // "服务规格",
// "服务交易记录", // "服务交易记录",
], ],
...@@ -1272,6 +1299,14 @@ export default { ...@@ -1272,6 +1299,14 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
download(row) {
console.log(row.url)
const a = document.createElement("a"); // 创建a标签
a.setAttribute("download", ""); // download属性
a.setAttribute("href", row.url); // href链接
a.click(); // 自执行点击事件
}, // 下载接口文档
change_port(val) { change_port(val) {
this.port_options.forEach((e) => { this.port_options.forEach((e) => {
if (e.value == val) { if (e.value == val) {
...@@ -1665,6 +1700,12 @@ export default { ...@@ -1665,6 +1700,12 @@ export default {
}); });
this.service_size_data = temp; this.service_size_data = temp;
this.size_arr_down = temp; this.size_arr_down = temp;
if (data.doc_file != '') {
this.jkwd_datas.push({
wd_name: helper.downloadFileFormat(data.doc_file),
url: data.doc_file
})
}
} else { } else {
this.$message({ this.$message({
message: response.data.errMsg, message: response.data.errMsg,
......
...@@ -62,6 +62,17 @@ ...@@ -62,6 +62,17 @@
</el-button> </el-button>
</el-row> </el-row>
<div class="gray_line"></div> <div class="gray_line"></div>
<div class="fwcs_fwdz" v-if="process_id == '' && is_map == 0">
接口协议:
</div>
<el-radio-group
v-model="jkxy"
class="jkxy"
@change="test"
v-if="process_id == '' && is_map == 0"
>
<el-radio v-for="(e,i) in jkxyList" :key="'xy' + i" :label="e.value">{{e.label}}</el-radio>
</el-radio-group>
<div v-if="activeBtn == 4"> <div v-if="activeBtn == 4">
<div class="sqxx_title">服务类型:</div> <div class="sqxx_title">服务类型:</div>
<el-select <el-select
...@@ -95,7 +106,7 @@ ...@@ -95,7 +106,7 @@
<div v-show=" <div v-show="
(activeBtn == 4 && zhyyVal == 24) || (activeBtn == 4 && zhyyVal == 24) ||
activeBtn == 3 || activeBtn == 3 ||
activeBtn == 2 activeBtn == 2 || jkxy !== 1
"> ">
<div class="fwcs_fwdz"> <div class="fwcs_fwdz">
上传接口文档 上传接口文档
...@@ -126,13 +137,13 @@ ...@@ -126,13 +137,13 @@
</el-radio-group> </el-radio-group>
</div> </div>
<div <div
v-if="!(activeBtn == 4 && zhyyVal == 24)" v-if="!(activeBtn == 4 && zhyyVal == 24) && jkxy == 1"
class="fwcs_fwdz" class="fwcs_fwdz"
> >
服务地址: 服务地址:
</div> </div>
<div <div
v-if="!(activeBtn == 4 && zhyyVal == 24)" v-if="!(activeBtn == 4 && zhyyVal == 24) && jkxy == 1"
class="fwcs_fwdz_inner" class="fwcs_fwdz_inner"
> >
<el-input <el-input
...@@ -188,7 +199,58 @@ ...@@ -188,7 +199,58 @@
服务测试 服务测试
</el-button> </el-button>
</div> </div>
<div v-if="activeBtn == 0 || activeBtn == 2 || activeBtn == 3">
<div
v-if="jkxy == 2"
class="fwcs_fwdz"
>
IP+端口号:
</div>
<div
v-if="jkxy == 2"
class="fwcs_fwdz_inner"
>
<el-input
placeholder="请输入内容"
@input="getUrl"
v-model="serviceUrl"
class="input-with-select"
>
</el-input>
<el-button
@click="clickFwcs()"
class="fwcs_btn_fwcs"
>
服务测试
</el-button>
</div>
<div
v-if="jkxy == 3"
class="fwcs_fwdz"
>
服务地址:
</div>
<div
v-if="jkxy == 3"
class="fwcs_fwdz_inner"
>
<el-input
placeholder="请输入内容"
@input="getUrl"
v-model="serviceUrl"
class="input-with-select"
>
</el-input>
<el-button
@click="clickFwcs()"
class="fwcs_btn_fwcs"
>
服务测试
</el-button>
</div>
<div v-if="(activeBtn == 0 || activeBtn == 2 || activeBtn == 3) && jkxy == 1">
<el-tabs <el-tabs
v-model="activeName" v-model="activeName"
class="fwcs_tabs" class="fwcs_tabs"
...@@ -327,7 +389,7 @@ ...@@ -327,7 +389,7 @@
>{{ item.name }}</el-radio> >{{ item.name }}</el-radio>
</div> </div>
</div> </div>
<div v-if="activeBtn == 4 && zhyyVal != 34 && zhyyVal != 24"> <div v-if="activeBtn == 4 && zhyyVal != 34 && zhyyVal != 24 && jkxy == 1">
<el-tabs <el-tabs
v-model="activeZh" v-model="activeZh"
class="fwcs_tabs" class="fwcs_tabs"
...@@ -554,7 +616,7 @@ ...@@ -554,7 +616,7 @@
</el-button> </el-button>
</div> </div>
</block-radius> </block-radius>
<div v-if="activeBtn == 4 && zhyyVal == 24"> <div v-if="activeBtn == 4 && zhyyVal == 24 && jkxy == 1">
<!-- 24 --> <!-- 24 -->
<block-radius <block-radius
v-for="(itemOne, indexOne) in liucheng_list" v-for="(itemOne, indexOne) in liucheng_list"
...@@ -884,7 +946,7 @@ ...@@ -884,7 +946,7 @@
@getNewList="getNewList" @getNewList="getNewList"
></upload-file> ></upload-file>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item v-if="jkxy == 1">
<p class="formname">接口编码:</p> <p class="formname">接口编码:</p>
<el-input <el-input
v-model="form.code" v-model="form.code"
...@@ -1154,6 +1216,21 @@ export default { ...@@ -1154,6 +1216,21 @@ export default {
skfwRadios: [], skfwRadios: [],
optionsZhyy: [], optionsZhyy: [],
zhyyVal: 22, zhyyVal: 22,
jkxy: 1,
jkxyList: [
{
label: "http(s)",
value: 1,
},
{
label: "grpc",
value: 2,
},
{
label: "websocket",
value: 3,
},
],
jcxxtx: false, jcxxtx: false,
form: { form: {
name: "", name: "",
...@@ -1252,6 +1329,9 @@ export default { ...@@ -1252,6 +1329,9 @@ export default {
computed: {}, computed: {},
watch: {}, watch: {},
methods: { methods: {
test() {
console.log(this.jkxy)
},
getCurrentUser() { getCurrentUser() {
this.$api.user.getNowUser().then(({ data }) => { this.$api.user.getNowUser().then(({ data }) => {
if (data.success == 1) { if (data.success == 1) {
...@@ -1262,6 +1342,7 @@ export default { ...@@ -1262,6 +1342,7 @@ export default {
}); });
}, },
clickBtn(val) { clickBtn(val) {
this.jkxy = 1
this.resultShow = false; this.resultShow = false;
this.activeBtn = val; this.activeBtn = val;
this.select = "GET"; this.select = "GET";
...@@ -1332,6 +1413,11 @@ export default { ...@@ -1332,6 +1413,11 @@ export default {
let headers = {}; let headers = {};
let requestData = {}; let requestData = {};
let requestHeaderDataObj = {}; let requestHeaderDataObj = {};
let request = []
let bodys = "";
let contentType = "";
if (this.jkxy != 1) {
}else {
if (this.activeBtn == 0 || this.activeBtn == 3) { if (this.activeBtn == 0 || this.activeBtn == 3) {
if (this.sqfsVal == 1 || this.sqfsVal == 3) { if (this.sqfsVal == 1 || this.sqfsVal == 3) {
if (this.tokenName == "") { if (this.tokenName == "") {
...@@ -1446,7 +1532,9 @@ export default { ...@@ -1446,7 +1532,9 @@ export default {
} }
} }
} }
}
let query = { let query = {
interface_typ: this.jkxy,
method: this.select, method: this.select,
url: this.serviceUrl, url: this.serviceUrl,
req_auth_mthod: this.sqfsVal, req_auth_mthod: this.sqfsVal,
...@@ -1792,6 +1880,8 @@ export default { ...@@ -1792,6 +1880,8 @@ export default {
} }
} }
let query = { let query = {
interface_typ: this.jkxy,
proxy_address: this.serviceUrl,
name: this.form.name, name: this.form.name,
sectors: this.form.area, sectors: this.form.area,
organization: this.form.origin, organization: this.form.origin,
...@@ -1808,7 +1898,6 @@ export default { ...@@ -1808,7 +1898,6 @@ export default {
? this.zhyyVal ? this.zhyyVal
: 0, : 0,
portal_id: this.portal_id, portal_id: this.portal_id,
encode_method: this.form.code,
doc_file: this.jkwds.length != 0 ? this.jkwds[0] : "", doc_file: this.jkwds.length != 0 ? this.jkwds[0] : "",
urls: [ urls: [
{ {
...@@ -1819,7 +1908,7 @@ export default { ...@@ -1819,7 +1908,7 @@ export default {
req_auth_token: this.sqfsVal == 1 ? this.tokenVal : "", req_auth_token: this.sqfsVal == 1 ? this.tokenVal : "",
req_auth_token_name: req_auth_token_name:
this.sqfsVal == 1 ? this.tokenName : "", this.sqfsVal == 1 ? this.tokenName : "",
method: this.select, method: this.jkxy == 1 ? this.select : '',
url: this.serviceUrl, url: this.serviceUrl,
request_fields: request_fields:
this.dataType == "body" this.dataType == "body"
...@@ -1834,6 +1923,9 @@ export default { ...@@ -1834,6 +1923,9 @@ export default {
} }
] ]
}; };
if (this.jkxy == 1) {
query.encode_method = this.form.code
}
this.$api.workbench.serviceAdd(query).then(response => { this.$api.workbench.serviceAdd(query).then(response => {
this.fwR = false; this.fwR = false;
if (response.data.success == 1) { if (response.data.success == 1) {
...@@ -1858,7 +1950,7 @@ export default { ...@@ -1858,7 +1950,7 @@ export default {
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
if (this.cover.length != 0) { if (this.cover.length != 0) {
if (this.jkwds.length == 0) { if (this.jkwds.length == 0 && this.jkxy == 1) {
this.$message.error("请上传接口文档"); this.$message.error("请上传接口文档");
} else { } else {
this.fwR = true; this.fwR = true;
...@@ -1870,7 +1962,7 @@ export default { ...@@ -1870,7 +1962,7 @@ export default {
req_auth_mthod: item.sqfsVal, req_auth_mthod: item.sqfsVal,
req_auth_token: item.sqfsVal == 1 ? item.tokenVal : "", req_auth_token: item.sqfsVal == 1 ? item.tokenVal : "",
req_auth_token_name: item.sqfsVal == 1 ? item.tokenName : "", req_auth_token_name: item.sqfsVal == 1 ? item.tokenName : "",
method: item.select, method: this.jkxy == 1 ? item.select : '',
url: item.serviceUrl, url: item.serviceUrl,
request_fields: request_fields:
item.dataType == "body" item.dataType == "body"
...@@ -1884,7 +1976,10 @@ export default { ...@@ -1884,7 +1976,10 @@ export default {
content_type: "JSON" content_type: "JSON"
}); });
}); });
let query = { let query = {
interface_typ: this.jkxy,
proxy_address: this.jkxy == 1? '' : this.serviceUrl,
name: this.form.name, name: this.form.name,
sectors: this.form.area, sectors: this.form.area,
organization: this.form.origin, organization: this.form.origin,
...@@ -1894,10 +1989,12 @@ export default { ...@@ -1894,10 +1989,12 @@ export default {
data_service_type1: this.btnList[this.activeBtn].id, data_service_type1: this.btnList[this.activeBtn].id,
data_service_type2: 24, data_service_type2: 24,
portal_id: this.portal_id, portal_id: this.portal_id,
encode_method: this.form.code,
urls: urls, urls: urls,
doc_file: this.jkwds.length != 0 ? this.jkwds[0] : "" doc_file: this.jkwds.length != 0 ? this.jkwds[0] : ""
}; };
if (this.jkxy == 1) {
query.encode_method = this.form.code
}
this.$api.workbench.serviceAdd(query).then(response => { this.$api.workbench.serviceAdd(query).then(response => {
this.fwR = false; this.fwR = false;
if (response.data.success == 1) { if (response.data.success == 1) {
...@@ -2646,6 +2743,9 @@ export default { ...@@ -2646,6 +2743,9 @@ export default {
.gz_fhsjgs_rad { .gz_fhsjgs_rad {
margin-left: 10px; margin-left: 10px;
} }
.jkxy {
margin-left: 20px;
}
.ip_block { .ip_block {
border-radius: 8px; border-radius: 8px;
border: solid 1px #e3e5ef; border: solid 1px #e3e5ef;
......
...@@ -35,6 +35,25 @@ module.exports.dateFormat = function (fmt, timestamp) { ...@@ -35,6 +35,25 @@ module.exports.dateFormat = function (fmt, timestamp) {
return fmt; return fmt;
} }
module.exports.downloadFileFormatNew = function (fileUrl) {
/*
input: /apaas/static/docs/image/images/1234_qq234ewr123.png
output: 1234.png
*/
if (fileUrl != "") {
var temp = fileUrl.split('/')[fileUrl.split('/').length - 1]
var name = temp.split('_')[0]
var type = temp.split('_')[temp.split('_').length - 1].split('.')[1]
if (temp.indexOf('_') == -1) {
return name
} else {
return name + '.' + type
}
} else {
return "";
}
}
module.exports.dateStringTransform = function (date) { module.exports.dateStringTransform = function (date) {
/* /*
input: 2020-06-12T16:38:11+08:00 input: 2020-06-12T16:38:11+08:00
......
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