4434a752 by xiaomiao

createElement

1 parent 4f8e246d
1 <!--
2 * @Description:
3 * @Autor: renchao
4 * @LastEditTime: 2023-05-17 10:41:57
5 -->
6 <template>
7 <div class="from-clues">
8 <!-- 表单部分 -->
9 <div class="from-clues-header">
10 <div class="title">请选择要退回到的环节:</div>
11 <el-form ref="queryForm" label-width="90px">
12 <ul style="margin-bottom: 15px">
13 <li
14 v-for="(item, index) in dataList"
15 class="listDetail"
16 :key="index"
17 @click="changeSelectItem(item)">
18 <p class="icon">
19 <el-radio
20 v-model="selectActivity"
21 :label="item.activityId"
22 @change="changeSelectItem(item)"></el-radio>
23 </p>
24 <p>{{ item.activityName }}</p>
25 <p v-for="(child, childIndex) in item.userInfos" :key="childIndex">
26 {{ child.name }}
27 </p>
28 </li>
29 </ul>
30 <div class="title">退回意见:</div>
31 <el-form-item>
32 <el-input
33 class="textArea"
34 type="textarea"
35 v-model="outstepopinion"
36 placeholder="请输入退回意见"></el-input>
37 </el-form-item>
38 <el-form-item>
39 <el-button style="float:right" @click="cancelBack">取消</el-button>
40 <el-button type="primary" @click="onSubmit" style="float:right">退回</el-button>
41 </el-form-item>
42 </el-form>
43 </div>
44 </div>
45 </template>
46
47 <script>
48
49 import { getTaskBackNode, sendBackTask } from "@/api/workFlow.js"
50 import { popupCacel } from "@/utils/popup.js";
51
52 export default {
53 props: {
54 formData: {
55 type: Object,
56 default: {},
57 },
58 },
59 data () {
60 return {
61 selectActivity: "",
62 dataList: [],
63 outstepopinion: "",
64 selectItem: {},
65 };
66 },
67 created () {
68 this.getBackNode();
69 },
70 methods: {
71 /**
72 * @description: onSubmit
73 * @author: renchao
74 */
75 onSubmit () {
76 this.selectItem.outstepopinion = this.outstepopinion;
77 sendBackTask({
78 bsmSlsq: this.formData.bsmSlsq,
79 backNodeList: [this.selectItem],
80 }).then((res) => {
81 this.$message.success("退回成功");
82 setTimeout(() => {
83 // window.opener.location.reload(); //刷新父窗口
84 if (window.opener && window.opener.getBpageList) {
85 window.opener.getBpageList();
86 } else {
87 window.opener.frames[0].getBpageList();
88 }
89 window.close();
90 this.$emit("input", false);
91 }, 1000);
92 });
93 },
94 /**
95 * @description: changeSelectItem
96 * @param {*} item
97 * @author: renchao
98 */
99 changeSelectItem (item) {
100 this.selectItem = item;
101 this.selectActivity = item.activityId;
102 },
103 //获取可回退环节信息
104 /**
105 * @description: 获取可回退环节信息
106 * @author: renchao
107 */
108 getBackNode () {
109 getTaskBackNode(this.formData).then((res) => {
110 if (res.code == 200) {
111 this.dataList = res.result;
112 if (res.result) {
113 this.selectActivity = res.result[0].activityId;
114 this.selectItem = res.result[0];
115 }
116 }
117 });
118 },
119
120 /**
121 * @description: cancelBack
122 * @author: renchao
123 */
124 cancelBack () {
125 popupCacel();
126 }
127 }
128 }
129 </script>
130 <style scoped lang="scss">
131 @import "~@/styles/mixin.scss";
132
133 .listDetail {
134 display: flex;
135 align-items: center;
136 width: 100%;
137
138 p {
139 line-height: 30px;
140 height: 30px;
141 @include flex-center;
142 flex: 1;
143 width: 100%;
144 border: 1px solid rgb(233, 235, 237);
145 margin-top: -1px;
146 margin-left: -1px;
147 }
148
149 .icon {
150 flex: 0 0 60px;
151 }
152 }
153
154 .title {
155 margin-bottom: 10px;
156 }
157
158 .textArea {
159 /deep/.el-textarea__inner {
160 min-height: 90px !important;
161 }
162 }
163 /deep/.el-radio .el-radio__label {
164 display: none;
165 }
166 </style>
...@@ -325,102 +325,17 @@ export default { ...@@ -325,102 +325,17 @@ export default {
325 * @author: renchao 325 * @author: renchao
326 */ 326 */
327 sendToNext (obj) { 327 sendToNext (obj) {
328 const h = this.$createElement; 328 this.$popupDialog("转出", "workflow/components/zc", {
329 this.$msgbox({ 329 bsmSlsq: this.bsmSlsq,
330 title: "您确定转出吗?", 330 bestepid: this.bestepid
331 message: h("div", { style: "margin: auto" }, [ 331 }, '800px', true)
332 h("span", null, "下个环节名称:"),
333 h("i", { style: "color: teal" }, obj.taskName),
334 h("div", null, ""),
335 h("span", null, "下个环节经办人: "),
336 h("i", { style: "color: teal" }, obj.usernames.join(",")),
337 ]),
338 showCancelButton: true,
339 beforeClose: (action, instance, done) => {
340 if (action === "confirm") {
341 instance.confirmButtonLoading = true;
342 instance.confirmButtonText = "执行中...";
343 completeTask({
344 bsmSlsq: this.bsmSlsq,
345 shyj: "this.bestepid",
346 stepform: JSON.stringify(this.tabList),
347 }).then((res) => {
348 if (res.code === 200) {
349 instance.confirmButtonLoading = false;
350 this.$message.success("转件成功");
351 // window.opener.location.reload(); //刷新父窗口
352 if (window.opener && window.opener.getBpageList) {
353 window.opener.getBpageList();
354 } else {
355 window.opener.frames[0].getBpageList();
356 }
357 window.close();
358 this.$emit("input", false);
359 } else {
360 instance.confirmButtonLoading = false;
361 instance.confirmButtonText = "确定";
362 this.$message.error(res.message);
363 }
364 });
365 } else {
366 done();
367 }
368 },
369 }).then((action) => {
370 this.$message({
371 type: "info",
372 message: "action: " + action,
373 });
374 });
375 }, 332 },
376 /** 333 /**
377 * @description: sendToEnd 334 * @description: sendToEnd
378 * @author: renchao 335 * @author: renchao
379 */ 336 */
380 sendToEnd () { 337 sendToEnd () {
381 let that = this 338
382 const h = this.$createElement;
383 this.$msgbox({
384 title: "您确定转出吗?",
385 message: "此环节为流程最后环节,转出后流程将结束",
386 showCancelButton: true,
387 beforeClose: (action, instance, done) => {
388 if (action === "confirm") {
389 instance.confirmButtonLoading = true;
390 instance.confirmButtonText = "执行中...";
391 completeTask({
392 bsmSlsq: this.bsmSlsq,
393 shyj: "this.bestepid",
394 stepform: JSON.stringify(this.tabList),
395 }).then((res) => {
396 if (res.code === 200) {
397 instance.confirmButtonLoading = false;
398 that.$message.success("转件成功");
399 localStorage.setItem('transfer', true)
400 // window.opener.location.reload(); //刷新父窗口
401 if (window.opener && window.opener.getBpageList) {
402 window.opener.getBpageList();
403 } else {
404 window.opener.frames[0].getBpageList();
405 }
406 window.close();
407 that.$emit("input", false);
408 } else {
409 instance.confirmButtonLoading = false;
410 instance.confirmButtonText = "确定";
411 this.$message.error(res.message);
412 }
413 })
414 } else {
415 done();
416 }
417 },
418 }).then((action) => {
419 this.$message({
420 type: "info",
421 message: "action: " + action
422 })
423 })
424 }, 339 },
425 //批量操作 340 //批量操作
426 /** 341 /**
......
...@@ -165,8 +165,8 @@ ...@@ -165,8 +165,8 @@
165 //批量按钮点击事件 165 //批量按钮点击事件
166 batchUnitClick () { 166 batchUnitClick () {
167 this.currentSelectProps.batchOperation = true; 167 this.currentSelectProps.batchOperation = true;
168 this.activeIndex = "-1"; 168 // this.activeIndex = "-1";
169 this.$parent.stepForm(); 169 this.$parent.stepForm(0);
170 170
171 }, 171 },
172 //批量操作 172 //批量操作
......
...@@ -169,11 +169,13 @@ ...@@ -169,11 +169,13 @@
169 }); 169 });
170 }); 170 });
171 }, 171 },
172 //批量按钮点击事件 172
173 //批量按钮点击事件
173 batchUnitClick () { 174 batchUnitClick () {
174 this.currentSelectProps.batchOperation = true; 175 this.currentSelectProps.batchOperation = true;
175 this.activeIndex = "-1"; 176 // this.activeIndex = "-1";
176 this.$parent.stepForm(); 177 this.$parent.stepForm(0);
178
177 }, 179 },
178 //申请单元点击事件 180 //申请单元点击事件
179 unitClick (index) { 181 unitClick (index) {
......
...@@ -69,10 +69,12 @@ ...@@ -69,10 +69,12 @@
69 }, 69 },
70 methods: { 70 methods: {
71 onSubmit () { 71 onSubmit () {
72 this.selectItem.outstepopinion = this.outstepopinion; 72 console.log(this.formData.bsmSlsq);
73 console.log(this.selectItem);
73 sendBackTask({ 74 sendBackTask({
74 bsmSlsq: this.formData.bsmSlsq, 75 bsmSlsq: this.formData.bsmSlsq,
75 backNodeList: [this.selectItem], 76 backNodeList: [this.selectItem],
77 message:this.outstepopinion
76 }).then((res) => { 78 }).then((res) => {
77 this.$message.success("退回成功"); 79 this.$message.success("退回成功");
78 setTimeout(() => { 80 setTimeout(() => {
......
...@@ -211,7 +211,6 @@ ...@@ -211,7 +211,6 @@
211 //组装房地产权通用信息 211 //组装房地产权通用信息
212 splicingFdcq2Info () { 212 splicingFdcq2Info () {
213 let fdcq2List = this.ruleForm.fdcq2List; 213 let fdcq2List = this.ruleForm.fdcq2List;
214 console.log(this.ruleForm.fdcq2List, 'this.ruleForm.fdcq2List');
215 let fwxzArr = []; 214 let fwxzArr = [];
216 let fwjgArr = []; 215 let fwjgArr = [];
217 let jzmj = 0; 216 let jzmj = 0;
......