lipengtao 6 年之前
父节点
当前提交
64c5ffd488

+ 12 - 10
src/components/subTemplate/BaseService.vue

@ -22,14 +22,21 @@
22 22
    data() {
23 23
      return {
24 24
        ownerName: '',
25
        ownerAuth: ''
25
        ownerAuth: '',
26
        serveInfo: ''
26 27
      };
27 28
    },
28 29
    computed: {
29
      serveInfo() {
30
    },
31
    created() {
32
      this.ownerByond();
33
      this.itmeList();
34
    },
35
    methods: {
36
      itmeList() {
30 37
        var objStr = this.itemSingle
31 38
        if (objStr.images) {
32
          objStr.images = ImageUrl('ware' + strToArr(objStr.images)[0])
39
          objStr.images = ImageUrl('ware' + objStr.images.split(',')[0])
33 40
        } else {
34 41
          objStr.images = defaultSet.img.service
35 42
        }
@ -37,13 +44,8 @@
37 44
          objStr.otype = objStr.category
38 45
          objStr.oid = objStr.owner
39 46
        }
40
        return objStr
41
      }
42
    },
43
    created() {
44
      this.ownerByond();
45
    },
46
    methods: {
47
        this.serveInfo = objStr
48
      },
47 49
      ownerByond() {
48 50
        var item = this.serveInfo
49 51
        var _this = this

+ 60 - 0
src/components/subTemplate/BaseServices.vue

@ -0,0 +1,60 @@
1
<template>
2
    <a class="list-item" :href="'serve.html?id='+serveInfo.id" target="_blank">
3
      <div class="list-head" :style="{backgroundImage: 'url(' + serveInfo.images + ')'}"></div>
4
      <div class="list-info">
5
        <div class="list-tit list-topic">{{serveInfo.name}}</div>
6
        <div class="list-owner">{{ownerName}}<em class="authicon" :class="ownerAuth"></em></div>
7
        <div class="list-desc" v-if="serveInfo.cnt">内容:{{serveInfo.cnt}}</div>
8
      </div>
9
    </a>
10
  </template>
11
  
12
  <script>
13
    import { ImageUrl, defaultSet, autho, strToArr } from '@/libs/util';
14
    import queryBase from '@/libs/queryBase';
15
  
16
    export default {
17
      props: {
18
        itemSingle: {
19
          type: Object
20
        }
21
      },
22
      data() {
23
        return {
24
          ownerName: '',
25
          ownerAuth: '',
26
          serveInfo: ''
27
        };
28
      },
29
      computed: {
30
      },
31
      created() {
32
        this.ownerByond();
33
        this.serveInfo = this.itemSingle;
34
      },
35
      methods: {
36
        ownerByond() {
37
          var item = this.serveInfo
38
          var _this = this
39
          if (item.otype === '1') {
40
            queryBase.getProfessor(item.oid, function(sc, value) {
41
              if (sc) {
42
                _this.ownerName = value.name;
43
                _this.ownerAuth = autho(value.authType, value.orgAuth, value.authStatus);
44
                _this.$forceUpdate();
45
              }
46
            });
47
          } else if (item.otype === '2') {
48
            queryBase.getOrganization(item.oid, function(sc, value) {
49
              if (sc) {
50
                _this.ownerName = value.forShort ? value.forShort : value.name;
51
                _this.ownerAuth = value.authStatus === '3' ? 'icon-com' : '';
52
                _this.$forceUpdate();
53
              }
54
            });
55
          }
56
        }
57
      }
58
    };
59
  </script>
60
  

+ 1 - 1
src/layout/TheHeader.vue

@ -144,7 +144,7 @@
144 144
        var that = this
145 145
        this.$axios.get('/ajax/msg/unread', {}, function(res) {
146 146
          if (res.success) {
147
            that.unreadCount = res.data
147
            that.unreadCount = res.data || ''
148 148
            if (that && !that._isDestroyed) {
149 149
              that.refreshUnread = setTimeout(() => {
150 150
                that.queryMsgUnread()

+ 15 - 3
src/pages/expert/show.vue

@ -34,8 +34,8 @@
34 34
                </div>
35 35
              </div>
36 36
            </div>
37
            <div class="content-wrapper" v-if="expertInfo.descp">
38
              <div class="inner-wrapper">
37
            <div class="content-wrapper">
38
              <div class="inner-wrapper" v-if="expertInfo.descp">
39 39
                <div class="content-title">
40 40
                  <span>个人简介</span>
41 41
                </div>
@ -209,7 +209,7 @@
209 209
  import shareOut from '@/components/ShareOut';
210 210
  import collectCo from '@/components/CollectCo';
211 211
  import contactChat from '@/components/ContactChat';
212
  import baseService from '@/components/subTemplate/BaseService';
212
  import baseService from '@/components/subTemplate/BaseServices';
213 213
  import baseResult from '@/components/subTemplate/BaseResult';
214 214
215 215
  export default {
@ -328,6 +328,18 @@
328 328
            var $info = res.data;
329 329
            if ($info.length > 0) {
330 330
              this.dataO.serModifyTime = $info[$info.length - 1].modifyTime;
331
              for (let i = 0; i < $info.length; i++) {
332
                var objStr = $info[i]
333
                if (objStr.images) {
334
                  objStr.images = ImageUrl('ware' + objStr.images.split(',')[0])
335
                } else {
336
                  objStr.images = defaultSet.img.service
337
                }
338
                if (objStr.category) {
339
                  objStr.otype = objStr.category
340
                  objStr.oid = objStr.owner
341
                }
342
              }
331 343
              this.platServices = this.isFormSearch ? this.platServices.concat($info) : $info;
332 344
              this.isFormSearch = true;
333 345
              if ($info.length < this.rows) {

+ 17 - 9
src/pages/org/show.vue

@ -66,7 +66,7 @@
66 66
          </el-tab-pane>
67 67
          <el-tab-pane :label="'服务 ' + (serCount>0 ? serCount : '')" name="second">
68 68
            <div v-if="!ifDefault && platServices.length">
69
              <baseService v-for="item in platServices" :key="item.index" :itemSingle="item"></baseService>
69
              <baseService v-for="item in platServices" :key="item.id" :itemSingle="item"></baseService>
70 70
              <Loading v-show="loadingModalShow" :loadingComplete="loadingComplete" :isLoading="isLoading" v-on:upup="searchLower"></Loading>
71 71
            </div>
72 72
            <defaultPage v-else></defaultPage>
@ -170,7 +170,7 @@
170 170
  import shareOut from '@/components/ShareOut';
171 171
  import collectCo from '@/components/CollectCo';
172 172
  import contactChat from '@/components/ContactChat';
173
  import baseService from '@/components/subTemplate/BaseService';
173
  import baseService from '@/components/subTemplate/BaseServices';
174 174
  import baseResource from '@/components/subTemplate/BaseResource';
175 175
176 176
  export default {
@ -221,13 +221,9 @@
221 221
      platThreeServices() {
222 222
        var pt = this.platServices
223 223
        var str = []
224
        if (pt.length > 3) {
225
          for (let i = 0; i < 3; ++i) {
224
          for (let i = 0; i < 3 && i < this.platServices.length; ++i) {
226 225
            str[i] = pt[i]
227 226
          }
228
        } else {
229
          str = pt
230
        }
231 227
        return str
232 228
      },
233 229
      platThreeResources() {
@ -299,7 +295,19 @@
299 295
            var $info = res.data;
300 296
            if ($info.length > 0) {
301 297
              this.dataO.serModifyTime = $info[$info.length - 1].modifyTime;
302
              this.platServices = this.isFormSearch ? this.platServices.concat($info) : $info;
298
              for (let i = 0; i < $info.length; i++) {
299
                var objStr = $info[i]
300
                if (objStr.images) {
301
                  objStr.images = ImageUrl('ware' + objStr.images.split(',')[0])
302
                } else {
303
                  objStr.images = defaultSet.img.service
304
                }
305
                if (objStr.category) {
306
                  objStr.otype = objStr.category
307
                  objStr.oid = objStr.owner
308
                }
309
              }
310
              this.platServices =  this.platServices.concat($info);
303 311
              this.isFormSearch = true;
304 312
              if ($info.length < this.rows) {
305 313
                this.loadingModalShow = false;
@ -334,7 +342,7 @@
334 342
            if ($info.length > 0) {
335 343
              this.dataO.resPublishTime = $info[$info.length - 1].publishTime;
336 344
              this.dataO.resShareId = $info[$info.length - 1].shareId;
337
              this.platResources = this.isFormSearch2 ? this.platResources.concat($info) : $info;
345
              this.platResources = this.platResources.concat($info);
338 346
              this.isFormSearch2 = true;
339 347
              if ($info.length < this.rows) {
340 348
                this.loadingModalShow2 = false;

+ 1 - 1
static/plat-info.js

@ -5,7 +5,7 @@ PLAT.info = {
5 5
  'title': '邢台科技条件平台',
6 6
  'name': '邢台经济开发区',
7 7
  'website': 'http://www.xtkfq.gov.cn',
8
  'adminsite': 'http://localhost:7072',
8
  'adminsite': 'http://xttjpt.cn:88',
9 9
  'address': '中国河北省邢台市中兴东大街1888号',
10 10
  'tel': '010-62343359',
11 11
  'fax': '86-319-3636111',