From eea7498cbe1d176ec13a6d10fae4e53816c01b20 Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Fri, 8 Apr 2022 20:31:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87-=E5=86=85=E5=AE=B9/=E7=B4=A0?= =?UTF-8?q?=E6=9D=90-=E4=B8=8A=E4=BC=A0=E9=99=90=E5=88=B6/=E5=8F=91?= =?UTF-8?q?=E5=B8=83-=E6=95=B0=E9=87=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/device/deviceList.js | 9 ++ src/views/components/upload.vue | 14 ++- src/views/device/index.vue | 96 ++++++++++++------- src/views/immediateRelease/index.vue | 38 +++++++- .../materialContent/materialList/index.vue | 19 ++++ 5 files changed, 136 insertions(+), 40 deletions(-) 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 @@
-

图片

-
    -
  • - -
    - JPG +
    +

    发布名称 {{ items.relaase_name }}

    +

    发布时间 {{ items.release_start.split("00:00:00")[0] }}

    +
    + +
    + +
    +
    + {{ item.deposit_url | getFileFormat }} + {{ item.duration | getSeconds }} +
    +
    {{ item.material_name }}
    +
    背景音乐:{{ item.bgm_name }}
    -
    人工智能
    -
  • -
-

视频

-
    -
  • - -
    - Video - 03:00 -
    -
    防控疫情小贴士
    -
  • -
-

音频

-
    -
  • -
    -
    - Video - 03:00 -
    -
    防控疫情小贴士
    -
  • -
+
+
@@ -142,13 +130,19 @@