guhongwei 4 years ago
parent
commit
9b5f220291
4 changed files with 170 additions and 10 deletions
  1. 7 0
      src/store/index.js
  2. 42 0
      src/store/market/journcolumn.js
  3. 39 0
      src/store/market/journnews.js
  4. 82 10
      src/views/service/index.vue

+ 7 - 0
src/store/index.js

@@ -30,6 +30,10 @@ import password from './market/password';
 import tranaudit from './market/tranaudit';
 import expertsuser from './market/exportuser';
 import productpact from './market/productpact';
+// 11-3新闻资讯
+import journcolumn from './market/journcolumn';
+import journnews from './market/journnews';
+
 import users from './user/user';
 import authUser from './user/auth-user';
 import wxchattest from './user/wxchattest';
@@ -87,5 +91,8 @@ export default new Vuex.Store({
     liveTechnicalNews, //技术交流内容
     codeitem, //字典表
     codeCategory, //字典表类别
+    // 11-3新闻资讯
+    journcolumn,
+    journnews,
   },
 });

+ 42 - 0
src/store/market/journcolumn.js

@@ -0,0 +1,42 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  columnInfo: `/api/market/journcolumn`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.columnInfo}`, {
+      skip,
+      limit,
+      ...info,
+    });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.columnInfo}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.columnInfo}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.columnInfo}/update/${id}`, data);
+    return res;
+  },
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.columnInfo}/${payload}`);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 39 - 0
src/store/market/journnews.js

@@ -0,0 +1,39 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  newsInfo: `/api/market/journnews`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit = undefined, ...info } = {}) {
+    const res = await this.$axios.$get(api.newsInfo, { skip, limit, ...info });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.newsInfo}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.newsInfo}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...info } = {}) {
+    const res = await this.$axios.$post(`${api.newsInfo}/update/${id}`, { ...info });
+    return res;
+  },
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.newsInfo}/${payload}`);
+    return res;
+  },
+};
+
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 82 - 10
src/views/service/index.vue

@@ -17,7 +17,14 @@
                 </el-col>
               </el-col>
               <el-col :span="24" class="info">
-                列表
+                <el-col :span="24" v-for="(item, index) in xwzxList" :key="index">
+                  <el-col :span="20">
+                    {{ item.title }}
+                  </el-col>
+                  <el-col :span="4">
+                    {{ item.date }}
+                  </el-col>
+                </el-col>
               </el-col>
             </el-col>
             <el-col :span="12" class="right">
@@ -33,7 +40,14 @@
                 </el-col>
               </el-col>
               <el-col :span="24" class="info">
-                列表
+                <el-col :span="24" v-for="(item, index) in gzdtList" :key="index">
+                  <el-col :span="20">
+                    {{ item.title }}
+                  </el-col>
+                  <el-col :span="4">
+                    {{ item.date }}
+                  </el-col>
+                </el-col>
               </el-col>
             </el-col>
           </el-col>
@@ -54,7 +68,14 @@
                 </el-col>
               </el-col>
               <el-col :span="24" class="info">
-                列表
+                <el-col :span="24" v-for="(item, index) in tztgList" :key="index">
+                  <el-col :span="20">
+                    {{ item.title }}
+                  </el-col>
+                  <el-col :span="4">
+                    {{ item.date }}
+                  </el-col>
+                </el-col>
               </el-col>
             </el-col>
             <el-col :span="12" class="right">
@@ -70,7 +91,14 @@
                 </el-col>
               </el-col>
               <el-col :span="24" class="info">
-                列表
+                <el-col :span="24" v-for="(item, index) in jsqyList" :key="index">
+                  <el-col :span="20">
+                    {{ item.title }}
+                  </el-col>
+                  <el-col :span="4">
+                    {{ item.date }}
+                  </el-col>
+                </el-col>
               </el-col>
             </el-col>
           </el-col>
@@ -94,6 +122,34 @@ export default {
       // 中间图片
       centerurl: require('@a/dynamic8.png'),
       iconImage: require('@/assets/live/square_big.png'),
+      // 新闻资讯
+      xwzxList: [
+        {
+          title: '测试标题',
+          date: '2020-10-10',
+        },
+      ],
+      // 工作动态
+      gzdtList: [
+        {
+          title: '测试标题',
+          date: '2020-10-10',
+        },
+      ],
+      // 通知通告
+      tztgList: [
+        {
+          title: '测试标题',
+          date: '2020-10-10',
+        },
+      ],
+      // 技术前沿
+      jsqyList: [
+        {
+          title: '测试标题',
+          date: '2020-10-10',
+        },
+      ],
     };
   },
   created() {},
@@ -115,17 +171,25 @@ export default {
   .one {
     margin: 0 0 10px 0;
     height: 500px;
-    overflow: hidden;
     .left {
+      width: 49%;
+      box-shadow: 0 0 5px #409eff;
+      border-radius: 20px;
+      padding: 15px;
+      margin: 0 20px 0 0;
       .info {
-        height: 450px;
+        height: 420px;
         border: 1px solid red;
         overflow: hidden;
       }
     }
     .right {
+      width: 49%;
+      border-radius: 20px;
+      padding: 15px;
+      box-shadow: 0 0 5px #409eff;
       .info {
-        height: 450px;
+        height: 420px;
         border: 1px solid red;
         overflow: hidden;
       }
@@ -141,17 +205,25 @@ export default {
   }
   .three {
     height: 500px;
-    overflow: hidden;
     .left {
+      width: 49%;
+      box-shadow: 0 0 5px #409eff;
+      border-radius: 20px;
+      padding: 15px;
+      margin: 0 20px 0 0;
       .info {
-        height: 450px;
+        height: 420px;
         border: 1px solid red;
         overflow: hidden;
       }
     }
     .right {
+      width: 49%;
+      border-radius: 20px;
+      padding: 15px;
+      box-shadow: 0 0 5px #409eff;
       .info {
-        height: 450px;
+        height: 420px;
         border: 1px solid red;
         overflow: hidden;
       }