main
han 5 months ago
parent e0cdc0001e
commit 268e722d72
  1. 46
      src/assets/icons/iconfont.css
  2. BIN
      src/assets/icons/iconfont.ttf
  3. 6
      src/assets/styles/v-layout.scss
  4. 27
      src/views/components/v-menu/index.vue
  5. 27
      src/views/pages/AI-Document-Correction/dialog.vue
  6. 32
      src/views/pages/AI-Document-Correction/index.vue
  7. 4
      src/views/pages/AI-Document-Writing/dialog.vue

@ -1,6 +1,6 @@
@font-face {
font-family: "iconfont"; /* Project id 4926353 */
src: url('iconfont.ttf?t=1747893166232') format('truetype');
src: url('iconfont.ttf?t=1748409506357') format('truetype');
}
.iconfont {
@ -11,6 +11,50 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-marketing-writing:before {
content: "\e630";
}
.icon-image:before {
content: "\e631";
}
.icon-video:before {
content: "\e632";
}
.icon-document-writing:before {
content: "\e633";
}
.icon-document-error:before {
content: "\e634";
}
.icon-voice1:before {
content: "\e62f";
}
.icon-AI:before {
content: "\e62e";
}
.icon-create:before {
content: "\e62d";
}
.icon-expand:before {
content: "\e62b";
}
.icon-retract:before {
content: "\e62c";
}
.icon-dialogue:before {
content: "\e62a";
}
.icon-triple-speed:before {
content: "\e702";
}

Binary file not shown.

@ -679,16 +679,16 @@ body {
.ai-pages-main {
position: relative;
width: calc(100% - 290px);
width: calc(100% - 320px);
z-index: 9;
padding: 30px 0;
height: 100%;
margin-left: 30px;
margin-left: 60px;
overflow-y: auto;
scrollbar-width: none;
}
.ai-pages-back{position: absolute; left: 290px;z-index: 99; border-radius: 4px; border: 1px solid $--border-color-light; text-align: center; line-height: 30px;color:$--color-primary; top:32px;cursor: pointer; width: 30px; height: 30px; background: #fff}
.ai-edit-left {
position: relative;
height: calc(100vh - 60px);

@ -7,6 +7,7 @@
<template v-for="(item,index) in menuList">
<div class="v-menu-list-item row flex-align-center" :class="[menuIndex==item.value?'is-active':'',index>1?'disabled':'']"
@click="gotoPages(item.url)">
<i class="icon iconfont" :class="'icon-'+item.type"></i>
<div class="title">{{ item.name }}</div>
</div>
<div class="line" v-if="index==2"></div>
@ -27,12 +28,12 @@ export default {
data() {
return {
menuList: [
{name: "公文写作", value: 1, url: "/DocumentCorrectionIndex"},
{name: "公文纠错", value: 2, url: "/DocumentWritingIndex"},
{name: "营销行文", value: 3, url: "/MarketingWritingnIndex"},
{name: "图像生成", value: 4, url: "/ImageGeneratIndex"},
{name: "视频生成", value: 5, url: "/VideoGeneratIndex"},
{name: "语音生成", value: 6, url: "/VoiceGeneratIndex"},
{name: "公文写作", value: 1,type:"document-writing", url: "/DocumentCorrectionIndex"},
{name: "公文纠错", value: 2,type:"document-error", url: "/DocumentWritingIndex"},
{name: "营销行文", value: 3,type:"marketing-writing", url: "/MarketingWritingnIndex"},
{name: "图像生成", value: 4,type:"image", url: "/ImageGeneratIndex"},
{name: "视频生成", value: 5,type:"video", url: "/VideoGeneratIndex"},
{name: "语音生成", value: 6,type:"voice", url: "/VoiceGeneratIndex"},
]
}
},
@ -55,7 +56,7 @@ export default {
}
.v-menu-logo {
margin: 30px 0;
margin: 30px 0 60px 0;
.logo {
width: 30px;
@ -64,6 +65,7 @@ export default {
.text {
font-size: 18px;
color: #000;
font-weight: bold
}
}
@ -81,12 +83,12 @@ export default {
.v-menu-list-item {
cursor: pointer;
padding: 0 20px;
height: 40px;
line-height: 40px;
height: 36px;
line-height: 36px;
margin-bottom: 10px;
background-color: #fff;
border-radius: 4px;
border-radius: 8px;
.icon{margin-right: 8px}
.title {
font-size: 16px;
}
@ -97,11 +99,12 @@ export default {
.title {
color: #1060FF
}
.icon{ color: #1060FF}
}
&.is-active {
background-color: #1060FF;
.icon{ color: #fff}
.title {
color: #fff
}

@ -1,7 +1,9 @@
<template>
<div class="ai-pages row">
<VMenu menuIndex="1"></VMenu>
<div class="ai-pages-back" @click="gotoBack"><i class="iconfont icon-return"></i></div>
<main class="ai-pages-main row">
<!-- 对话左侧 -->
<div class="ai-edit-left col m-r-large v-overflow-y" v-loading="generatedLoading"
element-loading-text="请稍后,正文生成中...">
@ -15,7 +17,6 @@
<div class="ai-edit-content" v-html="generatedContent" v-if="!editorState"></div>
<Editor
style="height:calc(100% - 81px) ; overflow-y: hidden;"
v-model="generatedEdit"
:defaultConfig="editorConfig"
:mode="mode"
@onCreated="onCreated"
@ -179,11 +180,18 @@ export default {
}
},
mounted() {
// let params = this.$route.params.data
// this.form.type = params.type
// this.form.docType = params.docType
// this.form.title = params.title
// this.form.keywords = params.keywords
let params
if (this.$route.params.data) {
params = this.$route.params.data
localStorage.setItem('fileData', params);
} else {
params = localStorage.getItem('fileData')
}
this.form.type = params.type
this.form.docType = params.docType
this.form.title = params.title
this.form.keywords = params.keywords
this.getModellist()
this.getDocumentType()
},
@ -235,7 +243,7 @@ export default {
children: children
}
})
// this.generateDoc()
this.generateDoc()
} catch (err) {
} finally {
}
@ -335,6 +343,8 @@ export default {
this.generatedLoading = false
this.editorState = true
this.generatedEdit = this.generatedContent
console.log(this.generatedContent)
this.editor.dangerouslyInsertHtml( this.generatedEdit)
this.closeConnection();
return;
}
@ -410,6 +420,9 @@ export default {
if (container) {
container.scrollTop = container.scrollHeight;
}
},
gotoBack(){
this.$router.push('/DocumentCorrectionIndex');
}
},
beforeDestroy() {

@ -88,6 +88,14 @@
</el-row>
</el-form>
</div>
<div class="col m-r-small noBorder" v-else-if="activeTemplate==2">
<el-form ref="form" :model="form">
<el-form-item label="" label-width="0">
<el-input v-model="form.keywords"
placeholder="我是您的写作助手,请告诉我您要创建的文件标题,主题词信息"></el-input>
</el-form-item>
</el-form>
</div>
<div class="col m-r-small noBorder" v-else>
<el-form ref="form" :model="form">
<el-form-item label="" label-width="0">
@ -216,13 +224,16 @@ export default {
{
name: "按范文生成",
listType: 2,
description: "《XX单位关于开展2025年度安全生产检查的通知》主题词:安全生产、检查",
type: '',
docType: '',
title: "",
keywords: "",
description: "",
img: img09
}
]
},
gotoTemplate(val) {
if (val.type == 0) {
this.form = {
title: val.title,
@ -245,18 +256,19 @@ export default {
}
if (val.type == 2) {
this.form = {
title: undefined,
keywords: '请参考范文写一篇正文'
title: "",
keywords: val.keywords,
type: '2',
docType: '21',
first: "",
second: "",
}
}
this.activeTemplate = val.type
this.activeTemplate = val.listType
},
/** 文件上传 **/
handleReferenceChange(file) {
this.form.fileId = file
if(!this.form.title){
this.form.title = '请参考范文写一篇正文'
}
},
/** 页面跳转 **/
gotoPages(type, row) {
@ -264,7 +276,9 @@ export default {
this.$router.push({name: 'DocumentCorrectionDialog', params: {data: row}});
}
if (type == 'form') {
this.$router.push({name: 'DocumentCorrectionDialog', params: {data: this.form}});
if(!this.form.keywords){
this.form.keywords = '请参考范文写一篇正文'
} this.$router.push({name: 'DocumentCorrectionDialog', params: {data: this.form}});
}
},

@ -1,6 +1,7 @@
<template>
<div class="ai-pages row">
<VMenu menuIndex="2"></VMenu>
<div class="ai-pages-back" @click="gotoBack"><i class="iconfont icon-return"></i></div>
<main class="ai-pages-main row">
<!-- 对话左侧 -->
<div class="ai-edit-left col m-r-large v-overflow-y">
@ -290,6 +291,9 @@ export default {
// BlobURL
URL.revokeObjectURL(downloadLink.href);
},
gotoBack(){
this.$router.push('/DocumentWritingIndex');
}
}
}
</script>

Loading…
Cancel
Save