LIPENGTAO1313 6 年之前
父節點
當前提交
b3be3abc1a

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

@ -1,7 +1,7 @@
1 1
<template>
2 2
  <div class="searchList">
3 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 5
        <div class="list-head" :style="{ backgroundImage: 'url('+ imageDis(item)+')'}" ></div>
6 6
        <div class="list-info">
7 7
          <div class="list-tit">{{item.articleTitle}}</div>
@ -30,13 +30,13 @@
30 30
        </div>
31 31
        <div class="dele" v-if='flag === 1'>
32 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 34
        </div>
35 35
        <div class="dele" v-else-if='flag === 2'>
36 36
          <el-button type="danger" icon="el-icon-delete" circle @click.stop="delet(item.articleId, index)"></el-button>
37 37
        </div>
38 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 40
        </div>
41 41
      </li>
42 42
    </ul>
@ -53,7 +53,7 @@
53 53
  import httpUrl from '@/libs/http';
54 54
  import util from '@/libs/util';
55 55
  export default {
56
    props: ['keyValue', 'url', 'flag'],
56
    props: ['keyValue', 'url', 'flag', 'date1', 'date2'],
57 57
    data() {
58 58
      return {
59 59
        expertParameters: {},
@ -70,6 +70,12 @@
70 70
      keyValue: function () {
71 71
        this.expertParameters.key = this.keyValue;
72 72
        this.expertList();
73
      },
74
      date1: function () {
75
        this.expertList();
76
      },
77
      date2: function () {
78
        this.expertList();
73 79
      }
74 80
    },
75 81
    created() {
@ -97,7 +103,6 @@
97 103
      },
98 104
      comTime: util.dateChange,
99 105
      expertList() {
100
        this.dataList = [];
101 106
        this.$axios.get(util.ekexiuUrl + this.url, {
102 107
          params: this.expertParameters
103 108
        }).then((res) => {
@ -108,6 +113,7 @@
108 113
              this.ifDefault = true;
109 114
            }
110 115
            for (let i = 0; i < res.data.data.length; i++) {
116
              res.data.data[i].addText = this.addText;
111 117
              if (this.flag !== 1) {
112 118
                this.leaveWordTotal(res.data.data[i]);
113 119
                this.companyName(res.data.data[i]);
@ -142,8 +148,12 @@
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 158
      handleCurrentChange(val) {
149 159
        this.expertParameters.pageNo = val;
@ -163,21 +173,41 @@
163 173
                callback: action => {
164 174
                  if (action === 'confirm') {
165 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 203
        this.$axios.post(httpUrl.hQuery.orgTrends.add, {
174
            params: {
175 204
              pid: this.platId,
176
              aid: id
177
            }
205
              aid: item.articleId
178 206
          }).then((res) => {
179 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,24 +6,35 @@
6 6
         <el-button type="primary" icon="el-icon-search" @click="search">搜索</el-button>
7 7
       </div>
8 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 10
  </div>
11 11
</template>
12 12

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

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

@ -9,7 +9,7 @@
9 9
        </el-button>
10 10
      </div>
11 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 13
    <el-dialog title="添加企业发布的文章至【企业动态】栏目" :visible.sync="dialogVisible" width="930px">
14 14
        <AlertBox></AlertBox>
15 15
    </el-dialog>
@ -25,7 +25,9 @@
25 25
        dialogVisible: false,
26 26
        keyValue: '',
27 27
        url: '/ajax/article/pgPublishInPlatform',
28
        inValue: ''
28
        inValue: '',
29
        date1: false,
30
        date2: false
29 31
      };
30 32
    },
31 33
    components: {
@ -33,6 +35,17 @@
33 35
      AlertBox
34 36
    },
35 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 49
      search() {
37 50
        this.keyValue = this.inValue;
38 51
      }

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

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

+ 1 - 1
src/libs/util.js

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