fei
22 小时以前 59bef840be5148dc69eb4864528a969d02e50f5e
src/views/archiveManager/archiveMaterial/index.vue
@@ -796,7 +796,7 @@
  </template>
  <script>
  import { getFileCount,islegal, listMaterials, enload, getMaterials, delMaterials, addMaterials, updateMaterials } from "@/api/system/materials"
  import {insertFile, getFileCount,islegal, 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"
@@ -806,6 +806,7 @@
    name: "Materials",
    data() {
      return {
        totalPageCount: 0,
        // 记录元素初始位置和状态
  originalOffsetLeft: 0,
        originalWidth: 0,
@@ -1000,6 +1001,9 @@
    created() {
      //const roleId = this.$route.params && this.$route.params.roleId
      const recordId = this.$route.params && this.$route.params.recordId
      this.totalPageCount = this.$route.params && this.$route.params.pageCount
      //alert(this.totalPageCount)
      //alert(recordId)
      this.recordId = recordId;
      this.uploadUrl = process.env.VUE_APP_BASE_API +'/system/materials/upload/'+this.recordId
@@ -1044,6 +1048,11 @@
    },
       // 打开导入对话框
    handleImport() {
      //生成新的记录
      insertFile(this.recordId, this.totalPageCount).then(response => {
        console.log(response)
      //  alert(3245)
        })
      this.importDialogVisible = true
    },
    // 文件移除
@@ -1073,8 +1082,9 @@
     islegal(this.recordId).then(response => {
       console.log(response.data)
       var res = response.data.res
       //alert(response.data.total)
       if(fileCount!==response.data.total)
       if(fileCount!=this.totalPageCount)
       {
         this.$modal.msgWarning('请选择与记录数一致的文件')
         return