ZaiZai 1 year ago
parent
commit
a736c8207d
3 changed files with 29 additions and 16 deletions
  1. 1 1
      httpApi/modules/image/index.js
  2. 7 4
      manifest.json
  3. 21 11
      pages/image/position.vue

+ 1 - 1
httpApi/modules/image/index.js

@@ -19,7 +19,7 @@ export default {
     async queryWorksTree(form) {
         return httpApi({
             url: '/api/blade-manager/wbsTreeContract/getConcealedWorksNodeTree',
-            method: 'get',
+            method: 'post',
             params: form,
         });
     },

+ 7 - 4
manifest.json

@@ -59,7 +59,8 @@
                     "<uses-permission android:name=\"com.huawei.android.launcher.permission.CHANGE_BADGE\"/>"
                 ],
                 "minSdkVersion" : 24,
-                "abiFilters" : [ "armeabi-v7a", "arm64-v8a" ]
+                "abiFilters" : [ "armeabi-v7a", "arm64-v8a" ],
+                "schemes" : "hczcapp"
             },
             "ios" : {
                 "devices" : "iphone",
@@ -70,7 +71,8 @@
                     "NSAppleMusicUsageDescription" : "上传声像文件,更换用户头像等功能需要获取设备上的媒体资料库权限,请允许。"
                 },
                 "dSYMs" : false,
-                "idfa" : false
+                "idfa" : false,
+                "urltypes" : "hczcapp"
             },
             /* ios打包配置 */
             "sdkConfigs" : {
@@ -136,8 +138,9 @@
             "base" : "./",
             "mode" : "hash"
         },
-        "title" : "智慧工程"
+        "title" : "数字工程"
     },
     "vueVersion" : "3",
-    "fallbackLocale" : "zh-Hans"
+    "fallbackLocale" : "zh-Hans",
+    "locale" : "zh-Hans"
 }

+ 21 - 11
pages/image/position.vue

@@ -17,7 +17,7 @@
             <hc-tree counts @load="getAllLoad" @nodeTap="nodeAllTap"/>
         </view>
         <view class="relative" un-border-t="1 solid gray-2" v-if="typeIndex === 1">
-            暂无接口
+            <hc-tree @load="getWorksLoad" @nodeTap="nodeWorksTap"/>
         </view>
 
         <!--底部操作栏-->
@@ -84,21 +84,31 @@ const nodeAllTap = ({data}) => {
 
 //数据类型
 const bindTypeChange = ({detail}) => {
-    const val = detail.value
-    typeIndex.value = val
-    if (val === 1) {
-        queryWorksTree()
-    }
+    typeIndex.value = detail.value
 }
 
 //获取隐蔽工程的节点
-const queryWorksTree = async () => {
-    const {id} = pageNode.value
-    const {data} = await mainApi.queryWorksTree({
+const getWorksLoad = async(node, resolve) => {
+    const { contractType } = contractInfo.value
+    const { id, contractIdRelation } = getObjValue(node.data)
+    const { data } = await mainApi.queryWorksTree({
         contractId: contractId.value,
-        classId: id,
+        contractIdRelation: contractIdRelation ?? '',
+        primaryKeyId: id ?? '',
+        parentId: id ?? '',
+        classifyType: contractType ?? '',
+        classId: pageNode.value?.id,
     })
-    console.log(data)
+    resolve(getArrValue(data))
+}
+
+//树节点被点击
+const nodeWorksTap = ({data}) => {
+    if (data?.notExsitChild) {
+        treeItem.value = getObjValue(data);
+    } else {
+        treeItem.value = {};
+    }
 }
 
 const toPageNode = () => {