8122d670ed50728f4ad81ecbbf744ccc3e2c9254.svn-base 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  1. <template>
  2. <el-dialog title="任务处理" :visible="dialogVisible" :close-on-click-modal="false" width="90%"
  3. @close="closeDialog">
  4. <el-row>
  5. <el-col :span="16">
  6. <el-tabs v-model="activeName" @tab-click="handleClick">
  7. <el-tab-pane :label="tab.label" :name="tab.value" v-for="tab in tabList" :key="tab.value">
  8. <component :is="tab.value" :taskInstId="taskInstId" :procInstId="procInstId" :isShow="isShow"
  9. :problemId="problemId" :id="provId" :formDataUrl="updateObj.formDataUrl" :isDcOrJc="isDcOrJc"
  10. @sendActionLinks="sendActionLinks"></component>
  11. </el-tab-pane>
  12. </el-tabs>
  13. </el-col>
  14. <el-col :span="8">
  15. <div class="right_wrapper">
  16. <h3><span></span>任务处理</h3>
  17. <el-form ref="form" :model="updateObj" label-width="120px">
  18. <el-form-item label="流程名称:">
  19. <span>{{updateObj.nodeName}}</span>
  20. </el-form-item>
  21. <el-form-item label="任务名称:">
  22. <span>{{updateObj.procInstName}}</span>
  23. </el-form-item>
  24. <el-form-item label="整改状态" style="display: inline-block;">
  25. <el-select v-model="rectificationObj.rectification" placeholder="请选择" :disabled="true">
  26. <el-option value="0" label="未整改"></el-option>
  27. <el-option value="1" label="整改中"></el-option>
  28. <el-option value="2" label="已整改"></el-option>
  29. <el-option value="3" label="不具备整改条件"></el-option>
  30. </el-select>
  31. </el-form-item>
  32. <el-form-item label="整改完成时间">
  33. <el-date-picker
  34. v-model="rectificationObj.pblmCrtm"
  35. type="date"
  36. :disabled="true"
  37. format="yyyy-MM-dd"
  38. placeholder="整改完成时间">
  39. </el-date-picker>
  40. </el-form-item>
  41. <el-form-item label="整改佐证材料">
  42. <div style="width: 100%;">
  43. <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>
  44. <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>
  45. </div>
  46. </el-form-item>
  47. <el-form-item label="是否到现场复核" style="display: inline-block;">
  48. <el-select v-model="rectificationObj.isSite" placeholder="请选择" :disabled="true">
  49. <el-option value="1" label="是"></el-option>
  50. <el-option value="0" label="否"></el-option>
  51. </el-select>
  52. </el-form-item>
  53. <el-form-item label="现场佐证材料">
  54. <div style="width: 100%;">
  55. <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>
  56. <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>
  57. </div>
  58. </el-form-item>
  59. <el-form-item label="整改措施">
  60. <el-input type="textarea" v-model="rectificationObj.rectificationNote" :disabled="true"></el-input>
  61. </el-form-item>
  62. <el-form-item label="备注">
  63. <el-input type="textarea" v-model.trim="commentsInfo" :rows="5" placeholder="请输入备注" :disabled="true">
  64. </el-input>
  65. </el-form-item>
  66. </el-form>
  67. </div>
  68. </el-col>
  69. </el-row>
  70. <el-dialog title="选择回退节点" :visible.sync="dialogFormVisible" append-to-body>
  71. <el-form>
  72. <el-form-item label="回退节点" label-width="120px">
  73. <el-select v-model="backNodeCode" placeholder="请选择">
  74. <el-option :label="item.nodeName" :value="item.nodeCode" v-for="item in backNodeList" :key="item.nodeCode"></el-option>
  75. </el-select>
  76. </el-form-item>
  77. </el-form>
  78. <div slot="footer" class="dialog-footer">
  79. <el-button @click="dialogFormVisible = false">取 消</el-button>
  80. <el-button type="primary" @click="taskHandle(backwardUrl,'backward','回退')">确 定</el-button>
  81. </div>
  82. </el-dialog>
  83. <add-pic-com v-if="rectificationObj.jqmmDialogShow" :dialogTitle="'佐证材料'" :jqmmEngId="updateObj.formId" :type="rectificationObj.zgType" @jqmmDialogClose="jqmmDialogClose"></add-pic-com>
  84. </el-dialog>
  85. </template>
  86. <script>
  87. import request from '@util/gw_ajax_request.js'
  88. import dateFormat from '@util/gw_date.js'
  89. import addPicCom from "./addPic.vue"
  90. import { hostUrl } from "@util/global_variable.js";
  91. export default {
  92. props: {
  93. taskInstId: {
  94. type: String
  95. },
  96. procInstId: {
  97. type: String
  98. },
  99. procTypeName:{
  100. type: String
  101. },
  102. isShow:{
  103. type: Boolean,
  104. default: false,
  105. }
  106. },
  107. data() {
  108. return {
  109. isDcOrJc:"",
  110. urlObj:{},
  111. dialogVisible: true,
  112. activeName: '',
  113. updateObj: {},
  114. tabList: [],
  115. buttonList:[],
  116. showSubmitBtn: false,
  117. showReturnBtn: false,
  118. showFeedbackBtn: false,
  119. showSendCountyBtn:false,
  120. showFeedbackCityBtn:false,
  121. backwardUrl: '',
  122. feedbackUrl: '',
  123. submitUrl: '',
  124. sendCountyUrl: '',
  125. feedbackCityUrl: '',
  126. pblmPlist: {},
  127. commentsInfo: '',
  128. problemId: '',
  129. provId: '',
  130. backNodeList: [], //回退节点列表
  131. backNodeCode: '', //选择回退的节点
  132. dialogFormVisible: false, //回退节点的弹窗
  133. rectificationObj:{
  134. rectification:"", //整改状态
  135. pblmCrtm:"",
  136. rectificationNote:"", //整改状态
  137. jqmmDialogShow:false, //整改材料弹框显隐
  138. jqmmEngId:"",//整改材料id
  139. zgType:"rectification",
  140. },
  141. pictureArray:[],
  142. pictureArray1:[]
  143. }
  144. },
  145. components: {
  146. baseInfo: resolve => { require(['./baseInfo.vue'], resolve) },
  147. baseInfojc: resolve => { require(['./baseInfojc.vue'], resolve) },
  148. flowAttach: resolve => { require(['./flowAttach.vue'], resolve) },
  149. processHistory: resolve => { require(['./processHistory.vue'], resolve) },
  150. flowChart: resolve => { require(['./flowChart.vue'], resolve) },
  151. addPicCom
  152. },
  153. computed: {
  154. hostUrl(){
  155. return hostUrl
  156. }
  157. },
  158. mounted() {
  159. if(this.procTypeName.indexOf("稽察")>-1){
  160. this.tabList = [
  161. { label: '基本信息', value: 'baseInfojc' },
  162. { label: '流程附件', value: 'flowAttach' },
  163. { label: '历史过程', value: 'processHistory' },
  164. { label: '流程图', value: 'flowChart' }
  165. ];
  166. this.activeName = "baseInfojc";
  167. this.isDcOrJc = "jc";
  168. }else{
  169. this.tabList = [
  170. { label: '基本信息', value: 'baseInfo' },
  171. { label: '流程附件', value: 'flowAttach' },
  172. { label: '历史过程', value: 'processHistory' },
  173. { label: '流程图', value: 'flowChart' }
  174. ];
  175. this.activeName = "baseInfo";
  176. this.isDcOrJc = "dc";
  177. }
  178. this.getTaskDetail()
  179. },
  180. methods: {
  181. getPicArray(){
  182. this.pictureArray = [];
  183. let params = {
  184. bizId: this.updateObj.formId,
  185. bizType: "rectification"
  186. }
  187. request.post(`/file/findPageInfo`,params).then(res =>{
  188. if(res.success) {
  189. this.pictureArray = res.data.list;
  190. }
  191. })
  192. },
  193. getPicArray1(){
  194. this.pictureArray1 = [];
  195. let params = {
  196. bizId: this.updateObj.formId,
  197. bizType: "oSrectification"
  198. }
  199. request.post(`/file/findPageInfo`,params).then(res =>{
  200. if(res.success) {
  201. this.pictureArray1 = res.data.list;
  202. }
  203. })
  204. },
  205. showRec(){
  206. this.rectificationObj.jqmmDialogShow = true;
  207. },
  208. //佐证材料弹框关闭
  209. jqmmDialogClose() {
  210. this.rectificationObj.jqmmDialogShow = false;
  211. this.getPicArray();
  212. this.getPicArray1();
  213. },
  214. // 获取待办任务详情
  215. getTaskDetail() {
  216. this.buttonList = [];
  217. request.get(`/bis/insp/pblm/plist/v1/workflow/qryTaskDetail/${this.taskInstId}`).then(res => {
  218. if (res.success) {
  219. this.updateObj = res.data
  220. this.getPicArray();
  221. this.getPicArray1();
  222. this.backNodeList = this.updateObj.backNodeList
  223. let nodeOperList = this.updateObj.nodeOperList
  224. if (nodeOperList != null && nodeOperList !== undefined && nodeOperList !== "") {
  225. nodeOperList.forEach(ele => {
  226. this.buttonList.push({
  227. name:ele.operationName,
  228. value:ele.actionCode
  229. });
  230. // if (ele.actionCode == 'submit') {
  231. // this.showSubmitBtn = true
  232. // }
  233. // if (ele.actionCode == 'backward') {
  234. // this.showReturnBtn = true
  235. // }
  236. if (ele.actionCode == 'feedback') {
  237. this.showFeedbackBtn = true
  238. }
  239. // if (ele.actionCode == 'sendCounty') {
  240. // this.showSendCountyBtn = true
  241. // }
  242. // if (ele.actionCode == 'feedbackCity') {
  243. // this.showFeedbackCityBtn = true
  244. // }
  245. });
  246. }
  247. }
  248. }).catch(err => {
  249. console.log(err)
  250. })
  251. },
  252. sendActionLinks(obj) {
  253. this.rectificationObj.rectification = obj.content.crtState;
  254. this.rectificationObj.pblmCrtm = obj.content.pblmCrtm;
  255. this.rectificationObj.rectificationNote = obj.content.crtInfo;
  256. this.rectificationObj.commentsInfo = obj.content.crtNote;
  257. this.pblmPlist = obj.content
  258. let links = obj._links
  259. var _self = this;
  260. Object.keys(obj._links).forEach(function(key){
  261. _self.urlObj[key] = obj._links[key].split('pdcApi').length>1?obj._links[key].split('pdcApi')[1]:obj._links[key].split('pdcApi')[0];
  262. });
  263. this.backwardUrl = links.backward;
  264. this.feedbackUrl = links.feedback;
  265. this.submitUrl = links.submit;
  266. this.sendCountyUrl = links.sendCounty;
  267. this.feedbackCityUrl = links.feedbackCity;
  268. this.problemId = this.pblmPlist.pblmId //查询问题图片 id
  269. this.provId = this.pblmPlist.id //佐证图片 id
  270. },
  271. // 问题处理操作:提交、回退、反馈
  272. taskHandle(requestUrl, operation,name) {
  273. if(operation=="feedback"){
  274. if(this.rectificationObj.rectification=="" || this.rectificationObj.rectification==null){
  275. this.$message.warning("请选择整改状态")
  276. return;
  277. }
  278. if(this.rectificationObj.rectificationNote=="" || this.rectificationObj.rectificationNote==null){
  279. this.$message.warning("请输入整改说明")
  280. return;
  281. }
  282. if(this.rectificationObj.rectification=="1"){
  283. if(!this.rectificationObj.pblmCrtm){
  284. this.$message.warning("请选择整改完成时间")
  285. return;
  286. }
  287. }
  288. if(this.rectificationObj.rectification!="1"){
  289. this.rectificationObj.pblmCrtm = "";
  290. }
  291. }
  292. this.$confirm(`确认${name}吗?`, '提示', {
  293. confirmButtonText: '确定',
  294. cancelButtonText: '取消',
  295. type: 'warning'
  296. }).then(() => {
  297. let paramsObj = {
  298. pblmPlist: this.pblmPlist,
  299. queryTaskActionCO: {
  300. comments: this.commentsInfo,
  301. taskInstId: this.taskInstId
  302. }
  303. }
  304. if (operation == 'backward') {
  305. if(!this.backNodeCode){
  306. return this.$message.warning('请选择要回退的节点')
  307. }
  308. paramsObj.queryTaskActionCO['targetTaskDefKey'] = this.backNodeCode
  309. }
  310. if(operation=="feedback"){
  311. if(this.rectificationObj.rectificationNote=="" || this.rectificationObj.rectificationNote==null){
  312. this.$message.warning("请输入整改说明")
  313. }
  314. paramsObj.pblmPlist.crtState = this.rectificationObj.rectification;
  315. paramsObj.pblmPlist.crtInfo = this.rectificationObj.rectificationNote;
  316. paramsObj.pblmPlist.pblmCrtm = this.rectificationObj.pblmCrtm;
  317. }
  318. request.post(requestUrl, paramsObj).then(res => {
  319. if (res.success) {
  320. this.$message.success(`${name}成功`)
  321. this.closeDialog()
  322. // 选择回退节点的弹窗关闭
  323. this.dialogFormVisible = false
  324. }
  325. }).catch(err => {
  326. console.log(err)
  327. })
  328. }).catch(() => {
  329. });
  330. },
  331. taskHandleBackward(requestUrl, operation,name) {
  332. if (this.backNodeList.length == 1) {
  333. this.backNodeCode = this.backNodeList[0].nodeCode
  334. this.taskHandle(requestUrl, operation,name)
  335. } else if (this.backNodeList.length > 1) {
  336. this.dialogFormVisible = true
  337. }
  338. },
  339. handleClick() { },
  340. closeDialog() {
  341. this.$emit('closeMendDialog')
  342. }
  343. }
  344. }
  345. </script>
  346. <style lang="scss" scoped>
  347. .right_wrapper {
  348. min-height: 448px;
  349. padding: 0 20px;
  350. border-left: 2px solid #e4e7ed;
  351. h3 {
  352. margin-bottom: 20px;
  353. line-height: 32px;
  354. span {
  355. position: relative;
  356. top: 2px;
  357. display: inline-block;
  358. width: 3px;
  359. height: 16px;
  360. margin-right: 6px;
  361. background-color: #409eff;
  362. }
  363. }
  364. }
  365. </style>