Browse Source

Merge branch 'develop' of http://git.kdan.cc:8865/Server_Service/pdf_tech_front_end into develop

# Conflicts:
#	src/views/Dashboard.vue
#	src/views/Device.vue
#	src/views/MenageAdmin/addAdmin.vue
#	src/views/MenageAdmin/editAdmin.vue
#	src/views/Settings.vue
#	src/views/TeamManagement/ManageMember.vue
#	src/views/TeamManagement/ManageMember/AddManageMember.vue
#	src/views/TeamManagement/ManageMember/EditManageMember.vue
#	src/views/TeamManagement/ManageTeam.vue
#	src/views/TeamManagement/ManageTeamOperate.vue
#	src/views/VolumeCancel.vue
lisiyan 2 years ago
parent
commit
b9fe6ab717

+ 27 - 2
src/views/Assignlicense.vue

@@ -12,7 +12,9 @@ export default {
       memberId: '',
       teamList: [],
       memberList: [],
-      productList: []
+      productList: [],
+      singleLoading: false,
+      teamLoading: false
     }
   },
   mounted() {
@@ -71,6 +73,15 @@ export default {
   },
   methods: {
     assignLicense() {
+      if (this.signleAssign === ''
+      || this.memberId === '' || this.memberId == undefined || this.memberId == null || this.memberId.length <= 0
+      || this.signleProduct === '' || this.signleProduct == undefined || this.signleProduct == null || this.signleProduct.length <= 0
+      ) {
+        this.$message.error('Missing required information')
+        return
+      }
+      if (this.singleLoading) return
+      this.singleLoading = true
       var urlencoded = new URLSearchParams()
       urlencoded.append('memberIds', this.memberId)
       urlencoded.append('teamId', this.signleAssign)
@@ -79,6 +90,9 @@ export default {
         '/pdf-tech/vppLicenseCode/singleAssign',
         urlencoded
       ).then((res) => {
+        setTimeout(() => {
+          this.singleLoading = false
+        }, 1000)
         if (res.data.code === 200 && res.data.msg == ' Assign Success!') {
           this.$message({
             message: 'Assign Success!',
@@ -96,13 +110,24 @@ export default {
       })
     },
     assignTeamLicense() {
+      if (this.teamAssign === ''
+      || this.teamProduct === '' || this.teamProduct == undefined || this.teamProduct == null || this.teamProduct.length <= 0
+      ) {
+        this.$message.error('Missing required information')
+        return
+      }
+      if (this.teamLoading) return
+      this.teamLoading = true
       var urlencoded = new URLSearchParams()
-      urlencoded.append('teamId', this.teamAssing)
+      urlencoded.append('teamId', this.teamAssign)
       urlencoded.append('productIds', this.teamProduct)
       post(
         '/pdf-tech/vppLicenseCode/teamAssign',
         urlencoded
       ).then((res) => {
+        setTimeout(() => {
+          this.teamLoading = false
+        }, 1000)
         if (res.data.code === 200 && res.data.msg == ' Assign Success!') {
           this.$message({
             message: 'Assign Success!',

+ 25 - 7
src/views/Dashboard.vue

@@ -21,12 +21,14 @@ export default {
         timeLeft: null
       },
       dataFilterProductSelect: '',
+      dataFilterSelectLoading: false,
       chartData: {
         date: [],
         assignedLicensesYData: [],
         activatedLicenseYData: []
       },
-      chartSelectValue: '',   
+      chartSelectValue: '',
+      chartSelectLoading: false,
       teamData: {
         totalTeam: null,
         totalMember: null,
@@ -39,13 +41,14 @@ export default {
       },
       teamList: [],
       teamSelect: '',
-      teamFilterProductSelect: ''
+      teamFilterProductSelect: '',
+      teamSelectLoading: false
     }
   },
   created () {
     this.getOverview()
     this.getOverviewProduct()
-    this.getChartStatistics(1)
+    this.getChartStatistics(2)
     this.getTeamData()
     this.getTeamMemberData()
     this.getProductList()
@@ -68,9 +71,14 @@ export default {
     },
     // 获取全局预览数据,区分产品
     getOverviewProduct () {
-      get('/pdf-tech/vppDashboard/getOverviewProduct', {
+      if (this.dataFilterSelectLoading) return
+      this.dataFilterSelectLoading = true
+      get('http://81.68.234.235:8032/pdf-tech/vppDashboard/getOverviewProduct', {
         codeList: this.dataFilterProductSelect
       }).then((res) => {
+        setTimeout(() => {
+          this.dataFilterSelectLoading = false
+        }, 1000)
         Object.keys(this.overviewProduct).forEach(key => (this.overviewProduct[key] = ''))
         if (res.data.code === 200) {
           this.overviewProduct.totalLicenses = res.data.result.totalLicenses
@@ -84,12 +92,17 @@ export default {
     },
     // 获取图表数据
     getChartStatistics (type) {
+      if (this.chartSelectLoading) return
+      this.chartSelectLoading = true
       if (this.chartSelectValue !== '') {
         type = this.chartSelectValue
       } else {
-        type = 1
+        type = 2
       }
-      get('/pdf-tech/vppDashboard/getChartStatistics/' + type).then((res) => {
+      get('http://81.68.234.235:8032/pdf-tech/vppDashboard/getChartStatistics/' + type).then((res) => {
+        setTimeout(() => {
+          this.chartSelectLoading = false
+        }, 1000)
         if (res.data.code === 200) {
           this.chartData.date = []
           this.chartData.assignedLicensesYData = []
@@ -117,10 +130,15 @@ export default {
     },
     // 获取团队成员数据
     getTeamMemberData () {
-      get('/pdf-tech/vppDashboard/getTeamMemberData', {
+      if (this.teamSelectLoading) return
+      this.teamSelectLoading = true
+      get('http://81.68.234.235:8032/pdf-tech/vppDashboard/getTeamMemberData', {
         teamId: this.teamSelect,
         codeList: this.teamFilterProductSelect
       }).then((res) => {
+        setTimeout(() => {
+          this.teamSelectLoading = false
+        }, 1000)
         Object.keys(this.teamMemberData).forEach(key => (this.teamMemberData[key] = ''))
         if (res.data.code === 200) {
           this.teamMemberData.teamMember = res.data.result.teamMember

+ 14 - 2
src/views/Device.vue

@@ -26,7 +26,9 @@ export default {
       dialogVisible: false,
       deviceId: '',
       cancelEmail: '',
-      cancelUniqueSn: ''
+      cancelUniqueSn: '',
+      filterLoading: false,
+      downloadLoading: false
     }
   },
   mounted() {
@@ -41,6 +43,8 @@ export default {
   methods: {
     //分页查询
     pagingQuery() {
+      if (this.filterLoading) return
+      this.filterLoading = true
       get(
         '/pdf-tech/vppDevice/page?page=' +
           this.currentPage +
@@ -60,6 +64,9 @@ export default {
           'queryString=' +
           this.queryString
       ).then((res) => {
+        setTimeout(() => {
+          this.filterLoading = false
+        }, 1000)
         this.tableData = res.data.result.list
         this.total = res.data.result.total
       })
@@ -120,12 +127,17 @@ export default {
     },
     // 下载设备文件
     downLoad(){
+      if (this.downloadLoading) return
+      this.downloadLoading = true
       var urlencoded = new URLSearchParams()
       urlencoded.append("queryString", this.queryString)
       urlencoded.append("productId", this.productId)
       urlencoded.append("teamId", this.teamId)
       urlencoded.append("status", this.status)
-      downLoad("/pdf-tech/vppDevice/download", urlencoded).then((res)=>{
+      downLoad("http://81.68.234.235:8032/pdf-tech/vppDevice/download", urlencoded).then((res)=>{
+        setTimeout(() => {
+          this.downloadLoading = false
+        }, 2000)
         let url = window.URL.createObjectURL(new Blob([res.data], { type: '.xlsx' }))
         let a= document.createElement('a')
         a.style.display = 'none'

+ 12 - 0
src/views/LicenseManage.vue

@@ -19,6 +19,8 @@ const productList = ref([])
 const teamList = ref([])
 const dialogVisible = ref(false)
 const cancelEmail = ref('')
+const filterLoading = ref(false)
+const downloadLoading = ref(false)
 onMounted(() => {
   let pageText = document.getElementsByClassName('el-pagination__jump')[0]
   if (pageText) {
@@ -29,6 +31,8 @@ onMounted(() => {
   getTeamList()
 })
 const pagingQuery = (val) => {
+  if (filterLoading.value) return
+  filterLoading.value = true
   get(
     '/pdf-tech/vppLicenseCode/page?page=' +
       currentPage.value +
@@ -48,6 +52,9 @@ const pagingQuery = (val) => {
       'queryString=' +
       queryString.value
   ).then((res) => {
+    setTimeout(() => {
+      filterLoading.value = false
+    }, 1000)
     tableData.value = res.data.result.list
     total.value = res.data.result.total
   })
@@ -79,6 +86,8 @@ const handleClick = (val) => {
 }
 //导出序列码
 const download = () => {
+  if (downloadLoading.value) return
+  downloadLoading.value = true
   var urlencoded = new URLSearchParams()
   urlencoded.append("queryString", queryString.value)
   urlencoded.append("productId", productId.value)
@@ -86,6 +95,9 @@ const download = () => {
   urlencoded.append("status", status.value)
   downLoad('/pdf-tech/vppLicenseCode/download',urlencoded).then(
     (res) => {
+      setTimeout(() => {
+        downloadLoading.value = false
+      }, 2000)
       let url = window.URL.createObjectURL(new Blob([res.data], { type: '.xlsx' }))
       let a= document.createElement('a')
       a.style.display = 'none'

+ 14 - 3
src/views/ManageAdmin.vue

@@ -15,6 +15,8 @@ const teamList = ref([])
 const total = ref(0)
 const dialogVisible = ref(false)
 const cancelEmail = ref('')
+let click = true
+
 onMounted(() => {
   let pageText = document.getElementsByClassName('el-pagination__jump')[0]
   if (pageText) {
@@ -46,13 +48,22 @@ const pagingQuery = () => {
       'queryString=' +
       queryString.value 
   ).then((res) => {
-    tableData.value = res.data.result.list
-    total.value = res.data.result.total
+    //限制点击
+    setTimeout(() => {
+      click = true
+    }, 1000)
+    if(res.data.code === 200){
+      tableData.value = res.data.result.list
+      total.value = res.data.result.total
+    }
   })
 }
 //筛选
 const searchInfo = () => {
-  pagingQuery()
+  if(click){
+    click = false
+    pagingQuery()
+  }
 }
 // 获取团队管理列表
 const getTeamList = (val) => {

+ 32 - 24
src/views/MenageAdmin/addAdmin.vue

@@ -1,6 +1,6 @@
 <script>
 import { post, get } from '../../../utils/request'
-import Warning from '@/components/icon/warning.vue'
+// import Warning from '@/components/icon/warning.vue'
 
 export default {
   data() {
@@ -10,10 +10,11 @@ export default {
         TeamAdmin: [],
       },
       teamList: {},
-      dialogVisible: false,
+      click: true,
+      // dialogVisible: false,
     }
   },
-  components:{Warning},
+  // components:{Warning},
   methods: {
     // 重置表单
     resetForm (formName) {
@@ -22,25 +23,32 @@ export default {
     },
     //提交添加表单
     submitFormSingle(){
-      if (this.formData.AdminEmail.trim() === '' || this.formData.TeamAdmin.length === 0) {
-        this.$message.error('Missing required information')
-      } else {
-        var urlencoded = new URLSearchParams()
-        urlencoded.append("teamIds", this.formData.TeamAdmin)
-        urlencoded.append("account", this.formData.AdminEmail)
-        post('/pdf-tech/vppTeam/sendEmailForAddTeamAdmin', urlencoded).then((res)=>{
-          if(res.data.code === 200){
-            this.$message({
-              message: 'Change Success',
-              type: "success",
-            })
-          } else if(res.data.msg === "Member has joined a non-default team"){
-            this.$message({
-              message: 'Member has joined a non-default team',
-              type: "error",
-            })
-          }
-        })
+      if(this.click){
+        this.click = false
+        if (this.formData.AdminEmail.trim() === '' || this.formData.TeamAdmin.length === 0) {
+          this.$message.error('Missing required information')
+        } else {
+          var urlencoded = new URLSearchParams()
+          urlencoded.append("teamIds", this.formData.TeamAdmin)
+          urlencoded.append("account", this.formData.AdminEmail)
+          post('http://81.68.234.235:8032/pdf-tech/vppTeam/sendEmailForAddTeamAdmin', urlencoded).then((res)=>{
+            if(res.data.code === 200){
+              this.$message({
+                message: 'Change Success',
+                type: "success",
+              })
+            } else if(res.data.msg === "Member has joined a non-default team"){
+              this.$message({
+                message: 'Member has joined a non-default team',
+                type: "error",
+              })
+            }
+          })
+        }
+        //限制点击
+        setTimeout(() => {
+          this.click = true
+        }, 3000)
       }
     },
   },
@@ -129,7 +137,7 @@ export default {
       </el-form>
     </div>
     <!-- 账号未注册弹出框 -->
-    <el-dialog
+    <!-- <el-dialog
       title=""
       :visible.sync="dialogVisible"
       width="376px"
@@ -145,7 +153,7 @@ export default {
         <el-button @click="dialogVisible = false">Cancel</el-button>
         <el-button type="primary" @click="sureSave">Yes</el-button>
       </span>
-    </el-dialog>
+    </el-dialog> -->
   </div>
 </template>
 

+ 24 - 16
src/views/MenageAdmin/editAdmin.vue

@@ -11,6 +11,7 @@ export default {
       email: '',
       memberId: '',
       teamList: [],
+      click: true
     }
   },
   created () {
@@ -32,21 +33,28 @@ export default {
   methods: {
     // 提交表单
     submitForm () {
-      var urlencoded = new URLSearchParams()
-      urlencoded.append("memberId", this.memberId)
-      urlencoded.append("teamIds", this.formData.TeamAdmin)
-      if (this.formData.TeamAdmin.length === 0) {
-        this.$message.error('Please choose a team')
-      } else {
-      post( '/pdf-tech/vppTeam/editTeamAdmin',urlencoded ).then((res)=>{
-        if(res.data.code === 200){
-            this.$message({
-              message: 'Change Success',
-              type: "success",
-            })
-          }
-      })
-    }
+      if(this.click){
+        this.click = false
+        var urlencoded = new URLSearchParams()
+        urlencoded.append("memberId", this.memberId)
+        urlencoded.append("teamIds", this.formData.TeamAdmin)
+        if (this.formData.TeamAdmin.length === 0) {
+          this.$message.error('Please choose a team')
+        } else {
+          post( 'http://81.68.234.235:8032/pdf-tech/vppTeam/editTeamAdmin',urlencoded ).then((res)=>{
+            if(res.data.code === 200){
+                this.$message({
+                  message: 'Change Success',
+                  type: "success",
+                })
+              }
+          })
+        }
+        //限制点击
+        setTimeout(() => {
+          this.click = true
+        }, 3000)
+      }
     },
     // 重置表单
     resetForm (formName) {
@@ -99,7 +107,7 @@ export default {
               @click="resetForm('formData')">Cancel</div>
           </router-link>
           <div >
-            <div class="w-152px h-40px border-1 border-[#1460F3] rounded-8px bg-[#1460F3] text-center text-16px text-[#fff] font-700 leading-40px hover:bg-[#3776f2]"
+            <div class="w-152px h-40px border-1 border-[#1460F3] rounded-8px bg-[#1460F3] text-center text-16px text-[#fff] font-700 leading-40px hover:bg-[#3776f2] cursor-pointer"
               @click="submitForm()">Save</div>
           </div>
         </div> 

+ 6 - 0
src/views/ProductManagement.vue

@@ -14,6 +14,7 @@ const cancelUniqueSn = ref('')
 const total = ref(0)
 const productList = ref([])
 const productId = ref('')
+const loading = ref(false)
 
 onMounted(() => {
   let pageText = document.getElementsByClassName('el-pagination__jump')[0]
@@ -29,6 +30,8 @@ const searchInfo = () => {
 }
 //获取分页数据
 const pagingQuery = () => {
+  if (loading.value) return
+  loading.value = true
   get(
     '/pdf-tech/vppOrderDetail/pageByCompany?page=' +
       currentPage.value +
@@ -39,6 +42,9 @@ const pagingQuery = () => {
       'code=' +
       productId.value
   ).then((res) => {
+    setTimeout(() => {
+      loading.value = false
+    }, 1000)
     tableData.value = res.data.result.list
     total.value = res.data.result.total
   })

+ 8 - 3
src/views/Settings.vue

@@ -38,7 +38,8 @@ export default {
             trigger: ['']
           }
         ]
-      }
+      },
+      generalLoading: false
     }
   },
   methods: {
@@ -84,11 +85,15 @@ export default {
     changeInfo() {
       this.$refs['ruleForm'].validate((valid) => {
         if (valid) {
-          put('/pdf-tech/vppSet/setGeneral', {
+          if (this.generalLoading) return
+          this.generalLoading = true
+          put('http://81.68.234.235:8032/pdf-tech/vppSet/setGeneral', {
             userName: this.ruleForm.userName,
             area: this.ruleForm.area
           }).then((res) => {
-            console.log(res)
+            setTimeout(() => {
+              this.generalLoading = false
+            }, 1000)
             if (res.data.code === 200 && res.data.msg === 'success') {
               this.$message({
                 message: 'Change Success',

+ 31 - 16
src/views/TeamManagement/ManageMember.vue

@@ -17,6 +17,7 @@ const status = ref('')
 const product = ref('')
 const size = ref(5)
 const memberId = ref('')
+let click = true
 
 //打开删除对话框
 const handleClick = (val) => {
@@ -84,6 +85,10 @@ function getManageMemberList() {
       'productCode=' +
       product.value
   ).then((res) => {
+    //限制点击
+    setTimeout(() => {
+      click = true
+    }, 1000)
     const data = res.data.result.list
     for (let i = 0; i < data.length; i++) {
       if (data[i].validFlag === '0') {
@@ -105,24 +110,34 @@ function exportManageMemberList() {
   urlencoded.append("productId", product.value)
   urlencoded.append("teamId", teamId.value)
   urlencoded.append("status", status.value)
-  downLoad("/pdf-tech/vppRTeamMemberRole/download", urlencoded).then((res)=>{
-      let url = window.URL.createObjectURL(new Blob([res.data], { type: '.xlsx' }))
-      let a= document.createElement('a')
-      a.style.display = 'none'
-      a.href = url
-      // 自定义文件名
-      a.setAttribute('download', `团队成员.xlsx`)
-       document.body.appendChild(a)
-       // 下载文件
-       a.click()
-       // 释放内存
-       url = window.URL.revokeObjectURL(url)
-       document.body.removeChild(a) 
-  })
+  if(click){
+    click = false
+    downLoad("http://81.68.234.235:8032/pdf-tech/vppRTeamMemberRole/download", urlencoded).then((res)=>{
+        //限制点击
+        setTimeout(() => {
+          click = true
+        }, 1000)
+        let url = window.URL.createObjectURL(new Blob([res.data], { type: '.xlsx' }))
+        let a= document.createElement('a')
+        a.style.display = 'none'
+        a.href = url
+        // 自定义文件名
+        a.setAttribute('download', `团队成员.xlsx`)
+         document.body.appendChild(a)
+         // 下载文件
+         a.click()
+         // 释放内存
+         url = window.URL.revokeObjectURL(url)
+         document.body.removeChild(a) 
+    })
+  }
 }
 //筛选
 const searchInfo = () => {
-  getManageMemberList()
+  if(click){
+    click = false
+    getManageMemberList()
+  }
 }
 onMounted(() => {
   let pageText = document.getElementsByClassName('el-pagination__jump')[0]
@@ -217,7 +232,7 @@ onMounted(() => {
             placeholder="Search Member Name/Email/Device UUID"
           >
           </el-input>
-          <button class="absolute top-8px right-8px"><Search /></button>
+          <button class="absolute top-8px right-8px" @click="searchInfo()"><Search /></button>
         </div>
         <button
           type="button"

+ 50 - 31
src/views/TeamManagement/ManageMember/AddManageMember.vue

@@ -11,7 +11,8 @@ export default {
         teamId: ''
       },
       teamList: {},
-      file: {}
+      file: {},
+      click: true
     }
   },
   methods: {
@@ -22,38 +23,56 @@ export default {
     },
     //提交单个添加表单
     submitFormSingle(){
-      if (this.formData.memberEmail.trim() === '' || this.formData.teamId.trim() === '') {
-        this.$message.error('Missing required information')
-      } else {
-        post('/pdf-tech/vppTeam/addTeamMember',this.formData).then((res)=>{
+      if(this.click){
+        this.click = false
+        if (this.formData.memberEmail.trim() === '' || this.formData.teamId.trim() === '') {
+          this.$message.error('Missing required information')
+          //限制点击
+          setTimeout(() => {
+            this.click = true
+          }, 3000)
+        } else {
+          post('http://81.68.234.235:8032/pdf-tech/vppTeam/addTeamMember',this.formData).then((res)=>{
+            //限制点击
+            setTimeout(() => {
+              this.click = true
+            }, 3000)
+            if(res.data.code === 200){
+              this.$message({
+                message: 'Add Success!',
+                type: "success",
+              })
+            } else if(res.data.msg === "Member has joined a non-default team"){
+              this.$message({
+                message: 'Member has joined a non-default team',
+                type: "error",
+              })
+            }
+          })
+        }
+      }
+    },
+    //提交批量添加表单
+    submitFormVolume(){
+      if(this.click){
+        this.click = false
+        this.$refs.upload.submit()
+        const formData = new FormData()
+        formData.append("file",this.file)
+        post('http://81.68.234.235:8032/pdf-tech/vppTeam/addTeamMemberBatch', formData).then((res) => {
+          //限制点击
+          setTimeout(() => {
+            this.click = true
+          }, 1000)
           if(res.data.code === 200){
             this.$message({
               message: 'Add Success!',
               type: "success",
             })
-          } else if(res.data.msg === "Member has joined a non-default team"){
-            this.$message({
-              message: 'Member has joined a non-default team',
-              type: "error",
-            })
           }
         })
       }
     },
-    //提交批量添加表单
-    submitFormVolume(){
-      this.$refs.upload.submit()
-      const formData = new FormData()
-      formData.append("file",this.file)
-      post('/pdf-tech/vppTeam/addTeamMemberBatch', formData).then((res) => {
-        if(res.data.code === 200){
-          this.$message({
-            message: 'Add Success!',
-            type: "success",
-          })
-        }
-      })
-    },
     //批量上传文件
     upLoadChange(file){
       this.file = file
@@ -69,9 +88,6 @@ export default {
         }
       }
     )
-  },
-  watch: {
-    
   }
 }
 </script>
@@ -325,9 +341,6 @@ export default {
 .el-select-dropdown {
   margin-top: 0 !important;
 }
-</style>
-
-<style lang="scss">
 .el-message--success {
   margin-top: 90px !important;
   background-color: #373A47 !important;
@@ -338,4 +351,10 @@ export default {
     color: #fff !important;
   }
 }
-</style>
+.el-message--error {
+  border-color: #ff5054 !important;
+  height: 36px;
+  min-width: auto !important;
+  padding: 12px !important;
+}
+</style>

+ 17 - 10
src/views/TeamManagement/ManageMember/EditManageMember.vue

@@ -12,6 +12,7 @@ export default {
       email: '',
       dialogVisible: false,
       teamList: [],
+      click: true
     }
   },
   components:{Warning},
@@ -20,7 +21,6 @@ export default {
       if(this.formData.memberTeam.trim() === ''){
         return true
       } else if (this.formData.memberName.trim() === ''){
-        console.log(2)
         return true
       }else{
         return false
@@ -53,15 +53,22 @@ export default {
       urlencoded.append("memberId", this.$route.query.Id)
       urlencoded.append("teamId", this.formData.memberTeam)
       urlencoded.append("name", this.formData.memberName)
-      post('/pdf-tech/vppTeam/editTeamMember',urlencoded).then((res)=>{
-        if(res.data.code === 200){
-          this.dialogVisible = false
-          this.$message({
-            message: 'Change Success!',
-            type: "success",
-          })
-        }
-      })
+      if(this.click){
+        this.click = false
+        post('http://81.68.234.235:8032/pdf-tech/vppTeam/editTeamMember',urlencoded).then((res)=>{
+          //限制点击
+          setTimeout(() => {
+            this.click = true
+          }, 1000)
+          if(res.data.code === 200){
+            this.dialogVisible = false
+            this.$message({
+              message: 'Change Success!',
+              type: "success",
+            })
+          }
+        })
+      }
       
       // this.$router.push("/manage-member")
     }

+ 41 - 21
src/views/TeamManagement/ManageTeam.vue

@@ -16,6 +16,8 @@ const queryString = ref('')
 const deleteTeamName = ref('')
 const deleteTeamId = ref('')
 const deleteTeamIndex = ref('')
+//限制用户点击
+let click = true
 
 //打开对话框
 const handleClick = (index, val) => {
@@ -41,6 +43,10 @@ function getManageTeamList() {
     teamId: teamId.value,
     keyword: queryString.value
   }).then((res) => {
+    //限制点击
+    setTimeout(() => {
+      click = true
+    }, 1000)
     if (res.data.code === 200) {
       tableData.value = res.data.result.list
       total.value = res.data.result.total
@@ -60,25 +66,33 @@ const getTeamList = () => {
 }
 // 团队管理列表导出
 function exportManageTeamList() {
-  downLoad('/pdf-tech/vppTeam/exportManageTeamList?teamId='+
-          teamId.value +
-          '&' +
-          'keyword=' +
-          queryString.value
-          ).then((res) => {
-            let url = window.URL.createObjectURL(new Blob([res.data], { type: '.xlsx' }))
-            let a= document.createElement('a')
-            a.style.display = 'none'
-            a.href = url
-            // 自定义文件名
-            a.setAttribute('download', `团队.xlsx`)
-             document.body.appendChild(a)
-             // 下载文件
-             a.click()
-             // 释放内存
-             url = window.URL.revokeObjectURL(url)
-             document.body.removeChild(a) 
-          })
+  if(click){
+    click = false
+    downLoad('http://81.68.234.235:8032/pdf-tech/vppTeam/exportManageTeamList?teamId='+
+            teamId.value +
+            '&' +
+            'keyword=' +
+            queryString.value
+            ).then((res) => {
+              //限制点击
+              setTimeout(() => {
+                click = true
+              }, 1000)
+              let url = window.URL.createObjectURL(new Blob([res.data], { type: '.xlsx' }))
+              let a= document.createElement('a')
+              a.style.display = 'none'
+              a.href = url
+              // 自定义文件名
+              a.setAttribute('download', `团队.xlsx`)
+               document.body.appendChild(a)
+               // 下载文件
+               a.click()
+               // 释放内存
+               url = window.URL.revokeObjectURL(url)
+               document.body.removeChild(a) 
+              }
+            )
+  }
 }
 // 删除
 function handleDelete() {
@@ -86,7 +100,10 @@ function handleDelete() {
     teamId: deleteTeamId.value
   }).then((res) => {
     if (res.data.code === 200) {
-      proxy.$message('Delete Success')
+      proxy.$message({
+        message: 'Delete Success',
+        type: 'success'
+      })
       tableData.value.splice(deleteTeamIndex.value, 1)
     } else (
       proxy.$message.error(res.data.msg)
@@ -96,7 +113,10 @@ function handleDelete() {
 }
 //筛选
 const searchInfo = () => {
-  getManageTeamList()
+  if(click){
+    click = false
+    getManageTeamList()
+  }
 }
 onMounted(() => {
   let pageText = document.getElementsByClassName('el-pagination__jump')[0]

+ 38 - 16
src/views/TeamManagement/ManageTeamOperate.vue

@@ -15,7 +15,8 @@ export default {
       },
       flag: '',
       adminOptions: [],
-      projectOptions: []
+      projectOptions: [],
+      click: true
     }
   },
   computed: {
@@ -55,17 +56,24 @@ export default {
   methods: {
     // 提交表单
     submitForm () {
-      let emptyFlag = true
-      let productArr = []
-      for (const item of this.formData.productList) {
-        productArr.push(item['productId'])
-      }
-      emptyFlag = productArr.includes('')
-      if (this.formData.teamName.trim() === '' || emptyFlag) {
-        this.$message.error('Missing required information')
-      } else {
-        if (this.flag === 'create') this.createTeam()
-        if (this.flag === 'edit') this.editTeam()
+      if(this.click){
+        this.click = false
+        let emptyFlag = true
+        let productArr = []
+        for (const item of this.formData.productList) {
+          productArr.push(item['productId'])
+        }
+        emptyFlag = productArr.includes('')
+        if (this.formData.teamName.trim() === '' || emptyFlag) {
+          this.$message.error('Missing required information')
+          //限制点击
+          setTimeout(() => {
+            this.click = true
+          }, 3000)
+        } else {
+          if (this.flag === 'create') this.createTeam()
+          if (this.flag === 'edit') this.editTeam()
+        }
       }
     },
     // 重置表单
@@ -94,9 +102,16 @@ export default {
           item.licenseNumber = 0
         }
       })
-      postWithHeader('/pdf-tech/vppTeam/createTeam', JSON.stringify(this.formData)).then((res) => {
+      postWithHeader('http://81.68.234.235:8032/pdf-tech/vppTeam/createTeam', JSON.stringify(this.formData)).then((res) => {
+        //限制点击
+        setTimeout(() => {
+          this.click = true
+        }, 1000)
         if (res.data.code === 200) {
-          this.$message('Change Success')
+          this.$message({
+            message: 'Change Success',
+            type: 'success'
+          })
           this.$router.push({name:'ManageTeam'})
         } else (
           this.$message.error(res.data.msg)
@@ -110,9 +125,16 @@ export default {
           item.licenseNumber = 0
         }
       })
-      putWithHeader('/pdf-tech/vppTeam/editTeam', JSON.stringify(this.formData)).then((res) => {
+      putWithHeader('http://81.68.234.235:8032/pdf-tech/vppTeam/editTeam', JSON.stringify(this.formData)).then((res) => {
+        //限制点击
+        setTimeout(() => {
+          this.click = true
+        }, 1000)
         if (res.data.code === 200) {
-          this.$message('Change Success')
+          this.$message({
+            message: 'Change Success',
+            type: 'success'
+          })
           this.$router.push({name:'ManageTeam'})
         } else (
           this.$message.error(res.data.msg)

+ 8 - 2
src/views/VolumeCancel.vue

@@ -5,7 +5,8 @@ export default {
   data() {
     return {
       file: {},
-      fileList: []
+      fileList: [],
+      loading: false
     }
   },
   methods: {
@@ -15,10 +16,15 @@ export default {
     },
     //提交表单
     submitFormVolume(){
+      if (this.loading) return
+      this.loading = true
       this.$refs.upload.submit()
       const formData = new FormData()
       formData.append("file",this.file)
-      post('/pdf-tech/vppLicenseCode/cancelLicenceAssignBatch', formData).then((res) => {
+      post('http://81.68.234.235:8032/pdf-tech/vppLicenseCode/cancelLicenceAssignBatch', formData).then((res) => {
+        setTimeout(() => {
+          this.loading = false
+        }, 1000)
         if(res.data.code === 200){
           this.$message({
             message: 'Assign Success!',