2020-03-30 21:09:34 +08:00
|
|
|
|
<template>
|
2020-12-14 20:25:24 +08:00
|
|
|
|
<div class="system">
|
2021-04-16 21:10:31 +08:00
|
|
|
|
<el-tabs type="border-card" @tab-click="selectTab" v-model="activeTab" class="system-tabs" :class="{'full-table':activeTab == 'notification'||activeTab == 'link'||activeTab == 'apiKey'}">
|
2020-08-02 22:43:53 +08:00
|
|
|
|
<el-tab-pane :label="$t('config.system.basic.basic')" name="basic">
|
2021-04-21 13:05:27 +08:00
|
|
|
|
<div class="system-config-form basicForm" v-if="activeTab === 'basic'">
|
|
|
|
|
|
<el-form :model="basic" label-width="180px" size="small" ref="basicForm" :rules="basicRules" :validate-on-rule-change="false">
|
|
|
|
|
|
<el-form-item :label="$t('config.system.basic.sysLogo')" prop="system_logo">
|
|
|
|
|
|
<el-upload
|
|
|
|
|
|
class="avatar-uploader"
|
|
|
|
|
|
action=""
|
|
|
|
|
|
type=".jpg,.jpeg,.png"
|
|
|
|
|
|
:auto-upload="false"
|
|
|
|
|
|
:show-file-list="false"
|
|
|
|
|
|
:on-change="handleLogoChange"
|
|
|
|
|
|
>
|
|
|
|
|
|
<img v-if="basic.system_logo" :src="basic.system_logo" class="avatar">
|
|
|
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
|
|
|
<div slot="tip" v-if="imageFormatErr" class="logo-upload-tip">{{$t('config.system.basic.logoTip')}}</div>
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
</el-form-item>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.basic.systemName')" prop="system_name">
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<el-input v-model="basic.system_name" id="system-baisc-system_name"></el-input>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item :label="$t('config.system.basic.curUrl')" prop="alert_api">
|
2021-03-19 18:52:19 +08:00
|
|
|
|
<el-input id="system-baisc-alert_api" v-model="basic.alert_api"></el-input>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
2021-04-21 13:05:27 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.basic.assetPingInterval')" prop="asset_ping_interval">
|
|
|
|
|
|
<el-input v-model.number="basic.asset_ping_interval" >
|
|
|
|
|
|
<template slot="append"><span >{{$t('config.system.basic.second')}}</span></template>
|
|
|
|
|
|
</el-input>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
2021-04-21 13:05:27 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.basic.scrapeInterval')" prop="default_scrape_interval">
|
|
|
|
|
|
<el-input v-model.number="basic.default_scrape_interval" >
|
|
|
|
|
|
<template slot="append"><span >{{$t('config.system.basic.second')}}</span></template>
|
|
|
|
|
|
</el-input>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
2021-04-21 13:05:27 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.basic.scrapeTimeout')" prop="default_scrape_timeout">
|
|
|
|
|
|
<el-input v-model.number="basic.default_scrape_timeout" >
|
2021-02-09 17:28:58 +08:00
|
|
|
|
<template slot="append"><span >{{$t('config.system.basic.second')}}</span></template>
|
|
|
|
|
|
</el-input>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
2021-02-09 17:28:58 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.basic.storageRetention')" prop="storage_local_retention" style="width:458px;">
|
|
|
|
|
|
<el-input v-model.number="basic.storage_local_retention" id="system-baisc-storage_local_retention">
|
|
|
|
|
|
<template slot="append"><span >{{$t('config.system.basic.day')}}</span></template>
|
|
|
|
|
|
</el-input>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
2020-11-20 11:19:25 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.basic.maxSeries')" prop="storage_local_retention">
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<el-input-number v-model="basic.query_max_series" controls-position="right" :min="-1" :max="1000" :precision="0" id="system-baisc-query_max_series"></el-input-number>
|
2020-11-20 11:19:25 +08:00
|
|
|
|
</el-form-item>
|
2021-04-21 13:05:27 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.basic.defaultCabinetUsize')" prop="default_cabinet_usize">
|
|
|
|
|
|
<el-input v-model.number="basic.default_cabinet_usize" id="system-baisc-default_cabinet_usize"></el-input>
|
|
|
|
|
|
</el-form-item>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.basic.timezone')" prop="timezone">
|
2020-11-19 18:20:31 +08:00
|
|
|
|
<!-- <el-input v-model.number="basic.timezone" ></el-input>-->
|
2021-04-21 18:24:25 +08:00
|
|
|
|
<el-select v-model="basic.timezone" id="system-baisc-timezone" filterable>
|
2021-04-21 13:05:27 +08:00
|
|
|
|
<el-option v-for="(item,index) in timezoneOption" :key="index" :label="item.name" :value="item.name" >
|
|
|
|
|
|
<div style="display: flex;justify-content: space-between;padding: 5px;">
|
|
|
|
|
|
<div >{{item.name}}</div>
|
2021-04-21 18:24:25 +08:00
|
|
|
|
<div >{{timezoneOptionHandler(item.offset)}}</div>
|
2021-04-21 13:05:27 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</el-option>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2021-03-19 09:43:57 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.basic.mapConfig')" >
|
2021-03-29 13:42:40 +08:00
|
|
|
|
<latlng-picker :init-data="basic.map_center_config" ref="latlngPicker" :show-zoom="true"></latlng-picker>
|
2021-03-19 09:43:57 +08:00
|
|
|
|
</el-form-item>
|
2021-04-21 13:05:27 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.basic.snmpTrapPort')" prop="snmp_trap_listen_port">
|
|
|
|
|
|
<el-input v-model="basic.snmp_trap_listen_port" id="system-baisc-snmp_trap_listen_port"></el-input>
|
|
|
|
|
|
</el-form-item>
|
2021-01-21 14:43:21 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.basic.unsaved')" prop="unsaved_change">
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<el-switch v-model.number="basic.unsaved_change" active-color="rgb(238, 157, 63)" active-value='on' inactive-value='off' id="system-baisc-unsaved_change">
|
2021-01-21 14:43:21 +08:00
|
|
|
|
</el-switch>
|
|
|
|
|
|
</el-form-item>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
<el-form-item>
|
2020-12-21 14:16:13 +08:00
|
|
|
|
<button
|
2021-02-04 11:21:00 +08:00
|
|
|
|
@click="resetForm('basicForm','basic')" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" type="button" id="system-basic-reset"
|
2020-12-21 14:16:13 +08:00
|
|
|
|
:disabled="prevent_opt.save" :class="{'nz-btn-disabled':prevent_opt.save}"
|
|
|
|
|
|
>{{$t('overall.reset')}}</button>
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<button id="system-basic-save" @click="saveSetInfo('basic','basicForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" type="button" v-has="'system_basic_save'" :disabled="prevent_opt.save" :class="{'nz-btn-disabled':prevent_opt.save}">{{$t('overall.submit')}}</button>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
2021-04-21 18:24:25 +08:00
|
|
|
|
</div >
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-tab-pane>
|
|
|
|
|
|
<el-tab-pane :label="$t('config.system.email.email')" name="email" >
|
2021-04-21 13:05:27 +08:00
|
|
|
|
<div class="system-config-form" v-if="activeTab === 'email'">
|
2020-08-02 22:43:53 +08:00
|
|
|
|
<el-form :model="email" label-width="180px" size="small" ref="emailForm" :rules="email.email_enable=='on'?emailRules:{}" :validate-on-rule-change="false">
|
|
|
|
|
|
<el-form-item :label="$t('config.system.email.enable')" prop="email_enable">
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<el-checkbox v-model="email.email_enable" true-label="on" false-label="off" @change="switchChange('emailForm')" id="system-email-email_enable"></el-checkbox>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
2021-04-21 13:05:27 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.email.smtpHost')" prop="email_host">
|
|
|
|
|
|
<el-input v-model="email.email_host" :disabled="email.email_enable == 'off'" id="system-email-email_smtp_host"></el-input>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item :label="$t('config.system.email.smtpPort')" prop="email_port">
|
|
|
|
|
|
<el-input v-model.number="email.email_port" :disabled="email.email_enable == 'off'" id="system-email-email_smtp_port"></el-input>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
2021-04-21 13:05:27 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.email.timeout')" prop="email_timeout">
|
|
|
|
|
|
<el-input v-model.number="email.email_timeout" >
|
|
|
|
|
|
<template slot="append"><span >{{$t('config.system.basic.second')}}</span></template>
|
|
|
|
|
|
</el-input>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
2021-04-21 13:05:27 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.email.smtpAccount')" prop="email_auth_account">
|
|
|
|
|
|
<el-input v-model="email.email_auth_account" :disabled="email.email_enable == 'off'" id="system-email-email_smtp_account"> autocomplete="off"</el-input>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
2021-04-21 13:05:27 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.email.smtpPwd')" class="has-tip" prop="email_auth_password">
|
|
|
|
|
|
<el-input v-model="email.email_auth_password" type="password" :show-password="false" :disabled="email.email_enable == 'off'" autocomplete="off" id="system-email-email_smtp_password"></el-input>
|
2021-03-03 12:37:11 +08:00
|
|
|
|
<div class="el-form-item__tip">{{$t("config.system.email.pwdTip")}}</div>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
2021-03-03 12:37:11 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.email.sendAccount')" class="has-tip" prop="email_send_account">
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<el-input v-model="email.email_send_account" :disabled="email.email_enable == 'off'" id="system-email-email_send_account"></el-input>
|
2021-03-03 12:37:11 +08:00
|
|
|
|
<div class="el-form-item__tip">{{$t("config.system.email.sendAccountTip")}}</div>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
2021-03-03 12:37:11 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.email.testAccount')" class="has-tip" prop="email_test_reciver">
|
2021-04-21 13:05:27 +08:00
|
|
|
|
<el-input v-model="email.email_test_account" :disabled="email.email_enable == 'off'" id="system-email-email_test_reciver"></el-input>
|
2021-03-03 12:37:11 +08:00
|
|
|
|
<div class="el-form-item__tip">{{$t("config.system.email.testAccountTip")}}</div>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
2021-04-21 13:05:27 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.email.securityType')" prop="email_security_type">
|
|
|
|
|
|
<el-select v-model="email.email_security_type" :disabled="email.email_enable == 'off'">
|
|
|
|
|
|
<el-option label="None" value="NONE"></el-option>
|
|
|
|
|
|
<el-option label="SSL" value="SSL"></el-option>
|
|
|
|
|
|
<el-option label="TLS" value="TLS"></el-option>
|
|
|
|
|
|
</el-select>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
2021-03-03 12:37:11 +08:00
|
|
|
|
<el-form-item style="padding-top: 20px;">
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<button id="system-email-reset" @click="resetForm('emailForm','email')" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" type="button">{{$t('overall.reset')}}</button>
|
|
|
|
|
|
<button id="system-email-test" :class="{'nz-btn-disabled':email.email_enable == 'off','nz-btn-disabled':prevent_opt.save}" :disabled="email.email_enable == 'off' || prevent_opt.save" @click="testSetInfo('email','emailForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" type="button">{{$t('config.system.email.testConnection')}}</button>
|
|
|
|
|
|
<button id="system-email-save" @click="saveSetInfo('email','emailForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" type="button" v-has="'system_email_save'" :disabled="prevent_opt.save" :class="{'nz-btn-disabled':prevent_opt.save}">{{$t('overall.submit')}}</button>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
2020-03-30 21:09:34 +08:00
|
|
|
|
</div>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-tab-pane>
|
|
|
|
|
|
<el-tab-pane :label="$t('config.system.terminal.terminal')" name="terminal">
|
2021-04-21 13:05:27 +08:00
|
|
|
|
<div class="system-config-form terminal" v-if="activeTab === 'terminal'">
|
2020-08-02 22:43:53 +08:00
|
|
|
|
<el-form :model="terminal" label-width="180px" size="small" ref="terminalForm" :rules="terminalRules">
|
2021-04-21 13:05:27 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.terminal.timeout')" prop="terminal_timeout">
|
2021-04-21 18:24:25 +08:00
|
|
|
|
<el-input v-model="terminal.terminal_timeout" controls-position="right" :min="1" id="system-terminal-max_terminal_num">
|
|
|
|
|
|
<template slot="append"><span >{{$t('config.system.basic.second')}}</span></template>
|
|
|
|
|
|
</el-input>
|
2021-04-21 13:05:27 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item :label="$t('config.system.terminal.userTip')" prop="terminal_telnet_user_tip">
|
|
|
|
|
|
<el-input id="system-terminal-user-tip" v-model="terminal.terminal_telnet_user_tip"></el-input>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item :label="$t('config.system.terminal.pinTip')" prop="terminal_telnet_pin_tip">
|
|
|
|
|
|
<el-input id="system-terminal_telnet_pin_tip" v-model="terminal.terminal_telnet_pin_tip"></el-input>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item :label="$t('config.system.terminal.localRetention')" prop="terminal_record_local_retention">
|
2021-04-21 18:24:25 +08:00
|
|
|
|
<el-input v-model="terminal.terminal_record_local_retention" controls-position="right" :min="1" id="system-terminal_record_local_retention">
|
|
|
|
|
|
<template slot="append"><span >{{$t('config.system.basic.day')}}</span></template>
|
|
|
|
|
|
</el-input>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item>
|
2020-12-21 14:16:13 +08:00
|
|
|
|
<button @click="saveSetInfo('terminal','terminalForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" type="button" v-has="'system_terminal_save'" :disabled="prevent_opt.save" :class="{'nz-btn-disabled':prevent_opt.save}">{{$t('overall.submit')}}</button>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
2020-04-01 20:47:19 +08:00
|
|
|
|
</div>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-tab-pane>
|
|
|
|
|
|
<el-tab-pane :label="$t('config.system.ldap.ldap')" name="ldap">
|
2021-04-21 13:05:27 +08:00
|
|
|
|
<div class="system-config-form" v-if="activeTab === 'ldap'">
|
2020-08-02 22:43:53 +08:00
|
|
|
|
<el-form :model="ldap" label-width="180px" size="small" ref="ldapForm" :rules="ldap.ldap_enable == 'on'?ldapRules:{}" :validate-on-rule-change="false">
|
|
|
|
|
|
<el-form-item :label="$t('config.system.ldap.active')" prop="ldap_enable">
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<el-checkbox v-model="ldap.ldap_enable" true-label='on' false-label='off' @change="switchChange('ldapForm')" id="system-ldap-ldap_enable"></el-checkbox>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item :label="$t('config.system.ldap.address')" prop="ldap_address">
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<el-input v-model="ldap.ldap_address" id="system-ldap-ldap_address"></el-input>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item :label="$t('config.system.ldap.dn')" prop="ldap_dn">
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<el-input v-model="ldap.ldap_dn" id="system-ldap-ldap_dn"></el-input>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
2021-01-05 11:54:33 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.ldap.pwd')" prop="ldap_password">
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<el-input v-model="ldap.ldap_password" type="password" id="system-ldap-ldap_password"></el-input>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
2021-03-01 16:10:05 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.ldap.ou')" class="has-tip" prop="ldap_ou">
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<el-input v-model="ldap.ldap_ou" id="system-ldap-ldap_ou"></el-input>
|
2021-03-01 16:10:05 +08:00
|
|
|
|
<div class="el-form-item__tip">{{$t("config.system.ldap.ouTip")}}</div>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
2021-03-01 16:10:05 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.ldap.filter')" class="has-tip" prop="ldap_user_filter">
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<el-input v-model="ldap.ldap_user_filter" id="system-ldap-ldap_user_filter"></el-input>
|
2021-03-01 16:10:05 +08:00
|
|
|
|
<div class="el-form-item__tip">{{$t("config.system.ldap.filterTip")}}</div>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
2021-03-01 16:10:05 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.ldap.map')" class="has-tip--two-row" prop="ldap_mapping">
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<el-input v-model="ldap.ldap_mapping" id="system-ldap-ldap_mapping"></el-input>
|
2021-03-01 16:10:05 +08:00
|
|
|
|
<!--借用错误提示的样式-->
|
|
|
|
|
|
<div class="el-form-item__tip el-form-item__tip--two-row">{{$t("config.system.ldap.mapTip")}}</div>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
2021-04-21 18:24:25 +08:00
|
|
|
|
<el-form-item :label="$t('config.system.ldap.timeout')" prop="ldap_timeout">
|
|
|
|
|
|
<el-input v-model.number="ldap.ldap_timeout" >
|
|
|
|
|
|
<template slot="append"><span >{{$t('config.system.basic.second')}}</span></template>
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
</el-form-item>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
<el-form-item>
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<button id='system-ldap-reset' @click="resetForm('ldapForm','ldap')" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" type="button">{{$t('overall.reset')}}</button>
|
|
|
|
|
|
<button id='system-ldap-test' @click="testSetInfo('ldap','ldapForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" type="button" :disabled="prevent_opt.save" :class="{'nz-btn-disabled':prevent_opt.save}">{{$t('config.system.email.testConnection')}}</button>
|
|
|
|
|
|
<button id='system-ldap-save' @click="saveSetInfo('ldap','ldapForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" type="button" v-has="'system_ldap_save'" :disabled="prevent_opt.save" :class="{'nz-btn-disabled':prevent_opt.save}">{{$t('overall.submit')}}</button>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
2020-04-08 22:31:07 +08:00
|
|
|
|
</div>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-tab-pane>
|
2021-04-16 21:10:31 +08:00
|
|
|
|
<el-tab-pane :label="$t('config.system.notification.notification')" name="notification" style="height: 100%;"><!--$t('config.system.reset.reset')-->
|
|
|
|
|
|
<notify-method v-if="activeTab === 'notification'"></notify-method>
|
2020-11-21 17:56:33 +08:00
|
|
|
|
</el-tab-pane>
|
2021-04-16 21:10:31 +08:00
|
|
|
|
<el-tab-pane :label="$t('config.system.link.link')" name="link" style="height: 100%;"><!--$t('config.system.reset.reset')-->
|
|
|
|
|
|
<link-tab v-if="activeTab === 'link'"></link-tab>
|
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
|
<el-tab-pane :label="$t('config.system.apiKey.apiKey')" name="apiKey" style="height: 100%;"><!--$t('config.system.reset.reset')-->
|
|
|
|
|
|
<api-key-tab v-if="activeTab === 'apiKey'"></api-key-tab>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-tab-pane>
|
|
|
|
|
|
<el-tab-pane :label="$t('config.system.reset.reset')" name="reset">
|
2021-04-21 13:05:27 +08:00
|
|
|
|
<div class="system-config-form" v-if="activeTab === 'reset'">
|
2021-04-21 18:24:25 +08:00
|
|
|
|
<el-form :model="reset" label-width="180px" size="small" ref="resetForm" :rules="resetRules" :validate-on-rule-change="false" class="reset-form">
|
2021-04-21 13:05:27 +08:00
|
|
|
|
<el-form-item prop="type" :label="$t('config.system.reset.type')">
|
|
|
|
|
|
<!-- <div class="el-checkbox-group">-->
|
|
|
|
|
|
<!-- <div v-for="(item,index) in resetOptions" :key="item.value+index" >-->
|
|
|
|
|
|
<!-- <label class="el-checkbox sys-reset-label" :for="item.value" >-->
|
|
|
|
|
|
<!-- <span class="el-checkbox__label" style="width: 100px;text-align: right;margin-right: 10px">{{item.label}}</span>-->
|
|
|
|
|
|
<!-- <span class="el-checkbox__input">-->
|
|
|
|
|
|
<!-- <input type="checkbox" name="resetType" :value="item.value" class="el-checkbox__original" aria-hidden="true" :id="item.value" @change="resetCheckBoxChange"/>-->
|
|
|
|
|
|
<!-- <span class="el-checkbox__inner"></span>-->
|
|
|
|
|
|
<!-- </span>-->
|
|
|
|
|
|
<!-- </label>-->
|
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
|
<el-select v-model="reset.type" multiple>
|
|
|
|
|
|
<template v-for="item in resetOptions" >
|
|
|
|
|
|
<el-option :label="item.label" :value="item.value"></el-option>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item :label="$t('config.system.reset.pwd')" prop="password">
|
|
|
|
|
|
<el-input id="system-reset-password" v-model="reset.password" type="password"></el-input>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item>
|
2020-12-21 14:16:13 +08:00
|
|
|
|
<button @click="resetSys()" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" type="button" v-has="'system_reset_reset'" :disabled="prevent_opt.save" :class="{'nz-btn-disabled':prevent_opt.save}">{{$t('overall.reset')}}</button>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
|
</el-tabs>
|
2020-03-30 21:09:34 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2021-03-19 18:52:19 +08:00
|
|
|
|
import { positiveInteger, port, hostPlus, host, uSize } from '../../common/js/validate'
|
2021-03-31 11:10:04 +08:00
|
|
|
|
import latlngPicker from '../../common/latlngPicker'
|
2021-03-19 18:52:19 +08:00
|
|
|
|
import bus from '../../../libs/bus'
|
|
|
|
|
|
import draggable from 'vuedraggable'
|
2021-04-16 21:10:31 +08:00
|
|
|
|
import notifyMethod from './system/notifyMethodTab'
|
|
|
|
|
|
import linkTab from './system/linkTab'
|
|
|
|
|
|
import apiKeyTab from './system/apiKeyTab'
|
2021-03-19 18:52:19 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
name: 'system',
|
2021-04-16 21:10:31 +08:00
|
|
|
|
components: { draggable, latlngPicker, notifyMethod, linkTab, apiKeyTab },
|
2021-03-19 18:52:19 +08:00
|
|
|
|
data () {
|
|
|
|
|
|
return {
|
2021-04-21 13:05:27 +08:00
|
|
|
|
imageFormatErr:false,
|
2021-03-19 18:52:19 +08:00
|
|
|
|
basic: {
|
|
|
|
|
|
alert_api: '',
|
2021-04-21 13:05:27 +08:00
|
|
|
|
asset_ping_interval: '300', // 检查周期,单位:s
|
2021-03-19 18:52:19 +08:00
|
|
|
|
storage_local_retention: 15 * 24,
|
|
|
|
|
|
system_name: '',
|
2021-04-21 13:05:27 +08:00
|
|
|
|
system_logo:'',
|
2021-03-19 18:52:19 +08:00
|
|
|
|
current_site_url: '',
|
|
|
|
|
|
timezone: '',
|
|
|
|
|
|
default_cabinet_usize: '',
|
|
|
|
|
|
query_max_series: '',
|
|
|
|
|
|
unsaved_change: 'on',
|
2021-04-21 13:05:27 +08:00
|
|
|
|
default_scrape_interval:'60',
|
|
|
|
|
|
default_scrape_timeout:'30',
|
|
|
|
|
|
default_scrape_interval:'60',
|
|
|
|
|
|
snmp_trap_listen_port:162,
|
2021-03-22 10:25:41 +08:00
|
|
|
|
map_center_config: { longitude: 116.39, latitude: 39.9, zoom: 4, minZoom: 1, maxZoom: 10 }
|
2021-03-19 18:52:19 +08:00
|
|
|
|
},
|
|
|
|
|
|
basicCopy: null,
|
|
|
|
|
|
basicRules: {
|
|
|
|
|
|
system_name: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
|
|
|
|
|
alert_api: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }, { validator: host, trigger: 'blur' }],
|
|
|
|
|
|
asset_ping_interval: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }, { validator: positiveInteger, trigger: 'blur' }],
|
2021-04-21 13:05:27 +08:00
|
|
|
|
default_scrape_interval: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }, { validator: positiveInteger, trigger: 'blur' }],
|
|
|
|
|
|
default_scrape_timeout: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }, { validator: positiveInteger, trigger: 'blur' }],
|
2021-03-19 18:52:19 +08:00
|
|
|
|
storage_local_retention: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }, { validator: positiveInteger, trigger: 'blur' }],
|
2021-04-21 13:05:27 +08:00
|
|
|
|
snmp_trap_listen_port: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }, { validator: port, trigger: 'blur' }],
|
2021-03-19 18:52:19 +08:00
|
|
|
|
timezone: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
|
|
|
|
|
default_cabinet_usize: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }, { validator: positiveInteger, trigger: 'blur' }, { validator: uSize, trigger: 'blur' }],
|
|
|
|
|
|
query_max_series: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }]
|
|
|
|
|
|
},
|
2021-04-21 13:05:27 +08:00
|
|
|
|
timezoneOption: [],
|
2021-03-19 18:52:19 +08:00
|
|
|
|
email: {
|
|
|
|
|
|
email_enable: 'on',
|
2021-04-21 13:05:27 +08:00
|
|
|
|
email_host: '',
|
|
|
|
|
|
email_port: 25,
|
|
|
|
|
|
email_timeout:10,
|
|
|
|
|
|
email_auth_account: '',
|
|
|
|
|
|
email_auth_password: '',
|
2021-03-19 18:52:19 +08:00
|
|
|
|
email_send_account: '',
|
2021-04-21 13:05:27 +08:00
|
|
|
|
email_test_account: '',
|
|
|
|
|
|
email_security_type: 'NONE'
|
2021-03-19 18:52:19 +08:00
|
|
|
|
},
|
|
|
|
|
|
emailCopy: null,
|
|
|
|
|
|
emailRules: {
|
2021-04-21 13:05:27 +08:00
|
|
|
|
email_host: [
|
2021-04-21 18:24:25 +08:00
|
|
|
|
// { required: true, message: this.$t('validate.required'), trigger: 'blur' },
|
2021-03-19 18:52:19 +08:00
|
|
|
|
{ validator: hostPlus, trigger: 'blur' }
|
|
|
|
|
|
],
|
2021-04-21 13:05:27 +08:00
|
|
|
|
email_port: [
|
2021-03-19 18:52:19 +08:00
|
|
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' },
|
|
|
|
|
|
{ validator: port, trigger: 'blur' }
|
|
|
|
|
|
],
|
2021-04-21 13:05:27 +08:00
|
|
|
|
email_auth_account: [
|
2021-03-19 18:52:19 +08:00
|
|
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' },
|
|
|
|
|
|
{ type: 'email', message: this.$t('validate.email'), trigger: 'blur' }
|
|
|
|
|
|
],
|
|
|
|
|
|
email_send_account: [{ type: 'email', message: this.$t('validate.email'), trigger: 'blur' }],
|
2021-04-21 13:05:27 +08:00
|
|
|
|
email_test_account: [{ type: 'email', message: this.$t('validate.email'), trigger: 'blur' }]
|
2021-03-19 18:52:19 +08:00
|
|
|
|
},
|
|
|
|
|
|
terminal: {
|
2021-04-21 13:05:27 +08:00
|
|
|
|
terminal_timeout: 30,
|
|
|
|
|
|
terminal_telnet_user_tip:'ogin:',
|
|
|
|
|
|
terminal_telnet_pin_tip:'assword:',
|
|
|
|
|
|
terminal_record_local_retention:365,
|
2021-03-19 18:52:19 +08:00
|
|
|
|
},
|
|
|
|
|
|
terminalCopy: null,
|
|
|
|
|
|
terminalRules: {
|
|
|
|
|
|
max_terminal_num: [
|
|
|
|
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' },
|
|
|
|
|
|
{ validator: positiveInteger, trigger: 'blur' }
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
ldap: {
|
|
|
|
|
|
ldap_address: '',
|
|
|
|
|
|
ldap_dn: '',
|
|
|
|
|
|
ldap_password: '',
|
|
|
|
|
|
ldap_ou: '',
|
|
|
|
|
|
ldap_user_filter: '',
|
|
|
|
|
|
ldap_mapping: '',
|
2021-04-21 18:24:25 +08:00
|
|
|
|
ldap_enable: 'off',
|
|
|
|
|
|
ldap_timeout:'',
|
2021-03-19 18:52:19 +08:00
|
|
|
|
},
|
|
|
|
|
|
ldapCopy: null,
|
|
|
|
|
|
ldapRules: {
|
|
|
|
|
|
ldap_address: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
|
|
|
|
|
ldap_user_filter: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
|
|
|
|
|
ldap_mapping: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }]
|
|
|
|
|
|
},
|
|
|
|
|
|
reset: {
|
|
|
|
|
|
type: [],
|
|
|
|
|
|
password: ''
|
|
|
|
|
|
},
|
|
|
|
|
|
linkTemp: {
|
|
|
|
|
|
name: '', url: ''
|
|
|
|
|
|
},
|
|
|
|
|
|
link: [],
|
|
|
|
|
|
linkReserved: [],
|
|
|
|
|
|
linkRules: {
|
|
|
|
|
|
name: [
|
|
|
|
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' },
|
|
|
|
|
|
{ max: 64, message: this.$t('config.system.link.nameMaxLength'), trigger: 'blur' }
|
|
|
|
|
|
],
|
|
|
|
|
|
url: [
|
|
|
|
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
|
|
|
|
|
// { type: 'url', message: this.$t('config.system.link.uriRequired'), trigger: 'blur' } /*检验网址是否正确*/
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
notificationRules: {
|
|
|
|
|
|
name: [
|
|
|
|
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' },
|
|
|
|
|
|
{ max: 64, message: this.$t('config.system.link.nameMaxLength'), trigger: 'blur' }
|
|
|
|
|
|
],
|
|
|
|
|
|
filePath: [
|
|
|
|
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' },
|
|
|
|
|
|
{ pattern: /^\/(.*\.*.+\/?)+$/, message: this.$t('config.system.notification.filePathReg') }
|
|
|
|
|
|
// { type: 'url', message: this.$t('config.system.link.uriRequired'), trigger: 'blur' } /*检验网址是否正确*/
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
resetRules: {
|
|
|
|
|
|
type: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
|
|
|
|
|
password: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }]
|
|
|
|
|
|
},
|
|
|
|
|
|
resetOptions: [
|
|
|
|
|
|
{
|
|
|
|
|
|
label: this.$t('config.system.reset.metric'),
|
|
|
|
|
|
value: 'metric'
|
2020-03-30 21:09:34 +08:00
|
|
|
|
},
|
2021-03-19 18:52:19 +08:00
|
|
|
|
{
|
|
|
|
|
|
label: this.$t('config.system.reset.alert'),
|
|
|
|
|
|
value: 'alert'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: this.$t('config.system.reset.sysConfig'),
|
|
|
|
|
|
value: 'sysconfig'
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2021-04-21 13:05:27 +08:00
|
|
|
|
activeTab: 'basic'
|
2021-03-19 18:52:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
selectTab: function (tab) {
|
|
|
|
|
|
this.querySetInfo(tab.name)
|
|
|
|
|
|
},
|
2021-04-21 13:05:27 +08:00
|
|
|
|
queryTimezone:function(){
|
|
|
|
|
|
this.$get("/sys/timezone").then(response=>{
|
|
|
|
|
|
if(response.code == 200){
|
|
|
|
|
|
this.timezoneOption = response.data.list;
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2021-03-19 18:52:19 +08:00
|
|
|
|
querySetInfo: function (type) { // 切换tab
|
|
|
|
|
|
if (!type) {
|
|
|
|
|
|
console.error('type is required')
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
2021-04-16 21:10:31 +08:00
|
|
|
|
if (type == 'reset' || type == 'link' || type == 'notification' || type == 'apiKey') {
|
2021-03-19 18:52:19 +08:00
|
|
|
|
return
|
|
|
|
|
|
}
|
2021-04-21 13:05:27 +08:00
|
|
|
|
this.$get('/sys/config/' + type).then(response => {
|
2021-03-19 18:52:19 +08:00
|
|
|
|
if (response.code == 200) {
|
2021-04-21 13:05:27 +08:00
|
|
|
|
for (let key in response.data){
|
|
|
|
|
|
this[type][key] = response.data[key]
|
2021-03-19 18:52:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
if (type == 'basic') {
|
|
|
|
|
|
localStorage.setItem('nz-sys-name', this.basic.system_name)
|
|
|
|
|
|
localStorage.setItem('nz-sys-timezone', this.basic.timezone)
|
2021-04-21 13:05:27 +08:00
|
|
|
|
localStorage.setItem('nz-sys-logo', this.basic.system_logo)
|
2021-03-19 18:52:19 +08:00
|
|
|
|
localStorage.setItem('nz-sys-default-cabinet-usize', this.basic.default_cabinet_usize)
|
2021-04-21 13:05:27 +08:00
|
|
|
|
localStorage.setItem('nz-unsaved-change', this.basic.unsaved_change)
|
2021-03-19 18:52:19 +08:00
|
|
|
|
this.basic.map_center_config = JSON.parse(this.basic.map_center_config)
|
|
|
|
|
|
} else if (type == 'terminal') {
|
2021-04-21 13:05:27 +08:00
|
|
|
|
localStorage.setItem('nz-sys-terminal-timeout', this.terminal.terminal_timeout)
|
|
|
|
|
|
localStorage.setItem('nz-sys-terminal-telnet-user-tip', this.terminal.terminal_telnet_user_tip)
|
|
|
|
|
|
localStorage.setItem('nz-sys-terminal-telnet-pin-tip', this.terminal.terminal_telnet_pin_tip)
|
|
|
|
|
|
localStorage.setItem('nz-sys-terminal-record-local-retention', this.terminal.terminal_record_local_retention)
|
2021-03-19 18:52:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
if (type == 'email') {
|
|
|
|
|
|
this.$refs.emailForm.clearValidate()
|
|
|
|
|
|
}
|
|
|
|
|
|
this[type + 'Copy'] = Object.assign({}, this[type])
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
saveSetInfo: function (type, formName) {
|
|
|
|
|
|
if (this.prevent_opt.save) { return } ;
|
|
|
|
|
|
this.prevent_opt.save = true
|
|
|
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
|
|
|
if (valid) {
|
2021-04-21 13:05:27 +08:00
|
|
|
|
const param = Object.assign({}, this[type])
|
|
|
|
|
|
|
2021-03-22 10:25:41 +08:00
|
|
|
|
if (type == 'basic') {
|
2021-04-21 13:05:27 +08:00
|
|
|
|
let mapConfig = this.$refs.latlngPicker.getAttribute()
|
|
|
|
|
|
param.map_center_config = JSON.stringify(mapConfig)
|
2021-03-19 18:52:19 +08:00
|
|
|
|
}
|
2021-03-22 10:25:41 +08:00
|
|
|
|
const postParam = Object.assign({}, param)
|
|
|
|
|
|
for (const key in postParam[type]) {
|
2021-03-19 18:52:19 +08:00
|
|
|
|
postParam[type][key] = postParam[type][key] + ''
|
|
|
|
|
|
}
|
2021-04-21 13:05:27 +08:00
|
|
|
|
this.$put('/sys/config/'+type, postParam).then(response => {
|
2021-03-19 18:52:19 +08:00
|
|
|
|
this.prevent_opt.save = false
|
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
|
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') })
|
|
|
|
|
|
// this.resetForm(formName);
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
this.querySetInfo(type)
|
|
|
|
|
|
}, 200)
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$message.error(response.msg)
|
2020-07-03 17:28:02 +08:00
|
|
|
|
}
|
2021-03-19 18:52:19 +08:00
|
|
|
|
})
|
|
|
|
|
|
} else {
|
2021-04-21 13:05:27 +08:00
|
|
|
|
this.prevent_opt.save = false
|
2021-03-19 18:52:19 +08:00
|
|
|
|
return false
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
testSetInfo: function (type, formName) {
|
|
|
|
|
|
if (this.prevent_opt.save) { return } ;
|
|
|
|
|
|
this.prevent_opt.save = true
|
|
|
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
|
|
|
if (valid) {
|
2021-04-21 13:05:27 +08:00
|
|
|
|
const param = Object.assign({}, this[type])
|
|
|
|
|
|
|
2021-04-21 18:24:25 +08:00
|
|
|
|
param[type+'_test']=true
|
2021-04-21 13:05:27 +08:00
|
|
|
|
const postParam = Object.assign({}, param)
|
|
|
|
|
|
this.$put('/sys/config/'+type, postParam).then(response => {
|
2021-03-19 18:52:19 +08:00
|
|
|
|
this.prevent_opt.save = false
|
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
|
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.testSuccess') })
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$message.error(response.msg)
|
2020-11-19 18:20:31 +08:00
|
|
|
|
}
|
2021-03-19 18:52:19 +08:00
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.prevent_opt.save = false
|
|
|
|
|
|
return false
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2021-03-19 12:40:12 +08:00
|
|
|
|
|
2021-03-19 18:52:19 +08:00
|
|
|
|
resetForm (formName, type) {
|
|
|
|
|
|
this.$refs[formName].resetFields()
|
|
|
|
|
|
this[type] = Object.assign({}, this[type + 'Copy'])
|
|
|
|
|
|
},
|
|
|
|
|
|
switchChange: function (formName) {
|
|
|
|
|
|
const $temp = this
|
|
|
|
|
|
$temp.$refs[formName].clearValidate()
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
$temp.$refs[formName].validate()
|
|
|
|
|
|
}, 100)
|
|
|
|
|
|
},
|
|
|
|
|
|
resetCheckBoxChange: function (e) {
|
|
|
|
|
|
if (e.target.checked == true) {
|
|
|
|
|
|
this.reset.type.push(e.target.value)
|
|
|
|
|
|
} else {
|
|
|
|
|
|
const index = this.reset.type.indexOf(e.target.value)
|
|
|
|
|
|
this.reset.type.splice(index, 1)
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
jumpTo (data, id) {
|
|
|
|
|
|
bus.$emit('menu-change', data)
|
|
|
|
|
|
this.$router.push({
|
|
|
|
|
|
path: '/' + data,
|
|
|
|
|
|
query: {
|
|
|
|
|
|
t: +new Date()
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
// link 移动
|
|
|
|
|
|
change: function (evt) {
|
|
|
|
|
|
// console.log(evt)
|
|
|
|
|
|
},
|
|
|
|
|
|
// start ,end ,add,update, sort, remove 得到的都差不多
|
|
|
|
|
|
start: function (evt) {
|
|
|
|
|
|
// console.log(evt)
|
|
|
|
|
|
},
|
|
|
|
|
|
notificationEnd: function (evt) {
|
|
|
|
|
|
const length = this.notification.length
|
|
|
|
|
|
if (evt.newIndex == evt.oldIndex) { // 如果没有移动返回
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
const parmas = {
|
|
|
|
|
|
id: this.notification[evt.newIndex].id,
|
|
|
|
|
|
prev: 0,
|
|
|
|
|
|
next: -1
|
|
|
|
|
|
}
|
|
|
|
|
|
if (evt.newIndex == length - 1) {
|
|
|
|
|
|
parmas.prev = this.notification[evt.newIndex - 1].id
|
|
|
|
|
|
} else if (evt.newIndex == 0) {
|
|
|
|
|
|
parmas.next = this.notification[evt.newIndex + 1].id
|
|
|
|
|
|
} else {
|
|
|
|
|
|
parmas.prev = this.notification[evt.newIndex - 1].id
|
|
|
|
|
|
parmas.next = this.notification[evt.newIndex + 1].id
|
|
|
|
|
|
}
|
|
|
|
|
|
this.$put('/alert/script/modify', parmas).then((response) => {
|
|
|
|
|
|
// this.$store.commit('setLinkData',this.link);
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
end: function (evt) {
|
|
|
|
|
|
const length = this.link.length
|
|
|
|
|
|
if (evt.newIndex == evt.oldIndex) { // 如果没有移动返回
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
const parmas = {
|
|
|
|
|
|
id: this.link[evt.newIndex].id,
|
|
|
|
|
|
prev: 0,
|
|
|
|
|
|
next: -1
|
|
|
|
|
|
}
|
|
|
|
|
|
if (evt.newIndex == length - 1) {
|
|
|
|
|
|
parmas.prev = this.link[evt.newIndex - 1].id
|
|
|
|
|
|
} else if (evt.newIndex == 0) {
|
|
|
|
|
|
parmas.next = this.link[evt.newIndex + 1].id
|
|
|
|
|
|
} else {
|
|
|
|
|
|
parmas.prev = this.link[evt.newIndex - 1].id
|
|
|
|
|
|
parmas.next = this.link[evt.newIndex + 1].id
|
|
|
|
|
|
}
|
|
|
|
|
|
this.$put('/link/modify', parmas).then((response) => {
|
|
|
|
|
|
this.$store.commit('setLinkData', this.link)
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
move: function (evt, originalEvent) {
|
|
|
|
|
|
// console.log(evt)
|
|
|
|
|
|
// console.log(originalEvent) //鼠标位置
|
|
|
|
|
|
},
|
|
|
|
|
|
getLinkData () {
|
2021-04-16 21:10:31 +08:00
|
|
|
|
|
2021-03-19 18:52:19 +08:00
|
|
|
|
},
|
|
|
|
|
|
// link add
|
|
|
|
|
|
linkAdd () {
|
|
|
|
|
|
if (this.prevent_opt.save) { return } ;
|
|
|
|
|
|
this.prevent_opt.save = true
|
|
|
|
|
|
this.$refs.linkTempForm.validate((valid) => {
|
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
this.$post('/link', this.linkTemp).then(response => { // 新增link
|
|
|
|
|
|
this.prevent_opt.save = false
|
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
|
this.linkTemp = { name: '', url: '' }
|
|
|
|
|
|
this.linkAddCallBack()
|
|
|
|
|
|
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.addSuccess') })
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$message.error(response.msg)
|
2020-11-19 18:20:31 +08:00
|
|
|
|
}
|
2021-03-19 18:52:19 +08:00
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.prevent_opt.save = false
|
|
|
|
|
|
return false
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
linkAddCallBack () {
|
|
|
|
|
|
this.$get('/link').then(response => {
|
|
|
|
|
|
this.link.push(response.data[response.data.length - 1])
|
|
|
|
|
|
this.linkReserved.push(response.data[response.data.length - 1])
|
|
|
|
|
|
this.$store.commit('setLinkData', this.link)
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
// link edit
|
|
|
|
|
|
linkEdit (item) {
|
|
|
|
|
|
const index = this.link.findIndex((item1) => item.id == item1.id)
|
|
|
|
|
|
this.$set(this.link, index, { ...this.link[index], isEdit: true })
|
|
|
|
|
|
},
|
|
|
|
|
|
// link update
|
|
|
|
|
|
linkUpdate (item) {
|
|
|
|
|
|
if (this.prevent_opt.save) { return } ;
|
|
|
|
|
|
this.prevent_opt.save = true
|
|
|
|
|
|
this.$refs['linkForm' + item.id][0].validate((valid) => {
|
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
const params = {
|
|
|
|
|
|
id: item.id,
|
|
|
|
|
|
name: item.name,
|
|
|
|
|
|
url: item.url
|
|
|
|
|
|
}
|
|
|
|
|
|
this.$put('/link', params).then(response => {
|
|
|
|
|
|
this.prevent_opt.save = false
|
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
|
const index = this.link.findIndex((item1) => item.id == item1.id)
|
|
|
|
|
|
this.$set(this.link, index, { ...this.link[index], isEdit: false })
|
|
|
|
|
|
this.linkReserved = [...this.link]
|
|
|
|
|
|
this.$store.commit('setLinkData', this.link)
|
|
|
|
|
|
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') })
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$message.error(response.msg)
|
2020-07-07 09:47:32 +08:00
|
|
|
|
}
|
2021-03-19 18:52:19 +08:00
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.prevent_opt.save = false
|
|
|
|
|
|
return false
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
// link cancel
|
|
|
|
|
|
linkCancel (item) {
|
|
|
|
|
|
const index = this.link.findIndex((item1) => item.id == item1.id)
|
|
|
|
|
|
const indexReserved = this.linkReserved.findIndex((item1) => item.id == item1.id)
|
|
|
|
|
|
this.$set(this.link, index, { ...this.linkReserved[indexReserved], isEdit: false })
|
|
|
|
|
|
},
|
|
|
|
|
|
// link del
|
|
|
|
|
|
linkDel (item) {
|
|
|
|
|
|
if (this.prevent_opt.query) { return } ;
|
|
|
|
|
|
this.prevent_opt.query = true
|
|
|
|
|
|
this.$delete('/link?ids=' + item.id).then((response) => {
|
|
|
|
|
|
this.prevent_opt.query = false
|
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
|
this.link = this.link.filter((item1) => item.id !== item1.id)
|
|
|
|
|
|
this.linkReserved = this.linkReserved.filter((item1) => item.id !== item1.id)
|
|
|
|
|
|
this.$store.commit('setLinkData', this.link)
|
|
|
|
|
|
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.deleteSuccess') })
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$message.error(response.msg)
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
getNotificationData () {
|
2021-04-16 21:10:31 +08:00
|
|
|
|
|
2021-03-19 18:52:19 +08:00
|
|
|
|
},
|
|
|
|
|
|
// link add
|
|
|
|
|
|
notificationAdd () {
|
|
|
|
|
|
if (this.prevent_opt.save) { return } ;
|
|
|
|
|
|
this.prevent_opt.save = true
|
|
|
|
|
|
this.$refs.notificationTempForm.validate((valid) => {
|
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
this.$post('/alert/script', this.notificationTemp).then(response => { // 新增notification
|
|
|
|
|
|
this.prevent_opt.save = false
|
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
|
this.notificationTemp = { name: '', filePath: '' }
|
|
|
|
|
|
this.notificationAddCallBack()
|
|
|
|
|
|
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.addSuccess') })
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$message.error(response.msg)
|
2020-07-07 09:47:32 +08:00
|
|
|
|
}
|
2021-03-19 18:52:19 +08:00
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.prevent_opt.save = false
|
|
|
|
|
|
return false
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
notificationAddCallBack () {
|
|
|
|
|
|
this.$get('/alert/script').then(response => {
|
|
|
|
|
|
this.notification.push(response.data.list[response.data.list.length - 1])
|
|
|
|
|
|
this.notificationReserved.push(response.data.list[response.data.list.length - 1])
|
|
|
|
|
|
// this.$store.commit('setLinkData',this.link);
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
// link edit
|
|
|
|
|
|
notificationEdit (item) {
|
2021-03-22 10:25:41 +08:00
|
|
|
|
const index = this.notification.findIndex((item1) => item.id == item1.id)
|
2021-03-19 18:52:19 +08:00
|
|
|
|
this.$set(this.notification, index, { ...this.notification[index], isEdit: true })
|
|
|
|
|
|
},
|
|
|
|
|
|
// link update
|
|
|
|
|
|
notificationUpdate (item) {
|
|
|
|
|
|
if (this.prevent_opt.save) { return } ;
|
|
|
|
|
|
this.prevent_opt.save = true
|
|
|
|
|
|
this.$refs['notificationForm' + item.id][0].validate((valid) => {
|
|
|
|
|
|
if (valid) {
|
2021-03-22 10:25:41 +08:00
|
|
|
|
const params = {
|
2021-03-19 18:52:19 +08:00
|
|
|
|
id: item.id,
|
|
|
|
|
|
name: item.name,
|
|
|
|
|
|
filePath: item.filePath
|
|
|
|
|
|
}
|
|
|
|
|
|
this.$put('/alert/script', params).then(response => {
|
|
|
|
|
|
this.prevent_opt.save = false
|
|
|
|
|
|
if (response.code == 200) {
|
2021-03-22 10:25:41 +08:00
|
|
|
|
const index = this.notification.findIndex((item1) => item.id == item1.id)
|
2021-03-19 18:52:19 +08:00
|
|
|
|
this.$set(this.notification, index, { ...this.notification[index], isEdit: false })
|
|
|
|
|
|
this.notificationReserved = [...this.notification]
|
|
|
|
|
|
// this.$store.commit('setLinkData',this.notification);
|
|
|
|
|
|
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') })
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$message.error(response.msg)
|
2020-07-07 09:47:32 +08:00
|
|
|
|
}
|
2021-03-19 18:52:19 +08:00
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.prevent_opt.save = false
|
|
|
|
|
|
return false
|
2020-03-30 21:09:34 +08:00
|
|
|
|
}
|
2021-03-19 18:52:19 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
// link cancel
|
|
|
|
|
|
notificationCancel (item) {
|
2021-03-22 10:25:41 +08:00
|
|
|
|
const index = this.notification.findIndex((item1) => item.id == item1.id)
|
|
|
|
|
|
const indexReserved = this.notificationReserved.findIndex((item1) => item.id == item1.id)
|
2021-03-19 18:52:19 +08:00
|
|
|
|
this.$set(this.notification, index, { ...this.notificationReserved[indexReserved], isEdit: false })
|
|
|
|
|
|
},
|
|
|
|
|
|
// link del
|
|
|
|
|
|
notificationDel (item) {
|
|
|
|
|
|
if (this.prevent_opt.query) { return } ;
|
|
|
|
|
|
this.prevent_opt.query = true
|
|
|
|
|
|
this.$delete('/alert/script?ids=' + item.id).then((response) => {
|
|
|
|
|
|
this.prevent_opt.query = false
|
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
|
this.notification = this.notification.filter((item1) => item.id !== item1.id)
|
|
|
|
|
|
this.notificationReserved = this.notificationReserved.filter((item1) => item.id !== item1.id)
|
|
|
|
|
|
// this.$store.commit('setLinkData',this.link);
|
|
|
|
|
|
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.deleteSuccess') })
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$message.error(response.msg)
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
// openUrl 跳转页面
|
|
|
|
|
|
openUrl (item) {
|
|
|
|
|
|
// window.open(item.url)
|
2021-04-21 13:05:27 +08:00
|
|
|
|
},
|
|
|
|
|
|
handleLogoChange(file, fileList) {
|
|
|
|
|
|
const imageTypes = ['image/jpeg','image/jpg','image/png'];
|
|
|
|
|
|
console.log(file.raw.type)
|
|
|
|
|
|
const isImage = imageTypes.some(t=> file.raw.type === t);
|
|
|
|
|
|
const isLt2M = file.raw.size / 1024 / 1024 < 2;
|
|
|
|
|
|
|
|
|
|
|
|
this.imageFormatErr = (!isImage || !isLt2M)
|
|
|
|
|
|
|
|
|
|
|
|
if(isImage && isLt2M){
|
|
|
|
|
|
const self = this;
|
2021-04-21 18:24:25 +08:00
|
|
|
|
this.fileToBase64(file.raw).then(res=>{
|
2021-04-21 13:05:27 +08:00
|
|
|
|
self.basic.system_logo = res;
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2021-04-21 18:24:25 +08:00
|
|
|
|
fileToBase64:function(file) {
|
2021-04-21 13:05:27 +08:00
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
|
|
let reader = new FileReader();
|
|
|
|
|
|
reader.readAsDataURL(file);//转化二进制流,异步方法
|
|
|
|
|
|
let base64Str='';
|
|
|
|
|
|
reader.onload = function(){//完成后this.result为二进制流console.log(this.result);
|
|
|
|
|
|
base64Str = this.result;
|
|
|
|
|
|
resolve(base64Str);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
})
|
2021-04-21 18:24:25 +08:00
|
|
|
|
},
|
|
|
|
|
|
timezoneOptionHandler:function(offset){
|
|
|
|
|
|
let offsetHour = (offset/1000/60/60).toFixed(0)
|
|
|
|
|
|
|
|
|
|
|
|
let offsetMinute = offset%(1000*60*60)/(1000*60)
|
|
|
|
|
|
|
|
|
|
|
|
let hour = offsetHour>0?(offsetHour<9?'+0'+offsetHour:'+'+offsetHour):(offsetHour == 0?(offsetMinute==0?'':'+00'):(offsetHour>-10?'-0'+Math.abs(offsetHour):offsetHour))
|
|
|
|
|
|
|
2021-04-21 19:30:17 +08:00
|
|
|
|
let minute = offsetHour==0&&offsetMinute == 0?'':(offsetMinute==0?':00':(Math.abs(offsetMinute)>9?':'+Math.abs(offsetMinute):':0'+Math.abs(offsetMinute)))
|
2021-04-21 18:24:25 +08:00
|
|
|
|
|
|
|
|
|
|
return 'UTC'+hour+minute
|
2020-03-30 21:09:34 +08:00
|
|
|
|
}
|
2021-04-21 13:05:27 +08:00
|
|
|
|
},
|
2021-03-19 18:52:19 +08:00
|
|
|
|
mounted () {
|
2021-04-16 21:10:31 +08:00
|
|
|
|
this.querySetInfo(this.activeTab)
|
2021-04-21 13:05:27 +08:00
|
|
|
|
this.queryTimezone();
|
2021-03-19 18:52:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2020-03-30 21:09:34 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
2021-03-05 20:34:58 +08:00
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
.system {
|
2020-03-30 21:09:34 +08:00
|
|
|
|
height: 100%;
|
2020-08-27 17:05:10 +08:00
|
|
|
|
position: relative;
|
2021-03-05 20:34:58 +08:00
|
|
|
|
margin-top: 10px;
|
2020-03-30 21:09:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
.system-config-form{
|
|
|
|
|
|
width: 61.8% !important;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
}
|
2021-03-25 19:33:48 +08:00
|
|
|
|
|
2020-07-03 17:28:02 +08:00
|
|
|
|
.linkBox{
|
2020-08-27 17:05:10 +08:00
|
|
|
|
max-height: 800px;
|
2020-07-03 17:28:02 +08:00
|
|
|
|
width: 800px;
|
|
|
|
|
|
}
|
2020-07-07 09:47:32 +08:00
|
|
|
|
.scrollBox{
|
|
|
|
|
|
position: relative;
|
2020-08-06 16:13:04 +08:00
|
|
|
|
height: 600px;
|
2020-07-07 09:47:32 +08:00
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
|
}
|
2020-07-03 17:28:02 +08:00
|
|
|
|
.linkTitle{
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items:center;
|
|
|
|
|
|
border-bottom: 2px solid #dfe1e6;
|
|
|
|
|
|
color: #6b778c;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
height: 24px;
|
|
|
|
|
|
line-height: 24px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
}
|
|
|
|
|
|
.handle{
|
|
|
|
|
|
cursor: move !important;
|
|
|
|
|
|
padding:0 5px;
|
|
|
|
|
|
line-height: 34px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.linkBtn{
|
|
|
|
|
|
height: 28px;
|
|
|
|
|
|
line-height: 0px;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.linkTitleHandle{
|
|
|
|
|
|
padding: 0 13px;
|
|
|
|
|
|
}
|
2020-07-07 09:47:32 +08:00
|
|
|
|
.linkAddBox{
|
2020-07-03 17:28:02 +08:00
|
|
|
|
display: flex;
|
2020-07-07 09:47:32 +08:00
|
|
|
|
padding: 10px 0px;
|
2020-07-03 17:28:02 +08:00
|
|
|
|
border-bottom: 1px solid #dfe1e6;
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
line-height: 34px;
|
|
|
|
|
|
}
|
2020-07-07 09:47:32 +08:00
|
|
|
|
.linkContent{
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
padding: 10px 0px;
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
line-height: 34px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.linkContent:not(:last-child){
|
|
|
|
|
|
border-bottom: 1px solid #dfe1e6;
|
|
|
|
|
|
}
|
2020-07-03 17:28:02 +08:00
|
|
|
|
.linkFormContent{
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
line-height: 34px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.linkTitleName{
|
|
|
|
|
|
width: 100px;
|
|
|
|
|
|
margin-right: 12px;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
height: 31px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.linkTitleUrl{
|
2020-07-07 09:47:32 +08:00
|
|
|
|
width: 462px;
|
2020-07-03 17:28:02 +08:00
|
|
|
|
margin-right: 12px;
|
|
|
|
|
|
height: 31px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.linkTitleUrlContent{
|
|
|
|
|
|
display: inline-block;
|
2020-07-07 13:56:23 +08:00
|
|
|
|
width: 460px;
|
2020-07-03 17:28:02 +08:00
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
height: 31px;
|
2020-07-07 09:47:32 +08:00
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
outline: none;
|
|
|
|
|
|
}
|
2020-07-07 13:56:23 +08:00
|
|
|
|
.linkFormBtn .nz-icon-delete{
|
2020-07-07 13:43:33 +08:00
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
color: #ee6723;
|
2020-07-07 13:56:23 +08:00
|
|
|
|
margin-left: 10px;
|
2020-07-03 17:28:02 +08:00
|
|
|
|
}
|
2020-07-07 13:43:33 +08:00
|
|
|
|
/*.linkTitleUrlContent:hover{*/
|
|
|
|
|
|
/*text-decoration:underline;*/
|
|
|
|
|
|
/*}*/
|
2020-07-07 13:56:23 +08:00
|
|
|
|
.linkFormBtn .nz-icon-edit{
|
|
|
|
|
|
font-size: 14px;
|
2020-07-03 17:28:02 +08:00
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
2020-07-07 13:43:33 +08:00
|
|
|
|
.nz-icon-create-square{
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
color: #333333;
|
|
|
|
|
|
}
|
2020-07-07 09:47:32 +08:00
|
|
|
|
/deep/ .el-form-item--small .el-form-item__error{
|
|
|
|
|
|
padding-top: 0px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.linkUrlTip{
|
|
|
|
|
|
width: 430px;
|
|
|
|
|
|
}
|
2020-10-16 18:11:53 +08:00
|
|
|
|
.system-config-form.terminal /deep/ .el-input-number--small{
|
|
|
|
|
|
width: 512px;
|
|
|
|
|
|
}
|
2020-11-19 18:20:31 +08:00
|
|
|
|
.system-config-form.basicForm /deep/ .el-input-number--small{
|
|
|
|
|
|
width: 512px;
|
|
|
|
|
|
}
|
2020-10-16 18:11:53 +08:00
|
|
|
|
.system-config-form /deep/ .el-input input{
|
|
|
|
|
|
text-align: left;
|
|
|
|
|
|
}
|
2020-03-30 21:09:34 +08:00
|
|
|
|
</style>
|
2021-03-05 20:34:58 +08:00
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
.system {
|
2021-04-16 21:10:31 +08:00
|
|
|
|
background-color: #FFF;
|
|
|
|
|
|
padding: 10px;
|
|
|
|
|
|
.el-tabs__nav-scroll{
|
|
|
|
|
|
background-color: #FFFFFF;
|
|
|
|
|
|
}
|
|
|
|
|
|
.el-tabs__nav-scroll,.el-tabs__header,。el-tabs__nav-wrap{
|
|
|
|
|
|
border-bottom: 0;
|
2021-03-05 20:34:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
.el-form-item:last-of-type {
|
|
|
|
|
|
|
|
|
|
|
|
.el-form-item__content {
|
|
|
|
|
|
margin-left: 0 !important;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
.nz-btn {
|
|
|
|
|
|
margin: 0 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2021-04-16 21:10:31 +08:00
|
|
|
|
.full-table {
|
|
|
|
|
|
.el-tabs__content{
|
|
|
|
|
|
height: 90%;
|
|
|
|
|
|
}
|
|
|
|
|
|
.list-page .main-container{
|
|
|
|
|
|
padding: unset;
|
|
|
|
|
|
}
|
|
|
|
|
|
.table-column-setting,.pagination-bottom{
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2021-03-05 20:34:58 +08:00
|
|
|
|
.el-tabs__content {
|
|
|
|
|
|
padding-top: 25px;
|
2021-04-16 21:10:31 +08:00
|
|
|
|
border: 1px solid #E7EAED;
|
2021-03-05 20:34:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
.el-tabs__item {
|
|
|
|
|
|
outline: none;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
}
|
|
|
|
|
|
.el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active {
|
|
|
|
|
|
color: $global-text-color-active;
|
2021-04-16 21:10:31 +08:00
|
|
|
|
background: #FFFFFF;
|
2021-03-05 20:34:58 +08:00
|
|
|
|
border-bottom: none;
|
2021-04-16 21:10:31 +08:00
|
|
|
|
margin-left: .1px;
|
2021-03-05 20:34:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
.el-tabs--border-card>.el-tabs__header .el-tabs__item:not(.is-disabled):hover {
|
|
|
|
|
|
color: $global-text-color-active;
|
|
|
|
|
|
opacity: .8;
|
|
|
|
|
|
}
|
|
|
|
|
|
.el-tabs--border-card>.el-tabs__header .el-tabs__item {
|
2021-04-16 21:10:31 +08:00
|
|
|
|
height: 40px;
|
|
|
|
|
|
background: #F6F6F6;
|
|
|
|
|
|
border: 1px solid #E7EAED;
|
|
|
|
|
|
border-top-left-radius: 4px;
|
|
|
|
|
|
border-top-right-radius: 4px;
|
|
|
|
|
|
margin-top: 0px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.el-tabs--border-card>.el-tabs__header .el-tabs__item:not(:first-child) {
|
|
|
|
|
|
margin-left: 5px;
|
2021-03-05 20:34:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2020-03-30 21:09:34 +08:00
|
|
|
|
.system-config-form .el-form-item__content{
|
|
|
|
|
|
width: 512px;
|
|
|
|
|
|
}
|
2021-03-19 09:43:57 +08:00
|
|
|
|
|
2020-03-30 21:09:34 +08:00
|
|
|
|
.system-config-form .el-input{
|
2020-10-16 18:11:53 +08:00
|
|
|
|
width:512px;
|
|
|
|
|
|
text-align: left;
|
2020-03-30 21:09:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
.system-config-form .el-input__inner{
|
|
|
|
|
|
height: 28px;
|
|
|
|
|
|
line-height: 28px;
|
2021-02-09 17:28:58 +08:00
|
|
|
|
/*width: 512px;*/
|
2020-03-30 21:09:34 +08:00
|
|
|
|
}
|
2021-03-05 20:34:58 +08:00
|
|
|
|
.system-tabs {
|
|
|
|
|
|
box-shadow: unset !important;
|
2021-04-16 21:10:31 +08:00
|
|
|
|
border:unset;
|
|
|
|
|
|
border-top: unset;
|
|
|
|
|
|
height: 100%;
|
2021-03-05 20:34:58 +08:00
|
|
|
|
}
|
2020-04-02 20:57:43 +08:00
|
|
|
|
.system-tabs .el-tabs--border-card{
|
|
|
|
|
|
webkit-box-shadow: unset !important;
|
|
|
|
|
|
box-shadow: unset !important;
|
2020-04-08 19:18:30 +08:00
|
|
|
|
height: 100%;
|
2020-04-09 16:14:32 +08:00
|
|
|
|
width: 100%;
|
2020-04-08 19:18:30 +08:00
|
|
|
|
border-bottom: unset;
|
2020-04-09 16:14:32 +08:00
|
|
|
|
border-left: unset;
|
2020-04-02 20:57:43 +08:00
|
|
|
|
}
|
|
|
|
|
|
.sys-reset-label .el-checkbox__original:checked + span{
|
|
|
|
|
|
background-color: orange;
|
|
|
|
|
|
}
|
|
|
|
|
|
.sys-reset-label .el-checkbox__original:checked + span:after{
|
|
|
|
|
|
-webkit-transform: rotate(45deg) scaleY(1);
|
|
|
|
|
|
transform: rotate(45deg) scaleY(1);
|
|
|
|
|
|
}
|
2020-04-09 16:14:32 +08:00
|
|
|
|
.reset-form .el-checkbox-group{
|
|
|
|
|
|
margin-left: -28px !important;
|
|
|
|
|
|
}
|
2020-07-03 17:28:02 +08:00
|
|
|
|
.linkBox .el-input--small .el-input__inner{
|
|
|
|
|
|
height: 28px;
|
|
|
|
|
|
line-height: 28px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.linkName .el-input__inner{
|
|
|
|
|
|
width: 100px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.linkUrl .el-input__inner{
|
|
|
|
|
|
width: 460px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.linkBox .el-form-item--mini.el-form-item, .linkBox .el-form-item--small.el-form-item{
|
|
|
|
|
|
margin-bottom: 0px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.linkBox .el-form--inline{
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
}
|
2021-03-01 16:10:05 +08:00
|
|
|
|
.el-form-item__tip {
|
2021-03-03 12:37:11 +08:00
|
|
|
|
color: #999 !important;
|
2021-03-01 16:10:05 +08:00
|
|
|
|
position: absolute;
|
|
|
|
|
|
font-size: 12px;
|
2021-03-03 12:37:11 +08:00
|
|
|
|
margin-top: 5px;
|
2021-03-01 16:10:05 +08:00
|
|
|
|
line-height: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.el-form-item__tip + .el-form-item__error {
|
2021-03-03 12:37:11 +08:00
|
|
|
|
margin-top: 20px;
|
2021-03-01 16:10:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
.el-form-item__tip.el-form-item__tip--two-row + .el-form-item__error {
|
2021-03-03 12:37:11 +08:00
|
|
|
|
margin-top: 34px;
|
2021-03-01 16:10:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
.el-form-item.has-tip {
|
|
|
|
|
|
margin-bottom: 34px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.el-form-item.has-tip--two-row {
|
2021-03-03 12:37:11 +08:00
|
|
|
|
margin-bottom: 54px;
|
2021-03-01 16:10:05 +08:00
|
|
|
|
}
|
2021-04-16 21:10:31 +08:00
|
|
|
|
@keyframes warnBackground {
|
|
|
|
|
|
0% {background-color: #FFFFFF;}
|
|
|
|
|
|
25% {background-color: #EF7458;}
|
|
|
|
|
|
50% {background-color: #FFFFFF;}
|
|
|
|
|
|
75% {background-color: #EF7458;}
|
|
|
|
|
|
100% {background-color: #FFFFFF;}
|
|
|
|
|
|
}
|
|
|
|
|
|
.warn-pop {
|
|
|
|
|
|
background-color: #FEF0F0;
|
|
|
|
|
|
border-color: #FEF0F0;
|
|
|
|
|
|
color:#F66C6C;
|
|
|
|
|
|
}
|
|
|
|
|
|
.warn-pop .popper__arrow:after{
|
|
|
|
|
|
border-top-color: #FEF0F0 !important;
|
|
|
|
|
|
}
|
2021-04-21 13:05:27 +08:00
|
|
|
|
.avatar-uploader .el-upload {
|
|
|
|
|
|
border: 1px dashed #d9d9d9;
|
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
}
|
|
|
|
|
|
.avatar-uploader .el-upload:hover {
|
|
|
|
|
|
border-color: #409EFF;
|
|
|
|
|
|
}
|
|
|
|
|
|
.avatar-uploader-icon {
|
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
|
color: #8c939d;
|
|
|
|
|
|
width: 100px;
|
|
|
|
|
|
height: 100px;
|
|
|
|
|
|
line-height: 100px;
|
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
.avatar {
|
|
|
|
|
|
width: 100px;
|
|
|
|
|
|
height: 100px;
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
}
|
|
|
|
|
|
.system .logo-upload-tip{
|
|
|
|
|
|
color:#F66C6C;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
line-height: 20px;
|
|
|
|
|
|
}
|
2020-03-30 21:09:34 +08:00
|
|
|
|
</style>
|