fix: 修改导入文件数据过大卡死的问题

This commit is contained in:
gaoxiaolin.gao 2018-01-25 17:50:29 +08:00
parent c8ec820cb0
commit c5133264d6
9 changed files with 21 additions and 9 deletions

View File

@ -180,7 +180,7 @@ class ProjectData extends Component {
}
}
handleFile = (info) => {
@ -209,9 +209,16 @@ class ProjectData extends Component {
showConfirm = async (res) => {
let that = this;
let typeid = this.props.match.params.id;
let result = await this.props.fetchUpdateLogData({ type: 'project', typeid, apis: res.apis })
let apiCollections = res.apis.map(item=>{
return {
method:item.method,
path: item.path
}
})
let result = await this.props.fetchUpdateLogData({ type: 'project', typeid, apis: apiCollections })
let domainData = result.payload.data.data;
const ref = confirm({
title: '您确认要进行数据同步????',

View File

@ -55,4 +55,7 @@
汇通天下已部署使用 YApi
* ![一键秀](./images/show.jpeg)
一键秀(一键生成)已部署使用 YApi
一键秀(一键生成)已部署使用 YApi
* ![用友](./images/yonyou.jpg)
用友已经部署使用YApi,并且自己开发了单点登录插件

BIN
doc/images/yonyou.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

@ -246,7 +246,7 @@ class interfaceController extends baseController {
}
let result = await this.Model.getByPath(params.project_id, params.path, params.method, '_id');
console.log('result', result);
if (result.length > 0) {
result.forEach(async item => {
params.id = item._id;

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

@ -192,7 +192,9 @@
</li><li><p><img src="http://www.g7.com.cn/static/image/logo.png" alt="汇通天下"></p>
<p> 汇通天下已部署使用 YApi</p>
</li><li><p><img src="./images/show.jpeg" alt="一键秀"></p>
<p> 一键秀(一键生成)已部署使用 YApi </p>
<p> 一键秀(一键生成)已部署使用 YApi </p>
</li><li><p><img src="./images/yonyou.jpg" alt="用友"></p>
<p> 用友已经部署使用YApi并且自己开发了单点登录插件 </p>
</li></ul>
</article>

View File

@ -178,9 +178,9 @@
<div class="content-right markdown-body use-sidebar" role="main">
<h3 class="subject" id="v1.3.5">v1.3.5 <a class="hashlink" href="#v1.3.5">#</a></h3><h4 class="subject" id="Feature">Feature <a class="hashlink" href="#Feature">#</a></h4><ul>
<li>mongodb 自动备份脚本</li></ul>
<li>数据导入同步</li></ul>
<h4 class="subject" id="Bug_Fixed">Bug Fixed <a class="hashlink" href="#Bug_Fixed">#</a></h4><ul>
<li>修复离开接口编辑页面的 confirm 框有时候会触发两次 &amp; confirm 的 X 按钮无效</li><li>修复添加集合后测试集合list不更新问题</li></ul>
<li>修复离开接口编辑页面的 confirm 框有时候会触发两次 &amp; confirm 的 X 按钮无效</li><li>修复添加集合后测试集合list不更新问题</li><li>测试集合点击对应接口侧边栏不切换</li><li>测试集合处,点击删除不成功</li><li>修改编辑接口后,再回到测试集合处数据不更新问题</li></ul>
<h3 class="subject" id="v1.3.4">v1.3.4 <a class="hashlink" href="#v1.3.4">#</a></h3><h4 class="subject" id="Feature">Feature <a class="hashlink" href="#Feature">#</a></h4><ul>
<li>进入project页面加入loading</li><li>接口list页table中加入分页</li><li>项目添加者自动变成项目组长</li></ul>
<h4 class="subject" id="Bug_Fixed">Bug Fixed <a class="hashlink" href="#Bug_Fixed">#</a></h4><ul>

View File

@ -606,7 +606,7 @@ class interfaceColController extends baseController {
result.req_body_form = this.handleParamsValue(data.req_body_form, result.req_body_form)
result.req_query = this.handleParamsValue(data.req_query, result.req_query)
result.req_params = this.handleParamsValue(data.req_params, result.req_params)
result.interface_up_time = data.up_time;
ctx.body = yapi.commons.resReturn(result);
} catch (e) {
ctx.body = yapi.commons.resReturn(null, 400, e.message)

View File

@ -158,7 +158,7 @@ class projectController extends baseController {
}
let checkRepeat = await this.Model.checkNameRepeat(params.name,params.group_id);
let checkRepeat = await this.Model.checkNameRepeat(params.name, params.group_id);
if (checkRepeat > 0) {
return ctx.body = yapi.commons.resReturn(null, 401, '已存在的项目名');