demandHome.vue 51 KB

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