safecheck-client 3.0.33-134 → 3.0.33-136

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.
@@ -1,249 +1,249 @@
1
- <template>
2
- <div class="auto">
3
-
4
- <div class="auto">
5
- <criteria-paged :model="model" v-ref:paged>
6
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
7
- <div partial>
8
- <div class="row app-row">
9
- <div class="col-xs-4">
10
- <img src="../../../assets/档案信息.png" style="width: 20px;margin-bottom: 5px" alt="">
11
- <label for="f_plan_name" class="font text-left">计划名称:</label>
12
- </div>
13
- <div class="col-xs-8">
14
- <input id="f_plan_name" class="search_input input-font" v-model="model.f_plan_name"
15
- condition="f_plan_name like '%{}%'" />
16
- </div>
17
- </div>
18
- <div class="row text-center" style="margin-top: 20px;">
19
- <button type="button" class="btn btn-lg btn-font btn-color" style="width: 45%;"
20
- @click="search">查询</button>
21
- </div>
22
- <!--<div class="row app-btn">-->
23
- <!--<button class="btn btn-primary col-xs-6" type="button" @click="search"><span class="glyphicon glyphicon-search" style="margin-right: 20px;">查询</span></button>-->
24
- <!--</div>-->
25
- <div style="height:30px;"></div>
26
- </div>
27
- </criteria>
28
- <list :model="model" partial='list'>
29
- <div partial>
30
- <div class="auto app-text" style="margin-top: 5px;">
31
- <div class="panel" style="padding: 10px 10px 5px 10px;">
32
- <div class="panel-body panel-self">
33
- <div class="row">
34
- <p class="panel-title col-xs-4 text-left font">计划名称</p>
35
- <p class="panel-title col-xs-8 text-left input-font">{{ row.f_plan_name }}</p>
36
- </div>
37
- <div class="row">
38
- <p class="panel-title col-xs-4 text-left font">计划时间</p>
39
- <p class="panel-title col-xs-8 text-left input-font">{{ row.f_plan_year }}/{{ row.f_plan_month }}</p>
40
- </div>
41
- <!--<div class="row">-->
42
- <!--<p class="panel-title col-xs-4 text-left font">生成人员</p>-->
43
- <!--<p class="panel-title col-xs-8 text-left input-font">{{ row.f_create_operator }}/{{row.f_plan_month}}</p>-->
44
- <!--</div>-->
45
- <!--<div class="row">-->
46
- <!--<p class="panel-title col-xs-4 text-left font">下发人员</p>-->
47
- <!--<p class="panel-title col-xs-8 text-left input-font">{{ row.f_send_operator }}/{{row.f_plan_month}}</p>-->
48
- <!--</div>-->
49
- <div class="row text-right">
50
- <button type="button" class="btn yybtn-color"
51
- v-on:click.stop.prevent='$parent.$parent.$parent.downloadHand(row)'
52
- v-if="$parent.$parent.$parent.isDown(row)">下载</button>&nbsp;
53
- </div>
54
- </div>
55
- </div>
56
-
57
- </div>
58
- </div>
59
- </list>
60
- </criteria-paged>
61
- </div>
62
- <!--<div class="row text-center" style="margin-top: 20px;">-->
63
- <!--<button type="' 正在进行共享计划下载,请确认!' btn-lg btn-font btn-color" style="width: 45%;" @click="downHand()">共享计划下载</button>-->
64
- <!--&lt;!&ndash;<button type="button" class="btn btn-lg btn-font btn-color" style="width: 45%;" @click="database()">数据库导出</button>&ndash;&gt;-->
65
- <!--</div>-->
66
- <!-- <div class="auto" style="padding-top: 20px;" v-if='show'>
67
- <p class="text-warning" style="padding: 0 10px">正在下载抄表单...</p>
68
- </div> -->
69
- <!-- <hand-info v-if="show" :data="handinfo"></hand-info> -->
70
- <!-- <div class="auto" v-if="!show">
71
- <p class="text-warning" style="padding: 0 10px">
72
- 暂无可操作的抄表信息
73
- </p>
74
- </div> -->
75
- </div>
76
- <!-- <back-page :need-back='true' @flag="$back()"></back-page>-->
77
- </template>
78
- <script>
79
-
80
- import { PagedList,HttpResetClass } from 'vue-client'
81
-
82
- import Vue from 'vue'
83
-
84
-
85
- export default {
86
- title: '共享计划下载',
87
- data() {
88
- return {
89
- model: new PagedList(`${this.$androidUtil.getProxyUrl()}/rs/sql/getShareCheckPlan`, 5, { f_fengongsi: `'${Vue.user.orgid}'` }),
90
- checkPlanInfo: [],
91
- condition: ' and 1=1 ',
92
- localcheckPlanInfo: []
93
- }
94
- },
95
- async ready() {
96
-
97
- await this.init()
98
- this.getlocalCheckPlan()
99
- },
100
- methods: {
101
- selfSearch(args) {
102
- args.condition += this.condition
103
- this.model.search(args.condition, args.model)
104
- },
105
- async init() {
106
- this.condition = ' and 1=1 '
107
- let classes_arr = await new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {
108
- data: {
109
- items: 'name', tablename: 't_parameter', condition: `id in (select processid from t_paramvalue where name = '${Vue.user.name}') and name like '%组'`, orderitem: 'id'
110
- }
111
- })
112
- let classes_str = classes_arr.data.map(item => { return `'${item.name}'` }).join()
113
- if (classes_arr.data && classes_arr.data.length >0){
114
- this.condition += ` and ( f_class in (${classes_str}) or f_class is null)`
115
- }
116
- let outlets_arr = await new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {
117
- data: {
118
- items: 'name', tablename: 't_parameter', condition: `id in (select processid from t_paramvalue where name in (${classes_str})) and name like '%厅%'`, orderitem: 'id'
119
- }
120
- })
121
- if (outlets_arr.data && outlets_arr.data.length >0){
122
- this.condition += ` and ( f_outlets in (${outlets_arr.data.map(outlets => { return `'${outlets.name.substring(3)}'` }).join()}) or f_outlets is null )`
123
- }
124
- },
125
- reload() {
126
- //tag
127
- this.$refs.paged.loadPage(this.$refs.paged.model.pageIndex)
128
- },
129
- getlocalCheckPlan() {
130
- let value = this.$androidUtil.path({ alias: 'getLocalCheckPlan', data: {} })
131
- //tag
132
- this.localcheckPlanInfo = value.data
133
- // this.$androidUtil.path({alias: 'getLocalCheckPlan', data:{}}).then((value)=>{
134
- // //tag
135
- // this.localcheckPlanInfo = value.data
136
- // })
137
- },
138
- downloadHand(row) {
139
- HostApp.__this__ = this
140
- this.$showMessage('正在进行共享计划下载,请确认!', ['confirm', 'cancel']).then((res) => {
141
- if (res === 'confirm') {
142
- HostApp.logicWithHint({
143
- 'logic': 'DownCheckPlanInfo',
144
- 'callback': 'javascript: HostApp.__this__.downloadHandCallback()',
145
- 'data': { id: row.id },
146
- 'backresult': 1
147
- })
148
- }
149
- })
150
- },
151
- downloadHandCallback(jo) {
152
- // 安卓端
153
- //tag
154
- if (jo.state == 'ok') {
155
- let result = JSON.parse(jo.result)
156
- if (result.state == 0) {
157
- if (result.data.length > 0) {
158
- this.getlocalCheckPlan()
159
- this.$showMessage('下载成功,您可前往计划导航进行查看!')
160
- } else {
161
- this.$showMessage('无可下载的共享计划!')
162
- }
163
- } else {
164
- this.$showMessage('下载失败!')
165
- }
166
- } else {
167
- this.$showMessage('下载失败,请重试!')
168
- }
169
- }
170
- },
171
- computed: {
172
- isDown() {
173
- return function (row) {
174
- for (let info of this.localcheckPlanInfo) {
175
- if (info.id == row.id) {
176
- return false
177
- }
178
- }
179
- return true
180
- }
181
- }
182
- }
183
- }
184
- </script>
185
- <style>
186
- .bg {
187
- background-color: blue;
188
- height: 1px;
189
- border: 0;
190
- }
191
-
192
- .app-row {
193
- background-color: white;
194
- padding: 10px 10px 0 10px;
195
- border-bottom: 1px solid rgba(235, 235, 235, 0.5);
196
- }
197
-
198
- .search_input {
199
- border: 0;
200
- outline: none;
201
- }
202
-
203
- .font {
204
- font: 15px PingFang-SC-Medium;
205
- color: #666666;
206
- }
207
-
208
- .input-font {
209
- font: 15px PingFang-SC-Medium;
210
- color: #333333;
211
- }
212
-
213
- .btn-font {
214
- font: 600 16px PingFang-SC-Bold;
215
- color: #499EDF;
216
- }
217
-
218
- .btn-color {
219
- background-color: #FFFFFF;
220
- border-radius: 10px;
221
- border: 1px solid #499EDF;
222
- }
223
-
224
- .app-text {
225
- font-size: 12px;
226
- }
227
-
228
- .panel-self {
229
- border-radius: 10px;
230
- border: 1px solid #499EDF;
231
- background-color: #F8F8F8;
232
- }
233
-
234
- .yybtn-color {
235
- background-color: #499edf;
236
- border-radius: 4px;
237
- border: 1px solid #499EDF;
238
- color: #FFFFFF;
239
- font: 14px PingFang-SC-Bold;
240
- }
241
-
242
- .qxbtn-color {
243
- background-color: #FFFFFF;
244
- border-radius: 4px;
245
- color: #499edf;
246
- font: 14px PingFang-SC-Bold;
247
- border: 1px solid #499EDF;
248
- }
249
- </style>
1
+ <template>
2
+ <div class="auto">
3
+
4
+ <div class="auto">
5
+ <criteria-paged :model="model" v-ref:paged>
6
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
7
+ <div partial>
8
+ <div class="row app-row">
9
+ <div class="col-xs-4">
10
+ <img src="../../../assets/档案信息.png" style="width: 20px;margin-bottom: 5px" alt="">
11
+ <label for="f_plan_name" class="font text-left">计划名称:</label>
12
+ </div>
13
+ <div class="col-xs-8">
14
+ <input id="f_plan_name" class="search_input input-font" v-model="model.f_plan_name"
15
+ condition="f_plan_name like '%{}%'" />
16
+ </div>
17
+ </div>
18
+ <div class="row text-center" style="margin-top: 20px;">
19
+ <button type="button" class="btn btn-lg btn-font btn-color" style="width: 45%;"
20
+ @click="search">查询</button>
21
+ </div>
22
+ <!--<div class="row app-btn">-->
23
+ <!--<button class="btn btn-primary col-xs-6" type="button" @click="search"><span class="glyphicon glyphicon-search" style="margin-right: 20px;">查询</span></button>-->
24
+ <!--</div>-->
25
+ <div style="height:30px;"></div>
26
+ </div>
27
+ </criteria>
28
+ <list :model="model" partial='list'>
29
+ <div partial>
30
+ <div class="auto app-text" style="margin-top: 5px;">
31
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
32
+ <div class="panel-body panel-self">
33
+ <div class="row">
34
+ <p class="panel-title col-xs-4 text-left font">计划名称</p>
35
+ <p class="panel-title col-xs-8 text-left input-font">{{ row.f_plan_name }}</p>
36
+ </div>
37
+ <div class="row">
38
+ <p class="panel-title col-xs-4 text-left font">计划时间</p>
39
+ <p class="panel-title col-xs-8 text-left input-font">{{ row.f_plan_year }}/{{ row.f_plan_month }}</p>
40
+ </div>
41
+ <!--<div class="row">-->
42
+ <!--<p class="panel-title col-xs-4 text-left font">生成人员</p>-->
43
+ <!--<p class="panel-title col-xs-8 text-left input-font">{{ row.f_create_operator }}/{{row.f_plan_month}}</p>-->
44
+ <!--</div>-->
45
+ <!--<div class="row">-->
46
+ <!--<p class="panel-title col-xs-4 text-left font">下发人员</p>-->
47
+ <!--<p class="panel-title col-xs-8 text-left input-font">{{ row.f_send_operator }}/{{row.f_plan_month}}</p>-->
48
+ <!--</div>-->
49
+ <div class="row text-right">
50
+ <button type="button" class="btn yybtn-color"
51
+ v-on:click.stop.prevent='$parent.$parent.$parent.downloadHand(row)'
52
+ v-if="$parent.$parent.$parent.isDown(row)">下载</button>&nbsp;
53
+ </div>
54
+ </div>
55
+ </div>
56
+
57
+ </div>
58
+ </div>
59
+ </list>
60
+ </criteria-paged>
61
+ </div>
62
+ <!--<div class="row text-center" style="margin-top: 20px;">-->
63
+ <!--<button type="' 正在进行共享计划下载,请确认!' btn-lg btn-font btn-color" style="width: 45%;" @click="downHand()">共享计划下载</button>-->
64
+ <!--&lt;!&ndash;<button type="button" class="btn btn-lg btn-font btn-color" style="width: 45%;" @click="database()">数据库导出</button>&ndash;&gt;-->
65
+ <!--</div>-->
66
+ <!-- <div class="auto" style="padding-top: 20px;" v-if='show'>
67
+ <p class="text-warning" style="padding: 0 10px">正在下载抄表单...</p>
68
+ </div> -->
69
+ <!-- <hand-info v-if="show" :data="handinfo"></hand-info> -->
70
+ <!-- <div class="auto" v-if="!show">
71
+ <p class="text-warning" style="padding: 0 10px">
72
+ 暂无可操作的抄表信息
73
+ </p>
74
+ </div> -->
75
+ </div>
76
+ <!-- <back-page :need-back='true' @flag="$back()"></back-page>-->
77
+ </template>
78
+ <script>
79
+
80
+ import { PagedList,HttpResetClass } from 'vue-client'
81
+
82
+ import Vue from 'vue'
83
+
84
+
85
+ export default {
86
+ title: '共享计划下载',
87
+ data() {
88
+ return {
89
+ model: new PagedList(`${this.$androidUtil.getProxyUrl()}/rs/sql/getShareCheckPlan`, 5, { f_fengongsi: `'${Vue.user.orgid}'` }),
90
+ checkPlanInfo: [],
91
+ condition: ' and 1=1 ',
92
+ localcheckPlanInfo: []
93
+ }
94
+ },
95
+ async ready() {
96
+
97
+ await this.init()
98
+ this.getlocalCheckPlan()
99
+ },
100
+ methods: {
101
+ selfSearch(args) {
102
+ args.condition += this.condition
103
+ this.model.search(args.condition, args.model)
104
+ },
105
+ async init() {
106
+ this.condition = ' and 1=1 '
107
+ let classes_arr = await new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {
108
+ data: {
109
+ items: 'name', tablename: 't_parameter', condition: `id in (select processid from t_paramvalue where name = '${Vue.user.name}') and name like '%组'`, orderitem: 'id'
110
+ }
111
+ })
112
+ let classes_str = classes_arr.data.map(item => { return `'${item.name}'` }).join()
113
+ if (classes_arr.data && classes_arr.data.length >0){
114
+ this.condition += ` and ( f_class in (${classes_str}) or f_class is null)`
115
+ }
116
+ let outlets_arr = await new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {
117
+ data: {
118
+ items: 'name', tablename: 't_parameter', condition: `id in (select processid from t_paramvalue where name in (${classes_str})) and name like '%厅%'`, orderitem: 'id'
119
+ }
120
+ })
121
+ if (outlets_arr.data && outlets_arr.data.length >0){
122
+ this.condition += ` and ( f_outlets in (${outlets_arr.data.map(outlets => { return `'${outlets.name.substring(3)}'` }).join()}) or f_outlets is null )`
123
+ }
124
+ },
125
+ reload() {
126
+ //tag
127
+ this.$refs.paged.loadPage(this.$refs.paged.model.pageIndex)
128
+ },
129
+ getlocalCheckPlan() {
130
+ let value = this.$androidUtil.path({ alias: 'getLocalCheckPlan', data: {} })
131
+ //tag
132
+ this.localcheckPlanInfo = value.data
133
+ // this.$androidUtil.path({alias: 'getLocalCheckPlan', data:{}}).then((value)=>{
134
+ // //tag
135
+ // this.localcheckPlanInfo = value.data
136
+ // })
137
+ },
138
+ downloadHand(row) {
139
+ HostApp.__this__ = this
140
+ this.$showMessage('正在进行共享计划下载,请确认!', ['confirm', 'cancel']).then((res) => {
141
+ if (res === 'confirm') {
142
+ HostApp.logicWithHint({
143
+ 'logic': 'DownCheckPlanInfo',
144
+ 'callback': 'javascript: HostApp.__this__.downloadHandCallback()',
145
+ 'data': { id: row.id },
146
+ 'backresult': 1
147
+ })
148
+ }
149
+ })
150
+ },
151
+ downloadHandCallback(jo) {
152
+ // 安卓端
153
+ //tag
154
+ if (jo.state == 'ok') {
155
+ let result = JSON.parse(jo.result)
156
+ if (result.state == 0) {
157
+ if (result.data.length > 0) {
158
+ this.getlocalCheckPlan()
159
+ this.$showMessage('下载成功,您可前往计划导航进行查看!')
160
+ } else {
161
+ this.$showMessage('无可下载的共享计划!')
162
+ }
163
+ } else {
164
+ this.$showMessage('下载失败!')
165
+ }
166
+ } else {
167
+ this.$showMessage('下载失败,请重试!')
168
+ }
169
+ }
170
+ },
171
+ computed: {
172
+ isDown() {
173
+ return function (row) {
174
+ for (let info of this.localcheckPlanInfo) {
175
+ if (info.id == row.id) {
176
+ return false
177
+ }
178
+ }
179
+ return true
180
+ }
181
+ }
182
+ }
183
+ }
184
+ </script>
185
+ <style>
186
+ .bg {
187
+ background-color: blue;
188
+ height: 1px;
189
+ border: 0;
190
+ }
191
+
192
+ .app-row {
193
+ background-color: white;
194
+ padding: 10px 10px 0 10px;
195
+ border-bottom: 1px solid rgba(235, 235, 235, 0.5);
196
+ }
197
+
198
+ .search_input {
199
+ border: 0;
200
+ outline: none;
201
+ }
202
+
203
+ .font {
204
+ font: 15px PingFang-SC-Medium;
205
+ color: #666666;
206
+ }
207
+
208
+ .input-font {
209
+ font: 15px PingFang-SC-Medium;
210
+ color: #333333;
211
+ }
212
+
213
+ .btn-font {
214
+ font: 600 16px PingFang-SC-Bold;
215
+ color: #499EDF;
216
+ }
217
+
218
+ .btn-color {
219
+ background-color: #FFFFFF;
220
+ border-radius: 10px;
221
+ border: 1px solid #499EDF;
222
+ }
223
+
224
+ .app-text {
225
+ font-size: 12px;
226
+ }
227
+
228
+ .panel-self {
229
+ border-radius: 10px;
230
+ border: 1px solid #499EDF;
231
+ background-color: #F8F8F8;
232
+ }
233
+
234
+ .yybtn-color {
235
+ background-color: #499edf;
236
+ border-radius: 4px;
237
+ border: 1px solid #499EDF;
238
+ color: #FFFFFF;
239
+ font: 14px PingFang-SC-Bold;
240
+ }
241
+
242
+ .qxbtn-color {
243
+ background-color: #FFFFFF;
244
+ border-radius: 4px;
245
+ color: #499edf;
246
+ font: 14px PingFang-SC-Bold;
247
+ border: 1px solid #499EDF;
248
+ }
249
+ </style>