| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479 |
- <template>
- <el-dialog title="任务处理" :visible.sync="dialogVisible" :close-on-click-modal="false" width="90%"
- @close="closeDialog">
- <el-row>
- <el-col :span="13" ref="col1">
- <el-tabs v-model="activeName" @tab-click="handleClick">
- <el-tab-pane :label="tab.label" :name="tab.value" v-for="tab in tabList" :key="tab.value">
- <component :is="tab.value" :taskInstId="taskInstId" :procInstId="procInstId"
- :problemId="problemId" :id="provId" :formDataUrl="updateObj.formDataUrl" :isDcOrJc="isDcOrJc"
- @sendActionLinks="sendActionLinks"></component>
- </el-tab-pane>
- </el-tabs>
- </el-col>
- <el-col :span="11" ref="col2">
- <div class="right_wrapper">
- <h3><span></span>任务处理</h3>
- <el-form ref="form" :model="updateObj" label-width="180px">
- <el-form-item label="流程名称:">
- <span>{{updateObj.nodeName?updateObj.nodeName.replace(/-null/g,"").replace(/:null/g,""):""}}</span>
- </el-form-item>
- <el-form-item label="任务名称:">
- <span>{{updateObj.procInstName?updateObj.procInstName.replace(/-null/g,"").replace(/:null/g,""):""}}</span>
- </el-form-item>
- <el-form-item label="整改状态" style="display: inline-block;">
- <el-select v-model="rectificationObj.rectification" placeholder="请选择" :disabled="!showFeedbackBtn || !isOp">
- <el-option value="0" label="未整改"></el-option>
- <el-option value="1" label="整改中"></el-option>
- <el-option value="2" label="已整改"></el-option>
- <el-option value="3" label="不具备整改条件"></el-option>
- </el-select>
- <el-button v-if="showFeedbackBtn && isOp" type="primary" @click="showRec('rectification')">上传整改佐证材料<i class="el-icon-upload el-icon--right"></i></el-button>
- </el-form-item>
- <el-form-item label="整改措施">
- <el-input type="textarea" :row="5" v-model="rectificationObj.rectificationNote" :disabled="!showFeedbackBtn || !isOp"></el-input>
- </el-form-item>
- <el-form-item label="整改完成时间" v-if="rectificationObj.rectification=='2'">
- <el-date-picker
- v-model="rectificationObj.pblmCrtm"
- type="date"
- :disabled="!showFeedbackBtn || !isOp"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="整改完成时间">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="预计完成时间" v-if="rectificationObj.rectification=='1'">
- <el-date-picker
- v-model="rectificationObj.pblmPltm"
- type="date"
- :disabled="!showFeedbackBtn || !isOp"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="预计完成时间">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="整改佐证材料">
- <div style="width: 100%;">
- <a :href="`${hostUrl}/${item.filePath}`" target="_blank" v-if="pictureArray.length>0 && index>=0 && index<pictureArray.length-1" v-for="(item,index) in pictureArray">{{item.fileName}} , </a>
- <a :href="`${hostUrl}/${item.filePath}`" target="_blank" v-if="pictureArray.length>0 && index==pictureArray.length-1" v-for="(item,index) in pictureArray">{{item.fileName}}</a>
- </div>
- </el-form-item>
- <el-form-item label="市是否到现场复核" style="display: inline-block;">
- <el-select v-model="rectificationObj.isSite" placeholder="请选择" :disabled="!(updateObj.nodeName && (updateObj.nodeName.indexOf('市审核县')>-1 || updateObj.nodeName.indexOf('市接收')>-1 || updateObj.nodeName.indexOf('市审核')>-1 || updateObj.nodeName.indexOf('市本级反馈问题')>-1 || updateObj.nodeName.indexOf('市级审核上报问题整改')>-1)) || !isOp">
- <el-option value="1" label="是"></el-option>
- <el-option value="0" label="否"></el-option>
- </el-select>
- <el-button v-if="updateObj.nodeName && (updateObj.nodeName.indexOf('市审核县')>-1 || updateObj.nodeName.indexOf('市接收')>-1 || updateObj.nodeName.indexOf('市审核')>-1 || updateObj.nodeName.indexOf('市本级反馈问题')>-1 || updateObj.nodeName.indexOf('市级审核上报问题整改')>-1) && rectificationObj.isSite=='1' && isOp" type="primary" @click="showRec('oSrectification')">上传现场佐证材料<i class="el-icon-upload el-icon--right"></i></el-button>
- </el-form-item>
- <el-form-item label="市级复核现场佐证材料">
- <div style="width: 100%;">
- <span style="position: relative" v-if="pictureArray1.length>0 && index>=0 && index<pictureArray1.length-1" v-for="(item,index) in pictureArray1"><a :href="`${hostUrl}/${item.filePath}`" target="_blank" >{{item.fileName}} , </a><div style="position: absolute;z-index:1000;top:-15px;right:0;background: grey;color:white;border-radius: 10px;width: 15px;height:15px;line-height: 15px;text-align: center" @click="removeFile(item.id)">×</div></span>
- <span style="position: relative" v-if="pictureArray1.length>0 && index==pictureArray1.length-1" v-for="(item,index) in pictureArray1"><a :href="`${hostUrl}/${item.filePath}`" target="_blank" style="position: relative">{{item.fileName}}</a><div style="position: absolute;z-index:1000;top:-15px;right:0;background: grey;color:white;border-radius: 10px;width: 15px;height:15px;line-height: 15px;text-align: center" @click="removeFile(item.id)">×</div></span>
- </div>
- </el-form-item>
- <el-form-item label="备注:">
- <el-input type="textarea" :row="2" v-model.trim="commentsInfo" placeholder="请输入备注" :disabled="!isOp">
- </el-input>
- </el-form-item>
- <!-- <el-form-item label="" v-if="showFeedbackBtn">-->
- <!-- <el-button type="primary" @click="showRec()">佐证材料<i class="el-icon-upload el-icon--right"></i></el-button>-->
- <!-- </el-form-item>-->
- <el-form-item style="display: flex;" v-if="isOp">
- <span v-for="(item,index) in buttonList" style="padding: 5px;line-height: 35px;">
- <el-button :type="(item.name.indexOf('不')>-1 || item.name.indexOf('退')>-1)?'danger':'primary'" v-if="item.value=='backward'" @click="taskHandleBackward(urlObj[item.value], item.value,item.name)">{{item.name}}</el-button>
- <el-button :type="(item.name.indexOf('不')>-1 || item.name.indexOf('退')>-1)?'danger':'primary'" v-else @click="taskHandle(urlObj[item.value], item.value,item.name)" :disabled="item.name.indexOf('反馈')>-1 && (rectificationObj.rectification=='0' || rectificationObj.rectification=='1')">{{item.name}}</el-button>
- </span>
- <!-- <el-button v-if="showSubmitBtn" type="primary" @click="taskHandle(submitUrl, '提交')">提交</el-button>-->
- <!-- <el-button v-if="showReturnBtn" type="warning" @click="taskHandleBackward(backwardUrl, '回退')">回退</el-button>-->
- <!-- <el-button v-if="showFeedbackBtn" type="primary" @click="taskHandle(feedbackUrl, '反馈')">反馈</el-button>-->
- <!-- <el-button v-if="showSendCountyBtn" type="primary" @click="taskHandle(sendCountyUrl, '下发到县')">下发到县</el-button>-->
- <!-- <el-button v-if="showFeedbackCityBtn" type="primary" @click="taskHandle(feedbackCityUrl, '市本级反馈')">市本级反馈</el-button>-->
- </el-form-item>
- </el-form>
- </div>
- </el-col>
- </el-row>
- <el-dialog title="选择回退节点" :visible.sync="dialogFormVisible" append-to-body width="400px">
- <el-form>
- <el-form-item label="回退节点" label-width="120px">
- <el-select v-model="backNodeCode" placeholder="请选择">
- <el-option :label="item.nodeName" :value="item.nodeCode" v-for="item in backNodeList" :key="item.nodeCode"></el-option>
- </el-select>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogFormVisible = false">取 消</el-button>
- <el-button type="primary" @click="taskHandle(backwardUrl,'backward','回退')">确 定</el-button>
- </div>
- </el-dialog>
- <add-pic-com v-if="rectificationObj.jqmmDialogShow" :dialogTitle="'佐证材料'" :jqmmEngId="updateObj.formId" :type="rectificationObj.zgType" @jqmmDialogClose="jqmmDialogClose"></add-pic-com>
- </el-dialog>
- </template>
- <script>
- import request from '@util/gw_ajax_request.js'
- import dateFormat from '@util/gw_date.js'
- import addPicCom from "./addPic.vue"
- import { hostUrl } from "@util/global_variable.js";
- import { deleteFileById } from "@api/duChaAPI.js";
- export default {
- props: {
- taskInstId: {
- type: String
- },
- procInstId: {
- type: String
- },
- procTypeName:{
- type: String
- },
- isOp:{
- type: Boolean
- }
- },
- data() {
- return {
- isDcOrJc:"",
- urlObj:{},
- dialogVisible: true,
- activeName: '',
- updateObj: {},
- tabList: [],
- buttonList:[],
- showSubmitBtn: false,
- showReturnBtn: false,
- showFeedbackBtn: false,
- showFeedbackBtnFile: false,
- showSendCountyBtn:false,
- showFeedbackCityBtn:false,
- backwardUrl: '',
- feedbackUrl: '',
- submitUrl: '',
- sendCountyUrl: '',
- feedbackCityUrl: '',
- pblmPlist: {},
- commentsInfo: '',
- problemId: '',
- provId: '',
- backNodeList: [], //回退节点列表
- backNodeCode: '', //选择回退的节点
- dialogFormVisible: false, //回退节点的弹窗
- rectificationObj:{
- rectification:"", //整改状态
- pblmCrtm:"",
- pblmPltm:"",
- rectificationNote:"", //整改状态
- jqmmDialogShow:false, //整改材料弹框显隐
- jqmmEngId:"",//整改材料id
- zgType:"rectification",
- isSite:""
- },
- pictureArray:[],
- pictureArray1:[]
- }
- },
- components: {
- baseInfo: resolve => { require(['./baseInfo.vue'], resolve) },
- baseInfojc: resolve => { require(['./baseInfojc.vue'], resolve) },
- flowAttach: resolve => { require(['./flowAttach.vue'], resolve) },
- processHistory: resolve => { require(['./processHistory.vue'], resolve) },
- flowChart: resolve => { require(['./flowChart.vue'], resolve) },
- addPicCom
- },
- computed: {
- hostUrl(){
- return hostUrl
- }
- },
- mounted() {
- if(this.procTypeName && this.procTypeName.indexOf("稽察")>-1){
- this.tabList = [
- { label: '基本信息', value: 'baseInfojc' },
- { label: '流程附件', value: 'flowAttach' },
- { label: '历史过程', value: 'processHistory' },
- { label: '流程图', value: 'flowChart' }
- ];
- this.activeName = "flowChart";
- this.isDcOrJc = "jc";
- }else{
- this.tabList = [
- { label: '基本信息', value: 'baseInfo' },
- { label: '流程附件', value: 'flowAttach' },
- { label: '历史过程', value: 'processHistory' },
- { label: '流程图', value: 'flowChart' }
- ];
- this.activeName = "flowChart";
- this.isDcOrJc = "dc";
- }
- this.getTaskDetail()
- setTimeout(()=>{
- this.$nextTick(()=>{
- let col1H = this.$refs.col1.$el.clientHeight;
- let col2H = this.$refs.col2.$el.clientHeight;
- if(col1H > col2H){
- this.$refs.col1.$el.style.borderRight = "2px solid #e4e7ed";
- }else{
- this.$refs.col2.$el.style.borderLeft = "2px solid #e4e7ed";
- }
- })
- },500)
- },
- methods: {
- removeFile(id, index) {
- this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "返回",
- type: "warning"
- }).then(
- res => {
- if (res === "confirm") {
- deleteFileById(id, localStorage.getItem("userid")).then(res => {
- if (res.success) {
- this.getPicArray1();
- } else {
- this.$message.error(res.message);
- }
- });
- }
- }
- );
- },
- getPicArray(){
- this.pictureArray = [];
- let params = {
- bizId: this.updateObj.formId,
- bizType: "rectification"
- }
- request.post(`/file/findPageInfo`,params).then(res =>{
- if(res.success) {
- this.pictureArray = res.data.list;
- }
- })
- },
- getPicArray1(){
- this.pictureArray1 = [];
- let params = {
- bizId: this.updateObj.formId,
- bizType: "oSrectification"
- }
- request.post(`/file/findPageInfo`,params).then(res =>{
- if(res.success) {
- this.pictureArray1 = res.data.list;
- }
- })
- },
- showRec(type){
- this.rectificationObj.jqmmDialogShow = true;
- this.rectificationObj.zgType = type;
- },
- //佐证材料弹框关闭
- jqmmDialogClose() {
- this.rectificationObj.jqmmDialogShow = false;
- this.getPicArray();
- this.getPicArray1();
- },
- // 获取待办任务详情
- getTaskDetail() {
- this.buttonList = [];
- request.get(`/bis/insp/pblm/plist/v1/workflow/qryTaskDetail/${this.taskInstId}`).then(res => {
- if (res.success) {
- this.updateObj = res.data;
- if((this.updateObj.nodeName.indexOf("市审核县")>-1) || (this.updateObj.nodeName.indexOf("市级审核县")>-1)){
- this.updateObj.nodeName = "市审核县";
- }
- this.getPicArray();
- this.getPicArray1();
- this.backNodeList = this.updateObj.backNodeList
- let nodeOperList = this.updateObj.nodeOperList
- if (nodeOperList != null && nodeOperList !== undefined && nodeOperList !== "") {
- nodeOperList.forEach(ele => {
- this.buttonList.push({
- name:ele.operationName,
- value:ele.actionCode
- });
- // if (ele.actionCode == 'submit') {
- // this.showSubmitBtn = true
- // }
- // if (ele.actionCode == 'backward') {
- // this.showReturnBtn = true
- // }
- if (ele.actionCode == 'feedbackCity' || ele.actionCode == 'sendProvince' || ele.actionCode == 'feedback' || ele.actionCode == 'holdSave' || this.updateObj.nodeName.indexOf("业务处室审核")>-1 || this.updateObj.nodeName.indexOf('市本级反馈问题')>-1 || this.updateObj.nodeName.indexOf('市级审核上报问题整改')>-1) {
- this.showFeedbackBtn = true
- }
- if(ele.actionCode == 'feedback'){
- this.showFeedbackBtnFile = true
- }
- // if (ele.actionCode == 'sendCounty') {
- // this.showSendCountyBtn = true
- // }
- // if (ele.actionCode == 'feedbackCity') {
- // this.showFeedbackCityBtn = true
- // }
- });
- }
- }
- }).catch(err => {
- console.log(err)
- })
- },
- dFormat(t){
- if(t){
- var date = new Date(t);
- var y = date.getFullYear();
- var m = date.getMonth()+1;
- var d = date.getDate();
- var str = y+'-'+(m<10?('0'+m):m)+'-'+(d<10?('0'+d):d);
- return str;
- }
- return "";
- },
- sendActionLinks(obj) {
- this.rectificationObj.rectification = obj.content.crtState;
- this.rectificationObj.rectificationNote = obj.content.crtInfo;
- this.rectificationObj.isSite = obj.content.isSite;
- this.rectificationObj.pblmCrtm = this.dFormat(obj.content.pblmCrtm);
- this.rectificationObj.pblmPltm = this.dFormat(obj.content.pblmPltm);
- this.pblmPlist = obj.content
- let links = obj._links
- var _self = this;
- Object.keys(obj._links).forEach(function(key){
- _self.urlObj[key] = obj._links[key].split('pdcApi').length>1?obj._links[key].split('pdcApi')[1]:obj._links[key].split('pdcApi')[0];
- });
- this.backwardUrl = links.backward;
- this.feedbackUrl = links.feedback;
- this.submitUrl = links.submit;
- this.sendCountyUrl = links.sendCounty;
- this.feedbackCityUrl = links.feedbackCity;
- this.problemId = this.pblmPlist.pblmId //查询问题图片 id
- this.provId = this.pblmPlist.id //佐证图片 id
- },
- // 问题处理操作:提交、回退、反馈
- taskHandle(requestUrl, operation,name) {
- if(operation=="sendProvince" || operation=="feedbackCity" || operation=="feedback" || operation=="holdSave" || this.updateObj.nodeName.indexOf('市本级反馈问题')>-1 || this.updateObj.nodeName.indexOf('市级审核上报问题整改')>-1){
- if(this.rectificationObj.rectification=="" || this.rectificationObj.rectification==null){
- this.$message.warning("请选择整改状态")
- return;
- }
- if(this.rectificationObj.rectification=="2"){
- this.rectificationObj.pblmPltm = "";
- if(!this.rectificationObj.pblmCrtm){
- this.$message.warning("请选择整改完成时间")
- return;
- }
- }
- if(this.rectificationObj.rectification=="1"){
- this.rectificationObj.pblmCrtm = "";
- if(!this.rectificationObj.pblmPltm){
- this.$message.warning("请选择预计完成时间")
- return;
- }
- }
- if(this.rectificationObj.rectification!="2" && this.rectificationObj.rectification!="1"){
- this.rectificationObj.pblmCrtm = "";
- this.rectificationObj.pblmPltm = "";
- }
- if(this.rectificationObj.rectificationNote=="" || this.rectificationObj.rectificationNote==null){
- this.$message.warning("请输入整改措施")
- return;
- }
- }
- if(this.showFeedbackBtnFile && this.pictureArray.length==0){
- this.$message.warning("请上传整改佐证材料")
- return;
- }
- if(operation!='backward' && this.updateObj.nodeName && (this.updateObj.nodeName.indexOf('市审核县')>-1 || this.updateObj.nodeName.indexOf('市接收')>-1 || this.updateObj.nodeName.indexOf('市审核')>-1 || this.updateObj.nodeName.indexOf('市本级反馈问题')>-1 || this.updateObj.nodeName.indexOf('市级审核上报问题整改')>-1) && !this.rectificationObj.isSite){
- this.$message.warning("请选择是否到现场复核")
- return;
- }
- if(operation!='backward' && this.updateObj.nodeName && (this.updateObj.nodeName.indexOf('市审核县')>-1 || this.updateObj.nodeName.indexOf('市接收')>-1 || this.updateObj.nodeName.indexOf('市审核')>-1 || this.updateObj.nodeName.indexOf('市本级反馈问题')>-1 || this.updateObj.nodeName.indexOf('市级审核上报问题整改')>-1) && this.rectificationObj.isSite && this.rectificationObj.isSite=='1' && this.pictureArray1.length==0){
- this.$message.warning("请上传现场佐证材料")
- return;
- }
- this.$confirm(`确认${name}吗?`, '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- let paramsObj = {
- pblmPlist: this.pblmPlist,
- queryTaskActionCO: {
- comments: this.commentsInfo,
- taskInstId: this.taskInstId
- }
- }
- if (operation == 'backward') {
- if(!this.backNodeCode){
- return this.$message.warning('请选择要回退的节点')
- }
- paramsObj.queryTaskActionCO['targetTaskDefKey'] = this.backNodeCode
- }
- if(operation=="sendProvince" || operation=="feedbackCity" || operation=="feedback" || operation=="holdSave" || this.updateObj.nodeName.indexOf('市本级反馈问题')>-1 || this.updateObj.nodeName.indexOf('市级审核上报问题整改')>-1){
- if(this.rectificationObj.rectificationNote=="" || this.rectificationObj.rectificationNote==null){
- this.$message.warning("请输入整改措施")
- }
- paramsObj.pblmPlist.crtState = this.rectificationObj.rectification;
- paramsObj.pblmPlist.crtInfo = this.rectificationObj.rectificationNote;
- paramsObj.pblmPlist.pblmCrtm = this.rectificationObj.pblmCrtm;
- paramsObj.pblmPlist.pblmPltm = this.rectificationObj.pblmPltm;
- }
- if(operation!='backward' && this.updateObj.nodeName && (this.updateObj.nodeName.indexOf('市审核县')>-1 || this.updateObj.nodeName.indexOf('市接收')>-1 || this.updateObj.nodeName.indexOf('市审核')>-1 || this.updateObj.nodeName.indexOf('市本级反馈问题')>-1 || this.updateObj.nodeName.indexOf('市级审核上报问题整改')>-1) && this.rectificationObj.isSite){
- paramsObj.pblmPlist.isSite = this.rectificationObj.isSite;
- }
- request.post(requestUrl, paramsObj).then(res => {
- if (res.success) {
- this.$message.success(`${name}成功`)
- this.closeDialog()
- // 选择回退节点的弹窗关闭
- this.dialogFormVisible = false
- }
- }).catch(err => {
- console.log(err)
- })
- }).catch(() => {
- });
- },
- taskHandleBackward(requestUrl, operation,name) {
- if (this.backNodeList.length == 1) {
- this.backNodeCode = this.backNodeList[0].nodeCode
- this.taskHandle(requestUrl, operation,name)
- } else if (this.backNodeList.length > 1) {
- this.dialogFormVisible = true
- }
- },
- handleClick() { },
- closeDialog() {
- this.$emit('closeDialog')
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .right_wrapper {
- min-height: 448px;
- padding: 0 20px;
- /*border-left: 2px solid #e4e7ed;*/
- h3 {
- margin-bottom: 20px;
- line-height: 32px;
- span {
- position: relative;
- top: 2px;
- display: inline-block;
- width: 3px;
- height: 16px;
- margin-right: 6px;
- background-color: #409eff;
- }
- }
- }
- </style>
|