修改算法库拖动问题
This commit is contained in:
@@ -2,32 +2,39 @@
|
|||||||
<div class="default-main" :style="height">
|
<div class="default-main" :style="height">
|
||||||
<!-- 标准库 -->
|
<!-- 标准库 -->
|
||||||
|
|
||||||
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
|
<splitpanes
|
||||||
|
style="height: 100%"
|
||||||
|
class="default-theme"
|
||||||
|
id="navigation-splitpanes"
|
||||||
|
@resize="onPaneResize"
|
||||||
|
@resized="onPaneResized"
|
||||||
|
>
|
||||||
<pane :size="size">
|
<pane :size="size">
|
||||||
<standardTree ref="treeRef"
|
<standardTree ref="treeRef"
|
||||||
:default-expanded-keys="monitoringPoint.state.lineId ? [monitoringPoint.state.lineId] : []"
|
:default-expanded-keys="monitoringPoint.state.lineId ? [monitoringPoint.state.lineId] : []"
|
||||||
:current-node-key="monitoringPoint.state.lineId" @node-click="handleNodeClick"
|
:current-node-key="monitoringPoint.state.lineId" @node-click="handleNodeClick"
|
||||||
@init="handleNodeClick"></standardTree>
|
@init="handleNodeClick"></standardTree>
|
||||||
</pane>
|
</pane>
|
||||||
<pane style="background: #fff" :style="height">
|
<pane style="background: #fff" class="standard-pane">
|
||||||
<div class="pd10" style="display: flex; justify-content: end">
|
<div class="pd10 standard-pane__toolbar" style="display: flex; justify-content: end">
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addUser" v-if="information">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="addUser" v-if="information">新增</el-button>
|
||||||
<el-button icon="el-icon-Edit" type="primary" @click="editUser" v-if="information">修改</el-button>
|
<el-button icon="el-icon-Edit" type="primary" @click="editUser" v-if="information">修改</el-button>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven"
|
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven"
|
||||||
v-if="information">删除</el-button>
|
v-if="information">删除</el-button>
|
||||||
<el-button icon="el-icon-Download" type="primary" @click="download" v-if="flag">下载</el-button>
|
<el-button icon="el-icon-Download" type="primary" @click="download" v-if="flag">下载</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-empty v-if="url.length == 0" description="暂无数据" class="custom-empty"
|
<el-empty v-if="url.length == 0" description="暂无数据" class="custom-empty standard-pane__content" />
|
||||||
:style="`height: calc(${height.height} - 60px);`" />
|
<div v-else class="standard-pane__content">
|
||||||
<div :style="`height: calc(${height.height} - 60px);overflow: auto;`" v-else>
|
<div v-show="!isPaneResizing" class="standard-preview">
|
||||||
<vue-office-docx v-if="urlKey.includes('.doc') || urlKey.includes('.docx')" :src="url" />
|
<vue-office-docx v-if="urlKey.includes('.doc') || urlKey.includes('.docx')" :src="url" />
|
||||||
<vue-office-excel v-if="urlKey.includes('.xls') || urlKey.includes('.xlsx')" :src="url"
|
<vue-office-excel v-if="urlKey.includes('.xls') || urlKey.includes('.xlsx')" :src="url"
|
||||||
:options="excelOptions" />
|
:options="excelOptions" />
|
||||||
<!-- <vue-office-pdf v-if="url.includes('.pdf')" :src="url"/> -->
|
<!-- <vue-office-pdf v-if="url.includes('.pdf')" :src="url"/> -->
|
||||||
<iframe v-if="urlKey.includes('.pdf')" :src="url" style="width: 100%; height: 99%"></iframe>
|
<iframe v-if="urlKey.includes('.pdf')" :src="url" style="width: 100%; height: 100%"></iframe>
|
||||||
<img v-if="
|
<img v-if="
|
||||||
urlKey.includes('.png') || urlKey.includes('.jpg') || urlKey.includes('.gif') || urlKey.includes('.bmp')
|
urlKey.includes('.png') || urlKey.includes('.jpg') || urlKey.includes('.gif') || urlKey.includes('.bmp')
|
||||||
" :src="url" />
|
" :src="url" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</pane>
|
</pane>
|
||||||
</splitpanes>
|
</splitpanes>
|
||||||
@@ -70,7 +77,16 @@ const addTreeRef = ref()
|
|||||||
const url = ref('')
|
const url = ref('')
|
||||||
const dotList: any = ref({})
|
const dotList: any = ref({})
|
||||||
const flag: any = ref(false)
|
const flag: any = ref(false)
|
||||||
|
const isPaneResizing = ref(false)
|
||||||
const information = adminInfo.roleCode.includes('information_info')
|
const information = adminInfo.roleCode.includes('information_info')
|
||||||
|
const onPaneResize = () => {
|
||||||
|
isPaneResizing.value = true
|
||||||
|
}
|
||||||
|
const onPaneResized = () => {
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
isPaneResizing.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const dom = document.getElementById('navigation-splitpanes')
|
const dom = document.getElementById('navigation-splitpanes')
|
||||||
if (dom) {
|
if (dom) {
|
||||||
@@ -166,6 +182,36 @@ const download = () => {
|
|||||||
background: #eaeef1;
|
background: #eaeef1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:deep(.splitpanes__pane) {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.standard-pane {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.standard-pane__toolbar {
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.standard-pane__content {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.standard-preview {
|
||||||
|
height: 99%;
|
||||||
|
min-height: 99%;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.splitpanes--dragging) .standard-preview {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.grid-content {
|
.grid-content {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user