backupRequire.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143
  1. <template>
  2. <div class="container">
  3. <div class="titbox">
  4. <div class="titbox-flex">
  5. <eltabs :tabList="tabList" @status="clickTabs"></eltabs>
  6. <el-button type="primary" @click="newMake()" style="width: 150px; height: 40px; margin: 10px 15px 0 0"
  7. v-if="editstatus">+新建</el-button>
  8. </div>
  9. <tableList :list="Table" ref="TableList" @clickDemand="clickDemand" @changeNum="changeNum"></tableList>
  10. <el-dialog :title="dialogTitle + '工单'" :visible.sync="dialogVisible" v-if="dialogVisible"
  11. :before-close="handleClose" width="100%" height="500vh" class="dialogClass" top="0" :modal="false"
  12. :modal-append-to-body="true">
  13. <span class="dialog-body">
  14. <div class="flex-title">备份需求及变更</div>
  15. <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
  16. <!--dialogVisible1 = true -->
  17. <el-form-item style="position: fixed; top: 70px; left: -60px; z-index: 1000">
  18. <el-button type="primary" @click="newFormgong" v-if="baocun">保存</el-button>
  19. <el-button type="primary" v-if="deal" @click="dealwith()">处理</el-button>
  20. <el-button type="primary" @click="close()">关闭</el-button>
  21. <!-- <el-button type="primary" @click="submitForm()" v-if = "baocun">保存</el-button> -->
  22. </el-form-item>
  23. <div class="flex-header">
  24. <el-form-item label="文件标题" prop="needName" style="width: 33%">
  25. <el-input v-model="ruleForm.needName" :disabled="isdisabled"></el-input>
  26. </el-form-item>
  27. <el-form-item label="发起人" prop="proposer" style="width: 33%">
  28. <el-input v-model="ruleForm.proposer" disabled></el-input>
  29. </el-form-item>
  30. <el-form-item label="工单号" prop="workOrderNo" style="width: 33%">
  31. <el-input v-model="ruleForm.workOrderNo" disabled></el-input>
  32. </el-form-item>
  33. </div>
  34. <div class="flex-header">
  35. <el-form-item label="申请类型" style="width: 33%;" prop="proposerType">
  36. <el-select v-model="ruleForm.proposerType" placeholder="请选择" @change="changeSelect"
  37. :disabled="isdisabled">
  38. <el-option label="新增" value="新增"></el-option>
  39. <el-option label="修改" value="修改"></el-option>
  40. <el-option label="删除" value="删除"></el-option>
  41. </el-select>
  42. </el-form-item>
  43. <el-form-item label="发起时间" prop="proposerTime" style="width: 33%">
  44. <el-input v-model="ruleForm.proposerTime" disabled></el-input>
  45. </el-form-item>
  46. </div>
  47. <!-- @change="changeDeptValue" -->
  48. <div class="flex-header-input">
  49. <el-form-item label="申请需求描述:" label-width="110px" prop="proposerContent" style="width: 100%">
  50. <el-input type="textarea" :rows="2" v-model="ruleForm.proposerContent" id="input1"
  51. :disabled="isdisabled"></el-input>
  52. </el-form-item>
  53. </div>
  54. <!-- -->
  55. <div class="flex-header-upload flex-upload" style="display: flex; flex-direction: column">
  56. <el-form-item label="附件:" prop="mkFileShareAttachList" label-width="68px">
  57. <my-upload @uploadBack="uploadBack" @clickDownload="download" :disabled="updisabled" :fileInfo="fileInfo"
  58. :fileList="fileInfo.fileList" ref="myupload" style="width: 15% ; heigth: 120% !important">
  59. </my-upload>
  60. </el-form-item>
  61. </div>
  62. </el-form>
  63. <div class="table-title">
  64. <h2>流程追踪</h2>
  65. </div>
  66. <div class="flex-header-process">
  67. <!-- <tableList :list="processTable" ref="el-form" @clickDemand = "clickDemand"></tableList> -->
  68. <el-table :data="tableData" row-key="id" :header-cell-style="{ textAlign: 'center' }"
  69. :cell-style="{ textAlign: 'center' }" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
  70. style="width: 100%" max-height="350">
  71. <el-table-column type="index" label="序号" width="50">
  72. </el-table-column>
  73. <el-table-column prop="taskName" label="环节名称" width="280" class="is-center">
  74. </el-table-column>
  75. <el-table-column prop="assignee" label="处理人" width="280">
  76. </el-table-column>
  77. <el-table-column prop="startTime" label="到达时间" width="280">
  78. </el-table-column>
  79. <el-table-column prop="endTime" label="处理时间" width="280">
  80. </el-table-column>
  81. <el-table-column prop="content" label="回复意见" width="280">
  82. </el-table-column>
  83. </el-table>
  84. </div>
  85. </span>
  86. </el-dialog>
  87. </div>
  88. <div class="containtbox">
  89. <el-dialog title="处理操作" :visible.sync="dialogVisible1" v-if="dialogVisible1" :before-close="handleCloses"
  90. width="100%" height="100vh" class="dialogClass" top="0" :modal="false" :modal-append-to-body="true"
  91. :destroy-on-close="true">
  92. <!-- -->
  93. <!-- <Workflow :list="ruleForm" :requestForm="requestForm" @dialogVisible1 = "Visible1"/> -->
  94. <Workflow :list="ruleForm" @updateForm="updateForm" :requestForm="requestForm" :request_formTitle="request_form.title"/>
  95. <!-- @dialogVisible1 = "Visible1" -->
  96. <!-- <WorkflowEntrance
  97. :list="ruleForm"
  98. v-else
  99. :lastManList="lastManList"
  100. @beforeClose = "beforeClose"
  101. :requestForm="requestForm"
  102. /> -->
  103. <span slot="footer" class="dialog-footer">
  104. </span>
  105. </el-dialog>
  106. </div>
  107. </div>
  108. </template>
  109. <script>
  110. import eltabs from "../../../components/el-tabs";
  111. import tableList from "../../../components/el-form";
  112. import myUpload from "../../../components/uploadfour";
  113. import Workflow from "../../../components/workflowBase";
  114. // import Workflow from "../../../components/workflow";
  115. import WorkflowEntrance from "../../../components/workflowEntrance";
  116. import getConfig from '../../../config/dev.js'
  117. import {
  118. getTodoBase,
  119. getDoneBase,
  120. getInitiateBase,
  121. } from "../../../http/api.js";
  122. export default {
  123. components: {
  124. eltabs,
  125. tableList,
  126. myUpload,
  127. Workflow,
  128. WorkflowEntrance,
  129. },
  130. data() {
  131. return {
  132. editstatus: true,
  133. dialogVisible: false,
  134. deal: true,
  135. baocun: true,
  136. isdisabled: false,
  137. xiaohu: false,
  138. dialogVisible1: false,
  139. updisabled: false,
  140. xinzeng: true,
  141. shanchu: true,
  142. isWorkflowStatus: true, //默认展示模式组件,为true时展示多人处理组件
  143. childname: 'first',
  144. dialogTitle: "",
  145. page: "1",
  146. currentPage: "1", //当前页数
  147. pageSize: "10", //每页显示十条
  148. fileInfo: {
  149. type: "bt1n",
  150. typename: "上传文件",
  151. limit: 50,
  152. url: "/market/waf/uploadByMinio",
  153. fileList: [],
  154. },
  155. tableData: [],
  156. optionList: [],
  157. mkFileShareAttachList: [],
  158. requestForm: {
  159. // fresourceId: "4e2aaa61-b339-11ed-886f-d6cd97160e00",
  160. // fresourceId: "ed1f02d2-b33e-11ed-be6b-00505687dcd3",
  161. fresourceId: getConfig().backupRequire,
  162. processDefinitionKey: "BFXQ_process",
  163. taskId: "",
  164. },
  165. request_form: {
  166. userId: "",
  167. userName: "",
  168. path: this.$router.currentRoute.name,
  169. userCode: JSON.parse(window.sessionStorage.userInfo).loginNo,
  170. title: "",
  171. businessKey: "",
  172. processDefinitionKey: "BFXQ_process",
  173. },
  174. lastManList: [],
  175. fufujian: [],
  176. fuback: [],
  177. ruleForm: {
  178. // domains: [{
  179. // value: ''
  180. // }],
  181. // attId:[],
  182. // bsAccount: [],
  183. // bsAmount: [],
  184. // tzOutNo: [],
  185. // tzInNo: [],
  186. },
  187. tabList: [
  188. {
  189. index: "first",
  190. label: "我的待办",
  191. number: "",
  192. name: "prosss_key",
  193. },
  194. {
  195. index: "two",
  196. label: "我的已办",
  197. number: "",
  198. },
  199. {
  200. index: "three",
  201. label: "我发起的",
  202. number: "",
  203. },
  204. ],
  205. Table: {},
  206. firstTable: {
  207. name: "first",
  208. height: "500",
  209. titledata: [
  210. {
  211. label: "文件标题",
  212. prop: "need_name",
  213. width: 310,
  214. },
  215. {
  216. label: "发起人",
  217. prop: "proposer",
  218. width: 310,
  219. },
  220. {
  221. label: "发起时间",
  222. prop: "proposer_time",
  223. width: 310,
  224. },
  225. {
  226. label: "当前环节",
  227. prop: "taskName",
  228. width: 310,
  229. },
  230. ], //表格头
  231. data: [
  232. {
  233. label: "文件标题", // 操作名
  234. handleRow: (e, r, o) => {
  235. this.operationZuo(r);
  236. }
  237. }
  238. ], //内容数据
  239. loading: true,
  240. pageData: {
  241. total: 100, // 总条数
  242. pageSize: 10, // 每页数量
  243. pageNum: 1, // 页码
  244. },
  245. isSelection: false, // 表格有多选时设置
  246. isOperation: false, // 表格有操作列时设置
  247. isIndex: false, // 列表序号
  248. operation: {
  249. // 表格有操作列时设置
  250. label: "操作", // 列名
  251. width: "50", // 根据实际情况给宽度
  252. data: [],
  253. },
  254. },
  255. twoTable: {
  256. name: "two",
  257. titledata: [
  258. {
  259. label: "文件标题",
  260. prop: "need_name",
  261. width: 310,
  262. },
  263. {
  264. label: "发起人",
  265. prop: "proposer",
  266. width: 310,
  267. },
  268. {
  269. label: "发起时间",
  270. prop: "proposer_time",
  271. width: 310,
  272. },
  273. {
  274. label: "当前环节",
  275. prop: "taskName",
  276. width: 310,
  277. },
  278. ],
  279. data: [], //内容数据
  280. loading: true,
  281. pageData: {
  282. total: 100, // 总条数
  283. pageSize: 10, // 每页数量
  284. pageNum: 1, // 页码
  285. },
  286. isSelection: false,
  287. },
  288. threeTable: {
  289. name: "three",
  290. titledata: [
  291. {
  292. label: "文件标题",
  293. prop: "need_name",
  294. width: 250,
  295. },
  296. {
  297. label: "发起人",
  298. prop: "proposer",
  299. width: 250,
  300. },
  301. {
  302. label: "发起时间",
  303. prop: "proposer_time",
  304. width: 300,
  305. },
  306. {
  307. label: "当前环节",
  308. prop: "taskName",
  309. width: 250,
  310. },
  311. {
  312. label: "当前处理人",
  313. prop: "currentMan",
  314. width: 250,
  315. },
  316. ],
  317. data: [], //内容数据
  318. loading: true,
  319. pageData: {
  320. total: 100, // 总条数
  321. pageSize: 10, // 每页数量
  322. pageNum: 1, // 页码
  323. },
  324. isSelection: false,
  325. },
  326. rules: {
  327. needName: [{ required: true, message: "请输入文件标题", trigger: "blur" },],
  328. proposer: [{ required: true, message: "请输入发起人", trigger: "blur" }],
  329. workOrderNo: [{ required: true, message: "请输入文件流水号", trigger: "blur" }],
  330. proposerType: [{ required: true, message: "请选择申请类别", trigger: "change" }],
  331. dealMan: [{ required: true, message: "请选择处理部门接收人", trigger: "change" }],
  332. proposerTime: [{ required: true, message: "请输入拟稿时间", trigger: "blur" }],
  333. proposerContent: [{ required: true, message: "请输入申请内容", trigger: "blur" }],
  334. },
  335. };
  336. },
  337. watch: {
  338. "ruleForm.taskName1": {
  339. handler(e) {
  340. if (e != "发起备份申请") {
  341. this.disshan = true;
  342. this.disxin = true;
  343. } else {
  344. }
  345. }
  346. },
  347. },
  348. methods: {
  349. download(u) {
  350. // if (this.ruleForm.wfFileShareAttachList.length > 1) {
  351. this.$http({
  352. url: "/market/waf/downAllFileByMinio",
  353. method: "post",
  354. headers: {
  355. "Content-Type": "application/json",
  356. },
  357. responseType: "blob",
  358. data: { wfFileShareAttachList: this.fileInfo.fileList },
  359. }).then((response) => {
  360. if (window.navigator && window.navigator.msSaveOrOpenBlob) {
  361. let blob = new Blob([response.data], {
  362. type: "application/vnd.ms-excel",
  363. });
  364. window.navigator.msSaveOrOpenBlob(
  365. blob,
  366. new Date().getTime().toString() + ".zip"
  367. );
  368. } else {
  369. /* 火狐谷歌的文件下载方式 */
  370. var blob = new Blob([response.data]);
  371. var downloadElement = document.createElement("a");
  372. var href = window.URL.createObjectURL(blob);
  373. downloadElement.href = href;
  374. // downloadElement.download = this.ruleForm.fileName + ".zip";
  375. downloadElement.download = "附件.zip";
  376. document.body.appendChild(downloadElement);
  377. downloadElement.click();
  378. document.body.removeChild(downloadElement);
  379. window.URL.revokeObjectURL(href);
  380. }
  381. if (this.infolist.authType === "3") {
  382. this.dialogCli(10);
  383. }
  384. });
  385. },
  386. handleClose() {
  387. this.ruleForm = {};
  388. this.backlogTodo();
  389. this.haveDone();
  390. this.iniTiate();
  391. this.getneedNo();
  392. this.dialogVisible = false;
  393. this.tableData = [];
  394. this.fileInfo.fileList = [];
  395. },
  396. handleCloses() {
  397. this.treeList = [];
  398. this.textarea = "";
  399. this.dialogVisible1 = false;
  400. },
  401. clickTabs(name) {
  402. this.$refs.TableList.page = 1;
  403. this.childname = name;
  404. this.page = 1;
  405. this.baocun = false;
  406. if (name == "first") {
  407. this.Table = this.firstTable;
  408. this.backlogTodo();
  409. this.deal = true;
  410. this.baocun = false;
  411. this.editstatus = true;
  412. } else {
  413. this.editstatus = false;
  414. }
  415. if (name == "two") {
  416. this.Table = this.twoTable;
  417. this.haveDone();
  418. this.deal = false;
  419. this.baocun = false;
  420. }
  421. if (name == "three") {
  422. this.Table = this.threeTable;
  423. this.iniTiate();
  424. this.baocun = false;
  425. }
  426. },
  427. clickDemand(e, r) {
  428. if (e === "文件标题") {
  429. if (this.childname == "first") {
  430. if (r.taskName == "发起备份申请") {
  431. this.isdisabled = false;
  432. this.deal = true;
  433. this.baocun = true;
  434. this.shanchu = true;
  435. this.xinzeng = true;
  436. } else {
  437. this.isdisabled = true;
  438. this.deal = true;
  439. this.baocun = false;
  440. this.shanchu = false;
  441. this.xinzeng = false;
  442. }
  443. }
  444. if (this.childname == "two") {
  445. this.isdisabled = true;
  446. this.deal = false;
  447. this.baocun = false;
  448. this.shanchu = false;
  449. this.xinzeng = false;
  450. }
  451. if (this.childname == "three") {
  452. this.shanchu = false;
  453. this.xinzeng = false;
  454. this.isdisabled = true;
  455. if (r.taskName == "发起备份申请") {
  456. this.isdisabled = false;
  457. this.deal = true;
  458. this.baocun = true;
  459. } else {
  460. this.deal = false;
  461. this.baocun = false;
  462. }
  463. }
  464. this.operationZuo(r);
  465. this.clickForm(r);
  466. }
  467. },
  468. operationZuo(r) {
  469. let list = {}
  470. list.id = r.id,
  471. this.$http({
  472. url: "/market/BfxqProcess/query",
  473. method: "post",
  474. headers: {
  475. "Content-Type": "application/json",
  476. },
  477. data: list,
  478. }).then((res) => {
  479. this.dialogTitle = "查看";
  480. this.dialogVisible = true;
  481. this.ruleForm = res.data;
  482. this.ruleForm.taskId = r.taskId;
  483. this.ruleForm.resourceId = r.resourceId;
  484. this.ruleForm.createId = r.createId;
  485. this.ruleForm.taskName1 = r.taskName;
  486. this.fileInfo.fileList = res.data.mkFileShareAttachList;
  487. if (r.taskName == "发起备份申请") {
  488. this.ruleForm.tableName1 = "发起备份申请"
  489. } else {
  490. this.baocun = false;
  491. }
  492. if (r.taskName != "发起备份申请") {
  493. this.updisabled = true;
  494. } else {
  495. this.updisabled = false;
  496. }
  497. this.handleCloses();
  498. });
  499. },
  500. changeNum(val) {
  501. this.page = val;
  502. switch (this.childname) {
  503. case "first":
  504. this.backlogTodo();
  505. // this.iniTiate();
  506. break;
  507. case "two":
  508. this.haveDone();
  509. break;
  510. case "three":
  511. this.iniTiate();
  512. // this.Table = this.thirdTable;
  513. }
  514. },
  515. uploadBack(u) {
  516. this.attList = u;
  517. },
  518. close() {
  519. this.handleClose();
  520. },
  521. newMake() {
  522. this.dialogTitle = "新建";
  523. this.baocun = true;
  524. this.dialogVisible = true;
  525. // this.ruleForm = {}
  526. this.isdisabled = false;
  527. this.getUser();
  528. this.time();
  529. },
  530. getUser() {
  531. this.userInfo = JSON.parse(window.sessionStorage.userInfo);
  532. // this.ruleForm.docId = this.userInfo.loginNo;
  533. this.ruleForm.proposer = this.userInfo.loginName;
  534. },
  535. time() {
  536. // this.ruleForm.createTime = this.formatDateTime;
  537. this.ruleForm.proposerTime = this.$formatDate(new Date(), "YYYY-MM-DD");
  538. },
  539. changeSelect(e) { },
  540. newFormgong() {
  541. this.submitForm();
  542. },
  543. submitForm(formName) {
  544. this.$refs.ruleForm.validate((valid) => {
  545. if (valid) {
  546. this.$message.success("保存成功");
  547. this.getUserIds();
  548. // this.iniTiate();
  549. // this.newForm();
  550. // if(this.ruleForm.tableName1 == "发起备份申请" || this.ruleForm.id){
  551. // this.newUpdate();
  552. // }else{
  553. // this.newForm();
  554. // }
  555. } else {
  556. this.$message.error("请完善表单信息");
  557. return false;
  558. }
  559. });
  560. },
  561. newForm() {
  562. // for(let i = 0; i<this.fuback.length; i++){
  563. // this.ruleForm.attId.push(this.fuback[i].id);
  564. // }
  565. this.ruleForm.mkFileShareAttachList = this.attList;
  566. this.$http({
  567. url: "/market/BfxqProcess/add",
  568. method: "post",
  569. headers: {
  570. "Content-Type": "application/json",
  571. },
  572. data: this.ruleForm,
  573. }).then((res) => {
  574. this.ruleForm.id = res.data.body;
  575. this.request_form.businessKey = res.data.body;
  576. this.request_form.title = '[IT工作台]-' + '备份需求及变更-' + this.$refs.ruleForm.model.needName;
  577. this.clickHandle(this.ruleForm);
  578. if (res.data.body == null) {
  579. this.$message.error("请先点保存");
  580. }
  581. });
  582. },
  583. newUpdate() {
  584. // for(let i = 0; i<this.fuback.length; i++){
  585. // this.ruleForm.attId.push(this.fuback[i].id);
  586. // }
  587. if (this.attList == null) {
  588. this.ruleForm.mkFileShareAttachList = this.fileInfo.fileList
  589. } else {
  590. this.ruleForm.mkFileShareAttachList = this.attList;
  591. }
  592. this.request_form.title = '[IT工作台]-' + '备份需求及变更-' + this.$refs.ruleForm.model.needName;
  593. this.$http({
  594. url: "/market/BfxqProcess/update",
  595. method: "post",
  596. headers: {
  597. "Content-Type": "application/json",
  598. },
  599. data: this.ruleForm,
  600. }).then((res) => {
  601. });
  602. },
  603. //获取userID
  604. getUserIds() {
  605. let id = JSON.parse(window.sessionStorage.userInfo).loginNo
  606. this.$http({
  607. url: "/market//api/user/info/queryNodePers?params=" + id,
  608. method: "post",
  609. headers: {
  610. "Content-Type": "application/json",
  611. },
  612. data: {
  613. // params: JSON.parse(window.sessionStorage.userInfo).loginNo,
  614. },
  615. }).then((res) => {
  616. this.request_form.userName = res.data[0].children[0].loginNameStr;
  617. this.request_form.userId = res.data[0].children[0].loginNoStr;
  618. this.request_form.title = '[IT工作台]-' + '备份需求及变更-' + this.$refs.ruleForm.model.needName;
  619. if (this.ruleForm.tableName1 == "发起备份申请" || this.ruleForm.id) {
  620. this.newUpdate();
  621. } else {
  622. this.newForm();
  623. }
  624. });
  625. },
  626. async clickHandle(e) {
  627. let _this = this;
  628. let obj = {
  629. url: this.$url.formList.startWork, //开始工作流接口
  630. data: _this.request_form,
  631. status: "form",
  632. headers: {
  633. "Content-Type": "application/x-www-form-urlencoded",
  634. },
  635. };
  636. let res = await this.common.httpPost(obj, success);
  637. function success(data) {
  638. //         _this.ruleForm.taskId = _this.ruleForm.taskId;
  639. // a = a
  640. //         _this.taskId = data.data;
  641. _this.ruleForm.processId = data.data;
  642. let list = {
  643. id: e.id,
  644. // taskId:_this.formId,
  645. processId: data.data,
  646. tableName: _this.requestForm.processDefinitionKey,
  647. // resourceId: _this.nextPath.currentShape[0].resourceId,
  648. };
  649. _this.setUpdate(list);
  650. }
  651. },
  652. //更新工作流接口
  653. setUpdate(e) {
  654. this.$http({
  655. url: "/market/waf/updateBase",
  656. method: "post",
  657. headers: {
  658. "Content-Type": "application/json",
  659. },
  660. data: e,
  661. }).then((res) => {
  662. this.ruleForm.taskId = res.data.body[0].taskId;
  663. });
  664. },
  665. async clickForm(r) {
  666. let list = {
  667. processInstanceId: r.process_id,
  668. // taskId:e.taskId
  669. };
  670. let _this = this;
  671. let obj = {
  672. url: this.$url.formList.getCommentsByProcessId, //流程追踪接口
  673. data: list,
  674. headers: {
  675. "Content-Type": "application/json",
  676. },
  677. };
  678. let res = await this.common.httpPost(obj, success);
  679. function success(data) {
  680. _this.tableData = data.data.data;
  681. data.data.data.map((item) => {
  682. item.startTime = _this.$util.datetimeFormat(item.startTime);
  683. item.endTime = _this.$util.datetimeFormat(item.endTime);
  684. });
  685. // _this.getProcess(e, data.data);
  686. _this.tableData = data.data.data;
  687. }
  688. },
  689. // async clickForm(r) {
  690. // let list = {
  691. // processInstanceId: r.process_id,
  692. // // taskId:e.taskId
  693. // };
  694. // let _this = this;
  695. // let obj = {
  696. // url: this.$url.formList.getCommentsByProcessId, //流程追踪接口
  697. // data: list,
  698. // headers: {
  699. // "Content-Type": "application/json",
  700. // },
  701. // };
  702. // let res = await this.common.httpPost(obj, success);
  703. // function success(data) {
  704. // console.log('[ 接口返回值第一曾 ] >', data)
  705. // let list = [];
  706. // list = data.data.data;
  707. // // list.map((item,index) => {
  708. // // item.startTime = _this.$util.datetimeFormat(item.startTime);
  709. // // item.endTime = _this.$util.datetimeFormat(item.endTime);
  710. // // item.id = index + 1;
  711. // // if (item.traceList) {
  712. // // if (item.traceList.length > 0) {
  713. // // item.children = item.traceList;
  714. // // }
  715. // // }
  716. // // });
  717. // // console.log(list);
  718. // if (data.data.lastmandata.length != 0) {
  719. // data.data.lastmandata.map((item, index) => {
  720. // item.id = index + 22;
  721. // });
  722. // }
  723. // list.map((item, index) => {
  724. // item.startTime = _this.$util.datetimeFormat(item.startTime);
  725. // item.endTime = _this.$util.datetimeFormat(item.endTime);
  726. // item.id = index + 1;
  727. // item.children = [];
  728. // if (data.data.lastmandata.length != 0) {
  729. // let indexs = data.data.lastmandata.findIndex((items) => {
  730. // if (items.taskId == item.taskId) {
  731. // item.children.push(items);
  732. // }
  733. // });
  734. // }
  735. // console.log(item.children);
  736. // });
  737. // console.log(list);
  738. // // _this.lables.data = list;
  739. // _this.tableData = list;
  740. // // console.log("[ _this.lables.data ] >", _this.lables.data);
  741. // // _this.abc = true;
  742. // }
  743. // },
  744. //处理按钮,开始工作流接口
  745. dealwith() {
  746. if (this.ruleForm.id) {
  747. this.dialogVisible1 = true;
  748. } else {
  749. this.$message.error("请先点保存按钮");
  750. }
  751. },
  752. //需求编号
  753. getneedNo() {
  754. this.$http({
  755. url: "/market/BfxqProcess/getNeedNo",
  756. method: "post",
  757. headers: {
  758. "Content-Type": "application/json",
  759. },
  760. }).then((res) => {
  761. // this.ruleForm.applyNew = res.data;
  762. this.ruleForm.workOrderNo = res.data.body;
  763. });
  764. },
  765. getdealMan() {
  766. let id = "itcThird"
  767. this.$http({
  768. url: "/market//api/user/info/queryNodePers?params=" + id,
  769. method: "post",
  770. headers: {
  771. "Content-Type": "application/json",
  772. },
  773. }).then((res) => {
  774. // this.optionList = res.data;
  775. for (let i = 0; i < res.data.length; i++) {
  776. for (let j = 0; j < res.data[i].children.length; j++) {
  777. this.optionList.push({
  778. name: res.data[i].children[j].label
  779. })
  780. }
  781. }
  782. });
  783. },
  784. backlogTodo() {
  785. let list = {
  786. tableName: this.requestForm.processDefinitionKey,
  787. };
  788. // getInitiateBase getTodoBase
  789. getTodoBase(this.page, "", list).then((res) => {
  790. this.firstTable.data = res.data.data;
  791. this.firstTable.pageData.total = res.data.totalRecord;
  792. // this.Table = this.firstTable;
  793. this.tabList[0].number = res.data.totalRecord;
  794. })
  795. },
  796. iniTiate() {
  797. let list = {
  798. tableName: this.requestForm.processDefinitionKey
  799. };
  800. getInitiateBase(this.page, "", list).then((res) => {
  801. this.threeTable.data = res.data.data;
  802. this.threeTable.pageData.total = res.data.totalRecord;
  803. this.tabList[2].number = res.data.totalRecord;
  804. })
  805. },
  806. //我的已办
  807. haveDone() {
  808. // let list = {}
  809. // list.tableName = this.requestForm.processDefinitionKey,
  810. // this.$http({
  811. // url: "/market/waf/queryDoneBase",
  812. // method: "post",
  813. // headers: {
  814. // "Content-Type": "application/json",
  815. // page: '{"pageNo":"' + this.totalPage + '","pageSize":"10"}',
  816. // },
  817. // data: list,
  818. // }).then((res) => {
  819. // this.tabList[1].number = res.data.totalRecord;
  820. // this.twoTable.data = res.data.data;
  821. // this.twoTable.pageData.total = res.data.totalRecord;
  822. // this.Table = this.twoTable;
  823. // });
  824. let list = {
  825. tableName: this.requestForm.processDefinitionKey
  826. }
  827. getDoneBase(this.page, "", list).then((res) => {
  828. this.twoTable.data = res.data.data;
  829. this.twoTable.pageData.total = res.data.totalRecord;
  830. this.tabList[1].number = res.data.totalRecord;
  831. })
  832. },
  833. updateForm() {
  834. this.handleClose();
  835. this.iniTiate();
  836. this.haveDone();
  837. this.handleCloses();
  838. },
  839. },
  840. mounted() {
  841. },
  842. created() {
  843. this.Table = this.firstTable;
  844. this.haveDone();
  845. this.iniTiate();
  846. this.backlogTodo();
  847. this.getneedNo();
  848. this.getdealMan();
  849. // this.getDept();
  850. },
  851. };
  852. </script>
  853. <style scoped lang="scss">
  854. .container {
  855. height: 650px;
  856. }
  857. .titbox {
  858. width: 100%;
  859. }
  860. .titbox-flex {
  861. width: 100%;
  862. height: 75px;
  863. display: flex;
  864. justify-content: space-between;
  865. border-bottom: 1px solid #e1e1e1;
  866. }
  867. ::v-deep .el-tabs__nav {
  868. margin: 12px 0 0 12px;
  869. }
  870. ::v-deep .el-tabs__nav-wrap::after {
  871. display: none;
  872. }
  873. ::v-deep .el-tabs__active-bar {
  874. display: none;
  875. }
  876. ::v-deep .el-tabs .is-active {
  877. color: #fff;
  878. background-color: #0583cd;
  879. }
  880. ::v-deep .el-tabs__item {
  881. padding: 0;
  882. margin-right: 20px;
  883. width: 166px;
  884. text-align: center;
  885. background-color: #d8eaf6;
  886. color: #000;
  887. height: 40px;
  888. box-sizing: border-box;
  889. line-height: 40px;
  890. display: inline-block;
  891. list-style: none;
  892. font-size: 14px;
  893. font-weight: 500;
  894. color: #303133;
  895. position: relative;
  896. }
  897. ::v-deep .el-form-item__content {
  898. display: flex;
  899. }
  900. // ::v-deep .el-input__inner{
  901. // width:162px;
  902. // }
  903. ::v-deep .container .el-upload-dragger {
  904. width: 192px !important;
  905. height: 116px !important;
  906. }
  907. .containtbox {
  908. ::v-deep .el-dialog.import-dialog {
  909. height: auto;
  910. max-height: 80vh;
  911. }
  912. }
  913. // ::v-deep .el-dialog {
  914. // height: auto;
  915. // max-height: 1500vh;
  916. // }
  917. .flex-title {
  918. width: 100%;
  919. height: 63px;
  920. margin-top: 10px;
  921. text-align: center;
  922. font-size: 24px;
  923. line-height: 60px;
  924. border-bottom: 1px solid #e1e1e1;
  925. font-weight: 700;
  926. }
  927. .flex-header {
  928. width: 100%;
  929. height: 63px;
  930. margin-top: 20px;
  931. display: flex;
  932. border-bottom: 1px solid #e1e1e1;
  933. span {
  934. margin: 10px 0 0 22px;
  935. }
  936. .el-input {
  937. width: 162px;
  938. }
  939. ::v-deep .el-input__inner {
  940. width: 162px;
  941. }
  942. }
  943. .flex-header-dongtai {
  944. margin-top: 20px;
  945. display: flex;
  946. // border-bottom: 1px solid #e1e1e1;
  947. span {
  948. margin: 10px 0 0 22px;
  949. }
  950. .el-input {
  951. width: 162px;
  952. }
  953. ::v-deep .el-input__inner {
  954. width: 162px;
  955. }
  956. }
  957. .flex-header-input {
  958. width: 100%;
  959. height: 63px;
  960. margin-top: 20px;
  961. display: flex;
  962. border-bottom: 1px solid #e1e1e1;
  963. ::v-deep .el-form-item {
  964. width: 100%;
  965. // margin-right: 5%;
  966. }
  967. .el-input {
  968. width: 100%;
  969. }
  970. }
  971. .flex-header-upload {
  972. width: 100%;
  973. height: 200px;
  974. margin-top: 20px;
  975. display: flex;
  976. border-bottom: 1px solid #e1e1e1;
  977. overflow: auto;
  978. span {
  979. margin: 10px 0 0 25px;
  980. }
  981. ::v-deep .el-form-item__content {
  982. line-height: 25px;
  983. }
  984. ::v-deep .container .el-upload {
  985. width: 200%;
  986. }
  987. // ::v-deep .el-form-item {
  988. // width: 150%;
  989. // }
  990. }
  991. .flex-upload {
  992. ::v-deep .el-form-item {
  993. width: 100%;
  994. }
  995. ::v-deep .container__el-upload {
  996. width: 200%;
  997. }
  998. }
  999. .table-title {
  1000. width: 100%;
  1001. height: 50px;
  1002. line-height: 50px;
  1003. background-color: rgb(243, 250, 255);
  1004. // font-size: 18px;
  1005. font-weight: 700;
  1006. }
  1007. .flex-header-process {
  1008. width: 100%;
  1009. // height: 242px;
  1010. display: flex;
  1011. }
  1012. .flex-header-process .el-table .el-table__cell .is-center {
  1013. text-align: center;
  1014. }
  1015. // .el-upload__tip{
  1016. // }
  1017. </style>