fei
2025-10-14 fc98e676332302c4b835f8fa4ed42d72e177801f
src/views/archiveManager/archiveMaterial/index.vue
@@ -162,6 +162,10 @@
         <el-button type="primary" @click="resetForms">重置</el-button>
          <el-button @click="cancel">取 消</el-button>
                    <el-button type="warning" @click="cancelAuthUser">退回管理员</el-button>
        </div>
@@ -689,7 +693,10 @@
  <script>
  import { listMaterials, enload, getMaterials, delMaterials, addMaterials, updateMaterials } from "@/api/system/materials"
import { getToken } from '@/utils/auth'
import store from '@/store'
import { updateStatusById } from "@/api/system/records"
import {delArchiverecordstouserByReIdAndUid} from "@/api/system/archiverecordstouser"
  export default {
    name: "Materials",
    data() {
@@ -865,8 +872,10 @@
  this.$refs.upload.clearFiles();
  // 关闭上传对话框
  this.importDialogVisible = false;
  // 刷新列表数据
  this.getList();        // 这里可以调用接口关联上传的文件和当前记录
        // 刷新列表数据
        this.getList();        // 这里可以调用接口关联上传的文件和当前记录
        //更新档案的状态
      } else {
        // alert(234)
        console.log(response)
@@ -925,6 +934,10 @@
  if ((e.ctrlKey || e.metaKey) && e.key === 'd') {
    e.preventDefault();
    this.resetForms();
  }
  if ((e.ctrlKey || e.metaKey) && e.key === 'w') {
    e.preventDefault();
    this.closeCurrentTab();
  }
    },
      /** 查询【请填写功能名称】列表 */
@@ -1038,15 +1051,19 @@
        })
      },
      resetForms()
      {
    {
   this.reset()
          this.form.securityLevel = '普通' // 设置对话框表单默认值
          this.form.isSensitive = '否' // 设置对话框表单默认值
          this.form.isCanceled = '否' // 设置对话框表单默认值
          this.form.isAttachment = '否' // 设置对话框表单默认值
          this.form.isDiagram = '否' // 设置对话框表单默认值
          this.form.retentionPeriod = '永久' // 设置对话框表单默认值
      },
          this.form.securityLevel = '普通'
          this.form.isSensitive = '否'
          this.form.isCanceled = '否'
          this.form.isAttachment = '否'
          this.form.isDiagram = '否'
          this.form.retentionPeriod = '永久'
    },
    closeCurrentTab() {
      this.$store.dispatch('tagsView/delView', this.$route)
      this.$router.push('/archiveManager/infoManager')
    },
      submitForm()
      {
        console.log(this.form)
@@ -1133,7 +1150,33 @@
    this.$message.error('导入失败: ' + (error.message || '未知错误'));
  });
    }
    },
     /** 取消授权按钮操作 */
    cancelAuthUser(row) {
      const recordId =  this.recordId
      var userId = store.state.user.id
      var _this = this
      // alert(userId)
      // alert(userId)
      // alert(this.queryParams.archiveRecordsId)
      // alert(row.sysUser.userName)
      this.$modal.confirm('确认要取消该用户的"' + '' + '"授权吗?').then(function() {
        return delArchiverecordstouserByReIdAndUid({  recordId: recordId, userId: userId   })
      }).then(() => {
      //  this.getList()
      //修改案卷的状态
  //  var id = row.id
      var status = '未上传附件'
      updateStatusById(status, recordId).then(response=>{
      //  this.$modal.msgSuccess("提交成功")
      //  this.getList()
      _this.$store.dispatch('tagsView/delView', this.$route);
        _this.$router.push('/archiveManager/infoManager')
        _this.$modal.msgSuccess("取消授权成功")
      })
      }).catch(() => {})
    },
    }
  }
  </script>