adtec-core-package 2.0.9 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adtec-core-package",
3
- "version": "2.0.9",
3
+ "version": "2.1.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -142,7 +142,7 @@ const openDialog = async (type: string) => {
142
142
  if (res?.readonly) {
143
143
  commentReadonly = true
144
144
  }
145
- task.value.comment = res.comment
145
+ task.value = {...task.value,...res}
146
146
  } catch (err: any) {
147
147
  return
148
148
  }
@@ -73,6 +73,13 @@
73
73
  </el-card>
74
74
  </el-flex>
75
75
  </el-form-item>
76
+ <el-form-item v-if="showSelPersons" label="下一步审核人" required>
77
+ <el-select v-model="task.variables.nextChecker" multiple placeholder="请选择下一步审核人"
78
+ :disabled="task.variables.persons?.length === 1">
79
+ <el-option v-for="item in task.variables.persons" :key="item.code" :label="item.name" :value="item.code">
80
+ </el-option>
81
+ </el-select>
82
+ </el-form-item>
76
83
  <el-form-item v-if="dialogType !== 'transfer'" label="附件" style="margin-bottom: 0">
77
84
  </el-form-item>
78
85
  </el-form>
@@ -100,21 +107,22 @@
100
107
  </el-dialog>
101
108
  </template>
102
109
  <script setup lang="ts">
103
- import { Search } from '@element-plus/icons-vue'
110
+ import {Search} from '@element-plus/icons-vue'
104
111
  import UserTag from '../../../components/bpmntree/components/UserSelector/UserTag.vue'
105
- import { ref } from 'vue'
106
- import type { IWfTaskVo } from '../../../interface/workflow/IWfTaskVo'
107
- import type { ISysUserInfo } from '../../../interface/ISysUserInfo'
108
- import type { IWfReturnNodeVo } from '../../../interface/workflow/IWfReturnNodeVo'
112
+ import {ref, computed} from 'vue'
113
+ import type {IWfTaskVo} from '../../../interface/workflow/IWfTaskVo'
114
+ import type {ISysUserInfo} from '../../../interface/ISysUserInfo'
115
+ import type {IWfReturnNodeVo} from '../../../interface/workflow/IWfReturnNodeVo'
109
116
  import workflowInstApi from '../../../api/workflow/workflowInstApi'
110
- import { ElMessage } from 'element-plus'
117
+ import {ElMessage} from 'element-plus'
111
118
  import UserSelect from '../../../components/business/userSelect.vue'
112
119
  import ElUploads from '../../../components/upload/ElUploads.vue'
113
- import { userInfoStore } from '../../../stores/userInfoStore'
114
- import type { ISysUploadFiles } from '../../../interface/ISysUploadFiles'
120
+ import {userInfoStore} from '../../../stores/userInfoStore'
121
+ import type {ISysUploadFiles} from '../../../interface/ISysUploadFiles'
115
122
  import documentApi from '../../../api/DocumentApi'
116
123
  import frameworkUtils from '../../../utils/FrameworkUtils.ts'
117
- import type { ITaskOperate } from '@/hooks/userWorkflowHooks.ts'
124
+ import type {ITaskOperate} from '@/hooks/userWorkflowHooks.ts'
125
+
118
126
  const emit = defineEmits(['success', 'openAssignee'])
119
127
  const dialogVisible = ref(false)
120
128
  const loading = ref(false)
@@ -123,11 +131,14 @@ const dialogLabel = ref('')
123
131
  const dialogType = ref('')
124
132
  const task = ref()
125
133
  const taskFiles = ref<ISysUploadFiles[]>([])
126
- const transferUser = ref<ISysUserInfo>({ id: '', userName: '' })
134
+ const transferUser = ref<ISysUserInfo>({id: '', userName: ''})
127
135
  const returnData = ref<IWfReturnNodeVo[]>([])
128
136
  const selectActivity = ref<string>('')
129
137
  const taskOperate = ref<ITaskOperate>()
130
138
  const readonly = ref(false)
139
+ const showSelPersons = computed(() => {
140
+ return task.value.variables?.persons?.length > 0
141
+ })
131
142
  const open = async (taskVo: IWfTaskVo, type: string, params: ITaskOperate, commentReadonly: boolean) => {
132
143
  if (commentReadonly) {
133
144
  readonly.value = true
@@ -208,12 +219,16 @@ const handleComplete = async () => {
208
219
  ElMessage.warning('请填写审批意见!')
209
220
  return
210
221
  }
222
+ if (showSelPersons.value && !task.value.variables.nextChecker?.length) {
223
+ ElMessage.warning('请选择下一步审核人!')
224
+ return
225
+ }
211
226
  //同意
212
227
  const askVo = {
213
228
  taskId: task.value.taskId,
214
229
  userId: userInfoStore().getUserInfo.id,
215
230
  comment: task.value.comment,
216
- // variables: task.value.variables
231
+ variables: task.value.variables
217
232
  }
218
233
  //若自定义了同意函数,则调用自定义函数
219
234
  if (taskOperate.value?.completeFunction) {
@@ -322,6 +337,7 @@ defineExpose({
322
337
  .el-card__body {
323
338
  padding: 5px;
324
339
  }
340
+
325
341
  .el-upload-dragger {
326
342
  padding: 5px;
327
343
  //height: 120px;
@@ -9,6 +9,7 @@
9
9
  v-for="(data, index) of datas"
10
10
  labelPosition="top"
11
11
  size="default"
12
+ :key="data.procInsId"
12
13
  :style="{ width: '100%' }"
13
14
  >
14
15
  <el-form-item label="任务名">
@@ -8,6 +8,7 @@ import ExcelJS from 'exceljs'
8
8
  import 'vxe-pc-ui/lib/style.css'
9
9
  import '../css/vxeTableUI/all.scss'
10
10
  import VxeUIPluginExportPDF from '@vxe-ui/plugin-export-pdf'
11
+ import { jsPDF } from 'jspdf'
11
12
  // 导入默认的语言
12
13
  import zhCN from 'vxe-table/lib/locale/lang/zh-CN'
13
14
 
@@ -22,7 +23,7 @@ export function initVxeTableInPage(enableExcel: boolean = false, enablePdf: bool
22
23
  // 局部注册插件
23
24
  VxeUI.use(VxeUIPluginRenderElement)
24
25
  if (enableExcel) VxeUI.use(VxeUIPluginExportXLSX, { ExcelJS })
25
- if (enablePdf) VxeUI.use(VxeUIPluginExportPDF, { })
26
+ if (enablePdf) VxeUI.use(VxeUIPluginExportPDF, { jsPDF })
26
27
 
27
28
  // 设置表格配置(可复制你在 VxeTableConfig.ts 中的配置)
28
29
  VxeUI.setConfig({