瀏覽代碼

销毁案卷接口对接

duy 2 年之前
父節點
當前提交
a4c288cc90

+ 12 - 4
src/api/modules/archiveConfig/appraisal.js

@@ -9,12 +9,20 @@ export default {
         params: form
     }, msg)
   },
-//获取立卷单位列表
-async getFilingUnitList(form, msg = true) {
+  //获取立卷单位列表
+  async getFilingUnitList(form, msg = true) {
+      return httpApi({
+          url: '/api/blade-archive/archivesauto/getFilingUnitList',
+          method: 'get',
+          params: form
+      }, msg)
+  },
+  //批量销毁
+  async batchDestroyArchive(form, msg = true) {
     return httpApi({
-        url: '/api//blade-archive/archivesauto/getFilingUnitList',
+        url: '/api/blade-archive/archivesauto/batchDestroyArchive',
         method: 'get',
         params: form
     }, msg)
-  },
+},
 }

+ 25 - 3
src/views/archives/appraisal.vue

@@ -83,7 +83,7 @@
                 </template>
             </HcCard>
         </div>
-        <DestoryDialog :show="showdestorydialog" :length="tableCheckedKeys.length" @upshow="upshow"></DestoryDialog>
+        <DestoryDialog :show="showdestorydialog" :length="tableCheckedKeys.length" @upshow="upshow" @comfirmDestory="comfirmDestory" :isLoading="isLoading"></DestoryDialog>
     </div>
   
 </template>
@@ -97,7 +97,7 @@ import ProjectTree from "./components/ProjectTree.vue"
 import DestoryDialog from './components/destory-dialog.vue'
 import projectScanningApi from "~api/other-file/projectScanning";
 import {getStoreValue, setStoreValue} from '~src/utils/storage'
-import {downloadBlob, getArrValue, deepClone} from "js-fast-way"
+import {downloadBlob, getArrValue, arrToId} from "js-fast-way"
 import appraialApi from "~api/archiveConfig/appraisal.js";
 
 //变量
@@ -140,6 +140,27 @@ const upshow = (val) => {
     showdestorydialog.value=val
 
 }
+const isLoading=ref(false)
+//确认销毁comfirmDestory
+const comfirmDestory = async() => {
+    const rows = tableCheckedKeys.value
+    if (rows.length > 0) {
+        isLoading.value = true
+        const ids = arrToId(rows)
+        const { error, code, msg } = await appraialApi.batchDestroyArchive({
+            nodeId:  nodeId.value,
+            ids: ids
+        })
+        isLoading.value = false
+        //处理数据
+        if (!error && code === 200) {
+            window.$message?.success(msg)
+          
+        } 
+        showdestorydialog.value=false
+        getTableData()
+    } 
+}
 //日期时间被选择
 const betweenTime = ref(null)
 const betweenTimeUpdate = ({arr,query}) => {
@@ -153,7 +174,6 @@ const searchClick = () => {
 }
 //打开弹窗
 const showdialog = () => {
-    console.log('销毁案件');
     showdestorydialog.value= true;
 
 }
@@ -227,6 +247,7 @@ const getTableData = async () => {
         tableData.value = []
         searchForm.value.total = 0
     }
+    tableRef.value?.clearSelection()
 }
 //获取立卷单位列表getFilingUnitList
 const getFilingUnitListdata=async()=>{
@@ -241,6 +262,7 @@ const getFilingUnitListdata=async()=>{
         filingUnit.value = []
      
     }
+ 
 }
 const showHistory=()=>{
     searchForm.value.isDeleted = 1

+ 4 - 2
src/views/archives/components/destory-dialog.vue

@@ -64,7 +64,7 @@ watch(() => [
 
 //事件
 // const emit = defineEmits(['cancel', 'confirm'])
-const emits = defineEmits(['upshowModal'])
+const emits = defineEmits(['upshow','comfirmDestory'])
 //取消
 const cancelClick = () => {
       showModal.value = false
@@ -74,10 +74,12 @@ const cancelClick = () => {
 //确认
 const confirmClick = async () => {
     showModal.value = true
-       emits('upshow', false)
+    emits('comfirmDestory')
+     
 }
 
 
+
 </script>
 <style lang="scss">
 .modalbox{