Commit 299c180d authored by 夏敏伟's avatar 夏敏伟
parents 14345390 dd1b105b
import { post_machineWriting } from "../util/http_util";
//命名实体识别 api_technique_entity
//热词 api_technique_hotWord
//消息摘要算法 api_technique_summary
//情感 api_technique_emotion
//命名实体识别
export const getProblemResult = data => {
return post_machineWriting(`api_machineWriting/api/gpu/gewu_api/chatbot/gewu`, data);
}
\ No newline at end of file
......@@ -701,7 +701,199 @@ let post_technique_entity = (url, data, headers = {}) => {
}).catch(err => reject(err));
})
};
let post_machineWriting = (url, data, headers = {}) => {
return new Promise((resolve, reject) => {
fetch(url, {
method: "POST",
body: typeof data == "object" ? JSON.stringify(data) : data,
headers: {
'apiKey': '7838fab88cde479d84d710d3d2453276',
'Content-Type': 'application/json'
}
}).then(res => {
if (res.status == 200) {
return res.text();
} else {
console.log(res.statusText);
reject(HTTP_STATUS);
}
}).then(res => {
let result = JSON.parse(res);
if (result.success) {
// resolve(JSON.parse(result.data));
resolve(result.mode);
} else {
reject(result);
}
})
.catch(err => reject(err));
})
}
//#region oss
/**
* oss文件上传
* @param {*} url
* @param {*} file
*/
let uploadOSS = (filename, bucket, file) => {
new Promise((resolve, reject) => {
fetch(`api/rest/file/presign?filename=${filename}&bucket=${bucket}`, {
headers: new Headers(addHeaders({}))
}).then(res => {
if (res.status == 200) {
return res.json();
} else {
console.log(res.statusText);
reject(HTTP_STATUS);
}
}).then(res => {
if (res.code == 9000) {
return fetch(res.data, {
method: "put",
body: file
});
} else {
return Promise.reject({ err: res.message });
}
}).then(res => {
if (res.status == 200) {
resolve();
} else {
console.log(res.statusText);
reject(HTTP_STATUS);
}
}).catch(err => {
reject({ err: err });
})
})
}
/**
* 带有进度条的oss文件上传
* @param {*} filename
* @param {*} bucket
* @param {*} file
* @param {*} progressFunction
* @returns
*/
let uploadOSSProgress = (filename, bucket, file, progressFunction) => {
return new Promise((resolve, reject) => {
fetch(`api/rest/file/presign?filename=${filename}&bucket=${bucket}`, {
headers: new Headers(addHeaders({}))
}).then(res => {
if (res.status == 200) {
return res.json();
} else {
console.log(res.statusText);
reject(HTTP_STATUS);
}
}).then(res => {
if (res.code == 9000) {
let xhr = new XMLHttpRequest(); // XMLHttpRequest 对象
xhr.open("put", res.data, true); //
xhr.onload = (e) => {
var info = xhr.responseText;
resolve();
}; //请求完成
xhr.onerror = (evt) => {
reject({ message: "错误" });
} //请求失败
xhr.upload.onprogress = (evt) => {
if (evt.lengthComputable) {//
progressFunction(Math.round(evt.loaded / evt.total * 100) + "%");
}
}//【上传进度调用方法实现】
xhr.upload.onloadstart = function () {//上传开始执行方法
console.log("started");
};
// xhr.setRequestHeader(ACCESS_TOKEN, token);
xhr.send(file); //开始上传,发送form数据
} else {
return Promise.reject({ err: res.message });
}
}).catch(err => {
reject({ err: err });
});
});
};
//#endregion
//#region sse支持
/**
* 原生sse的api
* @param {*} url
* @param {*} success
* @param {*} error
*/
let httpSSERequest = (url, success, error) => {
if (typeof (EventSource) !== "undefined") {
var eventSource = new EventSource(url);
eventSource.onmessage = function (event) {
success(event.data);
}
eventSource.addEventListener('error', function (event) {
error("错误:" + event);
});
eventSource.addEventListener('open', function (event) {
error("建立连接:" + event);
});
}
else {
error("抱歉,您的浏览器不支持 server-sent 事件 ...");
}
}
/**
* 通过fetch去流式读取
* @param {*} url
* @param {*} data
* @param {*} options
*/
let fetchEventSource = (url, data, options = {}) => {
// 发送 POST 请求
return new Promise((resolve, reject) => {
fetch(url, {
method: "get",
// body: typeof data == "object" ? JSON.stringify(data) : data,
timeout: 0,
dataType: "text/event-stream",
headers: new Headers(addHeaders({}))
}).then(response => {
// 检查响应是否成功
if (!response.ok) {
reject('Network response was not ok');
}
// 返回一个可读流
options.onopen && options.onopen();
return response.body;
}).then(body => {
// disableLoading();
const reader = body.getReader();
// 读取数据流
const push = () => {
return reader.read().then(({ done, value }) => {
// 检查是否读取完毕
if (done) {
console.log('已传输完毕');
options.onclose && options.onclose();
return;
}
// 处理每个数据块
// console.log('收到的数据:', value);
options.onmessage && options.onmessage(new TextDecoder().decode(value).replace(/[\t\r\f\n\s]*/g, ''));
// 继续读取下一个数据块
return push();
});
}
// 开始读取数据流
return push();
}).catch(error => {
options.error && options.error(error);
});
});
}
//#endregion
export {
get,
......@@ -740,5 +932,10 @@ export {
post_technique_entity,
addParamNew,
arr_img_format,
fileUploadProgress
fileUploadProgress,
post_machineWriting,
httpSSERequest,
uploadOSS,
uploadOSSProgress,
fetchEventSource
}
\ No newline at end of file
......@@ -9,8 +9,8 @@
</div>
<div class="button-list-right">
<div v-for="(item, index) in modules.rightModule"
:class="['module-info', isSelected - 3 == index ? 'selectedModule' : '']" @click="choiceModule(index + 3)"
v-text="item.name">
:class="['module-info', isSelected - 3 == index ? 'selectedModule' : '']"
@click="choiceModule(index + 3)" v-text="item.name">
</div>
</div>
<h1><span v-text="system_name"></span></h1>
......@@ -77,7 +77,7 @@
import "../assets/css/home.css";
// import jh_bg from "../assets/img/main/logo-bg.png";
// import jh from "/static/img/main/logo.png";
import { endLoading, get, post } from "../util/http_util";
import { endLoading, get, post, httpSSERequest, fetchEventSource } from "../util/http_util";
import { queryDictItem } from '../api/dictitem';
import Push from 'push.js'
import dayjs from 'dayjs';
......@@ -118,9 +118,9 @@ export default {
],
},
isSelected: 0,
myDate:{
day:null,
week:null
myDate: {
day: null,
week: null
},
system_name: SYSTEM_NAME
};
......@@ -172,9 +172,9 @@ export default {
},
handleClose(key, keyPath) { },
show_zd() {
this.$router.push("zyzdy");
// this.activeIndex = "0";
this.$store.commit("activeIndex", "0");
this.$router.push("zyzdy");
// this.activeIndex = "0";
this.$store.commit("activeIndex", "0");
},
handleClose(done) {
done();
......@@ -269,8 +269,39 @@ export default {
//获取时间
this.myDate.day = dayjs().format('YYYY年MM月DD日');
const weekList = ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'];
const weekList = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
this.myDate.week = weekList[dayjs().get('day')]
fetchEventSource("api/api_ws/connect", {}, {
onopen: () => {
console.log("打开");
},
onclose: () => {
console.log("关闭");
},
onmessage: (value) => {
console.log(value);
value = value.replace("data:", "");
if (!value) {
return;
}
this.$notify({
title: '成功',
message: value,
type: 'success'
});
}
}).then(res => {
}).catch(err => {
});
// httpSSERequest("api/api_ws/connect", (data) => {
// console.log(data)
// }, (err) => {
// console.log(err)
// });
},
computed: {
userInfo() {
......@@ -577,7 +608,8 @@ export default {
.el-dropdown-link {
cursor: pointer;
color: white;
.el-icon-more.setting_button{
.el-icon-more.setting_button {
font-size: 25px;
}
}
......@@ -864,4 +896,5 @@ export default {
transition: all 0.4s ease;
cursor: pointer;
}
}</style>
\ No newline at end of file
}
</style>
\ No newline at end of file
......@@ -63,7 +63,8 @@
title="编辑"></i>&nbsp;
<!-- <i class="el-icon-delete-solid" @click="handleOpen(scope.$index, scope.row)"
title="打开软件" v-if="fl_type===2"></i>&nbsp; -->
<div class="ht-div" @click="handleOpen(scope.$index, scope.row)" v-if="fl_type===2" title="打开软件"></div>
<div class="ht-div" @click="handleOpen(scope.$index, scope.row)"
v-if="fl_type === 2" title="打开软件"></div>
<i class="el-icon-delete-solid" @click="handleDelete(scope.$index, scope.row)"
title="删除"></i>
</template>
......@@ -183,8 +184,9 @@
title="编辑"></i>&nbsp;
<!-- <i class="el-icon-delete-solid" @click="handleOpen(scope.$index, scope.row)"
title="打开软件" v-if="fl_type===2"></i>&nbsp; -->
<div class="ht-div" @click="handleOpen(scope.$index, scope.row)" v-if="fl_type===2" title="打开软件"></div>
<div class="ht-div" @click="handleOpen(scope.$index, scope.row)" v-if="fl_type === 2"
title="打开软件"></div>
<i class="el-icon-delete-solid" @click="handleDelete(scope.$index, scope.row)"
title="删除"></i>
</template>
......@@ -298,6 +300,7 @@ import {
post,
fileUpload_PUT,
fileUploadProgress,
uploadOSSProgress,
delete_util,
startLoading,
startLoadingProgress,
......@@ -598,7 +601,7 @@ export default {
download(path_srt, item.fileInfo.file.name);
},
//打开软件
handleOpen(index,row){
handleOpen(index, row) {
let _this = this;
//用户判断此格式是否是视频格式
let video_type = false;
......@@ -614,19 +617,19 @@ export default {
img_type = true;
}
});
if(video_type||img_type){
window.protocolCheck('UHD://',(fail) =>{
if (video_type || img_type) {
window.protocolCheck('UHD://', (fail) => {
// 安装则直接打开
_this.$message({
type: "warning",
message: "未找到注册表,请安装相应注册表",
});
},(succ) => {
}, (succ) => {
// 安装则直接打开
console.log('succ', succ)
}
}
)
}else{
} else {
_this.$message({
type: "warning",
message: "当前文件格式不支持本地软件操作",
......@@ -842,11 +845,14 @@ export default {
})
.then(result => {
if (!result) {
let fd = new FormData();
fd.append("file", file);
fd.append("filename", md5);
fd.append("bucket", "MERGE");
return fileUploadProgress("api/rest/file/upload", fd, res => {//文件上传
// let fd = new FormData();
// fd.append("file", file);
// fd.append("filename", md5);
// fd.append("bucket", "MERGE");
// return fileUploadProgress("api/rest/file/upload", fd, res => {//文件上传
// load.text = "上传中:" + res;
// });
return uploadOSSProgress(md5, "MERGE", file, res => {//文件上传
load.text = "上传中:" + res;
});
} else {
......@@ -856,7 +862,7 @@ export default {
.then(res => {
let fd1 = new FormData();
fd1.append("info", JSON.stringify(fileInfo));
fd1.append("md5", res);
fd1.append("md5", md5);
fd1.append("destFilename", fileInfo.file.uuid);
load.text = "完成中";
return fileUpload_PUT("api/rest/3z/document/upload", fd1);//文件信息上传
......@@ -1187,7 +1193,8 @@ export default {
.table-div {
width: 100%;
height: calc(100% - 50px);
.ht-div{
.ht-div {
width: 26px;
height: 21px;
background-image: url(../../assets/img/setting/ht1.png);
......@@ -1197,6 +1204,7 @@ export default {
float: left;
cursor: pointer;
}
.el-table tr {
background-color: transparent !important;
color: #ffffffc7;
......
<template>
<el-dialog title="机器写作" :visible.sync="dialogVisible" width="60%" :before-close="handleClose" :close-on-click-modal="false">
<div class="info-messageInfo">
<div class="messageInfo-content">
<div id="chatContent" class="chatContent" ref="chatContent">
<div v-for="item in chatMessageList" class="everyMessage">
<div :style="{ justifyContent: item.type == 1 ? 'flex-end' : 'flex-start' }">
<template v-if="item.type==2">
<!-- <img class="otherSidesAvatarImg" :src="avatar" alt=""> -->
<div class="otherSides">
<!-- <div class="otherSides-user">{"机器"}</div> -->
<div class="otherSides-text" v-html="item.message"
style="background-color: white;" v-if="item.message!=''">
</div>
<i class="el-icon-loading" style="color:white" v-else></i>
</div>
</template>
<template v-else>
<div class="mySides-text" v-html="item.message"
style="background-color: #85ce61;">
</div>
</template>
</div>
</div>
</div>
<div class="chatSendMessage">
<div class="messageContent">
<!-- <div ref="editor" class="preview" contenteditable @keyup.enter="handleSubmit"></div> -->
<!-- onpaste="this.value=this.value.replace(/\r|\n/ig,'')" onkeyup="this.value=this.value.replace(/\r|\n/ig,'')" -->
<el-input ref="inputs" :disabled="disableds" style="border: 1px solid #6d6d6d;" type="textarea" autosize @keyup.native="handleSubmit($event)" placeholder="请输入内容回车搜索" v-model="sendMessage" >
</el-input>
</div>
<div class="sendMessageButtonList">
<el-button size="mini" type="success" @click="sendMessageFn" :disabled="disableds">发送</el-button>
</div>
</div>
</div>
</div>
</el-dialog>
</template>
<script>
import avatar from '../../../assets/img/ddkz/headPhoto.jpg';
import { getProblemResult } from '../../../api/machineWriting';
export default {
data() {
return {
dialogVisible: false,
chatMessageList: [],
sendMessage:'',
historyList:[],
avatar: avatar,
disableds:false,
}
},
props: {
visible: Boolean
},
methods: {
handleClose() {
this.$emit('handleCancel');
},
sendMessageFn(){
if(!this.disableds){
this.chatMessageList.push({type:1,message:this.sendMessage})
this.chatMessageList.push({type:2,message:''});
this.queryResult(this.sendMessage)
this.sendMessage = '';
}
},
queryResult(text){
this.$nextTick(() => {
this.keepBottom();
});
this.disableds = true;
getProblemResult({
text:text,
top_p:0.8,
temperature:0.85,
history:this.historyList
}).then((res)=>{
this.historyList.push({human:text,bot:res});
this.chatMessageList[this.chatMessageList.length-1].message = res;
this.$nextTick(() => {
this.keepBottom();
});
this.disableds = false;
}).catch(err=>{
console.log(err);
this.disableds = false;
})
},
handleSubmit(event){
if (event.keyCode == 13) {
if (!event.ctrlKey) {
event.preventDefault();
this.sendMessageFn();
} else {
this.sendMessage += '\n';
}
}
},
keepBottom() {
this.$refs.chatContent.scrollTop = this.$refs.chatContent.scrollHeight;
},
},
mounted() {
this.dialogVisible = this.$props.visible;
},
watch:{
disableds: function (val) {
if(!val){
this.$nextTick((_) => {
this.$refs.inputs.focus();
})
}
}
}
}
</script>
<style lang="scss">
.el-dialog {
padding: 20px;
box-sizing: border-box;
background-color: transparent;
background-image: url(../../../assets/img/home/dialog.png);
background-size: 100% 100%;
background-repeat: no-repeat;
.info-messageInfo {
width: 100%;
height: 60%;
.title {
width: 100%;
height: 30px;
line-height: 30px;
img {
width: 20px;
height: 20px;
}
span {
font-size: 16px;
font-weight: 500;
color: white;
vertical-align: text-bottom;
}
}
.messageInfo-content {
width: 100%;
height: calc(100% - 40px);
margin-top: 10px;
padding: 0px 10px;
border: 1px solid #515151c9;
box-sizing: border-box;
.chatContent {
width: 100%;
height: 74%;
border-bottom: 1px solid #37383f;
padding: 10px 0px;
box-sizing: border-box;
overflow-y: auto;
.everyMessage {
width: 100%;
margin-top: 10px;
&>div {
width: 100%;
display: flex;
align-items: flex-start;
margin-top: 10px;
font-size: 13px;
.otherSidesAvatarImg {
width: 20px;
height: 20px;
margin: 5px 10px 0px 10px;
}
.mySidesAvatarImg {
width: 20px;
height: 20px;
margin: 0px 10px;
}
&>div {
max-width: 50%;
.otherSides-user {
color: white;
margin-bottom: 5px;
}
.otherSides-text {
border-radius: 5px;
color: black;
margin-bottom: 5px;
padding: 5px 10px;
}
.el-imgage {
img {
width: 100%;
height: 100%;
}
}
}
.mySides-text {
border-radius: 5px;
color: black;
margin-bottom: 5px;
padding: 5px 10px;
}
}
}
}
.chatSendMessage {
width: 100%;
height: 25%;
position: relative;
.messageContent {
width: 100%;
height: 100%;
padding: 5px 0px;
box-sizing: border-box;
.preview {
width: 100%;
height: 100%;
padding: 10px;
box-sizing: border-box;
color: white;
border: 1px solid #474748;
outline: none;
/* 隐藏聚焦时外边框 */
white-space: pre-wrap;
overflow: hidden;
overflow-y: auto;
word-break: break-all;
}
.el-textarea__inner {
height: 100% !important;
color: white !important;
background-color: transparent !important;
border: 1px solid #37383f !important;
}
}
.sendMessageButtonList {
position: absolute;
right: 10px;
bottom: 15px;
}
}
}
}
}
</style>
\ No newline at end of file
......@@ -35,8 +35,8 @@ export default {
techniqueList: [
{ label: "命名实体识别", value: 1 },
{ label: "热词", value: 2 },
{ label: "消息摘要算法", value: 3 },
{ label: "情感识别", value: 4 },
// { label: "消息摘要算法", value: 3 },
{ label: "多模态智能心理分析技术", value: 4 },
]
}
},
......
......@@ -115,13 +115,13 @@
:src="item" :preview-src-list="obj_xq.fileUrlList" :key="item">
</el-image>
</div>
<div class="titles-div">
<!-- <div class="titles-div">
<div class="bgs-div"></div>
<div class="bgs-span">
<span>简介</span>
<span>基础概述</span>
</div>
</div>
<div class="content-divs" v-html="obj_xq.briefIntroduction"></div>
<div class="content-divs" v-html="obj_xq.content"></div> -->
<div class="titles-div">
<div class="bgs-div"></div>
<div class="bgs-span">
......@@ -164,12 +164,13 @@
</div>
</transition>
<NewTechniqueDialog v-if="visible" :visible="visible" :type="obj_xq.type" @handleCancel="closeDialog"></NewTechniqueDialog>
<MachineWriting v-if="visibleMachineWriting" :visible="visibleMachineWriting" @handleCancel="closeDialogMachineWriting"></MachineWriting>
</div>
</template>
<script>
import VanillaTilt from "vanilla-tilt";
import "animate.css";
import MachineWriting from '../xjssy/components/machineWriting.vue';
import NewTechniqueDialog from '../xjssy/components/newTechniqueDialog.vue';
export default {
data() {
......@@ -216,26 +217,22 @@ export default {
},
{
type: 3,
title: "消息摘要算法",
subtitle: "计算机科学术语",
content: "消息摘要算法的主要特征是加密过程不需要密钥,并且经过加密的数据无法被解密,可以被解密逆向的只有CRC32算法,只有输入相同的明文数据经过相同的消息摘要算法才能得到相同的密文。",
briefIntroduction: `消息摘要算法不存在密钥的管理与分发问题,适合于分布式网络上使用。由于其加密计算的工作量相当可观,所以以前的这种算法通常只用于数据量有限的情况下的加密,例如计算机的口令就是用不可逆加密算法加密的。近年来,随着计算机性能的飞速改善,加密速度不再成为限制这种加密技术发展的桎梏,因而消息摘要算法应用的领域不断增加。<br/>
消息摘要算法主要应用在“数字签名”领域,作为对明文的摘要算法。著名的摘要算法有RSA公司的MD5算法和SHA-1算法及其大量的变体。`,
title: "机器写作",
subtitle: "智能辅助",
content: "机器写作是一种利用人工智能技术,如机器学习、自然语言处理等,来生成文本的技术。这种技术可以用于各种领域,如新闻写作、博客文章、学术论文、商业报告等。机器写作的主要目标是提高写作效率和质量,减少人工错误,并使作者能够专注于创作过程",
features: `
<h3>消息摘要算法的特点:</h3>
消息摘要是把任意长度的输入揉和而产生长度固定的伪随机输出的算法。消息摘要的主要特点有:<br/>
&emsp;&emsp;①无论输入的消息有多长,计算出来的消息摘要的长度总是固定的。例如应用MD5算法摘要的消息有128个比特位,用SHA-1算法摘要的消息最终有160比特位的输出,SHA-1的变体可以产生192比特位和256比特位的消息摘要。一般认为,摘要的最终输出越长,该摘要算法就越安全。<br/>
&emsp;&emsp;②消息摘要看起来是“随机的”。这些比特看上去是胡乱的杂凑在一起的。可以用大量的输入来检验其输出是否相同,一般,不同的输入会有不同的输出,而且输出的摘要消息可以通过随机性检验。但是,一个摘要并不是真正随机的,因为用相同的算法对相同的消息求两次摘要,其结果必然相同;而若是真正随机的,则无论如何都是无法重现的。因此消息摘要是“伪随机的”。<br/>
&emsp;&emsp;③一般地,只要输入的消息不同,对其进行摘要以后产生的摘要消息也必不相同;但相同的输入必会产生相同的输出。这正是好的消息摘要算法所具有的性质:输入改变了,输出也就改变了;两条相似的消息的摘要确不相近,甚至会大相径庭。<br/>
&emsp;&emsp;④消息摘要函数是无陷门的单向函数,即只能进行正向的信息摘要,而无法从摘要中恢复出任何的消息,甚至根本就找不到任何与原信息相关的信息。当然,可以采用强力攻击的方法,即尝试每一个可能的信息,计算其摘要,看看是否与已有的摘要相同,如果这样做,最终肯定会恢复出摘要的消息。但实际上,要得到的信息可能是无穷个消息之一,所以这种强力攻击几乎是无效的。<br/>
&emsp;&emsp;⑤好的摘要算法,没有人能从中找到“碰撞”,虽然“碰撞”是肯定存在的。即对于给定的一个摘要,不可能找到一条信息使其摘要正好是给定的。或者说,无法找到两条消息,使它们的摘要相同。
`,
fileUrlList: ['../../../static/file/messageDigestAlgorithm/messageDigestAlgorithm.webp']
<h3>高效性</h3>
&emsp;&emsp;机器写作可以大大提高写作效率。通过使用机器学习和自然语言处理技术,机器可以快速生成高质量的文本。这使得机器写作非常适合于需要大量写作的任务,如新闻写作、博客文章、学术论文和商业报告等。
<h3>准确性</h3>
&emsp;&emsp;机器写作可以确保生成的文本的准确性。通过使用大量的训练数据和先进的算法,机器可以学习到如何生成准确、连贯和专业的文本。这使得机器写作非常适合于需要高质量文本的任务,如学术研究和商业报告等。
<h3>一致性</h3>
&emsp;&emsp;机器写作可以确保生成的文本的一致性。无论何时何地,只要使用相同的输入和参数,机器都会生成相同的输出。这使得机器写作非常适合于需要一致文本的任务,如新闻报道和博客文章等。
`,
fileUrlList: ['../../../static/file/jqxz/jqxz.jpg']
},
{
type: 4,
title: "情感识别",
title: "多模态智能心理分析技术",
subtitle: "计算机对人情感状态进行的识别",
content: "计算机对从传感器采集来的信号进行分析和处理,从而得出对方(人)正处在的情感状态,这种行为叫做情感识别。从生理心理学的观点来看,情绪是有机体的一种复合状态,既涉及体验又涉及生理反应,还包含行为,其组成分至少包括情绪体验、情绪表现和情绪生理三种因素。对于情感识别有两种方式,一种是检测生理信号如呼吸、心律和体温等,另一种是检测情感行为如面部特征表情识别、语音情感识别和姿态识别。",
summarize: `
......@@ -253,11 +250,13 @@ export default {
},
],
obj_xq: {},
visible: false
visible: false,
visibleMachineWriting: false,
};
},
components: {
'NewTechniqueDialog': NewTechniqueDialog
'NewTechniqueDialog': NewTechniqueDialog,
'MachineWriting':MachineWriting,
},
// props: {
// clientDetails: {
......@@ -277,8 +276,15 @@ export default {
closeDialog() {
this.visible = false;
},
closeDialogMachineWriting() {
this.visibleMachineWriting = false;
},
startUsing() {
this.visible = true;
if(this.obj_xq&&this.obj_xq.title=='机器写作'){
this.visibleMachineWriting = true;
}else{
this.visible = true;
}
}
},
mounted() {
......
......@@ -107,13 +107,14 @@ module.exports = {
]
},
devServer: {
compress: false,//SSE 依赖的是换行符。gzip 会破坏这种依赖。因此需要在webpack-dev-server 配置里把 gzip 关掉devserver{compress:false}
port: 8088,
hot: true,
static: './',
//后台代理
proxy: {
'/api/': {
target: 'http://192.168.168.213:8081',
target: 'http://localhost:8081',
ws: true,
secure: false,
changeOrigin: true,
......@@ -156,6 +157,12 @@ module.exports = {
pathRewrite: {
'^/api_technique_hotWord/': '/'
}
},
'/api_machineWriting/': {
target: 'http://152.136.126.203',
pathRewrite: {
'^/api_machineWriting/': '/'
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment