|
|
|
@ -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) {
|
|
|
|
|