review
This commit is contained in:
1 parent
141bbda958
commit
959f4b55e8
5 files changed
+39
-90
No files matched your search
@@ -58,15 +58,13 @@
|
||||
</template>
|
||||
<!--表格底部右侧功能按钮-->
|
||||
<template v-slot:footer.prepend>
|
||||
<v-btn icon @click="doUiAction('openTableZebraLineMenu', $event)">
|
||||
<v-menu top offset-y :close-on-content-click="false">
|
||||
<template v-slot:activator="{on, attrs}">
|
||||
<v-btn icon v-bind="attrs" v-on="on">
|
||||
<v-icon>mdi-menu</v-icon>
|
||||
</v-btn>
|
||||
<v-menu top offset-y :close-on-content-click="false" v-model="isTableZebraLineMenuShown" :position-x="tableZebraLineMenuPosition.x" :position-y="tableZebraLineMenuPosition.y">
|
||||
<v-list>
|
||||
<v-list-item>
|
||||
<v-switch v-model="isTableZebraLineShown" hide-details class="ma-0" label="显示斑马纹" dense flat></v-switch>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</template>
|
||||
<v-switch v-model="isTableZebraLineShown" hide-details class="mx-3 my-2" label="显示斑马纹" dense flat></v-switch>
|
||||
</v-menu>
|
||||
</template>
|
||||
<!--表格底部右侧分页-->
|
||||
@@ -200,8 +198,6 @@
|
||||
searchInput: '',
|
||||
isHelpPageDrawerShown: false,
|
||||
isTableZebraLineShown: true,
|
||||
isTableZebraLineMenuShown: false,
|
||||
tableZebraLineMenuPosition: {x: null, y: null},
|
||||
|
||||
isCreateDrawerShown: false,
|
||||
createFormList: [],
|
||||
@@ -221,9 +217,6 @@
|
||||
case 'getTableData':
|
||||
await this.getTableData();
|
||||
break;
|
||||
case 'openTableZebraLineMenu':
|
||||
await this.openTableZebraLineMenu(uiActionData);
|
||||
break;
|
||||
case 'startCreateWorkflow':
|
||||
await this.prepareCreateFormData(uiActionData);
|
||||
await this.openCreateDrawer();
|
||||
@@ -289,14 +282,6 @@
|
||||
this.userList = userList;
|
||||
},
|
||||
|
||||
// ---------- <<<<<<<<<< 斑马纹开关 uiAction --------
|
||||
async openTableZebraLineMenu(funObj) {
|
||||
this.tableZebraLineMenuPosition.x = funObj.x -funObj.offsetX + 10;
|
||||
this.tableZebraLineMenuPosition.y = window.innerHeight - 50;
|
||||
this.isTableZebraLineMenuShown = !this.isTableZebraLineMenuShown;
|
||||
},
|
||||
// ---------- 斑马纹开关 uiAction >>>>>>>>>> --------
|
||||
|
||||
// ---------- <<<<<<<<<< 申请项目审核 --------
|
||||
async prepareCreateFormData({workflowForm, workflowPersonList, workflowId}) {
|
||||
this.createFormList = workflowForm;
|
||||
|
||||
@@ -71,15 +71,13 @@
|
||||
</template>
|
||||
<!--表格底部右侧功能按钮-->
|
||||
<template v-slot:footer.prepend>
|
||||
<v-btn icon @click="doUiAction('openTableZebraLineMenu', $event)">
|
||||
<v-menu top offset-y :close-on-content-click="false">
|
||||
<template v-slot:activator="{on, attrs}">
|
||||
<v-btn icon v-bind="attrs" v-on="on">
|
||||
<v-icon>mdi-menu</v-icon>
|
||||
</v-btn>
|
||||
<v-menu top offset-y :close-on-content-click="false" v-model="isTableZebraLineMenuShown" :position-x="tableZebraLineMenuPosition.x" :position-y="tableZebraLineMenuPosition.y">
|
||||
<v-list>
|
||||
<v-list-item>
|
||||
<v-switch v-model="isTableZebraLineShown" hide-details class="ma-0" label="显示斑马纹" dense flat></v-switch>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</template>
|
||||
<v-switch v-model="isTableZebraLineShown" hide-details class="mx-3 my-2" label="显示斑马纹" dense flat></v-switch>
|
||||
</v-menu>
|
||||
</template>
|
||||
<!--表格底部右侧分页-->
|
||||
@@ -175,8 +173,6 @@
|
||||
isHelpPageDrawerShown: false,
|
||||
|
||||
// 表格相关数据
|
||||
isTableZebraLineMenuShown: false,
|
||||
tableZebraLineMenuPosition: {x: null, y: null},
|
||||
isTableZebraLineShown: true,
|
||||
// 生日日期选择
|
||||
validationRules: {
|
||||
@@ -219,9 +215,6 @@
|
||||
case 'openDataPicker':
|
||||
await this.openDataPicker(uiActionData);
|
||||
break;
|
||||
case 'openTableZebraLineMenu':
|
||||
await this.openTableZebraLineMenu(uiActionData);
|
||||
break;
|
||||
case 'startUpdateItem':
|
||||
await this.prepareUpdateFormData(uiActionData);
|
||||
await this.openUpdateDrawer();
|
||||
@@ -258,13 +251,6 @@
|
||||
this.tableData = rows;
|
||||
this.isTableLoading = false;
|
||||
},
|
||||
// ---------- 斑马纹开关 uiAction >>>>>>>>>> --------
|
||||
async openTableZebraLineMenu(funObj) {
|
||||
this.tableZebraLineMenuPosition.x = funObj.x -funObj.offsetX + 10;
|
||||
this.tableZebraLineMenuPosition.y = window.innerHeight - 50;
|
||||
this.isTableZebraLineMenuShown = !this.isTableZebraLineMenuShown;
|
||||
},
|
||||
// ---------- <<<<<<<<<< 斑马纹开关 uiAction --------
|
||||
// ---------- 审核、查看 uiAction >>>>>>>>>>>> --------
|
||||
async prepareUpdateFormData(funObj) {
|
||||
this.updateItem = _.cloneDeep(funObj);
|
||||
|
||||
+5
-19
@@ -109,15 +109,13 @@
|
||||
</template>
|
||||
<!--表格底部右侧功能按钮-->
|
||||
<template v-slot:footer.prepend>
|
||||
<v-btn icon @click="doUiAction('openTableZebraLineMenu', $event)">
|
||||
<v-menu top offset-y :close-on-content-click="false">
|
||||
<template v-slot:activator="{on, attrs}">
|
||||
<v-btn icon v-bind="attrs" v-on="on">
|
||||
<v-icon>mdi-menu</v-icon>
|
||||
</v-btn>
|
||||
<v-menu top offset-y :close-on-content-click="false" v-model="isTableZebraLineMenuShown" :position-x="tableZebraLineMenuPosition.x" :position-y="tableZebraLineMenuPosition.y">
|
||||
<v-list>
|
||||
<v-list-item>
|
||||
<v-switch v-model="isTableZebraLineShown" hide-details class="ma-0" label="显示斑马纹" dense flat></v-switch>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</template>
|
||||
<v-switch v-model="isTableZebraLineShown" hide-details class="mx-3 my-2" label="显示斑马纹" dense flat></v-switch>
|
||||
</v-menu>
|
||||
</template>
|
||||
<!--表格底部右侧分页-->
|
||||
@@ -226,8 +224,6 @@
|
||||
isHelpPageDrawerShown: false,
|
||||
|
||||
// 表格相关数据
|
||||
isTableZebraLineMenuShown: false,
|
||||
tableZebraLineMenuPosition: {x: null, y: null},
|
||||
isTableZebraLineShown: true,
|
||||
// 生日日期选择
|
||||
validationRules: {
|
||||
@@ -276,9 +272,6 @@
|
||||
case 'openDataPicker':
|
||||
await this.openDataPicker(uiActionData);
|
||||
break;
|
||||
case 'openTableZebraLineMenu':
|
||||
await this.openTableZebraLineMenu(uiActionData);
|
||||
break;
|
||||
case 'startUpdateItem':
|
||||
await this.prepareUpdateFormData(uiActionData);
|
||||
await this.openUpdateDrawer();
|
||||
@@ -342,13 +335,6 @@
|
||||
});
|
||||
this.historyData = rows;
|
||||
},
|
||||
// ---------- 斑马纹开关 uiAction >>>>>>>>>> --------
|
||||
async openTableZebraLineMenu(funObj) {
|
||||
this.tableZebraLineMenuPosition.x = funObj.x -funObj.offsetX + 10;
|
||||
this.tableZebraLineMenuPosition.y = window.innerHeight - 50;
|
||||
this.isTableZebraLineMenuShown = !this.isTableZebraLineMenuShown;
|
||||
},
|
||||
// ---------- <<<<<<<<<< 斑马纹开关 uiAction --------
|
||||
// ---------- 审核、查看 uiAction >>>>>>>>>>>> --------
|
||||
async prepareUpdateFormData(funObj) {
|
||||
this.updateItem = _.cloneDeep(funObj);
|
||||
|
||||
@@ -22,10 +22,8 @@
|
||||
<v-card class="rounded-lg">
|
||||
<v-row class="ma-0 pa-4">
|
||||
<!--新增按钮-->
|
||||
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pa-0">
|
||||
<v-btn color="success" small class="elevation-0 mr-2"
|
||||
@click="doUiAction('jumpToCreateWorkflow')">新增</v-btn>
|
||||
</v-col>
|
||||
<v-btn color="success" small class="elevation-0 mr-2" @click="doUiAction('jumpToCreateWorkflow')">新增
|
||||
</v-btn>
|
||||
<v-spacer></v-spacer>
|
||||
<!--搜索-->
|
||||
<v-col cols="12" xs="8" sm="4" md="3" xl="2" class="pa-0">
|
||||
@@ -58,15 +56,13 @@
|
||||
</template>
|
||||
<!--表格底部右侧功能按钮-->
|
||||
<template v-slot:footer.prepend>
|
||||
<v-btn icon @click="doUiAction('openTableZebraLineMenu', $event)">
|
||||
<v-menu top offset-y :close-on-content-click="false">
|
||||
<template v-slot:activator="{on, attrs}">
|
||||
<v-btn icon v-bind="attrs" v-on="on">
|
||||
<v-icon>mdi-menu</v-icon>
|
||||
</v-btn>
|
||||
<v-menu top offset-y :close-on-content-click="false" v-model="isTableZebraLineMenuShown" :position-x="tableZebraLineMenuPosition.x" :position-y="tableZebraLineMenuPosition.y">
|
||||
<v-list>
|
||||
<v-list-item>
|
||||
<v-switch v-model="isTableZebraLineShown" hide-details class="ma-0" label="显示斑马纹" dense flat></v-switch>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</template>
|
||||
<v-switch v-model="isTableZebraLineShown" hide-details class="mx-3 my-2" label="显示斑马纹" dense flat></v-switch>
|
||||
</v-menu>
|
||||
</template>
|
||||
<!--表格底部右侧分页-->
|
||||
@@ -201,12 +197,10 @@
|
||||
searchInput: '',
|
||||
isHelpPageDrawerShown: false,
|
||||
isTableZebraLineShown: true,
|
||||
isTableZebraLineMenuShown: false,
|
||||
tableZebraLineMenuPosition: {x: null, y: null},
|
||||
|
||||
isCreateDrawerShown: false,
|
||||
createFormList: [],
|
||||
createItem: {},
|
||||
createItemWorkflowId: {},
|
||||
workflowPersonList: [],
|
||||
},
|
||||
watch: {},
|
||||
@@ -220,9 +214,6 @@
|
||||
case 'getTableData':
|
||||
await this.getTableData();
|
||||
break;
|
||||
case 'openTableZebraLineMenu':
|
||||
await this.openTableZebraLineMenu(uiActionData);
|
||||
break;
|
||||
case 'startCreateWorkflow':
|
||||
await this.prepareCreateFormData(uiActionData);
|
||||
await this.openCreateDrawer();
|
||||
@@ -288,19 +279,12 @@
|
||||
this.userList = userList;
|
||||
},
|
||||
|
||||
// ---------- <<<<<<<<<< 斑马纹开关 uiAction --------
|
||||
async openTableZebraLineMenu(funObj) {
|
||||
this.tableZebraLineMenuPosition.x = funObj.x -funObj.offsetX + 10;
|
||||
this.tableZebraLineMenuPosition.y = window.innerHeight - 50;
|
||||
this.isTableZebraLineMenuShown = !this.isTableZebraLineMenuShown;
|
||||
},
|
||||
// ---------- 斑马纹开关 uiAction >>>>>>>>>> --------
|
||||
|
||||
// ---------- <<<<<<<<<< 申请项目审核 --------
|
||||
async prepareCreateFormData({workflowForm, workflowPersonList, workflowId}) {
|
||||
async prepareCreateFormData(funObj) {
|
||||
const {workflowForm, workflowPersonList, workflowId} = funObj;
|
||||
this.createFormList = workflowForm;
|
||||
this.workflowPersonList = workflowPersonList;
|
||||
this.createItem.workflowId = workflowId;
|
||||
this.createItemWorkflowId = workflowId;
|
||||
},
|
||||
|
||||
async openCreateDrawer() {
|
||||
@@ -312,8 +296,12 @@
|
||||
}
|
||||
|
||||
this.workflowPersonList.forEach(workflowPerson => {
|
||||
workflowPerson.assignValue = workflowPerson.assignValue || [];
|
||||
workflowPerson.assignValue = workflowPerson.assignValue.filter(userId => this.userList.find(u => u.userId === userId));
|
||||
if(!workflowPerson.assignValue) {
|
||||
workflowPerson.assignValue = [];
|
||||
}
|
||||
workflowPerson.assignValue = workflowPerson.assignValue.filter(userId => {
|
||||
return this.userList.find(user => user.userId === userId);
|
||||
});
|
||||
workflowPerson.origin.properties.assignValue = workflowPerson.assignValue;
|
||||
if (workflowPerson.assignValue.length === 0) {
|
||||
window.vtoast.fail({message: `${workflowPerson.label}必填!`});
|
||||
@@ -332,7 +320,6 @@
|
||||
|
||||
async doCreateWork() {
|
||||
await window.jhMask.show();
|
||||
|
||||
await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
@@ -340,7 +327,7 @@
|
||||
actionId: 'insertTask',
|
||||
actionData: {
|
||||
formItemList: this.createFormList,
|
||||
workflowId: this.createItem.workflowId,
|
||||
workflowId: this.createItemWorkflowId,
|
||||
workflowConfigCustom: JSON.stringify({nodeListOfUserTaskNode: this.workflowPersonList})
|
||||
}
|
||||
}
|
||||
@@ -350,6 +337,8 @@
|
||||
await window.vtoast.success("申请成功");
|
||||
},
|
||||
async closeCreateDrawer() {
|
||||
this.createFormList = null;
|
||||
this.createItemWorkflowId = null;
|
||||
this.isCreateDrawerShown = false;
|
||||
},
|
||||
// ---------- 申请项目审核 >>>>>>>>>> --------
|
||||
@@ -373,6 +362,7 @@
|
||||
padding: 50% 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.work-item-content {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
@@ -381,6 +371,7 @@
|
||||
height: 100%;
|
||||
|
||||
}
|
||||
|
||||
@media (max-width: 500px) {
|
||||
body [xs='4'] {
|
||||
flex: auto;
|
||||
|
||||
+2
-1
@@ -8,7 +8,8 @@
|
||||
"framework": "@jianghujs/jianghu"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jianghujs/jianghu": "4.0.9",
|
||||
"@jianghujs/jianghu": "4.0.14",
|
||||
"dayjs": "^1.11.4",
|
||||
"egg": "^2.15.1",
|
||||
"egg-scripts": "^2.11.0"
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user