@@ -80,7 +80,7 @@ export default {
|
||||
}).send()
|
||||
},
|
||||
// 保存
|
||||
addParam(data, callback) {
|
||||
addParam(data, callback, failCallback) {
|
||||
RequestService.sendRequest()
|
||||
.url(`${getServiceUrl()}/admin/params`)
|
||||
.method('POST')
|
||||
@@ -89,6 +89,10 @@ export default {
|
||||
RequestService.clearRequestTime()
|
||||
callback(res)
|
||||
})
|
||||
.fail((err) => {
|
||||
RequestService.clearRequestTime()
|
||||
failCallback(err)
|
||||
})
|
||||
.networkFail((err) => {
|
||||
console.error('添加参数失败:', err)
|
||||
RequestService.reAjaxFun(() => {
|
||||
|
||||
|
Before Width: | Height: | Size: 227 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 213 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 232 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 255 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 508 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 253 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 30 KiB |
@@ -15,7 +15,7 @@ export default {
|
||||
type: {
|
||||
type: String,
|
||||
default: 'default',
|
||||
validator: (val) => ['default', 'confirm'].includes(val)
|
||||
validator: (val) => ['default', 'confirm', 'delete'].includes(val)
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -23,29 +23,33 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.custom-button--default {
|
||||
background: transparent;
|
||||
color: #8099fc;
|
||||
border: 1px solid #adbdff;
|
||||
width: fit-content;
|
||||
background: #4998ff;
|
||||
color: #ffffff;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&.el-button--small {
|
||||
font-size: 14px;
|
||||
}
|
||||
&.el-button--medium {
|
||||
padding: 12px 20px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: #f1f2ff;
|
||||
color: #8099fc;
|
||||
border-color: #adbdff;
|
||||
box-shadow: 0 2px 8px rgba(128, 153, 252, 0.3);
|
||||
background: #62a4fc;
|
||||
color: #ffffff;
|
||||
border-color: transparent;
|
||||
box-shadow: 0 2px 8px rgba(74, 124, 253, 0.2);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
&.is-disabled,
|
||||
&.is-disabled:hover {
|
||||
background: transparent;
|
||||
color: #c0c4cc;
|
||||
border-color: #e4e7ed;
|
||||
background: linear-gradient(to right, #f0f3fe, #f5f6fe);
|
||||
color: rgba(74, 124, 253, 0.5);
|
||||
border-color: transparent;
|
||||
box-shadow: none;
|
||||
transform: none;
|
||||
cursor: not-allowed;
|
||||
@@ -63,9 +67,11 @@ export default {
|
||||
&.el-button--small {
|
||||
font-size: 14px;
|
||||
}
|
||||
&.el-button--medium {
|
||||
padding: 12px 20px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: linear-gradient(to right, #6b8cff, #9a7cff);
|
||||
color: white;
|
||||
border-color: transparent;
|
||||
box-shadow: 0 2px 8px rgba(74, 124, 253, 0.3);
|
||||
@@ -82,4 +88,37 @@ export default {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
.custom-button--delete {
|
||||
width: fit-content;
|
||||
background: linear-gradient(to right, #ff6b6b, #ff8e8e);
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&.el-button--small {
|
||||
font-size: 14px;
|
||||
}
|
||||
&.el-button--medium {
|
||||
padding: 12px 20px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: white;
|
||||
border-color: transparent;
|
||||
box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
&.is-disabled,
|
||||
&.is-disabled:hover {
|
||||
background: linear-gradient(to right, #ffaaaa, #ffcaca);
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
border-color: transparent;
|
||||
box-shadow: none;
|
||||
transform: none;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -21,19 +21,20 @@
|
||||
<slot></slot>
|
||||
<template slot="footer">
|
||||
<div v-if="footer" class="dialog-footer">
|
||||
<el-button @click="handleCancel">{{ cancelText }}</el-button>
|
||||
<el-button :loading="confirmLoading" type="primary" @click="handleConfirm">
|
||||
<CustomButton @click="handleCancel">{{ cancelText }}</CustomButton>
|
||||
<CustomButton :loading="confirmLoading" type="confirm" @click="handleConfirm">
|
||||
<span class="confirm-inner">
|
||||
<img src="@/assets/knowledge-base/star.png" class="confirm-icon" />
|
||||
{{ confirmText }}
|
||||
</span>
|
||||
</el-button>
|
||||
</CustomButton>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CustomButton from './CustomButton.vue';
|
||||
export default {
|
||||
name: "CustomDialog",
|
||||
props: {
|
||||
@@ -91,6 +92,9 @@ export default {
|
||||
dialogVisible: this.visible
|
||||
};
|
||||
},
|
||||
components: {
|
||||
CustomButton
|
||||
},
|
||||
watch: {
|
||||
visible(val) {
|
||||
this.dialogVisible = val;
|
||||
@@ -195,7 +199,6 @@ export default {
|
||||
.dialog-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 12px;
|
||||
|
||||
.el-button {
|
||||
padding: 10px 20px;
|
||||
|
||||
@@ -46,9 +46,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.pagination-wrapper {
|
||||
margin-top: 20px;
|
||||
}
|
||||
::v-deep .el-pagination {
|
||||
.btn-next,
|
||||
.btn-prev,
|
||||
|
||||
@@ -0,0 +1,327 @@
|
||||
<template>
|
||||
<div class="custom-table-wrapper">
|
||||
<div class="table-container">
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="data"
|
||||
:class="['custom-table', tableClass]"
|
||||
height="100%"
|
||||
v-loading="loading"
|
||||
:element-loading-text="loadingText"
|
||||
:element-loading-spinner="loadingSpinner"
|
||||
:element-loading-background="loadingBackground"
|
||||
:header-cell-class-name="headerCellClassName"
|
||||
:row-class-name="rowClassName"
|
||||
@selection-change="handleSelectionChange"
|
||||
@row-click="handleRowClick"
|
||||
>
|
||||
<!-- 选择列 -->
|
||||
<el-table-column
|
||||
v-if="showSelection"
|
||||
width="55"
|
||||
align="center"
|
||||
label="选择"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<slot
|
||||
v-if="$scopedSlots.selection"
|
||||
name="selection"
|
||||
:row="scope.row"
|
||||
:$index="scope.$index"
|
||||
/>
|
||||
<el-checkbox
|
||||
v-else
|
||||
:value="scope.row.selected"
|
||||
@change="handleCheckboxChange(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- 动态列 -->
|
||||
<el-table-column
|
||||
v-for="column in columns"
|
||||
:key="column.prop"
|
||||
:prop="column.prop"
|
||||
:label="column.label"
|
||||
:width="column.width"
|
||||
:min-width="column.minWidth"
|
||||
:align="column.align || 'center'"
|
||||
:show-overflow-tooltip="column.showOverflowTooltip !== false"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<!-- 自定义插槽:优先使用 column.slot 指定的插槽名,否则用 column.prop 作为插槽名 -->
|
||||
<slot
|
||||
v-if="$scopedSlots[column.slot] || $scopedSlots[column.prop]"
|
||||
:name="column.slot || column.prop"
|
||||
:row="scope.row"
|
||||
:$index="scope.$index"
|
||||
:column="column"
|
||||
/>
|
||||
<!-- 默认显示 -->
|
||||
<template v-else>
|
||||
{{ scope.row[column.prop] }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- 操作列 -->
|
||||
<el-table-column
|
||||
v-if="showOperations"
|
||||
:label="operationsLabel"
|
||||
align="center"
|
||||
:width="operationsWidth"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<slot name="operations" :row="scope.row" :$index="scope.$index" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<!-- 分页 -->
|
||||
<div class="table-footer">
|
||||
<slot name="footer-btns"></slot>
|
||||
<CustomPagination
|
||||
v-if="showPagination"
|
||||
:total="total"
|
||||
:current-page="currentPage"
|
||||
:page-size="pageSize"
|
||||
:page-size-options="pageSizeOptions"
|
||||
@size-change="handleSizeChange"
|
||||
@page-change="handlePageChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CustomPagination from './CustomPagination.vue';
|
||||
|
||||
export default {
|
||||
name: 'CustomTable',
|
||||
components: {
|
||||
CustomPagination
|
||||
},
|
||||
props: {
|
||||
// 表格数据
|
||||
data: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
// 列配置
|
||||
columns: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
// 是否显示选择框
|
||||
showSelection: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 是否显示操作列
|
||||
showOperations: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
operationsLabel: {
|
||||
type: String,
|
||||
default: '操作'
|
||||
},
|
||||
operationsWidth: {
|
||||
type: [String, Number],
|
||||
default: 180
|
||||
},
|
||||
// 分页相关
|
||||
showPagination: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
total: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
currentPage: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
pageSize: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
pageSizeOptions: {
|
||||
type: Array,
|
||||
default: () => [10, 20, 50, 100]
|
||||
},
|
||||
// 加载状态
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
loadingText: {
|
||||
type: String,
|
||||
default: 'Loading'
|
||||
},
|
||||
loadingSpinner: {
|
||||
type: String,
|
||||
default: 'el-icon-loading'
|
||||
},
|
||||
loadingBackground: {
|
||||
type: String,
|
||||
default: 'rgba(255, 255, 255, 0.7)'
|
||||
},
|
||||
// 自定义类名
|
||||
tableClass: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
headerCellClassName: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
rowClassName: {
|
||||
type: [String, Function],
|
||||
default: ''
|
||||
},
|
||||
// 敏感值相关
|
||||
hideText: {
|
||||
type: String,
|
||||
default: '隐藏'
|
||||
},
|
||||
viewText: {
|
||||
type: String,
|
||||
default: '查看'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 掩码处理
|
||||
maskValue(value) {
|
||||
if (!value) return '';
|
||||
return '*'.repeat(Math.min(value.length, 8));
|
||||
},
|
||||
// 切换显示/隐藏
|
||||
toggleValue(row, prop) {
|
||||
this.$set(row, 'showValue', !row.showValue);
|
||||
},
|
||||
// 复选框变化
|
||||
handleCheckboxChange(row) {
|
||||
this.$set(row, 'selected', !row.selected);
|
||||
},
|
||||
// 分页事件
|
||||
handleSizeChange(val) {
|
||||
this.$emit('size-change', val);
|
||||
},
|
||||
handlePageChange(page) {
|
||||
this.$emit('page-change', page);
|
||||
},
|
||||
// 选择事件
|
||||
handleSelectionChange(selection) {
|
||||
this.$emit('selection-change', selection);
|
||||
},
|
||||
// 行点击事件
|
||||
handleRowClick(row, column, event) {
|
||||
this.$emit('row-click', row, column, event);
|
||||
},
|
||||
// 获取表格实例
|
||||
getTable() {
|
||||
return this.$refs.tableRef;
|
||||
},
|
||||
// 清除选择
|
||||
clearSelection() {
|
||||
this.$refs.tableRef && this.$refs.tableRef.clearSelection();
|
||||
},
|
||||
// 切换选择
|
||||
toggleRowSelection(row, selected) {
|
||||
this.$refs.tableRef && this.$refs.tableRef.toggleRowSelection(row, selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.custom-table-wrapper {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
.table-container {
|
||||
height: calc(100% - 48px);
|
||||
width: 100%;
|
||||
box-shadow: 0 2px 12px rgba(74, 124, 253, 0.12);
|
||||
border-radius: 6px;
|
||||
.custom-table {
|
||||
width: 100%;
|
||||
border: 1px solid #eef3fd;
|
||||
border-bottom: none;
|
||||
border-radius: 6px;
|
||||
.el-table__body-wrapper {
|
||||
overflow-y: auto;
|
||||
&::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: #a1c9fd;
|
||||
border-radius: 3px;
|
||||
}
|
||||
&::-webkit-scrollbar-track {
|
||||
background: #f0f3fe;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
.el-table__header {
|
||||
th {
|
||||
color: #342f45;
|
||||
background: #edf2fc !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
:deep(.el-table) {
|
||||
.el-table__body-wrapper {
|
||||
overflow-y: auto;
|
||||
&::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: #a1c9fd;
|
||||
border-radius: 3px;
|
||||
}
|
||||
&::-webkit-scrollbar-track {
|
||||
background: #f0f3fe;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
.el-table__header {
|
||||
th {
|
||||
color: #342f45;
|
||||
background: #edf2fc !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.table-footer {
|
||||
padding: 16px 0px 0px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
:deep(.el-loading-mask) {
|
||||
background-color: rgba(255, 255, 255, 0.6) !important;
|
||||
backdrop-filter: blur(2px);
|
||||
}
|
||||
|
||||
:deep(.el-loading-spinner .circular) {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
:deep(.el-loading-spinner .path) {
|
||||
stroke: #6b8cff;
|
||||
}
|
||||
|
||||
:deep(.el-loading-text) {
|
||||
color: #6b8cff !important;
|
||||
font-size: 14px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,16 +1,14 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="visible" width="520px" class="param-dialog-wrapper" :append-to-body="true"
|
||||
:close-on-click-modal="false" :key="dialogKey" custom-class="custom-param-dialog" :show-close="false">
|
||||
<CustomDialog
|
||||
:title="title"
|
||||
:visible.sync="visible"
|
||||
width="600px"
|
||||
class="param-dialog-wrapper"
|
||||
@confirm="submit"
|
||||
@close="cancel"
|
||||
:confirmLoading="saving"
|
||||
>
|
||||
<div class="dialog-container">
|
||||
<div class="dialog-header">
|
||||
<h2 class="dialog-title">{{ title }}</h2>
|
||||
<button class="custom-close-btn" @click="cancel">
|
||||
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13 1L1 13M1 1L13 13" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<el-form :model="form" :rules="rules" ref="form" label-width="auto" label-position="left" class="param-form">
|
||||
<el-form-item :label="$t('paramDialog.paramCode')" prop="paramCode" class="form-item">
|
||||
<el-input v-model="form.paramCode" :placeholder="$t('paramDialog.paramCodePlaceholder')"
|
||||
@@ -54,20 +52,12 @@
|
||||
class="custom-textarea"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submit" class="save-btn" :loading="saving" :disabled="saving">
|
||||
{{ $t('paramDialog.save') }}
|
||||
</el-button>
|
||||
<el-button @click="cancel" class="cancel-btn">
|
||||
{{ $t('paramDialog.cancel') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</CustomDialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CustomDialog from './CustomDialog.vue';
|
||||
export default {
|
||||
props: {
|
||||
title: {
|
||||
@@ -89,6 +79,9 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
components: {
|
||||
CustomDialog
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogKey: Date.now(),
|
||||
@@ -210,61 +203,9 @@ export default {
|
||||
|
||||
<style scoped lang="scss">
|
||||
.param-dialog-wrapper {
|
||||
.dialog-container {
|
||||
padding: 24px 32px;
|
||||
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
|
||||
}
|
||||
|
||||
.dialog-header {
|
||||
position: relative;
|
||||
margin-bottom: 24px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dialog-title {
|
||||
font-size: 20px;
|
||||
color: #1e293b;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.custom-close-btn {
|
||||
position: absolute;
|
||||
top: -8px;
|
||||
right: -8px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 50%;
|
||||
border: none;
|
||||
background: #f1f5f9;
|
||||
color: #64748b;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0;
|
||||
outline: none;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
|
||||
&:hover {
|
||||
color: #ffffff;
|
||||
background: #ef4444;
|
||||
transform: rotate(90deg);
|
||||
box-shadow: 0 4px 6px rgba(239, 68, 68, 0.2);
|
||||
}
|
||||
|
||||
svg {
|
||||
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.param-form {
|
||||
.form-item {
|
||||
margin-bottom: 20px;
|
||||
|
||||
:deep(.el-form-item__label) {
|
||||
color: #475569;
|
||||
font-weight: 500;
|
||||
@@ -355,65 +296,5 @@ export default {
|
||||
margin-top: -4px;
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 16px 0 0;
|
||||
margin-top: 16px;
|
||||
|
||||
.save-btn {
|
||||
width: 120px;
|
||||
height: 42px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
border-radius: 8px;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
background: #3b82f6;
|
||||
color: white;
|
||||
border: none;
|
||||
letter-spacing: 0.5px;
|
||||
box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
|
||||
|
||||
&:hover {
|
||||
background: #2563eb;
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: translateY(0);
|
||||
box-shadow: 0 2px 3px rgba(59, 130, 246, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
.cancel-btn {
|
||||
width: 120px;
|
||||
height: 42px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
border-radius: 8px;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
background: #ffffff;
|
||||
color: #64748b;
|
||||
border: 1px solid #e2e8f0;
|
||||
margin-left: 16px;
|
||||
letter-spacing: 0.5px;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
|
||||
&:hover {
|
||||
background: #f8fafc;
|
||||
color: #475569;
|
||||
border-color: #cbd5e1;
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: translateY(0);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -645,6 +645,8 @@ export default {
|
||||
'user.disable': 'Deaktivieren',
|
||||
'user.delete': 'Löschen',
|
||||
'user.selectUsersFirst': 'Bitte wählen Sie zuerst Benutzer zum Löschen aus',
|
||||
'user.selectUsersToDisable': 'Bitte wählen Sie Benutzer zum Deaktivieren aus',
|
||||
'user.selectUsersToEnable': 'Bitte wählen Sie Benutzer zum Aktivieren aus',
|
||||
'user.confirmDeleteSelected': 'Sind Sie sicher, dass Sie {count} ausgewählte Benutzer löschen möchten?',
|
||||
'user.deleting': 'Löscht...',
|
||||
'user.deleteSuccess': 'Erfolgreich {count} Benutzer gelöscht',
|
||||
@@ -1420,8 +1422,6 @@ export default {
|
||||
'featureManagement.groupDescription.featureManagement': 'Aktivierungsstatus der Kernfunktionsmodule steuern',
|
||||
'featureManagement.groupDescription.voiceManagement': 'Konfigurieren, welche Funktionen für Agenten (KI-Assistenten) sichtbar und verfügbar sind',
|
||||
'featureManagement.moduleCount': '{count} Module insgesamt',
|
||||
'featureManagement.enabled': 'Aktiviert',
|
||||
'featureManagement.disabled': 'Deaktiviert',
|
||||
|
||||
// Feature names and descriptions
|
||||
'feature.voiceprintRecognition.name': 'Stimmerkennung',
|
||||
|
||||
@@ -645,6 +645,8 @@ export default {
|
||||
'user.disable': 'Disable',
|
||||
'user.delete': 'Delete',
|
||||
'user.selectUsersFirst': 'Please select users to delete first',
|
||||
'user.selectUsersToDisable': 'Please select users to disable',
|
||||
'user.selectUsersToEnable': 'Please select users to enable',
|
||||
'user.confirmDeleteSelected': 'Are you sure you want to delete {count} selected users?',
|
||||
'user.deleting': 'Deleting...',
|
||||
'user.deleteSuccess': 'Successfully deleted {count} users',
|
||||
@@ -1420,8 +1422,6 @@ export default {
|
||||
'featureManagement.groupDescription.featureManagement': 'Control the enable status of core feature modules',
|
||||
'featureManagement.groupDescription.voiceManagement': 'Configure which features are visible and available to agents (AI assistants)',
|
||||
'featureManagement.moduleCount': '{count} modules in total',
|
||||
'featureManagement.enabled': 'Enabled',
|
||||
'featureManagement.disabled': 'Disabled',
|
||||
|
||||
// Feature names and descriptions
|
||||
'feature.voiceprintRecognition.name': 'Voiceprint Recognition',
|
||||
|
||||
@@ -7,6 +7,14 @@ import de from './de';
|
||||
import vi from './vi';
|
||||
import ptBR from './pt_BR';
|
||||
|
||||
import enLocale from 'element-ui/lib/locale/lang/en'
|
||||
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
|
||||
import twLocale from 'element-ui/lib/locale/lang/zh-TW'
|
||||
import deLocale from 'element-ui/lib/locale/lang/de'
|
||||
import viLocale from 'element-ui/lib/locale/lang/vi'
|
||||
import ptBRLocale from 'element-ui/lib/locale/lang/pt-br'
|
||||
|
||||
|
||||
Vue.use(VueI18n);
|
||||
|
||||
// 从本地存储获取语言设置,如果没有则使用浏览器语言或默认语言
|
||||
@@ -38,12 +46,12 @@ const i18n = new VueI18n({
|
||||
locale: getDefaultLanguage(),
|
||||
fallbackLocale: 'zh_CN',
|
||||
messages: {
|
||||
'zh_CN': zhCN,
|
||||
'zh_TW': zhTW,
|
||||
'en': en,
|
||||
'de': de,
|
||||
'vi': vi,
|
||||
'pt_BR': ptBR
|
||||
'zh_CN': { ...zhLocale, ...zhCN },
|
||||
'zh_TW': { ...twLocale, ...zhTW },
|
||||
'en': { ...en, ...enLocale },
|
||||
'de': { ...de, ...deLocale },
|
||||
'vi': { ...vi, ...viLocale },
|
||||
'pt_BR': { ...ptBR, ...ptBRLocale }
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -645,6 +645,8 @@ export default {
|
||||
'user.disable': 'Desativar',
|
||||
'user.delete': 'Excluir',
|
||||
'user.selectUsersFirst': 'Por favor, selecione usuários para excluir primeiro',
|
||||
'user.selectUsersToDisable': 'Por favor, selecione usuários para desativar',
|
||||
'user.selectUsersToEnable': 'Por favor, selecione usuários para ativar',
|
||||
'user.confirmDeleteSelected': 'Tem certeza de que deseja excluir {count} usuários selecionados?',
|
||||
'user.deleting': 'Excluindo...',
|
||||
'user.deleteSuccess': '{count} usuários excluídos com sucesso',
|
||||
@@ -1420,8 +1422,6 @@ export default {
|
||||
'featureManagement.groupDescription.featureManagement': 'Controlar o status de ativação dos módulos de funcionalidade principal',
|
||||
'featureManagement.groupDescription.voiceManagement': 'Configurar quais funcionalidades são visíveis e disponíveis para agentes (assistentes de IA)',
|
||||
'featureManagement.moduleCount': '{count} módulos no total',
|
||||
'featureManagement.enabled': 'Ativado',
|
||||
'featureManagement.disabled': 'Desativado',
|
||||
|
||||
// Nomes e descrições de funcionalidades
|
||||
'feature.voiceprintRecognition.name': 'Reconhecimento de Impressão Vocal',
|
||||
|
||||
@@ -645,6 +645,8 @@ export default {
|
||||
'user.disable': 'Vô hiệu hóa',
|
||||
'user.delete': 'Xóa',
|
||||
'user.selectUsersFirst': 'Vui lòng chọn người dùng để xóa trước',
|
||||
'user.selectUsersToDisable': 'Vui lòng chọn người dùng để vô hiệu hóa',
|
||||
'user.selectUsersToEnable': 'Vui lòng chọn người dùng để kích hoạt',
|
||||
'user.confirmDeleteSelected': 'Bạn có chắc chắn muốn xóa {count} người dùng đã chọn?',
|
||||
'user.deleting': 'Đang xóa...',
|
||||
'user.deleteSuccess': 'Đã xóa thành công {count} người dùng',
|
||||
@@ -1420,8 +1422,6 @@ export default {
|
||||
'featureManagement.groupDescription.featureManagement': 'Kiểm soát trạng thái kích hoạt của các mô-đun tính năng cốt lõi',
|
||||
'featureManagement.groupDescription.voiceManagement': 'Cấu hình các tính năng hiển thị và khả dụng cho agent (trợ lý AI)',
|
||||
'featureManagement.moduleCount': 'Tổng cộng {count} mô-đun',
|
||||
'featureManagement.enabled': 'Đã bật',
|
||||
'featureManagement.disabled': 'Chưa bật',
|
||||
|
||||
// Feature names and descriptions
|
||||
'feature.voiceprintRecognition.name': 'Nhận dạng giọng nói',
|
||||
|
||||
@@ -645,6 +645,8 @@ export default {
|
||||
'user.disable': '禁用',
|
||||
'user.delete': '删除',
|
||||
'user.selectUsersFirst': '请先选择需要删除的用户',
|
||||
'user.selectUsersToDisable': '请选择要禁用的用户',
|
||||
'user.selectUsersToEnable': '请选择要启用的用户',
|
||||
'user.confirmDeleteSelected': '确定要删除选中的{count}个用户吗?',
|
||||
'user.deleting': '正在删除中...',
|
||||
'user.deleteSuccess': '成功删除{count}个用户',
|
||||
@@ -1418,8 +1420,6 @@ export default {
|
||||
'featureManagement.groupDescription.featureManagement': '控制系统核心功能模块的启用状态',
|
||||
'featureManagement.groupDescription.voiceManagement': '配置哪些功能对智能体(AI助手)可见和可用',
|
||||
'featureManagement.moduleCount': '共 {count} 个模块',
|
||||
'featureManagement.enabled': '已启用',
|
||||
'featureManagement.disabled': '未启用',
|
||||
|
||||
// 功能名称和描述
|
||||
'feature.voiceprintRecognition.name': '声纹识别',
|
||||
|
||||
@@ -645,6 +645,8 @@ export default {
|
||||
'user.disable': '禁用',
|
||||
'user.delete': '刪除',
|
||||
'user.selectUsersFirst': '請先選擇需要刪除的用戶',
|
||||
'user.selectUsersToDisable': '請選擇要禁用的用戶',
|
||||
'user.selectUsersToEnable': '請選擇要啟用的用戶',
|
||||
'user.confirmDeleteSelected': '確定要刪除選中的{count}個用戶嗎?',
|
||||
'user.deleting': '正在刪除中...',
|
||||
'user.deleteSuccess': '成功刪除{count}個用戶',
|
||||
@@ -1420,8 +1422,6 @@ export default {
|
||||
'featureManagement.groupDescription.featureManagement': '控制系統核心功能模組的啟用狀態',
|
||||
'featureManagement.groupDescription.voiceManagement': '配置哪些功能對智能體(AI助手)可見和可用',
|
||||
'featureManagement.moduleCount': '共 {count} 個模組',
|
||||
'featureManagement.enabled': '已啟用',
|
||||
'featureManagement.disabled': '未啟用',
|
||||
|
||||
// 功能名稱和描述
|
||||
'feature.voiceprintRecognition.name': '聲紋識別',
|
||||
|
||||
@@ -6,6 +6,7 @@ import App from './App.vue';
|
||||
import router from './router';
|
||||
import store from './store';
|
||||
import i18n from './i18n';
|
||||
import locale from 'element-ui/lib/locale'
|
||||
import './styles/global.scss';
|
||||
import { register as registerServiceWorker } from './registerServiceWorker';
|
||||
import featureManager from './utils/featureManager';
|
||||
@@ -14,6 +15,7 @@ import featureManager from './utils/featureManager';
|
||||
Vue.prototype.$eventBus = new Vue();
|
||||
|
||||
Vue.use(ElementUI);
|
||||
locale.i18n((key, value) => i18n.t(key, value))
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
|
||||
@@ -290,8 +290,11 @@ export default {
|
||||
});
|
||||
});
|
||||
Promise.all(agentPromises).then(() => {
|
||||
const firstDevice = agentList[0] || {};
|
||||
this.agentDeviceOptions = agentList;
|
||||
this.filteredAgents = agentList;
|
||||
// 默认选中第一项
|
||||
this.handleDeviceClick(firstDevice.devices?.[0] || {}, firstDevice);
|
||||
// 获取设备状态
|
||||
this.fetchDeviceStatus();
|
||||
});
|
||||
@@ -347,17 +350,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
handleAgentClick(agent) {
|
||||
if (this.expandedAgentId === agent.id) {
|
||||
this.expandedAgentId = null;
|
||||
this.selectedAgent = null;
|
||||
this.selectedDevice = null;
|
||||
} else {
|
||||
this.expandedAgentId = agent.id;
|
||||
this.selectedAgent = agent;
|
||||
this.selectedDevice = null;
|
||||
}
|
||||
},
|
||||
handleDeviceClick(device, agent) {
|
||||
this.expandedAgentId = agent.id;
|
||||
this.selectedAgent = agent;
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
<div class="config-header">
|
||||
<h2 class="page-title">{{ $t('header.featureManagement') }}</h2>
|
||||
<div class="header-actions">
|
||||
<CustomButton size="small" @click="!isSaving && toggleSelectAll()" :disabled="isSaving">
|
||||
<CustomButton :icon="isAllSelected ? 'el-icon-circle-close' : 'el-icon-circle-check'" size="medium" @click="!isSaving && toggleSelectAll()" :disabled="isSaving">
|
||||
{{ isAllSelected ? $t('featureManagement.deselectAll') : $t('featureManagement.selectAll') }}
|
||||
</CustomButton>
|
||||
<CustomButton size="small" @click="handleReset" :disabled="isSaving">
|
||||
<CustomButton icon="el-icon-refresh" size="medium" @click="handleReset" :disabled="isSaving">
|
||||
{{ $t('featureManagement.reset') }}
|
||||
</CustomButton>
|
||||
<CustomButton size="small" type="confirm" @click="handleSave" :disabled="isSaving">
|
||||
<CustomButton icon="el-icon-setting" size="medium" type="confirm" @click="handleSave" :disabled="isSaving">
|
||||
{{ isSaving ? $t('featureManagement.saving') : $t('featureManagement.save') }}
|
||||
</CustomButton>
|
||||
</div>
|
||||
@@ -45,19 +45,17 @@
|
||||
<div class="feature-content">
|
||||
<div class="feature-header">
|
||||
<h3 class="feature-name">{{ $t(`feature.${feature.id}.name`) }}</h3>
|
||||
<span v-if="feature.enabled" class="feature-enabled-tag">{{ $t('featureManagement.enabled') }}</span>
|
||||
<span v-else class="feature-disabled-tag">{{ $t('featureManagement.disabled') }}</span>
|
||||
<div class="feature-checkbox-container">
|
||||
<el-checkbox
|
||||
v-model="feature.enabled"
|
||||
@change="!isSaving && toggleFeature(feature)"
|
||||
class="feature-checkbox"
|
||||
:disabled="isSaving"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<p class="feature-description">{{ $t(`feature.${feature.id}.description`) }}</p>
|
||||
</div>
|
||||
<div class="feature-checkbox-container">
|
||||
<el-checkbox
|
||||
v-model="feature.enabled"
|
||||
@change="!isSaving && toggleFeature(feature)"
|
||||
class="feature-checkbox"
|
||||
:disabled="isSaving"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -84,19 +82,17 @@
|
||||
<div class="feature-content">
|
||||
<div class="feature-header">
|
||||
<h3 class="feature-name">{{ $t(`feature.${feature.id}.name`) }}</h3>
|
||||
<span v-if="feature.enabled" class="feature-enabled-tag">{{ $t('featureManagement.enabled') }}</span>
|
||||
<span v-else class="feature-disabled-tag">{{ $t('featureManagement.disabled') }}</span>
|
||||
<div class="feature-checkbox-container">
|
||||
<el-checkbox
|
||||
v-model="feature.enabled"
|
||||
@change="!isSaving && toggleFeature(feature)"
|
||||
class="feature-checkbox"
|
||||
:disabled="isSaving"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<p class="feature-description">{{ $t(`feature.${feature.id}.description`) }}</p>
|
||||
</div>
|
||||
<div class="feature-checkbox-container">
|
||||
<el-checkbox
|
||||
v-model="feature.enabled"
|
||||
@change="!isSaving && toggleFeature(feature)"
|
||||
class="feature-checkbox"
|
||||
:disabled="isSaving"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -383,6 +379,7 @@ export default {
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-weight: 500;
|
||||
font-size: 24px;
|
||||
margin: 0;
|
||||
}
|
||||
@@ -465,7 +462,7 @@ export default {
|
||||
}
|
||||
|
||||
.feature-card ::v-deep .el-card__body {
|
||||
padding: 24px;
|
||||
padding: 14px 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
@@ -504,15 +501,18 @@ export default {
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
.feature-content {
|
||||
width: 100%;
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.feature-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.feature-checkbox-container {
|
||||
margin-top: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 30px;
|
||||
@@ -531,36 +531,18 @@ export default {
|
||||
color: #5778ff;
|
||||
}
|
||||
|
||||
.feature-enabled-tag {
|
||||
background: #5778ff;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
padding: 4px 8px;
|
||||
border-radius: 10px;
|
||||
margin-left: 10px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.feature-disabled-tag {
|
||||
background: #DCDFE6;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
padding: 4px 8px;
|
||||
border-radius: 10px;
|
||||
margin-left: 10px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.feature-name {
|
||||
white-space: normal;
|
||||
word-break: break-word;
|
||||
overflow-wrap: break-word;
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
line-height: 1.4;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin: 0;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
|
||||
.feature-description {
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
@@ -570,7 +552,6 @@ export default {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
||||
/* 功能分组容器 - 左右布局 */
|
||||
.feature-groups-container {
|
||||
display: flex;
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<CustomPagination
|
||||
class="pagination-wrapper"
|
||||
:total="total"
|
||||
:current-page="currentPage"
|
||||
:page-size="pageSize"
|
||||
@@ -605,6 +606,10 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.pagination-wrapper {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 1144px) {
|
||||
.doc-grid {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
|
||||
@@ -1,35 +1,29 @@
|
||||
<template>
|
||||
<div class="welcome">
|
||||
<HeaderBar />
|
||||
<div class="operation-bar">
|
||||
<h2 class="page-title">{{ $t('knowledgeBaseManagement.title') }}</h2>
|
||||
<div class="right-operations">
|
||||
<el-input
|
||||
:placeholder="$t('knowledgeBaseManagement.searchPlaceholder')"
|
||||
v-model="searchKbName"
|
||||
class="search-input"
|
||||
@keyup.enter.native="handleSearchKb"
|
||||
clearable
|
||||
prefix-icon="el-icon-search"
|
||||
/>
|
||||
<el-button class="btn-upload" @click="handleSearchKb">
|
||||
<i class="el-icon-search"></i>
|
||||
{{ $t('knowledgeBaseManagement.search') }}
|
||||
</el-button>
|
||||
<el-button class="btn-new-kb" @click="showAddDialog">
|
||||
<i class="el-icon-plus"></i>
|
||||
{{ $t('knowledgeBaseManagement.addKnowledgeBase') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main-wrapper">
|
||||
<div class="content-panel">
|
||||
<div class="content-area" v-loading="loading" :element-loading-text="$t('knowledgeBaseManagement.loading')">
|
||||
<!-- Knowledge Base Cards Section -->
|
||||
<div class="kb-section" :style="{ height: filteredKnowledgeBases.length > 0 ? 'fit-content' : '100%' }">
|
||||
<div class="kb-section-header">
|
||||
<div class="kb-section-title">{{ $t('knowledgeBaseManagement.switchKnowledgeBase') }}</div>
|
||||
<h2 class="page-title">{{ $t('knowledgeBaseManagement.title') }}</h2>
|
||||
<div class="right-operations">
|
||||
<el-input
|
||||
:placeholder="$t('knowledgeBaseManagement.searchPlaceholder')"
|
||||
v-model="searchKbName"
|
||||
class="search-input"
|
||||
@keyup.enter.native="handleSearchKb"
|
||||
clearable
|
||||
prefix-icon="el-icon-search"
|
||||
/>
|
||||
<CustomButton icon="el-icon-search" @click="handleSearchKb">
|
||||
{{ $t('knowledgeBaseManagement.search') }}
|
||||
</CustomButton>
|
||||
<CustomButton type="confirm" icon="el-icon-plus" @click="showAddDialog">
|
||||
{{ $t('knowledgeBaseManagement.addKnowledgeBase') }}
|
||||
</CustomButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="kb-cards-wrapper" :style="{ height: filteredKnowledgeBases.length > 0 ? 'fit-content' : '100%' }">
|
||||
<div class="kb-arrow left" @click="scrollCards(-1)" v-if="filteredKnowledgeBases.length > 0">
|
||||
@@ -258,9 +252,10 @@ import KnowledgeBaseItem from "./KnowledgeBaseItem.vue";
|
||||
import ManualIcon from "@/components/ManualIcon.vue";
|
||||
import CustomDialog from "@/components/CustomDialog.vue";
|
||||
import CustomPagination from "@/components/CustomPagination.vue";
|
||||
import CustomButton from "@/components/CustomButton.vue";
|
||||
|
||||
export default {
|
||||
components: { HeaderBar, VersionFooter, KnowledgeBaseDialog, KnowledgeBaseItem, ManualIcon, CustomDialog, CustomPagination },
|
||||
components: { HeaderBar, VersionFooter, KnowledgeBaseDialog, KnowledgeBaseItem, ManualIcon, CustomDialog, CustomPagination, CustomButton },
|
||||
data() {
|
||||
return {
|
||||
knowledgeBases: [],
|
||||
@@ -297,11 +292,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
filteredKnowledgeBases() {
|
||||
if (!this.searchKbName) return this.knowledgeBases;
|
||||
const keyword = this.searchKbName.toLowerCase();
|
||||
return this.knowledgeBases.filter(kb =>
|
||||
kb.name.toLowerCase().includes(keyword)
|
||||
);
|
||||
return this.knowledgeBases;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
@@ -712,8 +703,9 @@ export default {
|
||||
}
|
||||
|
||||
.main-wrapper {
|
||||
height: calc(100vh - 63px - 35px - 72px);
|
||||
margin: 0 22px;
|
||||
height: calc(100vh - 63px - 35px);
|
||||
margin: 20px 22px 0;
|
||||
border-radius: 15px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -727,53 +719,22 @@ export default {
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-weight: 500;
|
||||
font-size: 24px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.right-operations {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
margin-left: auto;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
margin-right: 10px;
|
||||
width: 240px;
|
||||
}
|
||||
|
||||
.btn-upload {
|
||||
height: 40px;
|
||||
padding: 0 20px;
|
||||
border: 1px solid #2f5bff !important;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
color: #2f5bff;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
transition: all 0.2s;
|
||||
|
||||
&:hover {
|
||||
background: #f2f6ff;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-new-kb {
|
||||
height: 40px;
|
||||
padding: 0 20px;
|
||||
border: none !important;
|
||||
border-radius: 8px;
|
||||
background: linear-gradient(135deg, #6a5cff, #2f5bff) !important;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
transition: opacity 0.2s;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
}
|
||||
|
||||
.content-panel {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
@@ -805,7 +766,7 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
padding: 0 0 16px 0;
|
||||
}
|
||||
|
||||
.kb-section-title {
|
||||
@@ -1126,6 +1087,7 @@ export default {
|
||||
}
|
||||
|
||||
.slice-pagination {
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@@ -1,89 +1,68 @@
|
||||
<template>
|
||||
<div class="welcome">
|
||||
<HeaderBar />
|
||||
|
||||
<div class="operation-bar">
|
||||
<h2 class="page-title">{{ $t('header.userManagement') }}</h2>
|
||||
<div class="right-operations">
|
||||
<el-input :placeholder="$t('user.searchPhone')" v-model="searchPhone" class="search-input" clearable
|
||||
@keyup.enter.native="handleSearch" />
|
||||
<el-button class="btn-search" @click="handleSearch">{{ $t('user.search') }}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main-wrapper">
|
||||
<div class="content-panel">
|
||||
<div class="content-area">
|
||||
<el-card class="user-card" shadow="never">
|
||||
<el-table ref="userTable" :data="userList" class="transparent-table" v-loading="loading"
|
||||
:element-loading-text="$t('modelConfig.loading')" element-loading-spinner="el-icon-loading"
|
||||
element-loading-background="rgba(255, 255, 255, 0.7)">
|
||||
<el-table-column :label="$t('modelConfig.select')" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="scope.row.selected"></el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('user.userid')" prop="userid" align="center"></el-table-column>
|
||||
<el-table-column :label="$t('user.mobile')" prop="mobile" align="center"></el-table-column>
|
||||
<el-table-column :label="$t('user.deviceCount')" prop="deviceCount" align="center"></el-table-column>
|
||||
<el-table-column :label="$t('user.createDate')" prop="createDate" align="center"></el-table-column>
|
||||
<el-table-column :label="$t('user.status')" prop="status" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status === 1" type="success">{{ $t('user.normal') }}</el-tag>
|
||||
<el-tag v-else type="danger">{{ $t('user.disabled') }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('modelConfig.action')" align="center" width="300px">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click="resetPassword(scope.row)">{{ $t('user.resetPassword')
|
||||
}}</el-button>
|
||||
<el-button size="mini" type="text" v-if="scope.row.status === 1"
|
||||
@click="handleChangeStatus(scope.row, 0)">{{ $t('user.disableAccount') }}</el-button>
|
||||
<el-button size="mini" type="text" v-if="scope.row.status === 0"
|
||||
@click="handleChangeStatus(scope.row, 1)">{{ $t('user.enableAccount') }}</el-button>
|
||||
<el-button size="mini" type="text" @click="deleteUser(scope.row)">{{ $t('user.deleteUser')
|
||||
}}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="table_bottom">
|
||||
<div class="ctrl_btn">
|
||||
<el-button size="mini" type="primary" class="select-all-btn" @click="handleSelectAll">
|
||||
{{ isAllSelected ? $t('user.deselectAll') : $t('user.selectAll') }}
|
||||
</el-button>
|
||||
<el-button size="mini" type="success" icon="el-icon-circle-check" @click="batchEnable">{{
|
||||
$t('user.enable')
|
||||
}}</el-button>
|
||||
<el-button size="mini" type="warning" @click="batchDisable"><i
|
||||
class="el-icon-remove-outline rotated-icon"></i>{{
|
||||
$t('user.disable') }}</el-button>
|
||||
<el-button size="mini" type="danger" icon="el-icon-delete" @click="batchDelete">{{ $t('user.delete')
|
||||
}}</el-button>
|
||||
</div>
|
||||
<div class="custom-pagination">
|
||||
<el-select v-model="pageSize" @change="handlePageSizeChange"
|
||||
:class="['page-size-select', { 'page-size-select-en': $i18n.locale === 'en' }]">
|
||||
<el-option v-for="item in pageSizeOptions" :key="item"
|
||||
:label="$t('modelConfig.itemsPerPage', { items: item })" :value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
<button class="pagination-btn" :disabled="currentPage === 1" @click="goFirst">
|
||||
{{ $t('modelConfig.firstPage') }}
|
||||
</button>
|
||||
<button class="pagination-btn" :disabled="currentPage === 1" @click="goPrev">
|
||||
{{ $t('modelConfig.prevPage') }}
|
||||
</button>
|
||||
<button v-for="page in visiblePages" :key="page" class="pagination-btn"
|
||||
:class="{ active: page === currentPage }" @click="goToPage(page)">
|
||||
{{ page }}
|
||||
</button> <button class="pagination-btn" :disabled="currentPage === pageCount" @click="goNext">
|
||||
{{ $t('modelConfig.nextPage') }}
|
||||
</button>
|
||||
<span class="total-text">{{ $t('modelConfig.totalRecords', { total: total }) }}</span>
|
||||
<div class="operation-header">
|
||||
<h2 class="page-title">{{ $t('header.userManagement') }}</h2>
|
||||
<div class="right-operations">
|
||||
<el-input :placeholder="$t('user.searchPhone')" v-model="searchPhone" class="search-input" clearable
|
||||
@keyup.enter.native="handleSearch" />
|
||||
<CustomButton icon="el-icon-search" type="confirm" @click="handleSearch">{{ $t('user.search') }}</CustomButton>
|
||||
</div>
|
||||
</div>
|
||||
<CustomTable
|
||||
ref="userTable"
|
||||
:data="userList"
|
||||
:columns="tableColumns"
|
||||
:loading="loading"
|
||||
:loading-text="$t('modelConfig.loading')"
|
||||
:show-selection="true"
|
||||
:show-operations="true"
|
||||
:operations-label="$t('modelConfig.action')"
|
||||
:operations-width="300"
|
||||
:total="total"
|
||||
:current-page="currentPage"
|
||||
:page-size="pageSize"
|
||||
:page-size-options="pageSizeOptions"
|
||||
@size-change="handlePageSizeChange"
|
||||
@page-change="goToPage"
|
||||
>
|
||||
<template slot="selection" slot-scope="scope">
|
||||
<el-checkbox v-model="scope.row.selected"></el-checkbox>
|
||||
</template>
|
||||
<template slot="status" slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status === 1" type="success">{{ $t('user.normal') }}</el-tag>
|
||||
<el-tag v-else type="danger">{{ $t('user.disabled') }}</el-tag>
|
||||
</template>
|
||||
<template slot="operations" slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click="resetPassword(scope.row)">{{ $t('user.resetPassword')
|
||||
}}</el-button>
|
||||
<el-button size="mini" type="text" v-if="scope.row.status === 1"
|
||||
@click="handleChangeStatus(scope.row, 0)">{{ $t('user.disableAccount') }}</el-button>
|
||||
<el-button size="mini" type="text" v-if="scope.row.status === 0"
|
||||
@click="handleChangeStatus(scope.row, 1)">{{ $t('user.enableAccount') }}</el-button>
|
||||
<el-button size="mini" type="text" @click="deleteUser(scope.row)">{{ $t('user.deleteUser')
|
||||
}}</el-button>
|
||||
</template>
|
||||
<template slot="footer-btns">
|
||||
<div class="ctrl_btn">
|
||||
<CustomButton :icon="isAllSelected ? 'el-icon-circle-close' : 'el-icon-circle-check'" size="small" @click="handleSelectAll">
|
||||
{{ isAllSelected ? $t('user.deselectAll') : $t('user.selectAll') }}
|
||||
</CustomButton>
|
||||
<CustomButton size="small" icon="el-icon-circle-check" @click="batchEnable">{{
|
||||
$t('user.enable')
|
||||
}}</CustomButton>
|
||||
<CustomButton size="small" icon="el-icon-remove-outline" @click="batchDisable">
|
||||
{{$t('user.disable') }}
|
||||
</CustomButton>
|
||||
<CustomButton size="small" type="delete" icon="el-icon-delete" @click="batchDelete">{{ $t('user.delete')
|
||||
}}</CustomButton>
|
||||
</div>
|
||||
</template>
|
||||
</CustomTable>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
@@ -101,9 +80,10 @@ import Api from "@/apis/api";
|
||||
import HeaderBar from "@/components/HeaderBar.vue";
|
||||
import VersionFooter from "@/components/VersionFooter.vue";
|
||||
import ViewPasswordDialog from "@/components/ViewPasswordDialog.vue";
|
||||
import i18n from '@/i18n';
|
||||
import CustomButton from "@/components/CustomButton.vue";
|
||||
import CustomTable from "@/components/CustomTable.vue";
|
||||
export default {
|
||||
components: { HeaderBar, ViewPasswordDialog, VersionFooter },
|
||||
components: { HeaderBar, ViewPasswordDialog, VersionFooter, CustomButton, CustomTable },
|
||||
data() {
|
||||
return {
|
||||
showViewPassword: false,
|
||||
@@ -116,32 +96,43 @@ export default {
|
||||
total: 0,
|
||||
isAllSelected: false,
|
||||
loading: false,
|
||||
tableColumns: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.initTableColumns();
|
||||
this.fetchUsers();
|
||||
},
|
||||
computed: {
|
||||
pageCount() {
|
||||
return Math.ceil(this.total / this.pageSize);
|
||||
},
|
||||
visiblePages() {
|
||||
const pages = [];
|
||||
const maxVisible = 3;
|
||||
let start = Math.max(1, this.currentPage - 1);
|
||||
let end = Math.min(this.pageCount, start + maxVisible - 1);
|
||||
|
||||
if (end - start + 1 < maxVisible) {
|
||||
start = Math.max(1, end - maxVisible + 1);
|
||||
}
|
||||
|
||||
for (let i = start; i <= end; i++) {
|
||||
pages.push(i);
|
||||
}
|
||||
return pages;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initTableColumns() {
|
||||
this.tableColumns = [
|
||||
{
|
||||
prop: 'userid',
|
||||
label: this.$t('user.userid'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'mobile',
|
||||
label: this.$t('user.mobile'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'deviceCount',
|
||||
label: this.$t('user.deviceCount'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'createDate',
|
||||
label: this.$t('user.createDate'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: this.$t('user.status'),
|
||||
align: 'center'
|
||||
}
|
||||
];
|
||||
},
|
||||
handlePageSizeChange(val) {
|
||||
this.pageSize = val;
|
||||
this.currentPage = 1;
|
||||
@@ -245,10 +236,18 @@ export default {
|
||||
},
|
||||
batchEnable() {
|
||||
const selectedUsers = this.userList.filter(user => user.selected);
|
||||
if (selectedUsers.length === 0) {
|
||||
this.$message.warning(this.$t('user.selectUsersToEnable'));
|
||||
return;
|
||||
}
|
||||
this.handleChangeStatus(selectedUsers, 1);
|
||||
},
|
||||
batchDisable() {
|
||||
const selectedUsers = this.userList.filter(user => user.selected);
|
||||
if (selectedUsers.length === 0) {
|
||||
this.$message.warning(this.$t('user.selectUsersToDisable'));
|
||||
return;
|
||||
}
|
||||
this.handleChangeStatus(selectedUsers, 0);
|
||||
},
|
||||
resetPassword(row) {
|
||||
@@ -281,6 +280,12 @@ export default {
|
||||
}).then(() => {
|
||||
Api.admin.deleteUser(row.userid, ({ data }) => {
|
||||
if (data.code === 0) {
|
||||
// 删除后检查是否需要调整页码
|
||||
const newTotal = this.total - 1;
|
||||
const maxPage = Math.max(1, Math.ceil(newTotal / this.pageSize));
|
||||
if (this.currentPage > maxPage) {
|
||||
this.currentPage = maxPage;
|
||||
}
|
||||
this.$message.success(this.$t('user.deleteUserSuccess'));
|
||||
this.fetchUsers();
|
||||
} else {
|
||||
@@ -291,25 +296,11 @@ export default {
|
||||
this.$message.info(this.$t('common.deleteCancelled'));
|
||||
});
|
||||
},
|
||||
goFirst() {
|
||||
this.currentPage = 1;
|
||||
this.fetchUsers();
|
||||
},
|
||||
goPrev() {
|
||||
if (this.currentPage > 1) {
|
||||
this.currentPage--;
|
||||
this.fetchUsers();
|
||||
}
|
||||
},
|
||||
goNext() {
|
||||
if (this.currentPage < this.pageCount) {
|
||||
this.currentPage++;
|
||||
this.fetchUsers();
|
||||
}
|
||||
},
|
||||
goToPage(page) {
|
||||
this.currentPage = page;
|
||||
this.fetchUsers();
|
||||
if (page !== this.currentPage) {
|
||||
this.currentPage = page;
|
||||
this.fetchUsers();
|
||||
}
|
||||
},
|
||||
handleChangeStatus(row, status) {
|
||||
// 处理单个用户或用户数组
|
||||
@@ -357,7 +348,7 @@ export default {
|
||||
this.$message.warning(this.$t('user.selectUsersFirst'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Call the existing handleChangeStatus method which already handles both single and multiple users
|
||||
this.handleChangeStatus(selectedUsers, status);
|
||||
},
|
||||
@@ -381,25 +372,24 @@ export default {
|
||||
}
|
||||
|
||||
.main-wrapper {
|
||||
// 顶部 63px 底部 35px 查询72px
|
||||
height: calc(100vh - 63px - 35px - 72px);
|
||||
margin: 0 22px;
|
||||
border-radius: 15px;
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
||||
// 顶部 63px 底部 35px
|
||||
height: calc(100vh - 63px - 35px);
|
||||
padding: 20px 22px 0;
|
||||
position: relative;
|
||||
background: rgba(237, 242, 255, 0.5);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.operation-bar {
|
||||
.operation-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 16px 24px;
|
||||
justify-content: space-between;
|
||||
padding: 0 0 16px 0;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-weight: 500;
|
||||
font-size: 24px;
|
||||
margin: 0;
|
||||
}
|
||||
@@ -421,7 +411,6 @@ export default {
|
||||
}
|
||||
|
||||
.content-panel {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
@@ -434,7 +423,7 @@ export default {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
min-width: 600px;
|
||||
overflow-x: auto;
|
||||
overflow: auto;
|
||||
background-color: white;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -450,7 +439,7 @@ export default {
|
||||
overflow: hidden;
|
||||
|
||||
::v-deep .el-card__body {
|
||||
padding: 15px;
|
||||
padding: 14px 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
@@ -458,166 +447,8 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.table_bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.ctrl_btn {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
padding-left: 26px;
|
||||
|
||||
.el-button {
|
||||
min-width: 72px;
|
||||
height: 32px;
|
||||
padding: 7px 12px 7px 10px;
|
||||
font-size: 12px;
|
||||
border-radius: 4px;
|
||||
line-height: 1;
|
||||
font-weight: 500;
|
||||
border: none;
|
||||
transition: all 0.3s ease;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
|
||||
|
||||
&:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
}
|
||||
|
||||
.el-button--primary {
|
||||
background: #5f70f3;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.el-button--success {
|
||||
background: #5bc98c;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.el-button--warning {
|
||||
background: #f6d075;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.el-button--danger {
|
||||
background: #fd5b63;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
.rotated-icon {
|
||||
display: inline-block;
|
||||
transform: rotate(45deg);
|
||||
margin-right: 4px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.custom-pagination {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
|
||||
.el-select {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.pagination-btn:first-child,
|
||||
.pagination-btn:nth-child(2),
|
||||
.pagination-btn:nth-child(3),
|
||||
.pagination-btn:nth-last-child(2) {
|
||||
min-width: 60px;
|
||||
height: 32px;
|
||||
padding: 0 12px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #e4e7ed;
|
||||
background: #dee7ff;
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:hover {
|
||||
background: #d7dce6;
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
opacity: 0.6;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
.pagination-btn:not(:first-child):not(:nth-child(2)):not(:nth-child(3)):not(:nth-last-child(2)) {
|
||||
min-width: 28px;
|
||||
height: 32px;
|
||||
padding: 0;
|
||||
border-radius: 4px;
|
||||
border: 1px solid transparent;
|
||||
background: transparent;
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:hover {
|
||||
background: rgba(245, 247, 250, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
.pagination-btn.active {
|
||||
background: #5f70f3 !important;
|
||||
color: #ffffff !important;
|
||||
border-color: #5f70f3 !important;
|
||||
|
||||
&:hover {
|
||||
background: #6d7cf5 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.total-text {
|
||||
color: #909399;
|
||||
font-size: 14px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.transparent-table) {
|
||||
background: white;
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.el-table__body-wrapper {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
max-height: none !important;
|
||||
}
|
||||
|
||||
.el-table__header-wrapper {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.el-table__header th {
|
||||
background: white !important;
|
||||
color: black;
|
||||
}
|
||||
|
||||
&::before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.el-table__body tr {
|
||||
background-color: white;
|
||||
|
||||
td {
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.04);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-table .el-button--text) {
|
||||
@@ -627,124 +458,4 @@ export default {
|
||||
:deep(.el-table .el-button--text:hover) {
|
||||
color: #5a64b5 !important;
|
||||
}
|
||||
|
||||
|
||||
:deep(.el-checkbox__inner) {
|
||||
background-color: #ffffff !important;
|
||||
border-color: #cccccc !important;
|
||||
}
|
||||
|
||||
:deep(.el-checkbox__inner:hover) {
|
||||
border-color: #cccccc !important;
|
||||
}
|
||||
|
||||
:deep(.el-checkbox__input.is-checked .el-checkbox__inner) {
|
||||
background-color: #5f70f3 !important;
|
||||
border-color: #5f70f3 !important;
|
||||
}
|
||||
|
||||
@media (min-width: 1144px) {
|
||||
.table_bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
:deep(.transparent-table) {
|
||||
.el-table__body tr {
|
||||
td {
|
||||
padding-top: 16px;
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
|
||||
&+tr {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.page-size-select {
|
||||
width: 100px;
|
||||
margin-right: 10px;
|
||||
|
||||
:deep(.el-input__inner) {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #e4e7ed;
|
||||
background: #dee7ff;
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
&.page-size-select-en {
|
||||
width: 130px;
|
||||
|
||||
:deep(.el-input__inner) {
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-input__suffix) {
|
||||
right: 6px;
|
||||
width: 15px;
|
||||
height: 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
top: 6px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
:deep(.el-input__suffix-inner) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.el-icon-arrow-up:before) {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
border-left: 6px solid transparent;
|
||||
border-right: 6px solid transparent;
|
||||
border-top: 9px solid #606266;
|
||||
position: relative;
|
||||
transform: rotate(0deg);
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
}
|
||||
|
||||
.el-table {
|
||||
// --table-max-height: calc(100vh - 40vh);
|
||||
max-height: var(--table-max-height);
|
||||
|
||||
.el-table__body-wrapper {
|
||||
max-height: calc(var(--table-max-height) - 40px);
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-loading-mask) {
|
||||
background-color: rgba(255, 255, 255, 0.6) !important;
|
||||
backdrop-filter: blur(2px);
|
||||
}
|
||||
|
||||
:deep(.el-loading-spinner .circular) {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
:deep(.el-loading-spinner .path) {
|
||||
stroke: #6b8cff;
|
||||
}
|
||||
|
||||
:deep(.el-loading-text) {
|
||||
color: #6b8cff !important;
|
||||
font-size: 14px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||