diff --git a/src/api/device/deviceList.js b/src/api/device/deviceList.js index b430c1b..88b5a99 100644 --- a/src/api/device/deviceList.js +++ b/src/api/device/deviceList.js @@ -36,3 +36,12 @@ export function ReqRemoveDevice(parameter) { data: parameter }) } + +// 根据设备id获取该设备发布内容 +export function FetchFindReleaseDetailsByDeviceId(parameter) { + return request({ + url: 'api/device/findReleaseDetailsByDeviceId', + method: 'get', + params: parameter + }) +} diff --git a/src/views/components/upload.vue b/src/views/components/upload.vue index b9676b0..6f30495 100644 --- a/src/views/components/upload.vue +++ b/src/views/components/upload.vue @@ -100,7 +100,8 @@ export default { loading_txt: '暂停', colors: '#1e9f4c', uploadListData: [], - filePercentTxt: '上传中' + filePercentTxt: '上传中', + isActiveType: null } }, mounted() { @@ -111,6 +112,17 @@ export default { // 获取文件 this.file = e.target.files[0] console.log(this.file) + console.log(this.isActiveType) + if (this.isActiveType == 0) { + this.$message.error('请上传图片文件!') + return + } else if (this.isActiveType == 1) { + this.$message.error('请上传视频文件!') + return + } else if (this.isActiveType == 2) { + this.$message.error('请上传音频文件!') + return + } this.formatType = this.file.type.substring(0, this.file.type.indexOf('/')) console.log('formatType', this.formatType) this.fileNames = this.file.name diff --git a/src/views/device/index.vue b/src/views/device/index.vue index f8168c5..aa7fd34 100644 --- a/src/views/device/index.vue +++ b/src/views/device/index.vue @@ -91,38 +91,26 @@
发布时间 {{ items.release_start.split("00:00:00")[0] }}
+