|
@@ -84,10 +84,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>
|
|
@@ -112,20 +114,6 @@
|
|
|
style="width: 280px"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item label="">
|
|
|
- <el-select
|
|
|
- v-permission="permissionBtn.smartReportManageBtn.reportManage_reportList_sendTime"
|
|
|
- @change="search"
|
|
|
- v-model.number="searchform.msgIsSend"
|
|
|
- placeholder="推送消息状态"
|
|
|
- size="medium"
|
|
|
- clearable
|
|
|
- style="width: 140px"
|
|
|
- >
|
|
|
- <el-option label="未推送消息" :value="1"></el-option>
|
|
|
- <el-option label="已推送消息" :value="2"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item> -->
|
|
|
<el-form-item style="flex:1;text-align:right;">
|
|
|
<el-input
|
|
|
@input="search"
|
|
@@ -217,10 +205,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>
|
|
|
<el-table-column v-if="!isApprove"
|
|
@@ -239,26 +229,16 @@
|
|
|
</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>
|
|
|
- <!-- <el-table-column v-if="permissionBtn.checkPermissionBtn(permissionBtn.smartReportManageBtn.reportManage_reportList_sendTime)"
|
|
|
- prop="MsgSendTime"
|
|
|
- label="报告推送时间"
|
|
|
- min-width="124"
|
|
|
- align="center"
|
|
|
- >
|
|
|
- <template slot-scope="scope">{{
|
|
|
- scope.row.MsgSendTime | formatTime
|
|
|
- }}</template>
|
|
|
- </el-table-column> -->
|
|
|
<el-table-column
|
|
|
prop="ContentModifyTime"
|
|
|
label="更新时间"
|
|
@@ -285,108 +265,49 @@
|
|
|
<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.smartReportManageBtn.reportManage_publish"
|
|
|
- class="editsty" @click="handlePublishReportOpt(scope.row)"
|
|
|
- v-if="scope.row.CanEdit">发布</span>
|
|
|
- <span v-permission="permissionBtn.smartReportManageBtn.reportManage_reportEdit"
|
|
|
- class="editsty" @click="editreport(scope.row, 'edit')"
|
|
|
- v-if="scope.row.CanEdit">编辑</span>
|
|
|
- <span v-permission="permissionBtn.smartReportManageBtn.reportManage_reportEdit"
|
|
|
- class="editsty" @click="editreport(scope.row, 'editing')"
|
|
|
- v-else>{{ scope.row.Editor || "" }}编辑中...</span>
|
|
|
- <span v-permission="permissionBtn.smartReportManageBtn.reportManage_reportDel"
|
|
|
- class="deletesty" @click="handleDelReport(scope.row)"
|
|
|
- v-if="scope.row.CanEdit">删除</span>
|
|
|
- </template>
|
|
|
- <template v-if="scope.row.State == 2">
|
|
|
- <span
|
|
|
- v-if="permissionBtn.checkPermissionBtn(permissionBtn.smartReportManageBtn.reportManage_cancelPublish)"
|
|
|
- @click="handleReportPublishCancel(scope.row)"
|
|
|
- style="color: red; cursor: pointer"
|
|
|
- >取消发布</span>
|
|
|
- <span
|
|
|
- v-if="scope.row.DetailImgUrl"
|
|
|
- v-permission="permissionBtn.smartReportManageBtn.reportManage_reportView_exportImg"
|
|
|
- @click="handleDownReportImg(scope.row.DetailImgUrl,scope.row.Title)"
|
|
|
- style="cursor: pointer; color: #4099ef;display:inline-block"
|
|
|
- >图片下载</span>
|
|
|
- <!-- <span
|
|
|
- v-if="scope.row.MsgIsSend == 0 && permissionBtn.checkPermissionBtn(permissionBtn.smartReportManageBtn.reportManage_sendMsg)"
|
|
|
- style="color: #4099ef; cursor: pointer"
|
|
|
- @click="handleSendMsg(scope.row)"
|
|
|
- >推送消息</span
|
|
|
- >
|
|
|
- <span v-else-if="scope.row.MsgIsSend != 0&&permissionBtn.checkPermissionBtn(permissionBtn.smartReportManageBtn.reportManage_sendMsg)"
|
|
|
- style="color: red">已推送消息</span> -->
|
|
|
- </template>
|
|
|
- <span style="color: #46c371; cursor: pointer;display:inline-block"
|
|
|
- v-if="permissionBtn.checkPermissionBtn(permissionBtn.smartReportManageBtn.reportManage_audioUpload)"
|
|
|
- @click="openupload(scope.row.SmartReportId)">音频上传</span>
|
|
|
- <span style="cursor: pointer; color: #4099ef;display:inline-block"
|
|
|
- v-permission="permissionBtn.smartReportManageBtn.reportManage_audioDownload"
|
|
|
- v-if="scope.row.VideoUrl" @click="handleDownloadVoice(scope.row)">
|
|
|
- 音频下载
|
|
|
- </span>
|
|
|
- <!-- <a
|
|
|
- v-permission="permissionBtn.smartReportManageBtn.reportManage_audioDownload"
|
|
|
- :href="scope.row.VideoUrl"
|
|
|
- v-if="scope.row.VideoUrl"
|
|
|
- :download="scope.row.VideoName"
|
|
|
- style="cursor: pointer; color: #4099ef"
|
|
|
- >音频下载</a
|
|
|
- > -->
|
|
|
+ <!-- 操作:
|
|
|
+ 已发布——取消发布、下载图片
|
|
|
+ 未发布——发布、编辑、删除
|
|
|
+ 待提交——提交、编辑、删除
|
|
|
+ 待审批——撤销
|
|
|
+ 已通过——撤销、下载图片
|
|
|
+ 已驳回——撤销 -->
|
|
|
+ <!-- 未发布,待提交 -->
|
|
|
+ <template v-if="[1,3].includes(scope.row.State)">
|
|
|
+ <span v-permission="permissionBtn.smartReportManageBtn.reportManage_publish"
|
|
|
+ class="editsty" @click="handlePublishReportOpt(scope.row)"
|
|
|
+ v-if="scope.row.CanEdit&&scope.row.State===1">发布</span>
|
|
|
+ <span v-permission="permissionBtn.smartReportManageBtn.reportManage_publish"
|
|
|
+ class="editsty" @click="handleSubmitReport(scope.row)"
|
|
|
+ v-if="scope.row.CanEdit&&scope.row.State===3">提交</span>
|
|
|
+ <span v-permission="permissionBtn.smartReportManageBtn.reportManage_reportEdit"
|
|
|
+ class="editsty" @click="editreport(scope.row, 'edit')"
|
|
|
+ v-if="scope.row.CanEdit">编辑</span>
|
|
|
+ <span v-permission="permissionBtn.smartReportManageBtn.reportManage_reportEdit"
|
|
|
+ class="editsty" @click="editreport(scope.row, 'editing')"
|
|
|
+ v-else>{{ scope.row.Editor || "" }}编辑中...</span>
|
|
|
+ <span v-permission="permissionBtn.smartReportManageBtn.reportManage_reportDel"
|
|
|
+ class="deletesty" @click="handleDelReport(scope.row)"
|
|
|
+ v-if="scope.row.CanEdit">删除</span>
|
|
|
</template>
|
|
|
- <!-- 走审批流的按钮 -->
|
|
|
- <template v-if="isApprove">
|
|
|
- <!-- 待提交 -->
|
|
|
- <template v-if="scope.row.State == 1">
|
|
|
- <span v-permission="permissionBtn.smartReportManageBtn.reportManage_publish"
|
|
|
- class="editsty" @click="handlePublishReportOpt(scope.row)"
|
|
|
- v-if="scope.row.CanEdit">提交</span>
|
|
|
- <span v-permission="permissionBtn.smartReportManageBtn.reportManage_reportEdit"
|
|
|
- class="editsty" @click="editreport(scope.row, 'edit')"
|
|
|
- v-if="scope.row.CanEdit">编辑</span>
|
|
|
- <span v-permission="permissionBtn.smartReportManageBtn.reportManage_reportEdit"
|
|
|
- class="editsty" @click="editreport(scope.row, 'editing')"
|
|
|
- v-else>{{ scope.row.Editor || "" }}编辑中...</span>
|
|
|
- <span v-permission="permissionBtn.smartReportManageBtn.reportManage_reportDel"
|
|
|
- class="deletesty" @click="handleDelReport(scope.row)"
|
|
|
- v-if="scope.row.CanEdit">删除</span>
|
|
|
- </template>
|
|
|
- <!--已提交(待审批,已审批)-->
|
|
|
- <template v-if="[2,4].includes(scope.row.State)">
|
|
|
- <span
|
|
|
- v-if="permissionBtn.checkPermissionBtn(permissionBtn.smartReportManageBtn.reportManage_cancelPublish)"
|
|
|
- @click="handleReportPublishCancel(scope.row)"
|
|
|
- style="color: red; cursor: pointer">撤销
|
|
|
- </span>
|
|
|
- <span
|
|
|
- v-if="scope.row.DetailImgUrl&&scope.row.State===4"
|
|
|
- v-permission="permissionBtn.smartReportManageBtn.reportManage_reportView_exportImg"
|
|
|
- @click="handleDownReportImg(scope.row.DetailImgUrl,scope.row.Title)"
|
|
|
- style="cursor: pointer; color: #4099ef;display:inline-block"
|
|
|
- >图片下载</span>
|
|
|
- </template>
|
|
|
- <!--已驳回则只显示撤销按钮-->
|
|
|
- <template v-if="scope.row.State===3">
|
|
|
- <span v-permission="permissionBtn.smartReportManageBtn.reportManage_publish"
|
|
|
+ <!-- 已发布,已通过 -->
|
|
|
+ <template v-if="[2,6].includes(scope.row.State)">
|
|
|
+ <span v-if="permissionBtn.isShowBtn('smartReportManageBtn','reportManage_cancelPublish')&&scope.row.State===2"
|
|
|
@click="handleReportPublishCancel(scope.row)"
|
|
|
- class="editsty">撤销</span>
|
|
|
- </template>
|
|
|
- <!--音频上传/下载 按原先逻辑-->
|
|
|
- <template v-if="scope.row.State!==3">
|
|
|
- <span style="color: #46c371; cursor: pointer;display:inline-block"
|
|
|
- v-if="permissionBtn.checkPermissionBtn(permissionBtn.smartReportManageBtn.reportManage_audioUpload)"
|
|
|
- @click="openupload(scope.row.SmartReportId)">音频上传</span>
|
|
|
- <span style="cursor: pointer; color: #4099ef;display:inline-block"
|
|
|
- v-permission="permissionBtn.smartReportManageBtn.reportManage_audioDownload"
|
|
|
- v-if="scope.row.VideoUrl" @click="handleDownloadVoice(scope.row)">
|
|
|
- 音频下载
|
|
|
- </span>
|
|
|
- </template>
|
|
|
+ style="color: red; cursor: pointer">取消发布</span>
|
|
|
+ <span v-if="permissionBtn.isShowBtn('smartReportManageBtn','reportManage_cancelPublish')&&scope.row.State===6"
|
|
|
+ @click="cancelReport(scope.row)"
|
|
|
+ style="color: red; cursor: pointer">撤销</span>
|
|
|
+ <span v-if="scope.row.DetailImgUrl"
|
|
|
+ v-permission="permissionBtn.smartReportManageBtn.reportManage_reportView_exportImg"
|
|
|
+ @click="handleDownReportImg(scope.row.DetailImgUrl,scope.row.Title)"
|
|
|
+ style="cursor: pointer; color: #4099ef;display:inline-block">图片下载</span>
|
|
|
+ </template>
|
|
|
+ <!-- 待审批,已驳回 -->
|
|
|
+ <template v-if="[4,5].includes(scope.row.State)">
|
|
|
+ <span v-if="permissionBtn.isShowBtn('smartReportManageBtn','reportManage_cancelPublish')"
|
|
|
+ @click="cancelReport(scope.row)"
|
|
|
+ style="color: red; cursor: pointer">撤销</span>
|
|
|
</template>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -522,8 +443,11 @@
|
|
|
<script>
|
|
|
import { voiceupload } from "api/api.js";
|
|
|
import {apiSmartReport} from '@/api/modules/smartReport'
|
|
|
+import {approveInterence} from '@/api/modules/approve.js';
|
|
|
+import reportApproveConfig from "@/mixins/reportApproveConfig.js"
|
|
|
import BaseInfo from './components/BaseInfo.vue'
|
|
|
export default {
|
|
|
+ mixins:[reportApproveConfig],
|
|
|
components:{BaseInfo},
|
|
|
computed:{
|
|
|
Role() {
|
|
@@ -534,13 +458,6 @@ export default {
|
|
|
hasUV(){
|
|
|
return this.permissionBtn.checkPermissionBtn(this.permissionBtn.smartReportManageBtn.reportManage_reportList_uv)
|
|
|
},
|
|
|
- //是否开启审批流,若开启,发布相关按钮,筛选项改变
|
|
|
- isApprove(){
|
|
|
- const type = this.$setting.dynamicOutLinks.ApprovalFlow ||
|
|
|
- this.$store.state.dynamicOutLinks.ApprovalFlow ||
|
|
|
- JSON.parse(localStorage.getItem('dynamicOutLinks')).ApprovalFlow||''
|
|
|
- return ['2','3'].includes(type)
|
|
|
- }
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -685,6 +602,25 @@ export default {
|
|
|
this.isDSFB=false
|
|
|
this.showPublish=false
|
|
|
},
|
|
|
+ //提交报告
|
|
|
+ handleSubmitReport(item){
|
|
|
+ approveInterence.reportSmartSubmit({
|
|
|
+ ReportId:Number(item.SmartReportId)
|
|
|
+ }).then(res=>{
|
|
|
+ if(res.Ret!==200) return
|
|
|
+ this.$message.success("提交成功")
|
|
|
+ this.getReportList()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ cancelReport(item){
|
|
|
+ approveInterence.reportSmartCancel({
|
|
|
+ ReportId:Number(item.SmartReportId)
|
|
|
+ }).then(res=>{
|
|
|
+ if(res.Ret!==200) return
|
|
|
+ this.$message.success("撤销成功")
|
|
|
+ this.getReportList()
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
//编辑报告
|
|
|
async editreport(item, type){
|