xiaoqiang преди 4 години
родител
ревизия
012e5802e4

+ 10 - 0
src/api/sing_active/activehelprecord.js

@@ -48,3 +48,13 @@ export const update = (row) => {
   })
 }
 
+
+export const getVote = (productId) => {
+  return request({
+    url: '/api/sing_active/activehelprecord/vote',
+    method: 'get',
+    params: {
+      productId
+    }
+  })
+}

+ 4 - 4
src/views/desk/notice.vue

@@ -99,8 +99,8 @@
               label: "通知时间",
               prop: "releaseTimeRange",
               type: "datetime",
-              format: "yyyy-MM-dd hh:mm:ss",
-              valueFormat: "yyyy-MM-dd hh:mm:ss",
+              format: "yyyy-MM-dd HH:mm:ss",
+              valueformat: "yyyy-MM-dd HH:mm:ss",
               searchRange:true,
               hide: true,
               addDisplay: false,
@@ -117,8 +117,8 @@
               label: "通知日期",
               prop: "releaseTime",
               type: "date",
-              format: "yyyy-MM-dd hh:mm:ss",
-              valueFormat: "yyyy-MM-dd hh:mm:ss",
+              format: "yyyy-MM-dd HH:mm:ss",
+              valueformat: "yyyy-MM-dd HH:mm:ss",
               rules: [{
                 required: true,
                 message: "请输入通知日期",

+ 2 - 2
src/views/sing_active/activehelp.vue

@@ -89,11 +89,11 @@
             /*{
               label: "创建时间",
               prop: "createTime",
-              format: "yyyy-MM-dd hh:mm:ss",
+              format: "yyyy-MM-dd HH:mm:ss",
               searchRange: true,
               type: "datetime",
               search: false,
-              valueFormat: "yyyy-MM-dd HH:mm:ss",
+              valueformat: "yyyy-MM-dd HH:mm:ss",
               rules: [{
                 required: true,
                 message: "请输入创建时间",

+ 3 - 2
src/views/sing_active/activehelprecord.vue

@@ -104,6 +104,7 @@
             {
               label: "IP地址",
               prop: "ip",
+              search: true,
               rules: [{
                 required: true,
                 message: "请输入IP地址",
@@ -132,11 +133,11 @@
             {
               label: "创建时间",
               prop: "createTime",
-              format: "yyyy-MM-dd hh:mm:ss",
+              format: "yyyy-MM-dd HH:mm:ss",
               searchRange: true,
               type: "datetime",
               search: true,
-              valueFormat: "yyyy-MM-dd HH:mm:ss",
+              valueformat: "yyyy-MM-dd HH:mm:ss",
               rules: [{
                 required: true,
                 message: "请输入创建时间",

+ 25 - 3
src/views/sing_active/activeproductrecord.vue

@@ -82,22 +82,40 @@
                    @click="handleDelete">删 除
         </el-button>
       </template>
+      <template slot="menu" slot-scope="{row}">
+        <el-button type="text" size="small" icon="el-icon-view" @click="checkVote(row)">投票ip情况</el-button>
+      </template>
     </avue-crud>
+
+    <el-dialog title="作品投票情况"
+               append-to-body
+               :visible.sync="voteVisible"
+               width="75%">
+      <div v-if="voteVisible">
+       <product-help-vote :product-id="voteProductId"></product-help-vote>
+      </div>
+    </el-dialog>
+
   </basic-container>
 </template>
 
 <script>
 import {add, generateList, getDetail, getList, remove, update} from "@/api/sing_active/activeproductrecord";
+
 import {getList as getActiveList,getDetail as getActiveRecordDetail} from "@/api/sing_active/activerecord";
 import {mapGetters} from "vuex";
 import moment from "moment";
 import IconFontComp from "@/views/base/iconfont";
 import FileUtil from "@/util/fileUtil";
+import ProductHelpVote from "./producthelpvote";
 
 export default {
-  components: {IconFontComp},
+  components: {ProductHelpVote, IconFontComp},
   data() {
     return {
+      voteProductId: '',
+      voteVisible: false,
+
       form: {},
       searchActiveOption:[],
       query: {
@@ -335,8 +353,8 @@ export default {
             label: "创建时间",
             prop: "createTime",
             type: "datetime",
-            format: "yyyy-MM-dd hh:mm:ss",
-            valueFormat: "yyyy-MM-dd hh:mm:ss",
+            format: "yyyy-MM-dd HH:mm:ss",
+            valueformat: "yyyy-MM-dd HH:mm:ss",
             searchRange: true,
             addDisplay: false,
             editDisplay: false,
@@ -442,6 +460,10 @@ export default {
     this.searchActiveList();
   },
   methods: {
+    checkVote(row){
+      this.voteProductId = row.id;
+      this.voteVisible = true;
+    },
     searchActiveList(value){
       getActiveList(1,999,{
         title: value,

+ 4 - 3
src/views/sing_active/activerecord.vue

@@ -178,11 +178,11 @@ export default {
             {
               label: "开始时间",
               prop: "startTime",
-              format: "yyyy-MM-dd hh:mm:ss",
+              format: "yyyy-MM-dd HH:mm:ss",
               searchRange: true,
               type: "datetime",
               search: true,
-              valueFormat: "yyyy-MM-dd HH:mm:ss",
+              valueformat: "yyyy-MM-dd HH:mm:ss",
               rules: [{
                 required: true,
                 message: "请输入开始时间",
@@ -193,7 +193,8 @@ export default {
               label: "结束时间",
               prop: "endTime",
               type: "datetime",
-              valueFormat: "yyyy-MM-dd HH:mm:ss",
+              format: "yyyy-MM-dd HH:mm:ss",
+              valueformat: "yyyy-MM-dd HH:mm:ss",
               rules: [{
                 required: true,
                 message: "请输入结束时间",

+ 105 - 0
src/views/sing_active/producthelpvote.vue

@@ -0,0 +1,105 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               v-model="form"
+               ref="crud"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="success"
+                   size="small"
+                   icon="el-icon-download"
+                   v-if="data && data.length > 0"
+                   plain
+                   @click="handleDownload">导出
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getVote} from "@/api/sing_active/activehelprecord";
+  import {mapGetters} from "vuex";
+
+  export default {
+    name: "product-help-vote",
+    data() {
+      return {
+        form: {},
+        data: [],
+        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: false,
+          addBtn: false,
+          viewBtn: false,
+          menu: false,
+          selection: false,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "作品名称",
+              prop: "productName",
+            },
+            {
+              label: "作品名称",
+              prop: "productNo",
+            },
+            {
+              label: "ip",
+              prop: "ip",
+            },
+            {
+              label: "投票次数",
+              prop: "count",
+            },
+          ]
+        },
+      };
+    },
+    props: {
+      productId: {
+        type: String,
+      }
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+    },
+    methods: {
+      handleDownload(){
+        this.$Export.excel({
+          title: this.data[0].productName + "投票情况",
+          columns: this.option.column,
+          data: this.data
+        })
+      },
+      onLoad() {
+        this.loading = true;
+        if (this.productId){
+          getVote(this.productId).then(res => {
+            const data = res.data.data;
+            this.loading = false;
+            this.data = data;
+          });
+        }
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 2 - 2
src/views/system/tenant.vue

@@ -195,8 +195,8 @@ export default {
             label: "过期时间",
             prop: "expireTime",
             type: "date",
-            format: "yyyy-MM-dd hh:mm:ss",
-            valueFormat: "yyyy-MM-dd hh:mm:ss",
+            format: "yyyy-MM-dd HH:mm:ss",
+            valueformat: "yyyy-MM-dd HH:mm:ss",
             span: 24,
           },
         ]

+ 2 - 2
src/views/system/user.vue

@@ -454,8 +454,8 @@
                   label: "用户生日",
                   type: "date",
                   prop: "birthday",
-                  format: "yyyy-MM-dd hh:mm:ss",
-                  valueFormat: "yyyy-MM-dd hh:mm:ss",
+                  format: "yyyy-MM-dd HH:mm:ss",
+                  valueformat: "yyyy-MM-dd HH:mm:ss",
                   hide: true
                 },
                 {