计划管理导出

lijinlong^2
吕天方 1 year ago
parent b735825b75
commit 59693d9fba

@ -56,7 +56,7 @@
</div> -->
<div class="select-input">
<div class="select-span">经济类型:</div>
<el-select v-model="form.economicsType" placeholder="请选择">
<el-select v-model="form.ecoTypeLarge" placeholder="请选择">
<el-option
v-for="item in dict.type.economic_categories"
:key="item.value"
@ -355,7 +355,7 @@ export default {
subdistrict:'',
form: {
subdistrict: [],
frimType: "",
ecoTypeLarge: "",
indusTypeClass: "",
isPoint: "",
majorHazardLevel: "",
@ -392,6 +392,7 @@ export default {
// unselected: 0,
selectList: [],
disabled:false,
county:false,
};
},
computed: {
@ -431,7 +432,7 @@ export default {
//
componendDistrict(district){
let name
this.myDistrict.map((item)=>{
this.district.map((item)=>{
if(item.subdistrict == district) {
name = item.institutionName
} else {
@ -471,18 +472,25 @@ export default {
let obj
//
if(!this.disabled) {
if(this.form.subdistrict.length > 0){
// console.log('123')
if(Array.isArray(this.form.subdistrict)){
if(this.form.subdistrict.length == 2) {
this.form.subdistrict = this.form.subdistrict[1]
this.subdistrict = this.form.subdistrict.slice(1, 11);
this.subdistrict = this.form.subdistrict[2].slice(1, 11);
obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
} else if(this.form.subdistrict.length == 1) {
this.form.subdistrict = this.form.subdistrict[0]
this.subdistrict = this.form.subdistrict.slice(1, 8);
this.subdistrict = this.form.subdistrict[1].slice(1, 8);
obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
} else {
obj = {...this.pages,...this.form}
}
} else {
obj = {...this.pages,...this.form}
if(this.county){
let subdistrict = this.form.subdistrict.slice(1, 8);
obj = { ...this.pages, ...this.form,subdistrict };
} else {
let subdistrict = this.form.subdistrict.slice(1, 8);
obj = { ...this.pages, ...this.form,subdistrict };
}
}
} else {
//
@ -647,9 +655,17 @@ export default {
this.pages = pages;
console.log(this.form)
if(this.dept.ancestors.split(',').length == 2){
this.subdistrict = this.form.subdistrict.slice(1, 8);
if(Array.isArray(this.form.subdistrict)) {
this.subdistrict = this.form.subdistrict.slice(1, 8);
} else {
this.subdistrict = this.form.subdistrict;
}
} else if(this.dept.ancestors.split(',').length == 3){
this.subdistrict = this.form.subdistrict.slice(1, 11);
if(Array.isArray(this.form.subdistrict)) {
this.subdistrict = this.form.subdistrict.slice(1, 11);
} else {
this.subdistrict = this.form.subdistrict;
}
}
this.getTable({...pages,...this.form,subdistrict:this.subdistrict});
},
@ -767,36 +783,46 @@ export default {
return "";
},
commentData(item,dept) {
// item.map((item)=>{
// if(item.children instanceof Array && item.children.length == 0){
// item.county = item.subdistrict
// delete item.children;
// } else {
// // this.props.value = 'subdistrict'
// this.commentData(item.children,dept)
// }
// })
item.map((item)=>{
if(item.children instanceof Array && item.children.length == 0){
item.county = item.subdistrict
delete item.children;
} else {
// this.props.value = 'subdistrict'
this.commentData(item.children,dept)
}
item.children.map((itemTwo)=>{
itemTwo.county = itemTwo.subdistrict
})
})
this.myDistrict = item;
// this.myDistrict = item;
this.listOne = item
if(dept.ancestors.split(',').length == 2) {
this.listOne = this.listOne.filter((item)=>{
return item.institutionName == dept.deptName
})
// this.listOne.map((item)=>{
// if(item.institutionName == dept.deptName) {
// this.form.subdistrict = item.county
// this.workingArea = item.county
// delete item.children
// }
// })
// this.disabled = true;
} else if(dept.ancestors.split(',').length == 3) {
this.listOne.map((item)=>{
if(item.institutionName == dept.deptName) {
this.form.subdistrict = item.subdistrict
console.log(item.county)
this.form.subdistrict = item.county
this.workingArea = item.county
this.county = true;
// delete item.children
}
})
// this.disabled = true;
} else if(dept.ancestors.split(',').length == 3) {
this.listOne.map((item)=>{
item.children.map((itemTwo)=>{
if(itemTwo.institutionName == dept.deptName) {
this.form.subdistrict = itemTwo.subdistrict
this.workingArea = itemTwo.county
this.county = false;
}
})
})
this.disabled = true;
}
},

@ -4,7 +4,7 @@
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527
* @LastEditTime: 2023-09-28 13:44:14
* @LastEditTime: 2023-09-29 15:40:31
-->
<template>
<div class="plan-management">
@ -246,6 +246,7 @@
isExpandAll: true,
//
refreshTable: true,
county:false
}
},
computed: {
@ -275,11 +276,12 @@
//
} else {
//
if(this.mydistrict){
let district = this.form.district.slice(1, 11);
if(this.county){
let district = this.form.district.slice(1, 8);
obj = { ...this.pages, ...this.form,district };
} else {
obj = this.pages
let district = this.form.district.slice(1, 11);
obj = { ...this.pages, ...this.form,district };
}
}
} else {
@ -288,11 +290,12 @@
// this.subdistrict = this.form.subdistrict.slice(1, 8);
// obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
// } else if(this.dept.ancestors.split(',').length == 3){
let district = this.form.district.slice(1, 11);
// let district = this.form.district.slice(1, 11);
let district = this.form.district;
obj = { ...this.pages, ...this.form,district };
// }
}
// console.log(obj,'obj')
console.log(obj,'obj')
this.getList(obj)
},
deep:true,
@ -301,9 +304,11 @@
methods:{
//
componendDistrict(district){
// console.log(district)
// console.log(this.myDistrict)
let name
this.myDistrict.map((item)=>{
if(item.subdistrict == district) {
if(item.county == district) {
name = item.institutionName
} else {
item.children.map((itemTwo)=>{
@ -334,10 +339,21 @@
type: "warning",
})
.then(() => {
let district
if(Array.isArray(this.form.district)){
if(this.form.district.length == 1){
district = this.form.district[0];
} else if(this.form.district.length == 2){
district = this.form.district[1];
}
} else {
district = this.form.district;
}
this.download(
"/pharmaceuticals/bPlanManage/export",
"/pharmaceuticals/bPlanEnterprise/exportplan",
{
...this.form,
district
},
`计划管理.xlsx`
);
@ -375,6 +391,7 @@
this.pages.pageSize = 10;
this.$refs.mypagination.defaultPages();
let obj = {...this.pages,district}
console.log('123')
this.getList(obj);
},
//
@ -449,15 +466,19 @@
this.total = res.data.total
},
commentData(item,dept){
item.map((item)=>{
if(item.children instanceof Array && item.children.length == 0){
item.county = item.subdistrict
delete item.children;
} else {
this.commentData(item.children,this.dept)
}
})
this.myDistrict = item;
// if(dept.ancestors.split(',').length == 3) {
item.map((item)=>{
// if(item.children instanceof Array && item.children.length == 0){
// item.county = item.subdistrict
// delete item.children;
// } else {
// this.commentData(item.children,this.dept)
// }
item.children.map((itemTwo)=>{
itemTwo.county = itemTwo.subdistrict
})
})
// }
this.options = item;
if(dept.ancestors.split(',').length == 2) {
this.options = this.options.filter((item)=>{
@ -465,20 +486,28 @@
})
this.options.map((item)=>{
if(item.institutionName == dept.deptName) {
console.log(item.county)
this.form.district = item.county
this.mydistrict = item.county
// console.log(item.county)
this.form.district = item.county;
this.mydistrict = item.county;
this.county = true;
// delete item.children
}
})
// this.disabled = true;
} else if(dept.ancestors.split(',').length == 3) {
// console.log(this.options)
this.options.map((item)=>{
if(item.institutionName == dept.deptName) {
console.log(item.institutionName)
this.form.district = item.subdistrict
this.mydistrict = item.subdistrict
}
// console.log(item.children,'item.children')
item.children.map((itemTwo)=>{
if(itemTwo.institutionName == dept.deptName) {
this.form.district = itemTwo.subdistrict;
// this.form.district.push(item.county,itemTwo.subdistrict);
// console.log(this.form.district,'item.institutionName')
this.mydistrict = itemTwo.subdistrict;
this.county = false;
// delete itemTwo.children
}
})
})
this.disabled = true;
}
@ -486,8 +515,9 @@
},
async created() {
console.log(this.dept)
// console.log(this.district)
this.checkListTwo = this.checkList;
this.myDistrict = this.district;
console.log(this.myDistrict)
// this.checkListTwo = this.checkList;
// this.$nextTick(()=>{
// let dom = document.getElementsByClassName('tables');
// let height = dom[0].getBoundingClientRect();

Loading…
Cancel
Save