apply-clients 3.3.94-5 → 3.3.94-7

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.3.94-5",
3
+ "version": "3.3.94-7",
4
4
  "description": "报建前端模块",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -1,331 +1,332 @@
1
- <template>
2
- <div>
3
- <div class="col-sm-12 col-xs-12 form-group app-btn">
4
- <button
5
- :class="onetomany.add.class || 'btn btn-info'"
6
- @click.prevent="openAdd()"
7
- v-if="!onetomany.add.hidden"
8
- :style="onetomany.add.style || ''">
9
- {{ onetomany.add.text || '添加'}}
10
- </button>
11
- </div>
12
- <div class="col-sm-12 col-xs-12">
13
- <list :model="onetomany" partial='list'>
14
- <div partial class="auto app-text panel">
15
- <div class="panel-body panel-self">
16
- <div class="row" v-for="field in $parent.$parent.onetomany.fields" v-if="!field.displayPosition || field.displayPosition === 'list'">
17
- <p class="col-xs-3 text-left font label-justify"><b>{{ field.label }}</b></p>
18
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row[field.field] }}</p>
19
- </div>
20
- <div class="row text-right" v-if="!$parent.$parent.onetomany.hiddenOperate">
21
- <button
22
- :class="$parent.$parent.onetomany.update.style || 'btn btn-warning'"
23
- @click.prevent="$parent.$parent.openUpdate($index)"
24
- v-if="!$parent.$parent.onetomany.update.hidden"
25
- :style="$parent.$parent.onetomany.update.style || ''">
26
- {{ $parent.$parent.onetomany.update.text || '修改'}}
27
- </button>
28
- <button
29
- :class="$parent.$parent.onetomany.delete.style || 'btn btn-danger'"
30
- @click.prevent="$parent.$parent.openDelete($index)"
31
- v-if="!$parent.$parent.onetomany.delete.hidden"
32
- :style="$parent.$parent.onetomany.delete.style || ''">
33
- {{ $parent.$parent.onetomany.delete.text || '删除'}}
34
- </button>
35
- </div>
36
- </div>
37
- </div>
38
- </list>
39
- </div>
40
-
41
-
42
- <!-- onetomany模态框 -->
43
- <modal v-if="showModal" :show.sync="showModal" backdrop="false" :large="onetomany.modalSize === 'large' ? true : false" :small="onetomany.modalSize === 'small' ? true : false">
44
- <header slot="modal-header" class="modal-header">
45
- <button type="button" class="close" @click="closeModal()"><span>&times;</span></button>
46
- <span class="modal-title"><font
47
- size="3">{{modelTitle}}</font></span>
48
- </header>
49
- <article slot="modal-body" class="modal-body clearfix">
50
- <div v-for="(index,item) in onetomany.fields">
51
- <!--input-->
52
- <div :style="item.style ? item.style : ''"
53
- v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'app' || !item.device)"
54
- :class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped ? item.bootstraped + ' form-group app-input':'col-xs-12 form-group app-input']">
55
- <label class="control-label-justify">{{item.label}}</label>
56
- <div :style="item.value_style ? item.value_style:''"
57
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
58
- <input class="" style="width: 100%"
59
- :type="item.type"
60
- v-model="onetomany.fields[index].value"
61
- :placeholder="item.placeholder"
62
- :value="onetomany.fields[index].value"
63
- :readonly="item.readonly"
64
- :disabled="item.disabled"
65
- @change="onchange(index)"
66
- @blur="onblur(index)"
67
- @input="oninput(index)"
68
- />
69
- </div>
70
- </div>
71
-
72
- <!--select-->
73
- <div :style="item.style ? item.style : ''"
74
- v-if="item.type==='select' && !item.hidden && (item.device === 'app' || !item.device)"
75
- :class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped ? item.bootstraped + ' form-group app-input':'col-xs-12 form-group app-input']">
76
- <label class="control-label-justify">{{item.label}}</label>
77
- <div :style="item.value_style ? item.value_style:''"
78
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
79
- <v-select
80
- class="select" width="100%" align="right"
81
- :placeholder="item.placeholder"
82
- :search="item.search"
83
- close-on-select value-single
84
- :options="item.options"
85
- v-model="onetomany.fields[index].value"
86
- :value.sync="onetomany.fields[index].value"
87
- :readonly="item.readonly"
88
- :disabled="item.disabled"
89
- @blur="onblur(index)"
90
- @change="onchange(index)"
91
- ></v-select>
92
- </div>
93
- </div>
94
-
95
- <!--时间datepicker-->
96
- <div :style="item.style ? item.style : ''"
97
- v-if="item.type==='datepicker' && !item.hidden && (item.device === 'app' || !item.device)"
98
- :class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped ? item.bootstraped+' form-group app-input':'col-xs-12 form-group app-input']">
99
- <label class="control-label-justify">{{item.label}}</label>
100
- <div :style="item.value_style ? item.value_style:''"
101
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
102
- <datepicker
103
- :placeholder="item.placeholder"
104
- :value.sync="onetomany.fields[index].value"
105
- :format="item.format ? item.format : 'yyyy-MM-dd'"
106
- v-model="onetomany.fields[index].value"
107
- :readonly="item.readonly"
108
- :disabled="item.disabled"
109
- @change="onchange(index)"
110
- @blur="onblur(index)"
111
- :show-reset-button="true">
112
- </datepicker>
113
- </div>
114
- </div>
115
-
116
- <!--textarea-->
117
- <div :style="item.style ? item.style : ''"
118
- v-if="item.type==='textarea' && !item.hidden && (item.device === 'app' || !item.device)"
119
- :class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped?item.bootstraped+' form-group app-input':'col-xs-12 form-group app-input']">
120
- <label class="control-label-justify">{{item.label}}</label>
121
- <div :style="item.value_style ? item.value_style:''"
122
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
123
- <textarea
124
- :readonly="item.readonly"
125
- :disabled="item.disabled"
126
- class="" rows="1"
127
- style="width: 100%;height: 100%"
128
- v-model="onetomany.fields[index].value"
129
- :value="onetomany.fields[index].value"
130
- @change="onchange(index)"
131
- @blur="onblur(index)"
132
- @input="oninput(index)"
133
- ></textarea>
134
- </div>
135
- </div>
136
- </div>
137
- </article>
138
- <footer slot="modal-footer" class="modal-footer">
139
- <button :class="disableButton?'btn btn-default':'btn btn-primary'"
140
- :disabled="disableButton" type="button" @click.prevent="confirmModal()">
141
- 确认
142
- </button>
143
- </footer>
144
- </modal>
145
- </div>
146
- </template>
147
-
148
- <script>
149
- import {HttpResetClass} from 'vue-client'
150
- import {guid, toStandardTimeString} from '../Util'
151
- import Vue from 'vue'
152
- export default {
153
- title: 'onetomany',
154
- props: ['onetomany', 'index','selectdata'],
155
- data () {
156
- return {
157
- showModal: false,
158
- disableButton: true,
159
- modelTitle: null,
160
- rowIndex: null
161
- }
162
- },
163
- ready () {
164
- },
165
- methods: {
166
- async confirmModal () {
167
- //报警器设备型号校验
168
- if (this.selectdata.f_apply_type === '报警器报建') {
169
- let data = {
170
- f_material_name: "",
171
- f_bjq_sid: "",
172
- }
173
- this.onetomany.fields.forEach(item => {
174
- if (item.label === '材料编号') {
175
- data.f_bjq_sid = item.value
176
- }
177
- if (item.label === '材料名称') {
178
- data.f_material_name = item.value
179
- }
180
- })
181
- if (data.f_material_name.substr(0, 3) === '报警器') {
182
- let res = await this.$resetpost(
183
- `${this.$androidUtil.getProxyUrl()}/ncc/rs/logic/bjqcheck`,
184
- // `ncc/rs/logic/bjqcheck`,
185
- // `/rs/logic/bjqcheck`,
186
- data
187
- )
188
- if (res.data.code != 200) {
189
- this.disableButton = true
190
- this.$showMessage(res.data.msg)
191
- return
192
- }
193
- }
194
- }
195
-
196
- if (this.modelTitle === '新增') {
197
- if (this.onetomany.add.event) {
198
- this.$dispatch(this.onetomany.add.event, this.index)
199
- } else {
200
- this.$dispatch('onetomanyadd', this.index)
201
- }
202
- this.closeModal()
203
- }
204
- if (this.modelTitle === '修改') {
205
- if (this.onetomany.update.event) {
206
- this.$dispatch(this.onetomany.update.event, this.index, this.rowIndex)
207
- } else {
208
- this.$dispatch('onetomanyupdate', this.index, this.rowIndex)
209
- }
210
- this.closeModal()
211
- }
212
- // this.closeModal()
213
- },
214
- onchange (fieldIndex) {
215
- this.disableModalButton()
216
- if (this.onetomany.fields[fieldIndex].onchange) {
217
- this.$dispatch(this.onetomany.fields[fieldIndex].onchange, this.index, fieldIndex)
218
- } else {
219
- this.$dispatch('onchangeModal', this.index, fieldIndex)
220
- }
221
- },
222
- onblur (fieldIndex) {
223
- this.disableModalButton()
224
- if (this.onetomany.fields[fieldIndex].onblur) {
225
- this.$dispatch(this.onetomany.fields[fieldIndex].onblur, this.index, fieldIndex)
226
- } else {
227
- this.$dispatch('onblurModal', this.index, fieldIndex)
228
- }
229
- },
230
- oninput (fieldIndex) {
231
- this.disableModalButton()
232
- if (this.onetomany.fields[fieldIndex].oninput) {
233
- this.$dispatch(this.onetomany.fields[fieldIndex].oninput, this.index, fieldIndex)
234
- } else {
235
- this.$dispatch('oninputModal', this.index, fieldIndex)
236
- }
237
- },
238
- openDelete (rowIndex) {
239
- this.$showMessage(this.onetomany.delete.message ? this.onetomany.delete.message : '您确定要删除这条记录吗?', ['confirm']).then((res) => {
240
- if (res === 'confirm') {
241
- if (this.onetomany.delete.event) {
242
- this.$dispatch(this.onetomany.delete.event, this.index, rowIndex)
243
- } else {
244
- this.$dispatch('onetomanydelete', this.index, rowIndex)
245
- }
246
- }
247
- })
248
- },
249
- // 修改
250
- openUpdate (rowIndex) {
251
- let row = this.onetomany.rows[rowIndex]
252
- for (const item of this.onetomany.fields) {
253
- item.value = row[item.field]
254
- }
255
-
256
- this.disableModalButton()
257
-
258
- this.modelTitle = '修改'
259
- this.rowIndex = rowIndex
260
-
261
- if (this.onetomany.update.openEvent) {
262
- this.$dispatch(this.onetomany.update.openEvent, this.index, this.rowIndex)
263
- }
264
- this.$dispatch('openUpdateModel', this.index, this.rowIndex)
265
-
266
- this.showModal = true
267
- },
268
- openAdd () {
269
- this.disableModalButton()
270
- this.modelTitle = '新增'
271
-
272
- if (this.onetomany.add.openEvent) {
273
- this.$dispatch(this.onetomany.add.openEvent, this.index)
274
- }
275
- this.$dispatch('openAddModel', this.index)
276
-
277
- this.showModal = true
278
- },
279
- closeModal () {
280
- this.showModal = false
281
- this.disableButton = false
282
- this.modelTitle = null
283
- this.rowIndex = null
284
-
285
- for (const item of this.onetomany.fields) {
286
- item.value = null
287
- }
288
- },
289
- // 是否禁用按钮
290
- disableModalButton () {
291
- let flag = false
292
-
293
- for (const field of this.onetomany.fields) {
294
- if (field.required && !field.value && !field.hidden && field.value !== 0) {
295
- flag = true
296
- }
297
- }
298
-
299
- this.disableButton = flag
300
- }
301
- },
302
- computed: {
303
- },
304
- events: {
305
- }
306
- }
307
- </script>
308
-
309
- <style scoped>
310
- .control-label-justify {
311
- width: 30%;
312
- text-align: justify;
313
- text-align-last: justify;
314
- font-family: PingFang-SC-Bold;
315
- float: left;
316
- }
317
- .label-justify {
318
- text-align: justify;
319
- text-align-last: justify;
320
- float: left;
321
- }
322
- .panel-self{
323
- border-radius: 10px;
324
- border:1px solid #499EDF;
325
- background-color: #F8F8F8;
326
- }
327
- .font{
328
- font: 15px PingFang-SC-Medium;
329
- color: #666666;
330
- }
331
- </style>
1
+ <template>
2
+ <div>
3
+ <div class="col-sm-12 col-xs-12 form-group app-btn">
4
+ <button
5
+ :class="onetomany.add.class || 'btn btn-info'"
6
+ @click.prevent="openAdd()"
7
+ v-if="!onetomany.add.hidden"
8
+ :style="onetomany.add.style || ''">
9
+ {{ onetomany.add.text || '添加'}}
10
+ </button>
11
+ </div>
12
+ <div class="col-sm-12 col-xs-12">
13
+ <list :model="onetomany" partial='list'>
14
+ <div partial class="auto app-text panel">
15
+ <div class="panel-body panel-self">
16
+ <div class="row" v-for="field in $parent.$parent.onetomany.fields" v-if="!field.displayPosition || field.displayPosition === 'list'">
17
+ <p class="col-xs-3 text-left font label-justify"><b>{{ field.label }}</b></p>
18
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row[field.field] }}</p>
19
+ </div>
20
+ <div class="row text-right" v-if="!$parent.$parent.onetomany.hiddenOperate">
21
+ <button
22
+ :class="$parent.$parent.onetomany.update.style || 'btn btn-warning'"
23
+ @click.prevent="$parent.$parent.openUpdate($index)"
24
+ v-if="!$parent.$parent.onetomany.update.hidden"
25
+ :style="$parent.$parent.onetomany.update.style || ''">
26
+ {{ $parent.$parent.onetomany.update.text || '修改'}}
27
+ </button>
28
+ <button
29
+ :class="$parent.$parent.onetomany.delete.style || 'btn btn-danger'"
30
+ @click.prevent="$parent.$parent.openDelete($index)"
31
+ v-if="!$parent.$parent.onetomany.delete.hidden"
32
+ :style="$parent.$parent.onetomany.delete.style || ''">
33
+ {{ $parent.$parent.onetomany.delete.text || '删除'}}
34
+ </button>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ </list>
39
+ </div>
40
+
41
+
42
+ <!-- onetomany模态框 -->
43
+ <modal v-if="showModal" :show.sync="showModal" backdrop="false" :large="onetomany.modalSize === 'large' ? true : false" :small="onetomany.modalSize === 'small' ? true : false">
44
+ <header slot="modal-header" class="modal-header">
45
+ <button type="button" class="close" @click="closeModal()"><span>&times;</span></button>
46
+ <span class="modal-title"><font
47
+ size="3">{{modelTitle}}</font></span>
48
+ </header>
49
+ <article slot="modal-body" class="modal-body clearfix">
50
+ <div v-for="(index,item) in onetomany.fields">
51
+ <!--input-->
52
+ <div :style="item.style ? item.style : ''"
53
+ v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'app' || !item.device)"
54
+ :class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped ? item.bootstraped + ' form-group app-input':'col-xs-12 form-group app-input']">
55
+ <label class="control-label-justify">{{item.label}}</label>
56
+ <div :style="item.value_style ? item.value_style:''"
57
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
58
+ <input class="" style="width: 100%"
59
+ :type="item.type"
60
+ v-model="onetomany.fields[index].value"
61
+ :placeholder="item.placeholder"
62
+ :value="onetomany.fields[index].value"
63
+ :readonly="item.readonly"
64
+ :disabled="item.disabled"
65
+ @change="onchange(index)"
66
+ @blur="onblur(index)"
67
+ @input="oninput(index)"
68
+ />
69
+ </div>
70
+ </div>
71
+
72
+ <!--select-->
73
+ <div :style="item.style ? item.style : ''"
74
+ v-if="item.type==='select' && !item.hidden && (item.device === 'app' || !item.device)"
75
+ :class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped ? item.bootstraped + ' form-group app-input':'col-xs-12 form-group app-input']">
76
+ <label class="control-label-justify">{{item.label}}</label>
77
+ <div :style="item.value_style ? item.value_style:''"
78
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
79
+ <v-select
80
+ class="select" width="100%" align="right"
81
+ :placeholder="item.placeholder"
82
+ :search="item.search"
83
+ close-on-select value-single
84
+ :options="item.options"
85
+ v-model="onetomany.fields[index].value"
86
+ :value.sync="onetomany.fields[index].value"
87
+ :readonly="item.readonly"
88
+ :disabled="item.disabled"
89
+ @blur="onblur(index)"
90
+ @change="onchange(index)"
91
+ ></v-select>
92
+ </div>
93
+ </div>
94
+
95
+ <!--时间datepicker-->
96
+ <div :style="item.style ? item.style : ''"
97
+ v-if="item.type==='datepicker' && !item.hidden && (item.device === 'app' || !item.device)"
98
+ :class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped ? item.bootstraped+' form-group app-input':'col-xs-12 form-group app-input']">
99
+ <label class="control-label-justify">{{item.label}}</label>
100
+ <div :style="item.value_style ? item.value_style:''"
101
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
102
+ <datepicker
103
+ :placeholder="item.placeholder"
104
+ :value.sync="onetomany.fields[index].value"
105
+ :format="item.format ? item.format : 'yyyy-MM-dd'"
106
+ v-model="onetomany.fields[index].value"
107
+ :readonly="item.readonly"
108
+ :disabled="item.disabled"
109
+ @change="onchange(index)"
110
+ @blur="onblur(index)"
111
+ :show-reset-button="true">
112
+ </datepicker>
113
+ </div>
114
+ </div>
115
+
116
+ <!--textarea-->
117
+ <div :style="item.style ? item.style : ''"
118
+ v-if="item.type==='textarea' && !item.hidden && (item.device === 'app' || !item.device)"
119
+ :class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped?item.bootstraped+' form-group app-input':'col-xs-12 form-group app-input']">
120
+ <label class="control-label-justify">{{item.label}}</label>
121
+ <div :style="item.value_style ? item.value_style:''"
122
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
123
+ <textarea
124
+ :readonly="item.readonly"
125
+ :disabled="item.disabled"
126
+ class="" rows="1"
127
+ style="width: 100%;height: 100%"
128
+ v-model="onetomany.fields[index].value"
129
+ :value="onetomany.fields[index].value"
130
+ @change="onchange(index)"
131
+ @blur="onblur(index)"
132
+ @input="oninput(index)"
133
+ ></textarea>
134
+ </div>
135
+ </div>
136
+ </div>
137
+ </article>
138
+ <footer slot="modal-footer" class="modal-footer">
139
+ <button :class="disableButton?'btn btn-default':'btn btn-primary'"
140
+ :disabled="disableButton" type="button" @click.prevent="confirmModal()">
141
+ 确认
142
+ </button>
143
+ </footer>
144
+ </modal>
145
+ </div>
146
+ </template>
147
+
148
+ <script>
149
+ import {HttpResetClass} from 'vue-client'
150
+ import {guid, toStandardTimeString} from '../Util'
151
+ import Vue from 'vue'
152
+ export default {
153
+ title: 'onetomany',
154
+ props: ['onetomany', 'index','selectdata'],
155
+ data () {
156
+ return {
157
+ showModal: false,
158
+ disableButton: true,
159
+ modelTitle: null,
160
+ rowIndex: null
161
+ }
162
+ },
163
+ ready () {
164
+ },
165
+ methods: {
166
+ async confirmModal () {
167
+ //报警器设备型号校验
168
+ if (this.selectdata.f_apply_type === '报警器报建') {
169
+ let data = {
170
+ f_material_name: "",
171
+ f_bjq_sid: "",
172
+ }
173
+ this.onetomany.fields.forEach(item => {
174
+ if (item.label === '材料编号') {
175
+ data.f_bjq_sid = item.value
176
+ }
177
+ if (item.label === '材料名称') {
178
+ data.f_material_name = item.value
179
+ }
180
+ })
181
+ if (data.f_material_name.substr(0, 3) === '报警器') {
182
+ console.log('getorg:val=111111111')
183
+ let res = await this.$resetpost(
184
+ `${this.$androidUtil.getProxyUrl()}/ncc/rs/logic/bjqcheck`,
185
+ // `ncc/rs/logic/bjqcheck`,
186
+ // `/rs/logic/bjqcheck`,
187
+ data
188
+ )
189
+ if (res.data.code != 200) {
190
+ this.disableButton = true
191
+ this.$showMessage(res.data.msg)
192
+ return
193
+ }
194
+ }
195
+ }
196
+
197
+ if (this.modelTitle === '新增') {
198
+ if (this.onetomany.add.event) {
199
+ this.$dispatch(this.onetomany.add.event, this.index)
200
+ } else {
201
+ this.$dispatch('onetomanyadd', this.index)
202
+ }
203
+ this.closeModal()
204
+ }
205
+ if (this.modelTitle === '修改') {
206
+ if (this.onetomany.update.event) {
207
+ this.$dispatch(this.onetomany.update.event, this.index, this.rowIndex)
208
+ } else {
209
+ this.$dispatch('onetomanyupdate', this.index, this.rowIndex)
210
+ }
211
+ this.closeModal()
212
+ }
213
+ // this.closeModal()
214
+ },
215
+ onchange (fieldIndex) {
216
+ this.disableModalButton()
217
+ if (this.onetomany.fields[fieldIndex].onchange) {
218
+ this.$dispatch(this.onetomany.fields[fieldIndex].onchange, this.index, fieldIndex)
219
+ } else {
220
+ this.$dispatch('onchangeModal', this.index, fieldIndex)
221
+ }
222
+ },
223
+ onblur (fieldIndex) {
224
+ this.disableModalButton()
225
+ if (this.onetomany.fields[fieldIndex].onblur) {
226
+ this.$dispatch(this.onetomany.fields[fieldIndex].onblur, this.index, fieldIndex)
227
+ } else {
228
+ this.$dispatch('onblurModal', this.index, fieldIndex)
229
+ }
230
+ },
231
+ oninput (fieldIndex) {
232
+ this.disableModalButton()
233
+ if (this.onetomany.fields[fieldIndex].oninput) {
234
+ this.$dispatch(this.onetomany.fields[fieldIndex].oninput, this.index, fieldIndex)
235
+ } else {
236
+ this.$dispatch('oninputModal', this.index, fieldIndex)
237
+ }
238
+ },
239
+ openDelete (rowIndex) {
240
+ this.$showMessage(this.onetomany.delete.message ? this.onetomany.delete.message : '您确定要删除这条记录吗?', ['confirm']).then((res) => {
241
+ if (res === 'confirm') {
242
+ if (this.onetomany.delete.event) {
243
+ this.$dispatch(this.onetomany.delete.event, this.index, rowIndex)
244
+ } else {
245
+ this.$dispatch('onetomanydelete', this.index, rowIndex)
246
+ }
247
+ }
248
+ })
249
+ },
250
+ // 修改
251
+ openUpdate (rowIndex) {
252
+ let row = this.onetomany.rows[rowIndex]
253
+ for (const item of this.onetomany.fields) {
254
+ item.value = row[item.field]
255
+ }
256
+
257
+ this.disableModalButton()
258
+
259
+ this.modelTitle = '修改'
260
+ this.rowIndex = rowIndex
261
+
262
+ if (this.onetomany.update.openEvent) {
263
+ this.$dispatch(this.onetomany.update.openEvent, this.index, this.rowIndex)
264
+ }
265
+ this.$dispatch('openUpdateModel', this.index, this.rowIndex)
266
+
267
+ this.showModal = true
268
+ },
269
+ openAdd () {
270
+ this.disableModalButton()
271
+ this.modelTitle = '新增'
272
+
273
+ if (this.onetomany.add.openEvent) {
274
+ this.$dispatch(this.onetomany.add.openEvent, this.index)
275
+ }
276
+ this.$dispatch('openAddModel', this.index)
277
+
278
+ this.showModal = true
279
+ },
280
+ closeModal () {
281
+ this.showModal = false
282
+ this.disableButton = false
283
+ this.modelTitle = null
284
+ this.rowIndex = null
285
+
286
+ for (const item of this.onetomany.fields) {
287
+ item.value = null
288
+ }
289
+ },
290
+ // 是否禁用按钮
291
+ disableModalButton () {
292
+ let flag = false
293
+
294
+ for (const field of this.onetomany.fields) {
295
+ if (field.required && !field.value && !field.hidden && field.value !== 0) {
296
+ flag = true
297
+ }
298
+ }
299
+
300
+ this.disableButton = flag
301
+ }
302
+ },
303
+ computed: {
304
+ },
305
+ events: {
306
+ }
307
+ }
308
+ </script>
309
+
310
+ <style scoped>
311
+ .control-label-justify {
312
+ width: 30%;
313
+ text-align: justify;
314
+ text-align-last: justify;
315
+ font-family: PingFang-SC-Bold;
316
+ float: left;
317
+ }
318
+ .label-justify {
319
+ text-align: justify;
320
+ text-align-last: justify;
321
+ float: left;
322
+ }
323
+ .panel-self{
324
+ border-radius: 10px;
325
+ border:1px solid #499EDF;
326
+ background-color: #F8F8F8;
327
+ }
328
+ .font{
329
+ font: 15px PingFang-SC-Medium;
330
+ color: #666666;
331
+ }
332
+ </style>
@@ -397,11 +397,11 @@ export default {
397
397
  user: Vue.user
398
398
  // user: {"f_show_department_name":"","parentname":"营业厅","functions":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"客服系统","icon":"/images/lefticon/档案管理.png","hasright":false,"resourcetype":"function","parentid":"27","children":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"档案管理","link":"address-manage","hasright":true,"resourcetype":"function","parentid":"212","children":[],"selfid":"33664","name":"地址管理","templatename":"functionedit","id":"33663","position":"5","fullname":"资源管理.功能模块.客服系统.档案管理.地址管理","fullid":"3.21.27.212.33663","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"档案管理","link":"file-user-files","hasright":true,"resourcetype":"function","parentid":"212","children":[],"selfid":"237","name":"用户档案","templatename":"functionedit","id":"236","position":"8","fullname":"资源管理.功能模块.客服系统.档案管理.用户档案","fullid":"3.21.27.212.236","tablename":"t_function"}],"selfid":"213","name":"档案管理","templatename":"functionedit","id":"212","position":"2","fullname":"资源管理.功能模块.客服系统.档案管理","fullid":"3.21.27.212","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"客服系统","icon":"/images/lefticon/综合业务.png","hasright":false,"resourcetype":"function","parentid":"27","children":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"综合业务","link":"param-manage","hasright":true,"resourcetype":"function","parentid":"284","children":[],"selfid":"303","name":"参数管理","templatename":"functionedit","id":"302","position":"3","fullname":"资源管理.功能模块.客服系统.综合业务.参数管理","fullid":"3.21.27.284.302","tablename":"t_function"}],"selfid":"285","name":"综合业务","templatename":"functionedit","id":"284","position":"5","fullname":"资源管理.功能模块.客服系统.综合业务","fullid":"3.21.27.284","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"客服系统","icon":"/images/lefticon/报建系统.png","hasright":true,"resourcetype":"function","parentid":"27","f_parentname":"客服系统","children":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"install-function","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34680","name":"功能业务","templatename":"functionedit","id":"34679","position":"1","fullname":"资源管理.功能模块.客服系统.报建业务.功能业务","fullid":"3.21.27.34673.34679","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"exploration-user","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34686","name":"流程业务","templatename":"functionedit","id":"34685","position":"2","fullname":"资源管理.功能模块.客服系统.报建业务.流程业务","fullid":"3.21.27.34673.34685","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"supervisory-control","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34692","name":"流程监控","templatename":"functionedit","id":"34691","position":"3","fullname":"资源管理.功能模块.客服系统.报建业务.流程监控","fullid":"3.21.27.34673.34691","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"apply-charge-search","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34698","name":"收费明细","templatename":"functionedit","id":"34697","position":"4","fullname":"资源管理.功能模块.客服系统.报建业务.收费明细","fullid":"3.21.27.34673.34697","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"order-apply","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34704","name":"预约申请","templatename":"functionedit","id":"34703","position":"5","fullname":"资源管理.功能模块.客服系统.报建业务.预约申请","fullid":"3.21.27.34673.34703","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"stop-apply","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34710","name":"终止报建","templatename":"functionedit","id":"34709","position":"6","fullname":"资源管理.功能模块.客服系统.报建业务.终止报建","fullid":"3.21.27.34673.34709","tablename":"t_function"}],"selfid":"34674","name":"报建业务","templatename":"functionedit","id":"34673","position":"11","fullname":"资源管理.功能模块.客服系统.报建业务","fullid":"3.21.27.34673","tablename":"t_function"}],"qrcode":"/rs/user/getQRcode?QRCODE=406b-1630284429661-03197","rolesnames":"营业厅报装,设计部报装,市场部报装,工程部报装,运营部报装,财务部报装","roles":"34751,34757,34763,34769,34775,35326","f_sex":"男","f_icon":"tree_user","fullnames":"河南亿星集团实业有限公司.周口市天然气有限公司.营业厅.报建测试","dir":"zhoukou","userid":"406b-1630284429661-03197","accesstime":"1630409418399","parentid":"34715","f_show_rolestr":"","fullids":"30463.10101.34715.34781.","number":"10101","f_idnumber":{},"selfid":"34782","templatename":"useredit","logindate":"2021-08-30 16:36:39","id":"34781","state":"在职","tablename":"t_user","deptype":"部门","depids":"34715","loginid":"15","imgid":{},"f_user_telephone":{},"rolestr":"营业厅报装,设计部报装,市场部报装,工程部报装,运营部报装,财务部报装","deps":"营业厅","loginnum":"0","f_age":{},"resourcetype":"user","orgid":"10101","f_department_name":"营业厅","ename":"bjcs","deleted":"false","entitytype":"t_user","f_description":{},"loginip":"192.168.66.138","name":"报建测试","position":"1","orgs":"周口市天然气有限公司","f_role_name":"营业厅报装 设计部报装 市场部报装 工程部报装 运营部报装 财务部报装 ","f_allArea":[],"f_gasman":[],"lics":[]}
399
399
  }
400
- // let res = await this.$resetpost(
401
- // `${this.$androidUtil.getProxyUrl()}/rs/logic/applyAddDevice`,
402
- // {data: data},
403
- // {resolveMsg: null, rejectMsg: '设备添加失败!!!'}
404
- // )
400
+ let res = await this.$resetpost(
401
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/applyAddDevice`,
402
+ {data: data},
403
+ {resolveMsg: null, rejectMsg: '设备添加失败!!!'}
404
+ )
405
405
 
406
406
  this.closeDevices()
407
407
  this.$dispatch('breakControl')
@@ -428,17 +428,17 @@ export default {
428
428
  // tablename: 't_devices',
429
429
  condition: `f_userfiles_id = '${this.userfile.f_userfiles_id}'`
430
430
  }
431
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data:data}, {
432
- resolveMsg: null,
433
- rejectMsg: '设备查询失败!!!'
434
- })
431
+ // let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data:data}, {
432
+ // resolveMsg: null,
433
+ // rejectMsg: '设备查询失败!!!'
434
+ // })
435
435
  // let res = await this.$resetpost(
436
436
  // `${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`,
437
437
  // {data: data},
438
438
  // {resolveMsg: null, rejectMsg: '设备查询失败!!!'}
439
439
  // )
440
440
 
441
- Vue.set(this.userfile, 'devicesinfo', res.data)
441
+ // Vue.set(this.userfile, 'devicesinfo', res.data)
442
442
 
443
443
  this.showDevices = true
444
444
  },