9 Commits
gtz ... zhp

Author SHA1 Message Date
unknown
3a98b7ceea 操作栏增加判断条件 2023-02-06 10:29:05 +08:00
a6060b5a3b Merge pull request 'searchBar按新ui图,按钮间添加竖线' (#3) from zjl into develop
Reviewed-on: #3
2023-01-10 13:34:26 +08:00
6955d75dd6 searchBar按新ui图,按钮间添加竖线 2023-01-10 11:24:12 +08:00
db5e8db835 Merge pull request 'elementUI table的fixed属性错位问题' (#2) from zjl into develop
Reviewed-on: #2
2023-01-09 13:15:16 +08:00
0d9b39d920 elementUI table的fixed属性错位问题 2023-01-09 13:13:15 +08:00
a438469c6b Merge pull request 'zjl' (#1) from zjl into develop
Reviewed-on: #1
2023-01-06 11:09:18 +08:00
a78c20ec59 table默认border,css修改 2023-01-06 11:08:41 +08:00
63d8a33994 版本 2022-12-26 18:49:19 +08:00
43c75e5d8f 单选的反选 2022-12-26 18:40:51 +08:00
7 changed files with 150 additions and 110 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "code-brick-zj", "name": "code-brick-zj",
"version": "0.0.3", "version": "0.0.7",
"private": false, "private": false,
"description": "组件封装", "description": "组件封装",
"main": "index.js" "main": "index.js"

View File

@@ -66,15 +66,15 @@ export default {
} }
} }
</script> </script>
<style lang="scss"> <style>
.baseDialog { .baseDialog .el-dialog__header {
.el-dialog__header {
font-size: 16px; font-size: 16px;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
font-weight: 500; font-weight: 500;
padding: 13px 24px; padding: 13px 24px;
border-bottom: 1px solid #e9e9e9; border-bottom: 1px solid #e9e9e9;
.titleStyle::before{ }
.baseDialog .el-dialog__header .titleStyle::before{
content: ''; content: '';
display: inline-block; display: inline-block;
width: 4px; width: 4px;
@@ -85,15 +85,13 @@ export default {
position: relative; position: relative;
top: 2px; top: 2px;
} }
} .baseDialog .el-dialog__body {
.el-dialog__body {
padding-left: 24px; padding-left: 24px;
padding-right: 24px; padding-right: 24px;
} }
.btnTextStyle { .baseDialog .btnTextStyle {
letter-spacing:6px; letter-spacing:6px;
padding: 9px 10px 9px 16px; padding: 9px 10px 9px 16px;
font-size: 14px; font-size: 14px;
} }
}
</style> </style>

View File

@@ -1,8 +1,10 @@
<template> <template>
<div class="baseTable"> <div class="baseTable">
<el-table <el-table
:ref="id"
:data="renderData" :data="renderData"
v-bind="$attrs" v-bind="$attrs"
:border="cancelBorder ? false : true"
@current-change="currentChange" @current-change="currentChange"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
style="width: 100%" style="width: 100%"
@@ -23,7 +25,7 @@
prop="_pageIndex" prop="_pageIndex"
:width="pageWidth" :width="pageWidth"
align="center" align="center"
fixed :fixed="cancelPageFixed ? false : true"
> >
<template slot="header"> <template slot="header">
<el-popover placement="bottom-start" width="300" trigger="click"> <el-popover placement="bottom-start" width="300" trigger="click">
@@ -115,6 +117,14 @@ export default {
} }
}, },
props: { props: {
cancelBorder: {
type: Boolean,
default: false
},
cancelPageFixed: {
type: Boolean,
default: false
},
tableData: { tableData: {
type: Array, type: Array,
required: true, required: true,
@@ -128,6 +138,11 @@ export default {
return [] return []
} }
}, },
id: {
type: String,
required: false,
default: ''
},
page: { page: {
type: Number, type: Number,
required: false, required: false,
@@ -189,32 +204,37 @@ export default {
}, },
emitButtonClick() { emitButtonClick() {
this.$emit('emitButtonClick') this.$emit('emitButtonClick')
},
setCurrent(name, index) {
let _this = this
let obj = _this.$refs[name].data[index]
_this.$refs[name].setCurrentRow(obj)
},
doLayout(name) {
this.$refs[name].doLayout()
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style scoped>
.baseTable { .baseTable .show-col-btn {
.show-col-btn {
margin-right: 5px; margin-right: 5px;
line-height: inherit; line-height: inherit;
cursor: pointer; cursor: pointer;
} }
.el-icon-refresh { .baseTable .el-icon-refresh {
cursor: pointer; cursor: pointer;
} }
}
</style> </style>
<style lang="scss"> <style>
.baseTable { .baseTable .el-table__body tr.current-row>td.el-table__cell {
.el-table__body tr.current-row>td.el-table__cell {
background-color: #EAF1FC; background-color: #EAF1FC;
} }
.el-table .el-table__cell { .baseTable .el-table .el-table__cell {
padding: 0; padding: 0;
height: 35px; height: 35px;
} }
.addButton { .baseTable .addButton {
width: 100%; width: 100%;
height: 35px; height: 35px;
border-top: none; border-top: none;
@@ -222,16 +242,16 @@ export default {
border-color: #ebeef5; border-color: #ebeef5;
border-radius: 0; border-radius: 0;
} }
.addButton:hover { .baseTable .addButton:hover {
color: #0b58ff; color: #0b58ff;
border-color: #ebeef5; border-color: #ebeef5;
background-color: #fff; background-color: #fff;
} }
.addButton:focus { .baseTable .addButton:focus {
border-color: #ebeef5; border-color: #ebeef5;
background-color: #fff; background-color: #fff;
} }
}
.el-tooltip__popper.is-dark { .el-tooltip__popper.is-dark {
background: rgba(0, 0, 0, 0.6) !important; background: rgba(0, 0, 0, 0.6) !important;
} }

View File

@@ -28,7 +28,7 @@ export default {
} }
} }
</script> </script>
<style lang="css"> <style>
.tableInner .el-input__inner { .tableInner .el-input__inner {
border: none; border: none;
padding: 0; padding: 0;

View File

@@ -95,6 +95,13 @@ export default {
let showStatus = true let showStatus = true
const showStatusArr = showParam.data.map((item) => { const showStatusArr = showParam.data.map((item) => {
let showStatusItem = true let showStatusItem = true
if (item.type === 'have') {
if (row[item.name] !== item.value) {
showStatusItem = true
} else {
showStatusItem = false
}
}
if (item.type === 'unequal') { if (item.type === 'unequal') {
if (row[item.name] !== item.value) { if (row[item.name] !== item.value) {
showStatusItem = true showStatusItem = true
@@ -123,6 +130,13 @@ export default {
showStatusItem = false showStatusItem = false
} }
} }
if (item.type === 'have') {
if (row[item.name] !== item.value) {
showStatusItem = true
} else {
showStatusItem = false
}
}
if (item.type === 'indexof') { if (item.type === 'indexof') {
if (item.value.indexOf(row[item.name]) >= 0) { if (item.value.indexOf(row[item.name]) >= 0) {
showStatusItem = true showStatusItem = true

View File

@@ -77,28 +77,26 @@ export default {
text-align: right; text-align: right;
} }
</style> </style>
<style lang='scss'> <style>
.pagination-container { .pagination-container .el-pagination {
.el-pagination {
position: relative; position: relative;
} }
.el-pagination__jump { .pagination-container .el-pagination__jump {
margin-left: 125px; margin-left: 125px;
} }
.el-pagination__sizes { .pagination-container .el-pagination__sizes {
position: absolute; position: absolute;
right: 100px; right: 100px;
} }
.el-pager li.active { .pagination-container .el-pager li.active {
background-color: #0b58ff; background-color: #0b58ff;
color: #fff; color: #fff;
} }
.el-input--mini .el-input__inner { .pagination-container .el-input--mini .el-input__inner {
height: 22px; height: 22px;
} }
}
</style> </style>

View File

@@ -101,6 +101,7 @@
@click="headBtnClick(item.name)" @click="headBtnClick(item.name)"
>{{ item.btnName }}</el-button >{{ item.btnName }}</el-button
> >
<span v-if="item.type === 'separate'" class="separateStyle"></span>
<!-- 可用于显示其他按钮 --> <!-- 可用于显示其他按钮 -->
</el-form-item> </el-form-item>
</template> </template>
@@ -231,11 +232,10 @@ export default {
} }
} }
</script> </script>
<style lang="scss"> <style>
.searchBar { .searchBar .blue-block {
.blue-block {
float: left;
display: inline-block; display: inline-block;
float: left;
width: 4px; width: 4px;
height: 16px; height: 16px;
background-color: #0B58FF; background-color: #0B58FF;
@@ -243,16 +243,26 @@ export default {
margin-right: 8px; margin-right: 8px;
margin-top: 12px; margin-top: 12px;
} }
.el-form-item { .searchBar .el-form-item {
margin-bottom: 10px; margin-bottom: 10px;
} }
.el-date-editor .el-range__icon { .searchBar .el-date-editor .el-range__icon {
font-size: 16px; font-size: 16px;
color:#0B58FF; color:#0B58FF;
} }
.el-input__prefix .el-icon-date { .searchBar .el-input__prefix .el-icon-date {
font-size: 16px; font-size: 16px;
color:#0B58FF; color:#0B58FF;
} }
.searchBar .el-input__prefix .el-icon-time {
font-size: 16px;
color:#0B58FF;
}
.searchBar .separateStyle {
display: inline-block;
width: 1px;
height: 24px;
background: #E8E8E8;
vertical-align: middle;
} }
</style> </style>