Prechádzať zdrojové kódy

重置文件题名按钮

duy 3 mesiacov pred
rodič
commit
bead1c0fda

+ 9 - 0
src/api/modules/data-fill/query.js

@@ -163,4 +163,13 @@ export default {
             data: form,
         })
     },
+    //重置文件题名
+    async flushQueryName(form) {
+        return HcApi({
+            url: '/api/bladex-business/informationWriteQuery/flushQueryName',
+            method: 'post',
+            params: form,
+        })
+    },
+
 }

+ 28 - 0
src/views/data-fill/query.vue

@@ -120,6 +120,16 @@
                                 <span>save-again</span>
                             </el-button>
                         </HcTooltip>
+                        <HcTooltip keys="data-query-resign-title">
+                            <el-button
+                                :disabled="tableCheckedKeys.length <= 0"
+                                :loading="resignTitleLoading" hc-btn
+                                color="#3F9EFF" style="color: white;" @click="resignTitleClick"
+                            >
+                                <HcIcon name="restart" />
+                                <span>重置题名</span>
+                            </el-button>
+                        </HcTooltip>
                     </template>
                     <template #search>
                         <div class="flex items-center">
@@ -1032,6 +1042,24 @@ const objArr = rows.map(row => ({
     }
 }
 const saveAginLoading = ref(false)
+
+//重置文件题名
+const resignTitleClick = async ()=>{
+    const rows = tableCheckedKeys.value
+
+    const ids = arrToId(rows)
+     resignTitleLoading.value = true
+     const { error, code, msg, data } = await queryApi.flushQueryName({
+        ids: ids,
+    })
+    //处理数据
+    resignTitleLoading.value = false
+    if (!error && code === 200) {
+        getTableData().then()
+    } 
+    
+}
+const resignTitleLoading = ref(false)
 </script>
 
 <style lang="scss" scoped>