main
han 5 months ago
parent d72f160cf5
commit 2301b29e52
  1. 4
      .env.dev
  2. 4
      .env.front
  3. 4
      .env.prod
  4. 4
      .env.stage
  5. 4
      .env.static
  6. 2
      README.md
  7. 7
      package.json
  8. BIN
      public/favicon.ico
  9. 2
      public/index.html
  10. BIN
      public/libs/aie.png
  11. 2
      src/assets/styles/v-layout.scss
  12. 4
      src/components/Editor/index.vue
  13. 2
      src/components/FileUpload/index.vue
  14. 2
      src/components/FileUpload1/index.vue
  15. 2
      src/components/FileUploadDrag/index.vue
  16. 2
      src/components/FileUploadDrag/small.vue
  17. 4
      src/components/ImageUpload/index.vue
  18. 2
      src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue
  19. 4
      src/components/parser/Parser.vue
  20. 2
      src/layout/components/Sidebar/Logo.vue
  21. 4
      src/package.json
  22. 13
      src/router/index.js
  23. 2
      src/utils/constants.js
  24. 2
      src/utils/dict.js
  25. 2
      src/utils/index.js
  26. 2
      src/views/bpm/form/formEditor.vue
  27. 2
      src/views/infra/build/main.js
  28. 4
      src/views/login.vue
  29. 2
      src/views/mp/autoReply/index.vue
  30. 2
      src/views/mp/components/wx-editor/WxEditor.vue
  31. 2
      src/views/mp/components/wx-material-select/main.vue
  32. 2
      src/views/mp/components/wx-msg/main.vue
  33. 2
      src/views/mp/components/wx-news/main.vue
  34. 2
      src/views/mp/components/wx-reply/main.vue
  35. 2
      src/views/mp/components/wx-video-play/main.vue
  36. 2
      src/views/mp/components/wx-voice-play/main.vue
  37. 2
      src/views/mp/draft/index.vue
  38. 2
      src/views/mp/freePublish/index.vue
  39. 4
      src/views/mp/material/index.vue
  40. 2
      src/views/mp/menu/index.vue
  41. 48
      src/views/pages/AI-Document-Correction/dialog.vue
  42. 2
      src/views/socialLogin.vue
  43. 2
      src/views/sso.vue
  44. 2
      vue.config.js

@ -2,9 +2,9 @@
ENV = 'development'
# 页面标题
VUE_APP_TITLE = 芋道管理系统
VUE_APP_TITLE = AI智能体助手
# 芋道管理系统/开发环境
# AI智能体助手/开发环境
VUE_APP_BASE_API = 'http://192.168.110.143:48080'
# 路由懒加载

@ -2,9 +2,9 @@
ENV = 'development'
# 页面标题
VUE_APP_TITLE = 芋道管理系统
VUE_APP_TITLE = AI智能体助手
# 芋道管理系统/本地环境
# AI智能体助手/本地环境
VUE_APP_BASE_API = 'http://api-dashboard.yudao.iocoder.cn'
# 路由懒加载

@ -2,9 +2,9 @@
NODE_ENV = 'production'
# 页面标题
VUE_APP_TITLE = 芋道管理系统
VUE_APP_TITLE = AI智能体助手
# 芋道管理系统/生产环境
# AI智能体助手/生产环境
VUE_APP_BASE_API = '/prod-api'
# 根据服务器或域名修改

@ -1,12 +1,12 @@
NODE_ENV = production
# 页面标题
VUE_APP_TITLE = 芋道管理系统
VUE_APP_TITLE = AI智能体助手
# 测试环境配置
ENV = 'staging'
# 芋道管理系统/测试环境
# AI智能体助手/测试环境
VUE_APP_BASE_API = 'http://api-dashboard.yudao.iocoder.cn'
# 静态资源地址

@ -4,9 +4,9 @@ NODE_ENV = development
ENV = 'staging'
# 页面标题
VUE_APP_TITLE = 芋道管理系统
VUE_APP_TITLE = AI智能体助手
# 芋道管理系统/测试环境
# AI智能体助手/测试环境
VUE_APP_BASE_API = 'http://127.0.0.1:48080'
# 根据服务器或域名修改

@ -18,7 +18,7 @@
## 🐯 平台简介
**芋道**,以开发者为中心,打造中国第一流的快速开发平台,全部开源,个人与企业可 100% 免费使用。
**AI智能体助手**,以开发者为中心,打造中国第一流的快速开发平台,全部开源,个人与企业可 100% 免费使用。
* 采用 [Vue Element Admin](https://panjiachen.github.io/vue-element-admin-site/zh/guide/) 实现

@ -1,8 +1,8 @@
{
"name": "yudao-ui-admin",
"version": "2.5.0-snapshot",
"description": "芋道管理系统",
"author": "芋道",
"description": "AI智能体助手",
"author": "AI智能体助手",
"license": "MIT",
"scripts": {
"local": "vue-cli-service serve --mode local",
@ -58,9 +58,10 @@
"echarts": "5.4.0",
"element-ui": "2.15.14",
"event-source-polyfill": "^1.0.31",
"file-saver": "2.0.5",
"file-saver": "^2.0.5",
"fuse.js": "6.6.2",
"highlight.js": "9.18.5",
"html-docx-js": "^0.3.1",
"js-beautify": "1.13.0",
"jsencrypt": "3.3.1",
"min-dash": "3.5.2",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

@ -13,6 +13,8 @@
<link rel="stylesheet" href="https://cdn.ckeditor.com/ckeditor5-premium-features/45.1.0/ckeditor5-premium-features.css" />
<script src="https://cdn.ckeditor.com/ckeditor5-premium-features/45.1.0/ckeditor5-premium-features.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/html-docx-js/dist/html-docx.js"></script>
<script src="https://cdn.jsdelivr.net/npm/file-saver/dist/FileSaver.min.js"></script>
<title><%= webpackConfig.name %></title>

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

@ -225,7 +225,7 @@ $--base-super-radius: 24px;
.v-edit-tool {
position: absolute;
z-index: 1000;
z-index: 10000;
right: 10px;
bottom: 10px;

@ -192,12 +192,12 @@ export default {
//
let quill = this.Quill;
//
// edit by
// edit by AI
if (res.code === 200 || res.code === 0) {
//
let length = quill.getSelection().index;
// res.url
// edit by
// edit by AI
quill.insertEmbed(length, "image", res.data);
//
quill.setSelection(length + 1);

@ -161,7 +161,7 @@ export default {
handleUploadSuccess(res, file) {
console.log('res', res, file)
if (res.code === 0) {
// edit by
// edit by AI
this.uploadList.push({name: file.name, url: res.data});
this.uploadedSuccessfully();
} else {

@ -159,7 +159,7 @@ export default {
handleUploadSuccess(res, file) {
console.log('res', res, file)
if (res.code === 0) {
// edit by
// edit by AI
this.uploadList.push({name: file.name, url: res.data});
this.uploadedSuccessfully();
} else {

@ -147,7 +147,7 @@ export default {
if (res.code === 0) {
let result = file.name.split(".")
// edit by
// edit by AI
this.uploadList.push({ name: file.name, type:result[1], url: res.data,size: (file.size/1024).toFixed(),uid: file.uid });
this.uploadedSuccessfully();
} else {

@ -145,7 +145,7 @@ export default {
handleUploadSuccess(res, file) {
if (res.code === 0) {
let result = file.name.split(".")
// edit by
// edit by AI
this.uploadList.push({ name: file.name, type:result[1], url: res.data,size: (file.size/1024).toFixed(),uid: file.uid });
this.uploadedSuccessfully();
} else {

@ -90,7 +90,7 @@ export default {
//
this.fileList = list.map(item => {
if (typeof item === "string") {
// edit by
// edit by AI
item = { name: item, url: item };
}
return item;
@ -121,7 +121,7 @@ export default {
},
//
handleUploadSuccess(res) {
// edit by
// edit by AI
this.uploadList.push({ name: res.data, url: res.data });
if (this.uploadList.length === this.number) {
this.fileList = this.fileList.concat(this.uploadList);

@ -455,7 +455,7 @@ export default {
this.previewModelVisible = true;
});
},
/* ------------------------------------------------ 芋道源码 methods ------------------------------------------------------ */
/* ------------------------------------------------ AI智能体助手源码 methods ------------------------------------------------------ */
async processSave() {
const { err, xml } = await this.bpmnModeler.saveXML();
//

@ -87,7 +87,7 @@ function renderFormItem(h, elementList) {
const config = scheme.__config__
const layout = layouts[config.layout]
// edit by el-upload
// edit by AI el-upload
// https://github.com/JakHuang/form-generator/blob/master/src/components/parser/example/Index.vue
const vModel = scheme.__vModel__
const val = data[vModel]
@ -216,7 +216,7 @@ export default {
this.$refs[this.formConf.formRef].validate(valid => {
if (!valid) return false
// submit
// update by
// update by AI
// this.$emit('submit', this[this.formConf.formModel])
this.$emit('submit', {
conf: this.formConfCopy,

@ -35,7 +35,7 @@ export default {
},
data() {
return {
title: '芋道管理系统',
title: 'AI智能体助手',
logo: logoImg
}
}

@ -1,8 +1,8 @@
{
"name": "yudao-ui-admin",
"version": "2.5.0-snapshot",
"description": "芋道管理系统",
"author": "芋道",
"description": "AI智能体助手",
"author": "AI智能体助手",
"license": "MIT",
"scripts": {
"local": "vue-cli-service serve --mode local",

@ -65,16 +65,9 @@ export const constantRoutes = [
hidden: true
},
{
path: '',
component: Layout,
redirect: 'index',
children: [{
path: 'index',
component: (resolve) => require(['@/views/index'], resolve),
name: '首页',
meta: {title: '首页', icon: 'dashboard', affix: true}
}
]
path: '/index',
component: (resolve) => require(['@/views/pages/AI-Document-Correction/index'], resolve),
hidden: true,
},
{
path: '/DocumentCorrectionIndex',//AI公文写作 首页

@ -1,5 +1,5 @@
/**
* Created by 芋道源码
* Created by AI智能体助手源码
*
* 枚举类
*/

@ -1,5 +1,5 @@
/**
* Created by 芋道源码
* Created by AI智能体助手源码
*
* 数据字典工具类
*/

@ -272,7 +272,7 @@ export function debounce(func, wait, immediate) {
// }
// 深拷贝对象
// add by 芋道源码 https://github.com/JakHuang/form-generator/blob/dev/src/utils/index.js#L107
// add by AI智能体助手源码 https://github.com/JakHuang/form-generator/blob/dev/src/utils/index.js#L107
export function deepClone(obj) {
const _toString = Object.prototype.toString

@ -274,7 +274,7 @@ export default {
}
},
mounted() {
// add by
// add by AI
// if (Array.isArray(drawingListInDB) && drawingListInDB.length > 0) {
// this.drawingList = drawingListInDB
// } else {

@ -11,7 +11,7 @@ Vue.component('tinymce', Tinymce)
Vue.config.productionTip = false
Vue.prototype.$axios = axios
// add by 芋道源码:引用自 https://github.com/JakHuang/form-generator/tree/dev/src/views/index
// add by AI智能体助手源码:引用自 https://github.com/JakHuang/form-generator/tree/dev/src/views/index
new Vue({
router,

@ -9,7 +9,7 @@
<div class="field">
<!-- [移动端]标题 -->
<h2 class="mobile-title">
<h3 class="title">芋道后台管理系统</h3>
<h3 class="title">AI智能体助手后台管理系统</h3>
</h2>
<!-- 表单 -->
@ -145,7 +145,7 @@ export default {
mobile: "",
mobileCode: "",
rememberMe: false,
tenantName: "芋道源码",
tenantName: "AI智能体助手源码",
},
scene: 21,

@ -20,7 +20,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
芋道源码
AI智能体助手源码
移除 avue 框架使用 element-ui 重写
重写代码保持和现有项目保持一致
-->

@ -1,7 +1,7 @@
<!--
- Copyright (C) 2018-2019
- All rights reserved, Designed By www.joolun.com
芋道源码
AI智能体助手源码
调整 uploadData 属性只需要传入 accountId 即可
-->
<template>

@ -1,7 +1,7 @@
<!--
- Copyright (C) 2018-2019
- All rights reserved, Designed By www.joolun.com
芋道源码
AI智能体助手源码
移除 avue 组件使用 ElementUI 原生组件
-->
<template>

@ -1,7 +1,7 @@
<!--
- Copyright (C) 2018-2019
- All rights reserved, Designed By www.joolun.com
芋道源码
AI智能体助手源码
移除暂时用不到的 websocket
代码优化补充注释提升阅读性
-->

@ -2,7 +2,7 @@
- Copyright (C) 2018-2019
- All rights reserved, Designed By www.joolun.com
微信消息 - 图文
芋道源码
AI智能体助手源码
代码优化补充注释提升阅读性
-->
<template>

@ -1,7 +1,7 @@
<!--
- Copyright (C) 2018-2019
- All rights reserved, Designed By www.joolun.com
芋道源码
AI智能体助手源码
移除多余的 rep 为前缀的变量 message 消息更简单
代码优化补充注释提升阅读性
优化消息的临时缓存策略发送消息时只清理被发送消息的 tab不会强制切回到 text 输入

@ -2,7 +2,7 @@
- Copyright (C) 2018-2019
- All rights reserved, Designed By www.joolun.com
微信消息 - 视频
芋道源码
AI智能体助手源码
bug 修复
1joolun 的做法使用 mediaId 从微信公众号下载对应的 mp4 素材从而播放内容
存在的问题mediaId 有效期是 3 超过时间后无法播放

@ -2,7 +2,7 @@
- Copyright (C) 2018-2019
- All rights reserved, Designed By www.joolun.com
微信消息 - 语音
芋道源码
AI智能体助手源码
bug 修复
1joolun 的做法使用 mediaId 从微信公众号下载对应的 mp4 素材从而播放内容
存在的问题mediaId 有效期是 3 超过时间后无法播放

@ -20,7 +20,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
芋道源码
AI智能体助手源码
优化代码和项目的代码保持一致
清理冗余代码保证代码整洁
增加注释提升可读性

@ -20,7 +20,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
芋道源码
AI智能体助手源码
优化代码和项目的代码保持一致
-->
<template>

@ -20,7 +20,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
芋道源码
AI智能体助手源码
清理冗余 css 内容清理冗余 data 变量
美化样式支持播放提升使用体验
优化代码特别是方法名和变量提升可读性
@ -401,7 +401,7 @@ export default {
width: 100%;
column-gap:10px;
column-count: 5;
margin-top: 10px; /* 芋道源码:增加 10px,避免顶着上面 */
margin-top: 10px; /* AI智能体助手源码:增加 10px,避免顶着上面 */
}
.waterfall-item {
padding: 10px;

@ -20,7 +20,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
芋道源码
AI智能体助手源码
less 切到 scss减少对 less less-loader 的依赖
-->

@ -1,5 +1,5 @@
<template>
<div class="ai-pages row">
<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">
@ -9,7 +9,7 @@
element-loading-text="请稍后,正文生成中...">
<div class="ai-show-btn show" @click="showPage = !showPage"><i class="el-icon-arrow-right"></i></div>
<div class="ai-edit-content" v-html="generatedContent" v-if="!editorState"></div>
<ckeditor :editor="editor" v-model="generatedEdit" :config="editorConfig" style="height:500px" />
<ckeditor :editor="editor" v-model="generatedEdit" :config="editorConfig" style="height:500px"/>
<div class="v-edit-tool">
<div class="v-edit-tool-item down" @click="downLoadDoc"><i class="iconfont icon-down"></i></div>
<div class="v-edit-tool-item refresh" @click="refreshDoc"><i class="iconfont icon-refresh"></i></div>
@ -42,7 +42,8 @@
<el-input v-model="form.title" class="v-input" :disabled="generatedLoading"></el-input>
</el-form-item>
<el-form-item label="主题词" class="v-item-block" prop="keywords">
<el-tooltip class="item" effect="dark" content="输入多个关键字时,请使用中文逗号(,)隔开。" placement="top">
<el-tooltip class="item" effect="dark" content="输入多个关键字时,请使用中文逗号(,)隔开。"
placement="top">
<i class="v-edit-tip el-icon-question"></i>
</el-tooltip>
<el-input v-model="form.keywords" type="textarea" :rows="2" class="v-textarea" resize="none"
@ -79,7 +80,7 @@
<!-- skType 1深度思考 2普通问答 -->
<div class="ai-ecode-content" v-if="skType == 1">
<div class="ai-ecode-msg">
<div class="ai-ecode-msg-title"><img src="@/assets/ai-images/aie.png" class="ai-ecode-msg-title-img" />
<div class="ai-ecode-msg-title"><img src="@/assets/ai-images/aie.png" class="ai-ecode-msg-title-img"/>
<div class="ai-ecode-msg-title-txt" v-if="thinkState">已深度思考,耗时{{ thinkTimes }}</div>
<div class="ai-ecode-msg-title-txt think" v-else>思考中</div>
</div>
@ -97,13 +98,16 @@
</div>
</div>
</main>
</div>
</div>
</template>
<script>
import FileUpload from '@/components/FileUpload'
import FileUpload1 from '@/components/FileUpload1'
import htmlDocx from 'html-docx-js/dist/html-docx';
import FileSaver from 'file-saver';
import * as AiApi from '@/api/ai-api'
const {
@ -153,12 +157,12 @@ const {
TextTransformation,
} = CKEDITOR;
const { FormatPainter } = CKEDITOR_PREMIUM_FEATURES;
const {FormatPainter} = CKEDITOR_PREMIUM_FEATURES;
export default {
name: 'DocumentCorrectionDialog',
components: { FileUpload, FileUpload1 },
components: {FileUpload, FileUpload1},
data() {
return {
editor: ClassicEditor,
@ -268,7 +272,7 @@ export default {
},
rules: {
keywords: [
{ required: true, message: '请输入主题词', trigger: 'blur' },
{required: true, message: '请输入主题词', trigger: 'blur'},
]
},
@ -299,16 +303,15 @@ export default {
},
mounted() {
let params
console.log(this.$route.params.data)
if (this.$route.params.data) {
params = this.$route.params.data
localStorage.setItem('fileData', params);
localStorage.setItem('fileData', JSON.stringify(params));
} else {
params = localStorage.getItem('fileData')
params = JSON.parse(localStorage.getItem('fileData'))
}
this.form.type = params.type
this.form.subType = params.docType
this.form.title = params.title
this.form.keywords = params.keywords
this.form.first = params.first
@ -327,7 +330,7 @@ export default {
},
downloadTextAsFile(text, fileName) {
// BlobBlob
var blob = new Blob([text], { type: 'application/msword;charset=utf-8' });
var blob = new Blob([text], {type: 'application/msword;charset=utf-8'});
//
var downloadLink = document.createElement('a');
downloadLink.href = URL.createObjectURL(blob);
@ -398,6 +401,7 @@ export default {
},
/** 模型列表 值 */
getModelCascader(val) {
this.thinkTimes = 0
let model = this.modelOptions.find((item, index) => {
return item.value == val[0]
})
@ -412,16 +416,14 @@ export default {
this.editor = Object.seal(editor) // Object.seal()
},
handleReferenceChange(file) {
console.log(file)
this.form.referenceDocumentId = file
},
handleImitationChange(file) {
console.log(file)
this.form.imitationDocumentId = file
},
/** 生成 公文 */
async generateDoc() {
this.thinkState = false
try {
await this.$refs['formRef'].validate()
this.generatedContent = '';
@ -432,11 +434,7 @@ export default {
this.generatedLoading = true
this.errorMessage = '';
// skType 1 2
if (this.skType == 1) {
this.thinkStart = true
} else {
this.thinkStart = false
}
this.startTime = this.endTime = new Date();
this.thinkTimes = this.endTime.getTime() - this.startTime.getTime();
let versionId = this.modelOptions.find((item, index) => {
@ -448,7 +446,6 @@ export default {
})
let subType = this.typeList.find((item) => {
console.log(item,this.form.subType)
return item.value == this.form.subType
})
@ -466,7 +463,6 @@ export default {
referenceDocumentId: this.form.referenceDocumentId,//
imitationDocumentId: this.form.imitationDocumentId,//仿
};
console.log(params)
this.eventSource = await AiApi.chatStream(params);
this.eventSource.onmessage = (event) => {
@ -478,6 +474,7 @@ export default {
this.editorState = true
this.generatedEdit = this.generatedContent
this.closeConnection();
return;
}
@ -488,7 +485,6 @@ export default {
//
if (delta.reasoning_content) {
this.thinkState = true
this.reasoningContent += delta.reasoning_content;
}
@ -499,7 +495,9 @@ export default {
let deepTime = Math.abs(this.endTime.getTime() - this.startTime.getTime());
this.thinkTimes = (deepTime / 1000).toFixed(2)
}
this.thinkState = false
if(this.skType==1){
this.thinkState = true
}else{this.thinkState = false}
this.generatedContent += delta.content;
}

@ -9,7 +9,7 @@
<div class="field">
<!-- [移动端]标题 -->
<h2 class="mobile-title">
<h3 class="title">芋道后台管理系统</h3>
<h3 class="title">AI智能体助手后台管理系统</h3>
</h2>
<!-- 表单 -->

@ -9,7 +9,7 @@
<div class="field">
<!-- [移动端]标题 -->
<h2 class="mobile-title">
<h3 class="title">芋道后台管理系统</h3>
<h3 class="title">AI智能体助手后台管理系统</h3>
</h2>
<!-- 表单 -->

@ -8,7 +8,7 @@ function resolve(dir) {
const CompressionPlugin = require('compression-webpack-plugin')
const name = process.env.VUE_APP_TITLE || '芋道管理系统' // 网页标题
const name = process.env.VUE_APP_TITLE || 'AI智能体助手' // 网页标题
const port = process.env.port || process.env.npm_config_port || 80 // 端口

Loading…
Cancel
Save