LIPENGTAO1313 6 years ago
parent
commit
b3be3abc1a

+ 42 - 12
src/components/bench-views/ArticleTemplate.vue

1
<template>
1
<template>
2
  <div class="searchList">
2
  <div class="searchList">
3
    <ul>
3
    <ul>
4
      <li class="list-item" v-for="(item, index) in dataList" :key="index" @click="kexiuExpert(item.articleId)">
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>
5
        <div class="list-head" :style="{ backgroundImage: 'url('+ imageDis(item)+')'}" ></div>
6
        <div class="list-info">
6
        <div class="list-info">
7
          <div class="list-tit">{{item.articleTitle}}</div>
7
          <div class="list-tit">{{item.articleTitle}}</div>
30
        </div>
30
        </div>
31
        <div class="dele" v-if='flag === 1'>
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>
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="delet(item.articleId, index)"></el-button>
33
          <el-button type="danger" icon="el-icon-delete" circle  @click.stop="delet1(item.articleId, index)"></el-button>
34
        </div>
34
        </div>
35
        <div class="dele" v-else-if='flag === 2'>
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>
36
          <el-button type="danger" icon="el-icon-delete" circle @click.stop="delet(item.articleId, index)"></el-button>
37
        </div>
37
        </div>
38
        <div class="dele" v-else-if='flag === 3'>
38
        <div class="dele" v-else-if='flag === 3'>
39
          <el-button type="primary" size="small" @click.once.stop="add(item.articleId)">{{addText}}</el-button>
39
          <el-button type="primary" size="small" @click.once.stop="add(item)">{{item.addText}}</el-button>
40
        </div>
40
        </div>
41
      </li>
41
      </li>
42
    </ul>
42
    </ul>
53
  import httpUrl from '@/libs/http';
53
  import httpUrl from '@/libs/http';
54
  import util from '@/libs/util';
54
  import util from '@/libs/util';
55
  export default {
55
  export default {
56
    props: ['keyValue', 'url', 'flag'],
56
    props: ['keyValue', 'url', 'flag', 'date1', 'date2'],
57
    data() {
57
    data() {
58
      return {
58
      return {
59
        expertParameters: {},
59
        expertParameters: {},
70
      keyValue: function () {
70
      keyValue: function () {
71
        this.expertParameters.key = this.keyValue;
71
        this.expertParameters.key = this.keyValue;
72
        this.expertList();
72
        this.expertList();
73
      },
74
      date1: function () {
75
        this.expertList();
76
      },
77
      date2: function () {
78
        this.expertList();
73
      }
79
      }
74
    },
80
    },
75
    created() {
81
    created() {
97
      },
103
      },
98
      comTime: util.dateChange,
104
      comTime: util.dateChange,
99
      expertList() {
105
      expertList() {
100
        this.dataList = [];
101
        this.$axios.get(util.ekexiuUrl + this.url, {
106
        this.$axios.get(util.ekexiuUrl + this.url, {
102
          params: this.expertParameters
107
          params: this.expertParameters
103
        }).then((res) => {
108
        }).then((res) => {
108
              this.ifDefault = true;
113
              this.ifDefault = true;
109
            }
114
            }
110
            for (let i = 0; i < res.data.data.length; i++) {
115
            for (let i = 0; i < res.data.data.length; i++) {
116
              res.data.data[i].addText = this.addText;
111
              if (this.flag !== 1) {
117
              if (this.flag !== 1) {
112
                this.leaveWordTotal(res.data.data[i]);
118
                this.leaveWordTotal(res.data.data[i]);
113
                this.companyName(res.data.data[i]);
119
                this.companyName(res.data.data[i]);
142
            }
148
            }
143
         });
149
         });
144
      },
150
      },
145
      kexiuExpert(id) {
146
        window.open(util.defaultSet.link.article + id);
151
      kexiuExpert(item) {
152
        if (item.status === '0' || item.status === '2') {
153
          this.$router.push({path: '/PublishArticle?arId=' + item.articleId});
154
        } else {
155
          window.open(util.defaultSet.link.article + item.articleId);
156
        }
147
      },
157
      },
148
      handleCurrentChange(val) {
158
      handleCurrentChange(val) {
149
        this.expertParameters.pageNo = val;
159
        this.expertParameters.pageNo = val;
163
                callback: action => {
173
                callback: action => {
164
                  if (action === 'confirm') {
174
                  if (action === 'confirm') {
165
                    this.dataList.splice(index, 1);
175
                    this.dataList.splice(index, 1);
176
                     this.$emit('isLogFn', '2');
166
                  };
177
                  };
167
                }
178
                }
168
              });
179
              });
169
            }
180
            }
170
          });
181
          });
171
      },
182
      },
172
      add(id) {
183
      delet1(id, index) {
184
        this.$axios.post(httpUrl.kxQurey.article.del, {
185
              articleId: id
186
          }).then((res) => {
187
            if (res.success) {
188
              this.$alert('确认删除该文章', '提示', {
189
                confirmButtonText: '确定',
190
                cancelButtonText: '取消',
191
                type: 'warning',
192
                center: true,
193
                callback: action => {
194
                  if (action === 'confirm') {
195
                    this.dataList.splice(index, 1);
196
                  };
197
                }
198
              });
199
            }
200
          });
201
      },
202
      add(item) {
173
        this.$axios.post(httpUrl.hQuery.orgTrends.add, {
203
        this.$axios.post(httpUrl.hQuery.orgTrends.add, {
174
            params: {
175
              pid: this.platId,
204
              pid: this.platId,
176
              aid: id
177
            }
205
              aid: item.articleId
178
          }).then((res) => {
206
          }).then((res) => {
179
            if (res.success) {
207
            if (res.success) {
180
              this.addText = '已添加';
208
              item.addText = '已添加';
209
              this.$forceUpdate();
210
               this.$emit('isLogFn', '1');
181
            }
211
            }
182
          });
212
          });
183
      }
213
      }

+ 13 - 2
src/components/bench-views/contentManagement/AlertBox.vue

6
         <el-button type="primary" icon="el-icon-search" @click="search">搜索</el-button>
6
         <el-button type="primary" icon="el-icon-search" @click="search">搜索</el-button>
7
       </div>
7
       </div>
8
    </div>
8
    </div>
9
    <ArticleTemplate :url='url' :keyValue='keyValue' :flag='3'></ArticleTemplate>
9
    <ArticleTemplate :url='url' :keyValue='keyValue' :flag='3' :date2='date2' :date1='date1' v-on:isLogFn = "lisLogFn($event)"></ArticleTemplate>
10
  </div>
10
  </div>
11
</template>
11
</template>
12

12

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

+ 15 - 2
src/components/bench-views/contentManagement/Dynamic.vue

9
        </el-button>
9
        </el-button>
10
      </div>
10
      </div>
11
    </div>
11
    </div>
12
    <ArticleTemplate :url='url' :keyValue='keyValue' :flag='2'></ArticleTemplate>
12
    <ArticleTemplate :url='url' :keyValue='keyValue' :flag='2' :date1='date1' :date2='date2' v-on:isLogFn = "lisLogFn($event)"></ArticleTemplate>
13
    <el-dialog title="添加企业发布的文章至【企业动态】栏目" :visible.sync="dialogVisible" width="930px">
13
    <el-dialog title="添加企业发布的文章至【企业动态】栏目" :visible.sync="dialogVisible" width="930px">
14
        <AlertBox></AlertBox>
14
        <AlertBox></AlertBox>
15
    </el-dialog>
15
    </el-dialog>
25
        dialogVisible: false,
25
        dialogVisible: false,
26
        keyValue: '',
26
        keyValue: '',
27
        url: '/ajax/article/pgPublishInPlatform',
27
        url: '/ajax/article/pgPublishInPlatform',
28
        inValue: ''
28
        inValue: '',
29
        date1: false,
30
        date2: false
29
      };
31
      };
30
    },
32
    },
31
    components: {
33
    components: {
33
      AlertBox
35
      AlertBox
34
    },
36
    },
35
    methods: {
37
    methods: {
38
      lisLogFn (par) {
39
        
40
        if (par === '1') {
41
          this.date1 = !this.date1;
42
           console.log(this.date1);
43
        } else {
44
          alert(par)
45
          this.date2 = !this.date2;
46
          console.log(this.date2);
47
        }
48
      },
36
      search() {
49
      search() {
37
        this.keyValue = this.inValue;
50
        this.keyValue = this.inValue;
38
      }
51
      }

+ 3 - 3
src/components/form-views/BindAccount.vue

76
      },
76
      },
77
      cblur(ar) {
77
      cblur(ar) {
78
        if (util.regular(this.emailName.trim(), 'mail')) {
78
        if (util.regular(this.emailName.trim(), 'mail')) {
79
          this.$axios.get(httpUrl.platUrl + '/ajax/platform/checkEmail', {
79
          this.$axios.get(util.ekexiuUrl + '/ajax/platform/checkEmail', {
80
            params: {
80
            params: {
81
              email: this.emailName
81
              email: this.emailName
82
            }
82
            }
87
              } else {
87
              } else {
88
                    if (ar === 1) {
88
                    if (ar === 1) {
89
                      this.dialogFormVisible = false;
89
                      this.dialogFormVisible = false;
90
                      this.$axios.post(httpUrl.platUrl + '/ajax/platform/reqBindMail', {
90
                      this.$axios.post(util.ekexiuUrl + '/ajax/platform/reqBindMail', {
91
                          id: this.platId,
91
                          id: this.platId,
92
                          mail: this.emailName,
92
                          mail: this.emailName,
93
                          url: 'http://localhost:7070/upMail?sc'
93
                          url: httpUrl.platUrl + '/upMail?sc'
94
                      }).then((res) => {
94
                      }).then((res) => {
95
                        if (res.success) {
95
                        if (res.success) {
96
                          this.dias = true;
96
                          this.dias = true;

+ 1 - 1
src/libs/util.js

23
  link: {
23
  link: {
24
    expert: ekexiuUrl + '/userInforShow.html?professorId=',
24
    expert: ekexiuUrl + '/userInforShow.html?professorId=',
25
    org: ekexiuUrl + '/cmpInforShow.html?orgId=',
25
    org: ekexiuUrl + '/cmpInforShow.html?orgId=',
26
    article: ekexiuUrl + '/articalList.html?articleId=',
26
    article: ekexiuUrl + '/articalShow.html?articleId=',
27
    resource: ekexiuUrl + '/resourceShow.html?resourceId=',
27
    resource: ekexiuUrl + '/resourceShow.html?resourceId=',
28
    service: ekexiuUrl + '/sevriceShow.html?sevriceId=',
28
    service: ekexiuUrl + '/sevriceShow.html?sevriceId=',
29
    demand: ekexiuUrl + '/demandShow.html?demandId='
29
    demand: ekexiuUrl + '/demandShow.html?demandId='