review 细节调整

This commit is contained in:
yuebenshan committed 2023-02-15 18:14:37 +08:00
1 parent 15131347f4
commit 367fbdc2e3
6 files changed
+72 -72

No files matched your search

+6 -5
View File
@@ -201,7 +201,7 @@
userList: [],
tableData: [],
headers: [
{ text: '操作', value: 'action', align: 'center', sortable: false, width: 120, class: 'fixed', cellClass: 'fixed' },
{ text: '操作', value: 'action', sortable: false, width: 130, class: 'fixed', cellClass: 'fixed' },
{ text: '流程ID', value: 'workflowId' },
{ text: '流程名称', value: 'workflowName' },
],
@@ -293,7 +293,7 @@
},
// ---------- <<<<<<<<<< 申请项目审核 --------
async prepareCreateFormData({workflowForm, workflowPersonList, workflowId}) {
async prepareCreateFormData({ workflowForm, workflowPersonList, workflowId }) {
this.createFormList = workflowForm;
this.workflowPersonList = workflowPersonList;
this.createItem.workflowId = workflowId;
@@ -303,7 +303,7 @@
this.isCreateDrawerShown = true;
},
async prepareCreateValidate() {
if(!await this.$refs.createForm.validate()) {
if (!await this.$refs.createForm.validate()) {
throw new Error("请完善表单信息")
}
@@ -318,7 +318,7 @@
});
},
async confirmCreateWorkDialog() {
if (await window.confirmDialog({title: "新增", content: "确定新增吗?"}) === false) {
if (await window.confirmDialog({ title: "新增", content: "确定新增吗?" }) === false) {
throw new Error("[confirmCreateFormDialog] 否");
}
},
@@ -368,6 +368,7 @@
padding: 50% 0;
position: relative;
}
.work-item-content {
position: absolute;
left: 0;
@@ -376,11 +377,11 @@
height: 100%;
}
@media (max-width: 500px) {
body [xs='4'] {
flex: auto;
}
}
</style>
{% endblock %}
+11 -14
View File
@@ -55,7 +55,7 @@
</template>
<!--表格行操作按钮-->
<template v-slot:item.action="{ item }">
<span role="button" class="success--text jh-font-size-3 pr-2" @click="doUiAction('startUpdateItem', item)">
<span role="button" class="success--text jh-font-size-3" @click="doUiAction('startUpdateItem', item)">
<v-icon size="16" class="success--text">mdi-text-box-outline</v-icon>
查看
</span>
@@ -94,19 +94,17 @@
class="elevation-24">
<v-form v-if="isViewDrawerShown" ref="updateForm" lazy-validation>
<!--抽屉标题-->
<v-row>
<span class="title pa-6 pl-8">历史审核记录</span>
<v-row class="ma-0">
<span class="text-h6 pa-4">历史审核记录</span>
</v-row>
<!--抽屉表单-->
<v-row class="mt-0 px-6">
<v-col cols="12" sm="12" md="4" v-for="(item, index) in viewItem.taskFormInput.formList" :key="index">
<v-row class="mt-0 px-4">
<v-col cols="12" sm="12" v-for="(item, index) in viewItem.taskFormInput.formList" :key="index">
<form-item :form-item="item" readonly></form-item>
</v-col>
<v-col cols="12" sm="12" md="12">
<span class="jh-input-label">审核申请信息</span>
<task-history :task-id="viewItem.taskId"></task-history>
</v-col>
</v-row>
<span class="jh-input-label px-4">审核申请信息</span>
<task-history :task-id="viewItem.taskId"></task-history>
</v-form>
<!--抽屉关闭按钮-->
@@ -161,8 +159,8 @@
data: {
// 面包屑
breadcrumbs: [
{text: '首页', disabled: true,},
{text: '全部任务列表', disabled: true,}
{ text: '首页', disabled: true, },
{ text: '全部任务列表', disabled: true, }
],
isHelpPageDrawerShown: false,
// 表格相关数据
@@ -177,8 +175,8 @@
isTableLoading: true,
tableData: [],
headers: [
{ text: '操作', value: 'action', align: 'center', sortable: false, width: 80, class: 'fixed', cellClass: 'fixed' },
{ text: "审批项", value: "taskTitle" },
{ text: '操作', value: 'action', sortable: false, width: 80, class: 'fixed', cellClass: 'fixed' },
{ text: "审批项", value: "taskTitle", width: 150 },
{ text: "审核状态", value: "taskStatus" },
{ text: "操作者", value: "operationByUser", width: 120 },
{ text: "操作时间", value: "operationAt", width: 250 }
@@ -257,4 +255,3 @@
<style scoped>
</style>
{% endblock %}
+24 -24
View File
@@ -118,11 +118,11 @@
<v-navigation-drawer v-model="isSubmitDrawerShown" v-click-outside="drawerClickOutside" fixed temporary right width="80%" class="elevation-24">
<v-form v-if="isSubmitDrawerShown" ref="updateForm" lazy-validation>
<!--抽屉标题-->
<v-row>
<span class="title pa-6 pl-8">审核信息</span>
<v-row class="ma-0">
<span class="title pa-4">审核信息</span>
</v-row>
<!--抽屉表单-->
<v-row class="mt-0 px-6">
<v-row class="mt-0 px-4">
<v-col cols="12" sm="12" md="4" v-for="(formItem, index) in updateItem.taskFormInput.formList" :key="index">
<form-item :form-item="formItem" readonly></form-item>
</v-col>
@@ -139,13 +139,13 @@
{{ lineTypeItem.type }}
</v-btn>
</v-row>
<v-row class="mt-0 px-6">
</v-form>
<v-row class="mt-0">
<v-col cols="12" sm="12" md="12">
<span class="jh-input-label">审核历史</span>
<span class="jh-input-label px-4">审核历史</span>
<task-history :task-id="updateItem.taskId" @line-type-list="setLineTypeList"></task-history>
</v-col>
</v-row>
</v-form>
<!--抽屉关闭按钮-->
<v-btn elevation="0" color="success" fab absolute top left small tile class="drawer-close-float-btn"
@@ -192,7 +192,7 @@
<!-- <<<<<<<<<<<<< 加载页面组件 -->
<script type="module">
new Vue({
new Vue({
el: '#app',
template: '#app-template',
vueComponent: 'page',
@@ -200,8 +200,8 @@ new Vue({
data: {
// 面包屑
breadcrumbs: [
{text: '首页', disabled: true,},
{text: '待办、已处理的任务', disabled: true,}
{ text: '首页', disabled: true, },
{ text: '待办、已处理的任务', disabled: true, }
],
isHelpPageDrawerShown: false,
@@ -218,10 +218,10 @@ new Vue({
tableData: [],
historyData: [],
headers: [
{text: '操作', value: 'action', align: 'center', sortable: false, width: 80, class: 'fixed', cellClass: 'fixed'},
{text: "审批项", value: "taskTitle"},
{text: "操作者", value: "operationByUser", width: 120},
{text: "操作时间", value: "operationAt", width: 250}
{ text: '操作', value: 'action', sortable: false, width: 80, class: 'fixed', cellClass: 'fixed' },
{ text: "审批项", value: "taskTitle" },
{ text: "操作者", value: "operationByUser", width: 120 },
{ text: "操作时间", value: "operationAt", width: 250 }
],
isSubmitDrawerShown: false,
@@ -265,7 +265,7 @@ new Vue({
this.getHistoryData();
break;
default:
console.error("[doUiAction] uiActionId not find", {uiActionId});
console.error("[doUiAction] uiActionId not find", { uiActionId });
break;
}
},
@@ -278,9 +278,9 @@ new Vue({
pageId: 'todo',
actionId: 'selectItemList',
actionData: {},
where: {taskStatus: 'running'},
whereLike: {taskEditUserList: this.userId},
orderBy: [{column: 'operationAt', order: 'desc'}]
where: { taskStatus: 'running' },
whereLike: { taskEditUserList: this.userId },
orderBy: [{ column: 'operationAt', order: 'desc' }]
}
}
});
@@ -301,9 +301,9 @@ new Vue({
pageId: 'todo',
actionId: 'selectHistoryList',
actionData: {},
where: {taskStatus: 'running'},
whereLike: {taskEditUserList: '<$ ctx.userInfo.userId $>', taskConfigId: 'userTask-'},
orderBy: [{column: 'id', order: 'desc'}]
where: { taskStatus: 'running' },
whereLike: { taskEditUserList: '<$ ctx.userInfo.userId $>', taskConfigId: 'userTask-' },
orderBy: [{ column: 'id', order: 'desc' }]
}
}
});
@@ -328,7 +328,7 @@ new Vue({
},
async confirmSubmitDialog() {
if (await window.confirmDialog({title: "审核", content: "确定提交审核吗?"}) === false) {
if (await window.confirmDialog({ title: "审核", content: "确定提交审核吗?" }) === false) {
throw new Error("[confirmSubmitDialog] 否");
}
},
@@ -340,7 +340,7 @@ new Vue({
appData: {
pageId: 'todo',
actionId: 'submitNode',
actionData: {type: lineType, id: this.updateItem.id, taskId: this.updateItem.taskId, taskComment: this.updateItem.taskComment}
actionData: { type: lineType, id: this.updateItem.id, taskId: this.updateItem.taskId, taskComment: this.updateItem.taskComment }
}
}
})
@@ -351,11 +351,11 @@ new Vue({
this.updateItem = {};
},
setLineTypeList(lineTypeList) {
this.lineTypeList = _.uniqBy((lineTypeList || '').split(",").map(lineType => ({type: lineType, label: lineType})), 'type');
this.lineTypeList = _.uniqBy((lineTypeList || '').split(",").map(lineType => ({ type: lineType, label: lineType })), 'type');
},
// ---------- <<<<<<<<<<< 审核、查看 uiAction --------
}
})
})
</script>
<style scoped>
+10 -11
View File
@@ -188,7 +188,7 @@
tableDataFromBackend: [],
tableData: [],
headers: [
{ text: '操作', value: 'action', align: 'center', sortable: false, width: 120, class: 'fixed', cellClass: 'fixed' },
{ text: '操作', value: 'action', sortable: false, width: 130, class: 'fixed', cellClass: 'fixed' },
{ text: '流程ID', value: 'workflowId' },
{ text: '流程名称', value: 'workflowName' },
],
@@ -218,9 +218,9 @@
await this.openCreateDrawer();
break;
case 'createWorkflow':
await this.prepareDoCreateWork();
await this.prepareCreateValidate();
await this.confirmCreateWorkDialog();
await this.prepareDoWorkItem();
await this.doCreateWork();
await this.closeCreateDrawer();
break;
@@ -283,7 +283,6 @@
// ---------- <<<<<<<<<< 申请项目审核 --------
async prepareCreateFormData(funObj) {
console.log(funObj);
const { workflowForm, workflowPersonList, workflowId } = funObj;
this.currentWorkflowForm = workflowForm;
this.currentWorkflowPersonList = workflowPersonList;
@@ -293,11 +292,7 @@
async openCreateDrawer() {
this.isCreateDrawerShown = true;
},
async prepareCreateValidate() {
if (!await this.$refs.createForm.validate()) {
throw new Error("请完善表单信息")
}
async prepareDoCreateWork() {
this.currentWorkflowPersonList.forEach(workflowPersonItem => {
if (!workflowPersonItem.assignValue) {
workflowPersonItem.assignValue = [];
@@ -308,6 +303,13 @@
if (!workflowPersonItem.origin) workflowPersonItem['origin'] = {};
if (!workflowPersonItem.origin.properties) workflowPersonItem.origin['properties'] = {};
workflowPersonItem.origin.properties.assignValue = workflowPersonItem.assignValue;
});
},
async prepareCreateValidate() {
if (!await this.$refs.createForm.validate()) {
throw new Error("请完善表单信息")
}
this.currentWorkflowPersonList.forEach(workflowPersonItem => {
if (workflowPersonItem.assignValue.length === 0) {
window.vtoast.fail({ message: `${workflowPersonItem.label}必填!` });
throw new Error("[prepareValidate] 审批人 false");
@@ -319,9 +321,6 @@
throw new Error("[confirmCreateFormDialog] 否");
}
},
prepareDoWorkItem() {
console.log('create', this.currentWorkflowForm);
},
async doCreateWork() {
await window.jhMask.show();
+20 -17
View File
@@ -1,52 +1,55 @@
'use strict';
const path = require('path');
const assert = require('assert');
const { middleware, middlewareMatch } = require('@jianghujs/jianghu/config/middlewareConfig');
const jianghuPathTemp = require.resolve('@jianghujs/jianghu');
const jianghuPath = path.join(jianghuPathTemp, '../');
const eggJianghuDirResolve = require.resolve('@jianghujs/jianghu');
const eggJianghuDir = path.join(eggJianghuDirResolve, '../');
module.exports = appInfo => {
assert(appInfo);
const appId = 'xianfeng-v1';
const uploadDir = path.join(appInfo.baseDir, 'upload');
const downloadBasePath = `/${appId}/upload`;
return {
appId,
appTitle: '工单管理',
appLogo: `${appId}/public/img/logo.png`,
appType: 'single',
appDirectoryLink: '/',
appLogo: `${appId}/public/img/logo.svg`,
indexPage: `/${appId}/page/workflowManagement`,
loginPage: `/${appId}/page/login`,
helpPage: `/${appId}/page/help`,
uploadDir,
downloadBasePath,
uploadDir: path.join(appInfo.baseDir, 'upload'),
downloadBasePath: `/${appId}/upload`,
primaryColor: "#4caf50",
primaryColorA80: "#EEF7EE",
static: {
maxAge: 0,
buffer: false,
dynamic: true,
preload: false,
maxFiles: 0,
maxAge: 31536000,
buffer: true,
dir: [
{ prefix: `/${appId}/public/`, dir: path.join(appInfo.baseDir, 'app/public') },
{ prefix: `/${appId}/public/`, dir: path.join(jianghuPath, 'app/public') },
{ prefix: `/${appId}/upload/`, dir: uploadDir },
{ prefix: `/${appId}/public/`, dir: path.join(eggJianghuDir, 'app/public') },
],
},
jianghuConfig: {
enableUploadStaticFileCache: true,
enableUploadStaticFileAuthorization: false,
},
view: {
defaultViewEngine: 'nunjucks',
mapping: { '.html': 'nunjucks' },
root: [
path.join(appInfo.baseDir, 'app/view'),
path.join(jianghuPath, 'app/view'),
path.join(eggJianghuDir, 'app/view'),
].join(','),
},
middleware,
...middlewareMatch,
};
+1 -1
View File
@@ -8,7 +8,7 @@
"framework": "@jianghujs/jianghu"
},
"dependencies": {
"@jianghujs/jianghu": "4.0.14",
"@jianghujs/jianghu": "4.0.15",
"dayjs": "^1.11.4",
"egg": "^2.15.1",
"egg-scripts": "^2.11.0"