workflowBase.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855
  1. <template>
  2. <div>
  3. <div class="flex-handle">
  4. <div class="flex-left">
  5. <div class="flex-left-header">
  6. <div class="flex-path">
  7. <div class="flex-left-header-text">
  8. 选择路径
  9. <div class="flex-path-list">
  10. <div v-if="manyReassignment" :class="actives" @click="clickManyTransfer(1)">
  11. 转派
  12. </div>
  13. <div v-if="transferStatus" :class="active" @click="clickTransfer(1)">
  14. 转派
  15. </div>
  16. <div v-if="copyStatus" @click="clickTransfer(2)">抄送</div>
  17. <div v-for="(item, index) in node.nextShapes" :key="index" :class="seleIndex == index ? 'active' : ''"
  18. @click="clickGetTree(item, index)">
  19. {{ item.properties.name }}
  20. </div>
  21. </div>
  22. </div>
  23. </div>
  24. <div class="flex-commons">
  25. <div class="flex-left-header-text">
  26. 常用意见
  27. <span @click="clickEdit" class="flex-icon"><i class="el-icon-edit"></i>修改</span>
  28. </div>
  29. <div class="flex-slide">
  30. <div v-for="(item, index) in commonlyList" :key="index" ref="common" class="flex-common"
  31. @click="clickCommonly($event)">
  32. {{ item.dataName }}
  33. </div>
  34. </div>
  35. </div>
  36. </div>
  37. <div class="flex-opinion">
  38. <div class="flex-left-header-text">意见内容</div>
  39. <el-input type="textarea" autosize placeholder="请输入内容" v-model="textarea">
  40. </el-input>
  41. </div>
  42. </div>
  43. <div class="flex-right" :class="{ copyClass: CopyStatus }">
  44. <div class="flex-left-header-text" :class="{ 'flex-right-text': CopyStatus }">
  45. 本部门人员办理
  46. <div style="display: flex">
  47. <div class="flex-header-text-tree">
  48. 候选人
  49. <deptTree ref="defTree" class="flex-slide" :treeList="treeList" @changeTree="changeTree" />
  50. </div>
  51. <div class="flex-header-text-tree">
  52. 已选人员
  53. <!-- <div class="">{{ selectUser }}</div> -->
  54. <div class="" v-for="(item, index) in backThree" :key="index">
  55. {{ item.loginNameStr }}
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. <div v-if="CopyStatus" class="flex-left-header-text flex-right-text">
  61. 抄送人员
  62. <div style="display: flex">
  63. <div class="flex-header-text-tree">
  64. 抄送人
  65. <deptTree ref="defTrees" class="flex-slide" :treeList="treeCopyList" @changeTree="changeTreeCopy" />
  66. </div>
  67. <div class="flex-header-text-tree">
  68. 已选人员
  69. <div class="" v-for="(item, index) in copyUser" :key="index">
  70. {{ item.loginNameStr }}
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. <div class="flex-footer-botton">
  78. <div class="flex-button">
  79. <el-button type="primary" @click="submitWork()" :loading="buttonLoading">提交</el-button>
  80. </div>
  81. </div>
  82. <el-dialog title="修改常用意见" :visible.sync="editStatus" width="100%" :before-close="editCloses" :modal="false"
  83. :destroy-on-close="true">
  84. <div style="overflow-y: scroll; overflow-x: hidden; height: 240px">
  85. <div v-for="(item, index) in commonlyList" :key="index" ref="common" class="flex-common">
  86. {{ item.dataName
  87. }}<i class="el-icon-circle-close" @click="deleStatus(item)"></i>
  88. </div>
  89. <div class="flex-common">
  90. <i class="el-icon-circle-plus-outline" @click="addStatus()"></i>
  91. </div>
  92. </div>
  93. </el-dialog>
  94. </div>
  95. </template>
  96. <script>
  97. import deptTree from "./workDeptThree.vue";
  98. export default {
  99. components: {
  100. deptTree,
  101. },
  102. name: "workflow",
  103. data() {
  104. return {
  105. active: "",
  106. buttonLoading: false, //按钮loadding
  107. manyPeopleStatus: false, //多人处理下发任务
  108. editStatus: false, //常用意见控制
  109. transferStatus: false, //转派按钮控制
  110. TransferStatus: false, //是否点击转派状态
  111. copyStatus: false, //抄送按钮控制
  112. CopyStatus: false, //是否点击抄送状态
  113. node: [], //路径列表
  114. seleIndex: "1099", //点击路径下标
  115. commonlyList: [], //常用意见数组
  116. textarea: "未填写意见", //意见内容字段
  117. copyUser: "", //抄送人员列表
  118. selectUser: "", //已选人员列表
  119. treeList: [], // 待选人员列表
  120. propsList: [],
  121. nodes: [],
  122. initialList: [], //第一次进入是加载节点
  123. clicknextName: "", //获取的流程节点
  124. backThree: [],
  125. treeCopyList: [],
  126. demand: "",
  127. nextDealManList: "",
  128. isLastManStatus: false,
  129. manyReassignment: false,
  130. actives: "",
  131. resourceId: '',
  132. };
  133. },
  134. props: {
  135. // 表格数据和表格部分属性的对象
  136. // eslint-disable-next-line vue/require-default-prop
  137. request_formTitle: {
  138. type: String,
  139. },
  140. list: {
  141. type: Object,
  142. },
  143. requestForm: {
  144. type: Object,
  145. },
  146. adminResourceId: {
  147. type: String,
  148. },
  149. },
  150. created() {
  151. if (this.adminResourceId) {
  152. this.manyReassignment = true;
  153. }
  154. console.log(this.list);
  155. this.getNextPath(this.list.resourceId, 1);
  156. this.getMetirialType();
  157. },
  158. methods: {
  159. //多人转派
  160. clickManyTransfer() {
  161. (this.actives = this.actives != "" ? "" : "active"),
  162. (this.seleIndex = "1099");
  163. this.getNextPath(this.adminResourceId, 3);
  164. },
  165. async getLastManList(e) {
  166. let _this = this;
  167. let obj = {
  168. url: _this.$url.formList.getComplateLastMan, //开始工作流接口
  169. data: e,
  170. // status: "form",
  171. headers: {
  172. "Content-Type": "application/json",
  173. },
  174. };
  175. let res = await this.common.httpPost(obj, success);
  176. function success(data) { }
  177. },
  178. async nextWorks(lists, list) {
  179. // lists.title = this.request_formTitle
  180. let listss = {
  181. userId: this.nextDealManList, //人员id
  182. taskId: this.list.taskId, //表单标识
  183. loginstr: JSON.parse(window.sessionStorage.userInfo).loginNoStr,
  184. // taskName: this.clicknextName, //流程节点
  185. content: this.textarea, //意见内容
  186. };
  187. if (this.manyReassignment == true) {
  188. let _this = this;
  189. let obj = {
  190. url: _this.$url.formList.getNewTransferTask + _this.list.taskId, //下一步工作流接口
  191. data: listss,
  192. status: "form",
  193. };
  194. await this.common.httpPost(obj, success);
  195. function success(data) {
  196. _this.$emit("beforeClose", true);
  197. }
  198. } else {
  199. let _this = this;
  200. let obj = {
  201. url: _this.$url.formList.nextWork, //下一步工作流接口
  202. data: lists,
  203. status: "form",
  204. };
  205. await this.common.httpPost(obj, success);
  206. function success(data) {
  207. console.log(data);
  208. let updateList = {
  209. taskId: data.taskid,
  210. id: _this.list.id,
  211. resourceId: _this.nodes.currentShape[0].resourceId,
  212. tableName: _this.requestForm.processDefinitionKey,
  213. };
  214. list.taskId = data.taskid;
  215. _this.setUpdate(updateList);
  216. _this.getLastManList(list);
  217. }
  218. }
  219. },
  220. submitWork() {
  221. this.buttonLoading = true
  222. //多人会签处理环节
  223. let list = {
  224. userId: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员id
  225. taskId: this.list.taskId, //表单标识
  226. // procinstid: this.list.processId,
  227. title: this.request_formTitle,//代办标题
  228. taskName: this.clicknextName, //流程节点
  229. userCode: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员code
  230. content: this.textarea, //意见内容
  231. };
  232. let newlist = {
  233. userId: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员id
  234. taskId: this.list.taskId, //表单标识
  235. // procinstid: this.list.processId,
  236. title: this.request_formTitle,//代办标题
  237. taskName: this.clicknextName, //流程节点
  238. userCode: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员code
  239. content: this.textarea, //意见内容
  240. };
  241. if (this.manyPeopleStatus == true) {
  242. list.procinstid = this.list.processId;
  243. // if (this.backThree.length <= 1) {
  244. // this.$message.error("请选择多人");
  245. // return;
  246. // } else {
  247. list.lastmanList = this.nextDealManList;
  248. // }
  249. if (this.nodes.currentShape) {
  250. newlist.resolution = this.nodes.currentShape[0].condition.resolution;
  251. newlist.approve = this.nodes.currentShape[0].condition.approve;
  252. }
  253. if (this.backThree.length > 0) {
  254. newlist.nextDealMan = "admin";
  255. }
  256. this.nextWorks(newlist, list);
  257. } else {
  258. console.log(456);
  259. //生成需求决策编号
  260. if (this.clicknextName === "起草人发送") {
  261. this.getDemand();
  262. }
  263. if (!this.list.taskId) {
  264. this.$message.error("请先保存表单后处理");
  265. return false;
  266. }
  267. if (this.TransferStatus === true) {
  268. if (this.backThree.length > 0) {
  269. this.nextWork();
  270. } else {
  271. this.$message.error("请选择候选人");
  272. return false;
  273. }
  274. } else {
  275. if (this.copyUser.length) {
  276. //抄送
  277. // list.copyman = this.treeCopyList[0].loginNoStrCopy;
  278. // list.copyman = this.copyUser;
  279. list.copyman = ''
  280. this.copyUser.map((item) => {
  281. list.copyman += item.loginNoStr + ','
  282. })
  283. }
  284. if (this.isLastManStatus == true) {
  285. list.lastman = "yes";
  286. list.lastManDecision = "yes";
  287. list.resourceId = this.nodes.currentShape[0].resourceId
  288. }
  289. if (this.nodes.currentShape) {
  290. list.resolution = this.nodes.currentShape[0].condition.resolution;
  291. list.approve = this.nodes.currentShape[0].condition.approve;
  292. }
  293. if (this.clicknextName === "") {
  294. this.$message.error("请选择流程节点");
  295. return false;
  296. }
  297. if (this.backThree.length > 0) {
  298. if (this.manyPeopleStatus == true) {
  299. list.nextDealManList = this.nextDealManList;
  300. } else {
  301. list.nextDealMan = this.backThree[0].loginNoStr;
  302. }
  303. } else {
  304. if (this.clicknextName === "流程结束" || this.clicknextName === "提交至任务发起人") {
  305. } else {
  306. this.$message.error("请选择候选人");
  307. return false;
  308. }
  309. }
  310. this.nextWork(list);
  311. }
  312. }
  313. },
  314. //生成需求决策编号接口
  315. getDemand() {
  316. this.$http({
  317. url: "/market/waf/getBusi",
  318. method: "post",
  319. headers: {
  320. "Content-Type": "application/json",
  321. },
  322. data: {},
  323. }).then((res) => {
  324. this.demand = res.data;
  325. });
  326. },
  327. async nextWork(list) {
  328. console.log(list);
  329. // list.title = this.request_formTitle
  330. //e:yes||no,list:传入数组,title:结束标签,res:驳回标签,id:工单更新id
  331. let _this = this;
  332. let copylist = list
  333. let obj = {
  334. url: _this.$url.formList.nextWork, //下一步工作流接口
  335. data: list,
  336. status: "form",
  337. };
  338. if (_this.TransferStatus === true) {
  339. let lists = {
  340. userId: _this.backThree[0].loginNoStr,
  341. taskId: _this.list.taskId,
  342. content: _this.textarea,
  343. };
  344. obj.url = _this.$url.formList.transferTask + _this.list.taskId;
  345. obj.data = lists;
  346. }
  347. await this.common.httpPost(obj, success);
  348. function success(data) {
  349. if (data != null) {
  350. console.log(123);
  351. if (_this.TransferStatus === true) {
  352. let list = {
  353. taskId: data.taskid,
  354. id: _this.list.id,
  355. tableName: _this.requestForm.processDefinitionKey,
  356. };
  357. _this.setUpdate(list);
  358. } else {
  359. let list = {
  360. taskId: data.taskid,
  361. id: _this.list.id,
  362. resourceId: _this.nodes.currentShape[0].resourceId,
  363. taskName: _this.nodes.nextShapes[0].properties.name,
  364. tableName: _this.requestForm.processDefinitionKey,
  365. };
  366. if (data.copytaskid) {
  367. list.copytaskid = data.copytaskid;
  368. // list.copyman = _this.treeCopyList[0].loginNoStrCopy;
  369. list.copyman = copylist.copyman;
  370. }
  371. if (_this.demand) {
  372. list.needNo = _this.demand;
  373. }
  374. _this.setUpdate(list);
  375. }
  376. } else {
  377. console.log(_this.list.id);
  378. console.log(_this.requestForm.processDefinitionKey);
  379. console.log(456);
  380. let list = {
  381. taskName: "结束",
  382. id: _this.list.id,
  383. tableName: _this.requestForm.processDefinitionKey,
  384. };
  385. _this.setUpdate(list);
  386. }
  387. }
  388. },
  389. setUpdate(e) {
  390. this.$http({
  391. url: "/market/waf/updateBase",
  392. method: "post",
  393. headers: {
  394. "Content-Type": "application/json",
  395. },
  396. data: e,
  397. }).then((res) => {
  398. this.$emit("updateForm", true);
  399. this.buttonLoading = false
  400. });
  401. },
  402. //查询路径接口
  403. getNextPath(e, status) {
  404. let { fresourceId, processDefinitionKey } = this.requestForm;
  405. let list = {
  406. fresourceId: fresourceId,
  407. processId: processDefinitionKey,
  408. };
  409. e ? (list.resourceId = e) : list;
  410. this.$http({
  411. url: "/market/waf/queryPath",
  412. method: "post",
  413. headers: {
  414. "Content-Type": "application/json",
  415. },
  416. data: list,
  417. }).then((res) => {
  418. if (status === 1) {
  419. //第一次进入取路径
  420. this.initialList = res.data.body;
  421. if (res.data.body.nextShapes[0].multi !== null) {
  422. if (res.data.body.nextShapes[0].multi.multi === "true") {
  423. // this.getqueryMultiTaskId();
  424. this.isLastManStatus = true;
  425. } else {
  426. this.isLastManStatus = false;
  427. }
  428. }
  429. if (res.data.body.nextShapes[0].loop !== null) {
  430. if (res.data.body.nextShapes[0].loop.loop === "true") {
  431. this.transferStatus = true; //转派按钮生效
  432. } else {
  433. this.transferStatus = false;
  434. }
  435. } else {
  436. this.transferStatus = false;
  437. }
  438. if (res.data.body.nextShapes[0].copy !== null) {
  439. if (res.data.body.nextShapes[0].copy.copy === "true") {
  440. this.copyStatus = true; //抄送按钮生效
  441. this.CopyStatus = true;
  442. } else {
  443. this.copyStatus = false;
  444. }
  445. } else {
  446. this.copyStatus = false;
  447. }
  448. res.data.body.currentShape.map((item, index) => {
  449. this.getNextPath(item.resourceId, 2);
  450. });
  451. }
  452. if (status === 2) {
  453. if (res.data.body.nextShapes[0].condition !== null) {
  454. this.node = res.data.body;
  455. } else {
  456. this.getNextPath(res.data.body.nextShapes[0].resourceId, 2);
  457. }
  458. }
  459. if (status === 3) {
  460. this.nodes = res.data.body;
  461. this.resourceId = res.data.body.nextShapes[0].resourceId
  462. this.getTreeLists(res.data.body, 1);
  463. if (res.data.body.nextShapes[0].multi !== null) {
  464. if (res.data.body.nextShapes[0].multi.multi === "true") {
  465. this.manyPeopleStatus = true; //转派按钮生效
  466. } else {
  467. this.manyPeopleStatus = false;
  468. }
  469. } else {
  470. this.manyPeopleStatus = false;
  471. }
  472. }
  473. });
  474. },
  475. //查询候选人接口
  476. getTreeLists(e, status) {
  477. this.$http({
  478. url: "/market/CfgWorkflowChoosePerson/queryList",
  479. method: "post",
  480. headers: {
  481. "Content-Type": "application/json",
  482. },
  483. data: {
  484. tableName: this.requestForm.processDefinitionKey,
  485. fresourceId: this.requestForm.fresourceId,
  486. },
  487. }).then((res) => {
  488. });
  489. console.log(this.list);
  490. console.log(this.requestForm);
  491. let createdId = "createId";
  492. let id =
  493. e.nextShapes[0].properties.documentation.indexOf(createdId) != -1
  494. ? this.list.createId
  495. : e.nextShapes[0].properties.documentation;
  496. console.log(id);
  497. let paramsJson = {}
  498. if (this.requestForm.processDefinitionKey == 'BOMC_process' || this.requestForm.processDefinitionKey == 'ZHQX_process' || this.requestForm.processDefinitionKey == 'ZYSQ_process') {
  499. paramsJson.proposerType = this.list.proposerType
  500. }
  501. if (this.requestForm.processDefinitionKey == 'YHBG_process') {
  502. paramsJson.changeType = this.list.changeType
  503. }
  504. // if (this.list.proposerType) {
  505. // paramsJson.proposerType = this.list.proposerType
  506. // }
  507. // if (this.list.changeType) {
  508. // paramsJson.changeType = this.list.changeType
  509. // }
  510. this.$http({
  511. url: "/market/api/user/info/queryNodePers?params=" + id,
  512. method: "post",
  513. headers: {
  514. "Content-Type": "application/json",
  515. },
  516. data: {
  517. paramsJson: JSON.stringify(paramsJson),
  518. tableName: this.requestForm.processDefinitionKey,
  519. fresourceId: this.requestForm.fresourceId,
  520. resourceid: this.resourceId,
  521. },
  522. }).then((res) => {
  523. console.log(status);
  524. if (status === 2) {
  525. // this.treeCopyList = res.data; //抄送
  526. // this.$refs.defTrees.treeList = res.data;
  527. } else {
  528. this.treeList = res.data; //抄送
  529. // this.$refs.defTree.treeList = res.data;
  530. console.log(this.treeList);
  531. }
  532. });
  533. if (this.copyStatus == true) {
  534. this.$http({
  535. url: "/market/api/user/info/queryNodePers?params=" + e.nextShapes[0].properties.formkeydefinition,
  536. method: "post",
  537. headers: {
  538. "Content-Type": "application/json",
  539. },
  540. data: {
  541. paramsJson: JSON.stringify(paramsJson),
  542. tableName: this.requestForm.processDefinitionKey,
  543. fresourceId: this.requestForm.fresourceId,
  544. resourceId: this.resourceId,
  545. },
  546. }).then((res) => {
  547. console.log(status);
  548. this.treeCopyList = res.data; //抄送
  549. });
  550. } else {
  551. }
  552. },
  553. //转派按钮方法
  554. clickTransfer(e) {
  555. if (e == 1) {
  556. this.TransferStatus = true;
  557. } else if (e == 2) {
  558. this.CopyStatus = true;
  559. }
  560. this.getTreeLists(this.initialList, e);
  561. },
  562. //点击节点获取下一步的处理人字段
  563. clickGetTree(e, index) {
  564. this.$refs.defTree.userList = [];
  565. this.backThree = [];
  566. this.$refs.defTree.userList = [];
  567. this.backThree = [];
  568. this.copyUser = [];
  569. // this.CopyStatus = false;
  570. this.TransferStatus = false;
  571. // this.clickTaskName = e.properties.name;
  572. this.clicknextName = e.properties.name;
  573. console.log(this.clicknextName);
  574. this.seleIndex = index;
  575. this.getNextPath(e.resourceId, 3); //1 为点击后获取线
  576. },
  577. //点击常用意见方法
  578. clickCommonly(e) {
  579. this.textarea = e.currentTarget.innerHTML;
  580. },
  581. //点击修改
  582. clickEdit() {
  583. this.editStatus = true;
  584. },
  585. //选择树的回调
  586. changeTree(e) {
  587. if (this.manyPeopleStatus == true) {
  588. this.backThree = e;
  589. let arr = [];
  590. this.backThree.map((item) => {
  591. arr.push(item.loginNoStr);
  592. });
  593. this.nextDealManList = arr.toString();
  594. } else {
  595. if (e.length > 1) {
  596. this.$message.error("只能选择一个人");
  597. return;
  598. } else {
  599. this.backThree = e;
  600. if (this.CopyStatus === true) {
  601. this.getTreeLists(e[0].loginNoStr, 2);
  602. }
  603. if (e[0]) {
  604. this.selectUser = e[0].loginNameStr;
  605. } else {
  606. this.selectUser = "暂无选择";
  607. }
  608. }
  609. }
  610. },
  611. changeTreeCopy(e) {
  612. console.log(e);
  613. this.copyUser = e
  614. },
  615. //获取字典表常用意见
  616. getMetirialType(e) {
  617. this.$http({
  618. url: "/market/cfgDataDict/queryList",
  619. method: "post",
  620. headers: {
  621. "Content-Type": "application/json",
  622. },
  623. data: {
  624. dictCodePks: "approval",
  625. },
  626. }).then((res) => {
  627. console.log(res);
  628. this.commonlyList = res.data;
  629. });
  630. },
  631. //添加字典表常用意见
  632. geaddctType(e) {
  633. this.$http({
  634. url: "/market/cfgDataDict/add",
  635. method: "post",
  636. headers: {
  637. "Content-Type": "application/json",
  638. },
  639. data: e,
  640. }).then((res) => {
  641. this.getMetirialType();
  642. });
  643. },
  644. //关闭修改
  645. editCloses() {
  646. this.editStatus = false;
  647. },
  648. //常用意见添加
  649. addStatus() {
  650. let newData = Date.parse(new Date());
  651. this.$prompt("请输入常用意见", "提示", {
  652. confirmButtonText: "确定",
  653. cancelButtonText: "取消",
  654. })
  655. .then(({ value }) => {
  656. let list = {
  657. dictCode: "approval",
  658. dataCode: newData,
  659. dataName: value,
  660. dictName: "审批意见",
  661. };
  662. this.geaddctType(list);
  663. this.$message({
  664. type: "success",
  665. message: "常用意见添加成功",
  666. });
  667. })
  668. .catch(() => {
  669. this.$message({
  670. type: "info",
  671. message: "取消输入",
  672. });
  673. });
  674. },
  675. //常用意见删除
  676. deleStatus(e) {
  677. this.$confirm("此操作将删除此常用意见, 是否继续?", "提示", {
  678. confirmButtonText: "确定",
  679. cancelButtonText: "取消",
  680. type: "warning",
  681. })
  682. .then(() => {
  683. let list = {
  684. dataCode: e.dataCode,
  685. dictCode: "approval",
  686. };
  687. this.geDelectType(list);
  688. this.$message({
  689. type: "success",
  690. message: "删除成功!",
  691. });
  692. })
  693. .catch(() => {
  694. this.$message({
  695. type: "info",
  696. message: "已取消删除",
  697. });
  698. });
  699. },
  700. //删除字典表常用意见
  701. geDelectType(e) {
  702. this.$http({
  703. url: "/market/cfgDataDicts/del",
  704. method: "post",
  705. headers: {
  706. "Content-Type": "application/json",
  707. },
  708. data: e,
  709. }).then((res) => {
  710. this.getMetirialType();
  711. });
  712. },
  713. },
  714. };
  715. </script>
  716. <style lang='scss' scoped>
  717. .flex-header-text-tree {
  718. width: 50%;
  719. text-align: center;
  720. }
  721. .flex-icon {
  722. float: right;
  723. margin-right: 20px;
  724. color: #4277a1;
  725. }
  726. .flex-handle {
  727. width: 100%;
  728. padding: 30px;
  729. display: flex;
  730. .flex-right {
  731. width: 50%;
  732. border: 1px solid #e1e1e1;
  733. margin-left: 20px;
  734. }
  735. }
  736. .flex-left {
  737. width: 50%;
  738. display: flex;
  739. flex-direction: column;
  740. .flex-left-header {
  741. display: flex;
  742. justify-content: space-around;
  743. .flex-path {
  744. height: 280px;
  745. border: 1px solid #e1e1e1;
  746. width: 68%;
  747. }
  748. }
  749. }
  750. .flex-common {
  751. padding: 10px 5%;
  752. font-size: 18px;
  753. }
  754. .flex-left-header-text {
  755. height: 40px;
  756. line-height: 40px;
  757. color: black;
  758. padding-left: 10px;
  759. background-color: #cde4f6;
  760. font-size: 18px;
  761. font-weight: bold;
  762. }
  763. .flex-path-list {
  764. overflow-y: scroll;
  765. overflow-x: hidden;
  766. height: 14rem;
  767. }
  768. .flex-slide {
  769. overflow-y: scroll;
  770. overflow-x: hidden;
  771. }
  772. .active {
  773. background-color: #f3faff;
  774. }
  775. .flex-opinion {
  776. height: 280px;
  777. border: 1px solid #e1e1e1;
  778. width: 100%;
  779. margin-top: 20px;
  780. }
  781. .flex-right-text {
  782. margin-right: 20px;
  783. width: 50%;
  784. }
  785. .flex-commons {
  786. height: 280px;
  787. border: 1px solid #e1e1e1;
  788. width: 30%;
  789. }
  790. .flex-footer-botton {
  791. display: flex;
  792. justify-content: space-evenly;
  793. }
  794. .flex-button {
  795. margin-top: 10px;
  796. margin-bottom: 10px;
  797. ::v-deep .el-button--primary {
  798. width: 222px;
  799. }
  800. }
  801. .copyClass {
  802. display: flex;
  803. }
  804. </style>