safecheck-client 3.0.30-72 → 3.0.30-74

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.
@@ -122,6 +122,15 @@
122
122
  <th>
123
123
  <nobr>到访不遇</nobr>
124
124
  </th>
125
+ <th>
126
+ <nobr>激光检漏</nobr>
127
+ </th>
128
+ <th>
129
+ <nobr>立杠保压</nobr>
130
+ </th>
131
+ <th>
132
+ <nobr>室外关阀</nobr>
133
+ </th>
125
134
  <th>
126
135
  <nobr>拒检</nobr>
127
136
  </th>
@@ -143,10 +152,13 @@
143
152
  <td style="text-align:center" :class="{'defectfront':row.f_plan_total==row.f_user_number,'td-0':row.f_checker_name==undefined,'td-1':model.rows.length!=($index+1)&&row.f_checker_name.indexOf('*&')==-1,'td-2':model.rows.length!=($index+1)&&row.f_checker_name.indexOf('*&')!=-1,'td-3':model.rows.length==($index+1)&&row.f_checker_name.indexOf('*&')!=-1,'td-4':model.rows.length==($index+1)&&row.f_checker_name.indexOf('*&')==-1}" v-if="$parent.$parent.$parent.nameForSql.includes('f_checker_name')">{{row.f_checker_name.indexOf('*&')!=-1?'':row.f_checker_name}}</td>
144
153
  <td style="text-align:center" :class="{'defectfront':row.f_plan_total==row.f_user_number}" v-if="$parent.$parent.$parent.nameForSql.includes('f_user_number')">{{row.f_user_number}}</td>
145
154
  <td :class="{'defectfront':row.f_plan_total==row.f_user_number}" style="text-align:center">{{row.f_plan_total}}</td>
146
- <td :class="{'defectfront':row.f_plan_total==row.f_user_number}" style="text-align:center">{{row.f_weijian+row.f_buyu+row.f_jujian}}</td>
155
+ <td :class="{'defectfront':row.f_plan_total==row.f_user_number}" style="text-align:center">{{row.f_weijian+row.f_buyu+row.f_jujian+row.f_jiguangjianlou+row.f_liganbaoya+row.f_shiwaiguanfa}}</td>
147
156
  <!--<td :class="{'defectfront':row.f_plan_total==row.f_user_number}" style="text-align:center">{{row.f_yijian}}</td>-->
148
157
  <td :class="{'defectfront':row.f_plan_total==row.f_user_number}" style="text-align:center"><nobr>{{row.f_ruhu}}</nobr></td>
149
158
  <td :class="{'defectfront':row.f_plan_total==row.f_user_number}" style="text-align:center"><nobr>{{row.f_buyu}}</nobr></td>
159
+ <td :class="{'defectfront':row.f_plan_total==row.f_user_number}" style="text-align:center"><nobr>{{row.f_jiguangjianlou}}</nobr></td>
160
+ <td :class="{'defectfront':row.f_plan_total==row.f_user_number}" style="text-align:center"><nobr>{{row.f_liganbaoya}}</nobr></td>
161
+ <td :class="{'defectfront':row.f_plan_total==row.f_user_number}" style="text-align:center"><nobr>{{row.f_shiwaiguanfa}}</nobr></td>
150
162
  <td :class="{'defectfront':row.f_plan_total==row.f_user_number}" style="text-align:center">{{row.f_jujian}}</td>
151
163
  <td :class="{'defectfront':row.f_plan_total==row.f_user_number}" style="text-align:center"><nobr>{{row.f_check_bv}}</nobr></td>
152
164
  <!--<td style="text-align: center;">-->
@@ -159,10 +171,13 @@
159
171
  <td style="text-align:center"><strong>合计:</strong></td>
160
172
  <td style="text-align:center" :colspan="$parent.$parent.$parent.nameForSql.length"></td>
161
173
  <td style="text-align:center"><strong>{{model.sums.f_plan_total}}</strong></td>
162
- <td style="text-align:center"><strong>{{model.sums.f_weijian+model.sums.f_buyu+model.sums.f_jujian}}</strong></td>
174
+ <td style="text-align:center"><strong>{{model.sums.f_weijian+model.sums.f_buyu+model.sums.f_jujian+model.sums.f_jiguangjianlou+model.sums.f_liganbaoya+model.sums.f_shiwaiguanfa}}</strong></td>
163
175
  <!--<td style="text-align:center"><strong>{{model.sums.f_yijian}}</strong></td>-->
164
176
  <td style="text-align:center"><nobr><strong>{{model.sums.f_ruhu}}</strong></nobr></td>
165
177
  <td style="text-align:center"><nobr><strong>{{model.sums.f_buyu}}</strong></nobr></td>
178
+ <td style="text-align:center"><nobr><strong>{{model.sums.f_jiguangjianlou}}</strong></nobr></td>
179
+ <td style="text-align:center"><nobr><strong>{{model.sums.f_liganbaoya}}</strong></nobr></td>
180
+ <td style="text-align:center"><nobr><strong>{{model.sums.f_shiwaiguanfa}}</strong></nobr></td>
166
181
  <td style="text-align:center"><strong>{{model.sums.f_jujian}}</strong></td>
167
182
  <td style="text-align:center"><strong>{{model.sums.f_plan_total>0?(model.sums.f_ruhu/model.sums.f_plan_total*100).toFixed(2)+'%':0}}</strong></td>
168
183
  </tr >
@@ -183,7 +198,7 @@
183
198
  export default {
184
199
  data () {
185
200
  return {
186
- model: new PagedList('rs/sql/getCheckPlanAreaList', 99999,{},{f_plan_total:'',f_weijian:'',f_yijian:'',f_ruhu:'',f_buyu:'',f_jujian:''}),
201
+ model: new PagedList('rs/sql/getCheckPlanAreaList', 99999,{},{f_plan_total:'',f_weijian:'',f_yijian:'',f_ruhu:'',f_buyu:'',f_jiguangjianlou:'',f_liganbaoya:'',f_shiwaiguanfa:'',f_jujian:''}),
187
202
  // 公司下拉
188
203
  curorgid: [this.$login.f.orgid],
189
204
  row: {},
@@ -375,6 +390,9 @@
375
390
  this.model.sums.f_yijian = 0
376
391
  this.model.sums.f_ruhu = 0
377
392
  this.model.sums.f_buyu = 0
393
+ this.model.sums.f_jiguangjianlou= 0
394
+ this.model.sums.f_liganbaoya = 0
395
+ this.model.sums.f_shiwaiguanfa = 0
378
396
  this.model.sums.f_jujian = 0
379
397
  }
380
398
  }
@@ -820,7 +820,7 @@
820
820
  }
821
821
  _this.$dispatch('gotoson',pardate)
822
822
  //tag
823
- _this.$goto('safecheck-order-v', {f_plan_id: row.f_plan_id, item: row, role: 'inspect',parentPage:'CurrentCreate'}, 'self', _this.reload)
823
+ _this.$goto('safecheck-order-v', {f_plan_id: row.f_plan_id, item: row, role: 'inspect',parentPage:'CurrentCreate',openpaper:true}, 'self', _this.reload)
824
824
  }).catch ((msg)=>{
825
825
  this.$showMessage("网络异常,请检查网络后再试!")
826
826
  })
@@ -0,0 +1,132 @@
1
+ <template>
2
+ <div>
3
+ <button @click="handleClick">渲染</button>
4
+ <button @click="savePaper">保存</button>
5
+ <iframe v-if="showSketchPage" :src="sketchPageSrc" id="aaaa2" style="width: 100%; height: 500px;"></iframe>
6
+ </div>
7
+ </template>
8
+
9
+ <script>
10
+ import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
11
+
12
+ export default {
13
+ title: 'App',
14
+ data() {
15
+ return {
16
+ inputText: '',
17
+ showSketchPage: false,
18
+ sketchPageSrc: '/sketch',
19
+ sketchId: '',
20
+ title: '',
21
+ paperMessage: ''
22
+ };
23
+ },
24
+ props: {
25
+ row: ''
26
+ },
27
+ async ready() {
28
+ if (this.row) {
29
+ await new HttpResetClass().load('POST', 'rs/sql/tel_singleTable_OrderBy', {
30
+ data: {
31
+ items: 'blob', tablename: 't_blob_sketch', condition: `id = '${this.row}'`, orderitem: 'id'
32
+ }
33
+ }).then(res => {
34
+ if (res.data.length === 0) {
35
+ this.handleClick()
36
+ return
37
+ }
38
+ try {
39
+ let hex = Buffer.from(res.data[0].blob, 'hex').toString('utf8');
40
+ if (!hex.includes('{')) {
41
+ this.inputText = Buffer.from(hex, 'hex').toString('utf8');
42
+ } else {
43
+ this.inputText = hex;
44
+ }
45
+ } catch (e) {
46
+ this.$showMessage('网络异常请联系管理员')
47
+ }
48
+ this.handleClick()
49
+ })
50
+ }
51
+ },
52
+ methods: {
53
+ handleClick() {
54
+ this.showSketchPage = true;
55
+ this.$nextTick(() => {
56
+ const sketchIframe = document.getElementById('aaaa2');
57
+
58
+ window.addEventListener('message', (event) => {
59
+ if (JSON.parse(event.data.param).gadgets.length > 0) {
60
+ this.paperMessage = event.data.param;
61
+ }
62
+ });
63
+
64
+ sketchIframe.contentWindow.postMessage(this.inputText, '*');
65
+ })
66
+ },
67
+ savePaper() {
68
+ if (!this.paperMessage) {
69
+ this.$showMessage('请先点击左上角保存图标')
70
+ return
71
+ }
72
+ let param = JSON.parse(this.paperMessage)
73
+ if (!param.title) {
74
+ this.$showMessage('请填写示意图标题')
75
+ return
76
+ }
77
+ let gadgets = param.gadgets
78
+ if (gadgets.length > 0) {
79
+ var jsonString = JSON.stringify(param);
80
+ var reqdata = {
81
+ blob: Buffer.from(jsonString, 'utf8').toString('hex'),
82
+ orgid: this.$login.f.orgid,
83
+ orgname: this.$login.f.orgs,
84
+ title: param.title,
85
+ f_userinfo_id: this.row
86
+ }
87
+ new HttpResetClass().load('POST', 'rs/logic/savePaperEdit', {data: reqdata}).then(res => {
88
+ if (res.data.code === 200) {
89
+ this.$showMessage('保存成功')
90
+ } else {
91
+ this.$showMessage('保存失败')
92
+ }
93
+ })
94
+ }
95
+ },
96
+ hexToBytes(hex) {
97
+ for (var bytes = [], c = 0; c < hex.length; c += 2)
98
+ bytes.push(parseInt(hex.substring(c, 2), 16));
99
+ return new Uint8Array(bytes);
100
+ },
101
+ decodeHexStringToJSON(hexString) {
102
+ // 去除前缀 "0x"
103
+ var cleanHexString = hexString.slice(2);
104
+
105
+ // 将十六进制字符串转换为字节数组
106
+ var byteArray = this.hexToBytes(cleanHexString);
107
+
108
+ // 创建 Blob 对象
109
+ var blob = new Blob([byteArray], {type: 'application/json'});
110
+
111
+ // 读取 Blob 为文本
112
+ return new Promise(function (resolve, reject) {
113
+ var reader = new FileReader();
114
+ reader.onloadend = function () {
115
+ resolve(reader.result);
116
+ };
117
+ reader.onerror = function () {
118
+ reject(reader.error);
119
+ };
120
+ reader.readAsText(blob, 'UTF-8');
121
+ });
122
+ }
123
+ },
124
+ // beforeDestroy() {
125
+ // this.savePaper()
126
+ // }
127
+ }
128
+ </script>
129
+
130
+ <style>
131
+ /* 这里可以添加样式 */
132
+ </style>
@@ -144,7 +144,7 @@
144
144
 
145
145
  export default {
146
146
  title: '安检单',
147
- props: ['f_plan_id', 'item', 'role','parentPage','source'],
147
+ props: ['f_plan_id', 'item', 'role','parentPage','source','openpaper'],
148
148
  // props: ['f_plan_id', 'role'],
149
149
  data() {
150
150
  return {
@@ -2480,7 +2480,7 @@
2480
2480
  tittle:'安检详情',
2481
2481
  safe:true
2482
2482
  }
2483
- this.$goto('safecheck-userinfo', {userinfo:this.data}, 'repair')
2483
+ this.$goto('safecheck-userinfo', {userinfo:this.data,openpaper:this.openpaper}, 'repair')
2484
2484
  }
2485
2485
  },
2486
2486
  watch: {
@@ -14,6 +14,8 @@
14
14
  @click="history('维修记录')">维修记录</label>
15
15
  <label style="color: #00b3ee;text-decoration:none;"
16
16
  @click="history('其他收费')">其他收费</label>
17
+ <label style="color: #00b3ee;text-decoration:none;" v-if="openpaper"
18
+ @click="openPaper(userinfo.f_userinfoid)">其他收费</label>
17
19
  </p>
18
20
  </div>
19
21
  <div class="col-xs-12" style="padding: 2px 0">
@@ -271,7 +273,7 @@
271
273
 
272
274
  export default {
273
275
  title: 'SafecheckUserInfo',
274
- props: ['userinfo'],
276
+ props: ['userinfo','openpaper'],
275
277
  data () {
276
278
  return this.$parent.$parent.data
277
279
  },
@@ -308,6 +310,9 @@
308
310
  this.safecheckStateReady()
309
311
  },
310
312
  methods: {
313
+ openPaper(userinfo_id){
314
+ this.$parent.$parent.$goto('edit', {row:userinfo_id})
315
+ },
311
316
  history(val) {
312
317
  this.$dispatch('gotoson', {
313
318
  _this: this.$parent.$parent,
@@ -9,7 +9,8 @@ let specialComp = {
9
9
  'safecheck-devices': (resolve) => { require(['./android/SafecheckDevices'], resolve) },
10
10
  'PhoneUpUserinfo': (resolve) => { require(['./android/PhoneUpUserinfo'], resolve) },
11
11
  'safecheck-userinfo': (resolve) => { require(['./android/SafecheckUserInfo'], resolve) },
12
- 'safecheck-order-v': (resolve) => { require(['./android/SafecheckOrderV'], resolve) }
12
+ 'safecheck-order-v': (resolve) => { require(['./android/SafecheckOrderV'], resolve) },
13
+ 'edit': (resolve) => { require(['./android/Edit'], resolve) }
13
14
  }
14
15
 
15
16
  exports.specialComp = specialComp