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
45eb65cf
Commit
45eb65cf
authored
Dec 05, 2023
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b3f8eef2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
290 additions
and
2 deletions
+290
-2
zhcx.js
src/api/sbysjsp/zhcx.js
+24
-0
index.js
src/router/index.js
+13
-0
index.vue
src/views/sbysjsp/yszxfxzh/index.vue
+251
-0
index.vue
src/views/sbysjsp/zhcx/index.vue
+2
-2
No files found.
src/api/sbysjsp/zhcx.js
0 → 100644
View file @
45eb65cf
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/yszhcxzb/query'
,
method
:
'post'
,
data
:
query
||
{}
})
}
src/router/index.js
View file @
45eb65cf
...
...
@@ -307,6 +307,19 @@ export const powerRoutes = [{
},
name
:
'yszxfx'
,
path
:
"yszxfx"
},
{
component
:
'sbysjsp/yszxfxzh/index'
,
hidden
:
false
,
meta
:
{
"title"
:
"预算执行分析(综合)"
,
"icon"
:
""
,
"noCache"
:
false
,
"link"
:
null
,
"mkid"
:
'test'
,
},
name
:
'yszxfxzh'
,
path
:
"yszxfxzh"
}
...
...
src/views/sbysjsp/yszxfxzh/index.vue
0 → 100644
View file @
45eb65cf
<
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/yszhcxzb/import"
:params=
"
{
lx:'C'
}" />
<!-- 导入-->
<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
()
},
data
()
{
return
{
activeName
:
''
,
paneList
:
[],
baseUrl
:
'hafms/yszhcxlog'
,
/* 查询参数*/
queryParams
:
{
lx
:
'C'
,
},
/* 表格标题对应参数*/
tableTitle
:
[{
title
:
"项目名称"
,
field
:
"xmmc"
,
fieldType
:
"ftString"
,
width
:
160
},
{
title
:
"国网项目编码"
,
field
:
"gwxmbm"
,
fieldType
:
"ftString"
,
width
:
160
},
{
title
:
"项目类型"
,
field
:
"xmlx"
,
fieldType
:
"ftString"
,
width
:
160
},
{
title
:
"项目包名称"
,
field
:
"xmbmc"
,
fieldType
:
"ftString"
,
width
:
160
},
{
title
:
"一级单位"
,
field
:
"yjdw"
,
fieldType
:
"ftString"
,
width
:
160
},
{
title
:
"二级单位"
,
field
:
"ejdw"
,
fieldType
:
"ftString"
,
width
:
160
},
{
title
:
"归口部门"
,
field
:
"gkbm"
,
fieldType
:
"ftString"
,
width
:
160
},
{
title
:
"实施部门"
,
field
:
"ssbm"
,
fieldType
:
"ftString"
,
width
:
160
},
{
title
:
"当年预算(含税)(万元)"
,
field
:
"yshsje"
,
fieldType
:
"ftString"
,
width
:
160
},
{
title
:
"当年预算(不含税)(万元)"
,
field
:
"yswsje"
,
fieldType
:
"ftString"
,
width
:
160
},
{
title
:
"是否预安排项目"
,
field
:
"yapxm"
,
fieldType
:
"ftString"
,
width
:
160
},
{
title
:
"是否安全生产"
,
field
:
"aqsc"
,
fieldType
:
"ftString"
,
width
:
160
}
]
}
},
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'] = gs2
/* 替换数据*/
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/zhcx/index.vue
View file @
45eb65cf
...
...
@@ -32,7 +32,7 @@
doDelete
,
doQueryDetail
}
from
'@/api/sbysjsp/
hyha
.js'
;
}
from
'@/api/sbysjsp/
zhcx
.js'
;
import
{
tableMixin
...
...
@@ -159,7 +159,7 @@
},
init
()
{
doQuery
({
lx
:
'
A
'
lx
:
'
C
'
}).
then
(
res
=>
{
if
(
res
.
success
)
{
if
(
res
.
data
&&
res
.
data
.
records
&&
res
.
data
.
records
.
length
!=
0
)
{
...
...
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