mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -246,7 +246,6 @@ export default {
|
||||
if (this.handleImport) {
|
||||
this.headerActions.handleImport = this.handleImport
|
||||
}
|
||||
console.log(this.headerActions)
|
||||
},
|
||||
methods: {
|
||||
MFAConfirm() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<Dialog :title="$t('common.Export')" :visible.sync="showExportDialog" @confirm="handleExportConfirm()" @cancel="handleExportCancel()">
|
||||
<Dialog :title="$t('common.Export')" :visible.sync="showExportDialog" :destroy-on-close="true" @confirm="handleExportConfirm()" @cancel="handleExportCancel()">
|
||||
<el-form label-position="left" style="padding-left: 50px">
|
||||
<el-form-item :label="this.$t('common.imExport.ExportRange')" :label-width="'100px'">
|
||||
<el-radio v-model="exportOption" class="export-item" label="1">{{ this.$t('common.imExport.ExportAll') }}</el-radio>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<Dialog :title="$t('common.Import')" :visible.sync="showImportDialog" @confirm="handleImportConfirm" @cancel="handleImportCancel()">
|
||||
<Dialog :title="$t('common.Import')" :visible.sync="showImportDialog" :destroy-on-close="true" @confirm="handleImportConfirm" @cancel="handleImportCancel()">
|
||||
<el-form label-position="left" style="padding-left: 50px">
|
||||
<el-form-item :label="$t('common.Import' )" :label-width="'100px'">
|
||||
<el-radio v-model="importOption" class="export-item" label="1">{{ this.$t('common.Create') }}</el-radio>
|
||||
@@ -19,8 +19,8 @@
|
||||
<el-upload
|
||||
ref="upload"
|
||||
action="string"
|
||||
:http-request="handleImport"
|
||||
list-type="text/csv"
|
||||
:http-request="handleImport"
|
||||
:limit="1"
|
||||
:auto-upload="false"
|
||||
:before-upload="beforeUpload"
|
||||
|
||||
@@ -150,6 +150,9 @@ export default {
|
||||
iAjax(newValue, oldValue) {
|
||||
this.$log.debug('Select url changed: ', oldValue, ' => ', newValue)
|
||||
this.refresh()
|
||||
},
|
||||
value(iNew) {
|
||||
this.iValue = iNew
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -159,8 +162,10 @@ export default {
|
||||
this.initialized = true
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.select.elFormItem) {
|
||||
this.$refs.select.elFormItem.clearValidate()
|
||||
// 因为elform存在问题,这个来清楚验证
|
||||
const elFormItem = this.$refs.select.elFormItem
|
||||
if (elFormItem && elFormItem.clearValidate) {
|
||||
elFormItem.clearValidate()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<input type="file" @change="Onchange">
|
||||
<div class="upload-key">
|
||||
<input type="file" @change="onChange">
|
||||
<div v-if="tip !== ''">{{ tip }}</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -19,8 +19,10 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
Onchange(e) {
|
||||
// TODO 校验文件类型
|
||||
onChange(e) {
|
||||
if (e.target.files.length === 0) {
|
||||
return
|
||||
}
|
||||
const vm = this
|
||||
const reader = new FileReader()
|
||||
reader.onload = function() {
|
||||
@@ -35,5 +37,4 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
@@ -143,3 +143,8 @@ h4 {
|
||||
color: #737373;
|
||||
font-size: 13px
|
||||
}
|
||||
|
||||
input[type=file] {
|
||||
font-size: 12px;
|
||||
opacity: 80;
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@ export default {
|
||||
headerActions: {
|
||||
hasLeftActions: false,
|
||||
hasImport: false,
|
||||
hasExport: false,
|
||||
hasDatePicker: true,
|
||||
datePicker: {
|
||||
dateStart: dateTo,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<el-col :md="10" :sm="24">
|
||||
<QuickActions :actions="quickActions" type="primary" />
|
||||
<RelationCard v-bind="relationConfig" type="info" style="margin-top: 15px" />
|
||||
<RelationCard v-if="this.$store.getters.publicSettings.LOGIN_CONFIRM_ENABLE" v-bind="loginConfirmSetting" type="info" style="margin-top: 15px" />
|
||||
<RelationCard v-if="this.$store.getters.publicSettings.LOGIN_CONFIRM_ENABLE" v-bind="loginConfirmSetting" type="danger" style="margin-top: 15px" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
@@ -204,7 +204,7 @@ export default {
|
||||
const objectId = this.object.id
|
||||
const relationUrl = `/api/v1/authentication/login-confirm-settings/${objectId}/`
|
||||
const data = {
|
||||
reviewers: [...this.object.login_confirm_settings, ...items.map(v => {
|
||||
reviewers: [...this.object.login_confirm_settings || [], ...items.map(v => {
|
||||
return v.value
|
||||
})]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user