LIPENGTAO1313 6 年之前
父節點
當前提交
84b055b2c1

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

@ -36,7 +36,7 @@
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)">{{item.addText}}</el-button>
39
          <el-button type="primary" size="small" @click.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', 'date1', 'date2'],
56
    props: ['keyValue', 'url', 'flag', 'addA', 'Delele'],
57 57
    data() {
58 58
      return {
59 59
        expertParameters: {},
@ -71,10 +71,10 @@
71 71
        this.expertParameters.key = this.keyValue;
72 72
        this.expertList();
73 73
      },
74
      date1: function () {
74
      addA: function () {
75 75
        this.expertList();
76 76
      },
77
      date2: function () {
77
      Delele: function () {
78 78
        this.expertList();
79 79
      }
80 80
    },
@ -109,7 +109,7 @@
109 109
          if (res.success) {
110 110
            this.dataList = res.data.data;
111 111
            this.total = res.data.total;
112
            if (res.data.total.length === 0) {
112
            if (res.data.data.length === 0) {
113 113
              this.ifDefault = true;
114 114
            }
115 115
            for (let i = 0; i < res.data.data.length; i++) {
@ -160,44 +160,44 @@
160 160
        this.expertList();
161 161
      },
162 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 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 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 202
      add(item) {
203 203
        this.$axios.post(httpUrl.hQuery.orgTrends.add, {
@ -207,7 +207,7 @@
207 207
            if (res.success) {
208 208
              item.addText = '已添加';
209 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,35 +6,28 @@
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' :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 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
     props: ['addA'],
17 17
     data() {
18 18
      return {
19 19
        keyValue: '',
20 20
        url: '/ajax/article/pgPublishNotInPlatform',
21
        inValue: '',
22
        date2: false,
23
        date1:false
21
        inValue: ''
24 22
       };
25 23
     },
26 24
     components: {
27 25
      ArticleTemplate
28 26
     },
29
     watch: {
30
       date3: function () {
31
         this.date2 = this.date2;
32
       }
33
     },
34 27
     methods: {
35
     lisLogFn (par) {
36
        this.$emit('isLogFn', '1');
37
      },
28
       lisLogFn (par) {
29
          this.$emit('isLogFn', '1');
30
       },
38 31
       search() {
39 32
         this.keyValue = this.inValue;
40 33
       }

+ 6 - 10
src/components/bench-views/contentManagement/Dynamic.vue

@ -9,9 +9,9 @@
9 9
        </el-button>
10 10
      </div>
11 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 13
    <el-dialog title="添加企业发布的文章至【企业动态】栏目" :visible.sync="dialogVisible" width="930px">
14
        <AlertBox></AlertBox>
14
        <AlertBox :addA='addA' v-on:isLogFn = "lisLogFn($event)"></AlertBox>
15 15
    </el-dialog>
16 16
  </div>
17 17
</template>
@ -26,8 +26,8 @@
26 26
        keyValue: '',
27 27
        url: '/ajax/article/pgPublishInPlatform',
28 28
        inValue: '',
29
        date1: false,
30
        date2: false
29
        Delele: false,
30
        addA: false
31 31
      };
32 32
    },
33 33
    components: {
@ -36,14 +36,10 @@
36 36
    },
37 37
    methods: {
38 38
      lisLogFn (par) {
39
        
40 39
        if (par === '1') {
41
          this.date1 = !this.date1;
42
           console.log(this.date1);
40
          this.Delele = !this.Delele;
43 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 45
      search() {

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

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

+ 42 - 2
src/libs/util.js

@ -83,7 +83,48 @@ util.mailHash = {
83 83
 * 数据字典
84 84
 */
85 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 128
      value: '',
88 129
      label: '全部'
89 130
    }, {
@ -125,7 +166,6 @@ util.Dictionary = {
125 166
      label: '50万元以上'
126 167
    }]
127 168
};
128
129 169
/**
130 170
 * expert head symbol icon
131 171
 */