CN-72 fix:setting 所有列表页面 表头设置框 样式调整

CN-71 feat:用户,角色,i18n,操作记录列表页面 添加搜索框
This commit is contained in:
晶晶 张
2021-07-26 14:05:51 +08:00
parent 956b40b752
commit df61269616
2 changed files with 26 additions and 3 deletions

View File

@@ -9,6 +9,8 @@
<slot name="top-tool-left"></slot> <slot name="top-tool-left"></slot>
</div> </div>
<div class="top-tool-right"> <div class="top-tool-right">
<el-input v-model="keyWord" value="keyWord"></el-input>
<el-button @click="onSearch" icon="el-icon-search" type="info" size="mini" style="margin-right: 10px"></el-button>
<div v-if="showLayout.indexOf('searchInput') > -1" class="top-tool-search margin-r-20"></div> <div v-if="showLayout.indexOf('searchInput') > -1" class="top-tool-search margin-r-20"></div>
<slot name="top-tool-right"></slot> <slot name="top-tool-right"></slot>
<button v-if="showLayout.indexOf('elementSet') > -1" class="top-tool-btn" <button v-if="showLayout.indexOf('elementSet') > -1" class="top-tool-btn"
@@ -43,6 +45,7 @@
<script> <script>
import columnCustomize from '@/components/table/ColumnCustomize' import columnCustomize from '@/components/table/ColumnCustomize'
import { fromRoute } from '@/utils/constants' import { fromRoute } from '@/utils/constants'
import { get } from '@/utils/http'
export default { export default {
name: 'cnDataList', name: 'cnDataList',
@@ -70,16 +73,25 @@ export default {
}, },
data () { data () {
return { return {
keyWord:"",
fromRoute: fromRoute, fromRoute: fromRoute,
tools: { tools: {
showCustomTableTitle: false // 自定义列弹框是否显示 showCustomTableTitle: false // 自定义列弹框是否显示
}, },
showLayout: [] showLayout: [],
Search:[],
} }
}, },
methods: { methods: {
updateCustomTableTitle (custom) { updateCustomTableTitle (custom) {
this.$emit('update:customTableTitle', custom) this.$emit('update:customTableTitle', custom)
},
onSearch () {
get('sys/log?pageNo=1&pageSize=30').then(res => {
if(res.code === 200){
this.Search = res.data.list
}
})
} }
}, },
watch: { watch: {
@@ -93,3 +105,5 @@ export default {
} }
} }
</script> </script>
<style>
</style>

View File

@@ -2,7 +2,7 @@
<div class="pop-custom" v-ele-click-outside="esc"> <div class="pop-custom" v-ele-click-outside="esc">
<div class="pop-title">{{$t('overall.select')}}</div> <div class="pop-title">{{$t('overall.select')}}</div>
<div class="pop-box custom-labels"> <div class="pop-box custom-labels">
<div style="height: 100%; overflow: auto;"> <div style="height: 100%; border-radius:2%; border:1px solid #DCDFE6; overflow: auto;">
<!--NotSet 为true不可设置--> <!--NotSet 为true不可设置-->
<div <div
v-for="(item,index) in custom" v-for="(item,index) in custom"
@@ -29,7 +29,7 @@
<el-button size="mini" :id="tableId+'-element-set-esc'" class="cn-btn cn-btn-size-small-new cn-btn-style-light-new" type="button" @click="esc"> <el-button size="mini" :id="tableId+'-element-set-esc'" class="cn-btn cn-btn-size-small-new cn-btn-style-light-new" type="button" @click="esc">
<span class="top-tool-btn-txt">{{$t('overall.esc')}}</span> <span class="top-tool-btn-txt">{{$t('overall.esc')}}</span>
</el-button> </el-button>
<el-button size="mini" :id="tableId+'-element-set-save'" class="cn-btn cn-btn-size-small-new cn-btn-style-normal-new" type="button" @click="save"> <el-button size="mini" :id="tableId+'-element-set-save'" class="cn-btn cn-btn-size-small-new cn-btn-style-normal-new" type="button" @click="save" style="background-color: #0091ff;color:#DCDFE6">
<span class="top-tool-btn-txt">{{$t('overall.save')}}</span> <span class="top-tool-btn-txt">{{$t('overall.save')}}</span>
</el-button> </el-button>
</div> </div>
@@ -116,6 +116,9 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.pop-title{
margin-top: 7px;
}
.pop-custom { .pop-custom {
padding: 0 12px 12px 12px; padding: 0 12px 12px 12px;
border: 1px solid #EBEEF5; border: 1px solid #EBEEF5;
@@ -127,6 +130,8 @@ export default {
background: #fff; background: #fff;
border-radius: 4px; border-radius: 4px;
z-index: 999999; z-index: 999999;
box-shadow: inset 0 0 10px #CCC;
box-sizing:border-box
} }
.pop-custom-explore { .pop-custom-explore {
top: 33px; top: 33px;
@@ -152,6 +157,10 @@ export default {
cursor: default; cursor: default;
font-size: 14px; font-size: 14px;
} }
.custom-label:hover{
color: #cccccc;
background-color: #DCDFE6;
}
.custom-title{ .custom-title{
padding: 2px 0 2px 2px; padding: 2px 0 2px 2px;
} }