Merge pull request #4 from BMJLearnToHelloWorld/develop

优化+修复流程管理导出错误
This commit is contained in:
何文强
2022-11-27 02:12:29 +08:00
committed by GitHub
9 changed files with 46 additions and 34 deletions

View File

@@ -53,7 +53,7 @@ public class WfFormController extends BaseController {
*/
@SaCheckPermission("workflow:form:export")
@Log(title = "流程表单", businessType = BusinessType.EXPORT)
@GetMapping("/export")
@PostMapping("/export")
public void export(@Validated WfFormBo bo, HttpServletResponse response) {
List<WfFormVo> list = formService.queryList(bo);
ExcelUtil.exportExcel(list, "流程表单", WfFormVo.class, response);

View File

@@ -50,12 +50,3 @@ export function delForm(formId) {
method: 'delete'
})
}
// 导出流程表单
export function exportForm(query) {
return request({
url: '/workflow/form/export',
method: 'get',
params: query
})
}

View File

@@ -287,7 +287,7 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.download('system/category/export', {
this.download('workflow/category/export', {
...this.queryParams
}, `category_${new Date().getTime()}.xlsx`)
}

View File

@@ -130,7 +130,7 @@
</template>
<script>
import { listForm, getForm, delForm, addForm, updateForm, exportForm } from "@/api/workflow/form";
import { listForm, getForm, delForm, addForm, updateForm } from "@/api/workflow/form";
import Editor from '@/components/Editor';
import Parser from '@/utils/generator/parser'
export default {
@@ -176,6 +176,9 @@ export default {
}
};
},
created() {
this.getList();
},
activated() {
this.getList();
},
@@ -284,15 +287,15 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
let _this = this
this.$confirm('是否确认导出所有流程表单数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportForm(queryParams);
}).then(response => {
this.download(response.msg);
_this.download('/workflow/form/export', {
..._this.queryParams
}, `form_${new Date().getTime()}.xlsx`)
})
}
}

View File

@@ -101,6 +101,9 @@ export default {
rules: {}
};
},
created() {
this.getList();
},
activated() {
this.getList();
},

View File

@@ -71,7 +71,7 @@
<el-tab-pane label="表单信息" name="form">
<div v-if="formOpen">
<el-card class="box-card" shadow="never" v-for="formInfo in processFormList">
<el-card class="box-card" shadow="never" v-for="(formInfo, index) in processFormList" :key="index">
<div slot="header" class="clearfix">
<span>{{ formInfo.title }}</span>
</div>
@@ -101,12 +101,14 @@
<el-descriptions-item label="办结时间">{{ item.endTime || '-' }}</el-descriptions-item>
<el-descriptions-item label="耗时">{{ item.duration || '-'}}</el-descriptions-item>
</el-descriptions>
<div v-if="item.commentList && item.commentList.length > 0" v-for="comment in item.commentList">
<el-divider content-position="left">
<el-tag :type="approveTypeTag(comment.type)" size="mini">{{ commentType(comment.type) }}</el-tag>
<el-tag type="info" effect="plain" size="mini">{{ comment.time }}</el-tag>
</el-divider>
<span>{{ comment.fullMessage }}</span>
<div v-if="item.commentList && item.commentList.length > 0">
<div v-for="(comment, index) in item.commentList" :key="index">
<el-divider content-position="left">
<el-tag :type="approveTypeTag(comment.type)" size="mini">{{ commentType(comment.type) }}</el-tag>
<el-tag type="info" effect="plain" size="mini">{{ comment.time }}</el-tag>
</el-divider>
<span>{{ comment.fullMessage }}</span>
</div>
</div>
</el-card>
<el-card v-if="item.activityType === 'endEvent'" class="box-card" shadow="hover">
@@ -313,19 +315,25 @@ export default {
userOpen: false
};
},
created() {
this.init();
},
activated() {
this.taskForm.deployId = this.$route.query && this.$route.query.deployId;
this.taskForm.definitionId = this.$route.query && this.$route.query.definitionId;
this.taskForm.taskId = this.$route.query && this.$route.query.taskId;
this.taskForm.procInsId = this.$route.query && this.$route.query.procInsId;
this.finished = this.$route.query && this.$route.query.finished
// 流程任务重获取变量表单
if (this.taskForm.taskId) {
this.getProcessDetails(this.taskForm.procInsId, this.taskForm.deployId, this.taskForm.taskId);
}
this.loadIndex = this.taskForm.procInsId;
this.init();
},
methods: {
init() {
this.taskForm.deployId = this.$route.query && this.$route.query.deployId;
this.taskForm.definitionId = this.$route.query && this.$route.query.definitionId;
this.taskForm.taskId = this.$route.query && this.$route.query.taskId;
this.taskForm.procInsId = this.$route.query && this.$route.query.procInsId;
this.finished = this.$route.query && this.$route.query.finished
// 流程任务重获取变量表单
if (this.taskForm.taskId) {
this.getProcessDetails(this.taskForm.procInsId, this.taskForm.deployId, this.taskForm.taskId);
}
this.loadIndex = this.taskForm.procInsId;
},
/** 查询部门下拉树结构 */
getTreeSelect() {
deptTreeSelect().then(response => {

View File

@@ -133,6 +133,9 @@ export default {
}
};
},
created() {
this.getList();
},
activated() {
this.getList();
},
@@ -219,7 +222,7 @@ export default {
/** 撤回任务 */
handleRevoke(row){
const params = {
instanceId: row.procInsId
procInsId: row.procInsId
}
revokeProcess(params).then( res => {
this.$modal.msgSuccess(res.msg);

View File

@@ -165,6 +165,7 @@ export default {
},
created() {
this.getCategoryList();
this.getList();
},
activated() {
this.getList();

View File

@@ -122,6 +122,9 @@ export default {
rules: {}
};
},
created() {
this.getList();
},
activated() {
this.getList();
},