apply-clients 3.4.80 → 3.4.81
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 +120 -119
- package/package.json +1 -1
- package/src/applyAndroid.js +54 -55
- package/src/components/android/AppTakePic.vue +140 -140
- package/src/filiale/shexian/android/AppExplorationUser.vue +487 -487
- package/src/filiale/shexian/android/AppInstallationDetails.vue +498 -498
- package/src/filiale/shexian/android/AppServiceView.vue +745 -745
- package/src/filiale/shexian/android.js +10 -10
- package/src/filiale/shexian/pc/InstallationDetails.vue +614 -614
- package/src/filiale/shexian/pc.js +8 -8
- package/src/main.js +23 -23
- package/src/filiale/hongda/android.js +0 -8
package/build/dev-server.js
CHANGED
|
@@ -1,119 +1,120 @@
|
|
|
1
|
-
var express = require('express')
|
|
2
|
-
var webpack = require('webpack')
|
|
3
|
-
var config = require('./webpack.dev.conf')
|
|
4
|
-
var proxyMiddleware = require('http-proxy-middleware')
|
|
5
|
-
// var httpProxy = require('http-proxy')
|
|
6
|
-
var app = express()
|
|
7
|
-
var compiler = webpack(config)
|
|
8
|
-
// var proxy = httpProxy.createProxyServer()
|
|
9
|
-
// var ldap = 'http://121.36.79.201:8400'
|
|
10
|
-
// var applyinstall = 'http://121.36.79.201:8400'
|
|
11
|
-
var ldap = 'http://
|
|
12
|
-
var applyinstall = 'http://
|
|
13
|
-
|
|
14
|
-
var proxyTable = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
})
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
//
|
|
95
|
-
// res.header('Access-Control-Allow-
|
|
96
|
-
// res.header('Access-Control-Allow-
|
|
97
|
-
// res.header('
|
|
98
|
-
// res.header('
|
|
99
|
-
// res.header('
|
|
100
|
-
//
|
|
101
|
-
//
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
//
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
1
|
+
var express = require('express')
|
|
2
|
+
var webpack = require('webpack')
|
|
3
|
+
var config = require('./webpack.dev.conf')
|
|
4
|
+
var proxyMiddleware = require('http-proxy-middleware')
|
|
5
|
+
// var httpProxy = require('http-proxy')
|
|
6
|
+
var app = express()
|
|
7
|
+
var compiler = webpack(config)
|
|
8
|
+
// var proxy = httpProxy.createProxyServer()
|
|
9
|
+
// var ldap = 'http://121.36.79.201:8400'
|
|
10
|
+
// var applyinstall = 'http://121.36.79.201:8400'
|
|
11
|
+
var ldap = 'http://221.193.244.147:8400'
|
|
12
|
+
var applyinstall = 'http://221.193.244.147:8400'
|
|
13
|
+
|
|
14
|
+
var proxyTable = {
|
|
15
|
+
|
|
16
|
+
'/rs/logic/getSaleInitData': {
|
|
17
|
+
target: ldap
|
|
18
|
+
},
|
|
19
|
+
'/rs/workflow': {
|
|
20
|
+
target: applyinstall
|
|
21
|
+
},
|
|
22
|
+
'/rs/vue': {
|
|
23
|
+
target: ldap
|
|
24
|
+
},
|
|
25
|
+
// 查找资源服务数据
|
|
26
|
+
'/rs/search': {
|
|
27
|
+
target: ldap
|
|
28
|
+
},
|
|
29
|
+
// 街道查询
|
|
30
|
+
'/rs/sql/address_getstreetlist': {
|
|
31
|
+
target: ldap
|
|
32
|
+
},
|
|
33
|
+
// 创建街道
|
|
34
|
+
'/rs/logic/address_updatestreet': {
|
|
35
|
+
target: ldap
|
|
36
|
+
},
|
|
37
|
+
// 创建小区
|
|
38
|
+
'/rs/logic/address_updatearea': {
|
|
39
|
+
target: ldap
|
|
40
|
+
},
|
|
41
|
+
// 用户登录服务地址
|
|
42
|
+
'/rs/user': {
|
|
43
|
+
target: ldap
|
|
44
|
+
},
|
|
45
|
+
'/rs/logic/getInitData': {
|
|
46
|
+
target: ldap?ldap:applyinstall
|
|
47
|
+
},
|
|
48
|
+
'/rs/logic/getLogin': {
|
|
49
|
+
target: ldap
|
|
50
|
+
},
|
|
51
|
+
'/rs/file': { // 文件上传
|
|
52
|
+
target: applyinstall
|
|
53
|
+
},
|
|
54
|
+
'/project': { // 文件回显
|
|
55
|
+
target: applyinstall
|
|
56
|
+
},
|
|
57
|
+
'/rs': {
|
|
58
|
+
target: applyinstall
|
|
59
|
+
},
|
|
60
|
+
'/ws': {
|
|
61
|
+
target: applyinstall,
|
|
62
|
+
ws: true // 代理webSocket
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
var devMiddleware = require('webpack-dev-middleware')(compiler, {
|
|
67
|
+
publicPath: config.output.publicPath,
|
|
68
|
+
stats: {
|
|
69
|
+
colors: true,
|
|
70
|
+
chunks: false
|
|
71
|
+
}
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
var hotMiddleware = require('webpack-hot-middleware')(compiler)
|
|
75
|
+
// force page reload when html-webpack-plugin template changes
|
|
76
|
+
compiler.plugin('compilation', function (compilation) {
|
|
77
|
+
compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
|
|
78
|
+
hotMiddleware.publish({action: 'reload'})
|
|
79
|
+
cb()
|
|
80
|
+
})
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
// proxy api requests
|
|
84
|
+
Object.keys(proxyTable).forEach(function (context) {
|
|
85
|
+
var options = proxyTable[context]
|
|
86
|
+
if (typeof options === 'string') {
|
|
87
|
+
options = {target: options}
|
|
88
|
+
}
|
|
89
|
+
app.use(proxyMiddleware(context, options))
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
// handle fallback for HTML5 history API
|
|
93
|
+
app.use(require('connect-history-api-fallback')())
|
|
94
|
+
// app.use(function (req, res, next) {
|
|
95
|
+
// res.header('Access-Control-Allow-Origin', '*')
|
|
96
|
+
// res.header('Access-Control-Allow-Headers', 'X-Requested-With')
|
|
97
|
+
// res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
|
|
98
|
+
// res.header('X-Powered-By', '3,2,1')
|
|
99
|
+
// res.header('Access-Control-Allow-Credentials', 'true')
|
|
100
|
+
// res.header('Content-Type', 'application/json;charset=utf-8')
|
|
101
|
+
// next()
|
|
102
|
+
// })
|
|
103
|
+
|
|
104
|
+
// serve webpack bundle output
|
|
105
|
+
app.use(devMiddleware)
|
|
106
|
+
|
|
107
|
+
// enable hot-reload and state-preserving
|
|
108
|
+
// compilation error display
|
|
109
|
+
app.use(hotMiddleware)
|
|
110
|
+
|
|
111
|
+
// serve pure static assets
|
|
112
|
+
app.use('/static', express.static('./static'))
|
|
113
|
+
|
|
114
|
+
module.exports = app.listen(8300, function (err) {
|
|
115
|
+
if (err) {
|
|
116
|
+
console.log(err)
|
|
117
|
+
return
|
|
118
|
+
}
|
|
119
|
+
console.log('Listening at http://localhost:8300')
|
|
120
|
+
})
|
package/package.json
CHANGED
package/src/applyAndroid.js
CHANGED
|
@@ -1,55 +1,54 @@
|
|
|
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/
|
|
39
|
-
Vue.component('
|
|
40
|
-
Vue.component('
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
Vue.component('app-
|
|
46
|
-
Vue.component('app-ignition-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
let filialeComp
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
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
|
+
Vue.component('app-res-area-select', (resolve) => { require(['./components/android/AreaSelect/AppResAreaSelect'], resolve) })
|
|
38
|
+
Vue.component('app-res-area-select-group', (resolve) => { require(['./components/android/AreaSelect/AppResAreaSelectGroup'], resolve) })
|
|
39
|
+
Vue.component('area-select', (resolve) => { require(['./components/product/AreaSelect/MyAreaSelect'], resolve) })
|
|
40
|
+
Vue.component('apply-print-charge', (resolve) => { require(['./components/product/Process/Processes/Print/printCharge'], resolve) })
|
|
41
|
+
// 地图组件
|
|
42
|
+
Vue.component('app-res-area-map-group', (resolve) => { require(['./components/android/AreaSelect/AppResAreaMapGroup'], resolve) })
|
|
43
|
+
// 扫描二维码
|
|
44
|
+
Vue.component('app-qrcode-reader', (resolve) => { require(['./components/android/AreaSelect/AppQrcodeReader'], resolve) })
|
|
45
|
+
Vue.component('app-ignition-ventilation', (resolve) => { require(['./components/android/ignition/VentilationIgnition'], resolve) })
|
|
46
|
+
Vue.component('app-ignition-handle', (resolve) => { require(['./components/android/ignition/VentilationIgnitionHandle'], resolve) })
|
|
47
|
+
// 特殊目录给这里加
|
|
48
|
+
if (filiale) {
|
|
49
|
+
let filialeComp = require(`./filiale/${filiale}/android`).specialComp
|
|
50
|
+
for (let key in filialeComp) {
|
|
51
|
+
Vue.component(key, filialeComp[key])
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -1,140 +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" 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 '../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>
|
|
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" 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 '../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>
|