| | |
| | | name: "TicketPage", |
| | | data() { |
| | | return { |
| | | submitLoading: false, // 新增loading状态 |
| | | activeTab: "all", |
| | | // tabs 只保留静态结构,不做权限判断 |
| | | tabs: [ |
| | |
| | | }, |
| | | |
| | | async submitForm() { |
| | | if (this.submitLoading) return; // 防止重复提交 |
| | | this.submitLoading = true; |
| | | try { |
| | | // 提交时需要完整验证 |
| | | await this.$refs.form.validate(); |
| | |
| | | this.$message.error(error.message || '工单创建失败,请稍后重试'); |
| | | } |
| | | } |
| | | finally { |
| | | this.submitLoading = false; |
| | | } |
| | | }, |
| | | |
| | | async saveDraft() { |
| | | if (this.submitLoading) return; // 防止重复提交 |
| | | this.submitLoading = true; |
| | | try { |
| | | const submitData = { |
| | | id: this.form.id, |
| | |
| | | } catch (error) { |
| | | this.$message.error(error.message || '保存草稿失败,请稍后重试'); |
| | | } |
| | | finally { |
| | | this.submitLoading = false; |
| | | } |
| | | }, |
| | | |
| | | async handleLocationChange(val) { |