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