zweizhao пре 7 година
родитељ
комит
7d8980e7de
2 измењених фајлова са 16 додато и 11 уклоњено
  1. 15 9
      src/module/main/components/cloud_balance.vue
  2. 1 2
      src/module/main/components/withdraw.vue

+ 15 - 9
src/module/main/components/cloud_balance.vue

@@ -11,11 +11,9 @@
           :prop="prop"
           :label="tableHeaders[index]">
           <template slot-scope="scope">
-            <el-button type="text" v-if="prop === 'uid'" @click="clickUID(scope.row[prop])">{{scope.row[prop]}}</el-button>
-            <span v-else-if="prop === 'statusShow' && scope.row['status'] !== '1'">
-              {{scope.row[prop]}}
-              <el-button type="text" @click="clickRetry(scope.row['id'])">重试</el-button>
-            </span>
+            <el-button type="text" v-if="prop === 'job_id'" @click="clickJobID(scope.row[prop])">{{scope.row[prop]}}</el-button>
+            <el-button type="text" v-else-if="prop === 'company'" @click="clickCompany(scope.row['uid'])">{{scope.row[prop]}}</el-button>
+            <el-button type="text" v-else-if="prop === 'dev_realname'" @click="clickDev(scope.row['developer_uid'])">{{scope.row[prop]}}</el-button>
             <span v-else>{{scope.row[prop]}}</span>
           </template>
         </el-table-column>
@@ -89,20 +87,28 @@ export default {
     this.getTableData()
   },
   methods: {
+    // 点击开发者
+    clickDev(uid) {
+      window.open(`/rooter/user/${uid}`)
+    },
+    // 点击企业
+    clickCompany(uid) {
+      window.open(`/rooter/user/${uid}`)
+    },
     // 点击重试
     async clickRetry(id) {
       const res = await this.$post('/api/admin/payment/redoDraw', { id })
       console.log(res)
     },
     // 点击用户的 uid
-    clickUID(uid) {
-      console.log('click uid: ' + uid)
+    clickJobID(jobID) {
+      window.open(`/rooter/cloudjobitem/${jobID}`)
     },
     // 根据状态显示图表样式
     tableRowClassName({row, rowIndex}) {
-      // console.log({row, rowIndex})
+      console.log({row, rowIndex})
       let className = ''
-      if(row.status === '1') className = 'success-row'
+      if(row.p_status_name === '已结算') className = 'success-row'
       return className
     },
     // 格式化列表数据

+ 1 - 2
src/module/main/components/withdraw.vue

@@ -1,8 +1,7 @@
 <template>
   <div id="withdraw">
     <div class="table">
-      <el-table
-        v-if="tableData.length"
+      <el-table v-if="tableData.length"
         height="100%"
         border
         style="width: 100%"