修复新增未加上参数

zhangtao
laozt 1 year ago
parent 9d1823eda5
commit 05105fb0d6

@ -188,7 +188,7 @@ export default {
this.pages.pageSize = 10; this.pages.pageSize = 10;
this.$refs.mypagination.defaultPages(); this.$refs.mypagination.defaultPages();
let obj; let obj;
console.log(newForm, "newForm"); // console.log(newForm, "newForm");
// //
if (!this.disabled) { if (!this.disabled) {
if (Array.isArray(newForm.district)) { if (Array.isArray(newForm.district)) {
@ -335,29 +335,60 @@ export default {
// console.log('obj',obj) // console.log('obj',obj)
this.getList(obj); this.getList(obj);
}, },
// dialog
padlockOne() { padlockOne() {
this.pages.pageNum = 1; this.pages.pageNum = 1;
this.pages.pageSize = 10; this.pages.pageSize = 10;
this.$refs.mypagination.defaultPages(); this.$refs.mypagination.defaultPages();
if (this.dept.ancestors.split(",").length == 1) { let obj;
if (this.form.district.length == 0 || this.form.plannedYear == "") { if (!this.disabled) {
this.getList(this.pages); if (Array.isArray(this.form.district)) {
if (this.form.district.length == 2) {
let district = this.form.district[1].slice(0, 10);
obj = { ...this.pages, ...this.form, district };
} else if (this.form.district.length == 1) {
let district = this.form.district[0].slice(0, 7);
obj = { ...this.pages, ...this.form, district };
} else { } else {
this.form.district = []; obj = { ...this.pages, ...this.form };
this.form.plannedYear = "";
} }
//
} else { } else {
if ( //
this.form.district == this.mydistrict || if (this.county) {
this.form.plannedYear == "" let district = this.form.district.slice(0, 7);
) { obj = { ...this.pages, ...this.form, district };
this.getList(this.pages);
} else { } else {
this.form.district = this.mydistrict; let district = this.form.district.slice(0, 10);
this.form.plannedYear = ""; obj = { ...this.pages, ...this.form, district };
} }
} }
} else {
//
let district = this.form.district;
obj = { ...this.pages, ...this.form, district };
}
// console.log('obj',obj)
this.getList(obj);
// if (this.dept.ancestors.split(",").length == 1) {
// if (this.form.district.length == 0 || this.form.plannedYear == "") {
// this.getList(this.pages); // 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 = "";
// }
// }
}, },
// //
handleChange(value) {}, handleChange(value) {},
@ -477,8 +508,8 @@ export default {
async created() { async created() {
// let data = await this.$api.yingji.tree(); // let data = await this.$api.yingji.tree();
// this.myDistrict = data.data; // this.myDistrict = data.data;
let treeData = JSON.parse(localStorage.getItem("TREE_DATA")) let treeData = JSON.parse(localStorage.getItem("TREE_DATA"));
this.myDistrict = treeData this.myDistrict = treeData;
this.commentData(treeData, this.dept); this.commentData(treeData, this.dept);
if (this.dept.ancestors.split(",").length == 1) { if (this.dept.ancestors.split(",").length == 1) {

Loading…
Cancel
Save