forked from github/dataease
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
d86a9b46f1
@ -85,7 +85,7 @@ i18n_no_all_delete_privilege_folder=This folder have sources which have no manag
|
||||
i18n_excel_field_repeat=Duplicate fields exist, please modify and try again.
|
||||
i18n_schema_is_empty=Database schema is empty
|
||||
\u7AD9\u5185\u6D88\u606F=Internal Messages
|
||||
\u6240\u6709\u6D88\u606F==All Messages
|
||||
\u6240\u6709\u6D88\u606F=All Messages
|
||||
\u672A\u8BFB\u6D88\u606F=Unread Messages
|
||||
\u5DF2\u8BFB\u6D88\u606F==Read Messages
|
||||
\u63A5\u6536\u7BA1\u7406=Receive Manage
|
||||
|
@ -48,7 +48,7 @@ export default {
|
||||
padding-left: 3px;
|
||||
padding-right: 0px;
|
||||
cursor:pointer!important;
|
||||
background-color: #3370ff;
|
||||
background-color: var(--primary,#3370ff);
|
||||
}
|
||||
.bar-main i{
|
||||
color: white;
|
||||
|
@ -372,7 +372,7 @@ export default {
|
||||
padding-left: 3px;
|
||||
padding-right: 0px;
|
||||
cursor:pointer!important;
|
||||
background-color: #3370ff;
|
||||
background-color: var(--primary,#3370ff);
|
||||
}
|
||||
.bar-main i{
|
||||
color: white;
|
||||
|
@ -149,7 +149,7 @@ export default {
|
||||
padding-left: 3px!important;
|
||||
padding-right: 0px!important;
|
||||
cursor:pointer!important;
|
||||
background-color: #3370ff;
|
||||
background-color: var(--primary,#3370ff);
|
||||
}
|
||||
.bar-main i{
|
||||
color: white;
|
||||
|
@ -76,7 +76,7 @@ export default {
|
||||
padding-right: 1px;
|
||||
cursor:pointer!important;
|
||||
text-align: center;
|
||||
background-color: #3370ff;
|
||||
background-color: var(--primary,#3370ff);
|
||||
}
|
||||
.bar-main i{
|
||||
color: white;
|
||||
|
@ -133,12 +133,12 @@ export default {
|
||||
commons: {
|
||||
no_result: 'No Result',
|
||||
manage_member: 'Managing members',
|
||||
user_confirm_remove_cancel: 'Are you sure you want to remove the user from the role?',
|
||||
confirm_remove_cancel: 'Are you sure to delete the role?',
|
||||
user_confirm_remove_cancel: 'Are you sure you want to remove the user from the role?',
|
||||
default_value: 'Default Value',
|
||||
params_value: 'Param Value',
|
||||
publish: 'publish',
|
||||
input_role_name: 'Enter a role name',
|
||||
publish: 'publish',
|
||||
unpublished: 'unpublished',
|
||||
default_pwd: 'Default Pwd',
|
||||
stop: 'Stop',
|
||||
@ -159,9 +159,9 @@ export default {
|
||||
yes: 'Yes',
|
||||
no: 'No',
|
||||
reset: 'Reset',
|
||||
gender: 'Gender',
|
||||
catalogue: 'Catalogue',
|
||||
button: 'Button',
|
||||
gender: 'Gender',
|
||||
man: 'Man',
|
||||
woman: 'Woman',
|
||||
keep_secret: 'keep secret',
|
||||
@ -192,6 +192,7 @@ export default {
|
||||
annotation: 'Annotation',
|
||||
clear: 'Clean',
|
||||
save: 'Save',
|
||||
otherSave: 'Save as',
|
||||
update: 'Update',
|
||||
save_success: 'Saved successfully',
|
||||
delete_success: 'deleted successfully',
|
||||
@ -400,6 +401,7 @@ export default {
|
||||
continue: 'continue',
|
||||
hour: 'hour',
|
||||
minute: 'minute',
|
||||
day: 'day',
|
||||
by_task_name: 'Search by task name',
|
||||
message_receiving_management: 'Message receiving management',
|
||||
upload_failed: 'Upload failed',
|
||||
@ -423,7 +425,6 @@ export default {
|
||||
uninstall: 'uninstall',
|
||||
relevant_content_found: 'No relevant content found',
|
||||
view_tasks: 'View tasks',
|
||||
day: 'day',
|
||||
no_classification: 'No classification',
|
||||
no_template: 'No template',
|
||||
data_set_required: 'Data set (required)',
|
||||
@ -602,6 +603,7 @@ export default {
|
||||
confirm_passwd: 'Confirm Password',
|
||||
change_password: 'Change Password',
|
||||
search_by_name: 'Search by name',
|
||||
import_ldap: 'Import LDAP users',
|
||||
result_one: 'Results',
|
||||
clear_filter: 'Empty condition',
|
||||
recover_pwd: 'Restore to the original password?',
|
||||
@ -1541,8 +1543,9 @@ export default {
|
||||
column_permission: {
|
||||
add: 'Add',
|
||||
edit: 'Edit',
|
||||
please_select_field: 'Please select field',
|
||||
please_select_auth_type: 'Please select the authorization type',
|
||||
please_select_auth_id: '请选择授权目标',
|
||||
please_select_auth_id: 'Please select authorization obj',
|
||||
column_permission_not_empty: 'Please select authorization target',
|
||||
auth_type: 'Authorization type',
|
||||
auth_obj: 'Authorized object',
|
||||
@ -1594,14 +1597,19 @@ export default {
|
||||
create: 'Create Data Source',
|
||||
type: 'Type',
|
||||
please_choose_type: 'Please select data source type',
|
||||
please_choose_data_type: 'Please select the calculation mode',
|
||||
data_base: 'Database name',
|
||||
user_name: 'User Name',
|
||||
password: 'Password',
|
||||
host: 'Host name / IP address',
|
||||
doris_host: 'Doris Addr',
|
||||
query_port: 'Query Port',
|
||||
http_port: 'Http Port',
|
||||
port: 'Port',
|
||||
datasource_url: 'URL address',
|
||||
please_input_datasource_url: 'Please enter Elasticsearch 地址,e.g: http://es_host:es_port',
|
||||
please_input_data_base: 'Please enter the database name',
|
||||
please_select_oracle_type: 'Select connection type',
|
||||
please_input_user_name: 'Please enter user name',
|
||||
please_input_password: 'Please enter Password',
|
||||
please_input_host: 'Please enter host',
|
||||
@ -1633,9 +1641,6 @@ export default {
|
||||
min_pool_size: 'Minimum of connections',
|
||||
max_pool_size: 'Maximum connection',
|
||||
max_idle_time: 'Maximum idle (seconds)',
|
||||
doris_host: 'Doris Address',
|
||||
query_port: 'Query Port',
|
||||
http_port: 'Http Port',
|
||||
bucket_num: 'Bucket number',
|
||||
replication_num: 'Replication number',
|
||||
please_input_bucket_num: 'Please enter Bucket number',
|
||||
@ -1648,10 +1653,15 @@ export default {
|
||||
please_input_max_pool_size: 'Please enter the maximum number of connections',
|
||||
please_input_max_idle_time: 'Please enter the maximum idle (seconds)',
|
||||
please_input_acquire_increment: 'Please enter the growth number',
|
||||
please_input_query_timeout: 'Please enter query timeout',
|
||||
please_input_connect_timeout: 'Please enter the connection timeout (seconds)',
|
||||
no_less_then_0: 'Parameters in advanced settings cannot be less than zero',
|
||||
port_no_less_then_0: 'Port cannot be less than zero',
|
||||
priority: 'Advanced setting',
|
||||
data_mode: 'Data mode',
|
||||
direct: 'Direct Mode',
|
||||
extract: 'Extraction mode',
|
||||
all_compute_mode: 'Direct connection and extraction mode',
|
||||
extra_params: 'Extra JDBC connection string',
|
||||
please_input_dataPath: 'Please enter the JsonPath data path',
|
||||
warning: 'Contains invalid table',
|
||||
@ -1909,6 +1919,8 @@ export default {
|
||||
fontWeight: 'FontWeight',
|
||||
lineHeight: 'LineHeight',
|
||||
letterSpacing: 'LetterSpacing',
|
||||
padding: 'Internal spacing',
|
||||
margin: 'Outer space',
|
||||
textAlign: 'TextAlign',
|
||||
opacity: 'Opacity',
|
||||
verticalAlign: 'Vertical Align',
|
||||
@ -1997,6 +2009,9 @@ export default {
|
||||
default_settings: 'Default Settings',
|
||||
choose_background: 'Choose Component Background',
|
||||
choose_background_tips: 'The component`s own background settings will overwrite the current settings',
|
||||
setting_background: 'Set background',
|
||||
setting_jump: 'Jump settings',
|
||||
select_view: 'Please select a view...',
|
||||
visual: 'Visual',
|
||||
prohibit_multiple: 'Prohibit multiple fields in the same dataset',
|
||||
be_empty_dir: 'is empty dir'
|
||||
@ -2015,9 +2030,6 @@ export default {
|
||||
un_install: 'Uninstall',
|
||||
uninstall_confirm: 'Comfirm to uninstall the plugin?',
|
||||
uninstall_cancel: 'Cancel uninstall plugin',
|
||||
setting_background: 'BackGround',
|
||||
setting_jump: 'Jump Setting',
|
||||
select_view: 'Select View',
|
||||
un_install_success: 'Uninstall is successful and restart takes effect',
|
||||
un_install_error: 'Uninstall failed, please contact the administrator'
|
||||
},
|
||||
@ -2029,6 +2041,11 @@ export default {
|
||||
loginTitle: 'Login page title',
|
||||
title: 'System name',
|
||||
advice_size: 'Advice picture size',
|
||||
theme: 'Theme color',
|
||||
topMenuColor: 'Head background',
|
||||
topMenuActiveColor: 'Head selection background',
|
||||
topMenuTextColor: 'Head font color',
|
||||
topMenuTextActiveColor: 'Head font selected color',
|
||||
themeLight: 'Light',
|
||||
themeDark: 'Dark',
|
||||
themeCustom: 'Custom',
|
||||
@ -2040,7 +2057,6 @@ export default {
|
||||
defaultHomeLink: 'Default is the system built-in home page',
|
||||
showFoot: 'Show login page footer',
|
||||
footContent: 'Foot content'
|
||||
|
||||
},
|
||||
auth: {
|
||||
no_item_selected: 'Please select organization、user or role on the left',
|
||||
@ -2056,6 +2072,7 @@ export default {
|
||||
role: 'Role',
|
||||
user: 'User',
|
||||
set_rules: 'Set rules',
|
||||
sysParams: 'System variable',
|
||||
sysParams_type: {
|
||||
user_id: 'User ID',
|
||||
user_name: 'User Name',
|
||||
@ -2076,6 +2093,7 @@ export default {
|
||||
datasetAuthHead: 'All Dataset',
|
||||
chartAuthHead: 'All Chart',
|
||||
panelAuthHead: 'All Chart',
|
||||
menuAuthHead: 'All menus and actions',
|
||||
view: 'View',
|
||||
use: 'Use',
|
||||
export: 'Export',
|
||||
@ -2083,14 +2101,14 @@ export default {
|
||||
row_column: 'Row and column permission settings',
|
||||
row_permission: 'Row permission rules',
|
||||
enable_row: 'Enable row permissions',
|
||||
add_condition: 'Add condition',
|
||||
add_relationship: 'Add relationship',
|
||||
white_list: 'White list',
|
||||
white_user_not: 'The above permission rules do not take effect for white list users',
|
||||
organization_or_role: 'Please select an organization or role',
|
||||
column_permission: 'Column permission rule',
|
||||
enable_column: 'Enable column permissions',
|
||||
search_by_field: 'Search by field name',
|
||||
add_condition: 'Add condition',
|
||||
add_relationship: 'Add relationship',
|
||||
filter_fields: 'Filter fields',
|
||||
selct_filter_fields: 'Please select a filter field',
|
||||
enter_keywords: 'Please enter keywords',
|
||||
@ -2200,7 +2218,8 @@ export default {
|
||||
i18n_msg_type_dataset_sync_faild: 'Dataset synchronization failed',
|
||||
i18n_msg_type_all: 'All type',
|
||||
i18n_msg_type_ds_invalid: 'Datasource invalid',
|
||||
channel_inner_msg: 'On site news'
|
||||
channel_inner_msg: 'On site news',
|
||||
channel_email_msg: 'Email reminder'
|
||||
},
|
||||
denumberrange: {
|
||||
label: 'Number range',
|
||||
@ -2356,8 +2375,7 @@ export default {
|
||||
cmonth: 'This Month',
|
||||
cquarter: 'This Quarter',
|
||||
lquarter: 'Last Quarter',
|
||||
cyear: 'This Year',
|
||||
openHomePage: 'Show Home Page'
|
||||
cyear: 'This Year'
|
||||
},
|
||||
dynamic_year: {
|
||||
fix: 'Fixed Year',
|
||||
@ -2370,7 +2388,8 @@ export default {
|
||||
dynamic: 'Dynamic Month',
|
||||
current: 'This Month',
|
||||
last: 'Last Month',
|
||||
firstOfYear: 'First month of this year'
|
||||
firstOfYear: 'First month of this year',
|
||||
sameMonthLastYear: 'Same month last year'
|
||||
},
|
||||
wizard: {
|
||||
welcome_title: 'Welcome To Use DataEase',
|
||||
@ -2419,7 +2438,9 @@ export default {
|
||||
plugin_style: {
|
||||
border: 'Border'
|
||||
},
|
||||
|
||||
sql_variable: {
|
||||
variable_mgm: 'Parameter setting'
|
||||
},
|
||||
map_setting: {
|
||||
area_level: 'Area Level',
|
||||
area_code: 'Area Code',
|
||||
@ -2439,5 +2460,4 @@ export default {
|
||||
empty: 'Empty',
|
||||
please_select_map: 'Please select a range of map'
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1148,6 +1148,9 @@ div:focus {
|
||||
.el-input__prefix {
|
||||
display: none;
|
||||
}
|
||||
.el-icon-circle-close {
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-calendar-outlined {
|
||||
@ -1172,12 +1175,55 @@ div:focus {
|
||||
}
|
||||
}
|
||||
|
||||
.user-drawer,
|
||||
.user-drawer-task {
|
||||
.el-drawer__body-cont {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
padding-bottom: 80px;
|
||||
}
|
||||
.el-drawer__header {
|
||||
padding: 16px 24px;
|
||||
margin: 0;
|
||||
font-family: PingFang SC;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
line-height: 24px;
|
||||
color: var(--deTextPrimary, #1f2329);
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
height: 57px;
|
||||
mix-blend-mode: normal;
|
||||
border-bottom: 1px solid var(--deComBorderColor50, rgba(187, 191, 196, 0.5));
|
||||
|
||||
.el-drawer__close-btn {
|
||||
position: absolute;
|
||||
right: 24px;
|
||||
top: 16px;
|
||||
padding: 4px;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center
|
||||
}
|
||||
|
||||
.el-drawer__close-btn:hover {
|
||||
background: #e9e9ea;
|
||||
}
|
||||
}
|
||||
|
||||
.el-drawer__body {
|
||||
padding: 12px 24px 24px 24px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.filter {
|
||||
display: flex;
|
||||
min-height: 46px;
|
||||
> :nth-child(1) {
|
||||
color: #1f2329;
|
||||
color: var(--deTextSecondary, #1f2329);
|
||||
font-family: "PingFang SC";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
@ -1187,19 +1233,82 @@ div:focus {
|
||||
width: 116px;
|
||||
}
|
||||
.filter-item {
|
||||
flex: 1;
|
||||
.item,
|
||||
.more {
|
||||
background: #f5f6f7;
|
||||
font-family: PingFang SC;
|
||||
white-space: nowrap;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 24px;
|
||||
margin-right: 12px;
|
||||
text-align: center;
|
||||
padding: 1px 6px;
|
||||
background: var(--deTextPrimary5, #f5f6f7);
|
||||
color: var(--deTextPrimary, #1f2329);
|
||||
border-radius: 2px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.active,
|
||||
.more:hover {
|
||||
background: rgba(51, 112, 255, 0.1);
|
||||
color: #0c296e;
|
||||
.more:hover{
|
||||
background: var(--primary10, rgba(51, 112, 255, 0.1));
|
||||
color: var(--primaryselect, #0c296e);
|
||||
}
|
||||
.more {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
border-radius: 4px;
|
||||
padding: 5px 26px 5px 26px;
|
||||
font-family: PingFang SC;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
letter-spacing: 0px;
|
||||
text-align: center;
|
||||
border: none;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.normal {
|
||||
color: #1f2329;
|
||||
border: 1px solid #bbbfc4;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
.foot {
|
||||
position: absolute;
|
||||
height: 80px;
|
||||
width: 100%;
|
||||
padding: 24px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
text-align: right;
|
||||
background-color: #fff;
|
||||
box-shadow: 0px -1px 4px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
}
|
||||
.user-popper {
|
||||
padding: 0;
|
||||
background: #fff;
|
||||
.popper__arrow {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.tree-select {
|
||||
.el-select-dropdown__empty,
|
||||
.el-scrollbar__wrap,
|
||||
.popper__arrow {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.user-popper.dept {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
@ -15,10 +15,9 @@
|
||||
<!--基础配置表单-->
|
||||
<el-form ref="formInline" v-loading="loading" :model="formInline" :rules="rules"
|
||||
class="demo-form-inline de-form-item" :disabled="show" label-width="80px" label-position="right" size="small">
|
||||
<el-form-item prop="frontTimeOut" class="de-i118">
|
||||
<el-form-item prop="frontTimeOut">
|
||||
<template slot="label">
|
||||
{{ $t('system_parameter_setting.request_timeout')}}
|
||||
<i class="is-require"></i>
|
||||
<el-tooltip class="item" effect="dark" :content="$t('system_parameter_setting.front_time_out')"
|
||||
placement="top">
|
||||
<i class="el-icon-warning-outline tips"></i>
|
||||
@ -96,7 +95,6 @@ export default {
|
||||
pattern: "^([0-9]|\\b[1-9]\\d\\b|\\b[1-2]\\d\\d\\b|\\b300\\b)$", // 修改了正则表达式,让其正确匹配0-300的数值
|
||||
message: this.$t("system_parameter_setting.front_error"),
|
||||
trigger: "blur",
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
msgTimeOut: [
|
||||
@ -104,7 +102,6 @@ export default {
|
||||
pattern: "^([1-9]|[1-9][0-9]|[1-2][0-9][0-9]|3[0-5][0-9]|36[0-5])$",
|
||||
message: this.$t("system_parameter_setting.msg_error"),
|
||||
trigger: "blur",
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -505,7 +505,7 @@
|
||||
row-key="jsonPath"
|
||||
ref="apiItemTable"
|
||||
>
|
||||
<el-table-column prop="originName" :label="$t('dataset.parse_filed')" :show-overflow-tooltip="true"
|
||||
<el-table-column class-name="checkbox-table" prop="originName" :label="$t('dataset.parse_filed')" :show-overflow-tooltip="true"
|
||||
width="255">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox
|
||||
@ -1365,4 +1365,15 @@ export default {
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
.checkbox-table {
|
||||
.el-checkbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.el-checkbox__input {
|
||||
margin-top: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
v-closePress
|
||||
direction="rtl"
|
||||
>
|
||||
<div class="el-drawer__body-cont">
|
||||
<div class="filter">
|
||||
<span>{{ $t("log.optype") }}</span>
|
||||
<div class="filter-item">
|
||||
@ -20,7 +21,6 @@
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="el-drawer__body-cont">
|
||||
<div class="filter">
|
||||
<span>{{ $t("log.user") }}</span>
|
||||
<div class="filter-item">
|
||||
@ -243,8 +243,11 @@ export default {
|
||||
});
|
||||
}
|
||||
});
|
||||
const [min, max] = this.dataRange;
|
||||
let [min, max] = this.dataRange;
|
||||
if (min && max) {
|
||||
if (+min === +max) {
|
||||
max = +max + 24 * 3600 * 1000;
|
||||
}
|
||||
conditions.push({
|
||||
field: "time",
|
||||
operator: "between",
|
||||
@ -262,142 +265,4 @@ export default {
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.user-drawer-task {
|
||||
.el-drawer__body-cont {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
padding-bottom: 80px;
|
||||
}
|
||||
.el-drawer__header {
|
||||
padding: 16px 24px;
|
||||
margin: 0;
|
||||
font-family: PingFang SC;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
line-height: 24px;
|
||||
color: #1f2329;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
height: 57px;
|
||||
mix-blend-mode: normal;
|
||||
border-bottom: 1px solid rgba(187, 191, 196, 0.5);
|
||||
|
||||
.el-drawer__close-btn {
|
||||
position: absolute;
|
||||
right: 24px;
|
||||
top: 16px;
|
||||
padding: 4px;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.el-drawer__close-btn:hover {
|
||||
background: #e9e9ea;
|
||||
}
|
||||
}
|
||||
|
||||
.el-drawer__body {
|
||||
padding: 12px 24px 24px 24px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.filter {
|
||||
display: flex;
|
||||
min-height: 46px;
|
||||
> :nth-child(1) {
|
||||
color: #1f2329;
|
||||
font-family: "PingFang SC";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
white-space: nowrap;
|
||||
width: 116px;
|
||||
}
|
||||
.filter-item {
|
||||
flex: 1;
|
||||
.item,
|
||||
.more {
|
||||
font-family: PingFang SC;
|
||||
white-space: nowrap;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 24px;
|
||||
margin-right: 12px;
|
||||
text-align: center;
|
||||
padding: 1px 6px;
|
||||
background: #f5f6f7;
|
||||
border-radius: 2px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.active,
|
||||
.more:hover {
|
||||
background: rgba(51, 112, 255, 0.1);
|
||||
color: #0c296e;
|
||||
}
|
||||
.more {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
border-radius: 4px;
|
||||
padding: 5px 26px 5px 26px;
|
||||
font-family: PingFang SC;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
letter-spacing: 0px;
|
||||
text-align: center;
|
||||
border: none;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.normal {
|
||||
color: #1f2329;
|
||||
border: 1px solid #bbbfc4;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
.foot {
|
||||
position: absolute;
|
||||
height: 80px;
|
||||
width: 100%;
|
||||
padding: 24px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
text-align: right;
|
||||
background-color: var(--MainBG, #fff);
|
||||
box-shadow: 0px -1px 4px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
}
|
||||
.user-popper {
|
||||
padding: 0;
|
||||
background: #fff;
|
||||
.popper__arrow {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.tree-select {
|
||||
.el-select-dropdown__empty,
|
||||
.el-scrollbar__wrap,
|
||||
.popper__arrow {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.user-popper.dept {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
</script>
|
@ -124,6 +124,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
min-width="178"
|
||||
class-name="f14"
|
||||
key="datasetName"
|
||||
prop="datasetName"
|
||||
:label="$t('dataset.task.dataset')"
|
||||
@ -917,4 +918,9 @@ span {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.f14 {
|
||||
.cell {
|
||||
font-size: 12px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -320,8 +320,11 @@ export default {
|
||||
});
|
||||
}
|
||||
});
|
||||
const [min, max] = this.dataRange;
|
||||
let [min, max] = this.dataRange;
|
||||
if (min && max) {
|
||||
if (+min === +max) {
|
||||
max = +max + 24 * 3600 * 1000;
|
||||
}
|
||||
conditions.push({
|
||||
field: "dataset_table_task.last_exec_time",
|
||||
operator: "between",
|
||||
@ -339,143 +342,4 @@ export default {
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.user-drawer-task {
|
||||
|
||||
.el-drawer__body-cont {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
padding-bottom: 80px;
|
||||
}
|
||||
.el-drawer__header {
|
||||
padding: 16px 24px;
|
||||
margin: 0;
|
||||
font-family: PingFang SC;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
line-height: 24px;
|
||||
color: #1f2329;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
height: 57px;
|
||||
mix-blend-mode: normal;
|
||||
border-bottom: 1px solid rgba(187, 191, 196, 0.5);
|
||||
|
||||
.el-drawer__close-btn {
|
||||
position: absolute;
|
||||
right: 24px;
|
||||
top: 16px;
|
||||
padding: 4px;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.el-drawer__close-btn:hover {
|
||||
background: #e9e9ea;
|
||||
}
|
||||
}
|
||||
|
||||
.el-drawer__body {
|
||||
padding: 12px 24px 24px 24px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.filter {
|
||||
display: flex;
|
||||
min-height: 46px;
|
||||
> :nth-child(1) {
|
||||
color: #1f2329;
|
||||
font-family: "PingFang SC";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
white-space: nowrap;
|
||||
width: 116px;
|
||||
}
|
||||
.filter-item {
|
||||
flex: 1;
|
||||
.item,
|
||||
.more {
|
||||
font-family: PingFang SC;
|
||||
white-space: nowrap;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 24px;
|
||||
margin-right: 12px;
|
||||
text-align: center;
|
||||
padding: 1px 6px;
|
||||
background: #f5f6f7;
|
||||
border-radius: 2px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.active,
|
||||
.more:hover {
|
||||
background: rgba(51, 112, 255, 0.1);
|
||||
color: #0c296e;
|
||||
}
|
||||
.more {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
border-radius: 4px;
|
||||
padding: 5px 26px 5px 26px;
|
||||
font-family: PingFang SC;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
letter-spacing: 0px;
|
||||
text-align: center;
|
||||
border: none;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.normal {
|
||||
color: #1f2329;
|
||||
border: 1px solid #bbbfc4;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
.foot {
|
||||
position: absolute;
|
||||
height: 80px;
|
||||
width: 100%;
|
||||
padding: 24px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
text-align: right;
|
||||
background-color: var(--MainBG, #fff);
|
||||
box-shadow: 0px -1px 4px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
}
|
||||
.user-popper {
|
||||
padding: 0;
|
||||
background: #fff;
|
||||
.popper__arrow {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.tree-select {
|
||||
.el-select-dropdown__empty,
|
||||
.el-scrollbar__wrap,
|
||||
.popper__arrow {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.user-popper.dept {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
</script>
|
@ -308,8 +308,11 @@ export default {
|
||||
});
|
||||
}
|
||||
});
|
||||
const [min, max] = this.dataRange;
|
||||
let [min, max] = this.dataRange;
|
||||
if (min && max) {
|
||||
if (+min === +max) {
|
||||
max = +max + 24 * 3600 * 1000;
|
||||
}
|
||||
conditions.push({
|
||||
field: "dataset_table_task.last_exec_time",
|
||||
operator: "between",
|
||||
@ -327,143 +330,4 @@ export default {
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.user-drawer-task {
|
||||
.el-drawer__body-cont {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
padding-bottom: 80px;
|
||||
}
|
||||
|
||||
.el-drawer__header {
|
||||
padding: 16px 24px;
|
||||
margin: 0;
|
||||
font-family: PingFang SC;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
line-height: 24px;
|
||||
color: #1f2329;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
height: 57px;
|
||||
mix-blend-mode: normal;
|
||||
border-bottom: 1px solid rgba(187, 191, 196, 0.5);
|
||||
|
||||
.el-drawer__close-btn {
|
||||
position: absolute;
|
||||
right: 24px;
|
||||
top: 16px;
|
||||
padding: 4px;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.el-drawer__close-btn:hover {
|
||||
background: #e9e9ea;
|
||||
}
|
||||
}
|
||||
|
||||
.el-drawer__body {
|
||||
padding: 12px 24px 24px 24px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.filter {
|
||||
display: flex;
|
||||
min-height: 46px;
|
||||
> :nth-child(1) {
|
||||
color: #1f2329;
|
||||
font-family: "PingFang SC";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
white-space: nowrap;
|
||||
width: 116px;
|
||||
}
|
||||
.filter-item {
|
||||
flex: 1;
|
||||
.item,
|
||||
.more {
|
||||
font-family: PingFang SC;
|
||||
white-space: nowrap;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 24px;
|
||||
margin-right: 12px;
|
||||
text-align: center;
|
||||
padding: 1px 6px;
|
||||
background: #f5f6f7;
|
||||
border-radius: 2px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.active,
|
||||
.more:hover {
|
||||
background: rgba(51, 112, 255, 0.1);
|
||||
color: #0c296e;
|
||||
}
|
||||
.more {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
border-radius: 4px;
|
||||
padding: 5px 26px 5px 26px;
|
||||
font-family: PingFang SC;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
letter-spacing: 0px;
|
||||
text-align: center;
|
||||
border: none;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.normal {
|
||||
color: #1f2329;
|
||||
border: 1px solid #bbbfc4;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
.foot {
|
||||
position: absolute;
|
||||
height: 80px;
|
||||
width: 100%;
|
||||
padding: 24px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
text-align: right;
|
||||
background-color: var(--MainBG, #fff);
|
||||
box-shadow: 0px -1px 4px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
}
|
||||
.user-popper {
|
||||
padding: 0;
|
||||
background: #fff;
|
||||
.popper__arrow {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.tree-select {
|
||||
.el-select-dropdown__empty,
|
||||
.el-scrollbar__wrap,
|
||||
.popper__arrow {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.user-popper.dept {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
</script>
|
@ -652,4 +652,4 @@ export default {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -7,114 +7,118 @@
|
||||
v-closePress
|
||||
direction="rtl"
|
||||
>
|
||||
<div class="filter">
|
||||
<span>{{ $t('commons.status')}}</span>
|
||||
<div class="filter-item">
|
||||
<span
|
||||
class="item"
|
||||
@click="statusChange(ele.id)"
|
||||
:class="[activeStatus.includes(ele.id) ? 'active' : '']"
|
||||
:key="ele.id"
|
||||
v-for="ele in status"
|
||||
>{{ $t(ele.label) }}</span>
|
||||
<div class="el-drawer__body-cont">
|
||||
<div class="filter">
|
||||
<span>{{ $t("commons.status") }}</span>
|
||||
<div class="filter-item">
|
||||
<span
|
||||
class="item"
|
||||
@click="statusChange(ele.id)"
|
||||
:class="[activeStatus.includes(ele.id) ? 'active' : '']"
|
||||
:key="ele.id"
|
||||
v-for="ele in status"
|
||||
>{{ $t(ele.label) }}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter">
|
||||
<span>{{ $t('commons.organization')}}</span>
|
||||
<div class="filter-item">
|
||||
<span
|
||||
class="item"
|
||||
@click="activeDeptChange(ele.id)"
|
||||
:class="[activeDept.includes(ele.id) ? 'active' : '']"
|
||||
:key="ele.id"
|
||||
v-for="ele in selectDeptsCahe"
|
||||
>{{ ele.label }}</span>
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
popper-class="user-popper"
|
||||
width="200"
|
||||
trigger="click"
|
||||
>
|
||||
<div class="filter">
|
||||
<span>{{ $t("commons.organization") }}</span>
|
||||
<div class="filter-item">
|
||||
<span
|
||||
class="item"
|
||||
@click="activeDeptChange(ele.id)"
|
||||
:class="[activeDept.includes(ele.id) ? 'active' : '']"
|
||||
:key="ele.id"
|
||||
v-for="ele in selectDeptsCahe"
|
||||
>{{ ele.label }}</span
|
||||
>
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
popper-class="user-popper dept"
|
||||
popper-class="user-popper"
|
||||
width="200"
|
||||
trigger="click"
|
||||
>
|
||||
<el-tree
|
||||
:load="loadNode"
|
||||
:lazy="true"
|
||||
:expand-on-click-node="false"
|
||||
:data="deptsComputed"
|
||||
:props="defaultProps"
|
||||
@node-click="handleNodeClick"
|
||||
></el-tree>
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
popper-class="user-popper dept"
|
||||
width="200"
|
||||
trigger="click"
|
||||
>
|
||||
<el-tree
|
||||
:load="loadNode"
|
||||
:lazy="true"
|
||||
:expand-on-click-node="false"
|
||||
:data="deptsComputed"
|
||||
:props="defaultProps"
|
||||
@node-click="handleNodeClick"
|
||||
></el-tree>
|
||||
|
||||
<el-select
|
||||
ref="roleSelect"
|
||||
v-model="selectDepts"
|
||||
slot="reference"
|
||||
popper-class="tree-select"
|
||||
multiple
|
||||
:placeholder="$t('commons.please_select')"
|
||||
value-key="id"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in selectDepts"
|
||||
:key="item.label"
|
||||
:label="item.label"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-popover>
|
||||
<span class="more" slot="reference">+ {{ $t("panel.more") }}</span>
|
||||
</el-popover>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter">
|
||||
<span>{{ $t("panel.role") }}</span>
|
||||
<div class="filter-item">
|
||||
<span
|
||||
@click="activeRoleChange(ele.id)"
|
||||
class="item"
|
||||
:class="[activeRole.includes(ele.id) ? 'active' : '']"
|
||||
:key="ele.id"
|
||||
v-for="ele in rolesValueCopy"
|
||||
>{{ ele.name }}</span
|
||||
>
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
popper-class="user-popper"
|
||||
width="200"
|
||||
trigger="click"
|
||||
>
|
||||
<el-select
|
||||
ref="roleSelect"
|
||||
v-model="selectDepts"
|
||||
slot="reference"
|
||||
popper-class="tree-select"
|
||||
v-model="rolesValue"
|
||||
multiple
|
||||
:placeholder="$t('commons.please_select')"
|
||||
@change="changeRole"
|
||||
@remove-tag="changeRole"
|
||||
value-key="id"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in selectDepts"
|
||||
:key="item.label"
|
||||
:label="item.label"
|
||||
:value="item"
|
||||
/>
|
||||
<el-option
|
||||
v-for="item in rolesComputed"
|
||||
:key="item.name"
|
||||
:label="item.name"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
<span class="more" slot="reference">+ {{ $t("panel.more") }}</span>
|
||||
</el-popover>
|
||||
<span class="more" slot="reference">+ {{ $t('panel.more')}}</span>
|
||||
</el-popover>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter">
|
||||
<span>{{ $t('panel.role')}}</span>
|
||||
<div class="filter-item">
|
||||
<span
|
||||
@click="activeRoleChange(ele.id)"
|
||||
class="item"
|
||||
:class="[activeRole.includes(ele.id) ? 'active' : '']"
|
||||
:key="ele.id"
|
||||
v-for="ele in rolesValueCopy"
|
||||
>{{ ele.name }}</span
|
||||
>
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
popper-class="user-popper"
|
||||
width="200"
|
||||
trigger="click"
|
||||
>
|
||||
<el-select
|
||||
ref="roleSelect"
|
||||
v-model="rolesValue"
|
||||
multiple
|
||||
:placeholder="$t('commons.please_select')"
|
||||
@change="changeRole"
|
||||
@remove-tag="changeRole"
|
||||
value-key="id"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in rolesComputed"
|
||||
:key="item.name"
|
||||
:label="item.name"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
<span class="more" slot="reference">+ {{ $t('panel.more')}}</span>
|
||||
</el-popover>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="foot">
|
||||
<el-button class="btn normal" @click="reset">{{
|
||||
$t("commons.reset")
|
||||
}}</el-button>
|
||||
<el-button type="primary" class="btn" @click="search">{{
|
||||
$t("commons.adv_search.search")
|
||||
}}</el-button>
|
||||
<el-button class="btn normal" @click="reset">{{
|
||||
$t("commons.reset")
|
||||
}}</el-button>
|
||||
<el-button type="primary" class="btn" @click="search">{{
|
||||
$t("commons.adv_search.search")
|
||||
}}</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
@ -131,13 +135,16 @@ export default {
|
||||
deptCahe: [],
|
||||
roles: [],
|
||||
filterTextMap: [],
|
||||
status: [{
|
||||
id: 1,
|
||||
label: 'commons.enable'
|
||||
},{
|
||||
id: 0,
|
||||
label: 'commons.disable'
|
||||
}],
|
||||
status: [
|
||||
{
|
||||
id: 1,
|
||||
label: "commons.enable",
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
label: "commons.disable",
|
||||
},
|
||||
],
|
||||
activeStatus: [],
|
||||
rolesValue: [],
|
||||
activeRole: [],
|
||||
@ -150,56 +157,72 @@ export default {
|
||||
label: "label",
|
||||
isLeaf: "leaf",
|
||||
},
|
||||
userDrawer: false
|
||||
userDrawer: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
rolesComputed() {
|
||||
return this.roles.filter(ele => !this.activeRole.includes(ele.id))
|
||||
return this.roles.filter((ele) => !this.activeRole.includes(ele.id));
|
||||
},
|
||||
rolesValueCopy() {
|
||||
return this.roleCahe.filter(ele => this.activeRole.includes(ele.id))
|
||||
return this.roleCahe.filter((ele) => this.activeRole.includes(ele.id));
|
||||
},
|
||||
deptsComputed() {
|
||||
return this.depts.filter(ele => !this.activeDept.includes(ele.id))
|
||||
}
|
||||
return this.depts.filter((ele) => !this.activeDept.includes(ele.id));
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.initRoles();
|
||||
},
|
||||
methods: {
|
||||
clearFilter() {
|
||||
Array(3).fill(1).forEach((_, index) => {
|
||||
this.clearOneFilter(index)
|
||||
})
|
||||
this.$emit('search', [], [])
|
||||
Array(3)
|
||||
.fill(1)
|
||||
.forEach((_, index) => {
|
||||
this.clearOneFilter(index);
|
||||
});
|
||||
this.$emit("search", [], []);
|
||||
},
|
||||
clearOneFilter(index) {
|
||||
(this.filterTextMap[index] || []).forEach(ele => {
|
||||
this[ele] = []
|
||||
})
|
||||
(this.filterTextMap[index] || []).forEach((ele) => {
|
||||
this[ele] = [];
|
||||
});
|
||||
},
|
||||
// 获取弹窗内部门数据
|
||||
treeByDeptId() {
|
||||
treeByDeptId(0).then((res) => {
|
||||
this.depts = (res.data || []).map(ele => {
|
||||
return {
|
||||
this.depts = (res.data || []).map((ele) => {
|
||||
return {
|
||||
...ele,
|
||||
leaf: !ele.hasChildren,
|
||||
}
|
||||
})
|
||||
};
|
||||
});
|
||||
});
|
||||
},
|
||||
changeRole() {
|
||||
if (this.roleCahe.length > this.rolesValue.length + this.activeRole.length) {
|
||||
this.roleCahe = this.roleCahe.filter(ele => this.rolesValue.map(ele => ele.id).concat(this.activeRole).includes(ele.id));
|
||||
if (
|
||||
this.roleCahe.length >
|
||||
this.rolesValue.length + this.activeRole.length
|
||||
) {
|
||||
this.roleCahe = this.roleCahe.filter((ele) =>
|
||||
this.rolesValue
|
||||
.map((ele) => ele.id)
|
||||
.concat(this.activeRole)
|
||||
.includes(ele.id)
|
||||
);
|
||||
return;
|
||||
}
|
||||
const roleIdx = this.rolesValue.findIndex(ele => !this.roleCahe.map(ele => ele.id).concat(this.activeRole).includes(ele.id));
|
||||
if (roleIdx === -1) return
|
||||
this.activeRole.push(this.rolesValue[roleIdx].id)
|
||||
const roleIdx = this.rolesValue.findIndex(
|
||||
(ele) =>
|
||||
!this.roleCahe
|
||||
.map((ele) => ele.id)
|
||||
.concat(this.activeRole)
|
||||
.includes(ele.id)
|
||||
);
|
||||
if (roleIdx === -1) return;
|
||||
this.activeRole.push(this.rolesValue[roleIdx].id);
|
||||
this.roleCahe.push(this.rolesValue[roleIdx]);
|
||||
this.rolesValue.splice(roleIdx, 1)
|
||||
this.rolesValue.splice(roleIdx, 1);
|
||||
},
|
||||
activeRoleChange(id) {
|
||||
const roleIndex = this.activeRole.findIndex((ele) => ele === id);
|
||||
@ -216,22 +239,26 @@ export default {
|
||||
const deptIdx = this.selectDepts.findIndex((ele) => ele.id === id);
|
||||
if (deptIdx !== -1) {
|
||||
this.selectDepts.splice(deptIdx, 1);
|
||||
this.selectDeptsCahe = this.selectDeptsCahe.filter(ele => ele.id !== id)
|
||||
this.deptCahe = this.deptCahe.filter(ele => ele.id !== id)
|
||||
this.selectDeptsCahe = this.selectDeptsCahe.filter(
|
||||
(ele) => ele.id !== id
|
||||
);
|
||||
this.deptCahe = this.deptCahe.filter((ele) => ele.id !== id);
|
||||
return;
|
||||
}
|
||||
this.activeDept.push(id)
|
||||
this.activeDept.push(id);
|
||||
this.selectDeptsCahe.push({ id, label });
|
||||
this.deptCahe.push({ id, label });
|
||||
},
|
||||
activeDeptChange(id) {
|
||||
const dept = this.deptCahe.find((ele) => ele.id === id)
|
||||
const dept = this.deptCahe.find((ele) => ele.id === id);
|
||||
this.selectDepts.push(dept);
|
||||
this.activeDept = this.activeDept.filter(ele => ele !== id)
|
||||
this.selectDeptsCahe = this.selectDeptsCahe.filter(ele => ele.id !== id)
|
||||
this.activeDept = this.activeDept.filter((ele) => ele !== id);
|
||||
this.selectDeptsCahe = this.selectDeptsCahe.filter(
|
||||
(ele) => ele.id !== id
|
||||
);
|
||||
},
|
||||
statusChange(id) {
|
||||
const statusIndex = this.activeStatus.findIndex((ele) => ele === id);
|
||||
const statusIndex = this.activeStatus.findIndex((ele) => ele === id);
|
||||
if (statusIndex === -1) {
|
||||
this.activeStatus.push(id);
|
||||
} else {
|
||||
@ -239,8 +266,8 @@ export default {
|
||||
}
|
||||
},
|
||||
changeDepts() {
|
||||
const depts = this.selectDepts.map((item) => item.id);
|
||||
this.activeDept = this.activeDept.filter((ele) => depts.includes(ele));
|
||||
const depts = this.selectDepts.map((item) => item.id);
|
||||
this.activeDept = this.activeDept.filter((ele) => depts.includes(ele));
|
||||
},
|
||||
loadNode(node, resolve) {
|
||||
if (!this.depts.length) {
|
||||
@ -248,7 +275,9 @@ export default {
|
||||
return;
|
||||
}
|
||||
getDeptTree(node.data.id).then((res) => {
|
||||
const filterDept = (res.data || []).filter(ele => !this.activeDept.includes(ele.deptId))
|
||||
const filterDept = (res.data || []).filter(
|
||||
(ele) => !this.activeDept.includes(ele.deptId)
|
||||
);
|
||||
resolve(
|
||||
filterDept.map((dept) => {
|
||||
return this.normalizer(dept);
|
||||
@ -270,38 +299,61 @@ export default {
|
||||
},
|
||||
search() {
|
||||
this.userDrawer = false;
|
||||
this.$emit('search', this.formatCondition(), this.formatText())
|
||||
this.$emit("search", this.formatCondition(), this.formatText());
|
||||
},
|
||||
formatText() {
|
||||
this.filterTextMap = [];
|
||||
const params = [];
|
||||
if (this.activeStatus.length) {
|
||||
let str = `${this.$t('kettle.status')}:${this.activeStatus.reduce((pre,next) => (this.status.find(ele => ele.id === next) || {}).label + '、' + pre, '')}`;
|
||||
params.push(str.slice(0, str.length - 1 ))
|
||||
this.filterTextMap.push(['activeStatus'])
|
||||
let str = `${this.$t("kettle.status")}:${this.activeStatus.reduce(
|
||||
(pre, next) =>
|
||||
(this.status.find((ele) => ele.id === next) || {}).label +
|
||||
"、" +
|
||||
pre,
|
||||
""
|
||||
)}`;
|
||||
params.push(str.slice(0, str.length - 1));
|
||||
this.filterTextMap.push(["activeStatus"]);
|
||||
}
|
||||
if (this.activeDept.length) {
|
||||
params.push(`${this.$t('panel.org')}:${this.selectDeptsCahe.map(ele => ele.label).join('、')}`)
|
||||
this.filterTextMap.push(['activeDept', 'selectDepts', 'selectDeptsCahe', 'deptCahe'])
|
||||
params.push(
|
||||
`${this.$t("panel.org")}:${this.selectDeptsCahe
|
||||
.map((ele) => ele.label)
|
||||
.join("、")}`
|
||||
);
|
||||
this.filterTextMap.push([
|
||||
"activeDept",
|
||||
"selectDepts",
|
||||
"selectDeptsCahe",
|
||||
"deptCahe",
|
||||
]);
|
||||
}
|
||||
if (this.activeRole.length) {
|
||||
params.push(`${this.$t('panel.role')}:${this.rolesValueCopy.map(ele => ele.name).join('、')}`)
|
||||
this.filterTextMap.push(['rolesValue', 'activeRole', 'roleCahe'])
|
||||
params.push(
|
||||
`${this.$t("panel.role")}:${this.rolesValueCopy
|
||||
.map((ele) => ele.name)
|
||||
.join("、")}`
|
||||
);
|
||||
this.filterTextMap.push(["rolesValue", "activeRole", "roleCahe"]);
|
||||
}
|
||||
return params;
|
||||
},
|
||||
formatCondition() {
|
||||
const fildMap = {'r.role_id': this.activeRole, 'd.dept_id': this.activeDept, 'u.enabled': this.activeStatus}
|
||||
const conditions = []
|
||||
Object.keys(fildMap).forEach(ele => {
|
||||
const fildMap = {
|
||||
"r.role_id": this.activeRole,
|
||||
"d.dept_id": this.activeDept,
|
||||
"u.enabled": this.activeStatus,
|
||||
};
|
||||
const conditions = [];
|
||||
Object.keys(fildMap).forEach((ele) => {
|
||||
if (fildMap[ele].length) {
|
||||
conditions.push({
|
||||
field: ele,
|
||||
operator: 'in',
|
||||
value: fildMap[ele]
|
||||
})
|
||||
operator: "in",
|
||||
value: fildMap[ele],
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
return conditions;
|
||||
},
|
||||
init() {
|
||||
@ -309,134 +361,8 @@ export default {
|
||||
},
|
||||
reset() {
|
||||
this.userDrawer = false;
|
||||
this.clearFilter()
|
||||
this.clearFilter();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.user-drawer {
|
||||
.el-drawer__header {
|
||||
padding: 16px 24px;
|
||||
margin: 0;
|
||||
font-family: PingFang SC;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
line-height: 24px;
|
||||
color: #1f2329;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
height: 57px;
|
||||
mix-blend-mode: normal;
|
||||
border-bottom: 1px solid rgba(187, 191, 196, 0.5);
|
||||
|
||||
.el-drawer__close-btn {
|
||||
position: absolute;
|
||||
right: 24px;
|
||||
top: 16px;
|
||||
padding: 4px;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center
|
||||
}
|
||||
|
||||
.el-drawer__close-btn:hover {
|
||||
background: #e9e9ea;
|
||||
}
|
||||
}
|
||||
|
||||
.el-drawer__body {
|
||||
padding: 12px 24px 24px 24px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.filter {
|
||||
display: flex;
|
||||
min-height: 46px;
|
||||
> :nth-child(1) {
|
||||
color: #1f2329;
|
||||
font-family: "PingFang SC";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
white-space: nowrap;
|
||||
width: 116px;
|
||||
}
|
||||
.filter-item {
|
||||
flex: 1;
|
||||
.item,
|
||||
.more {
|
||||
font-family: PingFang SC;
|
||||
white-space: nowrap;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 24px;
|
||||
margin-right: 12px;
|
||||
text-align: center;
|
||||
padding: 1px 6px;
|
||||
background: #f5f6f7;
|
||||
border-radius: 2px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.active,
|
||||
.more:hover{
|
||||
background: rgba(51, 112, 255, 0.1);
|
||||
color: #0c296e;
|
||||
}
|
||||
.more {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
border-radius: 4px;
|
||||
padding: 5px 26px 5px 26px;
|
||||
font-family: PingFang SC;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
letter-spacing: 0px;
|
||||
text-align: center;
|
||||
border: none;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.normal {
|
||||
color: #1f2329;
|
||||
border: 1px solid #bbbfc4;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
.foot {
|
||||
position: absolute;
|
||||
right: 24px;
|
||||
bottom: 24px;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
.user-popper {
|
||||
padding: 0;
|
||||
background: #fff;
|
||||
.popper__arrow {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.tree-select {
|
||||
.el-select-dropdown__empty,
|
||||
.el-scrollbar__wrap,
|
||||
.popper__arrow {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.user-popper.dept {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user