Commit ee328e2c authored by 赵啸非's avatar 赵啸非

Initial commit

parents
Pipeline #2803 canceled with stages
> 1%
last 2 versions
not dead
not ie 11
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/robot_h5.iml" filepath="$PROJECT_DIR$/.idea/robot_h5.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
# robot_h5
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"baseUrl": "./",
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
}
}
{
"name": "robot_h5",
"version": "0.1.0",
"private": true,
"scripts": {
"start": "vue-cli-service serve",
"build": "vue-cli-service build"
},
"dependencies": {
"@layui/layui-vue": "^1.4.9",
"@popperjs/core": "^2.11.6",
"axios": "^0.27.2",
"bootstrap": "^5.2.1",
"core-js": "^3.25.1",
"element-plus": "^2.2.16",
"good-storage": "^1.1.1",
"jquery": "^3.6.1",
"qrcodejs2": "^0.0.2",
"vue": "^3.2.13",
"vue-axios": "^3.4.1",
"vue-router": "~4.0.3"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-plugin-vuex": "~5.0.0",
"@vue/cli-service": "~5.0.0"
}
}
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<script src="./robotsdk.js"></script>
<!-- <script src="./test.js"></script> -->
</head>
<body>
<script>
robotType = true;//机器人硬件调用开关 true打开 false关闭
window.config = {
isUpRocrUrl:true,//是否更新ocrUrl true=更新 false=不更新
isRegisterVoice: true,//是否注册语音 true=是 false=否
// //本地环境
// api: "http://192.168.0.129:8000/",
// rocrUrl: "http://192.168.2.129:8099/",
// webSocketUrl : "wss://api.egovrobot.com/websocket/"
// //本地连测试
// api: "http://api.egovrobot.com/",
// rocrUrl: "http://192.168.0.129:8099/",
// webSocketUrl: "wss://api.egovrobot.com/websocket/"
// //开发环境
// api: "http://192.168.2.78:8000/",
// rocrUrl: "http://192.168.2.78:8099/",
// webSocketUrl : "ws://192.168.2.78:8088/websocket/"
// //正式环境
// api: "https://rapi.egovrobot.com/",
// rocrUrl: "https://rocr.egovrobot.com/",
// webSocketUrl : "wss://rapi.egovrobot.com/websocket/"
//测试环境
api: 'https://api.egovrobot.com/',
rocrUrl: "http://192.168.2.180:8099/",
webSocketUrl : "wss://api.egovrobot.com/websocket/"
};
</script>
<div id="app"></div>
</body>
</html>
var robotsdk = {
playAudio: function (obj) {
return window.chrome.webview.hostObjects.webBrowserObj.PlayAudio(obj.cmd, obj.animation, obj.videocontent, obj.callback);
},
stopAudio: function () {
return window.chrome.webview.hostObjects.webBrowserObj.FUStopSound();
},
openLight: function (obj) {
return window.chrome.webview.hostObjects.webBrowserObj.OpenLight(obj.lighttype, obj.lightstatus);
},
readIDCard: function (obj) {
return window.chrome.webview.hostObjects.webBrowserObj.ReadIDCard(obj.remindvoice, obj.callback);
},
openHighCamera: function (obj) {
return window.chrome.webview.hostObjects.webBrowserObj.OpenHighCamera(obj.x, obj.y, obj.width, obj.height);
},
getHighCamera: function (obj) {
return window.chrome.webview.hostObjects.webBrowserObj.GetHighCamera(obj.callback);
},
closeHighCamera: function () {
return window.chrome.webview.hostObjects.webBrowserObj.CloseHighCamera();
},
registerVoice: function (obj) {
return window.chrome.webview.hostObjects.webBrowserObj.RegisterVoiceRecognition(obj.dynamicDataFunc, obj.dataArrivedFunc);
},
unregisterVoice: function () {
return window.chrome.webview.hostObjects.webBrowserObj.UnRegisterVoiceRecognition();
},
registerVoiceCMD: function (obj) {
return window.chrome.webview.hostObjects.webBrowserObj.RegisterCmdRecognition(obj.cmdDataFunc);
},
unregisterVoiceCMD: function () {
return window.chrome.webview.hostObjects.webBrowserObj.UnRegisterCmdRecognition();
},
openQRCode: function (obj) {
return window.chrome.webview.hostObjects.webBrowserObj.OpenQRCode(obj.callback);
},
closeQRCode: function () {
return window.chrome.webview.hostObjects.webBrowserObj.CloseQRCode();
},
startRFIDRead: function (obj) {
return window.chrome.webview.hostObjects.webBrowserObj.StartRFIDRead(obj.code, obj.callback);
},
closeRFID: function () {
return window.chrome.webview.hostObjects.webBrowserObj.closeRFID();
},
printFile: function (obj) {
return window.chrome.webview.hostObjects.webBrowserObj.PrintFile(obj.filetype, obj.base64, obj.remoteprintname, obj.replyvoice, obj.callback);
},
closeExternalApp: function (obj) {
return window.chrome.webview.hostObjects.sync.webBrowserObj.CloseForm(obj.mode);
},
getUserInfo: function (obj) {
window.chrome.webview.hostObjects.webBrowserObj.GetUserInfo(obj.callback);
},
showMasks: function (obj) {
return window.chrome.webview.hostObjects.webBrowserObj.ShowMasks(obj.isOpen);
},
showMessage: function (obj) {
return window.chrome.webview.hostObjects.webBrowserObj.ShowMessage(obj.isOpen, obj.content, obj.isAutoClose);
},
showConfirmMessage: function (obj) {
return window.chrome.webview.hostObjects.webBrowserObj.ShowConfirmMessage(obj.isOpen, obj.content, obj.isAutoClose, obj.callback);
},
openKeyBoard: function (obj) {
return window.chrome.webview.hostObjects.webBrowserObj.OpenKeyBoard(obj.oldContent, obj.type);
},
closeKeyBoard: function (obj) {
return window.chrome.webview.hostObjects.webBrowserObj.CloseKeyBoard();
},
openIdentification: function (obj) {
return window.chrome.webview.hostObjects.webBrowserObj.OpenIdentification(obj.callback);
},
openWebSearch: function (obj) {
return window.chrome.webview.hostObjects.webBrowserObj.OpenWebSearch(obj.keywords);
},
closeForm: function (obj) {
return window.chrome.webview.hostObjects.webBrowserObj.CloseForm(obj.mode);
},
animationEnum: {
"": 0,
"打招呼": 1,
"右单手展示": 2
},
voiceInstruct: {
"": 0,
"停止": 1,
"人脸识别": 3,
"刷身份证": 4
},
lightType: {
"Ambient": 12,
"Scan": 11,
"RQCode": 17,
"A4": 15,
"IDCard": 16,
"Fingerprint": 18
},
lightStatus: {
"Close": 0,
"Open": 1,
"Flicker1": 2,
"Flicker05": 3,
"Flicker2": 4,
},
flieType: {
"doc": "doc",
"pdf": "pdf"
}
}
<template>
<div id="app" class="wrap">
<router-view></router-view>
</div>
</template>
<style>
html,body,#app {
text-align: center;
color: #2c3e50;
height:100%;
width: 1280px;
position: fixed;
top: 0px;
left: 0px;
/* margin: 0px auto; */
}
</style>
<script type="text/javascript">
window.onload = function () {
// 禁用双指缩放
document.documentElement.addEventListener('touchstart', function (event) {
if (event.touches.length > 1) {
event.preventDefault();
}
}, {
passive: false
});
var lastTouchEnd = 0;
document.documentElement.addEventListener('touchend', function (event) {
var now = Date.now();
if (now - lastTouchEnd <= 300) {
event.preventDefault();
}
lastTouchEnd = now;
}, {
passive: false
});
}
</script>
function genUserId(len) {
len = len || 32;
var t = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefhjkmnpqrstuvwxyz0123456789",
a = t.length,
n = "";
for (i = 0; i < len; i++) n += t.charAt(Math.floor(Math.random() * a));
return n
}
//随机生成办件流水批次号
function genRanNo(len){
var num = "";
len = len || 5;
var date = new Date();
for (var i = 0; i < len; i++) {
num += Math.floor(Math.random() * 10);
}
return date.getFullYear().toString() + (date.getMonth() + 1).toString() +
date.getDate().toString() + date.getHours().toString() + date.getMinutes().toString()
+ date.getSeconds().toString() + date.getMilliseconds().toString() + num;
}
//获取当天日期
function getNowDate(){
var date = new Date();
return date.getFullYear() +'' + (date.getMonth() + 1) + '' + date.getDate() + '';
}
//预审资源文件转base64
function getBase64(imgUrl) {
var base64;
window.URL = window.URL || window.webkitURL;
var xhr = new XMLHttpRequest();
xhr.open("get", imgUrl, true);
xhr.responseType = "blob";
xhr.onload = function(){
if(this.status == 200){
//得到一个blob对象
var blob = this.response;
// 至关重要
let oFileReader = new FileReader();
oFileReader.onloadend = function(e){
// 此处拿到的已经是base64的图片了,可以赋值做相应的处理
base64 = e.target.result;
base64 = base64.replace(/^data:\w+\/\w+;base64,/, "");
}
oFileReader.readAsDataURL(blob);
}
}
xhr.send();
return base64;
}
module.exports = {
genUserId,
genRanNo,
getNowDate,
getBase64
}
var socket;
var time;
var userId = "";
function openClick(formUserId) {
userId = formUserId;
connection(userId);
}
function closeClick() {
if (socket) {
socket.close();
}
}
function connection(fromUserId) {
console.log("connection()");
var url = window.config.webSocketUrl + fromUserId;
console.log(url);
//判断当前浏览器是否支持WebSocket
if (window.WebSocket) {
socket = new WebSocket(url);
} else {
alert('当前浏览器不支持webSocket')
}
//连接发生错误的回调方法
socket.onerror = function() {
console.log("error...");
reconnection();
};
//连接成功建立的回调方法
socket.onopen = function() {
console.log("onopen()");
//heartCheck.reset().start(); // 成功建立连接后,重置心跳检测
}
//接收到消息的回调方法
socket.onmessage = function(event) {
console.log("onmessage>>>>>>" + event.data);
//heartCheck.reset().start(); // 如果获取到消息,说明连接是正常的,重置心跳检测
if (event.data === "") return;
var data = JSON.parse(event.data);
window.receiveMsg(data);
}
//连接关闭的回调方法
socket.onclose = function() {
console.log("onclose()");
reconnection();
}
}
//重连
function reconnection() {
//与服务器连接成功
if (socket && socket.readyState == 1) {
clearTimeout(time);
} else {
//已经关闭链接,则重新连接
if (socket && socket.readyState == 3) {
connection(userId);
}
//0正在服务器建立连接,2正在关闭与服务器的连接
time = setTimeout(function() {
reconnection();
}, 1000);
}
}
module.exports = {
openClick: openClick,
closeClick: closeClick,
connection: connection,
reconnection: reconnection
}
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<count-down times=300 bottomOffset="10" rightOffset="10" fontSize="18" ref="child"></count-down>
<lay-button type="primary" @click="updateTimes">修改倒计时</lay-button>
<lay-button type="primary" @click="toMaterial">办件资料</lay-button>
<lay-button type="danger" @click="toSummary">办事指南</lay-button>
<lay-button type="warm" @click="toScanMaterial">资料扫描</lay-button>
<lay-button type="warm" @click="toAuditing">资料审核中</lay-button>
<lay-button type="danger" @click="toReport">预审报告</lay-button>
<lay-button type="danger" @click="toInformation">资料袋</lay-button>
<lay-button type="danger" @click="getBase64">获取base64</lay-button>
<lay-button type="danger" @click="towWorkGuide">办事指南打印word</lay-button>
<lay-button type="danger" @click="towinquiryUnemployment">询问失业原因</lay-button>
<lay-button type="danger" @click="toCopyApply">复印</lay-button>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>
<a href="/about" >About</a>
</p>
<h3>Installed CLI Plugins</h3>
<ul>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-router" target="_blank" rel="noopener">router</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-vuex" target="_blank" rel="noopener">vuex</a></li>
</ul>
<h3>Essential Links</h3>
<ul>
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
</ul>
<h3>Ecosystem</h3>
<ul>
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
</ul>
</div>
</template>
<script>
import commonUtil from '../assets/js/commonUtil';
export default {
name: 'HelloWorld',
props: {
msg: String
},
data() {
return {
msg: '',
// caseData:{
// serviceId : 'S100015',
// projectId : '8160180',
// projectName : '失业保险金申领(测试使用)',
// name : '李超',
// mobile : '17607199997',
// idcard : '421023199403230439',
// fileData : [
// {"fileId":"90c55d4d13df4ed8986e85d20fcdb080","name": "失业证明", "fileUrl":"http://192.168.2.78:9999/group1/M00/00/4C/wKgCTmMoMdmANqGiAASVi8vfksA467.jpg","artificialType":"1","type":"01"},
// {"fileId":"c02ae780d12c4dd0965a0c620efe8623","name": "身份证银行卡复印件", "fileUrl":"http://192.168.2.78:9999/group1/M00/00/4C/wKgCTmMoMbiAc6p9AAQwkKu2NnA683.jpg","artificialType":"2","type":"03,08"},
// {"fileId":"6e3c720196214eabbd9b7c5aea02da31","name": "申请表", "fileUrl":"http://192.168.2.78:9999/group1/M00/00/4C/wKgCTmMoLmmAGG6aAAicN5-8HPA709.jpg","artificialType":"3","type":"02"}
// ]
// }
caseData:{
serviceId : 'S100309',
projectId : '8530863',
projectName : '公共卫生许可证新办(武昌)',
name : '李超',
mobile : '17607199997',
idcard : '421023199403230439',
fileData : [
{"fileId":"9fd65af02ba646b99f2f49f7b9654d7d","name": "身份证", "fileUrl":"https://robot.egovrobot.com/group1/M00/00/03/O6-UHmOpUr-ABeq1AAJoVVIm0m8826.jpg","artificialType":"0","type":"01"},
{"fileId":"90af13b60ba34f85ac44707b8c02d1e3","name": "营业执照", "fileUrl":"https://robot.egovrobot.com/group1/M00/00/03/O6-UHmOpUrCAD3UIAAYnjhDqQ2A589.jpg","artificialType":"0","type":"03,08"}
]
}
}
},
created() {
var ychy = this.$route.query.ychy;
if(ychy != null){
this.getAllCaseInfo();
this.$router.push({ path: '/information' });
}
},
methods:{
toMaterial() {
this.$router.push({ path: '/material' , query: {projectId: '8592554'}});
// this.$router.push({ name: 'material' , params: {projectId: '8160561'}});//8160561
},
toSummary() {
this.$router.push({ path: '/summary' , query: {projectId: '6781754'}});
},
toScanMaterial() {
this.$router.push({ path: '/scanMaterial' , query: {projectId: '6781754'}});
},
toAuditing() {
this.$LocalStorage.SessionPut("caseData", this.caseData);
this.$router.push({ path: '/auditing'});
},
toReport() {
this.$router.push({ path: '/report' , query: {projectId: '8160561'}});
},
towWorkGuide() {
this.$router.push({ path: '/workGuide'});
},
towinquiryUnemployment() {
this.$router.push({ path: '/inquiryUnemployment'});
},
toInformation() {
this.$router.push({ path: '/information' });
},
toCopyApply() {
this.$router.push({ path: '/copyList' });
},
getBase64() {
var url = "http://192.168.2.180:8099/lilo/aiCase/casePdfPrint?fileUrl=group1/M00/00/51/wKgCTmMsAlaATMY4AABxw8Q2YTg310.pdf&batchId=202292214355711268686";
url = encodeURIComponent(url);
$.ajax({
type: "get",
url: 'http://192.168.2.180:8099/lilo/aiCase/base64TransToFile',
async: false, //改为同步请求
data: {fileUrl: url, flag: true},
success: function (data) {
debugger;
if (data.success) {
console.log(data.obj);
console.log(data.msg);
} else {
alert(data.msg);
}
}, error: function () {
debugger;
alert(data.msg);
}
})
//var base = commonUtil.getBase64(url);
},
getAllCaseInfo() {
var _this = this;
$.ajax({
type: "get",
url: 'https://api.egovrobot.com/lilo/aiCase/getAllCaseInfo',
async: false, //改为同步请求
data: {batchId: '20221010155458756625'},
success: function (data) {
if (data.success) {
var caseInfo = data.obj.caseInfo;
//this.$LocalStorage.SessionGet("caseData");
var caseData = {};
caseData.totalNum = caseInfo.fileData.length;
caseData.projectId = caseInfo.projectId;
caseData.batchId = caseInfo.batchId;
caseData.serviceId = caseInfo.serviceId;
caseData.projectName = caseInfo.serviceId;
caseData.enterpriseId = caseInfo.enterpriseId;
_this.$LocalStorage.SessionPut("caseData", caseData);
} else {
alert(data.msg);
}
}, error: function () {
debugger;
alert(data.msg);
}
})
//var base = commonUtil.getBase64(url);
},
showMsg() {
alert("倒计时完成");
},
updateTimes(){
this.$refs.child.counter=20; //修改子组件data
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42ff83;
}
</style>
<template>
<div :style="styleObject">
自动退出倒计时:{{ counter }}
</div>
</template>
<script>
export default {
props: {
times: {
type: String, //类型
default: 300, //设置默认值
},
bottomOffset: {
type: String, //类型
default: '10', //设置默认值
},
rightOffset: {
type: String, //类型
default: '10', //设置默认值
},
fontSize: {
type: String, //类型
default: '18', //设置默认值
}
},
data() {
return {
acceptHandler: '',
counter: this.times,
styleObject: {
position: "absolute",
bottom: this.bottomOffset + 'px',
right: this.rightOffset + 'px',
color: "rgb(156 223 247)",
fontSize: this.fontSize + 'px',
}
}
},
created() {
clearInterval(this.acceptHandler);
this.init();
},
methods:{
init() {
var _this = this;
this.acceptHandler = setInterval(function(){
_this.counter--;
if(_this.counter == 0){
clearInterval(_this.acceptHandler);
_this.$router.push({ path: '/errorPage' , query: {msg: '操作超时,系统将返回到咨询页面!'}});
}
},1000);
}
},
unmounted(){
if (this.acceptHandler) {
clearInterval(this.acceptHandler);
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>
<template>
<div class="self-container" >
<iframe v-show="!show" width="98%" id="iframe" height="96%" :src="pageUrl"></iframe>
<div v-show="openCount">
<count-down times=36000 bottomOffset="0" rightOffset="10" fontSize="16" ref="child"></count-down>
</div>
<div v-show="show" style="width: 100%; height: 100%;">
<div class="gif" :style="{top: position + '%' }" v-show="showTip">
<img :src="imgSrc" style="border-radius: 35px;">
</div>
<div class="print" v-show="showTip">
{{ tips }}
</div>
</div>
</div>
</template>
<script>
import { layer } from "@layui/layer-vue";
import websocket from '../assets/js/websocket';
import waitGit from '../assets/images/wait.gif';
import printGit from '../assets/images/print.gif';
import icoOK from '../assets/images/ico/ico_ok.png';
var _this;
export default {
data() {
return {
pageUrl: '',
batchId: '',
show: false,
windowName: '',
tips: '',
showTip: false,
imgSrc: '',
position: 0,
openCount: false,
callbackMethod: '' //打印页面回调方法
}
},
created() {
var caseData = this.$LocalStorage.SessionGet("caseData");
this.batchId = caseData.batchId;
this.pageUrl = caseData.pageUrl;
this.init(caseData);
},
mounted () {
// 将Vue方法传到全局对象window中
window.receiveMsg = this.receiveMsg;
window.printReport = this.printReport;
window.printSuccess = this.printSuccess;
window.printError = this.printError;
window.playAudio = this.playAudio;
window.printCallback = this.printCallback;
window.IDCardCallback = this.IDCardCallback;
_this = this;
},
methods:{
init(caseData) {
this.$nextTick(() => {
//获取iframe元素
const iframe = document.getElementById("iframe");
iframe.onload = function (e) {
//推送数据到表单页面
iframe.contentWindow.postMessage({
action: "init",
result: caseData
}, "*");
}
});
},
//接收websocket消息,rpa回调
receiveMsg(obj){
layer.closeAll('loading');
var success = eval(obj.success);
if(success){
this.openCount = true;
this.$refs.child.counter= 300;
this.showTip = true;
var rpa = obj.rpaCallBackData;
if(rpa != null){
this.tips = '请稍等,正在为您远程打印证照!';
this.imgSrc = printGit;
this.position = 20;
var base64 = rpa.printData;
var remotePrintName = rpa.remotePrintName;
this.windowName = rpa.windowName;
if(robotType){
robotsdk.printFile({
filetype: 'doc',
base64: base64,
remoteprintname: remotePrintName,
replyvoice: '请稍等,正在为您远程打印证照!',
callback: "printReport"
});
}
} else {
this.tips = '后台已办理完成,请继续后续流程!';
this.imgSrc = icoOK;
this.position = 30;
if(robotType){
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: '后台办理完成,请继续后续流程',
callback: "playAudio"
});
}
}
} else {
this.$router.push({ path: '/errorPage'});
}
},
printReport(obj){
if (obj) {
this.tips = '您的证照已打印,请到'+ this.windowName + '领取!';
this.imgSrc = icoOK;
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: '您的证照已打印,请到'+ this.windowName + '领取!',
callback: "printSuccess"
});
} else {
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: '暂不能为您打印证照!给您带来不便,请谅解!',
callback: "printError"
});
}
},
//打印证照成功,跳转资料袋装袋页面
printSuccess(){
this.$router.push({ path: '/information'});
},
//打印证照失败,跳转错误提示页面
printError(){
this.$router.push({ path: '/errorPage'});
},
//rpa完成
playAudio(){
this.$router.push({ path: '/information'});
},
printCallback(bool){
//获取iframe元素
const iframe = document.getElementById("iframe");
//推送数据到表单页面
iframe.contentWindow.postMessage({
action: "printCallback",
result: {
'bool': bool,
'callbackMethod': this.callbackMethod
}
}, "*");
},
IDCardCallback(json){
//获取iframe元素
const iframe = document.getElementById("iframe");
//推送数据到表单页面
iframe.contentWindow.postMessage({
action: "IDCardCallback",
result: {
'json': json
}
}, "*");
}
}
}
//接收表单页面按钮点击事件(rpa响应结果)
/*{
"success": 1,
"msg": "",
"waittime": 1
}
success:0是成功,1加入队列(抓取上一次流程时间,乘以目前排队条数),2失败
msg:执行情况说明,如success为1时,可以返回msg为加入队列成功;如success为0时,可以返回msg执行失败原因
waittime:预估等待时长,单位秒;当success为0或2时,可以没有waittime或waittime为0;当success为1时,计算RPA流程处理需要等待的预估时间*/
window.addEventListener("message", message => {
var data = message.data;
if('next' == data.action){
var result = data.result;
var success = result.success;
if('0' == success || '1' == success){
//转圈圈等待
websocket.openClick(_this.batchId);
//layer.load();
_this.openCount = true;
_this.$refs.child.counter= result.waittime + 30; //修改子组件data
_this.show = true;
_this.showTip = true;
_this.tips = "后台正在为您办理中,请稍等!";
_this.imgSrc = waitGit;
_this.position = 30;
if(robotType){
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: '后台正在为您办理中,请稍等',
callback: ""
});
}
} else {
//跳转到错误页面提示
_this.$router.push({ path: '/errorPage'});
}
}else if ('evaluation' == data.action){//跳评价页面
_this.$router.push({ path: '/evaluation'});
} else if ('information' == data.action){//跳资料袋页面
var caseData = _this.$LocalStorage.SessionGet("caseData");
if (data.result!=null && data.result!="" && data.result!=undefined){
var result = data.result;
caseData.lastNum = result.lastNum;
}
_this.$LocalStorage.SessionPut("caseData", caseData);
_this.$router.push({ path: '/information'});
} else if('closeExternalApp' == data.action){//退出到咨询页面
robotsdk.closeExternalApp({
mode:0
});
} else if ('playAudio' == data.action){//语音播报
var result = data.result;
var videocontent = result.videocontent;
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: videocontent,
callback: ""
});
} else if ('openKeyBoard' == data.action){//打开键盘
robotsdk.openKeyBoard({
oldContent: "",
type: "",
})
} else if ('closeKeyBoard' == data.action){//关闭键盘
robotsdk.closeKeyBoard();
} else if ('printFile' == data.action){//打印
var result = data.result;
var base64Byte = result.base64Byte;
var remoteprintname = result.remoteprintname;
var replyvoice = result.replyvoice;
_this.callbackMethod = result.callbackMethod;//打印页面回调方法
robotsdk.printFile({
filetype: "doc", //文件类型
base64: base64Byte, //文件内容base64字符串
remoteprintname: remoteprintname, //远程打印机名称
replyvoice: replyvoice, //打印提示语音
callback: "printCallback" //接口回调函数
})
}else if ('readIDCard' == data.action){//读取身份证
var result = data.result;
var remindvoice = result.remindvoice;
robotsdk.readIDCard({
remindvoice: remindvoice, //播放的声音内容
callback: "IDCardCallback" //接口回调函数
})
}
})
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.self-container {
background-image: url('../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow: auto;
height: 100%;
padding: 0;
margin: 0;
}
.print{
color: #ffffffc9;
font-size: 24px;
position: absolute;
bottom: 30%;
left: 50%;
transform: translate(-50%, -50%);
}
.gif {
position: relative;
padding: 0;
margin: 0;
}
</style>
<template>
<div class="self-container">
<div class="img"></div>
<div class="tips">
{{msg}}
</div>
</div>
</template>
<script>
export default {
data() {
return {
msg: '因网络波动暂时无法办理,请到人工收件窗口办理!'
}
},
created() {
if(this.$route.query.msg != null){
this.msg = this.$route.query.msg;
}
this.init();
},
mounted () {
// 将Vue方法传到全局对象window中
window.playAudioCallback = this.playAudioCallback;
},
methods:{
init() {
if(robotType){
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: this.msg,
callback: "playAudioCallback"
});
}
},
playAudioCallback(){
//跳转到咨询页面
robotsdk.closeExternalApp({
mode:0
});
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.self-container {
background-image: url('../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow: auto;
height: 100%;
padding: 0;
margin: 0;
}
.img {
background-image: url('../assets/images/ico/ico_warn.png');
background-repeat: no-repeat;
overflow: auto;
width: 204px;
height: 184px;
position: absolute;
top: 48%;
left: 50%;
transform: translate(-50%, -50%);
}
.tips{
width: 100%;
color: #ffffffc9;
font-size: 24px;
position: absolute;
bottom: 27%;
left: 50%;
transform: translate(-50%, -50%);
}
</style>
<template>
</template>
<script>
export default {
data() {
return {
cmdDataCallback:{//注册语音命令
cmdDataFunc: "CmdDataCallback",//命令回调函数名
},
};
},
created() {
if (robotType&&window.config.isRegisterVoice){
window.config.isRegisterVoice=false;
this.registerVoiceCMD()//注册语音
}
//将方法绑定到window下面,提供给外部调用
window.CmdDataCallback = (res)=> this.CmdDataCallback(res);//注册语音
},
methods: {
//注册语音
registerVoiceCMD(){
robotsdk.registerVoiceCMD(this.cmdDataCallback);//虚拟人物播放语音及动作
},
//语音回调
CmdDataCallback(res){
if (res=="scanning"){//扫描
this.$emit('bPageLoaded',"scanning");
}
if (res=="nextStep"){//下一步
this.$emit('bPageLoaded', "nextStep");
}
if (res=="quit"){//退出
this.$emit('bPageLoaded', "quit");
}
},
},
};
</script>
<style scoped>
</style>
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import axios from 'axios'
import VueAxios from 'vue-axios'
import Layui from '@layui/layui-vue'
import '@layui/layui-vue/lib/index.css'
import 'bootstrap/dist/css/bootstrap.min.css'
import 'bootstrap/dist/js/bootstrap.min.js'
import ElementPlus from 'element-plus';
import 'element-plus/theme-chalk/index.css';
import locale from 'element-plus/lib/locale/lang/zh-cn';
import localStorage from './plugins/good-storage';
import countDown from './components/countDown';
// import './assets/all.css'
// import 'jquery/dist/jquery.min.js'
// import layer from '@layui/layer-vue';
// import '@layui/layer-vue/lib/index.css';
// import './static/ajax/libs/layer/theme/default/layer.css'
// import './static/ajax/libs/layer/layer.min.js'
// axios.defaults.baseURL = '/api';
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
// axios.defaults.timeout = 60000;
const app = createApp(App);//建立一个vue3app
app.use(router);
app.use(VueAxios, axios);
app.use(Layui);
app.use(ElementPlus, { locale });
// app.use(layer);
app.mount('#app');//将这个vue3app全局挂载到#app元素上
app.component('count-down', countDown);//全局倒计时组件
//axios 关联到vue实例对象的全局属性中
app.config.globalProperties.$axios=axios;
app.config.globalProperties.$LocalStorage=localStorage;
\ No newline at end of file
import Storage from 'good-storage'
const localStorage = {
CookiesPut: function (key, value) {
return Storage.set(key, value)
},
CookiesGet: function (key) {
return Storage.get(key)
},
CookiesClear: function () {
return Storage.clear()
},
CookiesRemove: function (key) {
return Storage.remove(key)
},
SessionPut: function (key, value) {
return Storage.session.set(key, value)
},
SessionGet: function (key) {
return Storage.session.get(key)
},
SessionClear: function () {
return Storage.session.clear()
},
SessionRemove: function (key) {
return Storage.session.remove(key)
}
}
export default localStorage;
\ No newline at end of file
import {createRouter, createWebHashHistory, createWebHistory} from 'vue-router'
import HomeView from '../views/HomeView.vue'
const routes = [
{
path: '/',
name: 'home',
describe: '主页',
component: HomeView
},
{
path: '/about',
name: 'about',
describe: '样例页面',
component: () => import('../views/AboutView.vue')
},
{
path: '/summary',
name: 'summary',
describe: '办事指南',
component: () => import('../views/summary.vue')
},
{
path: '/material',
name: 'material',
describe: '材料列表',
component: () => import('../views/material.vue')
},
{
path: '/materialRead',
name: 'materialRead',
describe: 'materialRead',
component: () => import('../views/materialRead.vue')
},
{
path: '/scanMaterial',
name: 'scanMaterial',
describe: '资料扫描',
component: () => import('../views/scanMaterial.vue'),
},
{
path: '/auditing',
name: 'auditing',
describe: '资料审核中',
component: () => import('../views/auditing.vue')
},
{
path: '/printReport',
name: 'printReport',
describe: '打印预审报告',
component: () => import('../views/printReport.vue')
},
{
path: '/auditTips',
name: 'auditTips',
describe: '预审报告提示页面',
component: () => import('../views/auditTips.vue')
},
{
path: '/report',
name: 'report',
describe: '显示预审报告',
component: () => import('../views/report.vue')
},
{
path: '/information',
name: 'information',
describe: '资料袋装袋',
component: () => import('../views/information.vue')
},
{
path: '/evaluation',
name: 'evaluation',
describe: '评价页面',
component: () => import('../views/evaluation.vue')
},
{
path: '/evaluationDetail',
name: 'evaluationDetail',
describe: '评价详情选项页面',
component: () => import('../views/evaluationDetail.vue')
},
{
path: '/scanMaterialLook',
name: 'scanMaterialLook',
describe: '图片查看页面',
component: () => import('../views/scanMaterialLook.vue')
},
{
path: '/scanMaterialLoad',
name: 'scanMaterialLoad',
describe: '图片查看页面子页面',
component: () => import('../views/scanMaterialLoad.vue')
},
{
path: '/remoteCheck',
name: 'remoteCheck',
describe: '远程核验二维码扫描页面',
component: () => import('../views/remoteCheck.vue')
},
{
path: '/userSelect',
name: 'userSelect',
describe: '身份确认选择页面',
component: () => import('../views/userSelect.vue')
},
{
path: '/userCard',
name: 'userCard',
describe: '手持身份证照片页面',
component: () => import('../views/userCard.vue')
},
{
path: '/userCopies',
name: 'userCopies',
describe: '法人+委托书原件或复印件页面',
component: () => import('../views/userCopies.vue')
},
{
path: '/userScanMaterial',
name: 'userScanMaterial',
describe: '身份扫描材料页面',
component: () => import('../views/userScanMaterial.vue')
},
{
path: '/dataView',
name: 'dataView',
describe: '表单页面',
component: () => import('../components/dataView.vue')
},
{
path: '/errorPage',
name: 'errorPage',
describe: '统一错误页面',
component: () => import('../components/errorPage.vue')
},
{
path: '/print',
name: 'print',
describe: '统一打印页面',
component: () => import('../views/print.vue')
},
{
path: '/workGuide',
name: 'workGuide',
describe: '办事指南处打印word',
component: () => import('../views/workGuide.vue')
},
{
path: '/inquiryUnemployment',
name: 'inquiryUnemployment',
describe: '询问失业原因',
component: () => import('../views/inquiryUnemployment.vue')
},
{
path: '/copyIdcardApply',
name: 'copyIdcardApply',
describe: '身份证复印',
component: () => import('../views/Apply/copyIdcardApply.vue')
},
{
path: '/copyBusinessApply',
name: 'copyBusinessApply',
describe: '营业执照复印',
component: () => import('../views/Apply/copyBusinessApply.vue')
},
{
path: '/copyOtherApply',
name: 'copyOtherApply',
describe: '其他复印',
component: () => import('../views/Apply/copyOtherApply.vue')
},
{
path: '/copyList',
name: 'copyList',
describe: '复印列表',
component: () => import('../views/Apply/copyList.vue')
},{
path: '/formList',
name: 'formList',
describe: '表单列表',
component: () => import('../views/Apply/formList.vue')
},
{
path: '/fillScanMaterial',
name: 'fillScanMaterial',
describe: '填报通用扫描材料页面',
component: () => import('../views/Apply/fillScanMaterial.vue')
},
{
path: '/iframePage',
name: 'iframePage',
describe: '嵌套表单',
component: () => import('../views/Apply/iframePage.vue')
},
{
path: '/contractScan',
name: 'contractScan',
describe: '不动产合同扫描材料页面',
component: () => import('../views/Apply/contractScan.vue')
}
]
const router = createRouter({
//History,路径不带#号,http://roboth5.egovrobot.com/workGuide
// history: createWebHistory(),
//hash模式,路径带#号,http://roboth5.egovrobot.com/#/workGuide
history: createWebHashHistory(),
routes
})
export default router
<template>
<div style="overflow: scroll;">
<h1>This is an about page</h1>
<button @click="axiosTest()">test axios 请求数据</button><br><br>
<button @click="ajaxTest()">ajax 请求数据</button>
<p>这是请求到的数据{{msg}}</p>
<br>
<!-- layui测试 -->
<lay-button type="primary">原始按钮</lay-button>
<lay-button>默认按钮</lay-button>
<lay-button type="normal">百搭按钮</lay-button>
<lay-button type="warm">暖色按钮</lay-button>
<lay-button type="danger">警告按钮</lay-button>
<br><br>
<div class="hello">
<button type="button" class="btn btn-primary" @click="clickMsg" style="margin-left: 20px;">消息框</button>
<button type="button" class="btn btn-primary" @click="clickConfirm" style="margin-left: 20px;">确认框</button>
<button type="button" class="btn btn-primary" @click="clickOpen" style="margin-left: 20px;">指定尺寸框</button>
<button type="button" class="btn btn-primary" @dblclick="dblclickTest" style="margin-left: 20px;">双击测试</button>
</div>
<br><br>
<div class="Select">
<el-select v-model="msg" filterable placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
<br><br>
<div class="hello">
<button type="button" class="btn btn-info" @click="clickCancl">返回</button>
</div>
</div>
</template>
<script>
import { layer } from "@layui/layer-vue";
export default{
setup() {
const options = [
{
value: "上海市",
label: "上海市",
},
{
value: "杭州市",
label: "杭州市",
},
{
value: "北京市",
label: "北京市",
},
{
value: "天津市",
label: "天津市",
},
{
value: "重庆市",
label: "重庆市",
},
];
return {
options
};
},
data() {
return {
msg: ''
}
},
methods:{
axiosTest() {
// console.log(this.$axios);
this.$axios.post('http://localhost:8098/lilo/test1', {
params: {
aaa: '123',
bbb: '啊啊啊',
ccc: 'YanJie'
}
}).then(item => {
if (item.data.success) {
console.log(item);
this.msg = item.data.msg + ' axios';
}
}).catch(err => {
this.msg = '错误';
})
},
ajaxTest() {
// console.log(jQuery);
$.post('http://localhost:8098/lilo/test', {
aaa: '123',
bbb: '啊啊啊',
ccc: 'YanJie'
}).then(item => {
console.log(item);
if (item.status == '200') {
this.msg = item.msg + ' ajax';
}
})
},
clickMsg() {
layer.msg('成功消息', { time: 1000, icon: 1 });
},
clickConfirm() {
layer.confirm('欢迎来到小易力龙智能预审机器人的世界',{icon:1});
},
clickOpen() {
layer.open({
type: 4,// 4弹出content内容,2弹出url页面
area: ['640px', '480px'],
fix: false,
//不固定
maxmin: true,
shade: 0.3,
title: '提示',
content: '欢迎来到小易力龙智能预审机器人的世界'
});
},
dblclickTest() {
layer.msg('警告消息', { time: 1000, icon: 3 })
},
clickTest() {
// layer.open({title:"标题", content: "内容"});
// layer.msg('普通消息', { time: 1000 })
// layer.msg('成功消息', { time: 1000, icon: 1 })
// layer.msg('失败消息', { time: 1000, icon: 2 })
// layer.msg('警告消息', { time: 1000, icon: 3 })
// layer.msg('疑问消息', { time: 1000, icon: 4 })
layer.confirm('确认框')
// layer.confirm('询问框', {
// btn: [
// {
// text: '站着看',
// callback: function (id) {
// layer.close(id)
// },
// },
// {
// text: '坐着看',
// callback: function (id) {
// layer.close(id)
// },
// },
// ],
// })
// layer.close(index);
},
clickCancl() {
this.$router.go(-1);
}
}
}
</script>
<template>
<b-page @bPageLoaded="voiceCallback"></b-page>
<count-down times=300 bottomOffset="30" rightOffset="10" fontSize="30" ref="child"></count-down>
<div class="scanMaterial" style="height:100%">
<!-- 左区域 -->
<div class="left">
<div class="example"></div>
<div style="padding-right: 1%;padding-top: 32px;">
<!-- 取消按钮 -->
<img class="imgButton" v-if="!scanBtnIsShow" src="../../assets/images/btn/backGray.png">
<img class="imgButton" v-if="scanBtnIsShow" @click="back" src="../../assets/images/btn/btnCancel.png">&nbsp;&nbsp;
<!-- 扫描按钮 -->
<img class="imgButton" v-if="!scanBtnIsShow" src="../../assets/images/btn/scanGray.png">
<img class="imgButton" v-if="scanBtnIsShow" @click="scanBtn" src="../../assets/images/btn/btnScan.png">&nbsp;&nbsp;
<!-- 下一步按钮 -->
<img class="imgButton" v-if="!isBtnNextShow" src="../../assets/images/btn/btnNext_Not.png">
<img class="imgButton" v-if="isBtnNextShow" @click="nextStep" src="../../assets/images/btn/btnNext.png">
</div>
</div>
<!-- 图片区域 -->
<div class="imgList">
<div class="imgBetween" v-for="(material, index) in materialList">
<img class="imgSize" v-if="material.fileUrl!=''" :src="material.fileUrl">
<div class="fileName" v-if="material.fileUrl!=''" >
{{material.name}}<span v-if="material.isMust==1" style="color: red">(必要材料)</span>
</div>
<div class="fileName" v-if="material.fileUrl==''" style="width: 74%;padding-left: 28%;color: #FFFFFF;padding-top: 22%;">
{{material.name}}<span v-if="material.isMust==1" style="color: red">(必要材料)</span>
</div>
</div>
</div>
<!-- 删除按钮 -->
<div class="imgDel">
<div class="imgDelBetween" v-for="(del, index) in imgDelList">
<img @click="delImg(index,del.fileId)" v-if="del.name==''">
<img @click="delImg(index,del.fileId)" v-if="del.name!=''" :src="del.imgSrc">
</div>
</div>
<!-- 图片上一页 -->
<div class="btnUp">
<img src="../../assets/images/btn/btnLeft2.png">
</div>
<div class="btnUp" v-if="curPage!=1">
<img @click="imgUp" src="../../assets/images/btn/btnLeft.png">
</div>
<!-- 图片下一页 -->
<div class="btnNext" >
<img src="../../assets/images/btn/btnRight2.png">
</div>
<div class="btnNext" v-if="materials.length>(curPage*num)">
<img @click="imgNext" src="../../assets/images/btn/btnRight.png">
</div>
<!-- 图片框 -->
<div class="right">
<div class="rightFrame" v-for="(freme, index) in imgFrames">
<img class="imgFrame" :src="freme.imgSrc">
</div>
</div>
</div>
</template>
<script>
import BPage from "@/components/registerVoice";
export default{
components: {
BPage,
},
data() {
return {
formIndex:0,//表列表下标
isOpenHighCamera:true,//是否打开高拍仪
scanType:'',//委托人身份代办类型
curPage: 1,//当前页码
num: 5,//每页展示数量
materials: [],//材料集合
materialList:[],//当前页面图片展示
imgDel:[],//删除按钮集合
imgDelList:[],//当前页面删除按钮展示
scanBtnIsShow:false,//控制取消,扫描按钮是否显示
isBtnNextShow:false,//控制下一步按钮是否亮起
serviceId: '',//机器人ID
projectName:'',//事项名称
isRepetition:false,//是否重复材料
type:0,//0:默认不覆盖,1:覆盖不动产,2:覆盖身份证,3:只删除当前上传材料
temporary:[],//临时集合,用于是否覆盖材料使用
imgFrames:[],//图片框集合
propertyList:[],//不动产集合
identityList:[],//身份证扫描之后集合
idCardList:[],//最终跳转表单所传递的集合
manyCount:0,//重复材料数量
addIndex:-1,//添加材料坐标
highCameraParameter:{//高拍仪参数
x: 68,//预览界面x坐标
y: 47,//预览界面y坐标
width: 900,//预览界面宽度
height: 676,//预览界面高度
},
voiceParameter:{//语音播放参数
cmd: "cmd",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent: "请您根据扫描要求,逐页将资料放置到材料识别区。",//语音内容
callback: "PlayAudioCallback"//接口回调函数
},
userInfoParameter:{//办事人信息
callback: "getUserInfo"
},
highCameraImgParameter:{//获取高拍仪照片
callback: "HighCameraCallback"
},
count:0,
}
},
created() {
this.formIndex = this.$route.query.formIndex;
//初始化右区域图片框,材料名称,删除图标
this.materials.push({'name':'不动产证','fileUrl':'','fileId':'','type':'','isMust':'1','jsonData':''});
this.materials.push({'name':'身份证','fileUrl':'','fileId':'','type':''});
this.imgDel.push({'name':'','imgSrc':require('../../assets/images/ico/delete.png')});
this.imgDel.push({'name':'','imgSrc':require('../../assets/images/ico/delete.png')});
this.imgFrames.push({'imgSrc':require('../../assets/images/filebox.png')});
this.imgFrames.push({'imgSrc':require('../../assets/images/filebox.png')});
this.imgFrames.push({'imgSrc':require('../../assets/images/filebox.png')});
this.imgFrames.push({'imgSrc':require('../../assets/images/filebox.png')});
this.imgFrames.push({'imgSrc':require('../../assets/images/filebox.png')});
this.pageInfo(this.curPage,this.num);
if(robotType)this.openVoice();//语音播放
//将方法绑定到window下面,提供给外部调用
window.PlayAudioCallback = (res)=> this.PlayAudioCallback(res);//语音播放
window.HighCameraCallback = (success, obj)=> this.HighCameraCallback(success, obj);//获取高拍仪照片
window.ConfirmCallback = (res)=> this.ConfirmCallback(res);//提示确认,取消对话框
},
methods:{
back() {//取消
if(robotType){
robotsdk.closeHighCamera();//关闭高拍仪
robotsdk.closeExternalApp({//退出跳转咨询页面
mode:0
});
}
},
nextStep() {//下一步
this.idCardList.push(JSON.parse(this.materials[0].jsonData)[0]);
var powerNmae=JSON.parse(this.materials[0].jsonData)[0].name;
if (powerNmae!=null&&powerNmae!=""){
this.identityList.forEach((identity,i)=> {
identity.forEach((obj,i)=> {
let name=obj.name;
if (name!=null&&name!=''){
if (powerNmae.lastIndexOf(name)!=-1){
this.idCardList.push(obj);
}
}
})
})
}
this.isOpenHighCamera=false;
if (robotType)robotsdk.closeHighCamera();//关闭高拍仪
if (this.formIndex==5){
this.$router.push({ path: '/iframePage',query:{pageUrl:window.config.rocrUrl+"lilo/aiCase/skipSanitationRegister?pageUrl=apply/BDCMMHT",materials:JSON.stringify(this.idCardList)}});
}
if (this.formIndex==6){
this.$router.push({ path: '/iframePage',query:{pageUrl:window.config.rocrUrl+"lilo/aiCase/skipSanitationRegister?pageUrl=apply/FWZYHT",materials:JSON.stringify(this.idCardList)}});
}
},
scanBtn(){//扫描
this.$refs.child.counter=300; //刷新时间
this.masks(true);//遮罩层 true 打开 false 关闭
if (robotType)robotsdk.getHighCamera(this.highCameraImgParameter);//获取高拍仪照片
},
delImg(index,fileId){
this.updateTimes()//刷新时间
let newIndex=this.curPage*this.num-(this.num-index);//材料坐标位置
this.indexFileId=this.materials[newIndex].fileId;//获取当前fileId
this.delMaterialByFileId(newIndex,fileId);
},
pageInfo (curPage,num) {//页面数据刷新
var curPage = (curPage - 1) * num;
this.materialList = this.materials.slice(curPage,parseInt(curPage) + parseInt(num));
this.imgDelList = this.imgDel.slice(curPage,parseInt(curPage) + parseInt(num));
},
openVoice(){
robotsdk.playAudio(this.voiceParameter);//虚拟人物播放语音及动作
},
PlayAudioCallback (res){//语音回调
console.info("PlayAudioCallback===="+res)
if (res=="cmdOK"&&this.isOpenHighCamera){
robotsdk.openHighCamera(this.highCameraParameter);//打开高拍仪预览界面
this.message("请提交所有权利人身份证文件");//提示框
this.scanBtnIsShow=true;//扫描按钮赋值可点
robotsdk.playAudio({//语音播放参数
cmd: "sm",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent: "请将需要提交的资料放置到扫描区,等资料预览清晰后点击'扫描'按钮进行扫描",//语音内容
callback: "PlayAudioCallback"//接口回调函数
});//虚拟人物播放语音及动作
}
},
HighCameraCallback(success, obj){////获取高拍仪照片
if (success) {
let res = eval('(' + obj + ')');//高拍仪回调的数据集
$.post( window.config.rocrUrl+'lilo/apply/uploadFile', {
fileName : res.filename,
base64 : res.file,
bdc: "false",//是否处理不动产证权利人名称逗号符号
applyType:'2',
}).then(item => {
if (item.success) {
this.masks(false);//遮罩层 true 打开 false 关闭
let fileName=item.obj.fileName;
var resData=eval('(' + item.obj.jsonData + ')');
let oneFileUrl=this.materials[0].fileUrl;
if (fileName!=''){
if (fileName.lastIndexOf("不动产")!=-1) {
this.propertyList =resData;//不动产信息
if (oneFileUrl==""){
this.upMaterials(0,item);//更新不动产材料信息
}else{
this.type=1;
this.temporary=item;
this.showConfirmMessage("检测到材料已上传过是否覆盖最新?");
}
}else if (fileName.lastIndexOf("身份证")!=-1){
let isExist=false;
try {
resData.forEach((res,i)=> {
if (res.name!=null){
this.identityList.forEach((identity,i)=> {
identity.forEach((obj,i)=> {
if ( obj.name==res.name) {
isExist=true;
throw("身份证信息已上传过================");
}
})
})
}
})
}catch (e){
console.info(e);
}
if (isExist){//判断该身份是否已经提交过
this.message("请勿重复提交身份证信息!");//提示框
}else{
this.isMore("身份证",item);
this.addMaterials("身份证",item);
this.manyCount=0;
this.identityList.push(resData);
}
}else{
this.message("请勿提交其它文件!");//提示框
}
}else {
this.message("服务器异常,扫描失败!");//提示框
}
if (this.addIndex<5){
this.curPage=1;
}else{
let integer=parseInt((this.addIndex/this.num).toString());//取整
if (this.addIndex/this.num.toFixed(2)>=integer){
this.curPage=integer+1
}else{
this.curPage=integer;
}
}
if (this.materials[0].fileUrl!=''){
this.isBtnNextShow=true;
}
this.pageInfo(this.curPage,this.num);
}else{
this.masks(false);//遮罩层 true 打开 false 关闭
this.message("服务器异常,扫描失败!");//提示框
}
}).catch(err => {
this.masks(false);//遮罩层 true 打开 false 关闭
this.message("服务器异常,扫描失败!");//提示框
})
} else {
this.masks(false);//遮罩层 true 打开 false 关闭
this.message("服务器异常,扫描失败!");//提示框
}
},
ConfirmCallback(bool){
if (bool){//确认
if (this.type==1){//不动产
this.delMaterialByFileId(0,this.materials[0].fileId);
}
}
},
masks(bool){
if (robotType) {
robotsdk.showMasks({//遮罩层
isOpen: bool //true 打开 false 关闭
});
}
},
imgUp(){
this.updateTimes()//刷新时间
this.curPage = this.curPage-1;
this.pageInfo(this.curPage,this.num);
},
imgNext(){
this.updateTimes()//刷新时间
this.curPage = this.curPage+1;
this.pageInfo(this.curPage,this.num);
},
updateTimes(){
this.$refs.child.counter=300;
},
message(content){
if (robotType) {
robotsdk.showMessage({//提示框
isOpen: true,//true 打开 false 关闭
content: content,//消息内容
isAutoClose: true//true 5秒自动关闭 false 用户点确认关闭
});
}
},
showConfirmMessage(content){
if (robotType) {
robotsdk.showConfirmMessage({
isOpen: true,
content: content,
isAutoClose: false,
callback: "ConfirmCallback"
});
}
},
delMaterialByFileId(index,fileId){
$.post( window.config.rocrUrl+'lilo/apply/deleteFile', {
fileId : fileId
}).then(item => {
if (item.success) {
if (this.type==1){
this.imgDel[index].name='';
this.materials[index].fileUrl='';
this.materials[index].fileId='';
}
//覆盖材料更新
if (this.type==1){//更新不动产信息
this.upMaterials(0,this.temporary);
this.temporary=[];
} else{
this.up(index);
}
}else{
this.message("服务器异常,删除失败!");//提示框
}
}).catch(err => {
this.message("服务器异常,删除失败!");//提示框
})
},
up(index){
let nameNumber=this.materials[index].name.replace(/[^0-9]/ig,"");//材料名称后面数字
let indexName=this.materials[index].name;
if (nameNumber!=''){
indexName=indexName.substring(0,indexName.length-nameNumber.length);
}else{
indexName=this.materials[index].name;
}
if (index==0){
this.imgDel[index].name='';
this.materials[index].fileUrl='';
this.isBtnNextShow=false;
}else{
this.materials.forEach((obj,i)=> {
let subName=obj.name.substring(0,indexName.length);
let subInt=obj.name.substring(indexName.length);
if (indexName==subName){
if (nameNumber==''&&parseInt(subInt)==1){
obj.name= subName
}else if (parseInt(subInt)>1){
let count=parseInt(subInt)-1;
obj.name= subName+count;
}
}
})
this.materials.splice(index,1)
this.imgDel.splice(index,1);
if (this.identityList.length>1){
this.identityList.splice((index-1),1);
}else{
this.identityList=[];
}
}
console.info("this.identityList===="+JSON.stringify(this.identityList))
this.manyCount=0;
if (this.materialList.length==1&&this.curPage!=1)
this.curPage = this.curPage-1;
this.pageInfo(this.curPage,this.num);
},
isMore(fileName,item){
this.materials.forEach((obj,index)=>{
let subName = obj.name.substring(0, fileName.length);
if (fileName.lastIndexOf(subName)!=-1&&obj.fileUrl!=''){
this.manyCount=this.manyCount+1;
}else if (fileName.lastIndexOf(subName)!=-1&&obj.fileUrl==''){
obj.fileUrl=item.obj.fileUrl;
obj.fileId=item.obj.fileId;
obj.type=item.obj.type;
this.imgDel[index].name=item.obj.fileName;
this.imgDel[index].fileId=item.obj.fileId;
this.manyCount=-1;
this.addIndex=index;
}
})
},
addMaterials(fileName,item){
if (this.manyCount>=1){
this.materials.push({'name':fileName+this.manyCount,'fileUrl':item.obj.fileUrl,'fileId':item.obj.fileId,
'artificialType':item.obj.artificialType,'type':item.obj.type});
this.imgDel.push({'name':fileName+this.manyCount,fileId:item.obj.fileId,'imgSrc':require('../../assets/images/ico/delete.png')});
this.addIndex=this.materials.length-1;
}
if (this.manyCount==0){
this.materials.push({'name':fileName,'fileUrl':item.obj.fileUrl,'fileId':item.obj.fileId,
'artificialType':item.obj.artificialType,'type':item.obj.type});
this.imgDel.push({'name':fileName,fileId:item.obj.fileId,'imgSrc':require('../../assets/images/ico/delete.png')});
this.addIndex=this.materials.length-1;
}
},
upMaterials(number,item){
this.materials[number].fileUrl=item.obj.fileUrl;
this.materials[number].fileId=item.obj.fileId;
this.materials[number].type=item.obj.type;
this.materials[number].jsonData=item.obj.jsonData;
this.imgDel[number].fileId=item.obj.fileId;
this.imgDel[number].name=item.obj.fileName;
this.imgDel[number].imgSrc=require('../../assets/images/ico/delete.png');
},
//语音回调(只处理扫描,下一步,退出)
voiceCallback(res){
if (res=="scanning"){
if (this.scanBtnIsShow){
this.scanBtn();
}
}
if (res=="nextStep"){
if (this.isBtnNextShow){
this.nextStep();
}
}
if (res=="quit"){
this.back();
}
}
}
}
</script>
<style scoped>
.scanMaterial{
background-image: url('../../assets/images/background.png');
background-repeat:no-repeat;
background-size:100% 100%;
background-size: cover;
overflow:auto;
}
.imgButton {
width: 31%;
}
.example{
background-image: url('../../assets/images/scanExample.gif');
background-repeat:no-repeat;
height: 676px;
margin-left: 1.2%;
margin-top: 1.4%
}
.left{
height: 100%;
float: left
}
.right{
padding-left: 72%;
padding-top: 20px;
height: 82%;
}
.rightFrame{
height: 140px;
}
.fileName{
width: 74%;
padding-left: 28%;
color:#FFFFFF;
padding-top: 2%;
}
.imgFrame{
height: 92px;
width: 45%;
}
.imgSize{
height: 75px;
width: 38%;
}
.imgList{
position: absolute;
left: 70.92%;
padding-top: 2.2%;
width: 30%;
}
.imgBetween{
height: 140px;
}
.imgDel{
position: absolute;
padding-top: 1.5%;
left: 87%;
z-index: 99;
}
.imgDelBetween{
height: 137px;
z-index: 99;
}
.btnUp{
position: absolute;
left: 75%;
margin-top: 22%;
z-index: 99;
}
.btnNext{
position: absolute;
left: 95%;
margin-top: 22%;
z-index: 97;
}
</style>
\ No newline at end of file
<template>
<b-page @bPageLoaded="voiceCallback"></b-page>
<count-down times=300 bottomOffset="10" rightOffset="10" fontSize="24" ref="child"></count-down>
<template v-if="schedule == 0">
<div class="scanMaterial" style="height:100%">
<!-- 左区域 -->
<div class="left">
<div class="example"></div>
<div style="padding-right: 1%;padding-top: 32px;">
<!-- 取消按钮 -->
<img class="imgButton" v-if="!BtnIsShow" src="../../assets/images/btn/backGray.png">
<img class="imgButton" v-if="BtnIsShow" @click="back" src="../../assets/images/btn/btnCancel.png">&nbsp;&nbsp;
<!-- 扫描按钮 -->
<img class="imgButton" v-if="!BtnIsShow || !scanBtnIsShow" src="../../assets/images/btn/scanGray.png">
<img class="imgButton" v-if="BtnIsShow && scanBtnIsShow" @click="scanBtn" src="../../assets/images/btn/btnScan.png">&nbsp;&nbsp;
<!-- 下一步按钮 -->
<img class="imgButton" v-if="!isBtnNextShow" src="../../assets/images/btn/btnPrint_Not.png">
<img class="imgButton" v-if="isBtnNextShow" @click="nextStep" src="../../assets/images/btn/btnPrint.png">
</div>
</div>
<!-- 图片区域 -->
<div class="imgList">
<div class="imgBetween" v-for="(material, index) in materialList">
<img class="imgSize" v-if="material.fileUrl!=''" :src="material.fileUrl">
<div class="fileName" v-if="material.fileUrl!=''" >
{{material.name}}
</div>
<div class="fileName" v-if="material.fileUrl==''" style="width: 74%;padding-left: 28%;color: #FFFFFF;padding-top: 22%;">
{{material.name}}
</div>
</div>
</div>
<!-- 删除按钮 -->
<div class="imgDel">
<div class="imgDelBetween" v-for="(del, index) in imgDelList">
<img @click="delImg(index,del.fileId)" v-if="del.name==''">
<img @click="delImg(index,del.fileId)" v-if="del.name!=''" :src="del.imgSrc">
</div>
</div>
<!-- 图片框 -->
<div class="right">
<div class="rightFrame" v-for="(freme, index) in imgFrames">
<img class="imgFrame" :src="freme.imgSrc">
</div>
</div>
</div>
</template>
<template v-if="schedule == 1" >
<div class="printMaterial">
<div style="padding-top: 5%;">
<div style="margin-top: 120px;">
<img style="width: 374px;height: 294px" src="../../assets/images/print.gif" >
</div>
<div style="margin-top: 50px;">
<font size="6" color="#FFFFFF">请稍等,系统正在为您打印!</font>
</div>
</div>
</div>
</template>
<template v-if="schedule == 2" >
<div class="printMaterial">
<div style="padding-top: 5%;">
<div style="margin-top: 120px;">
<img style="width: 190px;height: 190px" src="../../assets/images/ico/ico_ok.png" >
</div>
<div style="margin-top: 150px;">
<font size="6" color="#FFFFFF">已为您打印成功,稍后系统将返回首页!</font>
</div>
</div>
</div>
</template>
</template>
<script>
import material from "@/views/material";
import BPage from "@/components/registerVoice";
export default{
components: {
BPage,
},
data() {
return {
applyType: "",
schedule: "",
curPage: 1,//当前页码
num: 5,//每页展示数量
materials: [],//材料集合
materialList:[],//当前页面图片展示
imgDel:[],//删除按钮集合
imgDelList:[],//当前页面删除按钮展示
BtnIsShow:false,//控制取消,按钮是否显示
scanBtnIsShow:false,//扫描按钮是否亮起
isBtnNextShow:false,//控制打印按钮是否亮起
imgFrames:[
{'imgSrc':require('../../assets/images/filebox.png')},
],//图片框集合
highCameraParameter:{//高拍仪参数
x: 68,//预览界面x坐标
y: 47,//预览界面y坐标
width: 900,//预览界面宽度
height: 676,//预览界面高度
},
userInfoParameter:{//办事人信息
callback: "getUserInfo"
},
highCameraImgParameter:{//获取高拍仪照片
callback: "HighCameraCallback"
},
count:0,
}
},
created() {
this.schedule = 0;
this.applyType = "1";//1:身份证核验打印
this.materials.push({'name':'营业执照','fileUrl':'','fileId':'','artificialType':'','type':''});
this.imgDel.push({'name':'','fileUrl':'','fileId':'','artificialType':'','type':''});
this.pageInfo(this.curPage,this.num);
if (robotType)this.openVoice( "请您将营业执照放入扫描框进行扫描");
if (robotType)robotsdk.getUserInfo(this.userInfoParameter);//获取办事人信息
//将方法绑定到window下面,提供给外部调用
window.PlayAudioCallback = (res)=> this.PlayAudioCallback(res);//语音播放
window.HighCameraCallback = (success, obj)=> this.HighCameraCallback(success, obj);//获取高拍仪照片
window.ConfirmCallback = (res)=> this.ConfirmCallback(res);//提示确认,取消对话框
window.getUserInfo = (obj)=> this.getUserInfo(obj);//获取身份证信息
window.printCallBack = (obj)=> this.printCallBack(obj);//打印回调
window.PlayAudio_printCallback = (res)=> this.PlayAudio_printCallback(res);//打印语音回调
},
methods:{
back() {
if (robotType)robotsdk.closeHighCamera();//关闭高拍仪
if(robotType){
robotsdk.closeExternalApp({//退出跳转咨询页面
mode:0
});
}
},
nextStep() {//打印
if (robotType)robotsdk.closeHighCamera();//关闭高拍仪
this.schedule = 1;
$.post(window.config.rocrUrl + 'lilo/apply/copyImg2word', {//打印
materials:JSON.stringify(this.materials),
}).then(item => {
this.masks(false);
robotsdk.printFile({
filetype: 'doc',
base64: item.obj.copyImg2wordBas64,
remoteprintname: "",
replyvoice: '请稍等,系统正在为您进行打印!',
callback: "printCallBack"
});
})
// if (!this.isRepetition) this.$LocalStorage.SessionPut("entrustMaterials",this.materials);
// if (this.isRepetition) this.$LocalStorage.SessionPut("entrustMaterials",this.materials[0]);
// this.$LocalStorage.SessionPut("scanType",this.scanType);
// this.$router.push({ path: '/material',query:{isCancel:true}});
},
printCallBack(bool){//打印回调
if (bool){//打印成功返回true
this.schedule = 2;
this.masks(false);
robotsdk.playAudio({
cmd: "cmd",
animation: 0,
videocontent: "已为您打印成功,稍后系统将返回首页",
callback: "PlayAudio_printCallback"
})
}else {
this.$router.push({ path: '/errorPage',query: {msg: '打印失败'}});//转跳错误提示页面
}
},
PlayAudio_printCallback(res){//打印语音回调
if (res=="cmdOK") {
let timer = setInterval(() => {
//需要定时执行的代码
if (robotType)robotsdk.closeHighCamera();//关闭高拍仪
this.back();//退出
},1000)
}
},
scanBtn(){//扫描
this.$refs.child.counter=300; //刷新时间
this.masks(true);//遮罩层 true 打开 false 关闭
if (robotType)robotsdk.getHighCamera(this.highCameraImgParameter);//获取高拍仪照片
},
pageInfo (curPage,num) {//右边图片框
var curPage = (curPage - 1) * num;
this.materialList = this.materials.slice(curPage,parseInt(curPage) + parseInt(num));
this.imgDelList = this.imgDel.slice(curPage,parseInt(curPage) + parseInt(num));
},
delImg(index,fileId){
this.$refs.child.counter=300; //刷新时间
this.delMaterialByFileId(index,fileId);//删除材料数据
},
openVoice(content){
robotsdk.playAudio({//语音播放参数
cmd: "cmd",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent:content,//语音内容
callback: "PlayAudioCallback"//接口回调函数
});//虚拟人物播放语音及动作
},
PlayAudioCallback (res){//初始语音回调
if (res=="cmdOK"){
if (robotType){
robotsdk.openHighCamera(this.highCameraParameter);//打开高拍仪预览界面
this.BtnIsShow=true;
this.scanBtnIsShow = true;
robotsdk.playAudio({//语音播放参数
cmd: "sm",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent: "",//语音内容
callback: "PlayAudioCallback"//接口回调函数
});//虚拟人物播放语音及动作
}
}
},
HighCameraCallback(success, obj){
if (success) {
let res = eval('(' + obj + ')');//高拍仪回调的数据集
$.post( window.config.rocrUrl+'lilo/apply/uploadFile', {
applyType: this.applyType,//1:身份证核验打印
fileName : res.filename,
base64 : res.file,
}).then(item => {
this.masks(false);//遮罩层 true 打开 false 关闭
if (item.success) {
let fileName=item.obj.fileName;
if (fileName!='') {
if (fileName.lastIndexOf("营业执照") != -1) {
this.masks(false);//遮罩层 true 打开 false 关闭;
this.isBtnNextShow = true;
this.scanBtnIsShow = false;
if(this.materialList[0].fileId==''){
this.upMaterials(0,item);//更新营业执照数据
}else {
this.delMaterialByFileId(0,this.materialList[0].fileId);
this.upMaterials(0,item);//更新营业执照数据
}
robotsdk.playAudio({//语音播放参数
cmd: "sm",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent: "营业执照扫描成功,您可以点击打印按钮进行打印",//语音内容
callback: ""//接口回调函数
});//虚拟人物播放语音及动作
}else {
this.message("请勿提交其它文件!");//提示框
this.openVoice("请勿提交其它文件");
}
}
} else {
this.masks(false);//遮罩层 true 打开 false 关闭
this.message("服务器异常,扫描失败!");//提示框
this.openVoice("服务器异常,扫描失败!");
}
})
}
},
masks(bool){
if (robotType) {
robotsdk.showMasks({//遮罩层
isOpen: bool //true 打开 false 关闭
});
}
},
message(content){
if (robotType) {
robotsdk.showMessage({//提示框
isOpen: true,//true 打开 false 关闭
content: content,//消息内容
isAutoClose: true//true 5秒自动关闭 false 用户点确认关闭
});
}
},
getUserInfo(obj){
let res = eval('(' + obj + ')');
this.name=res.name;
this.mobile=res.mobile;
this.idcard=res.idcard;
},
showConfirmMessage(content){
if (robotType) {
robotsdk.showConfirmMessage({
isOpen: true,
content: content,
isAutoClose: false,
callback: "ConfirmCallback"
});
}
},
upMaterials(number,item){
this.materials[number].fileUrl=item.obj.fileUrl;
this.materials[number].fileId=item.obj.fileId;
this.materials[number].type=item.obj.type;
this.imgDel[number].fileId=item.obj.fileId;
this.imgDel[number].name=item.obj.fileName;
this.imgDel[number].imgSrc=require('../../assets/images/ico/delete.png');
},
delMaterialByFileId(index,fileId){
$.post( window.config.rocrUrl+'lilo/apply/deleteFile', {
fileId : fileId
}).then(item => {
if (item.success) {
this.imgDel[index].name='';
this.materials[index].fileUrl='';
this.materials[index].fileId='';
this.isBtnNextShow=false;
this.scanBtnIsShow = true;
}else{
this.message("服务器异常,删除失败!");//提示框
}
}).catch(err => {
this.message("服务器异常,删除失败!");//提示框
})
},
//语音回调(只处理扫描,下一步,退出)
voiceCallback(res){
if (res=="scanning"){
if (this.BtnIsShow&&this.scanBtnIsShow){
this.scanBtn();
}
}
if (res=="quit"){
this.back();
}
}
}
}
</script>
<style scoped>
.scanMaterial{
background-image: url('../../assets/images/background.png');
background-repeat:no-repeat;
background-size:100% 100%;
background-size: cover;
overflow:auto;
}
.printMaterial{
background-image: url('../../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow:auto;
margin-bottom: 20px;
padding: 0 70px;
height:100%;
}
.imgButton {
width: 31%;
}
.example{
background-image: url('../../assets/images/scanExample.gif');
background-repeat:no-repeat;
height: 676px;
margin-left: 1.2%;
margin-top: 1.4%
}
.left{
height: 100%;
float: left
}
.right{
padding-left: 72%;
padding-top: 20px;
height: 82%;
}
.rightFrame{
height: 140px;
}
.fileName{
width: 74%;
padding-left: 28%;
color:#FFFFFF;
padding-top: 2%;
}
.imgFrame{
height: 92px;
width: 45%;
}
.imgSize{
height: 75px;
width: 38%;
}
.imgList{
position: absolute;
left: 70.92%;
padding-top: 2.2%;
width: 30%;
}
.imgBetween{
height: 140px;
}
.imgDel{
position: absolute;
padding-top: 1.5%;
left: 87%;
z-index: 99;
}
.imgDelBetween{
height: 137px;
z-index: 99;
}
</style>
\ No newline at end of file
<template>
<b-page @bPageLoaded="voiceCallback"></b-page>
<count-down times=300 bottomOffset="10" rightOffset="10" fontSize="24" ref="child"></count-down>
<template v-if="schedule == 0">
<div class="scanMaterial" style="height:100%">
<!-- 左区域 -->
<div class="left">
<div class="example"></div>
<div style="padding-right: 1%;padding-top: 32px;">
<!-- 取消按钮 -->
<img class="imgButton" v-if="!BtnIsShow" src="../../assets/images/btn/backGray.png">
<img class="imgButton" v-if="BtnIsShow" @click="back" src="../../assets/images/btn/btnCancel.png">&nbsp;&nbsp;&nbsp;&nbsp;
<!-- 下一步按钮 -->
<img class="imgButton" v-if="!isBtnNextShow" src="../../assets/images/btn/btnPrint_Not.png">
<img class="imgButton" v-if="isBtnNextShow" @click="nextStep('print')" src="../../assets/images/btn/btnPrint.png">
<!-- 扫描按钮 -->
<img class="imgButton" v-if="!BtnIsShow" src="../../assets/images/btn/scanGray.png" style="margin-left: 25px">
<img class="imgButton" v-if="BtnIsShow && scanBtnIsShow" @click="scanBtn" src="../../assets/images/btn/btnScan.png" style="margin-left: 25px">
<!--核验-->
<img class="imgButton" v-if="BtnIsShow && verBtnIsShow" @click="verBtn" src="../../assets/images/btn/verBtn.png" style="margin-left: 25px">
</div>
</div>
<!-- 图片区域 -->
<div class="imgList">
<div class="imgBetween" v-for="(material, index) in materialList">
<img class="imgSize" v-if="material.fileUrl!=''" :src="material.fileUrl">
<div class="fileName" v-if="material.fileUrl!=''" >
{{material.name}}
</div>
<div class="fileName" v-if="material.fileUrl==''" style="width: 74%;padding-left: 28%;color: #FFFFFF;padding-top: 22%;">
{{material.name}}
</div>
</div>
</div>
<!-- 删除按钮 -->
<div class="imgDel">
<div class="imgDelBetween" v-for="(del, index) in imgDelList">
<img @click="delImg(index,del.fileId)" v-if="del.name==''">
<img @click="delImg(index,del.fileId)" v-if="del.name!=''" :src="del.imgSrc">
</div>
</div>
<!-- 图片框 -->
<div class="right">
<div class="rightFrame" v-for="(freme, index) in imgFrames">
<img class="imgFrame" :src="freme.imgSrc">
</div>
</div>
</div>
</template>
<template v-if="schedule == 1" >
<div class="printMaterial">
<div style="padding-top: 5%;">
<div style="margin-top: 120px;">
<img style="width: 374px;height: 294px" src="../../assets/images/print.gif" >
</div>
<div style="margin-top: 50px;">
<font size="6" color="#FFFFFF">请稍等,系统正在为您打印!</font>
</div>
</div>
</div>
</template>
<template v-if="schedule == 2" >
<div class="printMaterial">
<div style="padding-top: 5%;">
<div style="margin-top: 120px;">
<img style="width: 190px;height: 190px" src="../../assets/images/ico/ico_ok.png" >
</div>
<div style="margin-top: 150px;">
<font size="6" color="#FFFFFF">已为您打印成功,稍后系统将返回首页!</font>
</div>
</div>
</div>
</template>
<template v-if="schedule == 3" >
<div class="printMaterial">
<div style="padding-top: 5%;">
<div style="margin-top: 120px;">
<img style="width: 280px;height: 190px" src="../../assets/images/ico/ico_normal.png" >
</div>
<div style="margin-top: 150px;">
<font size="6" color="#FFFFFF">您的身份证验证已通过!</font>
</div>
</div>
</div>
</template>
<template v-if="schedule == 4" >
<div class="printMaterial">
<div style="padding-top: 5%;">
<div style="margin-top: 120px;">
<img style="width: 280px;height: 190px" src="../../assets/images/ico/ico_abnormal.png" >
</div>
<div style="margin-top: 150px;">
<font size="6" color="#FFFFFF">您的身份证验证不通过!稍后将返回系统首页!</font>
</div>
</div>
</div>
</template>
</template>
<script>
import material from "@/views/material";
import BPage from "@/components/registerVoice";
export default{
components: {
BPage,
},
data() {
return {
name: "",
idcard: "",
applyType: "",//1:身份证核验打印
schedule: "",
curPage: 1,//当前页码
num: 5,//每页展示数量
materials: [],//材料集合
materialList:[],//当前页面图片展示
imgDel:[],//删除按钮集合
imgDelList:[],//当前页面删除按钮展示
isRepetition:false,//是否重复材料
type:0,//0:默认不覆盖,1:覆盖身份证正面,2:覆盖身份证反面,3:只删除当前上传材料
temporary:[],//临时集合,用于是否覆盖材料使用
BtnIsShow:false,//控制取消,按钮是否显示
scanBtnIsShow:false,//扫描按钮是否亮起
verBtnIsShow: false,//核验按钮是否显示
isBtnNextShow:false,//控制打印按钮是否亮起
imgFrames:[
{'imgSrc':require('../../assets/images/filebox.png')},
{'imgSrc':require('../../assets/images/filebox.png')},
],//图片框集合
highCameraParameter:{//高拍仪参数
x: 68,//预览界面x坐标
y: 47,//预览界面y坐标
width: 900,//预览界面宽度
height: 676,//预览界面高度
},
userInfoParameter:{//办事人信息
callback: "getUserInfo"
},
highCameraImgParameter:{//获取高拍仪照片
callback: "HighCameraCallback"
},
IdentificationParameter:{//获取身份信息
callback: "IdentificationCallback"
},
count:0,
}
},
created() {
this.schedule = 0;
this.name = "",
this.idcard = "",
this.applyType = "1";//1:身份证核验打印
this.materials.push({'name':'身份证正面','fileUrl':'','fileId':'','artificialType':'','type':''});
this.materials.push({'name':'身份证反面','fileUrl':'','fileId':'','artificialType':'','type':''});
this.imgDel.push({'name':'','fileUrl':'','fileId':'','artificialType':'','type':''});
this.imgDel.push({'name':'','fileUrl':'','fileId':'','artificialType':'','type':''});
this.pageInfo(this.curPage,this.num);
if (robotType)this.openVoice( "请您将身份证正面放入扫描框进行扫描");
if (robotType)robotsdk.getUserInfo(this.userInfoParameter);//获取办事人信息
//将方法绑定到window下面,提供给外部调用
window.PlayAudioCallback = (res)=> this.PlayAudioCallback(res);//语音播放
window.playAudioCallback1 = (res)=> this.playAudioCallback1(res);//语音播放
window.HighCameraCallback = (success, obj)=> this.HighCameraCallback(success, obj);//获取高拍仪照片
window.IdentificationCallback = (obj)=> this.IdentificationCallback(obj);//获取高拍仪照片
window.ConfirmCallback = (res)=> this.ConfirmCallback(res);//提示确认,取消对话框
window.getUserInfo = (obj)=> this.getUserInfo(obj);//获取身份证信息
window.printCallBack = (obj)=> this.printCallBack(obj);//打印回调
window.PlayAudio_printCallback = (res)=> this.PlayAudio_printCallback(res);//打印语音回调
},
methods:{
back() {
if (robotType)robotsdk.closeHighCamera();//关闭高拍仪
if(robotType){
robotsdk.closeExternalApp({//退出跳转咨询页面
mode:0
});
}
},
nextStep(type) {//打印
if (robotType)robotsdk.closeHighCamera();//关闭高拍仪
this.schedule = 1;
$.post(window.config.rocrUrl + 'lilo/apply/idcardImg2word', {//打印
type: type,
name: this.name,
idcard: this.idcard,
materials:JSON.stringify(this.materials),
}).then(item => {
this.masks(false);
robotsdk.printFile({
filetype: 'doc',
base64: item.obj.base64,
remoteprintname: "",
replyvoice: '请稍等,系统正在为您进行打印!',
callback: "printCallBack"
});
})
},
printCallBack(bool){//打印回调
if (bool){//打印成功返回true
this.schedule = 2;
this.masks(false);
robotsdk.playAudio({
cmd: "cmd",
animation: 0,
videocontent: "已为您打印成功,稍后系统将返回首页",
callback: "PlayAudio_printCallback"
})
}else {
this.$router.push({ path: '/errorPage',query: {msg: '打印失败'}});//转跳错误提示页面
}
},
PlayAudio_printCallback(res){//打印语音回调
if (res=="cmdOK") {
let timer = setInterval(() => {
//需要定时执行的代码
if (robotType)robotsdk.closeHighCamera();//关闭高拍仪
this.back();//退出
},1000)
}
},
scanBtn(){//扫描
this.$refs.child.counter=300; //刷新时间
this.masks(true);//遮罩层 true 打开 false 关闭
if (robotType)robotsdk.getHighCamera(this.highCameraImgParameter);//获取高拍仪照片
},
verBtn(){//核验
this.$refs.child.counter=300; //刷新时间
// this.masks(true);//遮罩层 true 打开 false 关闭
if (robotType)robotsdk.closeHighCamera();//关闭高拍仪
if (robotType)robotsdk.openIdentification(this.IdentificationParameter);//开启身份验证
},
pageInfo (curPage,num) {//右边图片框
var curPage = (curPage - 1) * num;
this.materialList = this.materials.slice(curPage,parseInt(curPage) + parseInt(num));
this.imgDelList = this.imgDel.slice(curPage,parseInt(curPage) + parseInt(num));
},
delImg(index,fileId){
this.$refs.child.counter=300; //刷新时间
this.type=0;
this.delMaterialByFileId(index,fileId);//删除数据库材料数据
},
openVoice(content){
robotsdk.playAudio({//语音播放参数
cmd: "cmd",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent:content,//语音内容
callback: "PlayAudioCallback"//接口回调函数
});//虚拟人物播放语音及动作
},
PlayAudioCallback (res){//初始语音回调
if (res=="cmdOK"){
if (robotType){
robotsdk.openHighCamera(this.highCameraParameter);//打开高拍仪预览界面
this.BtnIsShow=true;
this.scanBtnIsShow = true;
robotsdk.playAudio({//语音播放参数
cmd: "sm",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent: "",//语音内容
callback: "PlayAudioCallback"//接口回调函数
});//虚拟人物播放语音及动作
}
}
},
IdentificationCallback(obj){//身份核验
if (obj==""){
}else {
let res = eval('(' + obj + ')');//人脸身份核验回调的数据集
this.name = res.name;
this.idcard = res.idcard;
$.post( window.config.rocrUrl+'lilo/apply/idcardImg2word', {
type: "verification",
idcard : this.idcard,
name : this.name,
materials:JSON.stringify(this.materials),
}).then(item => {
if (item.obj.isPass){
this.schedule = 3;
robotsdk.playAudio({//语音播放参数
cmd: "cmd",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent: "您的身份已验证通过",//语音内容
callback: "playAudioCallback1"//接口回调函数
});//虚拟人物播放语音及动作
}else {
this.schedule = 4;
robotsdk.playAudio({//语音播放参数
cmd: "cmd",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent: "您的身份验证不通过,稍后将返回系统首页",//语音内容
callback: "playAudioCallback1"//接口回调函数
});//虚拟人物播放语音及动作
}
})
}
},
playAudioCallback1(res){
if (res=="cmdOK"){
if (robotType){
if (this.schedule==4){
let timer = setInterval(() => {
//需要定时执行的代码
if (robotType)robotsdk.closeHighCamera();//关闭高拍仪
this.back();//退出
},1000)
}else {
this.nextStep("verification");
}
}
}
},
HighCameraCallback(success, obj){
if (success) {
let res = eval('(' + obj + ')');//高拍仪回调的数据集
$.post( window.config.rocrUrl+'lilo/apply/uploadFile', {
applyType: this.applyType,//1:身份证核验打印
cutImage: "true",//需要切图
fileName : res.filename,
base64 : res.file,
}).then(item => {
if (item.success) {
this.masks(false);//遮罩层 true 打开 false 关闭
let fileName=item.obj.fileName;
if (fileName!=''){
if (fileName.lastIndexOf("身份证")!=-1) {
let identity =eval('(' + item.obj.jsonData + ')');//身份证信息
try {
identity.forEach((obj,index)=>{
// if (obj.isOriginal=="1"){
if (obj.name!="" && obj.name!=undefined && obj.name!=null){
this.masks(false);//遮罩层 true 打开 false 关闭;
if(this.materialList[0].fileId==''){
this.upMaterials(0,item);//更新身份证正面数据
}else{
this.type=1;
this.temporary=item;
this.showConfirmMessage("检测到材料已上传过是否覆盖最新?");
}
robotsdk.playAudio({//语音播放参数
cmd: "sm",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent: "身份证正面扫描成功",//语音内容
callback: ""//接口回调函数
});//虚拟人物播放语音及动作
}else {
this.masks(false);//遮罩层 true 打开 false 关闭;
if(this.materialList[1].fileId==''){
this.upMaterials(1,item);//更新身份证反面数据
}else{
this.type=2;
this.temporary=item;
this.showConfirmMessage("检测到材料已上传过是否覆盖最新?");
}
robotsdk.playAudio({//语音播放参数
cmd: "sm",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent: "身份证反面扫描成功",//语音内容
callback: ""//接口回调函数
});//虚拟人物播放语音及动作
}
// }else {
// this.message("请提交身份证原件!");//提示框
// }
})
}catch (e){
console.info(e);
}
let oneFileUrl=this.materials[0].fileUrl;
let twoFileUrl=this.materials[1].fileUrl;
if (oneFileUrl!=''&&twoFileUrl!=''){
robotsdk.playAudio({//语音播放参数
cmd: "sm",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent: "您可以点击打印按钮进行打印,或点击核验按钮进行身份核验并打印",//语音内容
callback: ""//接口回调函数
});//虚拟人物播放语音及动作
this.isBtnNextShow = true;
this.verBtnIsShow = true;
this.scanBtnIsShow = false;
}
}else{
this.message("请勿提交其它文件!");//提示框
}
}
}else {
this.masks(false);//遮罩层 true 打开 false 关闭
this.message("服务器异常,扫描失败!");//提示框
}
})
} else {
this.masks(false);//遮罩层 true 打开 false 关闭
this.message("服务器异常,扫描失败!");//提示框
}
},
masks(bool){
if (robotType) {
robotsdk.showMasks({//遮罩层
isOpen: bool //true 打开 false 关闭
});
}
},
message(content){
if (robotType) {
robotsdk.showMessage({//提示框
isOpen: true,//true 打开 false 关闭
content: content,//消息内容
isAutoClose: true//true 5秒自动关闭 false 用户点确认关闭
});
}
},
getUserInfo(obj){
let res = eval('(' + obj + ')');
this.name=res.name;
this.mobile=res.mobile;
this.idcard=res.idcard;
},
showConfirmMessage(content){
if (robotType) {
robotsdk.showConfirmMessage({
isOpen: true,
content: content,
isAutoClose: false,
callback: "ConfirmCallback"
});
}
},
upMaterials(number,item){
this.materials[number].fileUrl=item.obj.fileUrl;
this.materials[number].fileId=item.obj.fileId;
this.materials[number].type=item.obj.type;
this.imgDel[number].fileId=item.obj.fileId;
this.imgDel[number].name=item.obj.fileName;
this.imgDel[number].imgSrc=require('../../assets/images/ico/delete.png');
},
ConfirmCallback(bool){
if (bool){//确认
if (this.type==1){
this.delMaterialByFileId(0,this.materials[0].fileId);
}else if (this.type==2){
this.delMaterialByFileId(1,this.materials[1].fileId);
}
}else{//取消
if (!this.isRepetition){
this.type=4;//4:删除当前上传材料,不做其它操作
this.delMaterialByFileId(null,this.temporary.obj.fileId);
}
}
},
delMaterialByFileId(index,fileId){
$.post( window.config.rocrUrl+'lilo/apply/deleteFile', {
fileId : fileId
}).then(item => {
if (item.success) {
if (this.type==0||this.type==1||this.type==2){
this.imgDel[index].name='';
this.materials[index].fileUrl='';
this.materials[index].fileId='';
this.isBtnNextShow=false;
this.verBtnIsShow = false;
this.scanBtnIsShow = true;
}
//覆盖材料更新
if (this.type==1){//更新身份证正面信息
this.upMaterials(0,this.temporary);
} else if (this.type==2){//更新身份证反面信息
this.upMaterials(1,this.temporary);
}
this.temporary=[];
}else{
this.message("服务器异常,删除失败!");//提示框
}
}).catch(err => {
this.message("服务器异常,删除失败!");//提示框
})
},
//语音回调(只处理扫描,下一步,退出)
voiceCallback(res){
if (res=="scanning"){
if (this.BtnIsShow&&this.scanBtnIsShow){
this.scanBtn();
}
}
if (res=="quit"){
this.back();
}
}
}
}
</script>
<style scoped>
.scanMaterial{
background-image: url('../../assets/images/background.png');
background-repeat:no-repeat;
background-size:100% 100%;
background-size: cover;
overflow:auto;
}
.printMaterial{
background-image: url('../../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow:auto;
margin-bottom: 20px;
padding: 0 70px;
height:100%;
}
.imgButton {
width: 31%;
}
.example{
background-image: url('../../assets/images/scanExample.gif');
background-repeat:no-repeat;
height: 676px;
margin-left: 1.2%;
margin-top: 1.4%
}
.left{
height: 100%;
float: left
}
.right{
padding-left: 72%;
padding-top: 20px;
height: 82%;
}
.rightFrame{
height: 140px;
}
.fileName{
width: 74%;
padding-left: 28%;
color:#FFFFFF;
padding-top: 2%;
}
.imgFrame{
height: 92px;
width: 45%;
}
.imgSize{
height: 75px;
width: 38%;
}
.imgList{
position: absolute;
left: 70.92%;
padding-top: 2.2%;
width: 30%;
}
.imgBetween{
height: 140px;
}
.imgDel{
position: absolute;
padding-top: 1.5%;
left: 87%;
z-index: 99;
}
.imgDelBetween{
height: 137px;
z-index: 99;
}
</style>
\ No newline at end of file
<template>
<div class="material">
<div style="padding-top: 5%;">
<ul class="title" >
<li style="width: 10%">序号</li>
<li style="width: 20%">材料名称</li>
</ul>
</div>
<div class="content" @click="goIdcardApply">
<div style="width: 10%;text-align:left;margin-left: 6%">1</div>
<div style="width: 50%;text-align:left;margin-left: 3.2%">身份证打印</div>
</div>
<div class="content" @click="goBusinessApply">
<div style="width: 10%;text-align:left;margin-left: 6%">2</div>
<div style="width: 50%;text-align:left;margin-left: 3.2%">营业执照打印</div>
</div>
<div class="content" @click="goOtherApply">
<div style="width: 10%;text-align:left;margin-left: 6%">3</div>
<div style="width: 50%;text-align:left;margin-left: 3.2%">其他</div>
</div>
<div style="position: fixed;bottom: 80px;width: 98%;">
<div style="position: absolute;margin-left:30%;">
<img style="width: 80%;" src="../../assets/images/btn/btnCancel.png" @click="cancelClick" id="cancel">
</div>
</div>
</div>
</template>
<script>
import { layer } from "@layui/layer-vue";
export default{
data() {
return {
voiceParameter:{//语音播放参数
cmd: "cmd",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent: "请选择需要打印的资料",//语音内容
callback: "PlayAudioCallback"//接口回调函数
},
}
},
created() {
if(robotType){
this.openVoice()
}
},
methods:{
goIdcardApply(){//表列表事件
this.$router.push({ path: '/copyIdcardApply'});
},
goBusinessApply(){//表列表事件
this.$router.push({ path: '/copyBusinessApply'});
},
goOtherApply(){//表列表事件
this.$router.push({ path: '/copyOtherApply'});
},
cancelClick() { //取消按钮
if(robotType){
robotsdk.closeExternalApp({
mode:0
});
}
},
openVoice(){
robotsdk.playAudio(this.voiceParameter);//虚拟人物播放语音及动作
},
PlayAudioCallback (res){//语音回调
console.info("语音播放回调结果============"+res);
},
}
}
</script>
<style scoped>
.material{
background-image: url('../../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow:auto;
margin-bottom: 20px;
padding: 0 70px;
height:100%;
}
.title li{
float:left;
color: #ffffff;
font-size: 24px;
text-align:center;
padding-top:10px;
}
.title{
background-image: url('../../assets/images/materialsDetailTr.png');
background-repeat:no-repeat;
background-size:100% 100%;
height:50px;
}
.content div{
color: #ffffff;
font-size: 24px;
padding-top: 10px;
padding-bottom: 10px;
}
.content{
margin-top:1%;
background-image: url('../../assets/images/materialsDetailTd.png');
background-repeat:no-repeat;
background-size:100% 100%;
display:flex;
flex-direction:row;
}
</style>
\ No newline at end of file
<template>
<b-page @bPageLoaded="voiceCallback"></b-page>
<count-down times=300 bottomOffset="10" rightOffset="10" fontSize="24" ref="child"></count-down>
<template v-if="schedule == 0">
<div class="scanMaterial" style="height:100%">
<!-- 左区域 -->
<div class="left">
<div class="example"></div>
<div style="padding-right: 1%;padding-top: 32px;">
<!-- 取消按钮 -->
<img class="imgButton" v-if="!BtnIsShow" src="../../assets/images/btn/backGray.png">
<img class="imgButton" v-if="BtnIsShow" @click="back" src="../../assets/images/btn/btnCancel.png">&nbsp;&nbsp;
<!-- 扫描按钮 -->
<img class="imgButton" v-if="!BtnIsShow || !scanBtnIsShow" src="../../assets/images/btn/scanGray.png">
<img class="imgButton" v-if="BtnIsShow && scanBtnIsShow" @click="scanBtn" src="../../assets/images/btn/btnScan.png">&nbsp;&nbsp;
<!-- 下一步按钮 -->
<img class="imgButton" v-if="!isBtnNextShow" src="../../assets/images/btn/btnPrint_Not.png">
<img class="imgButton" v-if="isBtnNextShow" @click="nextStep" src="../../assets/images/btn/btnPrint.png">
</div>
</div>
<!-- 图片区域 -->
<div class="imgList">
<div class="imgBetween" v-for="(material, index) in materialList">
<img class="imgSize" v-if="material.fileUrl!=''" :src="material.fileUrl">
<div class="fileName" v-if="material.fileUrl!=''" >
{{material.name}}
</div>
<div class="fileName" v-if="material.fileUrl==''" style="width: 74%;padding-left: 28%;color: #FFFFFF;padding-top: 22%;">
{{material.name}}
</div>
</div>
</div>
<!-- 删除按钮 -->
<div class="imgDel">
<div class="imgDelBetween" v-for="(del, index) in imgDelList">
<img @click="delImg(index,del.fileId)" v-if="del.name==''">
<img @click="delImg(index,del.fileId)" v-if="del.name!=''" :src="del.imgSrc">
</div>
</div>
<!-- 图片上一页 -->
<div class="btnUp">
<img src="../../assets/images/btn/btnLeft2.png">
</div>
<div class="btnUp" v-if="curPage!=1">
<img @click="imgUp" src="../../assets/images/btn/btnLeft.png">
</div>
<!-- 图片下一页 -->
<div class="btnNext" >
<img src="../../assets/images/btn/btnRight2.png">
</div>
<div class="btnNext" v-if="materials.length>(curPage*num)">
<img @click="imgNext" src="../../assets/images/btn/btnRight.png">
</div>
<!-- 图片框 -->
<div class="right">
<div class="rightFrame" v-for="(freme, index) in imgFrames">
<img class="imgFrame" :src="freme.imgSrc">
</div>
</div>
</div>
</template>
<template v-if="schedule == 1" >
<div class="printMaterial">
<div style="padding-top: 5%;">
<div style="margin-top: 120px;">
<img style="width: 374px;height: 294px" src="../../assets/images/print.gif" >
</div>
<div style="margin-top: 50px;">
<font size="6" color="#FFFFFF">请稍等,系统正在为您打印!</font>
</div>
</div>
</div>
</template>
<template v-if="schedule == 2" >
<div class="printMaterial">
<div style="padding-top: 5%;">
<div style="margin-top: 120px;">
<img style="width: 190px;height: 190px" src="../../assets/images/ico/ico_ok.png" >
</div>
<div style="margin-top: 150px;">
<font size="6" color="#FFFFFF">已为您打印成功,稍后系统将返回首页!</font>
</div>
</div>
</div>
</template>
</template>
<script>
import material from "@/views/material";
import BPage from "@/components/registerVoice";
export default{
components: {
BPage,
},
data() {
return {
applyType: "",
schedule: "",
curPage: 1,//当前页码
num: 5,//每页展示数量
materials: [],//材料集合
materialList:[],//当前页面图片展示
imgDel:[],//删除按钮集合
imgDelList:[],//当前页面删除按钮展示
BtnIsShow:false,//控制取消,按钮是否显示
scanBtnIsShow:false,//扫描按钮是否亮起
isBtnNextShow:false,//控制打印按钮是否亮起
addIndex:-1,//添加材料坐标
imgFrames:[
{'imgSrc':require('../../assets/images/filebox.png')},
{'imgSrc':require('../../assets/images/filebox.png')},
{'imgSrc':require('../../assets/images/filebox.png')},
{'imgSrc':require('../../assets/images/filebox.png')},
{'imgSrc':require('../../assets/images/filebox.png')},
],//图片框集合
highCameraParameter:{//高拍仪参数
x: 68,//预览界面x坐标
y: 47,//预览界面y坐标
width: 900,//预览界面宽度
height: 676,//预览界面高度
},
userInfoParameter:{//办事人信息
callback: "getUserInfo"
},
highCameraImgParameter:{//获取高拍仪照片
callback: "HighCameraCallback"
},
count:0,
}
},
created() {
this.schedule = 0;
this.applyType = "1";//1:身份证核验打印
// this.materials.push({'name':'','fileUrl':'','fileId':'','type':''});
//
// this.imgDel.push({'name':'','fileUrl':'','fileId':'','type':''});
this.pageInfo(this.curPage,this.num);
if (robotType)this.openVoice( "请您将资料放入扫描框进行扫描");
if (robotType)robotsdk.getUserInfo(this.userInfoParameter);//获取办事人信息
//将方法绑定到window下面,提供给外部调用
window.PlayAudioCallback = (res)=> this.PlayAudioCallback(res);//语音播放
window.HighCameraCallback = (success, obj)=> this.HighCameraCallback(success, obj);//获取高拍仪照片
window.ConfirmCallback = (res)=> this.ConfirmCallback(res);//提示确认,取消对话框
window.getUserInfo = (obj)=> this.getUserInfo(obj);//获取身份证信息
window.printCallBack = (obj)=> this.printCallBack(obj);//打印回调
window.PlayAudio_printCallback = (res)=> this.PlayAudio_printCallback(res);//打印语音回调
},
methods:{
back() {
if (robotType)robotsdk.closeHighCamera();//关闭高拍仪
if(robotType){
robotsdk.closeExternalApp({//退出跳转咨询页面
mode:0
});
}
},
nextStep() {//打印
if (robotType)robotsdk.closeHighCamera();//关闭高拍仪
this.schedule = 1;
$.post(window.config.rocrUrl + 'lilo/apply/copyImg2word', {//打印
materials:JSON.stringify(this.materials),
printType: "putongdayin",
}).then(item => {
this.masks(false);
robotsdk.printFile({
filetype: 'doc',
base64: item.obj.copyImg2wordBas64,
remoteprintname: "",
replyvoice: '请稍等,系统正在为您进行打印!',
callback: "printCallBack"
});
})
// if (!this.isRepetition) this.$LocalStorage.SessionPut("entrustMaterials",this.materials);
// if (this.isRepetition) this.$LocalStorage.SessionPut("entrustMaterials",this.materials[0]);
// this.$LocalStorage.SessionPut("scanType",this.scanType);
// this.$router.push({ path: '/material',query:{isCancel:true}});
},
printCallBack(bool){//打印回调
if (bool){//打印成功返回true
this.schedule = 2;
this.masks(false);
robotsdk.playAudio({
cmd: "cmd",
animation: 0,
videocontent: "已为您打印成功,稍后系统将返回首页",
callback: "PlayAudio_printCallback"
})
}else {
this.$router.push({ path: '/errorPage',query: {msg: '打印失败'}});//转跳错误提示页面
}
},
PlayAudio_printCallback(res){//打印语音回调
if (res=="cmdOK") {
let timer = setInterval(() => {
//需要定时执行的代码
if (robotType)robotsdk.closeHighCamera();//关闭高拍仪
this.back();//退出
},1000)
}
},
scanBtn(){//扫描
this.$refs.child.counter=300; //刷新时间
this.masks(true);//遮罩层 true 打开 false 关闭
if (robotType)robotsdk.getHighCamera(this.highCameraImgParameter);//获取高拍仪照片
},
pageInfo (curPage,num) {//右边图片框
var curPage = (curPage - 1) * num;
this.materialList = this.materials.slice(curPage,parseInt(curPage) + parseInt(num));
this.imgDelList = this.imgDel.slice(curPage,parseInt(curPage) + parseInt(num));
},
imgUp(){
this.$refs.child.counter=300; //刷新时间
this.curPage = this.curPage-1;
this.pageInfo(this.curPage,this.num);
},
imgNext(){
this.$refs.child.counter=300; //刷新时间
this.curPage = this.curPage+1;
this.pageInfo(this.curPage,this.num);
},
delImg(index,fileId){
this.$refs.child.counter=300; //刷新时间
let newIndex=this.curPage*this.num-(this.num-index);//材料坐标位置
this.indexFileId=this.materials[newIndex].fileId;//获取当前fileId
this.delMaterialByFileId(newIndex,this.indexFileId);//删除材料数据
},
openVoice(content){
robotsdk.playAudio({//语音播放参数
cmd: "cmd",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent:content,//语音内容
callback: "PlayAudioCallback"//接口回调函数
});//虚拟人物播放语音及动作
},
PlayAudioCallback (res){//初始语音回调
if (res=="cmdOK"){
if (robotType){
robotsdk.openHighCamera(this.highCameraParameter);//打开高拍仪预览界面
this.BtnIsShow=true;
this.scanBtnIsShow = true;
robotsdk.playAudio({//语音播放参数
cmd: "sm",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent: "",//语音内容
callback: "PlayAudioCallback"//接口回调函数
});//虚拟人物播放语音及动作
}
}
},
HighCameraCallback(success, obj){
if (success) {
let res = eval('(' + obj + ')');//高拍仪回调的数据集
$.post( window.config.rocrUrl+'lilo/apply/uploadFile', {
applyType: this.applyType,//1:身份证核验打印
fileName : res.filename,
base64 : res.file,
}).then(item => {
this.masks(false);//遮罩层 true 打开 false 关闭
if (item.success) {
let fileName=item.obj.fileName;
this.masks(false);//遮罩层 true 打开 false 关闭;
this.isBtnNextShow = true;
this.addMaterials(fileName,item);
robotsdk.playAudio({//语音播放参数
cmd: "sm",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent: "扫描成功,您可以继续扫描或点击打印按钮进行打印",//语音内容
callback: ""//接口回调函数
});//虚拟人物播放语音及动作
if (this.addIndex<5){
this.curPage=1;
}else{
let integer=parseInt((this.addIndex/this.num).toString());//取整
if (this.addIndex/this.num.toFixed(2)>=integer){
this.curPage=integer+1
}else{
this.curPage=integer;
}
}
this.pageInfo(this.curPage,this.num);
} else {
this.masks(false);//遮罩层 true 打开 false 关闭
this.message("服务器异常,扫描失败!");//提示框
this.openVoice("服务器异常,扫描失败!");
}
})
}
},
addMaterials(fileName,item){
this.materials.push({'name':"",'fileUrl':item.obj.fileUrl,'fileId':item.obj.fileId,
'type':item.obj.type});
this.imgDel.push({'name':fileName,fileId:item.obj.fileId,'imgSrc':require('../../assets/images/ico/delete.png')});
this.addIndex=this.materials.length-1;
},
masks(bool){
if (robotType) {
robotsdk.showMasks({//遮罩层
isOpen: bool //true 打开 false 关闭
});
}
},
message(content){
if (robotType) {
robotsdk.showMessage({//提示框
isOpen: true,//true 打开 false 关闭
content: content,//消息内容
isAutoClose: true//true 5秒自动关闭 false 用户点确认关闭
});
}
},
getUserInfo(obj){
let res = eval('(' + obj + ')');
this.name=res.name;
this.mobile=res.mobile;
this.idcard=res.idcard;
},
showConfirmMessage(content){
if (robotType) {
robotsdk.showConfirmMessage({
isOpen: true,
content: content,
isAutoClose: false,
callback: "ConfirmCallback"
});
}
},
upMaterials(number,item){
this.materials[number].fileUrl=item.obj.fileUrl;
this.materials[number].fileId=item.obj.fileId;
this.materials[number].type=item.obj.type;
this.imgDel[number].fileId=item.obj.fileId;
this.imgDel[number].name=item.obj.fileName;
this.imgDel[number].imgSrc=require('../../assets/images/ico/delete.png');
},
delMaterialByFileId(index,fileId){
$.post( window.config.rocrUrl+'lilo/apply/deleteFile', {
fileId : fileId
}).then(item => {
if (item.success) {
this.materials.splice(index,1)
this.imgDel.splice(index,1);
this.addIndex=this.materials.length-1;
if (this.addIndex<5){
this.curPage=1;
}else{
let integer=parseInt((this.addIndex/this.num).toString());//取整
if (this.addIndex/this.num.toFixed(2)>=integer){
this.curPage=integer+1
}else{
this.curPage=integer;
}
}
this.pageInfo(this.curPage,this.num);
if(this.materials.length==0) this.isBtnNextShow=false;
}else{
this.message("服务器异常,删除失败!");//提示框
}
}).catch(err => {
this.message("服务器异常,删除失败!");//提示框
})
},
//语音回调(只处理扫描,下一步,退出)
voiceCallback(res){
if (res=="scanning"){
if (this.BtnIsShow&&this.scanBtnIsShow){
this.scanBtn();
}
}
if (res=="quit"){
this.back();
}
}
}
}
</script>
<style scoped>
.scanMaterial{
background-image: url('../../assets/images/background.png');
background-repeat:no-repeat;
background-size:100% 100%;
background-size: cover;
overflow:auto;
}
.printMaterial{
background-image: url('../../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow:auto;
margin-bottom: 20px;
padding: 0 70px;
height:100%;
}
.imgButton {
width: 31%;
}
.example{
background-image: url('../../assets/images/scanExample.gif');
background-repeat:no-repeat;
height: 676px;
margin-left: 1.2%;
margin-top: 1.4%
}
.left{
height: 100%;
float: left
}
.right{
padding-left: 72%;
padding-top: 20px;
height: 82%;
}
.rightFrame{
height: 140px;
}
.fileName{
width: 74%;
padding-left: 28%;
color:#FFFFFF;
padding-top: 2%;
}
.imgFrame{
height: 92px;
width: 45%;
}
.imgSize{
height: 75px;
width: 38%;
}
.imgList{
position: absolute;
left: 70.92%;
padding-top: 2.2%;
width: 30%;
}
.imgBetween{
height: 140px;
}
.imgDel{
position: absolute;
padding-top: 1.5%;
left: 87%;
z-index: 99;
}
.imgDelBetween{
height: 137px;
z-index: 99;
}
.btnUp{
position: absolute;
left: 75%;
margin-top: 22%;
z-index: 99;
}
.btnNext{
position: absolute;
left: 95%;
margin-top: 22%;
z-index: 97;
}
</style>
\ No newline at end of file
<template>
<b-page @bPageLoaded="voiceCallback"></b-page>
<count-down times=300 bottomOffset="30" rightOffset="10" fontSize="30" ref="child"></count-down>
<div class="scanMaterial" style="height:100%">
<!-- 左区域 -->
<div class="left">
<div class="example"></div>
<div style="padding-right: 1%;padding-top: 32px;">
<!-- 取消按钮 -->
<img class="imgButton" v-if="!scanBtnIsShow" src="../../assets/images/btn/backGray.png">
<img class="imgButton" v-if="scanBtnIsShow" @click="back" src="../../assets/images/btn/btnCancel.png">&nbsp;&nbsp;
<!-- 扫描按钮 -->
<img class="imgButton" v-if="!scanBtnIsShow" src="../../assets/images/btn/scanGray.png">
<img class="imgButton" v-if="scanBtnIsShow" @click="scanBtn" src="../../assets/images/btn/btnScan.png">&nbsp;&nbsp;
<!-- 下一步按钮 -->
<img class="imgButton" @click="nextStep" src="../../assets/images/btn/btnNext.png">
</div>
</div>
<!-- 图片区域 -->
<div class="imgList">
<div class="imgBetween" v-for="(material, index) in materialList">
<img class="imgSize" v-if="material.fileUrl!=''" :src="material.fileUrl">
<div class="fileName" v-if="material.fileUrl!=''" >
{{material.name}}
</div>
<div class="fileName" v-if="material.fileUrl==''" style="width: 74%;padding-left: 28%;color: #FFFFFF;padding-top: 22%;">
{{material.name}}
</div>
</div>
</div>
<!-- 删除按钮 -->
<div class="imgDel">
<div class="imgDelBetween" v-for="(del, index) in imgDelList">
<img @click="delImg(index,del.fileId)" v-if="del.name==''">
<img @click="delImg(index,del.fileId)" v-if="del.name!=''" :src="del.imgSrc">
</div>
</div>
<!-- 图片上一页 -->
<div class="btnUp" v-if="formIndex=='12'">
<img src="../../assets/images/btn/btnLeft2.png">
</div>
<div class="btnUp" v-if="curPage!=1">
<img @click="imgUp" src="../../assets/images/btn/btnLeft.png">
</div>
<!-- 图片下一页 -->
<div class="btnNext" v-if="formIndex=='12'">
<img src="../../assets/images/btn/btnRight2.png">
</div>
<div class="btnNext" v-if="materials.length>(curPage*num)">
<img @click="imgNext" src="../../assets/images/btn/btnRight.png">
</div>
<!-- 图片框 -->
<div class="right">
<div class="rightFrame" v-for="(freme, index) in imgFrames">
<img class="imgFrame" :src="freme.imgSrc">
</div>
</div>
</div>
</template>
<script>
import BPage from "@/components/registerVoice";
export default{
components: {
BPage,
},
data() {
return {
formIndex:0,//表列表下标
isOpenHighCamera:true,//是否打开高拍仪
scanType:'',//委托人身份代办类型
curPage: 1,//当前页码
num: 5,//每页展示数量
materials: [],//材料集合
materialList:[],//当前页面图片展示
imgDel:[],//删除按钮集合
imgDelList:[],//当前页面删除按钮展示
scanBtnIsShow:false,//控制取消,扫描按钮是否显示
isBtnNextShow:false,//控制下一步按钮是否亮起
manyCount:0,//重复材料数量
addIndex:-1,//添加材料坐标
identityList:[],//身份证扫描之后集合
idCardList:[],//最终跳转表单所传递的集合
serviceId: '',//机器人ID
projectName:'',//事项名称
isRepetition:false,//是否重复材料
type:0,//0:默认不覆盖,1:覆盖身份证,2:覆盖营业执照,3:只删除当前上传材料
temporary:[],//临时集合,用于是否覆盖材料使用
imgFrames:[],//图片框集合
highCameraParameter:{//高拍仪参数
x: 68,//预览界面x坐标
y: 47,//预览界面y坐标
width: 900,//预览界面宽度
height: 676,//预览界面高度
},
voiceParameter:{//语音播放参数
cmd: "cmd",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent: "请您根据扫描要求,逐页将资料放置到材料识别区。",//语音内容
callback: "PlayAudioCallback"//接口回调函数
},
userInfoParameter:{//办事人信息
callback: "getUserInfo"
},
highCameraImgParameter:{//获取高拍仪照片
callback: "HighCameraCallback"
},
count:0,
}
},
created() {
this.formIndex = this.$route.query.formIndex;
//初始化右区域图片框,材料名称,删除图标
if (this.formIndex == 1||this.formIndex == 11) {
this.materials.push({'name': '身份证', 'fileUrl': '', 'fileId': '', 'type': ''});
this.materials.push({'name': '营业执照', 'fileUrl': '', 'fileId': '', 'type': ''});
this.imgDel.push({'name': '', 'imgSrc': require('../../assets/images/ico/delete.png')});
this.imgDel.push({'name': '', 'imgSrc': require('../../assets/images/ico/delete.png')});
this.imgFrames.push({'imgSrc': require('../../assets/images/filebox.png')});
this.imgFrames.push({'imgSrc': require('../../assets/images/filebox.png')});
} else if (this.formIndex == 7) {
this.materials.push({'name': '身份证', 'fileUrl': '', 'fileId': '', 'type': ''});
this.imgDel.push({'name': '', 'imgSrc': require('../../assets/images/ico/delete.png')});
this.imgFrames.push({'imgSrc': require('../../assets/images/filebox.png')});
} else if (this.formIndex == 12) {
this.materials.push({'name': '营业执照', 'fileUrl': '', 'fileId': '', 'type': '11','jsonData':'11'});
this.imgDel.push({'name': '', 'imgSrc': require('../../assets/images/ico/delete.png')});
this.imgFrames.push({'imgSrc': require('../../assets/images/filebox.png')});
this.imgFrames.push({'imgSrc':require('../../assets/images/filebox.png')});
this.imgFrames.push({'imgSrc':require('../../assets/images/filebox.png')});
this.imgFrames.push({'imgSrc':require('../../assets/images/filebox.png')});
this.imgFrames.push({'imgSrc':require('../../assets/images/filebox.png')});
}else {
this.materials.push({'name': '营业执照', 'fileUrl': '', 'fileId': '', 'type': ''});
this.imgDel.push({'name': '', 'imgSrc': require('../../assets/images/ico/delete.png')});
this.imgFrames.push({'imgSrc': require('../../assets/images/filebox.png')});
}
this.pageInfo(this.curPage,this.num);
if(robotType){
this.openVoice();//语音播放
}
//将方法绑定到window下面,提供给外部调用
window.PlayAudioCallback = (res)=> this.PlayAudioCallback(res);//语音播放
window.HighCameraCallback = (success, obj)=> this.HighCameraCallback(success, obj);//获取高拍仪照片
window.ConfirmCallback = (res)=> this.ConfirmCallback(res);//提示确认,取消对话框
},
methods:{
back() {//取消
if (robotType)robotsdk.closeHighCamera();//关闭高拍仪
if(robotType){
robotsdk.closeExternalApp({//退出跳转咨询页面
mode:0
});
}
},
nextStep() {//下一步
this.isOpenHighCamera=false;
if (robotType)robotsdk.closeHighCamera();//关闭高拍仪
if (this.formIndex==1){
this.$router.push({ path: '/iframePage',query:{pageUrl:window.config.rocrUrl+"lilo/aiCase/skipSanitationRegister?pageUrl=apply/XCYJYXKZ",materials:JSON.stringify(this.materials)}});
}
if (this.formIndex==2){
this.$router.push({ path: '/iframePage',query:{pageUrl:window.config.rocrUrl+"lilo/aiCase/skipSanitationRegister?pageUrl=apply/JXSYBZSPJYZBA",materials:JSON.stringify(this.materials)}});
}
if (this.formIndex==3){
this.$router.push({ path: '/iframePage',query:{pageUrl:window.config.rocrUrl+"lilo/aiCase/skipSanitationRegister?pageUrl=apply/GGCSWSXKXB",materials:JSON.stringify(this.materials)}});
}
if (this.formIndex==4){
this.$router.push({ path: '/iframePage',query:{pageUrl:window.config.rocrUrl+"lilo/aiCase/skipSanitationRegister?pageUrl=apply/GGCSWSXKCNS",materials:JSON.stringify(this.materials)}});
}
if (this.formIndex==7){
this.$router.push({ path: '/iframePage',query:{pageUrl:window.config.rocrUrl+"lilo/aiCase/skipSanitationRegister?pageUrl=apply/ZGCBDJYB",materials:JSON.stringify(this.materials)}});
}
if (this.formIndex==8){
this.$router.push({ path: '/iframePage',query:{pageUrl:window.config.rocrUrl+"lilo/aiCase/skipSanitationRegister?pageUrl=apply/hubei/yichang/GGCSWSXK",materials:JSON.stringify(this.materials)}});
}
if (this.formIndex==9){
this.$router.push({ path: '/iframePage',query:{pageUrl:window.config.rocrUrl+"lilo/aiCase/skipSanitationRegister?pageUrl=apply/hubei/yichang/GGCSWSXKCNS",materials:JSON.stringify(this.materials)}});
}
if (this.formIndex==10){
this.$router.push({ path: '/iframePage',query:{pageUrl:window.config.rocrUrl+"lilo/aiCase/skipSanitationRegister?pageUrl=apply/hubei/yichang/SPJYXKZZX",materials:JSON.stringify(this.materials)}});
}
if (this.formIndex==11){
this.$router.push({ path: '/iframePage',query:{pageUrl:window.config.rocrUrl+"lilo/aiCase/skipSanitationRegister?pageUrl=apply/hubei/yichang/XCYJYXKZ",materials:JSON.stringify(this.materials)}});
}
if (this.formIndex==12){
if (this.materials[0].fileUrl!=''){
this.identityList.push(JSON.parse(this.materials[0].jsonData)[0]);
}
this.$router.push({ path: '/iframePage',query:{pageUrl:window.config.rocrUrl+"lilo/aiCase/skipSanitationRegister?pageUrl=apply/hubei/yichang/JKZSQB",materials:JSON.stringify(this.identityList)}});
}
},
scanBtn(){//扫描
this.$refs.child.counter=300; //刷新时间
this.masks(true);//遮罩层 true 打开 false 关闭
if (robotType)robotsdk.getHighCamera(this.highCameraImgParameter);//获取高拍仪照片
},
pageInfo (curPage,num) {//页面数据刷新
var curPage = (curPage - 1) * num;
this.materialList = this.materials.slice(curPage,parseInt(curPage) + parseInt(num));
this.imgDelList = this.imgDel.slice(curPage,parseInt(curPage) + parseInt(num));
},
delImg(index,fileId){
this.$refs.child.counter=300; //刷新时间
this.type=0;
let newIndex=this.curPage*this.num-(this.num-index);//材料坐标位置
this.delMaterialByFileId(newIndex,fileId);//删除数据库材料数据
},
openVoice(){
robotsdk.playAudio(this.voiceParameter);//虚拟人物播放语音及动作
},
PlayAudioCallback (res){//语音回调
if (res=="cmdOK"&&this.isOpenHighCamera){
robotsdk.openHighCamera(this.highCameraParameter);//打开高拍仪预览界面
this.scanBtnIsShow=true;//扫描按钮赋值可点
robotsdk.playAudio({//语音播放参数
cmd: "sm",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent: "请将需要提交的资料放置到扫描区,等资料预览清晰后点击'扫描'按钮进行扫描",//语音内容
callback: "PlayAudioCallback"//接口回调函数
});//虚拟人物播放语音及动作
}
},
HighCameraCallback(success, obj){////获取高拍仪照片
if (success) {
let res = eval('(' + obj + ')');//高拍仪回调的数据集
$.post( window.config.rocrUrl+'lilo/apply/uploadFile', {
fileName : res.filename,
base64 : res.file,
applyType:'2',
}).then(item => {
if (item.success) {
this.masks(false);//遮罩层 true 打开 false 关闭
let fileName=item.obj.fileName;
if (this.formIndex==1||this.formIndex==11){
let oneFileUrl=this.materials[0].fileUrl;
let twoFileUrl=this.materials[1].fileUrl;
if (fileName!=''){
if (fileName.lastIndexOf("身份证")!=-1) {
if (oneFileUrl==""){
this.upMaterials(0,item);//更新身份证材料信息
}else{
this.type=1;
this.temporary=item;
this.showConfirmMessage("检测到材料已上传过是否覆盖最新?");
}
}else if (fileName.lastIndexOf("营业执照")!=-1){
if (twoFileUrl==""){
this.upMaterials(1,item);//更新营业执照材料信息
}else{
this.type=2;
this.temporary=item;
this.showConfirmMessage("检测到材料已上传过是否覆盖最新?");
}
}else{
this.message("请勿提交其它文件!");//提示框
}
}
}else if (this.formIndex==7){
let oneFileUrl=this.materials[0].fileUrl;
if (fileName.lastIndexOf("身份证")!=-1){
if (oneFileUrl==""){
this.upMaterials(0,item);//更新身份证材料信息
}else{
this.type=1;
this.temporary=item;
this.showConfirmMessage("检测到材料已上传过是否覆盖最新?");
}
}else{
this.message("请勿提交其它文件!");//提示框
}
}else if (this.formIndex==12){
let oneFileUrl=this.materials[0].fileUrl;
if (fileName.lastIndexOf("营业执照")!=-1){
if (oneFileUrl==""){
this.materials[0].jsonData=item.obj.jsonData;
this.upMaterials(0,item);//更新营业执照材料信息
}else{
this.type=2;
this.temporary=item;
this.showConfirmMessage("检测到材料已上传过是否覆盖最新?");
}
}else if (fileName.lastIndexOf("身份证")!=-1){
if (this.materials.length>9){
this.message("只能上传8个身份证!");//提示框
}else{
var resData=eval('(' + item.obj.jsonData + ')');
this.isMore("身份证",item);
this.addMaterials("身份证",item);
this.manyCount=0;
this.identityList.push(resData);
if (this.addIndex<5){
this.curPage=1;
}else{
let integer=parseInt((this.addIndex/this.num).toString());//取整
if (this.addIndex/this.num.toFixed(2)>=integer){
this.curPage=integer+1
}else{
this.curPage=integer;
}
}
this.pageInfo(this.curPage,this.num);
}
}else{
this.message("请勿提交其它文件!");//提示框
}
}else{
let oneFileUrl=this.materials[0].fileUrl;
if (fileName.lastIndexOf("营业执照")!=-1){
if (oneFileUrl==""){
this.upMaterials(0,item);//更新营业执照材料信息
}else{
this.type=1;
this.temporary=item;
this.showConfirmMessage("检测到材料已上传过是否覆盖最新?");
}
}else{
this.message("请勿提交其它文件!");//提示框
}
}
}else{
this.masks(false);//遮罩层 true 打开 false 关闭
this.message("服务器异常,扫描失败!");//提示框
}
}).catch(err => {
this.masks(false);//遮罩层 true 打开 false 关闭
this.message("服务器异常,扫描失败!");//提示框
})
} else {
this.masks(false);//遮罩层 true 打开 false 关闭
this.message("服务器异常,扫描失败!");//提示框
}
},
ConfirmCallback(bool){
if (bool){//确认
if (this.type==1){
this.delMaterialByFileId(0,this.materials[0].fileId);
}else if (this.type==2){
this.delMaterialByFileId(1,this.materials[1].fileId);
}
}else{//取消
if (!this.isRepetition){
this.delMaterialByFileId(null,this.temporary.obj.fileId);
}
}
},
masks(bool){
if (robotType) {
robotsdk.showMasks({//遮罩层
isOpen: bool //true 打开 false 关闭
});
}
},
message(content){
if (robotType) {
robotsdk.showMessage({//提示框
isOpen: true,//true 打开 false 关闭
content: content,//消息内容
isAutoClose: true//true 5秒自动关闭 false 用户点确认关闭
});
}
},
showConfirmMessage(content){
if (robotType) {
robotsdk.showConfirmMessage({
isOpen: true,
content: content,
isAutoClose: false,
callback: "ConfirmCallback"
});
}
},
delMaterialByFileId(index,fileId){
$.post( window.config.rocrUrl+'lilo/apply/deleteFile', {
fileId : fileId
}).then(item => {
if (item.success) {
if(this.formIndex==12){
if (this.type==2){
this.upMaterials(0,this.temporary);
}else{
this.up(index);
}
}else{
if (this.type==0||this.type==1||this.type==2){
this.imgDel[index].name='';
this.materials[index].fileUrl='';
this.materials[index].fileId='';
}
//覆盖材料更新
if (this.type==1){//更新身份证信息
this.upMaterials(0,this.temporary);
} else if (this.type==2){//更新营业执照
this.upMaterials(1,this.temporary);
}
}
this.temporary=[];
}else{
this.message("服务器异常,删除失败!");//提示框
}
}).catch(err => {
this.message("服务器异常,删除失败!");//提示框
})
},
isMore(fileName,item){
this.materials.forEach((obj,index)=>{
let subName = obj.name.substring(0, fileName.length);
if (fileName.lastIndexOf(subName)!=-1&&obj.fileUrl!=''){
this.manyCount=this.manyCount+1;
}else if (fileName.lastIndexOf(subName)!=-1&&obj.fileUrl==''){
obj.fileUrl=item.obj.fileUrl;
obj.fileId=item.obj.fileId;
obj.type=item.obj.type;
this.imgDel[index].name=item.obj.fileName;
this.imgDel[index].fileId=item.obj.fileId;
this.manyCount=-1;
this.addIndex=index;
}
})
},
addMaterials(fileName,item){
if (this.manyCount>=1){
this.materials.push({'name':fileName+this.manyCount,'fileUrl':item.obj.fileUrl,'fileId':item.obj.fileId,
'artificialType':item.obj.artificialType,'type':item.obj.type});
this.imgDel.push({'name':fileName+this.manyCount,fileId:item.obj.fileId,'imgSrc':require('../../assets/images/ico/delete.png')});
this.addIndex=this.materials.length-1;
}
if (this.manyCount==0){
this.materials.push({'name':fileName,'fileUrl':item.obj.fileUrl,'fileId':item.obj.fileId,
'artificialType':item.obj.artificialType,'type':item.obj.type});
this.imgDel.push({'name':fileName,fileId:item.obj.fileId,'imgSrc':require('../../assets/images/ico/delete.png')});
this.addIndex=this.materials.length-1;
}
},
upMaterials(number,item){
this.materials[number].fileUrl=item.obj.fileUrl;
this.materials[number].fileId=item.obj.fileId;
this.materials[number].type=item.obj.type;
this.imgDel[number].fileId=item.obj.fileId;
this.imgDel[number].name=item.obj.fileName;
this.imgDel[number].imgSrc=require('../../assets/images/ico/delete.png');
},
imgUp(){
this.updateTimes()//刷新时间
this.curPage = this.curPage-1;
this.pageInfo(this.curPage,this.num);
},
imgNext(){
this.updateTimes()//刷新时间
this.curPage = this.curPage+1;
this.pageInfo(this.curPage,this.num);
},
updateTimes(){
this.$refs.child.counter=300;
},
up(index){
let nameNumber=this.materials[index].name.replace(/[^0-9]/ig,"");//材料名称后面数字
let indexName=this.materials[index].name;
if (nameNumber!=''){
indexName=indexName.substring(0,indexName.length-nameNumber.length);
}else{
indexName=this.materials[index].name;
}
if (index==0){
this.imgDel[index].name='';
this.materials[index].fileUrl='';
this.materials[index].fileId='';
}else{
this.materials.forEach((obj,i)=> {
let subName=obj.name.substring(0,indexName.length);
let subInt=obj.name.substring(indexName.length);
if (indexName==subName){
if (nameNumber==''&&parseInt(subInt)==1){
obj.name= subName
}else if (parseInt(subInt)>nameNumber){
let count=parseInt(subInt)-1;
obj.name= subName+count;
}
}
})
this.materials.splice(index,1)
this.imgDel.splice(index,1);
if (this.identityList.length>1){
this.identityList.splice((index-1),1);
}else{
this.identityList=[];
}
}
this.manyCount=0;
if (this.materialList.length==1&&this.curPage!=1)
this.curPage = this.curPage-1;
this.pageInfo(this.curPage,this.num);
},
//语音回调(只处理扫描,下一步,退出)
voiceCallback(res){
if (res=="scanning"){
if (this.scanBtnIsShow){
this.scanBtn();
}
}
if (res=="nextStep"){
this.nextStep();
}
if (res=="quit"){
this.back();
}
}
}
}
</script>
<style scoped>
.scanMaterial{
background-image: url('../../assets/images/background.png');
background-repeat:no-repeat;
background-size:100% 100%;
background-size: cover;
overflow:auto;
}
.imgButton {
width: 31%;
}
.example{
background-image: url('../../assets/images/scanExample.gif');
background-repeat:no-repeat;
height: 676px;
margin-left: 1.2%;
margin-top: 1.4%
}
.left{
height: 100%;
float: left
}
.right{
padding-left: 72%;
padding-top: 20px;
height: 82%;
}
.rightFrame{
height: 140px;
}
.fileName{
width: 74%;
padding-left: 28%;
color:#FFFFFF;
padding-top: 2%;
}
.imgFrame{
height: 92px;
width: 45%;
}
.imgSize{
height: 75px;
width: 38%;
}
.imgList{
position: absolute;
left: 70.92%;
padding-top: 2.2%;
width: 30%;
}
.imgBetween{
height: 140px;
}
.imgDel{
position: absolute;
padding-top: 1.5%;
left: 87%;
z-index: 99;
}
.imgDelBetween{
height: 137px;
z-index: 99;
}
.btnUp{
position: absolute;
left: 75%;
margin-top: 22%;
z-index: 99;
}
.btnNext{
position: absolute;
left: 95%;
margin-top: 22%;
z-index: 97;
}
</style>
\ No newline at end of file
<template>
<div class="material">
<div style="padding-top: 5%;">
<ul class="title" >
<li style="width: 10%">序号</li>
<li style="width: 20%">表名称</li>
</ul>
</div>
<div class="content" @click="goFillScan(1)" v-if="serviceId==null"><!-- 各区域通用 -->
<div style="width: 10%;text-align:left;margin-left: 6%">1</div>
<div style="width: 50%;text-align:left;margin-left: 3.2%">小餐饮经营许可证</div>
</div>
<div class="content" @click="goFillScan(2)" v-if="serviceId==null"><!-- 各区域通用 -->
<div style="width: 10%;text-align:left;margin-left: 6%">2</div>
<div style="width: 50%;text-align:left;margin-left: 3.2%">仅销售预包装食品经营者备案</div>
</div>
<div class="content" @click="goFillScan(3)" v-if="serviceId==null"><!-- 各区域通用 -->
<div style="width: 10%;text-align:left;margin-left: 6%">3</div>
<div style="width: 50%;text-align:left;margin-left: 3.2%">公共场合卫生许可新办申请表</div>
</div>
<div class="content" @click="goFillScan(4)" v-if="serviceId==null"><!-- 各区域通用 -->
<div style="width: 10%;text-align:left;margin-left: 6%">4</div>
<div style="width: 50%;text-align:left;margin-left: 3.2%">公共场所卫生许可承诺书</div>
</div>
<div class="content" @click="goFillScan(5)" v-if="serviceId=='S100529'||serviceId=='S100535'"><!--宜宾市民中心和宜宾市兴文县政务中心 -->
<div style="width: 10%;text-align:left;margin-left: 6%">1</div>
<div style="width: 50%;text-align:left;margin-left: 3.2%">不动产买卖合同</div>
</div>
<div class="content" @click="goFillScan(6)" v-if="serviceId=='S100529'||serviceId=='S100535'"><!--宜宾市民中心和宜宾市兴文县政务中心 -->
<div style="width: 10%;text-align:left;margin-left: 6%">2</div>
<div style="width: 50%;text-align:left;margin-left: 3.2%">房屋赠予合同</div>
</div>
<div class="content" @click="goFillScan(7)" v-if="serviceId=='S100535'"><!--宜宾市兴文县政务中心 -->
<div style="width: 10%;text-align:left;margin-left: 6%">3</div>
<div style="width: 50%;text-align:left;margin-left: 3.2%">职工参保登记</div>
</div>
<!-- <div class="content" @click="goFillScan(8)" v-if="serviceId=='S100537'">&lt;!&ndash; 宜昌伍家岗 &ndash;&gt;-->
<!-- <div style="width: 10%;text-align:left;margin-left: 6%">1</div>-->
<!-- <div style="width: 50%;text-align:left;margin-left: 3.2%">公共场合卫生许可新办申请表</div>-->
<!-- </div> 屏蔽了,两个表整合一块去了 -->
<!-- <div class="content" @click="goFillScan(9)" v-if="serviceId=='S100537'">&lt;!&ndash; 宜昌伍家岗 &ndash;&gt;-->
<!-- <div style="width: 10%;text-align:left;margin-left: 6%">2</div>-->
<!-- <div style="width: 50%;text-align:left;margin-left: 3.2%">公共场所卫生许可承诺书</div>-->
<!-- </div>-->
<div class="content" @click="goFillScan(8)" v-if="serviceId=='S100537'"><!-- 宜昌伍家岗 -->
<div style="width: 10%;text-align:left;margin-left: 6%">1</div>
<div style="width: 50%;text-align:left;margin-left: 3.2%">公共场所卫生许可新办</div>
</div>
<div class="content" @click="goFillScan(10)" v-if="serviceId=='S100537'"><!-- 宜昌伍家岗 -->
<div style="width: 10%;text-align:left;margin-left: 6%">2</div>
<div style="width: 50%;text-align:left;margin-left: 3.2%">食品经营许可证注销表</div>
</div>
<div class="content" @click="goFillScan(11)" v-if="serviceId=='S100537'"><!-- 宜昌伍家岗 -->
<div style="width: 10%;text-align:left;margin-left: 6%">3</div>
<div style="width: 50%;text-align:left;margin-left: 3.2%">小餐饮经营许可表</div>
</div>
<div class="content" @click="goFillScan(12)" v-if="serviceId=='S100537'"><!-- 宜昌伍家岗 -->
<div style="width: 10%;text-align:left;margin-left: 6%">4</div>
<div style="width: 50%;text-align:left;margin-left: 3.2%">健康证申请表</div>
</div>
<div style="position: fixed;bottom: 80px;width: 98%;">
<div style="position: absolute;margin-left:30%;">
<img style="width: 80%;" src="../../assets/images/btn/btnCancel.png" @click="cancelClick" id="cancel">
</div>
</div>
</div>
</template>
<script>
import { layer } from "@layui/layer-vue";
export default{
data() {
return {
serviceId: '',//机器人ID
voiceParameter:{//语音播放参数
cmd: "cmd",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent: "请选择需要填报的表",//语音内容
callback: "PlayAudioCallback"//接口回调函数
},
}
},
created() {
this.serviceId = this.$route.query.serviceId
if(robotType)this.openVoice()//语音播放
},
methods:{
goFillScan(formIndex){//表列表事件
if (formIndex==5 || formIndex==6){
this.$router.push({ path: '/contractScan',query:{formIndex:formIndex}});
}else {
this.$router.push({ path: '/fillScanMaterial',query:{formIndex:formIndex}});
}
},
cancelClick() { //取消按钮
if(robotType){
robotsdk.closeExternalApp({
mode:0
});
}
},
openVoice(){
robotsdk.playAudio(this.voiceParameter);//虚拟人物播放语音及动作
},
PlayAudioCallback (res){//语音回调
console.info("语音播放回调结果============"+res);
},
}
}
</script>
<style scoped>
.material{
background-image: url('../../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow:auto;
margin-bottom: 20px;
padding: 0 70px;
height:100%;
}
.title li{
float:left;
color: #ffffff;
font-size: 24px;
text-align:center;
padding-top:10px;
}
.title{
background-image: url('../../assets/images/materialsDetailTr.png');
background-repeat:no-repeat;
background-size:100% 100%;
height:50px;
}
.content div{
color: #ffffff;
font-size: 24px;
padding-top: 10px;
padding-bottom: 10px;
}
.content{
margin-top:1%;
background-image: url('../../assets/images/materialsDetailTd.png');
background-repeat:no-repeat;
background-size:100% 100%;
display:flex;
flex-direction:row;
}
</style>
\ No newline at end of file
<template>
<div class="self-container" >
<iframe v-show="!show" width="98%" id="iframe" height="96%" :src="pageUrl"></iframe>
</div>
</template>
<script>
import { layer } from "@layui/layer-vue";
import websocket from '../../assets/js/websocket';
import waitGit from '../../assets/images/wait.gif';
import printGit from '../../assets/images/print.gif';
import icoOK from '../../assets/images/ico/ico_ok.png';
var _this;
export default {
data() {
return {
pageUrl: '',
show: false,
windowName: '',
tips: '',
showTip: false,
imgSrc: '',
position: 0,
callbackMethod: '', //打印页面回调方法
materials: [],//材料集合
}
},
created() {
this.pageUrl = this.$route.query.pageUrl;//页面路径
this.materials=this.$route.query.materials;//扫描材料
this.init(this.materials);
},
mounted () {
// 将Vue方法传到全局对象window中
window.receiveMsg = this.receiveMsg;
window.printReport = this.printReport;
window.printSuccess = this.printSuccess;
window.printError = this.printError;
window.playAudio = this.playAudio;
window.printCallback = this.printCallback;
window.IDCardCallback = this.IDCardCallback;
_this = this;
},
methods:{
init(materials) {
this.$nextTick(() => {
//获取iframe元素
const iframe = document.getElementById("iframe");
iframe.onload = function (e) {
//推送数据到表单页面
iframe.contentWindow.postMessage({
action: "init",
result: JSON.parse(materials)
}, "*");
}
});
},
printCallback(bool){
//获取iframe元素
const iframe = document.getElementById("iframe");
//推送数据到表单页面
iframe.contentWindow.postMessage({
action: "printCallback",
result: {
'bool': bool,
'callbackMethod': this.callbackMethod
}
}, "*");
},
}
}
window.addEventListener("message", message => {
var data = message.data;
if('next' == data.action){
var result = data.result;
var success = result.success;
if('0' == success || '1' == success){
//转圈圈等待
websocket.openClick(_this.batchId);
//layer.load();
_this.$refs.child.counter= result.waittime + 10; //修改子组件data
_this.show = true;
_this.showTip = true;
_this.tips = "后台正在为您办理中,请稍等!";
_this.imgSrc = waitGit;
_this.position = 30;
if(robotType){
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: '后台正在为您办理中,请稍等',
callback: ""
});
}
} else {
//跳转到错误页面提示
_this.$router.push({ path: '/errorPage'});
}
}
//跳评价页面
else if ('evaluation' == data.action){
_this.$router.push({ path: '/evaluation'});
}
//跳资料袋页面
else if ('information' == data.action){
var caseData = _this.$LocalStorage.SessionGet("caseData");
if (data.result!=null && data.result!="" && data.result!=undefined){
var result = data.result;
caseData.lastNum = result.lastNum;
}
_this.$LocalStorage.SessionPut("caseData", caseData);
_this.$router.push({ path: '/information'});
}
//退出到咨询页面
else if('closeExternalApp' == data.action){
robotsdk.closeExternalApp({
mode:0
});
}
//语音播报
else if ('playAudio' == data.action){
var result = data.result;
var videocontent = result.videocontent;
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: videocontent,
callback: ""
});
}
//打开键盘
else if ('openKeyBoard' == data.action){
robotsdk.openKeyBoard({
oldContent: "",
type: "",
})
}
//关闭键盘
else if ('closeKeyBoard' == data.action){
robotsdk.closeKeyBoard();
}
//打印
else if ('printFile' == data.action){
var result = data.result;
var base64Byte = result.base64Byte;
var remoteprintname = result.remoteprintname;
var replyvoice = result.replyvoice;
_this.callbackMethod = result.callbackMethod;//打印页面回调方法
robotsdk.printFile({
filetype: "doc", //文件类型
base64: base64Byte, //文件内容base64字符串
remoteprintname: remoteprintname, //远程打印机名称
replyvoice: replyvoice, //打印提示语音
callback: "printCallback" //接口回调函数
})
}
//读取身份证
else if ('readIDCard' == data.action){
var result = data.result;
var remindvoice = result.remindvoice;
robotsdk.readIDCard({
remindvoice: remindvoice, //播放的声音内容
callback: "IDCardCallback" //接口回调函数
})
}
//提示框
else if ('showMessage' == data.action){
var result = data.result;
var isOpen = result.isOpen;
var content = result.content;
var isAutoClose = result.isAutoClose;
robotsdk.showMessage({
isOpen: isOpen,//true 打开 false 关闭
content: content,//消息内容
isAutoClose: isAutoClose//true 5秒自动关闭 false 用户点确认关闭
});
}
})
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.self-container {
background-image: url('../../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow: auto;
height: 100%;
padding: 0;
margin: 0;
}
.print{
color: #ffffffc9;
font-size: 24px;
position: absolute;
bottom: 30%;
left: 50%;
transform: translate(-50%, -50%);
}
.gif {
position: relative;
padding: 0;
margin: 0;
}
</style>
<template>
<div class="home">
<img alt="Vue logo" src="../assets/logo.png">
<HelloWorld msg="Welcome to Your Vue.js App"/>
</div>
</template>
<style>
.home{
background-image: url('../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow:auto;
margin-bottom: 20px;
padding: 0 70px;
height:100%;
}
</style>
<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'
export default {
name: 'HomeView',
components: {
HelloWorld
}
}
</script>
<template>
<div class="self-container">
<div class="print-content"></div>
<div class="printing-word">
<p>您本次申报材料不符合审查要求,</p>
<p>您可以通过“一键呼叫”按钮,呼叫工作人员帮您进行人工审查。</p>
</div>
<div class="button">
<div class="oneCall" v-show="oneCalled" @click="oneCall"></div>
<div class="oneCall-not" v-show="!oneCalled" ></div>
<div class="skip" @click="skip"></div>
</div>
</div>
<count-down times=300 bottomOffset="10" rightOffset="10" fontSize="18" ref="child"></count-down>
<b-page @bPageLoaded="voiceCallback"></b-page>
</template>
<script>
import { layer } from "@layui/layer-vue";
import websocket from '../assets/js/websocket';
import commonUtil from "@/assets/js/commonUtil";
import BPage from "@/components/registerVoice";
export default {
components: {
BPage,
},
data() {
return {
userId: '',
batchId: '',
enterpriseId: '',
serviceId: '',
oneCalled: true,
received: false, //是否接收到审查结果,二维码扫描,websocket消息
success: false, //人工审查结果
artificialType:'0',
pageUrl:'' //表单页面地址
}
},
created() {
var caseData = this.$LocalStorage.SessionGet("caseData");
this.batchId = caseData.batchId;
this.serviceId = caseData.serviceId;
this.pageUrl = caseData.pageUrl;
this.userId = commonUtil.genUserId();
this.enterpriseId = caseData.enterpriseId;
this.$LocalStorage.SessionPut("caseData", caseData);
if(robotType){
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: '您本次申报材料不符合审查要求,您可以通过“一键呼叫”按钮,呼叫工作人员帮您进行人工审查。',
callback: ""
});
}
},
mounted () {
// 将Vue方法传到全局对象window中
window.receiveMsg = this.receiveMsg;
window.qrCodeCallback = this.qrCodeCallback;
window.playAudioCallback = this.playAudioCallback;
},
methods: {
oneCall() {
if(robotType){
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: '正在为您呼叫工作人员进行人工审查',
callback: ""
});
}
this.oneCalled = false;
var _this = this;
//发送小程序消息提醒协办员审查资料,发送成功同步创建websocket连接,接收小程序结果反馈
$.ajax({
type: "get",
url: window.config.api + 'lilo/wxIndex/subscribeMessageSendXBY',
async: false, //改为同步请求
data: {enterpriseId: this.enterpriseId, batchId: this.batchId, userId: this.userId, msgType: '1'},
/*data: {enterpriseId: "af5492d4417c44c280e480e5264b8846", batchId: "20221010155458756625", userId: this.userId, msgType: '1'},*/
success:function(data){
if(data.success){
//发送成功,等待协办员处理
_this.initWebSocket();
//打开二维码扫描
if(robotType){
robotsdk.openQRCode({
callback: "qrCodeCallback"
});
}
} else {
layer.msg("系统繁忙,请到窗口办理!", { time: 1500, icon: 3 });
console.log(data.msg);
}
},error: function(error){
layer.msg("系统繁忙,请到窗口办理!", { time: 1500, icon: 3 });
console.log(error);
}
})
},
skip() {
//进入预审结果页面
this.$router.push({ path: '/report'});
},
initWebSocket() {
websocket.openClick(this.userId);
},
receiveMsg(obj){
var type = obj.type;
var msg = obj.msg;
if('4' == type){ //类型 2.资料扫描下载 3 远程核验 4人工审查 5人工审查确认
this.$refs.child.counter = 300; //审查人员查看消息时,重置倒计时为300秒
if(robotType){
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: msg,
callback: ""
});
}
}
if('5' == type){ //类型 2.资料扫描下载 3 远程核验 4人工审查 5人工审查确认
this.qrCodeCallback(msg);
}
},
qrCodeCallback(obj){
if(!this.received){
this.received = true;
if(robotType){
robotsdk.closeQRCode();
}
var handleType = obj.split(",")[2]; //handleType 0通过 1不通过
var caseData = this.$LocalStorage.SessionGet("caseData");
this.artificialType = caseData.artificialType;
var msg = "";
if('0' == handleType){
msg = "经过人工审查,您的材料已通过";
caseData.success = true;
this.success = true;
} else {
msg = "经过人工审查,您的材料不通过";
caseData.success = false;
}
this.$LocalStorage.SessionPut("caseData", caseData);
if(robotType){
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: msg,
callback: "playAudioCallback"
});
}
}
},
playAudioCallback(){
if(this.success){
//是否远程核验
if(this.artificialType == '0'){
//是否需要表单页面
if(this.pageUrl != null){
this.$router.push({ path: '/dataView'});
} else {
this.$router.push({ path: '/report'});
}
} else {
this.$router.push({ path: '/remoteCheck'});//远程核验页面
}
} else {
//进入预审结果页面
this.$router.push({ path: '/report'});
}
},
//语音回调(只处理退出)
voiceCallback(res){
if (res=="quit"){
if(robotType){
robotsdk.closeExternalApp({
mode:0
});
}
}
}
}
}
</script>
<style scoped>
.self-container {
background-image: url('../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow: auto;
height: 100%;
padding: 0;
margin: 0;
}
.print-content {
background-image: url('../assets/images/ico/ico_warn.png');
background-repeat: no-repeat;
overflow: auto;
width: 204px;
height: 184px;
position: absolute;
top: 35%;
left: 50%;
transform: translate(-50%, -50%);
}
.printing-word{
width: 100%;
font-size: 26px;
color: #ffffff;
position: absolute;
bottom: 27%;
left: 50%;
transform: translate(-50%, -50%);
}
.button{
display: inline-flex;
position: fixed;
left: 50%;
bottom: 0;
transform: translate(-50%, 0);
}
.oneCall{
width: 300px;
height: 85px;
margin-right: 20px;
background-image: url('../assets/images/btn/btnCall.png');
background-repeat:no-repeat;
}
.oneCall-not{
width: 300px;
height: 85px;
margin-right: 20px;
background-image: url('../assets/images/btn/btnCall_Not.png');
background-repeat:no-repeat;
}
.skip{
width: 300px;
height: 85px;
background-image: url('../assets/images/btn/btnSkipReview.png');
background-repeat:no-repeat;
}
</style>
<template>
<div class="self-container">
<div class="title title1">
<span>资料正在审核:</span>
</div>
<div style="margin: 35px 18px 0px 70px;">
<template v-for="n in 50">
<div class="loaded" v-if="n <= loaded"></div>
<div class="loading" v-else></div>
</template>
</div>
<div class="content">
<div class="title title2">
<span>审核结果:</span>
</div>
<div style="margin: 0 18px 0 70px;">
<div class="layui-row">
<div class="layui-col-md5" v-for="(item, index) in tempData" :key="item.fileId">
<div class="simpleItem">
<div class="imga">
<img class="img" :src="item.fileUrl" />
</div>
<div class="imga">
<img src="../assets/images/filebox2.png" />
</div>
<div class="imga">
<img :id="item.fileId" />
</div>
</div>
<div class="fileName">{{item.name}}</div>
</div>
</div>
</div>
<div class="button">
<div class="prePage prePage1" v-show="hasPre" @click="prePage"></div>
<div class="prePage prePage2" v-show="!hasPre" @click="prePage"></div>
<div class="nextPage nextPage1" v-show="hasNext" @click="nextPage"></div>
<div class="nextPage nextPage2" v-show="!hasNext"></div>
</div>
</div>
</div>
</template>
<script>
import commonUtil from '../assets/js/commonUtil';
import websocket from '../assets/js/websocket';
import abnormal from '../assets/images/ico/ico_abnormal.png';
import normal from '../assets/images/ico/ico_normal.png';
import {
layer
} from "@layui/layer-vue";
export default {
data() {
return {
pageSize: 10,
currentPage: 0,
totalPage: 1,
hasPre: false,
hasNext: false,
tempData: [],
totalNum: 0,
loaded: 0,
acceptHandler: '',
success: false,
artificialType: '0',
temp: {
serviceId: '',
projectId: '',
projectName: '',
userId: '',
batchId: '',
source: "1",
fileData: [],
name: '',
mobile: '',
idcard: ''
}
}
},
mounted() {
// 将Vue方法传到全局对象window中
window.receiveMsg = this.receiveMsg;
},
created() {
var caseData = this.$LocalStorage.SessionGet("caseData");
Object.assign(this.temp, caseData);
/*this.temp.fileData =JSON.parse(caseData.fileData);*/
this.temp.userId = commonUtil.genUserId();
this.temp.batchId = commonUtil.genRanNo();
this.totalNum = this.temp.fileData.length;
this.temp.totalNum = this.totalNum;
this.totalPage = Math.ceil(this.totalNum / this.pageSize);
this.hasNext = this.totalPage > 1 ? true : false;
this.initTemp();
this.initWebSocket(this.temp.userId);
this.accept();
if (robotType) {
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: '资料正在核验中,请稍等片刻!',
callback: ""
});
}
},
methods: {
initTemp() {
var _this = this;
this.acceptHandler = setInterval(function() {
_this.loaded++;
if (_this.loaded == 51) {
_this.loaded = 0;
}
}, 500);
this.nextPage();
},
initWebSocket(userId) {
console.log("userId:" + userId);
websocket.openClick(userId);
},
accept() {
$.ajax({
type: "post",
url: window.config.rocrUrl + 'lilo/aiCase/accept',
async: false, //改为同步请求
data: {
jsonData: JSON.stringify(this.temp)
},
success: function(data) {
if (data.success) {
console.log("提交成功");
} else {
layer.msg("系统繁忙,请到窗口办理!", {
time: 1500,
icon: 3
});
console.log(data.msg);
}
},
error: function(error) {
layer.msg("系统繁忙,请到窗口办理!", {
time: 1500,
icon: 3
});
console.log(error);
}
})
},
receiveMsg(obj) {
clearInterval(this.acceptHandler);
//保存到缓存中
Object.assign(this.temp, obj);
delete this.temp.userId;
this.$LocalStorage.SessionPut("caseData", this.temp);
this.success = obj.success;
this.artificialType = obj.artificialType;
var errors = obj.errors;
var pageUrl = obj.pageUrl; //表单页面地址
var isPrintWord = obj.isPrintWord; //是否不走页面表单打印word
var map = new Map();
//返回结果fileId有重复,需要去重,当重复时,其中一个为false时当前资料为false
for (var i = 0, e = errors.length; i < e; i++) {
var errorType = errors[i].errorType;
var fileId = errors[i].fileId;
if (fileId != '') {
var flag = map.has(fileId);
if (flag) {
var errorType2 = map.get(fileId);
if (errorType != errorType2 && errorType == 2) {
map.set(fileId, errorType);
}
} else {
map.set(fileId, errorType);
}
}
}
//实现进度条效果
var length = 1;
if (map.size > 0){
length = map.size;
}
var keys = map.keys();
var t = 0;
var times = this.loaded;
var _this = this;
var handler = setInterval(function() {
if (_this.loaded == times) {
t++;
times = Math.ceil(t / length * 50) > _this.loaded ? Math.ceil(t / length * 50) : _this.loaded + 1;
var runHandler = setInterval(function() {
_this.loaded++;
if (_this.loaded == times) {
var key = keys.next().value;
var value = map.get(key);
if (value == 2) {
$("#" + key).attr("src", abnormal);
} else if (value == 0) {
$("#" + key).attr("src", normal);
}
clearInterval(runHandler);
}
}, 100);
if (t == length) {
clearInterval(handler);
//验证结束页面停留几秒后跳转
setTimeout(function() {
if (_this.success) { //预审通过
if ('0' == _this.artificialType) { //等于0不需要远程核验
//判断是否需要表单页面
if (pageUrl != null) {
_this.$router.push({
path: '/dataView'
});
} else {
if (isPrintWord == '1') { //需要打印word
_this.$router.push({
path: '/print'
});
} else {
_this.$router.push({
path: '/report'
});
}
}
} else {
//需要远程核验
var artificialData = [];
var artificialFiles = [];
for (var i = 0, t = _this.temp.fileData.length; i < t; i++) {
var artificialType = _this.temp.fileData[i].artificialType;
if ('0' != artificialType) {
artificialData.push(_this.temp.fileData[i].type);
artificialFiles.push(_this.temp.fileData[i].name);
}
}
var caseData = this.$LocalStorage.SessionGet("caseData");
caseData.artificialData = artificialData.join(",");
caseData.artificialFiles = artificialFiles.join(",");
_this.$LocalStorage.SessionPut("caseData", caseData);
if (artificialData.length > 0) {
_this.$router.push({
path: '/remoteCheck'
}); //远程核验页面
} else {
_this.$router.push({
path: '/report'
});
}
}
} else { //预审不通过
_this.$router.push({
path: '/auditTips'
});
}
}, 10 * 1000)
}
}
}, 100);
},
prePage() {
this.tempData = [];
if (this.currentPage > 1) {
for (var i = 0; i < this.pageSize; i++) {
var index = (this.currentPage - 2) * this.pageSize + i;
if (index < this.totalNum) {
this.tempData[i] = this.temp.fileData[index];
}
}
this.currentPage = (this.currentPage - 1) > 0 ? this.currentPage - 1 : this.currentPage;
}
this.show();
},
nextPage() {
this.tempData = [];
if (this.currentPage < this.totalPage) {
for (var i = 0; i < this.pageSize; i++) {
var index = this.currentPage * this.pageSize + i;
if (index < this.totalNum) {
this.tempData[i] = this.temp.fileData[index];
}
}
this.currentPage = (this.currentPage + 1) <= this.totalPage ? this.currentPage + 1 : this.currentPage;
}
this.show();
},
show() {
if (this.currentPage < this.totalPage) {
this.hasNext = true;
} else {
this.hasNext = false;
}
if (this.currentPage > 1) {
this.hasPre = true;
} else {
this.hasPre = false;
}
}
},
unmounted() {
if (this.acceptHandler) {
clearInterval(this.acceptHandler);
}
}
}
</script>
<style scoped>
.loading {
float: left;
width: 17px;
height: 33px;
margin: 0 3px 0 3px;
background: #0961D2;
}
.loaded {
float: left;
width: 17px;
height: 33px;
margin: 0 3px 0 3px;
background: #07F6EC;
}
.self-container {
background-image: url('../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow: auto;
height: 100%;
padding: 0;
margin: 0;
}
.title {
height: 67px;
line-height: 67px;
color: #ffffff;
font-size: 26px;
text-align: center;
margin-top: 15px;
}
.title1 {
margin-top: 30px;
width: 299px;
background-image: url('../assets/images/title2.png');
background-repeat: no-repeat;
background-size: cover;
}
.title2 {
width: 228px;
background-image: url('../assets/images/title3.png');
background-repeat: no-repeat;
background-size: cover;
}
.layui-row {
margin: 20px 0;
}
.layui-col-md5 {
width: 229px;
}
.simpleItem {
width: 100%;
height: 133px;
}
.img {
width: 211px;
height: 115px;
}
.imga {
position: absolute;
left: 50%;
top: 39%;
transform: translate(-50%, -50%);
}
.content {
margin-top: 11%;
}
.fileName {
color: #ffffff;
font-size: 18px;
margin: 10px 30px 0 30px;
height: 54px;
}
.button {
width: 100%;
position: absolute;
top: 52%;
}
.prePage {
width: 34px;
height: 164px;
background-repeat: no-repeat;
float: left;
margin-left: 20px;
}
.prePage1 {
background-image: url('../assets/images/btn/btnLeft.png');
}
.prePage2 {
background-image: url('../assets/images/btn/btnLeft2.png');
}
.nextPage {
width: 34px;
height: 164px;
background-repeat: no-repeat;
float: right;
margin-right: 20px;
}
.nextPage1 {
background-image: url('../assets/images/btn/btnRight.png');
}
.nextPage2 {
background-image: url('../assets/images/btn/btnRight2.png');
}
</style>
\ No newline at end of file
<template>
<div class="report">
<el-container>
<el-aside width="21%">
<div class="robot"></div>
<div class="text">
<p style="font-size: 40px;">{{robotName}}</p>
<p style="font-size: 24px;">
<span style="margin-right: 10px;">工号:</span>
<span>{{serviceId}}</span>
</p>
</div>
<div class='star'>
<ul>
<li class="active" v-for="i of stars"></li>
<li class="halfstar" v-if="halfStar > 0"></li>
<li class="littel-whitestar" v-for="t of (5 - stars - halfStar)"></li>
</ul>
</div>
</el-aside>
<el-aside class="line" ></el-aside>
<el-main width="70%">
<div class="title">
<p>请您参加政务服务“好差评”</p>
</div>
<div class="hint">
<p>您对我本次的服务还满意吗?您可以对我进行评价哦!</p>
</div>
<div class='right'>
<ul>
<template v-for="(dict, index) of dicts">
<li :class="'li' + dict.code" @click="getEvaluateDictDetail(dict)">
<span>{{dict.name}}</span>
</li>
</template>
</ul>
</div>
<div class="evaluationContent" v-show="show">
<div class="reason" :class="[confirmed === true ? 'divReadOnly' : '' ]">
<p>{{reasonName}}的具体原因:</p>
<ul>
<template v-for="(reason, index) of reasons">
<li :class="{'active':reason.active}" @click="changeSelect(reason, index)">
<span>{{reason.name}}</span>
</li>
</template>
</ul>
</div>
<div class='btns'>
<button class='confirm' @click="confirm" :class="[confirmed === true ? 'divReadOnly confirmed' : 'unconfirm' ]">确认</button>
<button class='close' @click="close">取消</button>
</div>
</div>
</el-main>
</el-container>
</div>
<count-down times=300 bottomOffset="10" rightOffset="10" fontSize="18" ref="child"></count-down>
<b-page @bPageLoaded="voiceCallback"></b-page>
</template>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.report{
background-image: url('../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow:auto;
height:100%;
}
.divReadOnly{
pointer-events: none;
}
.robot{
width: 157px;
height: 181px;
background-image: url('../assets/images/ico/robot.png');
background-repeat: no-repeat;
overflow:auto;
position: absolute;
top: 37%;
left: 11%;
transform: translate(-50%, -50%);
}
.text{
color: white;
position: relative;
top: 392px;
}
.text p{
margin-bottom: 3px;
}
.star{
position: relative;
top: 400px;
}
.star ul{
width: 100%;
padding: 0;
text-align: center;
}
.star li{
display: inline-block;
width:28px;
height:27px;
margin: 0 5px;
}
.star li.active{
background-image: url('../assets/images/ico/yellowstar.png');
background-repeat: no-repeat;
overflow:auto;
}
.star li.halfstar{
background-image: url('../assets/images/ico/halfstar.png');
background-repeat: no-repeat;
overflow:auto;
}
.star li.littel-whitestar{
background-image: url('../assets/images/ico/littelWhitestar.png');
background-repeat: no-repeat;
overflow:auto;
}
.line{
width: 5px;
height: 605px;
margin-top: 100px;
background-image: url('../assets/images/337.png');
background-repeat: no-repeat;
overflow:auto;
}
.title{
color: #ffffff;
font-size:40px;
height: 200px;
line-height: 200px;
}
.hint{
color: #ffffff;
font-size:24px;
position: relative;
top: 50px;
}
.right{
position: relative;
top: 115px;
}
.right ul{
margin: 0;
padding: 0;
}
.right ul li{
display: inline-block;
height: 163px;
width: 163px;
margin: 5px 13px;
}
.right ul li span{
color: #ffffff;
font-size:21px;
position: relative;
top: 113px;
}
.right ul li.li5{
background-image: url('../assets/images/ico/greatSatisfaction.png');
}
.right ul li.li4{
background-image: url('../assets/images/ico/satisfaction.png');
}
.right ul li.li3{
background-image: url('../assets/images/ico/BasicSatisfaction.png');
}
.right ul li.li2{
background-image: url('../assets/images/ico/NotSatisfied.png');
}
.right ul li.li1{
background-image: url('../assets/images/ico/VeryDissatisfied.png');
}
.el-container {
width: 100%;
height: 100%;
}
.el-main {
padding: 0;
}
/********************************************评价原因框************************************************/
.evaluationContent{
background-color:rgba(0,0,0,0.64);
position:absolute;
top:0;
bottom:0;
left:0;
right:0;
display:block;
}
.evaluationContent .reason{
color:#4787d6;
text-align: center;
padding:30px 50px;
margin:0 75px;
border-radius:10px;
background:rgba(255,255,255,0.8);
}
.evaluationContent .reason>p{
color:#27a4fd;
text-align: left;
font-size:32px;
line-height:40px;
width:100%;
}
.evaluationContent .reason ul{
margin: 0;
padding: 0;
font-size:24px;
color:#27a4fd;
overflow: hidden;
}
.evaluationContent .reason ul li{
float:left;
height:54px;
line-height: 54px;
padding:0 65px 0 30px;
border:2px solid #27a4fd;
border-radius: 27px;
margin-right:20px;
margin-top:18px;
background-image:url(../assets/images/gray-right.png);
background-repeat: no-repeat;
background-position: 95% center;
}
.evaluationContent .reason ul li.active{
color:#fff;
background-color:#2898fd;
background-image:url(../assets/images/white-right.png);
}
.btns{
text-align: center;
}
.confirm{
display:inline-block;
width:215px;
height:54px;
margin:25px auto;
line-height:54px;
color:#fff;
font-size:30px;
border-radius:10px;
border:none;
outline:none;
margin-right:10px;
}
.unconfirm{
background:#04bdfa;
}
.confirmed{
background:#aaa;
}
.close{
display:inline-block;
width:215px;
height:54px;
margin:25px auto;
line-height:54px;
color:#fff;
font-size:30px;
border-radius:10px;
border:none;
background:#aaa;
outline:none;
}
/**************************************************扫码******************************************************/
</style>
<script>
import { layer } from "@layui/layer-vue";
import BPage from "@/components/registerVoice";
export default{
components: {
BPage,
},
data() {
return {
robotName: '',
batchId: '',
serviceId: '',
stars: 5,
halfStar: 0,
dicts: [],
reasonName: '',
reasons:[],
show: false,
rootDict: {},
tempMap: new Map(),
confirmed: false
}
},
created() {
var caseData = this.$LocalStorage.SessionGet("caseData");
this.serviceId = caseData.serviceId;
this.batchId = caseData.batchId;
this.getEvaluateDict();
},
mounted () {
//将Vue方法传到全局对象window中
window.toIndex = this.toIndex;
if(robotType){
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: '您对我本次的服务还满意吗?您可以对我进行评价哦!',
callback: ""
});
}
},
methods:{
getEvaluateDict() {
var _this = this;
$.ajax({
type: "get",
url: window.config.api + 'lilo/evaluate/getEvaluateDict',
async: false, //改为同步请求
data: {serviceId: this.serviceId},
success:function(data){
if(data.success){
_this.robotName = data.obj.robotName;
_this.stars = data.obj.stars;
_this.halfStar = data.obj.halfStar;
_this.dicts = data.obj.dicts;
} else {
layer.msg("系统繁忙,请到窗口办理!", { time: 1500, icon: 3 });
console.log(data.msg);
}
},error: function(error){
layer.msg("系统繁忙,请到窗口办理!", { time: 1500, icon: 3 });
console.log(error);
}
})
},
getEvaluateDictDetail(dict) {
this.rootDict = dict;
this.reasonName = dict.name;
this.reasons = dict.children;
this.show = true;
this.$nextTick(function () {
var H=$('.reason').height();
$('.reason').css('margin-top',(806-H-54)/2);
})
},
changeSelect(reason,index) {
if(reason.active){
this.reasons[index]['active'] = false;
this.tempMap.delete(index);
}else{
this.reasons[index]['active'] = true;
this.tempMap.set(index, reason);
}
},
confirm() {
var _this = this;
var arr = [];
var obj = {};
var count = this.tempMap.size;
if(count == 0){
layer.msg('请至少勾选一个评价理由!', { time: 1500, icon: 3 })
} else {
this.confirmed = true;
this.tempMap.forEach(function(value,key){
obj = new Object();
obj.batchId = _this.batchId;
obj.evaluateId = value.id;
obj.evaluateValue = value.code;
arr.push(obj);
});
$.ajax({
type: 'post',
data: {
batchId: this.batchId,
evaluateId: this.rootDict.id,
evaluateValue: this.rootDict.code,
parentId:'0',
dicts:JSON.stringify(arr)
},
url: window.config.api + "lilo/evaluate/saveHandle",
success: function(result) {
if(result.success){
if(robotType){
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: '非常感谢您的评价,本次服务就要结束了哦!感谢您的使用!',
callback: "toIndex"
});
}
}else{
layer.msg("系统繁忙,请到窗口办理!", { time: 1500, icon: 3 });
console.log(result.msg);
}
},
error: function(err){
layer.msg("系统繁忙,请到窗口办理!", { time: 1500, icon: 3 });
console.log(err);
}
});
}
},
close() {
var _this = this;
this.show = false;
this.tempMap.forEach(function(value,key){
_this.reasons[key]['active'] = false;
});
this.tempMap.clear();
},
toIndex() {
if(robotType){
robotsdk.closeExternalApp({
mode:0
});
}
},
//语音回调(只处理退出)
voiceCallback(res){
if (res=="quit"){
this.toIndex();
}
}
}
}
</script>
\ No newline at end of file
<template>
<div class="report">
<div class="hint">
<p>选择{{evaluateName}}的具体原因</p>
</div>
<div class='right'>
<ul>
<template v-for="(dict, index) of dicts">
<li>
<div class="check"></div>
<span class="reason">{{dict.name}}</span>
</li>
</template>
</ul>
</div>
<div class="button">
<div class="nextStep" @click="nextStep"></div>
<div class="cancel" @click="cancel"></div>
</div>
</div>
</template>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.report{
background-image: url('../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow:auto;
height:100%;
}
.hint{
color: #ffffff;
font-size:40px;
position: relative;
top: 25px;
}
.right{
width: 1160px;
height: 85%;
position: relative;
top: 40px;
margin: 0 60px;
}
.right ul{
margin: 0;
padding: 0;
}
.right ul li{
float:left;
display: inline-block;
height: 80px;
width: 489px;
margin: 16px 45px;
background-image: url('../assets/images/evaluationblock.png');
}
.check{
float: left;
height: 34px;
width: 34px;
background-image: url('../assets/images/reservedbox.png');
position: relative;
top: 18px;
left: 40px;
}
.reason{
color: #ffffff;
font-size: 30px;
line-height: 65px;
}
.button{
display: inline-flex;
position: fixed;
left: 50%;
bottom: 0;
transform: translate(-50%, 0);
}
.cancel{
width: 300px;
height: 85px;
background-image: url('../assets/images/btn/btnCancel.png');
background-repeat:no-repeat;
}
.nextStep{
width: 300px;
height: 85px;
margin-right: 20px;
background-image: url('../assets/images/btn/btnConfirm.png');
background-repeat:no-repeat;
}
</style>
<script>
export default{
data() {
return {
evaluateId: '',
evaluateValue: '',
evaluateName: '',
dicts: [],
arr: []
}
},
created() {
this.evaluateId = this.$route.query.evaluateId;
this.evaluateValue = this.$route.query.evaluateValue;
this.evaluateName = this.$route.query.evaluateName;
var caseData = this.$LocalStorage.SessionGet("caseData");
this.batchId = caseData.batchId;
this.getEvaluateDictList();
},
methods:{
getEvaluateDictList() {
var _this = this;
$.ajax({
type: "get",
url: window.config.api + 'lilo/evaluate/getEvaluateDictList',
async: false, //改为同步请求
data: {parentId: this.evaluateId, useFlag:'1'},
success:function(data){
if(data.success){
_this.dicts = data.obj;
} else {
alert(data.msg);
}
},error: function(){
console.log("系统错误");
}
})
},
saveHandle() {
$.ajax({
type: 'post',
data: {
batchId: this.batchId,
evaluateId: this.evaluateId,
evaluateValue: this.evaluateValue,
parentId: '0',
dicts: JSON.stringify(arr)
},
url: ctx + "lilo/evaluate/saveHandle",
success: function(result) {
if(result.success){
alert("提交成功!");
}else{
alert("提交成功!");
}
},
error: function(err){
console.log("系统错误");
}
});
},
cancel() {
alert("111");
},
nextStep() {
alert("222");
}
}
}
</script>
\ No newline at end of file
<template>
<b-page @bPageLoaded="voiceCallback"></b-page>
<count-down times=100 bottomOffset="0" rightOffset="10" fontSize="16" ref="child"></count-down>
<template v-if="schedule == 0">
<div class="information">
<div style="padding-top: 5%;">
<div style="margin-top: 45px;">
<img src="../assets/images/baleremind.gif" >
</div>
<div style="margin-top: 45px;">
<font size="6" color="#FFFFFF">您本次申报一共提交了{{count+lastNum}}张资料,把资料放入资料袋中,拉上拉链。取出资料带左侧的塑料条,穿过拉链以及材料袋右侧孔洞,扣上塑料扣。然后将资料袋的二维码对准设备上的扫码区扫描</font>
</div>
</div>
</div>
</template>
<template v-else-if="schedule==1">
<div class="information">
<div style="padding-top: 5%;">
<div style="margin-top: 200px;">
<img style="width: 240px;height: 200px" src="../assets/images/ico/ico_warn.png" >
</div>
<div style="margin-top: 90px;">
<font size="6" color="#FFFFFF">抱歉这个资料袋暂时不能使用,请重新更换资料袋!</font>
</div>
<div style="position: absolute;margin-left: 248px;margin-top: 90px;">
<img style="width: 90%;" src="../assets/images/btn/btnConfirm.png" @click="confirmClick" id="confirm">
</div>
<div style="position: absolute;margin-left: 600px;margin-top: 90px;">
<img style="width: 90%;" src="../assets/images/btn/btnCancel.png" @click="cancelClick" id="cancel">
</div>
</div>
</div>
</template>
<template v-else-if="schedule==2">
<div class="information">
<div style="padding-top: 5%;">
<div style="margin-top: 10px;">
<img style="width: 500px;height: 500px" src="../assets/images/deliverremind2.gif" >
</div>
<div style="margin-top: 90px;">
<font size="6" color="#FFFFFF">扫描完后,将材料袋投递到设备的文件投递柜中即可。</font>
</div>
</div>
</div>
</template>
<template v-else-if="schedule==3">
<div class="information">
<div style="padding-top: 5%;">
<div style="margin-top: 10px;">
<img style="width: 500px;height: 500px" src="../assets/images/deliverremind2.gif" >
</div>
<div style="margin-top: 90px;">
<font size="6" color="#FFFFFF">抱歉,递送机器人暂无空闲,请您将资料投递在资料柜中!!</font>
</div>
</div>
</div>
</template>
<template v-else-if="schedule==4">
<div class="information">
<div style="padding-top: 5%;">
<div style="margin-top: 45px;">
<img style="margin-top: 73px;margin-left: -801px;width: 410px;height: 450px" src="../assets/images/robot.gif" >
</div>
<div style="margin-top: -387px;margin-left: 435px;">
<font size="6" color="#FFFFFF">机器人易小递正在火速赶来,请耐心等待一下哦!</font>
<br>
<br>
<br>
<font size="6" color="#FFFFFF">开柜密码: {{putCode}}</font>
</div>
</div>
</div>
</template>
<template v-else-if="schedule==5">
<div class="information">
<div style="padding-top: 5%;">
<div style="margin-top: 45px;">
<img style="margin-top: 73px;margin-left: -801px;width: 410px;height: 450px" src="../assets/images/robot.gif" >
</div>
<div style="margin-top: -387px;margin-left: 435px;">
<font size="6" color="#FFFFFF">机器人易小递正在火速赶来,请耐心等待一下哦!</font>
<br>
<br>
<br>
<font size="6" color="#FFFFFF">开柜密码: {{putCode}}</font>
<br>
<br>
<br>
<font size="6" color="#FFFFFF">输入密码后,将资料袋放入递送机器人中</font>
</div>
</div>
</div>
</template>
<template v-else-if="schedule==6">
<div class="information">
<div style="padding-top: 5%;">
<div style="margin-top: 200px;">
<img style="width: 90px;height: 90px" src="../assets/images/wait.gif" >
</div>
<div style="margin-top: 50px;">
<font size="6" color="#FFFFFF">正在为您打印回执单!</font>
</div>
</div>
</div>
</template>
<template v-else-if="schedule==7">
<div class="information">
<div style="padding-top: 5%;">
<div style="margin-top: 272px;">
<font size="6" color="#FFFFFF">回执单打印成功!</font>
</div>
</div>
</div>
</template>
</template>
<style scoped>
.information{
background-image: url('../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow:auto;
margin-bottom: 20px;
padding: 0 70px;
height:100%;
}
</style>
<script>
import { layer } from "@layui/layer-vue";
import websocket from "@/assets/js/websocket";
import commonUtil from "@/assets/js/commonUtil";
import BPage from "@/components/registerVoice";
export default{
components: {
BPage,
},
data() {
return {
count:'',
lastNum:"",
serviceId:'',
batchId:'',
projectId: '',
schedule:'',
putCode:"",
userId:"",
res:"",
}
},
created() {
let caseData = this.$LocalStorage.SessionGet("caseData");
if (caseData.lastNum==undefined || caseData.lastNum==null || caseData.lastNum==""){
this.lastNum = 0;
}else {
this.lastNum = caseData.lastNum;
}
this.count = caseData.totalNum;
this.projectId = caseData.projectId;
this.batchId = caseData.batchId;
this.serviceId = caseData.serviceId;
this.enterpriseId = caseData.enterpriseId;
this.isReceipt = caseData.isReceipt;
this.receiptData = caseData.receiptData;
this.userId = commonUtil.genUserId();
// this.enterpriseId = "1e64495836fb43fcacaf574ac67366be";
// this.serviceId = "S975104601";
// this.projectId = "8160784";
// this.batchId = "2022109112754844826";
// this.count = "3";
this.schedule = 0;
this.res = "";
this.isOpenRQCode = 1;//控制扫描枪是否扫描 0;不扫描 1:扫描
window.printReport = (res) => this.printReport(res);//打印回调
window.PlayAudio_printReportCallback = (res) => this.PlayAudio_printReportCallback(res);//打印回执单语音回调
window.QRCodeCallback = (res) => this.QRCodeCallback(res);//扫描二维码回调
window.RFIDCallback = (mode, code) => this.RFIDCallback(mode, code);//扫描RFID回调
window.receiveMsg = this.receiveMsg;//websocket回调
this.PlayAudio();
},
methods:{
timing(){//调试页面使用
let timer = setInterval(() => {
//需要定时执行的代码
this.schedule++;
console.log(this.schedule);
if (this.schedule>6){
this.schedule=6;
//清除多次执行定时器
clearInterval(timer)
// this.$router.push({ path: '/scanMaterial' , query: {projectId: this.projectId}});
}
},1)
},
PlayAudio(){
if (robotType) {
robotsdk.playAudio({
cmd: "cmd",
animation: 0,
videocontent: "您本次申报一共提交了" + (this.count+this.lastNum) + "张资料,把资料放入资料袋中,拉上拉链。取出资料带左侧的塑料条,穿过拉链以及材料袋右侧孔洞,扣上塑料扣。然后将资料袋的二维码对准设备上的扫码区扫描",
callback: ""
})
if (this.isOpenRQCode==1){
robotsdk.openQRCode({//开启扫描枪
callback: "QRCodeCallback"
})
}
}else {
this.timing();
}
},
//扫描二维码回调,(res:二维码编号)
QRCodeCallback(res) {
this.res = res;
if (this.isOpenRQCode==1){
// this.isOpenRQCode=0;//关闭扫描枪
console.info(res)
$.post(window.config.api + 'lilo/aiCase/checkByRfid', {
rfid:res
}).then(item => {
if (item.success) {//资料袋未被使用
console.info("进入绑定rfid")
this.stockpile(res);//办件绑定Rfid
}else {//资料袋已被使用
this.schedule=1;//页面显示控制
this.isOpenRQCode=1;//开启扫描枪
robotsdk.playAudio({
cmd: "cmd",
animation: 0,
videocontent: "抱歉这个资料袋暂时不能使用,请重新更换资料袋!",
callback: ""
})
}
})
}
},
//办件信息绑定Rfid
stockpile(res){
console.info(res)
$.post(window.config.api + 'lilo/aiCase/upRfidByBatchId', {
batchId:this.batchId,
rfid:res,
serviceId:this.serviceId,
status:"0"
}).then(item => {
console.info(item);
//二维码编号绑定rfid成功
if (item.success) {
robotsdk.closeQRCode();//关闭二维码扫描枪
this.queryBindList(res);//查询该政务中心是否配备递送机器人,绑定则跳呼叫递送机器人,没有绑定则跳存柜
}else {//资料袋不存在
this.schedule=1;//页面显示控制
robotsdk.playAudio({
cmd: "cmd",
animation: 0,
videocontent: "抱歉这个资料袋暂时不能使用,请重新更换资料袋!",
callback: ""
})
}
})
},
//查询该政务中心是否配备递送机器人、是否事项绑定了站点,都绑定则跳呼叫递送机器人,没有绑定则跳存柜
queryBindList(res){
$.post(window.config.api + 'lilo/aiCase/queryBindList', {
beBoundClient:this.serviceId
}).then(item => {
console.info(item);
if (item.success) {//接口调用成功
if (item.obj==null || item.obj.length==0){//没有绑定递送
this.deposit(res);//存柜
}else {//绑定了递送
$.post(window.config.api + 'lilo/nineRobot/isBandStation', {//查询事项是否绑定了站点
projectId:this.projectId
}).then(item => {
if (item.success) {//接口调用成功
if (item.obj.isBandStation){//事项绑定了站点
this.delivering(res);//递送流程
}else {//事项没有绑定站点
this.deposit(res);//存柜
}
}else {//接口调用失败
this.$router.push({ path: '/errorPage'});//转跳错误提示页面
}
})
}
}else {//接口调用失败
this.$router.push({ path: '/errorPage'});//转跳错误提示页面
}
})
},
//存柜流程
//存柜
deposit(res){
this.schedule=2;//页面显示控制
robotsdk.playAudio({
cmd: "cmd",
animation: 0,
videocontent: "扫描完后,将材料袋投递到设备的文件投递柜中即可。",
callback: ""
})
let obj = robotsdk.startRFIDRead({//打开RFID扫描
code: res,
callback: "RFIDCallback"
})
},
//RFID扫描回调
RFIDCallback(mode, code){
$.post(window.config.api + 'lilo/aiCase/upRfidByBatchId', {//修改办件状态为存柜状态
batchId:this.batchId,
rfid:code,
serviceId:this.serviceId,
status:"1"
}).then(item => {
console.info(item);
if (this.isReceipt=="0"){//不打回执单
this.$router.push({ path: '/evaluation'});//跳转到好差评页面
}else {//打回执单
this.printReceipt();
}
})
},
confirmClick(){
this.schedule=0;
this.isOpenRQCode=1;
robotsdk.playAudio({
cmd: "cmd",
animation: 0,
videocontent: "将资料袋的二维码对准设备上的扫码区扫描",
callback: ""
})
},
//点击取消
cancelClick(){
if(robotType){
//退出到咨询页面
robotsdk.closeExternalApp({
mode:0
});
}
},
//递送流程
//递送流程——下发运单
delivering(res){
this.initWebSocket();
$.post(window.config.api + 'lilo/nineRobot/createTask', {//下发运单
enterpriseId:this.enterpriseId,
serviceId:this.serviceId,
projectId:this.projectId,
batchId:this.batchId,
userId:this.userId,
}).then(item => {
console.info(item);
if (item.success) {
//是否有空闲机器人
if(item.obj.isIdle) {//有空闲则下发运单
this.putCode = item.obj.putCode;//获取放件码
this.schedule=4;//页面显示控制
robotsdk.playAudio({
cmd: "cmd",
animation: 0,
videocontent: "机器人易小递正在火速赶来,请耐心等待一下哦!",
callback: ""
})
var date = new Date();
console.log("建立链接时间="+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds());
} else {//没有空闲
this.schedule=3;//页面显示控制
robotsdk.playAudio({
cmd: "cmd",
animation: 0,
videocontent: "抱歉,递送机器人暂无空闲,请您将资料投递在资料柜中!",
callback: ""
})
//打开RFID扫描
let obj = robotsdk.startRFIDRead({
code: res,
callback: "RFIDCallback"
})
}
}else {//接口调用失败
// this.$router.push({ path: '/errorPage'});//转跳错误提示页面
}
})
},
initWebSocket() {
websocket.openClick(this.userId);
},
receiveMsg(obj){
let _taskId = obj.taskId;
let timer;
console.log(obj.taskStatus);
if ("Waiting"==obj.taskStatus){
timer = setTimeout(() => {
//需要定时执行的代码
this.schedule=3;//页面显示控制
robotsdk.playAudio({
cmd: "cmd",
animation: 0,
videocontent: "抱歉,递送机器人暂无空闲,请您将资料投递在资料柜中!",
callback: ""
})
$.post(window.config.api + 'lilo/nineRobot/cancelTask', {//取消订单
enterpriseId:this.enterpriseId,
taskId:_taskId,
}).then(item => {
console.log(item);
})
//打开RFID扫描
let obj = robotsdk.startRFIDRead({
code: this.res,
callback: "RFIDCallback"
})
},8000)
}
if ("Taking"==obj.taskStatus){//到达第一个取件点
this.schedule=5;//页面显示控制
robotsdk.playAudio({
cmd: "cmd",
animation: 0,
videocontent: "输入密码后,将资料袋放入递送机器人中!",
callback: ""
})
}
if ("Delivering"==obj.taskStatus){//取到件
$.post(window.config.api + 'lilo/aiCase/robotPickup', {//修改办件状态为存柜状态
batchId:this.batchId,
status:"3"//办件状态3为存柜状态
}).then(item => {
console.info(item);
if (this.isReceipt=="0"){//不打回执单
this.$router.push({ path: '/evaluation'});//跳转到好差评页面
}else {//打回执单
this.printReceipt();
}
})
}
},
//打印回执流程
//打印回执
printReceipt(){
if(robotType){
$.post(window.config.rocrUrl + 'lilo/aiCase/callReceipt', {//打印回执单接口
receiptData:this.receiptData,
}).then(item => {
console.info(item);
if (item.success) {//接口调用成功
this.schedule=6;//页面显示控制
robotsdk.printFile({
filetype: 'doc',
base64: item.obj.base64Byte,
remoteprintname: item.obj.remotePrintName,
replyvoice: '请稍等,正在为您打印!',
callback: "printReport"
});
}else {//接口调用失败
this.$router.push({ path: '/errorPage'});//转跳错误提示页面
}
})
}
},
//打印回执回调
printReport(bool){
if (bool){//打印成功返回true
this.schedule=7;
robotsdk.playAudio({
cmd: "cmd",
animation: 0,
videocontent: "回执单打印成功",
callback: "PlayAudio_printReportCallback"
})
}else {
this.$router.push({ path: '/errorPage',query: {msg: '回执单打印失败'}});//转跳错误提示页面
}
},
//"回执单打印成功_语音回调"
PlayAudio_printReportCallback(res){
if (res=="cmdOK") {
let timer = setInterval(() => {
//需要定时执行的代码
this.$router.push({ path: '/evaluation'});//语音播报完2秒后跳转到好差评页面
},2000)
}
},
//语音回调(只处理退出)
voiceCallback(res){
if (res=="quit"){
this.cancelClick();
}
}
}
}
</script>
\ No newline at end of file
<template xmlns="http://www.w3.org/1999/html">
<b-page @bPageLoaded="voiceCallback"></b-page>
<count-down times=300 bottomOffset="0" rightOffset="10" fontSize="16" ref="child"></count-down>
<div class="inquiryUnemployment">
<div style="padding-top: 18%;">
<div style="margin-top: 45px;">
<font size="6" color="#FFFFFF">失业原因为"被单位辞退"或"劳动合同到期"才能办理失业金申领!<br><br>
若您的失业原因符合要求,请您点击下一步!<br><br>
若您的失业原因不符合要求,请您点击取消!</font>
</div>
<div style="position: absolute;margin-left: 248px;margin-top: 170px;">
<img style="width: 90%;" src="../assets/images/btn/btnCancel.png" @click="quit" id="confirm">
</div>
<div style="position: absolute;margin-left: 600px;margin-top: 170px;">
<img style="width: 90%;" src="../assets/images/btn/btnNext.png" @click="nextClick" id="cancel">
</div>
</div>
</div>
</template>
<style scoped>
.inquiryUnemployment{
background-image: url('../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow:auto;
margin-bottom: 20px;
padding: 0 70px;
height:100%;
}
</style>
<script>
import BPage from "@/components/registerVoice";
export default{
components: {
BPage,
},
data() {
return {
projectId: '',//事项ID
serviceId: '',//机器人ID
projectName:'',//事项名称
}
},
created() {
this.projectId = this.$route.query.projectId;
this.serviceId = this.$route.query.serviceId;
this.projectName = this.$route.query.projectName;
this.playAudio();
},
methods:{
playAudio(){
if(robotType){
robotsdk.playAudio({
cmd: "cmd",
animation: 0,
videocontent: "失业原因为被单位辞退或劳动合同到期才能办理失业金申领。若您的失业原因符合要求,请您点击下一步。若您的失业原因不符合要求,请您点击取消。",
callback: ""
})
}
},
//点击下一步
nextClick(){
if(robotType){
this.$router.push({ path: '/userSelect',query: {projectId: this.projectId ,serviceId:this.serviceId, projectName:this.projectName}});//转跳身份选择页面
}
},
//点击取消
quit(){
if(robotType){
robotsdk.closeExternalApp({
mode:0
});
}
},
//语音回调(只处理下一步和退出)
voiceCallback(res){
if (res=="nextStep"){
this.nextClick();
}
if (res=="quit"){
if(robotType){
robotsdk.closeExternalApp({
mode:0
});
}
}
}
}
}
</script>
\ No newline at end of file
<template>
<b-page @bPageLoaded="voiceCallback"></b-page>
<count-down times=300 bottomOffset="10" rightOffset="10" fontSize="24" ref="child"></count-down>
<div class="material">
<div style="padding-top: 5%;">
<ul class="title" >
<li style="width: 10%">序号</li>
<li style="width: 20%">资料名称</li>
<li style="width: 55%">资料要求或说明</li>
</ul>
</div>
<template v-if="materials&&materials.length > 0">
<div class="content" v-for="(material, index) in materials">
<div style="width: 10%;text-align:left;margin-left: 6%">{{index+1}}</div>
<div style="width: 30%;text-align:left;margin-left: 2%" v-if="material.name!='身份证'">{{material.name}}</div>
<div style="width: 30%;text-align:left;margin-left: 2%" v-if="userType=='0'&&material.name=='身份证'">{{material.name}} (本人)</div>
<div style="width: 30%;text-align:left;margin-left: 2%" v-if="userType=='1'&&material.name=='身份证'">{{material.name}} (法人)</div>
<div style="width: 50%;text-align:left;margin-left: 3.8%">{{material.description}}</div>
</div>
</template>
<template v-else>
<div class="content">
<div style="width: 100%;text-align:center;">暂无数据</div>
</div>
</template>
<div style="height: 100px;">
&nbsp;
</div>
<div style="position: fixed;bottom: 80px;width: 98%;">
<div style="position: absolute;margin-left: 80px;padding-top: 10px;" v-show='isCancel'>
<input type="checkbox" style="height: 24px;width: 24px;" id="isRead"/>
<font size="5" color="#FFFFFF"> 我已阅读</font>
</div>
<div style="position: absolute;margin-left: 250px;" v-show='isCancel'>
<img style="width: 80%;" :src="cancelSrc" @click="cancelClick" id="cancel">
</div>
<div style="position: absolute;margin-left: 530px;">
<img style="width: 80%;" src="../assets/images/btn/btnConfirm.png" @click="confirmClick" id="confirm">
</div>
</div>
</div>
</template>
<style scoped>
.material{
background-image: url('../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow:auto;
margin-bottom: 20px;
padding: 0 70px;
height:100%;
}
.title li{
float:left;
color: #ffffff;
font-size: 24px;
text-align:center;
padding-top:10px;
}
.title{
background-image: url('../assets/images/materialsDetailTr.png');
background-repeat:no-repeat;
background-size:100% 100%;
height:50px;
}
.content div{
color: #ffffff;
font-size: 24px;
padding-top: 10px;
padding-bottom: 10px;
}
.content{
margin-top:1%;
background-image: url('../assets/images/materialsDetailTd.png');
background-repeat:no-repeat;
background-size:100% 100%;
display:flex;
flex-direction:row;
}
</style>
<script>
import { layer } from "@layui/layer-vue";
import BPage from "@/components/registerVoice";
export default{
components: {
BPage,
},
data() {
return {
isCancel: true,
count:0,
projectId: '',
materials: [],
userType: "0"//用户类型 0:本人 1:委托人
}
},
created() {
this.isCancel = this.$route.query.isCancel;
this.projectId = this.$LocalStorage.SessionGet("projectId");
this.userType=this.$LocalStorage.SessionGet("userType");
if(this.isCancel == 'false'){
this.isCancel = false;
}
if(this.isCancel == undefined){
this.isCancel = true;
}
this.getMaterials();
if(robotType && this.isCancel){
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: '进入资料扫描前,请您仔细阅读以下资料的扫描要求.',
callback: "PlayAudioCallback"
});
}
},
computed:{
cancelSrc(){
return this.count%2==0? require('../assets/images/btn/btnCancel.png'):require('../assets/images/btn/btnCancel_Not.png')
}
},
methods:{
getMaterials() {
let fileType="'0','1'";
if (this.$LocalStorage.SessionGet("scanType")==2||this.$LocalStorage.SessionGet("scanType")==undefined)
fileType='0'
this.$axios.get(window.config.api + 'lilo/aiCase/getMaterials', {
params: {
projectId : this.projectId,
fileType:fileType
}
}).then(item => {
if (item.data.success) {
this.materials = item.data.obj;
}
}).catch(err => {
this.msg = '错误';
})
},
cancelClick() {
if(robotType){
robotsdk.closeExternalApp({
mode:0
});
}
},
confirmClick() {
if (this.materials.length<1){
this.message("请联系管理员配置材料信息!");//提示框
}else{
this.$LocalStorage.SessionPut("materialsInfo",this.materials );
if(!$("#isRead").prop("checked") && this.isCancel){
this.$router.push({ path: '/materialRead'});
}else {
this.$router.push({ path: '/scanMaterial'});
}
}
},
message(content){
if (robotType) {
robotsdk.showMessage({//提示框
isOpen: true,//true 打开 false 关闭
content: content,//消息内容
isAutoClose: true//true 5秒自动关闭 false 用户点确认关闭
});
}
},
//语音回调(只处理退出)
voiceCallback(res){
if (res=="quit"){
this.cancelClick();
}
}
}
}
</script>
\ No newline at end of file
<template>
<b-page @bPageLoaded="voiceCallback"></b-page>
<count-down times=300 bottomOffset="10" rightOffset="10" fontSize="24" ref="child"></count-down>
<div class="material">
<div style="padding-top: 5%;">
<div style="margin-top: 20px;">
<img src="../assets/images/ico/ico_remind.png" >
</div>
<div style="margin-top: 30px;">
<font size="6" color="#FFFFFF">请您先仔细阅读资料的扫描要求!
<br>如您已阅读请点击"我已阅读"按钮继续办理。
<br>给您带来不便请谅解!</font>
</div>
</div>
<div style="height: 20px;">
&nbsp;
</div>
<div style="position: absolute;bottom: 80px;width: 98%;">
<div style="position: absolute;margin-left: 250px;">
<img style="width: 80%;" :src="cancelSrc" @click="cancelClick" id="cancel">
</div>
<div style="position: absolute;margin-left: 530px;">
<img style="width: 80%;" src="../assets/images/btn/btnRead.png" @click="confirmClick" id="confirm">
</div>
</div>
</div>
</template>
<style scoped>
.material{
background-image: url('../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow:auto;
margin-bottom: 20px;
padding: 0 70px;
height:100%;
}
</style>
<script>
import { layer } from "@layui/layer-vue";
import BPage from "@/components/registerVoice";
export default{
components: {
BPage,
},
data() {
return {
count:1,
projectId: '',
projectName:'',
serviceId:''
}
},
created() {
this.projectId = this.$LocalStorage.SessionGet("projectId");
this.serviceId = this.$LocalStorage.SessionGet("serviceId");
this.projectName=this.$LocalStorage.SessionGet("projectName");
},
computed:{
cancelSrc(){
return this.count%2==0? require('../assets/images/btn/btnCancel.png'):require('../assets/images/btn/btnCancel_Not.png')
}
},
methods:{
cancelClick() {
// alert("你点击了取消");
this.count++;
this.$router.go(-1);
},
confirmClick() {
//进入扫描页面
this.$router.push({ path: '/scanMaterial'});
},
//语音回调(只处理退出)
voiceCallback(res){
if (res=="quit"){
if(robotType){
robotsdk.closeExternalApp({
mode:0
});
}
}
}
}
}
</script>
\ No newline at end of file
<template>
<div class="self-container">
<div>
<div class="print-content">
<img :src="imgSrc" style="border-radius: 35px;">
</div>
<div class="printing-word">{{ wordTips }}</div>
</div>
</div>
</template>
<script>
import { layer } from "@layui/layer-vue";
import printGit from '../assets/images/print.gif';
export default {
data() {
return {
wordUrl: '',
wordTips: '',
base64: '',
imgSrc: printGit
}
},
created() {
var caseData = this.$LocalStorage.SessionGet("caseData");
this.wordUrl = encodeURIComponent(caseData.wordUrl);
this.wordTips = caseData.wordTips;
this.getBase64();
},
mounted () {
//将Vue方法传到全局对象window中
window.printReport = this.printReport;
window.printPdfSuccess = this.printPdfSuccess;
window.printPdfError = this.printPdfError;
if(this.base64 != '') {
robotsdk.printFile({
filetype: 'doc',
base64: this.base64,
remoteprintname: '',
replyvoice: this.wordTips,
callback: "printReport"
});
}
},
methods: {
getBase64() {
var _this = this;
$.ajax({
type: "get",
url: window.config.rocrUrl + 'lilo/aiCase/base64TransToFile',
async: false, //改为同步请求
data: {fileUrl: this.wordUrl, flag: true},
success:function(data){
if(data.success){
_this.base64 = data.obj;
} else {
layer.msg("系统繁忙,请到窗口办理!", { time: 1500, icon: 3 });
console.log(data.msg);
}
},error: function(error){
layer.msg("系统繁忙,请到窗口办理!", { time: 1500, icon: 3 });
console.log(error);
}
})
},
printReport(obj){
if (obj) {
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: '打印已完成,即将继续后续流程',
callback: "printPdfSuccess"
});
} else {
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: '打印机故障,暂时不能为您打印',
callback: "printPdfError"
});
}
},
//打印成功
printPdfSuccess(){
this.$router.push({ path: '/report'});
},
//打印失败
printPdfError(){
this.$router.push({ path: '/errorPage' , query: {msg: '暂时不能为您打印,即将回到咨询页面!'}});
}
}
}
</script>
<style scoped>
.self-container {
background-image: url('../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow: auto;
height: 100%;
padding: 0;
margin: 0;
}
.print-content {
width: 374px;
height: 294px;
position: absolute;
top: 35%;
left: 50%;
transform: translate(-50%, -50%);
}
.printing-word{
width: 100%;
height: 100%;
font-size: 26px;
color: #ffffff;
position: absolute;
top: 65%
}
</style>
<template>
<div class="self-container">
<div v-if="step=='1'">
<div class="print-content"></div>
<div class="printing-word">正在打印预审报告...</div>
</div>
<div v-if="step=='2'">
<div class="print-success-content"></div>
<div class="print-success-word">预审报告打印完成</div>
</div>
<div v-if="step=='3'">
<div class="print-error-content"></div>
<div class="print-error-word">暂时不能为您打印预审报告,您可以通过扫描二维码获取预审报告!</div>
</div>
</div>
</template>
<script>
import { layer } from "@layui/layer-vue";
export default {
data() {
return {
projectId: '',
fileUrl: '',
step: '1',
base64: '',
success: false
}
},
created() {
var caseData = this.$LocalStorage.SessionGet("caseData");
this.projectId = caseData.projectId;
this.fileUrl = caseData.fileUrl;
this.success = caseData.success;
this.getBase64();
},
mounted () {
//将Vue方法传到全局对象window中
window.printReport = this.printReport;
window.printPdfSuccess = this.printPdfSuccess;
window.printPdfError = this.printPdfError;
if(robotType){
if(this.base64 != ''){
robotsdk.printFile({
filetype: 'pdf',
base64: this.base64,
remoteprintname: '',
replyvoice: '正在打印预审报告...',
callback: "printReport"
});
}
}
},
methods: {
getBase64() {
var _this = this;
$.ajax({
type: "get",
url: window.config.rocrUrl + 'lilo/aiCase/base64TransToFile',
async: false, //改为同步请求
data: {fileUrl: this.fileUrl, flag: false},
success:function(data){
if(data.success){
_this.base64 = data.obj;
} else {
layer.msg("系统繁忙,请到窗口办理!", { time: 1500, icon: 3 });
console.log(data.msg);
}
},error: function(error){
layer.msg("系统繁忙,请到窗口办理!", { time: 1500, icon: 3 });
console.log(error);
}
})
},
printReport(obj){
if (obj) {
this.step='2';
if(robotType){
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: '预审报告已打印完成!',
callback: "printPdfSuccess"
});
}
} else {
this.step='3';
if(robotType){
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: '暂时不能为您打印预审报告,您可以通过扫描二维码获取预审报告!',
callback: "printPdfError"
});
}
}
},
//打印预审报告pdf成功
printPdfSuccess(){
var caseData = this.$LocalStorage.SessionGet("caseData");
caseData.printSuccess = true;
this.$LocalStorage.SessionPut("caseData", caseData);
if(this.success){
//预审成功进入装袋页面
this.$router.push({ path: '/information'});
} else {
//预审失败进入评价页面
this.$router.push({ path: '/evaluation'});
}
},
//打印预审报告pdf失败
printPdfError(){
var caseData = this.$LocalStorage.SessionGet("caseData");
caseData.printSuccess = false;
this.$LocalStorage.SessionPut("caseData", caseData);
this.$router.push({ path: '/report'});
}
}
}
</script>
<style scoped>
.self-container {
background-image: url('../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow: auto;
height: 100%;
padding: 0;
margin: 0;
}
.print-content {
background-image: url('../assets/images/print.png');
background-repeat: no-repeat;
overflow: auto;
width: 450px;
height: 367px;
position: absolute;
top: 45%;
left: 50%;
transform: translate(-50%, -50%);
}
.printing-word{
font-size: 26px;
color: #ffffff;
position: absolute;
bottom: 15%;
left: 50%;
transform: translate(-50%, -50%);
}
.print-success-content {
background-image: url('../assets/images/ico/ico_ok.png');
background-repeat: no-repeat;
overflow: auto;
width: 190px;
height: 190px;
position: absolute;
top: 45%;
left: 50%;
transform: translate(-50%, -50%);
}
.print-success-word{
font-size: 26px;
color: #ffffff;
position: absolute;
bottom: 28%;
left: 50%;
transform: translate(-50%, -50%);
}
.print-error-content {
background-image: url('../assets/images/ico/ico_warn.png');
background-repeat: no-repeat;
overflow: auto;
width: 204px;
height: 184px;
position: absolute;
top: 45%;
left: 50%;
transform: translate(-50%, -50%);
}
.print-error-word{
width: 100%;
font-size: 26px;
color: #ffffff;
position: absolute;
bottom: 28%;
left: 50%;
transform: translate(-50%, -50%);
}
</style>
<template>
<div class="self-container">
<div class="top">
<div class="left">
<div class="left-content">
<div ref="qrCodeDiv"></div>
</div>
</div>
<div class="right">
<div class="qrcode"></div>
</div>
</div>
<div class="word">
<p>您本次办理的{{projectName}}业务</p>
</div>
<div class="word word-bottom">
<p>其中“{{files}}”资料需要进行远程核验,请您扫描二维码进行确认,确认后请您前往等候区等候。</p>
</div>
</div>
</template>
<script>
import { layer } from "@layui/layer-vue";
import QRCode from 'qrcodejs2';
import commonUtil from '../assets/js/commonUtil';
import websocket from '../assets/js/websocket';
export default {
data() {
return {
projectName: '',
batchId: '',
type: '',//需要远程核验的材料类型
files:'',//需要远程核验的材料名称
urllink: '',//二维码内容
userId: '',
}
},
created() {
var caseData = this.$LocalStorage.SessionGet("caseData");
this.projectName = caseData.projectName;
this.batchId = caseData.batchId;
this.userId = commonUtil.genUserId();
this.type = caseData.artificialData;
this.files = caseData.artificialFiles;
var text = "您本次办理的"+ this.projectName+ "业务,其中“"+ this.files +"”资料需要进行远程核验,请您扫描二维码进行确认,确认后请您前往等候区等候。";
if(robotType){
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: text,
callback: ""
});
}
this.initWebSocket(this.userId);
this.generateUrllink();
},
mounted: function () {
this.$nextTick(function () {
this.bindQRCode();
});
// 将Vue方法传到全局对象window中
window.receiveMsg = this.receiveMsg;
window.playAudioCallback = this.playAudioCallback;
},
methods: {
bindQRCode() {
new QRCode(this.$refs.qrCodeDiv, {
text: this.urllink,
width: 270,
height: 270,
colorDark: "#FFFFFF", //二维码颜色
colorLight: "#02E2FC", //二维码背景色
correctLevel: QRCode.CorrectLevel.L//容错率,L/M/H
})
},
initWebSocket(userId) {
console.log("userId:" + userId);
websocket.openClick(userId);
},
generateUrllink() {
var _this = this;
$.ajax({
type: "get",
url: window.config.api + 'lilo/wxIndex/generateUrllink',
async: false, //改为同步请求
data: {batchId: this.batchId, type: this.type, msgType: '1', userId: this.userId},
success:function(data){
if(data.success){
_this.urllink = data.obj;
} else {
layer.msg("系统繁忙,请到窗口办理!", { time: 1500, icon: 3 });
console.log(data.msg);
}
},error: function(error){
layer.msg("系统繁忙,请到窗口办理!", { time: 1500, icon: 3 });
console.log(error);
}
})
},
receiveMsg(obj){
var type = obj.type;
var msg = obj.msg;
if('3' == type){ //类型 2.资料扫描下载 3 远程核验 4人工审查 5人工审查确认
if(robotType){
robotsdk.playAudio({
cmd: 'playAudio',
animation: 0,
videocontent: "远程核验通知已经送达到工作人员,请到等待区等待审核结果。",
callback: "playAudioCallback"
});
}
}
},
playAudioCallback(){
robotsdk.closeExternalApp({
mode:0
});
}
}
}
</script>
<style scoped>
.self-container {
background-image: url('../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow: auto;
height: 100%;
padding: 0;
margin: 0;
}
.top{
width: 100%;
height:70%;
}
.left{
float: left;
width: 50%;
height:100%;
}
.right{
float: left;
width: 50%;
height:100%;
}
.left-content {
width:290px;
height:290px;
padding: 10px;
background-color: white;
margin-top: 145px;
margin-left: 250px;
}
.qrcode{
width:355px;
height:400px;
background-image: url('../assets/images/scan-qr-code.png');
background-repeat: no-repeat;
margin-top: 100px;
margin-left: 50px;
}
.word{
width: 100%;
font-size: 26px;
color: #ffffff;
text-align: center;
}
.word-bottom{
padding: 0 5%;
}
</style>
<template>
<div class="report">
<el-container style="margin: 20px;">
<el-main width="70%">
<div class="content" style="font-size:40px;margin-top: 20px;text-align: center;">人工智能预审报告</div>
<div class="content" style="margin-top: 60px;">{{contentOne}}</div>
<div class="content">
<div class="text">申请人</div>
<div class="content1">{{name}}</div>
</div>
<div class="content" style="margin-top: 20px;">
<div class="text">手机号</div>
<div class="content1">{{mobile}}</div>
</div>
<div class="content" style="margin-top: 20px;">
<div class="text">申请事项</div>
<div class="content1">{{projectName}}</div>
</div>
<div class="content" style="text-indent:2em;margin-top: 100px;" v-show="success">您提交的{{projectName}}申请材料,经人工智能预审员审查,{{contentYes}}</div>
<div class="content" style="text-indent:2em;margin-top: 100px;" v-show="!success">您提交的{{projectName}}申请材料,经人工智能预审员审查,{{contentNo}}</div>
<div class="content" style="text-align: right;">日期:{{date}}</div>
<div class="button">
<div class="print" @click="print" v-show="!printSuccess"></div>
<div class="printNo" v-show="printSuccess"></div>
<div class="nextStep" @click="nextStep"></div>
</div>
</el-main>
<el-aside width="5px">
<img src="../assets/images/337.png" style="height: 687px;width: 5px;" />
</el-aside>
<el-aside width="30%">
<div style="display: block;line-height: 110px;margin-top: 110px;" v-if="success">
<img src="../assets/images/ico/2x.png" style="height: 110px;width: 140px;" />
</div>
<div style="display: block;line-height: 110px;margin-top: 110px;" v-else>
<img src="../assets/images/ico/ico_abnormal.png" style="height: 110px;width: 140px;" />
</div>
<div id="qqq" style="margin-top: 70px;background-color: white">
<div id="qrCode" ref="qrCodeDiv"></div>
</div>
<div style="display: block;line-height: 60px;margin-top: 35px;color:#fff;font-size:26px;">
扫描二维码获取预审报告
</div>
</el-aside>
</el-container>
</div>
<count-down times=300 bottomOffset="10" rightOffset="10" fontSize="18" ref="child"></count-down>
<b-page @bPageLoaded="voiceCallback"></b-page>
</template>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.report{
background-image: url('../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow:auto;
height:100%;
}
.el-aside {
/* background-color: #D3DCE6; */
color: #333;
text-align: center;
line-height: 720px;
}
.el-main {
/* background-color: #E9EEF3; */
color: #333;
text-align: center;
line-height: 720px;
}
.content {
line-height: 40px;
color:#fff;
font-size:24px;
margin-top: 20px;
text-align: left;
clear: both;
}
.text {
height: 57px;
width: 21%;
line-height: 57px;
text-align:center;
background-image: url('../assets/images/title4.png');
background-repeat:no-repeat;
margin-left: 110px;
float: left;
}
.content1 {
width: 63%;
color:#00EEFF;
font-size:36px;
float: left;
margin-top: 7px;
}
.right {
height: 57px;
width: 15%;
text-align:center;
/* line-height: 57px; */
padding-left: 20px;
padding-right: 20px;
}
#qqq {
width:200px;
height:200px;
margin: 0 auto; /*水平居中*/
position: relative;
padding: 7px;
}
.button{
display: inline-flex;
position: fixed;
left: 50%;
bottom: 0;
transform: translate(-50%, 0);
}
.nextStep{
width: 300px;
height: 85px;
background-image: url('../assets/images/btn/btnNext.png');
background-repeat:no-repeat;
}
.print{
width: 300px;
height: 85px;
margin-right: 20px;
background-image: url('../assets/images/btn/btnPrint.png');
background-repeat:no-repeat;
}
.printNo{
width: 300px;
height: 85px;
margin-right: 20px;
background-image: url('../assets/images/btn/btnPrint_Not.png');
background-repeat:no-repeat;
}
</style>
<script>
import QRCode from 'qrcodejs2';
import commonUtil from '../assets/js/commonUtil';
import { layer } from "@layui/layer-vue";
import BPage from "@/components/registerVoice";
export default{
components: {
BPage,
},
data() {
return {
title: '',
contentOne: '注:人工智能预审结果,仅作为材料准备阶段形式审查辅助,不作为最终受理意见,最终受理意见请将材料提交至AI专用收件窗口,由受理窗口出具。',
contentYes: '材料齐全、材料填写内容合格,符合该事项的申报要求,请您将申报材料提交至受理窗口!',
contentNo: '存在问题,请您对材料内容进行核实和修订,完成后提交至人工智能专用受理窗口。',
date: '',
name: '',
idcard: '',
mobile: '',
projectName: '',
projectId: '',
success: false,
scanUrl: '',
printSuccess: false //是否打印成功
}
},
created() {
var caseData = this.$LocalStorage.SessionGet("caseData");
this.name = caseData.name;
this.idcard = caseData.idcard;
this.mobile = caseData.mobile;
this.projectName = caseData.projectName;
this.projectId = caseData.projectId;
this.scanUrl = caseData.scanUrl;
this.success = eval(caseData.success);
this.printSuccess = caseData.printSuccess == null ? false : eval(caseData.printSuccess);
this.PlayAudio();
this.date = commonUtil.getNowDate();
//this.getMethod();
},
mounted: function () {
this.$nextTick(function () {
this.bindQRCode();
})
},
computed:{
},
methods:{
PlayAudio(){
if (robotType) {
if (this.success){
robotsdk.playAudio({
cmd: "cmd",
animation: 0,
videocontent: "您提交的"+this.projectName+"申请材料,经人工智能预审员审查,"+this.contentYes,
callback: ""
})
}else {
robotsdk.playAudio({
cmd: "cmd",
animation: 0,
videocontent: "您提交的"+this.projectName+"申请材料,经人工智能预审员审查,"+this.contentNo,
callback: ""
})
}
}
},
bindQRCode() {
new QRCode(this.$refs.qrCodeDiv, {
text: this.scanUrl,
width: 186,
height: 186,
colorDark: "#FFFFFF", //二维码颜色
colorLight: "#02E2FC", //二维码背景色
correctLevel: QRCode.CorrectLevel.L//容错率,L/M/H
})
},
/*getMethod() {
var _this = this;
$.ajax({
type: "get",
url: window.config.api + 'lilo/aiCase/getRobotCaseMethod',
async: false, //改为同步请求
data: {projectId: this.projectId},
success:function(data){
if(data.success){
_this.contentOne = data.obj.contentOne;
_this.title = data.obj.title;
var enterpriseName = data.obj.enterpriseName;
var content;
if(_this.success){
content = data.obj.contentYes;
} else {
content = data.obj.contentNo;
}
_this.contentYes = content.replaceAll("${name}",_this.name).replaceAll("${projectName}",_this.projectName).replaceAll("${enterpriseName}",enterpriseName);
} else {
layer.msg("系统繁忙,请到窗口办理!", { time: 1500, icon: 3 });
console.log(data.msg);
}
},error: function(error){
layer.msg("系统繁忙,请到窗口办理!", { time: 1500, icon: 3 });
console.log(error);
}
})
},*/
nextStep() {
if(this.success){
//预审成功进入装袋页面
this.$router.push({ path: '/information'});
} else {
//预审失败进入评价页面
this.$router.push({ path: '/evaluation'});
}
},
print() {
//进入打印页面
this.$router.push({ path: '/printReport'});
},
//语音回调(只处理下一步和退出)
voiceCallback(res){
if (res=="nextStep"){
this.nextStep();
}
if (res=="quit"){
if(robotType){
robotsdk.closeExternalApp({
mode:0
});
}
}
}
}
}
</script>
\ No newline at end of file
<template>
<b-page @bPageLoaded="voiceCallback"></b-page>
<count-down times=300 bottomOffset="2" rightOffset="100" fontSize="24" ref="child"></count-down>
<div class="scanMaterial" style="height:100%">
<!-- 左区域 -->
<div class="left">
<div class="example"></div>
<div style="padding-right: 1%;padding-top: 32px;">
<!-- 取消按钮 -->
<img class="imgButton" v-if="!scanBtnIsShow" src="../assets/images/btn/backGray.png">
<img class="imgButton" v-if="scanBtnIsShow" @click="back" src="../assets/images/btn/btnCancel.png">&nbsp;&nbsp;
<!-- 扫描按钮 -->
<img class="imgButton" v-if="!scanBtnIsShow" src="../assets/images/btn/scanGray.png">
<img class="imgButton" v-if="scanBtnIsShow" @click="scanBtn" src="../assets/images/btn/btnScan.png">&nbsp;&nbsp;
<!-- 下一步按钮 -->
<img class="imgButton" v-if="!isBtnNextShow" src="../assets/images/btn/btnNext_Not.png">
<img class="imgButton" v-if="isBtnNextShow" @click="nextStep" src="../assets/images/btn/btnNext.png">
</div>
</div>
<!-- 图片区域 -->
<div class="imgList">
<div class="imgBetween" v-for="(material, index) in materialList">
<img class="imgSize" @click="lookImg(material.fileUrl,index,material.fileId)" v-if="material.fileUrl!=''" :src="material.fileUrl">
<div class="fileName" v-if="material.fileUrl!=''" >
{{material.name}}<span v-if="material.isMust==1" style="color: red">(必要材料)</span>
</div>
<div class="fileName" v-if="material.fileUrl==''" style="width: 74%;padding-left: 28%;color: #FFFFFF;padding-top: 22%;">
{{material.name}} <span v-if="material.isMust==1" style="color: red">(必要材料)</span>
</div>
</div>
</div>
<!-- 删除按钮 -->
<div class="imgDel">
<div class="imgDelBetween" v-for="(del, index) in imgDelList">
<img @click="delImg(index,del.fileId)" v-if="del.name==''">
<img @click="delImg(index,del.fileId)" v-if="del.name!=''" :src="del.imgSrc">
</div>
</div>
<!-- 图片上一页 -->
<div class="btnUp">
<img src="../assets/images/btn/btnLeft2.png">
</div>
<div class="btnUp" v-if="curPage!=1">
<img @click="imgUp" src="../assets/images/btn/btnLeft.png">
</div>
<!-- 图片下一页 -->
<div class="btnNext" >
<img src="../assets/images/btn/btnRight2.png">
</div>
<div class="btnNext" v-if="materials.length>(curPage*num)">
<img @click="imgNext" src="../assets/images/btn/btnRight.png">
</div>
<!-- 图片框 -->
<div class="right">
<div class="rightFrame" v-for="(freme, index) in imgFrames">
<img class="imgFrame" :src="freme.imgSrc">
</div>
</div>
<div class="wire"></div>
<div style="color: #FFFFFF;font-size: 20px;">
点击按钮可查看详细说明 <img @click="lookDetails" src="../assets/images/ico/help.png">
</div>
</div>
</template>
<script>
import BPage from "@/components/registerVoice";
export default{
components: {
BPage,
},
data() {
return {
curPage: 1,//当前页码
num: 5,//每页展示数量
materials: [],//材料集合
materialList:[],//当前页面图片展示
imgDel:[],//删除按钮集合
imgDelList:[],//当前页面删除按钮展示
scanBtnIsShow:false,//控制取消,扫描按钮是否显示
isBtnNextShow:false,//控制下一步按钮是否亮起
projectId: '',//事项ID
serviceId: '',//机器人ID
projectName:'',//事项名称
userType:'',//用户类型 60:本人 1:委托人
scanType:'',//委托人办理类型 1:法人手持身份证照片 2:法人+委托书原件或复印件
initMaterialList:[],//必传材料
name : '',//办事人名称
mobile : '',//手机号
idcard : '',//身份证号
sex : '',//性别
nation : '',//民族
birthday : '',//生日
manyCount:0,//重复材料数量
indexFileId:'',//当前fileId,用于多份删除
addIndex:-1,//添加材料坐标
isHint:true,//是否提示多份材料删除
imgFrames:[//图片框集合
{'imgSrc':require('../assets/images/filebox.png')},
{'imgSrc':require('../assets/images/filebox.png')},
{'imgSrc':require('../assets/images/filebox.png')},
{'imgSrc':require('../assets/images/filebox.png')},
{'imgSrc':require('../assets/images/filebox.png')}
],
highCameraParameter:{//高拍仪参数
x: 68,//预览界面x坐标
y: 47,//预览界面y坐标
width: 900,//预览界面宽度
height: 676,//预览界面高度
},
voiceParameter:{//语音播放参数
cmd: "cmd",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent: "请您根据扫描要求,逐页将资料放置到材料识别区,我来帮您看看是否满足审查要求。",//语音内容
callback: "PlayAudioCallback"//接口回调函数
},
userInfoParameter:{//办事人信息
callback: "getUserInfo"
},
highCameraImgParameter:{//获取高拍仪照片
callback: "HighCameraCallback"
},
count:0,
}
},
created() {
this.projectId = this.$LocalStorage.SessionGet("projectId");
this.serviceId = this.$LocalStorage.SessionGet("serviceId");
this.projectName=this.$LocalStorage.SessionGet("projectName");
this.userType=this.$LocalStorage.SessionGet("userType");
this.scanType=this.$LocalStorage.SessionGet("scanType");
let materialsInfo=this.$LocalStorage.SessionGet("materialsInfo");//材料列表页面材料信息
materialsInfo.forEach((obj,i)=>{
if (this.scanType==1){
this.initMaterialList.push(obj);//必传材料集合
this.materials.push({'name':obj.name,'fileUrl':'',isMust:'1'});
}else{
if (obj.isMust=='1'){//是否必传,0:否 1:是
this.initMaterialList.push(obj);//必传材料集合
this.materials.push({'name':obj.name,'fileUrl':'',isMust:obj.isMust});
}else{
this.materials.push({'name':obj.name,'fileUrl':'',isMust:obj.isMust});
}
}
this.imgDel.push({'name':'','imgSrc':require('../assets/images/ico/delete.png')});
})
this.pageInfo(this.curPage,this.num);
if (robotType) robotsdk.getUserInfo(this.userInfoParameter);//获取办事人信息
let materials = this.$LocalStorage.SessionGet("scanMaterials");//当前页面扫描缓存图片
if (materials==null&&robotType)this.openVoice();//语音播放
if (materials!=null){
this.scanBtnIsShow=true;
this.upStorageDate(1);
if (this.$route.query.imgIndex!=null){//imgIndex图片查看页面所传参数 取消按钮不会传,删除按钮会传
this.isHint=false;
this.manyCount=0;
this.delImg(this.$route.query.imgIndex,this.$route.query.fileId);
}
this.isTrue();//下一步按钮是否可点
if (robotType)robotsdk.openHighCamera(this.highCameraParameter);//打开高拍仪预览界面
}
//将方法绑定到window下面,提供给外部调用
window.PlayAudioCallback = (res)=> this.PlayAudioCallback(res);//语音播放
window.HighCameraCallback = (success, obj)=> this.HighCameraCallback(success, obj);//获取高拍仪照片
window.ConfirmCallback = (res)=> this.ConfirmCallback(res);//提示确认,取消对话框
window.getUserInfo = (obj)=> this.getUserInfo(obj);//获取身份证信息
this.initializeOcrUrl();//初始化ocr地址
},
methods:{
unique(arr) {
const res = new Map();
return arr.filter((arr) => !res.has(arr.fileId) && res.set(arr.fileId, arr.fileId));
},
initializeOcrUrl(){
if (window.config.isUpRocrUrl){//更新ocr地址 true=更新 false=不更新
this.$axios.get(window.config.api + 'lilo/v1/robot/getRocrUrl', {
params: {
serviceId : this.serviceId,
projectId : this.projectId
}
}).then(item => {
if (item.data.success) {
window.config.rocrUrl=item.data.msg;
window.config.isUpRocrUrl=false;
}else{
this.message("服务器异常,初始化失败!");//提示框
}
}).catch(err => {
this.message("服务器异常,初始化失败!");//提示框
})
}
},
back() {
if(robotType){
robotsdk.closeExternalApp({
mode:0
});
}
},
nextStep() {
if (robotType)robotsdk.closeHighCamera();//关闭高拍仪
if (this.userType=='1') {//委托人类型办理
let entrustMaterials = this.$LocalStorage.SessionGet("entrustMaterials");//委托人缓存材料
this.materials=this.materials.concat(entrustMaterials);//委托人材料合并
}
this.materials = this.materials.filter(item => {//过滤过未上传材料
return item.fileUrl!='';
});
let newArr = []; //存新数组
this.materials.forEach((obj,i)=>{//去重材料,名字合并
if (newArr.length==0){
newArr.push(obj)
}else{
try {
let isExist=false;
newArr.forEach((arr,j)=>{
if (obj.fileId==arr.fileId){
isExist=true;
arr.name=arr.name+","+obj.name
throw("名称合并成功================");
}
})
if (!isExist){
newArr.push(obj)
}
}catch (e){
console.info(e);
}
}
})
this.materials=newArr;
this.upStorageDate(2);
this.upStorageDate(4);
this.$router.push({ path: '/auditing'});
},
scanBtn(){
this.updateTimes();//刷新时间
this.masks(true);//遮罩层 true 打开 false 关闭
if (robotType)robotsdk.getHighCamera(this.highCameraImgParameter);//获取高拍仪照片
},
pageInfo (curPage,num) {
var curPage = (curPage - 1) * num;
this.materialList = this.materials.slice(curPage,parseInt(curPage) + parseInt(num));
this.imgDelList = this.imgDel.slice(curPage,parseInt(curPage) + parseInt(num));
},
imgUp(){
this.updateTimes()//刷新时间
this.curPage = this.curPage-1;
this.pageInfo(this.curPage,this.num);
},
imgNext(){
this.updateTimes()//刷新时间
this.curPage = this.curPage+1;
this.pageInfo(this.curPage,this.num);
},
lookImg(fileUrl,index,fileId){
if (robotType)robotsdk.closeHighCamera();//关闭高拍仪
this.upStorageDate(3);
this.getManyCount(fileId);//判断当前材料是否包含其它材料
let isMore=0;
if (this.manyCount>1)
isMore=this.manyCount;
this.$router.push({path:'/scanMaterialLook',query:{fileUrl:fileUrl,index:index,fileId:fileId,isMore:isMore}});//查看当前图片页面
},
delImg(index,fileId){
this.updateTimes()//刷新时间
let newIndex=this.curPage*this.num-(this.num-index);//材料坐标位置
this.indexFileId=this.materials[newIndex].fileId;//获取当前fileId
if (this.isHint){
this.getManyCount(fileId);//判断当前材料是否包含其它材料
if (this.manyCount>1){//大于1为多份,与其它材料一起删除
this.showConfirmMessage("当前材料还包含其它材料是否确认一起删除?");
}else{
this.delMaterialByFileId(newIndex,fileId);
}
}else{
this.del(fileId);
}
},
lookDetails(){
if (robotType)robotsdk.closeHighCamera();//关闭高拍仪
this.upStorageDate(3);
this.$router.push({path:'/material',query:{isCancel:false}});//查看材料详情页面
},
openVoice(){
robotsdk.playAudio(this.voiceParameter);//虚拟人物播放语音及动作
},
PlayAudioCallback (res){
if (res=="cmdOK"){
if (robotType){
robotsdk.openHighCamera(this.highCameraParameter);//打开高拍仪预览界面
this.scanBtnIsShow=true;
robotsdk.playAudio({//语音播放参数
cmd: "sm",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent: "请将需要提交的资料放置到扫描区,等资料预览清晰后点击'扫描'按钮进行扫描",//语音内容
callback: "PlayAudioCallback"//接口回调函数
});//虚拟人物播放语音及动作
}
}
},
getUserInfo(obj){
let res = eval('(' + obj + ')');
this.name=res.name;
this.mobile=res.mobile;
this.idcard=res.idcard;
this.sex=res.sex;
this.nation=res.nation;
this.birthday=res.birthday;
},
HighCameraCallback(success, obj){
console.log("uploadFileNewUrl====="+window.config.rocrUrl+'lilo/aiCase/uploadFileNew')
if (success) {
let res = eval('(' + obj + ')');//高拍仪回调的数据集
$.post( window.config.rocrUrl+'lilo/aiCase/uploadFileNew', {
fileName : res.filename,
base64 : res.file,
projectId: this.projectId,
}).then(item => {
if (item.success) {
this.masks(false);//遮罩层 true 打开 false 关闭
if (robotType){
robotsdk.playAudio({
cmd: "cmd",
animation: 0,
videocontent: "识别成功,请放下一页。",
callback: ""
})
}
let fileName=item.obj.fileName;
if (fileName!=''){
if (fileName.lastIndexOf(",")!=-1) {//判断材料是否多份
let str_split=fileName.split(',');
str_split.forEach((str,index)=>{
this.isMore(str,item);
this.addMaterials(str,item);
this.manyCount=0;
})
}else{
this.isMore(fileName,item);
this.addMaterials(fileName,item);
this.manyCount=0;
}
}else {
this.message("服务器异常,扫描失败!");//提示框
}
this.isTrue();//下一步按钮是否可点
if (this.addIndex<5){
this.curPage=1;
}else{
let integer=parseInt((this.addIndex/this.num).toString());//取整
if (this.addIndex/this.num.toFixed(2)>=integer){
this.curPage=integer+1
}else{
this.curPage=integer;
}
}
this.pageInfo(this.curPage,this.num);
}else{
this.masks(false);//遮罩层 true 打开 false 关闭
this.message("服务器异常,扫描失败!");//提示框
}
}).catch(err => {
this.masks(false);//遮罩层 true 打开 false 关闭
this.message("服务器异常,扫描失败!");//提示框
})
} else {
this.masks(false);//遮罩层 true 打开 false 关闭
this.message("服务器异常,扫描失败!");//提示框
}
},
masks(bool){
if (robotType) {
robotsdk.showMasks({//遮罩层
isOpen: bool //true 打开 false 关闭
});
}
},
message(content){
if (robotType) {
robotsdk.showMessage({//提示框
isOpen: true,//true 打开 false 关闭
content: content,//消息内容
isAutoClose: true//true 5秒自动关闭 false 用户点确认关闭
});
}
},
upStorageDate(type){
//当前页面所需数据
let scanDates=[{"name":"scanMaterials","value":this.materials},
{"name":"scanMaterialList","value":this.materialList},
{"name":"scanImgDel","value":this.imgDel},
{"name":"scanImgDelList","value":this.imgDelList},
{"name":"scanCurPage","value":this.curPage}];
//后面页面所需的数据
let dates={
"projectId": this.projectId,
"serviceId": this.serviceId,
"projectName": this.projectName,
"name": this.name,
"idcard": this.idcard,
"mobile": this.mobile,
"sex": this.sex,
"nation": this.nation,
"birthday": this.birthday,
"fileData": this.materials}
if (type==1)//获取缓存数据(详细说明返回回来接收)
this.materials= this.$LocalStorage.SessionGet("scanMaterials");
this.materialList= this.$LocalStorage.SessionGet("scanMaterialList");
this.imgDel= this.$LocalStorage.SessionGet("scanImgDel");
this.imgDelList= this.$LocalStorage.SessionGet("scanImgDelList");
this.curPage= this.$LocalStorage.SessionGet("scanCurPage");
if (type==2)//删除缓存数据(返回)
scanDates.forEach(obj=>{this.$LocalStorage.SessionRemove(obj.name)});
if (type==3)//存入缓存数据(详细说明)
scanDates.forEach(obj=>{this.$LocalStorage.SessionPut(obj.name,obj.value)});
if (type==4)//存入缓存数据(下一步)
this.$LocalStorage.SessionPut("caseData",dates);
},
isMore(fileName,item){
this.materials.forEach((obj,index)=>{
let subName = obj.name.substring(0, fileName.length);
if (fileName.lastIndexOf(subName)!=-1&&obj.fileUrl!=''){
this.manyCount=this.manyCount+1;
}else if (fileName.lastIndexOf(subName)!=-1&&obj.fileUrl==''){
obj.fileUrl=item.obj.fileUrl;
obj.fileId=item.obj.fileId;
obj.artificialType=item.obj.artificialType;
obj.type=item.obj.type;
this.imgDel[index].name=item.obj.fileName;
this.imgDel[index].fileId=item.obj.fileId;
this.manyCount=-1;
this.addIndex=index;
}
})
},
addMaterials(fileName,item){
if (this.manyCount>=1){
this.materials.push({'name':fileName+this.manyCount,'fileUrl':item.obj.fileUrl,'fileId':item.obj.fileId,
'artificialType':item.obj.artificialType,'type':item.obj.type});
this.imgDel.push({'name':fileName+this.manyCount,fileId:item.obj.fileId,'imgSrc':require('../assets/images/ico/delete.png')});
this.addIndex=this.materials.length-1;
}
if (this.manyCount==0){
this.materials.push({'name':fileName,'fileUrl':item.obj.fileUrl,'fileId':item.obj.fileId,
'artificialType':item.obj.artificialType,'type':item.obj.type});
this.imgDel.push({'name':fileName,fileId:item.obj.fileId,'imgSrc':require('../assets/images/ico/delete.png')});
this.addIndex=this.materials.length-1;
}
},
showConfirmMessage(content){
if (robotType) {
robotsdk.showConfirmMessage({
isOpen: true,
content: content,
isAutoClose: false,
callback: "ConfirmCallback"
});
}
},
ConfirmCallback(bool) {
if (bool) {//确认
if (this.manyCount>1) {
this.del(this.indexFileId);
}
}else{
this.manyCount=0;
}
},
delMaterialByFileId(index,fileId){
if (fileId!=null){
$.post( window.config.rocrUrl+'lilo/aiCase/deleteFile', {
fileId : fileId
}).then(item => {
if (item.success) {
this.upMaterials(index);
}else{
this.message("服务器异常,删除失败!");//提示框
}
}).catch(err => {
this.message("服务器异常,删除失败!");//提示框
})
}else{
this.upMaterials(index);
}
this.isHint=true;
},
upMaterials(index){
let nameNumber=this.materials[index].name.replace(/[^0-9]/ig,"");//材料名称后面数字
let indexName=this.materials[index].name;
if (nameNumber!=''){
indexName=indexName.substring(0,indexName.length-nameNumber.length);
}else{
indexName=this.materials[index].name;
}
let isExist=false;
try {
this.initMaterialList.forEach((obj,i)=> {
if (this.materials[index].name== obj.name) {
isExist=true;
throw("当前材料属于必传材料================");
}
})
}catch (e){
console.info(e);
}
let manyCount=0;//材料是否存在多份
this.materials.forEach((obj,i)=>{
if (indexName==obj.name.substring(0,indexName.length))
manyCount=manyCount+1;
})
if (manyCount>1){
if (isExist) {
let mIndex = 0;
this.materials.forEach((obj, i) => {
let subName = obj.name.substring(0, indexName.length);
let subInt=obj.name.substring(indexName.length);
if (indexName == subName){
if (parseInt(subInt) == 1)mIndex = i;
if (parseInt(subInt) > 1) {
let count = parseInt(subInt) - 1;
obj.name = subName + count;
}
}
})
this.materials[index] = this.materials[mIndex];
this.materials[index].name = indexName;
this.materials.splice(mIndex, 1)
this.imgDel.splice(mIndex, 1);
} else{
this.materials.forEach((obj,i)=> {
let subName=obj.name.substring(0,indexName.length);
let subInt=obj.name.substring(indexName.length);
if (indexName==subName){
if (nameNumber==''&&parseInt(subInt)==1){
obj.name= subName
}else if (parseInt(subInt)>1){
let count=parseInt(subInt)-1;
obj.name= subName+count;
}
}
})
this.materials.splice(index,1)
this.imgDel.splice(index,1);
}
}else{
if (isExist){
this.imgDel[index].name='';
this.materials[index].fileUrl='';
this.isBtnNextShow=false;
}else{
this.materials.splice(index,1)
this.imgDel.splice(index,1);
}
}
this.manyCount=0;
if (this.materialList.length==1&&this.curPage!=1)
this.curPage = this.curPage-1;
this.pageInfo(this.curPage,this.num);
},
getManyCount(fileId){
this.materials.forEach((obj,i)=>{
if (fileId==obj.fileId){
this.manyCount=this.manyCount+1;
}
})
},
del(fileId){
let count=0;
this.materials.forEach((obj,index)=>{
if (fileId==obj.fileId){
count=count+1;
if (count>1){
this.delMaterialByFileId(index,null);
}else{
this.delMaterialByFileId(index,fileId);
}
}
})
},
updateTimes(){
this.$refs.child.counter=300;
},
isTrue(){
let bool=true;
try {
this.initMaterialList.forEach((o,i)=>{
if (!bool)throw("材料未上传全结束外层循环================");
try {
this.materials.forEach((m,j)=>{
if (o.name.indexOf(m.name)!=-1&&m.fileUrl==''){
bool=false;
throw("材料未上传全结束里层循环================");
}
})
}catch (e){
console.info(e);
}
})
}catch (e){
console.info(e);
}
if (bool) this.isBtnNextShow=true;
},
//语音回调(只处理扫描,下一步,退出)
voiceCallback(res){
if (res=="scanning"){
if (this.scanBtnIsShow){
this.scanBtn();
}
}
if (res=="nextStep"){
if (this.isBtnNextShow){
this.nextStep();
}
}
if (res=="quit"){
this.back();
}
}
}
}
</script>
<style scoped>
.scanMaterial{
background-image: url('../assets/images/background.png');
background-repeat:no-repeat;
background-size:100% 100%;
background-size: cover;
overflow:auto;
}
.imgButton {
width: 31%;
}
.example{
background-image: url('../assets/images/scanExample.gif');
background-repeat:no-repeat;
height: 676px;
margin-left: 1.2%;
margin-top: 1.4%
}
.left{
height: 100%;
float: left
}
.right{
padding-left: 72%;
padding-top: 20px;
height: 82%;
}
.rightFrame{
height: 140px;
}
.fileName{
width: 74%;
padding-left: 25%;
color:#FFFFFF;
padding-top: 2%;
}
.imgFrame{
height: 92px;
width: 45%;
}
.wire{
padding-top: 5%;
border-bottom:solid #FFFFFF 1px;
width: 26%;
margin-left: 72%
}
.btnUp{
position: absolute;
left: 75%;
margin-top: 22%;
z-index: 99;
}
.btnNext{
position: absolute;
left: 95%;
margin-top: 22%;
z-index: 97;
}
.imgSize{
height: 75px;
width: 38%;
}
.imgList{
position: absolute;
left: 70.92%;
padding-top: 2.2%;
width: 30%;
}
.imgBetween{
height: 140px;
}
.imgDel{
position: absolute;
padding-top: 1.5%;
left: 87%;
z-index: 99;
}
.imgDelBetween{
height: 137px;
z-index: 99;
}
</style>
\ No newline at end of file
<template>
<div class="imgDiv" id="imgDiv" style="height: 100%;" >
<img draggable="true" class="paperImg" @touchstart="start($event)"
@touchmove="move($event)"
:src="fileUrl" alt="">
</div>
</template>
<script>
export default{
data() {
return {
x0:0,
y0:0,
x1:0,
y1:0,
rotateNum:0,//旋转的角度
fileUrl:'',//图片路径
fileId:''//图片fileId
}
},
created() {
window.rotateImg = ()=> this.rotateImg();
this.fileUrl = this.$route.query.fileUrl;
this.fileId = this.$route.query.fileId;
},
methods:{
start(e){
e.cancelBubble = true;
e.returnValue = false;
this.x0=e.targetTouches[0].clientX;
this.y0=e.targetTouches[0].clientY;
},
move(e){//移动
this.x1=e.targetTouches[0].clientX;
this.y1=e.targetTouches[0].clientY;
let x=this.x1-this.x0;
let y=this.y1-this.y0;
let img=document.querySelector("#imgDiv img");
$('.paperImg').css('left',`${img.offsetLeft+x}px`);
$('.paperImg').css('top',`${img.offsetTop+y}px`);
this.x0=this.x1;
this.y0=this.y1;
},
rotateImg(){//旋转
this.rotateNum+=90;
$('.paperImg').css('transform',`rotate(${this.rotateNum}deg)`);
$('.paperImg').css('-ms-transform',`rotate(${this.rotateNum}deg)`);
$('.paperImg').css('-moz-transform',`rotate(${this.rotateNum}deg)`);
$('.paperImg').css('-webkit-transform',`rotate(${this.rotateNum}deg)`);
$('.paperImg').css('-o-transform',`rotate(${this.rotateNum}deg)`);
}
}
}
</script>
<style scoped>
.imgDiv{
background: #ccc;
width: 100%;
height: calc(100vh - 132px);
overflow: hidden;
position: relative;
}
.paperImg{
position: absolute;
max-width: 500%;
width: 100%;
left: 0px;
}
</style>
\ No newline at end of file
<template>
<b-page @bPageLoaded="voiceCallback"></b-page>
<div class="back" style="height:100%">
<iframe ref="iframe" :src="fileUrl" style="height:85%;padding-top:20px;width:95%;"/>
<div style="padding-right: 1%;padding-top: 20px">
<!-- 删除按钮 -->
<img class="imgButton" @click="del" src="../assets/images/btn/btnDel.png">&nbsp;&nbsp;
<!-- 旋转按钮 -->
<img class="imgButton" @click="rotateImg" src="../assets/images/btn/btnRotate.png">&nbsp;&nbsp;
<!-- 取消按钮 -->
<img class="imgButton" @click="back" src="../assets/images/btn/btnCancel.png">
</div>
</div>
</template>
<script>
import BPage from "@/components/registerVoice";
export default{
components: {
BPage,
},
data() {
return {
projectId: '',//事项ID
projectName: '',//事项名称
serviceId: '',//机器人ID
fileUrl:'',//图片路径
imgIndex:'',//图片坐标
fileId:'',//图片fileId
isMore:0,//是否多份
}
},
created() {
this.projectId = this.$route.query.projectId;
this.serviceId = this.$route.query.serviceId;
this.projectName = this.$route.query.projectName;
this.fileUrl = "/#/scanMaterialLoad?fileUrl="+this.$route.query.fileUrl;
this.imgIndex = this.$route.query.index;
this.fileId=this.$route.query.fileId;
this.isMore=this.$route.query.isMore;
//将方法绑定到window下面,提供给外部调用
window.ConfirmCallback = (res)=> this.ConfirmCallback(res);//提示确认,取消对话框
},
methods:{
rotateImg(){
this.$refs.iframe.contentWindow.rotateImg();
},
back(){
this.$router.push({ path: '/scanMaterial'});
},
del(){
if (this.isMore>0){//大于1为多份,与其它材料一起删除
this.showConfirmMessage("当前材料还包含其它材料是否确认一起删除?");
}else{
this.$router.push({ path: '/scanMaterial' , query: {imgIndex:this.imgIndex,fileId:this.fileId}});
}
},
showConfirmMessage(content){
if (robotType) {
robotsdk.showConfirmMessage({
isOpen: true,
content: content,
isAutoClose: false,
callback: "ConfirmCallback"
});
}
},
ConfirmCallback(bool) {
if (bool) {//确认
this.$router.push({ path: '/scanMaterial' , query: {imgIndex:this.imgIndex,fileId:this.fileId}});
}
},
//语音回调(只处理退出)
voiceCallback(res){
if(robotType){
robotsdk.closeExternalApp({//退出跳转咨询页面
mode:0
});
}
}
}
}
</script>
<style scoped>
.back{
background-image: url('../assets/images/background.png');
background-repeat:no-repeat;
background-size:100% 100%;
background-size: cover;
overflow:auto;
}
</style>
\ No newline at end of file
<template>
<div class="summary">
<div class="title">
<span>您办理的是【{{projectName}}</span>
</div>
<div>
<div class="content">
<div class="code">事项编码</div>
<div class="codeMsg">{{transactcode}}</div>
</div>
<div class="content">
<div class="code">事项名称</div>
<div class="codeMsg">{{projectName}}</div>
</div>
<div class="content">
<div class="code">事项部门</div>
<div class="codeMsg">{{dept.name}}</div>
</div>
<div class="content">
<div class="code">详情地址</div>
<div class="codeMsg">{{taskUrl}}</div>
</div>
<div class="content">
<div class="code">申请材料</div>
<div class="codeMsg">
<span style="margin-right: 15px;color: #07EDFE;" v-for="material in materials">{{material.name}}</span>
</div>
</div>
<div class="content">
<div class="code">办理流程</div>
<div class="codeMsg">{{process}}</div>
</div>
<div class="content">
<div class="code">受理条件</div>
<div class="codeMsg">{{acceptCondition}}</div>
</div>
</div>
<div class="button">
<div class="cancel" @click="cancel"></div>
<div class="nextStep" @click="nextStep"></div>
</div>
</div>
</template>
<script>
import { layer } from "@layui/layer-vue";
export default{
data() {
return {
projectId: '',
projectName:'',
transactcode:'',
taskUrl:'',
materials: [],
process:'',
acceptCondition:'',
dept: {},
properties: [],
msg: '',
serviceId:''
}
},
created() {
this.projectId = this.$route.query.projectId;
this.serviceId = this.$LocalStorage.SessionGet("serviceId");
this.getProjectGuide();
},
methods:{
getProjectGuide() {
this.$axios.get(window.config.api + 'lilo/chat/getProjectGuide', {
params: {
projectId: this.projectId,
serviceId: this.serviceId
}
}).then(item => {
if (item.data.success) {
this.projectName = item.data.obj.name;
this.materials = item.data.obj.materials;
this.dept = item.data.obj.dept;
this.properties = item.data.obj.properties;
if(this.properties){
for (var i = 0, t=this.properties.length; i < t; i++) {
var code = this.properties[i].code;
if("transactcode" == code){
this.transactcode = this.properties[i].value;
continue;
}
if("name" == code){
this.name = this.properties[i].value;
continue;
}
if("taskUrl" == code){
this.taskUrl = this.properties[i].value;
continue;
}
if("process" == code){
this.process = this.properties[i].value;
continue;
}
if("acceptCondition" == code){
this.acceptCondition = this.properties[i].value;
continue;
}
}
}
}
}).catch(err => {
this.msg = '错误';
})
},
cancel() {
alert("111");
},
nextStep() {
alert("222");
}
}
}
</script>
<style scoped>
.button{
display: inline-flex;
position: fixed;
left: 50%;
bottom: 0;
transform: translate(-50%, 0);
}
.cancel{
width: 300px;
height: 85px;
margin-right: 20px;
background-image: url('../assets/images/btn/btnCancel.png');
background-repeat:no-repeat;
}
.nextStep{
width: 300px;
height: 85px;
background-image: url('../assets/images/btn/btnNext.png');
background-repeat:no-repeat;
}
.summary{
background-image: url('../assets/images/projectDetail.png');
background-repeat: no-repeat;
background-size: cover;
overflow:auto;
height:100%;
padding: 0 70px;
}
.title{
color: #ffffff;
font-size: 40px;
text-align: left;
margin-left: 2%;
margin-top: 15px;
}
.content{
margin-top:1%;
display:flex;
flex-direction:row;
}
.content div{
color: #ffffff;
font-size: 24px;
}
.code{
/* width: 171px; */
height: 57px;
width: 15%;
line-height: 57px;
text-align:center;
background-image: url('../assets/images/title4.png');
background-repeat:no-repeat;
}
.codeMsg{
width: 85%;
text-align:left;
padding-top: 8px;
padding-bottom: 8px;
}
</style>
<template>
<b-page @bPageLoaded="voiceCallback"></b-page>
<count-down times=300 bottomOffset="10" rightOffset="10" fontSize="24" ref="child"></count-down>
<div class="back" style="height: 100%;" >
<div class="topTitle">
法人扫描委托书原件或复印件
</div>
<div class="middle">
<div class="left">
<img src="../assets/images/scanner.png">
</div>
<div class="centre">
<span class="centreSpan">扫描身份证</span>
<img src="../assets/images/arrows.png">
</div>
<div class="right">
<span class="rightSpan">法人手持身份证照片</span>
<img src="../assets/images/legalCard2.png">
</div>
</div>
<div class="btnNext">
<img class="imgButton" @click="upStep" src="../assets/images/btn/btnUpStep.png">
<img class="imgButton" style="padding-left: 20px" @click="nextStep" src="../assets/images/btn/btnNext.png">
</div>
</div>
</template>
<script>
import BPage from "@/components/registerVoice";
export default{
components: {
BPage,
},
data() {
return {
}
},
methods:{
//上一步
upStep(){
this.$router.back();
},
//下一步
nextStep(){
this.$router.push({path:'/userScanMaterial',query:{scanType:1}});
},
//语音回调(只处理下一步和退出)
voiceCallback(res){
if (res=="nextStep"){
this.nextStep();
}
if (res=="quit"){
if(robotType){
robotsdk.closeExternalApp({
mode:0
});
}
}
}
}
}
</script>
<style scoped>
.back{
background-image: url('../assets/images/background.png');
background-repeat:no-repeat;
background-size:100% 100%;
background-size: cover;
overflow:auto;
}
.topTitle{
font-size: 30px;
color: #FFFFFF;
padding-top:60px;
}
.middle{
padding-left: 60px;
}
.left{
float: left;
padding-top:160px;
}
.centre{
float: left;
padding-top:220px;
}
.right{
float: left;
padding-left:35px;
padding-top:200px;
}
.btnNext{
position: absolute;
padding-top: 600px;
padding-left: 350px;
}
.centreSpan{
position: absolute;
font-size: 30px;
color: #ffffff;
padding-left: 68px;
}
.rightSpan{
position: absolute;
font-size: 22px;
color: #ffffff;
padding-top: 160px;
padding-left: 58px;
}
</style>
\ No newline at end of file
<template>
<b-page @bPageLoaded="voiceCallback"></b-page>
<count-down times=300 bottomOffset="10" rightOffset="10" fontSize="24" ref="child"></count-down>
<div class="back" style="height: 100%;" >
<div class="topTitle">
法人扫描委托书原件或复印件
</div>
<div class="middle">
<div class="left">
<img src="../assets/images/scanner.png">
</div>
<div class="centre">
<span class="centreSpan">扫描文件</span>
<img src="../assets/images/arrows.png">
</div>
<div class="right">
<span class="rightSpan">法人+委托书原件或复印件</span>
<img src="../assets/images/copies2.png">
</div>
</div>
<div class="btnNext">
<img class="imgButton" @click="upStep" src="../assets/images/btn/btnUpStep.png">
<img class="imgButton" style="padding-left: 20px" @click="nextStep" src="../assets/images/btn/btnNext.png">
</div>
</div>
</template>
<script>
import BPage from "@/components/registerVoice";
export default{
components: {
BPage,
},
data() {
return {
}
},
methods:{
//上一步
upStep(){
this.$router.back();
},
//下一步
nextStep(){
this.$router.push({path:'/userScanMaterial',query:{scanType:2}});
},
//语音回调(只处理下一步和退出)
voiceCallback(res){
if (res=="nextStep"){
this.nextStep();
}
if (res=="quit"){
if(robotType){
robotsdk.closeExternalApp({
mode:0
});
}
}
}
}
}
</script>
<style scoped>
.back{
background-image: url('../assets/images/background.png');
background-repeat:no-repeat;
background-size:100% 100%;
background-size: cover;
overflow:auto;
}
.topTitle{
font-size: 30px;
color: #FFFFFF;
padding-top:60px;
}
.middle{
padding-left: 60px;
}
.left{
float: left;
padding-top:160px;
}
.centre{
float: left;
padding-top:220px;
}
.right{
float: left;
padding-left:35px;
padding-top:200px;
}
.btnNext{
position: absolute;
padding-top: 600px;
padding-left: 350px;
}
.centreSpan{
position: absolute;
font-size: 30px;
color: #ffffff;
padding-left: 90px;
}
.rightSpan{
position: absolute;
font-size: 22px;
color: #ffffff;
padding-top: 155px;
padding-left: 28px;
}
</style>
\ No newline at end of file
<template>
<b-page @bPageLoaded="voiceCallback"></b-page>
<count-down times=300 bottomOffset="10" rightOffset="10" fontSize="24" ref="child"></count-down>
<div class="scanMaterial" style="height:100%">
<!-- 左区域 -->
<div class="left">
<div class="example"></div>
<div style="padding-right: 1%;padding-top: 32px;">
<!-- 取消按钮 -->
<img class="imgButton" v-if="!scanBtnIsShow" src="../assets/images/btn/backGray.png">
<img class="imgButton" v-if="scanBtnIsShow" @click="back" src="../assets/images/btn/btnCancel.png">&nbsp;&nbsp;
<!-- 扫描按钮 -->
<img class="imgButton" v-if="!scanBtnIsShow" src="../assets/images/btn/scanGray.png">
<img class="imgButton" v-if="scanBtnIsShow" @click="scanBtn" src="../assets/images/btn/btnScan.png">&nbsp;&nbsp;
<!-- 下一步按钮 -->
<img class="imgButton" v-if="!isBtnNextShow" src="../assets/images/btn/btnNext_Not.png">
<img class="imgButton" v-if="isBtnNextShow" @click="nextStep" src="../assets/images/btn/btnNext.png">
</div>
</div>
<!-- 图片区域 -->
<div class="imgList">
<div class="imgBetween" v-for="(material, index) in materialList">
<img class="imgSize" v-if="material.fileUrl!=''" :src="material.fileUrl">
<div class="fileName" v-if="material.fileUrl!=''" >
{{material.name}}
</div>
<div class="fileName" v-if="material.fileUrl==''" style="width: 74%;padding-left: 28%;color: #FFFFFF;padding-top: 22%;">
{{material.name}}
</div>
</div>
</div>
<!-- 删除按钮 -->
<div class="imgDel">
<div class="imgDelBetween" v-for="(del, index) in imgDelList">
<img @click="delImg(index,del.fileId)" v-if="del.name==''">
<img @click="delImg(index,del.fileId)" v-if="del.name!=''" :src="del.imgSrc">
</div>
</div>
<!-- 图片框 -->
<div class="right">
<div class="rightFrame" v-for="(freme, index) in imgFrames">
<img class="imgFrame" :src="freme.imgSrc">
</div>
</div>
</div>
</template>
<script>
import BPage from "@/components/registerVoice";
export default{
components: {
BPage,
},
data() {
return {
scanType:'',//委托人身份代办类型
curPage: 1,//当前页码
num: 5,//每页展示数量
materials: [],//材料集合
materialList:[],//当前页面图片展示
imgDel:[],//删除按钮集合
imgDelList:[],//当前页面删除按钮展示
scanBtnIsShow:false,//控制取消,扫描按钮是否显示
isBtnNextShow:false,//控制下一步按钮是否亮起
projectId: '',//事项ID
serviceId: '',//机器人ID
projectName:'',//事项名称
isRepetition:false,//是否重复材料
type:0,//0:默认不覆盖,1:覆盖委托书,2:覆盖身份证,3:覆盖委托书及身份证,4:只删除当前上传材料
temporary:[],//临时集合,用于是否覆盖材料使用
imgFrames:[],//图片框集合
highCameraParameter:{//高拍仪参数
x: 68,//预览界面x坐标
y: 47,//预览界面y坐标
width: 900,//预览界面宽度
height: 676,//预览界面高度
},
userInfoParameter:{//办事人信息
callback: "getUserInfo"
},
highCameraImgParameter:{//获取高拍仪照片
callback: "HighCameraCallback"
},
count:0,
}
},
created() {
this.projectId = this.$LocalStorage.SessionGet("projectId");
this.serviceId = this.$LocalStorage.SessionGet("serviceId");
this.projectName=this.$LocalStorage.SessionGet("projectName");
this.scanType=this.$route.query.scanType;
if (this.scanType=='1'){//委托人身份代办类型 1:手持身份证照片页面 2:法人+委托书原件或复印件页面
this.materials.push({'name':'手持身份证','fileUrl':'','fileId':'','artificialType':'','type':''});
this.imgDel.push({'name':'','imgSrc':require('../assets/images/ico/delete.png')});
this.imgFrames.push({'imgSrc':require('../assets/images/filebox.png')}),
this.pageInfo(this.curPage,this.num);
if(robotType)
this.openVoice( "请提交手持身份证");//语音播放
}else{
this.materials.push({'name':'委托书','fileUrl':'','fileId':'','artificialType':'','type':''});
this.materials.push({'name':'委托人身份证','fileUrl':'','fileId':'','artificialType':'','type':''});
this.imgDel.push({'name':'','imgSrc':require('../assets/images/ico/delete.png')});
this.imgDel.push({'name':'','imgSrc':require('../assets/images/ico/delete.png')});
this.imgFrames.push({'imgSrc':require('../assets/images/filebox.png')}),
this.imgFrames.push({'imgSrc':require('../assets/images/filebox.png')}),
this.pageInfo(this.curPage,this.num);
if(robotType)
this.openVoice( "请提交委托书和委托人身份证");//语音播放
}
if (robotType)robotsdk.getUserInfo(this.userInfoParameter);//获取办事人信息
//将方法绑定到window下面,提供给外部调用
window.PlayAudioCallback = (res)=> this.PlayAudioCallback(res);//语音播放
window.HighCameraCallback = (success, obj)=> this.HighCameraCallback(success, obj);//获取高拍仪照片
window.ConfirmCallback = (res)=> this.ConfirmCallback(res);//提示确认,取消对话框
window.getUserInfo = (obj)=> this.getUserInfo(obj);//获取身份证信息
this.initializeOcrUrl();//初始化ocr地址
},
methods:{
initializeOcrUrl(){
if (window.config.isUpRocrUrl){//更新ocr地址 true=更新 false=不更新
this.$axios.get(window.config.api + 'lilo/v1/robot/getRocrUrl', {
params: {
serviceId : this.serviceId,
projectId : this.projectId
}
}).then(item => {
if (item.data.success) {
window.config.rocrUrl=item.data.msg;
window.config.isUpRocrUrl=false;
}else{
this.message(true,"服务器异常,初始化失败!");//提示框
}
}).catch(err => {
this.message(true,"服务器异常,初始化失败!");//提示框
})
}
},
back() {
if (robotType)robotsdk.closeHighCamera();//关闭高拍仪
if(robotType){
robotsdk.closeExternalApp({//退出跳转咨询页面
mode:0
});
}
},
nextStep() {
if (robotType)robotsdk.closeHighCamera();//关闭高拍仪
if (!this.isRepetition) this.$LocalStorage.SessionPut("entrustMaterials",this.materials);
if (this.isRepetition) this.$LocalStorage.SessionPut("entrustMaterials",this.materials[0]);
this.$LocalStorage.SessionPut("scanType",this.scanType);
this.$router.push({ path: '/material',query:{isCancel:true}});
},
scanBtn(){
this.$refs.child.counter=300; //刷新时间
this.masks(true);//遮罩层 true 打开 false 关闭
if (robotType)robotsdk.getHighCamera(this.highCameraImgParameter);//获取高拍仪照片
},
pageInfo (curPage,num) {
var curPage = (curPage - 1) * num;
this.materialList = this.materials.slice(curPage,parseInt(curPage) + parseInt(num));
this.imgDelList = this.imgDel.slice(curPage,parseInt(curPage) + parseInt(num));
},
delImg(index,fileId){
this.$refs.child.counter=300; //刷新时间
if (this.isRepetition){
this.showConfirmMessage("当前材料还包含其它材料是否确认一起删除?");
}else{
this.delMaterialByFileId(index,fileId);//删除数据库材料数据
}
},
openVoice(content){
robotsdk.playAudio({//语音播放参数
cmd: "cmd",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent:content,//语音内容
callback: "PlayAudioCallback"//接口回调函数
});//虚拟人物播放语音及动作
},
PlayAudioCallback (res){
if (res=="cmdOK"){
if (robotType){
robotsdk.openHighCamera(this.highCameraParameter);//打开高拍仪预览界面
this.scanBtnIsShow=true;
robotsdk.playAudio({//语音播放参数
cmd: "sm",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent: "请将需要提交的资料放置到扫描区,等资料预览清晰后点击'扫描'按钮进行扫描",//语音内容
callback: "PlayAudioCallback"//接口回调函数
});//虚拟人物播放语音及动作
}
}
},
HighCameraCallback(success, obj){
if (success) {
let special="";
if (this.scanType==1)special="isInhandImage";
let res = eval('(' + obj + ')');//高拍仪回调的数据集
$.post( window.config.rocrUrl+'lilo/aiCase/uploadFileNew', {
fileName : res.filename,
base64 : res.file,
projectId: this.projectId,
special:special,
}).then(item => {
if (item.success) {
this.masks(false);//遮罩层 true 打开 false 关闭
if (robotType){
robotsdk.playAudio({
cmd: "cmd",
animation: 0,
videocontent: "识别成功,请放下一页。",
callback: ""
})
}
let fileName=item.obj.fileName;
if (this.scanType==1){
if (fileName=="手持"){
this.upMaterials(0,item);//更新手持身份证信息
}else{
this.message("请提交手持身份证信息!");//提示框
}
if (this.materials[0].fileUrl!='')this.isBtnNextShow=true;
}else{
let bool=false;
if (item.obj.jsonData!=''){
let identity =eval('(' + item.obj.jsonData + ')');//身份证信息
try {
identity.forEach((obj,index)=>{
if (this.name==obj.name){
bool=true;
throw("当前委托人身份证正确================");
}
})
}catch (e){
console.info(e);
}
}
let oneFileUrl=this.materials[0].fileUrl;
let twoFileUrl=this.materials[1].fileUrl;
if (fileName!=''){
if (fileName.lastIndexOf(",")!=-1){//判断材料是否多份
if (fileName.lastIndexOf("委托书")!=-1&&fileName.lastIndexOf("身份证")!=-1){
if (oneFileUrl==""&&twoFileUrl==""){
this.upMaterials(0,item);//更新委托书材料信息
if (bool){
this.upMaterials(1,item);//更新委托人身份证材料信息
this.temporary=item;
this.isRepetition=true;
} else{
this.message("当前办理人和委托人名称不一致,请提交委托人身份证!");//提示框
}
}else if(oneFileUrl!=""&&twoFileUrl!=""){
this.type=3;
this.temporary=item;
this.showConfirmMessage("检测到材料已上传过是否覆盖最新?");
}else if(oneFileUrl==""&&twoFileUrl!=""){
this.upMaterials(0,item);//更新委托书材料信息
}else if(oneFileUrl!=""&&twoFileUrl==""){
if (bool)this.upMaterials(1,item);//更新委托人身份证材料信息
if (!bool)this.message("请提交委托人身份证!");//提示框
}
}else{
this.indexOfFileName(item,bool);
}
}else{
if (fileName.lastIndexOf("委托书")!=-1||fileName.lastIndexOf("身份证")!=-1){
this.indexOfFileName(item,bool);
}else{
this.message("请勿提交其它文件!");//提示框
}
}
}else{
this.message("服务器异常,扫描失败!");//提示框
}
if (this.materials[0].fileUrl!=''&&this.materials[1].fileUrl!='')this.isBtnNextShow=true;
}
}else{
this.masks(false);//遮罩层 true 打开 false 关闭
this.message("服务器异常,扫描失败!");//提示框
}
}).catch(err => {
this.masks(false);//遮罩层 true 打开 false 关闭
this.message("服务器异常,扫描失败!");//提示框
})
} else {
this.masks(false);//遮罩层 true 打开 false 关闭
this.message("服务器异常,扫描失败!");//提示框
}
},
ConfirmCallback(bool){
if (bool){//确认
if (this.isRepetition){
this.type=3;
this.delMaterialByFileId(null,this.materials[0].fileId);
}else{
if (this.type==1){
this.delMaterialByFileId(0,this.materials[0].fileId);
}else if (this.type==2){
this.delMaterialByFileId(1,this.materials[1].fileId);
} else{
this.delMaterialByFileId(null,this.materials[0].fileId);
}
}
}else{//取消
if (!this.isRepetition){
this.type=4;//4:删除当前上传材料,不做其它操作
this.delMaterialByFileId(null,this.temporary.obj.fileId);
}
}
},
masks(bool){
if (robotType) {
robotsdk.showMasks({//遮罩层
isOpen: bool //true 打开 false 关闭
});
}
},
message(content){
if (robotType) {
robotsdk.showMessage({//提示框
isOpen: true,//true 打开 false 关闭
content: content,//消息内容
isAutoClose: true//true 5秒自动关闭 false 用户点确认关闭
});
}
},
getUserInfo(obj){
let res = eval('(' + obj + ')');
this.name=res.name;
this.mobile=res.mobile;
this.idcard=res.idcard;
},
showConfirmMessage(content){
if (robotType) {
robotsdk.showConfirmMessage({
isOpen: true,
content: content,
isAutoClose: false,
callback: "ConfirmCallback"
});
}
},
upMaterials(number,item){
this.materials[number].fileUrl=item.obj.fileUrl;
this.materials[number].fileId=item.obj.fileId;
this.materials[number].artificialType=item.obj.artificialType;
this.materials[number].type=item.obj.type;
this.imgDel[number].fileId=item.obj.fileId;
this.imgDel[number].name=item.obj.fileName;
this.imgDel[number].imgSrc=require('../assets/images/ico/delete.png');
},
indexOfFileName(item,bool){
let ofEntrustName=item.obj.fileName.lastIndexOf("委托书");
let ofCardName=item.obj.fileName.lastIndexOf("身份证");
let entrustFileUrl=this.materials[0].fileUrl;
let cardFileUrl=this.materials[1].fileUrl;
if (ofEntrustName!=-1&&entrustFileUrl==''){
this.upMaterials(0,item,false);//更新委托书材料信息
} else if (ofCardName!=-1&&cardFileUrl==''){
if (bool) this.upMaterials(1,item,false);//更新委托人身份证材料信息
if (!bool)this.message("请提交委托人身份证!");//提示框
} else if (ofEntrustName!=-1&&entrustFileUrl!=''){
this.type=1;
this.temporary=item;
this.showConfirmMessage("检测到材料已上传过是否覆盖最新?");
} else if (ofCardName!=-1&&cardFileUrl!=''){
if (bool) {
this.type=2;
this.temporary=item;
this.showConfirmMessage("检测到材料已上传过是否覆盖最新?");
}
if (!bool)this.message("请提交委托人身份证!");//提示框
}
},
delMaterialByFileId(index,fileId){
$.post( window.config.rocrUrl+'lilo/aiCase/deleteFile', {
fileId : fileId
}).then(item => {
if (item.success) {
//删除材料
if (this.type==0||this.type==1||this.type==2){
this.imgDel[index].name='';
this.materials[index].fileUrl='';
this.isBtnNextShow=false;
}
//覆盖材料更新
if (this.type==1)//更新委托书材料信息
this.upMaterials(0,this.temporary);
else if (this.type==2)//更新身份证材料信息
this.upMaterials(1,this.temporary);
else if (this.type==3){//更新委托书及身份证材料信息
this.materials.forEach((obj,index)=>{
this.imgDel[index].name='';
obj.fileUrl='';
obj.isBtnNextShow=false;
});
if (!this.isRepetition){
this.upMaterials(0,this.temporary);//更新委托书材料信息
this.upMaterials(1,this.temporary);//更新委托书材料信息
}
}
this.type=0;
this.temporary=[];
this.isRepetition=false;
}else{
this.message("服务器异常,删除失败!");//提示框
}
}).catch(err => {
this.message("服务器异常,删除失败!");//提示框
})
},
//语音回调(只处理扫描,下一步,退出)
voiceCallback(res){
if (res=="scanning"){
if (this.scanBtnIsShow){
this.scanBtn();
}
}
if (res=="nextStep"){
if (this.isBtnNextShow){
this.nextStep();
}
}
if (res=="quit"){
this.back();
}
}
}
}
</script>
<style scoped>
.scanMaterial{
background-image: url('../assets/images/background.png');
background-repeat:no-repeat;
background-size:100% 100%;
background-size: cover;
overflow:auto;
}
.imgButton {
width: 31%;
}
.example{
background-image: url('../assets/images/scanExample.gif');
background-repeat:no-repeat;
height: 676px;
margin-left: 1.2%;
margin-top: 1.4%
}
.left{
height: 100%;
float: left
}
.right{
padding-left: 72%;
padding-top: 20px;
height: 82%;
}
.rightFrame{
height: 140px;
}
.fileName{
width: 74%;
padding-left: 28%;
color:#FFFFFF;
padding-top: 2%;
}
.imgFrame{
height: 92px;
width: 45%;
}
.imgSize{
height: 75px;
width: 38%;
}
.imgList{
position: absolute;
left: 70.92%;
padding-top: 2.2%;
width: 30%;
}
.imgBetween{
height: 140px;
}
.imgDel{
position: absolute;
padding-top: 1.5%;
left: 87%;
z-index: 99;
}
.imgDelBetween{
height: 137px;
z-index: 99;
}
</style>
\ No newline at end of file
<template>
<b-page @bPageLoaded="voiceCallback"></b-page>
<count-down times=300 bottomOffset="10" rightOffset="10" fontSize="24" ref="child"></count-down>
<div class="back" style="height: 100%;" >
<div class="top">
<div class="topTitle">
请确认您的身份
</div>
<div class="topImg">
<div style="float: left;margin-left: 190px">
<img @click="legal" src="../assets/images/self.png">
</div>
<div style="margin-left:40px;width: 1100px;" v-if="serviceId!='S100537'">
<img @click="entrust" :src="entrustUrl">
</div>
</div>
</div>
<div class="below" v-if="isEntrust&&entrustType==3">
<div class="belowTitle">
请选择身份验证的方式
</div>
<div class="belowImg">
<div style="float: left;margin-left: 190px">
<span @click="goUserCard" class="belowLeft">法人手持身份证照片</span>
<img @click="goUserCard" src="../assets/images/legalCard.png">
</div>
<div style="width: 1100px">
<span @click="goUserCopies" class="belowRight">法人+委托书原件或复印件</span>
<img @click="goUserCopies" style="margin-left:40px" src="../assets/images/copies.png">
</div>
</div>
</div>
</div>
</template>
<script>
import BPage from "@/components/registerVoice";
export default{
components: {
BPage,
},
data() {
return {
isEntrust:false,
entrustUrl:require('../assets/images/entrustNot.png'),
projectId: '',//事项ID
serviceId: '',//机器人ID
projectName:'',//事项名称
entrustType:'',//办理类型:1:法人手持身份证照片, 2:法人+委托书原件或复印件,3:法人手持身份证照片及法人+委托书原件或复印件
voiceParameter:{//语音播放参数
cmd: "cmd",//语音指令,可参考属性voiceInstruct
animation: 0,//虚拟任务动作编号可参考属性animationEnum
videocontent: "请选择办理身份。",//语音内容
callback: "PlayAudioCallback"//接口回调函数
},
}
},
created() {
this.projectId = this.$route.query.projectId;
this.serviceId = this.$route.query.serviceId
this.projectName = this.$route.query.projectName;
this.queryEntrustType();//获取委托人办理类型
this.upStorageDate();
if (robotType)this.openVoice();//语音播放
//将方法绑定到window下面,提供给外部调用
window.PlayAudioCallback = (res)=> this.PlayAudioCallback(res);//语音播放
},
methods:{
queryEntrustType(){
this.$axios.get(window.config.api + '/lilo/aiCase/getRobotCaseMethod', {
params: {
projectId : this.projectId
}
}).then(item => {
if (item.data.success&&item.data.obj!=null) {
if (item.data.obj.entrustType!=''&&item.data.obj.entrustType!=null){
this.entrustType=item.data.obj.entrustType;
}else{
this.message("该事项委托人代办初始化失败,请稍后再试!");//提示框
}
}else{
this.message("服务器异常,初始化失败!");//提示框
}
}).catch(err => {
this.message("服务器异常,初始化失败!");//提示框
})
},
legal(){
this.$LocalStorage.SessionPut("userType",'0');//userType 0:法人类型
this.$router.push({path:'/material'});//跳转材料页面
},
entrust(){
this.updateTimes()//刷新时间
this.$LocalStorage.SessionPut("userType",'1');//userType 1:委托人类型
if (this.entrustType==1){
this.$router.push({path:'/userCard'});//跳转手持身份证照片页面
}else if (this.entrustType==2){
this.$router.push({path:'/userCopies'});//跳转法人+委托书原件或复印件页面
}else if (this.entrustType==3){
this.isEntrust=true;
this.entrustUrl=require('../assets/images/entrustYes.png');
}
},
goUserCard(){
this.$router.push({path:'/userCard'});//跳转手持身份证照片页面
},
goUserCopies(){
this.$router.push({path:'/userCopies'});//跳转法人+委托书原件或复印件页面
},
upStorageDate(){
this.$LocalStorage.SessionPut("projectId",this.projectId);
this.$LocalStorage.SessionPut("serviceId",this.serviceId);
this.$LocalStorage.SessionPut("projectName",this.projectName);
},
message(content){
if (robotType) {
robotsdk.showMessage({//提示框
isOpen: true,//true 打开 false 关闭
content: content,//消息内容
isAutoClose: true//true 5秒自动关闭 false 用户点确认关闭
});
}
},
openVoice(){
robotsdk.playAudio(this.voiceParameter);//虚拟人物播放语音及动作
},
PlayAudioCallback (res){
console.info("语音播放回调结果============"+res);
},
updateTimes(){
this.$refs.child.counter=300;
},
//语音回调(只处理退出)
voiceCallback(res){
if (res=="quit"){
if(robotType){
robotsdk.closeExternalApp({
mode:0
});
}
}
}
}
}
</script>
<style scoped>
.back{
background-image: url('../assets/images/background.png');
background-repeat:no-repeat;
background-size:100% 100%;
background-size: cover;
overflow:auto;
}
.topTitle{
font-size: 30px;
color: #FFFFFF;
text-align: left;
padding-left: 100px;
}
.belowTitle{
font-size: 30px;
color: #FFFFFF;
text-align: left;
padding-left: 100px;
}
.top{
padding-top:40px;
}
.topImg{
padding-top: 30px;
}
.below{
padding-top: 20px;
}
.belowImg{
padding-top: 27px;
}
.btnNext{
position: absolute;
left: 37%;
top: 86%;
}
.belowLeft{
position: absolute;
font-size: 30px;
color: #ffffff;
left: 260px;
top: 590px;
}
.belowRight{
position: absolute;
font-size: 30px;
color: #ffffff;
left: 690px;
top: 590px;
}
</style>
\ No newline at end of file
<template xmlns="http://www.w3.org/1999/html">
<b-page @bPageLoaded="voiceCallback"></b-page>
<count-down times=300 bottomOffset="0" rightOffset="10" fontSize="16" ref="child"></count-down>
<template v-if="schedule == 0">
<div class="workGuide">
<div style="padding-top: 18%;">
<div style="margin-top: 45px;">
<font size="6" color="#FFFFFF">{{startPrintRemind}}<br><br>如果您已经备齐该资料请点击下一步,如果您不具备该资料请点击打印</font>
</div>
<div style="position: absolute;margin-left: 248px;margin-top: 280px;">
<img style="width: 90%;" src="../assets/images/btn/btnPrint.png" @click="printClick" id="confirm">
</div>
<div style="position: absolute;margin-left: 600px;margin-top: 280px;">
<img style="width: 90%;" src="../assets/images/btn/btnNext.png" @click="nextClick" id="cancel">
</div>
</div>
</div>
</template>
<template v-if="schedule == 1">
<div class="workGuide">
<div style="padding-top: 18%;">
<div style="margin-top: 45px;">
<font size="6" color="#FFFFFF">正在为您打印{{promptInformation}},请您耐心等候</font>
</div>
<div style="position: absolute;margin-left: 520px;margin-top: 100px;">
<img style="width: 90%;" src="../assets/images/wait.gif">
</div>
</div>
</div>
</template>
<template v-if="schedule == 2">
<div class="workGuide">
<div style="padding-top: 18%;">
<div style="margin-top: 45px;">
<font size="6" color="#FFFFFF">{{printEndRemind}}</font>
</div>
</div>
</div>
</template>
</template>
<style scoped>
.workGuide{
background-image: url('../assets/images/background.png');
background-repeat: no-repeat;
background-size: cover;
overflow:auto;
margin-bottom: 20px;
padding: 0 70px;
height:100%;
}
</style>
<script>
import { layer } from "@layui/layer-vue";
import websocket from "@/assets/js/websocket";
import commonUtil from "@/assets/js/commonUtil";
import BPage from "@/components/registerVoice";
export default{
components: {
BPage,
},
data() {
return {
isWorkPrint:'',//办事指南处是否打印word 1:是 0:否
printStep:'',//打印完成后续步骤 1:继续 0:退出
startPrintRemind:'',//打印前提示信息
promptInformation:'',//打印资料名称:
printEndRemind:'',//打印后提示信息
inquiryUnemployment:'',//是否询问失业原因
projectId: '',//事项ID
serviceId: '',//机器人ID
projectName:'',//事项名称
schedule: "",//界面显示控制
}
},
created() {
this.projectId = this.$route.query.projectId;
this.serviceId = this.$route.query.serviceId;
this.projectName = this.$route.query.projectName;
this.schedule="0";
window.printReport = (res) => this.printReport(res);//打印回调
window.PlayAudio_printReportCallback = (res) => this.PlayAudio_printReportCallback(res);//打印事项资料后语音回调
this.findParam();
},
methods:{
timing(){//调试页面使用
let timer = setInterval(() => {
//需要定时执行的代码
this.schedule++;
console.log(this.schedule);
if (this.schedule>0){
this.schedule=0;
//清除多次执行定时器
clearInterval(timer);
// this.$router.push({ path: '/scanMaterial' , query: {projectId: this.projectId}});
}
},3000)
},
findParam(){
if(robotType){
$.post(window.config.api + '/lilo/aiCase/getCaseMethodByProjectId', {
projectId:this.projectId
}).then(item => {
if (item.success) {//接口调用成功
this.startPrintRemind = item.obj.startPrintRemind;//打印前提示信息
this.promptInformation = item.obj.promptInformation;//打印资料名称
this.printEndRemind = item.obj.printEndRemind;//打印后提示信息
this.inquiryUnemployment = item.obj.inquiryUnemployment;//是否进入询问失业原因页面
//是否办事指南处是否打印word赋值 1:是 0:否
if (item.obj.isWorkPrint!=null){
this.isWorkPrint = item.obj.isWorkPrint;
} else {
this.isWorkPrint="0";
}
//打印完成后续步骤赋值 1:继续 0:退出
if (item.obj.printStep!=null){
this.printStep = item.obj.printStep;
} else {
this.printStep="0";
}
//是否办事指南处打印word流程 1:是,0:否
if ("1"==this.isWorkPrint){//需要打印界面
this.schedule="0";
robotsdk.playAudio({
cmd: "cmd",
animation: 0,
videocontent: (this.startPrintRemind) + ",如果您已经备齐该资料请点击下一步,如果您不具备该资料请点击打印",
callback: ""
})
}else {//不需要打印
debugger;
if ("1" == this.inquiryUnemployment){
this.$router.push({ path: '/inquiryUnemployment',query: {projectId: this.projectId ,serviceId:this.serviceId, projectName:this.projectName}});//转跳贵阳询问是否进入失业金申领页面
}else {
this.$router.push({ path: '/userSelect',query: {projectId: this.projectId ,serviceId:this.serviceId, projectName:this.projectName}});//转跳身份选择页面
}
}
}else {//接口调用失败
this.$router.push({ path: '/errorPage'});//转跳错误提示页面
}
})
}else {//页面调试用
this.timing();
}
},
//点击打印按钮
printClick(){
this.schedule=1;
$.post(window.config.rocrUrl + '/lilo/aiCase/workGuide', {
projectId:this.projectId
}).then(item => {
if (item.success) {//接口调用成功
robotsdk.playAudio({
cmd: "cmd",
animation: 0,
videocontent: "请稍等,正在为您打印!",
callback: ""
})
robotsdk.printFile({
filetype: 'doc',
base64: item.obj.base64Byte,//打印base64数据
remoteprintname: "",
replyvoice: '',
callback: "printReport"
});
}else {//接口调用失败
this.$router.push({ path: '/errorPage'});//转跳错误提示页面
}
})
},
//打印事项材料回调
printReport(bool){
if (bool){//打印成功返回true
this.schedule=2;
robotsdk.playAudio({
cmd: "cmd",
animation: 0,
videocontent: this.printEndRemind,
callback: "PlayAudio_printReportCallback"
})
}else {
this.$router.push({ path: '/errorPage',query: {msg: '事项材料打印失败,请联系管理员'}});//转跳错误提示页面
}
},
//"事项材料打印成功_语音回调"
PlayAudio_printReportCallback(res){
if (res=="cmdOK") {//语音播报完5秒后执行代码
let timer = setInterval(() => {
if ("1"==this.printStep){//打印完成后续步骤 1:继续 0:退出
this.$router.push({ path: '/userSelect',query: {projectId: this.projectId ,serviceId:this.serviceId, projectName:this.projectName}});//转跳身份选择页面
}else {
robotsdk.closeExternalApp({
mode:0
});
}
},3000)
}
},
//点击下一步
nextClick(){
if(robotType){
this.$router.push({ path: '/userSelect',query: {projectId: this.projectId ,serviceId:this.serviceId, projectName:this.projectName}});//转跳身份选择页面
}
},
//语音回调(只处理下一步和退出)
voiceCallback(res){
if (res=="nextStep"){
this.nextClick();
}
if (res=="quit"){
if(robotType){
robotsdk.closeExternalApp({
mode:0
});
}
}
}
}
}
</script>
\ No newline at end of file
const { defineConfig } = require('@vue/cli-service')
const webpack = require('webpack')
module.exports = defineConfig({
transpileDependencies: true,
// webpack配置
configureWebpack: {
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery",
"windows.jQuery": "jquery"
})
]
},
devServer: {
port: 8080,
}
})
\ No newline at end of file
Arguments:
E:\Programs\nodejs\node.exe C:\Users\81536\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js
PATH:
D:\Programs\VanDyke Software\Clients\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;d:\Program Files\Git\cmd;D:\apache-maven-3.5.0\bin;D:\Java\jdk1.8.0_231\bin;E:\Programs\mysql-8.0.18-winx64\bin;E:\Programs\Erlang OTP\bin;E:\Programs\Redis\;E:\Programs\nodejs\;C:\Program Files\dotnet\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;E:\gradle\gradle-6.1.1\bin;E:\Xftp 7\;C:\Program Files (x86)\NetSarang\Xshell 7\;E:\opencv\opencv\build\x64\vc16\bin;C:\Program Files (x86)\PuTTY\;C:\Program Files\Docker\Docker\resources\bin;D:\TortoiseSVN\bin;D:\Programs\Python\Python310\Scripts\;D:\Programs\Python\Python310\;C:\Users\81536\AppData\Local\Microsoft\WindowsApps;;d:\Programs\Microsoft VS Code\bin;D:\JetBrains\IntelliJ IDEA 2022.2\bin;;C:\Users\81536\AppData\Roaming\npm;D:\JetBrains\WebStorm 2022.2.2\bin;;D:\so-vits-svc\ffmpeg\bin;E:\xhx\robot_h5\node_modules\.bin
Yarn version:
1.22.19
Node version:
16.17.0
Platform:
win32 x64
Trace:
Error: getaddrinfo ENOTFOUND npm.aliyun.com
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26)
npm manifest:
{
"name": "robot_h5",
"version": "0.1.0",
"private": true,
"scripts": {
"start": "vue-cli-service serve",
"build": "vue-cli-service build"
},
"dependencies": {
"@layui/layui-vue": "^1.4.9",
"@popperjs/core": "^2.11.6",
"axios": "^0.27.2",
"bootstrap": "^5.2.1",
"core-js": "^3.25.1",
"element-plus": "^2.2.16",
"good-storage": "^1.1.1",
"jquery": "^3.6.1",
"qrcodejs2": "^0.0.2",
"vue": "^3.2.13",
"vue-axios": "^3.4.1",
"vue-router": "~4.0.3"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-plugin-vuex": "~5.0.0",
"@vue/cli-service": "~5.0.0"
}
}
yarn manifest:
No manifest
Lockfile:
No lockfile
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