Bläddra i källkod

feat: 对接操作记录

linwenxin 1 år sedan
förälder
incheckning
0a10a90392

+ 7 - 7
src/views/workOrder/workOrderPool/detail.vue

@@ -12,12 +12,12 @@
         height: activeName === 'workOrderInfo' ? '100%' : '0px',
         overflow: activeName === 'workOrderInfo' ? '' : 'hidden'
       }">
-        <workOrderInfo :id="id" ref="workOrderInfo" @updateOrderType="getOrderType" />
+        <workOrderInfo :id="id" ref="workOrderInfo" />
       </div>
-      <OperationDetail v-if="activeName == 'operationDetails'" ref="operationDetails" />
-      <CompletionDetails v-if="activeName == 'detailsCompletion'" ref="detailsCompletion" />
-      <Payment v-if="activeName == 'payFee'" ref="payFee" />
-      <Evaluation v-if="activeName == 'xdyEvaluationInfo'" ref="xdyEvaluationInfo" />
+      <OperationDetail v-if="activeName == 'operationDetails'" :id="id" ref="operationDetails" />
+      <CompletionDetails v-if="activeName == 'detailsCompletion'" :id="id" ref="detailsCompletion" />
+      <Payment v-if="activeName == 'payFee'" :id="id" ref="payFee" />
+      <Evaluation v-if="activeName == 'xdyEvaluationInfo'" :id="id" ref="xdyEvaluationInfo" />
     </div>
   </div>
 </template>
@@ -55,7 +55,7 @@ export default {
       this.orderType = val
     },
     handleClick(tab, event) {
-      
+
     }
   }
 }
@@ -66,7 +66,7 @@ export default {
   height: calc(100vh - 140px) !important;
   overflow: hidden;
 
-  & > ::v-deep .el-tabs:nth-child(1) {
+  &> ::v-deep .el-tabs:nth-child(1) {
     &>.el-tabs__header:nth-child(1) {
       margin-bottom: 0 !important;
     }

+ 35 - 13
src/views/workOrder/workOrderPool/detailModule/OperationDetail/index.vue

@@ -3,7 +3,7 @@
     <zj-page-fill class="neibuview">
       <zj-form-container>
         <zj-form-module title="操作明细">
-          <zj-table  :columns="operationDetailColumns" :tableData="operationDetailData" :tableAttributes="{
+          <zj-table :columns="operationDetailColumns" :tableData="logList" :tableAttributes="{
             border: true
           }"></zj-table>
         </zj-form-module>
@@ -13,19 +13,36 @@
 </template>
 
 <script>
+import { orderBaseLogList } from "@/api/workOrderPool.js"
 export default {
+  props: {
+    id: {
+      type: [String, Number],
+      default: null,
+    }
+  },
   data() {
     return {
-      operationDetailData: []
+      logList: []
     }
   },
+  watch: {
+    id: {
+      handler(newVal, oldVal) {
+        this.getOrderBaseLogList()
+      },
+      deep: true,
+      immediate: true,
+    },
+  },
   computed: {
     operationDetailColumns() {
       return [
         {
           columnAttributes: {
             label: '操作类别',
-            prop: 'type'
+            prop: 'type',
+            width: 140
           }
         },
         {
@@ -37,26 +54,31 @@ export default {
         {
           columnAttributes: {
             label: '操作时间',
-            prop: 'createTime'
+            prop: 'createTime',
+            width: 140
           }
         },
         {
           columnAttributes: {
             label: '操作人',
-            prop: 'operator'
+            prop: 'createBy',
+            width: 140
           }
-        },
-        {
-          columnAttributes: {
-            label: '操作网点',
-            prop: 'operateWebsit'
-          }
-        },
+        }
       ]
     }
   },
   methods: {
-
+    // 获取操作记录
+    getOrderBaseLogList() {
+      if (this.id) {
+        orderBaseLogList({
+          orderBaseId: this.id
+        }).then(res => {
+          this.logList = res.data
+        })
+      }
+    },
   }
 }
 </script>