demandHomes.vue 50 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852
  1. <template>
  2. <div class="flex-box">
  3. <!-- 头部组件 -->
  4. <div :span="24" class="flex-header">
  5. <Tabs :tabList="tabList" @status="clickTabs">
  6. <!-- <UserIntegral slot="first" />
  7. <GrowthSystem slot="second" />
  8. <RuleConfiguration slot="third" /> -->
  9. </Tabs>
  10. <el-button
  11. type="primary"
  12. @click="clickNewTag"
  13. v-show="lable.name === 'first'"
  14. >+新建</el-button
  15. >
  16. </div>
  17. <div class="flex-count">
  18. <Table
  19. @clickDemand="clickDemand"
  20. :list="lable"
  21. ref="TableList"
  22. @num="getNum"
  23. @changeNum="changeNum"
  24. >
  25. <template v-slot:first>
  26. <Export
  27. :num="num"
  28. ref="export"
  29. :exportStatusList="exportStatus"
  30. @seachExportList="seachExportList"
  31. @export="batchExport"
  32. @clickApproval="clickApproval"
  33. ></Export>
  34. </template>
  35. <template v-slot:three>
  36. <Seach :list="filterData" @seachList="seachList"></Seach>
  37. </template>
  38. </Table>
  39. </div>
  40. <el-dialog
  41. :title="dialogTitle + '需求'"
  42. :visible.sync="dialogStatus"
  43. width="100%"
  44. :before-close="handleClose"
  45. :modal="false"
  46. v-if="dialogStatus"
  47. style="display: flex; flex-direction: column"
  48. :destroy-on-close="true"
  49. >
  50. <!-- 后期维护 -->
  51. <div style="position: fixed; z-index: 10000" v-if="buttonStatus">
  52. <el-button type="primary" v-if="startStatus" @click="clickHandles"
  53. >处理</el-button
  54. >
  55. <el-button type="primary" v-if="closeStatus" @click="handleClose"
  56. >关闭</el-button
  57. >
  58. <el-button
  59. type="primary"
  60. v-if="forwardStatus"
  61. @click="clickReassignment"
  62. >转需求管理平台</el-button
  63. >
  64. <el-button type="primary" v-if="exportBtnStatus" @click="clickExport"
  65. >导出</el-button
  66. >
  67. <el-button type="primary" v-if="saveStatus" @click="clickSave"
  68. >保存</el-button
  69. >
  70. </div>
  71. <FormTable
  72. :list="fromList"
  73. :disabled="disabled"
  74. class="flex-form"
  75. ref="formTable"
  76. />
  77. <div>
  78. <div class="table-title">流程追踪</div>
  79. <div v-if="abc == true">
  80. <Tables :list="lables"></Tables>
  81. </div>
  82. </div>
  83. </el-dialog>
  84. <div >
  85. <el-dialog
  86. title="处理操作"
  87. width="100%"
  88. :visible.sync="handleStatus"
  89. :before-close="handleCloses"
  90. :modal="false"
  91. v-if="handleStatus"
  92. :destroy-on-close="true"
  93. >
  94. <Workflow
  95. :list="fromList"
  96. @beforeClose="beforeClose"
  97. :requestForm="requestForm"
  98. />
  99. <!-- <WorkflowEntrance
  100. :list="fromList"
  101. v-else
  102. :lastManList="lastManList"
  103. @beforeClose="beforeClose"
  104. :requestForm="requestForm"
  105. /> -->
  106. <!-- 后期维护 -->
  107. </el-dialog>
  108. </div>
  109. <!-- <el-dialog
  110. title="修改常用意见"
  111. :visible.sync="editStatus"
  112. width="100%"
  113. :before-close="editCloses"
  114. :modal="false"
  115. :destroy-on-close="true"
  116. >
  117. <div style="overflow-y: scroll; overflow-x: hidden; height: 240px">
  118. <div
  119. v-for="(item, index) in commonlyList"
  120. :key="index"
  121. ref="common"
  122. class="flex-common"
  123. >
  124. {{ item.dataName
  125. }}<i class="el-icon-circle-close" @click="deleStatus(item)"></i>
  126. </div>
  127. <div class="flex-common">
  128. <i class="el-icon-circle-plus-outline" @click="addStatus()"></i>
  129. </div>
  130. </div>
  131. </el-dialog> -->
  132. </div>
  133. </template>
  134. <script>
  135. import Workflow from "../../../../components/workflow";
  136. import WorkflowEntrance from "../../../../components/workflowEntrance";
  137. import FormTable from "../components/formTable.vue";
  138. import Seach from "../components/search.vue";
  139. import Export from "../components/export.vue";
  140. import Tabs from "../components/tabs.vue";
  141. import Table from "../components/form.vue";
  142. import Tables from "../components/formTrace.vue";
  143. import deptTree from "../components/deptThree.vue";
  144. import Qs from "qs";
  145. export default {
  146. components: {
  147. Tabs,
  148. Table,
  149. Export,
  150. Seach,
  151. FormTable,
  152. deptTree,
  153. Workflow,
  154. WorkflowEntrance,
  155. Tables
  156. },
  157. data() {
  158. return {
  159. UserPermissionsList: [],
  160. isWorkflowStatus: true, //默认展示模式组件,为true时展示多人处理组件
  161. buttonStatus: true,
  162. copyStatus: false,
  163. dialogTitle: "",
  164. disabled: true,
  165. destroy: false,
  166. //分页数据
  167. totalPage: "1", //默认第一页
  168. currentPage: "1", //当前页数
  169. pageSize: "10", //每页显示十条
  170. currentPageList: ["1", "2"],
  171. startStatus: true,
  172. closeStatus: true, //关闭按钮状态
  173. forwardStatus: false, //转需求管理平台状态
  174. exportBtnStatus: false, //导出按钮状态
  175. saveStatus: false, //保存按钮状态
  176. fromList: {}, //表单数据
  177. rejectStatus: true,
  178. taskId: "", //工单taskID
  179. treeUser: {},
  180. formId: "",
  181. fileId: "", //工作流开启Id
  182. request_form: {
  183. userId: "",
  184. userName: "",
  185. path: this.$router.currentRoute.name,
  186. userCode: JSON.parse(window.sessionStorage.userInfo).loginNo,
  187. // path:this.$roter.options.routers,
  188. // nextDealMan:'',
  189. title: "title",
  190. businessKey: "288",
  191. processDefinitionKey: "request_form_process",
  192. },
  193. requestForm: {
  194. // fresourceId: "0d94de8a-0281-11ed-a302-4ae7da54db39", // 本地环境
  195. fresourceId: "bf79721c-33f3-11ed-ba0b-00505687dcd3", //测试环境
  196. processDefinitionKey: "request_form_process",
  197. },
  198. treeList: [], //候选人列表
  199. treeCopyList: [], //抄送人列表
  200. editStatus: false,
  201. querryList: [], //已选人员名单
  202. commonlyList: [
  203. //常用意见列表页
  204. ],
  205. textarea: "未填写意见",
  206. num: 0,
  207. dialogStatus: false, //新建dialog显示
  208. handleStatus: true, //处理按钮状态
  209. tabList: [
  210. {
  211. index: "first",
  212. label: "我的待办",
  213. number: 1,
  214. name: "prosss_key",
  215. },
  216. {
  217. index: "two",
  218. label: "我的已办",
  219. number: 2,
  220. },
  221. {
  222. index: "three",
  223. label: "我发起的",
  224. number: 3,
  225. },
  226. {
  227. index: "four",
  228. label: "待阅",
  229. number: 4,
  230. },
  231. {
  232. index: "five",
  233. label: "已阅",
  234. number: 5,
  235. },
  236. ],
  237. filterData: {
  238. timeSelect: false, //是否显示日期控件
  239. sreach: true,
  240. restet: false,
  241. elinput: [
  242. {
  243. name: "需求名称", //提示语275
  244. key: "needName", //字段名
  245. width: 275, //宽度
  246. },
  247. ],
  248. elselect: [
  249. {
  250. name: "状态",
  251. key: "taskName",
  252. width: 300,
  253. option: [
  254. {
  255. key: 1,
  256. value: "起草",
  257. },
  258. {
  259. key: 2,
  260. value: "部门人员审核",
  261. },
  262. {
  263. key: 3,
  264. value: "部门领导审核",
  265. },
  266. {
  267. key: 4,
  268. value: "市场需求管理员审核",
  269. },
  270. {
  271. key: 5,
  272. value: "起草人发送",
  273. },
  274. {
  275. key: 6,
  276. value: "送信息技术中心办理",
  277. },
  278. {
  279. key: 7,
  280. value: "业支人员办理",
  281. },
  282. {
  283. key: 8,
  284. value: "结束",
  285. },
  286. ],
  287. },
  288. ],
  289. },
  290. firstTable: {
  291. name: "first",
  292. titledata: [
  293. {
  294. label: "需求名称",
  295. prop: "needName",
  296. width: 300,
  297. color: "#0682CD",
  298. },
  299. {
  300. label: "需求类型",
  301. prop: "needType",
  302. width: 200,
  303. },
  304. {
  305. label: "发起部门",
  306. prop: "applyDept",
  307. width: 200,
  308. },
  309. {
  310. label: "发起科室",
  311. prop: "applyDepartment",
  312. width: 200,
  313. },
  314. {
  315. label: "发起人",
  316. prop: "proposer",
  317. width: 200,
  318. },
  319. {
  320. label: "发起时间",
  321. prop: "proposerTime",
  322. width: 250,
  323. },
  324. {
  325. label: "上一步处理人",
  326. prop: "predealman",
  327. width: 200,
  328. },
  329. {
  330. label: "状态",
  331. prop: "taskName",
  332. width: 200,
  333. },
  334. ], //表格头
  335. data: [], //内容数据
  336. loading: true,
  337. pageData: {
  338. total: 100, // 总条数
  339. pageSize: 10, // 每页数量
  340. pageNum: 1, // 页码
  341. },
  342. isSelection: true, // 表格有多选时设置
  343. isOperation: false, // 表格有操作列时设置
  344. isIndex: false, // 列表序号
  345. operation: {
  346. // 表格有操作列时设置
  347. label: "操作", // 列名
  348. width: "50", // 根据实际情况给宽度
  349. data: [
  350. {
  351. label: "操作", // 操作名称
  352. type: "", //按钮类型
  353. handleRow: (e, r, o) => {
  354. // this.disabled = true;
  355. // this.dialogTitle = "查看";
  356. // if (r.taskName === "起草") {
  357. // this.disabled = false;
  358. // } else {
  359. // this.disabled = true;
  360. // }
  361. // this.fromList = r;
  362. // this.clickForm(r);
  363. // this.getFromQuery(r);
  364. // this.dialogStatus = true;
  365. // setTimeout(() => {
  366. // this.getBtnStatus(r);
  367. // }, 500);
  368. // this.formWorkId = r.id;
  369. // this.formId = r.taskId;
  370. // this.taskName = r.taskName;
  371. // this.getQuery()
  372. }, // 自定义事件
  373. },
  374. ],
  375. },
  376. },
  377. twoTable: {
  378. name: "two",
  379. disabled: true,
  380. titledata: [
  381. {
  382. label: "需求名称",
  383. prop: "needName",
  384. width: 300,
  385. color: "#0682CD",
  386. },
  387. {
  388. label: "发起部门",
  389. prop: "applyDept",
  390. width: 200,
  391. },
  392. {
  393. label: "发起科室",
  394. prop: "applyDepartment",
  395. width: 200,
  396. },
  397. {
  398. label: "发起人",
  399. prop: "proposer",
  400. width: 200,
  401. },
  402. {
  403. label: "发起时间",
  404. prop: "proposerTime",
  405. width: 250,
  406. },
  407. {
  408. label: "处理时间",
  409. prop: "endtime",
  410. width: 250,
  411. },
  412. {
  413. label: "状态",
  414. prop: "taskName",
  415. width: 200,
  416. },
  417. ], //表格头
  418. data: [], //内容数据
  419. loading: true,
  420. pageData: {
  421. total: 100, // 总条数
  422. pageSize: 10, // 每页数量
  423. pageNum: 1, // 页码
  424. },
  425. isSelection: false, // 表格有多选时设置
  426. isOperation: false, // 表格有操作列时设置
  427. isIndex: false, // 列表序号
  428. operation: {
  429. // 表格有操作列时设置
  430. label: "操作", // 列名
  431. width: "50", // 根据实际情况给宽度
  432. data: [
  433. {
  434. label: "操作", // 操作名称
  435. type: "", //按钮类型
  436. handleRow: function () {}, // 自定义事件
  437. },
  438. ],
  439. },
  440. },
  441. threeTable: {
  442. name: "three",
  443. titledata: [
  444. {
  445. label: "需求名称",
  446. prop: "needName",
  447. width: 300,
  448. color: "#0682CD",
  449. },
  450. {
  451. label: "需求类型",
  452. prop: "needType",
  453. width: 200,
  454. },
  455. {
  456. label: "发起部门",
  457. prop: "applyDept",
  458. width: 200,
  459. },
  460. {
  461. label: "发起科室",
  462. prop: "applyDepartment",
  463. width: 200,
  464. },
  465. {
  466. label: "发起人",
  467. prop: "proposer",
  468. width: 200,
  469. },
  470. {
  471. label: "发起时间",
  472. prop: "proposerTime",
  473. width: 250,
  474. },
  475. {
  476. label: "工单状态",
  477. prop: "taskName",
  478. width: 200,
  479. },
  480. ], //表格头
  481. data: [], //内容数据
  482. loading: true,
  483. pageData: {
  484. total: 100, // 总条数
  485. pageSize: 10, // 每页数量
  486. pageNum: 1, // 页码
  487. },
  488. isSelection: false, // 表格有多选时设置
  489. isOperation: true, // 表格有操作列时设置
  490. isIndex: false, // 列表序号
  491. operation: {
  492. // 表格有操作列时设置
  493. label: "支撑状态", // 列名
  494. width: "100", // 根据实际情况给宽度
  495. data: [
  496. {
  497. label: "查看", // 操作名称
  498. type: "", //按钮类型
  499. handleRow: (e, r, o) => {
  500. if (r.needNo !== null) {
  501. this.$router.push({
  502. path: "/supportState",
  503. query: { id: r.needNo },
  504. });
  505. this.setabList(
  506. "支撑状态查看",
  507. "/supportState?id=" + r.needNo
  508. );
  509. } else {
  510. this.$message.error("暂无支撑状态可查看");
  511. }
  512. // this.getQuery()
  513. }, // 自定义事件
  514. },
  515. ],
  516. },
  517. },
  518. fourTable: {
  519. name: "four",
  520. titledata: [
  521. {
  522. label: "待阅需求",
  523. prop: "needName",
  524. width: 300,
  525. color: "#0682CD",
  526. },
  527. {
  528. label: "需求类型",
  529. prop: "needType",
  530. width: 200,
  531. },
  532. {
  533. label: "发起部门",
  534. prop: "applyDept",
  535. width: 200,
  536. },
  537. {
  538. label: "发起科室",
  539. prop: "applyDepartment",
  540. width: 200,
  541. },
  542. {
  543. label: "发起人",
  544. prop: "proposer",
  545. width: 200,
  546. },
  547. {
  548. label: "发起时间",
  549. prop: "proposerTime",
  550. width: 300,
  551. },
  552. {
  553. label: "状态",
  554. prop: "taskName",
  555. width: 200,
  556. },
  557. ], //表格头
  558. data: [], //内容数据
  559. loading: true,
  560. pageData: {
  561. total: 100, // 总条数
  562. pageSize: 10, // 每页数量
  563. pageNum: 1, // 页码
  564. },
  565. isSelection: false, // 表格有多选时设置
  566. isOperation: true, // 表格有操作列时设置
  567. isIndex: false, // 列表序号
  568. operation: {
  569. // 表格有操作列时设置
  570. label: "操作", // 列名
  571. width: "100", // 根据实际情况给宽度
  572. data: [
  573. {
  574. label: "查看", // 操作名称
  575. type: "", //按钮类型
  576. handleRow: (e, r, o) => {
  577. this.fromList = r;
  578. this.dialogStatus = true;
  579. this.disabled = true;
  580. this.buttonStatus = false;
  581. this.getReadList(r.copytaskid);
  582. this.clickForm(r)
  583. }, // 自定义事件
  584. },
  585. ],
  586. },
  587. },
  588. fiveTable: {
  589. name: "five",
  590. titledata: [
  591. {
  592. label: "需求名称",
  593. prop: "needName",
  594. width: 300,
  595. color: "#0682CD",
  596. },
  597. {
  598. label: "需求类型",
  599. prop: "needType",
  600. width: 200,
  601. },
  602. {
  603. label: "发起部门",
  604. prop: "applyDept",
  605. width: 200,
  606. },
  607. {
  608. label: "发起科室",
  609. prop: "applyDepartment",
  610. width: 200,
  611. },
  612. {
  613. label: "发起人",
  614. prop: "proposer",
  615. width: 200,
  616. },
  617. {
  618. label: "发起时间",
  619. prop: "proposerTime",
  620. width: 300,
  621. },
  622. // {
  623. // label: "工单状态",
  624. // prop: "taskName",
  625. // width: 200,
  626. // },
  627. ], //表格头
  628. data: [], //内容数据
  629. loading: true,
  630. pageData: {
  631. total: 100, // 总条数
  632. pageSize: 10, // 每页数量
  633. pageNum: 1, // 页码
  634. },
  635. isSelection: false, // 表格有多选时设置
  636. isOperation: false, // 表格有操作列时设置
  637. isIndex: false, // 列表序号
  638. operation: {
  639. // 表格有操作列时设置
  640. label: "支撑状态", // 列名
  641. width: "100", // 根据实际情况给宽度
  642. data: [
  643. {
  644. label: "查看", // 操作名称
  645. type: "", //按钮类型
  646. handleRow: (e, r, o) => {
  647. this.getReadList(r.copytaskid);
  648. // if (r.needNo !== null) {
  649. // this.$router.push({
  650. // path: "/supportState",
  651. // query: { id: r.needNo },
  652. // });
  653. // } else {
  654. // this.$message.error("暂无支撑状态可查看");
  655. // }
  656. // this.getQuery()
  657. }, // 自定义事件
  658. },
  659. ],
  660. },
  661. },
  662. abc: false,
  663. lable: {},
  664. copyUser: "", //抄送人
  665. backThree: [],
  666. backCopyThree: [], //抄送人数组
  667. lables: {
  668. height: "400",
  669. titledata: [
  670. {
  671. id: 1,
  672. label: "环节名称",
  673. prop: "taskName",
  674. width: 300,
  675. },
  676. {
  677. id: 2,
  678. label: "处理人",
  679. prop: "assignee",
  680. width: 300,
  681. },
  682. {
  683. id: 3,
  684. label: "到达时间",
  685. prop: "startTime",
  686. width: 300,
  687. },
  688. {
  689. id: 4,
  690. label: "处理时间",
  691. prop: "endTime",
  692. width: 300,
  693. },
  694. {
  695. id: 5,
  696. label: "回复意见",
  697. prop: "content",
  698. width: 300,
  699. },
  700. ], //表格头
  701. data: [], //内容数据
  702. loading: true,
  703. pageData: {
  704. total: 0, // 总条数
  705. pageSize: 10, // 每页数量
  706. pageNum: 1, // 页码
  707. },
  708. isSelection: false, // 表格有多选时设置
  709. isOperation: false, // 表格有操作列时设置
  710. isIndex: true, // 列表序号
  711. operation: {
  712. // 表格有操作列时设置
  713. label: "操作", // 列名
  714. width: "50", // 根据实际情况给宽度
  715. data: [
  716. {
  717. label: "操作", // 操作名称
  718. type: "", //按钮类型
  719. handleRow: function () {}, // 自定义事件
  720. },
  721. ],
  722. },
  723. },
  724. formWorkId: "",
  725. taskName: "", //工单是否为起草阶段
  726. clicknextName: "", //点击选择流程节点
  727. firstStatus: false,
  728. selectUser: "", //选择人userName
  729. isSync: "1", //什么yes no起草状态判断
  730. createdId: "", //获取表单创始人Id
  731. batchList: ["fanyan"], //多选数组
  732. exportStatus: false, //批量导出按钮权限控制
  733. userList: [
  734. //选择路径列表页
  735. ],
  736. props: {
  737. lazy: true,
  738. lazyLoad: this.lazyLoad,
  739. },
  740. propsList: [],
  741. DepartmentName: "",
  742. seleIndex: 9,
  743. clickTagName: "first",
  744. value: "",
  745. nextPath: [],
  746. nextPaths: [],
  747. node: [],
  748. nodes: [],
  749. transferStatus: false,
  750. TransferStatus: false,
  751. CopyStatus: false,
  752. initialList: [],
  753. clickTaskName: "",
  754. seachLists: {},
  755. timeList: {},
  756. lastManList: [],
  757. };
  758. },
  759. created() {
  760. this.getUserIndex();
  761. // let A = [
  762. // {
  763. // id: 1,
  764. // b: "456",
  765. // },
  766. // {
  767. // id: 2,
  768. // b: "456",
  769. // },
  770. // ];
  771. // let B = [
  772. // {
  773. // a: 1,
  774. // b: "4567",
  775. // },
  776. // {
  777. // a: 1,
  778. // b: "4568",
  779. // },
  780. // {
  781. // a: 2,
  782. // b: "4567",
  783. // },
  784. // ];
  785. // A.map((item) => {
  786. // item.c = [];
  787. // let index = B.findIndex((items) => {
  788. // if (items.a == item.id) {
  789. // item.c.push(items);
  790. // }
  791. // });
  792. // console.log(index);
  793. // B.map((items,index) =>{
  794. // if(item.id == items.a){
  795. // item.c.push(items)
  796. // }
  797. // })
  798. // });
  799. // console.log(A);
  800. // function getUserDescribe(name) {
  801. // const describeForNameMap = [
  802. // [
  803. // (name) => name.length > 3, // 判断条件
  804. // () => console.log("名字太长"), // 执行函数
  805. // ],
  806. // [(name) => name.length < 2, () => console.log("名字太短")],
  807. // [(name) => name[0] === "陈", () => console.log("小陈")],
  808. // [(name) => name === "大鹏", () => console.log("管理员")],
  809. // [
  810. // (name) => name[0] === "李" && name !== "李鹏",
  811. // () => console.log("小李"),
  812. // ],
  813. // ];
  814. // // 获取符合条件的子数组
  815. // const getDescribe = describeForNameMap.find((item) => item[0](name));
  816. // // 子数组存在则运行子数组中的第二个元素(执行函数)
  817. // getDescribe ? getDescribe[1]() : console.log("此人比较神秘!");
  818. // }
  819. // getUserDescribe('张元芳微软')
  820. // const func = (name, age = "fatfish") => {
  821. // console.log(name);
  822. // };
  823. // func("123123123");
  824. //oa跳转回来显示
  825. let status = JSON.stringify(this.$route.query) == "{}";
  826. if (status) {
  827. this.getQueryList();
  828. this.getMeDone();
  829. this.getMeLaunch();
  830. this.getToBeRead();
  831. this.getBeReadList();
  832. } else {
  833. let { id, copy } = this.$route.query;
  834. let list = {
  835. taskId: id,
  836. };
  837. //待做
  838. if (copy == 0) {
  839. this.getQueryList(list, 0);
  840. }
  841. //待阅
  842. if (copy == 1) {
  843. this.clickTagName = "four";
  844. this.getToBeRead(list, 1);
  845. }
  846. }
  847. this.lable = this.firstTable;
  848. },
  849. methods: {
  850. //是否最后一个人
  851. async getLastName() {
  852. console.log(this.fromList);
  853. let list = {
  854. procinstid: this.fromList.processId,
  855. taskid: this.fromList.taskId,
  856. // taskId:e.taskId
  857. };
  858. let _this = this;
  859. let obj = {
  860. url: this.$url.formList.getLastName, //流程追踪接口
  861. data: list,
  862. // status: "form",
  863. headers: {
  864. "Content-Type": "application/json",
  865. },
  866. };
  867. let res = await this.common.httpPost(obj, success);
  868. function success(data) {
  869. _this.isWorkflowStatus = data.lastMan == false ? false : true;
  870. _this.lastManList = data;
  871. // console.log(_this.isWorkflowStatus);
  872. }
  873. },
  874. //添加面包屑
  875. setabList(n, p) {
  876. let params = {
  877. children: "",
  878. name: n,
  879. rountPath: p,
  880. target: "_self",
  881. };
  882. for (let i = 0; i < this.$store.state.tabList.length; i++) {
  883. if (this.$store.state.tabList[i].name === params.name) {
  884. this.$store.state.tabList[i] = params;
  885. }
  886. }
  887. let set = new Set([...this.$store.state.tabList, params]);
  888. set.add(params);
  889. this.$store.commit("setDefaultActive", params.rountPath);
  890. this.$store.commit("setTabList", Array.from(set));
  891. },
  892. beforeClose() {
  893. this.dialogStatus = false;
  894. this.handleCloses();
  895. this.getQueryList();
  896. this.getMeDone();
  897. this.getMeLaunch();
  898. this.getToBeRead();
  899. this.getBeReadList();
  900. },
  901. clickGetTree(e, index) {
  902. this.CopyStatus = false;
  903. this.TransferStatus = false;
  904. this.clickTaskName = e.properties.name;
  905. this.clicknextName = e.properties.name;
  906. this.seleIndex = index;
  907. this.getNextPath(e.resourceId); //1 为点击后获取线
  908. },
  909. //常用意见添加
  910. addStatus() {
  911. let newData = Date.parse(new Date());
  912. this.$prompt("请输入常用意见", "提示", {
  913. confirmButtonText: "确定",
  914. cancelButtonText: "取消",
  915. })
  916. .then(({ value }) => {
  917. let list = {
  918. dictCode: "approval",
  919. dataCode: newData,
  920. dataName: value,
  921. dictName: "审批意见",
  922. };
  923. this.geaddctType(list);
  924. this.$message({
  925. type: "success",
  926. message: "常用意见添加成功",
  927. });
  928. })
  929. .catch(() => {
  930. this.$message({
  931. type: "info",
  932. message: "取消输入",
  933. });
  934. });
  935. },
  936. //常用意见删除
  937. deleStatus(e) {
  938. this.$confirm("此操作将删除此常用意见, 是否继续?", "提示", {
  939. confirmButtonText: "确定",
  940. cancelButtonText: "取消",
  941. type: "warning",
  942. })
  943. .then(() => {
  944. let list = {
  945. dataCode: e.dataCode,
  946. dictCode: "approval",
  947. };
  948. this.geDelectType(list);
  949. this.$message({
  950. type: "success",
  951. message: "删除成功!",
  952. });
  953. })
  954. .catch(() => {
  955. this.$message({
  956. type: "info",
  957. message: "已取消删除",
  958. });
  959. });
  960. },
  961. //转需求管理平台
  962. clickReassignment() {
  963. this.$http({
  964. url: "/market/waf/sync",
  965. method: "post",
  966. headers: {
  967. "Content-Type": "application/json",
  968. },
  969. data: this.$refs.formTable.form,
  970. }).then((res) => {
  971. this.$message.success("转需求管理平台成功!");
  972. });
  973. },
  974. //批量导出搜索
  975. seachExportList(e) {
  976. let timeList = {
  977. stime: e[0],
  978. etime: e[1],
  979. };
  980. this.timeList = timeList;
  981. this.getQueryList(this.timeList);
  982. },
  983. //点击工单状态跳转需求流程显示页面
  984. clickDemand(e, res) {
  985. if (e === "工单状态" || e === "需求名称") {
  986. if (this.clickTagName === "first") {
  987. this.disabled = true;
  988. this.dialogTitle = "查看";
  989. if (res.taskName === "起草") {
  990. this.disabled = false;
  991. } else {
  992. this.disabled = true;
  993. }
  994. // this.clickForm(res);
  995. // this.getFromQuery(res);
  996. setTimeout(() => {
  997. this.getBtnStatus(res);
  998. }, 500);
  999. }
  1000. if (this.clickTagName === "two") {
  1001. this.disabled = true;
  1002. this.startStatus = false;
  1003. this.saveStatus = false;
  1004. this.forwardStatus = false;
  1005. this.exportBtnStatus = false;
  1006. }
  1007. if (this.clickTagName === "three") {
  1008. if (res.taskName === "起草") {
  1009. this.startStatus = true;
  1010. this.disabled = false;
  1011. this.saveStatus = true;
  1012. } else {
  1013. this.startStatus = false;
  1014. this.disabled = true;
  1015. this.saveStatus = false;
  1016. }
  1017. }
  1018. if (this.clickTagName === "four" || this.clickTagName === "five") {
  1019. this.buttonStatus = false;
  1020. }
  1021. this.fromList = res;
  1022. this.clickForm(res);
  1023. this.getFromQuery(res);
  1024. }
  1025. },
  1026. //批量导出
  1027. batchExport() {
  1028. this.downloadExcel(this.batchList);
  1029. },
  1030. clickExport() {
  1031. let array = [];
  1032. array.push(this.$refs.formTable.form);
  1033. this.downloadExcel(array);
  1034. },
  1035. getNowTime() {
  1036. let date = new Date();
  1037. let year = date.getFullYear(); //获取当前年份
  1038. let mon = date.getMonth() + 1; //获取当前月份
  1039. let da = date.getDate(); //获取当前日
  1040. let h = date.getHours(); //获取小时
  1041. let m = date.getMinutes(); //获取分钟
  1042. return year + "-" + mon + "-" + da + "-" + h + ":" + m;
  1043. },
  1044. //导出方法
  1045. downloadExcel(e) {
  1046. console.log(e.length);
  1047. let res = this.getNowTime();
  1048. this.$http({
  1049. url: "/market/waf/exportAll",
  1050. method: "post",
  1051. headers: {
  1052. "Content-Type": "application/json",
  1053. },
  1054. responseType: "blob",
  1055. data: e,
  1056. }).then((response) => {
  1057. if (window.navigator && window.navigator.msSaveOrOpenBlob) {
  1058. let blob = new Blob([response.data.size], {
  1059. type: "application/vnd.ms-excel;",
  1060. });
  1061. if (e.length > 1) {
  1062. window.navigator.msSaveOrOpenBlob(
  1063. blob,
  1064. this.fromList.needName + ".zip"
  1065. );
  1066. // window.navigator.msSaveOrOpenBlob(blob, res + "需求申请单" + ".zip");
  1067. } else {
  1068. window.navigator.msSaveOrOpenBlob(
  1069. blob,
  1070. this.fromList.needName + ".zip"
  1071. );
  1072. }
  1073. //window.navigator.msSaveOrOpenBlob(blob, t his.form.needName);
  1074. } else {
  1075. /* 火狐谷歌的文件下载方式 */
  1076. var blob = new Blob([response.data]);
  1077. var downloadElement = document.createElement("a");
  1078. var href = window.URL.createObjectURL(blob);
  1079. downloadElement.href = href;
  1080. if (e.length > 1) {
  1081. downloadElement.download = res + "需求申请单" + ".zip";
  1082. } else {
  1083. console.log(e);
  1084. downloadElement.download = e[0].needName + ".zip";
  1085. }
  1086. document.body.appendChild(downloadElement);
  1087. downloadElement.click();
  1088. document.body.removeChild(downloadElement);
  1089. window.URL.revokeObjectURL(href);
  1090. }
  1091. });
  1092. },
  1093. //驳回方法
  1094. clickReject(res) {
  1095. let e = "no";
  1096. this.submitWork(e, res);
  1097. },
  1098. //我发起的接口
  1099. getMeLaunch(e) {
  1100. this.$http({
  1101. url: "/market/waf/queryInitiate",
  1102. method: "post",
  1103. headers: {
  1104. "Content-Type": "application/json",
  1105. page: '{"pageNo":"' + this.totalPage + '","pageSize":"10"}',
  1106. },
  1107. data: e || {},
  1108. }).then((res) => {
  1109. // let size = this.isNaNStatus(res.data);
  1110. this.tabList[2].number = res.data.totalRecord;
  1111. this.threeTable.data = res.data.data;
  1112. this.threeTable.pageData.total = res.data.totalRecord;
  1113. });
  1114. },
  1115. //按钮权限方法
  1116. getBtnStatus(e) {
  1117. this.$refs.formTable.form = e;
  1118. },
  1119. //我的已办接口
  1120. getMeDone() {
  1121. this.$http({
  1122. url: "/market/waf/queryDone",
  1123. method: "post",
  1124. headers: {
  1125. "Content-Type": "application/json",
  1126. page: '{"pageNo":"' + this.totalPage + '","pageSize":"10"}',
  1127. },
  1128. data: {},
  1129. }).then((res) => {
  1130. this.tabList[1].number = res.data.totalRecord;
  1131. this.twoTable.data = res.data.data;
  1132. this.twoTable.pageData.total = res.data.totalRecord;
  1133. // let size = this.isNaNStatus(res.data);
  1134. // this.tabList[1].number = size;
  1135. // this.twoTable.pageData.total = res.data.totalRecord;
  1136. // this.twoTable.pageData.total = res.data.size;
  1137. // this.twoTable.data = res.data.list;
  1138. // this.twoTable.data = this.getCurrentPageList(this.twoTable.data);
  1139. });
  1140. },
  1141. isNaNStatus(e) {
  1142. if (e.size === 0) {
  1143. return "0";
  1144. } else {
  1145. return e.size;
  1146. }
  1147. },
  1148. //选择树的回调
  1149. changeTree(e) {
  1150. console.log(e);
  1151. // if (e.length > 1) {
  1152. // this.$message.error("只能选择一个人");
  1153. // return;
  1154. // } else {
  1155. // this.backThree = e;
  1156. // if (e[0]) {
  1157. // this.selectUser = e[0].loginNameStr;
  1158. // } else {
  1159. // this.selectUser = "暂无选择";
  1160. // }
  1161. // }
  1162. },
  1163. changeTreeCopy(e) {
  1164. console.log(e);
  1165. // if (e.length > 1) {
  1166. // this.$message.error("只能选择一个人");
  1167. // return;
  1168. // } else {
  1169. // this.backCopyThree = e;
  1170. // if (e[0]) {
  1171. // this.copyUser = e[0].loginNameStr;
  1172. // } else {
  1173. // this.copyUser = "暂无选择";
  1174. // }
  1175. // }
  1176. },
  1177. //查询form表单数据
  1178. getFromQuery(e) {
  1179. this.$http({
  1180. url: "/market/waf/query",
  1181. method: "post",
  1182. headers: {
  1183. "Content-Type": "application/json",
  1184. },
  1185. data: { id: e.id },
  1186. }).then((res) => {
  1187. // this.fromList = res.data;
  1188. this.dialogStatus = true;
  1189. // this.fromList = e;
  1190. // console.log(this.$refs.formTable);
  1191. // this.$refs.formTable.fileInfo.fileList = res.data.mkFileShareAttachList;
  1192. this.fromList.mkFileShareAttachList = res.data.mkFileShareAttachList;
  1193. this.taskId = res.data.taskId;
  1194. if (res.data.taskName == "起草") {
  1195. this.saveStatus = true;
  1196. } else if (res.data.taskName === "部门人员审核") {
  1197. } else if (res.data.taskName === "部门领导审核") {
  1198. } else if (res.data.taskName === "市场需求管理员审核") {
  1199. this.exportBtnStatus = true;
  1200. } else if (res.data.taskName === "起草人发送") {
  1201. } else if (res.data.taskName === "送信息技术中心办理") {
  1202. this.exportBtnStatus = true;
  1203. } else if (res.data.taskName === "业支人员办理") {
  1204. this.exportBtnStatus = true;
  1205. this.forwardStatus = true;
  1206. } else if (res.data.taskName === "送起草人结束") {
  1207. }
  1208. });
  1209. },
  1210. //我发起的搜索内容
  1211. seachList(e) {
  1212. console.log(e);
  1213. this.seachLists = e;
  1214. this.getMeLaunch(e);
  1215. },
  1216. //点击修改
  1217. clickEdit() {
  1218. this.editStatus = true;
  1219. },
  1220. //点击职位显示右侧列表
  1221. //常用意见点击选择
  1222. clickCommonly(e) {
  1223. this.textarea = e.currentTarget.innerHTML;
  1224. },
  1225. //保存按钮
  1226. //获取自己idname
  1227. getUserIds() {
  1228. this.$http({
  1229. url: "/market/waf/queryRoleByName",
  1230. method: "post",
  1231. headers: {
  1232. "Content-Type": "application/json",
  1233. },
  1234. data: {
  1235. userCode: JSON.parse(window.sessionStorage.userInfo).loginNo,
  1236. },
  1237. }).then((res) => {
  1238. this.request_form.userName = res.data.data.rows[0].name;
  1239. this.request_form.userId = res.data.data.rows[0].userCode;
  1240. });
  1241. },
  1242. getUserIndex() {
  1243. this.$http({
  1244. url: "/market/waf/queryRole",
  1245. method: "post",
  1246. headers: {
  1247. "Content-Type": "application/json",
  1248. },
  1249. data: {
  1250. userCode: JSON.parse(window.sessionStorage.userInfo).loginNo,
  1251. },
  1252. }).then((res) => {
  1253. console.log(res.data.data);
  1254. let list = res.data.data.split(",");
  1255. this.UserPermissionsList = list;
  1256. });
  1257. },
  1258. async clickSave() {
  1259. this.$refs.formTable.$refs.form.validate((valid) => {
  1260. if (valid) {
  1261. if (this.fromList.id) {
  1262. this.setUpdate(this.$refs.formTable.form);
  1263. } else {
  1264. this.getUserIds();
  1265. this.setForm();
  1266. }
  1267. } else {
  1268. this.$message.error("请完善表单信息");
  1269. return false;
  1270. }
  1271. });
  1272. },
  1273. //新建按钮
  1274. async clickNewTag() {
  1275. this.dialogTitle = "新建";
  1276. this.lables.data = [];
  1277. this.disabled = false;
  1278. await this.getDepartmentName();
  1279. },
  1280. //获取用户部门名称
  1281. getDepartmentName() {
  1282. this.$http({
  1283. url: "/market/waf/queryDept",
  1284. method: "post",
  1285. headers: {
  1286. "Content-Type": "application/json",
  1287. },
  1288. data: {},
  1289. }).then((res) => {
  1290. let list = {
  1291. applyDept: res.data,
  1292. applyDepartment: JSON.parse(window.sessionStorage.userInfo).groupName,
  1293. proposer: JSON.parse(window.sessionStorage.userInfo).loginName,
  1294. };
  1295. this.fromList = list;
  1296. if (this.$refs.formTable) {
  1297. this.$refs.formTable.form = list;
  1298. }
  1299. this.DepartmentName = res.data;
  1300. this.dialogStatus = true;
  1301. this.saveStatus = true;
  1302. });
  1303. },
  1304. setForm(e) {
  1305. this.request_form.title = this.$refs.formTable.form.needName;
  1306. // this.$refs.formTable.form.taskId = e;
  1307. this.$http({
  1308. url: "/market/waf/add",
  1309. method: "post",
  1310. headers: {
  1311. "Content-Type": "application/json",
  1312. },
  1313. data: this.$refs.formTable.form,
  1314. }).then((res) => {
  1315. this.request_form.businessKey = res.data.body;
  1316. this.fromList.id = res.data.body;
  1317. this.formWorkId = res.data.body;
  1318. this.clickHandle(res.data.body);
  1319. });
  1320. },
  1321. getNextPath(e) {
  1322. let list = {
  1323. // fresourceId: "bf79721c-33f3-11ed-ba0b-00505687dcd3", //测试环境
  1324. fresourceId: this.requestForm.fresourceId, // 本地环境
  1325. processId: this.requestForm.processDefinitionKey,
  1326. // fresourceId: "0d94de8a-0281-11ed-a302-4ae7da54db39", // 本地环境
  1327. // processId: "request_form_process",
  1328. // resourceId: e,
  1329. };
  1330. if (e) {
  1331. // this.propsList = [];
  1332. list.resourceId = e;
  1333. }
  1334. this.$http({
  1335. url: "/market/waf/queryPath",
  1336. method: "post",
  1337. headers: {
  1338. "Content-Type": "application/json",
  1339. },
  1340. data: list,
  1341. }).then((res) => {
  1342. if (res.data.body.nextShapes[0].multi) {
  1343. if (res.data.body.nextShapes[0].multi.multi === "true") {
  1344. this.getLastName();
  1345. }
  1346. }
  1347. if (this.fromList.taskId) {
  1348. this.destroy = true;
  1349. this.handleStatus = true;
  1350. this.getMetirialType();
  1351. } else {
  1352. this.$message.error("请先点击保存按钮");
  1353. }
  1354. });
  1355. },
  1356. //处理按钮,开始工作流接口
  1357. clickHandles() {
  1358. console.log(this.fromList);
  1359. this.getNextPath(this.fromList.resourceId || "");
  1360. },
  1361. //批量审批
  1362. clickApproval(e) {
  1363. this.fromList.taskName = this.batchList[0].taskName;
  1364. let array = [];
  1365. if (this.batchList.length > 1) {
  1366. this.batchList.map((item, index) => {
  1367. array.push(item.taskName);
  1368. });
  1369. let newArray = new Set(array);
  1370. if (newArray.size > 1) {
  1371. this.$message.error("需求申请单流程节点不一致");
  1372. } else {
  1373. this.handleStatus = true;
  1374. }
  1375. }
  1376. },
  1377. async clickForm(e) {
  1378. let list = {
  1379. processInstanceId: e.processId,
  1380. // taskId:e.taskId
  1381. };
  1382. let _this = this;
  1383. let obj = {
  1384. url: this.$url.formList.getCommentsByProcessId, //流程追踪接口
  1385. data: list,
  1386. headers: {
  1387. "Content-Type": "application/json",
  1388. },
  1389. };
  1390. let res = await this.common.httpPost(obj, success);
  1391. function success(data) {
  1392. console.log('[ 接口返回值第一曾 ] >', data)
  1393. let list = [];
  1394. list = data.data.data;
  1395. // list.map((item,index) => {
  1396. // item.startTime = _this.$util.datetimeFormat(item.startTime);
  1397. // item.endTime = _this.$util.datetimeFormat(item.endTime);
  1398. // item.id = index + 1;
  1399. // if (item.traceList) {
  1400. // if (item.traceList.length > 0) {
  1401. // item.children = item.traceList;
  1402. // }
  1403. // }
  1404. // });
  1405. // console.log(list);
  1406. if (data.data.lastmandata.length != 0) {
  1407. data.data.lastmandata.map((item, index) => {
  1408. item.id = index + 22;
  1409. });
  1410. }
  1411. list.map((item, index) => {
  1412. item.startTime = _this.$util.datetimeFormat(item.startTime);
  1413. item.endTime = _this.$util.datetimeFormat(item.endTime);
  1414. item.id = index + 1;
  1415. item.children = [];
  1416. if (data.data.lastmandata.length != 0) {
  1417. let indexs = data.data.lastmandata.findIndex((items) => {
  1418. if (items.taskId == item.taskId) {
  1419. item.children.push(items);
  1420. }
  1421. });
  1422. }
  1423. });
  1424. console.log(list);
  1425. _this.lables.data = list;
  1426. console.log("[ _this.lables.data ] >", _this.lables.data);
  1427. _this.abc = true;
  1428. }
  1429. },
  1430. async clickHandle(e) {
  1431. let _this = this;
  1432. let obj = {
  1433. url: this.$url.formList.startWork, //开始工作流接口
  1434. data: _this.request_form,
  1435. status: "form",
  1436. headers: {
  1437. "Content-Type": "application/x-www-form-urlencoded",
  1438. },
  1439. };
  1440. let res = await this.common.httpPost(obj, success);
  1441. function success(data) {
  1442. _this.fromList.processId = data.data;
  1443. _this.taskId = data.data;
  1444. let list = {
  1445. id: e,
  1446. // taskId:_this.formId,
  1447. processId: _this.fromList.processId,
  1448. // resourceId: _this.nextPath.currentShape[0].resourceId,
  1449. };
  1450. _this.setUpdate(list);
  1451. }
  1452. },
  1453. //更新工作流接口
  1454. setUpdate(e) {
  1455. this.$http({
  1456. url: "/market/waf/update",
  1457. method: "post",
  1458. headers: {
  1459. "Content-Type": "application/json",
  1460. },
  1461. data: e,
  1462. }).then((res) => {
  1463. this.$message.success("工单更新成功");
  1464. this.fromList.taskId = res.data.body.taskId;
  1465. this.fromList.taskName = res.data.body.taskName;
  1466. this.fromList.processId = res.data.body.processId;
  1467. if (res.data.body.taskName === "起草") {
  1468. this.isSync = res.data.body.isSync;
  1469. } else {
  1470. this.isSync = "1";
  1471. }
  1472. // if (res.data.result === 0) {
  1473. // this.$message.success("工作流更新成功");
  1474. // }
  1475. });
  1476. },
  1477. //添加字典表常用意见
  1478. geaddctType(e) {
  1479. this.$http({
  1480. url: "/market/cfgDataDict/add",
  1481. method: "post",
  1482. headers: {
  1483. "Content-Type": "application/json",
  1484. },
  1485. data: e,
  1486. }).then((res) => {
  1487. this.getMetirialType();
  1488. });
  1489. },
  1490. //删除字典表常用意见
  1491. geDelectType(e) {
  1492. this.$http({
  1493. url: "/market/cfgDataDicts/del",
  1494. method: "post",
  1495. headers: {
  1496. "Content-Type": "application/json",
  1497. },
  1498. data: e,
  1499. }).then((res) => {
  1500. this.getMetirialType();
  1501. });
  1502. },
  1503. //获取字典表常用意见
  1504. getMetirialType(e) {
  1505. this.$http({
  1506. url: "/market/cfgDataDict/queryList",
  1507. method: "post",
  1508. headers: {
  1509. "Content-Type": "application/json",
  1510. },
  1511. data: {
  1512. dictCodePks: "approval",
  1513. },
  1514. }).then((res) => {
  1515. this.commonlyList = res.data;
  1516. });
  1517. },
  1518. //获取待阅接口
  1519. getToBeRead(e, status) {
  1520. this.$http({
  1521. url: "/market/waf/queryReadList",
  1522. method: "post",
  1523. headers: {
  1524. "Content-Type": "application/json",
  1525. page: '{"pageNo":"' + this.totalPage + '","pageSize":"10"}',
  1526. },
  1527. data: e || {},
  1528. }).then((res) => {
  1529. if (status === 1) {
  1530. this.clickDemand("需求名称", res.data.data[0]);
  1531. this.getReadList(res.data.data[0].copytaskid);
  1532. }
  1533. // let size = this.isNaNStatus(res.data);
  1534. this.tabList[3].number = res.data.totalRecord;
  1535. // this.fourTable.pageData.total = res.data.totalRecord;
  1536. this.fourTable.pageData.total = res.data.totalRecord;
  1537. this.fourTable.data = res.data.data;
  1538. // this.lable.data = this.getCurrentPageList(this.fourTable.data);
  1539. });
  1540. },
  1541. //获取已阅接口列表
  1542. getBeReadList(e) {
  1543. this.$http({
  1544. url: "/market/waf/queryReadDone",
  1545. method: "post",
  1546. headers: {
  1547. "Content-Type": "application/json",
  1548. page: '{"pageNo":"' + this.totalPage + '","pageSize":"10"}',
  1549. },
  1550. data: e || {},
  1551. }).then((res) => {
  1552. // let size = this.isNaNStatus(res.data);
  1553. this.tabList[4].number = res.data.totalRecord;
  1554. // this.fourTable.pageData.total = res.data.totalRecord;
  1555. this.fiveTable.pageData.total = res.data.totalRecord;
  1556. this.fiveTable.data = res.data.data;
  1557. // this.lable.data = this.getCurrentPageList(this.fiveTable.data);
  1558. });
  1559. },
  1560. //点击查阅接口
  1561. async getReadList(e) {
  1562. let _this = this;
  1563. let obj = {
  1564. url: this.$url.formList.getReadList, //开始工作流接口
  1565. data: { copytaskid: e },
  1566. status: "form",
  1567. headers: {
  1568. "Content-Type": "application/x-www-form-urlencoded",
  1569. },
  1570. };
  1571. let res = await this.common.httpPost(obj, success);
  1572. function success(data) {
  1573. console.log(data);
  1574. }
  1575. },
  1576. //获取我的代办列表List
  1577. getQueryList(e, status) {
  1578. this.$http({
  1579. url: "/market/waf/queryList",
  1580. method: "post",
  1581. headers: {
  1582. "Content-Type": "application/json",
  1583. page: '{"pageNo":"' + this.totalPage + '","pageSize":"10"}',
  1584. },
  1585. data: e || {},
  1586. }).then((res) => {
  1587. if (status === 0) {
  1588. this.clickDemand("需求名称", res.data.data[0]);
  1589. } else {
  1590. this.tabList[0].number = res.data.totalRecord;
  1591. // this.firstTable.data = res.data.data;
  1592. }
  1593. this.firstTable.data = res.data.data;
  1594. this.firstTable.pageData.total = res.data.totalRecord;
  1595. this.lable = this.firstTable;
  1596. });
  1597. },
  1598. getCurrentPageList(e) {
  1599. this.totalPage = Math.ceil(e.length / this.pageSize);
  1600. this.totalPage = this.totalPage == 0 ? 1 : this.totalPage;
  1601. let begin = (this.currentPage - 1) * this.pageSize;
  1602. let end = this.currentPage * this.pageSize;
  1603. this.currentPageList = e.slice(begin, end);
  1604. return this.currentPageList;
  1605. },
  1606. getNum(e) {
  1607. //多选数组
  1608. this.batchList = e;
  1609. console.log(e);
  1610. if (e.length > 0) {
  1611. let user = this.UserPermissionsList.findIndex(
  1612. (item) => item === "市场需求管理员"
  1613. );
  1614. console.log(user);
  1615. if (user != -1) {
  1616. this.exportStatus = true;
  1617. }
  1618. } else {
  1619. this.exportStatus = false;
  1620. }
  1621. this.num = e.length;
  1622. },
  1623. //获取页码
  1624. changeNum(e) {
  1625. this.totalPage = e;
  1626. if (this.clickTagName === "first") {
  1627. if (this.timeList) {
  1628. this.getQueryList(this.timeList);
  1629. } else {
  1630. this.getQueryList();
  1631. }
  1632. } else if (this.clickTagName === "two") {
  1633. this.getMeDone();
  1634. } else if (this.clickTagName === "three") {
  1635. console.log(this.seachLists);
  1636. if (this.seachLists) {
  1637. this.getMeLaunch(this.seachLists);
  1638. } else {
  1639. this.getMeLaunch();
  1640. }
  1641. } else if (this.clickTagName === "four") {
  1642. this.getToBeRead();
  1643. // this.fourTable.data = this.getCurrentPageList(this.fourTable.data);
  1644. } else {
  1645. this.getBeReadList();
  1646. }
  1647. },
  1648. clickTabs(e) {
  1649. this.buttonStatus = true;
  1650. this.clickTagName = e;
  1651. this.$refs.TableList.page = 1;
  1652. this.totalPage = "1";
  1653. // console.log(this.$refs.table);
  1654. //重新网络请求
  1655. if (this.firstTable.name == e) {
  1656. this.lable = this.firstTable;
  1657. this.getQueryList();
  1658. } else if (this.twoTable.name == e) {
  1659. this.lable = this.twoTable;
  1660. this.getMeDone();
  1661. } else if (this.threeTable.name === e) {
  1662. this.lable = this.threeTable;
  1663. this.getMeLaunch();
  1664. } else if (this.fourTable.name === e) {
  1665. this.lable = this.fourTable;
  1666. this.getToBeRead();
  1667. } else {
  1668. this.lable = this.fiveTable;
  1669. this.getBeReadList();
  1670. }
  1671. // console.log(this.lable);
  1672. },
  1673. handleClose() {
  1674. this.dialogStatus = false;
  1675. this.forwardStatus = false;
  1676. this.exportBtnStatus = false;
  1677. this.saveStatus = false;
  1678. this.startStatus = true;
  1679. this.closeStatus = true;
  1680. this.abc = false;
  1681. // this.fromList = {};
  1682. },
  1683. handleCloses() {
  1684. this.treeList = [];
  1685. this.textarea = "";
  1686. this.handleStatus = false;
  1687. },
  1688. editCloses() {
  1689. this.editStatus = false;
  1690. },
  1691. },
  1692. };
  1693. </script>
  1694. <style lang="scss" scoped>
  1695. .copyClass {
  1696. display: flex;
  1697. }
  1698. .flex-count {
  1699. // overflow-y: auto;
  1700. // overflow-x: initial;
  1701. // height: au;
  1702. }
  1703. .flex-header-text-tree {
  1704. width: 50%;
  1705. text-align: center;
  1706. }
  1707. .active {
  1708. background-color: #f3faff;
  1709. }
  1710. .flex-common {
  1711. padding: 10px 5%;
  1712. font-size: 18px;
  1713. }
  1714. .flex-buttons {
  1715. background-color: #cde4f6;
  1716. border-color: #cde4f6;
  1717. color: #606266;
  1718. }
  1719. .flex-button {
  1720. margin-top: 10px;
  1721. margin-bottom: 10px;
  1722. ::v-deep .el-button--primary {
  1723. width: 222px;
  1724. }
  1725. }
  1726. .flex-left-header-text {
  1727. height: 40px;
  1728. line-height: 40px;
  1729. color: black;
  1730. padding-left: 10px;
  1731. background-color: #cde4f6;
  1732. font-size: 18px;
  1733. font-weight: bold;
  1734. }
  1735. .flex-right-text {
  1736. margin-right: 20px;
  1737. width: 50%;
  1738. }
  1739. .flex-handle {
  1740. width: 100%;
  1741. padding: 30px;
  1742. display: flex;
  1743. .flex-right {
  1744. width: 50%;
  1745. border: 1px solid #e1e1e1;
  1746. margin-left: 20px;
  1747. }
  1748. .flex-left {
  1749. width: 50%;
  1750. display: flex;
  1751. flex-direction: column;
  1752. .flex-left-header {
  1753. display: flex;
  1754. justify-content: space-around;
  1755. }
  1756. }
  1757. }
  1758. .table-title {
  1759. height: 50px;
  1760. line-height: 50px;
  1761. background-color: #f3faff;
  1762. font-size: 18px;
  1763. font-weight: bold;
  1764. }
  1765. ::v-deep .el-dialog {
  1766. margin-top: 0 !important;
  1767. }
  1768. // ::v-deep .el-table__fixed-body-wrapper {
  1769. // top: 50px !important;
  1770. // }
  1771. .flex-box {
  1772. display: flex;
  1773. // overflow: auto;
  1774. overflow-y: auto;
  1775. overflow-x: hidden;
  1776. width: calc(100% - 40px);
  1777. border-radius: 20px;
  1778. background-color: #fff;
  1779. margin: 0 auto;
  1780. margin-top: 20px;
  1781. position: relative;
  1782. flex-direction: column;
  1783. // height: 100%;
  1784. .flex-header {
  1785. display: flex;
  1786. width: 100%;
  1787. position: relative;
  1788. height: 60px;
  1789. margin: 1%;
  1790. border-bottom: 1px solid #e1e1e1;
  1791. justify-content: space-between;
  1792. .el-button {
  1793. width: 150px;
  1794. float: right;
  1795. height: 40px !important;
  1796. margin-right: 30px;
  1797. }
  1798. }
  1799. }
  1800. //设置子组件样式
  1801. ::v-deep .el-tabs__item {
  1802. padding: 0;
  1803. margin-right: 20px;
  1804. width: 166px;
  1805. text-align: center;
  1806. background-color: #d8eaf6;
  1807. color: black;
  1808. }
  1809. ::v-deep .is-active {
  1810. color: #fff;
  1811. background-color: #0583cd;
  1812. }
  1813. ::v-deep .el-tabs__active-bar {
  1814. display: none;
  1815. }
  1816. ::v-deep .el-tabs__nav-wrap::after {
  1817. display: none !important;
  1818. }
  1819. .flex-form {
  1820. margin-top: 50px;
  1821. }
  1822. .flex-footer-botton {
  1823. display: flex;
  1824. justify-content: space-evenly;
  1825. }
  1826. </style>