refactor(应用): 复用数据源的应用记录允许编辑

This commit is contained in:
wangjiahao 2023-01-03 12:46:26 +08:00
parent 7fe50fa920
commit 6ca72d0ba8
2 changed files with 29 additions and 23 deletions

View File

@ -1068,10 +1068,11 @@ public class PanelGroupService {
datasetGroupHistoryInfo.setName(request.getDatasetGroupName()); datasetGroupHistoryInfo.setName(request.getDatasetGroupName());
datasetGroupHistoryInfo.setPid(request.getDatasetGroupPid()); datasetGroupHistoryInfo.setPid(request.getDatasetGroupPid());
datasetGroupMapper.updateByPrimaryKey(datasetGroupHistoryInfo); datasetGroupMapper.updateByPrimaryKey(datasetGroupHistoryInfo);
if ("new".equals(request.getDatasourceFrom())) {
//数据源变更 //数据源变更
panelAppTemplateService.editDatasource(request.getDatasourceList()); panelAppTemplateService.editDatasource(request.getDatasourceList());
} }
}
public void toTop(String panelId) { public void toTop(String panelId) {
Long time = System.currentTimeMillis(); Long time = System.currentTimeMillis();

View File

@ -246,7 +246,8 @@
v-if=" v-if="
formType === 'add' formType === 'add'
? true ? true
: hasDataPermission('manage', params.privileges) : (hasDataPermission('manage', outerParams.panelPrivileges)
||hasDataPermission('manage', outerParams.datasetPrivileges))
" "
@click="validaDatasource" @click="validaDatasource"
>{{ $t('commons.validate') }} >{{ $t('commons.validate') }}
@ -270,7 +271,11 @@
>{{ $t('commons.cancel') }} >{{ $t('commons.cancel') }}
</deBtn> </deBtn>
<deBtn <deBtn
v-if="formType === 'add'" v-if="
formType === 'add'
? true
: hasDataPermission('manage', params.privileges)
"
type="primary" type="primary"
@click="saveAppMarketHistory" @click="saveAppMarketHistory"
>{{ $t('commons.save') }} >{{ $t('commons.save') }}
@ -720,7 +725,7 @@ export default {
res.data.apiConfiguration = JSON.parse(Base64.decode(res.data.apiConfigurationStr)) res.data.apiConfiguration = JSON.parse(Base64.decode(res.data.apiConfigurationStr))
} }
this.params = { ...res.data, showModel } this.params = { ...res.data, showModel }
if(showModel === 'copy'){ if (showModel === 'copy') {
this.params.id = '' this.params.id = ''
} }
this.$emit('setParams', { ...this.params }) this.$emit('setParams', { ...this.params })