修复新增未加上参数

zhangtao
laozt 1 year ago
parent 9d1823eda5
commit 05105fb0d6

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

Loading…
Cancel
Save