processMange.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770
  1. <template>
  2. <div class="process-mange-wrap">
  3. <!-- <el-card shadow="always" :body-style="{ padding: '20px' }"> -->
  4. <el-row>
  5. <el-col :xs="24" :md="8" :xl="8" class="col">
  6. <div class="statistic-wrap">
  7. <div class="discription">
  8. <span class="title">已完成</span>
  9. <span class="sub-title">已经完成的管道数</span>
  10. </div>
  11. <span class="data">{{ doneNum }}</span>
  12. </div>
  13. </el-col>
  14. <el-col :xs="24" :md="8" :xl="8" class="col">
  15. <div class="statistic-wrap">
  16. <div class="discription">
  17. <span class="title">进行中</span>
  18. <span class="sub-title">正在进行的管道数</span>
  19. </div>
  20. <span class="data">{{ doingNum }}</span>
  21. </div>
  22. </el-col>
  23. <!-- <el-col :xs="24" :md="8" :xl="8" class="col">
  24. <div class="statistic-wrap">
  25. <div class="discription">
  26. <span class="title">完成</span>
  27. <span class="sub-title">已经完成的管道</span>
  28. </div>
  29. <span class="data">0</span>
  30. </div>
  31. </el-col> -->
  32. </el-row>
  33. <!-- </el-card> -->
  34. <div class="main-area">
  35. <div class="show-header">
  36. <h3 class="header">管道列表</h3>
  37. <div class="search-list">
  38. <div class="search-tab">
  39. <el-radio-group v-model="taskType" v-show="false">
  40. <el-radio-button :label="1">我的处理</el-radio-button>
  41. <el-radio-button :label="2">其他处理</el-radio-button>
  42. </el-radio-group>
  43. <el-radio-group
  44. class="btn-list-two"
  45. v-model="queryParams.taskProcessState"
  46. @change="getList"
  47. >
  48. <el-radio-button label="3">已完成</el-radio-button>
  49. <el-radio-button label="0">进行中</el-radio-button>
  50. <!-- <el-radio-button label="">所有</el-radio-button> -->
  51. </el-radio-group>
  52. </div>
  53. <div class="search-input">
  54. <el-input
  55. placeholder="请输入..."
  56. v-model="queryString"
  57. @keyup.enter.native="getList"
  58. >
  59. <el-button
  60. slot="append"
  61. icon="el-icon-search"
  62. @click="getList"
  63. ></el-button>
  64. </el-input>
  65. </div>
  66. </div>
  67. </div>
  68. <div class="show-body">
  69. <!-- 流程任务列表 -->
  70. <el-table :data="tableData" border stripe>
  71. <el-table-column type="selection" width="55" align="center" />
  72. <el-table-column type="index" width="50" align="center" />
  73. <el-table-column
  74. v-for="col in newColumn"
  75. :prop="col.prop"
  76. :key="col.prop"
  77. :label="col.label"
  78. align="center"
  79. >
  80. <template slot-scope="scope">
  81. <span v-if="col.prop == 'benCreateTime'">{{
  82. scope.row.benCreateTime.replace("T", " ")
  83. }}</span>
  84. <span v-else-if="col.prop == 'bepTaskProcessType'">{{
  85. getDictLabel(scope.row.bepTaskProcessType, dict.type.bpm_type)
  86. }}</span>
  87. <span v-else-if="col.prop == 'benTaskNodeState'">{{
  88. scope.row.benTaskNodeState == "0" ? "未执行" : "已执行"
  89. }}</span>
  90. <span v-else-if="col.prop == 'bepTaskProcessState'">{{
  91. getDictLabel(
  92. scope.row.bepTaskProcessState,
  93. dict.type.task_process_state
  94. )
  95. }}</span>
  96. <span v-else>{{ scope.row[col.prop] }}</span>
  97. </template>
  98. </el-table-column>
  99. <el-table-column label="操作" align="center">
  100. <template slot-scope="scope">
  101. <div class="excute-wrap">
  102. <el-button
  103. type="warning"
  104. plain
  105. size="small"
  106. class="mr10 mb5"
  107. v-show="scope.row.bepTaskProcessState == '0'"
  108. @click="opneExecuteNode(scope.row)"
  109. >
  110. 运行
  111. </el-button>
  112. <el-dropdown>
  113. <el-button type="warning" plain size="small">
  114. 处理<i class="el-icon-arrow-down el-icon--right"></i>
  115. </el-button>
  116. <el-dropdown-menu slot="dropdown">
  117. <!-- <el-dropdown-item>
  118. <el-button
  119. size="mini"
  120. type="text"
  121. icon="el-icon-edit"
  122. @click="excuteHandler(scope.row)"
  123. v-hasPermi="['system:user:edit']"
  124. >处理
  125. </el-button>
  126. </el-dropdown-item> -->
  127. <el-dropdown-item>
  128. <el-dropdown size="mini">
  129. <el-button
  130. size="mini"
  131. type="text"
  132. icon="el-icon-d-arrow-right"
  133. >触发异常
  134. </el-button>
  135. <el-dropdown-menu slot="dropdown">
  136. <el-dropdown-item
  137. v-for="item in scope.row.exceptionScriptList"
  138. :key="item.id"
  139. >
  140. <el-button
  141. @click="exceptionTrigger(scope.row, item)"
  142. size="mini"
  143. type="text"
  144. >{{ item.scriptName }}
  145. </el-button>
  146. </el-dropdown-item>
  147. </el-dropdown-menu>
  148. </el-dropdown>
  149. </el-dropdown-item>
  150. </el-dropdown-menu>
  151. </el-dropdown>
  152. </div>
  153. </template>
  154. </el-table-column>
  155. </el-table>
  156. <!-- 分页 -->
  157. <pagination
  158. v-show="total > 0"
  159. :total="total"
  160. :page.sync="queryParams.pageNum"
  161. :limit.sync="queryParams.pageSize"
  162. @pagination="getList"
  163. />
  164. </div>
  165. <div class="show-window">
  166. <!-- 运行节点弹窗 -->
  167. <el-dialog :title="nodeTitle" :visible.sync="open">
  168. <!-- <el-form label-width="100px" :model="commonData">
  169. <h1>这里会引入当前节点需要处理的表单</h1>
  170. </el-form> -->
  171. <!-- <k-form-build
  172. v-if="formType == 'dragForm'"
  173. class="formBuild"
  174. ref="addFromRef"
  175. :dynamicData="dynamicData"
  176. :defaultValue="defaultValue"
  177. :value="jsonData"
  178. /> -->
  179. <!-- <DialogTemplate
  180. v-else-if="formType == 'composeForm'"
  181. ref="dialogRef"
  182. :groupKey="groupKey"
  183. :rowobj="row"
  184. :subCount="subCount"
  185. :tableCount="tableCount"
  186. :subTableName="subTableName"
  187. @addList="() => {}"
  188. ></DialogTemplate> -->
  189. <!-- ></DialogTemplate> -->
  190. <component
  191. :is="myForm"
  192. :formData="formData"
  193. :row="row"
  194. ref="myFormRef"
  195. v-if="myForm"
  196. ></component>
  197. <!-- <AssignEmployees :formData="formData"
  198. :row="row"></AssignEmployees> -->
  199. <!-- <NodeShow ref="myFormRef" :formData="formData" :row="row"></NodeShow>
  200. -->
  201. <!-- <SC01 :formData="formData"
  202. :row="row"></SC01> -->
  203. <!-- <AssignEmployees></AssignEmployees> -->
  204. <!-- <CG1 ref="myFormRef"></CG1>
  205. <KC1 ref="myFormRef"></KC1> -->
  206. <!-- <GY06 ref="myFormRef" :formData="formData" :row="row"></GY06> -->
  207. <span slot="footer" class="dialog-footer">
  208. <el-button @click="closeExecuteNode">取消</el-button>
  209. <el-button type="primary" @click="executeNode">运行</el-button>
  210. </span>
  211. </el-dialog>
  212. </div>
  213. </div>
  214. </div>
  215. </template>
  216. <script>
  217. import {
  218. processList,
  219. runProcessNodeExecution,
  220. getProcessNodeFormTemplate,
  221. getProcessNodeFormInfoData,
  222. } from "@/api/bpmprocess/run/executeProcess";
  223. import { triggerExceptionNode } from "@/api/bpmprocess/process";
  224. import getNodeSequence from "@/utils/bpmn/getNodeSequence";
  225. import GY02 from "./dialogCompments/GongYi/GY02.vue";
  226. import ZL01 from "./dialogCompments/ZhiLiang/ZL1.vue";
  227. import { getForm } from "@/api/dragform/form";
  228. import DialogTemplate from "@/views/dialogTemplate/components/index.vue";
  229. // 弹窗表单组件
  230. import GY01 from "./dialogCompments/GongYi/GY01.vue";
  231. import GY03 from "./dialogCompments/GongYi/GY03.vue";
  232. import CG1 from "./dialogCompments/test-component/CaiGou/CG1.vue";
  233. import CG02 from "./dialogCompments/test-component/CaiGou/CG02.vue";
  234. import KC01 from "./dialogCompments/test-component/KuCun/KC1.vue";
  235. import KC02 from "./dialogCompments/test-component/KuCun/KC02.vue";
  236. import GY06 from "./dialogCompments/GongYi/GY06.vue";
  237. import KB01 from "./dialogCompments/KongBai/KB01.vue"; //空白提示组件
  238. import SC01 from "./dialogCompments/ShengChan/SC01.vue";
  239. //Mec组件
  240. import AssignEmployees from "./dialogCompments/Mec/AssignEmployees.vue";
  241. import Notes from "./dialogCompments/Mec/Notes.vue";
  242. import Print from "./dialogCompments/Mec/Print.vue";
  243. import NodeShow from "./dialogCompments/Mec/NodeShow.vue";
  244. import RecordQuality from "./dialogCompments/Mec/RecordQuality.vue";
  245. import ProductionProcesses from "./dialogCompments/Mec/ProductionProcesses.vue";
  246. import PersonalDistribution from "./dialogCompments/Mec/PersonalDistribution.vue";
  247. export default {
  248. name: "processMange",
  249. props: [],
  250. components: {
  251. GY01,
  252. DialogTemplate,
  253. CG1,
  254. CG02,
  255. KC01,
  256. GY06,
  257. GY03,
  258. KC02,
  259. GY02,
  260. KB01,
  261. SC01,
  262. ZL01,
  263. NodeShow,
  264. AssignEmployees,
  265. Notes,
  266. Print,
  267. RecordQuality,
  268. ProductionProcesses,
  269. PersonalDistribution,
  270. },
  271. dicts: ["bpm_type", "task_process_state"],
  272. data() {
  273. return {
  274. doneNum: 0, //已完成数
  275. doingNum: 0, //进行中数
  276. row: {}, //当前操作行数据
  277. myForm: "", //自定义表单组件名
  278. // 节点弹窗title
  279. nodeTitle: "节点弹窗",
  280. open: false,
  281. // 节点弹窗对应的formData
  282. commonData: {},
  283. taskType: 1,
  284. queryString: "",
  285. taskStatus: "",
  286. tableData: [], //表格数据
  287. // 查询参数
  288. queryParams: {
  289. pageNum: 1,
  290. pageSize: 10,
  291. taskProcessState: "0",
  292. },
  293. total: 0,
  294. columns: [
  295. {
  296. prop: "bepTaskKey",
  297. label: "任务编号",
  298. },
  299. {
  300. prop: "bepTaskName",
  301. label: "任务名称",
  302. },
  303. {
  304. prop: "bepTaskProcessType",
  305. label: "任务流程类型",
  306. },
  307. {
  308. prop: "bepTaskProcessState",
  309. label: "任务流程状态",
  310. },
  311. {
  312. prop: "benTaskNodeName",
  313. label: "节点名称",
  314. },
  315. {
  316. prop: "benTaskNodeType",
  317. label: "节点类型",
  318. },
  319. {
  320. prop: "benTaskNodeState",
  321. label: "节点状态",
  322. },
  323. {
  324. prop: "benCreateBy",
  325. label: "创建人",
  326. },
  327. {
  328. prop: "benCreateTime",
  329. label: "创建时间",
  330. },
  331. ],
  332. formType: "", //表单类型 dragForm:拖拽表单 composeForm:工艺组合表单 designForm:定制表单
  333. // k-form-build 数据
  334. dynamicData: {},
  335. tableName: "",
  336. defaultValue: {},
  337. jsonData: {},
  338. // 拖拽数据
  339. taskInfo: {},
  340. groupKey: "",
  341. subCount: {},
  342. tableCount: {},
  343. subTableName: "",
  344. // 弹窗表单渲染数据
  345. formData: {},
  346. backExceptionTaskList: ["GY06"], //特殊回退表单组件列表
  347. };
  348. },
  349. computed: {
  350. newColumn() {
  351. if (this.queryParams.taskProcessState == "3") {
  352. return [
  353. {
  354. prop: "bepTaskKey",
  355. label: "任务编号",
  356. },
  357. {
  358. prop: "bepTaskName",
  359. label: "任务名称",
  360. },
  361. {
  362. prop: "bepTaskProcessType",
  363. label: "任务流程类型",
  364. },
  365. {
  366. prop: "bepTaskProcessState",
  367. label: "任务流程状态",
  368. },
  369. {
  370. prop: "benCreateBy",
  371. label: "创建人",
  372. },
  373. {
  374. prop: "benCreateTime",
  375. label: "创建时间",
  376. },
  377. ];
  378. } else {
  379. return this.columns;
  380. }
  381. },
  382. },
  383. mounted() {
  384. this.getList();
  385. this.getDoneNumber();
  386. this.getDoingNumber();
  387. },
  388. methods: {
  389. // 获取列表数据
  390. getList() {
  391. processList({ ...this.queryParams, taskName: this.queryString }).then(
  392. (res) => {
  393. if (res.code == 200) {
  394. this.tableData = res.rows.map((item) => item.resultMap);
  395. this.total = res.total;
  396. console.log(this.tableData);
  397. } else {
  398. this.$message.error("网络异常,请稍后再试");
  399. }
  400. }
  401. );
  402. },
  403. getDoneNumber() {
  404. let params = {
  405. pageNum: 1,
  406. pageSize: 10,
  407. taskProcessState: "3",
  408. };
  409. processList(params).then((res) => {
  410. if (res.code == 200) {
  411. this.doneNum = res.total;
  412. } else {
  413. this.$message.error("网络异常,请稍后再试");
  414. }
  415. });
  416. },
  417. getDoingNumber() {
  418. let params = {
  419. pageNum: 1,
  420. pageSize: 10,
  421. taskProcessState: "0",
  422. };
  423. processList(params).then((res) => {
  424. if (res.code == 200) {
  425. this.doingNum = res.total;
  426. } else {
  427. this.$message.error("网络异常,请稍后再试");
  428. }
  429. });
  430. },
  431. // 获取表单数据
  432. async getFormData() {
  433. let formData = {};
  434. // switch (this.formType) {
  435. // case "dragForm":
  436. // try {
  437. // formData = await this.$refs.addFromRef.getData();
  438. // } catch (error) {
  439. // console.log(error);
  440. // this.$message.error("表单校验异常,请稍后重试");
  441. // return {};
  442. // }
  443. // break;
  444. // case "designForm":
  445. // let temp = await this.$refs.myFormRef.getFormData();
  446. // if (!temp.flag) {
  447. // this.$message.error(temp.msg);
  448. // return {};
  449. // } else {
  450. // formData = temp.data;
  451. // }
  452. // break;
  453. // default:
  454. // break;
  455. // }
  456. console.log(this.$refs.myFormRef);
  457. let temp = await this.$refs.myFormRef?.getFormData();
  458. console.log("temp", temp);
  459. if (!temp?.flag) {
  460. this.$message.error(temp.msg);
  461. return false;
  462. } else {
  463. formData = temp.data;
  464. }
  465. return formData;
  466. },
  467. // 重置弹窗数据
  468. resetDialogForm() {
  469. this.formType = ""; //表单类型 dragForm:拖拽表单 composeForm:工艺组合表单 designForm:定制表单
  470. // k-form-build 数据
  471. this.dynamicData = {};
  472. this.defaultValue = {};
  473. this.jsonData = {};
  474. },
  475. // 打开运行节点弹窗
  476. async opneExecuteNode(row) {
  477. this.resetDialogForm();
  478. console.log(row);
  479. this.nodeTitle = row.benTaskNodeName;
  480. // let preFix = row.benTaskNodeName.split("-")[0];
  481. let preFix = row.benTaskNodeFormKey;
  482. let {
  483. benTaskNodeFormKey,
  484. benTaskNodeFormType,
  485. bepTaskPlanKey,
  486. bepTaskKey,
  487. bepTaskNodeKey,
  488. benTaskProcessKey,
  489. benmTaskAutomaticScriptTriggerType,
  490. bepTaskNodeNextKey,
  491. } = row;
  492. // 新的运行逻辑
  493. let payLoad = {
  494. taskNodeKey: bepTaskNodeNextKey,
  495. taskProcessKey: benTaskProcessKey,
  496. taskAutomaticScriptTriggerType: benmTaskAutomaticScriptTriggerType,
  497. taskPlanKey: bepTaskPlanKey,
  498. };
  499. // let formData = await getProcessNodeFormTemplate(payLoad);
  500. // console.log(formData);
  501. // if (benTaskNodeFormKey) {
  502. // if (benTaskNodeFormType == "dragForm") {
  503. // let templateInfo = formData.data[0]?.template;
  504. // //拖拽表单
  505. // this.formType = "dragForm";
  506. // this.jsonData = JSON.parse(templateInfo.dfVueTemplate);
  507. // this.tableName = templateInfo.dfTableName;
  508. // if (Object.keys(JSON.parse(templateInfo.dfFormSql)).length) {
  509. // this.dynamicData = JSON.parse(templateInfo.dfFormSql);
  510. // }
  511. // // await this.getDragFormInfo(benTaskNodeFormKey);
  512. // } else if (benTaskNodeFormType == "composeForm") {
  513. // //工艺组合表单
  514. // this.formType = "composeForm";
  515. // this.groupKey = benTaskNodeFormKey;
  516. // let queryPayload = {
  517. // row,
  518. // groupKey: benTaskNodeFormKey,
  519. // };
  520. // this.$nextTick(() => {
  521. // this.$refs.dialogRef.getLists(queryPayload);
  522. // });
  523. // }
  524. // } else if (preFix) {
  525. // //定制表单
  526. // this.formType = "designForm";
  527. // this.myForm = preFix;
  528. // }
  529. //定制表单
  530. this.formType = "designForm";
  531. this.myForm = preFix;
  532. let res = await getProcessNodeFormInfoData(payLoad);
  533. if (res.code == 200) {
  534. this.formData = res.data;
  535. } else {
  536. this.$message.error("网络异常,请稍后再试");
  537. }
  538. this.row = row; //记录当前行数据
  539. // if (!this.formType) return; //没有表单,直接掉运行逻辑
  540. this.open = true; // 打开弹窗
  541. this.$nextTick(() => {
  542. this.$refs.myFormRef?.resetForm();
  543. });
  544. // 根据当前节点绑定的表单信息查询对应的表单进行展示
  545. },
  546. // 运行节点按钮 确认运行回调
  547. async executeNode() {
  548. let { benTaskNodeKey, bepTaskProcessXmlContent, implementationName } =
  549. this.row;
  550. let { nodeId, nextNodeId } = this.getNextNodeKey(
  551. benTaskNodeKey,
  552. bepTaskProcessXmlContent
  553. );
  554. // 只有完成状态的可以运行
  555. if (this.formType == "composeForm") {
  556. let res = this.$refs.dialogRef.getComposeFormData();
  557. if (!res.isSuccess) {
  558. this.$message.warning("非完成状态节点不能运行!");
  559. return;
  560. }
  561. }
  562. // return;
  563. let formData = await this.getFormData();
  564. if (!formData) return;
  565. formData.taskPlanKey = this.row.bepTaskPlanKey;
  566. let payLoad = {
  567. taskProcessKey: this.row.bepTaskKey, //当前任务流程编码
  568. taskNodeKey: nodeId, //当前执行节点唯一编码
  569. nextNodeKey: nextNodeId, //下一节点编码
  570. implementationName: this.row.benmTaskAutomaticScriptTriggerType, //当前节点绑定的脚本名
  571. // taskProcessXmlContent: this.row.bepTaskProcessXmlContent, //当前流程xml
  572. tableName: this.tableName,
  573. formDataMap: JSON.stringify(formData), //自定义表单组件收集的表单数据
  574. taskNodeType: this.backExceptionTaskList.includes(
  575. this.row.benTaskNodeFormKey
  576. )
  577. ? "backExceptionTask"
  578. : this.row.benTaskNodeType,
  579. };
  580. let fileXML = new File(
  581. [this.row.bepTaskProcessXmlContent],
  582. this.row.bepTaskKey + ".bpmn",
  583. {
  584. type: "text/bpmn",
  585. }
  586. );
  587. const subformData = new FormData();
  588. subformData.append("fileXML", fileXML);
  589. for (let key in payLoad) {
  590. subformData.append(key, payLoad[key] == null ? "" : payLoad[key]);
  591. }
  592. runProcessNodeExecution(subformData).then((res) => {
  593. if (res.code == 200) {
  594. this.$message.success("运行成功!");
  595. this.getList();
  596. this.open = false;
  597. }
  598. });
  599. },
  600. // 获取拖拽表单数据
  601. async getDragFormInfo(fid) {
  602. try {
  603. let res = await getForm(fid);
  604. console.log(res);
  605. if (res.code == 200) {
  606. this.jsonData = JSON.parse(res.data.dfVueTemplate);
  607. this.tableName = res.data.dfTableName;
  608. if (res.data.dfFormSql) {
  609. this.dynamicData = JSON.parse(res.data.dfFormSql);
  610. console.log(this.dynamicData);
  611. }
  612. } else {
  613. console.log(res);
  614. throw new Error(res);
  615. }
  616. } catch (error) {
  617. console.log(error);
  618. this.$message.error("网络异常,请稍后再试");
  619. }
  620. },
  621. // 关闭运行节点弹窗
  622. closeExecuteNode(row) {
  623. this.open = false;
  624. },
  625. // 获取下一个节点的nodekey
  626. getNextNodeKey(nodeKey, xmlStr) {
  627. let xmlObj = this.xmlStr2XmlObj(xmlStr);
  628. let nodeSequence = getNodeSequence(xmlObj);
  629. return nodeSequence.find((item) => item.nodeId == nodeKey) || {};
  630. },
  631. // xml字符串转xml对象
  632. xmlStr2XmlObj(xmlStr) {
  633. var xmlObj = {};
  634. if (document.all) {
  635. var xmlDom = new ActiveXObject("Microsoft.XMLDOM");
  636. xmlDom.loadXML(xmlStr);
  637. xmlObj = xmlDom;
  638. } else {
  639. xmlObj = new DOMParser().parseFromString(xmlStr, "text/xml");
  640. }
  641. return xmlObj;
  642. },
  643. // 触发异常回调
  644. exceptionTrigger(row, scriptData) {
  645. let _this = this;
  646. this.$modal
  647. .confirm("是否确认触发<" + scriptData.scriptName + ">异常?")
  648. .then(function (val) {
  649. console.log(val);
  650. // 发送触发异常节点的请求
  651. let payLoad = {
  652. taskProcessKey: row.bepTaskKey,
  653. taskNodeKey: row.benTaskNodeKey,
  654. sysBpmNodeScriptVO: scriptData,
  655. };
  656. triggerExceptionNode(payLoad).then((res) => {
  657. console.log(res);
  658. if (res.code == 200) {
  659. _this.$message.success("触发成功");
  660. _this.open = false;
  661. _this.getList();
  662. } else {
  663. _this.$message.error("触发失败请稍后再试");
  664. }
  665. });
  666. })
  667. .catch(() => {
  668. _this.open = false;
  669. _this.$message.info("取消成功");
  670. });
  671. },
  672. // 获取字典对应label
  673. getDictLabel(value, dictLsit = []) {
  674. return dictLsit.find((item) => {
  675. return item.value == value;
  676. })?.label;
  677. },
  678. },
  679. };
  680. </script>
  681. <style scoped lang="scss">
  682. .process-mange-wrap {
  683. background-color: #f2f3f8;
  684. padding: 20px;
  685. .col {
  686. background-color: #fff;
  687. border-right: 1px solid #ebedf2;
  688. /* margin-right: 3px; */
  689. .statistic-wrap {
  690. /* // height: 70px; */
  691. box-sizing: border-box;
  692. display: flex;
  693. align-items: center;
  694. padding: 10px 17px;
  695. justify-content: space-between;
  696. .discription {
  697. display: flex;
  698. flex-direction: column;
  699. .title {
  700. line-height: 20px;
  701. font-size: 18px;
  702. font-weight: 700;
  703. margin-bottom: 5px;
  704. }
  705. .sub-title {
  706. font-size: 14px;
  707. }
  708. }
  709. .data {
  710. font-size: 20px;
  711. font-weight: 700;
  712. }
  713. }
  714. }
  715. .main-area {
  716. margin-top: 30px;
  717. box-shadow: 0 1px 15px 1px rgb(69 65 78 / 8%);
  718. background-color: #fff;
  719. .show-header {
  720. border-bottom: 1px solid #ebedf2;
  721. display: flex;
  722. align-items: center;
  723. justify-content: space-between;
  724. padding: 0px 20px 0px 20px;
  725. height: 70px;
  726. /* .header {
  727. } */
  728. .search-list {
  729. display: flex;
  730. .search-tab {
  731. margin-right: 20px;
  732. .btn-list-two {
  733. margin-left: 10px;
  734. }
  735. }
  736. }
  737. }
  738. .show-body {
  739. padding: 25px;
  740. }
  741. }
  742. }
  743. </style>