mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 03:52:59 +08:00
Merge branch 'dev' into pr@dev@feat_view_plugin
This commit is contained in:
commit
60fa4e1cd4
@ -27,35 +27,35 @@ public class XAuthServer {
|
||||
|
||||
@PostMapping("/authModels")
|
||||
@I18n
|
||||
public List<XpackVAuthModelDTO> authModels(@RequestBody XpackBaseTreeRequest request){
|
||||
public List<XpackVAuthModelDTO> authModels(@RequestBody XpackBaseTreeRequest request) {
|
||||
AuthXpackService sysAuthService = SpringContextUtil.getBean(AuthXpackService.class);
|
||||
CurrentUserDto user = AuthUtils.getUser();
|
||||
return sysAuthService.searchAuthModelTree(request, user.getUserId(), user.getIsAdmin());
|
||||
}
|
||||
|
||||
@PostMapping("/authDetails")
|
||||
public Map<String,List<XpackSysAuthDetailDTO>> authDetails(@RequestBody XpackSysAuthRequest request){
|
||||
public Map<String, List<XpackSysAuthDetailDTO>> authDetails(@RequestBody XpackSysAuthRequest request) {
|
||||
AuthXpackService sysAuthService = SpringContextUtil.getBean(AuthXpackService.class);
|
||||
return sysAuthService.searchAuthDetails(request);
|
||||
}
|
||||
|
||||
@GetMapping("/authDetailsModel/{authType}")
|
||||
@GetMapping("/authDetailsModel/{authType}/{direction}")
|
||||
@I18n
|
||||
public List<XpackSysAuthDetail>authDetailsModel(@PathVariable String authType){
|
||||
public List<XpackSysAuthDetail> authDetailsModel(@PathVariable String authType, @PathVariable String direction) {
|
||||
AuthXpackService sysAuthService = SpringContextUtil.getBean(AuthXpackService.class);
|
||||
List<XpackSysAuthDetail> authDetails = sysAuthService.searchAuthDetailsModel(authType);
|
||||
if(authType.equalsIgnoreCase("dataset")){
|
||||
List<XpackSysAuthDetail> authDetails = sysAuthService.searchAuthDetailsModel(authType);
|
||||
if ("source".equals(direction) && authType.equalsIgnoreCase("dataset")) {
|
||||
XpackSysAuthDetail xpackSysAuthDetail = new XpackSysAuthDetail();
|
||||
xpackSysAuthDetail.setPrivilegeName("i18n_auth_row_permission");
|
||||
xpackSysAuthDetail.setPrivilegeType(20);
|
||||
xpackSysAuthDetail.setPrivilegeValue(1);
|
||||
authDetails.add(0,xpackSysAuthDetail);
|
||||
authDetails.add(0, xpackSysAuthDetail);
|
||||
}
|
||||
return authDetails;
|
||||
}
|
||||
|
||||
@PostMapping("/authChange")
|
||||
public void authChange(@RequestBody XpackSysAuthRequest request){
|
||||
public void authChange(@RequestBody XpackSysAuthRequest request) {
|
||||
AuthXpackService sysAuthService = SpringContextUtil.getBean(AuthXpackService.class);
|
||||
CurrentUserDto user = AuthUtils.getUser();
|
||||
sysAuthService.authChange(request, user.getUserId(), user.getUsername(), user.getIsAdmin());
|
||||
|
@ -76,7 +76,7 @@ public class DorisQueryProvider extends QueryProvider {
|
||||
|
||||
@Override
|
||||
public String createSQLPreview(String sql, String orderBy) {
|
||||
return "SELECT * FROM (" + sql + ") AS tmp ORDER BY " + orderBy + " LIMIT 0,1000";
|
||||
return "SELECT * FROM (" + sqlFix(sql) + ") AS tmp LIMIT 0,1000";
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -147,14 +147,6 @@ public class DorisQueryProvider extends QueryProvider {
|
||||
if (customWheres != null) wheres.add(customWheres);
|
||||
if (CollectionUtils.isNotEmpty(wheres)) st_sql.add("filters", wheres);
|
||||
|
||||
if ((fields.size() > 0)) {
|
||||
xOrders.add(SQLObj.builder()
|
||||
.orderDirection("asc")
|
||||
.orderField(fields.get(0).getDataeaseName())
|
||||
.orderAlias(String.format(SQLConstants.FIELD_ALIAS_X_PREFIX, "0"))
|
||||
.build());
|
||||
st_sql.add("orders", xOrders);
|
||||
}
|
||||
return st_sql.render();
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ export default {
|
||||
}
|
||||
// 加载视图数据
|
||||
initPanelData(this.panelId, function() {
|
||||
this.dataLoading = false
|
||||
_this.dataLoading = false
|
||||
// 如果含有跳转参数 进行触发
|
||||
const tempParam = localStorage.getItem('jumpInfoParam')
|
||||
if (tempParam) {
|
||||
|
@ -1550,7 +1550,8 @@ export default {
|
||||
|
||||
},
|
||||
auth: {
|
||||
authConfig: 'Auth Config',
|
||||
authConfig: 'Configure Permissions By User',
|
||||
sourceConfig: 'Configure Permissions By Source',
|
||||
authQuickConfig: 'Auth Quick Config',
|
||||
dept: 'Dept',
|
||||
role: 'Role',
|
||||
|
@ -1559,7 +1559,8 @@ export default {
|
||||
|
||||
},
|
||||
auth: {
|
||||
authConfig: '權限配置',
|
||||
authConfig: '按用户配置權限',
|
||||
sourceConfig: '按资源配置權限',
|
||||
authQuickConfig: '權限快捷配置',
|
||||
dept: '組織',
|
||||
role: '角色',
|
||||
|
@ -1568,7 +1568,8 @@ export default {
|
||||
|
||||
},
|
||||
auth: {
|
||||
authConfig: '权限配置',
|
||||
authConfig: '按用户配置权限',
|
||||
sourceConfig: '按资源配置权限',
|
||||
authQuickConfig: '权限快捷配置',
|
||||
dept: '组织',
|
||||
role: '角色',
|
||||
|
@ -219,27 +219,32 @@
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
</el-row>
|
||||
|
||||
<plugin-com v-if="isPlugin" :component-name="view.type + '-data'" :obj="{view, param, chart}" />
|
||||
<div v-else>
|
||||
<el-row v-if="view.type ==='map'" class="padding-lr">
|
||||
<span style="width: 80px;text-align: right;">
|
||||
<span>{{ $t('chart.map_range') }}</span>
|
||||
</span>
|
||||
<span class="tree-select-span">
|
||||
<treeselect
|
||||
ref="mapSelector"
|
||||
v-model="view.customAttr.areaCode"
|
||||
:options="places"
|
||||
:placeholder="$t('chart.select_map_range')"
|
||||
:normalizer="normalizer"
|
||||
:no-children-text="$t('commons.treeselect.no_children_text')"
|
||||
:no-options-text="$t('commons.treeselect.no_options_text')"
|
||||
:no-results-text="$t('commons.treeselect.no_results_text')"
|
||||
@input="calcData"
|
||||
@deselect="calcData"
|
||||
/>
|
||||
</span>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row v-if="view.type ==='map'" class="padding-lr">
|
||||
<span style="width: 80px;text-align: right;">
|
||||
<span>{{ $t('chart.map_range') }}</span>
|
||||
</span>
|
||||
<span class="tree-select-span">
|
||||
<treeselect
|
||||
ref="mapSelector"
|
||||
v-model="view.customAttr.areaCode"
|
||||
:options="places"
|
||||
:placeholder="$t('chart.select_map_range')"
|
||||
:normalizer="normalizer"
|
||||
:no-children-text="$t('commons.treeselect.no_children_text')"
|
||||
:no-options-text="$t('commons.treeselect.no_options_text')"
|
||||
:no-results-text="$t('commons.treeselect.no_results_text')"
|
||||
:disabled="!hasDataPermission('manage',param.privileges)"
|
||||
@input="calcData"
|
||||
@deselect="calcData"
|
||||
/>
|
||||
</span>
|
||||
</el-row>
|
||||
|
||||
<!--xAxisExt-->
|
||||
<el-row
|
||||
v-if="view.type === 'table-pivot'"
|
||||
|
@ -58,9 +58,10 @@
|
||||
{{ $t('dataset.preview_item') }}
|
||||
</span>
|
||||
<el-pagination
|
||||
v-show="false"
|
||||
:current-page="currentPage.page"
|
||||
:page-sizes="[100]"
|
||||
:page-size="currentPage.pageSize"
|
||||
:page-sizes="[parseInt(form.row)]"
|
||||
:page-size="parseInt(form.row)"
|
||||
:pager-count="5"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="currentPage.show"
|
||||
@ -104,7 +105,7 @@ export default {
|
||||
height: 500,
|
||||
currentPage: {
|
||||
page: 1,
|
||||
pageSize: 100,
|
||||
pageSize: parseInt(this.form.row),
|
||||
show: parseInt(this.form.row)
|
||||
}
|
||||
}
|
||||
@ -153,6 +154,7 @@ export default {
|
||||
return
|
||||
}
|
||||
this.currentPage.show = parseInt(this.form.row)
|
||||
this.currentPage.pageSize = parseInt(this.form.row)
|
||||
this.currentPage.page = 1
|
||||
this.$emit('reSearch', { form: this.form, page: this.currentPage })
|
||||
},
|
||||
|
@ -93,7 +93,7 @@ export default {
|
||||
data: [],
|
||||
page: {
|
||||
page: 1,
|
||||
pageSize: 100,
|
||||
pageSize: 1000,
|
||||
show: 1000
|
||||
},
|
||||
tabActive: 'dataPreview',
|
||||
@ -160,7 +160,7 @@ export default {
|
||||
this.data = []
|
||||
this.page = {
|
||||
page: 1,
|
||||
pageSize: 100,
|
||||
pageSize: 1000,
|
||||
show: 0
|
||||
}
|
||||
})
|
||||
@ -218,7 +218,7 @@ export default {
|
||||
resetPage() {
|
||||
this.page = {
|
||||
page: 1,
|
||||
pageSize: 100,
|
||||
pageSize: 1000,
|
||||
show: 1000
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user