|
@@ -1,11 +1,76 @@
|
|
<template>
|
|
<template>
|
|
- <div class="hc-layout-box">
|
|
|
|
- 内外业进度
|
|
|
|
|
|
+ <div class="hc-layout-box" id="first-item-node-layout-target">
|
|
|
|
+ <div class="hc-layout-left-box" :style="'width:' + leftWidth + 'px;'">
|
|
|
|
+ <div class="hc-project-box">
|
|
|
|
+ <div class="hc-project-icon-box">
|
|
|
|
+ <HcIcon name="stack"/>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="ml-2 project-name-box">
|
|
|
|
+ <span class="text-xl text-cut project-alias">{{projectInfo['projectAlias']}}</span>
|
|
|
|
+ <div class="text-xs text-cut project-name">{{projectInfo['name']}}</div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="hc-tree-box">
|
|
|
|
+ <el-scrollbar>
|
|
|
|
+ tree
|
|
|
|
+ </el-scrollbar>
|
|
|
|
+ </div>
|
|
|
|
+ <!--左右拖动-->
|
|
|
|
+ <div class="horizontal-drag-line" @mousedown="onmousedown"/>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="hc-layout-content-box">
|
|
|
|
+ <HcCard>
|
|
|
|
+ <template #header>
|
|
|
|
+ 123
|
|
|
|
+ </template>
|
|
|
|
+ <template #extra>
|
|
|
|
+ <!--HcNewSwitch :datas="tabTypeTab" :keys="tabTypeKey" @change="tabTypeChange"/-->
|
|
|
|
+ </template>
|
|
|
|
+ 456
|
|
|
|
+ </HcCard>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
|
+import {onMounted, ref, watch} from 'vue'
|
|
|
|
+import {useAppStore} from "~src/store";
|
|
|
|
+//import WbsTree from "./components/WbsTree.vue"
|
|
|
|
+import {getStoreData, setStoreData} from '~src/utils/storage'
|
|
|
|
+import {getArrValue, isString, getObjValue, getObjNullValue} from "vue-utils-plus"
|
|
|
|
+
|
|
|
|
+//变量
|
|
|
|
+const useAppState = useAppStore()
|
|
|
|
+const projectId = ref(useAppState.getProjectId);
|
|
|
|
+const contractId = ref(useAppState.getContractId);
|
|
|
|
+const projectInfo = ref(useAppState.getProjectInfo);
|
|
|
|
+const isCollapse = ref(useAppState.getCollapse)
|
|
|
|
+
|
|
|
|
+//监听
|
|
|
|
+watch(() => [
|
|
|
|
+ useAppState.getCollapse
|
|
|
|
+], ([Collapse]) => {
|
|
|
|
+ isCollapse.value = Collapse
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
|
|
+//左右拖动,改变树形结构宽度
|
|
|
|
+const leftWidth = ref(382)
|
|
|
|
+const onmousedown = () => {
|
|
|
|
+ const leftNum = isCollapse.value ? 142 : 272
|
|
|
|
+ document.onmousemove = (ve) => {
|
|
|
|
+ const diffVal = ve.clientX - leftNum;
|
|
|
|
+ if(diffVal >= 310 && diffVal <= 900) {
|
|
|
|
+ leftWidth.value = diffVal;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ document.onmouseup = () => {
|
|
|
|
+ document.onmousemove = null;
|
|
|
|
+ document.onmouseup = null;
|
|
|
|
+ }
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|