demandHomes.vue 48 KB

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