apply-clients 3.5.4-88 → 3.5.4-89

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 (54) hide show
  1. package/app/src/main/java/com/example/phonechatbot/MainActivity.java +50 -0
  2. package/build/dev-server.js +15 -6
  3. package/package.json +1 -1
  4. package/src/App.vue +25 -25
  5. package/src/apply.js +137 -137
  6. package/src/components/android/AppCheckTakePic.vue +168 -168
  7. package/src/components/android/Process/AppServiceControl.vue +1755 -1755
  8. package/src/components/product/Function/Service/FunctionServiceControl.vue +497 -497
  9. package/src/components/product/MaterialsManage/MaterialsBase.vue +181 -181
  10. package/src/components/product/MaterialsManage/MaterialsManage.vue +60 -60
  11. package/src/components/product/PcZhihuanManagement.vue +160 -160
  12. package/src/components/product/ServiceView.vue +1026 -1026
  13. package/src/components/product/Supervisory/SupervisoryList.vue +452 -452
  14. package/src/filiale/baiyin/android/ByAddMaterialScience.vue +824 -824
  15. package/src/filiale/dingcheng/pc/SupervisoryList.vue +441 -441
  16. package/src/filiale/fugou/android/AppAddReplacement.vue +341 -341
  17. package/src/filiale/fugou/android/AppChargeManagement.vue +739 -739
  18. package/src/filiale/fugou/pc/AddReplacement.vue +340 -340
  19. package/src/filiale/fugou/pc/addMaterialScience.vue +481 -481
  20. package/src/filiale/fugou/pc/addressAndUserinfoManagement.vue +216 -216
  21. package/src/filiale/fugou/pc/chargeReport.vue +143 -143
  22. package/src/filiale/fugou/pc.js +15 -15
  23. package/src/filiale/gongyi/android/AppDisclosurerecord.vue +214 -214
  24. package/src/filiale/gongyi/android/AppInstallationDetails.vue +500 -500
  25. package/src/filiale/gongyi/android/AppLegacyIssues.vue +309 -309
  26. package/src/filiale/gongyi/android/AppSign.vue +170 -170
  27. package/src/filiale/gongyi/android/AppSupplementalAgreement.vue +298 -298
  28. package/src/filiale/gongyi/android.js +18 -18
  29. package/src/filiale/gongyi/pc/ApplyUpload.vue +371 -371
  30. package/src/filiale/gongyi/pc/PcAddLogs.vue +221 -221
  31. package/src/filiale/gongyi/pc/PcDisclosurerecord.vue +218 -218
  32. package/src/filiale/gongyi/pc/PcLegacyIssues.vue +309 -309
  33. package/src/filiale/gongyi/pc/SupervisoryServiceControl.vue +894 -894
  34. package/src/filiale/gongyi/pc/SupervisoryServiceView.vue +1005 -1005
  35. package/src/filiale/gongyi/pc/addMaterialScience.vue +575 -575
  36. package/src/filiale/gongyi/pc/chargeManagement.vue +765 -765
  37. package/src/filiale/gongyi/pc/supplementalAgreement.vue +277 -277
  38. package/src/filiale/gongyi/pc.js +24 -24
  39. package/src/filiale/hongda/pc/SupervisoryList.vue +422 -422
  40. package/src/filiale/jingyang/pc/SupervisoryList.vue +459 -459
  41. package/src/filiale/yangchunboneng/pc/SupervisoryList.vue +590 -590
  42. package/src/filiale/yangchunboneng/pc/SupervisoryListNew.vue +628 -628
  43. package/src/main.js +2 -1
  44. package/~/chatbot/main.py +57 -0
  45. package/application.properties +0 -4
  46. package/conf/context.xml +0 -9
  47. package/conf/server-node1.xml +0 -69
  48. package/conf/server-node2.xml +0 -69
  49. package/conf/server.xml +0 -32
  50. package/nginx.conf +0 -21
  51. package/pom.xml +0 -18
  52. package/src/test/SessionTestServlet.java +0 -69
  53. package/webapp/WEB-INF/web.xml +0 -52
  54. package/webapp/session-test.jsp +0 -59
@@ -1,341 +1,341 @@
1
- <template>
2
- <div>
3
- <data-grid :model="onetomany" class="list_area table_sy">
4
- <template partial='head'>
5
- <tr>
6
- <th class="textNoLineBreak">记录人</th>
7
- <th class="textNoLineBreak">添加日期</th>
8
- <th class="textNoLineBreak">设备</th>
9
- <th class="textNoLineBreak">内容</th>
10
- <th class="textNoLineBreak" >
11
- <button v-if="$parent.$parent.mark === 0" type="button" class="btn btn-primary" @click="$parent.$parent.openMaterialModal()">添加
12
- </button>
13
- </th>
14
- </tr>
15
- </template>
16
- <template partial='body'>
17
- <tr>
18
- <td style="text-align: center;">
19
- <nobr>{{row.f_operator}}</nobr>
20
- </td>
21
- <td style="text-align: center;">
22
- <nobr>{{row.f_operation_date}}</nobr>
23
- </td>
24
- <td style="text-align: center;">
25
- <nobr>{{row.f_content}}</nobr>
26
- </td>
27
- <td style="text-align: center;">
28
- <nobr>
29
- {{$parent.$parent.toArry(row.f_content_value)}}
30
- </nobr>
31
- </td>
32
- <td style="text-align: center;">
33
- <button v-if="$parent.$parent.mark === 0" type="button" class="button_delete button_spacing" @click="$parent.$parent.deletelogs(row)">删除
34
- </button>
35
- </td>
36
- </tr>
37
- </template>
38
- </data-grid>
39
- <modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
40
- :backdrop="false" :title="title">
41
- <header slot="modal-header" class="modal-header">
42
- <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
43
- <h4 class="modal-title">{{title}}</h4>
44
- </header>
45
- <article slot="modal-body" class="modal-body clearfix">
46
- <div class="form-group col-sm-6">
47
- <label class="col-sm-4 control-label">设备:</label>
48
- <div class="col-sm-8">
49
- <input-select
50
- class="select select_list"
51
- :value.sync="device"
52
- v-model="device"
53
- :options="logOptions"
54
- :disable="mark === 1"
55
- :valueSingle="true"></input-select>
56
- </div>
57
- </div>
58
- <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
59
- <div class="panel-body">
60
- <div class="row">
61
- <div class="form-group col-sm-6">
62
- <label class="col-sm-4 control-label">内容:</label>
63
- <div class="col-sm-8">
64
- <input-select
65
- class="select select_list"
66
- :value.sync="item.f_content"
67
- v-model="item.f_content"
68
- :options="Options"
69
- :disable="mark === 1"
70
- :valueSingle="true"></input-select>
71
- </div>
72
- </div>
73
- <div class="form-group col-sm-6">
74
- <label class="col-sm-4 control-label">值:</label>
75
- <div class="col-sm-8">
76
- <input
77
- class="form-control"
78
- v-model="item.f_content_value"
79
- :value.sync="item.f_content_value"
80
- rows="3"
81
- :readonly="mark === 1"
82
- ></input>
83
- </div>
84
- </div>
85
- <div v-if="mark !== 1 && materials.length > 1" class="form-group col-sm-12 text-center">
86
- <button type="button" class="btn btn-danger" @click="removeMaterial(i)">
87
- <i class="fa fa-minus"></i> 移除
88
- </button>
89
- </div>
90
- </div>
91
- </div>
92
- </div>
93
- <div v-if="mark !== 1" class="form-group col-sm-12 text-center">
94
- <button type="button" class="btn btn-success" @click="addMaterial()">
95
- <i class="fa fa-plus"></i> 添加
96
- </button>
97
- </div>
98
- </article>
99
- <footer slot="modal-footer" class="modal-footer">
100
- <template v-if="mark!== 1">
101
- <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addlogs()"
102
- :disabled="!$v.valid">确认
103
- </button>
104
- </template>
105
- </footer>
106
- </modal>
107
- </div>
108
- </template>
109
-
110
- <script>
111
- import {HttpResetClass} from 'vue-client'
112
- import Vue from "vue";
113
- export default {
114
- name: 'replacement',
115
- props: {
116
- selectdata: {
117
- type: Object
118
- },
119
- mark: {
120
- type: Number,
121
- default: 0
122
- }
123
- },
124
- data() {
125
- return {
126
- onetomany: {
127
- rows: []
128
- },
129
- logOptions: this.$appdata.getParam('置换设备'),
130
- Options: this.$appdata.getParam('置换内容'),
131
- device:'',
132
- title: '新增',
133
- deviceArry:[],
134
- showMaterialModal: false,
135
- materials: [
136
- {
137
-
138
- }
139
- ],
140
- meterialOptions: [],
141
- row: {},
142
- bjqChecklag:[],
143
- fmaterialname:{}
144
- }
145
- },
146
- ready() {
147
- this.getOnetoManyData()
148
- },
149
- methods: {
150
- toArry(row){
151
- //将row放进数组中
152
- if (!row) return "无";
153
- try {
154
- // 添加方括号使其成为有效的JSON数组
155
- const jsonStr = '[' + row + ']';
156
- // 尝试解析字符串为JSON数组
157
- const jsonArray = JSON.parse(jsonStr);
158
- // 将解析后的数据保存到deviceArry中
159
- this.deviceArry = jsonArray;
160
-
161
- // 格式化显示数据
162
- let result = '';
163
- for (let i = 0; i < this.deviceArry.length; i++) {
164
- const item = this.deviceArry[i];
165
- result += `${item.f_content}:${item.f_content_value}`;
166
- if (i < this.deviceArry.length - 1) {
167
- result += ',';
168
- }
169
- }
170
- return result;
171
- } catch (err) {
172
- console.error('解析JSON数据失败:', err);
173
- return "无";
174
- }
175
- },
176
- look(row){
177
- this.title = '查看'
178
- this.materials = [
179
- {
180
- id: row.id,
181
- f_log_type:row.f_log_type,
182
- f_log_content:row.f_log_content
183
- }
184
- ],
185
- this.showMaterialModal = true
186
- },
187
-
188
- changelogs(){
189
- let http = new HttpResetClass()
190
- let data = {
191
- data: {
192
- id: this.materials[0].id,
193
- f_process_id:this.selectdata.f_process_id,
194
- f_log_type:this.materials[0].f_log_type,
195
- f_log_content:this.materials[0].f_log_content,
196
- user:this.$login.f
197
- }
198
- }
199
- http.load(
200
- 'POST',
201
- `/rs/logic/addLogs`,
202
- data,
203
- {resolveMsg: '修改成功', rejectMsg: '添加失败'}
204
- ).then(res => {
205
- this.closeMaterials()
206
- })
207
- },
208
- addlogs(){
209
- let value=[]
210
- let http = new HttpResetClass()
211
- this.materials.forEach(material => {
212
- let obj={}
213
- obj.f_content=material.f_content
214
- obj.f_content_value=material.f_content_value
215
- //obj转为字符串
216
- obj = JSON.stringify(obj)
217
- value.push(obj)
218
- });
219
- let s = {
220
- f_process_id: this.selectdata.f_process_id,
221
- f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
222
- f_content_value:`${value}` ,
223
- f_content: this.device,
224
- f_operator: Vue.user.name,
225
- f_operator_id: Vue.user.id
226
- }
227
- let data = {
228
- tableName: 't_replacement',
229
- model: s
230
- }
231
- http.load(
232
- 'POST',
233
- `${this.$androidUtil.getProxyUrl()}/rs/logic/entitySingleTable`,
234
- data,
235
- {resolveMsg: null, rejectMsg: '添加失败'}
236
- ).then(res => {
237
- this.getOnetoManyData()
238
- this.showMaterialModal=false
239
- })
240
- },
241
- deletelogs(row){
242
- let http = new HttpResetClass()
243
- this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
244
- if (res === 'confirm') {
245
- let data = {
246
- tableName:'t_replacement',
247
- id:row.id
248
- }
249
- http.load(
250
- 'POST',
251
- `${this.$androidUtil.getProxyUrl()}/rs/logic/delentitySingleTable`,
252
- data,
253
- {resolveMsg: '删除成功', rejectMsg: '删除失败'}
254
- ).then(res => {
255
- this.getOnetoManyData()
256
- })
257
- }
258
- })
259
- },
260
- async getOnetoManyData () {
261
- let http = new HttpResetClass()
262
- let data = {
263
- tablename: `t_replacement`,
264
- condition: `f_process_id='${this.selectdata.f_process_id}'`
265
- }
266
- let res = await http.load(
267
- 'POST',
268
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable?aaa=123`,
269
- {data: data},
270
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
271
- )
272
- this.onetomany.rows = res.data
273
- },
274
- async openMaterialModal() {
275
- this.title = '新增'
276
- this.materials = [
277
- {
278
- f_devices: '',
279
- f_content: '',
280
- f_content_value: ''
281
- }
282
- ];
283
- this.showMaterialModal = true
284
- },
285
-
286
- closeMaterials() {
287
- this.getOnetoManyData()
288
- this.showMaterialModal = false
289
- },
290
- removeMaterial(index) {
291
- if (this.materials.length > 1) {
292
- this.materials.splice(index, 1);
293
- } else {
294
- this.$showMessage('至少需要保留一组数据');
295
- }
296
- },
297
- addMaterial() {
298
- // 获取最后一个材料的设备值,如果存在的话
299
- const lastDevice = this.materials.length > 0 ? this.materials[this.materials.length - 1].f_devices : '';
300
-
301
- this.materials.push({
302
- f_devices: lastDevice, // 复制上一个设备的值
303
- f_content: '',
304
- f_content_value: ''
305
- });
306
- },
307
- }
308
- }
309
-
310
- </script>
311
-
312
- <style scoped>
313
- .panel-info {
314
- border: 1px solid #bce8f1;
315
- margin-bottom: 15px;
316
- }
317
-
318
- .panel-heading {
319
- background-color: #d9edf7;
320
- border-bottom: 1px solid #bce8f1;
321
- color: #31708f;
322
- padding: 10px 15px;
323
- }
324
-
325
- .panel-body {
326
- padding: 15px;
327
- }
328
-
329
- .form-group {
330
- margin-bottom: 15px;
331
- }
332
-
333
- .btn-success {
334
- margin-top: 10px;
335
- }
336
-
337
- .modal-body {
338
- max-height: 500px;
339
- overflow-y: auto;
340
- }
341
- </style>
1
+ <template>
2
+ <div>
3
+ <data-grid :model="onetomany" class="list_area table_sy">
4
+ <template partial='head'>
5
+ <tr>
6
+ <th class="textNoLineBreak">记录人</th>
7
+ <th class="textNoLineBreak">添加日期</th>
8
+ <th class="textNoLineBreak">设备</th>
9
+ <th class="textNoLineBreak">内容</th>
10
+ <th class="textNoLineBreak" >
11
+ <button v-if="$parent.$parent.mark === 0" type="button" class="btn btn-primary" @click="$parent.$parent.openMaterialModal()">添加
12
+ </button>
13
+ </th>
14
+ </tr>
15
+ </template>
16
+ <template partial='body'>
17
+ <tr>
18
+ <td style="text-align: center;">
19
+ <nobr>{{row.f_operator}}</nobr>
20
+ </td>
21
+ <td style="text-align: center;">
22
+ <nobr>{{row.f_operation_date}}</nobr>
23
+ </td>
24
+ <td style="text-align: center;">
25
+ <nobr>{{row.f_content}}</nobr>
26
+ </td>
27
+ <td style="text-align: center;">
28
+ <nobr>
29
+ {{$parent.$parent.toArry(row.f_content_value)}}
30
+ </nobr>
31
+ </td>
32
+ <td style="text-align: center;">
33
+ <button v-if="$parent.$parent.mark === 0" type="button" class="button_delete button_spacing" @click="$parent.$parent.deletelogs(row)">删除
34
+ </button>
35
+ </td>
36
+ </tr>
37
+ </template>
38
+ </data-grid>
39
+ <modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
40
+ :backdrop="false" :title="title">
41
+ <header slot="modal-header" class="modal-header">
42
+ <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
43
+ <h4 class="modal-title">{{title}}</h4>
44
+ </header>
45
+ <article slot="modal-body" class="modal-body clearfix">
46
+ <div class="form-group col-sm-6">
47
+ <label class="col-sm-4 control-label">设备:</label>
48
+ <div class="col-sm-8">
49
+ <input-select
50
+ class="select select_list"
51
+ :value.sync="device"
52
+ v-model="device"
53
+ :options="logOptions"
54
+ :disable="mark === 1"
55
+ :valueSingle="true"></input-select>
56
+ </div>
57
+ </div>
58
+ <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
59
+ <div class="panel-body">
60
+ <div class="row">
61
+ <div class="form-group col-sm-6">
62
+ <label class="col-sm-4 control-label">内容:</label>
63
+ <div class="col-sm-8">
64
+ <input-select
65
+ class="select select_list"
66
+ :value.sync="item.f_content"
67
+ v-model="item.f_content"
68
+ :options="Options"
69
+ :disable="mark === 1"
70
+ :valueSingle="true"></input-select>
71
+ </div>
72
+ </div>
73
+ <div class="form-group col-sm-6">
74
+ <label class="col-sm-4 control-label">值:</label>
75
+ <div class="col-sm-8">
76
+ <input
77
+ class="form-control"
78
+ v-model="item.f_content_value"
79
+ :value.sync="item.f_content_value"
80
+ rows="3"
81
+ :readonly="mark === 1"
82
+ ></input>
83
+ </div>
84
+ </div>
85
+ <div v-if="mark !== 1 && materials.length > 1" class="form-group col-sm-12 text-center">
86
+ <button type="button" class="btn btn-danger" @click="removeMaterial(i)">
87
+ <i class="fa fa-minus"></i> 移除
88
+ </button>
89
+ </div>
90
+ </div>
91
+ </div>
92
+ </div>
93
+ <div v-if="mark !== 1" class="form-group col-sm-12 text-center">
94
+ <button type="button" class="btn btn-success" @click="addMaterial()">
95
+ <i class="fa fa-plus"></i> 添加
96
+ </button>
97
+ </div>
98
+ </article>
99
+ <footer slot="modal-footer" class="modal-footer">
100
+ <template v-if="mark!== 1">
101
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addlogs()"
102
+ :disabled="!$v.valid">确认
103
+ </button>
104
+ </template>
105
+ </footer>
106
+ </modal>
107
+ </div>
108
+ </template>
109
+
110
+ <script>
111
+ import {HttpResetClass} from 'vue-client'
112
+ import Vue from "vue";
113
+ export default {
114
+ name: 'replacement',
115
+ props: {
116
+ selectdata: {
117
+ type: Object
118
+ },
119
+ mark: {
120
+ type: Number,
121
+ default: 0
122
+ }
123
+ },
124
+ data() {
125
+ return {
126
+ onetomany: {
127
+ rows: []
128
+ },
129
+ logOptions: this.$appdata.getParam('置换设备'),
130
+ Options: this.$appdata.getParam('置换内容'),
131
+ device:'',
132
+ title: '新增',
133
+ deviceArry:[],
134
+ showMaterialModal: false,
135
+ materials: [
136
+ {
137
+
138
+ }
139
+ ],
140
+ meterialOptions: [],
141
+ row: {},
142
+ bjqChecklag:[],
143
+ fmaterialname:{}
144
+ }
145
+ },
146
+ ready() {
147
+ this.getOnetoManyData()
148
+ },
149
+ methods: {
150
+ toArry(row){
151
+ //将row放进数组中
152
+ if (!row) return "无";
153
+ try {
154
+ // 添加方括号使其成为有效的JSON数组
155
+ const jsonStr = '[' + row + ']';
156
+ // 尝试解析字符串为JSON数组
157
+ const jsonArray = JSON.parse(jsonStr);
158
+ // 将解析后的数据保存到deviceArry中
159
+ this.deviceArry = jsonArray;
160
+
161
+ // 格式化显示数据
162
+ let result = '';
163
+ for (let i = 0; i < this.deviceArry.length; i++) {
164
+ const item = this.deviceArry[i];
165
+ result += `${item.f_content}:${item.f_content_value}`;
166
+ if (i < this.deviceArry.length - 1) {
167
+ result += ',';
168
+ }
169
+ }
170
+ return result;
171
+ } catch (err) {
172
+ console.error('解析JSON数据失败:', err);
173
+ return "无";
174
+ }
175
+ },
176
+ look(row){
177
+ this.title = '查看'
178
+ this.materials = [
179
+ {
180
+ id: row.id,
181
+ f_log_type:row.f_log_type,
182
+ f_log_content:row.f_log_content
183
+ }
184
+ ],
185
+ this.showMaterialModal = true
186
+ },
187
+
188
+ changelogs(){
189
+ let http = new HttpResetClass()
190
+ let data = {
191
+ data: {
192
+ id: this.materials[0].id,
193
+ f_process_id:this.selectdata.f_process_id,
194
+ f_log_type:this.materials[0].f_log_type,
195
+ f_log_content:this.materials[0].f_log_content,
196
+ user:this.$login.f
197
+ }
198
+ }
199
+ http.load(
200
+ 'POST',
201
+ `/rs/logic/addLogs`,
202
+ data,
203
+ {resolveMsg: '修改成功', rejectMsg: '添加失败'}
204
+ ).then(res => {
205
+ this.closeMaterials()
206
+ })
207
+ },
208
+ addlogs(){
209
+ let value=[]
210
+ let http = new HttpResetClass()
211
+ this.materials.forEach(material => {
212
+ let obj={}
213
+ obj.f_content=material.f_content
214
+ obj.f_content_value=material.f_content_value
215
+ //obj转为字符串
216
+ obj = JSON.stringify(obj)
217
+ value.push(obj)
218
+ });
219
+ let s = {
220
+ f_process_id: this.selectdata.f_process_id,
221
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
222
+ f_content_value:`${value}` ,
223
+ f_content: this.device,
224
+ f_operator: Vue.user.name,
225
+ f_operator_id: Vue.user.id
226
+ }
227
+ let data = {
228
+ tableName: 't_replacement',
229
+ model: s
230
+ }
231
+ http.load(
232
+ 'POST',
233
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/entitySingleTable`,
234
+ data,
235
+ {resolveMsg: null, rejectMsg: '添加失败'}
236
+ ).then(res => {
237
+ this.getOnetoManyData()
238
+ this.showMaterialModal=false
239
+ })
240
+ },
241
+ deletelogs(row){
242
+ let http = new HttpResetClass()
243
+ this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
244
+ if (res === 'confirm') {
245
+ let data = {
246
+ tableName:'t_replacement',
247
+ id:row.id
248
+ }
249
+ http.load(
250
+ 'POST',
251
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/delentitySingleTable`,
252
+ data,
253
+ {resolveMsg: '删除成功', rejectMsg: '删除失败'}
254
+ ).then(res => {
255
+ this.getOnetoManyData()
256
+ })
257
+ }
258
+ })
259
+ },
260
+ async getOnetoManyData () {
261
+ let http = new HttpResetClass()
262
+ let data = {
263
+ tablename: `t_replacement`,
264
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
265
+ }
266
+ let res = await http.load(
267
+ 'POST',
268
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable?aaa=123`,
269
+ {data: data},
270
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
271
+ )
272
+ this.onetomany.rows = res.data
273
+ },
274
+ async openMaterialModal() {
275
+ this.title = '新增'
276
+ this.materials = [
277
+ {
278
+ f_devices: '',
279
+ f_content: '',
280
+ f_content_value: ''
281
+ }
282
+ ];
283
+ this.showMaterialModal = true
284
+ },
285
+
286
+ closeMaterials() {
287
+ this.getOnetoManyData()
288
+ this.showMaterialModal = false
289
+ },
290
+ removeMaterial(index) {
291
+ if (this.materials.length > 1) {
292
+ this.materials.splice(index, 1);
293
+ } else {
294
+ this.$showMessage('至少需要保留一组数据');
295
+ }
296
+ },
297
+ addMaterial() {
298
+ // 获取最后一个材料的设备值,如果存在的话
299
+ const lastDevice = this.materials.length > 0 ? this.materials[this.materials.length - 1].f_devices : '';
300
+
301
+ this.materials.push({
302
+ f_devices: lastDevice, // 复制上一个设备的值
303
+ f_content: '',
304
+ f_content_value: ''
305
+ });
306
+ },
307
+ }
308
+ }
309
+
310
+ </script>
311
+
312
+ <style scoped>
313
+ .panel-info {
314
+ border: 1px solid #bce8f1;
315
+ margin-bottom: 15px;
316
+ }
317
+
318
+ .panel-heading {
319
+ background-color: #d9edf7;
320
+ border-bottom: 1px solid #bce8f1;
321
+ color: #31708f;
322
+ padding: 10px 15px;
323
+ }
324
+
325
+ .panel-body {
326
+ padding: 15px;
327
+ }
328
+
329
+ .form-group {
330
+ margin-bottom: 15px;
331
+ }
332
+
333
+ .btn-success {
334
+ margin-top: 10px;
335
+ }
336
+
337
+ .modal-body {
338
+ max-height: 500px;
339
+ overflow-y: auto;
340
+ }
341
+ </style>