فهرست منبع

Merge branch 'master' of http://git.cc-lotus.info/live/web-live

lrf402788946 4 سال پیش
والد
کامیت
135eb3eb7e

BIN
public/favicon.ico


+ 8 - 0
src/views/market/list/achieve.vue

@@ -33,6 +33,8 @@ export default {
       dropList: [],
       total: 0,
       detail: {},
+      // 成果单位
+      company: '',
     };
   },
   created() {
@@ -47,6 +49,7 @@ export default {
     async search({ skip = 0, limit = 5, ...info } = {}) {
       console.log('in function:');
       // TODO: 查询
+      if (this.company) info.company = this.company;
       let res = await this.query({ skip, limit, status: '2', type: '1', ...info });
       if (this.$checkRes(res)) {
         this.$set(this, `list`, res.data);
@@ -56,13 +59,18 @@ export default {
       }
     },
     change(data) {
+      console.log(data);
       if (data === '中科系') {
+        this.$set(this, `company`, data);
         // TODO:原逻辑:将数据过滤出中科系;我觉得:应该是查有关中科系的信息
       } else if (data === '其他') {
+        this.$set(this, `company`, data);
         // TODO:原逻辑:是过滤某些单位; 应该去查这些单位的数据
       } else {
+        this.$set(this, `company`, data);
         // TODO:原逻辑:过滤含有这些内容的数据;应该去查
       }
+      this.search();
     },
     // 查询详情
     async searchInfo() {

+ 7 - 1
src/views/techolchat/index/question.vue

@@ -11,7 +11,7 @@
               {{ item.title }}
             </el-col>
             <el-col :span="4" class="date">
-              {{ item.create_date || '暂无' }}
+              {{ getDate(item.create_date) || '暂无' }}
             </el-col>
             <el-col :span="24" class="orgin"> 信息来源:{{ item.origin || '暂无' }} </el-col>
           </el-col>
@@ -24,6 +24,7 @@
 <script>
 import top from './parts/topColumn.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
+var moment = require('moment');
 export default {
   metaInfo() {
     return { title: this.$route.meta.title };
@@ -53,6 +54,11 @@ export default {
     detailBtn(data) {
       this.$router.push({ path: './list', query: { index: 0, id: data._id } });
     },
+    // 整理时间
+    getDate(date) {
+      let newsDate = moment(date).format('YYYY-MM-DD');
+      if (newsDate) return newsDate;
+    },
   },
   computed: {
     ...mapState(['user']),

+ 9 - 2
src/views/techolchat/list/detail-model/parts/questionInfo.vue

@@ -6,7 +6,7 @@
           {{ info.title }}
         </el-col>
         <el-col :span="24" class="other">
-          <span>发布时间:{{ info.create_date || '暂无' }}</span>
+          <span>发布时间:{{ getDate(info.create_date) || '暂无' }}</span>
           <span>信息来源:{{ info.origin || '暂无' }}</span>
         </el-col>
         <el-col :span="24" class="image" v-if="info.img_path">
@@ -28,6 +28,7 @@
 
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
+var moment = require('moment');
 export default {
   name: 'questionInfo',
   props: {
@@ -38,7 +39,13 @@ export default {
     return {};
   },
   created() {},
-  methods: {},
+  methods: {
+    // 整理时间
+    getDate(date) {
+      let newsDate = moment(date).format('YYYY-MM-DD');
+      if (newsDate) return newsDate;
+    },
+  },
   computed: {
     ...mapState(['user']),
   },

+ 1 - 1
vue.config.js

@@ -33,7 +33,7 @@ module.exports = {
         target: 'http://broadcast.waityou24.cn',
       },
       '/api': {
-        target: 'http://broadcast.waityou24.cn', //http://broadcast.waityou24.cn
+        target: 'http://192.168.1.19:9101', //http://192.168.1.19:9101
         changeOrigin: true,
         ws: false,
       },