Quellcode durchsuchen

Merge branch 'master' of http://git.cc-lotus.info/count/webnew-count

reloaded vor 5 Jahren
Ursprung
Commit
da4ae5f0e8

BIN
src/assets/noImg.png


+ 2 - 2
src/layout/achievement/achievementsDetail.vue

@@ -4,8 +4,8 @@
       <el-col :span="24" class="info">
         <h3>{{ details.title }}</h3>
         <div>
-          <span>文章来源:{{ details.source }}</span>
-          <span>时间:{{ details.date }}</span>
+          <span>文章来源:{{ details.publish_unit }}</span>
+          <span>时间:{{ details.publish_time }}</span>
         </div>
         <p>{{ details.content }}</p>
       </el-col>

+ 9 - 12
src/layout/index/links.vue

@@ -2,9 +2,11 @@
   <div id="links">
     <el-col :span="24">
       <el-col :span="4" class="titles"> 友情链接</el-col>
-      <el-col :span="5" v-for="(item, index) in linklist" :key="index" class="info"
-        ><el-image :src="item.src" style="width:245px;height:50px"> </el-image
-      ></el-col>
+      <el-col :span="5" v-for="(item, index) in linklist" :key="index" class="info">
+        <el-link :underline="false" :href="item.url" target="_blank">
+          <el-image :src="item.img_url" style="width:245px;height:50px"> </el-image>
+        </el-link>
+      </el-col>
     </el-col>
   </div>
 </template>
@@ -12,16 +14,11 @@
 <script>
 export default {
   name: 'links',
-  props: {},
+  props: {
+    linklist: null,
+  },
   components: {},
-  data: () => ({
-    linklist: [
-      { src: require('@/assets/zz.jpg') },
-      { src: require('@/assets/zz.jpg') },
-      { src: require('@/assets/zz.jpg') },
-      { src: require('@/assets/zz.jpg') },
-    ],
-  }),
+  data: () => ({}),
   created() {},
   computed: {},
   methods: {},

+ 7 - 18
src/layout/index/top-right.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="top-right">
-    <div id="chart" style="height:280px;margin:40px 0 0 0"></div>
+    <div id="chart" style="height:280px;margin:20px 0 0 0"></div>
   </div>
 </template>
 
@@ -15,8 +15,7 @@ import 'echarts/lib/component/toolbox';
 import 'echarts/lib/component/markPoint';
 import 'echarts/lib/component/tooltip';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions } = createNamespacedHelpers('news');
-// const { mapActions: personalRoom } = createNamespacedHelpers('personalroom');
+const { mapActions: news } = createNamespacedHelpers('news');
 export default {
   name: 'top-right',
   props: {},
@@ -30,23 +29,13 @@ export default {
     this.init();
   },
   methods: {
-    ...mapActions(['query']),
-    // ...personalRoom(['countRoom']),
+    ...news(['query']),
     async init() {
       let res = await this.query();
-      console.log(res.data);
-
-      // let rooms = await this.countRoom();
       if (this.$checkRes(res)) {
-        let arr = res.data.filter(f => f.status != '3');
-        console.log(arr);
-
-        let s1 = res.data.filter(f => f.status == '1'); //达成意向
-        console.log(s1);
-        let s2 = res.data.filter(f => f.status == '2'); //对接完成
-        console.log(s2);
-
-        let s3 = res.data.filter(f => f.status == '0'); //正在洽谈
+        let s1 = [{ name: '1' }];
+        let s2 = [{ name: '1' }, { name: '2' }];
+        let s3 = [{ name: '1' }, { name: '2' }, { name: '3' }];
         this.myChart = echarts.init(document.getElementById('chart'));
         const option = {
           title: { text: '运行动态', left: 'center' },
@@ -81,7 +70,7 @@ export default {
     },
   },
   computed: {
-    ...mapState(['top-right']),
+    ...mapState(['']),
     pageTitle() {
       return `${this.$route.meta.title}`;
     },

+ 3 - 7
src/layout/news/infoList.vue

@@ -12,7 +12,7 @@
             <el-col :span="24" class="oneList" @click.native="zixun(item)" v-for="(item, index) in oneList" :key="index">
               <span></span>
               <span class="textOver">{{ item.title }}</span>
-              <span>{{ item.date }}</span>
+              <span>{{ item.publish_time }}</span>
             </el-col>
           </el-col>
         </el-col>
@@ -26,7 +26,7 @@
             <el-col :span="24" class="oneList" @click.native="jishu(item)" v-for="(item, index) in twoList" :key="index">
               <span></span>
               <span class="textOver">{{ item.title }}</span>
-              <span>{{ item.date }}</span>
+              <span>{{ item.publish_time }}</span>
             </el-col>
           </el-col>
         </el-col>
@@ -40,7 +40,7 @@
             <el-col :span="24" class="oneList" @click.native="jobs(item)" v-for="(item, index) in threeList" :key="index">
               <span></span>
               <span class="textOver">{{ item.title }}</span>
-              <span>{{ item.date }}</span>
+              <span>{{ item.publish_time }}</span>
             </el-col>
           </el-col>
         </el-col>
@@ -68,12 +68,9 @@ export default {
       if (item.url) {
         window.open(item.url);
       } else {
-        console.log(item);
-
         this.$router.push({ path: '/news/listDetail', query: { col_name: '工作动态', id: item.id, display: '1' } });
       }
     },
-
     async zixun(item) {
       if (item.url) {
         window.open(item.url);
@@ -81,7 +78,6 @@ export default {
         this.$router.push({ path: '/news/listDetail', query: { col_name: '科技资讯', id: item.id, display: '1' } });
       }
     },
-
     async jishu(item) {
       if (item.url) {
         window.open(item.url);

+ 2 - 2
src/views/communication/parts/technologyDetail.vue

@@ -16,10 +16,10 @@
           <div class="detailcontext">
             <p v-html="detailinfo.content"></p>
           </div>
-          <div class="development" v-if="detailinfo.col_name == '技术问答'">
+          <!-- <div class="development" v-if="detailinfo.col_name == '技术问答'">
             <p>功能开发中</p>
             <p>功能实现流程:<span>问诊记录展示</span>-<span>在线咨询</span>-<span>专家在线问诊</span></p>
-          </div>
+          </div> -->
         </div>
       </div>
     </div>

+ 1 - 1
src/views/communication/parts/topicDetail.vue

@@ -291,7 +291,7 @@ export default {
 .main .two .twoInfo .right .info p {
   font-size: 20px;
   overflow: hidden;
-  height: 170px;
+  height: 160px;
 }
 .main .two .twoInfo .right .jubao {
   height: 40px;

+ 11 - 2
src/views/index.vue

@@ -27,7 +27,7 @@
             <technology :jishuList="jishuList"></technology>
           </el-col>
           <el-col :span="24" class="lianjie">
-            <links></links>
+            <links :linklist="linklist"></links>
           </el-col>
         </div>
       </el-col>
@@ -43,6 +43,7 @@
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: news } = createNamespacedHelpers('news');
+const { mapActions: link } = createNamespacedHelpers('links');
 import top from '@/layout/common/top.vue';
 import menus from '@/layout/common/menus.vue';
 import topRight from '@/layout/index/top-right.vue';
@@ -53,6 +54,11 @@ import technology from '@/layout/index/technology.vue';
 import links from '@/layout/index/links.vue';
 import foot from '@/layout/common/foot.vue';
 export default {
+  metaInfo() {
+    return {
+      title: '吉林省计算中心',
+    };
+  },
   name: 'index',
   props: {},
   components: {
@@ -73,6 +79,7 @@ export default {
     jishuList: [],
     noticeList: [],
     jobsList: [],
+    linklist: [],
   }),
   created() {
     this.search();
@@ -80,7 +87,7 @@ export default {
   computed: {},
   methods: {
     ...news({ newsQuery: 'query', newsFetch: 'fetch' }),
-
+    ...link({ linkQuery: 'query' }),
     async search() {
       let res = await this.newsQuery({ skip: 0, limit: 6, col_name: '工作动态', status: 2 });
       if (this.$checkRes(res)) this.$set(this, `jobsList`, res.data);
@@ -90,6 +97,8 @@ export default {
       if (this.$checkRes(res)) this.$set(this, `serviceList`, res.data);
       res = await this.newsQuery({ skip: 0, limit: 6, col_name: '技术问答', status: 2 });
       if (this.$checkRes(res)) this.$set(this, `jishuList`, res.data);
+      res = await this.linkQuery({ skip: 0, limit: 4 });
+      if (this.$checkRes(res)) this.$set(this, `linklist`, res.data);
     },
   },
 };

+ 6 - 33
src/views/news/index.vue

@@ -50,36 +50,9 @@ export default {
   },
   data: function() {
     return {
-      oneList: [
-        {
-          title: '標題',
-          date: '2020-01-01',
-        },
-        {
-          title: '八条数据',
-          date: '2020-01-01',
-        },
-      ],
-      twoList: [
-        {
-          title: '標題',
-          date: '2020-01-01',
-        },
-        {
-          title: '八条数据',
-          date: '2020-01-01',
-        },
-      ],
-      threeList: [
-        {
-          title: '標題',
-          date: '2020-01-01',
-        },
-        {
-          title: '八条数据',
-          date: '2020-01-01',
-        },
-      ],
+      oneList: [],
+      twoList: [],
+      threeList: [],
     };
   },
   created() {
@@ -88,11 +61,11 @@ export default {
   methods: {
     ...news({ newsQuery: 'query', newsFetch: 'fetch' }),
     async search() {
-      let res = await this.newsQuery({ skip: 0, limit: 6, col_name: '科技资讯', status: 2 });
+      let res = await this.newsQuery({ skip: 0, limit: 8, col_name: '科技资讯', status: 2 });
       if (this.$checkRes(res)) this.$set(this, `oneList`, res.data);
-      res = await this.newsQuery({ skip: 0, limit: 6, col_name: '技术前沿', status: 2 });
+      res = await this.newsQuery({ skip: 0, limit: 8, col_name: '技术前沿', status: 2 });
       if (this.$checkRes(res)) this.$set(this, `twoList`, res.data);
-      res = await this.newsQuery({ skip: 0, limit: 6, col_name: '工作动态', status: 2 });
+      res = await this.newsQuery({ skip: 0, limit: 8, col_name: '工作动态', status: 2 });
       if (this.$checkRes(res)) this.$set(this, `threeList`, res.data);
     },
   },

+ 16 - 21
src/views/news/listDetail.vue

@@ -77,19 +77,10 @@ export default {
       columnName: '',
       displays: '0',
       // 列表
-      list: [
-        {
-          title: '标题',
-          date: '2020-02-02',
-        },
-        {
-          title: '十四数据',
-          date: '2020-02-02',
-        },
-      ],
+      list: [],
       // 总数
       total: 0,
-      limit: 1,
+      limit: 10,
       // 详情
       details: {
         title: '信息标题',
@@ -138,21 +129,25 @@ export default {
       this.menuIndex = index;
       this.columnName = name;
       let res = await this.newsQuery({ skip: 0, limit: 14, col_name: name, status: 2 });
-      if (this.$checkRes(res)) this.$set(this, `list`, res.data);
-      this.$set(this, `total`, res.total);
+      if (this.$checkRes(res)) {
+        console.log(res);
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
       this.menuColor = 'rgb(5,73,130)';
       this.$set(this, `displays`, 0);
     },
     async search({ skip, limit }) {
-      console.log(skip);
-      console.log(limit);
       let res = await this.newsQuery({ skip, limit: 14, col_name: this.columnName, status: 2 });
-      if (this.$checkRes(res)) this.$set(this, `list`, res.data);
+      if (this.$checkRes(res)) {
+        console.log(res);
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
     },
 
     // 点击详情
     async detailBtn(item) {
-      console.log(item);
       if (item.url) {
         window.open(item.url);
       } else {
@@ -161,16 +156,16 @@ export default {
         this.$set(this, `displays`, 1);
       }
     },
-
     async newsearch() {
-      console.log(this.id);
-
       if (this.id) {
         let res = await this.newsFetch(this.id);
         if (this.$checkRes(res)) this.$set(this, `details`, res.data);
       } else {
         let res = await this.newsQuery({ skip: 0, limit: 14, col_name: this.columnName, status: 2 });
-        if (this.$checkRes(res)) this.$set(this, `list`, res.data);
+        if (this.$checkRes(res)) {
+          this.$set(this, `list`, res.data);
+          this.$set(this, `total`, res.total);
+        }
       }
     },
     async detail() {

+ 1 - 1
src/views/news/parts/newsList.vue

@@ -5,7 +5,7 @@
         <el-col :span="24" class="list" @click.native="detailBtn(item)" v-for="(item, index) in list" :key="index">
           <span></span>
           <span class="textOver">{{ item.title }}</span>
-          <span>{{ item.date }}</span>
+          <span>{{ item.publish_time }}</span>
         </el-col>
         <el-col :span="24" class="page">
           <pagination v-on="$listeners" :total="total" :limit="limit" position="right"></pagination>

+ 3 - 1
src/views/partisan/index.vue

@@ -21,7 +21,8 @@
                 @click.native="$router.push({ path: '/partisan/listDetail', query: { col_name: '图片新闻', id: item.id, display: '1' } })"
                 class="ruleList"
               >
-                <el-image :src="item.img_url"></el-image>
+                <el-image :src="item.img_url" v-if="item.img_url"></el-image>
+                <el-image :src="noImg" v-else></el-image>
                 <p class="textOver">{{ item.title }}</p>
               </el-carousel-item>
             </el-carousel>
@@ -104,6 +105,7 @@ export default {
     stuList: [],
     // 党风廉政
     politicsList: [],
+    noImg: require('@/assets/noImg.png'),
   }),
   created() {
     this.searchInfo();

+ 1 - 1
src/views/partisan/parts/newsDetail.vue

@@ -7,7 +7,7 @@
           <span>发布单位:{{ details.publish_unit }}</span>
           <span>时间:{{ details.publish_time }}</span>
         </div>
-        <el-col :span="24" class="image">
+        <el-col :span="24" class="image" v-if="details.img_url">
           <el-image :src="details.img_url"></el-image>
         </el-col>
         <p v-html="details.content"></p>

+ 12 - 14
src/views/pcenter/links.vue

@@ -23,21 +23,19 @@
         </el-col>
         <el-col :span="24" class="detail" v-else>
           <el-col class="top"><el-button type="primary" size="mini" @click="back">返回</el-button></el-col>
-          <el-col>
-            <el-form ref="form" :model="form" :rules="rules" label-width="120px" label-position="left">
+          <el-col :span="24">
+            <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+              <el-form-item label="链接名称:">
+                <el-input v-model="form.name" placeholder="请输入链接名称"></el-input>
+              </el-form-item>
+              <el-form-item label="链接地址:" prop="url">
+                <el-input v-model="form.url" placeholder="请输入链接地址"></el-input>
+              </el-form-item>
+              <el-form-item label="链接图片:">
+                <upload :limit="1" :data="form.img_url" type="img_url" :url="'/files/count/upload'" @upload="uploadSuccess"></upload>
+              </el-form-item>
               <el-form-item>
-                <el-form-item label="链接名称:">
-                  <el-input v-model="form.name" placeholder="请输入需求技术名称"></el-input>
-                </el-form-item>
-                <el-form-item label="链接地址:" prop="url">
-                  <el-input v-model="form.url" placeholder="请输入需求技术名称"></el-input>
-                </el-form-item>
-                <el-form-item label="链接图片:">
-                  <upload :limit="1" :data="form.img_url" type="img_url" :url="'/files/count/upload'" @upload="uploadSuccess"></upload>
-                </el-form-item>
-                <el-form-item>
-                  <el-button type="primary" @click="onSubmit()">提交</el-button>
-                </el-form-item>
+                <el-button type="primary" @click="onSubmit()">提交</el-button>
               </el-form-item>
             </el-form>
           </el-col>