Ver código fonte

20点01分 合并

hmp 4 anos atrás
pai
commit
665592746d

+ 252 - 0
src/components/activityuv/activityuv.vue

@@ -0,0 +1,252 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.activityuv_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+
+      <template slot="userInfo" slot-scope="scope">
+        <div style="display: flex;"  v-if="scope.row.loginWebVO.id">
+          <div style="display: flex;justify-content: center;align-items: center;">
+            <el-avatar size="large" :src="scope.row.loginWebVO.avatar"></el-avatar>
+          </div>
+           <div style="padding: 10px;">
+             <div >昵称:{{scope.row.loginWebVO.nickName}}</div>
+             <div>手机:{{scope.row.loginWebVO.phone}}</div>
+           </div>
+        </div>
+        <div style="display: flex;" v-else>
+          <div style="display: flex;justify-content: center;align-items: center;">
+            <el-avatar size="large" src="https://yyzs.nanyue6688.com/obsfile/0ad6d53ecf5448bfb9694fdaed27eadc-avatar.png"></el-avatar>
+          </div>
+           <div style="padding: 10px;">
+             <div style="color: #DD6161;">用户已注销</div>
+           </div>
+        </div>
+      </template>
+
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/activityuv/activityuv";
+  import {mapGetters} from "vuex";
+
+  export default {
+    props:{
+      activityId:String
+    },
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "用户id",
+              hide:true,
+              prop: "userId",
+              rules: [{
+                required: true,
+                message: "请输入用户id",
+                trigger: "blur"
+              }]
+            },
+            {
+              label:"用户信息",
+              prop:"userInfo",
+              slot:true
+            },
+            {
+              label: "活动id",
+              hide:true,
+              prop: "activityId",
+              rules: [{
+                required: true,
+                message: "请输入活动id",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.activityuv_add, false),
+          viewBtn: this.vaildData(this.permission.activityuv_view, false),
+          delBtn: this.vaildData(this.permission.activityuv_delete, false),
+          editBtn: this.vaildData(this.permission.activityuv_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        if (this.activityId) {
+          this.query.activityId=this.activityId
+        }
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 307 - 0
src/components/useractivitystatistical/useractivitystatistical.vue

@@ -0,0 +1,307 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.useractivitystatistical_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+      <template slot="userInfo" slot-scope="scope">
+        <div style="display: flex;"  v-if="scope.row.loginWebVO">
+          <div style="display: flex;justify-content: center;align-items: center;">
+            <el-avatar size="large" :src="scope.row.loginWebVO.avatar"></el-avatar>
+          </div>
+           <div style="padding: 10px;">
+             <div >昵称:{{scope.row.loginWebVO.nickName}}</div>
+             <div>手机:{{scope.row.loginWebVO.phone}}</div>
+           </div>
+        </div>
+        <div style="display: flex;" v-else>
+          <div style="display: flex;justify-content: center;align-items: center;">
+            <el-avatar size="large" src="https://yyzs.nanyue6688.com/obsfile/0ad6d53ecf5448bfb9694fdaed27eadc-avatar.png"></el-avatar>
+          </div>
+           <div style="padding: 10px;">
+             <div style="color: #DD6161;">用户已注销</div>
+           </div>
+        </div>
+      </template>
+      <template slot="rank" slot-scope="scope" v-if="scope.row.loginWebVO">
+        <el-tag effect="dark">
+          {{scope.row.loginWebVO.rank}}
+        </el-tag>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/useractivitystatistical/useractivitystatistical";
+  import {mapGetters} from "vuex";
+
+  export default {
+    props:{
+      activityId:String
+    },
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          menu:false,
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              hide:true,
+              label: "用户id",
+              prop: "userId",
+              rules: [{
+                required: true,
+                message: "请输入用户id",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "选手信息",
+              serach:true,
+              prop: "userInfo",
+              slot:true
+            },
+            {
+              label: "排名",
+              prop: "rank",
+              slot:true
+            },
+            {
+              hide:true,
+              label: "活动id",
+              prop: "activityId",
+              rules: [{
+                required: true,
+                message: "请输入活动id",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "活动可用热力值",
+              prop: "usableHotValue",
+              rules: [{
+                required: true,
+                message: "请输入可用热力值",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "活动总热力值",
+              prop: "totalHotValue",
+              rules: [{
+                required: true,
+                message: "请输入总热力值",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "活动可用积分",
+              prop: "usablePointsValue",
+              rules: [{
+                required: true,
+                message: "请输入可用积分",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "活动总积分",
+              prop: "totalPointsValue",
+              rules: [{
+                required: true,
+                message: "请输入总积分",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "用户在此活动收到的总现金",
+              prop: "totalCash",
+              rules: [{
+                required: true,
+                message: "请输入用户在此活动收到的总现金",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.useractivitystatistical_add, false),
+          viewBtn: this.vaildData(this.permission.useractivitystatistical_view, false),
+          delBtn: this.vaildData(this.permission.useractivitystatistical_delete, false),
+          editBtn: this.vaildData(this.permission.useractivitystatistical_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        if (this.activityId) {
+          this.query.activityId=this.activityId
+        }
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 42 - 8
src/views/activity/activity.vue

@@ -1,5 +1,11 @@
 <template>
   <basic-container>
+    <el-dialog @close="dialogShow=false" append-to-body :close-on-click-modal="false" :visible.sync="dialogShow"
+      title="访问人员" width="80%">
+       <activity-uv v-if="dialogTitle=='访问人员'" :ref="refName" :activityId="activityId"></activity-uv>
+       <user-activity-statistical v-if="dialogTitle=='查看选手'" :ref="refName" :activityId="activityId"></user-activity-statistical>
+    </el-dialog>
+
     <avue-crud id="activity" :option="option" :table-loading="loading" :data="data" :page.sync="page"
       :permission="permissionList" :before-open="beforeOpen" v-model="form" ref="crud" @row-update="rowUpdate"
       @row-save="rowSave" @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
@@ -46,19 +52,24 @@
       <template slot-scope="scope" slot="showData">
         参与人数:<div
           style="background-color: #3296fa;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ; display:inline;">
-          {{scope.row.applyNum}}</div><br>
+          {{scope.row.applyNum}}
+        </div><br>
         访问次数:<div
           style="background-color: #00aa7f;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ; display:inline;">
-          {{scope.row.totalVisit || 0}}</div><br>
+          {{scope.row.totalVisit || 0}}
+        </div><br>
         礼物总值:<div
           style="background-color: #5bc0de;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ; display:inline;">
-          {{ +scope.row.totalCash}}</div><br>
+          {{ +scope.row.totalCash}}
+        </div><br>
         打榜数量:<div
           style="background-color: #5bc0de;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ; display:inline;">
-          {{scope.row.hitNum}}</div><br>
+          {{scope.row.hitNum}}
+        </div><br>
         打赏数量:<div
           style="background-color: #99cf99;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ; display:inline;">
-          {{scope.row.rewardNum}}</div><br>
+          {{scope.row.rewardNum}}
+        </div><br>
       </template>
 
 
@@ -68,7 +79,7 @@
           @click.stop="handleEdit(scope.row)">编辑
         </el-button>
         <el-button type="text" size="small" icon="el-icon-view" plain class="none-border"
-          @click.stop="view(scope.row.id,'查看选手')">查看选手
+          @click.stop="openDialog(scope.row.id,'查看选手')">查看选手
         </el-button>
         <el-button type="text" size="small" icon="el-icon-view" plain class="none-border"
           @click.stop="view(scope.row.id,'查看作品')">查看作品
@@ -80,7 +91,7 @@
           @click.stop="view(scope.row.id,'打赏记录')">打赏记录
         </el-button>
         <el-button type="text" size="small" icon="el-icon-view" plain class="none-border"
-          @click.stop="view(scope.row.id,'访问人员')">访问人员
+          @click.stop="openDialog(scope.row.id,'访问人员')">访问人员
         </el-button>
       </template>
     </avue-crud>
@@ -91,7 +102,9 @@
 </template>
 
 <script>
+  import activityUv from "../../components/activityuv/activityuv.vue"
   import activityAdd from "./comps/activity-add.vue"
+  import userActivityStatistical from "../../components/useractivitystatistical/useractivitystatistical.vue"
   import {
     getList,
     getDetail,
@@ -105,7 +118,9 @@
 
   export default {
     components: {
-      activityAdd
+      activityAdd,
+      activityUv,
+      userActivityStatistical
     },
     data() {
       return {
@@ -141,6 +156,11 @@
           presentIds: []
         },
 
+        dialogShow:false,
+        activityId: '',
+        refName:'',
+        dialogTitle:'',
+
         form: {},
         query: {},
         loading: true,
@@ -350,6 +370,20 @@
       }
     },
     methods: {
+      openDialog(id,name) {
+        this.dialogTitle=name
+        if (name=='访问人员') {
+          this.refName='activityUvRef'
+        }else if (name=='查看选手') {
+          this.refName='userActivityStatisticalRef'
+        }
+        this.activityId = id
+        this.dialogShow = true
+        if (this.canReset) {
+          this.$refs[this.refName].refreshChange()
+        }
+        this.canReset = true
+      },
       rowClick(row, event) {
         if (event.property == 'enable') {
           let param = {

+ 3 - 0
src/views/activityuv/activityuv.vue

@@ -36,6 +36,9 @@
   import {mapGetters} from "vuex";
 
   export default {
+    props:{
+      activityId:String
+    },
     data() {
       return {
         form: {},

+ 1 - 1
src/views/loginuser/loginuser.vue

@@ -237,7 +237,7 @@
           url: '/api/cyzh-loginUser/loginuser/bindTag',
           method: "post",
           data: this.labelForm
-        }).then(res => {
+        }).then(() => {
             this.userLabelVisible = false;
         })
       },

+ 5 - 0
src/views/pointsgoods/pointsgoods.vue

@@ -103,6 +103,11 @@
                 trigger: "blur"
               }]
             },
+            {
+              label: "产品描述",
+              type:"textarea",
+              prop: "description",
+            },
             {
               label: "现金值",
               prop: "cashValue",

+ 10 - 2
src/views/useractivitystatistical/useractivitystatistical.vue

@@ -28,7 +28,7 @@
         </el-button>
       </template>
       <template slot="userInfo" slot-scope="scope">
-        <div style="display: flex;">
+        <div style="display: flex;"  v-if="scope.row.loginWebVO">
           <div style="display: flex;justify-content: center;align-items: center;">
             <el-avatar size="large" :src="scope.row.loginWebVO.avatar"></el-avatar>
           </div>
@@ -37,8 +37,16 @@
              <div>手机:{{scope.row.loginWebVO.phone}}</div>
            </div>
         </div>
+        <div style="display: flex;" v-else>
+          <div style="display: flex;justify-content: center;align-items: center;">
+            <el-avatar size="large" src="https://yyzs.nanyue6688.com/obsfile/0ad6d53ecf5448bfb9694fdaed27eadc-avatar.png"></el-avatar>
+          </div>
+           <div style="padding: 10px;">
+             <div style="color: #DD6161;">用户已注销</div>
+           </div>
+        </div>
       </template>
-      <template slot="rank" slot-scope="scope">
+      <template slot="rank" slot-scope="scope" v-if="scope.row.loginWebVO">
         <el-tag effect="dark">
           {{scope.row.loginWebVO.rank}}
         </el-tag>

+ 30 - 1
src/views/userbank/userbank.vue

@@ -27,6 +27,19 @@
                    @click="handleDelete">删 除
         </el-button>
       </template>
+
+      <template slot="userInfo" slot-scope="scope">
+        <div style="display: flex;">
+          <div style="display: flex;justify-content: center;align-items: center;">
+            <el-avatar size="large" :src="scope.row.loginWebVO.avatar"></el-avatar>
+          </div>
+           <div style="padding: 10px;">
+             <div >昵称:{{scope.row.loginWebVO.nickName}}</div>
+           </div>
+        </div>
+      </template>
+
+
     </avue-crud>
   </basic-container>
 </template>
@@ -61,6 +74,7 @@
           column: [
             {
               label: "用户id",
+              hide:true,
               prop: "userId",
               rules: [{
                 required: true,
@@ -68,6 +82,11 @@
                 trigger: "blur"
               }]
             },
+            {
+              label:"用户信息",
+              slot:true,
+              prop:'userInfo'
+            },
             {
               label: "银行卡号",
               prop: "cardNo",
@@ -87,7 +106,7 @@
               }]
             },
             {
-              label: "手机号",
+              label: "验证手机号",
               prop: "phone",
               rules: [{
                 required: true,
@@ -98,6 +117,11 @@
             {
               label: "银行类型",
               prop: "bankType",
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=bank_type",
+              props: {
+                label: "dictValue",
+                value: "dictKey"
+              },
               rules: [{
                 required: true,
                 message: "请输入银行类型",
@@ -106,6 +130,11 @@
             },
             {
               label: "账户类型",
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=bank_account_type",
+              props: {
+                label: "dictValue",
+                value: "dictKey"
+              },
               prop: "bankAccountType",
               rules: [{
                 required: true,