From 4f78884dc81375cd38c36211e5a55ae795524c2b Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Wed, 19 Nov 2025 15:54:26 +0800
Subject: [PATCH] feat:创建工单

---
 src/views/tickets/ticket.vue                             |  122 +++---------------------------
 src/views/tickets/ticketComponent/CreateTicketDialog.vue |  105 +++++++++++++++++++++++++-
 2 files changed, 114 insertions(+), 113 deletions(-)

diff --git a/src/views/tickets/ticket.vue b/src/views/tickets/ticket.vue
index 79c99ba..5aede8a 100644
--- a/src/views/tickets/ticket.vue
+++ b/src/views/tickets/ticket.vue
@@ -270,18 +270,18 @@
     </el-tabs>
 
     <!-- 新建工单对话框 -->
-   <create-ticket-dialog
-  v-model="dialogVisible"
-  :departments="departments"
-  :department-users="departmentUsers"
-  :types="types"
-  :all-algorithms="allAlgorithms"
-  :edit-data="editFormData"
-  :map-center="inputMapShowDefaultCenter"
-  @create-success="handleCreateSuccess"
-  @draft-success="handleDraftSuccess"
-  @create-error="handleCreateError"
-/>
+      <create-ticket-dialog
+      v-model="dialogVisible"
+      :departments="departments"
+      :department-users="departmentUsers"
+      :types="types"
+      :all-algorithms="allAlgorithms"
+      :edit-data="editFormData"
+      :map-center="inputMapShowDefaultCenter"
+      @create-success="handleCreateSuccess"
+      @draft-success="handleDraftSuccess"
+      @create-error="handleCreateError"
+    />
 
     <!-- 工单详情对话框 -->
     <el-dialog
@@ -921,7 +921,7 @@
       },
       dialogVisible: false,
        editFormData: null, // 专门用于存储编辑数据的对象
-        createoredit: '', // 可以删除这个字段,因为组件内部会判断
+    
       detailVisible: false,
       currentDetail: {},
     
@@ -2621,103 +2621,7 @@
   margin-top: 12px;
 }
 
-.create-ticket-form {
-  padding: 20px 10px;
 
-  .form-section {
-    background-color: #fff;
-    border-radius: 4px;
-
-    .el-row {
-      margin-bottom: 16px;
-
-      &:last-child {
-        margin-bottom: 0;
-      }
-    }
-  }
-
-  .location-wrapper {
-    width: 100%; // 修改为100%以适应父容器
-    height: auto; // 修改为auto以自适应内容
-
-    .map-button {
-      width: 100%; // 让按钮填满容器宽度
-      height: 36px; // 与其他输入框保持一致的高度
-      display: flex;
-      align-items: center;
-      justify-content: center;
-
-      i {
-        margin-right: 4px;
-      }
-    }
-
-    .location-text {
-      margin-top: 8px;
-      padding: 8px 12px;
-      background-color: #f5f7fa;
-      border-radius: 4px;
-      color: #606266;
-      font-size: 13px;
-      line-height: 1.4;
-    }
-  }
-
-  .upload-wrapper {
-    .uploader {
-      :deep(.el-upload--picture-card) {
-        width: 120px;
-        height: 100px;
-        line-height: 128px;
-      }
-
-      :deep(.el-upload-list__item) {
-        width: 120px;
-        height: 120px;
-      }
-    }
-
-    .upload-tip {
-      font-size: 12px;
-      color: #909399;
-      line-height: 1.4;
-      margin-top: 8px;
-    }
-  }
-
-  .el-form-item {
-    margin-bottom: 18px;
-
-    &:last-child {
-      margin-bottom: 0;
-    }
-  }
-
-  :deep(.el-form-item__label) {
-    font-weight: 500;
-    color: #606266;
-  }
-
-  // :deep(.el-input__inner) {
-  //   height: 36px;
-  //   line-height: 36px;
-  // }
-
-  :deep(.el-textarea__inner) {
-    padding: 8px 12px;
-  }
-
-  // :deep(.el-input__inner),
-  // :deep(.el-select),
-  // :deep(.el-select .el-input) {
-  //   width: 100%; // 确保所有输入框和选择框宽度一致
-  // }
-
-  .full-width {
-    width: 100%;
-  }
-}
 
 :deep(.el-dialog__body) {
   border-top: 0.1rem solid #f0f0f0;
diff --git a/src/views/tickets/ticketComponent/CreateTicketDialog.vue b/src/views/tickets/ticketComponent/CreateTicketDialog.vue
index 9bdb37f..b7eaa42 100644
--- a/src/views/tickets/ticketComponent/CreateTicketDialog.vue
+++ b/src/views/tickets/ticketComponent/CreateTicketDialog.vue
@@ -583,10 +583,107 @@
   align-items: center;
   justify-content: center;
 }
-.upload-tip {
-  font-size: 12px;
-  color: #909399;
-  margin-top: 8px;
+
+.create-ticket-form {
+  padding: 20px 10px;
+
+  .form-section {
+    background-color: #fff;
+    border-radius: 4px;
+
+    .el-row {
+      margin-bottom: 16px;
+
+      &:last-child {
+        margin-bottom: 0;
+      }
+    }
+  }
+
+  .location-wrapper {
+    width: 100%; // 修改为100%以适应父容器
+    height: auto; // 修改为auto以自适应内容
+
+    .map-button {
+      width: 100%; // 让按钮填满容器宽度
+      height: 36px; // 与其他输入框保持一致的高度
+      display: flex;
+      align-items: center;
+      justify-content: center;
+
+      i {
+        margin-right: 4px;
+      }
+    }
+
+    .location-text {
+      margin-top: 8px;
+      padding: 8px 12px;
+      background-color: #f5f7fa;
+      border-radius: 4px;
+      color: #606266;
+      font-size: 13px;
+      line-height: 1.4;
+    }
+  }
+
+  .upload-wrapper {
+    .uploader {
+      :deep(.el-upload--picture-card) {
+        width: 120px;
+        height: 100px;
+        line-height: 128px;
+      }
+
+      :deep(.el-upload-list__item) {
+        width: 120px;
+        height: 120px;
+      }
+    }
+
+    .upload-tip {
+      font-size: 12px;
+      color: #909399;
+      line-height: 1.4;
+      margin-top: 8px;
+    }
+  }
+
+  .el-form-item {
+    margin-bottom: 18px;
+
+    &:last-child {
+      margin-bottom: 0;
+    }
+  }
+
+  :deep(.el-form-item__label) {
+    font-weight: 500;
+    color: #606266;
+  }
+
+  // :deep(.el-input__inner) {
+  //   height: 36px;
+  //   line-height: 36px;
+  // }
+
+  :deep(.el-textarea__inner) {
+    padding: 8px 12px;
+  }
+
+  // :deep(.el-input__inner),
+  // :deep(.el-select),
+  // :deep(.el-select .el-input) {
+  //   width: 100%; // 确保所有输入框和选择框宽度一致
+  // }
+
+  .full-width {
+    width: 100%;
+  }
+}
+
+:deep(.el-dialog__body) {
+  border-top: 0.1rem solid #f0f0f0;
 }
 /* 新建工单和处理工单的上传组件样式 */
 .create-upload,

--
Gitblit v1.9.3