Browse Source

Merge branch 'master' of http://121.42.53.174:3000/jiapeng/platform

lipengtao 6 years ago
parent
commit
12661e7847
68 changed files with 326 additions and 5020 deletions
  1. 0 81
      src/api/bridge.js
  2. BIN
      src/assets/404_images/404.png
  3. BIN
      src/assets/404_images/404_cloud.png
  4. 0 29
      src/common/stylus/base.styl
  5. 0 171
      src/common/stylus/browse.styl
  6. 0 93
      src/common/stylus/common.styl
  7. 0 3
      src/common/stylus/index.styl
  8. 0 98
      src/common/stylus/listitem.styl
  9. 0 88
      src/common/stylus/mixin.styl
  10. 0 236
      src/components/bench-views/ArticleTemplate.vue
  11. 0 122
      src/components/bench-views/BusTemplate.vue
  12. 0 43
      src/components/bench-views/Sidebar.vue
  13. 0 27
      src/components/bench-views/Siderbar.styl
  14. 0 53
      src/components/bench-views/WorkCommon.vue
  15. 0 145
      src/components/bench-views/WorkHead.vue
  16. 0 157
      src/components/bench-views/WorkHome.vue
  17. 0 49
      src/components/bench-views/abutmentService/ButtService.vue
  18. 0 139
      src/components/bench-views/abutmentService/ExpertAdvisor.vue
  19. 0 34
      src/components/bench-views/businessManagement/BusRight.vue
  20. 0 36
      src/components/bench-views/businessManagement/EnterBusiness.vue
  21. 0 36
      src/components/bench-views/contentManagement/AlertBox.vue
  22. 0 33
      src/components/bench-views/contentManagement/ContentManagement.vue
  23. 0 50
      src/components/bench-views/contentManagement/Dynamic.vue
  24. 0 36
      src/components/bench-views/contentManagement/News.vue
  25. 0 134
      src/components/bench-views/contentManagement/PreviewArticle.vue
  26. 0 461
      src/components/bench-views/contentManagement/PublishArticle.vue
  27. 0 56
      src/components/bench-views/contentManagement/editorUE.vue
  28. 0 59
      src/components/bench-views/demandSearch/DemandSearch.vue
  29. 0 215
      src/components/bench-views/demandSearch/DemandTemplate.vue
  30. BIN
      src/components/bench-views/img/home_icon_cmplogo.png
  31. BIN
      src/components/bench-views/img/index-icon.png
  32. 0 52
      src/components/bench-views/workCommon.styl
  33. 0 179
      src/components/form-views/AccountSettings.vue
  34. 0 185
      src/components/form-views/BindAccount.vue
  35. 0 323
      src/components/form-views/DemandIssue.vue
  36. 0 355
      src/components/form-views/DemandIssueLogin.vue
  37. 0 341
      src/components/form-views/UpdateInfo.vue
  38. 0 222
      src/components/form-views/findPwd.vue
  39. BIN
      src/components/form-views/img/e-sign-on_bg_img_nor.png
  40. BIN
      src/components/form-views/img/e-sign-on_bg_logo_nor.png
  41. BIN
      src/components/form-views/img/e-sign-on_icon_1_hig.png
  42. BIN
      src/components/form-views/img/e-sign-on_icon_2_hig.png
  43. BIN
      src/components/form-views/img/e-sign-on_icon_2_nor.png
  44. BIN
      src/components/form-views/img/e-sign-on_icon_3_hig.png
  45. BIN
      src/components/form-views/img/e-sign-on_icon_3_nor.png
  46. 0 101
      src/components/form-views/loginPlat.vue
  47. 0 62
      src/components/form-views/style.styl
  48. 0 81
      src/components/form-views/upMail.vue
  49. 40 2
      src/libs/queryBase.js
  50. 1 33
      src/libs/util.js
  51. 2 2
      src/router/index.js
  52. 1 1
      src/styles/browse.scss
  53. 19 52
      src/views/frontviews/Dashboard.vue
  54. 62 12
      src/views/infoshow/compShow/comp.vue
  55. 53 59
      src/views/infoshow/compShow/product.vue
  56. 67 32
      src/views/infoshow/components/BeyondTo/index.vue
  57. 4 10
      src/views/infoshow/components/PreviewMagnify/index.vue
  58. 2 2
      src/views/infoshow/contentShow/index.vue
  59. 6 5
      src/views/infoshow/expertShow/index.vue
  60. 29 23
      src/views/infoshow/orgShow/index.vue
  61. 0 1
      src/views/infoshow/resourceShow/index.vue
  62. 0 1
      src/views/infoshow/resultShow/patent.vue
  63. 2 2
      src/views/infoshow/serviceShow/index.vue
  64. 25 14
      src/views/sub-component/BaseAgency.vue
  65. 13 31
      src/views/sub-component/BaseExpert.vue
  66. 0 1
      src/views/sub-component/BaseResource.vue
  67. 0 1
      src/views/sub-component/BaseService.vue
  68. 0 151
      src/views/sub-component/DynamicTags.vue

+ 0 - 81
src/api/bridge.js

@ -1,81 +0,0 @@
1
import request from '@/utils/request'
2
3
/*  添加桥梁 */
4
export function addDevice(params) {
5
  return request({
6
    url: '/ajax/bridge',
7
    method: 'post',
8
    data: params
9
  })
10
}
11
12
/*  更新桥梁信息 */
13
export function updateDevice(params) {
14
  return request({
15
    url: '/ajax/bridge/update',
16
    method: 'post',
17
    data: params
18
  })
19
}
20
21
/*  删除桥梁信息 */
22
export function deleteDevice(params) {
23
  return request({
24
    url: '/ajax/bridge/delete',
25
    method: 'get',
26
    params
27
  })
28
}
29
30
/*  查询单个桥梁 */
31
export function queryDevice(params) {
32
  return request({
33
    url: '/ajax/bridge/qo',
34
    method: 'get',
35
    params
36
  })
37
}
38
39
/*  分页查询桥梁 */
40
export function pageQueryDevice(params) {
41
  return request({
42
    url: '/ajax/bridge/pq',
43
    method: 'get',
44
    params
45
  })
46
}
47
48
/*  校验桥梁编号 */
49
export function checkDeviceCode(params) {
50
  return request({
51
    url: '/ajax/bridge/checkCode',
52
    method: 'get',
53
    params
54
  })
55
}
56
57
/*  校验桥梁简称 */
58
export function checkBridgeShortName(params) {
59
  return request({
60
    url: '/ajax/bridge/checkShortName',
61
    method: 'get',
62
    params
63
  })
64
}
65
66
/*  校验桥梁全称 */
67
export function checkBridgeName(params) {
68
  return request({
69
    url: '/ajax/bridge/checkName',
70
    method: 'get',
71
    params
72
  })
73
}
74
75
/*  上传图片 */
76
export function uploadBridgeImg() {
77
  return request({
78
    url: '/ajax/bridge/upload',
79
    method: 'post'
80
  })
81
}

BIN
src/assets/404_images/404.png


BIN
src/assets/404_images/404_cloud.png


+ 0 - 29
src/common/stylus/base.styl

@ -1,29 +0,0 @@
1
*
2
  margin: 0
3
  padding: 0
4
5
html,body
6
  width: 100%
7
  height: 100%
8
9
body *
10
  font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑","黑体",Arial,sans-serif
11
12
ul
13
  margin: 0
14
  padding: 0
15
  list-style: none
16
17
18
.clearfix:after
19
  content: "."
20
  display: block
21
  height: 0
22
  clear: both
23
  visibility: hidden
24
25
a
26
  text-decoration: none
27
28
img
29
  display:block

+ 0 - 171
src/common/stylus/browse.styl

@ -1,171 +0,0 @@
1
  .browse-main
2
    .block-wrapper
3
      display: flex
4
      justify-content: space-between
5
      color:$commonFont
6
      .content-wrapper
7
        width:100%
8
        box-sizing:border-box
9
        text-align:justify
10
        .tag-item
11
          margin: 10px 0
12
          .el-tag
13
            margin:5px
14
            &.tag-line
15
              display:inline-block
16
              width:auto
17
        .rel-detail
18
          font-size:15px
19
          line-height:26px
20
          .rel-item
21
            margin-bottom:15px
22
            &:last-child
23
              margin-bottom:0
24
            .rel-tit
25
              font-size: 16px
26
              line-height:30px
27
      .split-other
28
        margin-bottom:20px
29
      .headcon-box
30
        min-height:160px
31
        background: #fff
32
        position: relative
33
        display:flex
34
        align-items: center
35
        &.detail-box
36
          min-height:auto
37
        .headimg-box
38
          position:absolute
39
          top:50%
40
          margin-top:-71px
41
          width: 140px
42
          height: 140px
43
          overflow:hidden
44
          border:1px solid #E5E5E5
45
          border-radius:50%
46
          background-size: cover
47
        .zoom-box
48
          width: 362px
49
        .show-info
50
          width:100%
51
          &.reInfo-box
52
            padding-left:170px
53
          .info-tit
54
            font-size: 18px
55
            color:$commonFont
56
            margin-bottom:10px
57
            &.info-tit-big
58
              font-size: 22px
59
              line-height: 32px
60
          .info-tag
61
            font-size: 16px
62
            color:$commonFont
63
            margin-bottom:10px
64
          .info-operate
65
            display:flex
66
            color:$secondaryFont
67
            .addr
68
              margin-right: 10px
69
        .goSpan
70
          min-width: 180px
71
        &.org-head
72
          .headimg-box
73
            border-radius(4px)
74
            center-items(200px, 140px)
75
          .reInfo-box
76
            padding-left:230px
77
        &.hdetail-box
78
          align-items:flex-start
79
          .reInfo-box
80
            padding-left:15px
81
            position: relative
82
            min-height: 270px
83
            padding-bottom: 24px
84
            .zoom-operate
85
              position:absolute
86
              bottom:0
87
      .wrapper-left
88
        padding: 0
89
        display: flex
90
        flex-direction: column
91
        .el-menu-demo
92
         margin-bottom:20px
93
      .wrapper-right
94
        width: 280px
95
        .content-wrapper
96
          width: 100%
97
          box-sizing: border-box
98
          margin-bottom: 20px
99
          .right-split
100
            margin-top: 20px
101
            padding-top: 10px
102
            position: relative
103
            &::before
104
              position: absolute
105
              right: 0
106
              left: 0
107
              top: 0
108
              content:''
109
              border-top:1px solid #dadada
110
            &:first-child
111
              margin-top: 0
112
              padding-top: 0
113
              &::before
114
                content: none
115
          .info-main
116
            font-size: 24px
117
            line-height: 34px
118
            color:$mainFont
119
          .info-tip
120
            margin-top:12px
121
            font-size: 14px
122
            line-height: 22px
123
            color:$secondaryFont
124
      .left-main
125
        width:800px
126
        .el-tabs__nav-wrap.is-top
127
          background-color: #ffffff
128
          border:none
129
          padding:10px 20px
130
          &::after
131
            content:none
132
        .el-tabs__item
133
          font-size:15px
134
        .el-tabs__header
135
          margin-bottom:20px
136
        .inner-wrapper
137
          margin-bottom:20px
138
          &:last-child
139
            margin-bottom:0
140
          .content-title
141
            margin-bottom:2px
142
          .content
143
            display: flex
144
            font-size: 15px
145
            line-height: 30px
146
            font-weight:normal
147
            word-break: break-all
148
            .ulM
149
              width:100%
150
              .liM
151
                padding-left:15px
152
                margin-bottom:6px
153
                &:last-child
154
                  margin-bottom:0
155
                .liM-tit
156
                  position:relative
157
                  color:$mainFont
158
                  small
159
                    margin-left:10px
160
                    color:$secondaryFont
161
                  &::before
162
                    content:''
163
                    position: absolute
164
                    left:-12px
165
                    top:13px
166
                    width:6px
167
                    height:6px
168
                    background:$mainColor
169
                    border-radius: 50%
170
                .liM-con
171
                  color:$commonFont

+ 0 - 93
src/common/stylus/common.styl

@ -1,93 +0,0 @@
1
@import './mixin';
2
3
body
4
  background:#f4f6f8
5
6
a
7
  color: $mainFont
8
9
.contain-wrapper
10
  box-sizing: content-box
11
  width: 1100px
12
  padding: 0 10px
13
  position:relative
14
  margin:auto
15
  clear:both
16
  font-size:15px
17
.minw-block
18
  min-width: 1110px
19
20
.block-wrapper
21
  margin-bottom:20px
22
23
.content-wrapper
24
  box-sizing: border-box
25
  padding:20px
26
  background:#fff
27
28
/*左右分栏*/
29
.main-content
30
  display: flex
31
  justify-content: space-between
32
  .wrapper-left
33
    width:800px
34
  .wrapper-right
35
    width: 280px
36
.ad-wrapper
37
  position: relative
38
  display: block
39
  margin-bottom: 10px
40
  &:after
41
    content:"广告"
42
    font-size:10px
43
    color:#fff
44
    background:rgba(0,0,0,0.3)
45
    position:absolute
46
    padding:0 4px
47
    right:0
48
    bottom:0px
49
/*左右分栏*/
50
51
.content-title
52
  display:flex
53
  justify-content: space-between
54
  font-size:16px
55
  line-height:30px
56
  font-weight: bold
57
  color:$mainFont
58
  margin-bottom:12px
59
  position:relative
60
  /*&.content-title-center
61
    display:block
62
    text-align: center
63
    font-size: 22px
64
    line-height: 40px*/
65
  .content-more
66
    font-size:13px
67
    cursor:pointer
68
    color:$secondaryFont
69
    position:absolute
70
    right: 0
71
    top:0
72
73
.el-button--primary
74
  background-color: $mainColor
75
  border-color: $mainColor
76
77
/*认证标识相关*/
78
.authicon
79
  display: inline-block
80
  margin-left:4px
81
  width:16px
82
  height:16px
83
  background-size: cover
84
  &.icon-pro
85
    bg-image('/static/comimg/porfile_icon_zhuanjia_nor.png')
86
  &.icon-com
87
    bg-image('/static/comimg/porfile_icon_qiye_hig.png')
88
  &.icon-staff
89
    bg-image('/static/comimg/porfile_icon_yuangong_hig.png')
90
  &.icon-real
91
    width:24px
92
    bg-image('/static/comimg/porfile_icon_shimin_nor.png')
93
  

+ 0 - 3
src/common/stylus/index.styl

@ -1,3 +0,0 @@
1
@import './base'
2
@import './common'
3
@import './listitem'

+ 0 - 98
src/common/stylus/listitem.styl

@ -1,98 +0,0 @@
1
/*home--cmp、expert*/
2
.block-container
3
  display: flex
4
  flex-wrap: wrap
5
  margin-right:-10px
6
  margin-bottom:-10px
7
  .block-item
8
    display:flex
9
    width:346px
10
    height:140px
11
    box-sizing:border-box
12
    padding:10px
13
    margin-right:10px
14
    margin-bottom:10px
15
    border:1px solid $borderColor
16
    .show-head
17
      width:80px
18
      height:80px
19
      border:1px solid $borderColor
20
      border-radius(50%)
21
      background-size:cover
22
    .show-info
23
      flex:1 0 80px
24
      padding-left:15px
25
      .info-tit
26
        font-size:18px
27
        line-height:28px
28
        color:$mainFont
29
      .info-tag
30
        color:$secondaryFont
31
        text-ellipsis()
32
        line-height:26px
33
      .info-desc
34
        color:$secondaryFont
35
        text-ellipsis-n(3,20px)
36
    &.org-item
37
      height:200px
38
      justify-content:center
39
      text-align:center
40
      .item-block-org
41
        width:306px
42
        overflow: hidden
43
        .item-pic-org
44
          center-items()
45
          background-size:cover
46
          margin:auto
47
        .item-text-org
48
          margin-top:6px
49
          line-height:30px
50
          .item-tit-org
51
            display:flex
52
            justify-content: center
53
            align-items:center
54
            span
55
              display: inline-block
56
              max-width: 100%
57
              text-ellipsis()
58
          .item-tag-org
59
            color:$secondaryFont
60
            text-ellipsis()
61
            line-height:20px
62
/*home--cmp、expert*/
63
64
/*list--图文*/
65
.list-item
66
  display:flex
67
  align-items:center
68
  background:#fff
69
  padding:20px
70
  border-1px()
71
  &:last-child
72
    border-none()
73
  .list-head
74
    center-items(162px,108px)
75
  .list-info
76
    flex: 1 1 170px
77
    padding-left:15px
78
    .list-tit
79
      color:$mainFont
80
      font-size:18px
81
      text-ellipsis-n(2,26px)
82
      &.list-topic
83
        text-ellipsis()
84
        line-height:26px
85
    .list-tag
86
      margin-top:10px
87
      color:$secondaryFont
88
      font-size:14px
89
      li
90
        display:inline-block
91
        margin-right:15px
92
    .list-owner
93
      color:$commonFont
94
      line-height:30px
95
    .list-desc
96
      text-ellipsis-n(2,20px)
97
      color:$commonFont
98
/*list*/

+ 0 - 88
src/common/stylus/mixin.styl

@ -1,88 +0,0 @@
1
/*main color#319dff*/ $mainColor = #409EFF
2
3
/*mian-font*/
4
/*主要文字*/ $mainFont = #303133
5
/*常规文字*/ $commonFont = #606266
6
/*次要文字*/ $secondaryFont = #909399
7
/*占位文字*/ $occupancyFont = #C0C4CC
8
9
/*boder-color*/ $borderColor = #e4e7ed
10
11
12
/*bg-about s*/
13
bg-blue-color()
14
  background: $mainColor
15
  color: #fff
16
bg-blue-active-color($bg = #0c84f1)
17
  background: $bg
18
19
bg-grey-color($bg = #373d41, $color = #c4c3c3)
20
  background: $bg
21
  color: $color
22
  a
23
  	color: $color
24
  a:hover
25
  	color: #fff
26
27
bg-image($url)
28
  background-image:url($url)
29
  background-position: center center
30
  background-repeat: no-repeat
31
  background-size:cover
32
/*bg-about e*/
33
34
/*border-about s*/
35
border-radius($radius = 6px)
36
  -webkit-border-radius: $radius
37
  -moz-border-radius: $radius
38
  border-radius: $radius
39
40
border-1px()
41
  position:relative
42
  &:after
43
    display:block
44
    position:absolute
45
    left:0
46
    bottom:0
47
    width:100%
48
    border-top:1px solid $borderColor
49
    content:' '
50
border-none()
51
  &:after
52
    display:none
53
/*border-about e*/
54
55
/*text-about s*/
56
text-ellipsis()
57
  line-height: 30px
58
  white-space: nowrap
59
  text-overflow: ellipsis
60
  overflow: hidden
61
62
text-ellipsis-n($n = 1,$lineH = 30px)
63
  display: -webkit-box
64
  line-height: $lineH
65
  max-height: $lineH*$n
66
  white-space: normal !important
67
  text-overflow: ellipsis
68
  word-wrap: break-word
69
  -webkit-line-clamp: $n
70
  -webkit-box-orient: vertical
71
  overflow: hidden
72
/*text-about e*/
73
74
/*justify align-items center*/
75
center-items($w = 180px,$h = 120px)
76
  display: flex
77
  align-items: center
78
  justify-content: center
79
  border: 1px solid $borderColor
80
  box-sizing:border-box
81
  width: $w+2px
82
  height: $h+2px
83
  border-radius(4px)
84
  background-size:cover
85
  background-position: center center
86
  img
87
    max-width: $w
88
    max-height: 100%

+ 0 - 236
src/components/bench-views/ArticleTemplate.vue

@ -1,236 +0,0 @@
1
<template>
2
  <div class="searchList">
3
    <ul>
4
      <li class="list-item" v-for="(item, index) in dataList" :key="index" @click="kexiuExpert(item)">
5
        <div class="list-head" :style="{ backgroundImage: 'url('+ imageDis(item)+')'}" ></div>
6
        <div class="list-info">
7
          <div class="list-tit">{{item.articleTitle}}</div>
8
          <ul class="list-tag" v-if="flag!=1">
9
            <li>{{item.company}}</li>
10
            <li>发布于 {{comTime(item.publishTime)}}</li>
11
            <li>阅读量 {{item.pageViews}}</li>
12
            <li>赞 {{item.articleAgree}}</li>
13
            <li>留言 {{item.leverNumber}}</li>
14
          </ul>
15
          <ul class="list-tag" v-if="(flag==1) && (item.status==1)">
16
            <li>发布于 {{comTime(item.publishTime)}}</li>
17
            <li>阅读量 {{item.pageViews}}</li>
18
            <li>赞 {{item.articleAgree}}</li>
19
            <li>留言 {{item.leverNumber}}</li>
20
          </ul>
21
          <ul class="list-tag" v-if="(flag==1) && (item.status==2)">
22
            <li v-show="item.status">修改于{{comTime(item.modifyTime)}}</li>
23
            <li class="coRed">草稿</li>
24
            <li class="coRed">将在 {{comTime(item.modifyTime)}}定时发布</li>
25
          </ul>
26
          <ul class="list-tag" v-if="(flag==1) && (item.status==0)">
27
            <li v-show="item.status">修改于{{comTime(item.modifyTime)}}</li>
28
            <li class="coRed">草稿</li>
29
          </ul>
30
        </div>
31
        <div class="dele" v-if='flag === 1'>
32
          <el-button type="primary" size="small" v-if="(item.status == 0 || item.status == 2)" @click.stop="revise(item)">修改</el-button>
33
          <el-button type="danger" icon="el-icon-delete" circle  @click.stop="delet1(item.articleId, index)"></el-button>
34
        </div>
35
        <div class="dele" v-else-if='flag === 2'>
36
          <el-button type="danger" icon="el-icon-delete" circle @click.stop="delet(item.articleId, index)"></el-button>
37
        </div>
38
        <div class="dele" v-else-if='flag === 3'>
39
          <el-button type="primary" size="small" @click.stop="add(item)">{{item.addText}}</el-button>
40
        </div>
41
      </li>
42
    </ul>
43
    <defaultPage v-show="ifDefault"></defaultPage>
44
    <div class="taglist" v-show="!ifDefault">
45
      <el-pagination background layout="prev, pager, next" :total="total" :page-size="10" @current-change="handleCurrentChange">
46
      </el-pagination>
47
    </div>
48
  </div>
49
</template>
50

51
<script type="text/ecmascript-6">
52
  import Cookies from 'js-cookie';
53
  import httpUrl from '@/libs/http';
54
  import util from '@/libs/util';
55
  export default {
56
    props: ['keyValue', 'url', 'flag', 'addA', 'Delele'],
57
    data() {
58
      return {
59
        expertParameters: {},
60
        dataList: [],
61
        total: 0,
62
        orgDefaultImage: util.defaultSet.img.article,
63
        orgImageAddId: util.ImageUrl('article/'),
64
        platId: '',
65
        addText: '添加',
66
        ifDefault: false
67
      };
68
    },
69
    watch: {
70
      keyValue: function () {
71
        this.expertParameters.key = this.keyValue;
72
        this.expertList();
73
      },
74
      addA: function () {
75
        this.expertList();
76
      },
77
      Delele: function () {
78
        this.expertList();
79
      }
80
    },
81
    created() {
82
      this.platId = Cookies.get('plf_user');
83
      this.expertParameters = {
84
        key: this.keyValue,
85
        pageSize: 10,
86
        pageNo: 1
87
      };
88
      if (this.flag === 1) {
89
        this.expertParameters.ownerId = this.platId;
90
        this.expertParameters.articleType = 3;
91
        this.expertParameters.status = [0, 1, 2];
92
      } else {
93
        this.expertParameters.pid = this.platId;
94
      }
95
      this.expertList();
96
    },
97
    methods: {
98
      revise(item) {
99
        this.$router.push({path: '/PublishArticle?arId=' + item.articleId});
100
      },
101
      imageDis: function (item) {
102
        return (item.articleImg) ? this.orgImageAddId + item.articleImg : this.orgDefaultImage;
103
      },
104
      comTime: util.dateChange,
105
      expertList() {
106
        this.$axios.get(this.url, {
107
          params: this.expertParameters
108
        }).then((res) => {
109
          if (res.success) {
110
            this.dataList = res.data.data;
111
            this.total = res.data.total;
112
            if (res.data.data.length === 0) {
113
              this.ifDefault = true;
114
            } else {
115
              this.ifDefault = false;
116
            }
117
            for (let i = 0; i < res.data.data.length; i++) {
118
              res.data.data[i].addText = this.addText;
119
              if (this.flag !== 1) {
120
                this.leaveWordTotal(res.data.data[i]);
121
                this.companyName(res.data.data[i]);
122
              } else {
123
                if (res.data.data[i].status === '1') {
124
                  this.leaveWordTotal(res.data.data[i]);
125
                }
126
              }
127
            }
128
          }
129
        });
130
      },
131
      leaveWordTotal($data) {
132
         this.$axios.get('/ajax/leavemsg/count', {
133
          params: {
134
            sid: $data.articleId,
135
            stype: 1
136
          }
137
        }).then((res) => {
138
          if (res.success) {
139
            $data.leverNumber = res.data;
140
            this.$forceUpdate();
141
          }
142
        });
143
      },
144
      companyName($data) {
145
          this.$axios.get('/ajax/org/' + $data.ownerId, {
146
            }).then((res) => {
147
            if (res.success) {
148
              $data.company = (res.data.forShort) ? res.data.forShort : res.data.name;
149
              this.$forceUpdate();
150
            }
151
         });
152
      },
153
      kexiuExpert(item) {
154
        if (item.status === '0' || item.status === '2') {
155
          this.$router.push({path: '/PublishArticle?arId=' + item.articleId});
156
        } else {
157
          window.open(util.defaultSet.link.article + item.articleId);
158
        }
159
      },
160
      handleCurrentChange(val) {
161
        this.expertParameters.pageNo = val;
162
        this.expertList();
163
      },
164
      delet(id, index) {
165
        this.$alert('确认将该文章移出【企业动态】栏目?', '提示', {
166
          confirmButtonText: '确定',
167
          cancelButtonText: '取消',
168
          type: 'warning',
169
          center: true,
170
          callback: action => {
171
            if (action === 'confirm') {
172
              this.$axios.post(httpUrl.hQuery.orgTrends.del, {
173
                  pid: this.platId,
174
                  aid: id
175
                }).then((res) => {
176
                  if (res.success) {
177
                    this.dataList.splice(index, 1);
178
                    this.$emit('isLogFn', '2');
179
                  }
180
              });
181
            };
182
          }
183
        });
184
      },
185
      delet1(id, index) {
186
        this.$alert('确认删除该文章', '提示', {
187
          confirmButtonText: '确定',
188
          cancelButtonText: '取消',
189
          type: 'warning',
190
          center: true,
191
          callback: action => {
192
            if (action === 'confirm') {
193
              this.$axios.post(httpUrl.kxQurey.article.del, {
194
                articleId: id
195
              }).then((res) => {
196
                if (res.success) {
197
                  this.dataList.splice(index, 1);
198
                }
199
              });
200
            }
201
          }
202
        });
203
      },
204
      add(item) {
205
        if (item.addText === '已添加') {
206
          return;
207
        }
208
        this.$axios.post(httpUrl.hQuery.orgTrends.add, {
209
              pid: this.platId,
210
              aid: item.articleId
211
          }).then((res) => {
212
            if (res.success) {
213
              item.addText = '已添加';
214
              this.$forceUpdate();
215
              this.$emit('isLogFn', '1');
216
            }
217
          });
218
      }
219
    }
220
  };
221
</script>
222
<style lang="stylus" rel="stylesheet/stylus">
223
  @import '../../common/stylus/listitem';
224
    .list-item
225
      cursor: pointer
226
      &:hover
227
        background: #EEEEEE
228
      &:hover .dele
229
        display: block
230
      .dele
231
        display: none
232
        position: absolute
233
        right: 10px
234
    .coRed
235
      color: red
236
</style>

+ 0 - 122
src/components/bench-views/BusTemplate.vue

@ -1,122 +0,0 @@
1
<template>
2
  <ul>
3
    <li class="list-item" v-for="(item, index) in dataList" :key="index" @click="kexiuExpert(item.id)">
4
      <div class="list-head" :style="{ backgroundImage: 'url('+ imageDis(item)+')'}"></div>
5
      <div class="list-info">
6
        <div class="list-tit list-tig">
7
          {{(item.forShort) ? item.forShort : item.name}}
8
          <em class="authicon icon-com" v-bind:class="{ active: (item.authStatus == 3)}"></em>
9
          {{keyValue}}
10
        </div>
11
        <ul class="list-tag">
12
          <li :class='{maginNone:(item.orgType != 2)}'>{{(item.orgType == 2) ? '上市企业' : ''}}</li>
13
          <li>{{(item.industry) ? item.industry.split(',').join(' | ') : '' }}</li>
14
        </ul>
15
      </div>
16
      <div class="dele" v-show="(flag == 1)">
17
        <el-button type="danger" icon="el-icon-delete" circle @click.stop="delet(item.id)"></el-button>
18
      </div>
19
    </li>
20
    <defaultPage v-show="ifDefault"></defaultPage>
21
    <div class="taglist" v-show="!ifDefault">
22
      <el-pagination background layout="prev, pager, next" :total="total" :page-size="10" @current-change="handleCurrentChange">
23
      </el-pagination>
24
    </div>
25
  </ul>
26
</template>
27

28
<script type="text/ecmascript-6">
29
  import Cookies from 'js-cookie';
30
  import httpUrl from '@/libs/http';
31
  import util from '@/libs/util';
32
  export default {
33
    props: ['keyValue', 'url', 'flag'],
34
    data() {
35
      return {
36
        ifDefault: false,
37
        expertParameters: {},
38
        dataList: [],
39
        total: 0,
40
        orgDefaultImage: util.defaultSet.img.org,
41
        orgImageAddId: util.ImageUrl('org/', true),
42
        platId: ''
43
      };
44
    },
45
    watch: {
46
      keyValue: function () {
47
        this.expertParameters.key = this.keyValue;
48
        this.expertList();
49
      }
50
    },
51
    created() {
52
      this.platId = Cookies.get('plf_user');
53
      this.expertParameters = {
54
        pid: this.platId,
55
        pageSize: 10,
56
        pageNo: 1
57
      };
58
      if (this.flag === 1) {
59
        this.expertParameters.key = this.keyValue;
60
      }
61
      this.expertList();
62
    },
63
    methods: {
64
      imageDis: function (item) {
65
        return (item.hasOrgLogo) ? this.orgImageAddId + item.id + '.jpg' : this.orgDefaultImage;
66
      },
67
      expertList() {
68
        this.dataList = [];
69
        this.$axios.get(this.url, {
70
          params: this.expertParameters
71
        }).then((res) => {
72
          if (res.success) {
73
            this.dataList = res.data.data;
74
            if (res.data.data.length === 0) {
75
              this.ifDefault = true;
76
            } else {
77
              this.ifDefault = false;
78
            }
79
            this.total = res.data.total;
80
          }
81
        });
82
      },
83
      kexiuExpert(id) {
84
        window.open(util.defaultSet.link.org + id);
85
      },
86
      handleCurrentChange(val) {
87
        this.expertParameters.pageNo = val;
88
        this.expertList();
89
      },
90
      delet(id, index) {
91
        this.$alert('确认将该企业移出平台?', '提示', {
92
          confirmButtonText: '确定',
93
          cancelButtonText: '取消',
94
          type: 'warning',
95
          center: true,
96
          callback: action => {
97
            if (action === 'confirm') {
98
              this.$axios.post(httpUrl.hQuery.residentOrgs.del, {
99
                pid: this.platId,
100
                oid: id
101
                }).then((res) => {
102
                  if (res.success) {
103
                    this.dataList.splice(index, 1);
104
                  }
105
              });
106
            }
107
          }
108
        });
109
      }
110
    }
111
  };
112
</script>
113

114
<style lang="stylus" rel="stylesheet/stylus">
115
  ul
116
    .list-item
117
      .list-info
118
        .list-tag
119
          cursor: pointer
120
          .maginNone
121
            margin-right: 0px
122
</style>

+ 0 - 43
src/components/bench-views/Sidebar.vue

@ -1,43 +0,0 @@
1
<template>
2
  <div class="newsLeft">
3
    <ul>
4
      <li>工作台</li>
5
      <li :class='{bg:manage}' @click="content1">内容管理</li>
6
      <li :class='{bg:compan}' @click="com1">企业管理</li>
7
      <li :class='{bg:searDemand}' @click="demand1">需求查询</li>
8
      <li :class='{bg:servi}' @click="serice1">对接服务</li>
9
      <li @click="goHome">返回</li>
10
    </ul>
11
  </div>
12
</template>
13
<script>
14
  export default {
15
    props: ['manage', 'compan', 'searDemand', 'servi'],
16
    methods: {
17
      content1() {
18
        this.$router.push({ path: '/ContentManagement' });
19
      },
20
      com1() {
21
        this.$router.push({ path: '/BusinessManagement' });
22
      },
23
      demand1() {
24
        this.$router.push({ path: '/DemandSearch' });
25
      },
26
      serice1() {
27
        this.$router.push({ path: '/ButtService' });
28
      },
29
      goHome() {
30
        this.$router.push({ path: '/WorkHome' });
31
      }
32
    }
33
  };
34
</script>
35

36
<style lang="stylus" rel="stylesheet/stylus">
37
  @import './Siderbar.styl'
38
  .newsLeft
39
    ul
40
      .bg
41
        background-color: $mainColor
42
        color: #fff
43
</style>

+ 0 - 27
src/components/bench-views/Siderbar.styl

@ -1,27 +0,0 @@
1

2
  .newsLeft
3
      float: left
4
      width: 140px
5
      li
6
        height: 50px
7
        text-align: center
8
        background: #fff
9
        line-height: 50px
10
        border: 1px solid $borderColor
11
        border-top:none
12
        cursor: pointer
13
        color: $commonFont
14
        &:hover
15
          background: $mainColor
16
          color: #fff
17
        &:last-child
18
          margin-top: 10px
19
          border-top: 1px solid $borderColor
20
        &:first-child
21
          height: 70px
22
          line-height: 70px
23
          cursor: default
24
          border-top: 1px solid $borderColor
25
          &:hover
26
            background: #fff
27
            color: $commonFont

+ 0 - 53
src/components/bench-views/WorkCommon.vue

@ -1,53 +0,0 @@
1
<template>
2
  <div class="main Site">
3
    <TheHeader></TheHeader>
4
    <div class="Site-content paddingTop">
5
      <div class="contain-wrapper">
6
        <transition name="router-fade" mode="out-in">
7
          <router-view></router-view>
8
        </transition>
9
      </div>
10
    </div>
11
    <TheFooter :plat="plat"></TheFooter>
12
  </div>
13
</template>
14

15
<script type="text/ecmascript-6">
16
  import TheHeader from './WorkHead.vue';
17
  import TheFooter from '../main-views/TheFooter.vue';
18

19
  export default {
20
    data() {
21
      return {
22
        plat: ''
23
      };
24
    },
25
    mounted() {
26
      /* eslint-disable no-undef */
27
      this.plat = PLAT.info;
28
    },
29
    components: {
30
      TheHeader,
31
      TheFooter
32
    }
33
  };
34
</script>
35

36
<style lang="stylus" rel="stylesheet/stylus">
37
  @import './workCommon'
38
  .Site
39
    display: flex
40
    min-height: 100vh
41
    flex-direction: column
42
    .Site-content
43
      flex: 1
44
      &.paddingTop
45
        padding-top:80px
46
      .router-fade-enter-active,
47
      .router-fade-leave-active
48
        transition: opacity 0.2s
49

50
      .router-fade-enter,
51
      .router-fade-leave-active
52
        opacity: 0
53
</style>

+ 0 - 145
src/components/bench-views/WorkHead.vue

@ -1,145 +0,0 @@
1
<template>
2
	<div class="workHeader">
3
		<div class="workHeaderWrapper">
4
				<ul class="contain-wrapper workHeaderMain">
5
					<li>
6
						<router-link to="/Workhome"><h1 class="kexiuLogo"></h1></router-link>
7
					</li>
8
					<li>
9
            <div @mouseover="overShow" @mouseout="outHide" class="logoBox">
10
              <div class="loginLogo">
11
                <img :src="plf_logo"/>
12
              </div>
13
              <el-collapse-transition>
14
                <div class="logoChild" v-show="animateStatus">
15
                  <div class="triangle"></div>
16
                  <ul>
17
                    <li @click="updateInfo"> <span class="icon1"></span>修改资料</li>
18
                    <li @click="accoountInfo"> <span class="icon2"></span>账户设置</li>
19
                    <li @click="exitOut"> <span class="icon3"></span>退出登录</li>
20
                  </ul>
21
                </div>
22
              </el-collapse-transition>
23
            </div>
24
					</li>
25
				</ul>
26
		</div>
27
	</div>
28
</template>
29

30
<script type="text/ecmascript-6">
31
  import Cookies from 'js-cookie';
32
  import util from '@/libs/util';
33

34
	export default {
35
    data() {
36
      return {
37
        plf_logo: '',
38
        animateStatus: false
39
      };
40
    },
41
    methods: {
42
      overShow() {
43
        this.animateStatus = true;
44
      },
45
      outHide() {
46
        this.animateStatus = false;
47
      },
48
      updateInfo() {
49
        this.$router.push({path: '/updateInfo'});
50
      },
51
      accoountInfo() {
52
        this.$router.push({path: '/AccountSettings'});
53
      },
54
      exitOut() {
55
        Cookies.set('plf_user', null, { path: '/' });
56
        Cookies.set('plf_name', null, { path: '/' });
57
        Cookies.set('plf_logo', null, { path: '/' });
58
        Cookies.set('plf_email', null, { path: '/' });
59
        this.$router.push({path: '/home'});
60
      }
61
    },
62
    created() {
63
      var logo = Cookies.get('plf_logo');
64
      this.plf_logo = logo ? util.ImageUrl('platform' + logo) : util.defaultSet.img.plat;
65
    }
66
	};
67
</script>
68

69
<style lang="stylus" rel="stylesheet/stylus">
70
  .workHeader
71
    .workHeaderWrapper
72
      position: fixed;
73
      width: 100%;
74
      height: 60px
75
      background: #fff
76
      border-bottom: 2px solid $borderColor
77
      box-sizing: border-box
78
      z-index: 1000
79
      font-size: 16px
80
      line-height: 32px
81
      display: flex
82
      justify-content: center
83
    .workHeaderMain
84
      display: flex
85
      justify-content: space-between
86
      li
87
        display: flex
88
        align-items: center
89

90
        .kexiuLogo
91
          width: 60px
92
          height: 30px
93
          bg-image('./img/home_icon_cmplogo.png')
94
          background-size: contain
95
          overflow: hidden
96
        .logoBox
97
          position:relative
98
          .logoChild
99
            position: absolute
100
            top: 45px
101
            right: 0
102
            width: 180px
103
            height: 140px
104
            z-index: 1000
105
            .triangle
106
              width: 0
107
              height: 0
108
              border: 8px solid transparent
109
              border-bottom-color: $mainColor
110
              position: absolute
111
              right: 10px
112
              top: 0
113

114
            ul
115
              width: 100%
116
              bg-blue-color()
117
              border-radius()
118
              overflow: hidden
119
              position: absolute
120
              top: 16px
121
              li
122
                width: 100%
123
                height: 40px
124
                line-height: 40px
125
                font-size: 13px
126
                color: #fff
127
                cursor: pointer
128
                &:hover
129
                  bg-blue-active-color()
130
                span
131
                  bg-image('./img/index-icon.png')
132
                  margin:0 10px
133
                  display: block
134
                  width: 20px
135
                  height: 20px
136
                .icon1
137
                   background-position: -40px 0
138
                .icon2
139
                   background-position: -60px 0
140
                .icon3
141
                   background-position: -20px 0
142
          .loginLogo
143
            cursor: pointer
144
            center-items(40px,40px)
145
</style>

+ 0 - 157
src/components/bench-views/WorkHome.vue

@ -1,157 +0,0 @@
1
<template>
2
  <div class="workbench">
3
    <div class="content-wrapper head-wrapper block-wrapper">
4
      <div class="logo-show">
5
        <img :src="imgUrl" />
6
      </div>
7
      <div class="info-show">
8
        <div class="info-tit">{{platInfo.name}}</div>
9
        <div class="info-desc">
10
          <p v-show="platInfo.addr">联系地址:{{platInfo.addr}}</p>
11
          <p v-show="platInfo.linkphone">联系电话:{{platInfo.linkphone}}</p>
12
        </div>
13
      </div>
14
      <div class="btn-show">
15
        <el-button type="primary" @click="updateInfo">修改资料</el-button>
16
      </div>
17
    </div>
18
    <div class="main-wrapper block-wrapper">
19
      <ul>
20
        <li @click="conManage">
21
          <div class="li-content">
22
            <p class="li-tit">内容管理</p>
23
            <p class="li-tip">管理【平台新闻】和【企业动态】栏目</p>
24
          </div>
25
        </li>
26
        <li @click="cmpManage">
27
          <div class="li-content">
28
            <p class="li-tit">企业管理</p>
29
            <p class="li-tip">管理入驻平台的企业</p>
30
          </div>
31
        </li>
32
        <li @click="demandManage">
33
          <div class="li-content">
34
            <p class="li-tit">需求查询</p>
35
            <p class="li-tip">查看用户在平台发布的需求</p>
36
          </div>
37
        </li>
38
        <li @click="serviceManage">
39
          <div class="li-content">
40
            <p class="li-tit">对接服务</p>
41
            <p class="li-tip">查看我们为您对接的专家与机构</p>
42
          </div>
43
        </li>
44
        <li>
45
          <div class="li-content">
46
            <p class="li-tip">更多功能 敬请期待</p>
47
          </div>
48
        </li>
49
      </ul>
50
    </div>
51
  </div>
52
</template>
53

54
<script>
55
  import Cookies from 'js-cookie';
56
  import util from '@/libs/util';
57
  import httpUrl from '@/libs/http';
58

59
  export default {
60
    data() {
61
      return {
62
        platInfo: '',
63
        imgUrl: '',
64
        plf_user: ''
65
      };
66
    },
67
    computed: {
68
    },
69
    created () {
70
      this.plf_user = Cookies.get('plf_user');
71
      this.getPlatInfo(this.plf_user);
72
    },
73
    methods: {
74
      getPlatInfo(id) {
75
        this.$axios.get(httpUrl.hQuery.baseInfo.query, {
76
          params: {
77
            id: id
78
          }
79
        }).then((res) => {
80
          console.log(res);
81
          this.platInfo = res.data;
82
          this.imgUrl = res.data.logo ? util.ImageUrl('platform' + res.data.logo) : util.defaultSet.img.plat;
83
        });
84
      },
85
      updateInfo() {
86
        this.$router.push({path: 'updateInfo'});
87
      },
88
      conManage() {
89
        this.$router.push({path: 'ContentManagement'});
90
      },
91
      cmpManage() {
92
        this.$router.push({path: 'BusinessManagement'});
93
      },
94
      demandManage() {
95
        this.$router.push({path: 'DemandSearch'});
96
      },
97
      serviceManage() {
98
        this.$router.push({path: 'ButtService'});
99
      }
100
    }
101
  };
102
</script>
103

104
<style lang="stylus" rel="stylesheet/stylus">
105
  .head-wrapper
106
    display:flex
107
    align-items:center
108
    .logo-show
109
      center-items(210px,140px)
110
    .info-show
111
      flex:1 0 210px
112
      padding-left:15px
113
      .info-tit
114
        font-size:24px
115
        line-height:34px
116
      .info-desc
117
        margin-top:10px
118
        font-size:14px
119
        line-height:22px
120
  .main-wrapper
121
    ul
122
      display:flex
123
      flex-wrap:wrap
124
      margin-right:-10px
125
      margin-bottom:-10px
126
      li
127
        display:flex
128
        align-items:center
129
        text-align:center
130
        background:#fff
131
        width:360px
132
        height:180px
133
        margin-right:10px
134
        margin-bottom:10px
135
        cursor:pointer
136
        .li-content
137
          width:100%
138
          line-height:34px
139
          .li-tit
140
            font-size:18px
141
          .li-tip
142
            color:$secondaryFont
143
            font-size:14px
144
        &:hover
145
          background:$mainColor
146
          color:#fff
147
          .li-tip
148
            color:#fff
149
        &:last-child
150
          background:#e5e5e5
151
          cursor:auto
152
          &:hover
153
            background:#e5e5e5
154
            .li-tip
155
              color:$secondaryFont
156

157
</style>

+ 0 - 49
src/components/bench-views/abutmentService/ButtService.vue

@ -1,49 +0,0 @@
1
<template>
2
  <div class="newsmMain">
3
    <Sidebar :manage='false' :compan='false' :searDemand='false' :servi='true'></Sidebar>
4
    <div class="newsRight">
5
      <el-tabs v-model="activeName">
6
        <el-tab-pane label="专家顾问" name="first">
7
          <ExpertAdvisor></ExpertAdvisor>
8
        </el-tab-pane>
9
        <el-tab-pane label="合作机构" name="second">
10
          <BusTemplate :url='url' :flag='2'>
11
          </BusTemplate>
12
        </el-tab-pane>
13
      </el-tabs>
14
    </div>
15
  </div>
16
</template>
17

18
<script>
19
  import Sidebar from '../Sidebar.vue';
20
  import BusTemplate from '../BusTemplate.vue';
21
  import ExpertAdvisor from './ExpertAdvisor.vue';
22
  export default {
23
    data() {
24
      return {
25
        activeName: 'first',
26
        url: '/ajax/platform/info/pqButtedOrgs'
27
      };
28
    },
29
    components: {
30
      Sidebar,
31
      BusTemplate,
32
      ExpertAdvisor
33
    }
34
  };
35
</script>
36

37
<style lang="stylus" rel="stylesheet/stylus">
38
  @import '../workCommon'
39
  ul
40
    .list-item
41
      .list-info
42
        width:86%
43
        .list-tig
44
          height: 30px
45
        .headerTag
46
          li
47
            text-ellipsis()
48
            width: 100%
49
</style>

+ 0 - 139
src/components/bench-views/abutmentService/ExpertAdvisor.vue

@ -1,139 +0,0 @@
1
<template>
2
  <ul>
3
    <draggable v-if="dataList" v-model="dataList" @start="drag=true" @end="drag=false">
4
      <li class="list-item" v-for="(item,index) in dataList" :key="index" @click="kexiuExpert(item.id)">
5
        <div class="list-head header" :style="{ backgroundImage: 'url('+ item.image +')'}"></div>
6
        <div class="list-info">
7
          <div class="list-tit list-tig">{{item.name}} <em class="authicon" :class='item.className'></em></div>
8
          <ul class="list-tag" v-if="item.offt">
9
            <li>{{item.offt}}</li>
10
          </ul>
11
          <ul class="list-tag headerTag" v-if="item.reserachs">
12
            <li>研究方向:{{item.reserachs}}</li>
13
          </ul>
14
        </div>
15
      </li>
16
    </draggable>
17
    <defaultPage v-show="ifDefault"></defaultPage>
18
    <div class="taglist" v-show="!ifDefault">
19
      <el-pagination background layout="prev, pager, next" :total="total" :page-size="10" @current-change="handleCurrentChange">
20
      </el-pagination>
21
    </div>
22
  </ul>
23
</template>
24

25
<script type="text/ecmascript-6">
26
  import draggable from 'vuedraggable';
27
  import Cookies from 'js-cookie';
28
  import httpUrl from '@/libs/http';
29
  import util from '@/libs/util';
30
  export default {
31
    data() {
32
      return {
33
        expertParameters: {},
34
        dataList: [],
35
        total: 0,
36
        ifDefault: false
37
      };
38
    },
39
    created() {
40
      const platId = Cookies.get('plf_user');
41
      this.expertParameters = {
42
        pid: platId,
43
        pageSize: 10,
44
        pageNo: 1
45
      };
46
      this.expertList();
47
    },
48
    mounted() {
49

50
    },
51
    methods: {
52
      expertList() {
53
        this.dataList = [];
54
        this.$axios.get(httpUrl.hQuery.buttedProfessors.pq, {
55
          params: this.expertParameters
56
        }).then((res) => {
57
          if (res.success) {
58
            if (res.data.data.length === 0) {
59
              this.ifDefault = true;
60
            } else {
61
              this.ifDefault = false;
62
            }
63
            this.disposeData(res.data.data);
64
            this.total = res.data.total;
65
          }
66
        });
67
      },
68
      disposeData($data) {
69
        this.dataList = $data;
70
        for (let i = 0; i < $data.length; i++) {
71
          if ($data[i].title) {
72
            if ($data[i].orgName) {
73
              $data[i].offt = $data[i].title + ',' + $data[i].orgName;
74
            } else {
75
              $data[i].offt = $data[i].title;
76
            }
77
          } else {
78
            if ($data[i].office) {
79
              if ($data[i].orgName) {
80
                $data[i].offt = $data[i].office + ',' + $data[i].orgName;
81
              } else {
82
                $data[i].offt = $data[i].office;
83
              }
84
            } else {
85
              $data[i].offt = '';
86
            }
87
          }
88
          $data[i].className = util.autho($data[i].authType, $data[i].orgAuth, $data[i].authStatus);
89
          if ($data[i].hasHeadImage) {
90
            $data[i].image = util.ImageUrl('head/' + $data[i].id + '_l.jpg', true);
91
          } else {
92
            $data[i].image = util.defaultSet.img.expert;
93
          }
94
          this.$axios.get('/ajax/researchArea/' + $data[i].id).then(res => {
95
            const $info = res.data;
96
            let arr = [];
97
            for (let j = 0; j < $info.length; j++) {
98
              if ($info[j].caption) {
99
                arr.push($info[j].caption);
100
              };
101
              if (j === $info.length - 1) {
102
                $data[i].reserachs = arr.join(',');
103
                this.$forceUpdate();
104
              }
105
            }
106
            if ($info.lenth === 0) {
107
              $data[i].reserachs = '';
108
            }
109
          });
110
        }
111
      },
112
      kexiuExpert(id) {
113
        window.open(util.defaultSet.link.expert + id);
114
      },
115
      handleCurrentChange(val) {
116
        this.expertParameters.pageNo = val;
117
        this.expertList();
118
      }
119
    },
120
    components: {
121
        draggable
122
    }
123
  };
124
</script>
125

126
<style lang="stylus" rel="stylesheet/stylus">
127
ul
128
  .list-item
129
    cursor: pointer
130
    .header
131
      width: 80px
132
      height: 80px
133
      border-radius: 50%
134
    .list-info
135
      .list-tig
136
        height: 30px
137
      .headerTag
138
        margin-top: 0px
139
</style>

+ 0 - 34
src/components/bench-views/businessManagement/BusRight.vue

@ -1,34 +0,0 @@
1
<template>
2
  <div class="listMain">
3
    <div class="search">
4
      <div class="search-wrapper">
5
        <el-input placeholder="输入关键词" v-model="inValue"></el-input>
6
        <el-button type="primary" icon="el-icon-search" @click="search">搜索</el-button>
7
      </div>
8
    </div>
9
    <div class="searchList">
10
      <BusTemplate :url='url' :keyValue='keyValue' :flag='1'></BusTemplate>
11
    </div>
12
  </div>
13
</template>
14

15
<script>
16
  import BusTemplate from '../BusTemplate.vue';
17
  export default {
18
    data() {
19
      return {
20
        keyValue: '',
21
        url: '/ajax/platform/info/pqResidentOrgs',
22
        inValue: ''
23
      };
24
    },
25
    components: {
26
      BusTemplate
27
    },
28
    methods: {
29
      search() {
30
        this.keyValue = this.inValue;
31
      }
32
    }
33
  };
34
</script>

+ 0 - 36
src/components/bench-views/businessManagement/EnterBusiness.vue

@ -1,36 +0,0 @@
1
<template>
2
  <div class="newsmMain">
3
    <Sidebar :manage='false' :compan='true' :searDemand='false' :servi='false'></Sidebar>
4
    <div class="newsRight">
5
      <el-tabs v-model="activeName">
6
        <el-tab-pane label="入驻企业" name="first">
7
          <BusRight></BusRight>
8
        </el-tab-pane>
9
      </el-tabs>
10
    </div>
11
  </div>
12
</template>
13

14
<script>
15
  import Sidebar from '../Sidebar.vue';
16
  import BusRight from './BusRight.vue';
17
  export default {
18
    data() {
19
      return {
20
        activeName: 'first'
21
      };
22
    },
23
    components: {
24
      Sidebar,
25
      BusRight
26
    }
27
  };
28
</script>
29

30
<style lang="stylus" rel="stylesheet/stylus">
31
  ul
32
    .list-item
33
      .list-info
34
        .list-tig
35
          height: 30px
36
</style>

+ 0 - 36
src/components/bench-views/contentManagement/AlertBox.vue

@ -1,36 +0,0 @@
1
<template>
2
  <div>
3
    <div class="search">
4
       <div class="search-wrapper">
5
         <el-input placeholder="输入关键词" v-model="inValue"></el-input>
6
         <el-button type="primary" icon="el-icon-search" @click="search">搜索</el-button>
7
       </div>
8
    </div>
9
    <ArticleTemplate :url='url' :keyValue='keyValue' :flag='3' :addA='addA' v-on:isLogFn = "lisLogFn($event)"></ArticleTemplate>
10
  </div>
11
</template>
12

13
<script>
14
  import ArticleTemplate from '../ArticleTemplate.vue';
15
   export default {
16
     props: ['addA'],
17
     data() {
18
      return {
19
        keyValue: '',
20
        url: '/ajax/article/pgPublishNotInPlatform',
21
        inValue: ''
22
       };
23
     },
24
     components: {
25
      ArticleTemplate
26
     },
27
     methods: {
28
       lisLogFn (par) {
29
          this.$emit('isLogFn', '1');
30
       },
31
       search() {
32
         this.keyValue = this.inValue;
33
       }
34
     }
35
	};
36
</script>

+ 0 - 33
src/components/bench-views/contentManagement/ContentManagement.vue

@ -1,33 +0,0 @@
1
<template>
2
  <div class="newsmMain">
3
    <Sidebar :manage='true' :compan='false' :searDemand='false' :servi='false'></Sidebar>
4
    <div class="newsRight">
5
      <el-tabs v-model="activeName">
6
        <el-tab-pane label="平台管理" name="first">
7
          <News></News>
8
        </el-tab-pane>
9
        <el-tab-pane label="企业动态" name="second">
10
          <Dynamic></Dynamic>
11
        </el-tab-pane>
12
      </el-tabs>
13
    </div>
14
  </div>
15
</template>
16

17
<script>
18
  import Sidebar from '../Sidebar.vue';
19
  import News from '../contentManagement/News.vue';
20
  import Dynamic from '../contentManagement/Dynamic.vue';
21
  export default {
22
    data() {
23
      return {
24
        activeName: 'first'
25
      };
26
    },
27
    components: {
28
      Sidebar,
29
      News,
30
      Dynamic
31
    }
32
  };
33
</script>

+ 0 - 50
src/components/bench-views/contentManagement/Dynamic.vue

@ -1,50 +0,0 @@
1
<template>
2
  <div class="listMain">
3
    <div class="search">
4
      <div class="search-wrapper">
5
        <el-input placeholder="输入关键词" v-model="inValue"></el-input>
6
        <el-button type="primary" icon="el-icon-search" @click="search">搜索</el-button>
7
        <el-button type="primary" icon="el-icon-edit" @click="dialogVisible = true">
8
        添加文章
9
        </el-button>
10
      </div>
11
    </div>
12
    <ArticleTemplate :url='url' :keyValue='keyValue' :flag='2' :Delele='Delele' v-on:isLogFn = "lisLogFn($event)"></ArticleTemplate>
13
    <el-dialog title="添加企业发布的文章至【企业动态】栏目" :visible.sync="dialogVisible" width="930px">
14
        <AlertBox :addA='addA' v-on:isLogFn = "lisLogFn($event)"></AlertBox>
15
    </el-dialog>
16
  </div>
17
</template>
18

19
<script>
20
  import ArticleTemplate from '../ArticleTemplate.vue';
21
  import AlertBox from './AlertBox.vue';
22
  export default {
23
    data() {
24
      return {
25
        dialogVisible: false,
26
        keyValue: '',
27
        url: '/ajax/article/pgPublishInPlatform',
28
        inValue: '',
29
        Delele: false,
30
        addA: false
31
      };
32
    },
33
    components: {
34
      ArticleTemplate,
35
      AlertBox
36
    },
37
    methods: {
38
      lisLogFn (par) {
39
        if (par === '1') {
40
          this.Delele = !this.Delele;
41
        } else {
42
          this.addA = !this.addA;
43
        }
44
      },
45
      search() {
46
        this.keyValue = this.inValue;
47
      }
48
    }
49
 };
50
</script>

+ 0 - 36
src/components/bench-views/contentManagement/News.vue

@ -1,36 +0,0 @@
1
<template>
2
  <div class="listMain">
3
    <div class="search">
4
      <div class="search-wrapper">
5
        <el-input placeholder="输入关键词" v-model="inValue"></el-input>
6
        <el-button type="primary" icon="el-icon-search" @click="search">搜索</el-button>
7
        <el-button type="primary" icon="el-icon-edit" @click="goPublishArt">发布文章</el-button>
8
      </div>
9
    </div>
10
    <ArticleTemplate :url='url' :keyValue='keyValue' :flag='1'></ArticleTemplate>
11
  </div>
12
</template>
13

14
<script>
15
  import ArticleTemplate from '../ArticleTemplate.vue';
16
    export default {
17
      data() {
18
        return {
19
          keyValue: '',
20
          url: '/ajax/article/pageQuery',
21
          inValue: ''
22
        };
23
      },
24
      components: {
25
        ArticleTemplate
26
      },
27
      methods: {
28
        goPublishArt() {
29
          this.$router.push({path: '/PublishArticle'});
30
        },
31
        search() {
32
          this.keyValue = this.inValue;
33
        }
34
      }
35
    };
36
</script>

+ 0 - 134
src/components/bench-views/contentManagement/PreviewArticle.vue

@ -1,134 +0,0 @@
1
<template>
2
  <div class="previewArticle block-wrapper main-content">
3
    <div class="wrapper-left content-wrapper">
4
      <div class="detail-info">
5
        <h2 class="article-title">{{articleInfo.articleTitle}}</h2>
6
        <div class="article-tip">此处将显示发布时间</div>
7
        <div class="article-head" :style="{backgroundImage: 'url(' + articleUrl(articleInfo) + ')'}"></div>
8
        <div class="article-content" v-html="articleInfo.articleContent"></div>
9
        <ul class="tagList">
10
          <li v-for="item in articleInfo.subject" :key="item.index">{{item}}</li>
11
        </ul>
12
      </div>
13
    </div>
14
    <div class="wrapper-right">
15
      <div class="block-wrapper content-wrapper article-owner">
16
        <div class="owner-head">
17
          <img :src="logoUrl" />
18
        </div>
19
        <div class="owner-name">{{platInfo.name}}</div>
20
      </div>
21
    </div>
22
    <BackTop></BackTop>
23
  </div>
24
</template>
25
26
<script type="text/ecmascript-6">
27
  import httpUrl from '@/libs/http';
28
  import util from '@/libs/util';
29
30
  export default {
31
    data() {
32
      return {
33
        platInfo: '',
34
        logoUrl: '',
35
        articleId: '',
36
        ownerId: '',
37
        articleInfo: ''
38
      };
39
    },
40
    created() {
41
      this.articleId = util.urlParse('id');
42
      this.getArticleInfo();
43
    },
44
    methods: {
45
      getArticleInfo() {
46
        this.$axios.get(httpUrl.kxQurey.article.query, {
47
          params: {
48
            articleId: this.articleId
49
          }
50
        }).then((res) => {
51
          if (res.success) {
52
            var $info = res.data;
53
            if ($info.subject) {
54
              $info.subject = $info.subject.split(',');
55
            };
56
            this.articleInfo = $info;
57
            this.ownerId = $info.ownerId;
58
            this.getPlatInfo();
59
          };
60
        });
61
      },
62
      getPlatInfo() {
63
        this.$axios.get(httpUrl.hQuery.baseInfo.query, {
64
          params: {
65
            id: this.ownerId
66
          }
67
        }).then((res) => {
68
          if (res.success) {
69
            var $info = res.data;
70
            this.platInfo = $info;
71
            this.logoUrl = util.ImageUrl('platform' + res.data.logo);
72
          };
73
        });
74
      },
75
      articleUrl(item) {
76
        return item.articleImg ? util.ImageUrl('article/' + item.articleImg) : util.defaultSet.img.article;
77
      }
78
    }
79
  };
80
</script>
81
82
<style lang="stylus" rel="stylesheet/stylus">
83
.previewArticle
84
  .detail-info
85
    .article-title
86
      font-size: 20px
87
      line-height: 32px
88
      color: #000
89
    .article-tip
90
      font-size: 14px
91
      color: $secondaryFont
92
      line-height: 30px
93
    .article-head
94
      width: 100%
95
      height: 300px
96
      margin: 24px 0
97
      background-position: center
98
      background-size: cover
99
      background-repeat: no-repeat
100
    .article-content
101
      font-size: 16px
102
      color: $mainFont
103
      line-height: 28px
104
      word-break: break-word
105
      p
106
        margin-bottom: 16px
107
        img
108
          width:100%
109
    .tagList
110
      margin: 16px 0 2px
111
      display:flex;
112
      flex-wrap:wrap
113
      li
114
        margin-right: 10px
115
        margin-bottom: 10px
116
        padding: 0 12px
117
        color: $commonFont
118
        border: 1px solid $borderColor
119
        border-radius: 20px
120
        font-size: 14px
121
        line-height: 30px
122
  .article-owner
123
    display:flex
124
    justify-content:center
125
    flex-direction: column
126
    align-items: center
127
    text-align:center
128
    .owner-head
129
      center-items(210px,140px)
130
    .owner-name
131
      margin-top:10px
132
      font-size:16px
133
      color:$mainFont
134
</style>

+ 0 - 461
src/components/bench-views/contentManagement/PublishArticle.vue

@ -1,461 +0,0 @@
1
<template>
2
  <div class="publishArticle block-wrapper main-content">
3
    <div class="wrapper-left content-wrapper">
4
      <el-form :model="ruleFormArt" :rules="rules" ref="ruleFormArt" class="form-main">
5
        <el-form-item class="upload-fa">
6
          <div class="update-rw">
7
            <div class="up">
8
              <h2><span>* </span>上传文章封面图片</h2>
9
              PNG/JPG/JPEG格式,大小2M以内
10
            </div>
11
          </div>
12
          <el-upload
13
            class="avatar-uploader"
14
            :action="uploadUrl"
15
            :show-file-list="false"
16
            ref="uploadLogo"
17
            :on-success="handleAvatarSuccess"
18
            :before-upload="beforeAvatarUpload" prop="imageUrl">
19
            <div v-if="ruleFormArt.imageUrl" :style="{backgroundImage: 'url(' + ruleFormArt.imageUrl + ')'}" class="avatar"></div>
20
            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
21
          </el-upload>
22
        </el-form-item>
23
        <input type="hidden" v-model="articleId">
24
        <el-form-item label="文章标题" prop="artTit">
25
          <el-input v-model="ruleFormArt.artTit" placeholder="请填写文章标题"></el-input>
26
        </el-form-item>
27
        <dynamicTags :tagInfo="tagInfo" :dyStr="ruleFormArt.industry" v-on:turnTags="turnTags($event)" :dynamicTagsLength="5"></dynamicTags>
28
        <el-form-item label="文章正文">
29
          <UE :id="artUe" :contentText="ruleFormArt.artDesc" ref="ueBox"></UE>
30
        </el-form-item>
31
        <el-form-item></el-form-item>
32
      </el-form>
33
    </div>
34
    <div class="wrapper-right">
35
      <el-row class="content-wrapper operate-box">
36
        <el-col :span="8" @click.native="articleAdd('ruleFormArt')">
37
          <em class="operateicon icon-issue"></em>
38
          <p style="color:#28b8fa">发布</p>
39
        </el-col>
40
        <el-col :span="8" @click.native="clickTiming('ruleFormArt')">
41
          <em class="operateicon icon-timeissue"></em>
42
          <p>定时发布</p>
43
        </el-col>
44
        <el-col :span="8" @click.native="articleDraft('ruleFormArt', 2)">
45
          <em class="operateicon icon-preview"></em>
46
          <p>预览</p>
47
        </el-col>
48
        <el-col :span="8" @click.native="articleDraft('ruleFormArt', 1)">
49
          <em class="operateicon icon-draft"></em>
50
          <p>存草稿</p>
51
        </el-col>
52
        <el-col :span="8" class="nodelete" v-show="!ifDelete">
53
          <em class="operateicon icon-delete"></em>
54
          <p>删除</p>
55
        </el-col>
56
        <el-col :span="8" v-show="ifDelete" @click.native="articleDelete">
57
          <em class="operateicon icon-delete"></em>
58
          <p>删除</p>
59
        </el-col>
60
      </el-row>
61
    </div>
62

63
    <!-- timing -->
64
    <el-dialog title="文章定时发布" :visible.sync="dialogFormVisible" width="400px">
65
      <el-form>
66
        <el-form-item label="请设置文章发布的时间:">
67
          <el-date-picker
68
            v-model="timingDate"
69
            type="datetime"
70
            default-time="12:00:00"
71
            :picker-options="pickerOptions0"
72
            :default-value="defaultTime" :placeholder="placeTime" format="yyyy-MM-dd HH:mm:ss" style="width:100%">
73
          </el-date-picker>
74
        </el-form-item>
75
      </el-form>
76
      <div slot="footer" class="dialog-footer">
77
        <el-button @click="dialogFormVisible = false">取 消</el-button>
78
        <el-button type="primary" @click="articleTiming">确 定</el-button>
79
      </div>
80
    </el-dialog>
81

82
    <BackTop></BackTop>
83
  </div>
84
</template>
85

86
<script type="text/ecmascript-6">
87
  import Cookies from 'js-cookie';
88
  import httpUrl from '@/libs/http';
89
  import util from '@/libs/util';
90

91
  import dynamicTags from '../../sub-component/DynamicTags';
92
  import UE from './editorUE';
93

94
  export default {
95
    data() {
96
      return {
97
        pickerOptions0: {
98
          disabledDate(time) {
99
            return time.getTime() < Date.now();
100
          }
101
        },
102
        plf_user: '',
103
        tagInfo: {
104
          lableTit: '关键词',
105
          placeholder: '请填写相关的关键词,如:腐蚀防护、石墨烯、纳米材料'
106
        },
107
        artUe: 'artUeditorId', // uedtior的id
108
        uploadUrl: httpUrl.kxQurey.cachedFile,
109
        articleId: '',
110
        timingDate: '',
111
        defaultTime: new Date().toISOString(),
112
        ruleFormArt: {
113
          artTit: '',
114
          artDesc: '',
115
          industry: '',
116
          imageUrl: '', // 临时地址
117
          imgName: '' // 图片的name
118
        },
119
        rules: {
120
          artTit: [
121
            { required: true, message: '请填写文章标题', trigger: 'blur' }
122
          ]
123
        },
124
        dialogFormVisible: false,
125
        ifDelete: false
126
      };
127
    },
128
    created() {
129
      this.articleId = util.urlParse('arId');
130
      if (this.articleId) {
131
        this.getArticle();
132
      }
133
      this.plf_user = Cookies.get('plf_user');
134
      this.ifDelete = true;
135
    },
136
    computed: {
137
      placeTime: function() {
138
        let d = new Date();
139
        return new Date(d.getTime() - d.getTimezoneOffset() * 60000).toISOString().replace('T', ' ').replace(/\..+$/, '');
140
      }
141
    },
142
    methods: {
143
      getArticle() {
144
        this.$axios.get(httpUrl.kxQurey.article.query, {
145
          params: {
146
            articleId: this.articleId
147
          }
148
        }).then((res) => {
149
          if (res.success) {
150
            this.ruleFormArt.artTit = res.data.articleTitle;
151
            this.ruleFormArt.imageUrl = util.ImageUrl('article/' + res.data.articleImg, false);
152
            this.ruleFormArt.industry = res.data.subject;
153
            this.ruleFormArt.artDesc = res.data.articleContent;
154
          }
155
        });
156
      },
157
      turnTags(msg) {
158
        this.ruleFormArt.industry = msg;
159
      },
160
      getDataParams(publishTime) {
161
        this.ruleFormArt.artDesc = this.$refs.ueBox.getUEContent(); // 调用子组件方法
162
        let $data = {};
163
        $data.ownerId = this.plf_user;
164
        $data.articleType = '3';
165
        $data.articleTitle = this.ruleFormArt.artTit;
166
        $data.articleContent = this.ruleFormArt.artDesc;
167
        $data.subject = this.ruleFormArt.industry;
168
        $data.articleImg = this.ruleFormArt.imgName;
169
        $data.colNum = '7';
170
        if (this.articleId) {
171
          $data.articleId = this.articleId;
172
        };
173
        if (publishTime !== '') {
174
          $data.publishTime = publishTime;
175
        };
176
        return $data;
177
      },
178
      validImgIfVoid() { // 判断图片是否上传
179
        if (!this.ruleFormArt.imageUrl) {
180
          this.$alert('请上传文章封面图片', '提示', {
181
            confirmButtonText: '确定',
182
            type: 'warning',
183
            center: true
184
          });
185
          return false;
186
        }
187
      },
188
      articleAdd(formName) { // 发布文章
189
        this.validImgIfVoid();
190
        this.$refs[formName].validate((valid) => {
191
          if (valid) {
192
            let paramsData = this.getDataParams();
193
            this.$confirm('确认发布该文章', '提示', {
194
              confirmButtonText: '确定',
195
              cancelButtonText: '取消',
196
              type: 'warning',
197
              center: true
198
            }).then(() => {
199
              this.$axios.post(httpUrl.kxQurey.article.save, paramsData).then((res) => {
200
                if (res.success) {
201
                  this.$alert('文章发布成功!', '提示', {
202
                    confirmButtonText: '确定',
203
                    type: 'success',
204
                    center: true,
205
                    callback: action => {
206
                      if (action === 'confirm') {
207
                        this.$router.push({path: '/ContentManagement'});
208
                      };
209
                    }
210
                  });
211
                } else {
212
                  this.$message({
213
                    message: '文章发布失败,请重新发布!',
214
                    type: 'warning'
215
                  });
216
                };
217
                console.log(res);
218
              }).catch(error => {
219
                console.log(error);
220
              });
221
            });
222
          } else {
223
            console.log('error submit!!');
224
            return false;
225
          }
226
        });
227
      },
228
      clickTiming(formName) {
229
        this.validImgIfVoid();
230
        this.$refs[formName].validate((valid) => {
231
          if (valid) {
232
            this.dialogFormVisible = true;
233
          } else {
234
            console.log('error submit!!');
235
            return false;
236
          }
237
        });
238
      },
239
      articleTiming() { // 定时发布文章
240
        let opublishTime = util.dateFormatter(this.placeTime, true, true);
241
        if (this.timingDate) {
242
          opublishTime = util.dateFormatter(this.timingDate, true, true);
243
        }
244
        let paramsData = this.getDataParams(opublishTime);
245
        this.$axios.post(httpUrl.kxQurey.article.timing, paramsData).then((res) => {
246
          if (res.success) {
247
            this.$alert('文章定时发布时间设置成功!', '提示', {
248
              confirmButtonText: '确定',
249
              type: 'success',
250
              center: true,
251
              callback: action => {
252
                this.$router.push({path: '/ContentManagement'});
253
              }
254
            });
255
            this.dialogFormVisible = false;
256
            this.ifDelete = true;
257
          };
258
        });
259
      },
260
      articleDraft(formName, num) { // 预览文章/存草稿
261
        this.validImgIfVoid();
262
        let paramsData = this.getDataParams();
263
        this.$refs[formName].validate((valid) => {
264
          if (valid) {
265
            this.$axios.post(httpUrl.kxQurey.article.draft, paramsData).then((res) => {
266
              if (res.success) {
267
                if (num === 1) {
268
                  this.articleId = res.data;
269
                  this.$alert('文章已保存草稿', '提示', {
270
                    confirmButtonText: '确定',
271
                    type: 'success',
272
                    center: true,
273
                    callback: action => {
274
                      this.$router.push({path: '/ContentManagement'});
275
                    }
276
                  });
277
                } else if (num === 2) {
278
                  this.articleId = res.data;
279
                  const {href} = this.$router.resolve({
280
                      path: '/PreviewArticle',
281
                      query: {
282
                        id: res.data
283
                      }
284
                  });
285
                  window.open(href, '_blank');
286
                }
287
                this.ifDelete = true;
288
              } else {
289
                if (res.code === 90) {
290
                  this.$alert('由于操作时间过久,上传图片已失效,请重新上传。', '提示', {
291
                    confirmButtonText: '确定',
292
                    type: 'warning',
293
                    center: true
294
                  });
295
                } else {
296
                  this.$alert('文章保存失败!', '提示', {
297
                    confirmButtonText: '确定',
298
                    type: 'warning',
299
                    center: true
300
                  });
301
                }
302
              };
303
            });
304
          } else {
305
            console.log('error submit!!');
306
            return false;
307
          }
308
        });
309
      },
310
      articleDelete() { // 删除文章
311
        this.$confirm('确认删除该文章', '提示', {
312
          confirmButtonText: '确定',
313
          cancelButtonText: '取消',
314
          type: 'warning'
315
        }).then(() => {
316
          this.$axios.post(httpUrl.kxQurey.article.del, {
317
            params: {
318
              articleId: this.articleId
319
            }
320
          }).then((res) => {
321
            if (res.success) {
322
              this.$router.push({path: '/ContentManagement'});
323
            }
324
            console.log(res);
325
          });
326
        }).catch(() => {
327
          this.$message({
328
            type: 'info',
329
            message: '已取消删除'
330
          });
331
        });
332
      },
333
      // upload img
334
      handleAvatarSuccess(res, file) {
335
        this.ruleFormArt.imageUrl = URL.createObjectURL(file.raw);
336
        this.ruleFormArt.imgName = res.data[0].cacheKey;
337
      },
338
      beforeAvatarUpload(file) {
339
        const isJPG = file.type === 'image/jpeg';
340
        const isPNG = file.type === 'image/png';
341
        const isLt2M = file.size / 1024 / 1024 < 2;
342
        if (!isJPG && !isPNG) {
343
          this.$message.error('请上传PNG/JPG/JPEG格式的图片');
344
        }
345
        if (!isLt2M) {
346
          this.$message.error('上传logo大小不能超过 2MB!');
347
        }
348
        return (!isJPG || !isPNG) && isLt2M;
349
      }
350
      // upload img
351
    },
352
    components: {
353
      dynamicTags,
354
      UE
355
    }
356
  };
357
</script>
358

359
<style lang="stylus" rel="stylesheet/stylus">
360
.publishArticle
361
  .form-main
362
    width:100%
363
    .form-line
364
      border-top:1px dashed #ccc
365
      margin-bottom:20px
366
  .el-form-item__label
367
    float:none
368
  .shortW
369
    width:300px
370
  .code-btn
371
    .el-input-group__append
372
      padding:0
373
      overflow:hidden
374
      img
375
        width:100px
376
        height:38px
377
        cursor: pointer
378
  .upload-fa
379
    position:relative
380
    .avatar-uploader
381
      .el-upload
382
        display:flex
383
        align-items:center
384
        justify-content:center
385
        border: 1px dashed #d9d9d9
386
        border-radius: 6px
387
        cursor: pointer
388
        position: relative
389
        width: 100%
390
        height: 190px
391
        overflow: hidden
392
        &:hover
393
          border-color: $mainColor
394
        .avatar-uploader-icon
395
          font-size: 40px
396
          color: #8c939d
397
          width: 100%
398
          height: 190px
399
          line-height: 190px
400
          text-align: center
401
        .avatar
402
          width:100%
403
          height:190px
404
          background-size:cover
405
          background-position:center
406

407
    .update-rw
408
      position:absolute
409
      display:flex
410
      justify-content:center
411
      align-items:center
412
      text-align:center
413
      line-height:20px
414
      width:100%
415
      top:66%
416
      color:$secondaryFont
417
      h2
418
        font-size:16px
419
        span
420
          color:#f56c6c
421

422
  .operate-box
423
    border-top:4px solid #28b8fa
424
    .el-col-8
425
      text-align:center
426
      margin-bottom:12px
427
      cursor:pointer
428
      color:$commonFont
429
      .operateicon
430
        display:inline-block;
431
        width:18px;
432
        height:18px;
433
        &.icon-issue
434
          bg-image('/static/comimg/g_article_icon_fabu_hig.png')
435
        &.icon-timeissue
436
          bg-image('/static/comimg/g_article_icon_dingshi_nor.png')
437
        &.icon-preview
438
          bg-image('/static/comimg/g_article_icon_yulan_nor.png')
439
        &.icon-draft
440
          bg-image('/static/comimg/g_article_icon_caogao_nor.png')
441
        &.icon-delete
442
          bg-image('/static/comimg/g_article_icon_shanchu_nor.png')
443

444
      &:hover
445
        color:#28b8fa
446
        .icon-timeissue
447
          bg-image('/static/comimg/g_article_icon_dingshi_hig.png')
448
        .icon-preview
449
          bg-image('/static/comimg/g_article_icon_yulan_hig.png')
450
        .icon-draft
451
          bg-image('/static/comimg/g_article_icon_caogao_hig.png')
452
        .icon-delete
453
          bg-image('/static/comimg/g_article_icon_shanchu_hig.png')
454
      &.nodelete
455
        cursor:auto
456
        opacity:.6
457
        &:hover
458
          color:$commonFont
459
          .icon-delete
460
            bg-image('/static/comimg/g_article_icon_shanchu_nor.png')
461
</style>

+ 0 - 56
src/components/bench-views/contentManagement/editorUE.vue

@ -1,56 +0,0 @@
1
<template>
2
  <div class="editorBox">
3
    <script :id="id" type="text/plain"></script>
4
  </div>
5
</template>
6
<script type="text/ecmascript-6">
7
  import httpUrl from '@/libs/http';
8
9
  export default {
10
    name: 'UE',
11
    props: {
12
      id: {
13
        type: String
14
      },
15
      contentText: {
16
        type: String
17
      }
18
    },
19
    data () {
20
      return {
21
        editor: null
22
      };
23
    },
24
    mounted() {
25
      const self = this;
26
      /* eslint-disable no-undef */
27
      this.editor = UE.getEditor(this.id, {
28
        BaseUrl: '',
29
        initialFrameWidth: null,
30
        initialFrameHeight: 500,
31
        serverUrl: httpUrl.kxQurey.editor,
32
        UEDITOR_HOME_URL: '/static/ueditor/' // 这个是静态资源的路径
33
      }); // 初始化UE
34
      this.editor.addListener('ready', function () { // 确保UE加载完成后放入内容
35
        if (self.contentText) {
36
          self.editor.setContent(self.contentText);
37
        } else {
38
          self.editor.setContent('');
39
        }
40
      });
41
    },
42
    methods: {
43
      getUEContent() { // 获取内容方法
44
        return this.editor.getContent();
45
      }
46
    },
47
    destroyed() {
48
      this.editor.destroy();
49
    }
50
  };
51
</script>
52
53
<style lang="stylus" rel="stylesheet/stylus">
54
.editorBox
55
  line-height:18px
56
</style>

+ 0 - 59
src/components/bench-views/demandSearch/DemandSearch.vue

@ -1,59 +0,0 @@
1
<template>
2
  <div class="newsmMain">
3
    <Sidebar :manage='false' :compan='false' :searDemand='true' :servi='false'></Sidebar>
4
    <div class="newsRight">
5
      <el-tabs v-model="activeName">
6
        <el-tab-pane label="发布中的需求" name="first">
7
          <DemandTemplate :flag='1'></DemandTemplate>
8
        </el-tab-pane>
9
        <el-tab-pane label="已完成的需求" name="second">
10
          <DemandTemplate :flag='2'></DemandTemplate>
11
        </el-tab-pane>
12
      </el-tabs>
13
    </div>
14
  </div>
15
</template>
16

17
<script>
18
  import Sidebar from '../Sidebar.vue';
19
  import DemandTemplate from './DemandTemplate.vue';
20
  export default {
21
    data() {
22
      return {
23
        activeName: 'first'
24
      };
25
    },
26
    components: {
27
      Sidebar,
28
      DemandTemplate
29
    }
30
  };
31
</script>
32

33
<style lang="stylus" rel="stylesheet/stylus">
34
  ul
35
    .list-item
36
      cursor: pointer
37
      .list-info
38
        .list-tig
39
          height: 30px
40
        .list-tagl
41
          li
42
            text-ellipsis-n(2)
43
            color: $commonFont
44
        .list-tagy
45
          li
46
            margin-right: 70px
47
  .listMain
48
    .coGreen
49
      color: green
50
    .select
51
      margin-top: 20px
52
      .week
53
        display: inline-block
54
        margin-right: 40px
55
        .weekText
56
          margin: 0 8px
57
        .el-select
58
          width: 130px
59
</style>

+ 0 - 215
src/components/bench-views/demandSearch/DemandTemplate.vue

@ -1,215 +0,0 @@
1
<template>
2
  <div class="listMain">
3
    <div class="search">
4
      <div class="search-wrapper">
5
        <el-input placeholder="输入关键词" v-model="searchValue" maxlength=50></el-input>
6
        <el-button type="primary" icon="el-icon-search" @click="search">搜索</el-button>
7
      </div>
8
    </div>
9
    <div class="select">
10
      <div class="week">
11
        <span class="weekText">周期:</span>
12
        <el-select v-model="value" placeholder="请选择" @change="changeDate">
13
          <el-option
14
            v-for="item in options"
15
            :key="item.value"
16
            :label="item.label"
17
            :value="item.value">
18
          </el-option>
19
        </el-select>
20
      </div>
21
      <div class="week">
22
        <span class="weekText">预算:</span>
23
        <el-select v-model="budgetValue" placeholder="请选择" @change="changeBudget">
24
          <el-option
25
            v-for="item in budget"
26
            :key="item.value"
27
            :label="item.label"
28
            :value="item.value">
29
          </el-option>
30
        </el-select>
31
      </div>
32
      <div class="week" v-if="flag==1">
33
        <span class="weekText">排序:</span>
34
        <el-select v-model="sortValue" placeholder="请选择" @change="changeSort">
35
          <el-option
36
            v-for="item in sort"
37
            :key="item.value"
38
            :label="item.label"
39
            :value="item.value">
40
          </el-option>
41
        </el-select>
42
      </div>
43
    </div>
44
    <div class="searchList">
45
      <ul>
46
        <li class="list-item" v-for="(item, index) in dataList" :key="index" @click="kexiuExpert(item.id)">
47
          <div class="list-info">
48
            <div class="list-tit list-tig">{{item.title}}</div>
49
            <ul class="list-tag">
50
              <li>{{item.orgName}}</li>
51
              <li>发布于 {{comTime(item.createTime)}}</li>
52
              <li>浏览量 {{item.pageViews}}</li>
53
            </ul>
54
            <ul class="list-tag list-tagl">
55
              <li>{{item.descp}}</li>
56
            </ul>
57
            <ul class="list-tag list-tagy">
58
              <li>所在城市:{{item.city}}</li>
59
              <li v-if="item.duration !== '0'">预计周期:{{options[item.duration].label}}</li>
60
              <li v-if="item.cost !== '0'">费用预算:{{budget[item.cost].label}}</li>
61
              <li :class="{ coRed: sty(item)}" v-if="flag==1">有效期至:{{timeCh(item)}}</li>
62
              <li class="coGreen" v-if="flag==2">有效期至:{{timeCh(item)}}</li>
63
            </ul>
64
          </div>
65
        </li>
66
      </ul>
67
      <defaultPage v-show="ifDefault"></defaultPage>
68
      <div class="taglist" v-show="!ifDefault">
69
        <el-pagination background layout="prev, pager, next" :total="total" :page-size="10" @current-change="handleCurrentChange">
70
        </el-pagination>
71
      </div>
72
    </div>
73
  </div>
74
</template>
75

76
<script>
77
   import Cookies from 'js-cookie';
78
   import httpUrl from '@/libs/http';
79
   import util from '@/libs/util';
80
   export default {
81
     props: ['flag'],
82
     data() {
83
       return {
84
         ifDefault: false,
85
         expertParameters: {},
86
         dataList: [],
87
         total: 0,
88
         platId: '',
89
         searchValue: '',
90
         isActive: '',
91
         options: util.workComm.durationTime,
92
         value: '',
93
         budget: util.workComm.costRange,
94
         budgetValue: '',
95
         sort: [{
96
           value: '1',
97
           label: '最新发布'
98
         }, {
99
           value: '0',
100
           label: '即将到期'
101
         }],
102
         sortValue: ''
103
       };
104
     },
105
     computed: {
106
      // optionsNew: function() {
107
      //   let arr = util.Dictionary.durationTime;
108
      //   arr.unshift({
109
      //     value: '',
110
      //     label: '全部'
111
      //   });
112
      //   return arr;
113
      // },
114
      // budgetNew: function() {
115
      //   let arr = util.Dictionary.costRange;
116
      //   arr.unshift({
117
      //     value: '',
118
      //     label: '全部'
119
      //   });
120
      //   console.log(arr)
121
      //   return arr;
122
      // }
123
     },
124
     created() {
125
      this.platId = Cookies.get('plf_user');
126
      this.expertParameters = {
127
        source: 'xttjpt',
128
        key: this.searchValue,
129
        pageSize: 10,
130
        pageNo: 1
131
      };
132
      if (this.flag === 2) {
133
        this.expertParameters.byCreateTime = 2;
134
        this.expertParameters.state = 2;
135
      } else {
136
        this.expertParameters.byCreateTime = 1;
137
        this.expertParameters.state = 1;
138
      }
139
      this.expertList();
140
    },
141
    methods: {
142
      search() {
143
        this.expertParameters.key = this.searchValue;
144
        this.expertList();
145
      },
146
      sty(item) {
147
        var nowDate = new Date();
148
        var year = nowDate.getFullYear();
149
        var month = nowDate.getMonth() + 1 < 10 ? '0' + (nowDate.getMonth() + 1) : nowDate.getMonth() + 1;
150
        var day = nowDate.getDate() < 10 ? '0' + nowDate.getDate() : nowDate.getDate();
151
        var day1 = new Date(year + '-' + month + '-' + day);
152
        var day2 = new Date(item.invalidDay.substr(0, 4) + '-' + item.invalidDay.substr(4, 2) + '-' + item.invalidDay.substr(6, 2));
153
        if ((day2 - day1) / (1000 * 60 * 60 * 24) < 7) {
154
             return true;
155
        }
156
        return false;
157
      },
158
      timeCh(item) {
159
        if (item.invalidDay.substr(4, 1) === '0') {
160
          if (item.invalidDay.substr(6, 1) === '0') {
161
            return item.invalidDay.substr(0, 4) + '年' + item.invalidDay.substr(5, 1) + '月' + item.invalidDay.substr(7, 1) + '日';
162
          } else {
163
            return item.invalidDay.substr(0, 4) + '年' + item.invalidDay.substr(5, 1) + '月' + item.invalidDay.substr(6, 2) + '日';
164
          }
165
        } else {
166
          return item.invalidDay.substr(0, 4) + '年' + item.invalidDay.substr(4, 2) + '月' + item.invalidDay.substr(6, 2) + '日';
167
        }
168
      },
169
      changeDate(p) {
170
        if (p === '') {
171
          this.$delete(this.expertParameters, 'duration');
172
        } else {
173
          this.expertParameters.duration = p;
174
        }
175
        this.expertList();
176
      },
177
      changeBudget(p) {
178
        if (p === '') {
179
          this.$delete(this.expertParameters, 'cost');
180
        } else {
181
          this.expertParameters.cost = p;
182
        }
183
        this.expertList();
184
      },
185
      changeSort(p) {
186
        this.expertParameters.byCreateTime = p;
187
        this.expertList();
188
      },
189
      comTime: util.commenTime,
190
      expertList() {
191
        this.dataList = [];
192
        this.$axios.get(httpUrl.hQuery.demand.nopq, {
193
          params: this.expertParameters
194
        }).then((res) => {
195
          if (res.success) {
196
            this.dataList = res.data.data;
197
            if (res.data.data.length === 0) {
198
              this.ifDefault = true;
199
            } else {
200
              this.ifDefault = false;
201
            }
202
            this.total = res.data.total;
203
          }
204
        });
205
      },
206
      kexiuExpert(id) {
207
        window.open(util.defaultSet.link.demand + id);
208
      },
209
      handleCurrentChange(val) {
210
        this.expertParameters.pageNo = val;
211
        this.expertList();
212
      }
213
    }
214
   };
215
</script>

BIN
src/components/bench-views/img/home_icon_cmplogo.png


BIN
src/components/bench-views/img/index-icon.png


+ 0 - 52
src/components/bench-views/workCommon.styl

@ -1,52 +0,0 @@
1
@import '../../common/stylus/listitem';
2
  .newsmMain
3
    width: 100%
4
    overflow: hidden
5
    padding-bottom:20px
6
    .newsRight
7
      float: right
8
      width: 950px
9
      padding: 0 10px
10
      margin-left: 10px
11
      background: #fff
12
      box-sizing: border-box
13
      min-height: 700px
14
      .listMain
15
        margin-top: 10px
16
        .searchList
17
          margin-top: 20px
18
        .coRed
19
          color: red
20
        .search
21
          width: 100%
22
          .search-wrapper
23
            position: relative
24
            .el-input
25
              width:400px
26
              input
27
                width:400px
28
                height: 40px
29
            button:nth-child(2)
30
              position: absolute
31
              left: 380px
32
            button:last-child
33
              position: absolute
34
              right: 10px
35
      .el-dialog__header
36
        border-1px()
37
      .el-dialog__body
38
          padding: 15px 20px 30px 20px 
39
      .list-item
40
        &:hover
41
          background: #EEEEEE
42
        &:hover .dele
43
          display: block
44
      .dele
45
        display: none
46
        position: absolute
47
        right: 10px
48
      .taglist
49
        display: flex
50
        justify-content: center
51
        align-item: center
52
        margin: 40px 0

+ 0 - 179
src/components/form-views/AccountSettings.vue

@ -1,179 +0,0 @@
1
<template>
2
  <div class="newsmMain">
3
    <div class="newsLeft">
4
      <ul>
5
        <li>工作台</li>
6
        <li class='bg' @click="passxiu">密码修改</li>
7
        <li class='band' @click="mailUp">账号绑定</li>
8
      </ul>
9
    </div>
10
    <div class="newsRight">
11
      <el-tabs >
12
        <el-tab-pane label="当前密码">
13
          <div class="updataPa">
14
            <el-form label-width="100px" class="demo-ruleForm" size="medium" :model="ruleForm2" status-icon :rules="rules2" ref="ruleForm2">
15
              <el-form-item label="当前密码" prop="loginPass">
16
                <el-input type="password" auto-complete="off" v-model="ruleForm2.loginPass"></el-input><span class="forgetPass" @click="forget">忘记密码?</span>
17
              </el-form-item>
18
              <el-form-item label="新密码" prop="pass">
19
                <el-input type="password" v-model="ruleForm2.pass" auto-complete="off"></el-input>
20
              </el-form-item>
21
              <el-form-item label="确认密码" prop="checkPass">
22
                <el-input type="password" v-model="ruleForm2.checkPass" auto-complete="off"></el-input>
23
              </el-form-item>
24
            </el-form>
25
            <el-row>
26
              <el-button type="primary" size="medium" class="save" @click="submitForm('ruleForm2')" :disabled="ruleForm2.diab">保存</el-button>
27
            </el-row>
28
          </div>
29
        </el-tab-pane>
30
      </el-tabs>
31
    </div>
32
  </div>
33
</template>
34

35
<script>
36
  import Cookies from 'js-cookie';
37
  import httpUrl from '@/libs/http';
38
  export default {
39
    data() {
40
      var validatePass = (rule, value, callback) => {
41
        if (this.ruleForm2.pass !== '' && this.ruleForm2.checkPass !== '' && this.ruleForm2.loginPass !== '') {
42
          this.ruleForm2.diab = false;
43
        }
44
        if (value.length < 6) {
45
          callback(new Error('密码由6-24个字符组成,区分大小写'));
46
        } else {
47
          if (this.ruleForm2.checkPass !== '') {
48
            this.$refs.ruleForm2.validateField('checkPass');
49
          }
50
          callback();
51
        }
52
      };
53
      var validatePass3 = (rule, value, callback) => {
54
        if (this.ruleForm2.pass !== '' && this.ruleForm2.checkPass !== '' && this.ruleForm2.loginPass !== '') {
55
          this.ruleForm2.diab = false;
56
        }
57
        if (value.length < 6) {
58
          callback(new Error('密码由6-24个字符组成,区分大小写'));
59
        } else {
60
          if (this.ruleForm2.checkPass !== '') {
61
            this.$refs.ruleForm2.validateField('checkPass');
62
          }
63
          callback();
64
        }
65
      };
66
      var validatePass2 = (rule, value, callback) => {
67
        if (this.ruleForm2.pass !== '' && this.ruleForm2.checkPass !== '' && this.ruleForm2.loginPass !== '') {
68
          this.ruleForm2.diab = false;
69
        }
70
        if (value.length < 6) {
71
          callback(new Error('密码由6-24个字符组成,区分大小写'));
72
        } else if (value !== this.ruleForm2.pass) {
73
          callback(new Error('两次输入不一致,请重新输入'));
74
        } else {
75
          callback();
76
        }
77
      };
78
      return {
79
        ruleForm2: {
80
          pass: '',
81
          checkPass: '',
82
          loginPass: '',
83
          diab: true
84
        },
85
        rules2: {
86
          pass: [
87
            { validator: validatePass, trigger: 'blur' }
88
          ],
89
          checkPass: [
90
            { validator: validatePass2, trigger: 'blur' }
91
          ],
92
          loginPass: [
93
            { validator: validatePass3, trigger: 'blur' }
94
          ]
95
        }
96
      };
97
    },
98
    methods: {
99
      forget() {
100
        this.$router.push({ path: '/findPwd' });
101
      },
102
      passxiu() {
103
        this.$router.push({ path: '/AccountSettings' });
104
      },
105
      mailUp() {
106
        this.$router.push({ path: '/BindAccount' });
107
      },
108
      open() {
109
        this.$confirm('密码修改成功!', '提示', {
110
          confirmButtonText: '确定',
111
          type: 'success',
112
          showCancelButton: false,
113
          center: true
114
        });
115
      },
116
      submitForm(formName) {
117
        this.$refs[formName].validate((valid) => {
118
          if (valid) {
119
            this.$axios.post(httpUrl.hQuery.sign.modifypw, {
120
              id: Cookies.get('plf_user'),
121
              npw: this.ruleForm2.pass,
122
              opw: this.ruleForm2.loginPass
123
            }).then((res) => {
124
              if (res.success) {
125
                if (res.data === 1) {
126
                  this.open();
127
                  this.$refs[formName].resetFields();
128
                } else {
129
                  this.$confirm('密码输入错误,请检查后重试', '提示', {
130
                    confirmButtonText: '确定',
131
                    type: 'error',
132
                    showCancelButton: false,
133
                    center: true
134
                  });
135
                }
136
              }
137
            });
138
          } else {
139
            console.log('error submit!!');
140
            return false;
141
          }
142
        });
143
      }
144
    }
145
  };
146
</script>
147

148
<style lang="stylus" rel="stylesheet/stylus">
149
  @import '../bench-views/workCommon';
150
  @import '../bench-views/Siderbar.styl'
151
  .newsmMain
152
    .updataPa
153
      display: flex
154
      flex-direction: column;
155
      align-items: center
156
      margin-top: 50px
157
      .save
158
        padding: 10px 50px
159
        margin-top: 20px
160
        position: relative
161
        left: 20px
162
      .el-form-item
163
        position: relative
164
        width: 400px
165
        .forgetPass
166
          color: $mainColor
167
          position: absolute
168
          top: 0
169
          right: -80px
170
          cursor: pointer
171
    .newsLeft
172
      .bg
173
        background-color: $mainColor
174
        color: #fff
175
      .band
176
        margin-top: 0px
177
        border-top: none
178

179
</style>

+ 0 - 185
src/components/form-views/BindAccount.vue

@ -1,185 +0,0 @@
1
<template>
2
  <div class="newsmMain">
3
    <div class="newsLeft">
4
      <ul>
5
        <li>工作台</li>
6
        <li  @click="passxiu">密码修改</li>
7
        <li class='band bg' @click="mailUp">账号绑定</li>
8
      </ul>
9
    </div>
10
    <div class="newsRight">
11
      <el-tabs >
12
        <el-tab-pane label="账号绑定">
13
          <div class="updataPa">
14
            <div class="mailTitle">您可以使用以下方式登录账户</div>
15
            <div class="mailUpdata">
16
              <span class="el-icon-message"></span>已绑定邮箱 {{mailUpadate(mail)}}
17
              <el-button type="primary" class="upGeng" @click="dialogFormVisible = true">更换</el-button>
18
            </div>
19
          </div>
20
        </el-tab-pane>
21
      </el-tabs>
22
    </div>
23
    <el-dialog title="提示" :visible.sync="dialogFormVisible" class="diog">
24
      <div class="boxText">验证邮箱,完成账号绑定</div>
25
      <div class="boxBody">
26
        <el-input v-model="emailName" auto-complete="off" @blur="cblur" @focus="titler = ''"></el-input>
27
        <p>{{titler}}</p>
28
      </div>
29
      <div class="foobox">
30
        <el-button type="primary" @click="cblur(1)">发送验证邮件</el-button>
31
      </div>
32
    </el-dialog>
33
    <el-dialog title="提示" :visible.sync="dias" class="diog">
34
      <div class="boxText">验证邮件已发送至:</div>
35
      <ul>
36
        <li class="gren">{{emailName}}</li>
37
        <li>请您在10分钟内登录您的邮箱,接收邮件,</li>
38
        <li>点击链接后即可完成绑定。</li>
39
      </ul>
40
      <div class="foobox">
41
        <el-button type="primary" @click="loginMail">登录邮箱</el-button>
42
      </div>
43
    </el-dialog>
44
  </div>
45
</template>
46

47
<script>
48
  import Cookies from 'js-cookie';
49
  import util from '@/libs/util';
50
  import httpUrl from '@/libs/http';
51
  export default {
52
    data() {
53
      return {
54
        mail: Cookies.get('plf_email'),
55
        platId: Cookies.get('plf_user'),
56
        dialogFormVisible: false,
57
        emailName: '',
58
        titler: '',
59
        dias: false
60
      };
61
    },
62
    methods: {
63
      passxiu() {
64
        this.$router.push({ path: '/AccountSettings' });
65
      },
66
      mailUp() {
67
        this.$router.push({ path: '/BindAccount' });
68
      },
69
      loginMail() {
70
        var url = this.emailName.split('@')[1];
71
        if (util.mailHash[url] === undefined) {
72
          location.href = 'http://mail.' + url;
73
        } else {
74
          location.href = util.mailHash[url];
75
        }
76
      },
77
      cblur(ar) {
78
        if (util.regular(this.emailName.trim(), 'mail')) {
79
          this.$axios.get('/ajax/platform/checkEmail', {
80
            params: {
81
              email: this.emailName
82
            }
83
          }).then((res) => {
84
            if (res.success) {
85
              if (res.data === false) {
86
                  this.titler = '该邮箱已绑定账户,请使用其他邮箱';
87
              } else {
88
                    if (ar === 1) {
89
                      this.dialogFormVisible = false;
90
                      this.$axios.post('/ajax/platform/reqBindMail', {
91
                          id: this.platId,
92
                          mail: this.emailName,
93
                          url: httpUrl.platUrl + '/#/upMail?sc'
94
                      }).then((res) => {
95
                        if (res.success) {
96
                          this.dias = true;
97
                        }
98
                      });
99
                    }
100
              }
101
            }
102
          });
103
        } else {
104
           this.titler = '请输入正确的邮箱地址。';
105
        }
106
      },
107
      mailUpadate(emailset) {
108
        var emailCookieshow;
109
        var emailq = emailset.replace(/@.*/, '');
110
        var emailh = emailset.replace(emailq, '');
111
        if (emailq.length >= 6) {
112
          emailCookieshow = emailq.substring(emailq.length - 4, 0) + '****' + emailh;
113
        }
114
        if (emailq.length === 5) {
115
          emailCookieshow = emailq.substring(emailq.length - 3, 0) + '***' + emailh;
116
        }
117
        if (emailq.length === 4) {
118
          emailCookieshow = emailq.substring(emailq.length - 2, 0) + '**' + emailh;
119
        }
120
        if (emailq.length === 3) {
121
          emailCookieshow = emailq.substring(emailq.length - 1, 0) + '*' + emailh;
122
        }
123
        if (emailq.length < 3) {
124
          emailCookieshow = emailq + emailh;
125
        }
126
        return emailCookieshow;
127
      }
128
    }
129
  };
130
</script>
131

132
<style lang="stylus" rel="stylesheet/stylus">
133
  @import '../bench-views/workCommon';
134
  @import '../bench-views/Siderbar.styl';
135
  .newsmMain
136
    .updataPa
137
      display: flex
138
      flex-direction: column;
139
      align-items: center
140
      margin-top: 50px
141
      .mailTitle
142
        color: $secondaryFont
143
      .mailUpdata
144
        margin-top: 50px
145
        color: $commonFont
146
        .el-icon-message
147
          padding: 3px
148
          border-radius: 50%
149
          border:1px solid $mainColor
150
          color: $mainColor
151
          margin-right: 30px
152
        .upGeng
153
          margin-left: 50px
154
          padding: 12px 40px
155
    .newsLeft
156
      .bg
157
        background-color: $mainColor
158
        color: #fff
159
      .band
160
        margin-top: 0px
161
        border-top: none
162
    .diog
163
      .el-dialog
164
        width: 410px
165
        .boxText
166
          text-align: center
167
          margin-bottom: 10px
168
          margin-top: 15px
169
        ul
170
          text-align: center
171
          .gren
172
            color: green
173
            margin: 10px 0 20px 0;
174
        .boxBody
175
          text-align: center
176
          .el-input
177
            width: 300px
178
          p
179
            color: red
180
      .foobox
181
        text-align: center
182
        margin-top: 30px
183
        .el-button
184
          width: 200px
185
</style>

+ 0 - 323
src/components/form-views/DemandIssue.vue

@ -1,323 +0,0 @@
1
<template>
2
  <div class="demandIssue content-wrapper">
3
    <el-form :model="ruleFormDem" :rules="rules" ref="ruleFormDem" class="form-main">
4
      <el-form-item label="需求主题" prop="demandTit">
5
        <el-input v-model="ruleFormDem.demandTit" placeholder="请用一句话概括您的需求"></el-input>
6
      </el-form-item>
7
      <el-form-item label="需求内容" prop="demandDesc">
8
        <el-input type="textarea" :rows="4" v-model="ruleFormDem.demandDesc" placeholder="请描述您的需求背景、具体问题、对专家的要求等等"></el-input>
9
      </el-form-item>
10
      <el-col :span="12">
11
        <CityPick ref="cityPick" :widthselect="148" :prov="ruleFormDem.province" :city="ruleFormDem.city" v-on:selectProv="getSelectProv($event)" v-on:selectCity="getSelectCity($event)"></CityPick>
12
        <!-- <el-form-item label="所在城市" prop="citys">
13
          <el-cascader
14
            :options="optionsCity"
15
            v-model="ruleFormDem.citys"
16
            class="shortW"
17
            placeholder="请选择所在的城市">
18
          </el-cascader>
19
        </el-form-item> -->
20
      </el-col>
21
      <el-col :span="12">
22
        <el-form-item label="需求有效期" prop="lastDate">
23
          <el-date-picker
24
            v-model="ruleFormDem.lastDate"
25
            type="date" class="shortW"
26
            format="yyyy-MM-dd"
27
            placeholder="请选择截止日期"
28
            :picker-options="pickerOptions0">
29
          </el-date-picker>
30
        </el-form-item>
31
      </el-col>
32
      <el-col :span="12">
33
        <el-form-item label="预计合作周期" prop="longTime">
34
          <el-select v-model="selectLongTime" placeholder="请选择预计合作周期" class="shortW">
35
            <el-option
36
              v-for="item in longTime"
37
              :key="item.value"
38
              :label="item.label"
39
              :value="item.value"
40
              @current-change="item.value">
41
            </el-option>
42
          </el-select>
43
        </el-form-item>
44
      </el-col>
45
      <el-col :span="12">
46
        <el-form-item label="费用预算" prop="costRange">
47
          <el-select v-model="selectCostRange" placeholder="请选择预算范围" class="shortW">
48
            <el-option
49
              v-for="item in costRange"
50
              :key="item.value"
51
              :label="item.label"
52
              :value="item.value">
53
            </el-option>
54
          </el-select>
55
        </el-form-item>
56
      </el-col>
57
      <el-col :span="24"><div class="form-line"></div></el-col>
58
      <el-col :span="12">
59
        <el-form-item label="联系人" prop="linkman">
60
          <el-input v-model="ruleFormDem.linkman" placeholder="请填写您的姓名" class="shortW"></el-input>
61
        </el-form-item>
62
      </el-col>
63
      <el-col :span="12">
64
        <el-form-item label="您所在的企业名称" prop="orgName">
65
          <el-input v-model="ruleFormDem.orgName" placeholder="建议填写与营业执照一致的企业名称" class="shortW"></el-input>
66
        </el-form-item>
67
      </el-col>
68
      <el-col :span="12">
69
        <el-form-item label="联系电话" prop="linkTel">
70
          <el-input v-model="ruleFormDem.linkTel" placeholder="请输入您的手机号码,可用于登录科袖网" class="shortW"></el-input>
71
        </el-form-item>
72
      </el-col>
73
      <el-col :span="12">
74
        <el-form-item label="图形验证码" prop="imgVerifyCode">
75
          <el-input v-model="ruleFormDem.imgVerifyCode" placeholder="请输入图形验证码" class="shortW code-btn">
76
          <img slot="append" :src="imgVcUrl" @click="changeImgVc" /></el-input>
77
        </el-form-item>
78
      </el-col>
79
      <el-col :span="12">
80
        <el-form-item label="短信验证码" prop="msgVerifyCode">
81
          <el-input v-model="ruleFormDem.msgVerifyCode" placeholder="请输入短信验证码" class="shortW">
82
            <el-button slot="append" :disabled="phoneCodeBol" @click="getPhoneCode">
83
              <span v-if="sendMsgDisabled">{{seconds + '秒后获取'}}</span>
84
              <span v-if="!sendMsgDisabled">获取验证码</span>
85
            </el-button>
86
          </el-input>
87
        </el-form-item>
88
      </el-col>
89
      <el-col :span="24" ><el-form-item style="height:20px"></el-form-item></el-col>
90
      <el-col :span="24" >
91
        <el-form-item style="text-align:center">
92
          <el-button type="primary" @click="submitForm('ruleFormDem')" style="padding: 12px 50px">立即发布</el-button><br/>
93
          <el-checkbox checked disabled>我已阅读并同意<a :href="kexiuLink + '/privacy.html'" target="_blank">《科袖用户协议》</a></el-checkbox>
94
        </el-form-item>
95
      </el-col>
96
    </el-form>
97
  </div>
98
</template>
99
100
<script type="text/ecmascript-6">
101
  // import {
102
  //   provinceAndCityData,
103
  //   CodeToText
104
  // } from 'element-china-area-data'; // TextToCode
105
106
  import Cookies from 'js-cookie';
107
  import httpUrl from '@/libs/http';
108
  import util from '@/libs/util';
109
110
  var validPhone = (rule, value, callback) => {
111
    const reg = /^1[3|4|5|7|8][0-9]\d{8}$/;
112
    if (!value) {
113
      callback(new Error('请输入你的手机号码'));
114
    } else if (!reg.test(value)) {
115
      callback(new Error('请输入正确的手机号码'));
116
    } else {
117
      callback();
118
    };
119
  };
120
121
  export default {
122
    data() {
123
      return {
124
        pickerOptions0: {
125
          disabledDate(time) {
126
            return time.getTime() < Date.now();
127
          }
128
        },
129
        kexiuLink: util.ekexiuUrl,
130
        platSource: '',
131
        phoneCodeBol: false,
132
        sendMsgDisabled: false,
133
        seconds: 60,
134
        phoneResBack: '',
135
        imgVcUrl: httpUrl.kxQurey.sign.imgVC,
136
        // optionsCity: provinceAndCityData,
137
        selectCostRange: '',
138
        selectLongTime: '',
139
        longTime: util.Dictionary.durationTime,
140
        costRange: util.Dictionary.costRange,
141
        ruleFormDem: {
142
          demandTit: '',
143
          demandDesc: '',
144
          province: '',
145
          city: '',
146
          lastDate: '',
147
          linkman: '',
148
          orgName: '',
149
          linkTel: '',
150
          imgVerifyCode: '',
151
          msgVerifyCode: ''
152
        },
153
        rules: {
154
          demandTit: [
155
            { required: true, message: '请填写需求主题', trigger: 'blur' }
156
          ],
157
          demandDesc: [
158
            { required: true, message: '请填写需求内容', trigger: 'blur' },
159
            { max: 1000, message: '不得超过1000个字', trigger: 'blur' }
160
          ],
161
          province: [
162
            { required: true, message: '请填写所在省', trigger: 'blur' }
163
          ],
164
          city: [
165
            { required: true, message: '请填写所在城市', trigger: 'blur' }
166
          ],
167
          lastDate: [
168
            { required: true, message: '请选择截止日期', trigger: 'blur' }
169
          ],
170
          linkman: [
171
            { required: true, message: '请填写您的姓名', trigger: 'blur' },
172
            { max: 10, message: '不得超过10个字', trigger: 'blur' }
173
          ],
174
          orgName: [
175
            { required: true, message: '请填写您所在的企业名称', trigger: 'blur' },
176
            { max: 50, message: '不得超过50个字', trigger: 'blur' }
177
          ],
178
          linkTel: [
179
            { required: true, validator: validPhone, trigger: 'blur' }
180
          ],
181
          imgVerifyCode: [
182
            { required: true, message: '请输入图形验证码', trigger: 'blur' }
183
          ],
184
          msgVerifyCode: [
185
            { required: true, message: '请输入短信验证码', trigger: 'blur' }
186
          ]
187
        }
188
      };
189
    },
190
    created() {
191
      this.platSource = Cookies.get('platSource');
192
    },
193
    methods: {
194
      getSelectProv(prov) {
195
        this.ruleFormDem.province = prov;
196
      },
197
      getSelectCity(city) {
198
        this.ruleFormDem.city = city;
199
      },
200
      getPhoneCode() {
201
        if (this.ruleFormDem.linkTel && this.ruleFormDem.imgVerifyCode) {
202
          this.$axios.get(httpUrl.kxQurey.sign.msgVC, {
203
            params: {
204
              phone: this.ruleFormDem.linkTel,
205
              vcode: this.ruleFormDem.imgVerifyCode
206
            }
207
          }).then((res) => {
208
            if (res.success) {
209
              console.log(res);
210
              this.phoneResBack = res.data;
211
              this.clickMsgVc();
212
            } else {
213
              if (res.code === 20001) {
214
                this.$message.error('图形验证码错误');
215
                this.changeImgVc();
216
              };
217
            };
218
          });
219
        } else {
220
          this.$message({
221
            message: '请输入手机号和图形验证码',
222
            type: 'warning'
223
          });
224
        }
225
      },
226
      clickMsgVc() {
227
        let me = this;
228
        me.sendMsgDisabled = true;
229
        me.phoneCodeBol = true;
230
        let interval = window.setInterval(function() {
231
         if ((me.seconds--) <= 0) {
232
          me.seconds = 60;
233
          me.sendMsgDisabled = false;
234
          me.phoneCodeBol = false;
235
          window.clearInterval(interval);
236
         }
237
        }, 1000);
238
      },
239
      changeImgVc() {
240
        this.imgVcUrl = httpUrl.kxQurey.sign.imgVC + '?' + new Date().getTime();
241
      },
242
      resetForm(formName) {
243
        this.$refs.cityPick.resetProvCity();
244
        this.selectCostRange = '';
245
        this.selectLongTime = '';
246
        this.$refs[formName].resetFields();
247
      },
248
      submitForm(formName) {
249
        this.$refs[formName].validate((valid) => {
250
          if (valid) {
251
            let paramsData = {
252
              'title': this.ruleFormDem.demandTit,
253
              'descp': this.ruleFormDem.demandDesc,
254
              'province': this.ruleFormDem.province,
255
              'city': this.ruleFormDem.city,
256
              'invalidDay': util.dateFormatter(this.ruleFormDem.lastDate, false, true),
257
              'cost': this.selectCostRange,
258
              'duration': this.selectLongTime,
259
              'name': this.ruleFormDem.linkman,
260
              'orgName': this.ruleFormDem.orgName,
261
              'contactNum': this.ruleFormDem.linkTel,
262
              'vc': this.ruleFormDem.msgVerifyCode,
263
              'state': this.phoneResBack,
264
              'source': this.platSource
265
            };
266
            console.log(paramsData);
267
            this.$axios.post(httpUrl.hQuery.demand.add, paramsData).then((res) => {
268
              if (res.success) {
269
                this.$alert('我们已收到您的需求,马上为您对接合适的专家和专业机构,您可以登录科袖网与对方做进一步沟通。', '需求发布成功!', {
270
                  confirmButtonText: '进入科袖网,发现更多服务和资源',
271
                  type: 'success',
272
                  center: true,
273
                  cancelButtonText: '取消',
274
                  callback: action => {
275
                    if (action === 'confirm') {
276
                      window.open(util.ekexiuUrl, '科袖网首页');
277
                    };
278
                  }
279
                });
280
                this.resetForm(formName);
281
                this.$emit('dialogChanged', false);
282
              } else {
283
                this.$message({
284
                  message: '需求发布失败,请重新发布!',
285
                  type: 'warning'
286
                });
287
              };
288
              console.log(res);
289
            }).catch(error => {
290
              console.log(error);
291
            });
292
          } else {
293
            console.log('error submit!!');
294
            return false;
295
          }
296
        });
297
      }
298
    }
299
  };
300
</script>
301
302
<style lang="stylus" rel="stylesheet/stylus">
303
.demandIssue
304
  padding-top:10px
305
  .form-main
306
    width:100%
307
    .form-line
308
      border-top:1px dashed #ccc
309
      margin-bottom:20px
310
  .shortW
311
    width:300px
312
  .code-btn
313
    .el-input-group__append
314
      padding:0
315
      overflow:hidden
316
      img
317
        width:100px
318
        height:38px
319
        cursor: pointer
320
  .el-checkbox__label
321
    a
322
      color:#c0c4cc
323
</style>

+ 0 - 355
src/components/form-views/DemandIssueLogin.vue

@ -1,355 +0,0 @@
1
<template>
2
  <div class="demandIssue content-wrapper">
3
    <div class="login-box content-wrapper" v-show="ifLogin">
4
      <el-form :model="ruleLogin" :rules="ruleLogins" ref="ruleLogin" class="demo-ruleForm">
5
        <el-form-item prop="phoneNum">
6
          <el-input v-model="ruleLogin.phoneNum" placeholder="请输入您的手机号码"></el-input>
7
        </el-form-item>
8
        <el-form-item prop="msgVC">
9
          <el-input v-model="ruleLogin.msgVC" placeholder="请输入短信验证码">
10
            <el-button slot="append" :disabled="phoneCodeBol" @click="clickMsgVcLogin">
11
              <span v-if="sendMsgDisabled">{{seconds + '秒后获取'}}</span>
12
              <span v-if="!sendMsgDisabled">获取验证码</span>
13
            </el-button>
14
         </el-input>
15
        </el-form-item>
16
        <el-form-item></el-form-item>
17
        <el-form-item>
18
          <el-button style="width:100%" type="primary" @click="loginKexiu('ruleLogin')">登录</el-button>
19
        </el-form-item>
20
      </el-form>
21
    </div>
22
    <el-form v-show="!ifLogin" :model="ruleFormDem" :rules="rules" ref="ruleFormDem" class="form-main">
23
      <el-form-item label="需求主题" prop="demandTit">
24
        <el-input v-model="ruleFormDem.demandTit" placeholder="请用一句话概括您的需求"></el-input>
25
      </el-form-item>
26
      <el-form-item label="需求内容" prop="demandDesc">
27
        <el-input type="textarea" :rows="4" v-model="ruleFormDem.demandDesc" placeholder="请描述您的需求背景、具体问题、对专家的要求等等"></el-input>
28
      </el-form-item>
29
      <el-col :span="12">
30
        <CityPick ref="cityPick" :widthselect="148" :prov="ruleFormDem.province" :city="ruleFormDem.city" v-on:selectProv="getSelectProv($event)" v-on:selectCity="getSelectCity($event)"></CityPick>
31
      </el-col>
32
      <el-col :span="12">
33
        <el-form-item label="需求有效期" prop="lastDate">
34
          <el-date-picker
35
            v-model="ruleFormDem.lastDate"
36
            type="date" class="shortW"
37
            format="yyyy-MM-dd"
38
            placeholder="请选择截止日期"
39
            :picker-options="pickerOptions0">
40
          </el-date-picker>
41
        </el-form-item>
42
      </el-col>
43
      <el-col :span="12">
44
        <el-form-item label="预计合作周期" prop="longTime">
45
          <el-select v-model="selectLongTime" placeholder="请选择预计合作周期" class="shortW">
46
            <el-option
47
              v-for="item in longTime"
48
              :key="item.value"
49
              :label="item.label"
50
              :value="item.value"
51
              @current-change="item.value">
52
            </el-option>
53
          </el-select>
54
        </el-form-item>
55
      </el-col>
56
      <el-col :span="12">
57
        <el-form-item label="费用预算" prop="costRange">
58
          <el-select v-model="selectCostRange" placeholder="请选择预算范围" class="shortW">
59
            <el-option
60
              v-for="item in costRange"
61
              :key="item.value"
62
              :label="item.label"
63
              :value="item.value">
64
            </el-option>
65
          </el-select>
66
        </el-form-item>
67
      </el-col>
68
      <el-col :span="24"><div class="form-line"></div></el-col>
69
      <el-col :span="24">
70
        <div class="link-man">联系人 <span>{{ruleFormDem.linkman}}</span></div>
71
      </el-col>
72
      <el-col :span="12">
73
        <el-form-item label="您所在的企业名称" prop="orgName">
74
          <el-input v-model="ruleFormDem.orgName" placeholder="建议填写与营业执照一致的企业名称" class="shortW"></el-input>
75
        </el-form-item>
76
      </el-col>
77
      <el-col :span="12">
78
        <el-form-item label="联系电话" prop="linkTel">
79
          <el-input v-model="ruleFormDem.linkTel" placeholder="请输入您的手机号码,可用于登录科袖网" class="shortW"></el-input>
80
        </el-form-item>
81
      </el-col>
82
      <el-col :span="24" ><el-form-item style="height:20px"></el-form-item></el-col>
83
      <el-col :span="24" >
84
        <el-form-item style="text-align:center">
85
          <el-button type="primary" @click="submitForm('ruleFormDem')" style="padding: 12px 50px">立即发布</el-button><br/>
86
          <el-checkbox checked disabled>我已阅读并同意<a :href="kexiuLink + '/privacy.html'" target="_blank">《科袖用户协议》</a></el-checkbox>
87
        </el-form-item>
88
      </el-col>
89
    </el-form>
90
  </div>
91
</template>
92

93
<script type="text/ecmascript-6">
94

95
  import Cookies from 'js-cookie';
96
  import httpUrl from '@/libs/http';
97
  import util from '@/libs/util';
98

99
  var validPhone = (rule, value, callback) => {
100
    const reg = /^1[3|4|5|7|8][0-9]\d{8}$/;
101
    if (!value) {
102
      callback(new Error('请输入你的手机号码'));
103
    } else if (!reg.test(value)) {
104
      callback(new Error('请输入正确的手机号码'));
105
    } else {
106
      callback();
107
    };
108
  };
109

110
  export default {
111
    data() {
112
      return {
113
        pickerOptions0: {
114
          disabledDate(time) {
115
            return time.getTime() < Date.now();
116
          }
117
        },
118
        ifLogin: true,
119
        kxUserId: '',
120
        phoneResBackLogin: '',
121
        phoneCodeBol: false,
122
        sendMsgDisabled: false,
123
        seconds: 60,
124
        kexiuLink: util.ekexiuUrl,
125
        platSource: '',
126
        imgVcUrl: httpUrl.kxQurey.sign.imgVC,
127
        selectCostRange: '',
128
        selectLongTime: '',
129
        longTime: util.Dictionary.durationTime,
130
        costRange: util.Dictionary.costRange,
131
        ruleLogin: {
132
          phoneNum: '',
133
          msgVC: ''
134
        },
135
        ruleLogins: {
136
          phoneNum: [
137
            { required: true, validator: validPhone, trigger: 'blur' }
138
          ],
139
          msgVC: [
140
            { required: true, message: '请输入短信验证码', trigger: 'blur' }
141
          ]
142
        },
143
        ruleFormDem: {
144
          demandTit: '',
145
          demandDesc: '',
146
          lastDate: '',
147
          linkman: '',
148
          orgName: '',
149
          linkTel: '',
150
          province: '',
151
          city: ''
152
        },
153
        rules: {
154
          demandTit: [
155
            { required: true, message: '请填写需求主题', trigger: 'blur' }
156
          ],
157
          demandDesc: [
158
            { required: true, message: '请填写需求内容', trigger: 'blur' },
159
            { max: 1000, message: '不得超过1000个字', trigger: 'blur' }
160
          ],
161
          province: [
162
            { required: true, message: '请填写所在省', trigger: 'blur' }
163
          ],
164
          city: [
165
            { required: true, message: '请填写所在城市', trigger: 'blur' }
166
          ],
167
          lastDate: [
168
            { required: true, message: '请选择截止日期', trigger: 'blur' }
169
          ],
170
          linkman: [
171
            { required: true, message: '请填写您的姓名', trigger: 'blur' },
172
            { max: 10, message: '不得超过10个字', trigger: 'blur' }
173
          ],
174
          orgName: [
175
            { required: true, message: '请填写您所在的企业名称', trigger: 'blur' },
176
            { max: 50, message: '不得超过50个字', trigger: 'blur' }
177
          ],
178
          linkTel: [
179
            { required: true, validator: validPhone, trigger: 'blur' }
180
          ]
181
        }
182
      };
183
    },
184
    created() {
185
      this.platSource = Cookies.get('platSource');
186
    },
187
    methods: {
188
      getSelectProv(prov) {
189
        this.ruleFormDem.province = prov;
190
      },
191
      getSelectCity(city) {
192
        this.ruleFormDem.city = city;
193
      },
194
      // 短信验证登录科袖
195
      loginKexiu(formName) {
196
        this.$refs[formName].validate((valid) => {
197
          if (valid) {
198
            let paramsData = {
199
              'mobilePhone': this.ruleLogin.phoneNum,
200
              'validateCode': this.ruleLogin.msgVC,
201
              'state': this.phoneResBackLogin
202
            };
203
            this.$axios.post(httpUrl.kxQurey.sign.msgLogin, paramsData).then((res) => {
204
              if (res.success) {
205
                this.kxUserId = res.data.id; // 获取登录用户id
206
                this.ruleFormDem.linkTel = res.data.mobilePhone;
207
                this.getUserInfo(res.data.id);
208
                this.$alert('成功登录科袖网', '提示', {
209
                  confirmButtonText: '确定',
210
                  type: 'success',
211
                  center: true,
212
                  callback: action => {
213
                    this.ifLogin = false;
214
                    this.$refs[formName].resetFields();
215
                  }
216
                });
217
              };
218
            });
219
          }
220
        });
221
      },
222
      userRegisterOk() {
223
        this.$axios.get(httpUrl.kxQurey.sign.isReg + '?key=' + this.ruleLogin.phoneNum, {
224
        }).then((res) => {
225
          if (res.success) {
226
            if (res.data === true) {
227
              this.$message({
228
                message: '该账号不存在,请检查后重试',
229
                type: 'warning'
230
              });
231
            };
232
            console.log(res);
233
          };
234
        });
235
      },
236
      getPhoneLogin() {
237
        this.$axios.get(httpUrl.kxQurey.sign.msgLoginVc, {
238
          params: {
239
            mobilePhone: this.ruleLogin.phoneNum
240
          }
241
        }).then((res) => {
242
          if (res.success) {
243
            console.log(res);
244
            this.phoneResBackLogin = res.data;
245
          };
246
        });
247
      },
248
      clickMsgVcLogin() {
249
        const reg = /^1[3|4|5|7|8][0-9]\d{8}$/;
250
        if (!this.ruleLogin.phoneNum) {
251
          this.$message({
252
            message: '请输入你的手机号码',
253
            type: 'warning'
254
          });
255
        } else if (!reg.test(this.ruleLogin.phoneNum)) {
256
          this.$message({
257
            message: '请输入正确的手机号码',
258
            type: 'warning'
259
          });
260
        } else {
261
          this.userRegisterOk();
262
          let me = this;
263
          me.sendMsgDisabled = true;
264
          me.phoneCodeBol = true;
265
          let interval = window.setInterval(function() {
266
           if ((me.seconds--) <= 0) {
267
            me.seconds = 60;
268
            me.sendMsgDisabled = false;
269
            me.phoneCodeBol = false;
270
            window.clearInterval(interval);
271
           }
272
          }, 1000);
273
          this.getPhoneLogin();
274
        };
275
      },
276
      // 短信验证登录科袖
277
      // 获取科袖账户信息
278
      getUserInfo(id) {
279
        this.$axios.get(httpUrl.kxQurey.professor.query + id, {
280

281
        }).then((res) => {
282
          if (res.success) {
283
            let $info = res.data;
284
            this.ruleFormDem.linkman = $info.name;
285
            this.ruleFormDem.orgName = $info.orgName;
286
          }
287
        });
288
      },
289
      // 获取科袖账户信息
290

291
      // 发布需求
292
      resetForm(formName) {
293
        this.$refs.cityPick.resetProvCity();
294
        this.selectCostRange = '';
295
        this.selectLongTime = '';
296
        this.ifLogin = true;
297
        this.$refs[formName].resetFields();
298
      },
299
      submitForm(formName) {
300
        this.$refs[formName].validate((valid) => {
301
          if (valid) {
302
            let paramsData = {
303
              'title': this.ruleFormDem.demandTit,
304
              'descp': this.ruleFormDem.demandDesc,
305
              'province': this.ruleFormDem.province,
306
              'city': this.ruleFormDem.city,
307
              'invalidDay': util.dateFormatter(this.ruleFormDem.lastDate, false, true),
308
              'cost': this.selectCostRange,
309
              'duration': this.selectLongTime,
310
              'orgName': this.ruleFormDem.orgName,
311
              'contactNum': this.ruleFormDem.linkTel,
312
              'creator': this.kxUserId,
313
              'source': this.platSource
314
            };
315
            this.$axios.post(httpUrl.kxQurey.demand.add, paramsData).then((res) => {
316
              if (res.success) {
317
                this.$alert('我们已收到您的需求,马上为您对接合适的专家和专业机构,您可以登录科袖网与对方做进一步沟通。', '需求发布成功!', {
318
                  confirmButtonText: '进入科袖网,发现更多服务和资源',
319
                  type: 'success',
320
                  center: true,
321
                  cancelButtonText: '取消',
322
                  callback: action => {
323
                    if (action === 'confirm') {
324
                      window.open(util.ekexiuUrl, '科袖网首页');
325
                    };
326
                  }
327
                });
328
                this.resetForm(formName);
329
                this.$emit('dialogChangedLogin', false);
330
              } else {
331
                this.$message({
332
                  message: '需求发布失败,请重新发布!',
333
                  type: 'warning'
334
                });
335
              };
336
              console.log(res);
337
            });
338
          } else {
339
            console.log('error submit!!');
340
            return false;
341
          }
342
        });
343
      }
344
    }
345
    // 发布需求
346
  };
347
</script>
348

349
<style lang="stylus" rel="stylesheet/stylus">
350
.demandIssue
351
  .link-man
352
    margin-bottom:10px
353
    span
354
      margin-left:15px
355
</style>

+ 0 - 341
src/components/form-views/UpdateInfo.vue

@ -1,341 +0,0 @@
1
<template>
2
  <div class="updateInfo">
3
    <div class="content-wrapper block-wrapper">
4
      <el-form :model="ruleFormUpdate" :rules="rules" ref="ruleFormUpdate" label-width="80px" class="update-wrapper demo-ruleForm">
5
        <div class="update-logo">
6
          <el-upload
7
            class="avatar-uploader"
8
            :action="uploadUrl"
9
            :show-file-list="false"
10
            ref="uploadLogo"
11
            :on-success="handleAvatarSuccess"
12
            :before-upload="beforeAvatarUpload">
13
            <img v-if="imageUrl" :src="imageUrl" class="avatar">
14
            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
15
          </el-upload>
16
          <div class="update-tip">PNG/JPG/JPEG格式<br>大小2M以内</div>
17
        </div>
18
        <div class="update-main">
19
          <div class="update-title">{{plf_name}}</div>
20
          <el-form-item label="联系人" prop="linkman">
21
            <el-input v-model="ruleFormUpdate.linkman" class="shortW" placeholder="请填写平台联系人姓名"></el-input>
22
          </el-form-item>
23
          <el-form-item label="联系电话" prop="tel">
24
            <el-input v-model="ruleFormUpdate.tel" placeholder="请填写联系电话"></el-input>
25
          </el-form-item>
26
          <el-form-item label="联系邮箱" prop="mail">
27
            <el-input v-model="ruleFormUpdate.mail" placeholder="请填写联系邮箱"></el-input>
28
          </el-form-item>
29
          <CityPick
30
            :labelW="80"
31
            :widthselect="200"
32
            :prov="province"
33
            :city="city"
34
            v-on:selectProv="getSelectProv($event)"
35
            v-on:selectCity="getSelectCity($event)">
36
          </CityPick>
37
          <!-- <el-form-item label="所在城市" prop="selectedOptions">
38
            <el-cascader
39
              :options="optionsCity"
40
              v-model="selectedOptions"
41
              class="shortW"
42
              placeholder="请选择所在的城市">
43
            </el-cascader>
44
          </el-form-item> -->
45
          <el-form-item label="联系地址" prop="address">
46
            <el-input v-model="ruleFormUpdate.address" placeholder="如:北京市海淀区学院路方兴大厦"></el-input>
47
          </el-form-item>
48
          <el-form-item label="官方网址" prop="website">
49
            <el-input v-model="ruleFormUpdate.website" placeholder="如:www.ekexiu.com"></el-input>
50
          </el-form-item>
51
          <dynamicTags :tagInfo="tagInfo" :dyStr="ruleFormUpdate.industry" v-on:turnTags="turnTags($event)" :dynamicTagsLength="10"></dynamicTags>
52
          <el-form-item label="平台介绍" prop="desc">
53
            <el-input type="textarea" :rows="8" v-model="ruleFormUpdate.desc" placeholder="请填写一个简单的介绍,让大家更好地了解平台"></el-input>
54
          </el-form-item>
55
          <el-form-item></el-form-item>
56
          <el-form-item>
57
            <el-button type="primary" @click="submitForm('ruleFormUpdate')">保存</el-button>
58
            <el-button @click="resetForm">取消</el-button>
59
          </el-form-item>
60
        </div>
61
      </el-form>
62
    </div>
63
  </div>
64
</template>
65
66
<script type="text/ecmascript-6">
67
  // import Vue from 'vue';
68
  // import {
69
  //   provinceAndCityData,
70
  //   CodeToText,
71
  //   TextToCode
72
  // } from 'element-china-area-data';
73
74
  import Cookies from 'js-cookie';
75
  import util from '@/libs/util';
76
  import httpUrl from '@/libs/http';
77
78
  import dynamicTags from '../sub-component/DynamicTags';
79
80
  export default {
81
    inject: ['reload'],
82
    props: {
83
      plat: {
84
        type: Object
85
      }
86
    },
87
    data() {
88
      return {
89
        tagInfo: {
90
          lableTit: '面向行业',
91
          placeholder: '请填写园区面向的行业,如:互联网/智能制造/新材料'
92
        },
93
        plf_user: '',
94
        plf_name: '',
95
        imageUrl: '', // 临时地址
96
        imgName: '', // 图片的name
97
        uploadUrl: httpUrl.hQuery.baseInfo.upload,
98
        // optionsCity: provinceAndCityData,
99
        // selectedOptions: [],
100
        dynamicTags: [],
101
        isShowAdd: true,
102
        inputVisible: false,
103
        inputValue: '',
104
        province: '',
105
        city: '',
106
        ruleFormUpdate: {
107
          linkman: '',
108
          tel: '',
109
          mail: '',
110
          address: '',
111
          website: '',
112
          industry: '',
113
          desc: ''
114
        },
115
        rules: {
116
          linkman: [
117
            { required: true, message: '请填写平台联系人姓名', trigger: 'blur' },
118
            { max: 10, message: '不得超过10个字', trigger: 'blur' }
119
          ],
120
          tel: [
121
            { required: true, message: '请填写联系电话', trigger: 'blur' },
122
            { max: 50, message: '不得超过50个字', trigger: 'blur' }
123
          ],
124
          mail: [
125
            { required: true, message: '请填写联系邮箱', trigger: 'blur' },
126
            { type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur' },
127
            { max: 50, message: '不得超过50个字', trigger: 'blur' }
128
          ],
129
          desc: [
130
            { required: true, message: '请填写平台介绍', trigger: 'blur' },
131
            { max: 1000, message: '不得超过1000个字', trigger: 'blur' }
132
          ],
133
          address: [
134
            { max: 50, message: '不得超过50个字', trigger: 'blur' }
135
          ],
136
          website: [
137
            { max: 50, message: '不得超过50个字', trigger: 'blur' }
138
          ]
139
        }
140
      };
141
    },
142
    computed: {
143
    },
144
    created() {
145
      this.plf_user = Cookies.get('plf_user');
146
      this.getPlatInfo(this.plf_user);
147
    },
148
    methods: {
149
      turnTags(msg) {
150
        this.ruleFormUpdate.industry = msg;
151
      },
152
      getSelectProv(prov) {
153
        this.province = prov;
154
      },
155
      getSelectCity(city) {
156
        this.city = city;
157
      },
158
      getPlatInfo(id) {
159
        this.$axios.get(httpUrl.hQuery.baseInfo.query, {
160
          params: {
161
            id: id
162
          }
163
        }).then((res) => {
164
          console.log(res);
165
          let str = res.data;
166
          this.plf_name = str.name;
167
          this.imageUrl = str.logo ? util.ImageUrl('platform' + str.logo) : util.defaultSet.img.plat;
168
          this.imgName = str.logo;
169
          this.ruleFormUpdate.linkman = str.linkman;
170
          this.ruleFormUpdate.tel = str.linkphone;
171
          this.ruleFormUpdate.mail = str.linkemail;
172
          if (str.province) {
173
            this.province = str.province;
174
          }
175
          if (str.city) {
176
            this.city = str.city;
177
          }
178
          this.ruleFormUpdate.address = str.addr;
179
          this.ruleFormUpdate.website = str.url;
180
          if (str.industry) {
181
            this.ruleFormUpdate.industry = str.industry;
182
            this.dynamicTags = str.industry.split(',');
183
            if (this.dynamicTags.length === 10) {
184
              this.isShowAdd = false;
185
            }
186
          }
187
          this.ruleFormUpdate.desc = str.descp;
188
        });
189
      },
190
      submitForm(formName) {
191
        this.$refs[formName].validate((valid) => {
192
          if (valid) {
193
            this.$refs.uploadLogo.submit(); // 确认上传图片
194
            if (this.province) {
195
              if (!this.city) {
196
                this.$alert('请您选择所在城市', '提示', {
197
                  confirmButtonText: '确定',
198
                  type: 'warning',
199
                  center: true
200
                });
201
                return;
202
              }
203
            }
204
            let paramsData = {
205
              'id': this.plf_user,
206
              'name': this.plf_name,
207
              'linkman': this.ruleFormUpdate.linkman,
208
              'logo': this.imgName,
209
              'linkphone': this.ruleFormUpdate.tel,
210
              'linkemail': this.ruleFormUpdate.mail,
211
              'province': this.province,
212
              'city': this.city,
213
              'addr': this.ruleFormUpdate.address,
214
              'url': this.ruleFormUpdate.website,
215
              'industry': this.ruleFormUpdate.industry,
216
              'descp': this.ruleFormUpdate.desc
217
            };
218
            this.$axios.post(httpUrl.hQuery.baseInfo.update, paramsData).then((res) => {
219
              this.$message({
220
                message: '平台信息修改成功!',
221
                type: 'success'
222
              });
223
              Cookies.set('plf_logo', this.imgName);
224
              this.$router.push({path: '/WorkHome'});
225
              this.reload();
226
            }).catch(error => {
227
              console.log(error);
228
            });
229
          } else {
230
            console.log('error submit!!');
231
            return false;
232
          }
233
        });
234
      },
235
      resetForm(formName) {
236
        this.$router.push({path: '/WorkHome'});
237
      },
238
      // upload img
239
      handleAvatarSuccess(res, file) {
240
        this.imageUrl = URL.createObjectURL(file.raw);
241
        this.imgName = res.data[0].uri;
242
      },
243
      beforeAvatarUpload(file) {
244
        const isJPG = file.type === 'image/jpeg';
245
        const isPNG = file.type === 'image/png';
246
        const isLt2M = file.size / 1024 / 1024 < 2;
247
        if (!isJPG && !isPNG) {
248
          this.$message.error('请上传PNG/JPG/JPEG格式的图片');
249
        }
250
        if (!isLt2M) {
251
          this.$message.error('上传logo大小不能超过 2MB!');
252
        }
253
        return (!isJPG || !isPNG) && isLt2M;
254
      },
255
      // upload img
256
      // add tag
257
      handleClose(tag) {
258
        this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
259
        this.ruleFormUpdate.industry = this.dynamicTags.join(',');
260
        if (this.dynamicTags.length < 10) {
261
          this.isShowAdd = true;
262
        }
263
      },
264
      showInput() {
265
        this.inputVisible = true;
266
        this.$nextTick(_ => {
267
          this.$refs.saveTagInput.$refs.input.focus();
268
        });
269
      },
270
      handleInputConfirm() {
271
        let inputValue = this.inputValue;
272
        if (inputValue.length > 15) {
273
          this.$message.error('面向行业不得超过15个字,添加失败!');
274
        }
275
        if (this.dynamicTags.length === 10) {
276
          this.isShowAdd = false;
277
        }
278
        if (inputValue && inputValue.length < 15 && this.dynamicTags.length < 10) {
279
          this.dynamicTags.push(inputValue);
280
        }
281
        this.ruleFormUpdate.industry = this.dynamicTags.join(',');
282
        this.inputVisible = false;
283
        this.inputValue = '';
284
      }
285
      // add tag
286
    },
287
    components: {
288
      dynamicTags
289
    }
290
  };
291
</script>
292
293
<style lang="stylus" rel="stylesheet/stylus">
294
.updateInfo
295
  .update-wrapper
296
    display:flex
297
    .update-logo
298
      width:280px
299
      .avatar-uploader
300
        .el-upload
301
          center-items(280px,187px)
302
          border: 1px dashed #d9d9d9
303
          cursor: pointer
304
          position: relative
305
          &:hover
306
            border-color: $mainColor
307
          .avatar-uploader-icon
308
            font-size: 40px
309
            color: #8c939d
310
            width: 280px
311
            height: 187px
312
            line-height: 187px
313
            text-align: center
314
      .update-tip
315
        margin-top:15px
316
        text-align:center
317
        font-size:14px
318
        color:$secondaryFont
319
    .update-main
320
      flex:1 0 280px
321
      padding-left:25px
322
      .update-title
323
        font-size:30px
324
        line-height:54px
325
        margin-bottom:16px
326
        padding-left:10px
327
328
      .el-tag + .el-tag
329
        margin-left: 10px
330
      .button-new-tag
331
        height: 32px
332
        line-height: 30px
333
        padding-top: 0
334
        padding-bottom: 0
335
      .input-new-tag
336
        width: 90px
337
        margin-left: 10px
338
        vertical-align: bottom
339
    .shortW
340
      width:300px
341
</style>

+ 0 - 222
src/components/form-views/findPwd.vue

@ -1,222 +0,0 @@
1
<template>
2
  <div class="login">
3
    <div class="logo-wrapper"></div>
4
    <div class="form-wrapper">
5
      <div class="form-contain">
6
        <p class="form-title">找回密码</p>
7
        <div class="step-wrapper">
8
          <el-steps :active="stepVal" finish-status="success" align-center>
9
            <el-step title="输入邮箱"></el-step>
10
            <el-step title="接收密码找回邮件"></el-step>
11
            <el-step title="重置密码"></el-step>
12
          </el-steps>
13
        </div>
14

15
        <div class="step-contain">
16
          <el-form v-show="stepFisrt" :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-ruleForm">
17
            <el-form-item prop="mail">
18
              <el-input v-model="ruleForm.mail" placeholder="请输入邮箱账号"></el-input>
19
            </el-form-item>
20
            <el-form-item></el-form-item>
21
            <el-form-item class="textButton-box">
22
              <el-button type="primary" :disabled="isDisabl" @click="nextStep('ruleForm')">下一步</el-button>
23
              <el-button class="textButton" type="text" @click="goLogin">又想起来了</el-button>
24
            </el-form-item>
25
          </el-form>
26
          <el-form v-show="stepSecond" class="demo-ruleForm">
27
            <el-form-item>
28
              <p class="importTip">密码找回邮件已发送至:<br />
29
                <span class="mainTip" id="emailShow">{{ruleForm.mail}}</span>
30
              </p>
31
              <p class="smallTip">请您在10分钟内登录您的企业邮箱,接收邮件,<br />点击链接后即可重置密码。</p>
32
            </el-form-item>
33
            <el-form-item></el-form-item>
34
            <el-form-item>
35
              <el-button type="primary" @click="goToMail">登录邮箱</el-button>
36
            </el-form-item>
37
          </el-form>
38
          <el-form v-show="stepThird" :model="ruleForm2" :rules="rules2" ref="ruleForm2" class="demo-ruleForm">
39
            <el-form-item prop="pass">
40
              <el-input type="password" v-model="ruleForm2.pass" placeholder="请设置您的新密码" auto-complete="off"></el-input>
41
            </el-form-item>
42
            <el-form-item prop="checkPass">
43
              <el-input type="password" v-model="ruleForm2.checkPass" placeholder="请再次输入密码确认" auto-complete="off"></el-input>
44
            </el-form-item>
45
            <el-form-item></el-form-item>
46
            <el-form-item>
47
              <el-button type="primary" :disabled="isDisabl" @click="resetPwd('ruleForm2')">重置密码</el-button>
48
            </el-form-item>
49
          </el-form>
50
        </div>
51
      </div>
52
    </div>
53
  </div>
54
</template>
55

56
<script type="text/ecmascript-6">
57
  import Cookies from 'js-cookie';
58
  import httpUrl from '@/libs/http';
59
  import util from '@/libs/util';
60

61
  export default {
62
    data() {
63
      var validatePass = (rule, value, callback) => {
64
        if (value === '') {
65
          callback(new Error('请设置您的新密码'));
66
        } else if (value.length < 6 || value.length > 24) {
67
         callback(new Error('密码由6-24个字符组成,区分大小写'));
68
        } else {
69
          if (this.ruleForm2.checkPass !== '') {
70
            this.$refs.ruleForm2.validateField('checkPass');
71
          }
72
          callback();
73
        }
74
      };
75
      var validatePass2 = (rule, value, callback) => {
76
        if (value === '') {
77
          callback(new Error('请再次输入密码确认'));
78
        } else if (value !== this.ruleForm2.pass) {
79
          callback(new Error('两次输入密码不一致,请重新输入!'));
80
        } else {
81
          callback();
82
        }
83
      };
84
      return {
85
        platId: '',
86
        resetStepNum: '',
87
        resetCode: '',
88
        stepVal: 0,
89
        stepFisrt: true,
90
        stepSecond: false,
91
        stepThird: false,
92
        isDisabl: false,
93
        ruleForm: {
94
          mail: ''
95
        },
96
        rules: {
97
          mail: [
98
            { required: true, message: '请输入邮箱账号', trigger: 'blur' },
99
            { type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur'] }
100
          ]
101
        },
102
        ruleForm2: {
103
          pass: '',
104
          checkPass: ''
105
        },
106
        rules2: {
107
          pass: [
108
            { validator: validatePass, trigger: 'blur' }
109
          ],
110
          checkPass: [
111
            { validator: validatePass2, trigger: 'blur' }
112
          ]
113
        }
114
      };
115
    },
116
    created() {
117
      this.platId = Cookies.get('platId');
118
      this.resetStepNum = util.urlParse('step');
119
      this.resetCode = util.urlParse('sc');
120
      if (this.resetStepNum === '2') {
121
        this.stepFisrt = false;
122
        this.stepSecond = false;
123
        this.stepThird = true;
124
        this.stepVal = 2;
125
      }
126
    },
127
    methods: {
128
      nextStep(formName) {
129
        this.$refs[formName].validate((valid) => {
130
          if (valid) {
131
            this.$axios.post(httpUrl.hQuery.sign.reqResetPw, {
132
              id: this.platId,
133
              mail: this.ruleForm.mail,
134
              url: httpUrl.platUrl + '/#/findPwd?step=2&sc'
135
            }).then(res => {
136
              console.log(res);
137
              if (res.success) {
138
                this.stepFisrt = false;
139
                this.stepSecond = true;
140
                this.stepVal = 1;
141
              } else {
142
                let errorCode = [{
143
                  code: -600001,
144
                  msg: '用户不存在'
145
                }, {
146
                  code: -600002,
147
                  msg: '发送邮箱错误'
148
                }];
149
                for (let i = 0; i < errorCode.length; i++) {
150
                  if (res.code === errorCode[i].code) {
151
                    this.$message.error(errorCode[i].msg);
152
                    return;
153
                  };
154
                };
155
              }
156
            });
157
          } else {
158
            return false;
159
          }
160
        });
161
      },
162
      goToMail() {
163
        var url = this.ruleForm.mail.split('@')[1];
164
        if (util.mailHash[url] === undefined) {
165
          window.open('http://mail.' + url);
166
        } else {
167
          window.open(util.mailHash[url]);
168
        }
169
      },
170
      resetPwd(formName) {
171
        this.$refs[formName].validate((valid) => {
172
          if (valid) {
173
            this.$axios.post(httpUrl.hQuery.sign.resetpw, {
174
              code: this.resetCode,
175
              pw: this.ruleForm2.pass
176
            }).then(res => {
177
              console.log(res);
178
              if (res.success) {
179
                this.$alert('您可以使用新密码登录您的账户了', '恭喜您,您的密码重置成功!', {
180
                  confirmButtonText: '重新登录',
181
                  type: 'success',
182
                  center: true,
183
                  callback: action => {
184
                    if (action === 'confirm') {
185
                      this.$router.push({path: '/loginPlat'});
186
                    };
187
                  }
188
                });
189
              } else {
190
                if (res.code === -600001) {
191
                  this.$alert('小提示:邮件内的链接有效时长为10分钟', '很抱歉,当前的链接已失效。', {
192
                    confirmButtonText: '重新找回密码',
193
                    type: 'warning',
194
                    center: true,
195
                    callback: action => {
196
                      if (action === 'confirm') {
197
                        this.stepFisrt = true;
198
                        this.stepSecond = false;
199
                        this.stepThird = false;
200
                        this.stepVal = 0;
201
                      };
202
                    }
203
                  });
204
                  return;
205
                };
206
              };
207
            });
208
          } else {
209
            return false;
210
          }
211
        });
212
      },
213
      goLogin() {
214
        this.$router.push({path: '/loginPlat'});
215
      }
216
    }
217
  };
218
</script>
219

220
<style lang="stylus" rel="stylesheet/stylus">
221
  @import './style';
222
</style>

BIN
src/components/form-views/img/e-sign-on_bg_img_nor.png


BIN
src/components/form-views/img/e-sign-on_bg_logo_nor.png


BIN
src/components/form-views/img/e-sign-on_icon_1_hig.png


BIN
src/components/form-views/img/e-sign-on_icon_2_hig.png


BIN
src/components/form-views/img/e-sign-on_icon_2_nor.png


BIN
src/components/form-views/img/e-sign-on_icon_3_hig.png


BIN
src/components/form-views/img/e-sign-on_icon_3_nor.png


+ 0 - 101
src/components/form-views/loginPlat.vue

@ -1,101 +0,0 @@
1
<template>
2
  <div class="login">
3
    <div class="logo-wrapper"></div>
4
    <div class="form-wrapper">
5
      <div class="form-contain">
6
        <p class="form-title">登录平台工作台</p>
7
        <el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-ruleForm">
8
          <el-form-item prop="mail">
9
            <el-input v-model="ruleForm.mail" placeholder="请输入邮箱账号"></el-input>
10
          </el-form-item>
11
          <el-form-item prop="pass">
12
            <el-input type="password" v-model="ruleForm.pass" placeholder="请输入登录密码" auto-complete="off"></el-input>
13
          </el-form-item>
14
          <el-form-item></el-form-item>
15
          <el-form-item>
16
            <el-button type="primary" :disabled="isDisabl" :loading="logining" @click="submitForm('ruleForm')">登录</el-button>
17
            <el-button type="text" @click="goBackPwd">忘记密码?</el-button>
18
          </el-form-item>
19
        </el-form>
20
      </div>
21
    </div>
22
  </div>
23
</template>
24

25
<script type="text/ecmascript-6">
26
  import httpUrl from '@/libs/http';
27

28
  export default {
29
     data() {
30
      return {
31
        logining: false,
32
        isDisabl: false,
33
        ruleForm: {
34
          mail: '',
35
          pass: ''
36
        },
37
        rules: {
38
          mail: [
39
            { required: true, message: '请输入邮箱账号', trigger: 'blur' },
40
            { type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur'] }
41
          ],
42
          pass: [
43
            { required: true, message: '请输入登录密码', trigger: 'blur' },
44
            { min: 6, max: 24, message: '密码由6-24个字符组成,区分大小写', trigger: 'blur' }
45
          ]
46
        }
47
      };
48
    },
49
    methods: {
50
      submitForm(formName) {
51
        this.$refs[formName].validate((valid) => {
52
          if (valid) {
53
            this.logining = true;
54
            let paramsData = {
55
              'email': this.ruleForm.mail,
56
              'pw': this.ruleForm.pass
57
            };
58
            this.$axios.post(httpUrl.hQuery.sign.login, paramsData).then(res => {
59
              this.logining = false;
60
              console.log(res);
61
              if (res.success) {
62
                this.$router.push({path: '/WorkHome'});
63
              } else {
64
                let errorCode = [{
65
                  code: -600001,
66
                  msg: '用户不存在'
67
                }, {
68
                  code: -600002,
69
                  msg: '密码不正确'
70
                }, {
71
                  code: -600003,
72
                  msg: '平台信息不存在'
73
                }, {
74
                  code: -600004,
75
                  msg: '用户被禁用'
76
                }];
77
                for (let i = 0; i < errorCode.length; i++) {
78
                  if (res.code === errorCode[i].code) {
79
                    this.$message.error(errorCode[i].msg);
80
                    return;
81
                  };
82
                };
83
              }
84
            }).catch(error => {
85
              console.log(error);
86
            });
87
          } else {
88
            return false;
89
          }
90
        });
91
      },
92
      goBackPwd() {
93
        this.$router.push({path: '/findPwd'});
94
      }
95
    }
96
  };
97
</script>
98

99
<style lang="stylus" rel="stylesheet/stylus">
100
  @import './style';
101
</style>

+ 0 - 62
src/components/form-views/style.styl

@ -1,62 +0,0 @@
1
.login 
2
  position:relative
3
  width:100%
4
  height: 100%
5
  overflow: hidden
6
  bg-image('./img/e-sign-on_bg_img_nor.png')
7
  background-position: 0 bottom
8
  background-size:cover
9
  .logo-wrapper
10
    display:block
11
    position:absolute
12
    top:30px
13
    left:30px
14
    height:64px
15
    width:292px
16
    bg-image('./img/e-sign-on_bg_logo_nor.png')
17
    background-size:cover
18
  .form-wrapper
19
    width:100%
20
    height:100%
21
    display:flex
22
    justify-content: center
23
    align-items: center
24
    .form-contain
25
      width:420px
26
      background:#fff
27
      padding:30px 20px
28
      border-radius()
29
      .form-title
30
        font-size: 22px
31
        line-height: 36px
32
        color:$mainColor
33
        text-align:center
34
        margin-bottom:40px
35
      .el-button--primary
36
        width:100%
37

38
  .step-wrapper
39
    margin-bottom:30px
40
    .el-step__head.is-process
41
      color: $mainColor
42
      border-color: $mainColor
43
    .el-step__title.is-process
44
      color: $mainColor
45
    .el-step__description.is-process
46
      color: $mainColor
47
  .step-contain
48
    text-align:center
49
    .textButton-box
50
      height:60px
51
      .textButton
52
        position:absolute
53
        left:0
54
    .importTip
55
      font-size: 18px
56
      margin: 10px 0
57
    .mainTip
58
      color:$mainColor
59
    .smallTip
60
      color:$secondaryFont
61
      line-height:16px
62
      font-size:13px

+ 0 - 81
src/components/form-views/upMail.vue

@ -1,81 +0,0 @@
1
<template>
2
  <div class="login">
3
    <div class="logo-wrapper"></div>
4
    <div class="form-wrapper">
5
      <div class="form-contain">
6
        <p class="form-title">账号绑定</p>
7
        <el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-ruleForm">
8
          <el-form-item prop="pass">
9
            <el-input type="password" v-model="ruleForm.pass" placeholder="请输入登录密码" auto-complete="off"></el-input>
10
          </el-form-item>
11
          <el-form-item></el-form-item>
12
          <el-form-item>
13
            <el-button type="primary" :disabled="isDisabl" :loading="logining" @click="submitForm('ruleForm')">绑定邮箱</el-button>
14
          </el-form-item>
15
        </el-form>
16
      </div>
17
    </div>
18
  </div>
19
</template>
20
21
<script type="text/ecmascript-6">
22
  import httpUrl from '@/libs/http';
23
  import util from '@/libs/util';
24
  export default {
25
     data() {
26
      return {
27
        logining: false,
28
        isDisabl: false,
29
        ruleForm: {
30
          pass: ''
31
        },
32
        rules: {
33
          pass: [
34
            { required: true, message: '请输入登录密码', trigger: 'blur' },
35
            { min: 6, max: 24, message: '密码由6-24个字符组成,区分大小写', trigger: 'blur' }
36
          ]
37
        }
38
      };
39
    },
40
    methods: {
41
      submitForm(formName) {
42
        this.$refs[formName].validate((valid) => {
43
          if (valid) {
44
            this.logining = true;
45
            let paramsData = {
46
              'code': util.urlParse('sc'),
47
              'pw': this.ruleForm.pass
48
            };
49
            this.$axios.post(httpUrl.hQuery.sign.bindMail, paramsData).then(res => {
50
              this.logining = false;
51
              console.log(res);
52
              if (res.success) {
53
                 this.$alert('您可以使用该邮箱登录您的账户了', '恭喜您,您的邮箱绑定成功', {
54
                  center: true,
55
                  type: 'success',
56
                  confirmButtonText: '重新登录',
57
                  callback: action => {
58
                    this.$router.push({path: '/#/loginPlat'});
59
                  }
60
                });
61
              } else {
62
                this.$alert('小提示:邮件内的链接有效时长为10分钟', '很抱歉,当前的链接已失效!', {
63
                  center: true,
64
                  type: 'warning'
65
                });
66
              }
67
            }).catch(error => {
68
              console.log(error);
69
            });
70
          } else {
71
            return false;
72
          }
73
        });
74
      }
75
    }
76
  };
77
</script>
78
79
<style lang="stylus" rel="stylesheet/stylus">
80
  @import './style';
81
</style>

+ 40 - 2
src/libs/queryBase.js

@ -7,11 +7,13 @@ import Vue from 'vue'
7 7
8 8
var objCache = {
9 9
  professor: {},
10
  organization: {}
10
  organization: {},
11
  company: {}
11 12
}
12 13
var objHcache = {
13 14
  professor: {},
14
  organization: {}
15
  organization: {},
16
  company: {}
15 17
}
16 18
var objCacheHandler = {
17 19
  professor: function(id) {
@ -55,6 +57,28 @@ var objCacheHandler = {
55 57
        hc[i](false)
56 58
      }
57 59
    })
60
  },
61
  company: function(id) {
62
    var hc = objHcache.company[id]
63
    Vue.axios.get('/ajax/company/qo', {
64
      id: id
65
    }, function(data) {
66
      delete objHcache.company[id]
67
      if (data.success) {
68
        objCache.company[id] = data.data
69
        for (let i = 0; i < hc.length; ++i) {
70
          hc[i](true, data.data)
71
        }
72
      } else {
73
        for (let i = 0; i < hc.length; ++i) {
74
          hc[i](false)
75
        }
76
      }
77
    }, function() {
78
      for (let i = 0; i < hc.length; ++i) {
79
        hc[i](false)
80
      }
81
    })
58 82
  }
59 83
}
60 84
var cacheModel = {
@ -85,6 +109,20 @@ var cacheModel = {
85 109
        objCacheHandler.organization(id)
86 110
      }
87 111
    }
112
  },
113
  getCompany: function(id, handler) {
114
    var data = objCache.company[id]
115
    if (data) {
116
      handler(true, data)
117
    } else {
118
      if (objHcache.company[id]) {
119
        objHcache.company[id].push(handler)
120
      } else {
121
        objHcache.company[id] = []
122
        objHcache.company[id].push(handler)
123
        objCacheHandler.company(id)
124
      }
125
    }
88 126
  }
89 127
}
90 128

+ 1 - 33
src/libs/util.js

@ -19,15 +19,8 @@ util.defaultSet = {
19 19
    resource: '/static/comimg/default-resource.jpg',
20 20
    service: '/static/comimg/default-service.jpg',
21 21
    patent: '/static/comimg/default-patent.jpg',
22
    product: '/static/comimg/default-product.jpg',
22 23
    plat: '/static/comimg/default-plat.jpg'
23
  },
24
  link: {
25
    expert: ekexiuUrl + '/userInforShow.html?professorId=',
26
    org: ekexiuUrl + '/cmpInforShow.html?orgId=',
27
    article: ekexiuUrl + '/articalShow.html?articleId=',
28
    resource: ekexiuUrl + '/resourceShow.html?resourceId=',
29
    service: ekexiuUrl + '/sevriceShow.html?sevriceId=',
30
    demand: ekexiuUrl + '/demandShow.html?demandId='
31 24
  }
32 25
};
33 26
@ -121,31 +114,6 @@ util.Dictionary = {
121 114
    }]
122 115
};
123 116
124
// 企业规模
125
util.orgSizeShow = {
126
  '1': '50人以内',
127
  '2': '50-100人',
128
  '3': '100-200人',
129
  '4': '200-500人',
130
  '5': '500-1000人',
131
  '6': '1000人以上'
132
};
133
134
// 企业类型
135
util.orgTypeShow = {
136
  '2': '上市企业',
137
  '3': '外资企业',
138
  '4': '合资企业',
139
  '5': '独资企业',
140
  '6': '个体经营',
141
  '7': '政府机构',
142
  '8': '公益组织',
143
  '9': '协会学会',
144
  '10': '新闻媒体',
145
  '11': '教育机构',
146
  'undefined': ''
147
};
148
149 117
/**
150 118
 * 数据字典
151 119
 */

+ 2 - 2
src/router/index.js

@ -224,8 +224,8 @@ const constantRouterMap = [
224 224
                component: () => import('@/views/infoshow/compShow/comp')
225 225
              },
226 226
              {
227
                path: 'comp_product',
228
                name: 'comp_product',
227
                path: 'product_show',
228
                name: 'product_show',
229 229
                component: () => import('@/views/infoshow/compShow/product'),
230 230
                meta: { title: '产品名称' }
231 231
              }

+ 1 - 1
src/styles/browse.scss

@ -102,7 +102,7 @@
102 102
          .reInfo-box{
103 103
            padding-left:15px;
104 104
            position: relative;
105
            min-height: 270px;
105
            min-height: 252px;
106 106
            padding-bottom: 24px;
107 107
            .zoom-operate{
108 108
              position:absolute;

+ 19 - 52
src/views/frontviews/Dashboard.vue

@ -100,16 +100,16 @@
100 100
        </div>
101 101
        <div class="swiper-container" ref="findService">
102 102
          <div class="swiper-wrapper">
103
            <a class="swiper-slide" v-for="item in platWares" :key="item.index" :href="linkWare(item)" target="_blank">
103
            <router-link class="swiper-slide" v-for="item in platWares" :key="item.index" :to="{name:'serve_show',query:{id:item.id}}" target="_blank">
104 104
              <div class="item-block">
105
                <div class="item-pic" :style="{backgroundImage: 'url(' + waresUrl(item) + ')'}"></div>
105
                <div class="item-pic" :style="{backgroundImage: 'url(' + item.img + ')'}"></div>
106 106
                <div class="item-text">
107 107
                  <p class="title">{{item.name}}</p>
108 108
                  <p class="desc">{{item.cnt}}</p>
109 109
                  <p class="owner">{{item.ownerName}}</p>
110 110
                </div>
111 111
              </div>
112
            </a>
112
            </router-link>
113 113
          </div>
114 114
          <div class="swiper-button-prev el-icon-arrow-left" ref="prevService"></div>
115 115
          <div class="swiper-button-next el-icon-arrow-right" ref="nextService"></div>
@ -129,21 +129,21 @@
129 129
          </div>
130 130
          <div class="content-more">
131 131
            <!-- <router-link class="item-more" v-for="item in 4" :key="item" to="">咨询服务</router-link> -->
132
            <router-link class="item-more" to="/findResource">更多</router-link>
132
            <router-link class="item-more" to="reso">更多</router-link>
133 133
          </div>
134 134
        </div>
135 135
        <div class="swiper-container" ref="findResource">
136 136
          <div class="swiper-wrapper">
137
            <a class="swiper-slide" v-for="item in platResources" :key="item.index" :href="linkResource(item)" target="_blank">
137
            <router-link class="swiper-slide" v-for="item in platResources" :key="item.index" :to="{name:'reso_show',query:{id:item.id}}" target="_blank">
138 138
              <div class="item-block" >
139
                <div class="item-pic" :style="{backgroundImage: 'url(' + resourcesUrl(item) + ')'}"></div>
139
                <div class="item-pic" :style="{backgroundImage: 'url(' + item.img + ')'}"></div>
140 140
                <div class="item-text">
141 141
                  <p class="title">{{item.name}}</p>
142 142
                  <p class="desc">{{item.cnt}}</p>
143 143
                  <p class="owner">{{item.ownerName}}</p>
144 144
                </div>
145 145
              </div>
146
            </a>
146
            </router-link>
147 147
          </div>
148 148
          <div class="swiper-button-prev el-icon-arrow-left" ref="prevResource"></div>
149 149
          <div class="swiper-button-next el-icon-arrow-right" ref="nextResource"></div>
@ -232,7 +232,6 @@
232 232
       this.platId = Cookies.get('platId');
233 233
       this.getAboutUs();
234 234
       this.queryPaltNews();
235
       this.queryOrgTrends();
236 235
       this.queryResidentComps();
237 236
       this.queryPlatResources();
238 237
       this.queryPlatWares();
@ -314,21 +313,6 @@
314 313
          };
315 314
        });
316 315
      },
317
      queryOrgTrends() {
318
        this.$axios.get('/ajax/org/list', {
319
        }, (res) => {
320
          if (res.success) {
321
            var _this = this;
322
            var $info = res.data;
323
            for (let i = 0; i < $info.length; i++) {
324
              (function(m) {
325
                _this.ownerByond($info[m], true);
326
              }(i));
327
            };
328
            this.orgTrends = $info;
329
          };
330
        });
331
      },
332 316
      queryResidentComps() {
333 317
        this.$axios.get('/ajax/company/pq', {
334 318
          pageSize: 20,
@ -354,6 +338,11 @@
354 338
          if (res.success) {
355 339
            var $info = res.data;
356 340
            for (let i = 0; i < $info.length; i++) {
341
              if ($info[i].images) {
342
                $info[i].img = util.ImageUrl('resource/' + $info[i].images.split(',')[0])
343
              } else {
344
                $info[i].img = util.defaultSet.img.resource
345
              }
357 346
              (function(m) {
358 347
                _this.ownerByond($info[m]);
359 348
              }(i));
@ -371,6 +360,11 @@
371 360
          if (res.success) {
372 361
            var $info = res.data;
373 362
            for (let i = 0; i < $info.length; i++) {
363
              if ($info[i].images) {
364
                $info[i].img = util.ImageUrl('ware' + $info.images.split(',')[0])
365
              } else {
366
                $info[i].img = util.defaultSet.img.service
367
              }
374 368
              (function(m) {
375 369
                _this.ownerByond($info[m]);
376 370
              }(i));
@ -389,36 +383,9 @@
389 383
          }
390 384
        });
391 385
      },
392
      resourcesUrl(item) {
393
        return item.images ? util.ImageUrl('resource/' + item.images.split(',')[0]) : util.defaultSet.img.resource;
394
      },
395
      articleUrl(item) {
396
        return item.articleImg ? util.ImageUrl('article/' + item.articleImg) : util.defaultSet.img.article;
397
      },
398
      waresUrl(item) {
399
        return item.images ? util.ImageUrl('ware' + item.images.split(',')[0]) : util.defaultSet.img.service;
400
      },
401
      orgsUrl(item) {
402
        return item.logo || util.defaultSet.img.org;
403
      },
404
      linkResource(item) {
405
        return util.defaultSet.link.resource + item.id;
406
      },
407
      linkWare(item) {
408
        return util.defaultSet.link.service + item.id;
409
      },
410
      linkOrg(item) {
411
        return util.defaultSet.link.org + item.id;
412
      },
413
      linkArticle(item) {
414
        return util.pageUrl('a', item);
415
      },
416
      formTime(item) {
417
        return util.commenTime(item.publishTime, true);
418
      },
419 386
      searchRes() {
420 387
        if (this.inputRes) {
421
          this.$router.push({path: '/findResource', query: {key: this.inputRes}});
388
          this.$router.push({name: 'reso', query: {key: this.inputRes}});
422 389
        } else {
423 390
          this.$message({
424 391
            message: '请填写搜索资源的关键词',
@ -428,7 +395,7 @@
428 395
      },
429 396
      searchSer() {
430 397
        if (this.inputSer) {
431
          this.$router.push({path: '/findServe', query: {key: this.inputSer}});
398
          this.$router.push({name: 'serve', query: {key: this.inputSer}});
432 399
        } else {
433 400
          this.$message({
434 401
            message: '请填写搜索服务的关键词',

+ 62 - 12
src/views/infoshow/compShow/comp.vue

@ -10,7 +10,7 @@
10 10
            <div class="info-tit">{{orgInfo.name}}</div>
11 11
            <div class="info-tag"><span v-if="orgInfo.type === '1'" style="margin-right:10px">{{compType[orgInfo.type]}}</span> {{keywordObj[1] ? keywordObj[1].join(" | ") : ''}}</div>
12 12
            <div class="info-operate">
13
              <div class="addr">{{orgInfo.addr}}</div>
13
              <div class="addr">{{citys[orgInfo.addr]}}</div>
14 14
              <shareOut :tUrl="elurl"></shareOut>
15 15
            </div>
16 16
          </div>
@ -21,14 +21,14 @@
21 21
      <div class="wrapper-left left-main">
22 22
        <el-tabs v-model="activeName">
23 23
          <el-tab-pane label="主页" name="first">
24
            <div class="content-wrapper split-other" v-if="platServices.length">
24
            <div class="content-wrapper split-other" v-if="platProducts.length">
25 25
              <div class="inner-wrapper">
26 26
                <div class="content-title">
27 27
                  <span>我们的产品</span>
28 28
                  <span class="content-more" @click="activeName='second'">更多</span>
29 29
                </div>
30 30
                <div class="content">
31
                  <!-- <baseService v-if="platServices.length" v-for="item in platServices" :key="item.index" :itemSingle="item"></baseService> -->
31
                  <baseProduct v-if="platProducts.length" v-for="item in platProducts" :key="item.index" :itemSingle="item"></baseProduct>
32 32
                </div>
33 33
              </div>
34 34
            </div>
@ -51,8 +51,12 @@
51 51
              </div>
52 52
            </div>
53 53
          </el-tab-pane>
54
          <el-tab-pane label="产品" name="second">
55
            <!-- <baseService v-if="platServices.length" v-for="item in platServices" :key="item.index" :itemSingle="item"></baseService> -->
54
          <el-tab-pane :label="'产品 ' + (total>0 ? total : '')" name="second">
55
            <div v-show="!ifDefault">
56
              <baseProduct v-if="platProducts.length" v-for="item in platProducts" :key="item.index" :itemSingle="item"></baseProduct>
57
              <Loading v-show="loadingModalShow" :loadingComplete="loadingComplete" :isLoading="isLoading" v-on:upup="searchLower"></Loading>
58
            </div>
59
            <defaultPage v-show="ifDefault"></defaultPage>
56 60
          </el-tab-pane>
57 61
          <el-tab-pane label="资料" name="third">
58 62
            <div class="content-wrapper">
@ -135,20 +139,29 @@
135 139
  import queryDict from '@/libs/queryDict';
136 140
137 141
  import shareOut from '../components/ShareOut';
138
  import baseService from '@/views/sub-component/BaseService';
142
  import baseProduct from '@/views/sub-component/BaseProduct';
139 143
140 144
  export default {
141 145
    data() {
142 146
      return {
143
        activeIndex: '1',
144 147
        activeName: 'first',
145 148
        orgInfo: '',
146 149
        elurl: '',
150
        pageSize: 30,
151
        pageNo: 1,
152
        total: 0,
147 153
        keywordObj: [],
148 154
        numRanger: [],
149 155
        compType: [],
150
        platServices: [],
151
        platResources: []
156
        citys: [],
157
        // platProductsThree: [],
158
        platProducts: [],
159
        platResources: [],
160
        loadingModalShow: true,
161
        loadingComplete: false,
162
        isFormSearch: false,
163
        isLoading: false,
164
        ifDefault: false
152 165
      };
153 166
    },
154 167
    created() {
@ -156,24 +169,31 @@
156 169
      this.elurl = window.location.href;
157 170
      this.getDictoryData();
158 171
      this.getorgInfo();
172
      this.getCompanyKeyword();
173
      this.getProductlist();
159 174
    },
160 175
    components: {
161 176
      shareOut,
162
      baseService
177
      baseProduct
163 178
    },
164 179
    methods: {
165 180
      getDictoryData() {
166 181
        const that = this
167 182
        queryDict.applyDict('QYGM', function(dictData) {
168 183
          dictData.map(item => {
169
            that.numRanger.push({ value: item.code, label: item.caption })
184
            that.numRanger[item.code] = item.caption
170 185
          })
171 186
        }) // 企业规模
172 187
        queryDict.applyDict('QYLX', function(dictData) {
173 188
          dictData.map(item => {
174
            that.compType.push({ value: item.code, label: item.caption })
189
            that.compType[item.code] = item.caption
175 190
          })
176 191
        }) // 企业类型
192
        queryDict.applyDict('XZQH', function(dictData) {
193
          dictData.map(item => {
194
            that.citys[item.code] = item.caption
195
          })
196
        })
177 197
      },
178 198
      getorgInfo() {
179 199
        this.$axios.get('/ajax/company/qo', {
@ -209,6 +229,36 @@
209 229
            that.keywordObj = objKey
210 230
          }
211 231
        })
232
      },
233
      getProductlist() {
234
        var that = this
235
        this.$axios.get('/ajax/product/pq', {
236
          companyId: that.companyId,
237
          pageSize: that.pageSize,
238
          pageNo: that.pageNo
239
        }, function(res) {
240
          if (res.success && res.data) {
241
            const obj = res.data.data
242
            if (obj.length > 0) {
243
              that.isFormSearch = true;
244
              that.total = res.data.total;
245
              // if (that.pageNo === 1) {
246
              //   that.platProductsThree = obj;
247
              // }
248
              that.platProducts = that.platProducts.concat(obj);
249
            };
250
            if (obj.length < that.pageSize) {
251
              that.loadingModalShow = false;
252
              that.isFormSearch = false;
253
            };
254
          }
255
        })
256
      },
257
      searchLower() {
258
        if (this.loadingModalShow && !this.isLoading) {
259
          this.pageNo++;
260
          this.getProductlist();
261
        }
212 262
      }
213 263
    }
214 264
  };

+ 53 - 59
src/views/infoshow/compShow/product.vue

@ -5,14 +5,13 @@
5 5
        <div class="content-wrapper split-other">
6 6
          <div class="headcon-box hdetail-box">
7 7
            <div class="zoom-box">
8
              <previewMagnify v-if="srcImg.length" :previewImg="srcImg"></previewMagnify>
8
              <previewMagnify v-if="productInfo.img && productInfo.img.length" :previewImg="productInfo.img"></previewMagnify>
9 9
            </div>
10 10
            <div class="show-info reInfo-box">
11
              <div class="info-tit">{{resourceInfo.resourceName}}</div>
12
              <div class="info-tag">应用用途:{{resourceInfo.supportedServices}}</div>
11
              <div class="info-tit">{{productInfo.name}}</div>
12
              <div class="info-tag">简介:{{productInfo.cnt}}</div>
13 13
              <div class="info-operate zoom-operate">
14
                <div class="addr">浏览量 10</div>
15
                <collectCo></collectCo>
14
                <!-- <div class="addr">浏览量 10</div> -->
16 15
                <shareOut :tUrl="elurl" :tPosition="tPosition"></shareOut>
17 16
              </div>
18 17
            </div>
@ -21,51 +20,43 @@
21 20
        <div class="content-wrapper">
22 21
          <div class="content">
23 22
            <el-row :gutter="10" class="rel-detail">
24
              <el-col class="rel-item" :span="24" v-if="resourceInfo.orgName">
25
                <div class="rel-tit">所属机构:</div>
26
                <div>{{resourceInfo.orgName}}</div>
27
              </el-col>
28
              <el-col class="rel-item" :span="24" v-if="resourceInfo.spec">
23
              <el-col class="rel-item" :span="24" v-if="productInfo.spec">
29 24
                <div class="rel-tit">厂商型号:</div>
30
                <div>{{resourceInfo.spec}}</div>
25
                <div>{{productInfo.spec}}</div>
31 26
              </el-col>
32
              <el-col class="rel-item" :span="24" v-if="resourceInfo.parameter">
33
                <div class="rel-tit">性能参数:</div>
34
                <div v-html="resourceInfo.parameter"></div>
27
              <el-col class="rel-item" :span="24" v-if="productInfo.producingArea">
28
                <div class="rel-tit">产地:</div>
29
                <div>{{productInfo.producingArea}}</div>
30
              </el-col>
31
              <el-col class="rel-item" :span="24" v-if="productInfo.price">
32
                <div class="rel-tit">官方价格:</div>
33
                <div>{{productInfo.price}}</div>
35 34
              </el-col>
36
              <el-col class="rel-item" :span="24" v-if="resourceInfo.cooperationNotes">
37
                <div class="rel-tit">合作备注:</div>
38
                <div v-html="resourceInfo.cooperationNotes"></div>
35
              <el-col class="rel-item" :span="24" v-if="productInfo.parameter">
36
                <div class="rel-tit">性能参数:</div>
37
                <div v-html="productInfo.parameter"></div>
39 38
              </el-col>
40
              <el-col class="rel-item" :span="24" v-if="resourceInfo.descp">
39
              <el-col class="rel-item" :span="24" v-if="productInfo.descp">
41 40
                <div class="rel-tit">详细介绍:</div>
42
                <div v-html="resourceInfo.descp"></div>
41
                <div v-html="productInfo.descp"></div>
43 42
              </el-col>
44
              <el-col class="rel-item" :span="24" v-if="resourceInfo.subject && resourceInfo.subject.length">
43
              <el-col class="rel-item" :span="24" v-if="keywords && keywords.length">
45 44
                <el-row class="tag-item">
46
                  <el-tag v-for="sub in resourceInfo.subject" :key="sub.index">{{sub}}</el-tag>
45
                  <el-tag v-for="sub in keywords" :key="sub.index">{{sub}}</el-tag>
47 46
                </el-row>
48 47
              </el-col>
49 48
            </el-row>
50 49
          </div>
51 50
        </div>
52
        <div class="content-wrapper">
53
          <div class="content-title">
54
            <span>您可能感兴趣的资源</span>
55
          </div>
56
          <div class="content">
57
            <!-- <baseService v-if="platServices.length" v-for="item in platServices" :key="item.index" :itemSingle="item"></baseService> -->
58
          </div>
59
        </div>
60 51
      </div>
61 52
      <div class="wrapper-right">
62 53
        <div class="content-wrapper">
63 54
          <div class="right-split">
64
            <beyondTo :ownerId="owner.id" :ownerType="owner.type"></beyondTo>
55
            <beyondTo :ownerId="productInfo.companyId"></beyondTo>
65 56
          </div>
66 57
          <div class="right-split">
67 58
            <div class="content-title">
68
              <span>热门资源</span>
59
              <span>其他产品</span>
69 60
            </div>
70 61
            <div class="content">
71 62
              <!-- <baseService v-if="platServices.length" v-for="item in platServices" :key="item.index" :itemSingle="item"></baseService> -->
@ -79,62 +70,65 @@
79 70
</template>
80 71
81 72
<script>
82
  import '@/common/stylus/listitem.styl';
83
  import '@/common/stylus/browse.styl';
73
  import '@/styles/listitem.scss';
74
  import '@/styles/browse.scss';
84 75
  import util from '@/libs/util';
85
  import httpUrl from '@/libs/http';
86 76
87 77
  import previewMagnify from '../components/previewMagnify';
88 78
  import shareOut from '../components/ShareOut';
89
  import collectCo from '../components/CollectCo';
90 79
  import beyondTo from '../components/BeyondTo';
91 80
92 81
  export default {
93 82
    data() {
94 83
      return {
95
        resourceInfo: '',
84
        productInfo: '',
85
        keywords: '',
96 86
        elurl: '',
97 87
        tPosition: 'top-start',
98
        platServices: [],
99
        srcImg: [],
100
        owner: {
101
          id: '',
102
          type: ''
103
        }
88
        platServices: []
104 89
      };
105 90
    },
106 91
    created() {
107
      this.resourceId = util.urlParse('id');
92
      this.productId = util.urlParse('id');
108 93
      this.elurl = window.location.href;
109
      this.getResourceInfo();
94
      this.getproductInfo();
95
      this.getProductKeyword();
110 96
    },
111 97
    components: {
112
      // PicZoom,
113 98
      previewMagnify,
114 99
      shareOut,
115
      collectCo,
116 100
      beyondTo
117 101
    },
118 102
    methods: {
119
      getResourceInfo() {
120
        this.$axios.get(httpUrl.kxQurey.resource.query, {
121
          resourceId: this.resourceId
103
      getproductInfo() {
104
        this.$axios.get('/ajax/product/qo', {
105
          id: this.productId
122 106
        }, (res) => {
123 107
          if (res.success) {
124 108
            var $info = res.data;
125
            if ($info.subject) {
126
              $info.subject = util.strToArr($info.subject);
109
            if ($info.img) {
110
              $info.img = util.strToArr($info.img);
127 111
            }
128
            if ($info.images.length) {
129
              this.srcImg = $info.images;
130
            }
131
            this.owner = {
132
              id: $info.professorId,
133
              type: $info.resourceType
134
            };
135
            this.resourceInfo = $info;
112
            this.productInfo = $info;
136 113
          };
137 114
        });
115
      },
116
      getProductKeyword() {
117
        var that = this
118
        that.$axios.get('/ajax/product/qo/keyword', {
119
          id: that.productId
120
        }, function(res) {
121
          if (res.success && res.data) {
122
            const str = res.data
123
            var objKey = []
124
            if (str.length > 0) {
125
              str.map(item => {
126
                objKey.push(item.keyword)
127
              })
128
            }
129
            that.keywords = objKey
130
          }
131
        })
138 132
      }
139 133
    }
140 134
  };

+ 67 - 32
src/views/infoshow/components/BeyondTo/index.vue

@ -1,39 +1,23 @@
1 1
<template>
2 2
  <div class="beyond-block">
3
    <div class="expert-block">
4
      <div class="show-head"></div>
3
    <div class="expert-block" v-if="ownerType==='1'">
4
      <div class="show-head" :style="{backgroundImage:'url('+ ownerInfo.img +')'}"></div>
5 5
      <div class="show-info">
6
        <div class="info-tit">ownerInfo.name<em class="authicon icon-pro"></em></div>
7
        <div class="info-tag">ownerInfo.title</div>
8
        <div class="info-desc">ownerInfo.offt</div>
6
        <div class="info-tit">{{ownerInfo.name}}<em class="authicon icon-pro"></em></div>
7
        <div class="info-tag">{{ownerInfo.title}}</div>
8
        <div class="info-desc">{{ownerInfo.offt}}</div>
9 9
      </div>
10 10
    </div>
11
    <div class="expert-block">
11
    <div class="expert-block" v-else>
12 12
      <div class="show-head orgimg-box">
13
        <img :src="orgLogoUrl(ownerInfo)">
13
        <img :src="ownerInfo.logo">
14 14
      </div>
15 15
      <div class="show-info">
16
        <div class="info-tit">ownerInfo.name<em class="authicon icon-com"></em></div>
17
        <div class="info-desc">ownerInfo.title</div>
16
        <div class="info-tit">{{ownerInfo.name}}</div>
17
        <div class="info-desc">{{ownerInfo.title}}</div>
18 18
      </div>
19 19
    </div>
20
    <!-- <div class="expert-block" v-if="ownerType===1">
21
      <div class="show-head headimg-box" :style="{backgroundImage:'url('+ headUrl(ownerInfo) +')'}"></div>
22
      <div class="show-info reInfo-box">
23
        <div class="info-tit">{{ownerInfo.name}}<em class="authicon" :class="headIcon(ownerInfo)"></em></div>
24
        <div class="info-tag"><span v-if="ownerInfo.title" style="margin-right:10px">{{ownerInfo.title}}</span> {{ownerInfo.offt}}</div>
25
      </div>
26
    </div>
27
    <div class="org-block" v-if="ownerType===2">
28
      <div class="show-head headimg-box">
29
        <img :src="orgLogoUrl(ownerInfo)">
30
      </div>
31
      <div class="show-info reInfo-box">
32
        <div class="info-tit">{{ownerInfo.forShort ? ownerInfo.forShort : ownerInfo.name}}<em class="authicon" :class="{'icon-com': ownerInfo.authStatus==='3'}"></em></div>
33
        <div class="info-tag"><span v-if="ownerInfo.title" style="margin-right:10px">{{ownerInfo.orgType}}</span> {{ownerInfo.industry ? ownerInfo.industry.replace(/,/gi, " | ") : ''}}</div>
34
      </div>
35
    </div> -->
36
    <el-row class="goSpan">
20
    <el-row class="goSpan" v-if="ownerType">
37 21
      <el-button type="primary" icon="el-icon-plus">关注</el-button>
38 22
      <el-button type="primary">联系</el-button>
39 23
    </el-row>
@ -41,7 +25,8 @@
41 25
</template>
42 26
<script>
43 27
  import util from '@/libs/util';
44
  // import httpUrl from '@/libs/http';
28
  import queryBase from '@/libs/queryBase';
29
45 30
  export default {
46 31
    props: {
47 32
      ownerId: {
@ -56,14 +41,64 @@
56 41
        ownerInfo: ''
57 42
      };
58 43
    },
59
    mounted() {
44
    created() {
45
      if (!this.ownerType) {
46
        this.ownerCompInfo()
47
      } else if (this.ownerType === '1') {
48
        this.ownerProInfo()
49
      } else if (this.ownerType === '2') {
50
        this.ownerOrgInfo()
51
      }
60 52
    },
61 53
    methods: {
62
      orgLogoUrl(item) {
63
        return item.hasOrgLogo ? util.ImageUrl(('org/' + item.id + '.jpg'), true) : util.defaultSet.img.org;
54
      ownerProInfo() {
55
        var that = this
56
        queryBase.getProfessor(that.ownerId, function(sc, value) {
57
          if (sc) {
58
            that.ownerInfo.name = value.name
59
            that.ownerInfo.title = value.title
60
            if (that.ownerInfo.hasHeadImage) {
61
              that.ownerInfo.img = util.ImageUrl(('head/' + value.id + '_l.jpg'), true)
62
            } else {
63
              that.ownerInfo.img = util.defaultSet.img.expert
64
            }
65
          }
66
        })
67
      },
68
      ownerOrgInfo() {
69
        var that = this
70
        queryBase.getOrganization(that.ownerId, function(sc, value) {
71
          if (sc) {
72
            that.ownerInfo.name = value.name
73
            that.ownerInfo.insdutry = value.insdutry.replace(/,/, ' | ')
74
            if (that.ownerInfo.hasOrgLogo) {
75
              that.ownerInfo.img = util.ImageUrl(('org/' + value.id + '.jpg'), true)
76
            } else {
77
              that.ownerInfo.img = util.defaultSet.img.org
78
            }
79
          }
80
        })
64 81
      },
65
      headUrl(item) {
66
        return item.hasHeadImage ? util.ImageUrl(('head/' + item.id + '_l.jpg'), true) : util.defaultSet.img.expert;
82
      ownerCompInfo() {
83
        this.$axios.get('/ajax/company/qo', {
84
          id: this.ownerId
85
        }, (res) => {
86
          if (res.success) {
87
            const obj = res.data
88
            if (obj.logo === '') {
89
              obj.logo = util.defaultSet.img.org
90
            }
91
            this.ownerInfo = obj
92
          };
93
        });
94
        // queryBase.getCompany(that.ownerId, function(sc, value) {
95
        //   if (sc) {
96
        //     that.ownerInfo.name = value.name
97
        //     if (!that.ownerInfo.logo) {
98
        //       that.ownerInfo.logo = util.defaultSet.img.org
99
        //     }
100
        //   }
101
        // })
67 102
      },
68 103
      headIcon(item) {
69 104
        return util.autho(item.authType, item.orgAuth, item.authStatus);

+ 4 - 10
src/views/infoshow/components/PreviewMagnify/index.vue

@ -40,22 +40,16 @@ function offset(el) {
40 40
export default {
41 41
  name: 'magnify',
42 42
  props: {
43
    // previewImg: {
44
    //   type: Array
45
    // }
43
    previewImg: {
44
      type: Array
45
    }
46 46
  },
47 47
  data() {
48 48
    return {
49 49
      zoomVisiable: false,
50 50
      hoverVisiable: false,
51 51
      selected: true,
52
      selectIndex: 0,
53
      previewImg: [
54
        '/data/resource/201710/C1F33120B2404644A7DD99B3DE9BFC21.jpg',
55
        '/data/resource/201710/179DCD28E4C146E99869FB1AB943DE1F.jpg',
56
        '/data/resource/201803/2CF4E47B24454D4BBEEEF126B2108D97.jpg',
57
        '/data/resource/201706/6989DDEA8E614EF6B550958F0C8A785E.jpg'
58
      ]
52
      selectIndex: 0
59 53
    };
60 54
  },
61 55
  methods: {

+ 2 - 2
src/views/infoshow/contentShow/index.vue

@ -44,8 +44,8 @@
44 44
</template>
45 45
46 46
<script>
47
  import '@/common/stylus/listitem.styl';
48
  import '@/common/stylus/browse.styl';
47
  import '@/styles/listitem.scss';
48
  import '@/styles/browse.scss';
49 49
  import util from '@/libs/util';
50 50
51 51
  import baseService from '@/views/sub-component/BaseService';

+ 6 - 5
src/views/infoshow/expertShow/index.vue

@ -3,7 +3,7 @@
3 3
		<div class="block-wrapper">
4 4
      <div class="content-wrapper">
5 5
        <div class="headcon-box">
6
          <div class="show-head headimg-box" :style="{backgroundImage:'url('+ headUrl(expertInfo) +')'}"></div>
6
          <div class="show-head headimg-box" :style="{backgroundImage:'url('+ expertInfo.img +')'}"></div>
7 7
          <div class="show-info reInfo-box">
8 8
            <div class="info-tit">{{expertInfo.name}}<em class="authicon" :class="headIcon(expertInfo)"></em></div>
9 9
            <div class="info-tag"><span v-if="expertInfo.title" style="margin-right:10px">{{expertInfo.title}}</span> {{expertInfo.offt}}</div>
@ -217,7 +217,6 @@
217 217
        ifDefault2: false,
218 218
        dataO: {
219 219
          serModifyTime: '',
220
221 220
          patTime: '',
222 221
          patId: ''
223 222
        },
@ -250,6 +249,11 @@
250 249
            if ($info.industry) {
251 250
              $info.industry = util.strToArr($info.industry);
252 251
            }
252
            if ($info.hasHeadImage) {
253
              $info.img = util.ImageUrl(('head/' + $info.id + '_l.jpg'), true)
254
            } else {
255
              $info.img = util.defaultSet.img.expert
256
            }
253 257
            $info.resAreas = [];
254 258
            if ($info.researchAreas && $info.researchAreas.length > 0) {
255 259
              for (let i = 0; i < $info.researchAreas.length; ++i) {
@ -345,9 +349,6 @@
345 349
          }
346 350
        });
347 351
      },
348
      headUrl(item) {
349
        return item.hasHeadImage ? util.ImageUrl(('head/' + item.id + '_l.jpg'), true) : util.defaultSet.img.expert;
350
      },
351 352
      headIcon(item) {
352 353
        return util.autho(item.authType, item.orgAuth, item.authStatus);
353 354
      }

+ 29 - 23
src/views/infoshow/orgShow/index.vue

@ -4,11 +4,11 @@
4 4
      <div class="content-wrapper">
5 5
        <div class="headcon-box org-head">
6 6
          <div class="show-head headimg-box">
7
            <img :src="orgLogoUrl(orgInfo)">
7
            <img :src="orgInfo.logo">
8 8
          </div>
9 9
          <div class="show-info reInfo-box">
10 10
            <div class="info-tit">{{orgInfo.forShort ? orgInfo.forShort : orgInfo.name}}<em class="authicon" :class="{'icon-com': orgInfo.authStatus==='3'}"></em></div>
11
            <div class="info-tag"><span v-if="orgInfo.title" style="margin-right:10px">{{orgInfo.orgType}}</span> {{orgInfo.industry ? orgInfo.industry.replace(/,/gi, " | ") : ''}}</div>
11
            <div class="info-tag"><span v-if="orgInfo.title" style="margin-right:10px">{{orgInfo.orgType}}</span></div>
12 12
            <div class="info-operate">
13 13
              <div class="addr">{{orgInfo.city}}</div>
14 14
              <shareOut :tUrl="elurl"></shareOut>
@ -145,10 +145,10 @@
145 145
</template>
146 146
147 147
<script>
148
  import '@/common/stylus/listitem.styl';
149
  import '@/common/stylus/browse.styl';
148
  import '@/styles/listitem.scss';
149
  import '@/styles/browse.scss';
150 150
  import util from '@/libs/util';
151
  import httpUrl from '@/libs/http';
151
  import queryDict from '@/libs/queryDict';
152 152
153 153
  import shareOut from '../components/ShareOut';
154 154
  import baseService from '@/views/sub-component/BaseService';
@ -156,10 +156,10 @@
156 156
  export default {
157 157
    data() {
158 158
      return {
159
        activeIndex: '1',
160 159
        activeName: 'first',
160
        numRanger: [],
161
        compType: [],
161 162
        orgInfo: '',
162
        orgRegInfo: '',
163 163
        elurl: '',
164 164
        platServices: [],
165 165
        platResources: []
@ -168,6 +168,7 @@
168 168
    created() {
169 169
      this.orgId = util.urlParse('id');
170 170
      this.elurl = window.location.href;
171
      this.getDictoryData();
171 172
      this.getorgInfo();
172 173
    },
173 174
    components: {
@ -175,11 +176,29 @@
175 176
      baseService
176 177
    },
177 178
    methods: {
179
      getDictoryData() {
180
        const that = this
181
        queryDict.applyDict('QYGM', function(dictData) {
182
          dictData.map(item => {
183
            that.numRanger[item.code] = item.caption
184
          })
185
        }) // 企业规模
186
        queryDict.applyDict('QYLX', function(dictData) {
187
          dictData.map(item => {
188
            that.compType[item.code] = item.caption
189
          })
190
        }) // 企业类型
191
      },
178 192
      getorgInfo() {
179
        this.$axios.get(httpUrl.kxQurey.org.query + this.orgId, {
193
        this.$axios.getk('/ajax/org/' + this.orgId, {
180 194
        }, (res) => {
181 195
          if (res.success) {
182 196
            var $info = res.data;
197
            if ($info.hasOrgLogo) {
198
              $info.logo = util.ImageUrl(('org/' + $info.id + '.jpg'), true)
199
            } else {
200
              $info.logo = util.defaultSet.img.org
201
            }
183 202
            if ($info.subject) {
184 203
              $info.subject = util.strToArr($info.subject);
185 204
            }
@ -190,27 +209,14 @@
190 209
              $info.foundTime = util.TimeTr($info.foundTime);
191 210
            }
192 211
            if ($info.orgSize) {
193
              $info.orgSize = util.orgSizeShow[$info.orgSize];
212
              $info.orgSize = this.numRanger[$info.orgSize];
194 213
            }
195 214
            if ($info.orgType) {
196
              $info.orgType = util.orgTypeShow[$info.orgType];
215
              $info.orgType = this.compType[$info.orgType];
197 216
            }
198 217
            this.orgInfo = $info;
199 218
          };
200 219
        });
201
      },
202
      getorgRegInfo(oName) {
203
        this.$axios.get(httpUrl.kxQurey.org.reg, {
204
          name: oName
205
        }, (res) => {
206
          if (res.success) {
207
            var $info = res.data;
208
            this.orgRegInfo = $info;
209
          };
210
        });
211
      },
212
      orgLogoUrl(item) {
213
        return item.hasOrgLogo ? util.ImageUrl(('org/' + item.id + '.jpg'), true) : util.defaultSet.img.org;
214 220
      }
215 221
    }
216 222
  };

+ 0 - 1
src/views/infoshow/resourceShow/index.vue

@ -83,7 +83,6 @@
83 83
  import '@/styles/listitem.scss';
84 84
  import '@/styles/browse.scss';
85 85
  import util from '@/libs/util';
86
  import httpUrl from '@/libs/http';
87 86
88 87
  import previewMagnify from '../components/previewMagnify';
89 88
  import shareOut from '../components/ShareOut';

+ 0 - 1
src/views/infoshow/resultShow/patent.vue

@ -93,7 +93,6 @@
93 93
  import '@/styles/listitem.scss';
94 94
  import '@/styles/browse.scss';
95 95
  import util from '@/libs/util';
96
  import httpUrl from '@/libs/http';
97 96
98 97
  import shareOut from '../components/ShareOut';
99 98
  import collectCo from '../components/CollectCo';

+ 2 - 2
src/views/infoshow/serviceShow/index.vue

@ -79,8 +79,8 @@
79 79
</template>
80 80
81 81
<script>
82
  import '@/common/stylus/listitem.styl';
83
  import '@/common/stylus/browse.styl';
82
  import '@/styles/listitem.scss';
83
  import '@/styles/browse.scss';
84 84
  import util from '@/libs/util';
85 85
  import httpUrl from '@/libs/http';
86 86

+ 25 - 14
src/views/sub-component/BaseAgency.vue

@ -1,14 +1,14 @@
1 1
<template>
2 2
  <div>
3 3
    <div class="block-container">
4
      <router-link class="block-item org-item" v-for="item in orgData" :key="item.index"  :to="{name:'org_show',query:{id:itemSingle.id}}" target="_blank">
4
      <router-link class="block-item org-item" v-for="item in orgData" :key="item.index"  :to="{name:'org_show',query:{id:item.id}}" target="_blank">
5 5
        <div class="item-block-org">
6 6
          <div class="item-pic-org">
7
            <img :src="orgLogoUrl(item)">
7
            <img :src="item.logo">
8 8
          </div>
9 9
          <div class="item-text-org">
10 10
            <div class="item-tit-org"><span>{{item.name}}</span><em class="authicon" :class="{'icon-com': item.authStatus==='3'}"></em></div>
11
            <p class="item-tag-org">{{item.industry.replace(/,/gi, ' | ')}}</p>
11
            <p class="item-tag-org">{{item.industry}}</p>
12 12
          </div>
13 13
        </div>
14 14
      </router-link>
@ -18,8 +18,8 @@
18 18
</template>
19 19
20 20
<script>
21
  import Cookies from 'js-cookie';
22 21
  import util from '@/libs/util';
22
  import queryBase from '@/libs/queryBase';
23 23
24 24
  export default {
25 25
    props: {
@ -29,7 +29,6 @@
29 29
    },
30 30
    data() {
31 31
      return {
32
        platId: '',
33 32
        rows: 30,
34 33
        orgData: [],
35 34
        loadingModalShow: true, // 是否显示按钮
@ -39,28 +38,40 @@
39 38
      };
40 39
    },
41 40
    created() {
42
       this.platId = Cookies.get('platId');
43 41
       this.ResidentOrgs();
44 42
    },
45 43
    methods: {
46
      ResidentOrgs(id) {
44
      ResidentOrgs() {
47 45
        this.$axios.get('/ajax/org/list', {}, (res) => {
48 46
          if (res.success) {
49
            var $info = res.data;
50
            if ($info.length > 0) {
47
            var $data = res.data;
48
            if ($data.length > 0) {
49
              for (let i = 0; i < $data.length; i++) {
50
                queryBase.getOrganization($data[i].id, function(sc, value) {
51
                  if (sc) {
52
                    var owner = $data[i]
53
                    owner.name = value.name
54
                    if (value.hasOrgLogo) {
55
                      owner.logo = util.ImageUrl(('org/' + value.id + '.jpg'), true)
56
                    } else {
57
                      owner.logo = util.defaultSet.img.org
58
                    }
59
                    if (value.industry) {
60
                      owner.industry = value.industry.replace(/,/g, ' | ')
61
                    }
62
                  }
63
                })
64
              }
51 65
              this.isFormSearch = true;
52
              this.orgData = this.orgData.concat($info);
66
              this.orgData = this.orgData.concat($data);
53 67
            };
54
            if ($info.length < this.rows) {
68
            if ($data.length < this.rows) {
55 69
              this.loadingModalShow = false;
56 70
              this.isFormSearch = false;
57 71
            };
58 72
          };
59 73
        });
60 74
      },
61
      orgLogoUrl(item) {
62
        return item.hasOrgLogo ? util.ImageUrl(('org/' + item.id + '.jpg'), true) : util.defaultSet.img.org;
63
      },
64 75
      loadLower() {
65 76
        if (this.loadingModalShow && !this.isLoading) {
66 77
          this.ResidentOrgs(this.platId);

+ 13 - 31
src/views/sub-component/BaseExpert.vue

@ -1,8 +1,8 @@
1 1
<template>
2 2
  <div>
3 3
    <div class="block-container">
4
      <router-link class="block-item" v-for="item in userData" :key="item.index" :to="{name:'exp_show',query:{id:itemSingle.id}}" target="_blank">
5
        <div class="show-head" :style="{backgroundImage:'url('+ headUrl(item) +')'}"></div>
4
      <router-link class="block-item" v-for="item in userData" :key="item.index" :to="{name:'exp_show',query:{id:item.id}}" target="_blank">
5
        <div class="show-head" :style="{backgroundImage:'url('+ item.img +')'}"></div>
6 6
        <div class="show-info">
7 7
          <div class="info-tit">{{item.name}}<em class="authicon" :class="headIcon(item)"></em></div>
8 8
          <div class="info-tag" v-if="item.offt">{{item.offt}}</div>
@ -15,8 +15,8 @@
15 15
</template>
16 16
17 17
<script>
18
  import Cookies from 'js-cookie';
19 18
  import util from '@/libs/util';
19
  import queryBase from '@/libs/queryBase';
20 20
21 21
  export default {
22 22
    props: {
@ -26,13 +26,8 @@
26 26
    },
27 27
    data() {
28 28
      return {
29
        platId: '',
30 29
        rows: 30,
31 30
        userData: [],
32
        dataO: {
33
          bUid: '',
34
          bTime: ''
35
        },
36 31
        loadingModalShow: true, // 是否显示按钮
37 32
        loadingComplete: false, // 是否全部加载
38 33
        isFormSearch: false, // 数据加载
@ -40,41 +35,28 @@
40 35
      };
41 36
    },
42 37
    created() {
43
       this.platId = Cookies.get('platId');
44 38
       this.buttedProfessors();
45 39
    },
46 40
    methods: {
47 41
      buttedProfessors(id) {
48
        this.$axios.getk('/ajax/platform/info/buttedProfessors', {
49
          pid: this.platId,
50
          uid: this.dataO.bUid,
51
          time: this.dataO.bTime,
52
          rows: this.num ? this.num : this.rows
53
        }, (res) => {
42
        this.$axios.get('/ajax/professor/list', {}, (res) => {
54 43
          if (res.success) {
55 44
            var $data = res.data;
56 45
            if ($data.length > 0) {
57
              this.dataO.bUid = $data[$data.length - 1].id;
58
              this.dataO.bTime = $data[$data.length - 1].buttedTime;
59 46
              this.isFormSearch = true;
60 47
              for (let i = 0; i < $data.length; i++) {
61
                if ($data[i].title) {
62
                  if ($data[i].orgName) {
63
                    $data[i].offt = $data[i].title + ',' + $data[i].orgName;
64
                  } else {
65
                    $data[i].offt = $data[i].title;
66
                  }
67
                } else {
68
                  if ($data[i].office) {
69
                    if ($data[i].orgName) {
70
                      $data[i].offt = $data[i].office + ',' + $data[i].orgName;
48
                queryBase.getProfessor($data[i].id, function(sc, value) {
49
                  if (sc) {
50
                    var owner = $data[i]
51
                    owner.name = value.name
52
                    owner.offt = util.formatOfft(value, true)
53
                    if (value.hasHeadImage) {
54
                      owner.img = util.ImageUrl(('head/' + value.id + '_l.jpg'), true)
71 55
                    } else {
72
                      $data[i].offt = $data[i].office;
56
                      owner.img = util.defaultSet.img.expert
73 57
                    }
74
                  } else {
75
                    $data[i].offt = '';
76 58
                  }
77
                }
59
                })
78 60
                this.$axios.getk('/ajax/researchArea/' + $data[i].id, {}, (res) => {
79 61
                  const $info = res.data;
80 62
                  let arr = [];

+ 0 - 1
src/views/sub-component/BaseResource.vue

@ -21,7 +21,6 @@
21 21
    },
22 22
    data() {
23 23
      return {
24
        linkway: util.defaultSet.link.resource + this.itemSingle.id,
25 24
        imgUrl: (this.itemSingle && this.itemSingle.images) ? util.ImageUrl('resource/' + this.itemSingle.images.split(',')[0]) : util.defaultSet.img.resource,
26 25
        ownerName: '',
27 26
        ownerAuth: ''

+ 0 - 1
src/views/sub-component/BaseService.vue

@ -21,7 +21,6 @@
21 21
    },
22 22
    data() {
23 23
      return {
24
        linkway: util.defaultSet.link.service + this.itemSingle.id,
25 24
        imgUrl: (this.itemSingle && this.itemSingle.images) ? util.ImageUrl('ware/' + this.itemSingle.images.split(',')[0]) : util.defaultSet.img.service,
26 25
        ownerName: '',
27 26
        ownerAuth: ''

+ 0 - 151
src/views/sub-component/DynamicTags.vue

@ -1,151 +0,0 @@
1
<template>
2
  <el-form-item :label="tagInfo.lableTit" ref="tagComponent">
3
    <el-tag
4
      :key="tag"
5
      v-for="tag in dynamicTags"
6
      closable
7
      :disable-transitions="false"
8
      @close="handleClose(tag)">
9
      {{tag}}
10
    </el-tag>
11
    <el-autocomplete
12
      class="input-new-tag"
13
      v-if="inputVisible"
14
      v-model="inputValue"
15
      ref="saveTagInput"
16
      size="medium"
17
      :fetch-suggestions="querySearch"
18
      :placeholder="tagInfo.placeholder"
19
      :trigger-on-focus="false"
20
      @select="handleSelect"
21
      @keyup.enter.native="handleInputConfirm"
22
    >
23
      <template slot-scope="{ item }">
24
        <div class="name">{{ item.caption }}</div>
25
      </template>
26
    </el-autocomplete>
27
    <el-button v-else class="button-new-tag" v-show="isShowAdd" size="medium" @click="showInput">+ {{tagInfo.placeholder}}</el-button>
28
  </el-form-item>
29
</template>
30
31
<script>
32
  import httpUrl from '@/libs/http';
33
34
  export default {
35
    props: {
36
      tagInfo: {
37
        type: Object
38
      },
39
      dyStr: {
40
        type: String
41
      },
42
      dynamicTagsLength: {
43
        type: Number
44
      }
45
    },
46
    data() {
47
      return {
48
        inputVisible: false,
49
        inputValue: '',
50
        dynamicTags: [],
51
        isShowAdd: true,
52
        restaurants: [],
53
        loadAllKeys: []
54
      };
55
    },
56
    watch: {
57
      dyStr() {
58
        if (this.dyStr) {
59
          this.dynamicTags = this.dyStr.split(',');
60
          if (this.dynamicTags.length === this.dynamicTagsLength) {
61
            this.isShowAdd = false;
62
          };
63
        };
64
      }
65
    },
66
    methods: {
67
      // add tag
68
      handleClose(tag) {
69
        this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
70
        this.$emit('turnTags', this.dynamicTags.join(',')); // 传给父组件
71
        if (this.dynamicTags.length < this.dynamicTagsLength) {
72
          this.isShowAdd = true;
73
        }
74
      },
75
      showInput() {
76
        this.inputVisible = true;
77
        this.$nextTick(_ => {
78
          this.$refs.saveTagInput.$refs.input.focus();
79
        });
80
      },
81
      handleInputConfirm() {
82
        let inputValue = this.inputValue;
83
        if (inputValue.length > 15) {
84
          this.$alert(`${this.tagInfo.lableTit}不得超过15个字,添加失败!`, '提示', {
85
            confirmButtonText: '确定',
86
            type: 'warning',
87
            center: true
88
          });
89
          return false;
90
        }
91
        for (var i = 0; i < this.dynamicTags.length; i++) {
92
          if (inputValue === this.dynamicTags[i]) {
93
            this.$alert('添加的内容不能重复', '提示', {
94
              confirmButtonText: '确定',
95
              type: 'warning',
96
              center: true
97
            });
98
            return false;
99
          }
100
        }
101
        if (this.dynamicTags.length === this.dynamicTagsLength) {
102
          this.isShowAdd = false;
103
          return false;
104
        }
105
106
        this.dynamicTags.push(inputValue);
107
108
        this.$emit('turnTags', this.dynamicTags.join(',')); // 传给父组件
109
        this.inputVisible = false;
110
        this.inputValue = '';
111
      },
112
      // add tag
113
114
      querySearch(queryString, cb) {
115
        this.$axios.get(httpUrl.kxQurey.qaHotKey, {
116
          key: queryString
117
        }, (res) => {
118
          if (res.success) {
119
            var $info = res.data;
120
            var oSr = [];
121
            for (let i = 0; i < Math.min($info.length, 5); i++) {
122
              oSr[i] = $info[i];
123
            };
124
            this.loadAllKeys = oSr;
125
            // if (this.loadAllKeys.length === 0) {
126
            //   this.loadAllKeys = [{caption: '暂无数据'}]
127
            // };
128
            cb(this.loadAllKeys);
129
          };
130
        });
131
      },
132
      handleSelect(item) {
133
        this.inputValue = item.caption;
134
      }
135
    }
136
  };
137
</script>
138
139
<style lang="stylus" type="text/stylus">
140
  .el-tag + .el-tag
141
    margin-left: 10px
142
  .button-new-tag
143
    width: 400px
144
    height: 32px
145
    line-height: 30px
146
    padding-top: 0
147
    padding-bottom: 0
148
  .input-new-tag
149
    width: 400px
150
    vertical-align: bottom
151
</style>