|
@@ -14,7 +14,7 @@
|
|
|
</template>
|
|
|
|
|
|
<view class="relative" un-border-t="1 solid gray-2" v-if="typeIndex === 0">
|
|
|
- <hc-tree @load="getAllLoad" @nodeTap="nodeAllTap"/>
|
|
|
+ <hc-tree counts @load="getAllLoad" @nodeTap="nodeAllTap"/>
|
|
|
</view>
|
|
|
<view class="relative" un-border-t="1 solid gray-2" v-if="typeIndex === 1">
|
|
|
暂无接口
|
|
@@ -36,7 +36,7 @@
|
|
|
<script setup>
|
|
|
import {ref} from "vue";
|
|
|
import {onLoad} from '@dcloudio/uni-app'
|
|
|
-import treeApi from '~api/ledger/index';
|
|
|
+import mainApi from '~api/image/index';
|
|
|
import {useAppStore} from "@/store";
|
|
|
import {getArrValue, getObjValue} from "js-fast-way";
|
|
|
import {errorToast} from "@/utils/tools";
|
|
@@ -61,12 +61,13 @@ onLoad(({node}) => {
|
|
|
const getAllLoad = async (node, resolve) => {
|
|
|
const { contractType } = contractInfo.value
|
|
|
const { id, contractIdRelation } = getObjValue(node.data)
|
|
|
- const { data } = await treeApi.queryTreeList({
|
|
|
+ const { data } = await mainApi.queryTreeList({
|
|
|
contractId: contractId.value,
|
|
|
contractIdRelation: contractIdRelation ?? '',
|
|
|
primaryKeyId: id ?? '',
|
|
|
parentId: id ?? '',
|
|
|
classifyType: contractType ?? '',
|
|
|
+ classId: pageNode.value?.id,
|
|
|
})
|
|
|
resolve(getArrValue(data))
|
|
|
}
|
|
@@ -83,7 +84,21 @@ const nodeAllTap = ({data}) => {
|
|
|
|
|
|
//数据类型
|
|
|
const bindTypeChange = ({detail}) => {
|
|
|
- typeIndex.value = detail.value
|
|
|
+ const val = detail.value
|
|
|
+ typeIndex.value = val
|
|
|
+ if (val === 1) {
|
|
|
+ queryWorksTree()
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+//获取隐蔽工程的节点
|
|
|
+const queryWorksTree = async () => {
|
|
|
+ const {id} = pageNode.value
|
|
|
+ const {data} = await mainApi.queryWorksTree({
|
|
|
+ contractId: contractId.value,
|
|
|
+ classId: id,
|
|
|
+ })
|
|
|
+ console.log(data)
|
|
|
}
|
|
|
|
|
|
const toPageNode = () => {
|