Quellcode durchsuchen

[FE]新增用户管理页面默认查询条件和设备对话框视频地址字段值

luoxu5 vor 4 Jahren
Ursprung
Commit
4f4027659a

+ 8 - 1
security-protection-platform/src/modules/system/devicemana/components/modal/addDeviceModal.vue

@ -1,6 +1,6 @@
1 1
<template>
2 2
  <!-- 请假对话框 -->
3
  <t-modal :visibled.sync="visibled" :mask-closable="false" width="600px" height="500px">
3
  <t-modal :visibled.sync="visibled" :mask-closable="false" width="600px" height="560px">
4 4
    <template slot="header">
5 5
      <div class="device-modal-title">{{ isEdit?'设备编辑':'设备新增' }}</div>
6 6
    </template>
@ -21,6 +21,9 @@
21 21
          <t-option v-for="item in types" :value="item.id" :key="item.id">{{ item.name }}</t-option>
22 22
        </t-select>
23 23
      </t-form-item>
24
      <t-form-item label="视频地址:" prop="videoUrl">
25
        <t-input v-model="addDeviceModalForm.videoUrl" placeholder="请输入视频地址"></t-input>
26
      </t-form-item>
24 27
      <t-form-item label="图片上传:">
25 28
        <div style="display:flex;flex-direction:row">
26 29
          <t-upload ref="uploader" :format="['jpg','jpeg','png']" :show-uploaded="false" :before-upload="$_onUploadBeforeUpload" :action="action" :data="{pictureUrl:addDeviceModalForm.pictureUrl}" multiple type="drag" style="width:180px;height:180px" @success="$_onUploadSuccess" @remove-file="$_onUploadRemoveFile" @error="$_onUploadError" @file-ext-error="$_onUploadFormatError" @file-exceeded-size="$_onUploadExceededSize">
@ -46,6 +49,7 @@ const defaultAddDeviceModalForm = {
46 49
  deviceId: '', // 设备id
47 50
  deviceName: '', // 设备名称
48 51
  deviceTypeId: '', // 设备类型id
52
  videoUrl: '', // 视频地址
49 53
  pictureUrl: '' // 图片标识
50 54
}
51 55
export default {
@ -79,6 +83,9 @@ export default {
79 83
        deviceName: [
80 84
          { required: true, message: '设备名称不能为空', trigger: 'blur' }
81 85
        ],
86
        videoUrl: [
87
          { required: true, message: '视频地址不能为空', trigger: 'blur' }
88
        ],
82 89
        deviceTypeId: [
83 90
          { required: true, message: '设备类型不能为空' }
84 91
        ]

+ 14 - 3
security-protection-platform/src/modules/usermana/index.vue

@ -112,7 +112,9 @@ export default {
112 112
      // 人脸审核选择id
113 113
      auditid: 0,
114 114
      // 人脸审核的公司名称
115
      companyName: ''
115
      companyName: '',
116
      // 判断页面是否是第一次渲染
117
      firstCreated: true
116 118
117 119
    }
118 120
  },
@ -137,6 +139,8 @@ export default {
137 139
  created () {
138 140
    // this.getDeviceData()
139 141
    this.getCompanyTypesList()
142
    // 默认选中能源部
143
    this.companyTypeId = 10086
140 144
  },
141 145
  methods: {
142 146
    // 获取用户列表数据
@ -211,6 +215,13 @@ export default {
211 215
        })
212 216
        // eslint-disable-next-line no-return-assign
213 217
        this.departmentTypesList = data.filter(item => item.data = item.id)
218
        // 进入页面默认选中ebc
219
        if (this.departmentTypeId === '' && this.firstCreated) {
220
          this.$nextTick(() => {
221
            this.departmentTypeId = '10087'
222
            this.firstCreated = false
223
          })
224
        }
214 225
      } else {
215 226
        this.$Message.danger('部门类型列表数据获取失败!')
216 227
      }
@ -310,10 +321,10 @@ export default {
310 321
    },
311 322
    // 编辑新增用户信息
312 323
    async editDeviceData (id) {
313
      const res = await sysapi.getOneEmployee({params: {employeeId: id}})
324
      const res = await sysapi.getOneEmployee({ params: { employeeId: id } })
314 325
      if (res.status === 200) {
315 326
        this.currentEditDevice = res.data.data
316
        console.log(this.currentEditDevice);
327
        console.log(this.currentEditDevice)
317 328
      } else {
318 329
        this.$Message.danger('设备数据获取失败!')
319 330
      }

+ 4 - 4
security-protection-platform/src/modules/videoSurveillance/components/ReplayDialog/index.vue

@ -70,10 +70,10 @@ export default {
70 70
      videoList: [],
71 71
      // 视频播放器对象
72 72
      $player: null,
73
      // 开始时间
74
      beginDay: '2020-12-19 20:14:00',
75
      // 结束时间
76
      endDay: '2020-12-19 20:14:59',
73
      //   开始时间
74
      beginDay: formatDateTime(new Date(+new Date() - 10 * 60 * 1000), 'yyyy-MM-dd hh:mm:ss'),
75
      //   结束时间
76
      endDay: formatDateTime(new Date(), 'yyyy-MM-dd hh:mm:ss'),
77 77
      isShow: true,
78 78
      playerOptions: {
79 79
        playbackRates: [0.7, 1.0, 1.5, 2.0], // 播放速度