dev01 1 yıl önce
ebeveyn
işleme
7fcf44f5df

+ 21 - 13
src/pages/detail/index.jsx

@@ -29,6 +29,7 @@ class Detail extends Component {
       attachmentUrl: [],
       data: {},
       historicalIsOpened: false,
+      isOpened: false,
     }
     this.getReleasetDails = this.getReleasetDails.bind(this);
   }
@@ -38,7 +39,11 @@ class Detail extends Component {
   }
 
   componentDidShow() {
-    this.getReleasetDails();
+    this.setState({
+      isOpened: false
+    }, () => {
+      this.getReleasetDails();
+    })
   }
 
   // 项目详情
@@ -57,6 +62,7 @@ class Detail extends Component {
           this.setState({
             data: v.data,
             attachmentUrl: list,
+            isOpened: true,
           })
         } else {
           setTimeout(() => {
@@ -134,15 +140,6 @@ class Detail extends Component {
                       {data.projectName}
                     </View>
                   </View>
-                  <View className="userName" style={{ margin: "20px 0" }}>
-                    <View className="uNtext">
-                      当前审核状态:
-                      <Text style={{ color: ["#000000", "#dbc037", "#6eb173", "red"][data.processStatus] }}>
-                        {["", "待审核", "审核通过", "审核驳回"][data.processStatus]}
-                      </Text>
-                      <Text className="logbt" onClick={() => { this.setState({ historicalIsOpened: true }) }}>查看审核日志</Text>
-                    </View>
-                  </View>
                   <View className="userName">
                     <View className="uNtext">
                       打卡时间:{data.createTime}
@@ -153,7 +150,7 @@ class Detail extends Component {
                       打卡人员:{data.name}
                     </View>
                   </View>
-                  <View className="userName" style={{ marginTop: 10 }}>
+                  <View className="userName">
                     <View className="uNtext">
                       研发时间:{data.recordTime}
                     </View>
@@ -176,13 +173,24 @@ class Detail extends Component {
                   <View className="userName">
                     <View className="uNtext">
                       附件:
-                      {attachmentUrl && attachmentUrl.length > 0 &&
+                      {this.state.isOpened &&
                         <ImagePicker
                           files={attachmentUrl || []}
                           showAddBtn={false}
                         />}
                     </View>
                   </View>
+
+                  <View className="userName" style={{ marginTop: 20 }}>
+                    <View className="uNtext">
+                      当前审核状态:
+                      <Text style={{ color: ["#000000", "#dbc037", "#6eb173", "red"][data.processStatus] }}>
+                        {["", "待审核", "审核通过", "审核驳回"][data.processStatus]}
+                      </Text>
+                      <Text className="logbt" onClick={() => { this.setState({ historicalIsOpened: true }) }}>查看审核日志</Text>
+                    </View>
+                  </View>
+
                   {
                     data.processStatus == 3 &&
                     <View className="option">
@@ -222,7 +230,7 @@ class Detail extends Component {
                   </View>
                   <View className="userName">
                     <View className="uNtext">
-                      累积工时:{data.duration}
+                      打卡工时:{data.duration}
                     </View>
                   </View>
                   <View className="userName">

+ 1 - 0
src/pages/detail/index.less

@@ -22,6 +22,7 @@
 }
 
 textarea {
+  width: 94%;
   background: #D7D7D7;
   padding: 20px;
   border-radius: 20px;

+ 1 - 6
src/pages/mybusiness/myList.jsx

@@ -60,12 +60,7 @@ class MyList extends Component {
                     type == 0 ?
                       <View style={{ textAlign: "right", color: "blue" }}>已打卡,待审核</View> :
                       <View className="releaseStarts">
-                        <View
-                          className="punchClock"
-                        // onClick={(e) => {
-                        //   e.stopPropagation();
-                        // }}
-                        >
+                        <View className="punchClock">
                           去审核
                         </View>
                       </View>

+ 0 - 2
src/pages/projectDetail/index.jsx

@@ -38,7 +38,6 @@ class ProjectDetail extends Component {
 
   // 项目详情
   getProjectDetail() {
-    console.log("111")
     projectDetails({
       id: this.$instance.router.params.id,
     }).then((v) => {
@@ -125,7 +124,6 @@ class ProjectDetail extends Component {
                     {data.name}
                   </View>
                 </View>
-
                 <View className="userName">
                   <View className="uNtext">
                     项目编号:{data.id}

+ 1 - 1
src/pages/reclockin/index.jsx

@@ -230,7 +230,7 @@ class ReClockin extends Component {
               </View>
               <View className='items'>
                 <View className='ititles'><Text style={{ width: "7px" }}></Text>上传附件:</View>
-                {this.state.isOpened > 0 &&
+                {this.state.isOpened &&
                   <ImagePicker
                     showAddBtn
                     files={this.state.imgs}

+ 2 - 2
src/utils/config.js

@@ -1,7 +1,7 @@
 // 本地
-export const resourceAddress = '172.16.1.187/dev-api'
+// export const resourceAddress = '172.16.1.187/dev-api'
 // 生产
-// export const resourceAddress = 'https://s.jishutao.com/upload';
+export const resourceAddress = 'https://yanfa.jishutao.com/prod-api';
 // 测试
 // export const resourceAddress = 'https://static.jishutao.com/upload';
 

+ 2 - 2
src/utils/servers/baseUrl.js

@@ -7,9 +7,9 @@ const getBaseUrl = (url) => {
     BASE_URL = 'https://bm.jishutao.com'
   } else {
     // 生产环境
-    BASE_URL = 'http://172.16.0.255:8888'
+    // BASE_URL = 'http://172.16.0.255:8888'
     // BASE_URL = 'https://uat.jishutao.com'
-    // BASE_URL = 'https://bm.jishutao.com'
+    BASE_URL = 'https://yanfa.jishutao.com/prod-api'
   }
   return BASE_URL
 }