Merge branch 'main' of github.com:jianghujs/jianghujs-workflow into main

This commit is contained in:
case committed 2022-08-05 16:41:27 +08:00
commit b518f082b6
3 files changed
+34 -34

No files matched your search

+1 -1
View File
@@ -106,7 +106,7 @@ class TaskService extends Service {
const insert = await jianghuKnex(tableEnum.task_history, this.ctx).insert(history);
} else {
throw new BizError(errorInfoEnum.article_not_found);
throw new BizError(errorInfoEnum.line_not_found);
}
}
@@ -43,7 +43,7 @@
<v-list-item>
<v-list-item-content v-if="formItem.component.type === 'singleSelect'">
<v-radio-group :disabled="true" :label="(index+1) + formItem.component.outline">
<v-radio-group :disabled="true" :label="(index+1) + '. ' + formItem.component.outline">
<v-radio hide-details v-for="(option, optionIndex) in formItem.component.property.selectOptionList"
:key="optionIndex" :label="option.value" :value="option.value"></v-radio>
</v-radio-group>
+32 -32
View File
@@ -25,19 +25,23 @@
<!-- 页面主要内容 -->
<v-card :class="{'px-2': isMobile}">
<v-list three-line subheader>
<v-subheader>流程列表</v-subheader>
<v-list-item v-for="(item, index) in tableDataFromBackend" :key="index">
<v-subheader>{{getConstantCollectionItemText('categoryList', index)}}</v-subheader>
<v-row :class="{'px-10': !isMobile, 'px-3': isMobile, 'pb-7': isMobile}">
<v-col cols="12" sm="12" md="6" xl="6" class=" pb-3" v-for="(it, index) in item">
<v-btn class="elevation-0 mr-10" color="success" dark @click="doUiAction('startCreateItem', {item: it})">
{{it.workflowName}}
</v-btn>
</v-col>
</v-row>
</v-list-item>
</v-list>
<v-data-table :headers="headers"
:items="tableData"
:search="searchInput"
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
:items-per-page="20"
mobile-breakpoint="0"
:loading="isTableLoading"
checkbox-color="success"
:class="{'mx-2': isMobile}"
color="success"
class="elevation-0 mt-0 flex-fill d-flex flex-column">
<template v-slot:item.action="{ item }">
<v-btn small color="success" class="mr-2" @click="doUiAction('startCreateItem', {item: item})">
申请
</v-btn>
</template>
</v-data-table>
</v-card>
<!-- 编辑抽屉 -->
@@ -60,17 +64,15 @@
</v-col>
<v-col cols="12" class=" pb-3" v-for="(formItem, index) in editItem.workflowForm" :key="index">
<span class="inputLabel">{{formItem.component.outline}}</span>
<span class="inputLabel">{{ index+1 }}、 {{ formItem.component.outline }}</span>
<v-list-item-content v-if="formItem.component.type === 'singleSelect'">
<v-list-item-title class="formItem-title">{{ index+1 }}、 {{ formItem.component.outline }}</v-list-item-title>
<v-radio-group :rules="requireRules" v-model="editItem.workflowFormData[formItem.id]" hide-details>
<v-radio-group row :rules="requireRules" v-model="editItem.workflowFormData[formItem.id]" hide-details>
<v-radio v-for="(option, optionIndex) in formItem.component.property.selectOptionList"
:key="optionIndex" :label="option.value"></v-radio>
</v-radio-group>
</v-list-item-content>
<v-list-item-content v-if="formItem.component.type === 'multipleSelect'">
<v-list-item-title class="formItem-title">{{ index+1 }}、 {{ formItem.component.outline }}</v-list-item-title>
<div v-for="(option, optionIndex) in formItem.component.property.selectOptionList" :key="optionIndex">
<v-checkbox :rules="requireRules" style="margin-top: 0px;" :label="option.value" v-model="editItem.workflowFormData[formItem.id]" hide-details color="red"></v-checkbox>
</div>
@@ -126,17 +128,11 @@
tableDataFromBackend: [],
headers: [
{ text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed' },
{ text: "任务ID", value: "taskId", width: 120 },
{ text: "流程节点版本ID", value: "processVersionId", width: 120 },
{ text: "任务名称", value: "taskTitle", width: 120 },
{ text: "任务状态:running 执行中;deny 拒绝;end 结束", value: "taskStatus", width: 120 },
{ text: "当前执行中节点", value: "taskCurrentNode", width: 120 },
{ text: "申请人", value: "taskApplier", width: 120 },
{ text: "当前执行的处理人员,用逗号分隔", value: "taskProcessorList", width: 120 },
{ text: "所有相关人员,用逗号分隔", value: "taskRelatedPersonList", width: 120 },
{ text: "催单次数", value: "taskUrgeCount", width: 120 },
{ text: "最后催单时间", value: "taskUrgeLastTime", width: 120 },
{ text: "任务ID", value: "workflowId", width: 120 },
{ text: "任务名称", value: "workflowName", width: 120 },
{ text: "任务分类ID", value: "workflowCategory", width: 120 },
{ text: "任务节点", value: "workflowConfig", width: 120 },
{ text: "备注", value: "workflowRemark", width: 120 },
{ text: "操作者", value: "operationByUser", width: 120 },
{ text: "操作时间", value: "operationAt", width: 250 },
{ text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed' },
@@ -189,10 +185,14 @@
}
}
});
for(const item of rows) {
item.workflowForm = JSON.parse(item.workflowForm || '[]');
}
this.tableDataFromBackend = _.groupBy(rows, 'workflowCategory');
rows.forEach(row => {
if(row.workflowConfig) {
row.workflowConfig = JSON.parse(row.workflowConfig).nodeList.map(item => [item.label, item.lineTypeList]);
row.workflowForm = JSON.parse(row.workflowForm || '[]');
}
})
this.tableDataFromBackend = rows;
console.log(this.tableDataFromBackend);
this.isTableLoading = false;
},