commit
fbb1ae1c04
|
@ -4,6 +4,7 @@ from django.conf import settings
|
||||||
from django.db import connection
|
from django.db import connection
|
||||||
from django.core.cache import cache
|
from django.core.cache import cache
|
||||||
from dvadmin.utils.validator import CustomValidationError
|
from dvadmin.utils.validator import CustomValidationError
|
||||||
|
from django.db.models import Q
|
||||||
|
|
||||||
dispatch_db_type = getattr(settings, 'DISPATCH_DB_TYPE', 'memory') # redis
|
dispatch_db_type = getattr(settings, 'DISPATCH_DB_TYPE', 'memory') # redis
|
||||||
|
|
||||||
|
@ -44,7 +45,7 @@ def _get_all_system_config():
|
||||||
from dvadmin.system.models import SystemConfig
|
from dvadmin.system.models import SystemConfig
|
||||||
|
|
||||||
system_config_obj = (
|
system_config_obj = (
|
||||||
SystemConfig.objects.filter(parent_id__isnull=False)
|
SystemConfig.objects.filter(~Q(parent_id__form_item_type=11), parent_id__isnull=False)
|
||||||
.values("parent__key", "key", "value", "form_item_type")
|
.values("parent__key", "key", "value", "form_item_type")
|
||||||
.order_by("sort")
|
.order_by("sort")
|
||||||
)
|
)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<el-button size="small" type="success" icon="el-icon-upload" @click="handleImport">
|
<el-button size="small" type="success" icon="el-icon-upload" @click="handleImport">
|
||||||
<slot>导入</slot>
|
<slot>导入</slot>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body destroy-on-close>
|
||||||
<div v-loading="loading">
|
<div v-loading="loading">
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="upload"
|
ref="upload"
|
||||||
|
@ -25,8 +25,11 @@
|
||||||
<div slot="tip" class="el-upload__tip" style="color:red">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
|
<div slot="tip" class="el-upload__tip" style="color:red">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="warning" style="font-size:14px;margin-top: 20px" @click="importTemplate">下载导入模板</el-button>
|
<el-button type="warning" style="font-size:14px;margin-top: 20px" @click="importTemplate">下载导入模板
|
||||||
<el-button type="warning" style="font-size:14px;margin-top: 20px" @click="updateTemplate">批量更新模板</el-button>
|
</el-button>
|
||||||
|
<el-button type="warning" style="font-size:14px;margin-top: 20px" @click="updateTemplate" v-if="showUpdate">
|
||||||
|
批量更新模板
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
|
@ -75,6 +78,12 @@ export default {
|
||||||
default () {
|
default () {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
showUpdate: {
|
||||||
|
type: Boolean,
|
||||||
|
default () {
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
|
@ -131,6 +140,8 @@ export default {
|
||||||
that.refreshView()
|
that.refreshView()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}).finally(() => {
|
||||||
|
that.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 提交上传文件
|
// 提交上传文件
|
||||||
|
|
Loading…
Reference in New Issue