|
@@ -1070,6 +1070,10 @@ export default {
|
|
|
},
|
|
|
addAnalysisItem(title) {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
+ let converter = OpenCC.Converter({
|
|
|
+ from:'hk',
|
|
|
+ to:'cn'
|
|
|
+ })
|
|
|
this.dialogVisible = false;
|
|
|
let assistant = this.dialogTagDataList.find((i) => i.title == title);
|
|
|
|
|
@@ -1116,7 +1120,7 @@ export default {
|
|
|
.post("https://gpt4.cocorobo.cn/insert_classroom_observation", params)
|
|
|
.then((res) => {
|
|
|
let _data = res.data.FunctionResponse;
|
|
|
- if (_data.message && _data.message == "创建成功") {
|
|
|
+ if (_data.message && converter(_data.message) == converter("创建成功")) {
|
|
|
let _result = JSON.parse(_data.result)[0];
|
|
|
_result.jsonData = JSON.parse(_result.jsonData);
|
|
|
this.dataList.push(_result);
|
|
@@ -1454,8 +1458,13 @@ export default {
|
|
|
},
|
|
|
// 保存词频词汇分析
|
|
|
saveWordFrequency({ _sentence = 0, _words = 0 }) {
|
|
|
+ var OpenCC = require("opencc-js");
|
|
|
+ let converter = OpenCC.Converter({
|
|
|
+ from:'hk',
|
|
|
+ to:'cn'
|
|
|
+ })
|
|
|
let _saveData = this.dataList.find(
|
|
|
- (i) => i.jsonData.name == "词频词汇分析"
|
|
|
+ (i) => converter(i.jsonData.name) == converter("词频词汇分析")
|
|
|
);
|
|
|
if (_saveData) {
|
|
|
_saveData.jsonData.wordCountNum = _sentence;
|
|
@@ -1481,8 +1490,13 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
getReport() {
|
|
|
+ var OpenCC = require("opencc-js");
|
|
|
+ let converter = OpenCC.Converter({
|
|
|
+ from:'hk',
|
|
|
+ to:'cn'
|
|
|
+ })
|
|
|
let _empty = this.dataList.filter(
|
|
|
- (i) => i.jsonData.content != "" && i.jsonData.name != "词频词汇分析"
|
|
|
+ (i) => converter(i.jsonData.content) != "" && converter(i.jsonData.name) != converter("词频词汇分析")
|
|
|
);
|
|
|
|
|
|
// return console.log(_empty)
|
|
@@ -1513,6 +1527,11 @@ export default {
|
|
|
},
|
|
|
insertBaseMessage() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
+ var OpenCC = require("opencc-js");
|
|
|
+ let converter = OpenCC.Converter({
|
|
|
+ from:'hk',
|
|
|
+ to:'cn'
|
|
|
+ })
|
|
|
// 添加基础信息
|
|
|
let params = {
|
|
|
index: "0",
|
|
@@ -1547,7 +1566,7 @@ export default {
|
|
|
.post("https://gpt4.cocorobo.cn/insert_classroom_observation", params)
|
|
|
.then((res) => {
|
|
|
let _data = res.data.FunctionResponse;
|
|
|
- if (_data.message && _data.message == "创建成功") {
|
|
|
+ if (_data.message && converter(_data.message) == converter("创建成功")) {
|
|
|
this.ajax
|
|
|
.post(
|
|
|
"https://gpt4.cocorobo.cn/insert_classroom_observation",
|
|
@@ -1555,7 +1574,7 @@ export default {
|
|
|
)
|
|
|
.then((res2) => {
|
|
|
let _data2 = res2.data.FunctionResponse;
|
|
|
- if (_data2.message && _data2.message == "创建成功") {
|
|
|
+ if (_data2.message && converter(_data2.message) == converter("创建成功")) {
|
|
|
} else {
|
|
|
this.$message.error("创建课堂图片失败");
|
|
|
}
|