You need to sign in or sign up before continuing.
Commit 0a7a1d13 0a7a1d137688383434fd2c9e53b29c77b0562408 by zhanghao

commit

1 parent 6cfee680
...@@ -172,7 +172,67 @@ ...@@ -172,7 +172,67 @@
172 label="机构code规则" 172 label="机构code规则"
173 min-width="3"> 173 min-width="3">
174 </el-table-column> 174 </el-table-column>
175 <el-table-column
176 label="操作"
177 min-width="1">
178 <template slot-scope="scope">
179 <el-button type="text" size="medium" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
180 </template>
181 </el-table-column>
175 </el-table> 182 </el-table>
183 <el-drawer
184 title="修改活动信息表"
185 :visible.sync="activityInfosDrawer"
186 direction="ltr">
187 <el-form :model="activityInfosForm" :label-width="formLabelWidth">
188 <el-form-item label="活动ID">
189 <el-input v-model="activityInfosForm.id" disabled></el-input>
190 </el-form-item>
191 <el-form-item label="上线状态">
192 <el-input v-model="activityInfosForm.status" disabled></el-input>
193 </el-form-item>
194 <el-form-item label="活动名称">
195 <el-input v-model="activityInfosForm.name" disabled></el-input>
196 </el-form-item>
197 <el-form-item label="参与角色">
198 <el-input v-model="activityInfosForm.joinRoleType" disabled></el-input>
199 </el-form-item>
200 <el-form-item label="预热开始时间">
201 <el-date-picker
202 v-model="activityInfosForm.displayStartTime"
203 type="datetime"
204 value-format="yyyy-MM-dd HH:mm:ss"
205 placeholder="选择日期时间"/>
206 </el-form-item>
207 <el-form-item label="活动开始时间">
208 <el-date-picker
209 v-model="activityInfosForm.startTime"
210 type="datetime"
211 value-format="yyyy-MM-dd HH:mm:ss"
212 placeholder="选择日期时间"/>
213 </el-form-item>
214 <el-form-item label="活动结束时间">
215 <el-date-picker
216 v-model="activityInfosForm.endTime"
217 type="datetime"
218 value-format="yyyy-MM-dd HH:mm:ss"
219 placeholder="选择日期时间"/>
220 </el-form-item>
221 <el-form-item label="展示结束时间">
222 <el-date-picker
223 v-model="activityInfosForm.displayEndTime"
224 type="datetime"
225 value-format="yyyy-MM-dd HH:mm:ss"
226 placeholder="选择日期时间"/>
227 </el-form-item>
228 <el-form-item label="机构code规则">
229 <el-input type="textarea" autosize="true" v-model="activityInfosForm.locationCodeRule"></el-input>
230 </el-form-item>
231 <el-form-item>
232 <el-button type="primary" @click="activityInfosFormSubmit">修改</el-button>
233 </el-form-item>
234 </el-form>
235 </el-drawer>
176 <br/> 236 <br/>
177 <br/> 237 <br/>
178 <a href="http://192.168.8.211:8090/pages/viewpage.action?pageId=38241498" target="_blank">抽奖规则设置表(health_activity.tbl_activity_dial_config)</a> 238 <a href="http://192.168.8.211:8090/pages/viewpage.action?pageId=38241498" target="_blank">抽奖规则设置表(health_activity.tbl_activity_dial_config)</a>
...@@ -324,7 +384,20 @@ ...@@ -324,7 +384,20 @@
324 activityInfos: [], 384 activityInfos: [],
325 activityPopPanels: [], 385 activityPopPanels: [],
326 operateBannerInfos: [], 386 operateBannerInfos: [],
327 operateMsgInfos: [] 387 operateMsgInfos: [],
388 activityInfosDrawer: false,
389 activityInfosForm: {
390 id: '',
391 status: '',
392 name: '',
393 joinRoleType: '',
394 displayStartTime: '',
395 startTime: '',
396 endTime: '',
397 displayEndTime: '',
398 locationCodeRule: ''
399 },
400 formLabelWidth: '110px'
328 } 401 }
329 }, 402 },
330 mounted() { 403 mounted() {
...@@ -366,16 +439,57 @@ ...@@ -366,16 +439,57 @@
366 }); 439 });
367 }) 440 })
368 }, 441 },
369 openFullScreen() { 442 handleEdit(index, row) {
370 const loading = this.$loading({ 443 console.log(row);
371 lock: true, 444 this.activityInfosDrawer = true;
372 text: 'Loading', 445 this.activityInfosForm.id = row.id;
373 spinner: 'el-icon-loading', 446 this.activityInfosForm.status = row.status;
374 background: 'rgba(0, 0, 0, 0.7)' 447 this.activityInfosForm.name = row.name;
448 this.activityInfosForm.joinRoleType = row.joinRoleType;
449 this.activityInfosForm.displayStartTime = row.displayStartTime;
450 this.activityInfosForm.startTime = row.startTime;
451 this.activityInfosForm.endTime = row.endTime;
452 this.activityInfosForm.displayEndTime = row.displayEndTime;
453 this.activityInfosForm.locationCodeRule = row.locationCodeRule;
454 },
455 activityInfosFormSubmit() {
456 let config = {
457 headers: {
458 'Content-Type': 'application/x-www-form-urlencoded'
459 }
460 }
461 this.$http.get('/tool/activityInfosEdit?'+this.$qs.stringify({
462 id: this.activityInfosForm.id,
463 displayStartTime: this.activityInfosForm.displayStartTime,
464 startTime: this.activityInfosForm.startTime,
465 endTime: this.activityInfosForm.endTime,
466 displayEndTime: this.activityInfosForm.displayEndTime,
467 locationCodeRule: this.activityInfosForm.locationCodeRule
468 }),config).then((res)=>{
469 console.log(res);
470 this.activityInfosDrawer=false;
471 if(res.data=='success') {
472 this.$message({
473 showClose: true,
474 message: '活动信息表修改成功',
475 type: 'success'
375 }); 476 });
376 setTimeout(() => { 477 } else {
377 loading.close(); 478 this.$message({
378 }, 2000); 479 showClose: true,
480 message: '活动信息表修改失败',
481 type: 'error'
482 });
483 }
484 }).catch(error=>{
485 console.log(error);
486 this.activityInfosDrawer=false;
487 this.$message({
488 showClose: true,
489 message: '服务器处理失败,请核对参数!',
490 type: 'error'
491 });
492 })
379 } 493 }
380 } 494 }
381 } 495 }
......