42 changed files with 682 additions and 105 deletions
@ -1,4 +1,53 @@ |
|||||
<template> |
<template> |
||||
<div>Announcement</div> |
<w-grid |
||||
|
ref="gridRef" |
||||
|
:title="$t('system.announcementManager.grid.title')" |
||||
|
:config-button="true" |
||||
|
db-click-operation="edit" |
||||
|
selection="multiple" |
||||
|
:checkbox-selection="true" |
||||
|
:data-url="Environment.apiContextPath('/api/system/announcement')" |
||||
|
:sort-by="['-lastModifyDate']" |
||||
|
:query-form-cols-num="2" |
||||
|
:query-form-fields="[{ name: 'title', label: $t('title'), type: 'w-text', clearable: true }]" |
||||
|
:toolbar-configure="{ noIcon: false }" |
||||
|
:toolbar-actions="['query', 'refresh', 'separator', 'view', 'separator', 'export']" |
||||
|
:columns="[ |
||||
|
{ width: 300, name: 'title', label: $t('title') }, |
||||
|
{ width: '100%', name: 'content', label: $t('content'), sortable: false }, |
||||
|
{ width: 150, name: 'createDate', label: $t('createDate') }, |
||||
|
]" |
||||
|
:editor="{ |
||||
|
dialog: { |
||||
|
width: '800px', |
||||
|
}, |
||||
|
form: { |
||||
|
colsNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'title', label: $t('title'), type: 'w-text', requiredIf: true }, |
||||
|
{ name: 'content', label: $t('content'), type: 'q-editor', requiredIf: true, minHeight: '10rem', defaultValue: '' }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
:viewer="{ |
||||
|
panel: { |
||||
|
columnNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'id', label: $t('id') }, |
||||
|
{ name: 'title', label: $t('title') }, |
||||
|
{ name: 'content', label: $t('content') }, |
||||
|
{ name: 'dataComeFrom', label: $t('dataComeFrom') }, |
||||
|
{ name: 'creator', label: $t('creator') }, |
||||
|
{ name: 'createDate', label: $t('createDate') }, |
||||
|
{ name: 'lastModifier', label: $t('lastModifier') }, |
||||
|
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() }, |
||||
|
{ name: 'corporationCode', label: $t('corporationCode') }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
></w-grid> |
||||
</template> |
</template> |
||||
<script setup lang="ts"></script> |
<script setup lang="ts"> |
||||
|
import 'tailwindcss/utilities.css'; |
||||
|
import { Environment, Formater } from 'platform-core'; |
||||
|
</script> |
||||
|
@ -1,4 +1,63 @@ |
|||||
<template> |
<template> |
||||
<div>MyMessage</div> |
<w-grid |
||||
|
ref="gridRef" |
||||
|
:title="$t('system.notification.grid.title')" |
||||
|
:config-button="true" |
||||
|
db-click-operation="edit" |
||||
|
selection="multiple" |
||||
|
:checkbox-selection="true" |
||||
|
:fetch-data-url="Environment.apiContextPath('/api/system/notification/findNotifications')" |
||||
|
:data-url="Environment.apiContextPath('/api/system/notification')" |
||||
|
:sort-by="['-sendDate']" |
||||
|
:query-form-cols-num="4" |
||||
|
:query-form-fields="[ |
||||
|
{ name: 'sender', label: $t('system.notification.grid.entity.sender'), type: 'w-user-select', queryOperator: 'equals' }, |
||||
|
{ name: 'receiver', label: $t('system.notification.grid.entity.receiver'), type: 'w-user-select', queryOperator: 'equals' }, |
||||
|
]" |
||||
|
:toolbar-configure="{ noIcon: false }" |
||||
|
:toolbar-actions="['query', 'refresh', 'separator', 'add', 'clone', 'edit', 'remove', 'separator', 'view', 'separator', 'export']" |
||||
|
:columns="[ |
||||
|
{ width: 100, name: 'sender', label: $t('system.notification.grid.entity.sender') }, |
||||
|
{ width: 150, name: 'sendDate', label: $t('system.notification.grid.entity.sendDate') }, |
||||
|
{ width: 100, name: 'receiver', label: $t('system.notification.grid.entity.receiver') }, |
||||
|
{ width: 150, name: 'receiveDate', label: $t('system.notification.grid.entity.receiveDate') }, |
||||
|
{ width: '100%', name: 'content', label: $t('content'), sortable: false }, |
||||
|
]" |
||||
|
:editor="{ |
||||
|
dialog: { |
||||
|
width: '800px', |
||||
|
}, |
||||
|
form: { |
||||
|
colsNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'receiver', label: $t('receiver'), type: 'w-user-select', requiredIf: true }, |
||||
|
{ name: 'content', label: $t('content'), type: 'q-editor', requiredIf: true, minHeight: '10rem', defaultValue: '' }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
:viewer="{ |
||||
|
panel: { |
||||
|
columnNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'id', label: $t('id') }, |
||||
|
{ name: 'sender', label: $t('system.notification.grid.entity.sender') }, |
||||
|
{ name: 'sendDate', label: $t('system.notification.grid.entity.sendDate') }, |
||||
|
{ name: 'title', label: $t('title') }, |
||||
|
{ name: 'content', label: $t('content'), sortable: false }, |
||||
|
{ name: 'receiver', label: $t('system.notification.grid.entity.receiver') }, |
||||
|
{ name: 'receiveDate', label: $t('system.notification.grid.entity.receiveDate') }, |
||||
|
{ name: 'dataComeFrom', label: $t('dataComeFrom') }, |
||||
|
{ name: 'creator', label: $t('creator') }, |
||||
|
{ name: 'createDate', label: $t('createDate') }, |
||||
|
{ name: 'lastModifier', label: $t('lastModifier') }, |
||||
|
{ name: 'lastModifyDate', label: $t('lastModifyDate') }, |
||||
|
{ name: 'corporationCode', label: $t('corporationCode') }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
></w-grid> |
||||
</template> |
</template> |
||||
<script setup lang="ts"></script> |
<script setup lang="ts"> |
||||
|
import 'tailwindcss/utilities.css'; |
||||
|
import { Environment } from 'platform-core'; |
||||
|
</script> |
||||
|
@ -1,4 +1,89 @@ |
|||||
<template> |
<template> |
||||
<div>MyTask</div> |
<w-grid |
||||
|
ref="gridRef" |
||||
|
:title="$t('workbench.myTask.grid.title')" |
||||
|
:config-button="true" |
||||
|
:checkbox-selection="false" |
||||
|
db-click-operation="edit" |
||||
|
:sort-no="true" |
||||
|
:data-url="Environment.apiContextPath('/api/flowable/process/query/task')" |
||||
|
:sort-by="['-createTime']" |
||||
|
:query-form-cols-num="4" |
||||
|
:query-form-fields="[ |
||||
|
{ name: 'businessDescription', label: $t('workbench.myTask.grid.entity.businessDescription'), type: 'w-text' }, |
||||
|
{ |
||||
|
name: 'processDefinitionName', |
||||
|
label: $t('workbench.myTask.grid.entity.processDefinitionName'), |
||||
|
type: 'w-select', |
||||
|
options: processDefinitionsRef, |
||||
|
onUpdateValue: async (args: any) => { |
||||
|
const form = gridRef.getQueryForm(); |
||||
|
form.setFieldValue('taskDefinitionKey', undefined); |
||||
|
const field = form.getFields().taskDefinitionKey; |
||||
|
let options = []; |
||||
|
if (args?.value) { |
||||
|
const response = await axios.get(Environment.apiContextPath('/api/flowable/process/findUserTasksByProcessDeployId/' + args.value)); |
||||
|
if (response) { |
||||
|
options = response.data; |
||||
|
} |
||||
|
} |
||||
|
field.options = options; |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'taskDefinitionKey', |
||||
|
label: $t('workbench.myTask.grid.entity.activityName'), |
||||
|
type: 'w-select', |
||||
|
options: [], |
||||
|
queryOperator: 'equals', |
||||
|
}, |
||||
|
{ name: 'description', label: $t('workbench.myTask.grid.entity.taskDescription'), type: 'w-text' }, |
||||
|
]" |
||||
|
:toolbar-configure="{ noIcon: false }" |
||||
|
:toolbar-actions="[ |
||||
|
'query', |
||||
|
'reset', |
||||
|
'separator', |
||||
|
{ |
||||
|
name: 'process', |
||||
|
icon: 'bi-caret-right', |
||||
|
label: $t('workbench.myTask.grid.action.process'), |
||||
|
enableIf: (args) => { |
||||
|
return args.selected; |
||||
|
}, |
||||
|
click: () => {}, |
||||
|
}, |
||||
|
]" |
||||
|
:columns="[ |
||||
|
{ width: '100%', name: 'businessDescription', label: $t('workbench.myTask.grid.entity.businessDescription'), sortable: false }, |
||||
|
{ |
||||
|
width: 200, |
||||
|
name: 'processDefinitionName', |
||||
|
label: $t('workbench.myTask.grid.entity.processDefinitionName'), |
||||
|
format: (value, row) => { |
||||
|
return value + '_V' + row.processDefinitionVersion; |
||||
|
}, |
||||
|
}, |
||||
|
{ width: 100, name: 'name', label: $t('workbench.myTask.grid.entity.activityName') }, |
||||
|
{ width: 100, name: 'description', label: $t('workbench.myTask.grid.entity.taskDescription') }, |
||||
|
{ width: 100, name: 'assignee', label: $t('workbench.myTask.grid.entity.prefixAssignee') }, |
||||
|
{ width: 150, name: 'createTime', label: $t('workbench.myTask.grid.entity.createTime') }, |
||||
|
]" |
||||
|
></w-grid> |
||||
</template> |
</template> |
||||
<script setup lang="ts"></script> |
<script setup lang="ts"> |
||||
|
import { ref } from 'vue'; |
||||
|
import { axios, Environment, Formater } from 'platform-core'; |
||||
|
|
||||
|
const gridRef = ref(); |
||||
|
const processDefinitionsRef = ref([]); |
||||
|
|
||||
|
const response = await axios.get(Environment.apiContextPath('/api/flowable/process/findAllDeployedProcessDefines')); |
||||
|
if (response) { |
||||
|
const options: any[] = []; |
||||
|
for (const item of response.data) { |
||||
|
options.push({ label: item.name, value: item.deployedId }); |
||||
|
} |
||||
|
processDefinitionsRef.value = options; |
||||
|
} |
||||
|
</script> |
||||
|
Loading…
Reference in new issue