| | |
| | | :row-class-name="tableRowClassName" |
| | | @selection-change="tableChange" |
| | | > |
| | | <el-table-column type="selection" min-width="5"> </el-table-column> |
| | | <el-table-column 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"> |
| | |
| | | >查看</span |
| | | > |
| | | <span v-if="mystatus === 3" class="line">|</span> |
| | | <span v-if="mystatus === 3" @click="handleUpdateImageResource(scope.row, 'update')" |
| | | <span v-if="mystatus === 3" @click="handleUdeletepdateImageResource(scope.row, 'update')" |
| | | >修改</span |
| | | > |
| | | <span v-if="mystatus === 3" class="line">|</span> |
| | |
| | | <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> |
| | |
| | | label: "批量操作", |
| | | disabled: true, |
| | | }, |
| | | { |
| | | value: 1, |
| | | label: "批量启用", |
| | | }, |
| | | { |
| | | value: 2, |
| | | label: "批量禁用", |
| | | }, |
| | | // { |
| | | // value: 1, |
| | | // label: "批量启用", |
| | | // }, |
| | | // { |
| | | // value: 2, |
| | | // label: "批量禁用", |
| | | // }, |
| | | { |
| | | value: 3, |
| | | label: "批量删除", |
| | |
| | | |
| | | // 批量删除 |
| | | mulDelete(idArr) { |
| | | imageManagement |
| | | .deleteImageResources({ ids: idArr }) |
| | | .then(() => { |
| | | this.$message.success("操作成功"); |
| | | this.getImageResourceList(); |
| | | }) |
| | | .catch((err) => this.$message.error(`${err}`)); |
| | | this.$confirm("您确定要批量删除图片吗?") |
| | | .then((_) => { |
| | | this.$axios({ |
| | | method: "delete", |
| | | url: "/sccg/image_resources/deletion_batch?ids=" + idArr, |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "批量删除图片成功", |
| | | }); |
| | | this.getImageResourceList(); |
| | | } else { |
| | | this.$message({ |
| | | type: "error", |
| | | message: res.message, |
| | | }); |
| | | } |
| | | }); |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err); |
| | | }); |
| | | }, |
| | | // 执行下拉框操作 |
| | | selectChange(list) { |
| | | debugger |
| | | 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; |
| | | }, |
| | |
| | | getEventSource(value) { |
| | | return EVENT_SOURCE.find((item) => item.value === value); |
| | | }, |
| | | selectable(row,index){ |
| | | if(this.mystatus == '1'){ |
| | | return false;//禁用状态 |
| | | }else{ |
| | | return true;//非禁用状态 |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | :row-class-name="tableRowClassName" |
| | | @selection-change="tableChange" |
| | | > |
| | | <el-table-column type="selection" min-width="5"> </el-table-column> |
| | | <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"> |
| | |
| | | <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> |
| | |
| | | label: "批量操作", |
| | | disabled: true, |
| | | }, |
| | | { |
| | | value: 1, |
| | | label: "批量启用", |
| | | }, |
| | | { |
| | | value: 2, |
| | | label: "批量禁用", |
| | | }, |
| | | // { |
| | | // value: 1, |
| | | // label: "批量启用", |
| | | // }, |
| | | // { |
| | | // value: 2, |
| | | // label: "批量禁用", |
| | | // }, |
| | | { |
| | | value: 3, |
| | | label: "批量删除", |
| | |
| | | }, |
| | | // 批量删除 |
| | | 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; |
| | | }, |
| | |
| | | |
| | | getEventSource(value) { |
| | | return EVENT_SOURCE.find(item => item.value === value); |
| | | } |
| | | }, |
| | | selectable(row,index){ |
| | | if(this.mystatus == '1'){ |
| | | return false;//禁用状态 |
| | | }else{ |
| | | return true;//非禁用状态 |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |