diff --git a/package.json b/package.json index f1d84aefb467c302fdc5248d4b82976d9f73d7c8..14ac1e3ee489e3734a24454e63331c12a26ddc17 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "element-ui": "^2.7.2", "file-saver": "^2.0.0-rc.3", "html2canvas": "^1.0.0-rc.7", + "js-base64": "^3.6.0", "jspdf": "^2.3.1", "moment": "^2.22.2", "qrcode.vue": "^1.6.1", diff --git a/src/page/accounts/components/checkTable.vue b/src/page/accounts/components/checkTable.vue index d4dcddb4685015b4c2d40db3b8e8979fbc11d9c9..4e56be3604649372adb29fee5ec84230d6af62fe 100644 --- a/src/page/accounts/components/checkTable.vue +++ b/src/page/accounts/components/checkTable.vue @@ -20,8 +20,20 @@ :width="item.width" > <template slot-scope="scope"> - <div v-if="item.isEdit" class="table-btn-group"> - <el-button + <div v-if="item.isEdit"> + <div v-if="((scope.row.one)&&(scope.row.two))" class="table-btn-group"> + <el-button round class="passed" :disabled="scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="handleOperate(scope.row, 'pass')">通过</el-button> + <el-button round class="rejected" :disabled="scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="handleOperate(scope.row, 'reject')">驳回</el-button> + </div> + <div v-else-if="((scope.row.one === true)&&(scope.row.two === false))" class="table-btn-group"> + <el-button round class="passed" :disabled="scope.row.status === 'TBCA'||scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="handleOperate(scope.row, 'pass')">通过</el-button> + <el-button round class="rejected" :disabled="scope.row.status === 'TBCA'||scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="handleOperate(scope.row, 'reject')">驳回</el-button> + </div> + <div v-else-if="((scope.row.one === false)&&(scope.row.two === true))" class="table-btn-group"> + <el-button round class="passed" :disabled="scope.row.status === 'TBC'||scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="handleOperate(scope.row, 'pass')">通过</el-button> + <el-button round class="rejected" :disabled="scope.row.status === 'TBC'||scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="handleOperate(scope.row, 'reject')">驳回</el-button> + </div> + <!-- <el-button round class="passed" :disabled=" @@ -44,7 +56,7 @@ @click="handleOperate(scope.row, 'reject')" > 驳回 - </el-button> + </el-button> --> </div> <div v-else> <span v-if="item.prop === 'status'"> diff --git a/src/page/check/display/index.vue b/src/page/check/display/index.vue index 760504648d01889499bbb9ca6a922c380cfc6e0f..4823d2cfd6197ef46346d7d0e25f239947f6976d 100644 --- a/src/page/check/display/index.vue +++ b/src/page/check/display/index.vue @@ -80,41 +80,20 @@ </template> </el-table-column> <el-table-column label="å®¡æ ¸" width="220" header-align="center" align="center"> + <template slot-scope="scope"> - <!-- <div class="table-btn-group"> - - <el-tooltip content="通过" placement="top"> - <el-button circle @click="adopt(scope.row)"> - <i class="icon-table icon-enable"></i> - </el-button> - </el-tooltip> - <el-tooltip content="驳回" placement="top"> - <el-button circle @click="reject(scope.row)"> - <i class="icon-table icon-disable"></i> - </el-button> - </el-tooltip> - </div>--> - <div class="table-btn-group"> - <el-button - round - class="passed" - :disabled=" - !scope.row.two|| - scope.row.status === 'REFUSED' || - scope.row.status === 'APPROVED_FINAL' - " - @click="adopt(scope.row)" - >通过</el-button> - <el-button - round - class="rejected" - :disabled=" - !scope.row.two|| - scope.row.status === 'REFUSED' || - scope.row.status === 'APPROVED_FINAL' - " - @click="reject(scope.row)" - >驳回</el-button> + <!-- 管ç†å‘˜ã€åˆå®¡å‘˜ã€å¤å®¡å‘˜ --> + <div v-if="((scope.row.one)&&(scope.row.two))" class="table-btn-group"> + <el-button round class="passed" :disabled="scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="adopt(scope.row)">通过</el-button> + <el-button round class="rejected" :disabled="scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="reject(scope.row)">驳回</el-button> + </div> + <div v-else-if="((scope.row.one === true)&&(scope.row.two === false))" class="table-btn-group"> + <el-button round class="passed" :disabled="scope.row.status === 'TBCA'||scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="adopt(scope.row)">通过</el-button> + <el-button round class="rejected" :disabled="scope.row.status === 'TBCA'||scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="reject(scope.row)">驳回</el-button> + </div> + <div v-else-if="((scope.row.one === false)&&(scope.row.two === true))" class="table-btn-group"> + <el-button round class="passed" :disabled="scope.row.status === 'TBC'||scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="adopt(scope.row)">通过</el-button> + <el-button round class="rejected" :disabled="scope.row.status === 'TBC'||scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="reject(scope.row)">驳回</el-button> </div> </template> </el-table-column> @@ -201,7 +180,7 @@ <el-form-item label="展æ¿è§†é¢‘" :label-width="formLabelWidth"> <div class="video-box" @contextmenu.prevent> <div class="video-item" v-for="(item, index) in editForm.videoList" :key="index"> - <video :src="item.fileUrl" controls controlsList='nodownload noremote footbar' /> + <video :poster="item.thumbnail" :src="item.fileUrl" controls controlsList='nodownload noremote footbar' /> <span>{{ item.fileName }}</span> </div> </div> @@ -223,6 +202,7 @@ </div> </template> <script> + let Base64 = require('js-base64').Base64 export default { data() { var checkIsNull = (rule, value, callback) => { @@ -546,43 +526,21 @@ export default { openDetails(row) { let _this = this; _this.FormVisible = true; - // _this.getInfo(row.refItemId); - - if(row.operation === 'EDIT'){ + if(row.operation === 'EDIT'){ // å‚ç…§åŽå°æ›´æ”¹æ–‡æ¡£å®¡æ ¸è®°å½•çš„"operation"为"EDIT"æ—¶ï¼Œè°ƒç”¨çš„è¯¦æƒ…æŽ¥å£ - this.getIsEditInfo(row.id) + this.getInfo(row.id,"exhibitionBoard/getAudit/") }else{ - this.getInfo(row.refItemId); + this.getInfo(row.refItemId,"exhibitionBoard/get/"); } $(".el-dialog__title").html(row.name + "展æ¿è¯¦æƒ…"); }, - // 获å–ç‰ˆæƒæ–¹è¯¦æƒ…EDIT下 - getIsEditInfo(auditId) { - let vm = this; - vm.$https( - { - url: "exhibitionBoard/getAudit/" + auditId, - method: "get", - authType: this.backToken - } - // param - ) - .then(res => { - let resData = res.data.data; - this.editForm = resData; - - }) - .catch(function(err) { - console.log(err); - }); - }, // 获å–ç‰ˆæƒæ–¹è¯¦æƒ… - getInfo(id) { + getInfo(id,url) { let vm = this; vm.$https( { - url: "exhibitionBoard/get/" + id, + url: url + id, method: "get", authType: this.backToken } @@ -590,7 +548,15 @@ export default { ) .then(res => { let resData = res.data.data; + const videos = res.data.data.videoList + for(var i=0;i<videos.length;i++){ + videos[i].fileUrl = Base64.decode(videos[i].intro) + } this.editForm = resData; + this.editForm.videoList = videos + + + }) .catch(function(err) { diff --git a/src/page/check/learn/details.vue b/src/page/check/learn/details.vue index 721503ceb99da55fc86461424493a872c23ca004..e0a1f38bd3a0b060ee47b7afe6227e6e65340c24 100644 --- a/src/page/check/learn/details.vue +++ b/src/page/check/learn/details.vue @@ -42,14 +42,23 @@ <span>{{ item.remarks }}</span> </el-form-item> <el-form-item label="展æ¿è§†é¢‘" class="w100"> - <div class="video-box" @contextmenu.prevent> + <div class="video-box" > + <div + @contextmenu.prevent class="video-item" - v-for="(vi, index) in item.videoList" - :key="index" + v-for="vi in item.videoList" + :key="vi.id" > - <video :src="vi.fileUrl" controlsList='nodownload noremote footbar' /> - <span>{{ vi.fileName }}</span> + <video + :poster="vi.thumbnail" + controls controlsList='nodownload noremote footbar' + > + <source :src="vi.fileUrl" /> + + </video> + <span> </span> + <span> {{ vi.fileName }}</span> </div> </div> </el-form-item> @@ -85,6 +94,7 @@ </template> <script> +let Base64 = require('js-base64').Base64 export default { data() { return { @@ -118,7 +128,15 @@ export default { .then((res) => { let data = res.data.data; vm.formInline = data; - console.log(this.ruleForm); + const boardList = data.exhibitionBoardList + for(var i=0;i<boardList.length;i++){ + for(var j=0;j<boardList[i].videoList.length;j++){ + boardList[i].videoList[j].fileUrl = Base64.decode(boardList[i].videoList[j].intro) + } + } + // console.log(boardList) + vm.formInline.exhibitionBoardList = boardList + // console.log(this.formInline.exhibitionBoardList[0].videoList); }) .catch(function (err) { console.log(err); @@ -139,16 +157,18 @@ export default { width: 100%; .video-item { width: 100%; - } - video { - width: 100%; + video { + width: 300px; height: 200px; } + } + } audio:focus { outline: none; } .audio-item{ + padding-bottom:10px; display: flex; align-items: center; span{ diff --git a/src/page/check/learn/index.vue b/src/page/check/learn/index.vue index 20dc6290afe5830917bfd6dd8cb1ec784fa3373d..e4cf6c22e8cf8857cf0ae9504a2710b85cab7b34 100644 --- a/src/page/check/learn/index.vue +++ b/src/page/check/learn/index.vue @@ -83,40 +83,20 @@ </el-table-column> <el-table-column label="å®¡æ ¸" width="220" header-align="center" align="center"> <template slot-scope="scope"> - <div class="table-btn-group"> - <el-button - round - class="passed" - :disabled=" - !scope.row.two|| - scope.row.status === 'REFUSED' || - scope.row.status === 'APPROVED_FINAL' - " - @click="adopt(scope.row)" - >通过</el-button> - <el-button - round - class="rejected" - :disabled=" - !scope.row.two|| - scope.row.status === 'REFUSED' || - scope.row.status === 'APPROVED_FINAL' - " - @click="reject(scope.row)" - >驳回</el-button> + <!-- 管ç†å‘˜ã€åˆå®¡å‘˜ã€å¤å®¡å‘˜ --> + <div v-if="((scope.row.one)&&(scope.row.two))" class="table-btn-group"> + <el-button round class="passed" :disabled="scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="adopt(scope.row)">通过</el-button> + <el-button round class="rejected" :disabled="scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="reject(scope.row)">驳回</el-button> </div> - <!-- <div class="table-btn-group"> - <el-tooltip content="通过" placement="top"> - <el-button circle @click="adopt(scope.row)"> - <i class="icon-table icon-enable"></i> - </el-button> - </el-tooltip> - <el-tooltip content="驳回" placement="top"> - <el-button circle @click="reject(scope.row)"> - <i class="icon-table icon-disable"></i> - </el-button> - </el-tooltip> - </div> --> + <div v-else-if="((scope.row.one === true)&&(scope.row.two === false))" class="table-btn-group"> + <el-button round class="passed" :disabled="scope.row.status === 'TBCA'||scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="adopt(scope.row)">通过</el-button> + <el-button round class="rejected" :disabled="scope.row.status === 'TBCA'||scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="reject(scope.row)">驳回</el-button> + </div> + <div v-else-if="((scope.row.one === false)&&(scope.row.two === true))" class="table-btn-group"> + <el-button round class="passed" :disabled="scope.row.status === 'TBC'||scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="adopt(scope.row)">通过</el-button> + <el-button round class="rejected" :disabled="scope.row.status === 'TBC'||scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="reject(scope.row)">驳回</el-button> + </div> + </template> </el-table-column> </el-table> diff --git a/src/page/check/video/index.vue b/src/page/check/video/index.vue index 9de5bf411ed917cfa3fd7c1a0af74cfc0267f9ba..b890b1089bf4e33541ccc4e200a14b17ac689338 100644 --- a/src/page/check/video/index.vue +++ b/src/page/check/video/index.vue @@ -1,4 +1,4 @@ -<template> +/* <template> <div class="listPage H100"> <div class="search-container"> <el-form :inline="true" :model="form" ref="form" onsubmit="return false;"> @@ -81,27 +81,18 @@ </el-table-column> <el-table-column label="å®¡æ ¸" width="220" header-align="center" align="center"> <template slot-scope="scope"> - <div class="table-btn-group"> - <el-button - round - class="passed" - :disabled=" - !scope.row.two|| - scope.row.status === 'REFUSED' || - scope.row.status === 'APPROVED_FINAL' - " - @click="adopt(scope.row)" - >通过</el-button> - <el-button - round - class="rejected" - :disabled=" - !scope.row.two|| - scope.row.status === 'REFUSED' || - scope.row.status === 'APPROVED_FINAL' - " - @click="reject(scope.row)" - >驳回</el-button> + <!-- 管ç†å‘˜ã€åˆå®¡å‘˜ã€å¤å®¡å‘˜ --> + <div v-if="((scope.row.one)&&(scope.row.two))" class="table-btn-group"> + <el-button round class="passed" :disabled="scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="adopt(scope.row)">通过</el-button> + <el-button round class="rejected" :disabled="scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="reject(scope.row)">驳回</el-button> + </div> + <div v-else-if="((scope.row.one === true)&&(scope.row.two === false))" class="table-btn-group"> + <el-button round class="passed" :disabled="scope.row.status === 'TBCA'||scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="adopt(scope.row)">通过</el-button> + <el-button round class="rejected" :disabled="scope.row.status === 'TBCA'||scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="reject(scope.row)">驳回</el-button> + </div> + <div v-else-if="((scope.row.one === false)&&(scope.row.two === true))" class="table-btn-group"> + <el-button round class="passed" :disabled="scope.row.status === 'TBC'||scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="adopt(scope.row)">通过</el-button> + <el-button round class="rejected" :disabled="scope.row.status === 'TBC'||scope.row.status === 'REFUSED' ||scope.row.status === 'APPROVED_FINAL'" @click="reject(scope.row)">驳回</el-button> </div> </template> </el-table-column> @@ -156,7 +147,7 @@ <!-- @contextmenu.prevent.capture --> <div class="dialog-content" @contextmenu.prevent> - <span + <div v-for="(item, index) in videoList" :key="index"> @@ -169,12 +160,11 @@ controls controlsList='nodownload noremote footbar' > <source :src="item.fileUrl" /> - <!-- <source :src="videoSrc" /> --> - </video> - <span> </span> - </span> + <span>{{ item.fileName }}</span> + <br> + </div> </div> </el-dialog> </div> @@ -182,6 +172,7 @@ <script> import axios from 'axios' + let Base64 = require('js-base64').Base64 export default { components: {}, data() { @@ -522,47 +513,34 @@ export default { openDetails(row) { if(row.operation === 'EDIT'){ // å‚ç…§åŽå°æ›´æ”¹æ–‡æ¡£å®¡æ ¸è®°å½•çš„"operation"为"EDIT"æ—¶ï¼Œè°ƒç”¨çš„è¯¦æƒ…æŽ¥å£ - this.getIsEditInfo(row.id) + this.getInfo(row.id,"videoContent/getAudit/") }else{ - this.getInfo(row.refItemId); + this.getInfo(row.refItemId,"videoContent/get/"); } }, - getIsEditInfo(auditId){ - let vm = this; - vm.$https( - { - url: "videoContent/getAudit/" + auditId, - method: "get", - authType: this.backToken - } - // param - ) - .then(res => { - let data = res.data.data; - this.videoList = res.data.data.videoFileList - const arr = this.videoList - vm.FormVisible = true; - }) - .catch(function(err) { - console.log(err); - }); - }, // 获å–详情视频 - getInfo(id) { + getInfo(id,url) { let vm = this; vm.$https( { - url: "videoContent/get/" + id, + url: url + id, method: "get", authType: this.backToken } // param ) .then(res => { - let data = res.data.data; - this.videoList = res.data.data.videoFileList - const arr = this.videoList + const videos = res.data.data.videoFileList + for(var i=0;i<videos.length;i++){ + videos[i].fileUrl = Base64.decode(videos[i].intro) + } + this.videoList = videos + // this.videoList = res.data.data.videoFileList + // console.log(this.videoList[0].fileUrl,'è§†é¢‘åœ°å€ fileUrl') + // console.log(Base64.decode(this.videoList[0].intro),'解密地å€') + // console.log(this.videoList[0].intro,'åŠ å¯†åœ°å€ intro') + vm.FormVisible = true; }) .catch(function(err) { @@ -686,3 +664,4 @@ export default { @import "../../../style/table.less"; @import "../../../style/pagination.less"; </style> + */ \ No newline at end of file