Ver código fonte

案卷调整排序修改

duy 3 semanas atrás
pai
commit
5bb0d69e77
1 arquivos alterados com 14 adições e 16 exclusões
  1. 14 16
      src/views/archives/manage/tuning.vue

+ 14 - 16
src/views/archives/manage/tuning.vue

@@ -250,7 +250,7 @@
             </div>
         </hc-new-dialog>
         <!-- 调整排序 -->
-        <hc-new-dialog v-model="sortModal" is-row-footer is-table title="调整排序" widths="980px" @close="sortModalClose">
+        <hc-new-dialog v-model="sortModal" is-table title="调整排序" widths="980px" :loading="sortModalLoading" @close="sortModalClose" @save="sortModalSave">
             <el-alert :closable="false" title="可拖动排序,也可在后面点击图标,切换排序" type="error" />
             <div class="hc-table-h">
                 <HcTable
@@ -268,19 +268,6 @@
                     </template>
                 </HcTable>
             </div>
-            <template #leftRowFooter>
-                <el-button hc-btn @click="sortModalClose">
-                    <HcIcon name="close" />
-                    <span>取消</span>
-                </el-button>
-                <el-button :loading="sortModalLoading" hc-btn type="primary" @click="sortModalSave">
-                    <HcIcon name="check" />
-                    <span>确认</span>
-                </el-button>
-            </template>
-            <template #rightRowFooter>
-                <HcPages :pages="sortSearchForm" :sizes="[10, 20, 50, 100, 200, 300, 400, 500, 600]" @change="sortPageChange" />
-            </template>
         </hc-new-dialog>
         <!-- 编辑案卷信息 -->
         <hc-new-dialog v-model="showUploadModal" :title="editTitle" widths="80vw">
@@ -949,8 +936,19 @@ const upSortClick = (index) => {
 
 //保存
 const sortModalLoading = ref(false)
-const sortModalSave = () => {
-    sortModal.value = false
+const sortModalSave = async () => {
+    sortModalLoading.value = true
+    const { error, code } = await tuningApi.archiveFileBatchUpdate({
+        list: sortTableData.value,
+    }, false)
+    //判断状态
+    sortModalLoading.value = false
+    if (!error && code === 200) {
+        sortModal.value = false
+            getintableData()
+    } else {
+        window.$message?.error('保存失败')
+    }
 }
 
 //关闭