demandHome.vue 51 KB

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