apply-clients 3.5.6-27 → 3.5.6-29

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apply-clients",
3
- "version": "3.5.6-27",
3
+ "version": "3.5.6-29",
4
4
  "description": "报建前端模块",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -243,38 +243,38 @@ export default {
243
243
  }
244
244
  if(this.show_data.button.button_name !== '退回'){
245
245
  this.excessive=true
246
- let params = {
247
- files:this.selectdata.files,
248
- f_process_id:this.selectdata.f_process_id,
249
- defname:this.selectdata.defname,
250
- username:this.selectdata.username,
251
- type:this.selectdata.type
252
- }
253
- let res1 =HostApp.bzLogic({
254
- 'logic': 'appFileUploads',
255
- 'data': params
256
- })
257
- if (res1.status != 200){
258
- this.excessive=false
259
- this.$showMessage('网络异常,图片上传失败,请检查图片后重新上传!')
260
- return
261
- }else{
262
- let params={
263
- imgids:res1.id,
264
- blodid:this.selectdata.f_process_id,
265
- username:this.selectdata.username,
266
- fremarks:'手机拍照',
267
- defname:this.selectdata.defname,
268
- type:this.selectdata.type
269
- }
270
- let http2 = new HttpResetClass()
271
- let restp2 = await http2.load(
272
- 'POST',
273
- `${this.$androidUtil.getProxyUrl()}/rs/logic/applyupdateFilerows`,
274
- {data: params},
275
- {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
276
- )
277
- }
246
+ // let params = {
247
+ // files:this.selectdata.files,
248
+ // f_process_id:this.selectdata.f_process_id,
249
+ // defname:this.selectdata.defname,
250
+ // username:this.selectdata.username,
251
+ // type:this.selectdata.type
252
+ // }
253
+ // let res1 =HostApp.bzLogic({
254
+ // 'logic': 'appFileUploads',
255
+ // 'data': params
256
+ // })
257
+ // if (res1.status != 200){
258
+ // this.excessive=false
259
+ // this.$showMessage('网络异常,图片上传失败,请检查图片后重新上传!')
260
+ // return
261
+ // }else{
262
+ // let params={
263
+ // imgids:res1.id,
264
+ // blodid:this.selectdata.f_process_id,
265
+ // username:this.selectdata.username,
266
+ // fremarks:'手机拍照',
267
+ // defname:this.selectdata.defname,
268
+ // type:this.selectdata.type
269
+ // }
270
+ // let http2 = new HttpResetClass()
271
+ // let restp2 = await http2.load(
272
+ // 'POST',
273
+ // `${this.$androidUtil.getProxyUrl()}/rs/logic/applyupdateFilerows`,
274
+ // {data: params},
275
+ // {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
276
+ // )
277
+ // }
278
278
  let res = await this.$resetpost(
279
279
  // `rs/logic/ApplyProductService`,
280
280
  `${this.$androidUtil.getProxyUrl()}/rs/logic/ApplyProductService`,
@@ -1,100 +1,154 @@
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 selectdata.files">
6
- <img-self :src="file.fileUrl" :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.fileUrl,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 {guid, toStandardTimeString} from '../../../components/Util'
30
- import Vue from 'vue'
31
- export default {
32
- title: '附件',
33
- props: ['selectdata', 'blobid', 'type', 'defname', 'istype', 'typelabel', 'isdelete', 'istakepic'],
34
- data () {
35
- return {
36
- }
37
- },
38
- ready () {
39
- this.selectdata.files = []
40
- this.selectdata.username = Vue.user.name
41
- },
42
- methods: {
43
- delfile (file, index) {
44
- this.selectdata.files.splice(index, 1)
45
- HostApp.delfile(file)
46
- },
47
- cameraCallBack (fileName, fileUrl) {
48
- this.selectdata.files.push({fileName: fileName, fileUrl: fileUrl})
49
- HostApp.__callback__ = null
50
- HostApp.__this__ = null
51
- },
52
- takePic (title) {
53
- // 拍照成功回调
54
- HostApp.__callback__ = this.cameraCallBack
55
- HostApp.__this__ = this
56
- let fileName = guid() + '.jpg'
57
- // 打开相机
58
- HostApp._open_a_page({
59
- type: 'boomerang',
60
- page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
61
- param: {
62
- file: fileName,
63
- requestCode: 200,
64
- callback: 'javascript:HostApp.__callback__("' + fileName + '", "%s");',
65
- watermark: title + '\t时间:' + toStandardTimeString() + '\t' + Vue.user.name // 水印
66
- }
67
- })
68
- }
69
- },
70
- computed: {
71
- typeList () {
72
- if (this.typelabel) {
73
- return this.$appdata.getParam(this.typelabel)
74
- }
75
- return this.$appdata.getParam('使用类型')
76
- }
77
- },
78
- events: {
79
- },
80
- watch: {
81
- 'type' () {
82
- this.selectdata.type = this.type
83
- }
84
- }
85
- }
86
- </script>
87
-
88
- <style lang="less">
89
- .fileType {
90
- float: left;
91
- .select-style {
92
- background: #f8f8f8;
93
- border: 0px;
94
- }
95
- input {
96
- border-left: none;
97
- width: 100%;
98
- }
99
- }
100
- </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="$androidUtil.getProxyUrl()+'/rs/image/file/'+file.f_filename" :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 {guid, toStandardTimeString} from '../../../components/Util'
30
+ import Vue from 'vue'
31
+ import {HttpResetClass} from "vue-client";
32
+ export default {
33
+ title: '附件',
34
+ props: ['selectdata', '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
+ let http = new HttpResetClass()
48
+ let data = {
49
+ tablename: 't_files',
50
+ condition: `f_blobid = '${this.blobid}' and fremarks in ('手机拍照','相册选择') order by f_uploaddate desc `
51
+ }
52
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`, {data: data}, {
53
+ // let res = await http.load('POST', `rs/sql/apply_singleTable`, {data: data}, {
54
+ warnMsg: null,
55
+ resolveMsg: null
56
+ })
57
+ for (var i = 0; i < res.data.length; i++) {
58
+ console.log('-----------地址----------------')
59
+ console.log(`${this.$androidUtil.getProxyUrl()}/${res.data[i].f_downloadpath.substring(res.data[i].f_downloadpath.lastIndexOf(":\\") + 2)}`)
60
+ res.data[i].f_downloadURL = `${this.$androidUtil.getProxyUrl()}/${res.data[i].f_downloadpath.substring(res.data[i].f_downloadpath.lastIndexOf(":\\") + 2)}`
61
+ }
62
+ this.fileList = res.data
63
+ },
64
+ delfile (file, index) {
65
+ this.$resetdelete(`${this.$androidUtil.getProxyUrl()}/rs/entity/t_files`, {id: file.id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
66
+ this.$dispatch("delResid", file.id)
67
+ this.getFiles()
68
+ })
69
+ },
70
+ async cameraCallBack(fileName, fileUrl) {
71
+ console.log('-----------cameraCallBack-----------------')
72
+ let data = {
73
+ blodid: HostApp.__this__.blobid,
74
+ type: HostApp.__this__.type,
75
+ defname: HostApp.__this__.defname,
76
+ username: Vue.user.name,
77
+ fremarks: '手机拍照',
78
+ fileName: fileName,
79
+ fileUrl: fileUrl
80
+ }
81
+ console.log('-----------bzLogic-----------------')
82
+ let res = HostApp.bzLogic({
83
+ 'logic': 'appFileUpload',
84
+ 'data': data
85
+ })
86
+ let params = {
87
+ imgid: res.id,
88
+ defname: HostApp.__this__.defname,
89
+ type: HostApp.__this__.type,
90
+ fremarks: '手机拍照',
91
+ username: Vue.user.name,
92
+ blodid: HostApp.__this__.blobid
93
+ }
94
+ let http = new HttpResetClass()
95
+ let res2 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/updateFiles`, params, {
96
+ warnMsg: null,
97
+ resolveMsg: null
98
+ }).then((res) => {
99
+ console.log('----------------开始回调查询-------------------')
100
+ HostApp.__this__.getFiles()
101
+ console.log('----------------查询回调结束-------------------')
102
+ HostApp.__callback__ = null
103
+ HostApp.__this__ = null
104
+ })
105
+ },
106
+ takePic (title) {
107
+ // 拍照成功回调
108
+ HostApp.__callback__ = this.cameraCallBack
109
+ HostApp.__this__ = this
110
+ let fileName = guid() + '.jpg'
111
+ // 打开相机
112
+ HostApp._open_a_page({
113
+ type: 'boomerang',
114
+ page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
115
+ param: {
116
+ file: fileName,
117
+ requestCode: 200,
118
+ callback: 'javascript:HostApp.__callback__("' + fileName + '", "%s");',
119
+ watermark: title + '\t时间:' + toStandardTimeString() + '\t' + Vue.user.name // 水印
120
+ }
121
+ })
122
+ },
123
+ },
124
+ computed: {
125
+ typeList () {
126
+ if (this.typelabel) {
127
+ return this.$appdata.getParam(this.typelabel)
128
+ }
129
+ return this.$appdata.getParam('使用类型')
130
+ }
131
+ },
132
+ events: {
133
+ },
134
+ watch: {
135
+ 'type' () {
136
+ this.selectdata.type = this.type
137
+ }
138
+ }
139
+ }
140
+ </script>
141
+
142
+ <style lang="less">
143
+ .fileType {
144
+ float: left;
145
+ .select-style {
146
+ background: #f8f8f8;
147
+ border: 0px;
148
+ }
149
+ input {
150
+ border-left: none;
151
+ width: 100%;
152
+ }
153
+ }
154
+ </style>