Blame view

ant-design-vue-jeecg/src/views/system/config/LocationList.vue 20.4 KB
1
2
3
4
5
6
7
<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
唐高鑫 authored
8
            <a-form-item :label="$t('config.zoneCode')">
9
10
              <a-select
                show-search
唐高鑫 authored
11
                :placeholder="$t('config.selectZone')"
12
13
14
15
16
                v-model="queryParam.zoneCode"
              >
                <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code">
                  {{ item.name }}
                </a-select-option>
唐高鑫 authored
17
                option-filter-prop="children"
18
19
20
21
              </a-select>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
唐高鑫 authored
22
23
            <a-form-item :label="$t('config.locationCode')">
              <a-input :placeholder="$t('config.inputLocationCode')" v-model="queryParam.code"></a-input>
24
25
26
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
唐高鑫 authored
27
28
            <a-form-item :label="$t('config.containerCode')">
              <a-input :placeholder="$t('config.inputContainerCode')" v-model="queryParam.containerCode"></a-input>
29
30
31
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
唐高鑫 authored
32
33
            <a-form-item :label="$t('config.status')">
              <j-dict-select-tag :placeholder="$t('config.selectStatus')" v-model="queryParam.status" dictCode="location_status"/>
34
35
            </a-form-item>
          </a-col>
36
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
唐高鑫 authored
37
            <a-form-item :label="$t('config.locationType')">
38
39
              <a-select
                show-search
唐高鑫 authored
40
                :placeholder="$t('config.selectLocationType')"
41
42
43
44
45
46
47
48
49
50
                option-filter-prop="children"
                v-model="queryParam.locationTypeCode"
              >
                <a-select-option v-for="item in locationTypeList" :key="item.name" :value="item.code">
                  {{ item.name }}
                </a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
唐高鑫 authored
51
            <a-form-item :label="$t('config.roadway')">
pengyongcheng authored
52
              <a-input :placeholder="$t('config.inputRoadway')" v-model="queryParam.roadWay"></a-input>
53
54
55
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
谭毅彬 authored
56
            <a-form-item :label="$t('config.isthereApallet')">
57
58
              <j-dict-select-tag :placeholder="$t('config.selectIsthereApallet')" v-model="queryParam.haveContainer"
                                 dictCode="have_container_in_location"/>
59
60
            </a-form-item>
          </a-col>
肖超群 authored
61
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
谭毅彬 authored
62
63
            <a-form-item :label="$t('config.usable')">
              <j-dict-select-tag :placeholder="$t('config.selectUsable')" v-model="queryParam.enable" dictCode="enable_status"/>
肖超群 authored
64
65
            </a-form-item>
          </a-col>
66
          <template v-if="toggleSearchStatus">
肖超群 authored
67
            <a-col :xl="6" :lg="7" :md="8" :sm="24">
唐高鑫 authored
68
69
              <a-form-item :label="$t('config.iRow')">
                <a-input :placeholder="$t('config.inputIRow')" v-model="queryParam.row"></a-input>
70
71
72
              </a-form-item>
            </a-col>
            <a-col :xl="6" :lg="7" :md="8" :sm="24">
唐高鑫 authored
73
74
              <a-form-item :label="$t('config.iColumn')">
                <a-input :placeholder="$t('config.inputIColumn')" v-model="queryParam.icolumn"></a-input>
75
76
77
              </a-form-item>
            </a-col>
            <a-col :xl="6" :lg="7" :md="8" :sm="24">
唐高鑫 authored
78
79
              <a-form-item :label="$t('config.iLayer')">
                <a-input :placeholder="$t('config.inputILayer')" v-model="queryParam.layer"></a-input>
80
81
82
              </a-form-item>
            </a-col>
            <a-col :xl="6" :lg="7" :md="8" :sm="24">
唐高鑫 authored
83
              <a-form-item :label="$t('config.highLow')">
pengyongcheng authored
84
                <j-dict-select-tag :placeholder="$t('config.selectHighLow')" v-model="queryParam.high" dictCode="high_status"/>
85
86
87
              </a-form-item>
            </a-col>
            <a-col :xl="6" :lg="7" :md="8" :sm="24">
唐高鑫 authored
88
              <a-form-item :label="$t('config.rowFlag')">
唐高鑫 authored
89
                <j-dict-select-tag :placeholder="$t('config.selectRowFlag')" v-model="queryParam.rowFlag" dictCode="row_type"/>
90
91
92
93
94
              </a-form-item>
            </a-col>
          </template>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
95
96
              <a-button id="search" type="primary" @click="searchQuery" icon="search">{{ $t('button.search') }}</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('button.reset') }}</a-button>
97
              <a @click="handleToggleSearch" style="margin-left: 8px">
98
                {{ toggleSearchStatus ? $t('button.collapse') : $t('button.expand') }}
易文鹏 authored
99
                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
100
101
102
103
104
105
106
107
108
109
              </a>
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->

    <!-- 操作按钮区域 -->
    <div class="table-operator">
肖超群 authored
110
111
      <a-button @click="batchAdd()" v-has="'location:batchAdd'" type="primary" icon="plus">{{ $t('button.new') }}</a-button>
      <a-button v-has="'location:add'" @click="handleAdd" type="primary" icon="plus">{{ $t('button.bulkNew') }}</a-button>
112
      <a-button v-has="'location:export'" type="primary" icon="download" @click="handleExportXls('库位管理')">{{ $t('button.export') }}</a-button>
谭毅彬 authored
113
114
115
116
117
118
119
120
121
      <a-upload
        v-has="'location:import'"
        name="file"
        :showUploadList="false"
        :multiple="false"
        :headers="tokenHeader"
        :action="importExcelUrl"
        @change="handleImportExcel"
      >
122
        <a-button type="primary" icon="import">{{ $t('button.import') }}</a-button>
123
      </a-upload>
124
      <a-button v-has="'material:print'" @click="batchPrint()" type="primary">{{ $t('button.print') }}</a-button>
125
      <a-dropdown v-if="selectedRowKeys.length > 0">
易文鹏 authored
126
        <a-menu slot="overlay" v-has="'location:deleteBatch'">
肖超群 authored
127
          <a-menu-item key="1" @click="batchDel">
128
129
            <a-icon type="delete"/>
            {{ $t('button.delete') }}
肖超群 authored
130
          </a-menu-item>
131
        </a-menu>
132
        <a-button style="margin-left: 8px">{{ $t('button.multiSelectActions') }}
易文鹏 authored
133
          <a-icon type="down"/>
肖超群 authored
134
        </a-button>
135
      </a-dropdown>
136
137
138
      <j-super-query :fieldList="superFieldList" v-has="'location:superQuery'" @handleSuperQuery="handleSuperQuery"/>
139
140
141
142
143
    </div>

    <!-- table区域-begin -->
    <div>
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
144
145
146
        <i class="anticon anticon-info-circle ant-alert-icon"></i> {{ $t('button.selected') }}
        <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> {{ $t('button.item') }}
        <a style="margin-left: 24px" @click="onClearSelected">{{ $t('button.clearAll') }}</a>
147
148
149
150
151
      </div>

      <a-table
        ref="table"
        size="middle"
谭毅彬 authored
152
        :scroll="{ x: true }"
153
154
155
156
157
158
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
谭毅彬 authored
159
        :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
160
        class="j-table-force-nowrap"
谭毅彬 authored
161
162
        @change="handleTableChange"
      >
易文鹏 authored
163
164
165
166
167
168
169

        <span slot="rowFlag_dictText" slot-scope="rowFlag_dictText">
          <a-tag :key="rowFlag_dictText" :color="getStatusColor(rowFlag_dictText)">
            {{ rowFlag_dictText }}
          </a-tag>
        </span>
肖超群 authored
170
171
172
173
174
175
        <span slot="haveContainer_dictText" slot-scope="haveContainer_dictText">
          <a-tag :key="haveContainer_dictText" :color="getStatusColor(haveContainer_dictText)">
            {{ haveContainer_dictText }}
          </a-tag>
        </span>
易文鹏 authored
176
177
178
179
180
181
182
183
184
185
186
187
        <span slot="high_dictText" slot-scope="high_dictText">
          <a-tag :key="high_dictText" :color="getStatusColor(high_dictText)">
            {{ high_dictText }}
          </a-tag>
        </span>

        <span slot="status_dictText" slot-scope="status_dictText">
          <a-tag :key="status_dictText" :color="getStatusColor(status_dictText)">
            {{ status_dictText }}
          </a-tag>
        </span>
谭毅彬 authored
188
189
190
191
192
193
        <span slot="enable_dictText" slot-scope="enable_dictText">
          <a-tag :key="enable_dictText" :color="getStatusColor(enable_dictText)">
            {{ enable_dictText }}
          </a-tag>
        </span>
谭毅彬 authored
194
195
        <span slot="locationTypeCode" slot-scope="locationTypeCode">
          <a-tag :key="locationTypeCode" color="pink">
196
197
198
199
200
            {{ solutionLocationType(locationTypeCode) }}
          </a-tag>
        </span>

        <span slot="zoneCode" slot-scope="zoneCode">
谭毅彬 authored
201
          <a-tag :key="zoneCode" color="blue">
202
203
204
205
            {{ solutionZoneCode(zoneCode) }}
          </a-tag>
        </span>
206
207
208
209
210
        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </template>
        <template slot="imgSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
谭毅彬 authored
211
212
213
214
215
216
217
          <img
            v-else
            :src="getImgView(text)"
            height="25px"
            alt=""
            style="max-width:80px;font-size: 12px;font-style: italic;"
          />
218
219
220
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
谭毅彬 authored
221
          <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)">
222
223
224
225
226
            下载
          </a-button>
        </template>

        <span slot="action" slot-scope="text, record">
227
          <a v-has="'location:edit'" @click="handleEdit(record)">{{ $t('button.edit') }}<a-divider type="vertical"/></a>
228
          <a-dropdown>
229
            <a class="ant-dropdown-link">{{ $t('button.more') }}&nbsp;<a-icon type="down"/></a>
230
231
            <a-menu slot="overlay">
              <a-menu-item>
232
                <a @click="handleDetail(record)">{{ $t('button.details') }}</a>
233
              </a-menu-item>
易文鹏 authored
234
              <a-menu-item v-has="'location:delete'">
235
                <a-popconfirm :title="$t('button.deletingIt')" @confirm="() => handleDelete(record.id)">
236
                  <a>{{ $t('button.delete') }}</a>
237
238
239
240
241
242
243
244
245
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>
      </a-table>
    </div>

    <location-modal ref="modalForm" @ok="modalFormOk"></location-modal>
肖超群 authored
246
    <location-batch-add-modal ref="batchAddModalForm" @ok="modalFormOk"></location-batch-add-modal>
247
    <location-print-modal ref="locationPrintForm" @ok="modalFormOk"></location-print-modal>
248
249
250
251
  </a-card>
</template>

<script>
肖超群 authored
252
import '@/assets/less/TableExpand.less'
易文鹏 authored
253
254
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
肖超群 authored
255
import LocationModal from './modules/LocationModal'
256
import {getLocationTypeList, getZoneList} from '@/api/api'
谭毅彬 authored
257
import LocationBatchAddModal from './modules/LocationBatchAddModal'
肖超群 authored
258
import LocationPrintModal from './modules/LocationPrintModal'
259
肖超群 authored
260
261
262
263
264
265
266
267
268
269
export default {
  name: 'LocationList',
  mixins: [JeecgListMixin, mixinDevice],
  components: {
    LocationPrintModal,
    LocationBatchAddModal,
    LocationModal
  },
  data() {
    return {
270
      description: '库位管理页面',
肖超群 authored
271
272
      zoneList: [],
      locationTypeList: [],
273
      firstLoad: 0,
肖超群 authored
274
275
276
277
      // 表头
      columns: [
        {
          title: 'ID',
谭毅彬 authored
278
          align: 'center',
肖超群 authored
279
          dataIndex: 'id'
280
        },
肖超群 authored
281
        {
唐高鑫 authored
282
          title: this.$t('config.locationCode'),
谭毅彬 authored
283
          align: 'center',
肖超群 authored
284
285
286
          dataIndex: 'code'
        },
        {
唐高鑫 authored
287
          title: this.$t('config.containerCode'),
谭毅彬 authored
288
          align: 'center',
肖超群 authored
289
290
291
          dataIndex: 'containerCode'
        },
        {
唐高鑫 authored
292
          title: this.$t('config.status'),
谭毅彬 authored
293
          align: 'center',
谭毅彬 authored
294
          dataIndex: 'status_dictText' + this.$ls.get('language'),
曾湘平 authored
295
          scopedSlots: {customRender: 'status_dictText'},
肖超群 authored
296
297
        },
        {
唐高鑫 authored
298
          title: this.$t('config.zoneCode'),
谭毅彬 authored
299
          align: 'center',
肖超群 authored
300
301
          dataIndex: 'zoneCode',
          key: 'zoneCode',
曾湘平 authored
302
303
          scopedSlots: {customRender: 'zoneCode'},
          filterMultiple: true,
304
          filters: []
肖超群 authored
305
306
        },
        {
唐高鑫 authored
307
          title: this.$t('config.locationType'),
谭毅彬 authored
308
          align: 'center',
肖超群 authored
309
310
          dataIndex: 'locationTypeCode',
          key: 'locationTypeCode',
易文鹏 authored
311
          scopedSlots: {customRender: 'locationTypeCode'}
肖超群 authored
312
313
        },
        {
唐高鑫 authored
314
          title: this.$t('config.roadway'),
谭毅彬 authored
315
          align: 'center',
肖超群 authored
316
317
318
          dataIndex: 'roadWay'
        },
        {
唐高鑫 authored
319
          title: this.$t('config.iRow'),
谭毅彬 authored
320
          align: 'center',
肖超群 authored
321
322
323
          dataIndex: 'row'
        },
        {
唐高鑫 authored
324
          title: this.$t('config.iColumn'),
谭毅彬 authored
325
          align: 'center',
肖超群 authored
326
327
328
          dataIndex: 'icolumn'
        },
        {
唐高鑫 authored
329
          title: this.$t('config.iLayer'),
谭毅彬 authored
330
          align: 'center',
肖超群 authored
331
332
333
          dataIndex: 'layer'
        },
        {
唐高鑫 authored
334
          title: this.$t('config.highLow'),
谭毅彬 authored
335
          align: 'center',
谭毅彬 authored
336
          dataIndex: 'high_dictText' + this.$ls.get('language'),
易文鹏 authored
337
          scopedSlots: {customRender: 'high_dictText'}
肖超群 authored
338
339
        },
        {
唐高鑫 authored
340
          title: this.$t('config.rowFlag'),
谭毅彬 authored
341
          align: 'center',
谭毅彬 authored
342
          dataIndex: 'rowFlag_dictText' + this.$ls.get('language'),
易文鹏 authored
343
          scopedSlots: {customRender: 'rowFlag_dictText'}
肖超群 authored
344
345
        },
        {
唐高鑫 authored
346
          title: this.$t('config.materialAreaCode'),
谭毅彬 authored
347
          align: 'center',
肖超群 authored
348
349
350
          dataIndex: 'materialAreaCode'
        },
        {
唐高鑫 authored
351
          title: this.$t('config.isthereApallet'),
肖超群 authored
352
          align: 'center',
谭毅彬 authored
353
          dataIndex: 'haveContainer_dictText' + this.$ls.get('language'),
肖超群 authored
354
355
356
          scopedSlots: {customRender: 'haveContainer_dictText'}
        },
        {
唐高鑫 authored
357
          title: this.$t('config.usable'),
谭毅彬 authored
358
          align: 'center',
谭毅彬 authored
359
360
          dataIndex: 'enable_dictText' + this.$ls.get('language'),
          scopedSlots: {customRender: 'enable_dictText'}
肖超群 authored
361
362
        },
        {
363
          title: this.$t('system.createBy'),
谭毅彬 authored
364
          align: 'center',
肖超群 authored
365
366
367
          dataIndex: 'createBy'
        },
        {
368
          title: this.$t('system.createTime'),
谭毅彬 authored
369
          align: 'center',
肖超群 authored
370
371
372
          dataIndex: 'createTime'
        },
        {
373
          title: this.$t('system.updater'),
谭毅彬 authored
374
          align: 'center',
肖超群 authored
375
376
377
          dataIndex: 'updateBy'
        },
        {
378
          title: this.$t('system.updateTime'),
谭毅彬 authored
379
          align: 'center',
肖超群 authored
380
381
382
          dataIndex: 'updateTime'
        },
        {
383
          title: this.$t('system.options'),
肖超群 authored
384
          dataIndex: 'action',
谭毅彬 authored
385
386
          align: 'center',
          fixed: 'right',
肖超群 authored
387
          width: 147,
易文鹏 authored
388
          scopedSlots: {customRender: 'action'}
肖超群 authored
389
390
391
        }
      ],
      url: {
谭毅彬 authored
392
393
394
395
396
        list: '/config/location/list',
        delete: '/config/location/delete',
        deleteBatch: '/config/location/deleteBatch',
        exportXlsUrl: '/config/location/exportXls',
        importExcelUrl: 'config/location/importExcel'
肖超群 authored
397
      },
398
399
400
401
402
403
      /* 分页参数 */
      ipagination: {
        current: 1,
        pageSize: 10,
        pageSizeOptions: ['10', '20', '50'],
        showTotal: (total, range) => {
404
          return range[0] + '-' + range[1] + " " + this.$t('list.showing') + " " + total + " " + this.$t('list.records')
405
406
407
408
409
        },
        showQuickJumper: true,
        showSizeChanger: true,
        total: 0
      },
肖超群 authored
410
      dictOptions: {},
谭毅彬 authored
411
      superFieldList: []
肖超群 authored
412
413
414
    }
  },
  created() {
谭毅彬 authored
415
416
    this.getSuperFieldList()
    this.loadFrom()
肖超群 authored
417
  },
肖超群 authored
418
  mounted() {
419
    if (this.firstLoad == 0) {
肖超群 authored
420
421
422
423
      this.firstLoad = 1;
      return;
    }
    //页面没加载完,此时methods里的方法找不到,使用定时器模拟点击
424
425
426
    let timeSearch = setInterval(() => {
      let eleSearch = document.getElementById("search");
      if (eleSearch != null) {
肖超群 authored
427
428
429
430
        //调用成功,清除定时器
        clearInterval(timeSearch)
        eleSearch.click();
      }
431
    }, 200)
肖超群 authored
432
  },
肖超群 authored
433
  computed: {
易文鹏 authored
434
    importExcelUrl: function () {
谭毅彬 authored
435
436
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
    }
肖超群 authored
437
438
  },
  methods: {
曾湘平 authored
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
    handleTableChange(pagination, filters, sorter) {
      //分页、排序、筛选变化时触发
      if (Object.keys(sorter).length > 0) {
        this.isorter.column = sorter.field;
        this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
      }
      //这种筛选方式只支持单选
      if (filters && Object.keys(filters).length > 0 && filters.status_dictText) {
        this.filters.status = filters.status_dictText.toString();
      }
      if (filters && Object.keys(filters).length > 0 && filters.zoneCode) {
        this.filters.zoneCode = filters.zoneCode.toString();
      }
      this.ipagination = pagination;
      this.loadData();
    },
易文鹏 authored
455
456
    initDictConfig() {
    },
肖超群 authored
457
    getSuperFieldList() {
谭毅彬 authored
458
      let fieldList = []
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
      fieldList.push({type: 'string', value: 'code', text: this.$t('config.locationCode'), dictCode: ''})
      fieldList.push({type: 'string', value: 'zoneCode', text: this.$t('config.zoneCode'), dictCode: ''})
      fieldList.push({type: 'string', value: 'locationTypeCode', text: this.$t('config.locationTypeCode'), dictCode: ''})
      fieldList.push({type: 'string', value: 'containerCode', text: this.$t('config.containerCode'), dictCode: ''})
      fieldList.push({type: 'string', value: 'status', text: this.$t('config.status'), dictCode: 'location_status'})
      fieldList.push({type: 'int', value: 'roadWay', text: this.$t('config.roadway'), dictCode: ''})
      fieldList.push({type: 'int', value: 'row', text: this.$t('config.iRow'), dictCode: ''})
      fieldList.push({type: 'int', value: 'icolumn', text: this.$t('config.iColumn'), dictCode: ''})
      fieldList.push({type: 'int', value: 'layer', text: this.$t('config.iLayer'), dictCode: ''})
      //fieldList.push({type: 'int', value: 'grid', text: this.$t('config.iGrid'), dictCode: ''})
      fieldList.push({type: 'int', value: 'high', text: this.$t('config.highLow'), dictCode: ''})
      fieldList.push({type: 'int', value: 'rowFlag', text: this.$t('config.rowFlag'), dictCode: 'row_type'})
      fieldList.push({type: 'string', value: 'materialAreaCode', text: this.$t('config.materialAreaCode'), dictCode: ''})
      fieldList.push({type: 'int', value: 'enable', text: this.$t('system.enable'), dictCode: 'enable_status'})
      fieldList.push({type: 'string', value: 'createBy', text: this.$t('system.createBy'), dictCode: ''})
      fieldList.push({type: 'datetime', value: 'createTime', text: this.$t('system.createTime')})
      fieldList.push({type: 'string', value: 'updateBy', text: this.$t('system.updater'), dictCode: ''})
      fieldList.push({type: 'datetime', value: 'updateTime', text: this.$t('system.updateTime')})
肖超群 authored
477
      this.superFieldList = fieldList
478
    },
肖超群 authored
479
    loadFrom() {
谭毅彬 authored
480
      getZoneList().then(res => {
肖超群 authored
481
482
        if (res.success) {
          this.zoneList = res.result
曾湘平 authored
483
          for (let i = 0; i < res.result.length; i++) {
484
            this.columns[4].filters.push({value: res.result[i].code, text: res.result[i].name})
曾湘平 authored
485
          }
486
        }
谭毅彬 authored
487
488
      })
      getLocationTypeList().then(res => {
肖超群 authored
489
490
491
492
493
494
        if (res.success) {
          this.locationTypeList = res.result
        }
      })
    },
    batchAdd() {
谭毅彬 authored
495
496
497
      this.$refs.batchAddModalForm.add()
      this.$refs.batchAddModalForm.title = '批量新增'
      this.$refs.batchAddModalForm.disableSubmit = false
肖超群 authored
498
499
500
    },
    batchPrint() {
      if (this.selectedRowKeys.length <= 0) {
501
        this.$message.warning(`${this.$t('system.pleaseSelectARecord')}`)
谭毅彬 authored
502
        return
肖超群 authored
503
      } else {
谭毅彬 authored
504
        var ids = ''
肖超群 authored
505
        for (var a = 0; a < this.selectedRowKeys.length; a++) {
谭毅彬 authored
506
          ids += this.selectedRowKeys[a] + ','
肖超群 authored
507
        }
谭毅彬 authored
508
509
510
511
512
        window.open(
          window._CONFIG['domianURL'] + '/jmreport/view/768700106074832896/?id=' + ids,
          'newWindow',
          'toolbar=no,scrollbars=no,menubar=no,screenX=100,screenY=100'
        )
肖超群 authored
513
514
515
516
      }
    },
    solutionZoneCode(value) {
      var actions = []
谭毅彬 authored
517
518
      Object.keys(this.zoneList).some(key => {
        if (this.zoneList[key].code == '' + value) {
肖超群 authored
519
520
521
522
523
524
525
526
          actions.push(this.zoneList[key].name)
          return true
        }
      })
      return actions.join('')
    },
    solutionLocationType(value) {
      var actions = []
谭毅彬 authored
527
528
      Object.keys(this.locationTypeList).some(key => {
        if (this.locationTypeList[key].code == '' + value) {
肖超群 authored
529
530
531
532
533
          actions.push(this.locationTypeList[key].name)
          return true
        }
      })
      return actions.join('')
谭毅彬 authored
534
    }
535
  }
肖超群 authored
536
}
537
538
</script>
<style scoped>
肖超群 authored
539
@import '~@assets/less/common.less';
540
</style>