Commit f84cce1b authored by 张俊's avatar 张俊

Merge branch 'dev' of https://cloud.wodcloud.com/git/apaas/apaas-v3-ui into dev

parents 13714474 dbd2b024
......@@ -15,4 +15,4 @@
<body>
<div id="app"></div>
</body>
</html>
</html>
\ No newline at end of file
......@@ -10,6 +10,7 @@
:file-list="fileList"
:before-upload="beforeUpload"
:on-success="uploadSuccess"
:on-remove="uploadRemove"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">
......@@ -83,8 +84,14 @@ export default {
},
uploadSuccess({ data }) {
this.$emit("change", data);
// 替换文件后要把旧文件删除掉
this.removePreFile();
},
uploadRemove() {
this.preUrl = this.url;
this.$emit("change", "");
this.removePreFile();
},
removePreFile() {
if (this.preUrl) {
this.$http
.delete("/apaas/static/file/delete", {
......
......@@ -42,13 +42,13 @@
</li>
</ul>
</div>
<div class="contributor_info" v-if="contributorQuizList">
<div class="contributor_info" v-if="contributorQuestionList">
<h3 class="contributor_title">
<span>本月提问贡献榜</span>
</h3>
<ul class="contributor_list">
<li
v-for="(item, index) in contributorQuizList"
v-for="(item, index) in contributorQuestionList"
:key="'quiz_' + index"
>
<span class="list_index" v-text="index + 1"></span>
......@@ -69,7 +69,7 @@ export default {
return {
userInfo: null,
contributorAnswerList: null,
contributorQuizList: null,
contributorQuestionList: null,
head_pic: require("../../../assets/imgs/img_head.png"),
};
},
......@@ -87,7 +87,7 @@ export default {
},
getAnwerList() {
this.$http
.get("/apaas/support/qa/question/contribution")
.get("/apaas/support/qa/answer/contribution")
.then(({ data }) => {
if (data.success) {
this.contributorAnswerList = data.data || [];
......@@ -95,18 +95,18 @@ export default {
});
this.$http
.get("/apaas/support/qa/answer/contribution")
.get("/apaas/support/qa/question/contribution")
.then(({ data }) => {
if (data.success) {
this.contributorQuizList = data.data || [];
this.contributorQuestionList = data.data || [];
}
});
},
intoListPage(type) {
if (type === 0) {
this.$router.push("/qa/questions");
this.$router.push("/qa/my_qa?name=0");
} else {
this.$router.push("/qa/answers");
this.$router.push("/qa/my_qa?name=1");
}
},
},
......
......@@ -6,7 +6,7 @@
技术支持
</el-breadcrumb-item>
<el-breadcrumb-item to="/technical_support/doc_manage">
开发文档
开发文档管理
</el-breadcrumb-item>
<el-breadcrumb-item> 文档编辑 </el-breadcrumb-item>
<el-breadcrumb-item> {{ title }} </el-breadcrumb-item>
......
......@@ -15,7 +15,7 @@
技术支持
</el-breadcrumb-item>
<el-breadcrumb-item to="/technical_support/doc_manage">
开发文档
开发文档管理
</el-breadcrumb-item>
<el-breadcrumb-item>
管理列表
......@@ -35,7 +35,7 @@
<span class="filter_title">文档名称:</span>
<el-input
v-model="topFilter.name"
placeholder="请输入banner关键词"
placeholder="请输入文档名称"
@keyup.enter.native="topFilterAction"
></el-input>
</div>
......@@ -83,7 +83,7 @@
<p>注:同一文档类型下可维护多个文档名称</p>
</div>
<el-form ref="addForm" :model="addForm" :rules="addFormRules">
<el-form-item label="活动区域" prop="style">
<el-form-item label="文档类型" prop="style">
<el-select
v-model="addForm.style"
placeholder="请选择文档类型"
......
......@@ -82,7 +82,7 @@
</span>
<a class="clean_btn" @click.prevent="clearSelection">清空</a>
<el-button class="add_btn" type="primary" @click="addNewSdk">
新增SDK类型
新增SDK示例
</el-button>
</div>
</apass-list>
......@@ -106,7 +106,7 @@
>
<div class="detail_content" slot="content">
<div class="detail_notice">
<p>注:同一文档类型下可维护多个文档名称</p>
<p>注:同一SDK类型下可维护多个示例名称</p>
</div>
<el-form ref="detailForm" :model="detailForm" :rules="detailFormRules">
<el-form-item label="SDK类型" prop="style_id">
......@@ -381,22 +381,20 @@ export default {
return helper.dateStringTransform(time);
},
selectAction(values) {
// 页码操作需要保存所选项
if (this.saveSection) {
return;
}
let cleanPage = values.length === 0; // 是否清空当前页所有选中
let selection = [...this.selection];
if (cleanPage) {
selection = selection.filter((item) => {
return !this.listData.find((v) => {
return v.id === item.id;
});
selection = selection.filter((item) => {
return !this.listData.find((v) => {
return v.id === item.id;
});
} else {
selection.push(...values);
}
});
selection.push(...values);
this.selection = selection;
},
......
......@@ -417,22 +417,20 @@ export default {
return helper.dateStringTransform(time);
},
selectAction(values) {
// 页码操作需要保存所选项
if (this.saveSection) {
return;
}
let cleanPage = values.length === 0; // 是否清空当前页所有选中
let selection = [...this.selection];
if (cleanPage) {
selection = selection.filter((item) => {
return !this.listData.find((v) => {
return v.id === item.id;
});
selection = selection.filter((item) => {
return !this.listData.find((v) => {
return v.id === item.id;
});
} else {
selection.push(...values);
}
});
selection.push(...values);
this.selection = selection;
},
......
......@@ -346,6 +346,11 @@ export default {
});
},
},
created() {
if (this.$route.query.name !== undefined) {
this.activeName = this.$route.query.name;
}
},
mounted() {
this.getUserQA();
this.getQList();
......
......@@ -80,7 +80,13 @@
(用于查询流程状态)
</p>
</div>
<div v-show="(activeBtn == 4 && zhyyVal == 24) || activeBtn == 3">
<div
v-show="
(activeBtn == 4 && zhyyVal == 24) ||
activeBtn == 3 ||
activeBtn == 2
"
>
<div class="fwcs_fwdz">
上传接口文档
<span class="title_bc">(请上传所有服务地址完整接口文档)</span>
......@@ -147,7 +153,7 @@
服务测试
</el-button>
</div>
<div v-if="activeBtn == 0 || activeBtn == 3">
<div v-if="activeBtn == 0 || activeBtn == 2 || activeBtn == 3">
<el-tabs v-model="activeName" class="fwcs_tabs" @tab-click="clickTab">
<el-tab-pane label="请求参数" name="0">
<ces-table
......@@ -370,7 +376,10 @@
</div>
<div
v-show="
(activeBtn == 1 || (activeBtn == 4 && zhyyVal == 34)) && resSuccess
(activeBtn == 1 ||
activeBtn == 2 ||
(activeBtn == 4 && zhyyVal == 34)) &&
resSuccess
"
>
<div class="skfw_csfwxx">测试服务信息:</div>
......@@ -387,6 +396,7 @@
v-show="
(activeBtn == 0 ||
activeBtn == 1 ||
activeBtn == 2 ||
activeBtn == 3 ||
activeBtn == 4) &&
!resSuccess
......@@ -804,8 +814,8 @@ export default {
{ label: "DELETE", value: "DELETE" },
],
optionType1: [{ label: "GET", value: "GET" }],
activeName: 0,
activeZh: 0,
activeName: "0",
activeZh: "0",
sjfwQqcs: [
{
label: "请求字段编码",
......@@ -1132,7 +1142,7 @@ export default {
bodys = this.$refs.jsonCodes ? this.$refs.jsonCodes.getCodesVal() : "";
contentType = this.sjfwQqt;
} else if (this.activeBtn == 4) {
if (this.activeZh == 1) {
if (this.activeZh == "1") {
contentType = this.zhfwQqt;
if (this.zhfwQqt == "JSON") {
bodys = this.$refs.zhfwJsonCodes
......@@ -1204,10 +1214,12 @@ export default {
nextJcxx() {
if (
this.activeBtn == 0 ||
this.activeBtn == 2 ||
this.activeBtn == 3 ||
(this.activeBtn == 4 && (this.zhyyVal == 22 || this.zhyyVal == 23))
) {
if (
this.activeBtn == 2 ||
this.activeBtn == 3 ||
(this.activeBtn == 4 && this.zhyyVal == 22)
) {
......@@ -1231,6 +1243,23 @@ export default {
this.$message.error("请完善返回参数信息中的字段名称");
}
}
} else {
let requestData = this.$refs.fwcs_sjfw_qqcs.getTableData();
let responseData = this.$refs.fwcs_sjfw_fhcs.getTableData();
this.requestRules = 0;
this.responseRules = 0;
this.checkTable(requestData, 0);
this.checkTable(responseData, 1);
if (this.requestRules == 0 && this.responseRules == 0) {
this.request_fields = requestData;
this.response_fields = responseData;
this.jcxxtx = true;
this.getOrganization();
} else if (this.requestRules != 0) {
this.$message.error("请完善请求参数信息中的字段名称");
} else if (this.responseRules != 0) {
this.$message.error("请完善返回参数信息中的字段名称");
}
}
} else if (this.activeBtn == 1) {
let value = helper.getQueryString("id", this.serviceUrl);
......@@ -1410,7 +1439,7 @@ export default {
if (this.activeBtn == 0 || this.activeBtn == 3) {
contentType = this.sjfwQqt;
} else if (this.activeBtn == 4) {
if (this.activeZh == 1) {
if (this.activeZh == "1") {
contentType = this.zhfwQqt;
}
}
......
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