|
@@ -82,20 +82,7 @@
|
|
|
style="width:100%;"
|
|
|
></el-cascader>
|
|
|
</div>
|
|
|
- <div class="select-item" v-if="!isApprove">
|
|
|
- <el-select
|
|
|
- v-model.number="searchform.publishState"
|
|
|
- placeholder="发布筛选"
|
|
|
- size="medium"
|
|
|
- clearable
|
|
|
- style="width:100%;"
|
|
|
- @change="search"
|
|
|
- >
|
|
|
- <el-option label="已发布" :value="2"></el-option>
|
|
|
- <el-option label="未发布" :value="1"></el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- <div class="select-item" v-if="isApprove">
|
|
|
+ <div class="select-item">
|
|
|
<el-select
|
|
|
v-model.number="searchform.publishState"
|
|
|
placeholder="状态筛选"
|
|
@@ -104,10 +91,12 @@
|
|
|
style="width:100%;"
|
|
|
@change="search"
|
|
|
>
|
|
|
- <el-option label="待提交" :value="1"></el-option>
|
|
|
- <el-option label="待审批" :value="2"></el-option>
|
|
|
- <el-option label="已审批" :value="4"></el-option>
|
|
|
- <el-option label="已驳回" :value="3"></el-option>
|
|
|
+ <el-option label="未发布" :value="1"></el-option>
|
|
|
+ <el-option label="已发布" :value="2"></el-option>
|
|
|
+ <el-option label="待提交" :value="3"></el-option>
|
|
|
+ <el-option label="待审批" :value="4"></el-option>
|
|
|
+ <el-option label="已驳回" :value="5"></el-option>
|
|
|
+ <el-option label="已通过" :value="6"></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="select-item">
|
|
@@ -237,10 +226,12 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="状态" align="center" v-if="isApprove">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.State == '1'">待提交</span>
|
|
|
- <span v-if="scope.row.State == '2'">待审批</span>
|
|
|
- <span v-if="scope.row.State == '4'">已审批</span>
|
|
|
- <span v-if="scope.row.State == '3'">已驳回</span>
|
|
|
+ <span v-if="scope.row.State == '1'">未发布</span>
|
|
|
+ <span v-if="scope.row.State == '2'">已发布</span>
|
|
|
+ <span v-if="scope.row.State == '3'">待提交</span>
|
|
|
+ <span v-if="scope.row.State == '4'">待审批</span>
|
|
|
+ <span v-if="scope.row.State == '5'">已驳回</span>
|
|
|
+ <span v-if="scope.row.State == '6'">已通过</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
@@ -261,14 +252,14 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
v-if="isApprove"
|
|
|
- prop="PublishTime"
|
|
|
+ prop="ApproveTime"
|
|
|
label="审批时间"
|
|
|
min-width="124"
|
|
|
align="center"
|
|
|
:formatter="formatterColumn"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{scope.row.PrePublishTime?scope.row.PrePublishTime:scope.row.PublishTime|formatTime}}</span>
|
|
|
+ <span>{{scope.row.ApproveTime|formatTime}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
@@ -314,96 +305,62 @@
|
|
|
<el-table-column label="操作" align="center" min-width="130" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<div class="opt-btns">
|
|
|
- <!--不走审批流的按钮-->
|
|
|
- <template v-if="!isApprove">
|
|
|
- <template v-if="scope.row.State == 1">
|
|
|
- <span v-permission="permissionBtn.reportManageBtn.reportManage_publish" class="editsty"
|
|
|
- @click="publishreport(scope.row)" v-if="scope.row.CanEdit">发布</span>
|
|
|
- <span v-permission="permissionBtn.reportManageBtn.reportManage_reportEdit" class="editsty"
|
|
|
- @click="editreport(scope.row, 'edit')" v-if="scope.row.CanEdit">编辑</span>
|
|
|
- <span v-permission="permissionBtn.reportManageBtn.reportManage_reportEdit" class="editsty"
|
|
|
- @click="editreport(scope.row, 'editing')" v-else>{{ scope.row.Editor || "" }}编辑中...</span>
|
|
|
- <span v-permission="permissionBtn.reportManageBtn.reportManage_reportDel" class="deletesty"
|
|
|
- @click="deleteitem(scope.row)" v-if="scope.row.CanEdit">删除</span>
|
|
|
- </template>
|
|
|
- <template v-if="scope.row.State == 2">
|
|
|
- <span
|
|
|
- v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_cancelPublish)"
|
|
|
- @click="canclepublish(scope.row)" style="color: red; cursor: pointer">取消发布</span>
|
|
|
- <span
|
|
|
- v-if="scope.row.MsgIsSend == 0 && permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_sendMsg)"
|
|
|
- style="color: #4099ef; cursor: pointer" @click="messageSend(scope.row)">推送消息</span>
|
|
|
- <span
|
|
|
- v-else-if="scope.row.MsgIsSend != 0&&permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_sendMsg)"
|
|
|
- style="color: red">已推送消息</span>
|
|
|
- </template>
|
|
|
- <span style="color: #46c371; cursor: pointer"
|
|
|
- v-if="!['晨报', '周报'].includes(scope.row.ClassifyNameFirst)&&permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_audioUpload)"
|
|
|
- @click="openupload(scope.row.Id)">音频上传</span>
|
|
|
- <a v-permission="permissionBtn.reportManageBtn.reportManage_audioDownload"
|
|
|
- :href="hostapi + '?ReportId=' + parseInt(scope.row.Id)" v-if="
|
|
|
- scope.row.VideoUrl &&
|
|
|
- !['晨报', '周报'].includes(scope.row.ClassifyNameFirst)
|
|
|
- " :download="scope.row.VideoName" style="cursor: pointer; color: #4099ef">音频下载</a>
|
|
|
- <span v-permission="permissionBtn.reportManageBtn.reportManage_audioDownload"
|
|
|
- style="cursor: pointer; color: #4099ef" v-if="
|
|
|
- ['晨报', '周报'].includes(scope.row.ClassifyNameFirst) &&
|
|
|
- scope.row.ChapterVideoList.length > 0
|
|
|
- " @click="handleShowDownloadAudio(scope.row)">音频下载</span>
|
|
|
+ <!-- 操作:未发布——发布、编辑、删除
|
|
|
+ 已发布——取消发布、推送消息/已推送消息
|
|
|
+ 待提交——提交、编辑、删除
|
|
|
+ 待审批——撤销
|
|
|
+ 已通过——撤销、推送消息/已推送消息
|
|
|
+ 已驳回——撤销
|
|
|
+ -->
|
|
|
+ <!-- 未发布,待提交 -->
|
|
|
+ <template v-if="[1,3].includes(scope.row.State)">
|
|
|
+ <span class="editsty" @click="publishreport(scope.row)"
|
|
|
+ v-if="scope.row.CanEdit&&scope.row.State===1
|
|
|
+ &&permissionBtn.isShowBtn('reportManageBtn','reportManage_publish')"
|
|
|
+ >发布</span>
|
|
|
+ <span class="editsty" @click="handleSubmitReport(scope.row)"
|
|
|
+ v-if="scope.row.CanEdit&&scope.row.State===3
|
|
|
+ &&permissionBtn.isShowBtn('reportManageBtn','reportManage_publish')"
|
|
|
+ >提交</span>
|
|
|
+ <span v-permission="permissionBtn.reportManageBtn.reportManage_reportEdit" class="editsty"
|
|
|
+ @click="editreport(scope.row, 'edit')" v-if="scope.row.CanEdit">编辑</span>
|
|
|
+ <span v-permission="permissionBtn.reportManageBtn.reportManage_reportEdit" class="editsty"
|
|
|
+ @click="editreport(scope.row, 'editing')" v-else>{{ scope.row.Editor || "" }}编辑中...</span>
|
|
|
+ <span v-permission="permissionBtn.reportManageBtn.reportManage_reportDel" class="deletesty"
|
|
|
+ @click="deleteitem(scope.row)" v-if="scope.row.CanEdit">删除</span>
|
|
|
</template>
|
|
|
- <!--走审批流的按钮,权限与原先按钮对应-->
|
|
|
- <template v-if="isApprove">
|
|
|
- <!--待提交-->
|
|
|
- <template v-if="scope.row.State===1">
|
|
|
- <span v-permission="permissionBtn.reportManageBtn.reportManage_publish"
|
|
|
- @click="publishreport(scope.row)"
|
|
|
- class="editsty">提交</span>
|
|
|
- <span v-permission="permissionBtn.reportManageBtn.reportManage_reportEdit" class="editsty"
|
|
|
- @click="editreport(scope.row, 'edit')" v-if="scope.row.CanEdit">编辑</span>
|
|
|
- <span v-permission="permissionBtn.reportManageBtn.reportManage_reportEdit" class="editsty"
|
|
|
- @click="editreport(scope.row, 'editing')" v-else>{{ scope.row.Editor || "" }}编辑中...</span>
|
|
|
- <span v-permission="permissionBtn.reportManageBtn.reportManage_reportDel" class="deletesty"
|
|
|
- @click="deleteitem(scope.row)" v-if="scope.row.CanEdit">删除</span>
|
|
|
- </template>
|
|
|
- <!--已提交(待审批,已审批)-->
|
|
|
- <template v-if="[2,4].includes(scope.row.State)">
|
|
|
- <span
|
|
|
- v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_cancelPublish)"
|
|
|
- @click="canclepublish(scope.row)"
|
|
|
- class="editsty">撤销</span>
|
|
|
- <template v-if="scope.row.State!==2">
|
|
|
- <span
|
|
|
- v-if="scope.row.MsgIsSend == 0 && permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_sendMsg)"
|
|
|
- style="color: #4099ef; cursor: pointer" @click="messageSend(scope.row)">推送消息</span>
|
|
|
- <span
|
|
|
- v-else-if="scope.row.MsgIsSend != 0&&permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_sendMsg)"
|
|
|
- style="color: red">已推送消息</span>
|
|
|
- </template>
|
|
|
- </template>
|
|
|
-
|
|
|
- <!--已驳回则只显示撤销按钮-->
|
|
|
- <template v-if="scope.row.State===3">
|
|
|
- <span v-permission="permissionBtn.reportManageBtn.reportManage_publish"
|
|
|
- @click="canclepublish(scope.row)"
|
|
|
- class="editsty">撤销</span>
|
|
|
- </template>
|
|
|
- <!--音频上传/下载 按原先逻辑-->
|
|
|
- <template v-if="scope.row.State!==3">
|
|
|
- <span style="color: #46c371; cursor: pointer"
|
|
|
- v-if="!['晨报', '周报'].includes(scope.row.ClassifyNameFirst)&&permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_audioUpload)"
|
|
|
- @click="openupload(scope.row.Id)">音频上传</span>
|
|
|
- <a v-permission="permissionBtn.reportManageBtn.reportManage_audioDownload"
|
|
|
- :href="hostapi + '?ReportId=' + parseInt(scope.row.Id)" v-if="
|
|
|
- scope.row.VideoUrl &&
|
|
|
- !['晨报', '周报'].includes(scope.row.ClassifyNameFirst)
|
|
|
- " :download="scope.row.VideoName" style="cursor: pointer; color: #4099ef">音频下载</a>
|
|
|
- <span v-permission="permissionBtn.reportManageBtn.reportManage_audioDownload"
|
|
|
- style="cursor: pointer; color: #4099ef" v-if="
|
|
|
- ['晨报', '周报'].includes(scope.row.ClassifyNameFirst) &&
|
|
|
- scope.row.ChapterVideoList.length > 0
|
|
|
- " @click="handleShowDownloadAudio(scope.row)">音频下载</span>
|
|
|
- </template>
|
|
|
+ <!-- 已发布,已通过 -->
|
|
|
+ <template v-if="[2,6].includes(scope.row.State)">
|
|
|
+ <span v-if="scope.row.State===2&&permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_cancelPublish)"
|
|
|
+ @click="canclepublish(scope.row)" style="color: red; cursor: pointer">取消发布</span>
|
|
|
+ <span v-if="scope.row.State===4&&permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_cancelPublish)"
|
|
|
+ @click="cancelReport(scope.row)" style="color: red; cursor: pointer">撤销</span>
|
|
|
+ <span
|
|
|
+ v-if="scope.row.MsgIsSend == 0 && permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_sendMsg)"
|
|
|
+ style="color: #4099ef; cursor: pointer" @click="messageSend(scope.row)">推送消息</span>
|
|
|
+ <span
|
|
|
+ v-else-if="scope.row.MsgIsSend != 0&&permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_sendMsg)"
|
|
|
+ style="color: red">已推送消息</span>
|
|
|
+ </template>
|
|
|
+ <!-- 待审批,已驳回 -->
|
|
|
+ <template v-if="[4,5].includes(scope.row.State)">
|
|
|
+ <span v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_cancelPublish)"
|
|
|
+ @click="cancelReport(scope.row)" style="color: red; cursor: pointer">撤销</span>
|
|
|
</template>
|
|
|
+ <!-- 音频上传和下载,跟State无关 -->
|
|
|
+ <span style="color: #46c371; cursor: pointer"
|
|
|
+ v-if="!['晨报', '周报'].includes(scope.row.ClassifyNameFirst)&&permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_audioUpload)"
|
|
|
+ @click="openupload(scope.row.Id)">音频上传</span>
|
|
|
+ <a v-permission="permissionBtn.reportManageBtn.reportManage_audioDownload"
|
|
|
+ :href="hostapi + '?ReportId=' + parseInt(scope.row.Id)" v-if="
|
|
|
+ scope.row.VideoUrl &&
|
|
|
+ !['晨报', '周报'].includes(scope.row.ClassifyNameFirst)
|
|
|
+ " :download="scope.row.VideoName" style="cursor: pointer; color: #4099ef">音频下载</a>
|
|
|
+ <span v-permission="permissionBtn.reportManageBtn.reportManage_audioDownload"
|
|
|
+ style="cursor: pointer; color: #4099ef" v-if="
|
|
|
+ ['晨报', '周报'].includes(scope.row.ClassifyNameFirst) &&
|
|
|
+ scope.row.ChapterVideoList.length > 0
|
|
|
+ " @click="handleShowDownloadAudio(scope.row)">音频下载</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -621,6 +578,13 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <SubmitReportDialog
|
|
|
+ :showSubmit="showSubmit"
|
|
|
+ :canPushMsg="canPushMsgInApprove"
|
|
|
+ @close="showSubmit=false"
|
|
|
+ @submit="submitReport('submit')"
|
|
|
+ @both="submitReport('both')"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -638,7 +602,12 @@ import {
|
|
|
reportMessageSend,
|
|
|
weekReportValidAudio,
|
|
|
} from "api/api.js";
|
|
|
+import {approveInterence} from '@/api/modules/approve.js';
|
|
|
+import reportApproveConfig from "@/mixins/reportApproveConfig.js"
|
|
|
+import SubmitReportDialog from "./components/submitReportDialog.vue";
|
|
|
export default {
|
|
|
+ mixins:[reportApproveConfig],
|
|
|
+ components:{SubmitReportDialog},
|
|
|
computed: {
|
|
|
exportUrlDl() {
|
|
|
let url = this.exportUrl;
|
|
@@ -672,13 +641,6 @@ export default {
|
|
|
hasUV(){
|
|
|
return this.permissionBtn.checkPermissionBtn(this.permissionBtn.reportManageBtn.reportManage_reportList_uv)
|
|
|
},
|
|
|
- //是否开启审批流,若开启,发布相关按钮,筛选项改变
|
|
|
- isApprove(){
|
|
|
- const type = this.$setting.dynamicOutLinks.ApprovalFlow ||
|
|
|
- this.$store.state.dynamicOutLinks.ApprovalFlow ||
|
|
|
- JSON.parse(localStorage.getItem('dynamicOutLinks')).ApprovalFlow||''
|
|
|
- return ['1','3'].includes(type)
|
|
|
- }
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -725,9 +687,11 @@ export default {
|
|
|
showPublish: false,
|
|
|
isDSFB:false,//是否为定时发布
|
|
|
tableKey:0,
|
|
|
- selectNum:1
|
|
|
+ selectNum:1,
|
|
|
|
|
|
- //isApprove:false,//是否开启审批流,若开启,发布相关按钮,筛选项改变
|
|
|
+ showSubmit:false, //提交询问弹窗是否展示
|
|
|
+ submitId:0,//当前选择的报告id
|
|
|
+ canPushMsgInApprove:false,//是否能够推送
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -1065,6 +1029,39 @@ export default {
|
|
|
this.batches = [];
|
|
|
this.showPublish = false;
|
|
|
},
|
|
|
+ //提交报告
|
|
|
+ handleSubmitReport(item){
|
|
|
+ this.submitId = item.Id
|
|
|
+ this.showSubmit=true
|
|
|
+ this.canPushMsgInApprove = item.MsgIsSend===0
|
|
|
+ },
|
|
|
+ submitReport(type){
|
|
|
+ //both:提交&推送
|
|
|
+ if(type==='submit'){
|
|
|
+ approveInterence.reportCnSubmit({
|
|
|
+ ReportId:Number(this.submitId)
|
|
|
+ }).then(res=>{
|
|
|
+ if(res.Ret!==200) return
|
|
|
+ this.$message.success("提交成功")
|
|
|
+ this.getlist()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //撤销提交报告
|
|
|
+ cancelReport(item){
|
|
|
+ this.$confirm("你确定要撤销申请吗?","提示",{
|
|
|
+ confirmButtonText:'确定',
|
|
|
+ cancelButtonText:'取消'
|
|
|
+ }).then(()=>{
|
|
|
+ approveInterence.reportCnCancel({
|
|
|
+ ReportId:Number(item.Id)
|
|
|
+ }).then(res=>{
|
|
|
+ if(res.Ret!==200) return
|
|
|
+ this.$message.success("撤销成功")
|
|
|
+ this.getlist()
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
selectchange(val) {
|
|
|
//多选操作
|