修改删除新增

lijinlong^2
吕天方 1 year ago
parent e8b0df39bb
commit dcc9244146

@ -4,7 +4,7 @@
* @Author: JC9527 * @Author: JC9527
* @Date: 2023-09-04 10:20:06 * @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527 * @LastEditors: JC9527
* @LastEditTime: 2023-09-30 13:57:47 * @LastEditTime: 2023-09-30 15:59:35
--> -->
<template> <template>
<div class="plan-management"> <div class="plan-management">
@ -166,7 +166,7 @@
<my-pagination :total="total" @pagesChange="pagesChange" ref="mypagination"></my-pagination> <my-pagination :total="total" @pagesChange="pagesChange" ref="mypagination"></my-pagination>
</div> </div>
</div> </div>
<my-dialog ref="myDialog" v-on:close="padlock"></my-dialog> <my-dialog ref="myDialog" v-on:close="padlockOne"></my-dialog>
<my-dialogtwo ref="myDialogTwo"></my-dialogtwo> <my-dialogtwo ref="myDialogTwo"></my-dialogtwo>
<temp-dialog ref="tempDialog" v-on:close="padlock"></temp-dialog> <temp-dialog ref="tempDialog" v-on:close="padlock"></temp-dialog>
</div> </div>
@ -270,7 +270,7 @@
let district = this.form.district[1].slice(1, 11); let district = this.form.district[1].slice(1, 11);
obj = { ...this.pages, ...this.form,district }; obj = { ...this.pages, ...this.form,district };
} else if(newForm.district.length == 1) { } else if(newForm.district.length == 1) {
let district = this.form.district[0].slice(1, 8); let district = this.form.district[0].slice(0, 8);
obj = { ...this.pages, ...this.form,district }; obj = { ...this.pages, ...this.form,district };
} else { } else {
obj = { ...this.pages, ...this.form}; obj = { ...this.pages, ...this.form};
@ -279,7 +279,7 @@
} else { } else {
// //
if(this.county){ if(this.county){
let district = this.form.district.slice(1, 8); let district = this.form.district.slice(0, 8);
obj = { ...this.pages, ...this.form,district }; obj = { ...this.pages, ...this.form,district };
} else { } else {
let district = this.form.district.slice(1, 11); let district = this.form.district.slice(1, 11);
@ -386,7 +386,7 @@
} }
// this.getList(obj) // this.getList(obj)
}, },
// dialog // dialog
padlock(){ padlock(){
// let { district} = this.form; // let { district} = this.form;
this.pages.pageNum = 1; this.pages.pageNum = 1;
@ -423,6 +423,27 @@
// console.log('obj',obj) // console.log('obj',obj)
this.getList(obj); this.getList(obj);
}, },
padlockOne(){
this.pages.pageNum = 1;
this.pages.pageSize = 10;
this.$refs.mypagination.defaultPages();
if(this.dept.ancestors.split(',').length == 1) {
if(this.form.district.length == 0 || this.form.plannedYear == '') {
this.getList(this.pages);
} else {
this.form.district = [];
this.form.plannedYear = '';
}
} else {
if(this.form.district == this.mydistrict || this.form.plannedYear == '') {
this.getList(this.pages);
} else {
this.form.district = this.mydistrict
this.form.plannedYear = ''
}
}
// this.getList(this.pages);
},
// //
handleChange(value){ handleChange(value){
// console.log(value) // console.log(value)
@ -465,7 +486,19 @@
message: '删除成功', message: '删除成功',
type: 'success' type: 'success'
}); });
let { district} = this.form; // let { district} = this.form;
let district
if(this.dept.ancestors.split(',').length == 2) {
district = this.form.district.slice(0, 8);
} else if(this.dept.ancestors.split(',').length == 3) {
district = this.form.district;
} else {
if(this.form.district.length == 1) {
district = this.form.district.slice(0, 8);
} else {
district = this.form.district;
}
}
let obj = {...this.pages,district} let obj = {...this.pages,district}
this.getList(obj); this.getList(obj);
} }

Loading…
Cancel
Save