@@ -57,13 +57,13 @@
row-key="id"
:row-class-name="tableRowClassName"
>
-
-
+ -->
-
-
+
+
@@ -246,7 +246,8 @@
isExpandAll: true,
// 重新渲染表格状态
refreshTable: true,
- county:false
+ county:false,
+ multipleSelection:[],
}
},
computed: {
@@ -267,7 +268,7 @@
if(!this.disabled) {
if(Array.isArray(newForm.district)){
if(newForm.district.length == 2) {
- let district = this.form.district[1].slice(1, 11);
+ let district = this.form.district[1].slice(0, 11);
obj = { ...this.pages, ...this.form,district };
} else if(newForm.district.length == 1) {
let district = this.form.district[0].slice(0, 8);
@@ -282,7 +283,7 @@
let district = this.form.district.slice(0, 8);
obj = { ...this.pages, ...this.form,district };
} else {
- let district = this.form.district.slice(1, 11);
+ let district = this.form.district.slice(0, 11);
obj = { ...this.pages, ...this.form,district };
}
}
@@ -325,8 +326,26 @@
// 页码,当前页切换事件
pagesChange(pages){
// console.log('123123页码发生变化')
- this.getList(pages)
this.pages = pages
+ let district
+ if(this.dept.ancestors.split(',').length == 2){
+ if(Array.isArray(this.form.district)) {
+ if(this.form.district.length == 2) {
+ district = this.form.district[1].slice(0, 11);
+ }
+ } else {
+ district = this.form.district.slice(0, 8);
+ }
+ } else if(this.dept.ancestors.split(',').length == 3){
+ district = this.form.district[1].slice(0, 11);
+ } else {
+ if(this.form.district.length == 2) {
+ district = this.form.district[1].slice(0, 11);
+ } else {
+ district = this.form.district[0].slice(0, 8);
+ }
+ }
+ this.getList({...pages,...this.form,district:district})
},
// 选中的数据
handleSelectionChange(val) {
@@ -335,6 +354,18 @@
},
// 导出
exportFile(){
+ // let arr = []
+ // this.multipleSelection.map((item)=>{
+ // arr.push(item.enterpriseId)
+ // })
+ // this.download(
+ // "/pharmaceuticals/bPlanEnterprise/exportplan",
+ // {
+ // enterpriseId:arr.join(',')
+ // },
+ // `计划管理.xlsx`
+ // );
+ // this.multipleSelection.length > 0 ? `确认导出选中的数据吗?` :
this.$confirm(`确认根据您的搜索条件导出搜索之后的数据吗?`, "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@@ -396,10 +427,10 @@
if(!this.disabled) {
if(Array.isArray(this.form.district)){
if(this.form.district.length == 2) {
- let district = this.form.district[1].slice(1, 11);
+ let district = this.form.district[1].slice(0, 11);
obj = { ...this.pages, ...this.form,district };
} else if(this.form.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 };
} else {
obj = { ...this.pages, ...this.form};
@@ -408,10 +439,10 @@
} else {
// 判断是区县
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 };
} else {
- let district = this.form.district.slice(1, 11);
+ let district = this.form.district.slice(0, 11);
obj = { ...this.pages, ...this.form,district };
}
}