|
@@ -39,13 +39,45 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <!-- 保存按钮 -->
|
|
|
|
|
- <!-- <button class="save-button" :disabled="!imageUrl" :class="{ 'save-button-disabled': !imageUrl }"
|
|
|
|
|
- @click="saveImageToAlbum">保存图片</button> -->
|
|
|
|
|
-
|
|
|
|
|
<!-- 功能按钮组 -->
|
|
<!-- 功能按钮组 -->
|
|
|
- <div class="button-group">
|
|
|
|
|
- <!--<button class="action-button" :disabled="!imageUrl" :class="{ 'save-button-disabled': !imageUrl }"-->
|
|
|
|
|
|
|
+ <!-- 外墙 -->
|
|
|
|
|
+ <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-2-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">
|
|
|
|
|
+ <!-- <van-icon class="icon" name="replay" /> -->
|
|
|
|
|
+ <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="viewHistory">
|
|
|
|
|
+ <!-- <van-icon class="icon" name="clock-o" /> -->
|
|
|
|
|
+ <img src="@/assets/AIDesign/historyIcon.png" class="icon" />
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <div class="title">历史生图
|
|
|
|
|
+ <!-- <span v-if="!readState" class="badge-dot"></span> -->
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="text">保留每一张</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- 服务商随身邦和部分经销商展示转人工 :disabled="projectDisableFlag" :class="projectDisableFlag == true ? 'save-button-disabled' : ''"-->
|
|
|
|
|
+ <div class="action-button-small" v-if="showArtificial && !projectDisableFlag" @click="manualDesign">
|
|
|
|
|
+ <span class="text">转人工设计</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- 内墙 -->
|
|
|
|
|
+ <div class="button-group" v-if="wallType === 'inside'">
|
|
|
<button class="action-button" :disabled="regenerateDisable"
|
|
<button class="action-button" :disabled="regenerateDisable"
|
|
|
:class="regenerateDisable == true ? 'save-button-disabled' : ''" @click="regenerate">
|
|
:class="regenerateDisable == true ? 'save-button-disabled' : ''" @click="regenerate">
|
|
|
<van-icon class="icon" name="replay" />
|
|
<van-icon class="icon" name="replay" />
|
|
@@ -56,22 +88,16 @@
|
|
|
<span class="text">历史生图</span>
|
|
<span class="text">历史生图</span>
|
|
|
<span v-if="!readState" class="badge-dot"></span>
|
|
<span v-if="!readState" class="badge-dot"></span>
|
|
|
</button>
|
|
</button>
|
|
|
- <!-- 服务商随身邦和部分经销商展示转人工 -->
|
|
|
|
|
- <button class="action-button" @click="manualDesign" v-if="showArtificial" :disabled="projectDisableFlag"
|
|
|
|
|
- :class="projectDisableFlag == true ? 'save-button-disabled' : ''">
|
|
|
|
|
- <van-icon class="icon" name="user-o" />
|
|
|
|
|
- <span class="text">转人工设计(原别墅之星小程序)</span>
|
|
|
|
|
- </button>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
import { ImagePreview, Dialog } from 'vant';
|
|
import { ImagePreview, Dialog } from 'vant';
|
|
|
import { Component, Vue } from "vue-property-decorator";
|
|
import { Component, Vue } from "vue-property-decorator";
|
|
|
-import { GetEntity, GetReadState, UpdateReadState, insideGetEntity, insideGetReadState, insideUpdateReadState, GetProjectlist, GetDictList } from "@/api/indexAI";
|
|
|
|
|
-import { getWecomType, toLBHome, toXiaoChengxu, getWxconfig } from '@/utils/index';
|
|
|
|
|
|
|
+import { GetEntity, GetReadState, UpdateReadState, insideGetEntity, insideGetReadState, insideUpdateReadState, GetProjectlist, GetDictList, AddTrackEvent } from "@/api/indexAI";
|
|
|
|
|
+import { getWecomType, toLBHome, toXiaoChengxu, getWxconfig ,getWecomTypeName } from '@/utils/index';
|
|
|
import axios from "axios";
|
|
import axios from "axios";
|
|
|
declare let wx: any;
|
|
declare let wx: any;
|
|
|
@Component
|
|
@Component
|
|
@@ -120,6 +146,7 @@ export default class extends Vue {
|
|
|
private isNeedProjectFlag = true;//是否需要项目-接口获取
|
|
private isNeedProjectFlag = true;//是否需要项目-接口获取
|
|
|
private projectDisableFlag = true;//转人工不可点击
|
|
private projectDisableFlag = true;//转人工不可点击
|
|
|
private serviceCodeArray = [];
|
|
private serviceCodeArray = [];
|
|
|
|
|
+ private allRes = null;
|
|
|
created() {
|
|
created() {
|
|
|
if (this.$route.query.WecomType) {
|
|
if (this.$route.query.WecomType) {
|
|
|
sessionStorage.setItem("WecomType", this.$route.query.WecomType);
|
|
sessionStorage.setItem("WecomType", this.$route.query.WecomType);
|
|
@@ -146,7 +173,7 @@ export default class extends Vue {
|
|
|
// this.showArtificial = true;
|
|
// this.showArtificial = true;
|
|
|
// }
|
|
// }
|
|
|
// 从经销商随身邦进入的,显示转人工按钮,没有次数限制
|
|
// 从经销商随身邦进入的,显示转人工按钮,没有次数限制
|
|
|
- if (this.agentFrom === 'ssb' && this.wallType === 'outside') {
|
|
|
|
|
|
|
+ if ((this.agentFrom === 'ssb' || this.agentFrom === 'dg') && this.wallType === 'outside') {
|
|
|
this.showArtificial = true;
|
|
this.showArtificial = true;
|
|
|
this.projectDisableFlag = false;
|
|
this.projectDisableFlag = false;
|
|
|
}
|
|
}
|
|
@@ -182,6 +209,7 @@ export default class extends Vue {
|
|
|
this.isNeedProjectFlag = true;
|
|
this.isNeedProjectFlag = true;
|
|
|
this.projectDisableFlag = true;
|
|
this.projectDisableFlag = true;
|
|
|
this.showArtificial = false;
|
|
this.showArtificial = false;
|
|
|
|
|
+ this.allRes = null;
|
|
|
}
|
|
}
|
|
|
// 是否关联了项目
|
|
// 是否关联了项目
|
|
|
getIsNeedProjectFlag() {
|
|
getIsNeedProjectFlag() {
|
|
@@ -320,6 +348,7 @@ export default class extends Vue {
|
|
|
that.startPolling();
|
|
that.startPolling();
|
|
|
}, that.designTimer[that.wallType]);
|
|
}, that.designTimer[that.wallType]);
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ this.allRes = response.Data;
|
|
|
this.StateCode = response.Data.StateCode;
|
|
this.StateCode = response.Data.StateCode;
|
|
|
this.StateInfo = response.Data.Description;
|
|
this.StateInfo = response.Data.Description;
|
|
|
this.projectId = response.Data.ProjectID;
|
|
this.projectId = response.Data.ProjectID;
|
|
@@ -367,6 +396,7 @@ export default class extends Vue {
|
|
|
// console.log(response);
|
|
// console.log(response);
|
|
|
if (response.StatusCode == 200) {
|
|
if (response.StatusCode == 200) {
|
|
|
if (response.Data) {
|
|
if (response.Data) {
|
|
|
|
|
+ this.allRes = response.Data;
|
|
|
this.StateCode = response.Data.StateCode;
|
|
this.StateCode = response.Data.StateCode;
|
|
|
this.StateInfo = response.Data.Description;
|
|
this.StateInfo = response.Data.Description;
|
|
|
this.F_OutsideType = response.Data.F_OutsideType;
|
|
this.F_OutsideType = response.Data.F_OutsideType;
|
|
@@ -544,7 +574,15 @@ export default class extends Vue {
|
|
|
|
|
|
|
|
private manualDesign(): void {
|
|
private manualDesign(): void {
|
|
|
let that = this;
|
|
let that = this;
|
|
|
- // debugger
|
|
|
|
|
|
|
+ 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)//埋点
|
|
|
// console.log('转人工设计');
|
|
// console.log('转人工设计');
|
|
|
// 实现转人工设计逻辑
|
|
// 实现转人工设计逻辑
|
|
|
// that.$magnetlogadd.setLog('AI外墙设计-转人工设计', function () {
|
|
// that.$magnetlogadd.setLog('AI外墙设计-转人工设计', function () {
|
|
@@ -607,7 +645,7 @@ export default class extends Vue {
|
|
|
padding: 0 5px;
|
|
padding: 0 5px;
|
|
|
height: 17px;
|
|
height: 17px;
|
|
|
line-height: 17px;
|
|
line-height: 17px;
|
|
|
- border-radius: 32px;
|
|
|
|
|
|
|
+ border-radius: 4px;
|
|
|
font-size: 10px;
|
|
font-size: 10px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -617,6 +655,7 @@ export default class extends Vue {
|
|
|
|
|
|
|
|
.tit {
|
|
.tit {
|
|
|
background: rgba(204, 204, 204, 1);
|
|
background: rgba(204, 204, 204, 1);
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -625,7 +664,7 @@ export default class extends Vue {
|
|
|
|
|
|
|
|
.tit {
|
|
.tit {
|
|
|
color: #fff;
|
|
color: #fff;
|
|
|
- background: rgba(244, 155, 125, 1);
|
|
|
|
|
|
|
+ background: #FF8D1A;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -746,48 +785,114 @@ export default class extends Vue {
|
|
|
/* .save-button:hover {
|
|
/* .save-button:hover {
|
|
|
background-color: #e04a1d;
|
|
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;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ 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;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .action-button-big {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 72px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ border-radius: 8px;
|
|
|
|
|
+ background: rgba(248, 243, 204, 1);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .action-button-middle {
|
|
|
|
|
+ width: 48.5%;
|
|
|
|
|
+ height: 72px;
|
|
|
|
|
+ border-radius: 8px;
|
|
|
|
|
+ background: rgba(240, 240, 240, 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 {
|
|
.button-group {
|
|
|
margin-top: 20px;
|
|
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 {
|
|
|
|
|
+ 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;
|
|
|
|
|
-}
|
|
|
|
|
|
|
+ .action-button:hover {
|
|
|
|
|
+ background-color: #f5f5f5;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
-.badge-dot {
|
|
|
|
|
- margin-left: 10px;
|
|
|
|
|
- width: 5px;
|
|
|
|
|
- height: 5px;
|
|
|
|
|
- background-color: #ff4d4f;
|
|
|
|
|
- border-radius: 50%;
|
|
|
|
|
-}
|
|
|
|
|
|
|
+ .badge-dot {
|
|
|
|
|
+ margin-left: 10px;
|
|
|
|
|
+ width: 5px;
|
|
|
|
|
+ height: 5px;
|
|
|
|
|
+ background-color: #ff4d4f;
|
|
|
|
|
+ border-radius: 50%;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
-.icon {
|
|
|
|
|
- margin-right: 10px;
|
|
|
|
|
- font-size: 18px;
|
|
|
|
|
-}
|
|
|
|
|
|
|
+ .icon {
|
|
|
|
|
+ margin-right: 10px;
|
|
|
|
|
+ font-size: 18px;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
-.text {
|
|
|
|
|
- font-weight: 500;
|
|
|
|
|
|
|
+ .text {
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
.van-nav-bar__title {
|
|
.van-nav-bar__title {
|
|
|
font-size: 20px;
|
|
font-size: 20px;
|
|
|
color: #333;
|
|
color: #333;
|