Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
OrangeM21
2020-06-10 20:32:17 +08:00
8 changed files with 24 additions and 13 deletions

View File

@@ -246,7 +246,6 @@ export default {
if (this.handleImport) {
this.headerActions.handleImport = this.handleImport
}
console.log(this.headerActions)
},
methods: {
MFAConfirm() {

View File

@@ -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>

View File

@@ -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"

View File

@@ -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()
}
})
},

View File

@@ -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>

View File

@@ -143,3 +143,8 @@ h4 {
color: #737373;
font-size: 13px
}
input[type=file] {
font-size: 12px;
opacity: 80;
}

View File

@@ -82,6 +82,7 @@ export default {
headerActions: {
hasLeftActions: false,
hasImport: false,
hasExport: false,
hasDatePicker: true,
datePicker: {
dateStart: dateTo,

View File

@@ -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
})]
}