32 Revize 9be37adc3e ... 6dd85e175e

Autor SHA1 Zpráva Datum
  armg 6dd85e175e 浮雕放到最后(琉璃瓦之后) před 2 měsíci
  armg 9542e9d7fb getWxconfigNew před 2 měsíci
  armg 1ffb80ad3d 窗套 před 2 měsíci
  armg 64e2226f14 Merge branch 'master' into dev-cym před 2 měsíci
  armg 6eafc36212 历史记录按钮+项目选择pc端宽度限制 před 2 měsíci
  armg 4ac2eebd7a 修复历史页面按钮挡住问题 před 2 měsíci
  armg 84d6d671e2 Merge branch 'master' into dev-cym před 2 měsíci
  armg f4565fd504 兼容之前错误数据 před 2 měsíci
  armg 90ab72cf9e Merge branch 'master' into dev-cym před 2 měsíci
  armg 2d021ee2ad 2.各身份用户,设计历史生图区分开 před 2 měsíci
  armg 9997730ab8 Merge branch 'master' into dev-cym před 2 měsíci
  armg ff3ba03661 一键诊断和AI设计-上传图片区域的文字修改:【外墙】、【内墙】2个字,标红、放大 před 2 měsíci
  armg d0f5c194ae 登录问题 před 2 měsíci
  armg aef59b3545 ssb登录过期处理 před 2 měsíci
  armg ac5a150729 处理wxid před 2 měsíci
  armg 0dc69cbd83 处理wxid před 2 měsíci
  armg ca2871c1e1 Merge branch 'master' into dev-cym před 2 měsíci
  armg ea0384382c 缓存weChat před 2 měsíci
  armg 8c204a0dc7 处理weChat před 2 měsíci
  armg 01633e8655 处理weChat před 2 měsíci
  armg d176e5e25b 窗套增加不需要 před 2 měsíci
  armg 80e89e088d Merge branch 'master' into dev-cym před 2 měsíci
  armg 761875eb06 优化取wxid před 2 měsíci
  armg 350c1ea3c2 优化接口权限判断 před 2 měsíci
  armg 276906fca6 窗套样式 před 2 měsíci
  armg da4424bb69 1.新增砖雕、窗套样式;原来窗套样式改为窗套颜色;都要放大;砖雕放在罗马柱下面;窗套样式在窗套颜色上方; před 2 měsíci
  armg da14ff4d38 1 před 2 měsíci
  armg 998f039542 getWxconfig隐藏 před 2 měsíci
  armg e52a6d6b32 修正AiDesign před 2 měsíci
  armg 2d6a1fe3b3 转人工显示修改 před 3 měsíci
  armg 51f0a4d484 1 před 3 měsíci
  armg 6f90ead9f5 结果页图片 před 3 měsíci

+ 6 - 4
src/router/index.ts

@@ -124,9 +124,12 @@ router.beforeEach(async (to, from, next) => {
  * @param to 目标路由
  * @param next 路由放行方法
  */
-async function handleWxidLoginMode(to, next, wxId, WecomType) {
+async function handleWxidLoginMode(to, next, wxid, WecomType) {
   try {
     window.localStorage.setItem('loginMode', 'wxidLogin');
+    if (wxid) {
+      window.localStorage.setItem('weChat', wxid);
+    }
     if (WecomType) {
       const agentFrom = getAgentFrom(WecomType);
       window.localStorage.setItem('agentFrom', agentFrom);
@@ -136,8 +139,8 @@ async function handleWxidLoginMode(to, next, wxId, WecomType) {
     initGuidInfo();
     if (checkLoginStatus()) return next();
     // 4. wxid参数校验
-    if (!wxId) return redirectToError(next);
-    window.localStorage.setItem('weChat', wxId);
+    let wxId = wxid ? wxid : window.localStorage.getItem("weChat");
+    if (!wxId) return redirectToError(next, "wxid参数缺失,无权限");
     const formData = new FormData();
     const timestamp = new Date().getTime().toString();
     const nonce = getGuid();
@@ -149,7 +152,6 @@ async function handleWxidLoginMode(to, next, wxId, WecomType) {
     doWxidLogin(formData)
       .then((res) => {
         if (res && res.StatusCode === 200 && res.Data && res.Data.token) {
-          // console.log("res=", res)
           const userInfoV1 = JSON.stringify(res.Data);
           window.localStorage.setItem('userInfoV1', userInfoV1);
           window.localStorage.setItem('AIToken', res.Data.token);

+ 6 - 1
src/styles/index.scss

@@ -17,7 +17,7 @@ html {
       margin: 0 auto;
       overflow: hidden;
       width: 100%;
-      .header{
+      .header,.van-popup--bottom,.van-overlay{
         max-width: 420px!important;
         left:calc(50% - 210px)!important;
       }
@@ -177,4 +177,9 @@ html {
       }
     }
   }
+}
+.red-name-title{
+  color: #f00;
+  font-size: 16px;
+  // font-weight: bold;
 }

+ 40 - 0
src/utils/index.ts

@@ -189,6 +189,9 @@ export const toXiaoChengxu = (appid) => {
 
 // 获取微信API授权信息
 export const getWxconfig = () => {
+  if(window.localStorage.getItem('agentFromAI') !== 'xlskf'){
+    return;
+  }
   // const jsApiList = [ 'downloadFile', 'saveImageToPhotosAlbum', 'closeWindow', 'hideMenuItems'];
   let url = window.location.href.split("#")[0];
   const formData = new FormData();
@@ -229,6 +232,43 @@ export const getWxconfig = () => {
     }
   });
 }
+// 获取微信API授权信息
+export const getWxconfigNew = () => {
+  return new Promise((resolve, reject) => {
+    let url = window.location.href.split("#")[0];
+    const formData = new FormData();
+    formData.append('url', url);
+    formData.append('agent', '1');
+    wecomTicket(formData).then(response => {
+      if (response.StatusCode == 200) {
+        let qiyeData = response.Data;
+        wx.agentConfig({
+          debug: false,
+          corpid: qiyeData.appid,
+          agentid: qiyeData.agentID,
+          timestamp: qiyeData.timestamp,
+          nonceStr: qiyeData.noncestr,
+          signature: qiyeData.signature,
+          jsApiList: ["chooseImage", "getLocalImgData", "previewImage"],
+          success: function (res) { }
+        });
+        wx.ready(() => {
+          console.log('企业微信SDK初始化成功');
+          resolve(true); 
+        });
+        wx.error((err) => {
+          console.error('SDK初始化失败:', err);
+          reject(err); 
+        });
+      } else {
+        reject(new Error('获取微信配置参数失败'));
+      }
+    }).catch(err => {
+      console.error('请求wecomTicket接口失败:', err);
+      reject(err);
+    });
+  });
+};
 
 /**
  * 企业微信H5 环境+缓存双重校验工具

+ 35 - 7
src/utils/requestAI.js

@@ -16,11 +16,13 @@ const service = axios.create({
 });
 // request拦截器
 service.interceptors.request.use(config => {
+    let hasLoginMark = false;
     const guidInfo = JSON.parse(window.localStorage.getItem('guidInfo'));
     const token = window.localStorage.getItem('AIToken');
     if (guidInfo && guidInfo.guid) {
         let loginMark = guidInfo.guid;
         config.headers['loginmark'] = loginMark;
+        hasLoginMark = true;
     }
     if (token) {
         config.headers['token'] = token;
@@ -31,27 +33,45 @@ service.interceptors.request.use(config => {
             delete config.headers['Content-Type'];
         }
     }
+    // 核心逻辑:检查loginmark是否存在,不存在则拦截请求并跳转
+    if (!hasLoginMark) {
+        // Promise.reject(new Error('缺少loginmark,请求被拦截'));
+        sessionStorage.setItem("errorMsgTit", "无权限使用");
+        if (router.currentRoute.fullPath !== '/error') {
+            router.replace(`/error`);
+        }
+        // 返回reject阻止请求继续发送
+        return Promise.reject();
+    }
     return config
 }, error => {
     Promise.reject(error)
 })
 
 // 响应拦截器
-service.interceptors.response.use(async(res) => {
+service.interceptors.response.use(async (res) => {
     const code = res.data.StatusCode || 200;
-    const msg = errorCode[code] || res.data.msg || errorCode['default']
+    const msg = errorCode[code] || res.data.msg || res.data.Info || errorCode['default']
     if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') {
         return res.data
     }
     if (code === 401) {
         console.log(msg)
+    } else if (code === 400) {
+        let errInfo = msg;
+        if (msg === "loginMark不能为空") {
+            errInfo = "无权限登录"
+        }
+        sessionStorage.setItem("errorMsgTit", errInfo);
+        if (router.currentRoute.fullPath !== '/error') {
+            router.replace(`/error`);
+        }
     } else if (code === 500) {
         Toast(msg);
         return Promise.reject(new Error(msg))
     } else if (code === 420) {
         // 双重判断:内存锁 + 本地缓存锁
         const isLock = authLock.isAuthorizing || window.localStorage.getItem('isWechatAuthorizing') === 'true';
-        
         if (isLock) {
             return Promise.reject(new Error('正在授权,请勿重复操作'));
         }
@@ -66,16 +86,24 @@ service.interceptors.response.use(async(res) => {
 
             // 3. 微任务延迟跳转:给其他接口足够时间感知锁状态
             await Promise.resolve(); // 或 setTimeout(() => {}, 0)
-
-            // 4. 拼接授权链接并跳转(记录当前页面用于回跳)
-            getQyCode()
+            // 判断当前登录模式,分发处理逻辑
+            const isNewLoginMode = sessionStorage.getItem('isNewLoginMode') === 'true';
+            if (isNewLoginMode) {
+                window.localStorage.removeItem('AIToken');
+                window.localStorage.removeItem('guidInfo');
+                authLock.unlock();
+                window.location.reload();
+            } else {
+                // 4. 拼接授权链接并跳转(记录当前页面用于回跳)
+                getQyCode();
+            }
 
         } catch (err) {
             // 异常时解锁
             authLock.unlock();
             console.error('授权跳转失败:', err);
         }
-    } else if(code === 430){
+    } else if (code === 430) {
         // 没有读取到userid
         sessionStorage.setItem("errorMsgTit", msg);
         router.replace(`/error`);

+ 77 - 9
src/views/AIDesign/design.vue

@@ -68,7 +68,7 @@
           </div>
           <div v-else class="placeholder">
             <img width="50" :src="require('@/assets/AIDesign/picture.png')" />
-            <p class="placeholder-text">请上传一张待设计外墙的房屋照片</p>
+            <p class="placeholder-text">请上传一张待设计<span class="red-name-title">【外墙】</span>的房屋照片</p>
             <p class="placeholder-text-tit">(避免模糊、光线不佳)</p>
           </div>
           <div class="image-buttons">
@@ -171,7 +171,7 @@
               <div class="railing-icon" :style="{ backgroundImage: `url(${imgBaseUrl}${Column.imgPath})` }"></div>
               <div class="railing-name">{{ Column.text }}</div>
               <div v-show="Column.value != '无' && Column.value != 'CUSTOM'" class="magnifyingGlassBox"
-                @click.stop="openComponentPreview(index - 1)">
+                @click.stop="openComponentPreview(index - 1, ColumnTypes)">
                 <img :src="require('@/assets/AIDesign/magnifyingGlassIcon.png')" />
               </div>
             </div>
@@ -197,10 +197,31 @@
             </div>
           </div>
         </div>
-
         <!-- 窗套样式 -->
         <div class="design-option">
           <div class="option-title">窗套样式</div>
+          <div class="option-grid stone-colors-grid" ref="WindowStyleRef" @mousedown="handleMouseDown"
+            @mousemove="handleMouseMove" @mouseup="handleMouseUp" @mouseleave="handleMouseUp">
+            <div v-for="(WindowStyleItem, index) in WindowStyle" :key="index" class="option-item"
+              :class="{ active: selectedWindowStyle === WindowStyleItem.value }"
+              @click="selectWindowStyle(WindowStyleItem.value, 'WindowStyleRef', index)">
+              <div v-if="WindowStyleItem.value" class="split-icon"
+                :style="{ backgroundImage: `url(${imgBaseUrl}${WindowStyleItem.imgPath})` }">
+              </div>
+              <div v-else class="split-icon">
+                <img width="50" :src="require('@/assets/AIDesign/nothing1.png')" />
+              </div>
+              <div class="split-name">{{ WindowStyleItem.text }}</div>
+              <div v-show="WindowStyleItem.value != '无' && WindowStyleItem.value != 'CUSTOM'" class="magnifyingGlassBox"
+                @click.stop="openComponentPreview(index - 1, WindowStyle)">
+                <img :src="require('@/assets/AIDesign/magnifyingGlassIcon.png')" />
+              </div>
+            </div>
+          </div>
+        </div>
+        <!-- 窗套颜色 -->
+        <div class="design-option" v-show="selectedWindowStyle != '无'">
+          <div class="option-title">窗套颜色</div>
           <div class="option-grid stone-colors-grid" ref="windowsRef" @mousedown="handleMouseDown"
             @mousemove="handleMouseMove" @mouseup="handleMouseUp" @mouseleave="handleMouseUp">
             <div v-for="(windowFrame, index) in windowFrames" :key="index" class="option-item"
@@ -250,6 +271,23 @@
             <img width="12" :src="require('@/assets/AIDesign/rightjt.png')" />
           </div>
         </div>
+        <!-- 浮雕 -->
+        <div class="design-option">
+          <div class="option-title">浮雕</div>
+          <div class="option-grid stone-colors-grid" ref="outsideReliefRef" @mousedown="handleMouseDown"
+            @mousemove="handleMouseMove" @mouseup="handleMouseUp" @mouseleave="handleMouseUp">
+            <div v-for="(Relief, index) in outsideRelief" :key="index" class="option-item"
+              :class="{ active: selectedReliefType === Relief.value }"
+              @click="selectReliefType(Relief.value, 'outsideReliefRef', index)">
+              <div class="railing-icon" :style="{ backgroundImage: `url(${imgBaseUrl}${Relief.imgPath})` }"></div>
+              <div class="railing-name">{{ Relief.text }}</div>
+              <div v-show="Relief.value != '无' && Relief.value != 'CUSTOM'" class="magnifyingGlassBox"
+                @click.stop="openComponentPreview(index - 1, outsideRelief)">
+                <img :src="require('@/assets/AIDesign/magnifyingGlassIcon.png')" />
+              </div>
+            </div>
+          </div>
+        </div>
       </section>
       <!-- 外墙平涂选项 -->
       <section v-show="activeName === '外墙平涂'" class="radio-group-container1">
@@ -384,6 +422,8 @@ export default class extends Vue {
     railingsRef: HTMLDivElement;
     tilesRef: HTMLDivElement;
     skirtTypesRef: HTMLDivElement;
+    outsideReliefRef: HTMLDivElement;
+    WindowStyleRef: HTMLDivElement;
   };
 
   private readState = true;
@@ -427,6 +467,8 @@ export default class extends Vue {
   private tiles = []; // 琉璃瓦选项
   private ColumnTypes = [];// 罗马柱选项
   private skirtTypes = [];// 墙裙
+  private outsideRelief = [];//浮雕
+  private WindowStyle = [];//窗套样式
 
   // 外墙质感
   private DesignStyle = null;//设计风格
@@ -438,6 +480,8 @@ export default class extends Vue {
   private selectedWindowFrame = null;//窗套样式
   private selectedTile = null;//琉璃瓦
   private selectedSkirtType = null;//墙裙
+  private selectedReliefType = null;//浮雕
+  private selectedWindowStyle = null;//窗套样式
 
 
   private color_options = [];//外墙平涂列表
@@ -466,7 +510,7 @@ export default class extends Vue {
     } else {
       this.imgBaseUrl = 'https://aidesigntest.nipponpaint.com.cn'
     }
-    if(window.localStorage.getItem('agentFromAI') === 'stoneLikePaint'){
+    if (window.localStorage.getItem('agentFromAI') === 'stoneLikePaint') {
       this.getServiceCode();
     }
   }
@@ -612,7 +656,7 @@ export default class extends Vue {
   }
 
   returnPage() {
-    this.$router.push({ path: "/AiDesign" });
+    this.$router.push({ path: "/AIDesign" });
   }
   toHome() {
     toLBHome()
@@ -622,9 +666,9 @@ export default class extends Vue {
   }
 
   // 处理罗马柱
-  openComponentPreview(initIndex: number) {
-    if (this.ColumnTypes.length > 0) {
-      const imgArray = this.ColumnTypes
+  openComponentPreview(initIndex: number, list) {
+    if (list.length > 0) {
+      const imgArray = list
         .filter(item => item.value != '无' && item.imgPath);
       this.imgValuesArray = imgArray.map(item => this.imgBaseUrl + item.imgPath);
       this.titlesArray = imgArray.map(item => item.text);
@@ -693,6 +737,8 @@ export default class extends Vue {
           this.selectedRailing = response.Data.F_CastRailing || this.railings[0].value;
           this.selectedTile = response.Data.F_GlazedTile || this.tiles[0].value;//新琉璃瓦
           this.selectedSkirtType = response.Data.F_SkirtType || this.skirtTypes[0].value;//墙裙
+          this.selectedReliefType = response.Data.F_carvingType || this.outsideRelief[0].value;//浮雕
+          this.selectedWindowStyle = response.Data.F_WindowsStyle || this.WindowStyle[0].value;//窗套样式
           this.oldf_id = response.Data.F_ID;
           this.color_selValue = response.Data.F_Color || null;// 外墙平涂选中的值
           if (this.color_selValue) {
@@ -828,6 +874,11 @@ export default class extends Vue {
     this.autoScrollToActive(refsName, selcIndex); // 选中后触发自动滚动
   }
 
+  private selectWindowStyle(value: string, refsName: string, selcIndex: number) {
+    this.selectedWindowStyle = value;
+    this.autoScrollToActive(refsName, selcIndex); // 选中后触发自动滚动
+  }
+
   private selectWindowFrame(value: string, refsName: string, selcIndex: number) {
     this.selectedWindowFrame = value;
     this.autoScrollToActive(refsName, selcIndex); // 选中后触发自动滚动
@@ -853,6 +904,12 @@ export default class extends Vue {
     this.autoScrollToActive(refsName, selcIndex); // 选中后触发自动滚动
   }
 
+  private selectReliefType(value: string, refsName: string, selcIndex: number) {
+    this.selectedReliefType = value;
+    this.autoScrollToActive(refsName, selcIndex); // 选中后触发自动滚动
+  }
+
+
   // 添加鼠标滚轮事件处理
   private handleWheel(e: WheelEvent) {
     const container = e.currentTarget as HTMLElement;
@@ -923,11 +980,13 @@ export default class extends Vue {
       const uColorCard = this.ColorCard === '无' ? '' : this.ColorCard;
       const uSelectedProcess = this.selectedProcess === '无' ? '' : this.selectedProcess;
       let uSelectedSplit = this.selectedSplit === '无' ? '' : this.selectedSplit;
-      const uWindowsColor = this.selectedWindowFrame === '无' ? '' : this.selectedWindowFrame;
+      const uWindowsColor = (this.selectedWindowFrame === '无' || this.selectedWindowStyle === '无') ? '' : this.selectedWindowFrame;//窗套样式为空也传空
       const uCastRailing = this.selectedRailing === '无' ? '' : this.selectedRailing;
       const uColumnType = this.selectedColumnType === '无' ? '' : this.selectedColumnType;//没有传空
       const uGlazedTile = this.selectedTile === '无' ? '' : this.selectedTile;
       const uSkirtType = this.selectedSkirtType === '无' ? '' : this.selectedSkirtType;
+      const uReliefType = this.selectedReliefType === '无' ? '' : this.selectedReliefType;
+      const uWindowStyle = this.selectedWindowStyle === '无' ? '' : this.selectedWindowStyle;
       formData.append('DesignStyle', uDesignStyle);
       formData.append('ColorCard', uColorCard);
       formData.append('DeepGrooveTech', uSelectedProcess);
@@ -937,6 +996,8 @@ export default class extends Vue {
       formData.append('GlazedTile', uGlazedTile);
       formData.append('columnType', uColumnType);//罗马柱
       formData.append('skirtType', uSkirtType);//墙裙
+      formData.append('ReliefType', uReliefType);//浮雕
+      formData.append('WindowStyle', uWindowStyle);//窗套
 
     } else if (this.activeName === '外墙平涂') {
       //  如果字典渲染有误,不让提交;
@@ -1155,6 +1216,11 @@ export default class extends Vue {
         this.color_options = response.Data.dict.outsideColor;
         // 墙裙
         this.skirtTypes = response.Data.dict.outsideSkirtType;
+        // 浮雕
+        this.outsideRelief = response.Data.dict.outsideRelief;
+        // 窗套样式
+        this.WindowStyle = response.Data.dict.WindowStyle;
+
         // 罗马柱选项
         if (this.designStyles && this.designStyles[0] && this.designStyles[0].subitems) {
           this.ColumnTypes = this.designStyles[0].subitems || [];
@@ -1191,6 +1257,8 @@ export default class extends Vue {
     this.selectedRailing = this.railings[0].value;
     this.selectedTile = this.tiles[0].value;
     this.selectedSkirtType = this.skirtTypes[0].value;
+    this.selectedReliefType = this.outsideRelief[0].value;
+    this.selectedWindowStyle = this.WindowStyle[0].value;
   }
 
   //关联列表模糊查询

+ 2 - 2
src/views/AIDesign/diagnose.vue

@@ -27,7 +27,7 @@
                                 @click="imgClick(selectedImage)" />
                         </div>
                         <div v-else class="placeholder">
-                            <p class="placeholder-text">请上传一张待诊断的{{ wallType == "outside" ? "外墙" : "内墙" }}房屋照片</p>
+                            <p class="placeholder-text">请上传一张待诊断的<span class="red-name-title">{{ wallType == "outside" ? "外墙" : "内墙" }}</span>房屋照片</p>
                             <p class="placeholder-text-tit">(避免模糊、光线不佳)</p>
                         </div>
                         <div class="image-buttons">
@@ -326,7 +326,7 @@ export default class extends Vue {
         this.$router.push({ path: '/AIDesign/diagnoseHistory', query: { wallType: this.wallType } });
     }
     returnPage() {
-        this.$router.push({ path: "/AiDesign" });
+        this.$router.push({ path: "/AIDesign" });
     }
     toHome() {
         toLBHome()

+ 3 - 1
src/views/AIDesign/diagnoseHistory.vue

@@ -133,6 +133,7 @@ export default class Resout extends Vue {
         this.isLoadingMore = false;
         this.hasMore = true;
         this.isProcessing = false; // 防止重复加载的锁
+        this.isLongPressing = false;
     }
 
     // 处理滚动事件
@@ -412,7 +413,7 @@ export default class Resout extends Vue {
         width: 50px;
         position: absolute;
         right: 20px;
-        top: 14px;
+        top: 56px;
         border-radius: 8px;
         background-color: #2484F2;
         color: #fff;
@@ -421,6 +422,7 @@ export default class Resout extends Vue {
 
 .image-groups {
     flex: 1;
+    padding-top:15px;
 }
 
 .image-group {

+ 7 - 4
src/views/AIDesign/history.vue

@@ -8,7 +8,7 @@
       </van-nav-bar>
     </div>
     <div class="container">
-      <van-button class="selecBtn" size="small" @click="selectImage">
+      <van-button class="selecBtn" size="small" @click="selectImage"  v-show="Object.keys(groupedImages).length > 0">
         {{ isLongPressing ? "取消" : "选择" }}
       </van-button>
 
@@ -77,7 +77,7 @@
 import { Component, Vue } from "vue-property-decorator";
 import { GetDesignList, DeleteEntity, insideGetDesignList, insideDeleteEntity } from "@/api/indexAI";
 import { Lazyload, Loading } from 'vant';
-import { toLBHome } from '@/utils/index';
+import { toLBHome, getWecomType } from '@/utils/index';
 
 Vue.use(Lazyload);
 Vue.use(Loading);
@@ -131,6 +131,7 @@ export default class Resout extends Vue {
     this.images = [];
     this.pagination.page = 1;
     this.hasMore = true;
+    this.isLongPressing = false;
     this.getDataInfioList();
     // 监听滚动事件
     window.addEventListener('scroll', this.handleScroll);
@@ -201,14 +202,15 @@ export default class Resout extends Vue {
 
   // 获取数据列表 - 支持加载更多
   getDataInfioList(isLoadMore = false): void {
+    const userWecomType = sessionStorage.getItem("userWecomType") ? Number(sessionStorage.getItem("userWecomType")) : 5;
     const queryJson = {
       // WXuserid: userInfo.loginName
+      wecomType:userWecomType
     };
 
     const formData = new FormData();
     formData.append("pagination", JSON.stringify(this.pagination));
     formData.append("queryJson", JSON.stringify(queryJson));
-
     this.GetDesignListToApi[this.wallType](formData).then((res) => {
       if (res.StatusCode == 200) {
         // 加载更多时合并数据,否则替换数据
@@ -406,7 +408,7 @@ export default class Resout extends Vue {
     width: 50px;
     position: absolute;
     right: 20px;
-    top: 14px;
+    top: 56px;
     border-radius: 8px;
     background-color: #2484F2;
     color: #fff;
@@ -415,6 +417,7 @@ export default class Resout extends Vue {
 
 .image-groups {
   flex: 1;
+  padding-top:15px;
 }
 
 .image-group {

+ 0 - 1
src/views/AIDesign/index.vue

@@ -117,7 +117,6 @@ export default class extends Vue {
   }
   // 点击事件处理
   handleDesignClick(type) {
-    console.log("=====点击事件处理====")
     if (type === 'outside') {
       // 外墙设计页
       this.$router.push("/AIDesign/design");

+ 2 - 2
src/views/AIDesign/insideDesign.vue

@@ -24,7 +24,7 @@
           </div>
           <div v-else class="placeholder">
             <img width="50" :src="require('@/assets/AIDesign/picture.png')" />
-            <p class="placeholder-text">请上传一张待设计内墙的房屋照片</p>
+            <p class="placeholder-text">请上传一张待设计<span class="red-name-title">【内墙】</span>的房屋照片</p>
             <p class="placeholder-text-tit">(避免模糊、光线不佳)</p>
           </div>
           <div class="image-buttons">
@@ -755,7 +755,7 @@ export default class extends Vue {
     });
   }
   returnPage() {
-    this.$router.push({ path: "/AiDesign" });
+    this.$router.push({ path: "/AIDesign" });
   }
   toHome() {
     toLBHome()

+ 36 - 51
src/views/AIDesign/result.vue

@@ -32,13 +32,13 @@
             <div class="image-wrapper" @click="imgClick(UserFilePathUrl)">
               <img :src="UserFilePathUrl" alt="房屋效果图" class="house-image" @error="handleImageError" />
               <div v-on="{
-                'click.stop': imgHasErr ? () => reloadImage('userFile') : () => {}
+                'click.stop': imgHasErr ? () => reloadImage('userFile') : () => { }
               }"></div>
             </div>
             <div class="image-wrapper" @click="imgClick(imageUrl)">
               <img :src="imageUrlSmall" alt="房屋效果图" class="house-image" @error="handleImageError" />
               <div v-on="{
-                'click.stop': imgHasErr ? () => reloadImage('imageSmall') : () => {}
+                'click.stop': imgHasErr ? () => reloadImage('imageSmall') : () => { }
               }"></div>
             </div>
           </div>
@@ -171,9 +171,9 @@ export default class extends Vue {
     const customerCode = userInfo && userInfo.sysUserExt ? userInfo.sysUserExt.customerCode : '';
     const salesLevel = userInfo && userInfo.sysUserExt ? userInfo.sysUserExt.salesLevel : '';
     // 外墙-服务商随身邦
-    if (this.agentFrom === 'stoneLikePaint' && this.wallType === 'outside' && this.$route.query.projectid) {
-      this.projectId = this.$route.query.projectid;
-      this.getProjectDisableFlag();
+    if (this.agentFrom === 'stoneLikePaint' && this.wallType === 'outside') {
+      this.getIsNeedProjectFlag();
+      this.showArtificial = true;
     }
     // 和部分经销商展示转人工
     // else if(customerCode && (salesLevel === 'customer_level' || salesLevel === 'reseller_level')){
@@ -238,21 +238,15 @@ export default class extends Vue {
           that.imgHasErr = false;
         }
       } else {
-        const high_Definition_img = that.allRes.F_ResultCollageFilePath || that.allRes.F_ResultFilePath || that.allRes.F_ResultlargeFilePath || that.allRes.F_ResultSmallFilePath;
+        let high_Definition_img = that.allRes.F_ResultFilePath || that.allRes.F_ResultlargeFilePath || that.allRes.F_ResultSmallFilePath;
         if (high_Definition_img) {
-          // that.imageUrl = that.allRes.BaseUrl + high_Definition_img;
-          // that.imageUrlSmall = that.allRes.BaseUrl + that.allRes.F_ResultSmallFilePath;
-          that.imageUrl = that.allRes.BaseUrl +  high_Definition_img;
-          that.imageUrlSmall = that.allRes.BaseUrl + high_Definition_img;
+          that.imageUrl = that.allRes.BaseUrl + high_Definition_img;
+          that.imageUrlSmall = that.allRes.BaseUrl + that.allRes.F_ResultSmallFilePath;
           that.imgHasErr = false;
         }
       }
     }
   }
-  getProjectDisableFlag() {
-    this.showArtificial = true;
-    this.getIsNeedProjectFlag();//获取是否关联了项目
-  }
   // 是否关联了项目
   getIsNeedProjectFlag() {
     let that = this;
@@ -267,7 +261,7 @@ export default class extends Vue {
     // formData.append('roleIds', roleIdArray.join(','));
     // formData.append('WXuserid', userInfo.loginName);
     formData.append('baseType', 0);//0外墙--这里只用查询外墙
-    const agentFrom = window.localStorage.getItem('agentFromAI');
+    // const agentFrom = window.localStorage.getItem('agentFromAI');
     // const wecomType = getWecomType(agentFrom);
     // formData.append('wecomType', 5);
     GetDictList(formData).then(response => {
@@ -277,30 +271,10 @@ export default class extends Vue {
         } else {
           that.isNeedProjectFlag = response.Data.isNeedProject;
         }
-        if (that.isNeedProjectFlag) {
-          that.updateCheckedProjectLastNum();
-        } else {
-          that.projectDisableFlag = false;//没有项目就可点击
-        }
       }
     })
   }
-  //获取选中关联项目已用数量
-  private updateCheckedProjectLastNum() {
-    let that = this;
-    const formData = new FormData();
-    formData.append('ServiceCode', that.serviceCodeArray.join(','));
-    formData.append('projectid', this.projectId);
-    GetProjectlist(formData).then(response => {
-      if (response.StatusCode == 200 && response.Data && response.Data[0]) {
-        that.outsideDesignCount = response.Data[0].DesignCount || 0;
-        // 单一关联项目下设计了1~3套,转人工设计均置灰不可点。从第4套起等转人工设计均可点
-        if (that.outsideDesignCount >= 3) {
-          that.projectDisableFlag = false;//有项目判断>=3出现
-        }
-      }
-    });
-  }
+
   private getServiceCode() {
     let that = this;
     const userInfo: any = JSON.parse(window.localStorage.getItem("userInfoV1")!);
@@ -398,16 +372,21 @@ export default class extends Vue {
           this.StateInfo = response.Data.Description;
           this.projectId = response.Data.ProjectID;
           this.F_OutsideType = response.Data.F_OutsideType;
+          let DesignCount = response.Data.DesignCount || 0;
           // 外墙-服务商随身邦
           if (this.agentFrom === 'stoneLikePaint' && this.wallType === 'outside') {
-            this.getProjectDisableFlag();
+            if (that.isNeedProjectFlag) {
+              if (DesignCount >= 3) {
+                that.projectDisableFlag = false;//有项目判断>=3出现
+              }
+            } else {
+              that.projectDisableFlag = false;//没有项目就可点击
+            }
           }
-          const high_Definition_img = response.Data.F_ResultCollageFilePath || response.Data.F_ResultFilePath || response.Data.F_ResultlargeFilePath || response.Data.F_ResultSmallFilePath;   
-          if (high_Definition_img ) {
-            // that.imageUrl = response.Data.BaseUrl + high_Definition_img;
-            // that.imageUrlSmall = response.Data.BaseUrl + response.Data.F_ResultSmallFilePath;
-            that.imageUrl = response.Data.BaseUrl +  high_Definition_img;
-            that.imageUrlSmall = response.Data.BaseUrl + high_Definition_img;
+          if (response.Data.F_ResultFilePath || response.Data.F_ResultlargeFilePath) {
+            const high_Definition_img = response.Data.F_ResultFilePath || response.Data.F_ResultlargeFilePath || response.Data.F_ResultSmallFilePath;
+            that.imageUrl = response.Data.BaseUrl + high_Definition_img;
+            that.imageUrlSmall = response.Data.BaseUrl + response.Data.F_ResultSmallFilePath;
             that.UserFilePathUrl = response.Data.BaseUrl + response.Data.F_UserFilePath;
           }
           if (response.Data.StateCode == 1) {
@@ -452,16 +431,21 @@ export default class extends Vue {
           this.StateInfo = response.Data.Description;
           this.F_OutsideType = response.Data.F_OutsideType;
           this.projectId = response.Data.ProjectID;
+          let DesignCount = response.Data.DesignCount || 0;
           // 外墙-服务商随身邦
           if (this.agentFrom === 'stoneLikePaint' && this.wallType === 'outside') {
-            this.getProjectDisableFlag();
+            if (that.isNeedProjectFlag) {
+              if (DesignCount >= 3) {
+                that.projectDisableFlag = false;//有项目判断>=3出现
+              }
+            } else {
+              that.projectDisableFlag = false;//没有项目就可点击
+            }
           }
-          const high_Definition_img = response.Data.F_ResultCollageFilePath || response.Data.F_ResultFilePath || response.Data.F_ResultlargeFilePath || response.Data.F_ResultSmallFilePath;  
-          if (high_Definition_img) {
-            // that.imageUrl = response.Data.BaseUrl + high_Definition_img;
-            // that.imageUrlSmall = response.Data.BaseUrl + response.Data.F_ResultSmallFilePath;
-            that.imageUrl = response.Data.BaseUrl +  high_Definition_img;
-            that.imageUrlSmall = response.Data.BaseUrl + high_Definition_img;
+          if (response.Data.F_ResultFilePath || response.Data.F_ResultlargeFilePath) {
+            const high_Definition_img = response.Data.F_ResultFilePath || response.Data.F_ResultlargeFilePath || response.Data.F_ResultlargeFilePath;
+            that.imageUrl = response.Data.BaseUrl + high_Definition_img;
+            that.imageUrlSmall = response.Data.BaseUrl + response.Data.F_ResultSmallFilePath;
             that.UserFilePathUrl = response.Data.BaseUrl + response.Data.F_UserFilePath;
           }
           if (response.Data.StateCode == 2 || response.Data.StateCode == 3 || response.Data.StateCode == 4) {
@@ -562,11 +546,12 @@ export default class extends Vue {
     let that = this;
     // 实现重新生成逻辑
     const F_ID = this.$route.query.F_id || "";
+    let projectId = this.allRes.WecomType == 2 && that.projectId ? that.projectId : null;
     this.$router.push({
       path: this.designPageApi[this.wallType],
       query: {
         F_id: F_ID,
-        projectId: that.projectId
+        projectId
       }
     });
   }

+ 1 - 1
src/views/login/index.vue

@@ -70,7 +70,7 @@ export default class extends Vue {
         this.$router.push('/');
         console.log(`模拟登录成功`);
       }).catch((err) => {
-        console.log("err=", err)
+        console.log("err=", err);
       })
   }
 }