| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959 |
- <template>
- <div class="resout-container AI-Design-container">
- <div class="header">
- <van-nav-bar title="生成结果" left-arrow @click-left="returnPage" @click-right="toHome">
- <template #right>
- <van-icon name="wap-home-o" color="#333" size="26" />
- </template>
- </van-nav-bar>
- </div>
- <div class="container">
- <!-- 历史生图 -->
- <div class="history-section padded-lr-20" v-if="wallType === 'outside'">
- <div class="history-header" @click="viewHistory">
- <van-icon name="clock-o" color="#EC8868" />
- <span>历史生图</span>
- <span v-if="!readState" class="badge-dot"></span>
- </div>
- </div>
- <!-- 房屋效果图 -->
- <div class="image-container">
- <div v-if="imageUrl" class="comparisonWrapper">
- <div class="imgbox-t">
- <div>
- <p class="tit">原图</p>
- </div>
- <div>
- <p class="tit">AI效果图</p>
- </div>
- </div>
- <div class="imgbox-b">
- <div class="image-wrapper" @click="imgClick(UserFilePathUrl)">
- <img :src="UserFilePathUrl" alt="房屋效果图" class="house-image" />
- <div></div>
- </div>
- <div class="image-wrapper" @click="imgClick(imageUrl)">
- <img :src="imageUrlSmall" alt="房屋效果图" class="house-image" />
- <div></div>
- </div>
- </div>
- </div>
- <div v-else class="loading-state">
- <img v-if="StateCode != 3 && StateCode != 4" src="@/assets/AIDesign/loding.gif" style="width: 100px;">
- <p class="loading-text">{{ type || StateCode ? (StateCode == 3 ? '生成失败' : (StateCode == 4 ?
- '生成失败,\n' + StateInfo :
- '正在为您加速生成中,先喝杯茶吧~\n退出本页不影响生成')) : '加载中...' }}</p>
- </div>
- </div>
- <!-- 功能按钮组 -->
- <!-- 外墙 -->
- <div class="button-group-outside" v-if="wallType === 'outside'">
- <button class="action-button-big flex-center" @click="handleAIfun"
- v-if="agentFrom === 'stoneLikePaint' && allRes && allRes.F_DesignStyle != 'CHANGE_COLOR'">
- <img src="@/assets/AIDesign/file-excel-line.png" class="icon" />
- <div>
- <div class="title">确认AI设计</div>
- <div class="text">生成解决方案</div>
- </div>
- </button>
- <div class="flex-between">
- <button class="action-button-middle flex-center" :disabled="regenerateDisable"
- :class="regenerateDisable == true ? 'save-button-disabled' : ''" @click="regenerate">
- <img src="@/assets/AIDesign/resetIcon.png" class="icon" />
- <div>
- <div class="title">重新生成</div>
- <div class="text">再来一次也不错</div>
- </div>
- </button>
- <button class="action-button-middle flex-center" @click="manualDesign" :disabled="projectDisableFlag"
- v-if="showArtificial && !projectDisableFlag"
- :class="projectDisableFlag == true ? 'save-button-disabled' : ''">
- <img src="@/assets/AIDesign/bsIcon.png" class="iconbig" />
- <div>
- <div class="title">转人工设计
- </div>
- <div class="text">别墅之星小程序</div>
- </div>
- </button>
- </div>
- </div>
- <!-- 内墙 -->
- <div class="button-group" v-if="wallType === 'inside'">
- <button class="action-button" :disabled="regenerateDisable"
- :class="regenerateDisable == true ? 'save-button-disabled' : ''" @click="regenerate">
- <van-icon class="icon" name="replay" />
- <span class="text">重新生成</span>
- </button>
- <button class="action-button" @click="viewHistory">
- <van-icon class="icon" name="clock-o" />
- <span class="text">历史生图</span>
- <span v-if="!readState" class="badge-dot"></span>
- </button>
- </div>
- </div>
- </div>
- </template>
- <script lang="ts">
- import { ImagePreview, Dialog } from 'vant';
- import { Component, Vue } from "vue-property-decorator";
- import { GetEntity, GetReadState, UpdateReadState, insideGetEntity, insideGetReadState, insideUpdateReadState, GetProjectlist, GetDictList, AddTrackEvent } from "@/api/indexAI";
- import { getWecomType, toLBHome, toXiaoChengxu, getWxconfig, getWecomTypeName, checkAndSaveUserWecomType } from '@/utils/index';
- import axios from "axios";
- declare let wx: any;
- @Component
- export default class extends Vue {
- private readState = true;
- // 数据属性
- // private imageUrl = require('@/assets/AIDesign/house-image.jpg'); // 替换为实际图片路径
- private imageUrl = ''; // 替换为实际图片路径
- private imageUrlSmall = '';
- private UserFilePathUrl = '';//用户原图
- private pollingTimer: number | null = null; // 轮询定时器引用
- private timer = null;
- private StateCode = null;
- private projectId = null;
- private regenerateDisable = true;
- private StateInfo = '';
- private type = '';
- private wallType = '';
- private F_OutsideType = null;
- // 处理内外墙api
- private GetEntityToApi = {
- outside: GetEntity,
- inside: insideGetEntity
- };
- private GetReadStateToApi = {
- outside: GetReadState,
- inside: insideGetReadState
- };
- private UpdateReadStateToApi = {
- outside: UpdateReadState,
- inside: insideUpdateReadState
- };
- private designPageApi = {
- outside: '/AIDesign/design',
- inside: '/AIDesign/insideDesign'
- };
- private designTimer = {
- outside: 30000,
- inside: 20000
- };
- private showArtificial = false;
- private agentFrom = window.localStorage.getItem('agentFromAI');
- private outsideDesignCount = 0;//项目下设计已用数量-接口获取
- private isNeedProjectFlag = true;//是否需要项目-接口获取
- private projectDisableFlag = true;//转人工不可点击
- private serviceCodeArray = [];
- private allRes = null;
- created() {
- if (window.localStorage.getItem('agentFromAI') === 'stoneLikePaint') {
- this.getServiceCode();
- }
- checkAndSaveUserWecomType();
- getWxconfig();
- }
- activated() {
- this.initialize();
- this.wallType = this.$route.query.wallType || 'outside';
- const userInfo: any = JSON.parse(window.localStorage.getItem("userInfoV1")!);
- const customerCode = userInfo && userInfo.sysUserExt ? userInfo.sysUserExt.customerCode : '';
- const salesLevel = userInfo && userInfo.sysUserExt ? userInfo.sysUserExt.salesLevel : '';
- // 外墙-服务商随身邦
- if (this.agentFrom === 'stoneLikePaint' && this.wallType === 'outside') {
- this.showArtificial = true;
- this.getIsNeedProjectFlag();//获取是否关联了项目
- }
- // 和部分经销商展示转人工
- // else if(customerCode && (salesLevel === 'customer_level' || salesLevel === 'reseller_level')){
- // this.showArtificial = true;
- // }
- // 从经销商随身邦进入的,显示转人工按钮,没有次数限制
- if ((this.agentFrom === 'ssb' || this.agentFrom === 'dg') && this.wallType === 'outside') {
- this.showArtificial = true;
- this.projectDisableFlag = false;
- }
- this.type = window.localStorage.getItem('type');
- this.GetReadStateFn();
- this.GetEntityDataFirst()
-
- }
- // 离开页面时清除定时器
- deactivated() {
- // console.log('resule页面销毁1')
- window.localStorage.removeItem('type');
- clearInterval(this.pollingTimer);
- clearTimeout(this.timer);
- this.pollingTimer = null;
- this.timer = null;
- }
- initialize() {
- clearInterval(this.pollingTimer);
- clearTimeout(this.timer);
- this.readState = true;
- this.imageUrl = ''; // 替换为实际图片路径
- this.imageUrlSmall = '';
- this.UserFilePathUrl = '';//用户原图
- this.pollingTimer = null; // 轮询定时器引用
- this.timer = null;
- this.StateCode = null;
- this.projectId = null;
- this.regenerateDisable = true;
- this.StateInfo = '';
- this.type = '';
- this.wallType = '';
- this.outsideDesignCount = 0;
- this.isNeedProjectFlag = true;
- this.projectDisableFlag = true;
- this.showArtificial = false;
- this.allRes = null;
- }
- // 是否关联了项目
- getIsNeedProjectFlag() {
- let that = this;
- const formData = new FormData();
- // const userInfo: any = JSON.parse(window.localStorage.getItem("userInfoV1")!);
- // let roleIdArray = [];
- // if (userInfo.roles.length > 0) {
- // userInfo.roles.forEach(item => {
- // roleIdArray.push(item.roleId);
- // })
- // }
- // formData.append('roleIds', roleIdArray.join(','));
- // formData.append('WXuserid', userInfo.loginName);
- formData.append('baseType', 0);//0外墙--这里只用查询外墙
- const agentFrom = window.localStorage.getItem('agentFromAI');
- // const wecomType = getWecomType(agentFrom);
- // formData.append('wecomType', 5);
- GetDictList(formData).then(response => {
- if (response.StatusCode == 200) {
- if (that.serviceCodeArray.length == 0) {
- that.isNeedProjectFlag = false; //是否需要项目
- } 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(','));
- const projectid = this.$route.query.projectid || this.projectId || '';
- formData.append('projectid', projectid);
- if (!projectid) {
- that.projectDisableFlag = false;//有项目判断>3可点击
- }
- 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")!);
- let serviceCodeArray = [];
- // if (userInfo && userInfo.loginTypeList && userInfo.loginTypeList.length > 0) {
- // userInfo.loginTypeList.forEach(item => {
- // if (item.shopType == 'stoneLikePaint') {
- // item.shopList.forEach(childItem => {
- // serviceCodeArray.push(childItem.shop_code);
- // })
- // }
- // })
- // }
- if (userInfo && userInfo.ServiceCode) {
- serviceCodeArray = userInfo.ServiceCode.split(',').map(item => item.trim()).filter(item => item !== '');
- }
- that.serviceCodeArray = serviceCodeArray;
- }
- GetReadStateFn() {
- const formData = new FormData();
- // const userInfo: any = JSON.parse(window.localStorage.getItem("userInfoV1")!);
- // formData.append('WXuserid', userInfo.loginName);
- if (this.wallType === 'outside') {
- const outsideType_val = this.F_OutsideType || 0;
- formData.append('outsideType', outsideType_val);
- }
- this.GetReadStateToApi[this.wallType](formData).then(response => {
- if (response.StatusCode == 200) {
- this.readState = response.Data.readState;
- }
- });
- }
- UpdateReadStateFn() {
- const formData = new FormData();
- // const userInfo: any = JSON.parse(window.localStorage.getItem("userInfoV1")!);
- // formData.append('WXuserid', userInfo.loginName);
- const outsideType_val = this.F_OutsideType || 0;
- formData.append('outsideType', outsideType_val);
- this.UpdateReadStateToApi[this.wallType](formData).then(response => { });
- }
- returnPage() {
- this.$router.push({ path: this.designPageApi[this.wallType] });
- // this.$router.back();
- }
- toHome() {
- toLBHome()
- }
- imgClick(url) {
- ImagePreview([url]);
- }
- private startPolling(): void {
- // 立即执行一次检查
- this.GetEntityData();
- // 设置定时器每秒执行一次检查
- this.pollingTimer = window.setInterval(() => {
- if (!this.imageUrl) {
- if (this.StateCode == 3 || this.StateCode == 4) {
- clearInterval(this.pollingTimer);
- this.pollingTimer = null;
- } else {
- this.GetEntityData();
- }
- } else {
- // 当 imageUrl 有值时,清除定时器
- if (this.pollingTimer) {
- clearInterval(this.pollingTimer);
- this.pollingTimer = null;
- }
- }
- }, 3000);
- }
- //进入页面首次调用获取状态
- GetEntityDataFirst() {
- let that = this;
- const F_ID = this.$route.query.F_id || "";
- const formData = new FormData();
- formData.append('F_id', F_ID);
- this.GetEntityToApi[this.wallType](formData).then(response => {
- // console.log(response);
- if (response.StatusCode == 200) {
- if (response.Data == null) {
- that.regenerateDisable = true;
- if (that.timer) {
- clearTimeout(that.timer);
- that.timer = null;
- }
- that.timer = setTimeout(() => {
- that.startPolling();
- }, that.designTimer[that.wallType]);
- } else {
- this.allRes = response.Data;
- this.StateCode = response.Data.StateCode;
- this.StateInfo = response.Data.Description;
- this.projectId = response.Data.ProjectID;
- this.F_OutsideType = response.Data.F_OutsideType;
- 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) {
- let createTime = new Date(response.Data.CreateDate);
- let currentTime = new Date().getTime();
- if (currentTime - createTime > that.designTimer[that.wallType]) {
- that.startPolling();
- } else {
- if (that.timer) {
- clearTimeout(that.timer);
- that.timer = null;
- }
- that.timer = setTimeout(() => {
- that.startPolling();
- }, currentTime - createTime);
- }
- } else {
- if (response.Data.StateCode == 2 || response.Data.StateCode == 3 || response.Data.StateCode == 4) {
- that.regenerateDisable = false;
- } else {
- that.regenerateDisable = true;
- }
- }
- }
- } else {
- this.$toast.fail(response.Info);
- }
- })
- }
- GetEntityData() {
- let that = this;
- const F_ID = this.$route.query.F_id || "";
- const formData = new FormData();
- formData.append('F_id', F_ID);
- this.GetEntityToApi[this.wallType](formData).then(response => {
- // console.log(response);
- if (response.StatusCode == 200) {
- if (response.Data) {
- this.allRes = response.Data;
- this.StateCode = response.Data.StateCode;
- this.StateInfo = response.Data.Description;
- this.F_OutsideType = response.Data.F_OutsideType;
- 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) {
- that.regenerateDisable = false;
- } else {
- that.regenerateDisable = true;
- }
- } else {
- that.regenerateDisable = true;
- }
- } else {
- this.$toast.fail(response.Info);
- }
- })
- }
- // 点击保存图片按钮
- saveImageToAlbum() {
- const that = this;
- wx.ready(function () {
- // 1. 检查用户是否授权保存图片到相册
- wx.getSetting({
- success: (res) => {
- // 2. 如果未授权,请求授权
- if (!res.authSetting['scope.writePhotosAlbum']) {
- wx.authorize({
- scope: 'scope.writePhotosAlbum',
- success: () => {
- // 授权成功,执行保存逻辑
- that.downloadAndSaveImage();
- },
- fail: () => {
- // 用户拒绝授权,引导手动开启
- wx.showModal({
- title: '授权提示',
- content: '需要你的授权才能保存图片到相册,请在设置中开启授权',
- confirmText: '去设置',
- success: (modalRes) => {
- if (modalRes.confirm) {
- // 打开设置页面
- wx.openSetting({
- success: (settingRes) => {
- if (settingRes.authSetting['scope.writePhotosAlbum']) {
- that.downloadAndSaveImage();
- } else {
- that.$toast.fail('未授权,无法保存图片');
- }
- }
- });
- }
- }
- });
- }
- });
- } else {
- // 已授权,直接执行保存逻辑
- that.downloadAndSaveImage();
- }
- },
- fail: (err) => {
- console.error('获取设置失败', err);
- that.$toast.fail('获取授权状态失败,请重试');
- }
- });
- });
- }
- // 下载图片并保存到相册
- downloadAndSaveImage() {
- const that = this;
- const imageUrl = this.imageUrl;
- wx.ready(function () {
- // 1. 下载OSS图片到本地临时路径
- wx.downloadFile({
- url: imageUrl,
- success: (downloadRes) => {
- // 检查下载是否成功(临时文件路径存在)
- if (downloadRes.statusCode === 200 && downloadRes.tempFilePath) {
- // 2. 保存图片到相册
- wx.saveImageToPhotosAlbum({
- filePath: downloadRes.tempFilePath,
- success: () => {
- // 提示用户
- that.$toast.success('图片已成功保存到相册');
- },
- fail: (saveErr) => {
- console.error('保存图片失败', saveErr);
- that.$toast.fail('保存失败,请重试');
- }
- });
- } else {
- console.error('图片下载失败', downloadRes);
- that.$toast.fail('图片下载失败,请检查URL');
- }
- },
- fail: (downloadErr) => {
- console.error('下载请求失败', downloadErr);
- that.$toast.fail('下载图片失败,请重试');
- }
- });
- });
- }
- // 方法
- private saveImage(): void {
- if (!this.imageUrl) {
- this.$toast.fail('图片尚未生成完成');
- return;
- }
- // // 创建一个临时的下载链接
- // const link = document.createElement('a');
- // link.href = this.imageUrl;
- // link.download = `ai-design-${new Date().getTime()}.png`;
- // link.style.display = 'none';
- // // 将链接添加到页面并触发点击事件
- // document.body.appendChild(link);
- // link.click();
- // // 清理DOM元素
- // document.body.removeChild(link);
- fetch(this.imageUrl).then(response => response.blob()).then(blob => {
- const blobUrl = URL.createObjectURL(blob);
- // 创建一个临时的下载链接
- const link = document.createElement('a');
- link.href = blobUrl;
- link.download = `ai-design-${new Date().getTime()}.png`;
- link.style.display = 'none';
- // 将链接添加到页面并触发点击事件
- document.body.appendChild(link);
- link.click();
- // 清理DOM元素
- document.body.removeChild(link);
- // 释放Blob URL
- URL.revokeObjectURL(blobUrl);
- // this.$toast.success('图片保存成功');
- }).catch(error => {
- console.error('图片下载失败:', error);
- this.$toast.fail('图片下载失败');
- });
- }
- private regenerate(): void {
- // console.log('重新生成');
- let that = this;
- // 实现重新生成逻辑
- const F_ID = this.$route.query.F_id || "";
- this.$router.push({
- path: this.designPageApi[this.wallType],
- query: {
- F_id: F_ID,
- projectId: that.projectId
- }
- });
- }
- private viewHistory(): void {
- this.UpdateReadStateFn();
- // console.log('查看历史生成');
- // 实现查看历史生成逻辑
- this.$router.push({ path: '/AIDesign/history', query: { wallType: this.wallType } });
- }
- private manualDesign(): void {
- let that = this;
- const formData = new FormData();
- formData.append('eventname', '转人工设计');//事件名称
- formData.append('eventtype', 'click');//事件类型
- formData.append('menupath', '外墙质感/结果页/转人工设计');//完整菜单路径
- const eventdataObj = {
- wecomType: getWecomTypeName(window.localStorage.getItem('agentFromAI')),
- };
- formData.append('eventdata', JSON.stringify(eventdataObj));//事件数据
- AddTrackEvent(formData)//埋点
- // 实现转人工设计逻辑
- toXiaoChengxu(`${process.env.VUE_APP_BASE_DISID6}`);
- }
- private handleAIfun() {
- const formData = new FormData();
- formData.append('eventname', '确认AI设计');//事件名称
- formData.append('eventtype', 'click');//事件类型
- formData.append('menupath', '外墙质感/结果页/确认AI设计');//完整菜单路径
- const eventdataObj = {
- wecomType: getWecomTypeName(window.localStorage.getItem('agentFromAI')),
- };
- formData.append('eventdata', JSON.stringify(eventdataObj));//事件数据
- AddTrackEvent(formData)//埋点
- let allRes = JSON.stringify(this.allRes);
- sessionStorage.setItem("planParams", allRes);
- this.$router.push({ path: '/AIDesign/GeneratePlan' });
- }
- }
- </script>
- <style scoped lang="scss">
- .resout-container {
- background-color: #f8f9fa;
- min-height: 100vh;
- flex-direction: column;
- }
- .header {
- /*height: 50px;*/
- /*line-height: 50px;*/
- /*text-align: center;*/
- /*background: #fff;*/
- border-bottom: 1px solid #f8f8f8;
- .van-nav-bar__title {
- font-size: 20px;
- color: #333;
- }
- .van-icon {
- font-size: 20px;
- color: #333 !important;
- }
- }
- .container {
- padding: 0 20px;
- .history-section {
- margin: 20px 0;
- .history-header {
- display: flex;
- align-items: center;
- gap: 12px;
- padding: 12px 16px;
- background-color: #ffffff;
- border-radius: 18px;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
- border: 1px solid #e9ecef;
- /* margin-bottom: 10px; */
- }
- .icon-clock {
- font-size: 12px;
- margin-right: 8px;
- }
- .history-header span {
- font-weight: 500;
- color: #EC8868;
- }
- .history-header .badge-dot {
- width: 5px;
- height: 5px;
- background-color: #ff4d4f;
- border-radius: 50%;
- }
- }
- }
- .image-container {
- position: relative;
- width: 100%;
- border-radius: 10px;
- overflow: hidden;
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
- .comparisonWrapper {
- display: flex;
- flex-direction: column;
- padding: 35px 6px;
- .imgbox-t {
- display: flex;
- justify-content: space-between;
- align-items: center;
- >div {
- .tit {
- width: fit-content;
- padding: 0 5px;
- height: 17px;
- line-height: 17px;
- border-radius: 4px;
- font-size: 10px;
- }
- }
- >div:first-child {
- width: 36%;
- .tit {
- background: rgba(204, 204, 204, 1);
- }
- }
- >div:last-child {
- width: 58%;
- .tit {
- color: #fff;
- background: #FF8D1A;
- }
- }
- }
- .imgbox-b {
- display: flex;
- justify-content: space-between;
- align-items: center;
- >div:first-child {
- width: 36%;
- }
- >div:last-child {
- width: 58%;
- }
- .image-wrapper {
- position: relative;
- width: 100%;
- margin: 5px 0;
- display: flex;
- align-items: center;
- justify-content: flex-start;
- .house-image {
- border-radius: 10px;
- display: block;
- width: 100%;
- height: auto;
- }
- .house-image+div {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: transparent;
- z-index: 2;
- }
- }
- }
- }
- }
- .loading-state {
- position: relative;
- width: 100%;
- height: 300px;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- color: #666;
- text-align: center;
- // background-color: rgba(0, 0, 0, 0.7);
- background-image: url('../../assets/AIDesign/bg.png');
- background-size: 100% 100%;
- /* 添加半透明黑色背景 */
- // border-radius: 16px;
- /* 圆角边框 */
- }
- .loading-text {
- margin-top: 10px;
- font-size: 14px;
- color: white;
- white-space: pre-line
- /* 文字颜色改为白色以提高对比度 */
- }
- .address-info {
- position: absolute;
- bottom: 10px;
- left: 10px;
- right: 10px;
- background-color: rgba(0, 0, 0, 0.5);
- color: white;
- padding: 8px;
- border-radius: 8px;
- font-size: 14px;
- text-align: center;
- }
- .project-name {
- margin: 0;
- font-weight: bold;
- }
- .address {
- margin: 4px 0 0;
- font-size: 12px;
- }
- .save-button {
- width: 100%;
- padding: 16px;
- margin-top: 20px;
- background-color: #E96337;
- color: white;
- border: none;
- border-radius: 12px;
- font-size: 16px;
- font-weight: bold;
- cursor: pointer;
- transition: background-color 0.3s ease;
- }
- .save-button-disabled {
- background-color: #cccccc !important;
- cursor: not-allowed !important;
- color: white !important;
- }
- /* .save-button:hover {
- background-color: #e04a1d;
- } */
- .button-group-outside {
- .flex-center {
- display: flex;
- align-items: center;
- justify-content: center;
- border: none;
- margin-top: 10px;
- }
- .flex-between {
- display: flex;
- align-items: center;
- border: none;
- }
- .title {
- font-size: 16px;
- color: rgb(23, 23, 23);
- font-weight: 600;
- line-height: 16px;
- }
- .text {
- font-size: 12px;
- color: rgb(134, 144, 156);
- line-height: 12px;
- margin-top: 5px;
- }
- .icon {
- width: 28px;
- height: auto;
- margin-right: 10px;
- }
- .iconbig {
- width: 48px;
- height: auto;
- margin-right: 5px;
- }
- .action-button-big {
- width: 100%;
- height: 72px;
- text-align: center;
- border-radius: 8px;
- background: rgba(248, 243, 204, 1);
- }
- .action-button-middle {
- width: 48%;
- height: 72px;
- border-radius: 8px;
- background: rgba(240, 240, 240, 1);
- margin: 8px 1%;
- }
- .action-button-small {
- width: fit-content;
- margin: 10px auto;
- text-align: center;
- text-decoration: underline;
- font-size: 14px;
- line-height: 18px;
- .text {
- font-size: 14px;
- color: rgb(23, 23, 23);
- }
- }
- }
- .button-group {
- margin-top: 20px;
- .action-button {
- width: 100%;
- padding: 14px;
- margin-bottom: 12px;
- background-color: white;
- border: 1px solid #e0e0e0;
- border-radius: 12px;
- font-size: 15px;
- color: #333;
- cursor: pointer;
- display: flex;
- align-items: center;
- justify-content: flex-start;
- transition: background-color 0.3s ease;
- }
- .action-button:hover {
- background-color: #f5f5f5;
- }
- .badge-dot {
- margin-left: 10px;
- width: 5px;
- height: 5px;
- background-color: #ff4d4f;
- border-radius: 50%;
- }
- .icon {
- margin-right: 10px;
- font-size: 18px;
- }
- .text {
- font-weight: 500;
- }
- }
- .van-nav-bar__title {
- font-size: 20px;
- color: #333;
- }
- </style>
|