@@ -189,6 +189,7 @@
district:[],
plannedYear:''
},
+ district:[],
mydistrict:'',
props:{
value:'county',
@@ -268,11 +269,11 @@
if(!this.disabled) {
if(Array.isArray(newForm.district)){
if(newForm.district.length == 2) {
- let district = this.form.district[1].slice(0, 11);
- obj = { ...this.pages, ...this.form,district };
+ this.district = this.form.district[1].slice(0, 10);
+ obj = { ...this.pages, ...this.form,district:this.district };
} else if(newForm.district.length == 1) {
- let district = this.form.district[0].slice(0, 8);
- obj = { ...this.pages, ...this.form,district };
+ this.district = this.form.district[0].slice(0, 7);
+ obj = { ...this.pages, ...this.form,district:this.district };
} else {
obj = { ...this.pages, ...this.form};
}
@@ -280,11 +281,11 @@
} else {
// 判断是区县
if(this.county){
- let district = this.form.district.slice(0, 8);
- obj = { ...this.pages, ...this.form,district };
+ this.district = this.form.district.slice(0, 7);
+ obj = { ...this.pages, ...this.form,district:this.district };
} else {
- let district = this.form.district.slice(0, 11);
- obj = { ...this.pages, ...this.form,district };
+ this.district = this.form.district.slice(0, 10);
+ obj = { ...this.pages, ...this.form,district:this.district };
}
}
} else {
@@ -294,8 +295,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;
- obj = { ...this.pages, ...this.form,district };
+ this.district = this.form.district;
+ obj = { ...this.pages, ...this.form,district:this.district };
// }
}
// console.log(obj,'obj')
@@ -328,24 +329,24 @@
// console.log('123123页码发生变化')
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 if(this.form.district.length == 1){
- district = this.form.district[0].slice(0, 8);
- }
- }
- this.getList({...pages,...this.form,district: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, 10);
+ // }
+ // } else {
+ // district = this.form.district.slice(0, 7);
+ // }
+ // } else if(this.dept.ancestors.split(',').length == 3){
+ // district = this.form.district[1].slice(0, 10);
+ // } else {
+ // if(this.form.district.length == 2) {
+ // district = this.form.district[1].slice(0, 10);
+ // } else if(this.form.district.length == 1){
+ // district = this.form.district[0].slice(0, 7);
+ // }
+ // }
+ this.getList({...pages,...this.form,district:this.district})
},
// 选中的数据
handleSelectionChange(val) {
@@ -372,21 +373,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;
- }
+ // 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/bPlanEnterprise/exportplan",
{
...this.form,
- district
+ district:this.district
},
`计划管理.xlsx`
);
@@ -403,6 +404,7 @@
// this.pages.pageSize = 10;
// this.$refs.mypagination.defaultPages();
// let obj
+ this.district = [];
if(this.dept.ancestors.split(',').length == 1) {
this.form = {
plannedYear:'',
@@ -427,10 +429,10 @@
if(!this.disabled) {
if(Array.isArray(this.form.district)){
if(this.form.district.length == 2) {
- let district = this.form.district[1].slice(0, 11);
+ 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, 8);
+ let district = this.form.district[0].slice(0, 7);
obj = { ...this.pages, ...this.form,district };
} else {
obj = { ...this.pages, ...this.form};
@@ -439,10 +441,10 @@
} else {
// 判断是区县
if(this.county){
- let district = this.form.district.slice(0, 8);
+ let district = this.form.district.slice(0, 7);
obj = { ...this.pages, ...this.form,district };
} else {
- let district = this.form.district.slice(0, 11);
+ let district = this.form.district.slice(0, 10);
obj = { ...this.pages, ...this.form,district };
}
}
@@ -520,12 +522,12 @@
// let { district} = this.form;
let district
if(this.dept.ancestors.split(',').length == 2) {
- district = this.form.district.slice(0, 8);
+ district = this.form.district.slice(0, 7);
} else if(this.dept.ancestors.split(',').length == 3) {
district = this.form.district;
} else {
if(this.form.district.length == 1) {
- district = this.form.district.slice(0, 8);
+ district = this.form.district.slice(0, 7);
} else {
district = this.form.district;
}
diff --git a/vue.config.js b/vue.config.js
index 2c39ebe..a1c7c75 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -25,8 +25,8 @@ module.exports = {
// 部署生产环境和开发环境下的URL。
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
- // publicPath: process.env.NODE_ENV === "production" ? "/demo/suzhouyingjiPC/" : "/",
- publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
+ publicPath: process.env.NODE_ENV === "production" ? "/demo/suzhouyingjiPC/" : "/",
+ // publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
outputDir: "dist",
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)