Compare commits
11 Commits
main
...
bc9fd221a5
| Author | SHA1 | Date | |
|---|---|---|---|
| bc9fd221a5 | |||
| 256edf264e | |||
| 7328df959d | |||
| bea6e51eea | |||
| d01ce5d4a4 | |||
| 28214cade5 | |||
| bf81c37459 | |||
| 22a49b1d65 | |||
| e522bf59a6 | |||
| 04e69632f9 | |||
| f8c38c5936 |
@@ -63,7 +63,7 @@ watch(
|
||||
</script>
|
||||
<template>
|
||||
<ConfigGlobal :size="currentSize">
|
||||
<div class="h-100% w-100%" :class="greyMode ? `${prefixCls}-grey-mode` : ''">
|
||||
<div class="h-100% w-100%" style="overflow-y: auto;" :class="greyMode ? `${prefixCls}-grey-mode` : ''">
|
||||
<RouterView />
|
||||
</div>
|
||||
<routerSearch />
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import request from '@/config/axios'
|
||||
import { encryptAES } from '@/components/LowDesign/src/utils/aes'
|
||||
import download from '@/utils/download'
|
||||
|
||||
//获取表单开发列表
|
||||
export const getDbList = (data) => {
|
||||
@@ -158,6 +159,11 @@ export const exportExcelData = (tableId, data) => {
|
||||
return request.download({ url: `/jeelowcode/excel/exportExcel/${tableId}`, method: 'POST', data })
|
||||
}
|
||||
|
||||
//导出Excel表数据
|
||||
export const exportExcelDataCustom = (explain,tableId, data) => {
|
||||
return request.download({ url: `/jeelowcode/excel/exportExcelCustom/${tableId}`, method: 'POST', data }).then((data) => download.excel(data, explain, 'xlsx'))
|
||||
}
|
||||
|
||||
//下载导入模板
|
||||
export const downloadImportTemplate = (tableId) => {
|
||||
return request.download({ url: `/jeelowcode/excel/exportExcelTemplate/${tableId}` })
|
||||
|
||||
@@ -18,6 +18,18 @@
|
||||
v-bind="userVBind"
|
||||
class="w-100%"
|
||||
></userSelect>
|
||||
</span>
|
||||
<span prop="delegateDictId" style="display:none">
|
||||
|
||||
<DicTableSelect
|
||||
id="costomDictSelect"
|
||||
:column="distSelectColumn"
|
||||
size="default"
|
||||
type="add"
|
||||
prop="fields_7897245"
|
||||
:scope="dictSelectScope"
|
||||
@set-form-data="handleSetFormData"
|
||||
></DicTableSelect>
|
||||
</span>
|
||||
<!-- 顶部统计 -->
|
||||
<div
|
||||
@@ -383,12 +395,108 @@ interface Props {
|
||||
dicRowKey?: string //dicTable模式 行数据的 Key
|
||||
}
|
||||
|
||||
const dictSelectScope = {
|
||||
"key": 0,
|
||||
"value": "",
|
||||
"column": {
|
||||
"type": "dicTableSelect",
|
||||
"controlType": "select",
|
||||
"label": "表格选择框",
|
||||
"fixedSearch":{
|
||||
"approveStatusName":"已审批"
|
||||
},
|
||||
"separator": " | ",
|
||||
"multiple": true,
|
||||
"display": true,
|
||||
"span": 12,
|
||||
"disabled": false,
|
||||
"required": false,
|
||||
"hideLabel": false,
|
||||
"i18nCode": "fields_7897245",
|
||||
"dictTable": "1959187451673116674",
|
||||
"dictCode": "id",
|
||||
"dictText": "personName",
|
||||
"dictTableColumn": [
|
||||
"personName",
|
||||
"personAge",
|
||||
"personSex",
|
||||
"mobile",
|
||||
"approveStatusName"
|
||||
],
|
||||
"prop": "fields_7897245",
|
||||
"dataType": "string",
|
||||
"className": "control-dicTableSelect control-fields_7897245 ",
|
||||
"props": {
|
||||
"lable": "personName",
|
||||
"value": "id"
|
||||
},
|
||||
"rules": [
|
||||
|
||||
]
|
||||
},
|
||||
"size": "default",
|
||||
"disabled": false
|
||||
}
|
||||
|
||||
const distSelectColumn = {
|
||||
"type": "dicTableSelect",
|
||||
"controlType": "select",
|
||||
"multiple": true,
|
||||
"label": "表格选择框",
|
||||
"separator": " | ",
|
||||
"display": true,
|
||||
"span": 12,
|
||||
"disabled": false,
|
||||
"fixedSearch":{
|
||||
"approveStatusName":"已审批"
|
||||
},
|
||||
"required": false,
|
||||
"hideLabel": false,
|
||||
"i18nCode": "fields_7897245",
|
||||
"dictTable": "1959187451673116674",
|
||||
"dictCode": "id",
|
||||
"dictText": "personName",
|
||||
"dictTableColumn": [
|
||||
"personName",
|
||||
"personAge",
|
||||
"personSex",
|
||||
"mobile",
|
||||
"approveStatusName"
|
||||
]
|
||||
,
|
||||
"prop": "fields_7897245",
|
||||
"dataType": "string",
|
||||
"className": "control-dicTableSelect control-fields_7897245 ",
|
||||
"props": {
|
||||
"lable": "personName",
|
||||
"value": "id"
|
||||
},
|
||||
"rules": [
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
model: 'default',
|
||||
fixedSearch: () => {
|
||||
return {}
|
||||
}
|
||||
})
|
||||
const handleSetFormData = (key, val) => {
|
||||
console.log(key);
|
||||
console.log(val);
|
||||
// 在这里添加其他处理逻辑
|
||||
useFun.requestApi('get', '/jeelowcode/outsidePerson/importOutside?tableId='+props.tableId+'&ids=' + val, {
|
||||
}).then(res => {
|
||||
if (res.length > 0) {
|
||||
message.success('下发成功')
|
||||
useFun.refreshChange()
|
||||
} else {
|
||||
message.error(res.message)
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
const userVBind = {
|
||||
prop: 'delegateUserId',
|
||||
type: 'edit',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div class="dic-table-select-box w-100%">
|
||||
{{ JSON.stringify(props) }}
|
||||
<div
|
||||
class="table-input pos-relative"
|
||||
:class="[{ disabled }, type, size]"
|
||||
@@ -273,9 +274,9 @@ const getCurrTableSelect = (type?) => {
|
||||
const dicObj = {}
|
||||
const textList: string[] = []
|
||||
const ids = tableRef.value.tableSelect.map((item) => {
|
||||
if (item[props.column.dictText]) {
|
||||
dicObj[item[dicCode.value]] = item[props.column.dictText]
|
||||
textList.push(item[props.column.dictText])
|
||||
if (item[props.column.dictCode]) {
|
||||
dicObj[item[dicCode.value]] = item[props.column.dictCode]
|
||||
textList.push(item[props.column.dictCode])
|
||||
}
|
||||
return item[dicCode.value]
|
||||
})
|
||||
|
||||
@@ -7,6 +7,7 @@ import { encryptAES, decryptAES } from '@/components/LowDesign/src/utils/aes'
|
||||
import { useUserStoreWithOut } from '@/store/modules/user'
|
||||
import { useI18n } from '@/hooks/web/useI18n';
|
||||
import router from '@/router/index'
|
||||
import {exportExcelDataCustom} from '@/api/design/table'
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
@@ -18,6 +19,7 @@ export default {
|
||||
* @param options 请求配置 如:{ params:{ text:'测试' } }
|
||||
*/
|
||||
requestApi: (Method, url, options) => callApiFun(Method, url, options),
|
||||
exportExcelCustom: (tableId, data) => exportExcelDataCustom(tableId, data),
|
||||
cloneDeep, //深拷贝
|
||||
listToTree,//列表转树结构
|
||||
formatDate,//时间格式化
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<el-input v-model="formData.processInstanceKey" disabled placeholder="请输入流程标识" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规则类型" prop="type">
|
||||
<el-select v-model="formData.type" clearable style="width: 100%">
|
||||
<el-select v-model="formData.type" clearable style="width: 100%" disabled>
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.BPM_TASK_ASSIGN_RULE_TYPE)"
|
||||
:key="dict.value"
|
||||
@@ -165,7 +165,7 @@ const open = async (row) => {
|
||||
resetForm()
|
||||
// 2. 再设置表单
|
||||
if (row != null) {
|
||||
formData.value.type = undefined as unknown as number
|
||||
formData.value.type = 30
|
||||
formData.value.taskName = row.name
|
||||
formData.value.taskId = row.id
|
||||
formData.value.processInstanceName = row.processInstance.name
|
||||
|
||||
@@ -173,6 +173,8 @@ const handleAudit = async (task, pass) => {
|
||||
getDetail()
|
||||
}
|
||||
|
||||
|
||||
|
||||
const printPage = async () => {
|
||||
|
||||
const { href } = router.resolve({ name: 'BpmProcessInstanceInfo',
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
@current-change="currentChange"
|
||||
>
|
||||
<template #category="{ row }">
|
||||
<dict-tag :type="DICT_TYPE.BPM_MODEL_CATEGORY" :value="row.category || ''" />
|
||||
<dict-tag :type="DICT_TYPE.BPM_MODEL_CATEGORY" :value="row.category || ''"/>
|
||||
</template>
|
||||
<template #status="scope">
|
||||
<dict-tag
|
||||
@@ -39,7 +39,8 @@
|
||||
</template>
|
||||
<template #menu-left>
|
||||
<el-button type="primary" v-hasPermi="['bpm:process-instance:query']" @click="handleCreate">
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 发起流程
|
||||
<Icon icon="ep:plus" class="mr-5px"/>
|
||||
发起流程
|
||||
</el-button>
|
||||
</template>
|
||||
<!-- 自定义操作栏 -->
|
||||
@@ -52,7 +53,7 @@
|
||||
>
|
||||
详情
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
v-if="row.result === 1"
|
||||
@@ -60,21 +61,21 @@
|
||||
@click="handleCancel(row)"
|
||||
>
|
||||
取消
|
||||
</el-button> -->
|
||||
</el-button>
|
||||
</template>
|
||||
</avue-crud>
|
||||
</ContentWrap>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||
import { dateFormatter, getSearchDate } from '@/utils/formatTime'
|
||||
import {DICT_TYPE, getIntDictOptions} from '@/utils/dict'
|
||||
import {dateFormatter, getSearchDate} from '@/utils/formatTime'
|
||||
import * as ProcessInstanceApi from '@/api/bpm/processInstance'
|
||||
|
||||
defineOptions({ name: 'BpmCCProcessInstance' })
|
||||
defineOptions({name: 'BpmCCProcessInstance'})
|
||||
const router = useRouter() // 路由
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
const { getCurrPermi } = useCrudPermi()
|
||||
const {t} = useI18n() // 国际化
|
||||
const {getCurrPermi} = useCrudPermi()
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const tableOption = reactive({
|
||||
@@ -104,7 +105,7 @@ const tableOption = reactive({
|
||||
type: 'select',
|
||||
span: 12,
|
||||
dicData: getIntDictOptions(DICT_TYPE.BPM_MODEL_CATEGORY),
|
||||
rules: [{ required: true, message: '流程分类不能为空', trigger: 'blur' }]
|
||||
rules: [{required: true, message: '流程分类不能为空', trigger: 'blur'}]
|
||||
},
|
||||
tasks: {
|
||||
label: '当前审批任务'
|
||||
@@ -115,7 +116,7 @@ const tableOption = reactive({
|
||||
type: 'select',
|
||||
span: 12,
|
||||
dicData: getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS),
|
||||
rules: [{ required: true, message: '状态不能为空', trigger: 'blur' }]
|
||||
rules: [{required: true, message: '状态不能为空', trigger: 'blur'}]
|
||||
},
|
||||
result: {
|
||||
label: '结果',
|
||||
@@ -123,7 +124,7 @@ const tableOption = reactive({
|
||||
type: 'select',
|
||||
span: 12,
|
||||
dicData: getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT),
|
||||
rules: [{ required: true, message: '结果不能为空', trigger: 'blur' }]
|
||||
rules: [{required: true, message: '结果不能为空', trigger: 'blur'}]
|
||||
},
|
||||
createTime: {
|
||||
label: '提交时间',
|
||||
@@ -203,7 +204,8 @@ const searchChange = (params, done) => {
|
||||
|
||||
/** 清空按钮操作 */
|
||||
const resetChange = () => {
|
||||
searchChange({}, () => {})
|
||||
searchChange({}, () => {
|
||||
})
|
||||
}
|
||||
|
||||
const sizeChange = (pageSize) => {
|
||||
@@ -218,7 +220,7 @@ const currentChange = (currentPage) => {
|
||||
/** 取消按钮操作 */
|
||||
const handleCancel = async (row) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: t('common.ok'),
|
||||
cancelButtonText: t('common.cancel'),
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
|
||||
175
src/views/bpm/task/copy/index.vue
Normal file
175
src/views/bpm/task/copy/index.vue
Normal file
@@ -0,0 +1,175 @@
|
||||
<!-- 工作流,抄送我的流程 -->
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<avue-crud
|
||||
ref="crudRef"
|
||||
v-model="tableForm"
|
||||
v-model:page="tablePage"
|
||||
v-model:search="tableSearch"
|
||||
:data="tableData"
|
||||
:option="tableOption"
|
||||
:permission="permission"
|
||||
@search-change="searchChange"
|
||||
@search-reset="resetChange"
|
||||
@refresh-change="getTableData"
|
||||
@size-change="sizeChange"
|
||||
@current-change="currentChange"
|
||||
>
|
||||
<template #menu="{ row }">
|
||||
<el-button link type="primary" @click="handleAudit(row)">流程</el-button>
|
||||
</template>
|
||||
</avue-crud>
|
||||
</ContentWrap>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import {dateFormatter} from '@/utils/formatTime'
|
||||
import * as ProcessInstanceApi from '@/api/bpm/processInstance'
|
||||
|
||||
defineOptions({
|
||||
name: 'BpmCopyTask'
|
||||
})
|
||||
|
||||
// 路由
|
||||
const {push} = useRouter()
|
||||
// 列表的加载中
|
||||
const loading = ref(true)
|
||||
|
||||
const {getCurrPermi} = useCrudPermi()
|
||||
|
||||
// 表格的配置
|
||||
const tableOption = reactive({
|
||||
addBtn: false,
|
||||
editBtn: false,
|
||||
delBtn: false,
|
||||
viewBtn: true,
|
||||
viewBtnText: '详情',
|
||||
viewBtnIcon: 'none',
|
||||
align: 'center',
|
||||
headerAlign: 'center',
|
||||
searchMenuSpan: 6,
|
||||
searchMenuPosition: 'left',
|
||||
labelSuffix: ' ',
|
||||
span: 24,
|
||||
dialogWidth: '50%',
|
||||
column: {
|
||||
taskId: {
|
||||
label: '任务编号'
|
||||
},
|
||||
taskName: {
|
||||
label: '任务名称'
|
||||
},
|
||||
processInstanceId: {
|
||||
label: '流程编号',
|
||||
search: true,
|
||||
},
|
||||
processInstanceName: {
|
||||
label: '所属流程',
|
||||
search: true,
|
||||
},
|
||||
startUserNickname: {
|
||||
label: '流程发起人',
|
||||
},
|
||||
reason: {
|
||||
label: '抄送原因'
|
||||
},
|
||||
creatorNickname: {
|
||||
label: '抄送人'
|
||||
},
|
||||
createTime: {
|
||||
label: '抄送时间',
|
||||
type: 'datetime',
|
||||
width: 180,
|
||||
formatter: (row: any, value: any, rowv: any, column: any) => {
|
||||
return dateFormatter(row, column, value)
|
||||
}
|
||||
},
|
||||
searchCreateTime: {
|
||||
label: '抄送时间',
|
||||
display: false,
|
||||
hide: true,
|
||||
search: true,
|
||||
searchType: 'datetimerange',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
searchRange: true,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const tableForm = ref<any>({})
|
||||
const tableData = ref([])
|
||||
const tableSearch = ref<any>({})
|
||||
const tablePage = ref({
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
})
|
||||
|
||||
const permission = getCurrPermi(['bpm:task'])
|
||||
|
||||
const crudRef = ref()
|
||||
useCrudHeight(crudRef)
|
||||
|
||||
const getTableData = async () => {
|
||||
// 列表的加载中...
|
||||
loading.value = true
|
||||
// 拼接查询参数
|
||||
let searchObj = {
|
||||
...tableSearch.value,
|
||||
pageNo: tablePage.value.currentPage,
|
||||
pageSize: tablePage.value.pageSize
|
||||
}
|
||||
// 处理时间参数,如果为空则去掉这个属性
|
||||
if (!searchObj.createTime?.length) delete searchObj.createTime
|
||||
// 去掉空字符串属性
|
||||
for (let key in searchObj) if (searchObj[key] === '') delete searchObj[key]
|
||||
|
||||
// 请求我的待阅数据
|
||||
try {
|
||||
const data = await ProcessInstanceApi.getProcessInstanceCCPage(searchObj)
|
||||
tableData.value = data.list
|
||||
tablePage.value.total = data.total
|
||||
} finally {
|
||||
// 无论请求成功或者失败,这里都需要将加载中关闭
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const searchChange = (params: any, done: any) => {
|
||||
tablePage.value.currentPage = 1
|
||||
// 获取数据
|
||||
getTableData().finally(() => done())
|
||||
}
|
||||
|
||||
const resetChange = () => {
|
||||
searchChange({}, () => {
|
||||
})
|
||||
}
|
||||
|
||||
const sizeChange = (pageSize) => {
|
||||
tablePage.value.pageSize = pageSize
|
||||
resetChange()
|
||||
}
|
||||
|
||||
const currentChange = (currentPage) => {
|
||||
tablePage.value.currentPage = currentPage
|
||||
getTableData()
|
||||
}
|
||||
|
||||
const handleAudit = (row: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
query: {
|
||||
id: row.processInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(async () => {
|
||||
await getTableData()
|
||||
})
|
||||
|
||||
</script>
|
||||
@@ -26,7 +26,7 @@
|
||||
</template>
|
||||
<template #menu="{ row }">
|
||||
<el-button link type="primary" @click="handleAudit(row)">审批</el-button>
|
||||
<!-- <el-button link type="primary" @click="handleCC(row)">抄送</el-button>-->
|
||||
<el-button link type="primary" @click="handleCC(row)">抄送</el-button>
|
||||
</template>
|
||||
</avue-crud>
|
||||
<TaskCCDialogForm ref="taskCCDialogForm" />
|
||||
|
||||
@@ -61,6 +61,13 @@ const tabsPaneList = ref([
|
||||
calcHeight: 200,
|
||||
fixedSearch: {file_main_type: 4}
|
||||
},
|
||||
{
|
||||
label: '工作档案',
|
||||
name: 'workArchive',
|
||||
formId: '1966386366515343361',
|
||||
calcHeight: 200,
|
||||
fixedSearch: {file_main_type: 5}
|
||||
},
|
||||
])
|
||||
|
||||
// 定义点击tab的事件动作
|
||||
|
||||
Reference in New Issue
Block a user