瀏覽代碼

巡检工单调整

lipenghui 3 月之前
父節點
當前提交
dcf94bf85d
共有 2 個文件被更改,包括 109 次插入7 次删除
  1. 1 1
      src/views/pms/device/CustomerList.vue
  2. 108 6
      src/views/pms/inspect/order/WriteOrder.vue

+ 1 - 1
src/views/pms/device/CustomerList.vue

@@ -134,7 +134,7 @@
     dialogVisible.value = true
     selectedRow.value = null
     customerType.value = type
-    queryParams.customerNature = type
+    //queryParams.customerNature = type
     console.log('----------'+type)
     await getList()
     dialogTitle.value = type==='supplier'?'供应商':'制造商';

+ 108 - 6
src/views/pms/inspect/order/WriteOrder.vue

@@ -21,9 +21,34 @@
             <el-step
               v-for="(step, stepIndex) in JSON.parse(tab.itemJson)"
               :key="stepIndex"
-              :title="`${stepIndex + 1} ${step.item}`"
+              :title="`${step.item}`"
               :status="getStepStatus(tabIndex, stepIndex)"
-            />
+            >
+<!--              <template #description>-->
+<!--                <div class="step-content">-->
+<!--                  <el-tooltip-->
+<!--                    effect="dark"-->
+<!--                    placement="top"-->
+<!--                    :content="step.standard"-->
+<!--                  >-->
+<!--                    <Icon icon="ep:info-filled"/>-->
+<!--                  </el-tooltip>-->
+<!--                </div>-->
+<!--              </template>-->
+              <template #title>
+                <div class="step-title-wrapper">
+                  <span class="title-text">{{ step.item }}</span>
+                  <el-tooltip
+                    :content="step.standard"
+                    placement="top"
+                    effect="dark"
+                  >
+<!--                    <el-icon class="tip-icon"/>-->
+                    <Icon icon="ep:info-filled"/>
+                  </el-tooltip>
+                </div>
+              </template>
+            </el-step>
           </el-steps>
 
           <div class="form-wrapper">
@@ -164,7 +189,7 @@ const isStepValid = (tabIndex) => {
   const current = currentStep.value[tabIndex]
   debugger
   return formData[tabIndex][current].ifNormal &&
-    formData[tabIndex][current].description !== null
+    formData[tabIndex][current].description !== null&&formData[tabIndex][current].description !== ''
 }
 
 // 导航控制
@@ -180,6 +205,7 @@ const handleNext = async (tabIndex) => {
   }
 
   const totalSteps = JSON.parse(tabs.value[tabIndex].itemJson).length
+  debugger
   if (currentStep.value[tabIndex] < totalSteps - 1) {
     currentStep.value[tabIndex]++
   } else {
@@ -213,13 +239,12 @@ const submitForm = async (tabIndex) => {
 .step-container {
   display: grid;
   grid-template-columns: 220px 1fr;
-  gap: 30px;
+  gap: 10px;
   height: 100%;
   min-height: 600px;
 }
 
 .steps-nav {
-  height: 100%;
   overflow-y: auto;
   padding-right: 15px;
 }
@@ -240,7 +265,11 @@ const submitForm = async (tabIndex) => {
   font-weight: 500;
   padding: 0 15px;
 }
-
+::v-deep .el-step__icon {
+  background-color: #409eff;
+  color: #fff;
+  border: 0px;
+}
 .el-step__title {
   font-size: 14px;
 }
@@ -248,4 +277,77 @@ const submitForm = async (tabIndex) => {
 .el-form-item {
   margin-bottom: 22px;
 }
+.hint-icon {
+  color: #909399;
+  font-size: 14px;
+  cursor: help;
+  transition: color 0.2s;
+
+  &:hover {
+    color: #409eff;
+  }
+}
+.step-content {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  gap: 5px;
+}
+
+
+
+.step-title-wrapper {
+  display: inline-flex;
+  align-items: center;
+  gap: 8px;
+  position: relative;
+  padding-right: 25px;
+}
+
+/* 提示图标样式 */
+.tip-icon {
+  font-size: 16px;
+  color: #e6a23c;
+  cursor: help;
+  transition:
+    color 0.3s ease,
+    transform 0.2s ease;
+
+  &:hover {
+    color: #f56c6c;
+    transform: scale(1.1);
+  }
+}
+
+/* 覆盖步骤条默认样式 */
+:deep(.custom-steps) {
+  /* 调整头部位置 */
+  .el-step__head {
+    top: 3px;
+  }
+
+  /* 标题容器定位 */
+  .el-step__title {
+    display: inline-block;
+    margin-left: 10px;
+    padding-right: 0;
+  }
+
+  /* 步骤连接线 */
+  .el-step__line {
+    left: 11px;
+    background-color: #ebeef5;
+  }
+
+  /* 当前步骤样式 */
+  .is-process .title-text {
+    font-weight: 600;
+    color: #409eff;
+  }
+
+  /* 完成状态图标 */
+  .is-finish .tip-icon {
+    color: #67c23a;
+  }
+}
 </style>