Browse Source

同步质检按钮增加

duy 2 năm trước cách đây
mục cha
commit
4d8f98daeb
2 tập tin đã thay đổi với 31 bổ sung0 xóa
  1. 8 0
      src/api/modules/data-fill/wbs.js
  2. 23 0
      src/views/data-fill/wbs.vue

+ 8 - 0
src/api/modules/data-fill/wbs.js

@@ -290,4 +290,12 @@ export default {
             data: form
         }, msg)
     },
+    //同步质检资料
+    async syncTbadata(form, msg = true) {
+        return httpApi({
+            url: '/api/blade-manager/wbsTreeContract/sync-tab-data',
+            method: 'post',
+            params: form
+        },msg);
+    },
 }

+ 23 - 0
src/views/data-fill/wbs.vue

@@ -148,6 +148,10 @@
                             <HcIcon name="file"/>
                             <span>附件</span>
                         </el-button>
+                        <el-button hc-btn @click="syncdata" v-if="authBtnTabKey==='2'" :loading="syncdataloading">
+                            <HcIcon name="refresh"/>
+                            <span>同步质检资料</span>
+                        </el-button>
                     </template>
                 </HcCard>
             </div>
@@ -1909,6 +1913,25 @@ const onmousedown = () => {
         isMouseTree.value = false;
     }
 }
+//同步质检资料
+const syncdataloading=ref(false)
+const syncdata=async()=>{
+    const info = nodeDataInfo.value;
+    syncdataloading.value=true
+    const {error, code,msg} = await wbsApi.syncTbadata({
+        pKeyId: info?.primaryKeyId || '',
+       
+    })
+    syncdataloading.value=false
+    if (!error && code === 200) {
+        window.$message?.success(msg)
+        getTableDataAll()
+        // window?.location?.reload()  //刷新页面
+
+    }
+}
+
+
 </script>
 
 <style lang="scss" scoped>