Commit eec1433c authored by 高飞's avatar 高飞

修改

parent c94740b8
import { post_technique } from "../util/http_util"; import { post_technique,post_technique_entity } from "../util/http_util";
//命名实体识别 api_technique_entity //命名实体识别 api_technique_entity
//热词 api_technique_hotWord //热词 api_technique_hotWord
...@@ -7,17 +7,17 @@ import { post_technique } from "../util/http_util"; ...@@ -7,17 +7,17 @@ import { post_technique } from "../util/http_util";
//命名实体识别 //命名实体识别
export const entity = data => { export const entity = data => {
return post(`api_technique_entity/entitu_extract_model_mapping`, data); return post_technique_entity(`api_technique_entity/v1/entity_extract_model_mapping`, data);
} }
//热词 //热词
export const hotWord = data => { export const hotWord = data => {
return post(`api_technique_hotWord/Seqment`, data); return post_technique(`api_technique_hotWord/Segment`, data);
} }
//总结 //总结
export const summary = data => { export const summary = data => {
return post(`api_technique_summary/service`, data); return post_technique(`api_technique_summary/service`, data);
} }
//情感 //情感
......
...@@ -89,95 +89,95 @@ div::-webkit-scrollbar-corner { ...@@ -89,95 +89,95 @@ div::-webkit-scrollbar-corner {
background-color: #17354c; background-color: #17354c;
background-image: url("../../assets/img/dfzy/new/6.png"); background-image: url("../../assets/img/dfzy/new/6.png");
background-size: 100% 100%; background-size: 100% 100%;
}
.popper__arrow::after { .el-select-dropdown .popper__arrow::after {
border-bottom-color: #17354c !important; border-bottom-color: #17354c !important;
} }
.el-tree { .el-select-dropdown .el-tree {
background: #ffffff00; background: #ffffff00;
color: #ffffff; color: #ffffff;
} }
.tree-select__option.el-select-dropdown__item { .el-select-dropdown .tree-select__option.el-select-dropdown__item {
background-color: #fff0; background-color: #fff0;
} }
.el-tree-node__content:hover { .el-select-dropdown .el-tree-node__content:hover {
background-image: linear-gradient(to right, #17344b, #2f91af, #17354c); background-image: linear-gradient(to right, #17344b, #2f91af, #17354c);
} }
.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content { .el-select-dropdown .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
background-image: linear-gradient(to right, #17344b, #2f91af, #17354c); background-image: linear-gradient(to right, #17344b, #2f91af, #17354c);
} }
.tree-select__tree.tree-select__tree--radio .el-tree-node.is-current>.el-tree-node__content { .el-select-dropdown .tree-select__tree.tree-select__tree--radio .el-tree-node.is-current>.el-tree-node__content {
color: orange; color: orange;
} }
.el-tree-node:focus>.el-tree-node__content { .el-select-dropdown .el-tree-node:focus>.el-tree-node__content {
background-color: #ffffff00; background-color: #ffffff00;
} }
.el-select-dropdown__item.hover, .el-select-dropdown .el-select-dropdown__item.hover,
.el-select-dropdown__item:hover { .el-select-dropdown .el-select-dropdown__item:hover {
background-image: linear-gradient(to right, #17344b, #2f91af, #17354c); background-image: linear-gradient(to right, #17344b, #2f91af, #17354c);
} }
.el-select-dropdown__item { .el-select-dropdown .el-select-dropdown__item {
color: #ffffff; color: #ffffff;
}
} }
.page-div { .page-div {
width: 100%; width: 100%;
height: 50px; height: 50px;
}
.el-input--suffix .el-input__inner { .page-div .el-pagination {
height: 30px; margin-top: 9px;
} text-align: right;
}
.el-pagination { .page-div .el-pagination .el-pagination__jump {
margin-top: 9px; color: white;
text-align: right; }
.el-pagination__jump { .page-div .el-pagination .el-pagination__total {
color: white; color: white;
} }
.el-pagination__total { .page-div .el-pagination .el-select .el-input .el-input__inner {
color: white; height: 26px;
} }
}
.myPagination.is-background .el-pager li:not(.disabled).active { .page-div .myPagination.is-background .el-pager li:not(.disabled).active {
color: #fff; color: #fff;
border: 1px solid #146a80; border: 1px solid #146a80;
box-shadow: 0 0 10px #1b6097; box-shadow: 0 0 10px #1b6097;
background-color: #1d2d46; background-color: #1d2d46;
} }
.el-pagination span:not([class*=suffix]), .page-div .el-pagination span:not([class*=suffix]),
.el-pagination button { .page-div .el-pagination button {
font-size: 12px; font-size: 12px;
height: 24px; height: 24px;
line-height: 24px; line-height: 24px;
} }
.el-pager li { .page-div .el-pager li {
font-size: 12px; font-size: 12px;
height: 24px; height: 24px;
line-height: 24px; line-height: 24px;
} }
.el-pagination__editor.el-input .el-input__inner { .page-div .el-pagination__editor.el-input .el-input__inner {
height: 24px; height: 24px;
} }
.el-input__inner { .page-div .el-input__inner {
height: 24px; height: 24px;
}
} }
.bk-animation { .bk-animation {
...@@ -267,7 +267,7 @@ div::-webkit-scrollbar-corner { ...@@ -267,7 +267,7 @@ div::-webkit-scrollbar-corner {
right: 2.5%; right: 2.5%;
bottom: 24%; bottom: 24%;
/* border:2px solid #ff9933; */ /* border:2px solid #ff9933; */
border:none; border: none;
} }
&::after { &::after {
...@@ -276,7 +276,7 @@ div::-webkit-scrollbar-corner { ...@@ -276,7 +276,7 @@ div::-webkit-scrollbar-corner {
right: 2.5%; right: 2.5%;
bottom: 24%; bottom: 24%;
/* border:2px solid #ff9933; */ /* border:2px solid #ff9933; */
border:none; border: none;
} }
} }
......
...@@ -595,15 +595,41 @@ let post_technique = (url, data, headers = {}) => { ...@@ -595,15 +595,41 @@ let post_technique = (url, data, headers = {}) => {
}).then(res => { }).then(res => {
let result = JSON.parse(res); let result = JSON.parse(res);
if (result.status == 'success') { if (result.status == 'success') {
resolve(JSON.parse(result.data)); // resolve(JSON.parse(result.data));
resolve(result.data);
} else { } else {
console.log(result); console.log(result);
reject(result); reject(result);
} }
}).catch(err => reject(err)); }).catch(err => reject(err));
}) })
}; }
let post_technique_entity = (url, data, headers = {}) => {
return new Promise((resolve, reject) => {
fetch(url, {
method: "POST",
body: typeof data == "object" ? JSON.stringify(data) : data,
headers: new Headers(addHeaders(headers))
}).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 == 'true') {
// resolve(JSON.parse(result.data));
resolve(result.result);
} else {
console.log(result);
reject(result);
}
}).catch(err => reject(err));
})
};
export { export {
...@@ -636,5 +662,6 @@ export { ...@@ -636,5 +662,6 @@ export {
post_exame, post_exame,
delete_util_exame, delete_util_exame,
fileUpload_PUT, fileUpload_PUT,
post_technique post_technique,
post_technique_entity
} }
\ No newline at end of file
...@@ -626,7 +626,7 @@ export default { ...@@ -626,7 +626,7 @@ export default {
this.jgName = "1"; this.jgName = "1";
this.jgName_public = 2; this.jgName_public = 2;
}else{ }else{
this.value_select = val.id this.value_select = val.code;
this.jgName = val.id; this.jgName = val.id;
this.jgName_public = val.type; this.jgName_public = val.type;
} }
......
...@@ -627,7 +627,7 @@ export default { ...@@ -627,7 +627,7 @@ export default {
this.types = 2; this.types = 2;
this.jgName = "1"; this.jgName = "1";
}else{ }else{
this.value_select = val.id; this.value_select = val.code;
this.types = val.type; this.types = val.type;
this.jgName = val.code == undefined ? val.id : val.code; this.jgName = val.code == undefined ? val.id : val.code;
} }
......
...@@ -72,7 +72,7 @@ export default { ...@@ -72,7 +72,7 @@ export default {
} else if (this.form.technique == 3) { } else if (this.form.technique == 3) {
if (this.form.text.trim() != '') { if (this.form.text.trim() != '') {
summary({ language: "zh", text: this.form.text.trim() }).then(res => { summary({ language: "zh", text: this.form.text.trim() }).then(res => {
this.form.result = res.score; this.form.result = res;
}) })
} else { } else {
alert('未识别到主体!'); alert('未识别到主体!');
...@@ -80,7 +80,7 @@ export default { ...@@ -80,7 +80,7 @@ export default {
} else if (this.form.technique == 4) { } else if (this.form.technique == 4) {
if (this.form.text.trim() != '') { if (this.form.text.trim() != '') {
emotionNews({ data: this.form.text.trim() }).then(res => { emotionNews({ data: this.form.text.trim() }).then(res => {
this.form.result = res.score; this.form.result = JSON.parse(res.score);
}) })
} else { } else {
alert('未识别到主体!'); alert('未识别到主体!');
......
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