拆分按钮权限修改
This commit is contained in:
@@ -24,7 +24,10 @@
|
||||
<span slot="operation" slot-scope="record" class="operate">
|
||||
<a v-for="(ol,index) in OperationList"
|
||||
@click="OperationClick(ol,record)">
|
||||
<span class="text">
|
||||
<span class="text" v-if="ol.text==$t('edit')" v-has="'split:sarFileSplitItems:update'">
|
||||
{{ol.text}}
|
||||
</span>
|
||||
<span class="text" v-if="ol.text==$t('delete')" v-has="'split:sarFileSplitItems:delete'">
|
||||
{{ol.text}}
|
||||
</span>
|
||||
</a>
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
<!-- <span class="text">-->
|
||||
<!-- {{ol.text}}-->
|
||||
<!-- </span>-->
|
||||
<span v-if="ol.text==$t('backDocument')&&record.flag==0" class="text">
|
||||
<span v-if="ol.text==$t('backDocument')&&record.flag==0" class="text" v-has="'split:sarFileSplitInfo:bind'">
|
||||
{{ol.text}}
|
||||
</span>
|
||||
<span v-if="ol.text==$t('view')" class="text">
|
||||
{{ol.text}}
|
||||
</span>
|
||||
<span v-if="ol.text==$t('delete')">
|
||||
<span v-if="ol.text==$t('delete')" v-has="'split:sarFileSplitInfo:delete'">
|
||||
{{ol.text}}
|
||||
</span>
|
||||
</a>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<iframe id="iframe" frameborder="0"></iframe>
|
||||
<iframe id="iframe" ref="iframe" frameborder="0" :style="'width:100%;height:'+iframeHeight+'px'"></iframe>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -9,10 +9,27 @@
|
||||
name: 'ocrSplit',
|
||||
data(){
|
||||
return{
|
||||
token:Vue.ls.get(ACCESS_TOKEN),
|
||||
token:Vue.ls.get(ACCESS_TOKEN),
|
||||
iframeHeight:'0',
|
||||
brownHeight:document.documentElement.clientHeight,
|
||||
iframeTop:''
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
brownHeight(){
|
||||
immediate: true
|
||||
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.iframeTop=this.$refs.iframe.getBoundingClientRect().top
|
||||
this.iframeHeight=this.brownHeight-this.iframeTop-10
|
||||
window.addEventListener('resize', () => {
|
||||
let brownHeight=document.documentElement.clientHeight
|
||||
let iframeTop=this.$refs.iframe.getBoundingClientRect().top
|
||||
this.iframeHeight=brownHeight-iframeTop-10
|
||||
// console.log('iframeTop',this.iframeHeight,this.brownHeight)
|
||||
}, false);
|
||||
setTimeout(() => {
|
||||
var iframe = document.querySelector("#iframe");
|
||||
this.populateIframe(iframe, [["X-Access-Token", this.token]]);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="doc-table-footer">
|
||||
<a-button type="primary" class="btn-export" @click="tableExport">{{$t('import')}}</a-button>
|
||||
<a-button type="primary" class="btn-export" @click="tableExport" v-has="'ocr:ocrRestful:addOcrRecord'">{{$t('import')}}</a-button>
|
||||
<a-button type="primary" @click="onClose">{{$t('cancel')}}</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
<search :flag="'3'" :url="url"/>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="handleModule">
|
||||
<div class="operator-text" @click="handleModule" v-has="'split ducument'">
|
||||
<a-icon type="plus" />
|
||||
{{ $t('SplitText') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleExport">
|
||||
<div class="operator-text" @click="handleExport" v-has="'import split result'">
|
||||
<a-icon type="export" />
|
||||
{{ $t('ImportResults') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleDel">
|
||||
<div class="operator-text" @click="handleDel" v-has="'split:sarFileSplitInfo:deleteBatch'">
|
||||
<a-icon type="delete" />
|
||||
{{ $t('BatchDelete') }}
|
||||
</div>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<!-- 拆分文件-->
|
||||
<split-upload ref="uploadFile" :accept="accept" :disabled="disabled" :module="'split'" @uploadSuccess="uploadSuccess"></split-upload>
|
||||
</div>
|
||||
<div class="operator-text" @click="downLoad">
|
||||
<div class="operator-text" @click="downLoad" v-has="'split:sarFileSplitItems:template'">
|
||||
<a-icon type="download" />
|
||||
模板下载
|
||||
</div>
|
||||
@@ -39,7 +39,7 @@
|
||||
<div class="imports-footer">
|
||||
<div class="imports-footer-wrap">
|
||||
|
||||
<a-button class="imports-btn imports-chai" type="primary" @click="handleSubmit">{{$t('preservation')}}</a-button>
|
||||
<a-button class="imports-btn imports-sub" type="primary" @click="handleSubmit" v-has="'split:sarFileSplitItems:importSplitResult'">{{$t('preservation')}}</a-button>
|
||||
<a-button class="imports-btn" type="primary" @click="cancleImports">{{$t('cancel')}}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -344,7 +344,7 @@
|
||||
.imports-footer-wrap{
|
||||
margin:20px 0;
|
||||
text-align: center;
|
||||
.imports-chai{
|
||||
.imports-sub{
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
</span>
|
||||
<template #overlay>
|
||||
<a-menu @click="({ key: menuKey }) => onContextMenuClick(treeKey, menuKey, record)">
|
||||
<a-menu-item key="1" @click="orgAdd">{{$t('newNode')}}</a-menu-item>
|
||||
<a-menu-item key="2" @click="orgEdit">{{$t('modifyNode')}}</a-menu-item>
|
||||
<a-menu-item key="3" @click="orgDelete" v-if="deleteNode" >{{$t('deleteNode')}}</a-menu-item>
|
||||
<a-menu-item key="1" @click="orgAdd" v-has="'split:sarFileSplitMenu:add'">{{$t('newNode')}}</a-menu-item>
|
||||
<a-menu-item key="2" @click="orgEdit" v-has="'split:sarFileSplitMenu:update'">{{$t('modifyNode')}}</a-menu-item>
|
||||
<a-menu-item key="3" @click="orgDelete" v-if="deleteNode" v-has="'split:sarFileSplitMenu:delete'">{{$t('deleteNode')}}</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
@@ -52,38 +52,38 @@
|
||||
:menuId="menuId" @resetSearch="resetSearch" @queryParams="queryParamsValues" />
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="handleCopyManage">
|
||||
<div class="operator-text" @click="handleCopyManage" v-has="'split:sarFileSplitItems:copy'">
|
||||
<a-icon type="copy" />
|
||||
{{ $t('copy') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleAddManage">
|
||||
<div class="operator-text" @click="handleAddManage" v-has="'split:sarFileSplitItems:add'">
|
||||
<a-icon type="plus" />
|
||||
{{ $t('add') }}
|
||||
</div>
|
||||
<div class="operator-text upload-split" @click="handleImportManage">
|
||||
<div class="operator-text upload-split" @click="handleImportManage" v-has="'split:sarFileSplitItems:import'">
|
||||
<a-icon type="import" :rotate="-90" v-if="uploadMenuId===undefined||uploadMenuId===''" />
|
||||
{{ (uploadMenuId===''||uploadMenuId===undefined)? $t('import'):'' }}
|
||||
<upload v-if="menuId" ref="uploadSplit":infoId="infoId" :menuId="uploadMenuId" @uploadSuccess="uploadSuccess"></upload>
|
||||
<!-- <ImportFile :url="url"/>-->
|
||||
|
||||
</div>
|
||||
<div class="operator-text" @click="handleExportManage">
|
||||
<div class="operator-text" @click="handleExportManage" v-has="'split:sarFileSplitItems:export'">
|
||||
<a-icon type="export" :rotate="-90"/>
|
||||
{{ $t('export') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleDownManage">
|
||||
<div class="operator-text" @click="handleDownManage" v-has="'split:sarFileSplitItems:template'">
|
||||
<a-icon type="download" />
|
||||
{{ $t('TemplateDownload') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleMergeManage">
|
||||
<div class="operator-text" @click="handleMergeManage" v-has="'split:sarFileSplitItems:merge'">
|
||||
<a-icon type="snippets" />
|
||||
{{ $t('MergerClause') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleManage">
|
||||
<div class="operator-text" @click="handleManage" v-has="'split:sarFileSplitItems:set'">
|
||||
<a-icon type="setting" />
|
||||
{{ $t('BatchSetting') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleBatCancel">
|
||||
<div class="operator-text" @click="handleBatCancel" v-has="'split:sarFileSplitItems:delete'">
|
||||
<a-icon type="delete" />
|
||||
{{ $t('BatchDelete') }}
|
||||
</div>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
</div>
|
||||
<div class="split-footer">
|
||||
<div class="split-footer-wrap">
|
||||
<a-button class="split-btn split-chai" type="primary" @click="submitSplit">{{$t('split')}}</a-button>
|
||||
<a-button class="split-btn split-chai" type="primary" @click="submitSplit" v-has="'split:sarFileSplitInfo:add'">{{$t('split')}}</a-button>
|
||||
<a-button class="split-btn" type="primary" @click="cancelSplit">{{$t('cancel')}}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user