|
@@ -28,11 +28,11 @@
|
|
<view class="plr18">
|
|
<view class="plr18">
|
|
<bus-list :datalist="list" :wtdt="wtdt" :type="type" @getXzFn="getXzFn"></bus-list>
|
|
<bus-list :datalist="list" :wtdt="wtdt" :type="type" @getXzFn="getXzFn"></bus-list>
|
|
</view>
|
|
</view>
|
|
- <!-- <view style="height: 100rpx;"></view> -->
|
|
|
|
- <!-- <view class="scanbox flexcc">
|
|
|
|
|
|
+ <view style="height: 100rpx;"></view>
|
|
|
|
+ <view class="scanbox flexcc" @click='getScanFn'>
|
|
<image :src="scanimg"></image>
|
|
<image :src="scanimg"></image>
|
|
扫码查看
|
|
扫码查看
|
|
- </view> -->
|
|
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -41,7 +41,7 @@
|
|
const baseUrl = config.baseUrl
|
|
const baseUrl = config.baseUrl
|
|
const baseName = config.baseName
|
|
const baseName = config.baseName
|
|
import busList from "@/work/components/business/list.vue"
|
|
import busList from "@/work/components/business/list.vue"
|
|
- import {getListOss} from "@/api/common.js"
|
|
|
|
|
|
+ import {getListOss,getEwmList} from "@/api/common.js"
|
|
import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
|
|
import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
|
|
export default{
|
|
export default{
|
|
components:{busList},
|
|
components:{busList},
|
|
@@ -78,6 +78,97 @@
|
|
getDetail(e){
|
|
getDetail(e){
|
|
this.$tab.navigateTo("/work/pages/file/wjdetails?id="+e)
|
|
this.$tab.navigateTo("/work/pages/file/wjdetails?id="+e)
|
|
},
|
|
},
|
|
|
|
+ getScanFn(){
|
|
|
|
+ // 扫码识别
|
|
|
|
+ var that = this;
|
|
|
|
+ uni.scanCode({
|
|
|
|
+ onlyFromCamera: true,
|
|
|
|
+ autoZoom:false,
|
|
|
|
+ scanType: ['qrCode'],
|
|
|
|
+ success: function(red) {
|
|
|
|
+ let result = red.result;
|
|
|
|
+ var a=JSON.parse(result)
|
|
|
|
+ // console.log(a)
|
|
|
|
+ if (typeof result == 'string') {
|
|
|
|
+ try {
|
|
|
|
+ //type1,认证,2 文件
|
|
|
|
+ if(a.type==1){
|
|
|
|
+ that.$tab.navigateTo(`/work/pages/prove/index`)
|
|
|
|
+ }else if(a.type==2){
|
|
|
|
+ // {"type":"2","loanApplicationNumber":"RZDB202405281425037292766","bigType":"c","fileType":"dbyxh"},
|
|
|
|
+ var params={
|
|
|
|
+ loanApplicationNumber:a.loanApplicationNumber,
|
|
|
|
+ bigType:a.bigType,
|
|
|
|
+ type:a.fileType,
|
|
|
|
+ }
|
|
|
|
+ getEwmList(params).then(res=>{
|
|
|
|
+ if(res.code==200){
|
|
|
|
+ var data=res.data;
|
|
|
|
+ if(data.url){
|
|
|
|
+ that.getDown(data.url)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ } catch (e) {
|
|
|
|
+ uni.navigateBack({
|
|
|
|
+ delta: 1
|
|
|
|
+ })
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '扫码查询失败,请检查二维码是否正确',
|
|
|
|
+ icon: "none"
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ fail: function(e) {
|
|
|
|
+ if (e && e.errMsg && e.errMsg.indexOf('scanCode:fail cancel') != -1) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '扫码失败',
|
|
|
|
+ icon: "none"
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ getDown(e){
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: '加载中'
|
|
|
|
+ });
|
|
|
|
+ var url=baseUrl+e;
|
|
|
|
+ let index1 = e.lastIndexOf("."); // 得到一个索引值
|
|
|
|
+ let index2 = e.length;
|
|
|
|
+ let type = e.substring(index1, index2);
|
|
|
|
+ if ((type.indexOf('jpg') > -1 || type.indexOf('jpeg') > -1 || type.indexOf('png') > -1)) {
|
|
|
|
+ uni.previewImage({
|
|
|
|
+ current: 0,
|
|
|
|
+ urls: [url],
|
|
|
|
+ // background: '#ffffff'
|
|
|
|
+ });
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ } else {
|
|
|
|
+ uni.downloadFile({
|
|
|
|
+ url: url,//文件的下载路径
|
|
|
|
+ success(result) {
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ var filePath = result.tempFilePath;
|
|
|
|
+ uni.openDocument({
|
|
|
|
+ filePath: filePath,
|
|
|
|
+ showMenu: true,
|
|
|
|
+ success: function (res) {
|
|
|
|
+ // console.log('打开文档成功');
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ fail(res) {uni.hideLoading()}
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
getConfirm(){
|
|
getConfirm(){
|
|
this.getrefreshData()
|
|
this.getrefreshData()
|
|
},
|
|
},
|