LIPENGTAO1313 6 years ago
parent
commit
84b055b2c1

+ 37 - 37
src/components/bench-views/ArticleTemplate.vue

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)">{{item.addText}}</el-button>
39
          <el-button type="primary" size="small" @click.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', 'date1', 'date2'],
56
    props: ['keyValue', 'url', 'flag', 'addA', 'Delele'],
57
    data() {
57
    data() {
58
      return {
58
      return {
59
        expertParameters: {},
59
        expertParameters: {},
71
        this.expertParameters.key = this.keyValue;
71
        this.expertParameters.key = this.keyValue;
72
        this.expertList();
72
        this.expertList();
73
      },
73
      },
74
      date1: function () {
74
      addA: function () {
75
        this.expertList();
75
        this.expertList();
76
      },
76
      },
77
      date2: function () {
77
      Delele: function () {
78
        this.expertList();
78
        this.expertList();
79
      }
79
      }
80
    },
80
    },
109
          if (res.success) {
109
          if (res.success) {
110
            this.dataList = res.data.data;
110
            this.dataList = res.data.data;
111
            this.total = res.data.total;
111
            this.total = res.data.total;
112
            if (res.data.total.length === 0) {
112
            if (res.data.data.length === 0) {
113
              this.ifDefault = true;
113
              this.ifDefault = true;
114
            }
114
            }
115
            for (let i = 0; i < res.data.data.length; i++) {
115
            for (let i = 0; i < res.data.data.length; i++) {
160
        this.expertList();
160
        this.expertList();
161
      },
161
      },
162
      delet(id, index) {
162
      delet(id, index) {
163
        this.$axios.post(httpUrl.hQuery.orgTrends.del, {
164
              pid: this.platId,
165
              aid: id
166
          }).then((res) => {
167
            if (res.success) {
168
              this.$alert('确认删除该文章', '提示', {
169
                confirmButtonText: '确定',
170
                cancelButtonText: '取消',
171
                type: 'warning',
172
                center: true,
173
                callback: action => {
174
                  if (action === 'confirm') {
163
        this.$alert('确认删除该文章', '提示', {
164
          confirmButtonText: '确定',
165
          cancelButtonText: '取消',
166
          type: 'warning',
167
          center: true,
168
          callback: action => {
169
            if (action === 'confirm') {
170
              this.$axios.post(httpUrl.hQuery.orgTrends.del, {
171
                  pid: this.platId,
172
                  aid: id
173
                }).then((res) => {
174
                  if (res.success) {
175
                    this.dataList.splice(index, 1);
175
                    this.dataList.splice(index, 1);
176
                     this.$emit('isLogFn', '2');
177
                  };
178
                }
176
                    this.$emit('isLogFn', '2');
177
                  }
179
              });
178
              });
180
            }
181
          });
179
            };
180
          }
181
        });
182
      },
182
      },
183
      delet1(id, index) {
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
                  };
184
        this.$alert('确认删除该文章', '提示', {
185
          confirmButtonText: '确定',
186
          cancelButtonText: '取消',
187
          type: 'warning',
188
          center: true,
189
          callback: action => {
190
            if (action === 'confirm') {
191
              this.$axios.post(httpUrl.kxQurey.article.del, {
192
                articleId: id
193
              }).then((res) => {
194
                if (res.success) {
195
                  this.dataList.splice(index, 1);
197
                }
196
                }
198
              });
197
              });
199
            }
198
            }
200
          });
199
          }
200
        });
201
      },
201
      },
202
      add(item) {
202
      add(item) {
203
        this.$axios.post(httpUrl.hQuery.orgTrends.add, {
203
        this.$axios.post(httpUrl.hQuery.orgTrends.add, {
207
            if (res.success) {
207
            if (res.success) {
208
              item.addText = '已添加';
208
              item.addText = '已添加';
209
              this.$forceUpdate();
209
              this.$forceUpdate();
210
               this.$emit('isLogFn', '1');
210
              this.$emit('isLogFn', '1');
211
            }
211
            }
212
          });
212
          });
213
      }
213
      }

+ 6 - 13
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' :date2='date2' :date1='date1' v-on:isLogFn = "lisLogFn($event)"></ArticleTemplate>
9
    <ArticleTemplate :url='url' :keyValue='keyValue' :flag='3' :addA='addA' 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
     props: ['addA'],
17
     data() {
17
     data() {
18
      return {
18
      return {
19
        keyValue: '',
19
        keyValue: '',
20
        url: '/ajax/article/pgPublishNotInPlatform',
20
        url: '/ajax/article/pgPublishNotInPlatform',
21
        inValue: '',
22
        date2: false,
23
        date1:false
21
        inValue: ''
24
       };
22
       };
25
     },
23
     },
26
     components: {
24
     components: {
27
      ArticleTemplate
25
      ArticleTemplate
28
     },
26
     },
29
     watch: {
30
       date3: function () {
31
         this.date2 = this.date2;
32
       }
33
     },
34
     methods: {
27
     methods: {
35
     lisLogFn (par) {
36
        this.$emit('isLogFn', '1');
37
      },
28
       lisLogFn (par) {
29
          this.$emit('isLogFn', '1');
30
       },
38
       search() {
31
       search() {
39
         this.keyValue = this.inValue;
32
         this.keyValue = this.inValue;
40
       }
33
       }

+ 6 - 10
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' :date1='date1' :date2='date2' v-on:isLogFn = "lisLogFn($event)"></ArticleTemplate>
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">
13
    <el-dialog title="添加企业发布的文章至【企业动态】栏目" :visible.sync="dialogVisible" width="930px">
14
        <AlertBox></AlertBox>
14
        <AlertBox :addA='addA' v-on:isLogFn = "lisLogFn($event)"></AlertBox>
15
    </el-dialog>
15
    </el-dialog>
16
  </div>
16
  </div>
17
</template>
17
</template>
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
        Delele: false,
30
        addA: false
31
      };
31
      };
32
    },
32
    },
33
    components: {
33
    components: {
36
    },
36
    },
37
    methods: {
37
    methods: {
38
      lisLogFn (par) {
38
      lisLogFn (par) {
39
        
40
        if (par === '1') {
39
        if (par === '1') {
41
          this.date1 = !this.date1;
42
           console.log(this.date1);
40
          this.Delele = !this.Delele;
43
        } else {
41
        } else {
44
          alert(par)
45
          this.date2 = !this.date2;
46
          console.log(this.date2);
42
          this.addA = !this.addA;
47
        }
43
        }
48
      },
44
      },
49
      search() {
45
      search() {

+ 2 - 2
src/components/bench-views/demandSearch/DemandTemplate.vue

88
         platId: '',
88
         platId: '',
89
         searchValue: '',
89
         searchValue: '',
90
         isActive: '',
90
         isActive: '',
91
         options: util.Dictionary.durationTime,
91
         options: util.workComm.durationTime,
92
         value: '',
92
         value: '',
93
         budget: util.Dictionary.costRange,
93
         budget: util.workComm.costRange,
94
         budgetValue: '',
94
         budgetValue: '',
95
         sort: [{
95
         sort: [{
96
           value: '1',
96
           value: '1',

+ 42 - 2
src/libs/util.js

83
 * 数据字典
83
 * 数据字典
84
 */
84
 */
85
util.Dictionary = {
85
util.Dictionary = {
86
  durationTime: [{ // 预计合作周期
86
  durationTime: [{
87
      value: '1',
88
      label: '1个月内'
89
    }, {
90
      value: '2',
91
      label: '1-3个月'
92
    }, {
93
      value: '3',
94
      label: '3-6个月'
95
    }, {
96
      value: '4',
97
      label: '6-12个月'
98
    }, {
99
      value: '5',
100
      label: '1年以上'
101
    }],
102
  costRange: [{
103
      value: '1',
104
      label: '1万元以内'
105
    }, {
106
      value: '2',
107
      label: '1-5万元'
108
    }, {
109
      value: '3',
110
      label: '5-10万元'
111
    }, {
112
      value: '4',
113
      label: '10-20万元'
114
    }, {
115
      value: '5',
116
      label: '20-50万元'
117
    }, {
118
      value: '6',
119
      label: '50万元以上'
120
    }]
121
};
122
123
/**
124
 * 数据字典
125
 */
126
util.workComm = {
127
  durationTime: [{ // 费用预算
87
      value: '',
128
      value: '',
88
      label: '全部'
129
      label: '全部'
89
    }, {
130
    }, {
125
      label: '50万元以上'
166
      label: '50万元以上'
126
    }]
167
    }]
127
};
168
};
128
129
/**
169
/**
130
 * expert head symbol icon
170
 * expert head symbol icon
131
 */
171
 */