fix:添加数据源,form表单中校验、保存不做权限控制,权限是在创建按钮上控制

This commit is contained in:
junjie 2021-06-23 16:29:31 +08:00
parent 5ba240b781
commit 849ee614be

View File

@ -52,12 +52,12 @@
</el-form-item> -->
</el-form>
<div v-if="canEdit" slot="footer" class="dialog-footer">
<el-button v-if="hasDataPermission('manage',params.privileges)" @click="validaDatasource">{{ $t('commons.validate') }}</el-button>
<el-button v-if="hasDataPermission('manage',params.privileges)" type="primary" @click="save">{{ $t('commons.save') }}</el-button>
<el-button v-if="formType==='add'?true: hasDataPermission('manage',params.privileges)" @click="validaDatasource">{{ $t('commons.validate') }}</el-button>
<el-button v-if="formType==='add'?true: hasDataPermission('manage',params.privileges)" type="primary" @click="save">{{ $t('commons.save') }}</el-button>
</div>
<div v-else slot="footer" class="dialog-footer">
<el-button v-if="hasDataPermission('manage',params.privileges)" @click="validaDatasource">{{ $t('commons.validate') }}</el-button>
<el-button v-if="hasDataPermission('manage',params.privileges)" type="primary" @click="changeEdit">{{ $t('commons.edit') }}</el-button>
<el-button v-if="formType==='add'?true: hasDataPermission('manage',params.privileges)" @click="validaDatasource">{{ $t('commons.validate') }}</el-button>
<el-button v-if="formType==='add'?true: hasDataPermission('manage',params.privileges)" type="primary" @click="changeEdit">{{ $t('commons.edit') }}</el-button>
</div>
</div>
</layout-content>