Merge branch 'main' of github.com:jianghujs/jianghujs-workflow into main
This commit is contained in:
commit
b518f082b6
3 files changed
+32
-32
No files matched your search
+1
-1
@@ -106,7 +106,7 @@ class TaskService extends Service {
|
|||||||
const insert = await jianghuKnex(tableEnum.task_history, this.ctx).insert(history);
|
const insert = await jianghuKnex(tableEnum.task_history, this.ctx).insert(history);
|
||||||
|
|
||||||
} else {
|
} 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>
|
||||||
|
|
||||||
<v-list-item-content v-if="formItem.component.type === 'singleSelect'">
|
<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"
|
<v-radio hide-details v-for="(option, optionIndex) in formItem.component.property.selectOptionList"
|
||||||
:key="optionIndex" :label="option.value" :value="option.value"></v-radio>
|
:key="optionIndex" :label="option.value" :value="option.value"></v-radio>
|
||||||
</v-radio-group>
|
</v-radio-group>
|
||||||
|
|||||||
@@ -25,19 +25,23 @@
|
|||||||
|
|
||||||
<!-- 页面主要内容 -->
|
<!-- 页面主要内容 -->
|
||||||
<v-card :class="{'px-2': isMobile}">
|
<v-card :class="{'px-2': isMobile}">
|
||||||
<v-list three-line subheader>
|
<v-data-table :headers="headers"
|
||||||
<v-subheader>流程列表</v-subheader>
|
:items="tableData"
|
||||||
<v-list-item v-for="(item, index) in tableDataFromBackend" :key="index">
|
:search="searchInput"
|
||||||
<v-subheader>{{getConstantCollectionItemText('categoryList', index)}}</v-subheader>
|
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
||||||
<v-row :class="{'px-10': !isMobile, 'px-3': isMobile, 'pb-7': isMobile}">
|
:items-per-page="20"
|
||||||
<v-col cols="12" sm="12" md="6" xl="6" class=" pb-3" v-for="(it, index) in item">
|
mobile-breakpoint="0"
|
||||||
<v-btn class="elevation-0 mr-10" color="success" dark @click="doUiAction('startCreateItem', {item: it})">
|
:loading="isTableLoading"
|
||||||
{{it.workflowName}}
|
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>
|
</v-btn>
|
||||||
</v-col>
|
</template>
|
||||||
</v-row>
|
</v-data-table>
|
||||||
</v-list-item>
|
|
||||||
</v-list>
|
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
<!-- 编辑抽屉 -->
|
<!-- 编辑抽屉 -->
|
||||||
@@ -60,17 +64,15 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col cols="12" class=" pb-3" v-for="(formItem, index) in editItem.workflowForm" :key="index">
|
<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-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 row :rules="requireRules" v-model="editItem.workflowFormData[formItem.id]" hide-details>
|
||||||
<v-radio-group :rules="requireRules" v-model="editItem.workflowFormData[formItem.id]" hide-details>
|
|
||||||
<v-radio v-for="(option, optionIndex) in formItem.component.property.selectOptionList"
|
<v-radio v-for="(option, optionIndex) in formItem.component.property.selectOptionList"
|
||||||
:key="optionIndex" :label="option.value"></v-radio>
|
:key="optionIndex" :label="option.value"></v-radio>
|
||||||
</v-radio-group>
|
</v-radio-group>
|
||||||
</v-list-item-content>
|
</v-list-item-content>
|
||||||
|
|
||||||
<v-list-item-content v-if="formItem.component.type === 'multipleSelect'">
|
<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">
|
<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>
|
<v-checkbox :rules="requireRules" style="margin-top: 0px;" :label="option.value" v-model="editItem.workflowFormData[formItem.id]" hide-details color="red"></v-checkbox>
|
||||||
</div>
|
</div>
|
||||||
@@ -126,17 +128,11 @@
|
|||||||
tableDataFromBackend: [],
|
tableDataFromBackend: [],
|
||||||
headers: [
|
headers: [
|
||||||
{ text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed' },
|
{ text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed' },
|
||||||
|
{ text: "任务ID", value: "workflowId", width: 120 },
|
||||||
{ text: "任务ID", value: "taskId", width: 120 },
|
{ text: "任务名称", value: "workflowName", width: 120 },
|
||||||
{ text: "流程节点版本ID", value: "processVersionId", width: 120 },
|
{ text: "任务分类ID", value: "workflowCategory", width: 120 },
|
||||||
{ text: "任务名称", value: "taskTitle", width: 120 },
|
{ text: "任务节点", value: "workflowConfig", width: 120 },
|
||||||
{ text: "任务状态:running 执行中;deny 拒绝;end 结束", value: "taskStatus", width: 120 },
|
{ text: "备注", value: "workflowRemark", 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: "操作者", value: "operationByUser", width: 120 },
|
{ text: "操作者", value: "operationByUser", width: 120 },
|
||||||
{ text: "操作时间", value: "operationAt", width: 250 },
|
{ text: "操作时间", value: "operationAt", width: 250 },
|
||||||
{ text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed' },
|
{ text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed' },
|
||||||
@@ -189,10 +185,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
for(const item of rows) {
|
rows.forEach(row => {
|
||||||
item.workflowForm = JSON.parse(item.workflowForm || '[]');
|
if(row.workflowConfig) {
|
||||||
|
row.workflowConfig = JSON.parse(row.workflowConfig).nodeList.map(item => [item.label, item.lineTypeList]);
|
||||||
|
row.workflowForm = JSON.parse(row.workflowForm || '[]');
|
||||||
}
|
}
|
||||||
this.tableDataFromBackend = _.groupBy(rows, 'workflowCategory');
|
})
|
||||||
|
this.tableDataFromBackend = rows;
|
||||||
|
console.log(this.tableDataFromBackend);
|
||||||
this.isTableLoading = false;
|
this.isTableLoading = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user