From 5d4c909020d5fba2dea49b6d5b1baa82708dfa0e Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Wed, 26 Feb 2020 19:03:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=84=E8=AE=BA=E5=8F=91=E5=B8=83=E5=90=8E?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=88=B7=E6=96=B0=E6=98=BE=E7=A4=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 2 +- public/react/src/AppConfig.js | 4 ++-- public/react/src/forge/Order/Detail.js | 13 +++++++------ public/react/src/forge/Upload/attachment.js | 5 ++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index fe77a99f7..cb39a24f7 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -329,7 +329,7 @@ class ApplicationController < ActionController::Base def current_user # User.current if Rails.env.development? - user_id = 36390 + user_id = 50207 else user_id = 130328 end diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 1a12e3166..ec15a3088 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -47,8 +47,8 @@ export function initAxiosInterceptors(props) { // TODO 读取到package.json中的配置? var //proxy = "http://localhost:3000" - proxy="http://123.59.135.93:56666" - //proxy="http://localhost:3000" + // proxy="http://123.59.135.93:56666" + proxy="http://localhost:3000" // 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求; // 如果需要支持重复的请求,考虑config里面自定义一个allowRepeat参考来控制 diff --git a/public/react/src/forge/Order/Detail.js b/public/react/src/forge/Order/Detail.js index 0c3ffd85f..dfe4a3731 100644 --- a/public/react/src/forge/Order/Detail.js +++ b/public/react/src/forge/Order/Detail.js @@ -215,6 +215,7 @@ class Detail extends Component{ } renderJournalList=(list)=>{ + console.log(list); if(list && list.length >0){ return( list.map((item,key)=>{ @@ -315,7 +316,7 @@ class Detail extends Component{

this.editdetail(item.content,item.id)} className="detail_edit_action">编辑 - this.deleteorder(item.id)}> + this.deleteorder(item.id)}> 删除
@@ -331,10 +332,10 @@ class Detail extends Component{ } { - item && item.attachments.length > 0 ? - - : - "" + item && item.attachments && item.attachments.length > 0 ? + + : + "" }
@@ -408,7 +409,7 @@ class Detail extends Component{ { data && data.description }
{ - data && data.attachments.length > 0 ? + data && data.attachments && data.attachments.length > 0 ? : "" diff --git a/public/react/src/forge/Upload/attachment.js b/public/react/src/forge/Upload/attachment.js index 73b3a0529..a36e82896 100644 --- a/public/react/src/forge/Upload/attachment.js +++ b/public/react/src/forge/Upload/attachment.js @@ -6,7 +6,6 @@ class Attachment extends Component{ constructor(props){ super(props); this.state={ - attachments:undefined, canDelete: false, Deleted:[] } @@ -18,7 +17,6 @@ class Attachment extends Component{ getDetail=()=>{ this.setState({ - attachments: this.props.attachments, canDelete: this.props.canDelete }) } @@ -43,7 +41,8 @@ class Attachment extends Component{ } render(){ - const { Deleted, attachments, canDelete } = this.state; + const { Deleted , canDelete } = this.state; + const { attachments }= this.props return(
{