internetAccess.vue 31 KB

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