Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gavel-hafms-vue
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
李苏
gavel-hafms-vue
Commits
6fa72e1f
Commit
6fa72e1f
authored
Sep 07, 2023
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
两区农电模块:901030500淮阴淮安模块:901030510
地图点击弹框再弹框demo
parent
e5323a05
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1046 additions
and
5 deletions
+1046
-5
hyha.js
src/api/sbysjsp/hyha.js
+24
-0
index.js
src/router/index.js
+27
-0
detail.vue
src/views/hzcxbb/szkb/detail.vue
+171
-0
dialog.vue
src/views/hzcxbb/szkb/dialog.vue
+266
-0
index.vue
src/views/hzcxbb/szkb/index.vue
+38
-4
szkb.scss
src/views/hzcxbb/szkb/szkb.scss
+0
-1
index.vue
src/views/sbysjsp/hyha/index.vue
+260
-0
index.vue
src/views/sbysjsp/lqnd/index.vue
+260
-0
No files found.
src/api/sbysjsp/hyha.js
0 → 100644
View file @
6fa72e1f
import
request
from
'common/src/utils/request'
/* query */
export
function
doQuery
(
query
)
{
return
request
({
url
:
'hafms/yszhcxlog/query'
,
method
:
'post'
,
data
:
query
||
{}
})
}
export
function
doDelete
(
query
)
{
return
request
({
url
:
'/hafms/yszhcxlog/delete'
,
method
:
'post'
,
data
:
query
||
{}
})
}
export
function
doQueryDetail
(
query
){
return
request
({
url
:
'hafms/yszhcxlog/queryDetail'
,
method
:
'post'
,
data
:
query
||
{}
})
}
src/router/index.js
View file @
6fa72e1f
...
...
@@ -227,8 +227,35 @@ export const powerRoutes=[
},
name
:
'yshz'
,
path
:
"yshz"
},
{
component
:
'sbysjsp/lqnd/index'
,
hidden
:
false
,
meta
:{
"title"
:
"两区农电"
,
"icon"
:
""
,
"noCache"
:
false
,
"link"
:
null
,
"mkid"
:
901030500
,
},
name
:
'lqnd'
,
path
:
"lqnd"
},
{
component
:
'sbysjsp/hyha/index'
,
hidden
:
false
,
meta
:{
"title"
:
"淮阴淮安"
,
"icon"
:
""
,
"noCache"
:
false
,
"link"
:
null
,
"mkid"
:
901030510
,
},
name
:
'hyha'
,
path
:
"hyha"
}
]
},
...
...
src/views/hzcxbb/szkb/detail.vue
0 → 100644
View file @
6fa72e1f
<
template
>
<DefaultDialog
:appendToBody=
'false'
:app=
'app'
>
<div
slot=
"form"
style=
"display: flex;height: 50vh;"
>
<div
class=
"full"
>
<EditTable
@
initTableTitle=
'initTableTitle'
:allowEdit=
'false'
:spanMethod=
'spanMethod'
ref=
"editTable"
:editTableData=
'newFormDetail'
:app=
'this'
></EditTable>
</div>
</div>
<div
slot=
"reFooter"
class=
"refooter"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"app.showDialog=false"
>
取 消
</el-button>
<!--
<el-button
type=
"primary"
@
click=
"save()"
>
保 存
</el-button>
-->
</span>
</div>
</DefaultDialog>
</
template
>
<
script
>
import
{
toFixed
}
from
'common/src/utils/blur.js'
export
default
{
props
:
{
app
:
{
type
:
Object
,
default
:
()
=>
{
return
{}
}
}
},
async
mounted
()
{
},
computed
:
{
newFormDetail
()
{
/* 进行分类统计*/
let
flArr
=
[]
this
.
formDetail
.
forEach
(
item
=>
{
flArr
.
push
(
item
.
bmjc
)
})
/* 去重*/
flArr
=
[...
new
Set
(
flArr
)]
/* 获取bmjc的所有值*/
/* 顺序构建数据组*/
/* 获取总金额*/
let
jeobj
=
{}
let
sxList
=
[]
flArr
.
forEach
(
item
=>
{
jeobj
[
item
]
=
0
/* 按顺序排列*/
this
.
formDetail
.
forEach
(
fitem
=>
{
if
(
fitem
.
bmjc
==
item
)
{
jeobj
[
item
]
+=
Number
(
fitem
.
xqje
||
0
)
sxList
.
push
(
fitem
)
}
})
})
/* 赋值总金额*/
sxList
.
forEach
(
item
=>
{
item
.
lxzje
=
item
.
showname
+
"合计:"
+
jeobj
[
item
.
bmjc
]
})
/* 构建redata*/
let
redata
=
sxList
.
map
(
item
=>
{
return
item
.
bmjc
})
/* 重置spanArr*/
this
.
spanArr
=
[]
let
pos
=
0
redata
.
reduce
((
old
,
cur
,
i
)
=>
{
// old 上一个元素 cur 当前元素 i 索引
if
(
i
===
0
)
{
// 第一次判断先增加一个 1 占位 ,索引为0
this
.
spanArr
.
push
(
1
)
pos
=
0
}
else
{
if
(
cur
===
old
)
{
this
.
spanArr
[
pos
]
+=
1
this
.
spanArr
.
push
(
0
)
}
else
{
this
.
spanArr
.
push
(
1
)
pos
=
i
}
}
return
cur
},
{})
/* reduce开始控制row col*/
this
.
formDetail
=
sxList
return
this
.
formDetail
}
},
data
()
{
/* 公司=》部门=》事项明细=》金额*/
return
{
formDetail
:
[
],
spanArr
:
[],
baseUrl
:
'sbysjsp/yshz/edit'
,
editTableTitle
:
[
{
label
:
"部门"
,
prop
:
"bmjc"
,
fieldType
:
"ftString"
,
width
:
150
},
{
label
:
"事项"
,
prop
:
"flname"
,
fieldType
:
"ftString"
,
width
:
150
},
{
label
:
"预算数额"
,
prop
:
"xqje"
,
fieldType
:
"ftString"
,
width
:
150
,
type
:
'inputNumber'
,
blur
:
toFixed
(
4
),
},
{
label
:
"调增金额"
,
prop
:
"pje"
,
fieldType
:
"money"
,
width
:
200
},
{
label
:
"调减金额"
,
prop
:
"mje"
,
fieldType
:
"money"
,
width
:
200
},
{
label
:
"调整后金额"
,
prop
:
"tzhje"
,
fieldType
:
"money"
},
]
}
},
methods
:
{
initTableTitle
(){
const
list
=
this
.
$refs
.
editTable
.
tableTitle
const
showList
=
[
'pje'
,
'mje'
,
'tzhje'
]
if
(
this
.
app
.
queryParams
.
xsystz
==
'Y'
){
list
.
forEach
(
item
=>
{
if
(
item
&&
item
.
prop
&&
showList
.
includes
(
item
.
prop
))
{
item
.
show
=
true
}
})
}
else
{
list
.
forEach
(
item
=>
{
if
(
item
&&
item
.
prop
&&
showList
.
includes
(
item
.
prop
))
{
item
.
show
=
false
}
})
}
},
spanMethod
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
column
.
property
==
'bmjc'
||
column
.
property
==
'flname'
)
{
const
_row
=
this
.
spanArr
[
rowIndex
]
const
_col
=
_row
>
0
?
1
:
0
return
{
rowspan
:
_row
,
colspan
:
_col
}
}
/* */
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/hzcxbb/szkb/dialog.vue
0 → 100644
View file @
6fa72e1f
<
template
>
<DefaultDialog
:appendToBody=
'false'
:app=
'app'
>
<div
slot=
"form"
class=
"min_full"
style=
"display: flex;height: 80vh;"
>
<Detail
ref=
"detail"
:app=
'this'
v-if=
"showDialog"
/>
<!--
<div
class=
"search"
v-condition
>
<SearchButton
:app=
'this'
></SearchButton>
<el-row
:gutter=
"20"
class=
"search-row-1"
>
<el-col
:span=
"5"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
开始日期:
</span>
<el-date-picker
:popper-append-to-body=
"false"
value-format=
"timestamp"
v-model=
'queryParams.start'
></el-date-picker>
</div>
</el-col>
<el-col
:span=
"5"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
截止日期:
</span>
<el-date-picker
:popper-append-to-body=
"false"
value-format=
"timestamp"
v-model=
'queryParams.end'
></el-date-picker>
</div>
</el-col>
<el-col
:span=
"5"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
预算任务:
</span>
<RelSelect
style=
"width: 100%;"
src=
'hafms/ysfl/query'
filterable
clearable
:match=
"
{value:'id',label:'name'}" v-model='queryParams.flid'>
</RelSelect>
</div>
</el-col>
<el-col
:span=
"5"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
状态:
</span>
<RelSelect
style=
"width: 100%;"
src=
'hafms/yssq/init/zt'
filterable
clearable
:match=
"
{value:'id',label:'name'}" v-model='queryParams.zt'>
</RelSelect>
</div>
</el-col>
<el-col
:span=
"4"
class=
"search-col"
>
<el-checkbox
@
change=
"tzxx"
true-label=
'Y'
false-label=
'N'
v-model=
"queryParams.xsystz"
>
显示调整信息
</el-checkbox>
</el-col>
</el-row>
<el-row
:gutter=
"20"
class=
"search-row-1"
>
<el-col
:span=
"8"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
申请订单:
</span>
<el-input
v-model=
"queryParams.djid"
></el-input>
</div>
</el-col>
<el-col
:span=
"8"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
申请公司:
</span>
<RelSelect
collapse-tags
multiple
style=
"width: 100%;"
src=
'hafms/common/sjbm/query'
filterable
clearable
:match=
"
{value:'id',label:'bmmc'}" v-model='queryParams.sjbmids'>
</RelSelect>
</div>
</el-col>
<el-col
:span=
"8"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
申请部门:
</span>
<RelSelect
linkage
:linkParams=
"
{sjbmids:queryParams.sjbmids}" :params="{
pids:queryParams.sjbmids.join()
}" collapse-tags multiple style="width: 100%;" src='hafms/common/bm/query' filterable clearable
:match="{value:'id',label:'bmmc'}" v-model='queryParams.chooseBmids'>
</RelSelect>
</div>
</el-col>
</el-row>
</div>
-->
<!-- 按钮操作-->
<!-- 表格-->
<div
class=
"tablePagers"
>
<!-- 多选数组转 -->
<TablePager
fePage
:operateButtons=
"false"
@
tpDbClick=
"tpDbClick"
:multipleTrans=
"[
'sjbmids','chooseBmids'
]"
@
getData=
'getData'
:ref=
"'TablePager'"
:app=
'this'
:query=
'query'
@
selectItem=
'selectItem'
@
getRow=
'getRow'
>
</TablePager>
</div>
</div>
</DefaultDialog>
</
template
>
<
script
>
import
Detail
from
'./detail.vue'
import
{
doQuery
,
queryDetail
}
from
'@/api/sbysjsp/yshz.js'
;
import
{
tableMixin_noapp
}
from
'common'
import
cycle
from
'common/src/mixin/cycle.js'
export
default
{
mixins
:
[
tableMixin_noapp
,
cycle
],
props
:
{
app
:
{
type
:
Object
,
default
:
()
=>
{
return
{}
}
}
},
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'TablePager'
].
pageQuery
()
})
},
components
:
{
Detail
},
data
()
{
return
{
/*需要的额外参数 */
showDialog
:
false
,
DialogName
:
''
,
type
:
''
,
DialogTitle
:
''
,
/* 基础url*/
baseUrl
:
'hafms/ystz'
,
/* 查询参数*/
queryParams
:
{
xsystz
:
'Y'
,
start
:
new
Date
().
getTime
()
-
1000
*
60
*
60
*
24
*
30
,
end
:
new
Date
().
getTime
(),
flid
:
''
,
zt
:
''
,
djid
:
''
,
sjbmids
:
[],
chooseBmids
:
[]
},
/* 表格标题对应参数*/
tableTitle
:
[{
title
:
"年度"
,
field
:
"year"
,
fieldType
:
"ftString"
,
width
:
150
},
{
title
:
"事项"
,
field
:
"flname"
,
fieldType
:
"ftString"
,
width
:
200
},
{
title
:
"需求金额"
,
field
:
"xqje"
,
width
:
200
},
{
title
:
"调增金额"
,
field
:
"pje"
,
width
:
200
},
{
title
:
"调减金额"
,
field
:
"mje"
,
width
:
200
},
{
title
:
"调整后金额"
,
field
:
"tzhje"
,
},
]
}
},
methods
:
{
tzxx
(
e
)
{
const
list
=
this
.
$refs
.
TablePager
.
newGridList
const
showList
=
[
'pje'
,
'mje'
,
'tzhje'
]
/* Y 显示 N隐藏*/
if
(
e
==
'Y'
)
{
list
.
forEach
(
item
=>
{
if
(
item
&&
item
.
prop
&&
showList
.
includes
(
item
.
prop
))
{
item
.
show
=
true
}
})
}
else
{
list
.
forEach
(
item
=>
{
if
(
item
&&
item
.
prop
&&
showList
.
includes
(
item
.
prop
))
{
item
.
show
=
false
}
})
}
this
.
$refs
[
'TablePager'
].
pageQuery
()
},
tpDbClick
(
row
)
{
queryDetail
({
year
:
row
.
year
,
flid
:
row
.
flid
,
xsystz
:
this
.
queryParams
.
xsystz
}).
then
(
res
=>
{
if
(
res
.
success
)
{
const
{
records
}
=
res
.
data
if
(
records
.
length
>
0
)
{
this
.
DialogTitle
=
"查看详情"
this
.
DialogWidth
=
"70vw"
this
.
showDialog
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
detail
.
formDetail
=
records
||
[]
})
}
else
{
this
.
$warning
(
'暂无数据'
)
}
}
})
},
yssqsp
()
{
if
(
this
.
selectOne
||
this
.
clickOne
)
{
submit
(
this
.
singleItem
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$success
(
'操作成功'
);
this
.
$refs
[
'TablePager'
].
pageQuery
()
}
})
}
else
{
this
.
$warning
(
'请选中一行操作'
);
}
},
/* 基础查询*/
query
:
doQuery
,
queryDetail
:
queryDetail
},
}
</
script
>
<
style
scoped
>
/
deep
/
.el-dialog
{
background
:
url(./static/bg.png)
;
background-size
:
100%
100%
;
opacity
:
1
;
}
/
deep
/
.el-dialog__title
{
color
:
#fff
;
}
.search-span
{
color
:
#fff
!important
;
}
.min_full
{
border
:
0px
solid
!important
;
}
.search
{
border
:
0px
solid
!important
;
}
/
deep
/
.el-table
th
.el-table__cell
{
background-color
:
rgba
(
0
,
0
,
0
,
.2
)
!important
;
color
:
#25c2da
!important
;
font-size
:
13px
!important
;
font-weight
:
500
!important
;
}
/
deep
/
.el-table
tr
{
background-color
:
rgba
(
0
,
0
,
0
,
.2
)
!important
;
color
:
#25c2da
!important
;
font-size
:
13px
!important
;
font-weight
:
500
!important
;
}
/
deep
/
.el-table
{
background-color
:
rgba
(
0
,
0
,
0
,
.2
)
!important
;
}
</
style
>
src/views/hzcxbb/szkb/index.vue
View file @
6fa72e1f
<
template
>
<div
id=
"szkb"
>
<Dialog
:app=
'dialog'
v-if=
"dialog.showDialog"
/>
<!-- 弹框区域-->
<div
class=
"title"
>
大数据展示平台
</div>
...
...
@@ -149,6 +151,7 @@
<
script
>
import
vueSeamless
from
'vue-seamless-scroll'
import
huaian
from
"common/src/assets/mapJson/huaian.json"
import
Dialog
from
"./dialog.vue"
export
default
{
computed
:
{
optionSingleHeight
()
{
...
...
@@ -158,9 +161,11 @@
}
},
components
:
{
vueSeamless
vueSeamless
,
Dialog
},
mounted
()
{
this
.
initHuanai
()
this
.
$nextTick
(()
=>
{
document
.
getElementById
(
"szkb"
).
addEventListener
(
'dblclick'
,
function
(
e
)
{
fullScreen
(
document
.
getElementById
(
"szkb"
));
...
...
@@ -168,7 +173,9 @@
/* 初始化地图*/
this
.
szkbmapCharts
=
this
.
initSzkbmapCharts
()
this
.
sdtCharts
=
this
.
initsdt
()
this
.
szkbmapCharts
.
on
(
"click"
,
function
(
params
)
{
this
.
szkbmapCharts
.
on
(
"click"
,
(
params
)
=>
{
this
.
dialog
.
DialogTitle
=
params
.
name
this
.
dialog
.
showDialog
=
true
console
.
log
(
`
${
params
.
name
}
`
)
});
...
...
@@ -176,6 +183,11 @@
},
data
()
{
return
{
dialog
:{
showDialog
:
false
,
DialogTitle
:
'测试'
,
DialogWidth
:
'80vw'
},
listData
:
[{
data
:
112
,
title
:
'百度'
...
...
@@ -224,6 +236,28 @@
}
},
methods
:
{
/* 地图标记
淮安供电公司本部,金湖县供电公司,盱眙县供电公司,洪泽县供电公司,涟水县供电公司
*/
initHuanai
(){
let
huaian1
=
_
.
cloneDeep
(
huaian
)
huaian1
.
features
.
forEach
(
item
=>
{
if
(
item
.
properties
.
name
==
'淮安区'
){
item
.
properties
.
name
=
'淮安供电公司本部'
}
else
if
(
item
.
properties
.
name
==
'金湖县'
){
item
.
properties
.
name
=
'金湖县供电公司'
}
else
if
(
item
.
properties
.
name
==
'盱眙县'
){
item
.
properties
.
name
=
'盱眙县供电公司'
}
else
if
(
item
.
properties
.
name
==
'洪泽县'
){
item
.
properties
.
name
=
'洪泽县供电公司'
}
else
if
(
item
.
properties
.
name
==
'涟水县'
){
item
.
properties
.
name
=
'涟水县供电公司'
}
else
{
item
.
properties
.
name
=
''
}
})
return
huaian1
},
initsdt
(){
const
charts
=
this
.
$echarts
.
init
(
this
.
$refs
[
"sdt"
]);
const
option
=
{
...
...
@@ -359,7 +393,7 @@
},
formatter
:
function
(
params
)
{
// 格式化提示浮窗内容
return
params
.
name
+
": "
+
(
params
.
value
||
'未设置'
);
//
return params.name + ": " + (params.value||'未设置');
},
showDelay
:
100
,
},
...
...
@@ -419,7 +453,7 @@
},
};
// 地图注册,第一个参数的名字必须和option.geo.map一致
this
.
$echarts
.
registerMap
(
"huaian"
,
huaian
)
this
.
$echarts
.
registerMap
(
"huaian"
,
this
.
initHuanai
()
)
charts
.
setOption
(
option
);
return
charts
...
...
src/views/hzcxbb/szkb/szkb.scss
View file @
6fa72e1f
...
...
@@ -210,7 +210,6 @@ border-radius: 18px;
/*position: relative;*/
}
.lbtit
>
:nth-child
(
even
)
{
-webkit-box-shadow
:
#3486da
0px
0px
10px
;
-moz-box-shadow
:
#3486da
0px
0px
10px
;
box-shadow
:
inset
0
0
30px
#3486da
;
...
...
src/views/sbysjsp/hyha/index.vue
0 → 100644
View file @
6fa72e1f
<
template
>
<div
class=
" flex"
>
<el-tabs
@
tab-click=
"handleClick"
v-model=
"activeName"
:tab-position=
"'left'"
>
<el-tab-pane
style=
"font-size: 12px;"
v-for=
"(item,index) in paneList"
:key=
"item.id"
:name=
"item.id"
:label=
"item.title"
></el-tab-pane>
</el-tabs>
<div
style=
"flex: 1;overflow: hidden;"
>
<div
class=
"min_full"
style=
"border-left: 0px;"
>
<!-- right-->
<el-row
class=
"tool-bar"
>
<ToolButton
:app=
'app'
></ToolButton>
<ImportTempButton
@
success=
'success'
url=
"hafms/yszhcxlog//excel/import"
:params=
"
{
lx:'B'
}" />
<!-- 导入-->
<el-button
@
click=
"del"
size=
"mini"
type=
"danger"
>
删除当前报表
</el-button>
</el-row>
<!-- 表格-->
<div
class=
"tablePagers"
>
<TablePager
:operateButtons=
'false'
disableQuery
@
getData=
'getData'
:ref=
"'TablePager'"
:app=
'app'
:query=
'query'
@
selectItem=
'selectItem'
@
getRow=
'getRow'
>
</TablePager>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
doQuery
,
doDelete
,
doQueryDetail
}
from
'@/api/sbysjsp/hyha.js'
;
import
{
tableMixin
}
from
'common'
export
default
{
mixins
:
[
tableMixin
],
/* 初始额外赋值*/
async
mounted
()
{
/* 查询数值*/
this
.
init
()
// this.$refs['TablePager'].pageQuery()
},
data
()
{
return
{
activeName
:
''
,
paneList
:
[],
baseUrl
:
'hafms/yszhcxlog'
,
/* 查询参数*/
queryParams
:
{
lx
:
'B'
,
},
/* 表格标题对应参数*/
tableTitle
:
[{
title
:
"预算科目"
,
field
:
"fyname"
,
fieldType
:
"ftString"
,
width
:
160
},
{
title
:
"加载中"
,
fieldType
:
"ftString"
,
field
:
"title"
,
width
:
160
,
subtitle
:
[{
label
:
"年度预算目标值(万元)"
,
prop
:
"ndysmb"
,
fieldType
:
"ftString"
,
width
:
230
},
{
prop
:
"phmb"
,
label
:
"平衡目标值(万元)"
,
width
:
"120"
},
{
prop
:
"ljfj"
,
label
:
"累计分解值(万元)"
,
width
:
"120"
},
{
prop
:
"fjl"
,
label
:
"分解率"
,
width
:
"120"
},
{
prop
:
"fsz"
,
label
:
"发生值(万元)"
,
width
:
"120"
},
{
prop
:
"wcl"
,
label
:
"完成率"
,
width
:
"120"
},
]
},
{
title
:
"加载中"
,
fieldType
:
"ftString"
,
field
:
"title"
,
width
:
160
,
subtitle
:
[{
label
:
"年度预算目标值(万元)"
,
prop
:
"ndysmb2"
,
fieldType
:
"ftString"
,
width
:
230
},
{
prop
:
"phmb2"
,
label
:
"平衡目标值(万元)"
,
width
:
"120"
},
{
prop
:
"ljfj2"
,
label
:
"累计分解值(万元)"
,
width
:
"120"
},
{
prop
:
"fjl2"
,
label
:
"分解率"
,
width
:
"120"
},
{
prop
:
"fsz2"
,
label
:
"发生值(万元)"
,
width
:
"120"
},
{
prop
:
"wcl2"
,
label
:
"完成率"
,
width
:
"120"
},
]
},
]
}
},
methods
:
{
del
(){
if
(
this
.
paneList
.
length
>
0
&&
this
.
activeName
){
this
.
$confirm
(
'是否删除当前报表, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
res
=>
{
doDelete
({
id
:
this
.
activeName
}).
then
(
e
=>
{
if
(
e
.
success
){
this
.
$success
(
'操作成功'
)
/* 初始化list*/
this
.
init
()
}
})
})
}
else
{
this
.
$warning
(
'当前无数据,请刷新或者导入后进行操作'
)
}
},
init
(){
doQuery
({
lx
:
'B'
}).
then
(
res
=>
{
if
(
res
.
success
)
{
if
(
res
.
data
&&
res
.
data
.
records
&&
res
.
data
.
records
.
length
!=
0
)
{
this
.
paneList
=
res
.
data
.
records
||
[]
if
(
this
.
paneList
[
0
])
{
this
.
activeName
=
this
.
paneList
[
0
].
id
this
.
showTabData
(
this
.
paneList
[
0
].
id
)
/* 查询第一个list*/
}
}
}
})
},
/* 导入成功回调*/
success
(){
this
.
init
()
},
/*数据处理*/
showTabData
(
id
)
{
/* 控制查询loading */
this
.
$refs
.
TablePager
.
loading
=
true
doQueryDetail
({
mid
:
id
}).
then
(
res
=>
{
if
(
res
.
success
)
{
let
records
=
res
.
data
.
records
||
[]
/* 数据处理*/
let
gs1
=
''
let
gs2
=
''
let
lxh1
=
records
.
filter
(
item
=>
{
if
(
item
.
lxh
==
'1'
)
{
gs1
=
item
.
gsname
return
true
}
})
let
lxh2
=
records
.
filter
(
item
=>
{
if
(
item
.
lxh
==
'2'
)
{
gs2
=
item
.
gsname
return
true
}
})
/* 根据xh合并*/
let
newList
=
lxh1
.
map
(
item1
=>
{
let
newItem
=
{}
lxh2
.
forEach
(
item2
=>
{
if
(
item1
.
xh
==
item2
.
xh
)
{
Object
.
keys
(
item2
).
forEach
(
key
=>
{
let
keyName
=
key
+
'2'
newItem
[
keyName
]
=
item2
[
key
]
})
}
})
/* 最终合并*/
newItem
=
{
...
newItem
,
...
item1
}
return
newItem
})
/* 手动操作表格*/
/* 替换标题*/
this
.
$refs
.
TablePager
[
'newGridList'
][
1
][
'label'
]
=
gs1
this
.
$refs
.
TablePager
[
'newGridList'
][
2
][
'label'
]
=
gs1
/* 替换数据*/
this
.
$refs
.
TablePager
[
'tableData'
]
=
newList
}
}).
finally
(
e
=>
{
this
.
$refs
.
TablePager
.
loading
=
false
})
},
handleClick
(
item
)
{
this
.
showTabData
(
item
.
name
)
},
/* 基础查询*/
query
:
doQuery
,
apiDelete
:
doDelete
,
queryDetail
:
doQueryDetail
},
components
:
{
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/sbysjsp/lqnd/index.vue
0 → 100644
View file @
6fa72e1f
<
template
>
<div
class=
" flex"
>
<el-tabs
@
tab-click=
"handleClick"
v-model=
"activeName"
:tab-position=
"'left'"
>
<el-tab-pane
style=
"font-size: 12px;"
v-for=
"(item,index) in paneList"
:key=
"item.id"
:name=
"item.id"
:label=
"item.title"
></el-tab-pane>
</el-tabs>
<div
style=
"flex: 1;overflow: hidden;"
>
<div
class=
"min_full"
style=
"border-left: 0px;"
>
<!-- right-->
<el-row
class=
"tool-bar"
>
<ToolButton
:app=
'app'
></ToolButton>
<ImportTempButton
@
success=
'success'
url=
"hafms/yszhcxlog//excel/import"
:params=
"
{
lx:'A'
}" />
<!-- 导入-->
<el-button
@
click=
"del"
size=
"mini"
type=
"danger"
>
删除当前报表
</el-button>
</el-row>
<!-- 表格-->
<div
class=
"tablePagers"
>
<TablePager
:operateButtons=
'false'
disableQuery
@
getData=
'getData'
:ref=
"'TablePager'"
:app=
'app'
:query=
'query'
@
selectItem=
'selectItem'
@
getRow=
'getRow'
>
</TablePager>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
doQuery
,
doDelete
,
doQueryDetail
}
from
'@/api/sbysjsp/hyha.js'
;
import
{
tableMixin
}
from
'common'
export
default
{
mixins
:
[
tableMixin
],
/* 初始额外赋值*/
async
mounted
()
{
/* 查询数值*/
this
.
init
()
// this.$refs['TablePager'].pageQuery()
},
data
()
{
return
{
activeName
:
''
,
paneList
:
[],
baseUrl
:
'hafms/yszhcxlog'
,
/* 查询参数*/
queryParams
:
{
lx
:
'A'
,
},
/* 表格标题对应参数*/
tableTitle
:
[{
title
:
"预算科目"
,
field
:
"fyname"
,
fieldType
:
"ftString"
,
width
:
160
},
{
title
:
"加载中"
,
fieldType
:
"ftString"
,
field
:
"title"
,
width
:
160
,
subtitle
:
[{
label
:
"年度预算目标值(万元)"
,
prop
:
"ndysmb"
,
fieldType
:
"ftString"
,
width
:
230
},
{
prop
:
"phmb"
,
label
:
"平衡目标值(万元)"
,
width
:
"120"
},
{
prop
:
"ljfj"
,
label
:
"累计分解值(万元)"
,
width
:
"120"
},
{
prop
:
"fjl"
,
label
:
"分解率"
,
width
:
"120"
},
{
prop
:
"fsz"
,
label
:
"发生值(万元)"
,
width
:
"120"
},
{
prop
:
"wcl"
,
label
:
"完成率"
,
width
:
"120"
},
]
},
{
title
:
"加载中"
,
fieldType
:
"ftString"
,
field
:
"title"
,
width
:
160
,
subtitle
:
[{
label
:
"年度预算目标值(万元)"
,
prop
:
"ndysmb2"
,
fieldType
:
"ftString"
,
width
:
230
},
{
prop
:
"phmb2"
,
label
:
"平衡目标值(万元)"
,
width
:
"120"
},
{
prop
:
"ljfj2"
,
label
:
"累计分解值(万元)"
,
width
:
"120"
},
{
prop
:
"fjl2"
,
label
:
"分解率"
,
width
:
"120"
},
{
prop
:
"fsz2"
,
label
:
"发生值(万元)"
,
width
:
"120"
},
{
prop
:
"wcl2"
,
label
:
"完成率"
,
width
:
"120"
},
]
},
]
}
},
methods
:
{
del
(){
if
(
this
.
paneList
.
length
>
0
&&
this
.
activeName
){
this
.
$confirm
(
'是否删除当前报表, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
res
=>
{
doDelete
({
id
:
this
.
activeName
}).
then
(
e
=>
{
if
(
e
.
success
){
this
.
$success
(
'操作成功'
)
/* 初始化list*/
this
.
init
()
}
})
})
}
else
{
this
.
$warning
(
'当前无数据,请刷新或者导入后进行操作'
)
}
},
init
(){
doQuery
({
lx
:
'A'
}).
then
(
res
=>
{
if
(
res
.
success
)
{
if
(
res
.
data
&&
res
.
data
.
records
&&
res
.
data
.
records
.
length
!=
0
)
{
this
.
paneList
=
res
.
data
.
records
||
[]
if
(
this
.
paneList
[
0
])
{
this
.
activeName
=
this
.
paneList
[
0
].
id
this
.
showTabData
(
this
.
paneList
[
0
].
id
)
/* 查询第一个list*/
}
}
}
})
},
/* 导入成功回调*/
success
(){
this
.
init
()
},
/*数据处理*/
showTabData
(
id
)
{
/* 控制查询loading */
this
.
$refs
.
TablePager
.
loading
=
true
doQueryDetail
({
mid
:
id
}).
then
(
res
=>
{
if
(
res
.
success
)
{
let
records
=
res
.
data
.
records
||
[]
/* 数据处理*/
let
gs1
=
''
let
gs2
=
''
let
lxh1
=
records
.
filter
(
item
=>
{
if
(
item
.
lxh
==
'1'
)
{
gs1
=
item
.
gsname
return
true
}
})
let
lxh2
=
records
.
filter
(
item
=>
{
if
(
item
.
lxh
==
'2'
)
{
gs2
=
item
.
gsname
return
true
}
})
/* 根据xh合并*/
let
newList
=
lxh1
.
map
(
item1
=>
{
let
newItem
=
{}
lxh2
.
forEach
(
item2
=>
{
if
(
item1
.
xh
==
item2
.
xh
)
{
Object
.
keys
(
item2
).
forEach
(
key
=>
{
let
keyName
=
key
+
'2'
newItem
[
keyName
]
=
item2
[
key
]
})
}
})
/* 最终合并*/
newItem
=
{
...
newItem
,
...
item1
}
return
newItem
})
/* 手动操作表格*/
/* 替换标题*/
this
.
$refs
.
TablePager
[
'newGridList'
][
1
][
'label'
]
=
gs1
this
.
$refs
.
TablePager
[
'newGridList'
][
2
][
'label'
]
=
gs1
/* 替换数据*/
this
.
$refs
.
TablePager
[
'tableData'
]
=
newList
}
}).
finally
(
e
=>
{
this
.
$refs
.
TablePager
.
loading
=
false
})
},
handleClick
(
item
)
{
this
.
showTabData
(
item
.
name
)
},
/* 基础查询*/
query
:
doQuery
,
apiDelete
:
doDelete
,
queryDetail
:
doQueryDetail
},
components
:
{
}
}
</
script
>
<
style
scoped
>
</
style
>
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