feat:system 修改
This commit is contained in:
@@ -901,7 +901,11 @@ const cn = {
|
|||||||
lat: '纬度',
|
lat: '纬度',
|
||||||
lng: '经度',
|
lng: '经度',
|
||||||
zoom: '缩放',
|
zoom: '缩放',
|
||||||
lnglat: '坐标'
|
lnglat: '坐标',
|
||||||
|
sysLogo:'系统Logo',
|
||||||
|
scrapeTimeout:"Scrape timeout",
|
||||||
|
snmpTrapPort:"SNMP trap端口",
|
||||||
|
logoTip:'Logo支持格式为jpg、jpeg、png且大小小于2M的图片'
|
||||||
},
|
},
|
||||||
email: {
|
email: {
|
||||||
email: '邮件',
|
email: '邮件',
|
||||||
@@ -911,6 +915,7 @@ const cn = {
|
|||||||
smtpAccount: 'SMTP账号',
|
smtpAccount: 'SMTP账号',
|
||||||
smtpPwd: 'SMTP密码',
|
smtpPwd: 'SMTP密码',
|
||||||
sendAccount: '发送账号',
|
sendAccount: '发送账号',
|
||||||
|
timeout:"超时时间",
|
||||||
testAccount: '测试账号',
|
testAccount: '测试账号',
|
||||||
useSSL: 'SSL',
|
useSSL: 'SSL',
|
||||||
useTLS: 'TLS',
|
useTLS: 'TLS',
|
||||||
@@ -919,11 +924,16 @@ const cn = {
|
|||||||
sendAccountTip: '提示:发送邮件账号,默认使用SMTP账号作为发送账号',
|
sendAccountTip: '提示:发送邮件账号,默认使用SMTP账号作为发送账号',
|
||||||
testAccountTip: '提示:仅用来作为测试邮件收件人',
|
testAccountTip: '提示:仅用来作为测试邮件收件人',
|
||||||
sslTip: '如果SMTP端口是465,通常需要启用SSL',
|
sslTip: '如果SMTP端口是465,通常需要启用SSL',
|
||||||
tlsTip: '如果SMTP端口是587,通常需要启用TLS'
|
tlsTip: '如果SMTP端口是587,通常需要启用TLS',
|
||||||
|
securityType: '安全协议'
|
||||||
},
|
},
|
||||||
terminal: {
|
terminal: {
|
||||||
terminal: '终端',
|
terminal: '终端',
|
||||||
terminalNum: '最大终端数量'
|
terminalNum: '最大终端数量',
|
||||||
|
timeout:"超时时间",
|
||||||
|
userTip:"Telnet user prompt",
|
||||||
|
pinTip:"Ternet password prompt",
|
||||||
|
localRetention:"本地存储",
|
||||||
},
|
},
|
||||||
ldap: {
|
ldap: {
|
||||||
ldap: 'LDAP',
|
ldap: 'LDAP',
|
||||||
@@ -936,7 +946,8 @@ const cn = {
|
|||||||
filterTip: '可能的选项是(cn或uid或sAMAccountName=%(user)s)',
|
filterTip: '可能的选项是(cn或uid或sAMAccountName=%(user)s)',
|
||||||
map: '属性映射',
|
map: '属性映射',
|
||||||
mapTip: '属性映射代表怎样将NEZHA用户属性映射到jumpserver用户上;username,email是jumpserver的属性',
|
mapTip: '属性映射代表怎样将NEZHA用户属性映射到jumpserver用户上;username,email是jumpserver的属性',
|
||||||
active: '启用LDAP认证'
|
active: '启用LDAP认证',
|
||||||
|
timeout:"超时时间"
|
||||||
},
|
},
|
||||||
link: {
|
link: {
|
||||||
link: 'Link',
|
link: 'Link',
|
||||||
|
|||||||
@@ -951,7 +951,8 @@ const en = {
|
|||||||
filterTip: 'The possible options are: (cn or uid or sAMAccountName=%(user)s)',
|
filterTip: 'The possible options are: (cn or uid or sAMAccountName=%(user)s)',
|
||||||
map: 'Attribute mapping',
|
map: 'Attribute mapping',
|
||||||
mapTip: 'Attribute mapping represents how to map LDAP user attributes to NEZHA users; username,email are the attributes of NEZHA',
|
mapTip: 'Attribute mapping represents how to map LDAP user attributes to NEZHA users; username,email are the attributes of NEZHA',
|
||||||
active: 'LDAP authentication'
|
active: 'LDAP authentication',
|
||||||
|
timeout:"Timeout"
|
||||||
},
|
},
|
||||||
link: {
|
link: {
|
||||||
link: 'Link',
|
link: 'Link',
|
||||||
@@ -971,7 +972,7 @@ const en = {
|
|||||||
filePath: 'File path',
|
filePath: 'File path',
|
||||||
operation: 'Operation',
|
operation: 'Operation',
|
||||||
account: 'Account',
|
account: 'Account',
|
||||||
state: 'State',
|
state: 'Enable',
|
||||||
buildIn: 'Build in',
|
buildIn: 'Build in',
|
||||||
add: 'Add',
|
add: 'Add',
|
||||||
update: 'Update',
|
update: 'Update',
|
||||||
@@ -1000,7 +1001,8 @@ const en = {
|
|||||||
role: 'Role',
|
role: 'Role',
|
||||||
create: 'Creator',
|
create: 'Creator',
|
||||||
creatAt: 'Create at',
|
creatAt: 'Create at',
|
||||||
expireAt: 'Expire at'
|
expireAt: 'Expire at',
|
||||||
|
noExpire: 'No expiration date',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
assetType: {
|
assetType: {
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ export default {
|
|||||||
this.license.warnInfo = ''
|
this.license.warnInfo = ''
|
||||||
this.license.valid = true
|
this.license.valid = true
|
||||||
} else {
|
} else {
|
||||||
this.license.valid = true
|
this.license.valid = false
|
||||||
this.license.warnInfo = response.msg
|
this.license.warnInfo = response.msg
|
||||||
}
|
}
|
||||||
this.license.token = response.token
|
this.license.token = response.token
|
||||||
|
|||||||
@@ -173,10 +173,11 @@ export default {
|
|||||||
label: 'Centos',
|
label: 'Centos',
|
||||||
name: 'centos'
|
name: 'centos'
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: 'Ubuntu',
|
// label: 'Ubuntu',
|
||||||
name: 'ubuntu'
|
// name: 'ubuntu'
|
||||||
}],
|
// }
|
||||||
|
],
|
||||||
agentParam: {
|
agentParam: {
|
||||||
osType: 'centos',
|
osType: 'centos',
|
||||||
dc: '',
|
dc: '',
|
||||||
@@ -188,6 +189,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toDownloadAgent: function () {
|
toDownloadAgent: function () {
|
||||||
|
this.getAllDc();
|
||||||
this.showAgentDownload = true
|
this.showAgentDownload = true
|
||||||
this.token = sessionStorage.getItem('nz-token')
|
this.token = sessionStorage.getItem('nz-token')
|
||||||
axios.get('/healthy').then(response => {
|
axios.get('/healthy').then(response => {
|
||||||
@@ -275,7 +277,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.getAllDc()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -52,11 +52,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.system.basic.timezone')" prop="timezone">
|
<el-form-item :label="$t('config.system.basic.timezone')" prop="timezone">
|
||||||
<!-- <el-input v-model.number="basic.timezone" ></el-input>-->
|
<!-- <el-input v-model.number="basic.timezone" ></el-input>-->
|
||||||
<el-select v-model="basic.timezone" id="system-baisc-timezone" >
|
<el-select v-model="basic.timezone" id="system-baisc-timezone" filterable>
|
||||||
<el-option v-for="(item,index) in timezoneOption" :key="index" :label="item.name" :value="item.name" >
|
<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 style="display: flex;justify-content: space-between;padding: 5px;">
|
||||||
<div >{{item.name}}</div>
|
<div >{{item.name}}</div>
|
||||||
<div >UTC{{item.offset>=0?'+'+(item.offset/1000/60/60):'-'+(item.offset/1000/60/60)}}</div>
|
<div >{{timezoneOptionHandler(item.offset)}}</div>
|
||||||
</div>
|
</div>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
<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>
|
<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>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div v->
|
</div >
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane :label="$t('config.system.email.email')" name="email" >
|
<el-tab-pane :label="$t('config.system.email.email')" name="email" >
|
||||||
<div class="system-config-form" v-if="activeTab === 'email'">
|
<div class="system-config-form" v-if="activeTab === 'email'">
|
||||||
@@ -132,7 +132,9 @@
|
|||||||
<div class="system-config-form terminal" v-if="activeTab === 'terminal'">
|
<div class="system-config-form terminal" v-if="activeTab === 'terminal'">
|
||||||
<el-form :model="terminal" label-width="180px" size="small" ref="terminalForm" :rules="terminalRules">
|
<el-form :model="terminal" label-width="180px" size="small" ref="terminalForm" :rules="terminalRules">
|
||||||
<el-form-item :label="$t('config.system.terminal.timeout')" prop="terminal_timeout">
|
<el-form-item :label="$t('config.system.terminal.timeout')" prop="terminal_timeout">
|
||||||
<el-input-number v-model="terminal.terminal_timeout" controls-position="right" :min="1" id="system-terminal-max_terminal_num"></el-input-number>
|
<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>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.system.terminal.userTip')" prop="terminal_telnet_user_tip">
|
<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-input id="system-terminal-user-tip" v-model="terminal.terminal_telnet_user_tip"></el-input>
|
||||||
@@ -141,7 +143,9 @@
|
|||||||
<el-input id="system-terminal_telnet_pin_tip" v-model="terminal.terminal_telnet_pin_tip"></el-input>
|
<el-input id="system-terminal_telnet_pin_tip" v-model="terminal.terminal_telnet_pin_tip"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.system.terminal.localRetention')" prop="terminal_record_local_retention">
|
<el-form-item :label="$t('config.system.terminal.localRetention')" prop="terminal_record_local_retention">
|
||||||
<el-input-number v-model="terminal.terminal_record_local_retention" controls-position="right" :min="1" id="system-terminal_record_local_retention"></el-input-number>
|
<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>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<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>
|
<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>
|
||||||
@@ -177,6 +181,11 @@
|
|||||||
<!--借用错误提示的样式-->
|
<!--借用错误提示的样式-->
|
||||||
<div class="el-form-item__tip el-form-item__tip--two-row">{{$t("config.system.ldap.mapTip")}}</div>
|
<div class="el-form-item__tip el-form-item__tip--two-row">{{$t("config.system.ldap.mapTip")}}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<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>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<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-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-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>
|
||||||
@@ -196,7 +205,7 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane :label="$t('config.system.reset.reset')" name="reset">
|
<el-tab-pane :label="$t('config.system.reset.reset')" name="reset">
|
||||||
<div class="system-config-form" v-if="activeTab === 'reset'">
|
<div class="system-config-form" v-if="activeTab === 'reset'">
|
||||||
<el-form :model="reset" label-width="82px" size="small" ref="resetForm" :rules="resetRules" :validate-on-rule-change="false" class="reset-form">
|
<el-form :model="reset" label-width="180px" size="small" ref="resetForm" :rules="resetRules" :validate-on-rule-change="false" class="reset-form">
|
||||||
<el-form-item prop="type" :label="$t('config.system.reset.type')">
|
<el-form-item prop="type" :label="$t('config.system.reset.type')">
|
||||||
<!-- <div class="el-checkbox-group">-->
|
<!-- <div class="el-checkbox-group">-->
|
||||||
<!-- <div v-for="(item,index) in resetOptions" :key="item.value+index" >-->
|
<!-- <div v-for="(item,index) in resetOptions" :key="item.value+index" >-->
|
||||||
@@ -287,7 +296,7 @@ export default {
|
|||||||
emailCopy: null,
|
emailCopy: null,
|
||||||
emailRules: {
|
emailRules: {
|
||||||
email_host: [
|
email_host: [
|
||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' },
|
// { required: true, message: this.$t('validate.required'), trigger: 'blur' },
|
||||||
{ validator: hostPlus, trigger: 'blur' }
|
{ validator: hostPlus, trigger: 'blur' }
|
||||||
],
|
],
|
||||||
email_port: [
|
email_port: [
|
||||||
@@ -321,7 +330,8 @@ export default {
|
|||||||
ldap_ou: '',
|
ldap_ou: '',
|
||||||
ldap_user_filter: '',
|
ldap_user_filter: '',
|
||||||
ldap_mapping: '',
|
ldap_mapping: '',
|
||||||
ldap_enable: 'off'
|
ldap_enable: 'off',
|
||||||
|
ldap_timeout:'',
|
||||||
},
|
},
|
||||||
ldapCopy: null,
|
ldapCopy: null,
|
||||||
ldapRules: {
|
ldapRules: {
|
||||||
@@ -464,9 +474,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
const param = Object.assign({}, this[type])
|
const param = Object.assign({}, this[type])
|
||||||
|
|
||||||
if (type == 'email') {
|
param[type+'_test']=true
|
||||||
param.email_test=true;
|
|
||||||
}
|
|
||||||
const postParam = Object.assign({}, param)
|
const postParam = Object.assign({}, param)
|
||||||
this.$put('/sys/config/'+type, postParam).then(response => {
|
this.$put('/sys/config/'+type, postParam).then(response => {
|
||||||
this.prevent_opt.save = false
|
this.prevent_opt.save = false
|
||||||
@@ -758,12 +766,12 @@ export default {
|
|||||||
|
|
||||||
if(isImage && isLt2M){
|
if(isImage && isLt2M){
|
||||||
const self = this;
|
const self = this;
|
||||||
this.urlToBase64(file.raw).then(res=>{
|
this.fileToBase64(file.raw).then(res=>{
|
||||||
self.basic.system_logo = res;
|
self.basic.system_logo = res;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
urlToBase64:function(file) {
|
fileToBase64:function(file) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let reader = new FileReader();
|
let reader = new FileReader();
|
||||||
reader.readAsDataURL(file);//转化二进制流,异步方法
|
reader.readAsDataURL(file);//转化二进制流,异步方法
|
||||||
@@ -774,6 +782,17 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
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))
|
||||||
|
|
||||||
|
let minute = offsetHour==0&&offsetMinute == 0?'':(offsetMinute==0?':00':(offsetMinute>9?':'+offsetMinute:':0'+offsetMinute))
|
||||||
|
|
||||||
|
return 'UTC'+hour+minute
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
|||||||
@@ -71,7 +71,8 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
addApiKey: function () {
|
addApiKey: function () {
|
||||||
this.$refs.dataTable.addApiKey()
|
this.$refs.dataTable.addApiKey()
|
||||||
}
|
this.$refs.dataTable.getRoles()
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="item.prop == 'expireAt'">
|
<template v-if="item.prop == 'expireAt'">
|
||||||
<el-popover :content="rules.expireAt.message" placement="top" trigger="manual" v-model="rules.expireAt.switch" popper-class="small-pop warn-pop" @after-enter="popShow(rules.expireAt)">
|
<!-- <el-popover :content="rules.expireAt.message" placement="top" trigger="manual" v-model="rules.expireAt.switch" popper-class="small-pop warn-pop" @after-enter="popShow(rules.expireAt)">-->
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
slot="reference"
|
slot="reference"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
:picker-options="pickerOptions"
|
:picker-options="pickerOptions"
|
||||||
:placeholder="$t('el.datepicker.selectTime')">
|
:placeholder="$t('el.datepicker.selectTime')">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-popover>
|
<!-- </el-popover>-->
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
@@ -71,6 +71,9 @@
|
|||||||
<template v-else-if="item.prop == 'role'">
|
<template v-else-if="item.prop == 'role'">
|
||||||
{{scope.row[item.prop]?scope.row[item.prop].name:'-'}}
|
{{scope.row[item.prop]?scope.row[item.prop].name:'-'}}
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else-if="item.prop == 'expireAt'">
|
||||||
|
{{scope.row[item.prop]?scope.row[item.prop]:$t('config.system.apiKey.noExpire')}}
|
||||||
|
</template>
|
||||||
<template v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
|
<template v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
|
||||||
<template v-else>-</template>
|
<template v-else>-</template>
|
||||||
</template>
|
</template>
|
||||||
@@ -138,7 +141,7 @@ export default {
|
|||||||
rules: {
|
rules: {
|
||||||
name: { required: true, message: this.$t('validate.required'), switch: false },
|
name: { required: true, message: this.$t('validate.required'), switch: false },
|
||||||
roleId: { required: true, message: this.$t('validate.required'), switch: false },
|
roleId: { required: true, message: this.$t('validate.required'), switch: false },
|
||||||
expireAt: { required: true, message: this.$t('validate.required'), switch: false }
|
// expireAt: { required: true, message: this.$t('validate.required'), switch: false }
|
||||||
},
|
},
|
||||||
pickerOptions: {
|
pickerOptions: {
|
||||||
// 限制预约时间
|
// 限制预约时间
|
||||||
@@ -154,7 +157,7 @@ export default {
|
|||||||
this.tableData.unshift({
|
this.tableData.unshift({
|
||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
roles: {
|
role: {
|
||||||
id: '',
|
id: '',
|
||||||
name: ''
|
name: ''
|
||||||
},
|
},
|
||||||
@@ -174,15 +177,15 @@ export default {
|
|||||||
},
|
},
|
||||||
save: function (obj) {
|
save: function (obj) {
|
||||||
const copy = JSON.parse(JSON.stringify(obj))
|
const copy = JSON.parse(JSON.stringify(obj))
|
||||||
if (copy.roles) {
|
if (copy.role) {
|
||||||
copy.roleId = copy.roles.id
|
copy.roleId = copy.role.id
|
||||||
}
|
}
|
||||||
delete copy.roles
|
delete copy.role
|
||||||
this.saveOrUpdate(copy)
|
this.saveOrUpdate(copy)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.getRoles()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -102,10 +102,6 @@ export default {
|
|||||||
label: 'URL',
|
label: 'URL',
|
||||||
prop: 'url',
|
prop: 'url',
|
||||||
show: true
|
show: true
|
||||||
}, {
|
|
||||||
label: this.$t('config.system.link.create'),
|
|
||||||
prop: 'creator',
|
|
||||||
show: true
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<template v-if="item.prop == 'state'">
|
<template v-if="item.prop == 'state'">
|
||||||
<div :class="{'active-icon green':scope.row[item.prop] == '1','active-icon red':scope.row[item.prop] == '0'}"></div><span>{{scope.row[item.prop] == '1'?$t(''):$t('')}}</span>
|
<el-switch :disabled="true" v-model="scope.row.state" active-color="#ee9d3f" :active-value="1" :inactive-value="0" />
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
|
<template v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
|
||||||
<template v-else>-</template>
|
<template v-else>-</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user