Commit 1c201c47 authored by 赵伟庚's avatar 赵伟庚

update: 配置管理-字典配置

parent 237504d7
...@@ -994,39 +994,32 @@ border-radius:8px; ...@@ -994,39 +994,32 @@ border-radius:8px;
display: flex; display: flex;
} }
.top_fliter .filter_list { .filter_list {
flex-grow: 1; flex-grow: 1;
min-width: 550px;
font-size: 0; font-size: 0;
padding-left: 16px;
} }
.filter_list>.filter_item {
display: inline-block;
vertical-align: middle;
margin-top: 16px;
}
.filter_list>.filter_item { .filter_list>.filter_item {
margin-right:34px; display: flex;
align-items: center;
margin: 0 34px 16px 0;
} }
.filter_list>.filter_item>* { /* .filter_list>.filter_item>* {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
} } */
.filter_list>.filter_item>.filter_title { .filter_list>.filter_item>.filter_title {
min-width: 56px;
text-align: right; text-align: right;
font-size: 14px; font-size: 14px;
font-weight: 700;
color: #242c43; color: #242c43;
margin-right: 10px; margin-right: 10px;
white-space: nowrap; width: 84px;
white-space: pre-wrap;
font-weight: normal;
} }
.filter_list>.filter_item>.filter_title+* { /* .filter_list>.filter_item>.filter_title+* {
width: 300px; width: 300px;
} }
...@@ -1038,7 +1031,7 @@ border-radius:8px; ...@@ -1038,7 +1031,7 @@ border-radius:8px;
position: absolute; position: absolute;
right: 5px; right: 5px;
top: 1px; top: 1px;
} } */
.top_fliter .filter_action { .top_fliter .filter_action {
flex-shrink: 0; flex-shrink: 0;
......
:root { :root {
--font-color: #404a62; --font-color: #404a62;
/* --el-color-primary-light-9: #f7f7f9; */ /* --el-color-primary-light-9: #f7f7f9; */
--el-color-white: #ffffff;
--el-color-black: #1a1a1a;
--el-color-primary: #2b4695;
--el-color-primary-light-3: #6b7eb5;
--el-color-primary-light-5: #95a3ca;
--el-color-primary-light-7: #c0c8df;
--el-color-primary-light-8: #d5daea;
--el-color-primary-light-9: #eaedf5;
--el-color-primary-dark-2: #223877;
--el-color-success: #429e8a;
--el-color-success-light-3: #7bbbad;
--el-color-success-light-5: #a1cfc5;
--el-color-success-light-7: #c7e2dc;
--el-color-success-light-8: #d9ece8;
--el-color-success-light-9: #ecf5f4;
--el-color-success-dark-2: #357e6e;
--el-color-warning: #e56600;
--el-color-warning-light-3: #ed944d;
--el-color-warning-light-5: #f2b380;
--el-color-warning-light-7: #f7d1b3;
--el-color-warning-light-8: #fae0cc;
--el-color-warning-light-9: #fcf0e6;
--el-color-warning-dark-2: #b75200;
--el-color-danger: #d75138;
--el-color-danger-light-3: #e38674;
--el-color-danger-light-5: #eba89c;
--el-color-danger-light-7: #f3cbc4;
--el-color-danger-light-8: #f7dcd7;
--el-color-danger-light-9: #fbeeeb;
--el-color-danger-dark-2: #ac412d;
--el-color-error: #d75138;
--el-color-error-light-3: #e38674;
--el-color-error-light-5: #eba89c;
--el-color-error-light-7: #f3cbc4;
--el-color-error-light-8: #f7dcd7;
--el-color-error-light-9: #fbeeeb;
--el-color-error-dark-2: #ac412d;
--el-color-info: #404a62;
--el-color-info-light-3: #7a8191;
--el-color-info-light-5: #a0a5b1;
--el-color-info-light-7: #c6c9d0;
--el-color-info-light-8: #d9dbe0;
--el-color-info-light-9: #ecedf0;
--el-color-info-dark-2: #333b4e;
--el-bg-color: #ffffff;
--el-bg-color-page: #f2f3f5;
--el-bg-color-overlay: #ffffff;
--el-text-color-primary: #202531;
--el-text-color-regular: #404a62;
--el-text-color-secondary: #909bb6;
--el-text-color-placeholder: #a9b1c7;
--el-text-color-disabled: #a9b1c7;
--el-border-color: #dadee7;
--el-border-color-light: #e3e5eb;
--el-border-color-lighter: #e6e9ef;
--el-border-color-extra-light: #edf0f5;
--el-border-color-dark: #d1d5de;
--el-border-color-darker: #cbced7;
--el-fill-color: #f0f2f5;
--el-fill-color-light: #f2f3f7;
--el-fill-color-lighter: #f7f7f9;
--el-fill-color-extra-light: #fafcff;
--el-fill-color-dark: #ebedf0;
--el-fill-color-darker: #e6e8eb;
--el-fill-color-blank: #ffffff;
--el-component-size: 36px;
}
--el-color-white: #ffffff;
--el-color-black: #1a1a1a;
--el-color-primary: #2b4695;
--el-color-primary-light-3: #6b7eb5;
--el-color-primary-light-5: #95a3ca;
--el-color-primary-light-7: #c0c8df;
--el-color-primary-light-8: #d5daea;
--el-color-primary-light-9: #eaedf5;
--el-color-primary-dark-2: #223877;
--el-color-success: #429e8a;
--el-color-success-light-3: #7bbbad;
--el-color-success-light-5: #a1cfc5;
--el-color-success-light-7: #c7e2dc;
--el-color-success-light-8: #d9ece8;
--el-color-success-light-9: #ecf5f4;
--el-color-success-dark-2: #357e6e;
--el-color-warning: #e56600;
--el-color-warning-light-3: #ed944d;
--el-color-warning-light-5: #f2b380;
--el-color-warning-light-7: #f7d1b3;
--el-color-warning-light-8: #fae0cc;
--el-color-warning-light-9: #fcf0e6;
--el-color-warning-dark-2: #b75200;
--el-color-danger: #d75138;
--el-color-danger-light-3: #e38674;
--el-color-danger-light-5: #eba89c;
--el-color-danger-light-7: #f3cbc4;
--el-color-danger-light-8: #f7dcd7;
--el-color-danger-light-9: #fbeeeb;
--el-color-danger-dark-2: #ac412d;
--el-color-error: #d75138;
--el-color-error-light-3: #e38674;
--el-color-error-light-5: #eba89c;
--el-color-error-light-7: #f3cbc4;
--el-color-error-light-8: #f7dcd7;
--el-color-error-light-9: #fbeeeb;
--el-color-error-dark-2: #ac412d;
--el-color-info: #404a62;
--el-color-info-light-3: #7a8191;
--el-color-info-light-5: #a0a5b1;
--el-color-info-light-7: #c6c9d0;
--el-color-info-light-8: #d9dbe0;
--el-color-info-light-9: #ecedf0;
--el-color-info-dark-2: #333b4e;
--el-bg-color: #ffffff;
--el-bg-color-page: #f2f3f5;
--el-bg-color-overlay: #ffffff;
--el-text-color-primary: #202531;
--el-text-color-regular: #404a62;
--el-text-color-secondary: #909bb6;
--el-text-color-placeholder: #a9b1c7;
--el-text-color-disabled: #a9b1c7;
--el-border-color: #dadee7;
--el-border-color-light: #e3e5eb;
--el-border-color-lighter: #e6e9ef;
--el-border-color-extra-light: #edf0f5;
--el-border-color-dark: #d1d5de;
--el-border-color-darker: #cbced7;
--el-fill-color: #f0f2f5;
--el-fill-color-light: #f2f3f7;
--el-fill-color-lighter: #f7f7f9;
--el-fill-color-extra-light: #fafcff;
--el-fill-color-dark: #ebedf0;
--el-fill-color-darker: #e6e8eb;
--el-fill-color-blank: #ffffff;
}
.text-hide1{
.text-hide1{ overflow: hidden;
overflow: hidden; text-overflow:ellipsis;
text-overflow:ellipsis; white-space: nowrap;
white-space: nowrap; }
} .log_content_nor::-webkit-scrollbar {
width: 0px; /*对垂直流动条有效*/
.log_content_nor::-webkit-scrollbar { height: 0px; /*对水平流动条有效*/
width: 0px; /*对垂直流动条有效*/ }
height: 0px; /*对水平流动条有效*/ \ No newline at end of file
}
\ No newline at end of file
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</template> </template>
<script setup> <script setup>
import { computed, onMounted, reactive, toRefs, watch,ref } from "vue-demi" import { computed, onMounted, reactive, toRefs, watch,ref } from "vue"
const state = reactive({ const state = reactive({
showFlag: false, showFlag: false,
...@@ -36,9 +36,9 @@ const state = reactive({ ...@@ -36,9 +36,9 @@ const state = reactive({
}) })
const props = defineProps({ const props = defineProps({
keyword: { modelValue: {
type: String, type: String,
default: "" default: '',
}, },
placeholder: { placeholder: {
type: String, type: String,
...@@ -47,9 +47,12 @@ const props = defineProps({ ...@@ -47,9 +47,12 @@ const props = defineProps({
}) })
watch(props,(n,o) => { watch(props,(n,o) => {
state.modelValue = n.keyword state.modelValue = n.modelValue
}) })
const emit = defineEmits(['search']) watch(() => state.modelValue,(n,o) => {
emit('update:modelValue',n)
})
const emit = defineEmits(['search','update:modelValue'])
const search = () => { const search = () => {
emit('search',state.modelValue) emit('search',state.modelValue)
} }
...@@ -57,7 +60,7 @@ const moreFilter = () => { ...@@ -57,7 +60,7 @@ const moreFilter = () => {
state.showFlag = !state.showFlag state.showFlag = !state.showFlag
} }
onMounted(() => { onMounted(() => {
state.modelValue = props.keyword state.modelValue = props.modelValue
}) })
const { modelValue,showFlag } = toRefs(state) const { modelValue,showFlag } = toRefs(state)
</script> </script>
\ No newline at end of file
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
@select="selectActionRow" @select="selectActionRow"
@select-all="selectActionAll" @select-all="selectActionAll"
:stripe="stripe" :stripe="stripe"
:row-class-name="stripe ? tableRowClassName : ''"
tooltip-effect="light"
> >
<template v-slot:empty> <template v-slot:empty>
<div class="empty_container"> <div class="empty_container">
...@@ -16,6 +18,10 @@ ...@@ -16,6 +18,10 @@
</div> </div>
</div> </div>
</template> </template>
<el-table-column
v-if="paddingLeft > 10"
:width="paddingLeft - 10"
></el-table-column>
<el-table-column <el-table-column
type="selection" type="selection"
:selectable="selectable" :selectable="selectable"
...@@ -30,7 +36,7 @@ ...@@ -30,7 +36,7 @@
type="index" type="index"
:label="indexLabel" :label="indexLabel"
width="80" width="80"
align="center" align="left"
> >
<!-- 序号 --> <!-- 序号 -->
</el-table-column> </el-table-column>
...@@ -111,7 +117,11 @@ export default { ...@@ -111,7 +117,11 @@ export default {
stripe: { stripe: {
type: Boolean, type: Boolean,
default: false default: false
} },
paddingLeft: {
type: [Number, String],
default: () => 33,
},
}, },
/* filters: { /* filters: {
ellipsis(value, max) { ellipsis(value, max) {
...@@ -172,7 +182,14 @@ export default { ...@@ -172,7 +182,14 @@ export default {
this.allSelectData={} this.allSelectData={}
this.nowSelectData=[] this.nowSelectData=[]
this.clearSelection(); this.clearSelection();
} },
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 0) {
return "white-row";
} else {
return "stripe-row";
}
},
}, },
}; };
</script> </script>
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
import debounce from './debounce' import debounce from './debounce'
import BgPagination from './bg-pagination.vue' import BgPagination from './bg-pagination.vue'
import BgInnerTabs from './bg-inner-tabs.vue' import BgInnerTabs from './bg-inner-tabs.vue'
import BgFilterGroup from './bg-filter-group.vue'
const components = { const components = {
BgIcon,//字体图标 BgIcon,//字体图标
...@@ -65,6 +66,7 @@ const components = { ...@@ -65,6 +66,7 @@ const components = {
debounce,//防抖组件 debounce,//防抖组件
BgPagination,// 分页组件 BgPagination,// 分页组件
BgInnerTabs,//内部tab BgInnerTabs,//内部tab
BgFilterGroup,//高级搜索
}; };
const install = (Vue) => { const install = (Vue) => {
......
...@@ -669,7 +669,6 @@ a { ...@@ -669,7 +669,6 @@ a {
&.el-table--border { &.el-table--border {
border-top-color: #b0bee8; border-top-color: #b0bee8;
border-bottom: 1px solid #ebeef5;
.el-table__header-wrapper { .el-table__header-wrapper {
position: relative; position: relative;
...@@ -687,7 +686,7 @@ a { ...@@ -687,7 +686,7 @@ a {
&::after { &::after {
content: ""; content: "";
width: 1px; width: 0px;
height: 100%; height: 100%;
background-color: #b0bee8; background-color: #b0bee8;
position: absolute; position: absolute;
...@@ -705,7 +704,12 @@ a { ...@@ -705,7 +704,12 @@ a {
} }
} }
} }
.stripe-row td {
background-color: #fff!important;
}
.white-row td {
background-color: #f7f7f9!important;
}
.el-table--striped .el-table__body tr.el-table__row--striped td { .el-table--striped .el-table__body tr.el-table__row--striped td {
background-color: #f7f7f9; background-color: #f7f7f9;
} }
...@@ -738,6 +742,15 @@ a { ...@@ -738,6 +742,15 @@ a {
margin: 0 !important; margin: 0 !important;
} }
} }
.el-popper {
max-width: 388px;
padding: 15px 12px;
color: #202531;
box-shadow: 0px 4px 12px 0px
rgba(18, 30, 63, 0.1);
border: solid 1px #e6e9ef;
font-size: 14px;
}
} }
.bg-table-pro{ .bg-table-pro{
...@@ -2312,9 +2325,8 @@ a { ...@@ -2312,9 +2325,8 @@ a {
.bg-pagination { .bg-pagination {
height: 32px; height: 32px;
position: absolute; margin-top: 16px;
right: 24px; float: right;
bottom: 16px;
.el-pagination { .el-pagination {
text-align: center; text-align: center;
margin: 0 auto; margin: 0 auto;
......
...@@ -6,50 +6,81 @@ ...@@ -6,50 +6,81 @@
<el-breadcrumb-item> 字典配置 </el-breadcrumb-item> <el-breadcrumb-item> 字典配置 </el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
<div class="main_container"> <div class="flex_row">
<div class="left_type"> <div class="flex_left">
<el-input class="type-input" v-model="search" @input="searchType" placeholder="请输入内容"></el-input> <div class="box">
<el-input class="type-input" v-model="search" @input="searchType" placeholder="请输入内容"></el-input>
<div class="type_station bg-scroll"> <div class="type_station bg-scroll">
<div class="type-box" :class="{'current-type':nodeId==item.id}" @click="nodeClick(item)" v-for="(item,index) in typeList" :key="'type'+index+200"> <div class="type-box" :class="{'current-type':nodeId==item.id}" @click="nodeClick(item)" v-for="(item,index) in typeList" :key="'type'+index+200">
{{item.name}} {{item.name}}
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="right_container"> <div class="flex_right">
<div class="main_container">
<div class="apaas_button"> <bg-filter-group @search="changeSearch" v-model="filter.search" placeholder="请输入能力名称">
<el-button class="register_btn" type="primary" @click="register"> <template v-slot:left_action>
<bg-icon style="font-size: 12px; color: #fff; margin-right: 8px" icon="#bg-ic-add"></bg-icon> <div class="apaas_button">
新建 <el-button class="register_btn" type="primary" @click="register">
</el-button> <bg-icon style="font-size: 12px; color: #fff; margin-right: 8px" icon="#bg-ic-add"></bg-icon>
</div> 新建
<div class="table_container"> </el-button>
<bg-table ref="bgTable" :headers="headers" :rows="tableRows" :isIndex="true" :stripe="true"> </div>
<template v-slot:state="{ row }">
{{ ["-","启用","禁用"][row.state] }}
</template>
<template v-slot:updated_time="{ row }">
{{ row.updated_time.split("+")[0].replace("T", " ").replace("Z", " ") }}
</template> </template>
<template v-slot:action="{ row }"> <template v-slot:filter_group>
<bg-table-btn class="btn" :click="()=>{edit_row(row)}" :disabled="row.state == 1"> <div class="left-filter filter_list">
编辑 <div class="filter_item">
</bg-table-btn> <span class="filter_title">状态</span>
<bg-table-btn class="btn" :click="()=>{delete_row(row)}" :disabled="row.state == 1"> <el-select
删除 v-model="filter.state"
</bg-table-btn> placeholder="请选择"
style="width: 300px"
>
<el-option
v-for="(item, index) in stateOptions"
:key="'pushOptions' + index"
:label="item.name"
:value="item.value"
>
</el-option>
</el-select>
</div>
</div>
<div class="right-action apaas_button">
<el-button type="primary" @click="filterAction"> 查询 </el-button>
<el-button type="default" @click="filterClear"> 重置 </el-button>
</div>
</template> </template>
</bg-table> </bg-filter-group>
<bg-pagination <div class="table_container">
:page="filter.page" <bg-table ref="bgTable" :headers="headers" :rows="tableRows" :isIndex="true" :stripe="true">
:size="filter.size" <template v-slot:state="{ row }">
:total="tableTotal" {{ ["-","启用","禁用"][row.state] }}
@change-page="changePage" </template>
@change-size="changeSize" <template v-slot:updated_time="{ row }">
> {{ row.updated_time.split("+")[0].replace("T", " ").replace("Z", " ") }}
</bg-pagination> </template>
<template v-slot:action="{ row }">
<bg-table-btn class="btn" :click="()=>{edit_row(row)}" :disabled="row.state == 1">
编辑
</bg-table-btn>
<bg-table-btn class="btn" :click="()=>{delete_row(row)}" :disabled="row.state == 1">
删除
</bg-table-btn>
</template>
</bg-table>
<bg-pagination
:page="filter.page"
:size="filter.size"
:total="tableTotal"
@change-page="changePage"
@change-size="changeSize"
>
</bg-pagination>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -59,7 +90,6 @@ ...@@ -59,7 +90,6 @@
<script setup> <script setup>
import { reactive, ref,onBeforeMount,toRefs,computed,watch } from 'vue' import { reactive, ref,onBeforeMount,toRefs,computed,watch } from 'vue'
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import bgTable from '@/bg-ui/bg-table.vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import axios from '../../../../request/http.js' import axios from '../../../../request/http.js'
const state = reactive({ const state = reactive({
...@@ -96,7 +126,6 @@ const state = reactive({ ...@@ -96,7 +126,6 @@ const state = reactive({
{ {
label: "描述", label: "描述",
prop: "describe", prop: "describe",
minWidth: 360
}, },
{ {
label: "状态", label: "状态",
...@@ -113,7 +142,14 @@ const state = reactive({ ...@@ -113,7 +142,14 @@ const state = reactive({
fixed: "right", fixed: "right",
}, },
], ],
tableRows: [], tableRows: [
{
name: "www",
describe: "sajdashkjdhsdjfkhsadjkfhkjsdahfkjashdkfjhsdjkafhkjsdhfkjshjkdfhajkhsdjkf",
state: 1,
updated_time: "2022-10-12 12:12:12"
},
],
tableTotal: 0, tableTotal: 0,
filter: { filter: {
state: "", state: "",
...@@ -122,6 +158,20 @@ const state = reactive({ ...@@ -122,6 +158,20 @@ const state = reactive({
limit: 10, limit: 10,
kind: "business_type", kind: "business_type",
}, },
stateOptions: [
{
name: "全部",
value: ""
},
{
name: "启用",
value: "1"
},
{
name: "禁用",
value: "2"
},
],
}) })
const nodeClick = (item) => { const nodeClick = (item) => {
state.nodeId = item.id state.nodeId = item.id
...@@ -137,6 +187,23 @@ const searchType = () => { ...@@ -137,6 +187,23 @@ const searchType = () => {
const getTypeList = () => { const getTypeList = () => {
console.log(state.search) console.log(state.search)
} }
const changeSearch = (val) => {
state.filter.search = val
console.log(state.filter)
}
const filterAction = () => {
console.log(state.filter)
}
const filterClear = () => {
state.filter = {
state: "",
search: "",
limit: 10,
page: 1,
kind: "business_type",
}
console.log(state.filter)
}
const getTableRows = () => { const getTableRows = () => {
let params = {...state.filter} let params = {...state.filter}
axios axios
...@@ -182,6 +249,7 @@ const { ...@@ -182,6 +249,7 @@ const {
tableRows, tableRows,
tableTotal, tableTotal,
filter, filter,
stateOptions,
} = toRefs(state) } = toRefs(state)
...@@ -190,53 +258,86 @@ const { ...@@ -190,53 +258,86 @@ const {
<style lang="scss" scoped> <style lang="scss" scoped>
.detail_container { .detail_container {
width: 100%; width: 100%;
height: calc(100vh - 56px);
padding: 0 24px; padding: 0 24px;
min-height: 100%; min-height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-start; justify-content: flex-start;
align-items: stretch; align-items: stretch;
.main_container { .flex_row {
flex-grow: 1; // flex-grow: 1;
width: 100%; width: 100%;
display: flex; display: flex;
// box-shadow: 0px 1px 4px 0px rgba(0,7,101,0.15);
margin-bottom: 16px; margin-bottom: 16px;
position: relative; position: relative;
.left_type { height: calc(100% - 62px);
height: calc(100vh - 118px); .flex_left {
width: 280px; width: 280px;
background-color: #fff; background-color: #fff;
margin-right: 16px; margin-right: 16px;
border-radius: 6px; border-radius: 6px;
overflow: hidden;
padding: 16px; padding: 16px;
.type_station { height: 100%;
margin-top: 16px; box-shadow: 0px 1px 4px 0px
height: calc(100% - 50px); rgba(0, 7, 101, 0.15);
.type-box { overflow: hidden;
height: 32px;
line-height: 32px; .box {
padding-left: 38px; width: 248px;
font-size: 14px; height: 100%;
color: #404a62; overflow: hidden;
cursor: pointer; .type_station {
&:hover { width: 100%;
margin-top: 16px;
height: calc(100% - 50px);
// overflow: hidden;
.type-box {
height: 32px;
line-height: 32px;
padding-left: 38px;
font-size: 14px;
color: #404a62;
cursor: pointer;
&:hover {
color: #3759be;
background-color: #dfe5f6;
}
}
.current-type{
color: #3759be; color: #3759be;
background-color: #dfe5f6; background-color: #dfe5f6;
} }
} }
.current-type{
color: #3759be;
background-color: #dfe5f6;
}
} }
} }
.right_container { .flex_right {
flex: 1; flex: 1;
background-color: #fff; background-color: #fff;
border-radius: 6px; border-radius: 6px;
box-shadow: 0px 1px 4px 0px rgba(0,7,101,0.15);
height: 100%;
.filter-group {
.left-filter {
flex: 1;
display: flex;
justify-content: start;
flex-wrap: wrap;
}
.right-action {
width: 144px;
padding-bottom: 16px;
.el-button {
width: 64px;
}
}
}
.table_container {
width: 100%;
padding: 0 16px;
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment