whx 1 тиждень тому
батько
коміт
3346453eab
52 змінених файлів з 184 додано та 53 видалено
  1. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/index.html
  2. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/css/6574.aece5961.css
  3. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/css/9118.76d356f7.css
  4. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/1031.03d7b31a.js
  5. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/1291.b93112d3.js
  6. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/1528.c400fdc8.js
  7. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/1786.e2b14e9e.js
  8. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/224.6b99203e.js
  9. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/2890.3a731400.js
  10. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/2959.db34ed43.js
  11. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/3195.c81e35f8.js
  12. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/3203.e12cd344.js
  13. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/3225.377eb28c.js
  14. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/348.8599411c.js
  15. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/3519.11f366b1.js
  16. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/3550.c0a155f6.js
  17. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/37.097eb258.js
  18. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/3792.828db882.js
  19. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/3817.fe01487a.js
  20. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/437.619e148e.js
  21. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/4849.16de8392.js
  22. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/4960.de0d47ba.js
  23. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/5306.702e9e80.js
  24. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/5383.9f13b690.js
  25. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/5576.54e124ff.js
  26. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/5769.9df8b1bb.js
  27. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/592.28fbb30d.js
  28. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/5996.36560e37.js
  29. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/6072.a589d66c.js
  30. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/6077.9ea030ff.js
  31. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/6094.da7c3154.js
  32. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/6574.fbfb4c18.js
  33. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/6802.7243291b.js
  34. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/6916.c216d7d7.js
  35. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/7351.9563dc05.js
  36. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/742.a2bb586d.js
  37. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/7519.a236ab73.js
  38. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/8000.ee5a1edd.js
  39. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/8083.29f986b4.js
  40. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/8407.a50ca532.js
  41. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/8949.f4a77ba4.js
  42. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9118.a4f0a0eb.js
  43. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9381.ab5a24f8.js
  44. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/965.d657aced.js
  45. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9709.862dd20a.js
  46. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9750.a2f1a273.js
  47. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9820.86c91baa.js
  48. 2 2
      virgo.wzfrontend/src/main/resources/static/workark/static/js/app.5373b50a.js
  49. 24 0
      virgo.wzfrontend/workark/src/api/ai.js
  50. 50 22
      virgo.wzfrontend/workark/src/components/work/common/aiChat.vue
  51. 60 15
      virgo.wzfrontend/workark/src/components/work/common/websiteForm.vue
  52. 45 11
      virgo.wzfrontend/workark/src/views/work/oa/ai/website.vue

Різницю між файлами не показано, бо вона завелика
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/index.html


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/css/6574.aece5961.css


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/css/9118.76d356f7.css


virgo.wzfrontend/src/main/resources/static/workark/static/js/1031.be3e7f59.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/1031.03d7b31a.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/1291.8a9ada06.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/1291.b93112d3.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/1528.94e706cc.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/1528.c400fdc8.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/1786.f04d6ace.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/1786.e2b14e9e.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/224.41131e87.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/224.6b99203e.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/2890.bd2d861b.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/2890.3a731400.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/2959.87938055.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/2959.db34ed43.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/3195.ff280ac6.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/3195.c81e35f8.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/3203.fac07b30.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/3203.e12cd344.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/3225.c0bd38f2.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/3225.377eb28c.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/348.368ffe0d.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/348.8599411c.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/3519.bd5fdc0d.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/3519.11f366b1.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/3550.603d1472.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/3550.c0a155f6.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/37.f54b72f6.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/37.097eb258.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/3792.5c016ca7.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/3792.828db882.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/3817.fe4cea76.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/3817.fe01487a.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/437.0a00a47c.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/437.619e148e.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/4849.b96aec58.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/4849.16de8392.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/4960.dca104cf.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/4960.de0d47ba.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/5306.84f07b51.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/5306.702e9e80.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/5383.b80d9de6.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/5383.9f13b690.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/5576.f8a06d61.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/5576.54e124ff.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/5769.50bcbf4e.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/5769.9df8b1bb.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/592.04db92db.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/592.28fbb30d.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/5996.d0a30684.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/5996.36560e37.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/6072.9739cdea.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/6072.a589d66c.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/6077.19c5845b.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/6077.9ea030ff.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/6094.a026b02c.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/6094.da7c3154.js


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/6574.fbfb4c18.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/6802.c9072a16.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/6802.7243291b.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/6916.aaff51b1.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/6916.c216d7d7.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/7351.9f266386.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/7351.9563dc05.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/742.02f4b524.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/742.a2bb586d.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/7519.9a1f6e9c.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/7519.a236ab73.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/8000.9748afab.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/8000.ee5a1edd.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/8083.dcedc39b.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/8083.29f986b4.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/8407.67642efa.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/8407.a50ca532.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/8949.a9dc7cae.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/8949.f4a77ba4.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/9118.a4f0a0eb.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/9381.0618d7bb.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/9381.ab5a24f8.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/965.4428b0d8.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/965.d657aced.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/9709.f70915f7.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/9709.862dd20a.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/9750.df2d2b81.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/9750.a2f1a273.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/9820.2dc8750e.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/9820.86c91baa.js


Різницю між файлами не показано, бо вона завелика
+ 2 - 2
virgo.wzfrontend/src/main/resources/static/workark/static/js/app.5373b50a.js


+ 24 - 0
virgo.wzfrontend/workark/src/api/ai.js

@@ -45,3 +45,27 @@ export function getAIDataList(data) {
 		data: data
 	})
 }
+/* 
+ * 保存html代码
+ * 
+ * 
+ */
+export function saveHtmlData(data) {
+	return request({
+		url: `/api/ai/htmlCode`,
+		method: 'post',
+		data: data
+	})
+}
+/* 
+ * 获取保存html代码
+ * 
+ * 
+ */
+export function getHtmlData(data) {
+	return request({
+		url: `/api/ai/htmlCode/query`,
+		method: 'post',
+		data: data
+	})
+}

+ 50 - 22
virgo.wzfrontend/workark/src/components/work/common/aiChat.vue

@@ -29,7 +29,7 @@
 						</div>
 						<div class="message-header-label">{{user.userName}}</div>
 					</div>
-					<div class="message-content" v-html="returnUserInputs(message.inputs)"></div>
+					<div class="message-content" v-html="message.userInput"></div>
 					<div class="message-time">
 						{{ formatTime(message.date) }}
 					</div>
@@ -53,9 +53,10 @@
 							</el-button>
 						</div>
 						<div class="ai-website-boxs" v-else>
-							<div class="ai-website-box" v-html="extractContentBetween(message.outputs)"></div>
+							<div class="ai-website-box" v-html="message.AIInput"></div>
 							<div class="ai-website-mask">
-								<el-button size="mini" type="primary" @click="preview(message)">
+								<el-button size="mini" type="primary"
+									@click="$emit('previewWebSite', message.AIInput,message.simpleUUID)">
 									预览
 								</el-button>
 							</div>
@@ -111,15 +112,22 @@
 				visible: false,
 				timer: null,
 				formData: {
-					site_name: '网站名称',
-					site_type: '网站类型',
-					color_scheme: '布局风格',
-					layout_style: '主色调',
-					sections: '主要模块',
-					logo_url: 'LOGO'
+					company_name: '企业名称',
+					logo_url: '企业logo',
+					company_sub_name: '企业简称',
+					business_scope: '核心业务',
+					key_features: '核心优势',
+					contact_info: '联系方式',
+					industry_sector: '行业领域',
+					create_time: '成立时间',
+					create_place: '成立地点',
+					all_style: '整体风格',
+					model: '主要模块',
+					color_scheme: '主色调'
 				},
 				user: {},
-				htmlCode: ''
+				htmlCode: '',
+				simpleUUID: ''
 			}
 		},
 		mounted() {
@@ -146,10 +154,15 @@
 					userId: this.$store.getters.user.userId
 				}).then(res => {
 					if (res.state) {
-						this.messageList = res.data;
+						this.messageList = res.data.map(node => {
+							node['userInput'] = this.returnUserInputs(node.inputs);
+							node['AIInput'] = this.extractContentBetween(node.outputs, node.simpleUUID);
+							return node;
+						});
 						if (this.messageList.length > 0) {
 							let data = this.messageList[this.messageList.length - 1];
 							if (data.status === 'running') this.initStaus(data.simpleUUID);
+							this.$emit('previewWebSite', this.htmlCode, this.simpleUUID);
 						}
 					}
 				})
@@ -164,19 +177,29 @@
 							if (data.status === 'succeeded' || data.status === 'error') {
 								this.clearTimer();
 								this.loading = false;
+								data['userInput'] = this.returnUserInputs(data.inputs);
+								data['AIInput'] = this.extractContentBetween(data.outputs, data
+									.simpleUUID);
 								this.messageList[this.messageList.length - 1] = data;
+								this.$emit('previewWebSite', this.htmlCode, this.simpleUUID);
 							}
 						}
 					})
-				}, 10000)
+				}, 20000)
 			},
 			returnUserInputs(obj) {
 				if (!obj) return '';
 				let html = '';
 				let objs = JSON.parse(obj);
-				if (objs['site_name']) {
+				if (objs['company_name']) {
 					for (let key in objs) {
-						html += this.formData[key] + ':' + objs[key] + "<br />";
+						if (objs[key].indexOf('https://file-node.oss-cn-shanghai.aliyuncs.com/youji/') > -1) {
+							html += this.formData[key] + ':<img class="message-image" src="' + objs[key] +
+								'" alt="aa"/><br />';
+						} else {
+							html += this.formData[key] + ':' + objs[key] + "<br />";
+						}
+
 					}
 				} else {
 					html = objs.adjustments;
@@ -224,26 +247,28 @@
 					this.init();
 				}
 			},
-			extractContentBetween(html) {
+			extractContentBetween(html, simpleUUID) {
 				if (!html) return '';
 				// 使用正则表达式匹配 ```html 和 ``` 之间的内容
 				let regex = /```html([\s\S]*?)```/;
 				let match = html.match(regex);
-				let htmls = match && match[1] ? match[1].trim() : ''
+				let htmls = match && match[1] ? match[1].trim() : '';
+				this.htmlCode = htmls;
+				this.simpleUUID = simpleUUID;
 				return htmls;
-			},
-			preview(message) {
-				this.htmlCode = this.extractContentBetween(message.outputs);
-				this.$emit('previewWebSite', this.htmlCode);
 			}
 		}
 	}
 </script>
 
+<style>
+	.message-image {
+		width: 30px;
+	}
+</style>
 <style scoped lang="scss">
 	.ai-chat-container {
 		width: 100%;
-		max-width: 900px;
 		height: 100%;
 		background: white;
 		border-radius: 16px;
@@ -294,6 +319,7 @@
 		display: flex;
 		flex-direction: column;
 		gap: 15px;
+		overflow-x: hidden;
 	}
 
 	.message {
@@ -306,7 +332,7 @@
 	}
 
 	.user-message {
-		background: $--color-primary;
+		background: #7a72cf;
 		color: white;
 		margin-left: auto;
 		border-bottom-right-radius: 4px;
@@ -332,6 +358,8 @@
 		border-radius: 30px;
 		overflow: hidden;
 		margin-right: 5px;
+		background-color: #fff;
+		border: 2px solid #fff;
 	}
 
 	.message-header-label {

+ 60 - 15
virgo.wzfrontend/workark/src/components/work/common/websiteForm.vue

@@ -2,23 +2,56 @@
 	<div class="hui-flex hui-dialog">
 		<div class="hui-flex-box hui-dialog-content">
 			<el-form :model="form" label-position="top">
-				<el-form-item label="网站名称">
-					<el-input type="text" v-model="form.site_name" placeholder="请输入网站名称"></el-input>
+				<el-form-item label="企业名称">
+					<el-input type="text" v-model="form.company_name" placeholder="请输入企业名称"></el-input>
 				</el-form-item>
-				<el-form-item label="网站类型">
-					<el-input type="text" v-model="form.site_type" placeholder="请输入网站类型"></el-input>
+				<el-form-item label="企业简称">
+					<el-input type="text" v-model="form.company_sub_name" placeholder="请输入企业简称"></el-input>
 				</el-form-item>
-				<el-form-item label="布局风格">
-					<el-input type="text" v-model="form.layout_style" placeholder="请输入布局风格"></el-input>
+				<el-form-item label="行业领域">
+					<el-select v-model="form.industry_sector" placeholder="请选择行业领域">
+						<el-option :label="item" :value="item" v-for="(item,index) in industryType" :key="index">
+						</el-option>
+					</el-select>
+				</el-form-item>
+				<el-form-item label="核心业务">
+					<el-input type="text" v-model="form.business_scope" placeholder="请输入核心业务"></el-input>
+				</el-form-item>
+				<el-form-item label="成立时间">
+					<el-input type="text" v-model="form.create_time" placeholder="请输入成立时间"></el-input>
+				</el-form-item>
+				<el-form-item label="成立地点">
+					<el-input type="text" v-model="form.create_place" placeholder="请输入成立地点"></el-input>
+				</el-form-item>
+				<el-form-item label="主要模块">
+					<el-select v-model="model" placeholder="请选择主要模块" multiple>
+						<el-option :label="item" :value="item" v-for="(item,index) in modelList" :key="index">
+						</el-option>
+					</el-select>
 				</el-form-item>
 				<el-form-item label="主色调">
-					<el-color-picker v-model="form.color_scheme"></el-color-picker>
+					<div style="display: flex;">
+						<el-input type="text" v-model="form.color_scheme" disabled></el-input>
+						<el-color-picker v-model="form.color_scheme" style="margin-left: 10px;"></el-color-picker>
+					</div>
+				</el-form-item>
+				<el-form-item label="整体风格">
+					<el-select v-model="all_style" placeholder="请选择整体风格" multiple>
+						<el-option :label="item" :value="item" v-for="(item,index) in style" :key="index">
+						</el-option>
+					</el-select>
 				</el-form-item>
 				<el-form-item label="LOGO" class="hui-textarea">
 					<upload ref="listDisplayImage" :list="listDisplayImage" type="insert" :maxLen="1"></upload>
 				</el-form-item>
-				<el-form-item label="主要模块" class="hui-textarea">
-					<el-input type="textarea" v-model="form.sections" placeholder="请输入主要模块" resize="none">
+				<el-form-item label="核心优势" class="hui-textarea">
+					<el-input type="textarea" v-model="form.key_features" placeholder="技术创新、极致性价比、独特服务、行业经验、品牌信誉"
+						resize="none">
+					</el-input>
+				</el-form-item>
+				<el-form-item label="联系方式" class="hui-textarea">
+					<el-input type="textarea" v-model="form.contact_info"
+						placeholder="例如:手机号:137xxxxxxxx,邮箱:xxx@xxx,com" resize="none">
 					</el-input>
 				</el-form-item>
 			</el-form>
@@ -39,14 +72,24 @@
 		data() {
 			return {
 				form: {
-					site_name: '',
-					site_type: '',
-					color_scheme: '',
-					layout_style: '',
-					sections: ''
+					company_name: '',
+					company_sub_name: '',
+					industry_sector: '',
+					business_scope: '',
+					create_place: '',
+					create_time: '',
+					color_scheme: '#006AFF',
+					key_features: '',
+					contact_info: '',
+					all_style: ''
 				},
 				loading: false,
-				listDisplayImage: []
+				listDisplayImage: [],
+				industryType: ['科技', '制造', '教育', '金融', '医疗', '咨询', '电商', '餐饮'],
+				style: ['专业严谨', '现代简约', '高端奢华', '科技智能', '创新活力', '温馨亲和', '环保自然'],
+				all_style: [],
+				modelList: ['首页', '产品介绍', '解决方案', '成功案例', '关于我们', '联系我们'],
+				model: []
 			}
 		},
 		components: {
@@ -58,6 +101,8 @@
 				let postData = JSON.parse(JSON.stringify(this.form));
 				let fileBox = this.$refs.listDisplayImage.fileList;
 				if (fileBox && fileBox.length > 0) postData['logo_url'] = fileBox[0].url;
+				postData['all_style'] = this.all_style.join('、');
+				postData['model'] = this.model.join('、');
 				createAIData(2, postData).then(this.successFunc)
 			},
 			successFunc(res) {

+ 45 - 11
virgo.wzfrontend/workark/src/views/work/oa/ai/website.vue

@@ -14,14 +14,16 @@
 				<span></span>
 			</div>
 			<div class="hui-flex-box">
-				<div class="no-empty" v-if="!websiteHtml">
-					<el-empty description="预览网站"></el-empty>
+				<div class="no-empty" v-if="!websiteUrl">
+					<el-empty description="请先预览网站"></el-empty>
+				</div>
+				<div class="html-box" v-else v-loading="loading">
+					<iframe :src="websiteUrl" width="100%" height="100%" frameborder="0" @load="onloadIframe">
+					</iframe>
 				</div>
-				<div class="html-box" v-else v-html="websiteHtml"></div>
 			</div>
 			<div class="hui-drawer-submit">
-				<el-button type="primary" size="mini" :disabled="!websiteHtml">保存</el-button>
-				<el-button type="primary" size="mini" :disabled="!websiteHtml">发布</el-button>
+				<el-button type="primary" size="mini" :disabled="!websiteUrl" @click="submit">发布</el-button>
 			</div>
 		</div>
 	</div>
@@ -29,7 +31,9 @@
 
 <script>
 	import {
-		getAIData
+		getAIData,
+		saveHtmlData,
+		getHtmlData
 	} from '@/api/ai'
 	import aiChat from '@/components/work/common/aiChat.vue'
 	export default {
@@ -38,14 +42,43 @@
 		},
 		data() {
 			return {
-				websiteHtml: ''
+				websiteUrl: '',
+				loading: false,
+				simpleUUID: ''
 			}
 		},
-		mounted() {
-		},
+		mounted() {},
 		methods: {
-			previewWebSite(html) {
-				this.websiteHtml = html;
+			async previewWebSite(html, simpleUUID) {
+				if (this.simpleUUID === simpleUUID) return;
+				this.loading = true;
+				this.simpleUUID = simpleUUID;
+				let htmlData = await getHtmlData({
+					simpleUUID: simpleUUID
+				})
+				if (!htmlData.state) return this.websiteUrl = '';
+				if (htmlData.data.length > 0) return this.websiteUrl =
+					`https://workark.com/api/enterprise/${simpleUUID}`
+				let saveData = await saveHtmlData({
+					data: html,
+					simpleUUID: simpleUUID
+				})
+				if (!saveData.state) return this.websiteUrl = '';
+				this.websiteUrl = `https://workark.com/api/enterprise/${simpleUUID}`;
+			},
+			submit() {
+				this.$confirm('是否发布该官网?', () => {
+					this.$prompt('发布连接', 'WorkArk提示', {
+						confirmButtonText: '打开链接',
+						cancelButtonText: '取消',
+						inputValue: `https://workark.com/api/enterprise/${this.simpleUUID}`
+					}).then(() => {
+						window.open(`https://workark.com/api/enterprise/${this.simpleUUID}`, "_blank");
+					}).catch(() => {});
+				})
+			},
+			onloadIframe() {
+				this.loading = false;
 			},
 			handleSend() {
 
@@ -61,6 +94,7 @@
 		.html-box {
 			width: 100%;
 			overflow: hidden;
+			height: 100%;
 		}
 
 		.iframe-class {