Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
house-type
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangjiankun
house-type
Commits
6f6af664
Commit
6f6af664
authored
Jul 16, 2020
by
wangjiankun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 文件下载方法提取公共 楼盘详情导出按钮加loading 容积率去掉百分号
parent
3be6a545
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
66 additions
and
46 deletions
+66
-46
index.js
src/assets/js/public/index.js
+15
-2
index.vue
src/components/propertyControll/index.vue
+2
-2
index.vue
src/views/ProductAnalysis/index.vue
+8
-12
index.vue
src/views/RegionalPlate/index.vue
+4
-3
plateCharacteristics.js
src/views/RegionalPlate/plateCharacteristics.js
+7
-0
index.vue
src/views/plateSupplyData/index.vue
+8
-12
index.vue
src/views/propertiesDetail/index.vue
+21
-14
planningInfoMap.js
src/views/propertiesDetail/planningInfoMap.js
+1
-1
No files found.
src/assets/js/public/index.js
View file @
6f6af664
...
...
@@ -41,7 +41,6 @@ export function averagePosition(array) {
}
}
// base64编码转BLOB对象
export
function
dataURLtoBlob
(
dataurl
)
{
var
arr
=
dataurl
.
split
(
','
);
var
bstr
=
atob
(
arr
[
1
]);
...
...
@@ -53,7 +52,7 @@ export function dataURLtoBlob(dataurl) {
}
return
new
Blob
([
u8arr
],
{
type
:
mime
});
}
// 高得地图坐标转为百度地图坐标
// 高得地图坐标转为百度地图坐标
弃用
export
function
GDmapPositionTransform
(
lng
,
lat
)
{
var
X_PI
=
Math
.
PI
*
3000.0
/
180.0
;
var
x
=
lng
,
y
=
lat
;
...
...
@@ -80,3 +79,17 @@ export function distinct5(arr) {
return
result
;
}
// 下载文件--公共方法 blob文件 文件名 文件类型
export
function
downloadFile
(
blob
,
title
,
fileType
)
{
return
new
Promise
(
resolve
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
new
Blob
([
blob
],
{
type
:
fileType
}))
const
link
=
document
.
createElement
(
'a'
)
link
.
style
.
display
=
'none'
link
.
href
=
url
link
.
setAttribute
(
'download'
,
title
)
// 自定义下载文件名
document
.
body
.
appendChild
(
link
)
link
.
click
()
document
.
body
.
removeChild
(
link
)
resolve
()
})
}
src/components/propertyControll/index.vue
View file @
6f6af664
...
...
@@ -26,13 +26,13 @@
upText
:
{
type
:
String
,
default
()
{
return
''
return
'
蓝色文字
'
}
},
downText
:
{
type
:
String
,
default
()
{
return
""
;
return
"
绿色文字
"
;
}
}
},
...
...
src/views/ProductAnalysis/index.vue
View file @
6f6af664
...
...
@@ -153,6 +153,7 @@
import
{
unitArea
}
from
"./unitArea"
;
import
{
plateAnalysis
,
queryProductionType
,
exportExcelJson
,
exportAsExcel
,
plateAnalysisHouseImg
}
from
"@assets/js/api/projectManage"
;
import
{
propertyMapFunction
}
from
"../propertiesDetail/propertyFunctionMap"
;
import
{
downloadFile
}
from
"../../assets/js/public"
;
export
default
{
name
:
"ProductAnalysis"
,
components
:{
...
...
@@ -247,19 +248,14 @@
dataJsonTwo
:
JSON
.
stringify
(
this
.
exportExcelSave
.
detilProductJsonDtoList
)
}).
then
(
res
=>
{
if
(
res
)
{
const
url
=
window
.
URL
.
createObjectURL
(
new
Blob
([
res
],
{
type
:
'application/vnd.ms-excel;charset=utf-8'
}))
const
link
=
document
.
createElement
(
'a'
)
link
.
style
.
display
=
'none'
link
.
href
=
url
link
.
setAttribute
(
'download'
,
this
.
exportExcelSave
.
title
.
replace
(
/;/g
,
'-'
))
// 自定义下载文件名
document
.
body
.
appendChild
(
link
)
link
.
click
()
document
.
body
.
removeChild
(
link
)
this
.
$message
({
type
:
'success'
,
message
:
'导出完成'
const
title
=
this
.
exportExcelSave
.
title
.
replace
(
/;/g
,
'-'
)
downloadFile
(
res
,
title
,
'application/vnd.ms-excel;charset=utf-8'
).
then
(()
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'导出完成'
})
this
.
exportLoading
=
false
})
this
.
exportLoading
=
false
}
else
{
this
.
$message
({
type
:
'warning'
,
...
...
src/views/RegionalPlate/index.vue
View file @
6f6af664
...
...
@@ -119,11 +119,11 @@
<div
v-if=
"infotType === 0"
style=
"margin-top: 10px"
>
<el-col
v-for=
"item in plateRegionColum"
:span=
"item.flex"
:key=
"item.prop"
:class=
"
{'rightBorder': item.title === '置业均价'}">
<div
class=
"plateRegionDetailShowHeader"
>
{{
item
.
title
}}
{{
item
.
title
+
item
.
defaultSetting
}}
</div>
<div
class=
"plateRegionDetailShowContainer"
:style=
"
{ color: item.color || '#000000', fontWeight: item.color ? '600' : 'normal' }">
{{
dataType
.
plateRegion
.
plateInfo
[
item
.
prop
]
||
'无'
}}
{{
dataType
.
plateRegion
.
plateInfo
[
item
.
prop
]
||
'无'
}}
</div>
</el-col>
</div>
...
...
@@ -400,7 +400,7 @@
}
})
if
(
res
.
data
.
resultBnsProjectDTOS
[
i
].
productType
)
{
productTypeName
=
productTypeName
+
res
.
data
.
resultBnsProjectDTOS
[
i
].
productType
+
(
i
===
l
-
1
?
'
'
:
',
'
)
productTypeName
=
productTypeName
+
res
.
data
.
resultBnsProjectDTOS
[
i
].
productType
+
(
i
===
l
-
1
?
'
,'
:
'
'
)
}
}
}
else
{
...
...
@@ -629,6 +629,7 @@
})
})
},
// 批量转换方法,待用
transformArray
(
arr
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
arr
.
length
>
100
)
{
...
...
src/views/RegionalPlate/plateCharacteristics.js
View file @
6f6af664
...
...
@@ -3,38 +3,45 @@ export const plateRegionDetail = [
{
title
:
'目标客群'
,
flex
:
24
,
defaultSetting
:
''
,
prop
:
'regionPosition'
,
color
:
'#409EFF'
},
{
title
:
'产品类型'
,
flex
:
24
,
defaultSetting
:
''
,
prop
:
'productionTypeName'
,
color
:
'#409EFF'
},
{
title
:
'区域特征'
,
flex
:
24
,
defaultSetting
:
''
,
prop
:
'regionAdvantage'
},
{
title
:
'已有楼盘'
,
flex
:
24
,
defaultSetting
:
''
,
prop
:
'existProject'
},
{
title
:
'置业均价'
,
flex
:
12
,
defaultSetting
:
'(元)'
,
prop
:
'businessAveragePrice'
},
{
title
:
'楼面均价'
,
flex
:
12
,
defaultSetting
:
'(元)'
,
prop
:
'projectAveragePrice'
},
{
title
:
'区域发展'
,
flex
:
24
,
defaultSetting
:
''
,
prop
:
'regionDevelop'
}
]
src/views/plateSupplyData/index.vue
View file @
6f6af664
...
...
@@ -77,6 +77,7 @@
import
{
getSupplyNumData
,
getRegionPlate
,
exportSupplyData
}
from
"../../assets/js/api/plateSupplyManage"
;
import
{
colors
}
from
"../../components/color"
;
import
{
areaRangeMap
}
from
"./areaRangeMap"
;
import
{
downloadFile
}
from
"../../assets/js/public"
;
export
default
{
name
:
"ProductAnalysis"
,
data
()
{
...
...
@@ -195,19 +196,14 @@
dataJson
:
this
.
exportSaveStatus
}).
then
(
res
=>
{
if
(
res
)
{
const
url
=
window
.
URL
.
createObjectURL
(
new
Blob
([
res
],
{
type
:
'application/vnd.ms-excel;charset=utf-8'
}))
const
link
=
document
.
createElement
(
'a'
)
link
.
style
.
display
=
'none'
link
.
href
=
url
link
.
setAttribute
(
'download'
,
`
${
this
.
regionVal
}
-
${
this
.
plateVal
}
-
${
this
.
timeVal
}
年份供求信息`
)
// 自定义下载文件名
document
.
body
.
appendChild
(
link
)
link
.
click
()
document
.
body
.
removeChild
(
link
)
this
.
$message
({
type
:
'success'
,
message
:
'导出完成'
const
title
=
`
${
this
.
regionVal
}
-
${
this
.
plateVal
}
-
${
this
.
timeVal
}
年份供求信息`
downloadFile
(
res
,
title
,
'application/vnd.ms-excel;charset=utf-8'
).
then
(()
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'导出完成'
})
this
.
exportLoading
=
false
})
this
.
exportLoading
=
false
}
else
{
this
.
$message
({
type
:
'warning'
,
...
...
src/views/propertiesDetail/index.vue
View file @
6f6af664
...
...
@@ -78,7 +78,7 @@
<div
class=
"salesInfomation"
v-if=
"bannerType !== 2"
>
<div
class=
"title"
style=
"padding-left: 20px"
>
销售信息
</div>
<div
style=
"text-align: right;padding-right: 20px"
>
<el-button
type=
"primary"
@
click=
"proper
ySaleInfoExport"
>
导出数据
</el-button>
<el-button
type=
"primary"
:disabled=
"propertyExportLoading"
:loading=
"propertyExportLoading"
@
click=
"propert
ySaleInfoExport"
>
导出数据
</el-button>
</div>
<div
ref=
"imgExport"
class=
"container"
>
<el-row
class=
"firstRow supplyDataDetail"
>
...
...
@@ -196,6 +196,7 @@
import
{
propertyMapFunction
}
from
"./propertyFunctionMap"
;
import
{
queryLandInfoById
,
queryPropertyDetail
,
queryPropertySupplyData
,
queryAnalysisById
,
getJsonForProduction
,
exportPropertyAnalysis
}
from
"@assets/js/api/unitManage"
;
import
{
areaRangeMap
}
from
"../plateSupplyData/areaRangeMap"
;
import
{
downloadFile
}
from
"../../assets/js/public"
;
export
default
{
name
:
"propertiesDetail"
,
components
:
{
banner
,
multiHeaderTable
},
...
...
@@ -359,30 +360,36 @@
exportSupplyDataSave
:
[],
exportHouseInfoSave
:
[],
// 暂无数据变量
supplyNoDataFlag
:
false
supplyNoDataFlag
:
false
,
propertyExportLoading
:
false
}
},
methods
:
{
// 导出数据
properySaleInfoExport
()
{
proper
t
ySaleInfoExport
()
{
// this.propertyData.projectInformation.businessId
if
(
this
.
propertyId
)
{
this
.
propertyExportLoading
=
true
exportPropertyAnalysis
({
title
:
`
${
this
.
propertyData
.
projectInformation
.
name
}
`
,
dataJsonTwo
:
JSON
.
stringify
(
this
.
exportSupplyDataSave
),
dataJson
:
JSON
.
stringify
(
this
.
exportHouseInfoSave
)
}).
then
(
res
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
new
Blob
([
res
],
{
type
:
'application/vnd.ms-excel;charset=utf-8'
}))
const
link
=
document
.
createElement
(
'a'
)
link
.
style
.
display
=
'none'
link
.
href
=
url
link
.
setAttribute
(
'download'
,
`
${
this
.
propertyData
.
projectInformation
.
name
}
楼盘销售信息数据分析`
)
// 自定义下载文件名
document
.
body
.
appendChild
(
link
)
link
.
click
()
document
.
body
.
removeChild
(
link
)
this
.
$message
({
type
:
'success'
,
message
:
'导出完成'
// const url = window.URL.createObjectURL(new Blob([res], { type: 'application/vnd.ms-excel;charset=utf-8' }))
// const link = document.createElement('a')
// link.style.display = 'none'
// link.href = url
// link.setAttribute('download', `${this.propertyData.projectInformation.name}楼盘销售信息数据分析`) // 自定义下载文件名
// document.body.appendChild(link)
// link.click()
// document.body.removeChild(link)
let
title
=
`
${
this
.
propertyData
.
projectInformation
.
name
}
楼盘销售信息数据分析.xls`
downloadFile
(
res
,
title
,
'application/vnd.ms-excel;charset=utf-8'
).
then
(()
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'导出完成'
})
this
.
propertyExportLoading
=
false
})
})
}
...
...
src/views/propertiesDetail/planningInfoMap.js
View file @
6f6af664
...
...
@@ -11,7 +11,7 @@ export default {
},
plotRatio
:
{
name
:
'容积率'
,
defaultSetting
:
'
%
'
defaultSetting
:
''
},
productTypeName
:
{
name
:
'产品类型'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment