apply-clients 3.4.98-21 → 3.4.98-23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dev-server.js +2 -2
- package/package.json +1 -1
- package/src/applyAndroid.js +56 -56
- package/src/components/android/Process/Processes/chargesList.vue +171 -0
- package/src/filiale/dingcheng/android/AppSign.vue +152 -0
- package/src/filiale/dingcheng/android/AppTakePic.vue +140 -0
- package/src/filiale/dingcheng/android.js +7 -0
- package/src/filiale/dingcheng/pc/ApplyUpload.vue +327 -0
- package/src/filiale/dingcheng/pc.js +6 -0
- package/src/main.js +1 -1
package/build/dev-server.js
CHANGED
|
@@ -8,8 +8,8 @@ var compiler = webpack(config)
|
|
|
8
8
|
// var proxy = httpProxy.createProxyServer()
|
|
9
9
|
// var ldap = 'http://121.36.79.201:8400'
|
|
10
10
|
// var applyinstall = 'http://121.36.79.201:8400'
|
|
11
|
-
var ldap = 'http://
|
|
12
|
-
var applyinstall = 'http://
|
|
11
|
+
var ldap = 'http://111.85.16.8:30785'
|
|
12
|
+
var applyinstall = 'http://111.85.16.8:30785'
|
|
13
13
|
|
|
14
14
|
var proxyTable = {
|
|
15
15
|
'/rs/logic/getSaleInitData': {
|
package/package.json
CHANGED
package/src/applyAndroid.js
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import Vue from 'vue'
|
|
2
|
-
import { all } from 'vue-client'
|
|
3
|
-
Vue.config.silent = true
|
|
4
|
-
import ApplyGetSaleParam from './stores/ApplyGetSaleParams'
|
|
5
|
-
import ApplyLoadParams from './stores/ApplyLoadParams'
|
|
6
|
-
/** ****************服务插件*********************/
|
|
7
|
-
|
|
8
|
-
export default function (filiale) {
|
|
9
|
-
Vue.use(ApplyGetSaleParam)
|
|
10
|
-
Vue.use(ApplyLoadParams)
|
|
11
|
-
/** ***************************报建模块*********************************/
|
|
12
|
-
// 报建 总入口
|
|
13
|
-
Vue.component('app-exploration-user', (resolve) => { require(['./components/android/Process/AppExplorationUser'], resolve) })
|
|
14
|
-
Vue.component('app-service-control', (resolve) => { require(['./components/android/Process/AppServiceControl'], resolve) })
|
|
15
|
-
Vue.component('app-process-supervisory', (resolve) => { require(['./components/android/Supervisory/AppProcessSupervisory'], resolve) })
|
|
16
|
-
Vue.component('app-supervisory-cart', (resolve) => { require(['./components/android/Supervisory/AppSupervisoryCart'], resolve) })
|
|
17
|
-
Vue.component('app-istall-function', (resolve) => { require(['./components/android/Function/AppInstallFunction'], resolve) })
|
|
18
|
-
Vue.component('app-function-service-control', (resolve) => { require(['./components/android/Function/AppFunctionServiceControl'], resolve) })
|
|
19
|
-
|
|
20
|
-
Vue.component('app-sign', (resolve) => { require(['./components/android/AppSign'], resolve) })
|
|
21
|
-
Vue.component('app-take-pic', (resolve) => { require(['./components/android/AppTakePic'], resolve) })
|
|
22
|
-
Vue.component('app-service-view', (resolve) => { require(['./components/android/AppServiceView'], resolve) })
|
|
23
|
-
Vue.component('app-onetomany', (resolve) => { require(['./components/android/AppOnetomany'], resolve) })
|
|
24
|
-
|
|
25
|
-
Vue.component('app-add-material-science', (resolve) => { require(['./components/android/Process/Processes/AppAddMaterialScience'], resolve) })
|
|
26
|
-
|
|
27
|
-
Vue.component('app-installation-details', (resolve) => { require(['./components/android/Process/Processes/AppInstallationDetails'], resolve) })
|
|
28
|
-
Vue.component('app-apply-devices-management', (resolve) => { require(['./components/android/Process/Processes/AppDevicesManagement'], resolve) })
|
|
29
|
-
Vue.component('app-charge-management', (resolve) => { require(['./components/android/Process/Processes/AppChargeManagement'], resolve) })
|
|
30
|
-
Vue.component('app-supplemental-agreement', (resolve) => { require(['./components/android/Process/Processes/AppSupplementalAgreement'], resolve) })
|
|
31
|
-
// 选择用户信息
|
|
32
|
-
Vue.component('select-userinfo', (resolve) => { require(['./components/android/Process/Processes/selectUserinfo'], resolve) })
|
|
33
|
-
// 选择报建项目
|
|
34
|
-
Vue.component('select-apply', (resolve) => { require(['./components/android/Process/Processes/selectApply'], resolve) })
|
|
35
|
-
Vue.component('app-build-sign', (resolve) => { require(['./components/android/Process/Processes/AppBuildSign'], resolve) })
|
|
36
|
-
|
|
37
|
-
// 区域 地址下拉框联动组件
|
|
38
|
-
Vue.component('app-res-area-select', (resolve) => { require(['./components/android/AreaSelect/AppResAreaSelect'], resolve) })
|
|
39
|
-
Vue.component('app-res-area-select-group', (resolve) => { require(['./components/android/AreaSelect/AppResAreaSelectGroup'], resolve) })
|
|
40
|
-
Vue.component('area-select', (resolve) => { require(['./components/product/AreaSelect/MyAreaSelect'], resolve) })
|
|
41
|
-
Vue.component('apply-print-charge', (resolve) => { require(['./components/product/Process/Processes/Print/printCharge'], resolve) })
|
|
42
|
-
// 地图组件
|
|
43
|
-
Vue.component('app-res-area-map-group', (resolve) => { require(['./components/android/AreaSelect/AppResAreaMapGroup'], resolve) })
|
|
44
|
-
// 扫描二维码
|
|
45
|
-
Vue.component('app-qrcode-reader', (resolve) => { require(['./components/android/AreaSelect/AppQrcodeReader'], resolve) })
|
|
46
|
-
Vue.component('app-ignition-ventilation', (resolve) => { require(['./components/android/Ignition/VentilationIgnition'], resolve) })
|
|
47
|
-
Vue.component('app-ignition-handle', (resolve) => { require(['./components/android/Ignition/VentilationIgnitionHandle'], resolve) })
|
|
48
|
-
|
|
49
|
-
// 特殊目录给这里加
|
|
50
|
-
if (filiale) {
|
|
51
|
-
let filialeComp = require(`./filiale/${filiale}/android`).specialComp
|
|
52
|
-
for (let key in filialeComp) {
|
|
53
|
-
Vue.component(key, filialeComp[key])
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
import { all } from 'vue-client'
|
|
3
|
+
Vue.config.silent = true
|
|
4
|
+
import ApplyGetSaleParam from './stores/ApplyGetSaleParams'
|
|
5
|
+
import ApplyLoadParams from './stores/ApplyLoadParams'
|
|
6
|
+
/** ****************服务插件*********************/
|
|
7
|
+
|
|
8
|
+
export default function (filiale) {
|
|
9
|
+
Vue.use(ApplyGetSaleParam)
|
|
10
|
+
Vue.use(ApplyLoadParams)
|
|
11
|
+
/** ***************************报建模块*********************************/
|
|
12
|
+
// 报建 总入口
|
|
13
|
+
Vue.component('app-exploration-user', (resolve) => { require(['./components/android/Process/AppExplorationUser'], resolve) })
|
|
14
|
+
Vue.component('app-service-control', (resolve) => { require(['./components/android/Process/AppServiceControl'], resolve) })
|
|
15
|
+
Vue.component('app-process-supervisory', (resolve) => { require(['./components/android/Supervisory/AppProcessSupervisory'], resolve) })
|
|
16
|
+
Vue.component('app-supervisory-cart', (resolve) => { require(['./components/android/Supervisory/AppSupervisoryCart'], resolve) })
|
|
17
|
+
Vue.component('app-istall-function', (resolve) => { require(['./components/android/Function/AppInstallFunction'], resolve) })
|
|
18
|
+
Vue.component('app-function-service-control', (resolve) => { require(['./components/android/Function/AppFunctionServiceControl'], resolve) })
|
|
19
|
+
|
|
20
|
+
Vue.component('app-sign', (resolve) => { require(['./components/android/AppSign'], resolve) })
|
|
21
|
+
Vue.component('app-take-pic', (resolve) => { require(['./components/android/AppTakePic'], resolve) })
|
|
22
|
+
Vue.component('app-service-view', (resolve) => { require(['./components/android/AppServiceView'], resolve) })
|
|
23
|
+
Vue.component('app-onetomany', (resolve) => { require(['./components/android/AppOnetomany'], resolve) })
|
|
24
|
+
|
|
25
|
+
Vue.component('app-add-material-science', (resolve) => { require(['./components/android/Process/Processes/AppAddMaterialScience'], resolve) })
|
|
26
|
+
Vue.component('app-add-material-new', (resolve) => { require(['./components/android/Process/Processes/chargesList'], resolve) })
|
|
27
|
+
Vue.component('app-installation-details', (resolve) => { require(['./components/android/Process/Processes/AppInstallationDetails'], resolve) })
|
|
28
|
+
Vue.component('app-apply-devices-management', (resolve) => { require(['./components/android/Process/Processes/AppDevicesManagement'], resolve) })
|
|
29
|
+
Vue.component('app-charge-management', (resolve) => { require(['./components/android/Process/Processes/AppChargeManagement'], resolve) })
|
|
30
|
+
Vue.component('app-supplemental-agreement', (resolve) => { require(['./components/android/Process/Processes/AppSupplementalAgreement'], resolve) })
|
|
31
|
+
// 选择用户信息
|
|
32
|
+
Vue.component('select-userinfo', (resolve) => { require(['./components/android/Process/Processes/selectUserinfo'], resolve) })
|
|
33
|
+
// 选择报建项目
|
|
34
|
+
Vue.component('select-apply', (resolve) => { require(['./components/android/Process/Processes/selectApply'], resolve) })
|
|
35
|
+
Vue.component('app-build-sign', (resolve) => { require(['./components/android/Process/Processes/AppBuildSign'], resolve) })
|
|
36
|
+
|
|
37
|
+
// 区域 地址下拉框联动组件
|
|
38
|
+
Vue.component('app-res-area-select', (resolve) => { require(['./components/android/AreaSelect/AppResAreaSelect'], resolve) })
|
|
39
|
+
Vue.component('app-res-area-select-group', (resolve) => { require(['./components/android/AreaSelect/AppResAreaSelectGroup'], resolve) })
|
|
40
|
+
Vue.component('area-select', (resolve) => { require(['./components/product/AreaSelect/MyAreaSelect'], resolve) })
|
|
41
|
+
Vue.component('apply-print-charge', (resolve) => { require(['./components/product/Process/Processes/Print/printCharge'], resolve) })
|
|
42
|
+
// 地图组件
|
|
43
|
+
Vue.component('app-res-area-map-group', (resolve) => { require(['./components/android/AreaSelect/AppResAreaMapGroup'], resolve) })
|
|
44
|
+
// 扫描二维码
|
|
45
|
+
Vue.component('app-qrcode-reader', (resolve) => { require(['./components/android/AreaSelect/AppQrcodeReader'], resolve) })
|
|
46
|
+
Vue.component('app-ignition-ventilation', (resolve) => { require(['./components/android/Ignition/VentilationIgnition'], resolve) })
|
|
47
|
+
Vue.component('app-ignition-handle', (resolve) => { require(['./components/android/Ignition/VentilationIgnitionHandle'], resolve) })
|
|
48
|
+
|
|
49
|
+
// 特殊目录给这里加
|
|
50
|
+
if (filiale) {
|
|
51
|
+
let filialeComp = require(`./filiale/${filiale}/android`).specialComp
|
|
52
|
+
for (let key in filialeComp) {
|
|
53
|
+
Vue.component(key, filialeComp[key])
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id="tel-charges-list">
|
|
3
|
+
<div class="list">
|
|
4
|
+
<div>
|
|
5
|
+
<data-grid partial='list' v-ref:grid :model="model" class="list_area table_sy">
|
|
6
|
+
<template partial='body'>
|
|
7
|
+
<td style="text-align: center;">
|
|
8
|
+
<nobr>{{ row.f_payment }}</nobr>
|
|
9
|
+
</td>
|
|
10
|
+
<td style="text-align: center;">
|
|
11
|
+
<nobr>¥{{ row.f_collection }}</nobr>
|
|
12
|
+
</td>
|
|
13
|
+
<td style="text-align: center;">
|
|
14
|
+
<nobr><button @click="$parent.$parent.getAllMaterial(row)">查看</button></nobr>
|
|
15
|
+
</td>
|
|
16
|
+
</template>
|
|
17
|
+
</data-grid>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="">
|
|
20
|
+
<data-grid partial='list' v-ref:grid :model="material" class="list_area table_sy">
|
|
21
|
+
<template partial='head'>
|
|
22
|
+
<tr>
|
|
23
|
+
<th>
|
|
24
|
+
<nobr>品名规格</nobr>
|
|
25
|
+
</th>
|
|
26
|
+
<th>
|
|
27
|
+
<nobr>型号</nobr>
|
|
28
|
+
</th>
|
|
29
|
+
<th>
|
|
30
|
+
<nobr>单价</nobr>
|
|
31
|
+
</th>
|
|
32
|
+
<th>
|
|
33
|
+
<nobr>数量</nobr>
|
|
34
|
+
<button type="button" name="button" class="btn btn-primary btn-sm btn-img-cl" @click="$parent.$parent.open()" style="margin-left: 20px">
|
|
35
|
+
新增收费
|
|
36
|
+
</button>
|
|
37
|
+
</th>
|
|
38
|
+
</tr>
|
|
39
|
+
</template>
|
|
40
|
+
<template partial='body'>
|
|
41
|
+
<td style="text-align: center;">
|
|
42
|
+
<nobr>{{row.f_material_name }}</nobr>
|
|
43
|
+
</td>
|
|
44
|
+
<td style="text-align: center;">
|
|
45
|
+
<nobr>{{ row.f_typenumber }}</nobr>
|
|
46
|
+
</td>
|
|
47
|
+
<td style="text-align: center;">
|
|
48
|
+
<nobr>{{ row.f_material_price }}</nobr>
|
|
49
|
+
</td>
|
|
50
|
+
<td style="text-align: center;">
|
|
51
|
+
<nobr>{{ row.f_material_number }}</nobr>
|
|
52
|
+
</td>
|
|
53
|
+
</template>
|
|
54
|
+
</data-grid>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
<modal v-if="changeModel" :show.sync="changeModel" :backdrop="false" >
|
|
58
|
+
<header slot="modal-header" class="modal-header">
|
|
59
|
+
<button type="button" class="close" @click="changeModel=false"><span>×</span></button>
|
|
60
|
+
<h4 class="modal-title">添加材料</h4>
|
|
61
|
+
</header>
|
|
62
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
63
|
+
<appinstallation-material v-if="changeModel" :selectdata = "selectdata" @valueChange="change" @aftersave="aftersave()"></appinstallation-material>
|
|
64
|
+
</article>
|
|
65
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
66
|
+
|
|
67
|
+
</footer>
|
|
68
|
+
</modal>
|
|
69
|
+
</div>
|
|
70
|
+
</template>
|
|
71
|
+
<script>
|
|
72
|
+
import Vue from 'vue'
|
|
73
|
+
import {HttpResetClass} from 'vue-client'
|
|
74
|
+
import QRCode from 'qrcodejs2'
|
|
75
|
+
import AppInstallationMaterial from 'telephone-clients/src/filiale/yangchunboneng/android/AppInstallationMaterial'
|
|
76
|
+
|
|
77
|
+
export default {
|
|
78
|
+
title: '材料添加',
|
|
79
|
+
props: {
|
|
80
|
+
selectdata: {
|
|
81
|
+
type: Object
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
data() {
|
|
85
|
+
return {
|
|
86
|
+
model:{rows:[]},
|
|
87
|
+
material:{rows:[]},
|
|
88
|
+
changeModel:false
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
ready() {
|
|
92
|
+
this.selectdata.model = {
|
|
93
|
+
f_userinfo_id: this.selectdata.f_userinfo_id,
|
|
94
|
+
f_user_name: this.selectdata.f_user_name,
|
|
95
|
+
f_address: this.selectdata.f_address,
|
|
96
|
+
f_user_type: this.selectdata.f_user_type
|
|
97
|
+
}
|
|
98
|
+
this.getAllOthercharge()
|
|
99
|
+
// this.getmaterial()
|
|
100
|
+
// this.getmaterialTYPE()
|
|
101
|
+
|
|
102
|
+
},
|
|
103
|
+
methods: {
|
|
104
|
+
open(){
|
|
105
|
+
this.changeModel = true
|
|
106
|
+
},
|
|
107
|
+
aftersave(){
|
|
108
|
+
this.getAllOthercharge()
|
|
109
|
+
this.changeModel=false
|
|
110
|
+
},
|
|
111
|
+
getAllOthercharge(){
|
|
112
|
+
new HttpResetClass().load('POST',this.$androidUtil.getProxyUrl() +`/rs/sql/tel_singleTable_OrderBy?pageNo=1&pageSize=10`, {data: {
|
|
113
|
+
items: '*',
|
|
114
|
+
tablename: 't_othercharge',
|
|
115
|
+
condition: ` f_voucher_number='${this.selectdata.f_process_id}' and f_state='有效'`,
|
|
116
|
+
orderitem: 'id desc'
|
|
117
|
+
}},{resolveMsg:null,rejectMsg:null}).then(res=>{
|
|
118
|
+
console.log(res)
|
|
119
|
+
this.model.rows=res.data
|
|
120
|
+
}).catch((e)=>{
|
|
121
|
+
console.log("933",e)
|
|
122
|
+
})
|
|
123
|
+
},
|
|
124
|
+
getAllMaterial(row){
|
|
125
|
+
new HttpResetClass().load('POST',this.$androidUtil.getProxyUrl() +`/rs/sql/tel_singleTable_OrderBy?pageNo=1&pageSize=100`, {data: {
|
|
126
|
+
items: '*',
|
|
127
|
+
tablename: 't_material_service',
|
|
128
|
+
condition: ` f_othercharge_id='${row.id}'`,
|
|
129
|
+
orderitem: 'id desc'
|
|
130
|
+
}},{resolveMsg:null,rejectMsg:null}).then(res=>{
|
|
131
|
+
console.log(res)
|
|
132
|
+
this.material.rows=res.data
|
|
133
|
+
}).catch((e)=>{
|
|
134
|
+
console.log("933",e)
|
|
135
|
+
})
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
events: {},
|
|
139
|
+
computed: {},
|
|
140
|
+
watch: {
|
|
141
|
+
},
|
|
142
|
+
components: {
|
|
143
|
+
'appinstallation-material': AppInstallationMaterial
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
</script>
|
|
147
|
+
<style lang="less" scoped>
|
|
148
|
+
.head-but {
|
|
149
|
+
margin-left: 5px;
|
|
150
|
+
height: 34px;
|
|
151
|
+
/*background-color: #6aa6e2;*/
|
|
152
|
+
border-radius: 4px;
|
|
153
|
+
font-family: PingFang;
|
|
154
|
+
color: #ffffff;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/*清除model中的浮动*/
|
|
158
|
+
.clearfix:after, .clearfix:before {
|
|
159
|
+
display: table;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.clearfix:after {
|
|
163
|
+
clear: both;
|
|
164
|
+
}
|
|
165
|
+
#tel-charges-list{
|
|
166
|
+
.list{
|
|
167
|
+
display: flex;
|
|
168
|
+
flex-direction: column;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
</style>
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="panel">
|
|
3
|
+
<div class="panel-body panel-self" style="background-color: #F8F8F8;">
|
|
4
|
+
<div class="row form-group" style="height: 240px;overflow: scroll;">
|
|
5
|
+
<img :src="f_sign_path" width="100%" height="100%" />
|
|
6
|
+
</div>
|
|
7
|
+
<div class="row text-right form-group">
|
|
8
|
+
<button class="btn" style="background-color: #f1e404;border-radius: 5px;margin-right: 10px" @click="clean">清除</button>
|
|
9
|
+
<button class="btn" style="background-color: #7dc1f4;border-radius: 5px;margin-right: 10px" @click="sign">签名</button>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
<script>
|
|
15
|
+
import {getNowDate, guid, isEmpty} from "../../../components/Util";
|
|
16
|
+
import {PagedList} from 'vue-client'
|
|
17
|
+
import {HttpResetClass} from 'vue-client'
|
|
18
|
+
import QRCode from 'qrcodejs2'
|
|
19
|
+
import Vue from "vue";
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
title: '签字',
|
|
23
|
+
props: ['filePath','blobid','type', 'defname'],
|
|
24
|
+
data () {
|
|
25
|
+
return {
|
|
26
|
+
f_sign_path: null,
|
|
27
|
+
fileName: null
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
ready () {
|
|
31
|
+
console.log('在ready里打印一下this.filePath',this.filePath)
|
|
32
|
+
this.f_sign_path = this.filePath
|
|
33
|
+
console.log('在ready里打印一下this.f_sign_path',this.f_sign_path)
|
|
34
|
+
this.getFiles()
|
|
35
|
+
},
|
|
36
|
+
methods: {
|
|
37
|
+
clean () {
|
|
38
|
+
this.f_sign_path = null
|
|
39
|
+
this.fileName = null
|
|
40
|
+
this.$emit('sign-clean')
|
|
41
|
+
},
|
|
42
|
+
sign () {
|
|
43
|
+
this.type='手机签字'
|
|
44
|
+
console.log('==============签字打印this============',this)
|
|
45
|
+
this.delAudioFile(this.f_sign_path)
|
|
46
|
+
this.fileName = guid() + '.jpg'
|
|
47
|
+
HostApp.__callback__ = this.signCallback
|
|
48
|
+
HostApp.__this__ = this
|
|
49
|
+
HostApp.getSignature({
|
|
50
|
+
file: this.fileName,
|
|
51
|
+
requestCode: 111,
|
|
52
|
+
callback: 'javascript:HostApp.__callback__("f_sign_path", "%s");'
|
|
53
|
+
})
|
|
54
|
+
},
|
|
55
|
+
// 签名回调
|
|
56
|
+
signCallback (prop, signPath) {
|
|
57
|
+
console.log('==============签字回调============')
|
|
58
|
+
console.log(signPath)
|
|
59
|
+
HostApp.__this__.$set(prop, signPath)
|
|
60
|
+
console.log(HostApp.__this__.f_sign_path)
|
|
61
|
+
|
|
62
|
+
HostApp.__this__.uploadFile()
|
|
63
|
+
|
|
64
|
+
HostApp.__callback__ = null
|
|
65
|
+
HostApp.__this__ = null
|
|
66
|
+
},
|
|
67
|
+
uploadFile () {
|
|
68
|
+
console.log('===================签字文件上传==============')
|
|
69
|
+
console.log('===================打印id==============',HostApp.__this__.blobid)
|
|
70
|
+
let data = {
|
|
71
|
+
defname:HostApp.__this__.defname,
|
|
72
|
+
type:HostApp.__this__.type,
|
|
73
|
+
blodid: HostApp.__this__.blobid,
|
|
74
|
+
username: Vue.user.name,
|
|
75
|
+
fremarks: '报装手机签字文件',
|
|
76
|
+
fileName: HostApp.__this__.fileName,
|
|
77
|
+
fileUrl: HostApp.__this__.f_sign_path
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
console.log('-----------bzLogic-----------------')
|
|
81
|
+
console.log(JSON.stringify(data))
|
|
82
|
+
let res = HostApp.bzLogic({
|
|
83
|
+
'logic': 'appFileUpload',
|
|
84
|
+
'data': data
|
|
85
|
+
})
|
|
86
|
+
console.log('===============上传回调=================')
|
|
87
|
+
console.log(JSON.stringify(res))
|
|
88
|
+
HostApp.__this__.getFiles(res.id)
|
|
89
|
+
},
|
|
90
|
+
async getFiles (fileid) {
|
|
91
|
+
console.log('=========进来===============')
|
|
92
|
+
let http = new HttpResetClass()
|
|
93
|
+
console.log('=========进来===============')
|
|
94
|
+
let data = {
|
|
95
|
+
tablename: 't_files',
|
|
96
|
+
condition: `f_blobid = '${this.blobid}' and fremarks='报装手机签字文件' and defname='${this.defname}' order by f_upload_date desc`
|
|
97
|
+
}
|
|
98
|
+
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`, {data: data}, {
|
|
99
|
+
// let res = await http.load('POST', `rs/sql/apply_singleTable`, {data: data}, {
|
|
100
|
+
warnMsg: null,
|
|
101
|
+
resolveMsg: null
|
|
102
|
+
})
|
|
103
|
+
if (res.data.length > 0){
|
|
104
|
+
console.log('=========查询回调===============')
|
|
105
|
+
let fileUrl = `${this.$androidUtil.getProxyUrl()}/${res.data[0].f_downloadpath.substring(res.data[0].f_downloadpath.lastIndexOf(":\\") + 2)}`
|
|
106
|
+
console.log(fileUrl)
|
|
107
|
+
// HostApp.__this__.$set('f_sign_path', fileUrl)
|
|
108
|
+
// HostApp.__this__.f_sign_path = fileUrl
|
|
109
|
+
this.f_sign_path = fileUrl
|
|
110
|
+
this.$emit('sign-success', fileUrl)
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
delAudioFile (signPath) {
|
|
114
|
+
if (!signPath) {
|
|
115
|
+
return
|
|
116
|
+
}
|
|
117
|
+
HostApp.delfile(signPath)
|
|
118
|
+
this.f_sign_path = null
|
|
119
|
+
this.fileName = null
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
events: {
|
|
123
|
+
},
|
|
124
|
+
computed: {
|
|
125
|
+
},
|
|
126
|
+
watch: {
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
</script>
|
|
130
|
+
<style scoped lang="less">
|
|
131
|
+
.qrcode {
|
|
132
|
+
display: inline-block !important;
|
|
133
|
+
margin: 10px 0px;
|
|
134
|
+
}
|
|
135
|
+
.panel-self{
|
|
136
|
+
border-radius: 10px;
|
|
137
|
+
border:1px solid #499EDF;
|
|
138
|
+
background-color: #F8F8F8;
|
|
139
|
+
}
|
|
140
|
+
.vertical-center {
|
|
141
|
+
display: flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
text-align: center;
|
|
144
|
+
}
|
|
145
|
+
/*清除model中的浮动*/
|
|
146
|
+
.clearfix:after,.clearfix:before{
|
|
147
|
+
display: table;
|
|
148
|
+
}
|
|
149
|
+
.clearfix:after{
|
|
150
|
+
clear: both;
|
|
151
|
+
}
|
|
152
|
+
</style>
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="panel">
|
|
3
|
+
<div class="panel-body panel-self" style="background-color: #F8F8F8;">
|
|
4
|
+
<div class="row form-group" style="height: 240px;overflow: scroll;">
|
|
5
|
+
<div class="col-xs-4 col-sm-3 col-md-2 col-xs-offset-1 col-sm-offset-1 col-md-offset-1" v-for="(index,file) in fileList">
|
|
6
|
+
<img-self :src="file.f_downloadURL" :width="120" :height="170"></img-self>
|
|
7
|
+
<img v-if="isdelete && file.defname==defname" src="../../../../src/assets/删除.png" style="width: 15px;margin-top: -80px" @click.prevent="delfile(file, index)">
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="row text-right form-group" v-if="istakepic">
|
|
11
|
+
<v-select
|
|
12
|
+
class="fileType"
|
|
13
|
+
placeholder="请选择使用类型"
|
|
14
|
+
v-if="istype"
|
|
15
|
+
:search="false"
|
|
16
|
+
close-on-select
|
|
17
|
+
value-single
|
|
18
|
+
:options="typeList"
|
|
19
|
+
v-model="type"
|
|
20
|
+
:value.sync="type"
|
|
21
|
+
></v-select>
|
|
22
|
+
<button class="btn" style="background-color: #7dc1f4;border-radius: 5px;margin-right: 10px" @click.prevent="takePic(type)">拍照</button>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script>
|
|
29
|
+
import {HttpResetClass} from 'vue-client'
|
|
30
|
+
import {guid, toStandardTimeString} from "../../../components/Util"
|
|
31
|
+
import Vue from 'vue'
|
|
32
|
+
export default {
|
|
33
|
+
title: '附件',
|
|
34
|
+
props: ['blobid', 'type', 'defname', 'istype', 'typelabel', 'isdelete', 'istakepic'],
|
|
35
|
+
data () {
|
|
36
|
+
return {
|
|
37
|
+
fileList: []
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
ready () {
|
|
41
|
+
this.getFiles()
|
|
42
|
+
},
|
|
43
|
+
methods: {
|
|
44
|
+
async getFiles () {
|
|
45
|
+
console.log('----------------开始查询图片----------------')
|
|
46
|
+
this.fileList = []
|
|
47
|
+
|
|
48
|
+
let http = new HttpResetClass()
|
|
49
|
+
|
|
50
|
+
let data = {
|
|
51
|
+
tablename: 't_files',
|
|
52
|
+
condition: `f_blobid = '${this.blobid}' and fremarks = '手机拍照' order by f_uploaddate desc `
|
|
53
|
+
}
|
|
54
|
+
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`, {data: data}, {
|
|
55
|
+
// let res = await http.load('POST', `rs/sql/apply_singleTable`, {data: data}, {
|
|
56
|
+
warnMsg: null,
|
|
57
|
+
resolveMsg: null
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
for (var i = 0; i < res.data.length; i++) {
|
|
61
|
+
console.log('-----------地址----------------')
|
|
62
|
+
console.log(`${this.$androidUtil.getProxyUrl()}/${res.data[i].f_downloadpath.substring(res.data[i].f_downloadpath.lastIndexOf(":\\") + 2)}`)
|
|
63
|
+
res.data[i].f_downloadURL = `${this.$androidUtil.getProxyUrl()}/${res.data[i].f_downloadpath.substring(res.data[i].f_downloadpath.lastIndexOf(":\\") + 2)}`
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
this.fileList = res.data
|
|
67
|
+
},
|
|
68
|
+
delfile (file, index) {
|
|
69
|
+
this.$resetdelete(`${this.$androidUtil.getProxyUrl()}/rs/entity/t_files`, {id: file.id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
|
|
70
|
+
this.$dispatch("delResid", file.id)
|
|
71
|
+
this.getFiles()
|
|
72
|
+
})
|
|
73
|
+
},
|
|
74
|
+
cameraCallBack (fileName, fileUrl) {
|
|
75
|
+
console.log('-----------cameraCallBack-----------------')
|
|
76
|
+
let data = {
|
|
77
|
+
blodid: HostApp.__this__.blobid,
|
|
78
|
+
type: HostApp.__this__.type,
|
|
79
|
+
defname: HostApp.__this__.defname,
|
|
80
|
+
username: Vue.user.name,
|
|
81
|
+
fremarks: '手机拍照',
|
|
82
|
+
fileName: fileName,
|
|
83
|
+
fileUrl: fileUrl
|
|
84
|
+
}
|
|
85
|
+
console.log('-----------bzLogic-----------------')
|
|
86
|
+
let res=HostApp.bzLogic({
|
|
87
|
+
'logic': 'appFileUpload',
|
|
88
|
+
'data': data
|
|
89
|
+
})
|
|
90
|
+
console.log('----------------开始回调查询-------------------')
|
|
91
|
+
HostApp.__this__.getFiles()
|
|
92
|
+
console.log('----------------查询回调结束-------------------')
|
|
93
|
+
HostApp.__callback__ = null
|
|
94
|
+
HostApp.__this__ = null
|
|
95
|
+
},
|
|
96
|
+
takePic (title) {
|
|
97
|
+
// 拍照成功回调
|
|
98
|
+
HostApp.__callback__ = this.cameraCallBack
|
|
99
|
+
HostApp.__this__ = this
|
|
100
|
+
let fileName = guid() + '.jpg'
|
|
101
|
+
// 打开相机
|
|
102
|
+
HostApp._open_a_page({
|
|
103
|
+
type: 'boomerang',
|
|
104
|
+
page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
|
|
105
|
+
param: {
|
|
106
|
+
file: fileName,
|
|
107
|
+
requestCode: 200,
|
|
108
|
+
callback: 'javascript:HostApp.__callback__("' + fileName + '", "%s");',
|
|
109
|
+
watermark: title + '\t时间:' + toStandardTimeString() + '\t' + Vue.user.name // 水印
|
|
110
|
+
}
|
|
111
|
+
})
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
},
|
|
115
|
+
computed: {
|
|
116
|
+
typeList () {
|
|
117
|
+
if (this.typelabel) {
|
|
118
|
+
return this.$appdata.getParam(this.typelabel)
|
|
119
|
+
}
|
|
120
|
+
return this.$appdata.getParam('使用类型')
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
events: {
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
</script>
|
|
127
|
+
|
|
128
|
+
<style lang="less">
|
|
129
|
+
.fileType {
|
|
130
|
+
float: left;
|
|
131
|
+
.select-style {
|
|
132
|
+
background: #f8f8f8;
|
|
133
|
+
border: 0px;
|
|
134
|
+
}
|
|
135
|
+
input {
|
|
136
|
+
border-left: none;
|
|
137
|
+
width: 100%;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
</style>
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="col-sm-12" style="background-color: #FFFFFF">
|
|
3
|
+
<div class="col-sm-12" style="padding:50px 100px;height: 25%">
|
|
4
|
+
<div class="form-group col-sm-5" v-if="issearch">
|
|
5
|
+
<v-select
|
|
6
|
+
class="select select_list"
|
|
7
|
+
:value.sync="useType"
|
|
8
|
+
width="90%"
|
|
9
|
+
v-model="useType"
|
|
10
|
+
:options='typeOfUse'
|
|
11
|
+
:valueSingle="true"></v-select>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="form-group col-sm-2" style="text-align: center" v-if="issearch">
|
|
14
|
+
<button type="button" class="btn btn-primary item_btn" @click="load">搜索</button>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="form-group col-sm-2" style="text-align: center" v-if="isupload">
|
|
17
|
+
<button type="button" class="btn btn-primary item_btn" @click="showUpload = !showUpload">本地上传</button>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="form-group col-sm-2" style="text-align: center" v-if="takeimg">
|
|
20
|
+
<button type="button" class="btn btn-primary item_btn" @click="upload()">拍照</button>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<hr style="width: 90%;margin: 0px auto;border: #999999 1px solid;"/>
|
|
24
|
+
<div class="col-sm-12" style="overflow: scroll;height: 75%">
|
|
25
|
+
<div :class="bootstraped ? bootstraped + ' showData' : 'col-sm-6 showData'" v-for="row in fileInfoData">
|
|
26
|
+
<div class="col-sm-12 item">
|
|
27
|
+
<div class="left col-sm-5">
|
|
28
|
+
<a href="#" class="thumbnail" style="width: 100%;height: 100%">
|
|
29
|
+
<img v-if="row.f_filetype === 'jpg'||row.f_filetype === 'png'||row.f_filetype === 'gif'||row.f_filetype === 'bmp'" :src="row.f_downloadURL" alt="..."/>
|
|
30
|
+
<img v-if="row.f_filetype === 'pdf'" src="../../../components/image/pdf.jpg" alt="" />
|
|
31
|
+
<img v-if="row.f_filetype === 'xls'||row.f_filetype === 'xlsx'" src="../../../components/image/excel.jpg" alt="" />
|
|
32
|
+
<img v-if="row.f_filetype === 'doc'||row.f_filetype === 'docx'" src="../../../components/image/doc.jpg" alt="" />
|
|
33
|
+
<img v-if="row.f_filetype === 'dwg'" src="../../../components/image/dwg.jpg" alt="" />
|
|
34
|
+
<img v-if="row.f_filetype === 'txt'" src="../../../components/image/txt.jpg" alt="" />
|
|
35
|
+
</a>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="right col-sm-7">
|
|
38
|
+
<p :title="row.f_filename" class="clears"><strong>文件名:</strong>{{row.f_filename}}</p>
|
|
39
|
+
<p :title="row.f_username" class="clears"><strong>操作员:</strong><span>{{row.f_username}}</span></p>
|
|
40
|
+
<p :title="row.fusetype" class="clears"><strong>使用类型:</strong><span>{{row.fusetype}}</span></p>
|
|
41
|
+
<p :title="row.f_uploaddate" class="clears"><strong>上传时间:</strong><span>{{row.f_uploaddate}}</span></p>
|
|
42
|
+
<p :title="row.fremarks" class="clears"><strong>文件说明:</strong>{{row.fremarks}}</p>
|
|
43
|
+
<p :title="row.fremarks" class="clears"><strong>上传环节:</strong>{{row.defname}}</p>
|
|
44
|
+
<p class="clears">
|
|
45
|
+
<a v-if="row.f_filetype === 'jpg' || row.f_filetype === 'txt' || row.f_filetype==='png' || row.f_filetype==='gif' || row.f_filetype==='bmp'" :href="row.f_downloadURL" style="background:#6aa6e2" class="btn btn-primary" target="_blank" role="button">预览</a>
|
|
46
|
+
<a v-else @click="downloadfile(row.f_downloadURL)" style="background:#6aa6e2" class="btn btn-primary" role="button">下载</a>
|
|
47
|
+
<a v-if="isdelete" @click="delet($index, row)" href="#" class="btn btn-default" role="button" role="button">删除</a>
|
|
48
|
+
</p>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
<apply-high-meter
|
|
55
|
+
v-if="showhighmeter"
|
|
56
|
+
:show.sync="showhighmeter"
|
|
57
|
+
:isusetype="isusetype"
|
|
58
|
+
:isremark="isremark"
|
|
59
|
+
@photo-finish="newPhoto"
|
|
60
|
+
v-ref:ltgao
|
|
61
|
+
></apply-high-meter>
|
|
62
|
+
<modal :show.sync="showUpload" v-ref:modal backdrop="false">
|
|
63
|
+
<header slot="modal-header" class="modal-header">
|
|
64
|
+
<button type="button" class="close" @click="close"><span class="glyphicon glyphicon-remove"></span></button>
|
|
65
|
+
<h4 class="modal-title" style="text-align: center">文件上传</h4>
|
|
66
|
+
</header>
|
|
67
|
+
<article slot="modal-body" class="modal-body form-horizontal">
|
|
68
|
+
<div class="form-group" style="text-align: center">
|
|
69
|
+
<file-upload class="my-file-uploader" :name="'myFile' + blodid"
|
|
70
|
+
action="rs/file/uploadFile" tagname="文件上传" :headers="headers" multiple v-ref:file></file-upload>
|
|
71
|
+
</div>
|
|
72
|
+
<div class="form-group" v-if="isusetype">
|
|
73
|
+
<label class="col-sm-2 control-label">文件类型:</label>
|
|
74
|
+
<div class="col-sm-10">
|
|
75
|
+
<input-select
|
|
76
|
+
class="select select_list"
|
|
77
|
+
:value.sync="headers.fusetype"
|
|
78
|
+
v-model="headers.fusetype"
|
|
79
|
+
:options="$appdata.getParam('报建-使用类型')"
|
|
80
|
+
:valueSingle="true"></input-select>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="form-group" v-if="isremark">
|
|
84
|
+
<label class="col-sm-2 control-label">文件说明:</label>
|
|
85
|
+
<div class="col-sm-10">
|
|
86
|
+
<input class="form-control input_view" style=""
|
|
87
|
+
v-model="headers.fremarks"
|
|
88
|
+
:value="headers.fremarks"/>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</article>
|
|
92
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
93
|
+
</footer>
|
|
94
|
+
</modal>
|
|
95
|
+
</template>
|
|
96
|
+
|
|
97
|
+
<script>
|
|
98
|
+
import {HttpResetClass} from 'vue-client'
|
|
99
|
+
import {isEmpty} from "../../../components/Util";
|
|
100
|
+
export default {
|
|
101
|
+
title: '附件',
|
|
102
|
+
props: ['blodid', 'businessid', 'isremark', 'isusetype', 'takeimg', 'defname', 'isupload', 'isdelete', 'bootstraped', 'issearch'],
|
|
103
|
+
data () {
|
|
104
|
+
return {
|
|
105
|
+
fileInfoData: [], // 数据库存储的文件记录对象数组
|
|
106
|
+
headers: {'username': this.$login.f.name, 'blodid': '','businessid':'', 'fremarks': '','defname':'','fusetype':''}, // 调用rs/file/uploadFile 的参数
|
|
107
|
+
showUpload: false, // 上传模态框控制
|
|
108
|
+
showhighmeter: false, // 高拍仪组件控制
|
|
109
|
+
useType: null
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
ready () {
|
|
113
|
+
this.headers.blodid = this.blodid
|
|
114
|
+
this.headers.businessid = this.businessid
|
|
115
|
+
this.headers.defname = this.defname
|
|
116
|
+
if (this.blodid || this.businessid) {
|
|
117
|
+
this.load()
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
methods: {
|
|
121
|
+
delet(index, row) {
|
|
122
|
+
this.$resetdelete('rs/entity/t_files', {id: row.id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
|
|
123
|
+
this.$dispatch("delResid",row.id)
|
|
124
|
+
this.load()
|
|
125
|
+
})
|
|
126
|
+
},
|
|
127
|
+
// 下载
|
|
128
|
+
downloadfile(filepath){
|
|
129
|
+
let name1= this.extractFileNameFromUrl(filepath)
|
|
130
|
+
let name=this.extractFileName(name1)
|
|
131
|
+
if(filepath.toString().endsWith(".dwg")){
|
|
132
|
+
var xhr = new XMLHttpRequest();
|
|
133
|
+
xhr.open('GET', filepath, true);
|
|
134
|
+
// 设置Accept头以指定下载.dwg文件
|
|
135
|
+
xhr.setRequestHeader('Accept', ' application/acad, application/x-acad, image/x-dwg');
|
|
136
|
+
xhr.onload = function() {
|
|
137
|
+
if (xhr.status === 200) {
|
|
138
|
+
// 创建隐藏的a元素并设置其href属性为下载的数据
|
|
139
|
+
var link = document.createElement('a');
|
|
140
|
+
link.href =filepath;
|
|
141
|
+
// 设置文件名
|
|
142
|
+
link.download =name+'.dwg';// 假设存在getFileNameFromUrl函数来获取文件名
|
|
143
|
+
// 触发下载事件
|
|
144
|
+
link.dispatchEvent(new MouseEvent('click'));
|
|
145
|
+
} else {
|
|
146
|
+
console.error('Failed to download file:', xhr.statusText);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
xhr.send();
|
|
150
|
+
}else{
|
|
151
|
+
var link = document.createElement('a');
|
|
152
|
+
link.href = filepath;
|
|
153
|
+
link.target='_blank'
|
|
154
|
+
link.dispatchEvent(new MouseEvent('click'));
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
extractFileNameFromUrl(url) {
|
|
158
|
+
// 使用split分割URL
|
|
159
|
+
var parts = url.split('/');
|
|
160
|
+
// 获取最后一个部分,这通常是文件名
|
|
161
|
+
var fileName = parts[parts.length - 1];
|
|
162
|
+
// 返回文件名(不包括扩展名)
|
|
163
|
+
return fileName.split('.')[0];
|
|
164
|
+
},
|
|
165
|
+
extractFileName(str) {
|
|
166
|
+
// 使用split分割字符串
|
|
167
|
+
var parts = str.split('\\');
|
|
168
|
+
// 获取最后一个部分,这通常是文件名
|
|
169
|
+
var fileName = parts[parts.length - 1];
|
|
170
|
+
// 返回文件名
|
|
171
|
+
return fileName;
|
|
172
|
+
},
|
|
173
|
+
// 关闭文件上传对话框
|
|
174
|
+
close () {
|
|
175
|
+
this.showUpload = false
|
|
176
|
+
this.showhighmeter = false
|
|
177
|
+
// 将选的文件清空
|
|
178
|
+
this.$refs.file.$el.querySelector('input').value = ''
|
|
179
|
+
this.headers.fusetype = ''
|
|
180
|
+
this.headers.fremarks = ''
|
|
181
|
+
this.load()
|
|
182
|
+
},
|
|
183
|
+
// 查询
|
|
184
|
+
async load() {
|
|
185
|
+
let condition = ''
|
|
186
|
+
if(!isEmpty(this.businessid)){
|
|
187
|
+
condition = `f_businessid= '${this.headers.businessid}' `
|
|
188
|
+
}else{
|
|
189
|
+
condition = `f_blobid= '${this.headers.blodid}' `
|
|
190
|
+
}
|
|
191
|
+
if (!isEmpty(this.useType)) {
|
|
192
|
+
condition += `and fusetype like '${this.useType}'`
|
|
193
|
+
}
|
|
194
|
+
let http = new HttpResetClass()
|
|
195
|
+
let data = {
|
|
196
|
+
tablename: 't_files',
|
|
197
|
+
condition: condition + ` order by f_uploaddate desc `
|
|
198
|
+
}
|
|
199
|
+
let getFile = await http.load('POST', 'rs/sql/apply_singleTable', {data: data}, {
|
|
200
|
+
warnMsg: null,
|
|
201
|
+
resolveMsg: null
|
|
202
|
+
})
|
|
203
|
+
|
|
204
|
+
for (var i = 0; i < getFile.data.length; i++) {
|
|
205
|
+
// 如果使用类型包含导入字样,则是execl文件导入的,不做显示
|
|
206
|
+
if(getFile.data[i].fusetype&&(getFile.data[i].fusetype.includes('execl导入'))){
|
|
207
|
+
getFile.data.splice(i,1)
|
|
208
|
+
i--
|
|
209
|
+
continue
|
|
210
|
+
}
|
|
211
|
+
let temp = getFile.data[i].f_downloadpath
|
|
212
|
+
let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
|
|
213
|
+
getFile.data[i].f_downloadURL = "http://" + location.host + "/" + URL
|
|
214
|
+
}
|
|
215
|
+
for (var i = 0; i < getFile.data.length; i++) {
|
|
216
|
+
if(getFile.data[i].f_downloadpath.includes('http:')){
|
|
217
|
+
let temp = getFile.data[i].f_downloadpath
|
|
218
|
+
getFile.data[i].f_downloadURL = temp
|
|
219
|
+
console.log('打印',i)
|
|
220
|
+
}else{
|
|
221
|
+
let temp = getFile.data[i].f_downloadpath
|
|
222
|
+
let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
|
|
223
|
+
getFile.data[i].f_downloadURL ="http://" + location.host + "/" + URL
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
}
|
|
227
|
+
this.fileInfoData = []
|
|
228
|
+
this.fileInfoData = getFile.data
|
|
229
|
+
},
|
|
230
|
+
// 打开高拍仪
|
|
231
|
+
upload () {
|
|
232
|
+
if(this.showhighmeter){
|
|
233
|
+
this.$refs.ltgao.closeVideo()
|
|
234
|
+
}
|
|
235
|
+
this.showhighmeter = !this.showhighmeter
|
|
236
|
+
},
|
|
237
|
+
// 高拍仪回调
|
|
238
|
+
newPhoto(Imgbase64, fusetype, fremarks) {
|
|
239
|
+
this.headers.fusetype = fusetype
|
|
240
|
+
this.headers.fremarks = fremarks
|
|
241
|
+
|
|
242
|
+
let form = new FormData()
|
|
243
|
+
let xhr = new XMLHttpRequest()
|
|
244
|
+
let formDataBoundary = "----WebkitFormBoundary" + "GaoPaiYi";
|
|
245
|
+
form.append('Content-Type', 'multipart/form-data;boundary=' + formDataBoundary)
|
|
246
|
+
form.append('file', this.convertBase64ToBlob(Imgbase64), "GaoPaiYi.jpg")
|
|
247
|
+
xhr.open("POST", "rs/file/uploadFile")
|
|
248
|
+
|
|
249
|
+
if (this.headers) {
|
|
250
|
+
for (var header in this.headers) {
|
|
251
|
+
xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
xhr.send(form)
|
|
255
|
+
setTimeout(() => {
|
|
256
|
+
this.close()
|
|
257
|
+
}, 5000)
|
|
258
|
+
},
|
|
259
|
+
convertBase64ToBlob(base64String) {
|
|
260
|
+
// 将base64解码
|
|
261
|
+
var bytes = atob(base64String);
|
|
262
|
+
//var bytes = base64;
|
|
263
|
+
var bytesCode = new ArrayBuffer(bytes.length);
|
|
264
|
+
// 转换为类型化数组
|
|
265
|
+
var byteArray = new Uint8Array(bytesCode);
|
|
266
|
+
|
|
267
|
+
// 将base64转换为ascii码
|
|
268
|
+
for (var i = 0; i < bytes.length; i++) {
|
|
269
|
+
byteArray[i] = bytes.charCodeAt(i);
|
|
270
|
+
}
|
|
271
|
+
// 生成Blob对象(文件对象)
|
|
272
|
+
return new Blob([bytesCode], {type: 'image/jpeg'});
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
computed: {
|
|
276
|
+
typeOfUse () {
|
|
277
|
+
return [{label: '全部', value: ''}, ...this.$appdata.getParam('报建-使用类型')]
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
events: {
|
|
281
|
+
onFileUpload: function (file, res) {
|
|
282
|
+
this.$dispatch("resid",res.id)
|
|
283
|
+
this.headers.fremarks=''
|
|
284
|
+
this.close()
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
</script>
|
|
289
|
+
|
|
290
|
+
<style scoped>
|
|
291
|
+
.clears{
|
|
292
|
+
overflow:hidden;
|
|
293
|
+
text-overflow:ellipsis;
|
|
294
|
+
white-space:nowrap;
|
|
295
|
+
}
|
|
296
|
+
.showData {
|
|
297
|
+
padding: 15px 10px 0px 10px;
|
|
298
|
+
box-sizing: border-box;
|
|
299
|
+
height: 230px;
|
|
300
|
+
font-family: "微软雅黑";
|
|
301
|
+
}
|
|
302
|
+
.showData .item{
|
|
303
|
+
padding-bottom: 10px;
|
|
304
|
+
border-bottom: solid 1px #c1c1c1;
|
|
305
|
+
}
|
|
306
|
+
.left {
|
|
307
|
+
padding-right: 10px;
|
|
308
|
+
}
|
|
309
|
+
.left img{
|
|
310
|
+
height: 100%;
|
|
311
|
+
width: 100%;
|
|
312
|
+
}
|
|
313
|
+
.right{
|
|
314
|
+
height: 100%;
|
|
315
|
+
/*display: -webkit-flex;*/
|
|
316
|
+
/*display: flex;*/
|
|
317
|
+
/*flex-direction: column;*/
|
|
318
|
+
/*justify-content: space-around;*/
|
|
319
|
+
}
|
|
320
|
+
.item_btn{
|
|
321
|
+
width: 80%;
|
|
322
|
+
background-color: #6aa6e2;
|
|
323
|
+
border-radius: 4px;
|
|
324
|
+
color: #FFFFFF;
|
|
325
|
+
font-family: PingFang;
|
|
326
|
+
}
|
|
327
|
+
</style>
|