Bläddra i källkod

文件收集,同步

ZaiZai 10 månader sedan
förälder
incheckning
bd4216ef25
3 ändrade filer med 19 tillägg och 14 borttagningar
  1. 4 1
      src/components/tree/hc-tree.vue
  2. 3 2
      src/config/index.json
  3. 12 11
      src/views/file/collection.vue

+ 4 - 1
src/components/tree/hc-tree.vue

@@ -1,7 +1,7 @@
 <template>
     <el-radio-group v-model="radioKeys" @change="treeRadioChange">
         <ElTree
-            ref="ElTreeRef" class="hc-tree-node tree-line el-radio-group" :class="ui" :props="ElTreeProps" :load="ElTreeLoadNode" lazy accordion highlight-current node-key="id"
+            ref="ElTreeRef" class="tree-line el-radio-group hc-tree-node" :class="ui" :props="ElTreeProps" :load="ElTreeLoadNode" lazy accordion highlight-current node-key="id"
             :default-expanded-keys="defaultExpandedCids" :indent="0" @node-click="ElTreeClick" @node-contextmenu="ElTreeLabelContextMenu2"
         >
             <template #default="{ node, data }">
@@ -513,6 +513,7 @@ const syncNodeMoadl = (node)=>{
             if (action === 'confirm') {
                 const { code } = await syncProjectTree({
                     id:node.data.id,
+                    associationType: data.associationType,
                 })
                 if (code == 200) {
                     window.$message?.success('同步成功')
@@ -533,6 +534,7 @@ const filesyncNodeMoadl = async (node, data)=>{
                 const { code } = await syncFileTree({
                     projectId:projectId.value,
                     contractId:data.contractId,
+                    associationType: data.associationType,
                 })
                 if (code == 200) {
                   await window.$message?.success('同步成功')
@@ -554,6 +556,7 @@ const syncVocieMoadl = async (node, data)=>{
                     projectId:projectId.value,
                     contractId:data.contractId,
                     nodeId:data.id,
+                    associationType: data.associationType,
                 })
                 if (code == 200) {
                   await window.$message?.success('同步成功')

+ 3 - 2
src/config/index.json

@@ -1,8 +1,9 @@
 {
     "version": "202304141558",
     "target1": "http://192.168.0.109:8090",
-    "target": "http://39.108.216.210:8090",
-    "target3": "http://183.247.216.148:28090",
+    "target": "http://192.168.0.125:8090",
+    "target3": "http://39.108.216.210:8090",
+    "target4": "http://183.247.216.148:28090",
     "socket": "wss://measure.hczcxx.cn/websocket",
     "localModel": false,
     "smsPhone": "",

+ 12 - 11
src/views/file/collection.vue

@@ -613,10 +613,9 @@ const ElTreeMenuClick = async ({ data, keys }) => {
             { icon: 'refresh', label: '文件同步', key: 'fileSync' },
             { icon: 'sort-asc', label: '排序', key: 'sort' },
         ]
-
     } else {
-        // 声像节点显示声像文件同步菜单
         if (data?.associationType === 3) {
+            //声像
             ElTreeMenu.value = [
                 { icon: 'add-circle', label: '新增', key: 'add' },
                 { icon: 'draft', label: '编辑', key: 'edit' },
@@ -626,6 +625,7 @@ const ElTreeMenuClick = async ({ data, keys }) => {
                 { icon: 'refresh', label: '声像文件同步', key: 'syncVocie' },
             ]
         } else if (data?.associationType === 6) {
+            //日志
             ElTreeMenu.value = [
                 { icon: 'add-circle', label: '新增', key: 'add' },
                 { icon: 'draft', label: '编辑', key: 'edit' },
@@ -634,6 +634,16 @@ const ElTreeMenuClick = async ({ data, keys }) => {
                 { icon: 'sort-asc', label: '排序', key: 'sort' },
                 { icon: 'refresh', label: '日志文件同步', key: 'syncVocie' },
             ]
+        } else if (data?.associationType === 2) {
+            //试验
+            ElTreeMenu.value = [
+                { icon: 'add-circle', label: '新增', key: 'add' },
+                { icon: 'draft', label: '编辑', key: 'edit' },
+                { icon: 'delete-bin', label: '删除', key: 'del' },
+                { icon: 'refresh', label: '目录同步', key: 'sync' },
+                { icon: 'sort-asc', label: '排序', key: 'sort' },
+                { icon: 'refresh', label: '试验文件同步', key: 'syncVocie' },
+            ]
         } else {
             ElTreeMenu.value = [
                 { icon: 'add-circle', label: '新增', key: 'add' },
@@ -643,15 +653,6 @@ const ElTreeMenuClick = async ({ data, keys }) => {
                 { icon: 'sort-asc', label: '排序', key: 'sort' },
             ]
         }
-        // ElTreeMenu.value = [
-        //     { icon: 'add-circle', label: '新增', key: 'add' },
-        //     { icon: 'draft', label: '编辑', key: 'edit' },
-        //     { icon: 'delete-bin', label: '删除', key: 'del' },
-        //     { icon: 'refresh', label: '目录同步', key: 'sync' },
-        //     { icon: 'sort-asc', label: '排序', key: 'sort' },
-        //     { icon: 'refresh', label: '声像文件同步', key: 'syncVocie' },
-        // ]
-
     }
 }
 //回车搜索