Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
89d12179
authored
2023-03-27 15:44:31 +0800
by
renchao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:table配置话
1 parent
0d80b7e5
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
50 additions
and
17 deletions
README.md
public/config.json
src/components/LbTable/index.vue
src/layout1/components/TagsView/index.vue
src/styles/sbPublic.scss
src/views/jsbwcx/index.vue
src/views/system/menus/index.vue
src/views/system/roles/index.vue
src/views/system/users/index.vue
README.md
View file @
89d1217
<!--
*
@Description:
*
@Autor: renchao
*
@LastEditTime: 2023-03-27 1
3:25:25
*
@LastEditTime: 2023-03-27 1
5:43:24
-->
# 安装依赖
npm install
...
...
@@ -21,4 +21,15 @@ npm install --registry=https://registry.npm.taobao.org
-
`wip`
开发中
## 项目换肤
给html根标签设置一个data-theme属性,然后通过js切换data-theme的属性值,Scss根据此属性来判断使用对应主题变量
\ No newline at end of file
给html根标签设置一个data-theme属性,然后通过js切换data-theme的属性值,Scss根据此属性来判断使用对应主题变量
## config说明
{
"TITLE": "汉中市数据上报系统",
"THEME": "sb",
"CODE": "BDCJGPT", {"BDCSBPT":上报: "BDCJGPT":监管}
"SERVERAPI": "/bdcsjsb",
"calcHeight": 200, {上报:160 监管:200}
"MANAGEMENTAPI": "http://192.168.2.38:8090/management"
}
\ No newline at end of file
...
...
public/config.json
View file @
89d1217
...
...
@@ -3,5 +3,6 @@
"THEME"
:
"sb"
,
"CODE"
:
"BDCJGPT"
,
"SERVERAPI"
:
"/bdcsjsb"
,
"calcHeight"
:
160
,
"MANAGEMENTAPI"
:
"http://192.168.2.38:8090/management"
}
\ No newline at end of file
...
...
src/components/LbTable/index.vue
View file @
89d1217
...
...
@@ -139,11 +139,25 @@ export default {
let
_this
=
this
if
(
this
.
heightNum
)
{
_this
.
$nextTick
(()
=>
{
window
.
addEventListener
(
'resize'
,
()
=>
{
if
(
document
.
querySelector
(
".tags-view-container"
))
{
window
.
addEventListener
(
'resize'
,
()
=>
{
if
(
_this
.
calcHeight
==
230
)
{
_this
.
tableHeight
=
_this
.
calcHeightx
(
192
)
}
else
{
_this
.
tableHeight
=
_this
.
calcHeightx
(
_this
.
calcHeight
)
}
});
if
(
_this
.
calcHeight
==
230
)
{
_this
.
tableHeight
=
_this
.
calcHeightx
(
192
)
}
else
{
_this
.
tableHeight
=
_this
.
calcHeightx
(
_this
.
calcHeight
)
}
}
else
{
window
.
addEventListener
(
'resize'
,
()
=>
{
_this
.
tableHeight
=
_this
.
calcHeightx
(
_this
.
calcHeight
)
});
_this
.
tableHeight
=
_this
.
calcHeightx
(
_this
.
calcHeight
)
});
_this
.
tableHeight
=
_this
.
calcHeightx
(
_this
.
calcHeight
)
}
})
}
else
{
_this
.
tableHeight
=
window
.
innerHeight
-
_this
.
heightNum
...
...
@@ -158,9 +172,15 @@ export default {
calcHeightx
(
value
,
wappered
=
true
)
{
//项目自定义的公共header部分的高度,可忽略
let
header
=
document
.
querySelector
(
".from-clues-header"
).
offsetHeight
;
//value为动态计算table界面高度时,减去的其他空白部分,需自行在调试找到临界值,剩下的就是table表格的高度(包含header+body部分)
value
=
value
==
undefined
?
100
:
value
;
let
res
=
window
.
innerHeight
-
parseInt
(
header
)
-
value
;
if
(
document
.
querySelector
(
".tags-view-container"
))
{
let
tagsView
=
document
.
querySelector
(
".tags-view-container"
).
offsetHeight
;
var
res
=
window
.
innerHeight
-
parseInt
(
header
)
-
value
-
parseInt
(
tagsView
);
}
else
{
var
res
=
window
.
innerHeight
-
parseInt
(
header
)
-
value
;
}
if
(
wappered
)
{
//通过原生方法,获取dom节点的高度------获取element-ui table表格body的元素
let
wapper
=
window
.
document
.
getElementsByClassName
(
'el-table__body-wrapper'
);
...
...
src/layout1/components/TagsView/index.vue
View file @
89d1217
...
...
@@ -194,12 +194,12 @@ export default {
@import
"~@/styles/_handle.scss"
;
.tags-view-container
{
height
:
4
0px
;
height
:
5
0px
;
width
:
100%
;
background
:
#fff
;
border-bottom
:
1px
solid
#d8dce5
;
box-sizing
:
border-box
;
padding-top
:
2
px
;
padding-top
:
7
px
;
margin-bottom
:
7px
;
border-radius
:
4px
;
...
...
src/styles/sbPublic.scss
View file @
89d1217
...
...
@@ -17,7 +17,7 @@
&
-header
{
width
:
100%
;
padding
:
7px
15px
1
0
px
15px
;
padding
:
7px
15px
1
5
px
15px
;
box-sizing
:
border-box
;
background-size
:
100%
100%
;
background
:
#FFFFFF
;
...
...
src/views/jsbwcx/index.vue
View file @
89d1217
...
...
@@ -4,7 +4,7 @@
<!-- 头部搜索 -->
<div
class=
"from-clues-header"
>
<el-form
ref=
"ruleForm"
:model=
"form"
label-width=
"100px"
>
<el-form-item
v-if=
"BASE_API.THEME
==
'jg'"
>
<el-form-item
v-if=
"BASE_API.THEME
==
'jg'"
>
<Breadcrumb
/>
</el-form-item>
<el-row
class=
"mb-5"
>
...
...
src/views/system/menus/index.vue
View file @
89d1217
...
...
@@ -19,7 +19,7 @@
</el-form>
</div>
<div
class=
"from-clues-content"
>
<lb-table
:pagination=
"false"
:column=
"tableData.columns"
:calcHeight=
"
200
"
:data=
"tablelistData"
row-key=
"id"
<lb-table
:pagination=
"false"
:column=
"tableData.columns"
:calcHeight=
"
BASE_API.calcHeight
"
:data=
"tablelistData"
row-key=
"id"
default-expand-all
:tree-props=
"
{ children: 'children', hasChildren: 'hasChildren' }">
</lb-table>
...
...
src/views/system/roles/index.vue
View file @
89d1217
...
...
@@ -2,7 +2,7 @@
<div
class=
"timedTask from-clues"
>
<div
class=
"from-clues-header"
>
<el-form
ref=
"ruleForm"
:model=
"form"
label-width=
"100px"
>
<el-form-item
v-if=
"BASE_API.THEME
==
'jg'"
>
<el-form-item
v-if=
"BASE_API.THEME
==
'jg'"
>
<Breadcrumb
/>
</el-form-item>
<el-row
class=
"mb-5"
>
...
...
@@ -19,7 +19,7 @@
</el-form>
</div>
<div
class=
"from-clues-content"
>
<lb-table
:pagination=
"false"
@
size-change=
"handleSizeChange"
:calcHeight=
"
200
"
<lb-table
:pagination=
"false"
@
size-change=
"handleSizeChange"
:calcHeight=
"
BASE_API.calcHeight
"
@
p-current-change=
"handleCurrentChange"
:column=
"tableData.columns"
:data=
"listdata"
:expand-row-keys=
"keyList"
row-key=
"dictid"
>
</lb-table>
...
...
src/views/system/users/index.vue
View file @
89d1217
...
...
@@ -2,7 +2,7 @@
<div
class=
"timedTask from-clues"
>
<div
class=
"from-clues-header"
>
<el-form
ref=
"ruleForm"
:model=
"form"
label-width=
"100px"
>
<el-form-item
v-if=
"BASE_API.THEME
==
'jg'"
>
<el-form-item
v-if=
"BASE_API.THEME
==
'jg'"
>
<Breadcrumb
/>
</el-form-item>
<el-row
class=
"mb-5"
>
...
...
@@ -31,7 +31,8 @@
</div>
<div
class=
"from-clues-content"
>
<lb-table
:pagination=
"false"
@
size-change=
"handleSizeChange"
@
p-current-change=
"handleCurrentChange"
:column=
"tableData.columns"
:calcHeight=
"200"
:data=
"tableData.data"
:expand-row-keys=
"keyList"
row-key=
"dictid"
>
:column=
"tableData.columns"
:calcHeight=
"BASE_API.calcHeight"
:data=
"tableData.data"
:expand-row-keys=
"keyList"
row-key=
"dictid"
>
</lb-table>
</div>
<EditDialog
ref=
"dialogForm"
v-model=
"isDialog"
@
ok=
"reloadTableData"
/>
...
...
@@ -408,5 +409,5 @@ export default {
};
</
script
>
<
style
scoped
lang=
"scss"
>
@import
"~@/styles/mixin.scss"
;
@import
"~@/styles/mixin.scss"
;
</
style
>
...
...
Please
register
or
sign in
to post a comment