yz3456
2024-05-27 ce09e7d8c54d1868fe9a589caec577ddb0aeaf52
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
<template>
  <div class="app-container" id="printable-content">
    <div class="form-header mt">
      <h1 style="font-size:21px;padding-top:30px;display: flex;justify-content: space-between;align-items: center;">
        <span>会议详情</span>
      </h1>
    </div>
    <div style="padding-left:15px">
      <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-position="left" label-width="160px">
 
        <el-container>
 
          <el-row :span="12">
 
            <el-cow>
              <el-form-item label="会议标题" prop="title" label-width="90px"
                style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
                <el-input v-if="!dsb" v-model="formData.title" placeholder="请输入会议标题" clearable :style="{width: '100%'}" :disabled="dsb"></el-input>
                <el-input v-if="dsb" v-model="formData.title" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"></el-input>
              </el-form-item>
            </el-cow>
            <el-cow>
              <el-form-item label="开始时间" prop="startTime" label-width="80px"
                style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
                <el-date-picker v-if="!dsb" v-model="formData.startTime" type="datetime" placeholder="选择日期时间" align="right"
                  :picker-options="pickerOptions" :style="{width: '100%'}" :disabled="dsb" value-format="yyyy-MM-dd HH:mm:ss">
                </el-date-picker>
                <el-date-picker v-if="dsb" v-model="formData.startTime" type="datetime" placeholder="" align="right"
                  :picker-options="pickerOptions" :style="{width: '100%'}" :disabled="dsb" value-format="yyyy-MM-dd HH:mm:ss">
                </el-date-picker>
              </el-form-item>
            </el-cow>
            <el-cow>
              <el-form-item label="结束时间" prop="endTime" label-width="80px"
                style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
                <el-date-picker v-if="!dsb" v-model="formData.endTime" type="datetime" placeholder="选择日期时间" align="right"
                  :picker-options="pickerOptions" :style="{width: '100%'}" :disabled="dsb" value-format="yyyy-MM-dd HH:mm:ss">
                </el-date-picker>
                <el-date-picker v-if="dsb" v-model="formData.endTime" type="datetime" placeholder="" align="right"
                  :picker-options="pickerOptions" :style="{width: '100%'}" :disabled="dsb" value-format="yyyy-MM-dd HH:mm:ss">
                </el-date-picker>
              </el-form-item>
            </el-cow>
            <el-cow>
              <el-form-item label="会议地点" prop="place" label-width="90px"
                style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
                <el-input v-if="!dsb" v-model="formData.place" placeholder="请输入会议地点" clearable :style="{width: '100%'}" :disabled="dsb">
                </el-input>
                <el-input v-if="dsb" v-model="formData.place" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                </el-input>
              </el-form-item>
            </el-cow>
 
            <!-- <el-cow>
              <el-form-item label="会议室代码" prop="meetingID" label-width="90px"
                style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
                <el-input v-model="formData.meetingID" placeholder="请输入会议室代码" clearable :style="{width: '100%'}">
                </el-input>
              </el-form-item>
            </el-cow> -->
            <el-cow>
              <el-form-item label="可容纳人数" prop="conPeople" label-width="100px"
                style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
                <el-input v-if="!dsb" type="number" v-model="formData.conPeople" placeholder="请输入可容纳人数" clearable :style="{width: '100%'}" :disabled="dsb">
                </el-input>
                <el-input v-if="dsb" type="number" v-model="formData.conPeople" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                </el-input>
              </el-form-item>
            </el-cow>
            <el-cow>
              <el-form-item label="参与人数" prop="partPeople" label-width="90px"
                style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
                <el-input v-if="!dsb" type="number" v-model="formData.partPeople" placeholder="请输入参与人数" clearable :style="{width: '100%'}" :disabled="dsb">
                </el-input>
                <el-input v-if="dsb" type="number" v-model="formData.partPeople" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                </el-input>
              </el-form-item>
            </el-cow>
            <el-cow>
              <el-form-item label="申请人" prop="applyPerson" label-width="90px"
                style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
                <el-input v-if="!dsb" v-model="formData.applyPerson" placeholder="请输入申请人" clearable :style="{width: '100%'}" :disabled="dsb">
                </el-input>
                <el-input v-if="dsb" v-model="formData.applyPerson" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                </el-input>
              </el-form-item>
            </el-cow>
            <el-cow>
              <el-form-item label="家庭或部门" prop="applyApart" label-width="100px"
                style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
                <el-input v-if="!dsb" v-model="formData.applyApart" placeholder="请输入申请家庭或部门" clearable :style="{width: '100%'}" :disabled="dsb">
                </el-input>
                <el-input v-if="dsb" v-model="formData.applyApart" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                </el-input>
              </el-form-item>
            </el-cow>
            <el-cow>
              <el-form-item label="是否拜访水牌" prop="isPlacebrand" label-width="120px"
                style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
                <el-select v-model="formData.isPlacebrand" placeholder="请选择 " clearable :style="{width: '100%'}"
                  :disabled="dsb">
                  <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label"
                    :value="item.value"></el-option>
                </el-select>
              </el-form-item>
            </el-cow>
            <el-cow>
              <el-form-item label="联系人" prop="connPerson" label-width="90px"
                style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
                <el-input v-if="!dsb" v-model="formData.connPerson" placeholder="请输入联系人" clearable :style="{width: '100%'}" :disabled="dsb">
                </el-input>
                <el-input v-if="dsb" v-model="formData.connPerson" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                </el-input>
              </el-form-item>
            </el-cow>
            <el-cow>
              <el-form-item label="联系电话" prop="connPhone" label-width="90px"
                style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
                <el-input v-if="!dsb" v-model="formData.connPhone" placeholder="请输入联系电话" clearable :style="{width: '100%'}" :disabled="dsb"></el-input>
                <el-input v-if="dsb" v-model="formData.connPhone" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"></el-input>
              </el-form-item>
            </el-cow>
            <el-cow>
              <el-form-item label="状态" prop="statu" label-width="120px"
                style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
                <el-select v-model="formData.statu" placeholder="请选择 " clearable :style="{width: '100%'}"
                  :disabled="true">
                  <el-option v-for="(item, index) in typeOptions2" :key="index" :label="item.label"
                    :value="item.value"></el-option>
                </el-select>
              </el-form-item>
            </el-cow>
          </el-row>
        </el-container>
 
        <h4 class="form-header"> </h4>
        <el-form-item size="large">
          <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb">重新申请</el-button>
        </el-form-item>
      </el-form>
 
 
      <el-dialog  :visible.sync="dialogVisible">
        <img w-full :src="dialogImageUrl"    style="width: 100%; height: 100%" alt="Preview Image" />
      </el-dialog>
    </div>
 
 
  </div>
</template>
 
<script>
import {addRole, updateRole} from "@/api/system/role";
import {blobValidate} from "@/utils/ruoyi";
import errorCode from "@/utils/errorCode";
import {Message} from "element-ui";
  import {listMeeting,getMeetingInfo,addMeeting,enload,uploadPic,download,delMeeting,updateMeeting} from "@/api/meeting/index";
  export default {
    components: {},
    props: [],
    data() {
      return {
        cdi: "会议详细信息",
        udi: "会议信息详情",
        // 数据范围选项
        fot: ['.bmp', '.jpg', '.jpeg', '.png', '.tif', '.gif', '.pcx', '.tga', '.exif', '.fpx',
          '.svg', '.psd', '.cdr', '.pcd', '.dxf', '.ufo', '.eps', '.ai', '.aw', '.WMF', '.webp', '.apng'
        ],
 
        fileList: [],
        fileList1: [],
        uploadFileList: [],
        uploadFileList1: [],
        fileListOther: [],
        dsb: true,
        btn: false,
        isShow: true,
        uploading: false,
        formData:{
          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
        },
        dialogImageUrl: '',
        dialogVisible: false,
        disabled: false,
        // 表单校验
        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: 'blur'
          }],
          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: '拒绝',
            },
            {
              value: 3 ,
              label: '待审批',
            }
            ],
      }
    },
    created() {
      const id = this.$route.params && this.$route.params.id;
      let jd;
      if (this.$route.query.detail == 'true') {
        jd = this.$route.query.detail
        this.btn = jd
        this.dsb = !jd
        this.$route.meta.title = "会议详细信息"; //列表的名称
      } else {
        this.$route.meta.title = "会议详细信息"; //列表的名称
        this.btn = false;
        this.isShow = false
      }
 
      let _this = this
      if (id) {
        this.loading = true;
        getMeetingInfo(id).then((response) => {
          console.log(response.data,'123123123')
          this.formData = response.data;
          // let paths = this.formData.url.split(",");
       //    for(let i = 0; i < paths.length; i++)
       //    {
       //      if(paths[i]!="") {
       //        let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
       //        if (_this.fot.includes(pth) === true)
          // {
          //     if(paths[i][0]=="/")
       //          _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1),res:false})
          //   else
          //      _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i],res:false})
          //   }
       //        else {
       //          let nms = paths[i].split("\/")
       //          let nm = nms[nms.length - 1]
          //   if(paths[i][0]=="/")
       //          _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1),res:false})
          //     else
          //     _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i],res:false})
 
          // }
       //      }
       //    }
          this.loading = false;
        });
      }
    },
    mounted() {},
    methods: {
      // getData(){
      //       const id = this.$route.params && this.$route.params.id;
      //       let _this = this
      //       if (id) {
      //         this.loading = true;
      //         getMeetingInfo(id).then((response) => {
      //           // console.log(response,'666666666')
      //           this.formData = response.data;
      //           let paths = this.formData.url.split(",");
      //           for(let i = 0; i < paths.length; i++)
      //           {
      //             if(paths[i]!="") {
 
      //               let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
      //       //    alert(pth)
      //               if (_this.fot.includes(pth) === true)
      //           {
      //           console.log()
      //             }
      //               else {
      //                 let nms = paths[i].split("\/")
      //                 let nm = nms[nms.length - 1]
      //             if(paths[i][0]=="/")
      //                 _this.fileListOther1.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1),res:false})
      //               else
      //               _this.fileListOther1.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i],res:false})
 
      //           }
      //             }
 
      //           }
      //           _this.fileListOther = _this.fileListOther1
      //           this.loading = false;
      //         });
      //       }
      // },
      submitForm() {
        this.$refs['elForm'].validate(valid => {
          if (valid) {
            if (this.formData.id != undefined) {
              updateMeeting(this.formData).then(response => {
                this.$modal.msgSuccess("修改成功");
                // if (this.formData.status == 1)
                //   this.formData.status = '是'
                // else
                //   this.formData.status = '否'
                this.btn = false
              });
            } else {
              this.$modal.msgSuccess("修改失败");
              // if (this.formData.status == '是')
              //   this.formData.status = 1
              // else
              //   this.formData.status = 0
            }
          }
        })
      },
    }
  }
</script>
 
<style scoped>
  .app-container {
    background-color: #FEF7FC;
  }
 
  .mt {
    position: relative;
  }
 
  .dt {
    display: block;
 
  }
 
  .pt {
    right: 10px;
    top: -3px;
    display: block;
    position: absolute;
  }
 
  .form {
    background: center/11% no-repeat url('../../assets/icons/form.png');
  }
 
  .hide /deep/ .el-upload--picture-card {
    display: none;
  }
 
  .form_item {
    font-size: 12px;
    font-family: Microsoft YaHei-Regular, Microsoft YaHei;
    font-weight: 400;
    color: #000000;
  }
</style>