From c24f01e317c68e8d490af53210cee83d46297e20 Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Sun, 06 Jul 2025 15:33:16 +0800
Subject: [PATCH] 1

---
 src/views/dashboard/Workplace.vue |  466 ++++++++++++++++++++++------------------------------------
 1 files changed, 178 insertions(+), 288 deletions(-)

diff --git a/src/views/dashboard/Workplace.vue b/src/views/dashboard/Workplace.vue
index 4f0263b..9d3c172 100644
--- a/src/views/dashboard/Workplace.vue
+++ b/src/views/dashboard/Workplace.vue
@@ -7,15 +7,13 @@
         </div>
         <div class="content">
           <div class="content-title">
-            {{ timeFix }},{{ userdetails.adminName ? userdetails.adminName : 'Admin' }}<span class="welcome-text">,{{
-              welcome
-            }}</span>
+            {{ timeFix }},{{ userdetail.agentName }}<span class="welcome-text">,{{ welcome }}</span>
           </div>
           <div>{{ lizhidetail.content }} —— {{ lizhidetail.author }}</div>
         </div>
       </div>
     </template>
-    <template v-slot:extraContent>
+    <!-- <template v-slot:extraContent>
       <div class="extra-content">
         <div class="stat-item">
           <a-statistic title="代理数量" :value="infodetail.agent_num" />
@@ -27,217 +25,142 @@
           <a-statistic title="模拟用户" :value="infodetail.user_moni_num" />
         </div>
       </div>
-    </template>
+    </template> -->
     <div>
-      <a-row :gutter="24">
-        <a-col :xl="16" :lg="24" :md="24" :sm="24" :xs="24">
-          <a-card
-            class="project-list"
-            :loading="loading"
-            style="margin-bottom: 24px;"
-            :bordered="false"
-            title="大盘指数"
-            :body-style="{ padding: 0 }">
-            <!-- <a slot="extra">全部项目</a> -->
-            <div>
-              <a-card-grid class="project-card-grid" :key="i" v-for="(item, i) in market">
-                <a-card v-if="i < 6" :bordered="false" :body-style="{ padding: 0 }">
-                  <a-card-meta>
-                    <div slot="title" class="card-title">
-                      <!-- <a-avatar size="small" :src="item.cover" /> -->
-                      <a
-                        :style="'background:' + color16()"
-                        style="color:#fff;font-size:14px;border-radius:50%;padding:6px;line-height: 1;">
-                        {{ item.name.substr(0, 1) }}
-                      </a>
-                      <a style="margin-left:8px">{{ item.name }}</a>
-                      <a :class="item.increase < 0 ? 'greens' : 'reds'" style="margin-left:10px">({{ item.nowPrice
-                      }})</a>
-                    </div>
-                    <div slot="description" class="card-description" v-if="i == 0">
-                      上证指数是一个反映上海证券交易所挂牌股票总体走势的统计指标
-                    </div>
-                    <div slot="description" class="card-description" v-if="i == 1">
-                      深证成指交易所成份股价指数(简称深证成指)是深圳证券交易所的主要股指。
-                    </div>
-                    <div slot="description" class="card-description" v-if="i == 2">
-                      创业板是一种证券市场,是专为暂时无法在主板市场上市的创业型企业。
-                    </div>
-                    <div slot="description" class="card-description" v-if="i == 3">
-                      沪深300指数由沪深市场中规模大、流动性好的最具代表性的300只证券组成。
-                    </div>
-                    <div slot="description" class="card-description" v-if="i == 4">
-                      中小企业100指数样本应该都是在深交所中小企业板上市交易的A股。
-                    </div>
-                    <div slot="description" class="card-description" v-if="i == 5">
-                      创业板50指数是在创业板指的100只股票中,选取最近半年日均成交额排名靠前的50只股票。
-                    </div>
-                  </a-card-meta>
-                  <div class="project-item">
-                    <a href="/#/" :class="item.increase < 0 ? 'greens' : 'reds'">{{ item.increase }}</a>
-                    <span class="datetime" :class="item.increase < 0 ? 'greens' : 'reds'">{{ item.increaseRate
-                    }}%</span>
-                    <!-- <a-tag :color="item.increase < 0 ? '#87d068' : '#f50'" style="margin-right:0">
-                      {{item.increaseRate}}%
-                    </a-tag> -->
-                  </div>
-                </a-card>
-              </a-card-grid>
-            </div>
-          </a-card>
+      <a-card :bordered="false" :title="`【账号余额:${userdetail.totalMoney ? userdetail.totalMoney : '0.00'}】`">
+        <div class="everylist">
+          <a-row :gutter="48">
+            <a-col :md="12" :lg="8" :sm="24"> 代理名称:{{ userdetail.agentName }} </a-col>
+            <a-col :md="12" :lg="8" :sm="24"> 真实姓名:{{ userdetail.agentRealName }} </a-col>
+            <a-col :md="12" :lg="8" :sm="24"> 代理代码:{{ userdetail.agentCode }} </a-col>
+          </a-row>
+        </div>
 
-          <a-card :loading="loading" title="持仓动态" :bordered="false">
-            <a-list>
-              <a-list-item :key="index" v-for="(item, index) in rongzilist">
-                <a-list-item-meta>
-                  <div slot="title">
-                    <span>@{{ item.nickName }}</span>&nbsp; 买入了&nbsp;<a href="#">{{ item.stockName }}({{ item.stockCode
-                    }})</a>&nbsp;
-                    <span style="margin-right:10px;">方向</span>
-                    <a-tag :color="item.orderDirection == '买涨' ? 'red' : 'green'">
-                      {{ item.orderDirection }}
-                    </a-tag>
-                  </div>
-                  <div slot="description">{{ item.buyOrderTime | moment }}</div>
-                </a-list-item-meta>
-              </a-list-item>
-            </a-list>
-          </a-card>
-        </a-col>
-        <a-col
-          style="padding: 0 12px"
-          :xl="8"
-          :lg="24"
-          :md="24"
-          :sm="24"
-          :xs="24">
+        <div class="everylist">
+          <a-row :gutter="48">
+            <a-col :md="12" :lg="8" :sm="24">
+              锁定状态:
+              {{ userdetail.isLock == 0 ? '正常' : '锁定' }}
+            </a-col>
+            <a-col :md="12" :lg="8" :sm="24"> 电话号码:{{ userdetail.agentPhone }} </a-col>
+            <a-col :md="12" :lg="8" :sm="24">
+              创建时间:
+              {{ userdetail.addTime | moment }}
+            </a-col>
+          </a-row>
+        </div>
+
+        <div class="everylist">
+          链接(移动端):{{ wapurl }}
+          <!-- <a-tag v-clipboard:copy="copyJson" v-clipboard:success="onCopy" v-clipboard:error="onError">
+            <span>复制</span>
+          </a-tag> -->
+          <a-button
+            type="primary"
+            @click="onCopy(wapurl)"
+            icon="copy"
+            size="small"
+            style="margin-left: 10px"
+          >复制</a-button
+          >
+        </div>
+        <div class="everylist">
+          客服链接:{{ userdetail.onLineServices }}
+          <!-- <a-tag v-clipboard:copy="copyJson" v-clipboard:success="onCopy" v-clipboard:error="onError">
+            <span>复制</span>
+          </a-tag> -->
+          <a-button
+            type="primary"
+            @click="$refs.editUserbankdialog.getEditorder(userdetail)"
+            size="small"
+            style="margin-left: 10px"
+          >修改</a-button
+          >
+        </div>
+      </a-card>
+      <div style="display:flex;align-items: center;justify-content: space-between;background-color: #fff;border-bottom: 1px solid #e8e8e8;">
+        <div style="display:flex;align-items: center;">
           <a-card
-            title="快速开始 / 便捷导航"
-            style="margin-bottom: 24px;display:none"
-            :bordered="false"
-            :body-style="{ padding: 0 }">
-            <div class="item-group">
-              <a>操作一</a>
-              <a>操作二</a>
-              <a>操作三</a>
-              <a>操作四</a>
-              <a>操作五</a>
-              <a>操作六</a>
-              <a-button size="small" type="primary" ghost icon="plus">添加</a-button>
-            </div>
-          </a-card>
-          <a-card
-            title="占比统计"
-            style="margin-bottom: 24px"
+            title="充值提现统计"
             :loading="radarLoading"
             :bordered="false"
             :body-style="{ padding: 0 }">
-            <div style="min-height: 400px;">
-              <!-- <radar :data="radarData" /> -->
-              <v-chart :force-fit="true" :height="405" :data="pieData" :scale="pieScale">
-                <v-tooltip :showTitle="false" dataKey="item*percent" />
-                <v-axis />
-                <!-- position="right" :offsetX="-140" -->
-                <v-legend dataKey="item" />
-                <v-pie position="percent" color="item" :vStyle="pieStyle" />
-                <v-coord type="theta" :radius="0.75" :innerRadius="0.6" />
-              </v-chart>
-            </div>
+           
           </a-card>
-          <div style="display:flex;align-items: center;justify-content: space-between;background-color: #fff;border-bottom: 1px solid #e8e8e8;">
-            <div style="display:flex;align-items: center;">
-              <a-card
-                title="充值提现统计"
-                :loading="radarLoading"
-                :bordered="false"
-                :body-style="{ padding: 0 }">
-
-              </a-card>
-            </div>
-
-            <div>
-              <a-date-picker
-                show-time
-                style="width: 100%"
-                @change="getstartTime"
-                v-decorator="['startTime', { rules: [{ required: true, message: '请填写开始时间' }] }]"
-                format="YYYY-MM-DD"
-              >
-              </a-date-picker>
-            </div>
-          </div>
-          <a-card :loading="loading"  :bordered="false">
-
-            <div class="members">
-              <a-row>
-                <a-col :span="12">
-                  <a>
-                    <span>今日充值</span>
-                    <span class="member">{{ infodata.todayRechargeAmount
+        </div>
+        
+        <div>
+          <a-date-picker
+            show-time
+            style="width: 100%"
+            @change="getstartTime"
+            v-decorator="['startTime', { rules: [{ required: true, message: '请填写开始时间' }] }]"
+            format="YYYY-MM-DD"
+          >
+          </a-date-picker>
+        </div>
+      </div>
+      <a-card  :bordered="false">
+        <div class="members">
+          <a-row>
+            <a-col :span="12">
+              <a>
+                <span>今日充值</span>
+                <span class="member">{{ infodata.todayRechargeAmount
                     }}</span>
-                  </a>
-                </a-col>
-                <a-col :span="12">
-                  <a>
-                    <span>总充值</span>
-                    <span class="member">{{ infodata.rechargeTotalAmount  }}</span>
-                  </a>
-                </a-col>
-                <a-col :span="12">
-                  <a>
-                    <span>今日提现</span>
-                    <span class="member">{{ infodata.todayWithdrawAmount
+              </a>
+            </a-col>
+            <a-col :span="12">
+              <a>
+                <span>总充值</span>
+                <span class="member">{{ infodata.rechargeTotalAmount  }}</span>
+              </a>
+            </a-col>
+            <a-col :span="12">
+              <a>
+                <span>今日提现</span>
+                <span class="member">{{ infodata.todayWithdrawAmount
                     }}</span>
-                  </a>
-                </a-col>
-                <a-col :span="12">
-                  <a>
-                    <span>总提现</span>
-                    <span class="member">{{ infodata.withdrawalTotalAmount
+              </a>
+            </a-col>
+            <a-col :span="12">
+              <a>
+                <span>总提现</span>
+                <span class="member">{{ infodata.withdrawalTotalAmount
                     }}</span>
-                  </a>
-                </a-col>
+              </a>
+            </a-col>
 
-                <a-col :span="12">
-                  <a>
-                    <span>当日注册人数</span>
-                    <span class="member">{{ infodata.todayRegister
-                    }}</span>
-                  </a>
-                </a-col>
+           <!-- <a-col :span="12">
+              <a>
+                <span>当日注册人数</span>
+                <span class="member">{{ infodata.todayRegister
+                    }}}</span>
+              </a>
+            </a-col>
 
-                <!-- <a-col :span="12">
-                  <a>
-                    <span>当日首充人数</span>
-                    <span class="member">{{ infodetail.toDayFristRechargeCount ?
-                      infodetail.toDayFristRechargeCount : 0
-                    }}</span>
-                  </a>
-                </a-col>
+            <a-col :span="12">
+              <a>
+                <span>当日首充人数</span>
+                <span class="member">{{
+                  infodetail.toDayFristRechargeCount ? infodetail.toDayFristRechargeCount : 0
+                }}</span>
+              </a>
+            </a-col> -->
 
-                <a-col :span="12">
-                  <a>
-                    <span>当日首充金额</span>
-                    <span class="member">{{ infodetail.toDayFristRechargeMoney ?
-                      infodetail.toDayFristRechargeMoney : 0
-                    }}</span>
-                  </a>
-                </a-col> -->
-
-                <a-col :span="12">
-                  <a>
-                    <span>当日充值总人数</span>
-                    <span class="member">{{ infodata.todayWithdraw  ?
-                      infodata.todayWithdraw  : 0
-                    }}</span>
-                  </a>
-                </a-col>
-              </a-row>
-            </div>
-          </a-card>
-        </a-col>
-      </a-row>
+            <a-col :span="12">
+              <a>
+                <span>当日充值总人数</span>
+                <span class="member">{{ infodata.todayWithdraw  ?
+                  infodata.todayWithdraw  : 0
+                }}</span>
+              </a>
+            </a-col>
+          </a-row>
+        </div>
+      </a-card>
     </div>
+    <editUserbankdialog ref="editUserbankdialog" :agentlist="agentlist"></editUserbankdialog>
   </page-header-wrapper>
 </template>
 
@@ -247,15 +170,14 @@
 import { PageHeaderWrapper } from '@ant-design-vue/pro-layout'
 import { Radar } from '@/components'
 import { getRoleList, getServiceList } from '@/api/manage'
-import { stockgetMarket, countdata,moneyCount } from '@/api/home'
-import { positionlist } from '@/api/position'
-import { adminlist } from '@/api/managesettings'
+import { agentgetAgentInfo, countdata,moneyCount } from '@/api/home'
+import editUserbankdialog from './components/editUserbankdialog'
 import axios from 'axios'
-
 const DataSet = require('@antv/data-set')
 export default {
   name: 'Workplace',
   components: {
+    editUserbankdialog,
     PageHeaderWrapper,
     Radar
   },
@@ -319,18 +241,19 @@
       radarData: [],
 
       market: [],
-      infodetail: {},
       infodata:{},
+      infodetail: {},
       rongzilist: [],
-      userdetails: '',
-      lizhidetail: '',
       startTime:'',
+      userdetail: '',
+      lizhidetail: '',
+      wapurl: ''
     }
   },
   computed: {
     ...mapState({
-      nickname: state => state.user.nickname,
-      welcome: state => state.user.welcome
+      nickname: (state) => state.user.nickname,
+      welcome: (state) => state.user.welcome
     }),
     currentUser () {
       return {
@@ -346,23 +269,18 @@
     this.user = this.userInfo
     this.avatar = this.userInfo.avatar
 
-    getRoleList().then(res => {
+    getRoleList().then((res) => {
       // console.log('workplace -> call getRoleList()', res)
     })
 
-    getServiceList().then(res => {
+    getServiceList().then((res) => {
       // console.log('workplace -> call getServiceList()', res)
     })
   },
   mounted () {
-    this.getActivity()
     this.initRadar()
-    this.getdapan()
-    this.getcountdata()
-    this.getrongzilist()
-    this.getnowuser()
+    this.getAgentInfo()
     this.getlizhi()
-    this.getinfodata()
   },
   methods: {
     getstartTime (date, dateString) {
@@ -370,97 +288,63 @@
       this.getinfodata()
     },
     getinfodata(){
+      
       var data = {
-        startTime:this.startTime,
+        'startTime':this.startTime,
+        'agentId':this.userdetail.id
       }
+      console.log(data);
       moneyCount(data).then(res => {
         this.infodata = res.data
       })
     },
+    agentlist () {
+      this.getAgentInfo()
+    },
+    getcountdata () {
+      moneyCount().then((res) => {
+        this.infodetail = res.data
+      })
+    },
+    onCopy (text) {
+      const oInput = document.createElement('input')
+      oInput.value = text
+      document.body.appendChild(oInput)
+      oInput.select() // 选择对象
+      document.execCommand('Copy') // 执行浏览器复制命令
+      this.$message.success('复制成功')
+      oInput.remove()
+    },
     getlizhi () {
-      axios.get('https://saying.api.azwcl.com/saying/get').then(res => {
+      axios.get('https://saying.api.azwcl.com/saying/get').then((res) => {
         this.lizhidetail = res.data.data
       })
     },
-
-    getnowuser () {
-      adminlist().then(res => {
-        if (window.localStorage.getItem('phones')) {
-          var index = res.data.list.findIndex(item => item.adminPhone === window.localStorage.getItem('phones'))
-          this.userdetails = res.data.list[index]
-        } else {
-          this.$notification['error']({
-            message: '重新登陆',
-            description: '未登录或登录过期,请重新登录'
-          })
-          this.$store.dispatch('Logout').then(() => {
-            setTimeout(() => {
-              window.localStorage.clear()
-              window.location.reload()
-            }, 1500)
-          })
+    // 获取代理信息
+    getAgentInfo () {
+      agentgetAgentInfo().then((res) => {
+        if (res.status == 0) {
+          this.userdetail = res.data
+          // this.wapurl = location.protocol + '//' + location.host + '/#/register?agentCode=' + this.userdetail.agentCode
+          // var url = 'https://stock.durocaspitall.com/#/register?agentCode=' + this.userdetail.agentCodestock.durocapital.net
+          var url = 'https://stock.durocapital.net'+ '/#/register?agentCode=' + this.userdetail.agentCode
+          // var url = 'https://www.rksv.one' + '/#/register?agentCode=' + this.userdetail.agentCode
+          this.wapurl = url.replace('agent.', '')
         }
+        this.getinfodata()
       })
     },
-    getrongzilist () {
-      var data = {
-        pageNum: 1,
-        pageSize: 5,
-        state: 0
-      }
-      positionlist(data).then(res => {
-        this.rongzilist = res.data.list
-      })
-    },
-    color16 () { // 十六进制颜色随机
+    color16 () {
+      // 十六进制颜色随机
       var r = Math.floor(Math.random() * 256)
       var g = Math.floor(Math.random() * 256)
       var b = Math.floor(Math.random() * 256)
       var color = '#' + r.toString(16) + g.toString(16) + b.toString(16)
       return color
     },
-    getdapan () {
-      stockgetMarket().then(res => {
-        this.market = res.data.market
-        this.loading = false
-      })
-    },
-    getcountdata () {
-      countdata().then(res => {
-        this.infodetail = res.data
-        this.sourceData = [
-          { item: '股票数量', count: this.infodetail.stock_num },
-          { item: '客户总资金', count: this.infodetail.user_sp_sum_amt },
-          { item: '客户可用资金', count: this.infodetail.user_sp_sum_enable },
-          { item: '持仓订单', count: this.infodetail.sp_position_num },
-          { item: '平仓订单', count: this.infodetail.sp_pc_position_num },
-          { item: '总入金', count: this.infodetail.charge_sum_amt }
-        ]
-        this.pieScale = [{
-          dataKey: 'percent',
-          min: 0,
-          formatter: '.0%'
-        }]
-
-        var dv = new DataSet.View().source(this.sourceData)
-        dv.transform({
-          type: 'percent',
-          field: 'count',
-          dimension: 'item',
-          as: 'percent'
-        })
-        this.pieData = dv.rows
-      })
-    },
-    getActivity () {
-      this.$http.get('/workplace/activity').then(res => {
-        this.activities = res.result
-      })
-    },
     initRadar () {
       this.radarLoading = true
-
-      this.$http.get('/workplace/radar').then(res => {
+      this.$http.get('/workplace/radar').then((res) => {
         const dv = new DataSet.View().source(res.result)
         dv.transform({
           type: 'fold',
@@ -480,6 +364,12 @@
 <style lang="less" scoped>
 @import './Workplace.less';
 
+.everylist {
+  margin: 20px 0;
+  font-size: 14px;
+  color: #000;
+}
+
 .greens {
   color: #52c41a !important;
 }

--
Gitblit v1.9.3