guhongwei 4 年之前
父节点
当前提交
7ae1cf73a4
共有 2 个文件被更改,包括 14 次插入7 次删除
  1. 2 2
      src/views/adminCenter/homeIndex/parts/one.vue
  2. 12 5
      src/views/news/parts/list.vue

+ 2 - 2
src/views/adminCenter/homeIndex/parts/one.vue

@@ -40,7 +40,7 @@ export default {
         var option;
         option = {
           title: {
-            text: '创新券流程数据统计',
+            text: '高企申报流程数据统计',
             left: 'center',
           },
           legend: {
@@ -51,7 +51,7 @@ export default {
           },
           series: [
             {
-              name: '创新券流程数据统计',
+              name: '高企申报流程数据统计',
               type: 'pie',
               radius: '55%',
               center: ['50%', '50%'],

+ 12 - 5
src/views/news/parts/list.vue

@@ -11,7 +11,7 @@
               <el-col :span="18" class="title textOver">
                 {{ item.title }}
               </el-col>
-              <el-col :span="5" class="date"> [{{ item.release_time }}] </el-col>
+              <el-col :span="5" class="date"> [{{ getDate(item.release_time) }}] </el-col>
             </el-col>
           </el-col>
         </el-col>
@@ -24,7 +24,7 @@
               <el-col :span="18" class="title textOver">
                 {{ item.title }}
               </el-col>
-              <el-col :span="5" class="date"> [{{ item.release_time }}] </el-col>
+              <el-col :span="5" class="date"> [{{ getDate(item.release_time) }}] </el-col>
             </el-col>
           </el-col>
         </el-col>
@@ -42,7 +42,7 @@
               {{ item.title }}
             </el-col>
             <el-col :span="24" class="date">
-              {{ item.release_time }}
+              {{ getDate(item.release_time) }}
             </el-col>
           </el-col>
         </el-col>
@@ -55,7 +55,7 @@
               <el-col :span="18" class="title textOver">
                 {{ item.title }}
               </el-col>
-              <el-col :span="5" class="date"> [{{ item.release_time }}] </el-col>
+              <el-col :span="5" class="date"> [{{ getDate(item.release_time) }}] </el-col>
             </el-col>
           </el-col>
         </el-col>
@@ -68,7 +68,7 @@
               <el-col :span="18" class="title textOver">
                 {{ item.title }}
               </el-col>
-              <el-col :span="5" class="date"> [{{ item.release_time }}] </el-col>
+              <el-col :span="5" class="date"> [{{ getDate(item.release_time) }}] </el-col>
             </el-col>
           </el-col>
         </el-col>
@@ -78,6 +78,7 @@
 </template>
 
 <script>
+const moment = require('moment');
 import { mapState, createNamespacedHelpers } from 'vuex';
 export default {
   name: 'list',
@@ -100,6 +101,12 @@ export default {
     detailBtn(id, index) {
       this.$emit('detail', { id: id, index: index });
     },
+    getDate(date) {
+      if (date) {
+        let newDate = moment(date.createdAt).format('YYYY-MM-DD');
+        if (newDate) return newDate;
+      }
+    },
   },
   computed: {
     ...mapState(['user']),