index.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895
  1. <template>
  2. <div class="processApproval">
  3. <div class="left-card">
  4. <div class="top">
  5. <div class="commons-title title">
  6. {{
  7. route.query.flowName || props.query.flowName || "流程标题(发起)"
  8. }}
  9. </div>
  10. <div class="line"></div>
  11. <!-- 报价单 -->
  12. <template v-if="flowForm.flowKey == 'sale_quotation_flow'">
  13. <PriceSheetEHSD
  14. ref="makeDom"
  15. v-if="flowForm.tenantType === 'EHSD'"
  16. :queryData="queryData.data"
  17. ></PriceSheetEHSD>
  18. </template>
  19. <!-- 样品单 -->
  20. <template v-else-if="flowForm.flowKey == 'sample_flow'">
  21. <SampleEHSD ref="makeDom" :queryData="queryData.data"></SampleEHSD>
  22. </template>
  23. <!-- 样品单变更 -->
  24. <template v-else-if="flowForm.flowKey == 'sample_update_flow'">
  25. <SampleChangeEHSD
  26. ref="makeDom"
  27. :queryData="queryData.data"
  28. ></SampleChangeEHSD>
  29. </template>
  30. <!-- 销售合同 -->
  31. <template v-else-if="flowForm.flowKey == 'contract_flow'">
  32. <ContractEHSD
  33. ref="makeDom"
  34. :queryData="queryData.data"
  35. @auxiliaryChange="(e) => getAuxiliaryData(e)"
  36. ></ContractEHSD>
  37. </template>
  38. <!-- 销售合同变更 -->
  39. <template v-else-if="flowForm.flowKey == 'contract_update_flow'">
  40. <ContractChangeEHSD
  41. ref="makeDom"
  42. :queryData="queryData.data"
  43. @auxiliaryChange="(e) => getAuxiliaryData(e)"
  44. ></ContractChangeEHSD>
  45. </template>
  46. <!-- 申购 -->
  47. <SendSubscribe
  48. ref="makeDom"
  49. @auxiliaryChange="(e) => getAuxiliaryData(e)"
  50. v-else-if="flowForm.flowKey == 'subscribe_flow'"
  51. :queryData="queryData.data"
  52. ></SendSubscribe>
  53. <!-- 样品单采购、交接单采购 -->
  54. <template v-else-if="flowForm.flowKey == 'ehsd_purchase_flow'">
  55. <PurchaseEHSD
  56. ref="makeDom"
  57. :queryData="queryData.data"
  58. v-if="flowForm.submitType === '10'"
  59. @auxiliaryChange="(e) => getAuxiliaryData(e)"
  60. ></PurchaseEHSD>
  61. <SendPurchase
  62. ref="makeDom"
  63. :queryData="queryData.data"
  64. v-else
  65. @auxiliaryChange="(e) => getAuxiliaryData(e)"
  66. ></SendPurchase>
  67. </template>
  68. <PurchaseChangeEHSD
  69. ref="makeDom"
  70. :queryData="queryData.data"
  71. v-else-if="flowForm.flowKey == 'ehsd_purchase_update_flow'"
  72. @auxiliaryChange="(e) => getAuxiliaryData(e)"
  73. ></PurchaseChangeEHSD>
  74. <!-- 采购付款 -->
  75. <PurchasePayment
  76. ref="makeDom"
  77. @auxiliaryChange="(e) => getAuxiliaryData(e)"
  78. v-else-if="flowForm.flowKey == 'pay_flow'"
  79. :queryData="queryData.data"
  80. ></PurchasePayment>
  81. <!-- 请款 -->
  82. <SendFunds
  83. ref="makeDom"
  84. v-else-if="flowForm.flowKey == 'account_request_funds_flow'"
  85. :queryData="queryData.data"
  86. ></SendFunds>
  87. </div>
  88. <div class="bottom" v-if="isShowSubmitDom">
  89. <div class="commons-title title">处理意见</div>
  90. <el-form :model="flowForm" :rules="flowRules" ref="flowFormDom">
  91. <el-form-item prop="remark" label-width="0px" label="">
  92. <el-input
  93. type="textarea"
  94. placeholder="请输入"
  95. v-model="flowForm.remark"
  96. >
  97. </el-input>
  98. </el-form-item>
  99. <el-form-item prop="remark" label-width="80px" label="附件上传">
  100. <el-upload
  101. v-model:fileList="flowForm.fileList"
  102. action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
  103. :data="uploadData"
  104. multiple
  105. :before-upload="uploadFile"
  106. :on-success="handleSuccess"
  107. :on-preview="onPreviewFile"
  108. >
  109. <el-button>选择</el-button>
  110. </el-upload>
  111. </el-form-item>
  112. <el-form-item>
  113. <el-button
  114. type="primary"
  115. v-if="approvalRecordData.buttonInfoList.length == 0"
  116. @click="handleSubmit"
  117. :loading="btnLoading"
  118. >提交</el-button
  119. >
  120. <el-button
  121. type="primary"
  122. v-else
  123. v-for="i in approvalRecordData.buttonInfoList"
  124. :key="i.type"
  125. :loading="btnLoading"
  126. @click="handleSubmit(i.type)"
  127. >{{ i.name }}</el-button
  128. >
  129. </el-form-item>
  130. </el-form>
  131. </div>
  132. </div>
  133. <div class="right-card">
  134. <el-tabs v-model="activeName" class="demo-tabs">
  135. <el-tab-pane label="审批记录" name="first">
  136. <ul class="flow-chart">
  137. <li
  138. v-for="item in recordList"
  139. :key="item.id"
  140. :class="
  141. !route.query.id
  142. ? ''
  143. : item.status == 2
  144. ? 'flow-orange'
  145. : item.status == 3 && !route.query.id
  146. ? 'flow-orange'
  147. : item.status == 3 && route.query.id
  148. ? 'flow-grey'
  149. : ''
  150. "
  151. >
  152. <div class="left-icon">
  153. <i class="iconfont icon-iconm_daick"></i>
  154. <i class="iconfont icon-icomx_quertj1 right-btm-status"></i>
  155. </div>
  156. <div class="right-conetnt">
  157. <div class="name">{{ item.nodeName }}</div>
  158. <div class="remark">
  159. <div class="label">
  160. <span v-if="item.status != 3">办理人:</span
  161. >{{ item.processedUser
  162. }}<span class="time">{{ item.processedDate }}</span>
  163. </div>
  164. {{ item.remark }}
  165. <div
  166. v-for="j in fileObj[item.flowExampleDetailId]"
  167. v-if="fileObj[item.flowExampleDetailId]"
  168. >
  169. <a
  170. @click="proxy.download(j.fileUrl, j.fileName)"
  171. style="color: #409eff; line-height: 30px"
  172. >{{ j.fileName }}</a
  173. >
  174. </div>
  175. </div>
  176. </div>
  177. <div class="line"></div>
  178. </li>
  179. </ul>
  180. </el-tab-pane>
  181. <el-tab-pane
  182. label="决策辅助"
  183. name="second"
  184. v-if="auxiliaryData.length > 0"
  185. >
  186. <div style="overflow: auto; height: calc(100vh - 200px)">
  187. <auxiliary :data="auxiliaryData"></auxiliary>
  188. </div>
  189. </el-tab-pane>
  190. </el-tabs>
  191. </div>
  192. <el-dialog
  193. title="下一处理人"
  194. width="400"
  195. v-model="dialogVisible"
  196. v-if="dialogVisible"
  197. >
  198. <el-form :model="flowForm">
  199. <el-form-item prop="remark" label="处理人">
  200. <el-select
  201. v-model="flowForm.handleUserId"
  202. placeholder="请选择"
  203. filterable
  204. style="width: 100%"
  205. >
  206. <el-option
  207. v-for="item in nextHandleUser"
  208. :label="item.nickName"
  209. :value="item.userId"
  210. >
  211. </el-option>
  212. </el-select>
  213. </el-form-item>
  214. <el-form-item>
  215. <div style="width: 100%; text-align: center">
  216. <el-button type="primary" @click="handleSelectUser">提交</el-button>
  217. </div>
  218. </el-form-item>
  219. </el-form>
  220. </el-dialog>
  221. </div>
  222. </template>
  223. <script setup name="ProcessApproval">
  224. import useTagsViewStore from "@/store/modules/tagsView.js";
  225. import { useRouter, useRoute } from "vue-router";
  226. // 消息提示
  227. import { ElMessage, ElMessageBox } from "element-plus";
  228. //决策辅助
  229. import auxiliary from "./auxiliary";
  230. // 报价单-EHSD
  231. import PriceSheetEHSD from "@/components/process/EHSD/PriceSheet";
  232. // 销售合同-EHSD
  233. import ContractEHSD from "@/components/process/EHSD/Contract";
  234. // 销售合同变更-EHSD
  235. import ContractChangeEHSD from "@/components/process/EHSD/ContractChange";
  236. // 样品单-EHSD
  237. import SampleEHSD from "@/components/process/EHSD/Sample";
  238. // 样品单变更-EHSD
  239. import SampleChangeEHSD from "@/components/process/EHSD/SampleChange";
  240. // 采购交接单-EHSD
  241. import PurchaseEHSD from "@/components/process/EHSD/Purchase";
  242. // 采购交接单-EHSD
  243. import PurchaseChangeEHSD from "@/components/process/EHSD/PurchaseChange";
  244. //申购发起
  245. import SendSubscribe from "@/components/process/SendSubscribe";
  246. //采购发起
  247. import SendPurchase from "@/components/process/SendPurchase";
  248. //请款发起
  249. import SendFunds from "@/components/process/SendFunds";
  250. // 采购付款
  251. import PurchasePayment from "@/components/process/PurchasePayment";
  252. import { computed, ref, watch } from "vue";
  253. const router = useRouter();
  254. const route = useRoute();
  255. // 传参
  256. const props = defineProps({
  257. query: Object,
  258. });
  259. // tab切换逻辑
  260. const activeName = ref("first");
  261. let auxiliaryData = ref([]);
  262. const getAuxiliaryData = (data) => {
  263. auxiliaryData.value = data;
  264. };
  265. const btnLoading = ref(false);
  266. // 意见表单
  267. const flowForm = reactive({
  268. flowKey: "",
  269. tenantType: "",
  270. handleUserId: "",
  271. remark: "",
  272. data: {},
  273. fileList: [],
  274. });
  275. const uploadData = ref({});
  276. const flowRules = reactive({
  277. // remark: [{ required: true, message: "请输入处理意见", trigger: "blur" }],
  278. });
  279. //组件实例
  280. const { proxy } = getCurrentInstance();
  281. const makeDom = ref(null);
  282. const flowFormDom = ref(null);
  283. let dialogVisible = ref(false);
  284. const nextHandleUser = ref([]);
  285. const handleType = ref(null);
  286. const handleSelectUser = () => {
  287. if (!flowForm.handleUserId) {
  288. return ElMessage({
  289. message: "请选择下一节点处理人!",
  290. type: "info",
  291. });
  292. }
  293. handleSubmit(handleType.value);
  294. };
  295. const handleResult = (res) => {
  296. if (res.userList == null && res.success) {
  297. skipPage();
  298. } else if (res.userList && res.userList.length > 0) {
  299. dialogVisible.value = true;
  300. nextHandleUser.value = res.userList;
  301. } else {
  302. return ElMessage({
  303. message: "请联系管理员!",
  304. type: "info",
  305. });
  306. }
  307. };
  308. const uploadFile = async (file) => {
  309. const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
  310. uploadData.value = res.uploadBody;
  311. file.id = res.id;
  312. file.fileName = res.fileName;
  313. file.fileUrl = res.fileUrl;
  314. file.uploadState = true;
  315. return true;
  316. };
  317. const handleSuccess = (any, UploadFile) => {
  318. UploadFile.raw.uploadState = false;
  319. };
  320. const onPreviewFile = (file) => {
  321. window.open(file.raw.fileUrl, "_blank");
  322. };
  323. // 提交逻辑
  324. const handleSubmit = async (_type) => {
  325. handleType.value = _type ? _type : undefined;
  326. try {
  327. // 调用发起组件的提交事件
  328. const flag = await makeDom.value.handleSubmit();
  329. if (flag) {
  330. flowFormDom.value.validate((valid) => {
  331. btnLoading.value = true;
  332. if (valid) {
  333. const data = { ...makeDom.value.getFormData() };
  334. if (flowForm.flowKey == "subscribe_flow") {
  335. } else if (flowForm.flowKey == "account_request_funds_flow") {
  336. } else if (flowForm.flowKey == "sale_quotation_flow") {
  337. if (flowForm.tenantType === "EHSD") {
  338. data.ehsdJson = JSON.stringify({
  339. deliveryTime: data.deliveryTime,
  340. });
  341. data.quotationProductList = data.quotationProductList.map(
  342. (item) => {
  343. let ehsdJson = JSON.stringify({
  344. packMethod: item.packMethod,
  345. tradeMethods: item.tradeMethods,
  346. });
  347. return {
  348. ...item,
  349. ehsdJson: ehsdJson,
  350. };
  351. }
  352. );
  353. }
  354. } else if (flowForm.flowKey == "contract_flow") {
  355. data.dataJson = JSON.stringify(proxy.deepClone(data));
  356. if (data.fileList && data.fileList.length > 0) {
  357. data.fileList = data.fileList.map((item) => {
  358. return {
  359. id: item.raw.id,
  360. fileName: item.raw.fileName,
  361. fileUrl: item.raw.fileUrl,
  362. };
  363. });
  364. } else {
  365. data.fileList = [];
  366. }
  367. if (data.packageFileList && data.packageFileList.length > 0) {
  368. data.packageFileList = data.packageFileList.map((item) => {
  369. return {
  370. id: item.raw.id,
  371. fileName: item.raw.fileName,
  372. fileUrl: item.raw.fileUrl,
  373. };
  374. });
  375. } else {
  376. data.packageFileList = [];
  377. }
  378. data.ehsdJson = JSON.stringify({
  379. deliveryTime: data.deliveryTime,
  380. });
  381. data.contractProductList = data.contractProductList.map((item) => {
  382. let ehsdJson = JSON.stringify({
  383. packMethod: item.packMethod,
  384. tradeMethods: item.tradeMethods,
  385. });
  386. return {
  387. ...item,
  388. ehsdJson: ehsdJson,
  389. };
  390. });
  391. } else if (flowForm.flowKey == "contract_update_flow") {
  392. data.dataJson = JSON.stringify(proxy.deepClone(data));
  393. if (data.fileList && data.fileList.length > 0) {
  394. data.fileList = data.fileList.map((item) => {
  395. return {
  396. id: item.raw.id,
  397. fileName: item.raw.fileName,
  398. fileUrl: item.raw.fileUrl,
  399. };
  400. });
  401. } else {
  402. data.fileList = [];
  403. }
  404. if (data.packageFileList && data.packageFileList.length > 0) {
  405. data.packageFileList = data.packageFileList.map((item) => {
  406. return {
  407. id: item.raw.id,
  408. fileName: item.raw.fileName,
  409. fileUrl: item.raw.fileUrl,
  410. };
  411. });
  412. } else {
  413. data.packageFileList = [];
  414. }
  415. data.ehsdJson = JSON.stringify({
  416. deliveryTime: data.deliveryTime,
  417. });
  418. data.contractProductList = data.contractProductList.map((item) => {
  419. let ehsdJson = JSON.stringify({
  420. packMethod: item.packMethod,
  421. tradeMethods: item.tradeMethods,
  422. });
  423. return {
  424. ...item,
  425. ehsdJson: ehsdJson,
  426. };
  427. });
  428. } else if (flowForm.flowKey == "sample_flow") {
  429. data.dataJson = JSON.stringify(proxy.deepClone(data));
  430. if (data.fileList && data.fileList.length > 0) {
  431. data.fileList = data.fileList.map((item) => {
  432. return {
  433. id: item.raw.id,
  434. fileName: item.raw.fileName,
  435. fileUrl: item.raw.fileUrl,
  436. };
  437. });
  438. } else {
  439. data.fileList = [];
  440. }
  441. if (data.packageFileList && data.packageFileList.length > 0) {
  442. data.packageFileList = data.packageFileList.map((item) => {
  443. return {
  444. id: item.raw.id,
  445. fileName: item.raw.fileName,
  446. fileUrl: item.raw.fileUrl,
  447. };
  448. });
  449. } else {
  450. data.packageFileList = [];
  451. }
  452. data.ehsdJson = JSON.stringify({
  453. deliveryTime: data.deliveryTime,
  454. });
  455. data.sampleProductList = data.sampleProductList.map((item) => {
  456. let ehsdJson = JSON.stringify({
  457. packMethod: item.packMethod,
  458. tradeMethods: item.tradeMethods,
  459. });
  460. return {
  461. ...item,
  462. ehsdJson: ehsdJson,
  463. };
  464. });
  465. } else if (flowForm.flowKey == "sample_update_flow") {
  466. data.dataJson = JSON.stringify(proxy.deepClone(data));
  467. if (data.fileList && data.fileList.length > 0) {
  468. data.fileList = data.fileList.map((item) => {
  469. return {
  470. id: item.raw.id,
  471. fileName: item.raw.fileName,
  472. fileUrl: item.raw.fileUrl,
  473. };
  474. });
  475. } else {
  476. data.fileList = [];
  477. }
  478. if (data.packageFileList && data.packageFileList.length > 0) {
  479. data.packageFileList = data.packageFileList.map((item) => {
  480. return {
  481. id: item.raw.id,
  482. fileName: item.raw.fileName,
  483. fileUrl: item.raw.fileUrl,
  484. };
  485. });
  486. } else {
  487. data.packageFileList = [];
  488. }
  489. data.ehsdJson = JSON.stringify({
  490. deliveryTime: data.deliveryTime,
  491. });
  492. data.sampleProductList = data.sampleProductList.map((item) => {
  493. let ehsdJson = JSON.stringify({
  494. packMethod: item.packMethod,
  495. tradeMethods: item.tradeMethods,
  496. });
  497. return {
  498. ...item,
  499. ehsdJson: ehsdJson,
  500. };
  501. });
  502. }
  503. flowForm.fileList = flowForm.fileList.map((item) => {
  504. return {
  505. ...item,
  506. ...item.raw,
  507. };
  508. });
  509. if (route.query.processType == 10 || route.query.processType == 30) {
  510. // if (_type && _type == 1) {
  511. // proxy
  512. // .post("/flowExample/setStartData", {
  513. // exampleId: route.query.id,
  514. // startData: data,
  515. // })
  516. // .then();
  517. // }
  518. proxy
  519. .post("/flowProcess/jump", {
  520. ...flowForm,
  521. data,
  522. handleType: _type,
  523. version: route.query.version,
  524. flowId: route.query.id,
  525. })
  526. .then(
  527. (res) => {
  528. handleResult(res);
  529. },
  530. (err) => {
  531. btnLoading.value = false;
  532. }
  533. );
  534. return;
  535. } else {
  536. proxy
  537. .post("/flowProcess/initiate", {
  538. ...flowForm,
  539. data,
  540. })
  541. .then(
  542. (res) => {
  543. handleResult(res);
  544. },
  545. (err) => {
  546. btnLoading.value = false;
  547. }
  548. );
  549. }
  550. }
  551. });
  552. }
  553. } catch (err) {
  554. console.log("数据未填完整!", err);
  555. }
  556. };
  557. // 页面跳转
  558. const skipPage = () => {
  559. const useTagsStore = useTagsViewStore();
  560. useTagsStore.delVisitedView(router.currentRoute.value);
  561. if (route.query.processType) {
  562. router.replace({
  563. path: "/oa/1/backlog",
  564. });
  565. } else {
  566. ElMessage({
  567. message: "操作成功!",
  568. type: "success",
  569. });
  570. if (flowForm.flowKey == "subscribe_flow") {
  571. router.replace({
  572. path: "/ehsd/procurement/subscribe",
  573. });
  574. } else if (flowForm.flowKey == "account_request_funds_flow") {
  575. router.replace({
  576. path: "/ehsd/fundManage/funds",
  577. });
  578. } else if (flowForm.flowKey == "pay_flow") {
  579. router.replace({
  580. path: "/ehsd/purchasePayment/payment",
  581. });
  582. } else if (flowForm.flowKey == "sale_quotation_flow") {
  583. if (flowForm.tenantType === "EHSD") {
  584. router.replace({
  585. path: "/ehsd/saleContract/quotation",
  586. });
  587. }
  588. } else if (
  589. flowForm.flowKey == "contract_flow" ||
  590. flowForm.flowKey == "contract_update_flow"
  591. ) {
  592. router.replace({
  593. path: "/ehsd/saleContract/contract",
  594. });
  595. } else if (
  596. flowForm.flowKey == "sample_flow" ||
  597. flowForm.flowKey == "sample_update_flow"
  598. ) {
  599. router.replace({
  600. path: "/ehsd/saleContract/sample",
  601. });
  602. } else if (
  603. flowForm.flowKey == "ehsd_purchase_flow" ||
  604. flowForm.flowKey == "ehsd_purchase_update_flow"
  605. ) {
  606. router.replace({
  607. path: "/ehsd/procurement/purchased",
  608. });
  609. }
  610. }
  611. };
  612. let queryData = reactive({
  613. data: {},
  614. });
  615. // 记录
  616. const recordList = ref([]);
  617. const fileIds = ref([]);
  618. const fileObj = ref({});
  619. const approvalRecordData = ref({
  620. buttonInfoList: [],
  621. });
  622. const getRecords = (_id) => {
  623. if (_id) {
  624. proxy
  625. .post("/flowExample/getApprovalRecord", {
  626. id: _id,
  627. })
  628. .then((res) => {
  629. recordList.value = res.recordList;
  630. queryData.data.recordList = res.recordList;
  631. approvalRecordData.value = res;
  632. fileIds.value = res.recordList.map((item) => {
  633. return item.flowExampleDetailId;
  634. });
  635. proxy
  636. .post("fileInfo/getList", { businessIdList: fileIds.value })
  637. .then((res2) => {
  638. console.log(res2);
  639. fileObj.value = res2;
  640. });
  641. console.log(fileObj.value);
  642. });
  643. } else {
  644. proxy
  645. .post("/flowExample/getFlowNode", {
  646. flowKey: flowForm.flowKey,
  647. })
  648. .then((res) => {
  649. recordList.value = res;
  650. });
  651. }
  652. };
  653. const isShowSubmitDom = ref(true);
  654. onMounted(async () => {
  655. // 路由进入
  656. if (route.query && route.query.flowKey) {
  657. //processType 10 为修改 20为查看 30回退发起
  658. if (route.query.processType == 20) {
  659. isShowSubmitDom.value = false;
  660. }
  661. if (
  662. route.query.processType == 10 ||
  663. route.query.processType == 20 ||
  664. route.query.processType == 30
  665. ) {
  666. // await proxy
  667. // .post("/flowProcess/getStartData", { flowId: route.query.id })
  668. // .then((res) => {
  669. // queryData.data = { ...res };
  670. // });
  671. } else {
  672. queryData.data = { ...route.query };
  673. }
  674. flowForm.flowKey = route.query.flowKey;
  675. flowForm.tenantType = route.query.tenantType;
  676. flowForm.submitType = route.query.submitType;
  677. getRecords(route.query.id);
  678. }
  679. });
  680. watch(
  681. () => props.query,
  682. () => {
  683. if (props.query) {
  684. if (props.query.processType == 20) {
  685. isShowSubmitDom.value = false;
  686. }
  687. if (
  688. props.query.processType == 10 ||
  689. props.query.processType == 20 ||
  690. props.query.processType == 30
  691. ) {
  692. // await proxy
  693. // .post("/flowProcess/getStartData", { flowId: props.query.id })
  694. // .then((res) => {
  695. // queryData.data = { ...res };
  696. // });
  697. queryData.data = { ...props.query };
  698. } else {
  699. queryData.data = { ...props.query };
  700. }
  701. flowForm.flowKey = props.query.flowKey;
  702. flowForm.tenantType = props.query.tenantType;
  703. flowForm.submitType = props.query.submitType;
  704. getRecords(props.query.id);
  705. }
  706. },
  707. {
  708. deep: true,
  709. immediate: true,
  710. }
  711. );
  712. </script>
  713. <style>
  714. .el-upload-list {
  715. float: left;
  716. margin: 0 !important;
  717. }
  718. .el-upload-list li {
  719. width: 200px;
  720. margin-left: 10px;
  721. }
  722. .el-upload--text {
  723. float: left;
  724. }
  725. </style>
  726. <style lang="scss" scoped>
  727. .processApproval {
  728. display: flex;
  729. justify-content: space-between;
  730. margin-top: 20px;
  731. padding: 0 20px;
  732. height: calc(100vh - 130px);
  733. .left-card {
  734. // background: #fff;
  735. border-radius: 4px;
  736. // padding: 20px;
  737. // flex: 1;
  738. width: calc(100% - 400px - 20px);
  739. margin-right: 20px;
  740. display: flex;
  741. flex-direction: column;
  742. .top {
  743. flex: 1;
  744. overflow-y: auto;
  745. background: #fff;
  746. padding: 20px 20px 0px 20px;
  747. .line {
  748. border-bottom: 1px solid #ddd;
  749. margin-bottom: 20px;
  750. }
  751. }
  752. .bottom {
  753. margin-top: 10px;
  754. height: 220px;
  755. background: #fff;
  756. padding: 20px 20px 0px 20px;
  757. }
  758. }
  759. .right-card {
  760. background: #fff;
  761. border-radius: 4px;
  762. padding: 0 20px 20px;
  763. width: 400px;
  764. box-sizing: border-box;
  765. .flow-chart {
  766. overflow: auto;
  767. height: calc(100vh - 200px);
  768. padding: 0;
  769. margin: 0;
  770. li {
  771. margin: 0;
  772. padding: 0 0 20px;
  773. list-style: none;
  774. display: flex;
  775. justify-content: space-between;
  776. position: relative;
  777. .right-conetnt {
  778. flex: 1;
  779. .name {
  780. font-size: 12px;
  781. color: #39c55a;
  782. margin-bottom: 10px;
  783. span {
  784. color: #999;
  785. }
  786. }
  787. .time {
  788. float: right;
  789. }
  790. .remark {
  791. padding: 10px;
  792. color: #666666;
  793. font-size: 12px;
  794. background: #f1f1f1;
  795. border-radius: 2px;
  796. .label {
  797. color: #999;
  798. margin-bottom: 10px;
  799. }
  800. }
  801. }
  802. .left-icon {
  803. width: 40px;
  804. height: 40px;
  805. text-align: center;
  806. line-height: 40px;
  807. background: #0084ff;
  808. border-radius: 10px;
  809. color: #fff;
  810. font-size: 20px;
  811. position: relative;
  812. margin-right: 27px;
  813. z-index: 2;
  814. .right-btm-status {
  815. position: absolute;
  816. bottom: 0px;
  817. right: -10px;
  818. height: 20px;
  819. width: 20px;
  820. line-height: 16px;
  821. border-radius: 10px;
  822. background: #39c55a;
  823. border: 2px solid #fff;
  824. font-size: 12px;
  825. box-sizing: border-box;
  826. }
  827. }
  828. }
  829. li::before {
  830. content: "";
  831. position: absolute;
  832. top: 0;
  833. left: 20px;
  834. width: 2px;
  835. height: 100%;
  836. background: #ddd;
  837. z-index: 1;
  838. }
  839. li:last-child::before {
  840. display: none;
  841. }
  842. .flow-orange {
  843. .right-btm-status {
  844. background: #ff9a00 !important;
  845. }
  846. .name {
  847. color: #ff9a00 !important;
  848. }
  849. .left-icon {
  850. background: #ff9a00 !important;
  851. }
  852. }
  853. .flow-grey {
  854. .right-btm-status {
  855. background: #999 !important;
  856. }
  857. .name {
  858. color: #999 !important;
  859. }
  860. .left-icon {
  861. background: #999 !important;
  862. }
  863. }
  864. .flow-red {
  865. .right-btm-status {
  866. background: #ff4d4f !important;
  867. }
  868. .name {
  869. color: #ff4d4f !important;
  870. }
  871. .left-icon {
  872. background: #ff4d4f !important;
  873. }
  874. }
  875. }
  876. }
  877. }
  878. </style>