internetAccess.vue 32 KB

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