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

View File

@@ -50,12 +50,3 @@ export function delForm(formId) {
method: 'delete' 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() { handleExport() {
this.download('system/category/export', { this.download('workflow/category/export', {
...this.queryParams ...this.queryParams
}, `category_${new Date().getTime()}.xlsx`) }, `category_${new Date().getTime()}.xlsx`)
} }

View File

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

View File

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

View File

@@ -71,7 +71,7 @@
<el-tab-pane label="表单信息" name="form"> <el-tab-pane label="表单信息" name="form">
<div v-if="formOpen"> <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"> <div slot="header" class="clearfix">
<span>{{ formInfo.title }}</span> <span>{{ formInfo.title }}</span>
</div> </div>
@@ -101,12 +101,14 @@
<el-descriptions-item label="办结时间">{{ item.endTime || '-' }}</el-descriptions-item> <el-descriptions-item label="办结时间">{{ item.endTime || '-' }}</el-descriptions-item>
<el-descriptions-item label="耗时">{{ item.duration || '-'}}</el-descriptions-item> <el-descriptions-item label="耗时">{{ item.duration || '-'}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<div v-if="item.commentList && item.commentList.length > 0" v-for="comment in item.commentList"> <div v-if="item.commentList && item.commentList.length > 0">
<el-divider content-position="left"> <div v-for="(comment, index) in item.commentList" :key="index">
<el-tag :type="approveTypeTag(comment.type)" size="mini">{{ commentType(comment.type) }}</el-tag> <el-divider content-position="left">
<el-tag type="info" effect="plain" size="mini">{{ comment.time }}</el-tag> <el-tag :type="approveTypeTag(comment.type)" size="mini">{{ commentType(comment.type) }}</el-tag>
</el-divider> <el-tag type="info" effect="plain" size="mini">{{ comment.time }}</el-tag>
<span>{{ comment.fullMessage }}</span> </el-divider>
<span>{{ comment.fullMessage }}</span>
</div>
</div> </div>
</el-card> </el-card>
<el-card v-if="item.activityType === 'endEvent'" class="box-card" shadow="hover"> <el-card v-if="item.activityType === 'endEvent'" class="box-card" shadow="hover">
@@ -313,19 +315,25 @@ export default {
userOpen: false userOpen: false
}; };
}, },
created() {
this.init();
},
activated() { activated() {
this.taskForm.deployId = this.$route.query && this.$route.query.deployId; this.init();
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;
}, },
methods: { 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() { getTreeSelect() {
deptTreeSelect().then(response => { deptTreeSelect().then(response => {

View File

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

View File

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

View File

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