feige
2024-11-16 2697e109da871cb81936965c16c47c97635ecfb6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
<template>
  <div class="app-container" style="opacity: 1;">
 
    <el-backtop :bottom="150" :right="30">
      <el-button type="primary" circle class="el-icon-top"></el-button>
    </el-backtop>
 
 
    <h1 style="font-size:21px;padding-top:30px;display: flex;">
      <span>会议申请</span>
      <div class="button-container"></div>
      <div style="display: flex; align-items: center;">
        <!-- <el-button @click="newRequest" size="mini" type="text" v-hasPermi="['person:information:memo']" style="margin-left: 200px">
          <div class="form"><el-icon style="padding-right:100px;"></el-icon>
            <span class="text" style="width: 69px;height: 26px;font-size: 16px;
            font-family: Microsoft YaHei-Regular, Microsoft YaHei; color: #EBA4AA;">新申请</span>
          </div>
        </el-button> -->
      </div>
    </h1>
 
    <hr>
 
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
 
      <el-form-item label="时间" prop="happenTime">
        <el-date-picker
          v-model="dateRange"
          style="width: 240px;
                   height: 35px;
                   border-radius: 16px 16px 16px 16px;
                   opacity: 0.5;"
          value-format="yyyy-MM-dd HH:mm:ss"
          type="daterange"
          range-separator="-"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
        ></el-date-picker>
      </el-form-item>
      <el-form-item label="地点" prop="place" >
        <el-input
          v-model="queryParams.place"
          placeholder="请输入地点"
          clearable
          style="width: 200px;
                   height: 35px;
                   border-radius: 16px 16px 16px 16px;
                   opacity: 0.5;"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="申请部门或家庭" prop="applyApart" >
        <el-input
          v-model="queryParams.applyApart"
          placeholder="请输入申请部门或家庭"
          clearable
          style="width: 200px;
                   height: 35px;
                   border-radius: 16px 16px 16px 16px;
                   opacity: 0.5;"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <!-- <el-form-item label="申请人" prop="applyPerson" >
        <el-input
          v-model="queryParams.applyPerson"
          placeholder="请输入申请人"
          clearable
          style="width: 200px;
                   height: 35px;
                   border-radius: 16px 16px 16px 16px;
                   opacity: 0.5;"
          @keyup.enter.native="handleQuery"
        />
 
      </el-form-item> -->
 
      <el-form-item>
        <el-button  size="mini" @click="handleQuery" style=" width: 65px; height: 32px;background: #FFDDE3;
          border-radius: 6px 6px 6px 6px;opacity:1;">搜索</el-button>
        <el-button  size="mini" @click="resetQuery" style=" width: 65px;height: 32px; background: #FFDDE3;
          border-radius: 6px 6px 6px 6px;
          opacity: 1;">重置</el-button>
      </el-form-item>
    </el-form>
 
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="newRequest"
          v-hasPermi="['person:information:memo']"
        >新增</el-button>
      </el-col>
 
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['system:role:remove']"
        >删除</el-button>
 
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['family:note:export']"
        >导出</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExportTemplate"
          v-hasPermi="['family:note:export']"
        >导入模板下载</el-button>
      </el-col>
      <el-col :span="1.5">
 
        <el-upload
          action=""
 
          class="upload-demo"
          :show-file-list="false"
          :http-request="handleEnport"
        >
          <el-button size="mini"   type="primary"
                     plain
                     icon="el-icon-top">导入</el-button>
 
        </el-upload>
      </el-col>
 
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
 
 
      <el-table v-loading="loading"  border :data="meetingList" :row-key="getRowId" ref="multipleTable"
      @selection-change="handleSelectionChange"  :row-class-name="tableRowClassName">
      <el-table-column type="selection"  :reserve-selection="true" width="55"  align="center" />
 
      <el-table-column fixed label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="80px"/>
      <el-table-column label="标题" prop="title" sortable align="center">
        <template slot-scope="scope">{{ scope.row.title
      ? scope.row.title : '————' }}</template>
      </el-table-column>
 
      <el-table-column label="地点" prop="place" sortable align="center">
        <template slot-scope="scope">{{
      scope.row.place ? scope.row.place : '————' }}</template>
      </el-table-column>
 
      <el-table-column label="可容纳人数" prop="conPeople" sortable align="center" min-width="150">
        <template slot-scope="scope">{{
      scope.row.conPeople ? scope.row.conPeople : '————' }}</template>
      </el-table-column>
 
      <el-table-column label="参与人数" prop="partPeople" sortable align="center" min-width="120">
        <template slot-scope="scope">{{
      scope.row.partPeople ? scope.row.partPeople : '————' }}</template>
      </el-table-column>
 
      <el-table-column label="申请人" prop="applyPerson" sortable align="center" min-width="120">
        <template slot-scope="scope">{{
      scope.row.applyPerson ? scope.row.applyPerson : '————' }}</template>
      </el-table-column>
 
      <el-table-column label="申请部门或家庭" prop="applyApart" sortable align="center" min-width="150">
        <template slot-scope="scope">{{
      scope.row.applyApart ? scope.row.applyApart : '————' }}</template>
      </el-table-column>
 
      <el-table-column label="开始时间" prop="startTime" sortable align="center"min-width="120">
        <template slot-scope="scope">{{ scope.row.startTime
      ? scope.row.startTime : '————' }}</template>
      </el-table-column>
 
      <el-table-column label="结束时间" prop="endTime" sortable align="center" min-width="120">
        <template slot-scope="scope">{{ scope.row.endTime ?
      scope.row.endTime : '————' }}</template>
      </el-table-column>
 
      <el-table-column label="是否摆放水牌" prop="isPlacebrand" sortable align="center" min-width="150">
        <template slot-scope="scope">{{scope.row.isPlacebrand===1? '是': '否'}}</template>
      </el-table-column>
 
      <el-table-column label="联系人" prop="connPerson" sortable align="center" min-width="100">
        <template slot-scope="scope">{{ scope.row.connPerson ?
      scope.row.connPerson : '————' }}</template>
      </el-table-column>
 
      <el-table-column label="联系电话" prop="connPhone" sortable align="center" min-width="100">
        <template slot-scope="scope">{{ scope.row.connPhone
      ? scope.row.connPhone : '————' }}</template>
      </el-table-column>
 
      <el-table-column label="状态" prop="statu" sortable align="center">
        <template slot-scope="scope">{{scope.row.statu===1? '同意': (scope.row.statu ===0 ? '拒绝' : '待审批')}}</template>
      </el-table-column>
 
      <el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
        <template slot-scope="scope" v-if="scope.row.roleId !== 1">
          <div class="button-container">
            <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
            <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">撤回</el-button>
            <el-button size="mini" type="text" icon="el-icon-d-arrow-right" @click="handleCheck(scope.row)">查看详情</el-button>
          </div>
        </template>
      </el-table-column>
 
    </el-table>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
      style="background: #FEF7FC;"
    />
 
 
<!-- 新增对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
 
      <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="100px">
 
        <el-form-item label="开始时间" prop="startTime">
          <el-date-picker v-model="formDat.startTime" type="datetime" placeholder="请选择日期"
                          :editable="false" :clearable="false" :style="{width: '100%'}"  value-format="yyyy-MM-dd HH:mm:ss"
          ></el-date-picker>
        </el-form-item>
        <el-form-item label="结束时间" prop="endTime">
          <el-date-picker v-model="formDat.endTime" type="datetime" placeholder="请选择日期"
                          :editable="false" :clearable="false" :style="{width: '100%'}"  value-format="yyyy-MM-dd HH:mm:ss"
          ></el-date-picker>
        </el-form-item>
 
        <el-form-item label="标题" prop="title">
          <el-input v-model="formDat.title" placeholder="请输入会议标题" clearable :style="{width: '100%'}">
          </el-input>
        </el-form-item>
        <el-form-item label="地点" prop="place">
          <el-input v-model="formDat.place" placeholder="请输入会议地点" clearable :style="{width: '100%'}">
          </el-input>
        </el-form-item>
        <el-form-item label="可容纳人数" prop="conPeople">
          <el-input v-model="formDat.conPeople" type="number" placeholder="请输入可容纳人数" clearable :style="{width: '100%'}">
          </el-input>
        </el-form-item>
 
        <el-form-item label="参与人数" prop="partPeople">
          <el-input v-model="formDat.partPeople" type="number" placeholder="请输入参与人数" clearable :style="{width: '100%'}">
          </el-input>
        </el-form-item>
        <el-form-item label="申请人" prop="applyPerson">
          <el-input v-model="formDat.applyPerson" placeholder="请输入申请人" clearable :style="{width: '100%'}">
          </el-input>
        </el-form-item>
        <el-form-item label="申请家庭或部门" prop="applyApart">
          <el-input v-model="formDat.applyApart" placeholder="请输入申请家庭或部门" clearable :style="{width: '100%'}">
          </el-input>
        </el-form-item>
        <el-form-item label="是否摆放水牌" prop="isPlacebrand">
          <el-select v-model="formDat.isPlacebrand" placeholder="请选择" clearable :style="{width: '100%'}">
            <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="联系人" prop="connPerson">
          <el-input v-model="formDat.connPerson" placeholder="请输入联系人" clearable :style="{width: '100%'}">
          </el-input>
        </el-form-item>
        <el-form-item label="联系电话" prop="connPhone">
          <el-input v-model="formDat.connPhone" placeholder="请输入联系电话" clearable :style="{width: '100%'}"></el-input>
        </el-form-item>
        <el-form-item label="状态" prop="statu">
          <!-- <el-select v-model="formDat.statu" placeholder="请选择" clearable :style="{width: '100%'}">
            <el-option v-for="(item, index) in typeOptions2" :key="index" :label="item.label" :value="item.value"
            ></el-option>
          </el-select> -->
          <el-input placeholder="待审批" :disabled='true'></el-input>
        </el-form-item>
 
      </el-form>
 
        </el-upload>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitDataScope">保 存</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
 
 
 
  </div>
</template>
<script>
  import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role";
  import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
 
 
  import { Notification, MessageBox, Message, Loading } from 'element-ui'
 
  //在system/note/index.js中导入接口函数  --接好了
  import {listMeeting,getMeetingInfo,addMeeting,enload,uploadPic,download,delMeeting,updateMeeting} from "@/api/meeting/index";
  export default {
    created() {
          this.getList();
    },
    data() {
      return {
        // 显示搜索条件
              loading: true,
        showSearch: true,
        open: false,
        title: "",
        // 总条数
        total: 0,
        meetingList: [],
        formDat:{
          id: undefined,
          title: undefined,
          place: undefined,
          conPeople: undefined,
          partPeople: undefined,
          applyPerson: undefined,
          applyApart: undefined,
          startTime: undefined,
          endTime: undefined,
          happenStartTime: undefined,
          happenEndTime: undefined,
          isPlacebrand: undefined,
          connPerson: undefined,
          connPhone: undefined,
          statu: undefined,
          createTime: undefined
        },
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        place:undefined,
        apply_Apart:undefined,
        start_Time:undefined,
        applyPerson:undefined
      },
      dateRange: [],
      // 表单校验
      rules: {
        startTime: [{
          required: true,
          message: '请输入开始时间',
          trigger: 'blur'
        }],
        endTime: [{
          required: true,
          message: '请输入结束时间',
          trigger: 'blur'
        }],
        title: [{
          required: true,
          message: '请输入标题',
          trigger: 'blur'
        }],
        place: [{
          required: true,
          message: '请输入地点',
          trigger: 'blur'
        }],
        conPeople: [{
          required: true,
          message: '请输入可容纳人数',
          trigger: 'blur'
        }],
        partPeople: [{
          required: true,
          message: '请输入参与人数',
          trigger: 'blur'
        }],
        applyPerson: [{
          required: true,
          message: '请输入申请人',
          trigger: 'blur'
        }],
        applyApart: [{
          required: true,
          message: '请输入申请家庭或部门',
          trigger: 'blur'
        }],
        isPlacebrand: [{
          required: true,
          message: '请选择是否摆放水牌',
          trigger: 'change'
        }],
        connPerson: [{
          required: true,
          message: '请输入联系人',
          trigger: 'blur'
        }],
        connPhone: [{
          required: true,
          message: '请输入联系电话',
          trigger: 'blur'
        }],
        // statu: [{
        //   // required: true,
        //   message: '请选择状态',
        //   trigger: 'blur'
        // }],
 
      },
        typeOptions: [
          {
          value: '1',
          label: '是',
          },
          {
            value: '0',
            label: '否',
          }
          ],
          typeOptions2: [
            {
            value: '1',
            label: '同意',
            },
            {
              value: '0',
              label: '拒绝',
            }
            ],
      }
    },
    methods: {
      // 多选框选中数据
      handleSelectionChange(selection) {
        this.ids = selection.map(item => item.id)
      //  alert(this.ids)
        this.single = selection.length!=1
        this.multiple = !selection.length
      },
      getList() {
        this.loading = true;
        // console.log(this.queryParams)
        //  listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
          this.queryParams.happenStartTime = this.dateRange.length > 0 && this.dateRange[0]
          this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1]
        listMeeting(this.queryParams).then(response => {
            //  alert(123)
              console.log(response.data.data,'111111')
            this.meetingList = response.data.data;
 
            this.total = response.data.total;
            this.loading = false;
          }
 
        );
      },
      /** 搜索按钮操作 */
      handleQuery() {
        this.queryParams.pageNum = 1;
        this.getList();
      },
      reset() {
        if (this.$refs.menu != undefined) {
          this.$refs.menu.setCheckedKeys([]);
        }
        this.menuExpand = false,
          this.menuNodeAll = false,
          this.deptExpand = true,
          this.deptNodeAll = false,
          this.form = {
            roleId: undefined,
            roleName: undefined,
            roleKey: undefined,
            roleSort: 0,
            status: "0",
            menuIds: [],
            deptIds: [],
            menuCheckStrictly: true,
            deptCheckStrictly: true,
            remark: undefined
          };
        this.resetForm("elForm");
      },
      /** 重置按钮操作 */
      resetQuery() {
        this.dateRange = [];
        this.resetForm("queryForm");
        this.handleQuery();
      },
 
 
      newRequest(){
        this.reset();
        this.open = true;
        this.title = "新申请"
      },
      cancel() {
        this.open = false;
        this.reset();
      },
submitDataScope: function() {
      this.$refs["elForm"].validate(valid => {
        // alert(valid)
        if (valid) {
          // console.log(this.formDat,'formDat')
          this.formDat.statu = 3
          addMeeting(this.formDat).then(response => {
            this.$modal.msgSuccess("新增成功");
            this.open = false;
            // 清空formDat对象的数据
            Object.keys(this.formDat).forEach(key => {
              this.formDat[key] = '';
            });
            // for(let i = 0; i <= this.fileList.length; i++)
            // {
            //   this.handleRemove(this.fileList[0]);
            // }
            // for(let i = 0; i < this.fileListOther.length; i++){
            //   this.handleRemoveFile(this.fileListOther[0]);
            // }
            this.getList();
          });
        }
      });
 
    },
 
      tableRowClassName({
        row,
        rowIndex
      }) {
        if (rowIndex % 2 == 0) {
          return "statistics-warning-row1";
        } else {
          return "statistics-warning-row";
        }
      },
      getRowId(row) {
        return row.id
      },
 
      // 修改
      handleUpdate(row) {
        const id = row.id;
        let jd = true
 
        this.$router.push({
          path:"/meeting/index/meetingInfo/" + id,
          query:{
            detail:jd
          }
        });
      },
      // 查看详细信息
      handleCheck(row){
        const id = row.id;
        this.$router.push("/meeting/index/meetingInfo/" + id);
      },
      /** 删除按钮操作 */
      handleDelete(row) {
        const Ids = row.id || this.ids;
        this.$modal.confirm('是否确认删除数据项?').then(function() {
          return delMeeting(Ids);
        }).then(() => {
          this.getList();
          this.$modal.msgSuccess("删除成功");
        }).catch(() => {});
      },
      /** 导出按钮操作 */
      handleExport() {
          const Ids = this.ids;
 
        if(Ids.length==0)
        {
        this.download('/zMeeting/export', {
          ...this.queryParams
        }, `zMeeting_${new Date().getTime()}.xlsx`)
        }
        else{
          this.download('/zMeeting/export1/'+Ids, {
          }, `zMeeting_${new Date().getTime()}.xlsx`)
        }
        },
          /** 导入模板下载操作*/
      handleExportTemplate()
      {
       this.download('/zMeeting/model', {
 
        }, `zMeeting_${new Date().getTime()}.xlsx`)
      },
      /** 导入操作*/
      handleEnport(params){
        var file = params.file;
        var formData = new FormData();
        formData.append('excelImport', file);
        let _this = this
        enload(formData).then(response => {
          _this.getList();
          Message({ message: "导入成功", type: 'warning' })
 
        }).catch(err)
        {
          Message({ message: "导入失败", type: 'error' })
        }
 
      },
 
    }
  }
</script>
<style scoped="">
  .app-container {
    background-color: #FEF7FC;
  }
 
  /deep/ .el-table .statistics-warning-row {
    background: #E0EEFE;
  }
 
  /deep/ .el-table .statistics-warning-row1 {
    background: #FFEFF2;
  }
 
  .button-container {
    text-align: right;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-grow: 1;
  }
 
  .el-table {
    border-radius: 14px 14px 14px 14px;
  }
 
.form{
  background:center/11% no-repeat url('../../assets/icons/add1.png') ;
 
}
</style>