| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373 |
- <template>
- <el-dialog title="任务处理" :visible="dialogVisible" :close-on-click-modal="false" width="90%"
- @close="closeDialog">
- <el-row>
- <el-col :span="16">
- <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" :isShow="isShow"
- :problemId="problemId" :id="provId" :formDataUrl="updateObj.formDataUrl" :isDcOrJc="isDcOrJc"
- @sendActionLinks="sendActionLinks"></component>
- </el-tab-pane>
- </el-tabs>
- </el-col>
- <el-col :span="8">
- <div class="right_wrapper">
- <h3><span></span>任务处理</h3>
- <el-form ref="form" :model="updateObj" label-width="120px">
- <el-form-item label="流程名称:">
- <span>{{updateObj.nodeName}}</span>
- </el-form-item>
- <el-form-item label="任务名称:">
- <span>{{updateObj.procInstName}}</span>
- </el-form-item>
- <el-form-item label="整改状态" style="display: inline-block;">
- <el-select v-model="rectificationObj.rectification" placeholder="请选择" :disabled="true">
- <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-form-item>
- <el-form-item label="整改完成时间">
- <el-date-picker
- v-model="rectificationObj.pblmCrtm"
- type="date"
- :disabled="true"
- 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="true">
- <el-option value="1" label="是"></el-option>
- <el-option value="0" label="否"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="现场佐证材料">
- <div style="width: 100%;">
- <a :href="`${hostUrl}/${item.filePath}`" target="_blank" v-if="pictureArray1.length>0 && index>=0 && index<pictureArray1.length-1" v-for="(item,index) in pictureArray1">{{item.fileName}} , </a>
- <a :href="`${hostUrl}/${item.filePath}`" target="_blank" v-if="pictureArray1.length>0 && index==pictureArray1.length-1" v-for="(item,index) in pictureArray1">{{item.fileName}}</a>
- </div>
- </el-form-item>
- <el-form-item label="整改措施">
- <el-input type="textarea" v-model="rectificationObj.rectificationNote" :disabled="true"></el-input>
- </el-form-item>
- <el-form-item label="备注">
- <el-input type="textarea" v-model.trim="commentsInfo" :rows="5" placeholder="请输入备注" :disabled="true">
- </el-input>
- </el-form-item>
- </el-form>
- </div>
- </el-col>
- </el-row>
- <el-dialog title="选择回退节点" :visible.sync="dialogFormVisible" append-to-body>
- <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";
- export default {
- props: {
- taskInstId: {
- type: String
- },
- procInstId: {
- type: String
- },
- procTypeName:{
- type: String
- },
- isShow:{
- type: Boolean,
- default: false,
- }
- },
- data() {
- return {
- isDcOrJc:"",
- urlObj:{},
- dialogVisible: true,
- activeName: '',
- updateObj: {},
- tabList: [],
- buttonList:[],
- showSubmitBtn: false,
- showReturnBtn: false,
- showFeedbackBtn: false,
- showSendCountyBtn:false,
- showFeedbackCityBtn:false,
- backwardUrl: '',
- feedbackUrl: '',
- submitUrl: '',
- sendCountyUrl: '',
- feedbackCityUrl: '',
- pblmPlist: {},
- commentsInfo: '',
- problemId: '',
- provId: '',
- backNodeList: [], //回退节点列表
- backNodeCode: '', //选择回退的节点
- dialogFormVisible: false, //回退节点的弹窗
- rectificationObj:{
- rectification:"", //整改状态
- pblmCrtm:"",
- rectificationNote:"", //整改状态
- jqmmDialogShow:false, //整改材料弹框显隐
- jqmmEngId:"",//整改材料id
- zgType:"rectification",
- },
- 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.indexOf("稽察")>-1){
- this.tabList = [
- { label: '基本信息', value: 'baseInfojc' },
- { label: '流程附件', value: 'flowAttach' },
- { label: '历史过程', value: 'processHistory' },
- { label: '流程图', value: 'flowChart' }
- ];
- this.activeName = "baseInfojc";
- this.isDcOrJc = "jc";
- }else{
- this.tabList = [
- { label: '基本信息', value: 'baseInfo' },
- { label: '流程附件', value: 'flowAttach' },
- { label: '历史过程', value: 'processHistory' },
- { label: '流程图', value: 'flowChart' }
- ];
- this.activeName = "baseInfo";
- this.isDcOrJc = "dc";
- }
- this.getTaskDetail()
- },
- methods: {
- 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(){
- this.rectificationObj.jqmmDialogShow = true;
- },
- //佐证材料弹框关闭
- 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
- 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 == 'feedback') {
- this.showFeedbackBtn = true
- }
- // if (ele.actionCode == 'sendCounty') {
- // this.showSendCountyBtn = true
- // }
- // if (ele.actionCode == 'feedbackCity') {
- // this.showFeedbackCityBtn = true
- // }
- });
- }
- }
- }).catch(err => {
- console.log(err)
- })
- },
- sendActionLinks(obj) {
- this.rectificationObj.rectification = obj.content.crtState;
- this.rectificationObj.pblmCrtm = obj.content.pblmCrtm;
- this.rectificationObj.rectificationNote = obj.content.crtInfo;
- this.rectificationObj.commentsInfo = obj.content.crtNote;
- 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=="feedback"){
- if(this.rectificationObj.rectification=="" || this.rectificationObj.rectification==null){
- this.$message.warning("请选择整改状态")
- return;
- }
- if(this.rectificationObj.rectificationNote=="" || this.rectificationObj.rectificationNote==null){
- this.$message.warning("请输入整改说明")
- return;
- }
- if(this.rectificationObj.rectification=="1"){
- if(!this.rectificationObj.pblmCrtm){
- this.$message.warning("请选择整改完成时间")
- return;
- }
- }
- if(this.rectificationObj.rectification!="1"){
- this.rectificationObj.pblmCrtm = "";
- }
- }
- 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=="feedback"){
- 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;
- }
- 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('closeMendDialog')
- }
- }
- }
- </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>
|