apply-clients 5.0.35-45 → 5.0.35-48

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.
@@ -0,0 +1,306 @@
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="../../image/pdf.jpg" alt="" />
31
+ <img v-if="row.f_filetype === 'xls'||row.f_filetype === 'xlsx'" src="../../image/excel.jpg" alt="" />
32
+ <img v-if="row.f_filetype === 'doc'||row.f_filetype === 'docx'" src="../../image/doc.jpg" alt="" />
33
+ <img v-if="row.f_filetype === 'dwg'" src="../../image/dwg.png" alt="" />
34
+ <img v-if="row.f_filetype === 'dxf'" src="../../image/dxf.png" 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 class="clears">
44
+ <a v-if="row.f_filetype === 'jpg' || 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>
45
+ <a v-if="row.f_filetype === 'dwg' || row.f_filetype==='dxf'" style="background:#6aa6e2" class="btn btn-primary" :href="row.f_downloadURL" role="button" download>下载</a>
46
+ <a v-if="row.f_filetype !=='jpg' && row.f_filetype !=='png' && row.f_filetype !=='gif' && row.f_filetype !=='bmp' && row.f_filetype !=='dxf' && row.f_filetype !=='dwg'"
47
+ @click="downloadfile(row.f_downloadURL)" style="background:#6aa6e2" class="btn btn-primary" role="button">下载</a>
48
+ <a v-if="isdelete && row.defname === defname" @click="delet($index, row)" href="#" class="btn btn-default" role="button" role="button">删除</a>
49
+ </p>
50
+ </div>
51
+ </div>
52
+ </div>
53
+ </div>
54
+ </div>
55
+ <apply-high-meter
56
+ v-if="showhighmeter"
57
+ :show.sync="showhighmeter"
58
+ :isusetype="isusetype"
59
+ :isremark="isremark"
60
+ @photo-finish="newPhoto"
61
+ v-ref:ltgao
62
+ ></apply-high-meter>
63
+ <modal :show.sync="showUpload" v-ref:modal backdrop="false">
64
+ <header slot="modal-header" class="modal-header">
65
+ <button type="button" class="close" @click="close"><span class="glyphicon glyphicon-remove"></span></button>
66
+ <h4 class="modal-title" style="text-align: center">文件上传</h4>
67
+ </header>
68
+ <article slot="modal-body" class="modal-body form-horizontal">
69
+ <div class="form-group" style="text-align: center">
70
+ <file-upload class="my-file-uploader" :name="'myFile' + blodid"
71
+ action="rs/file/uploadFile" tagname="文件上传" :headers="headers" multiple v-ref:file></file-upload>
72
+ </div>
73
+ <div class="form-group" v-if="isusetype">
74
+ <label class="col-sm-2 control-label">文件类型:</label>
75
+ <div class="col-sm-10">
76
+ <input-select
77
+ class="select select_list"
78
+ :value.sync="headers.fusetype"
79
+ v-model="headers.fusetype"
80
+ :options="$appdata.getParam('工程管理文件类型')"
81
+ :valueSingle="true"></input-select>
82
+ </div>
83
+ </div>
84
+ <div class="form-group" v-if="isremark">
85
+ <label class="col-sm-2 control-label">文件说明:</label>
86
+ <div class="col-sm-10">
87
+ <input class="form-control input_view" style=""
88
+ v-model="headers.fremarks"
89
+ :value="headers.fremarks"/>
90
+ </div>
91
+ </div>
92
+ </article>
93
+ <footer slot="modal-footer" class="modal-footer">
94
+ </footer>
95
+ </modal>
96
+ </template>
97
+
98
+ <script>
99
+ import {HttpResetClass} from 'vue-client'
100
+ import {isEmpty} from "../../Util";
101
+ export default {
102
+ title: '附件',
103
+ props: ['blodid', 'businessid', 'isremark', 'isusetype', 'takeimg', 'defname', 'isupload', 'isdelete', 'bootstraped', 'issearch'],
104
+ data () {
105
+ return {
106
+ fileInfoData: [], // 数据库存储的文件记录对象数组
107
+ headers: {'username': this.$login.f.name, 'blodid': '','businessid':'', 'fremarks': '','defname':'','fusetype':''}, // 调用rs/file/uploadFile 的参数
108
+ showUpload: false, // 上传模态框控制
109
+ showhighmeter: false, // 高拍仪组件控制
110
+ useType: null
111
+ }
112
+ },
113
+ methods: {
114
+ delet(index, row) {
115
+ this.$resetdelete('rs/entity/t_files', {id: row.id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
116
+ this.$dispatch("delResid",row.id)
117
+ this.load()
118
+ })
119
+ },
120
+ // 下载
121
+ downloadfile(filepath){
122
+ var link = document.createElement('a');
123
+ link.href = filepath;
124
+ link.target='_blank'
125
+ link.dispatchEvent(new MouseEvent('click'));
126
+ },
127
+ // 关闭文件上传对话框
128
+ close () {
129
+ this.showUpload = false
130
+ this.showhighmeter = false
131
+ // 将选的文件清空
132
+ this.$refs.file.$el.querySelector('input').value = ''
133
+ this.headers.fusetype = ''
134
+ this.headers.fremarks = ''
135
+ this.load()
136
+ },
137
+ // 查询
138
+ async load() {
139
+ let condition = ''
140
+ if(this.businessid){
141
+ condition = `f_businessid= '${this.headers.businessid}' `
142
+ }else{
143
+ condition = `f_blobid= '${this.headers.blodid}' `
144
+ }
145
+ if (this.useType != undefined && this.useType != null && this.useType != '') {
146
+ condition += `and fusetype = '${this.useType}'`
147
+ }
148
+ let http = new HttpResetClass()
149
+ let data = {
150
+ tablename: 't_files',
151
+ condition: condition + ` order by f_uploaddate desc `
152
+ }
153
+ console.log("当前数据",data)
154
+ let getFile = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
155
+ warnMsg: null,
156
+ resolveMsg: null
157
+ })
158
+
159
+ for (var i = 0; i < getFile.data.length; i++) {
160
+ // 如果使用类型包含导入字样,则是execl文件导入的,不做显示
161
+ if(getFile.data[i].fusetype&&(getFile.data[i].fusetype.includes('execl导入'))){
162
+ getFile.data.splice(i,1)
163
+ i--
164
+ continue
165
+ }
166
+ let temp = getFile.data[i].f_downloadpath
167
+ if (temp.includes('http:')){
168
+ getFile.data[i].f_downloadURL = temp
169
+ } else {
170
+ let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
171
+ getFile.data[i].f_downloadURL = "http://" + location.host + "/" + URL
172
+ }
173
+ }
174
+ this.fileInfoData = []
175
+ this.fileInfoData = getFile.data
176
+ },
177
+ // 打开高拍仪
178
+ upload () {
179
+ if(this.showhighmeter){
180
+ this.$refs.ltgao.closeVideo()
181
+ }
182
+ this.showhighmeter = !this.showhighmeter
183
+ },
184
+ // 高拍仪回调
185
+ newPhoto(Imgbase64, fusetype, fremarks) {
186
+ this.headers.fusetype = fusetype
187
+ this.headers.fremarks = fremarks
188
+
189
+ let form = new FormData()
190
+ let xhr = new XMLHttpRequest()
191
+ let formDataBoundary = "----WebkitFormBoundary" + "GaoPaiYi";
192
+ form.append('Content-Type', 'multipart/form-data;boundary=' + formDataBoundary)
193
+ form.append('file', this.convertBase64ToBlob(Imgbase64), "GaoPaiYi.jpg")
194
+ xhr.open("POST", "rs/file/uploadFile")
195
+
196
+ if (this.headers) {
197
+ for (var header in this.headers) {
198
+ xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
199
+ }
200
+ }
201
+ xhr.send(form)
202
+ setTimeout(() => {
203
+ this.close()
204
+ }, 5000)
205
+ },
206
+ convertBase64ToBlob(base64String) {
207
+ // 将base64解码
208
+ var bytes = atob(base64String);
209
+ //var bytes = base64;
210
+ var bytesCode = new ArrayBuffer(bytes.length);
211
+ // 转换为类型化数组
212
+ var byteArray = new Uint8Array(bytesCode);
213
+
214
+ // 将base64转换为ascii码
215
+ for (var i = 0; i < bytes.length; i++) {
216
+ byteArray[i] = bytes.charCodeAt(i);
217
+ }
218
+ // 生成Blob对象(文件对象)
219
+ return new Blob([bytesCode], {type: 'image/jpeg'});
220
+ },
221
+ },
222
+ ready () {
223
+ console.log("当前的流程标asdasd识",this.blodid+'adada'+ this.defname)
224
+ this.headers.blodid = this.blodid
225
+ this.headers.businessid = this.businessid
226
+ this.headers.defname = this.defname
227
+ if (this.blodid || this.businessid) {
228
+ this.load()
229
+ }
230
+ },
231
+ computed: {
232
+ typeOfUse () {
233
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('工程管理文件类型')]
234
+ }
235
+ },
236
+ events: {
237
+ onFileUpload: function (file, res) {
238
+ this.$dispatch("resid",res.id)
239
+ this.headers.fremarks=''
240
+ this.close()
241
+ }
242
+ },
243
+ watch: {
244
+ 'blodid'(val) {
245
+ if (val) {
246
+ console.log('观察blodid', val)
247
+ this.headers.blodid = this.blodid
248
+ this.load(this)
249
+ }
250
+ },
251
+ 'businessid'(val) {
252
+ console.log('观察businessid')
253
+ if (val) {
254
+ console.log('观察businessid', val)
255
+ this.headers.businessid = this.businessid
256
+ this.load(this)
257
+ }
258
+ },
259
+ 'useType'() {
260
+ this.headers.fusetype = this.useType[0] ? this.useType[0] : ''
261
+ },
262
+ 'defname'() {
263
+ this.headers.defname=this.defname
264
+ }
265
+ },
266
+ }
267
+ </script>
268
+
269
+ <style scoped>
270
+ .clears{
271
+ overflow:hidden;
272
+ text-overflow:ellipsis;
273
+ white-space:nowrap;
274
+ }
275
+ .showData {
276
+ padding: 15px 10px 0px 10px;
277
+ box-sizing: border-box;
278
+ height: 230px;
279
+ font-family: "微软雅黑";
280
+ }
281
+ .showData .item{
282
+ padding-bottom: 10px;
283
+ border-bottom: solid 1px #c1c1c1;
284
+ }
285
+ .left {
286
+ padding-right: 10px;
287
+ }
288
+ .left img{
289
+ height: 100%;
290
+ width: 100%;
291
+ }
292
+ .right{
293
+ height: 100%;
294
+ /*display: -webkit-flex;*/
295
+ /*display: flex;*/
296
+ /*flex-direction: column;*/
297
+ /*justify-content: space-around;*/
298
+ }
299
+ .item_btn{
300
+ width: 80%;
301
+ background-color: #6aa6e2;
302
+ border-radius: 4px;
303
+ color: #FFFFFF;
304
+ font-family: PingFang;
305
+ }
306
+ </style>
@@ -0,0 +1,136 @@
1
+ <template>
2
+ <div class="col-sm-12" style="overflow:auto;background-color: #ffffff;">
3
+ <div class="tops" v-bind:style="{ height: topheight }">
4
+ <engineer-select v-ref:queryuser v-show="show"></engineer-select>
5
+ </div>
6
+ <div v-show="showtotal" v-bind:style="{ height: botheight ,'margin-top':'20px','background-color' : '#f6f6f6' ,padding:'12px'}">
7
+ <div class="col-sm-10">
8
+ <tabset v-ref:tabs :close="false">
9
+ <tab :header='header' style="background-color :#f6f6f6">
10
+ <service-control v-ref:service :selectdata="selectdata" ></service-control>
11
+ </tab>
12
+ <!-- <tab header='表档案管理'>-->
13
+ <!-- <record-message v-ref:record :selectdata="selectdata" :key="tittle2"-->
14
+ <!-- :edit = "true">-->
15
+ <!-- </record-message>-->
16
+ <!-- </tab>-->
17
+ <!--<tab header='材料信息' style="background-color :#f6f6f6">-->
18
+ <!--<material-message v-ref:material :selectdata="selectdata"-->
19
+ <!--:edit = "true">-->
20
+ <!--</material-message>-->
21
+ <!--</tab>-->
22
+ <tab header='附件' style="background-color :#f6f6f6">
23
+ <engineer-upload v-ref:file
24
+ :blodid = "f_process_id"
25
+ :isusetype = "true"
26
+ :isremark = "true"
27
+ :issearch = "true"
28
+ :isupload = "true"
29
+ :defname="selectdata.defname"
30
+
31
+ ></engineer-upload>
32
+ <!--<customer-file v-ref:file :selectdata="selectdata"></customer-file>-->
33
+ </tab>
34
+ <!--<tab header='设备新增' v-if="flagg">-->
35
+ <!--<equipment-message v-ref:equipment :selectdata="selectdata"-->
36
+ <!--:edit = "true">-->
37
+ <!--</equipment-message>-->
38
+ <!--</tab>-->
39
+ <!-- <tab header='设备管理' v-if="flagg">
40
+ <customer-record-message v-ref:record :selectdata="selectdata" :key="tittle3"></customer-record-message>
41
+ </tab>-->
42
+ </tabset>
43
+ </div>
44
+ <div class="col-sm-2" v-show="showbasic" >
45
+ <history_control v-ref:binfo :selectdata="selectdata"></history_control>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </template>
50
+ <script>
51
+ import Vue from 'vue'
52
+ import {HttpResetClass} from 'vue-client'
53
+ export default {
54
+ title: '工程管理',
55
+ data() {
56
+ return {
57
+ flagg: false,
58
+ show: true,
59
+ showbasic: false,
60
+ showtotal: false,
61
+ header: null,
62
+ selectdata: {},
63
+ botheight: '0%',
64
+ topheight: '100%',
65
+ tittle1:'户档案管理',
66
+ tittle2:'表档案管理',
67
+ tittle3:'设备管理',
68
+ f_process_id: ''
69
+ }
70
+ },
71
+
72
+ events: {
73
+ 'addactive'() {
74
+ this.$refs.queryuser.$refs.cp.$refs.cri.search()
75
+ this.hidden()
76
+ this.showbasic = true
77
+ this.topheight = '8%'
78
+ this.botheight = '82%'
79
+ },
80
+ 'changeheight'() {
81
+ this.show = true
82
+ this.botheight = '0%'
83
+ },
84
+ 'check'(val) {
85
+ this.selectdata = null
86
+ this.selectdata = val
87
+ this.f_process_id = this.selectdata.f_process_id
88
+
89
+ console.log(val)
90
+ //如果点击后未结余金额不为0,不允许下发f_unaccounts_money
91
+ console.log("当前的流程标识",this.selectdata.f_process_id)
92
+ console.log("节点编号:"+this.selectdata.actdefid,"节点名称:"+this.selectdata.defname)
93
+ this.topheight = '8%'
94
+ this.botheight = '82%'
95
+ this.$refs.queryuser.$refs.cp.$refs.grid.model.rows = [val]
96
+ this.$refs.queryuser.$refs.cp.pager = false
97
+ this.showbasic = true
98
+ this.header = val.defname
99
+ this.hidden()
100
+ this.$refs.service.refurbish(val)
101
+ },
102
+ 'selfsearch'() {
103
+ this.$refs.queryuser.$refs.cp.$refs.cri.search()
104
+ },
105
+ 'close'() {
106
+ this.showtotal = false
107
+ this.topheight = '100%'
108
+ this.botheight = '0%'
109
+ this.$refs.queryuser.$refs.cp.pager = true
110
+ this.$refs.queryuser.$refs.cp.$refs.cri.search()
111
+ }
112
+ },
113
+ methods: {
114
+ hidden() {
115
+ this.showtotal = true
116
+ },
117
+ close() {
118
+ this.hidden()
119
+ this.topheight = '100%'
120
+ this.botheight = '0%'
121
+ }
122
+ },
123
+ async ready(){
124
+ },
125
+ watch: {
126
+ 'selectdata'(val) {
127
+ console.log('selectdata:', val)
128
+ },
129
+ 'selectdata.f_customer_type'() {
130
+ if (this.selectdata.f_customer_type == '企业') {
131
+ this.flagg = true
132
+ }
133
+ }
134
+ }
135
+ }
136
+ </script>