11个算法试用配置内容

This commit is contained in:
wuhongjian 2022-07-13 18:00:26 +08:00
parent 22f1091532
commit 2019c1583f
5 changed files with 42 additions and 25 deletions

3
.gitignore vendored
View File

@ -4,3 +4,6 @@ back/dist-西海岸-后台管理-带配置文件.zip
back/dist-市局-后台管理-带配置文件.zip back/dist-市局-后台管理-带配置文件.zip
back/dist-包头-后台管理.zip back/dist-包头-后台管理.zip
back/dist-市局-后台管理.zip back/dist-市局-后台管理.zip
back/dist-市局-后台管理-v0.8.2.1.zip
front/public/index.html
back/dist-西海岸-后台管理-v0.8.2.1.zip

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-03-29 16:45:25 * @Date: 2022-03-29 16:45:25
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-11 18:10:24 * @LastEditTime: 2022-07-13 15:01:07
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<!DOCTYPE html> <!DOCTYPE html>
@ -29,11 +29,11 @@
<!-- 站点配置 --> <!-- 站点配置 -->
<script> <script>
window.SITE_CONFIG = {}; window.SITE_CONFIG = {};
// window.SITE_CONFIG['backUrl'] = 'http://15.72.183.90:8001'; window.SITE_CONFIG['backUrl'] = 'http://15.72.183.90:8001';
// window.SITE_CONFIG['previewUrl'] = 'http://15.72.183.90:7008/'; window.SITE_CONFIG['previewUrl'] = 'http://15.72.183.90:7008/';
// window.SITE_CONFIG['frontUrl'] = 'http://15.72.183.90:7008/document/#/devModelFile/'; window.SITE_CONFIG['frontUrl'] = 'http://15.72.183.90:7008/document/#/devModelFile/';
// window.SITE_CONFIG['apiURL'] = 'http://15.72.183.90:8000/renren-admin'; window.SITE_CONFIG['apiURL'] = 'http://15.72.183.90:8000/renren-admin';
// window.SITE_CONFIG['POI_URL'] = 'http://15.72.178.129:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address'; window.SITE_CONFIG['POI_URL'] = 'http://15.72.178.129:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// 包头 // 包头
// window.SITE_CONFIG['backUrl'] = 'http://10.110.205.1:8001'; // window.SITE_CONFIG['backUrl'] = 'http://10.110.205.1:8001';
// window.SITE_CONFIG['previewUrl'] = 'http://10.110.205.1:8002/'; // window.SITE_CONFIG['previewUrl'] = 'http://10.110.205.1:8002/';
@ -46,11 +46,11 @@
// window.SITE_CONFIG['frontUrl'] = 'http://10.134.135.9:9796/document/#/devModelFile/'; // window.SITE_CONFIG['frontUrl'] = 'http://10.134.135.9:9796/document/#/devModelFile/';
// window.SITE_CONFIG['apiURL'] = 'http://10.134.135.9:8888/renren-admin'; // window.SITE_CONFIG['apiURL'] = 'http://10.134.135.9:8888/renren-admin';
// 开发 // 开发
window.SITE_CONFIG['backUrl'] = 'http://15.2.21.238:9797'; // window.SITE_CONFIG['backUrl'] = 'http://15.2.21.238:9797';
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/'; // window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/';
window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/'; // window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/';
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.239:8888/renren-admin'; // window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address'; // window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// 穿透版本 // 穿透版本
// window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797'; // window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797';
// window.SITE_CONFIG['previewUrl'] = 'http://124.222.94.39:9796/'; // window.SITE_CONFIG['previewUrl'] = 'http://124.222.94.39:9796/';

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-09 09:29:29 * @Date: 2022-06-09 09:29:29
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-05 20:25:49 * @LastEditTime: 2022-07-13 16:34:26
* @Description: 算法详情 算法试用 * @Description: 算法详情 算法试用
--> -->
<template> <template>
@ -30,7 +30,8 @@
if (!obj) { if (!obj) {
flag.value = false flag.value = false
} else { } else {
onTrial.value = obj.attrValue //
onTrial.value = obj.attrValue.replace(/amp;/g, '')
} }
} }
watch( watch(
@ -41,7 +42,8 @@
if (!obj) { if (!obj) {
flag.value = false flag.value = false
} else { } else {
onTrial.value = obj.attrValue //
onTrial.value = obj.attrValue.replace(/amp;/g, '')
} }
} }
} }

View File

@ -14,7 +14,7 @@
:headers="headers" :headers="headers"
:showUploadList="false" :showUploadList="false"
@change="handleChange" @change="handleChange"
maxCount="1" maxCount="100"
> >
<a-button> <a-button>
<upload-outlined></upload-outlined> <upload-outlined></upload-outlined>
@ -73,8 +73,10 @@
</template> </template>
<script setup> <script setup>
import { ref, onMounted } from 'vue' import { ref, onMounted } from 'vue'
import { paddleocr } from '@/api/file' import { paddleocr,algo } from '@/api/file'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { useRouter } from 'vue-router'
const router = useRouter()
const uploadUrl = window.SITE_CONFIG.apiURL + '/upload' const uploadUrl = window.SITE_CONFIG.apiURL + '/upload'
let fileList = ref([]) let fileList = ref([])
// const responseUrl = ref('') // const responseUrl = ref('')
@ -82,31 +84,41 @@
const imageResult0 = ref('') const imageResult0 = ref('')
const imageResult1 = ref('') const imageResult1 = ref('')
const menuOpenKeys2 = ref(['全文还原']) const menuOpenKeys2 = ref(['全文还原'])
let responseUrl = ref('static/image/test.jpg') //
let responseUrl = ref('static/image/' + router.currentRoute.value.query.exampleImg)
const imgType = router.currentRoute.value.query.exampleImg.split('.')[1]
const handleChange = (info) => { const handleChange = (info) => {
debugger;
if (info.file.status !== 'uploading') { if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList) console.log(info.file, info.fileList)
} }
if (info.file.status === 'done') { if (info.file.status === 'done') {
message.success(`${info.file.name} file uploaded successfully`) message.success(`${info.file.name} file uploaded successfully`)
debugger
responseUrl.value = info.file.response.data responseUrl.value = info.file.response.data
// imgType.value = info.file.response.data.split('.')[1]
if (responseUrl.value) {
checkImage() checkImage()
}
} else if (info.file.status === 'error') { } else if (info.file.status === 'error') {
message.error(`${info.file.name} file upload failed.`) message.error(`${info.file.name} file upload failed.`)
} }
} }
const checkImage = () => { const checkImage = () => {
getUrlBase64(responseUrl.value, 'jpg', (base64) => { getUrlBase64(responseUrl.value, imgType.value, (base64) => {
console.log('1111111', base64) console.log('1111111', base64)
const param = { const param = {
img: base64.split('base64,')[1], company: router.currentRoute.value.query.company,
algorithmName: router.currentRoute.value.query.algorithmName,
data: base64.split('base64,')[1],
type: router.currentRoute.value.query.type
} }
paddleocr(param).then((res) => { algo(param).then((res) => {
// wordValue.value = res.data // wordValue.value = res.data
console.log('1111', res.data) console.log('1111', res.data)
imageResult.value = res.data.output imageResult.value = res.data.data.text_data
imageResult0.value = res.data.output imageResult0.value = res.data.data.text_data
imageResult1.value = res.data.output imageResult1.value = res.data.data.text_data
}) })
}) })
} }

View File

@ -73,7 +73,7 @@
// }) // })
// }) // })
algo(param).then(res=>{ algo(param).then(res=>{
errorWord.value = res.data.text_data errorWord.value = res.data.data.text_data
}) })
} }
</script> </script>