Prechádzať zdrojové kódy

fix 区域设置标题

haveyou 1 rok pred
rodič
commit
fdd479d6c1

+ 14 - 7
src/views/recycleLogistics/warehouse/components/area-setting.vue

@@ -5,7 +5,7 @@
     :width="1080"
     :bodyStyle="{ 'min-height': '400px' }"
     v-model="visible"
-    title="仓库区域设置"
+    :title="title"
     @open="handleOpen"
   >
     <div class="flex flex-col" v-loading="loading">
@@ -81,7 +81,9 @@
         </div>
       </div>
     </div>
-    <el-text type="danger">灰色地区表示已经添加到其他仓库中,请先在其他仓库中去掉勾选后,再重新选择</el-text>
+    <el-text type="danger"
+      >灰色地区表示已经添加到其他仓库中,请先在其他仓库中去掉勾选后,再重新选择</el-text
+    >
 
     <template #footer>
       <el-button @click="handleCancel">关闭</el-button>
@@ -123,9 +125,14 @@
   });
 
   /** 弹窗打开事件 */
+  const title = ref('仓库区域设置');
   const handleOpen = (row) => {
     visible.value = true;
     nextTick(() => {
+      title.value = row.godownName
+        ? `${row.godownName}区域设置`
+        : `仓库区域设置`;
+
       row && getAreaInfo(row.id);
     });
   };
@@ -250,12 +257,12 @@
 <style lang="scss">
   .disabled-popover {
     cursor: not-allowed;
-    .el-text{
-        color: #909399;
+    .el-text {
+      color: #909399;
     }
-    .el-icon{
-        color: #909399;
-        fill: #909399;
+    .el-icon {
+      color: #909399;
+      fill: #909399;
     }
   }
 </style>