|
|
@@ -3,6 +3,21 @@
|
|
|
<div slot="header" class="clearfix">
|
|
|
<span>Correction Analysis</span>
|
|
|
</div>
|
|
|
+ <el-input
|
|
|
+ id="search_bar"
|
|
|
+ placeholder="Enter your analysis ID"
|
|
|
+ v-model="correction_id"
|
|
|
+ style="width: 250px"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ slot="suffix"
|
|
|
+ icon="el-icon-search"
|
|
|
+ circle
|
|
|
+ @click="getInfor"
|
|
|
+ size="small"
|
|
|
+ style="margin-top:3px"
|
|
|
+ ></el-button>
|
|
|
+ </el-input>
|
|
|
<div id="corrected-image-container">
|
|
|
<div class="corrected-image-group">
|
|
|
<el-image
|
|
|
@@ -49,9 +64,18 @@
|
|
|
</div>
|
|
|
<div id="information-container">
|
|
|
<div id="level-desc">
|
|
|
- <p class="level-item" :style="{'background-color':level_color[0]}">Normal</p>
|
|
|
- <p class="level-item" :style="{'background-color':level_color[1]}">Warning</p>
|
|
|
- <p class="level-item" :style="{'background-color':level_color[2]}">Danger</p>
|
|
|
+ <p class="level-item" :style="{ 'background-color': level_color[0] }">
|
|
|
+ Normal
|
|
|
+ </p>
|
|
|
+ <p class="level-item" :style="{ 'background-color': level_color[1] }">
|
|
|
+ Mild
|
|
|
+ </p>
|
|
|
+ <p class="level-item" :style="{ 'background-color': level_color[2] }">
|
|
|
+ Moderate
|
|
|
+ </p>
|
|
|
+ <p class="level-item" :style="{ 'background-color': level_color[3] }">
|
|
|
+ Severe
|
|
|
+ </p>
|
|
|
</div>
|
|
|
<div v-for="item in information" :key="item.index" class="text-item">
|
|
|
<div class="item-title">{{ item.title }}</div>
|
|
|
@@ -70,7 +94,7 @@
|
|
|
'background-color': level_color[detail.level],
|
|
|
color: 'white',
|
|
|
'border-radius': '2px',
|
|
|
- 'padding': '2px 4px 2px 4px'
|
|
|
+ padding: '2px 4px 2px 4px',
|
|
|
}"
|
|
|
>
|
|
|
{{ detail.value }}
|
|
|
@@ -97,18 +121,24 @@
|
|
|
/* .box-card {
|
|
|
width: 480px;
|
|
|
} */
|
|
|
+#search_bar {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: 5%;
|
|
|
+}
|
|
|
.box-card {
|
|
|
margin-left: 10%;
|
|
|
margin-right: 10%;
|
|
|
height: 520px;
|
|
|
overflow: auto;
|
|
|
}
|
|
|
-#level-desc{
|
|
|
+#level-desc {
|
|
|
display: flex;
|
|
|
justify-content: baseline;
|
|
|
align-items: center;
|
|
|
}
|
|
|
-.level-item{
|
|
|
+.level-item {
|
|
|
color: white;
|
|
|
margin-left: 3%;
|
|
|
border-radius: 3px;
|
|
|
@@ -127,7 +157,6 @@
|
|
|
width: 45%;
|
|
|
text-align: center;
|
|
|
padding: 8px 10px 5px 10px;
|
|
|
-
|
|
|
}
|
|
|
.corrected-image {
|
|
|
height: 200px;
|
|
|
@@ -167,27 +196,33 @@ export default {
|
|
|
mounted() {},
|
|
|
data() {
|
|
|
return {
|
|
|
- information: [
|
|
|
- ],
|
|
|
+ information: [],
|
|
|
images: {
|
|
|
- "front-correction":
|
|
|
- "",
|
|
|
- "right-correction":
|
|
|
- "",
|
|
|
+ "front-correction": "",
|
|
|
+ "right-correction": "",
|
|
|
},
|
|
|
- level_color: ["#67C23A", "#E6A23C", "#F56C6C"],
|
|
|
+ level_color: ["#67C23A", "#CDDC39", "#E6A23C", "#F56C6C"],
|
|
|
+ correction_id: "",
|
|
|
};
|
|
|
},
|
|
|
props: {},
|
|
|
methods: {
|
|
|
getInfor() {
|
|
|
+ let id = this.correction_id;
|
|
|
let _this = this;
|
|
|
- axios.get("http://172.17.244.191:8090/get_result").then((response) => {
|
|
|
- const data = response.data;
|
|
|
- _this.information = JSON.parse(data.data);
|
|
|
- _this.images["front-correction"] = "data:image/jpg;base64,"+data.front;
|
|
|
- _this.images["right-correction"] = "data:image/jpg;base64,"+data.right;
|
|
|
- });
|
|
|
+ let formData = new FormData();
|
|
|
+ formData.append("id", id);
|
|
|
+ axios
|
|
|
+ .post("http://114.212.245.120:8090/get_result", formData)
|
|
|
+ .then((response) => {
|
|
|
+ const data = response.data;
|
|
|
+ _this.information = JSON.parse(data.data);
|
|
|
+ _this.images["front-correction"] =
|
|
|
+ "data:image/png;base64," + data.front;
|
|
|
+ _this.images["right-correction"] =
|
|
|
+ "data:image/png;base64," + data.right;
|
|
|
+ console.log(_this.information);
|
|
|
+ });
|
|
|
},
|
|
|
downloadImage(name) {
|
|
|
// let _this = this;
|