| | |
| | | <header> |
| | | <div class="headerContent"> |
| | | <div class="search"> |
| | | <span>筛选条件:</span> |
| | | <div class="option"> |
| | | <el-input |
| | | v-model="searchContent" |
| | | placeholder="请输入内容" |
| | | ></el-input> |
| | | </div> |
| | | <span>上传时间:</span> |
| | | <span>上传时间:</span> |
| | | <div class="option"> |
| | | <el-date-picker |
| | | v-model="datePicked" |
| | |
| | | <div class="findBtn"> |
| | | <el-button type="primary" @click="searchVideoList">查询</el-button> |
| | | </div> |
| | | <div class="findBtn"> |
| | | <el-button type="primary" @click="handleOpera(null, 'create')">添加视频</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="addBtn"> |
| | | <el-button type="primary" @click="handleOpera(null, 'create')">新增</el-button> |
| | | </div> |
| | | </div> |
| | | </header> |
| | | <main> |
| | |
| | | <el-table |
| | | ref="multipleTable" |
| | | :header-cell-style="{ |
| | | background: '#06122c', |
| | | 'font-size': '12px', |
| | | color: '#4b9bb7', |
| | | 'font-weight': '650', |
| | | 'line-height': '45px', |
| | | }" |
| | |
| | | :row-class-name="tableRowClassName" |
| | | @selection-change="tableChange" |
| | | > |
| | | <el-table-column type="selection" min-width="5"> </el-table-column> |
| | | <el-table-column prop="baseId" label="所属事件编号" min-width="18"> |
| | | <el-table-column v-show="mystatus == 1" type="selection" min-width="5" :selectable="selectable"> </el-table-column> |
| | | <el-table-column prop="code" label="所属事件编号" min-width="18"> |
| | | </el-table-column> |
| | | <el-table-column prop="category" label="问题类别" min-width="8"> |
| | | <template slot-scope="scope"> |
| | |
| | | <template slot-scope="scope"> |
| | | <div class="operation"> |
| | | <span @click="handleOpera(scope.row, 'view')">查看</span> |
| | | <span class="line">|</span> |
| | | <span @click="handleOpera(scope.row, 'update')">修改</span> |
| | | <span class="line">|</span> |
| | | <span @click="handleDelete(scope.row)">删除</span> |
| | | <span v-if="mystatus === 2" class="line">|</span> |
| | | <span v-if="mystatus === 2" @click="handleOpera(scope.row, 'update')">修改</span> |
| | | <span v-if="mystatus === 2" class="line">|</span> |
| | | <span v-if="mystatus === 2" @click="handleDelete(scope.row)">删除</span> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <!-- 查看修改页面 --> |
| | | <el-dialog |
| | | :visible.sync="isShowDialog" |
| | | :destroy-on-close="true" |
| | | :key="dialogTitle" |
| | | width="40%" |
| | | :title="dialogTitle"> |
| | | <updateInterface :isUpdate="isUpdate" :dialogData="dialogData" @closeDialog="closeDialog" /> |
| | | <updateInterface v-if="isShowDialog" :isUpdate="isUpdate" :dialogData="dialogData" @closeDialog="closeDialog" /> |
| | | </el-dialog> |
| | | |
| | | <div class="tools"> |
| | |
| | | <el-select |
| | | v-model="myIdx" |
| | | placeholder="批量操作" |
| | | @change="selectChange" |
| | | disabled |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | |
| | | :label="item.label" |
| | | :value="item.value" |
| | | :disabled="item.disabled" |
| | | @click.native="selectChange" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | |
| | | import { CATEGOTY, EVENT_SOURCE } from "@/utils/helper"; |
| | | |
| | | export default { |
| | | name: 'video-upload-page', |
| | | components: { updateInterface }, |
| | | data() { |
| | | return { |
| | |
| | | label: "批量操作", |
| | | disabled: true, |
| | | }, |
| | | { |
| | | value: 1, |
| | | label: "批量启用", |
| | | }, |
| | | { |
| | | value: 2, |
| | | label: "批量禁用", |
| | | }, |
| | | // { |
| | | // value: 1, |
| | | // label: "批量启用", |
| | | // }, |
| | | // { |
| | | // value: 2, |
| | | // label: "批量禁用", |
| | | // }, |
| | | { |
| | | value: 3, |
| | | label: "批量删除", |
| | |
| | | typeList: [ |
| | | { |
| | | name: "摄像头推送", |
| | | value: 1, |
| | | value: "01", |
| | | checked: true, |
| | | }, |
| | | { |
| | | name: "单兵推送", |
| | | value: 2, |
| | | value: "03", |
| | | checked: false, |
| | | }, |
| | | ], |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.statusArr[0] = 6; |
| | | this.searchContent = this.typeList.find((item) => item.checked).value; |
| | | this.searchVideoList(); |
| | | this.typeList.forEach((item) => { |
| | | if (item.checked) { |
| | | this.statusArr[1] = item.value; |
| | | } |
| | | }); |
| | | }, |
| | | methods: { |
| | | // 顶部下拉框 |
| | |
| | | }, |
| | | // 批量删除 |
| | | mulDelete(idArr) { |
| | | videoManagement.deleteVideoRescources({ ids: idArr }) |
| | | .then(() => { |
| | | this.$message.success('操作成功'); |
| | | this.searchVideoList(); |
| | | }) |
| | | .catch(err => { |
| | | this.$message.error(`${err}`); |
| | | }) |
| | | this.$confirm("您确定要批量删除视频吗?") |
| | | .then((_) => { |
| | | this.$axios({ |
| | | method: "delete", |
| | | url: "/sccg/video_resources/deletion_batch?ids=" + idArr, |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "批量删除视频成功", |
| | | }); |
| | | this.searchVideoList(); |
| | | } else { |
| | | this.$message({ |
| | | type: "error", |
| | | message: res.message, |
| | | }); |
| | | } |
| | | }); |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err); |
| | | }); |
| | | }, |
| | | // 执行下拉框操作 |
| | | selectChange(list) { |
| | | if (this.tempList.length !== 0) { |
| | | if (list === 3) { |
| | | this.preMyIdx = list; |
| | | this.mulDelete(this.tempList); |
| | | } |
| | | } else { |
| | | this.myIdx = this.preMyIdx; |
| | | this.$message({ |
| | |
| | | tableChange(list) { |
| | | this.tempList = []; |
| | | list.forEach((item) => { |
| | | this.tempList.push(item.code); |
| | | this.tempList.push(item.id); |
| | | }); |
| | | this.all = list.length === this.tableData.length; |
| | | }, |
| | |
| | | }); |
| | | this.mystatus = idx + 1; |
| | | this.statusArr[1] = this.typeList[idx].value; |
| | | this.searchContent = this.typeList[idx].value; |
| | | this.searchVideoList(); |
| | | }, |
| | | // 设置表格斑马纹 |
| | | tableRowClassName({ row, rowIndex }) { |
| | |
| | | |
| | | getEventSource(value) { |
| | | return EVENT_SOURCE.find(item => item.value === value); |
| | | } |
| | | }, |
| | | selectable(row,index){ |
| | | if(this.mystatus == '1'){ |
| | | return false;//禁用状态 |
| | | }else{ |
| | | return true;//非禁用状态 |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | color: #4b9bb7; |
| | | |
| | | header { |
| | | background-color: #09152f; |
| | | background-color: white; |
| | | |
| | | .headerContent { |
| | | padding: 0 40px; |
| | |
| | | color: #1d3f57; |
| | | |
| | | &::v-deep .el-input__inner { |
| | | background-color: #09152f; |
| | | // background-color: #09152f; |
| | | border: 1px solid #17324c; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | .addBtn { |
| | | background-color: #eb5d01; |
| | | // background-color: #eb5d01; |
| | | border: none; |
| | | border-radius: 20px; |
| | | padding: 12px 30px; |
| | |
| | | } |
| | | |
| | | &::v-deep .el-input__inner { |
| | | background-color: #09152f; |
| | | // background-color: #09152f; |
| | | border: 1px solid #17324c; |
| | | } |
| | | |
| | | main { |
| | | background-color: #09152f; |
| | | // background-color: #09152f; |
| | | margin-top: 20px; |
| | | padding-bottom: 50px; |
| | | |
| | |
| | | margin-bottom: 10px; |
| | | |
| | | .type-item { |
| | | width: 80px; |
| | | min-width: 80px; |
| | | text-align: center; |
| | | padding-right: 10px; |
| | | |
| | | &:hover { |
| | | cursor: pointer; |
| | |
| | | } |
| | | |
| | | .is-active { |
| | | background-color: #070f22; |
| | | // background-color: #070f22; |
| | | border-radius: 4px; |
| | | color: #fff; |
| | | color: #333; |
| | | font-size: 500; |
| | | } |
| | | } |
| | | |
| | |
| | | &::v-deep li, |
| | | &::v-deep .btn-prev, |
| | | &::v-deep .btn-next { |
| | | background-color: #071f39; |
| | | // background-color: #071f39; |
| | | color: #4b9bb7; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | .el-table { |
| | | color: #4b9bb7; |
| | | font-size: 10px; |
| | | // color: #4b9bb7; |
| | | // font-size: 10px; |
| | | |
| | | &::v-deep .cell { |
| | | text-overflow: ellipsis; |
| | |
| | | } |
| | | |
| | | :deep(.el-range-input) { |
| | | background-color: #09152f; |
| | | // background-color: #09152f; |
| | | } |
| | | } |
| | | </style> |