Просмотр исходного кода

Merge branch '内墙设计增加墙顶一色选择开关' into uat

yanym 1 неделя назад
Родитель
Сommit
522e1116a2
2 измененных файлов с 37 добавлено и 3 удалено
  1. 4 2
      src/main.ts
  2. 33 1
      src/views/AIDesign/insideDesign.vue

+ 4 - 2
src/main.ts

@@ -85,7 +85,8 @@ import {
   ActionSheet,
   Search,
   Overlay,
-  Lazyload
+    Switch,
+    Lazyload
 } from "vant";
 
 [
@@ -123,7 +124,8 @@ import {
   ActionSheet,
   Search,
   Overlay,
-  Lazyload
+    Switch,
+    Lazyload
 ].forEach(x => Vue.use(x));
 
 Vue.config.productionTip = false;

+ 33 - 1
src/views/AIDesign/insideDesign.vue

@@ -126,6 +126,15 @@
           </van-radio-group>
         </div>
       </div>
+      <van-cell v-show="activeName != '风格'">
+        <template #title>
+          <span class="qdys-checked-title">墙顶一色</span>
+        </template>
+        <template #right-icon>
+          <van-switch v-model="qdysChecked" active-color="#76EE59" size="20" />
+        </template>
+      </van-cell>
+      <div v-show="activeName != '风格'" class="qdys-checked-tip">*不开启则墙顶默认白色,开启则跟随所选色卡</div>
       <!-- AI生成按钮 -->
       <div class="generate-section">
         <van-button v-show="AIBtnDisabled" type="primary" block color="#E87838" disabled loading loading-type="spinner"
@@ -198,7 +207,7 @@ export default class extends Vue {
   private isEchoAssign: boolean = false;// 新增:标记是否为代码回显赋值(默认 false)
   private textureCode_selItem_index = 0;//纹理一级分类的选中索引
   private color_selItem = null;//选中的色卡
-
+  private qdysChecked = false;//墙顶一色开关
 
   // 当前选中的选项
   private oldf_id = null;
@@ -250,6 +259,7 @@ export default class extends Vue {
     this.isEchoAssign = false;
     this.textureCode_selItem_index = 0;
     this.color_selItem = null;
+    this.qdysChecked = false;
   }
 
   tabsChange(value: string) {
@@ -498,6 +508,7 @@ export default class extends Vue {
           this.DesignStyle_selValue = response.Data.F_Style;// 风格选中的值
           // this.textureCode_selValue = response.Data.F_TextureCode;// 深槽工艺选中的值
           this.color_selValue = response.Data.F_Color;// 电子色卡选中的值
+            this.qdysChecked = response.Data.F_WallCeilingSameColor == 1 ? true : false;// 是否开启墙顶一色
           const F_TextureCodeWithColor = response.Data.F_TextureCodeWithColor;
           // 处理纹理
           if (F_TextureCodeWithColor) {
@@ -653,6 +664,13 @@ export default class extends Vue {
     } else {
       formData.append('oldf_id', this.oldf_id);
     }
+    if (this.activeName != '风格'){
+        if (this.qdysChecked){
+            formData.append('wallCeilingSameColor', 1);
+        } else {
+            formData.append('wallCeilingSameColor', 0);
+        }
+    }
     // 企微类型
     // const agentFrom = window.localStorage.getItem('agentFromAI');
     // const wecomType = getWecomType(agentFrom);
@@ -1312,6 +1330,20 @@ export default class extends Vue {
   }
 }
 
+.qdys-checked-title{
+  font-size: 16px;
+  font-weight: 500;
+  line-height: 14px;
+  color: #000;
+}
+
+.qdys-checked-tip{
+  font-size: 12px;
+  line-height: 14px;
+  color: #86909C;
+  padding-left: 16px;
+}
+
 .color-plus {
   margin: 0px auto 10px;