|
@@ -1,7 +1,18 @@
|
|
1
|
+<!--
|
|
2
|
+ * @Author: ysh
|
|
3
|
+ * @Date: 2024-07-04 17:37:29
|
|
4
|
+ * @LastEditors: Please set LastEditors
|
|
5
|
+ * @LastEditTime: 2024-09-27 16:49:03
|
|
6
|
+-->
|
1
|
7
|
<template>
|
2
|
8
|
<div class="app-container">
|
3
|
9
|
<el-row :gutter="20">
|
4
|
10
|
<el-col :span="18" :xs="24">
|
|
11
|
+ <div class="mb20" v-if="showAlter">
|
|
12
|
+ <el-alert title="任务被退回,请修改后重新提交" type="error" :closable="false">
|
|
13
|
+ <return-comment :taskForm="taskForm" @isReturn="isReturn"></return-comment>
|
|
14
|
+ </el-alert>
|
|
15
|
+ </div>
|
5
|
16
|
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
|
6
|
17
|
<el-form-item label="项目编号:" prop="projectId" v-if="taskForm.procDefName == '技术交底'">
|
7
|
18
|
<el-input v-model="chooseProject.projectNumber" placeholder="请输入项目编号" disabled style="width: 300px" />
|
|
@@ -32,9 +43,9 @@
|
32
|
43
|
:autosize="{ minRows: 8 }" />
|
33
|
44
|
</el-form-item>
|
34
|
45
|
<el-form-item label="附件" prop="document">
|
35
|
|
- <FileUpload v-if="taskName == '技术交底'" ref="bsFile" :limit="1" :filePathName="'技术交底'"
|
|
46
|
+ <FileUpload v-if="!form.document" ref="bsFile" :limit="1" :filePathName="'技术交底'"
|
36
|
47
|
:fileType="['doc', 'docx', 'xls', 'xlsx', 'pdf', 'rar', 'zip']" @input="getTechnicalDoc"></FileUpload>
|
37
|
|
- <div v-if="form.document && taskName != '技术交底'">
|
|
48
|
+ <div v-if="form.document">
|
38
|
49
|
<el-link type="primary" @click="reviewWord(`${baseUrl}${'/profile/upload' + form.document}`)">
|
39
|
50
|
{{ getFileName(form.document) }}
|
40
|
51
|
</el-link>
|
|
@@ -42,6 +53,7 @@
|
42
|
53
|
:underline="false" target="_blank">
|
43
|
54
|
<span class="el-icon-download">下载文件</span>
|
44
|
55
|
</el-link>
|
|
56
|
+ <span class="el-icon-delete del-file" @click="deleteDoc" v-if="taskName == '技术交底'">删除文件</span>
|
45
|
57
|
</div>
|
46
|
58
|
</el-form-item>
|
47
|
59
|
<el-form-item label="技术交底意见" prop="disclosureComment">
|
|
@@ -96,6 +108,7 @@
|
96
|
108
|
</el-row>
|
97
|
109
|
</el-form>
|
98
|
110
|
<div style="text-align: center;" v-if="taskName">
|
|
111
|
+ <el-button type="danger" @click="returnOpen = true">退 回</el-button>
|
99
|
112
|
<el-button type="primary" @click="submitForm">提 交</el-button>
|
100
|
113
|
</div>
|
101
|
114
|
</el-col>
|
|
@@ -108,6 +121,9 @@
|
108
|
121
|
</el-card>
|
109
|
122
|
</el-col>
|
110
|
123
|
</el-row>
|
|
124
|
+ <el-dialog title="退回" :visible.sync="returnOpen" width="40%" append-to-body>
|
|
125
|
+ <return-btn :taskForm="taskForm" @goBack="$emit('goBack')" @saves="" @cancel="returnOpen = false"></return-btn>
|
|
126
|
+ </el-dialog>
|
111
|
127
|
</div>
|
112
|
128
|
</template>
|
113
|
129
|
|
|
@@ -119,10 +135,14 @@ import flow from '@/views/flowable/task/todo/detail/flow';
|
119
|
135
|
import { complete, getNextFlowNode } from "@/api/flowable/todo";
|
120
|
136
|
import { flowXmlAndNode } from "@/api/flowable/definition";
|
121
|
137
|
import { getUsersManageLeaderByDept, getUsersDeptLeaderByDept, getUserByPost } from '@/api/system/post'
|
|
138
|
+import ReturnBtn from './components/flowBtn/returnBtn.vue';
|
|
139
|
+import ReturnComment from './components/flowBtn/returnComment.vue';
|
122
|
140
|
|
123
|
141
|
export default {
|
124
|
142
|
components: {
|
125
|
|
- flow
|
|
143
|
+ flow,
|
|
144
|
+ ReturnBtn,
|
|
145
|
+ ReturnComment,
|
126
|
146
|
},
|
127
|
147
|
name: "Technical",
|
128
|
148
|
props: {
|
|
@@ -141,38 +161,6 @@ export default {
|
141
|
161
|
disclosureUser: '',
|
142
|
162
|
acceptUser: '',
|
143
|
163
|
confirmUser: '',
|
144
|
|
- // 遮罩层
|
145
|
|
- loading: true,
|
146
|
|
- // 选中数组
|
147
|
|
- ids: [],
|
148
|
|
- // 非单个禁用
|
149
|
|
- single: true,
|
150
|
|
- // 非多个禁用
|
151
|
|
- multiple: true,
|
152
|
|
- // 显示搜索条件
|
153
|
|
- showSearch: true,
|
154
|
|
- // 总条数
|
155
|
|
- total: 0,
|
156
|
|
- // cmc技术交底表格数据
|
157
|
|
- technicalList: [],
|
158
|
|
- // 弹出层标题
|
159
|
|
- title: "",
|
160
|
|
- // 是否显示弹出层
|
161
|
|
- open: false,
|
162
|
|
- // 查询参数
|
163
|
|
- queryParams: {
|
164
|
|
- pageNum: 1,
|
165
|
|
- pageSize: 10,
|
166
|
|
- projectId: null,
|
167
|
|
- accepter: null,
|
168
|
|
- disclosurer: null,
|
169
|
|
- confirmer: null,
|
170
|
|
- content: null,
|
171
|
|
- document: null,
|
172
|
|
- disclosureComment: null,
|
173
|
|
- disclosureTime: null,
|
174
|
|
- acceptTime: null
|
175
|
|
- },
|
176
|
164
|
userList: [],
|
177
|
165
|
chooseProject: {},
|
178
|
166
|
isSelect: false,
|
|
@@ -185,13 +173,14 @@ export default {
|
185
|
173
|
// 表单校验
|
186
|
174
|
rules: {},
|
187
|
175
|
formTotal: 0,
|
188
|
|
- flowData: {}
|
|
176
|
+ flowData: {},
|
|
177
|
+ returnOpen: false,
|
|
178
|
+ showAlter: true,
|
189
|
179
|
};
|
190
|
180
|
},
|
191
|
181
|
created() {
|
192
|
182
|
this.getProjectById();
|
193
|
183
|
this.getUserList();
|
194
|
|
- this.getList();
|
195
|
184
|
flowXmlAndNode({ procInsId: this.taskForm.procInsId, deployId: this.taskForm.deployId }).then(res => {
|
196
|
185
|
this.flowData = res.data;
|
197
|
186
|
})
|
|
@@ -260,15 +249,6 @@ export default {
|
260
|
249
|
this.userList = res.rows
|
261
|
250
|
})
|
262
|
251
|
},
|
263
|
|
- /** 查询cmc技术交底列表 */
|
264
|
|
- getList() {
|
265
|
|
- this.loading = true;
|
266
|
|
- listTechnical(this.queryParams).then(response => {
|
267
|
|
- this.technicalList = response.rows;
|
268
|
|
- this.total = response.total;
|
269
|
|
- this.loading = false;
|
270
|
|
- });
|
271
|
|
- },
|
272
|
252
|
isEmptyObject(obj) {
|
273
|
253
|
for (var key in obj) {
|
274
|
254
|
if (obj.hasOwnProperty(key)) {
|
|
@@ -277,21 +257,6 @@ export default {
|
277
|
257
|
}
|
278
|
258
|
return true;
|
279
|
259
|
},
|
280
|
|
- // 表单重置
|
281
|
|
- reset() {
|
282
|
|
- this.form = {
|
283
|
|
- technicalId: null,
|
284
|
|
- projectId: null,
|
285
|
|
- accepter: null,
|
286
|
|
- disclosurer: null,
|
287
|
|
- content: null,
|
288
|
|
- document: null,
|
289
|
|
- disclosureComment: null,
|
290
|
|
- disclosureTime: null,
|
291
|
|
- acceptTime: null
|
292
|
|
- };
|
293
|
|
- this.resetForm("form");
|
294
|
|
- },
|
295
|
260
|
/** 提交按钮 */
|
296
|
261
|
submitForm() {
|
297
|
262
|
this.$refs["form"].validate(valid => {
|
|
@@ -299,43 +264,45 @@ export default {
|
299
|
264
|
if (this.formTotal != 0) {
|
300
|
265
|
updateTechnical(this.form).then(response => {
|
301
|
266
|
this.$modal.msgSuccess("修改成功");
|
302
|
|
- this.open = false;
|
303
|
|
- this.getList();
|
304
|
267
|
});
|
305
|
268
|
const params = { taskId: this.taskForm.taskId };
|
306
|
269
|
getNextFlowNode(params).then(async res => {
|
307
|
|
- if (this.taskName == '技术交底')
|
|
270
|
+ if (this.taskName == '技术交底') {
|
308
|
271
|
this.$set(this.taskForm.variables, "approval", this.form.accepter);
|
|
272
|
+ this.handleComplete();
|
|
273
|
+ }
|
309
|
274
|
else if (this.taskName == '接受交底') {
|
310
|
275
|
let res = await getUsersDeptLeaderByDept({ deptId: 109 })
|
311
|
276
|
this.$set(this.taskForm.variables, "approval", res.data.userId);
|
|
277
|
+ this.handleComplete();
|
|
278
|
+ } else if (this.taskName == '确认交底') {
|
|
279
|
+ this.$modal.confirm('最后一个节点,提交将结束流程,是否提交?').then(res => {
|
|
280
|
+ this.handleComplete();
|
|
281
|
+ })
|
312
|
282
|
}
|
313
|
|
- complete(this.taskForm).then(response => {
|
314
|
|
- this.$modal.msgSuccess(response.msg);
|
315
|
|
- this.$emit('goBack')
|
316
|
|
- });
|
317
|
283
|
})
|
318
|
284
|
} else {
|
319
|
285
|
this.form.technicalId = this.taskForm.formId;
|
320
|
286
|
this.form.projectId = this.taskForm.formId;
|
321
|
287
|
addTechnical(this.form).then(response => {
|
322
|
288
|
this.$modal.msgSuccess("新增成功");
|
323
|
|
- this.open = false;
|
324
|
|
- this.getList();
|
325
|
289
|
});
|
326
|
290
|
const params = { taskId: this.taskForm.taskId };
|
327
|
291
|
getNextFlowNode(params).then(res => {
|
328
|
292
|
this.$set(this.taskForm.variables, "formId", this.taskForm.formId);
|
329
|
293
|
this.$set(this.taskForm.variables, "approval", this.form.accepter);
|
330
|
|
- complete(this.taskForm).then(response => {
|
331
|
|
- this.$modal.msgSuccess(response.msg);
|
332
|
|
- this.$emit('goBack')
|
333
|
|
- });
|
|
294
|
+ this.handleComplete();
|
334
|
295
|
})
|
335
|
296
|
}
|
336
|
297
|
}
|
337
|
298
|
});
|
338
|
299
|
},
|
|
300
|
+ handleComplete() {
|
|
301
|
+ complete(this.taskForm).then(response => {
|
|
302
|
+ this.$modal.msgSuccess(response.msg);
|
|
303
|
+ this.$emit('goBack')
|
|
304
|
+ });
|
|
305
|
+ },
|
339
|
306
|
getFileName(name) {
|
340
|
307
|
if (name) {
|
341
|
308
|
let arr = name.split('/')
|
|
@@ -351,21 +318,11 @@ export default {
|
351
|
318
|
}
|
352
|
319
|
}
|
353
|
320
|
},
|
354
|
|
- /** 删除按钮操作 */
|
355
|
|
- handleDelete(row) {
|
356
|
|
- const technicalIds = row.technicalId || this.ids;
|
357
|
|
- this.$modal.confirm('是否确认删除cmc技术交底编号为"' + technicalIds + '"的数据项?').then(function () {
|
358
|
|
- return delTechnical(technicalIds);
|
359
|
|
- }).then(() => {
|
360
|
|
- this.getList();
|
361
|
|
- this.$modal.msgSuccess("删除成功");
|
362
|
|
- }).catch(() => { });
|
|
321
|
+ deleteDoc() {
|
|
322
|
+ this.$set(this.form, 'document', undefined)
|
363
|
323
|
},
|
364
|
|
- /** 导出按钮操作 */
|
365
|
|
- handleExport() {
|
366
|
|
- this.download('oa/technical/export', {
|
367
|
|
- ...this.queryParams
|
368
|
|
- }, `technical_${new Date().getTime()}.xlsx`)
|
|
324
|
+ isReturn(val) {
|
|
325
|
+ this.showAlter = val
|
369
|
326
|
}
|
370
|
327
|
}
|
371
|
328
|
};
|