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