apply-clients 3.0.4 → 3.0.5-4

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.
Files changed (64) hide show
  1. package/index.html +1 -1
  2. package/package.json +4 -3
  3. package/src/App.vue +126 -15
  4. package/src/apply.js +152 -134
  5. package/src/bootstrap/fonts/PingFangSC-Regular.ttf +0 -0
  6. package/src/bootstrap/less/bootstrap.less +1 -2
  7. package/src/bootstrap/less/standard.less +208 -0
  8. package/src/components/Util.js +4 -0
  9. package/src/components/app_apply/FieldExploration.vue +2 -2
  10. package/src/components/app_apply/Ventilation.vue +2 -2
  11. package/src/components/image/doc.jpg +0 -0
  12. package/src/components/image/excel.jpg +0 -0
  13. package/src/components/image/pdf.jpg +0 -0
  14. package/src/components/image//345/233/276/345/261/20212.png +0 -0
  15. package/src/components/image//345/233/276/345/261/20213.png +0 -0
  16. package/src/components/image//345/233/276/345/261/20216.png +0 -0
  17. package/src/components/image//345/244/232/350/276/271/345/275/2422.png +0 -0
  18. package/src/components/image//345/244/232/350/276/271/345/275/2422/346/213/267/350/264/235.png +0 -0
  19. package/src/components/image//346/244/255/345/234/2062.png +0 -0
  20. package/src/components/image//346/244/255/345/234/2065.png +0 -0
  21. package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/235.png +0 -0
  22. package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/2352.png +0 -0
  23. package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/2353.png +0 -0
  24. package/src/components/image//347/273/2044.png +0 -0
  25. package/src/components/image//347/273/2045.png +0 -0
  26. package/src/components/image//347/273/2046.png +0 -0
  27. package/src/components/image//350/257/235/345/212/241/347/273/237/350/256/241/346/225/260/346/215/256/345/261/225/347/244/272.png +0 -0
  28. package/src/components/product/Function/InstallFunction.vue +9 -5
  29. package/src/components/product/Function/InstallInfoSelect.vue +98 -69
  30. package/src/components/product/Function/Service/FunctionServiceControl.vue +47 -4
  31. package/src/components/product/Function/functions/AddContract.vue +161 -139
  32. package/src/components/product/Function/functions/BuyerMessage.vue +285 -137
  33. package/src/components/product/Function/functions/InstallFee.vue +1117 -912
  34. package/src/components/product/MaterialBatchList.vue +109 -0
  35. package/src/components/product/MaterialBatchManage.vue +34 -0
  36. package/src/components/product/Procedures/ProceduresDataGrid.vue +1022 -0
  37. package/src/components/product/Process/ExplorationSelect.vue +213 -73
  38. package/src/components/product/Process/ExplorationUser.vue +94 -39
  39. package/src/components/product/Process/MaterialUseList.vue +159 -0
  40. package/src/components/product/Process/ModifyUserFiles.vue +15 -5
  41. package/src/components/product/Process/ProcessInfo/history_control.vue +35 -6
  42. package/src/components/product/Process/Processes/ApplyUpload.vue +287 -0
  43. package/src/components/product/Process/Processes/CustomerCostPlan.vue +214 -0
  44. package/src/components/product/Process/Processes/CustomerMaterialMessage.vue +499 -210
  45. package/src/components/product/Process/Processes/CustomerRecordMessage.vue +949 -753
  46. package/src/components/product/Process/Processes/ProjectSettlement.vue +535 -24
  47. package/src/components/product/Process/Processes/ReceiveBatch.vue +301 -121
  48. package/src/components/product/Process/Processes/Service/ApplyChangeHistory.vue +105 -0
  49. package/src/components/product/Process/Processes/Service/ApplyChargeSearch.vue +27 -14
  50. package/src/components/product/Process/Processes/Service/ServiceControl.vue +2561 -1104
  51. package/src/components/product/Process/Processes/Upload.vue +532 -0
  52. package/src/components/product/Process/ShowBackReason.vue +1 -1
  53. package/src/components/product/ServiceView.vue +825 -583
  54. package/src/components/product/Statistics/ApplyStatisticsROOT.vue +27 -0
  55. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +212 -23
  56. package/src/components/product/Supervisory/SupervisoryControl.vue +79 -26
  57. package/src/components/product/Supervisory/SupervisoryList.vue +182 -41
  58. package/src/components/product/Supervisory/SupervisoryhCart.vue +4 -2
  59. package/src/components/product/VueUtils/Tree.vue +330 -0
  60. package/src/components/product/VueUtils/rightview/InstallCardList2.vue +29 -38
  61. package/src/stores/ApplyLoadParams.js +1 -1
  62. package/src/stores/PagedListLogic.js +173 -0
  63. package/.npmignore +0 -12
  64. package/yarn.lock +0 -9008
@@ -0,0 +1,159 @@
1
+ <template>
2
+ <div id='app'class="flex bg-white p-10 datapanel" >
3
+ <criteria-paged :model="model" :pager='false'>
4
+ <criteria partial='criteria' @condition-changed='search'>
5
+ <div novalidate class="form-inline auto" partial>
6
+ <div class="form-group">
7
+ <div class="form-group">
8
+ <label class="control-label">分公司:</label>
9
+ <!--<right-tree :userid.sync='$parent.$parent.userid' :source.sync='$parent.$parent.source' @re-res="$parent.$parent.getRes" ></right-tree>
10
+ --> <v-select :value.sync="model.f_filiale" v-model="model.f_filiale"
11
+ :options='$parent.$parent.filiale' placeholder='请选择'
12
+ close-on-select>
13
+ </v-select>
14
+ </div>
15
+ <div class="form-group">
16
+ <label class="control-label">报建编号:</label>
17
+ <!--<right-tree :userid.sync='$parent.$parent.userid' :source.sync='$parent.$parent.source' @re-res="$parent.$parent.getRes" ></right-tree>
18
+ --> <v-select :value.sync="model.f_apply_num" v-model="model.f_apply_num"
19
+ :options='$parent.$parent.appnum' placeholder='请选择'
20
+ close-on-select search="">
21
+ </v-select>
22
+ </div>
23
+ <div class="form-group">
24
+ <label for="startDate" class="control-label">开始日期:</label>
25
+ <datepicker id="startDate" placeholder="开始日期"
26
+ v-model="model.startDate"
27
+ :value.sync="model.startDate"
28
+ :disabled-days-of-Week="[]"
29
+ :format="'yyyy-MM-dd'"
30
+ :show-reset-button="reset">
31
+ </datepicker></div>
32
+ <div class="form-group" class="control-label">
33
+ <label for="endDate">结束日期:</label>
34
+ <datepicker id="endDate" placeholder="结束日期"
35
+ v-model="model.endDate"
36
+ :value.sync="model.endDate"
37
+ :disabled-days-of-Week="[]"
38
+ :format="'yyyy-MM-dd'"
39
+ :show-reset-button="reset">
40
+ </datepicker></div>
41
+ <div class="form-group">
42
+ <button class="button_search button_spacing" @click="search()">查询</button>
43
+ <report-print class="button_new button_spacing" id='shexian' top='1cm' left='1cm' width='100%' height='100%'></report-print>
44
+ <report-excel class="button_export button_spacing" id='shexian'></report-excel></div>
45
+ </div>
46
+ </div>
47
+ </criteria>
48
+ <div partial='list' id='shexian'>
49
+ <table class='tableprint' style="margin: 0px auto">
50
+ <thead>
51
+ <tr>
52
+ <th colspan='5' style="font-weight: normal; text-align: left;">
53
+ <h3 style="text-align: center">报建实用材料报表</h3>
54
+ </th>
55
+ </tr>
56
+ <tr>
57
+ <th colspan='5' style="font-weight: normal; text-align: center;">
58
+ 开始时间:{{model.model.startDate}}&nbsp;&nbsp;&nbsp;
59
+ 结束时间:{{ model.model.endDate }}
60
+ 报建编号:{{ model.applynum }}
61
+ </th>
62
+ </tr>
63
+ </thead>
64
+ <tr>
65
+ <th colspan='5' style="font-weight: normal;">
66
+ {{{ model.data.substring(26,model.data.length-8) }}}
67
+ </th>
68
+ </tr>
69
+ </table>
70
+ </div>
71
+ </criteria-paged>
72
+ </div>
73
+
74
+ </template>
75
+
76
+ <script>
77
+ import { DataModel } from 'vue-client'
78
+
79
+ export default {
80
+ title: '报表',
81
+ data () {
82
+
83
+ let model = new DataModel('rs/report/materialReport',{startDate: 'this.model.startDate', endDate: 'this.model.endDate',f_filiale: 'this.fengongsi',f_apply_num:'this.applynum'})
84
+ model.f_subcompany = '',
85
+ model.fengongsi = '',
86
+ model.applynum = ''
87
+ return {
88
+ filialeNameStr:'',
89
+ filialeCodeStr:'',
90
+ userid: this.$login.f.id,
91
+ source: `tool.getFullTree(this.getRights().where(row.getType() != $zone$).where(row.getType() == $organization$))`,
92
+ model:model,
93
+ filiale:[],
94
+ appnum:[]
95
+
96
+ }
97
+ },
98
+ methods: {
99
+ // 获取组织结构
100
+ getRes(obj) {
101
+ console.log(obj,'se')
102
+ let fengongsi=obj.res.toString().split('.')
103
+ console.log(fengongsi,'se')
104
+ console.log(fengongsi[fengongsi.length-1],'se')
105
+ this.model.f_subcompany = obj.res
106
+ console.log(this.model,'se')
107
+ // this.model.filialeCodeStr = obj.resids
108
+ // this.model.filialeCodeStr = this.model.filialeCodeStr.replace(/\./g, '')
109
+ },
110
+ gethuman(){
111
+ console.log('获取人员')
112
+ this.$resetpost('rs/logic/getMaterialItem', {data: {condition: `1=1`}}, {resolveMsg: null, rejectMsg: null}).then((res) => {
113
+ // this.params.rows.splice(index, 1)
114
+ console.log('获取成功',res)
115
+
116
+ let house2 = []
117
+ for (let row of res.data.f){
118
+ house2.push({label: row.f_filiale,value: row.f_filiale})
119
+ }
120
+ this.filiale = house2
121
+ let house3 = [
122
+ {label:'全部',value:''}
123
+ ]
124
+ for (let row of res.data.appnum){
125
+ house3.push({label: row.f_apply_num,value: row.f_apply_num})
126
+ }
127
+ this.appnum = house3
128
+ })
129
+
130
+ },
131
+ },
132
+ ready(){
133
+ this.gethuman()
134
+ },
135
+ computed: {
136
+ selected() {
137
+ return this.$refs.grid.selected
138
+ },
139
+ // outlets () {
140
+ // return [{label: '全部', value: ''}, ...AppData.getParam('营业网点')]
141
+ // },
142
+ // operator () {
143
+ // return [{label: '全部', value: ''}, ...AppData.getParam('操作员')]
144
+ // }
145
+ },
146
+ watch :{
147
+ 'model.model.f_filiale[0]'(val){
148
+
149
+ this.model.fengongsi = val
150
+
151
+
152
+ },
153
+ 'model.model.f_apply_num[0]'(val){
154
+ this.model.applynum = val
155
+
156
+ },
157
+ }
158
+ }
159
+ </script>
@@ -95,7 +95,7 @@
95
95
  <td style="text-align: center;">
96
96
  <!-- <td style="text-align: center;" v-show= "$parent.$parent.$parent.jurisdiction.includes('档案修正权限')"> -->
97
97
  <button type="button" name="button" class="btn btn-link" v-if="row.f_user_state === '正常'"
98
- @click.stop="$parent.$parent.$parent.modifyinfo(row)">改装</button>
98
+ @click.stop="$parent.$parent.$parent.modifyinfo(row)">登记</button>
99
99
  </td>
100
100
  </template>
101
101
  </data-grid>
@@ -137,8 +137,9 @@
137
137
 
138
138
  <script>
139
139
 
140
- import { PagedList } from 'vue-client'
140
+ import {HttpResetClass, PagedList} from 'vue-client'
141
141
  import Vue from 'vue'
142
+ import * as Util from "../../Util";
142
143
 
143
144
  let loadParamGem = async function (self) {
144
145
  console.log('获取登录信息,', self.$login, self.$appdata, self.$appdata.getParam('用户类型'), Vue.$login.f.name)
@@ -153,7 +154,7 @@
153
154
  'title': '用户档案',
154
155
  data () {
155
156
  return {
156
- model: new PagedList('rs/sql/singleTable_OrderBy', 30, {items: '"*"', tablename: '"t_userinfo"', orderitem: '"CONVERT(int,f_userinfo_id) desc"'}),
157
+ model: new PagedList('rs/sql/singleTable_OrderBy', 30, {items: '"*"', tablename: '"t_userinfo"', orderitem: '"f_userinfo_id desc"'}),
157
158
  row: null, // 选择一条用户信息,对其进行修改
158
159
  arearow: null, // 新建修改小区使用的数据小区使用
159
160
  areainfo: null, // 小区批量建档使用的数据
@@ -194,7 +195,15 @@
194
195
  search () {
195
196
  this.$refs.paged.$refs.criteria.search()
196
197
  },
197
- modifyinfo (row) {
198
+ async modifyinfo (row) {
199
+ console.log('row:',row)
200
+ let http = new HttpResetClass()
201
+ let res = await http.load('POST','rs/logic/ApplyGetProcessID',{data:{filename:this.$workflow_vue.workflow_xmlfilename,start_activity:this.$workflow_vue.start_activity}}, {resolveMsg: null, rejectMsg: '获取流程ID失败,请联系开发人员'})
202
+ row.f_process_id = res.data.f_process_id
203
+ row.defname= this.$workflow_vue.start_activity
204
+ row.f_apply_date=Util.toStandardTimeString()
205
+ // row.f_apply_num= this.generateUUID()
206
+ row.f_apply_operator_telephone= this.$login.f.f_fgsdianhua
198
207
  this.$parent.show = true
199
208
  this.$parent.$refs.queryuser.addactive(row)
200
209
  },
@@ -280,7 +289,8 @@
280
289
  this.model.rows.unshift(data)
281
290
  },
282
291
  selfSearch (args) {
283
- args.condition = `${args.condition} and f_filialeids = '${this.$login.f.f_orgids}'`
292
+ // args.condition = `${args.condition} and f_filialeids = '${this.$login.f.f_orgids}'`
293
+ args.condition = `${args.condition}`
284
294
  this.model.search(args.condition, args.model)
285
295
  },
286
296
  bulkOperations (name, type) {
@@ -1,16 +1,16 @@
1
1
  <template>
2
- <div class="auto" style="padding-right:5px; padding-top: 10px;">
2
+ <div class="auto" style="padding-right:5px; padding-top: 10px;" v-if="refreshed">
3
3
  <validator name="v">
4
4
 
5
5
  <div v-for="(index,item) in data" class="panel" v-bind:class="{'panel-default': showpanl[index].showdef, ' panel-info ' : showpanl[index].showinfo}">
6
6
  <div :class="{'panel-heading background-default':showpanl[index].show,'panel-heading':!showpanl[index].show}" @click ="hello(index)">
7
- <h3 class="panel-title">{{item.title}}信息:{{item.person}}<span class="pull-right glyphicon" v-bind:class="{'glyphicon-chevron-right': showpanl[index].show, 'glyphicon-chevron-down' : showpanl[index].hasError}"></span></h3>
7
+ <h3 class="panel-title">{{item.title}}信息<span class="pull-right glyphicon" v-bind:class="{'glyphicon-chevron-right': showpanl[index].show, 'glyphicon-chevron-down' : showpanl[index].hasError}"></span></h3>
8
8
  </div>
9
9
  <div class="panel-body" v-if="showpanl[index].hasError">
10
10
  <div class="col-sm-12">
11
11
  <div v-for="(index2,row) in item.fields">
12
- <span v-if="row.hasOwnProperty('field')" class="col-sm-6">{{item.fields[index2].label}}:{{item.fields[index2].value}}</span>
13
- <span v-else class="col-sm-6" v-for="(index3,arr) in row.items">{{arr.label}}:{{arr.value?'是':'否'}}</span>
12
+ <span v-if="row.hasOwnProperty('field')" class="col-sm-12">{{item.fields[index2].label}}:{{item.fields[index2].value}}</span>
13
+ <span v-else class="col-sm-12" v-for="(index3,arr) in row.items">{{arr.label}}:{{arr.value?'是':'否'}}</span>
14
14
  </div>
15
15
  </div>
16
16
  </div>
@@ -27,6 +27,7 @@
27
27
  return {
28
28
  data:null,
29
29
  defnames:null,
30
+ refreshed:true,
30
31
  showpanl:[]
31
32
  }
32
33
  },
@@ -40,7 +41,7 @@
40
41
  // 配置文件title循环
41
42
  for(let j = 0;j<this.$workflow_vue.activitys.length;j++){
42
43
  if(this.defnames[i].defname===this.$workflow_vue.activitys[j].title){
43
- let temp = this.$workflow_vue.activitys[j]
44
+ let temp = JSON.parse(JSON.stringify(this.$workflow_vue.activitys[j]))
44
45
  if(this.defnames[i].hasOwnProperty('person')){
45
46
  temp.person = this.defnames[i].person
46
47
  }
@@ -53,20 +54,48 @@
53
54
  for(let i=0;i<tempArray.length;i++){
54
55
  for(let j = 0;j<tempArray[i].fields.length;j++){
55
56
  if(tempArray[i].fields[j].hasOwnProperty('field')){
56
- tempArray[i].fields[j].value = this.selectdata[tempArray[i].fields[j].field]
57
+ if((tempArray[i].fields[j].label=='项目预算金额' ||
58
+ tempArray[i].fields[j].label=='设计费成本' ||
59
+ tempArray[i].fields[j].label=='材料预算成本' ||
60
+ tempArray[i].fields[j].label=='施工预算成本' ||
61
+ tempArray[i].fields[j].label=='探伤预算成本' ||
62
+ tempArray[i].fields[j].label=='检测预算成本' ||
63
+ tempArray[i].fields[j].label=='其他预算成本' ||
64
+ tempArray[i].fields[j].label=='首付'||
65
+ tempArray[i].fields[j].label=='进度款'||
66
+ tempArray[i].fields[j].label=='尾款' ) && this.$login.f.f_parentname !== '市场部'){
67
+ tempArray[i].fields[j].value = '隐藏数据'
68
+ }else{
69
+ tempArray[i].fields[j].value = this.selectdata[tempArray[i].fields[j].field]
70
+ }
71
+
57
72
  }else if(tempArray[i].fields[j].hasOwnProperty('items')){
58
73
  for(let k = 0;k<tempArray[i].fields[j].items.length;k++){
59
74
  tempArray[i].fields[j].items[k].value = this.selectdata[tempArray[i].fields[j].items[k].field]
60
75
  }
61
76
  }
77
+ if(tempArray[i].fields[j].value&&typeof tempArray[i].fields[j].value =='string'&&tempArray[i].fields[j].value.startsWith('{')&&tempArray[i].fields[j].value.endsWith('}')){
78
+ let temp = JSON.parse(tempArray[i].fields[j].value)
79
+ tempArray[i].fields[j].value = temp.name
80
+ }
62
81
  }
63
82
  }
64
83
  this.data = tempArray
84
+ this.refreshed =false
85
+ this.$nextTick(()=>{
86
+ this.refreshed =true
87
+ this.hello(9999999)
88
+ })
65
89
  },
66
90
  hello (index) {
67
91
  if (!this.selectdata.defname) {
68
92
  return
69
93
  }
94
+ if(index==9999999){
95
+ console.log("this.showpanl:"+this.showpanl)
96
+ this.showpanl[0].hasError = true
97
+ return
98
+ }
70
99
  if (this.showpanl[index].show) {
71
100
  this.showpanl[index].show = false
72
101
  this.showpanl[index].hasError = true
@@ -0,0 +1,287 @@
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
+ </a>
34
+ </div>
35
+ <div class="right col-sm-7">
36
+ <p :title="row.f_filename" class="clears"><strong>文件名:</strong>{{row.f_filename}}</p>
37
+ <p :title="row.f_username" class="clears"><strong>操作员:</strong><span>{{row.f_username}}</span></p>
38
+ <p :title="row.fusetype" class="clears"><strong>使用类型:</strong><span>{{row.fusetype}}</span></p>
39
+ <p :title="row.f_uploaddate" class="clears"><strong>上传时间:</strong><span>{{row.f_uploaddate}}</span></p>
40
+ <p :title="row.fremarks" class="clears"><strong>文件说明:</strong>{{row.fremarks}}</p>
41
+ <p class="clears">
42
+ <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>
43
+ <a v-else @click="downloadfile(row.f_downloadURL)" style="background:#6aa6e2" class="btn btn-primary" role="button">下载</a>
44
+ <a v-if="isdelete && $login.f.f_parentname !== '客服部'" @click="delet($index, row)" href="#" class="btn btn-default" role="button" role="button">删除</a>
45
+ </p>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ <apply-high-meter v-if="showhighmeter" :show.sync="showhighmeter" @photo-finish="newPhoto" v-ref:ltgao ></apply-high-meter>
52
+ <modal :show.sync="showUpload" v-ref:modal backdrop="false">
53
+ <header slot="modal-header" class="modal-header">
54
+ <button type="button" class="close" @click="close"><span class="glyphicon glyphicon-remove"></span></button>
55
+ <h4 class="modal-title" style="text-align: center">文件上传</h4>
56
+ </header>
57
+ <article slot="modal-body" class="modal-body form-horizontal">
58
+ <div class="form-group" style="text-align: center">
59
+ <file-upload class="my-file-uploader" :name="'myFile' + blodid"
60
+ action="rs/file/uploadFile" tagname="文件上传" :headers="headers" multiple v-ref:file></file-upload>
61
+ </div>
62
+ <div class="form-group" v-if="isusetype">
63
+ <label class="col-sm-2 control-label">文件类型:</label>
64
+ <div class="col-sm-10">
65
+ <input-select
66
+ class="select select_list"
67
+ :value.sync="headers.fusetype"
68
+ v-model="headers.fusetype"
69
+ :options="$appdata.getParam('使用类型')"
70
+ :valueSingle="true"></input-select>
71
+ </div>
72
+ </div>
73
+ <div class="form-group" v-if="isremark">
74
+ <label class="col-sm-2 control-label">文件说明:</label>
75
+ <div class="col-sm-10">
76
+ <input class="form-control input_view" style=""
77
+ v-model="headers.fremarks"
78
+ :value="headers.fremarks"/>
79
+ </div>
80
+ </div>
81
+ </article>
82
+ <footer slot="modal-footer" class="modal-footer">
83
+ </footer>
84
+ </modal>
85
+ </template>
86
+
87
+ <script>
88
+ import {HttpResetClass} from 'vue-client'
89
+ import {isEmpty} from "../../../Util";
90
+ export default {
91
+ title: '附件',
92
+ props: ['blodid', 'businessid', 'isremark', 'isusetype', 'takeimg', 'defname', 'isupload', 'isdelete', 'bootstraped', 'issearch'],
93
+ data () {
94
+ return {
95
+ fileInfoData: [], // 数据库存储的文件记录对象数组
96
+ headers: {'username': this.$login.f.name, 'blodid': '','businessid':'', 'fremarks': '','defname':'','fusetype':''}, // 调用rs/file/uploadFile 的参数
97
+ showUpload: false, // 上传模态框控制
98
+ showhighmeter: false, // 高拍仪组件控制
99
+ useType: null
100
+ }
101
+ },
102
+ ready () {
103
+ this.headers.blodid = this.blodid
104
+ this.headers.businessid = this.businessid
105
+ this.headers.defname = this.defname
106
+ console.log("流程id--:" + this.blodid)
107
+ if (this.blodid || this.businessid) {
108
+ this.load()
109
+ }
110
+ },
111
+ methods: {
112
+ delet(index, row) {
113
+ this.$resetdelete('rs/entity/t_files', {id: row.id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
114
+ this.$dispatch("delResid",row.id)
115
+ this.load()
116
+ })
117
+ },
118
+ // 下载
119
+ downloadfile(filepath){
120
+ var link = document.createElement('a');
121
+ link.href = filepath;
122
+ link.target='_blank'
123
+ link.dispatchEvent(new MouseEvent('click'));
124
+ },
125
+ // 关闭文件上传对话框
126
+ close () {
127
+ this.showUpload = false
128
+ // 将选的文件清空
129
+ this.$refs.file.$el.querySelector('input').value = ''
130
+ this.headers.fusetype = ''
131
+ this.headers.fremarks = ''
132
+ this.load()
133
+ },
134
+ // 查询
135
+ async load() {
136
+ let condition = ''
137
+ if(this.businessid){
138
+ condition = `f_businessid= '${this.headers.businessid}' `
139
+ }else{
140
+ condition = `f_blobid= '${this.headers.blodid}' `
141
+ console.log("f_process_id--:" + condition)
142
+ }
143
+ if (!isEmpty(this.useType)) {
144
+ condition += `and fusetype like '${this.useType}'`
145
+ }
146
+ let http = new HttpResetClass()
147
+ if (this.$login.f.rolesnames.includes('部长')){
148
+ var data = {
149
+ tablename: 't_files',
150
+ condition: condition +` order by f_uploaddate desc `
151
+ }
152
+ }else {
153
+ data = {
154
+ tablename: 't_files',
155
+ condition: condition + ` and f_username = '${this.headers.username}'` +` order by f_uploaddate desc `
156
+ }
157
+ }
158
+
159
+ let getFile = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
160
+ warnMsg: null,
161
+ resolveMsg: null
162
+ })
163
+
164
+ for (var i = 0; i < getFile.data.length; i++) {
165
+ // 如果使用类型包含导入字样,则是execl文件导入的,不做显示
166
+ if(getFile.data[i].fusetype&&(getFile.data[i].fusetype.includes('execl导入'))){
167
+ getFile.data.splice(i,1)
168
+ i--
169
+ continue
170
+ }
171
+ let temp = getFile.data[i].f_downloadpath
172
+ let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
173
+ getFile.data[i].f_downloadURL = "http://" + location.host + "/" + URL
174
+ }
175
+ this.fileInfoData = []
176
+ this.fileInfoData = getFile.data
177
+ },
178
+ // 打开高拍仪
179
+ upload () {
180
+ if(this.showhighmeter){
181
+ this.$refs.ltgao.closeVideo()
182
+ }
183
+ this.showhighmeter = !this.showhighmeter
184
+ },
185
+ // 高拍仪回调
186
+ newPhoto(Imgbase64) {
187
+ let form = new FormData()
188
+ let xhr = new XMLHttpRequest()
189
+ let formDataBoundary = "----WebkitFormBoundary" + "GaoPaiYi";
190
+ form.append('Content-Type', 'multipart/form-data;boundary=' + formDataBoundary)
191
+ form.append('file', this.convertBase64ToBlob(Imgbase64), "GaoPaiYi.jpg")
192
+ xhr.open("POST", "rs/file/uploadFile")
193
+
194
+ if (this.headers) {
195
+ for (var header in this.headers) {
196
+ xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
197
+ }
198
+ }
199
+ xhr.send(form)
200
+ setTimeout(() => {
201
+ this.load()
202
+ }, 5000)
203
+ },
204
+ convertBase64ToBlob(base64String) {
205
+ // 将base64解码
206
+ var bytes = atob(base64String);
207
+ //var bytes = base64;
208
+ var bytesCode = new ArrayBuffer(bytes.length);
209
+ // 转换为类型化数组
210
+ var byteArray = new Uint8Array(bytesCode);
211
+
212
+ // 将base64转换为ascii码
213
+ for (var i = 0; i < bytes.length; i++) {
214
+ byteArray[i] = bytes.charCodeAt(i);
215
+ }
216
+ // 生成Blob对象(文件对象)
217
+ return new Blob([bytesCode], {type: 'image/jpeg'});
218
+ },
219
+ },
220
+ computed: {
221
+ typeOfUse () {
222
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('使用类型')]
223
+ }
224
+ },
225
+ events: {
226
+ onFileUpload: function (file, res) {
227
+ this.$dispatch("resid",res.id)
228
+ this.headers.fremarks=''
229
+ this.close()
230
+ }
231
+ },
232
+ watch: {
233
+ 'blodid'(val) {
234
+ if (val) {
235
+ console.log('观察blodid', val)
236
+ this.headers.blodid = this.blodid
237
+ this.load(this)
238
+ }
239
+ },
240
+ 'useType'() {
241
+ this.headers.fusetype = this.useType[0] ? this.useType[0] : ''
242
+ },
243
+ 'defname'() {
244
+ this.headers.defname=this.defname
245
+ }
246
+ }
247
+ }
248
+ </script>
249
+
250
+ <style scoped>
251
+ .clears{
252
+ overflow:hidden;
253
+ text-overflow:ellipsis;
254
+ white-space:nowrap;
255
+ }
256
+ .showData {
257
+ padding: 15px 10px 0px 10px;
258
+ box-sizing: border-box;
259
+ height: 230px;
260
+ font-family: "微软雅黑";
261
+ }
262
+ .showData .item{
263
+ padding-bottom: 10px;
264
+ border-bottom: solid 1px #c1c1c1;
265
+ }
266
+ .left {
267
+ padding-right: 10px;
268
+ }
269
+ .left img{
270
+ height: 100%;
271
+ width: 100%;
272
+ }
273
+ .right{
274
+ height: 100%;
275
+ /*display: -webkit-flex;*/
276
+ /*display: flex;*/
277
+ /*flex-direction: column;*/
278
+ /*justify-content: space-around;*/
279
+ }
280
+ .item_btn{
281
+ width: 80%;
282
+ background-color: #6aa6e2;
283
+ border-radius: 4px;
284
+ color: #FFFFFF;
285
+ font-family: PingFang;
286
+ }
287
+ </style>