|
@@ -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('http://81.68.234.235:8032/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('http://81.68.234.235:8032/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>
|