18 changed files with 1503 additions and 110 deletions
@ -0,0 +1,124 @@ |
|||||
|
<template> |
||||
|
<!-- 自定义表单 --> |
||||
|
<el-divider content-position="left">项目入库详情</el-divider> |
||||
|
<BasicForm @register="registerProjectForm" /> |
||||
|
<el-divider content-position="left">项目审批详情</el-divider> |
||||
|
<BasicTable @register="registerTable"/> |
||||
|
<div> |
||||
|
<el-divider content-position="left">项目审批</el-divider> |
||||
|
<BasicForm @register="registerApprovalForm" @submit="handleSubmit"/> |
||||
|
</div> |
||||
|
|
||||
|
</template> |
||||
|
<script lang="ts" name="complectedDetail" setup> |
||||
|
import { defineProps,watchEffect} from 'vue' |
||||
|
import { useForm, BasicForm } from '/@/components/Form'; |
||||
|
import { formSchemas,ProcessColumns} from '../../projectLib/projectInfo/projectInfo.data'; |
||||
|
import {queryProjectInfoById,queryProcessInfo} from '../../projectLib/projectInfo/projectInfo.api' |
||||
|
import {BasicTable } from '/@/components/Table'; |
||||
|
import { useListPage } from '/@/hooks/system/useListPage'; |
||||
|
import {approvalformSchemas} from '../inComplete/inComplete.data' |
||||
|
|
||||
|
import {submitTask} from '../inComplete/inComplete.api'; |
||||
|
let proid = defineProps(["dataTo","taskid"]) |
||||
|
const emit = defineEmits(['close']); |
||||
|
|
||||
|
watchEffect(async ()=>{ |
||||
|
console.log("dataTo",proid.dataTo) |
||||
|
let param:any = { |
||||
|
projectid:proid.dataTo |
||||
|
} |
||||
|
let res =await queryProjectInfoById(param) |
||||
|
console.log("结果是",res) |
||||
|
setFieldsValue(res) |
||||
|
reload() |
||||
|
}) |
||||
|
|
||||
|
/** |
||||
|
* BasicForm绑定注册; |
||||
|
* useForm 是整个框架的核心用于表单渲染,里边封装了很多公共方法; |
||||
|
* 支持(schemas: 渲染表单列,autoSubmitOnEnter:回车提交,submitButtonOptions:自定义按钮文本和图标等方法); |
||||
|
* 平台通过此封装,简化了代码,支持自定义扩展; |
||||
|
*/ |
||||
|
const [registerProjectForm,{setFieldsValue}] = useForm({ |
||||
|
//注册表单列 |
||||
|
schemas: formSchemas, |
||||
|
showActionButtonGroup: false, |
||||
|
//回车提交 |
||||
|
// autoSubmitOnEnter: true, |
||||
|
// //不显示重置按钮 |
||||
|
// showResetButton: false, |
||||
|
//自定义提交按钮文本和图标 |
||||
|
// submitButtonOptions: { text: '提交', preIcon: '' }, |
||||
|
//查询列占比 24代表一行 取值范围 0-24 |
||||
|
// actionColOptions: { span: 17 }, |
||||
|
labelCol: { style: { width: '120px' } }, |
||||
|
wrapperCol:{ style: { width: 'auto' } }, |
||||
|
disabled:true |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
|
||||
|
const { tableContext } = useListPage({ |
||||
|
tableProps: { |
||||
|
size:'small',//紧凑型表格 |
||||
|
title: '流程审批情况', |
||||
|
api:queryProcessInfo, |
||||
|
columns: ProcessColumns, |
||||
|
showActionColumn:false, |
||||
|
useSearchForm:false, |
||||
|
beforeFetch(params) { |
||||
|
params.status = "1", |
||||
|
params.projectid=proid.dataTo |
||||
|
}, |
||||
|
}, |
||||
|
}); |
||||
|
// BasicTable绑定注册 |
||||
|
const [registerTable,{reload}] = tableContext; |
||||
|
|
||||
|
const[registerApprovalForm,{validate,getFieldsValue}] = useForm({ |
||||
|
//注册表单列 |
||||
|
schemas: approvalformSchemas, |
||||
|
//自定义查询按钮的文本和图标 |
||||
|
// submitButtonOptions: { text: '提交', preIcon: '' }, |
||||
|
//自定义重置按钮的文本和图标 |
||||
|
resetButtonOptions: { text: '取消', preIcon: '' }, |
||||
|
// showActionButtonGroup: false, |
||||
|
//回车提交 |
||||
|
// autoSubmitOnEnter: true, |
||||
|
// //不显示重置按钮 |
||||
|
// showResetButton: false, |
||||
|
//自定义提交按钮文本和图标 |
||||
|
submitButtonOptions: { text: '提交', preIcon: '' }, |
||||
|
//查询列占比 24代表一行 取值范围 0-24 |
||||
|
actionColOptions: { span: 14 }, |
||||
|
//提交按钮的自定义事件 |
||||
|
// submitFunc: customSubmitFunc, |
||||
|
//重置按钮的自定义时间 |
||||
|
resetFunc: customResetFunc, |
||||
|
labelCol: { style: { width: '120px' } }, |
||||
|
wrapperCol:{ style: { width: 'auto' } }, |
||||
|
// disabled:true |
||||
|
}) |
||||
|
async function handleSubmit(){ |
||||
|
let approvalform = await getFieldsValue(); |
||||
|
let param = { |
||||
|
flag:approvalform.flag, |
||||
|
projectid:proid.dataTo, |
||||
|
comment:approvalform.comment, |
||||
|
taskId:proid.taskid |
||||
|
} |
||||
|
console.log("aaaaaaaaaaa",proid) |
||||
|
console.log("param",param,"approvalform",approvalform) |
||||
|
if(await validate()){ |
||||
|
|
||||
|
let res = await submitTask(param) |
||||
|
console.log("提交成功!",res) |
||||
|
await emit("close"); |
||||
|
} |
||||
|
} |
||||
|
async function customResetFunc(){ |
||||
|
emit("close"); |
||||
|
} |
||||
|
</script> |
||||
|
<style></style> |
@ -0,0 +1,75 @@ |
|||||
|
import { FormSchema } from '/@/components/Form'; |
||||
|
import { BasicColumn } from '/@/components/Table'; |
||||
|
|
||||
|
export const columns: BasicColumn[] = [ |
||||
|
|
||||
|
|
||||
|
|
||||
|
{ |
||||
|
title: '流程名称', |
||||
|
dataIndex: 'processName', |
||||
|
width: 150, |
||||
|
}, |
||||
|
{ |
||||
|
title: '项目id', |
||||
|
dataIndex: 'projectid', |
||||
|
width: 100, |
||||
|
}, |
||||
|
{ |
||||
|
title: '项目名称', |
||||
|
dataIndex: 'projectName', |
||||
|
width: 100, |
||||
|
}, |
||||
|
{ |
||||
|
title: '当前节点', |
||||
|
dataIndex: 'currentTaskName', |
||||
|
width: 100, |
||||
|
}, |
||||
|
{ |
||||
|
title: '流程状态', |
||||
|
dataIndex: 'processStatus', |
||||
|
width: 100, |
||||
|
}, |
||||
|
{ |
||||
|
title: '创建时间', |
||||
|
dataIndex: 'createTime', |
||||
|
width: 100, |
||||
|
}, |
||||
|
// {
|
||||
|
// title: '发起单位',
|
||||
|
// dataIndex: 'workplace',
|
||||
|
// width: 100,
|
||||
|
// },
|
||||
|
// {
|
||||
|
// title: '发起单位类型',
|
||||
|
// dataIndex: 'workplaceTpye',
|
||||
|
// width: 200,
|
||||
|
// },
|
||||
|
// {
|
||||
|
// title: '联系电话',
|
||||
|
// width: 150,
|
||||
|
// dataIndex: 'phone',
|
||||
|
// },
|
||||
|
]; |
||||
|
|
||||
|
export const searchFormSchema: FormSchema[] = [ |
||||
|
{ |
||||
|
label: '项目名称', |
||||
|
field: 'projectName', |
||||
|
component: 'Input', |
||||
|
//colProps: { span: 6 },
|
||||
|
}, |
||||
|
{ |
||||
|
label: '项目编号', |
||||
|
field: 'projectId', |
||||
|
component: 'Input', |
||||
|
//colProps: { span: 6 },
|
||||
|
}, |
||||
|
{ |
||||
|
label: '流程id', |
||||
|
field: 'projectId', |
||||
|
component: 'Input', |
||||
|
//colProps: { span: 6 },
|
||||
|
} |
||||
|
|
||||
|
]; |
@ -0,0 +1,91 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<!--引用表格--> |
||||
|
<BasicTable @register="registerTable"> |
||||
|
<!--插槽:table标题--> |
||||
|
<!--操作栏--> |
||||
|
<template #action="{ record }"> |
||||
|
<!-- <TableAction :actions="getTableAction(record)" /> --> |
||||
|
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" /> |
||||
|
|
||||
|
</template> |
||||
|
</BasicTable> |
||||
|
<BasicModal @register="registerModal" title="已办流程信息详情" width="1200px" :showOkBtn="false"> |
||||
|
<complectedDetail :dataTo="proid" :taskid="taskid" @close="closeModals()"/> |
||||
|
</BasicModal> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" name="system-user" setup> |
||||
|
//ts语法 |
||||
|
import { ref} from 'vue'; |
||||
|
import { ActionItem,BasicTable,TableAction } from '/@/components/Table'; |
||||
|
import { useListPage } from '/@/hooks/system/useListPage'; |
||||
|
import { columns, searchFormSchema } from './complete.data'; |
||||
|
// import { list } from './address.api'; |
||||
|
import {myCompleteTask} from '../inComplete/inComplete.api'; |
||||
|
|
||||
|
import { useModal } from '/@/components/Modal'; |
||||
|
import { BasicModal } from '/@/components/Modal'; |
||||
|
|
||||
|
import complectedDetail from './complectedDetail.vue'; |
||||
|
|
||||
|
const [registerModal, { openModal,closeModal }] = useModal(); |
||||
|
|
||||
|
|
||||
|
let proid = ref(); |
||||
|
let taskid = ref() |
||||
|
const { tableContext } = useListPage({ |
||||
|
designScope: 'basic-table-demo-ajax', |
||||
|
tableProps: { |
||||
|
title: '我的已办', |
||||
|
api: myCompleteTask, |
||||
|
columns: columns, |
||||
|
actionColumn: { |
||||
|
width: 120, |
||||
|
}, |
||||
|
//表单查询项设置 |
||||
|
formConfig: { |
||||
|
schemas: searchFormSchema, |
||||
|
} |
||||
|
}, |
||||
|
}); |
||||
|
//BasicTable绑定注册 |
||||
|
const [registerTable,{reload}] = tableContext; |
||||
|
function getTableAction(record): ActionItem[] { |
||||
|
return [ |
||||
|
{ |
||||
|
label: '处理', |
||||
|
onClick: handleEdit.bind(null, record), |
||||
|
}, |
||||
|
|
||||
|
]; |
||||
|
} |
||||
|
/** |
||||
|
* 下拉操作栏 |
||||
|
*/ |
||||
|
function getDropDownAction(record): ActionItem[] { |
||||
|
return [ |
||||
|
{ |
||||
|
label: '发起计划流程', |
||||
|
ifShow:true, |
||||
|
onClick: handleEdit.bind(null, record), |
||||
|
}, |
||||
|
|
||||
|
]; |
||||
|
} |
||||
|
function handleEdit(record) { |
||||
|
console.log("打开子页面",record); |
||||
|
openModal(); |
||||
|
proid.value =record.projectid |
||||
|
// console.log(selectedRows.value); |
||||
|
// console.log(selectedRowKeys.value); |
||||
|
} |
||||
|
function closeModals(){ |
||||
|
closeModal() |
||||
|
reload() |
||||
|
|
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped></style> |
@ -0,0 +1,127 @@ |
|||||
|
<template> |
||||
|
<!-- 自定义表单 --> |
||||
|
<el-divider content-position="left">项目入库详情</el-divider> |
||||
|
<BasicForm @register="registerProjectForm" /> |
||||
|
<el-divider content-position="left">项目审批详情</el-divider> |
||||
|
<BasicTable @register="registerTable"/> |
||||
|
<el-divider content-position="left">项目审批</el-divider> |
||||
|
<div> |
||||
|
<BasicForm @register="registerApprovalForm" @submit="handleSubmit"/> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
</template> |
||||
|
<script lang="ts" name="inComplectedDetail" setup> |
||||
|
import { defineProps,watchEffect} from 'vue' |
||||
|
import { useForm, BasicForm } from '/@/components/Form'; |
||||
|
import { formSchemas,ProcessColumns,} from '../../projectLib/projectInfo/projectInfo.data'; |
||||
|
import {approvalformSchemas} from './inComplete.data' |
||||
|
import {queryProjectInfoById,queryProcessInfo} from '../../projectLib/projectInfo/projectInfo.api' |
||||
|
import {BasicTable } from '/@/components/Table'; |
||||
|
import { useListPage } from '/@/hooks/system/useListPage'; |
||||
|
import {submitTask} from './inComplete.api'; |
||||
|
|
||||
|
|
||||
|
let proid = defineProps(["dataTo","taskid"]) |
||||
|
const emit = defineEmits(['close']); |
||||
|
watchEffect(async ()=>{ |
||||
|
console.log("dataTo",proid.dataTo) |
||||
|
let param:any = { |
||||
|
projectid:proid.dataTo |
||||
|
} |
||||
|
let res =await queryProjectInfoById(param) |
||||
|
console.log("结果是",res) |
||||
|
setFieldsValue(res) |
||||
|
reload() |
||||
|
}) |
||||
|
|
||||
|
/** |
||||
|
* BasicForm绑定注册; |
||||
|
* useForm 是整个框架的核心用于表单渲染,里边封装了很多公共方法; |
||||
|
* 支持(schemas: 渲染表单列,autoSubmitOnEnter:回车提交,submitButtonOptions:自定义按钮文本和图标等方法); |
||||
|
* 平台通过此封装,简化了代码,支持自定义扩展; |
||||
|
*/ |
||||
|
const [registerProjectForm,{setFieldsValue}] = useForm({ |
||||
|
//注册表单列 |
||||
|
schemas: formSchemas, |
||||
|
showActionButtonGroup: false, |
||||
|
//回车提交 |
||||
|
// autoSubmitOnEnter: true, |
||||
|
// //不显示重置按钮 |
||||
|
// showResetButton: false, |
||||
|
//自定义提交按钮文本和图标 |
||||
|
// submitButtonOptions: { text: '提交', preIcon: '' }, |
||||
|
//查询列占比 24代表一行 取值范围 0-24 |
||||
|
// actionColOptions: { span: 17 }, |
||||
|
labelCol: { style: { width: '120px' } }, |
||||
|
wrapperCol:{ style: { width: 'auto' } }, |
||||
|
disabled:true |
||||
|
}); |
||||
|
const[registerApprovalForm,{validate,getFieldsValue}] = useForm({ |
||||
|
//注册表单列 |
||||
|
schemas: approvalformSchemas, |
||||
|
//自定义查询按钮的文本和图标 |
||||
|
// submitButtonOptions: { text: '提交', preIcon: '' }, |
||||
|
//自定义重置按钮的文本和图标 |
||||
|
resetButtonOptions: { text: '取消', preIcon: '' }, |
||||
|
// showActionButtonGroup: false, |
||||
|
//回车提交 |
||||
|
// autoSubmitOnEnter: true, |
||||
|
// //不显示重置按钮 |
||||
|
// showResetButton: false, |
||||
|
//自定义提交按钮文本和图标 |
||||
|
submitButtonOptions: { text: '提交', preIcon: '' }, |
||||
|
//查询列占比 24代表一行 取值范围 0-24 |
||||
|
actionColOptions: { span: 14 }, |
||||
|
//提交按钮的自定义事件 |
||||
|
// submitFunc: customSubmitFunc, |
||||
|
//重置按钮的自定义时间 |
||||
|
resetFunc: customResetFunc, |
||||
|
labelCol: { style: { width: '120px' } }, |
||||
|
wrapperCol:{ style: { width: 'auto' } }, |
||||
|
// disabled:true |
||||
|
}) |
||||
|
|
||||
|
|
||||
|
const { tableContext } = useListPage({ |
||||
|
tableProps: { |
||||
|
size:'small',//紧凑型表格 |
||||
|
title: '流程审批情况', |
||||
|
api:queryProcessInfo, |
||||
|
columns: ProcessColumns, |
||||
|
showActionColumn:false, |
||||
|
useSearchForm:false, |
||||
|
beforeFetch(params) { |
||||
|
params.status = "1", |
||||
|
params.projectid=proid.dataTo |
||||
|
}, |
||||
|
}, |
||||
|
}); |
||||
|
// BasicTable绑定注册 |
||||
|
const [registerTable,{reload}] = tableContext; |
||||
|
async function handleSubmit(){ |
||||
|
let approvalform = await getFieldsValue(); |
||||
|
let param = { |
||||
|
flag:approvalform.flag, |
||||
|
projectid:proid.dataTo, |
||||
|
comment:approvalform.comment, |
||||
|
taskId:proid.taskid |
||||
|
} |
||||
|
console.log("aaaaaaaaaaa",proid) |
||||
|
console.log("param",param,"approvalform",approvalform) |
||||
|
if(await validate()){ |
||||
|
|
||||
|
let res = await submitTask(param) |
||||
|
console.log("提交成功!",res) |
||||
|
await emit("close"); |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
async function customResetFunc(){ |
||||
|
emit("close"); |
||||
|
} |
||||
|
</script> |
||||
|
<style></style> |
||||
|
../datamodule/inComplected.data |
@ -0,0 +1,14 @@ |
|||||
|
import { defHttp } from '/@/utils/http/axios'; |
||||
|
|
||||
|
export enum Api { |
||||
|
saveprojectInfo="", |
||||
|
myTaskList='/workflow/myTaskList', |
||||
|
submitTask="/huzhouProject/approveProjectInfo", |
||||
|
myCompleteTask='/workflow/myCompleteTask' |
||||
|
} |
||||
|
/** |
||||
|
* 提交入库申请流程 |
||||
|
*/ |
||||
|
export const myTaskList = (params) => defHttp.get({ url: Api.myTaskList, params }) |
||||
|
export const submitTask = (params) => defHttp.post({ url: Api.submitTask, params }) |
||||
|
export const myCompleteTask = (params) => defHttp.get({ url: Api.myCompleteTask, params }) |
@ -0,0 +1,182 @@ |
|||||
|
import { FormSchema } from '/@/components/Form'; |
||||
|
import { BasicColumn } from '/@/components/Table'; |
||||
|
import { getDictItemsByCode } from '/@/utils/dict/index'; |
||||
|
import { useUserStore } from '/@/store/modules/user'; |
||||
|
|
||||
|
const userStore = useUserStore(); |
||||
|
const projectTypeDicts: Array<Object> = getDictItemsByCode("projectType") |
||||
|
function projectTypeDict() { |
||||
|
for (let i = 0; i < projectTypeDicts.length; i++) { |
||||
|
projectTypeDicts[i].label = projectTypeDicts[i].text; |
||||
|
} |
||||
|
return projectTypeDicts |
||||
|
} |
||||
|
const approvalRsesults:Array<Object> = getDictItemsByCode("approvalResult") |
||||
|
|
||||
|
function approvalRsesult(){ |
||||
|
for(let i = 0;i<approvalRsesults.length;i++){ |
||||
|
approvalRsesults[i].label=approvalRsesults[i].text; |
||||
|
} |
||||
|
return approvalRsesults |
||||
|
} |
||||
|
export const columns1: BasicColumn[] = [ |
||||
|
|
||||
|
{ |
||||
|
title: '项目编号', |
||||
|
width: 150, |
||||
|
dataIndex: 'id', |
||||
|
}, |
||||
|
{ |
||||
|
title: '项目名称', |
||||
|
dataIndex: 'projectName', |
||||
|
width: 150, |
||||
|
}, |
||||
|
{ |
||||
|
title: '主要任务及标志性成果', |
||||
|
dataIndex: 'description', |
||||
|
width: 150, |
||||
|
}, |
||||
|
{ |
||||
|
title: '责任单位', |
||||
|
dataIndex: 'dutyWorkplace', |
||||
|
width: 100, |
||||
|
}, |
||||
|
{ |
||||
|
title: '发起单位', |
||||
|
dataIndex: 'workplace', |
||||
|
width: 100, |
||||
|
}, |
||||
|
{ |
||||
|
title: '发起单位类型', |
||||
|
dataIndex: 'workplaceTpye', |
||||
|
width: 200, |
||||
|
}, |
||||
|
{ |
||||
|
title: '联系电话', |
||||
|
width: 150, |
||||
|
dataIndex: 'phone', |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
export const columns: BasicColumn[] = [ |
||||
|
|
||||
|
{ |
||||
|
title: '节点名称', |
||||
|
width: 150, |
||||
|
dataIndex: 'taskName', |
||||
|
}, |
||||
|
{ |
||||
|
title: '节点id', |
||||
|
dataIndex: 'taskId', |
||||
|
width: 150, |
||||
|
}, |
||||
|
{ |
||||
|
title: '项目名称', |
||||
|
dataIndex: 'projectName', |
||||
|
width: 150, |
||||
|
}, |
||||
|
{ |
||||
|
title: '项目编号', |
||||
|
dataIndex: 'projectid', |
||||
|
width: 100, |
||||
|
}, |
||||
|
{ |
||||
|
title: '创建时间', |
||||
|
dataIndex: 'createTime', |
||||
|
width: 100, |
||||
|
}, |
||||
|
// {
|
||||
|
// title: '发起单位类型',
|
||||
|
// dataIndex: 'workplaceTpye',
|
||||
|
// width: 200,
|
||||
|
// },
|
||||
|
// {
|
||||
|
// title: '联系电话',
|
||||
|
// width: 150,
|
||||
|
// dataIndex: 'phone',
|
||||
|
// },
|
||||
|
]; |
||||
|
|
||||
|
export const searchFormSchema: FormSchema[] = [ |
||||
|
{ |
||||
|
label: '项目名称', |
||||
|
field: 'projectName', |
||||
|
component: 'Input', |
||||
|
//colProps: { span: 6 },
|
||||
|
}, |
||||
|
{ |
||||
|
label: '项目编号', |
||||
|
field: 'projectId', |
||||
|
component: 'Input', |
||||
|
//colProps: { span: 6 },
|
||||
|
}, |
||||
|
{ |
||||
|
label: '流程id', |
||||
|
field: 'projectId', |
||||
|
component: 'Input', |
||||
|
//colProps: { span: 6 },
|
||||
|
} |
||||
|
|
||||
|
]; |
||||
|
export const approvalformSchemas: FormSchema[] = [ |
||||
|
{ |
||||
|
label: '审批人', |
||||
|
field: 'user', |
||||
|
component: 'Select', |
||||
|
required: true, |
||||
|
dynamicDisabled: true, |
||||
|
componentProps: { |
||||
|
options: [ |
||||
|
{ value: userStore.getUserInfo.id, label: userStore.getUserInfo.username } |
||||
|
], |
||||
|
}, |
||||
|
defaultValue: userStore.getUserInfo.id, |
||||
|
colProps: { span: 12 }, |
||||
|
|
||||
|
}, |
||||
|
{ |
||||
|
label: '审批结果', |
||||
|
field: 'flag', |
||||
|
component: 'Select', |
||||
|
required: true, |
||||
|
componentProps: { |
||||
|
options: approvalRsesult() |
||||
|
}, |
||||
|
colProps: { span: 12 }, |
||||
|
}, |
||||
|
{ |
||||
|
label: '审批意见', |
||||
|
field: 'comment', |
||||
|
component: 'InputTextArea', |
||||
|
required: true, |
||||
|
colProps: { span: 24 }, |
||||
|
}, |
||||
|
|
||||
|
]; |
||||
|
export const ProcessColumns: BasicColumn[] = [ |
||||
|
|
||||
|
{ |
||||
|
title: '节点名称', |
||||
|
dataIndex: 'taskName', |
||||
|
}, |
||||
|
{ |
||||
|
title: '处理人', |
||||
|
dataIndex: 'operator', |
||||
|
width: 150, |
||||
|
}, |
||||
|
{ |
||||
|
title: '处理时间', |
||||
|
dataIndex: 'operateDate', |
||||
|
width: 150, |
||||
|
}, |
||||
|
{ |
||||
|
title: '审批状态', |
||||
|
dataIndex: 'approvalStatue', |
||||
|
width: 100, |
||||
|
}, |
||||
|
{ |
||||
|
title: '审批意见', |
||||
|
dataIndex: 'workplace', |
||||
|
width: 100, |
||||
|
} |
||||
|
]; |
@ -0,0 +1,92 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<!--引用表格--> |
||||
|
<BasicTable @register="registerTable"> |
||||
|
<!--插槽:table标题--> |
||||
|
<!--操作栏--> |
||||
|
<template #action="{ record }"> |
||||
|
<!-- <TableAction :actions="getTableAction(record)" /> --> |
||||
|
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" /> |
||||
|
|
||||
|
</template> |
||||
|
</BasicTable> |
||||
|
<BasicModal @register="registerModalDetail" title="代办流程信息详情" width="1200px" :showOkBtn="false" :showCancelBtn="false"> |
||||
|
<inComplectedDetail :dataTo="proid" :taskid="taskid" @close="closeModalDetail()"/> |
||||
|
</BasicModal> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" name="system-user" setup> |
||||
|
//ts语法 |
||||
|
import { ref, computed, unref } from 'vue'; |
||||
|
import { ActionItem,BasicTable,TableAction } from '/@/components/Table'; |
||||
|
import { useListPage } from '/@/hooks/system/useListPage'; |
||||
|
import { columns, searchFormSchema } from './inComplete.data'; |
||||
|
// import { list } from './address.api'; |
||||
|
import {myTaskList} from './inComplete.api'; |
||||
|
|
||||
|
import inComplectedDetail from './inComplectedDetail.vue'; |
||||
|
|
||||
|
import { useModal } from '/@/components/Modal'; |
||||
|
import { BasicModal } from '/@/components/Modal'; |
||||
|
|
||||
|
let proid = ref() |
||||
|
let taskid = ref() |
||||
|
const [registerModalDetail, { openModal:openDetail, closeModal:closeDetail}] = useModal();//项目详情的 |
||||
|
|
||||
|
//表格组件数据 |
||||
|
const { tableContext } = useListPage({ |
||||
|
designScope: 'basic-table-demo-ajax', |
||||
|
tableProps: { |
||||
|
title: '我的代办', |
||||
|
api: myTaskList, |
||||
|
columns: columns, |
||||
|
actionColumn: { |
||||
|
width: 120, |
||||
|
}, |
||||
|
//表单查询项设置 |
||||
|
formConfig: { |
||||
|
schemas: searchFormSchema, |
||||
|
} |
||||
|
}, |
||||
|
}); |
||||
|
//BasicTable绑定注册 |
||||
|
const [registerTable,{reload}] = tableContext; |
||||
|
function getTableAction(record): ActionItem[] { |
||||
|
return [ |
||||
|
{ |
||||
|
label: '处理', |
||||
|
onClick: handleEdit.bind(null, record), |
||||
|
}, |
||||
|
|
||||
|
]; |
||||
|
} |
||||
|
/** |
||||
|
* 下拉操作栏 |
||||
|
*/ |
||||
|
function getDropDownAction(record): ActionItem[] { |
||||
|
return [ |
||||
|
{ |
||||
|
label: '上传项目资料', |
||||
|
ifShow:true, |
||||
|
onClick: handleEdit.bind(null, record), |
||||
|
}, |
||||
|
|
||||
|
]; |
||||
|
} |
||||
|
function handleEdit(record) { |
||||
|
console.log(record.description,record); |
||||
|
proid.value =record.projectid |
||||
|
taskid.value= record.taskId |
||||
|
openDetail() |
||||
|
// console.log(selectedRows.value); |
||||
|
// console.log(selectedRowKeys.value); |
||||
|
} |
||||
|
function closeModalDetail(){ |
||||
|
closeDetail() |
||||
|
reload() |
||||
|
|
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped></style> |
@ -0,0 +1,19 @@ |
|||||
|
import { defHttp } from '/@/utils/http/axios'; |
||||
|
|
||||
|
export enum Api { |
||||
|
saveprojectInfo="", |
||||
|
submitProjectInfo='/huzhouProject/submitProject' |
||||
|
|
||||
|
} |
||||
|
/** |
||||
|
* 提交入库申请流程 |
||||
|
*/ |
||||
|
export const submitProjectInfo = (params) => defHttp.post({ url: Api.submitProjectInfo, params }) |
||||
|
// /**
|
||||
|
// * 部门用户信息
|
||||
|
// */
|
||||
|
// export const list = (params?) => defHttp.get({ url: Api.list, params });
|
||||
|
// /**
|
||||
|
// * 职务list
|
||||
|
// */
|
||||
|
// export const positionList = (params?) => defHttp.get({ url: Api.positionList, params });
|
@ -1,19 +0,0 @@ |
|||||
import { defHttp } from '/@/utils/http/axios'; |
|
||||
|
|
||||
export enum Api { |
|
||||
list = '/sys/user/queryByOrgCodeForAddressList', |
|
||||
positionList = '/sys/position/list', |
|
||||
queryDepartTreeSync = '/sys/sysDepart/queryDepartTreeSync', |
|
||||
} |
|
||||
/** |
|
||||
* 获取部门树列表 |
|
||||
*/ |
|
||||
export const queryDepartTreeSync = (params?) => defHttp.get({ url: Api.queryDepartTreeSync, params }); |
|
||||
/** |
|
||||
* 部门用户信息 |
|
||||
*/ |
|
||||
export const list = (params?) => defHttp.get({ url: Api.list, params }); |
|
||||
/** |
|
||||
* 职务list |
|
||||
*/ |
|
||||
export const positionList = (params?) => defHttp.get({ url: Api.positionList, params }); |
|
@ -0,0 +1,189 @@ |
|||||
|
import { defHttp } from '/@/utils/http/axios'; |
||||
|
import { Modal } from 'ant-design-vue'; |
||||
|
|
||||
|
enum Api { |
||||
|
list = '/sys/role/list', |
||||
|
listByTenant = '/sys/role/listByTenant', |
||||
|
save = '/sys/role/add', |
||||
|
edit = '/sys/role/edit', |
||||
|
deleteRole = '/sys/role/delete', |
||||
|
deleteBatch = '/sys/role/deleteBatch', |
||||
|
exportXls = '/sys/role/exportXls', |
||||
|
importExcel = '/sys/role/importExcel', |
||||
|
isRoleExist = '/sys/role/checkRoleCode', |
||||
|
queryTreeListForRole = '/sys/role/queryTreeList', |
||||
|
queryRolePermission = '/sys/permission/queryRolePermission', |
||||
|
saveRolePermission = '/sys/permission/saveRolePermission', |
||||
|
queryDataRule = '/sys/role/datarule', |
||||
|
getParentDesignList = '/act/process/extActDesignFlowData/getDesFormFlows', |
||||
|
getRoleDegisnList = '/joa/designform/designFormCommuse/getRoleDegisnList', |
||||
|
saveRoleDesign = '/joa/designform/designFormCommuse/sysRoleDesignAdd', |
||||
|
userList = '/sys/user/userRoleList', |
||||
|
deleteUserRole = '/sys/user/deleteUserRole', |
||||
|
batchDeleteUserRole = '/sys/user/deleteUserRoleBatch', |
||||
|
addUserRole = '/sys/user/addSysUserRole', |
||||
|
saveRoleIndex = '/sys/sysRoleIndex/add', |
||||
|
editRoleIndex = '/sys/sysRoleIndex/edit', |
||||
|
queryIndexByCode = '/sys/sysRoleIndex/queryByCode', |
||||
|
} |
||||
|
/** |
||||
|
* 导出api |
||||
|
*/ |
||||
|
export const getExportUrl = Api.exportXls; |
||||
|
/** |
||||
|
* 导入api |
||||
|
*/ |
||||
|
export const getImportUrl = Api.importExcel; |
||||
|
/** |
||||
|
* 系统角色列表 |
||||
|
* @param params |
||||
|
*/ |
||||
|
export const list = (params) => defHttp.get({ url: Api.list, params }); |
||||
|
/** |
||||
|
* 租户角色列表 |
||||
|
* @param params |
||||
|
*/ |
||||
|
export const listByTenant = (params) => defHttp.get({ url: Api.listByTenant, params }); |
||||
|
|
||||
|
/** |
||||
|
* 删除角色 |
||||
|
*/ |
||||
|
export const deleteRole = (params, handleSuccess) => { |
||||
|
return defHttp.delete({ url: Api.deleteRole, params }, { joinParamsToUrl: true }).then(() => { |
||||
|
handleSuccess(); |
||||
|
}); |
||||
|
}; |
||||
|
/** |
||||
|
* 批量删除角色 |
||||
|
* @param params |
||||
|
*/ |
||||
|
export const batchDeleteRole = (params, handleSuccess) => { |
||||
|
Modal.confirm({ |
||||
|
title: '确认删除', |
||||
|
content: '是否删除选中数据', |
||||
|
okText: '确认', |
||||
|
cancelText: '取消', |
||||
|
onOk: () => { |
||||
|
return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => { |
||||
|
handleSuccess(); |
||||
|
}); |
||||
|
}, |
||||
|
}); |
||||
|
}; |
||||
|
/** |
||||
|
* 保存或者更新角色 |
||||
|
* @param params |
||||
|
*/ |
||||
|
export const saveOrUpdateRole = (params, isUpdate) => { |
||||
|
let url = isUpdate ? Api.edit : Api.save; |
||||
|
return defHttp.post({ url: url, params }); |
||||
|
}; |
||||
|
/** |
||||
|
* 编码校验 |
||||
|
* @param params |
||||
|
*/ |
||||
|
// update-begin--author:liaozhiyang---date:20231215---for:【QQYUN-7415】表单调用接口进行校验的添加防抖
|
||||
|
let timer; |
||||
|
export const isRoleExist = (params) => { |
||||
|
return new Promise((resolve, rejected) => { |
||||
|
clearTimeout(timer); |
||||
|
timer = setTimeout(() => { |
||||
|
defHttp |
||||
|
.get({ url: Api.isRoleExist, params }, { isTransformResponse: false }) |
||||
|
.then((res) => { |
||||
|
resolve(res); |
||||
|
}) |
||||
|
.catch((error) => { |
||||
|
rejected(error); |
||||
|
}); |
||||
|
}, 500); |
||||
|
}); |
||||
|
}; |
||||
|
// update-end--author:liaozhiyang---date:20231215---for:【QQYUN-7415】表单调用接口进行校验的添加防抖
|
||||
|
/** |
||||
|
* 根据角色查询树信息 |
||||
|
*/ |
||||
|
export const queryTreeListForRole = () => defHttp.get({ url: Api.queryTreeListForRole }); |
||||
|
/** |
||||
|
* 查询角色权限 |
||||
|
*/ |
||||
|
export const queryRolePermission = (params) => defHttp.get({ url: Api.queryRolePermission, params }); |
||||
|
/** |
||||
|
* 保存角色权限 |
||||
|
*/ |
||||
|
export const saveRolePermission = (params) => defHttp.post({ url: Api.saveRolePermission, params }); |
||||
|
/** |
||||
|
* 查询角色数据规则 |
||||
|
*/ |
||||
|
export const queryDataRule = (params) => |
||||
|
defHttp.get({ url: `${Api.queryDataRule}/${params.functionId}/${params.roleId}` }, { isTransformResponse: false }); |
||||
|
/** |
||||
|
* 保存角色数据规则 |
||||
|
*/ |
||||
|
export const saveDataRule = (params) => defHttp.post({ url: Api.queryDataRule, params }); |
||||
|
/** |
||||
|
* 获取表单数据 |
||||
|
* @return List<Map> |
||||
|
*/ |
||||
|
export const getParentDesignList = () => defHttp.get({ url: Api.getParentDesignList }); |
||||
|
/** |
||||
|
* 获取角色表单数据 |
||||
|
* @return List<Map> |
||||
|
*/ |
||||
|
export const getRoleDegisnList = (params) => defHttp.get({ url: Api.getRoleDegisnList, params }); |
||||
|
/** |
||||
|
* 提交角色工单信息 |
||||
|
*/ |
||||
|
export const saveRoleDesign = (params) => defHttp.post({ url: Api.saveRoleDesign, params }); |
||||
|
/** |
||||
|
* 角色列表接口 |
||||
|
* @param params |
||||
|
*/ |
||||
|
export const userList = (params) => defHttp.get({ url: Api.userList, params }); |
||||
|
/** |
||||
|
* 删除角色用户 |
||||
|
*/ |
||||
|
export const deleteUserRole = (params, handleSuccess) => { |
||||
|
return defHttp.delete({ url: Api.deleteUserRole, params }, { joinParamsToUrl: true }).then(() => { |
||||
|
handleSuccess(); |
||||
|
}); |
||||
|
}; |
||||
|
/** |
||||
|
* 批量删除角色用户 |
||||
|
* @param params |
||||
|
*/ |
||||
|
export const batchDeleteUserRole = (params, handleSuccess) => { |
||||
|
Modal.confirm({ |
||||
|
title: '确认删除', |
||||
|
content: '是否删除选中数据', |
||||
|
okText: '确认', |
||||
|
cancelText: '取消', |
||||
|
onOk: () => { |
||||
|
return defHttp.delete({ url: Api.batchDeleteUserRole, params }, { joinParamsToUrl: true }).then(() => { |
||||
|
handleSuccess(); |
||||
|
}); |
||||
|
}, |
||||
|
}); |
||||
|
}; |
||||
|
/** |
||||
|
* 添加已有用户 |
||||
|
*/ |
||||
|
export const addUserRole = (params, handleSuccess) => { |
||||
|
return defHttp.post({ url: Api.addUserRole, params }).then(() => { |
||||
|
handleSuccess(); |
||||
|
}); |
||||
|
}; |
||||
|
/** |
||||
|
* 保存或者更新 |
||||
|
* @param params |
||||
|
* @param isUpdate 是否是更新数据 |
||||
|
*/ |
||||
|
export const saveOrUpdateRoleIndex = (params, isUpdate) => { |
||||
|
let url = isUpdate ? Api.editRoleIndex : Api.saveRoleIndex; |
||||
|
return defHttp.post({ url: url, params }); |
||||
|
}; |
||||
|
/** |
||||
|
* 根据code查询首页配置 |
||||
|
* @param params |
||||
|
*/ |
||||
|
export const queryIndexByCode = (params) => defHttp.get({ url: Api.queryIndexByCode, params }, { isTransformResponse: false }); |
@ -0,0 +1,81 @@ |
|||||
|
<template> |
||||
|
<!-- 自定义表单 --> |
||||
|
<el-divider content-position="left">项目入库详情</el-divider> |
||||
|
<BasicForm @register="registerProjectForm" /> |
||||
|
<el-divider content-position="left">项目审批详情</el-divider> |
||||
|
<BasicTable @register="registerTable"/> |
||||
|
<!-- <el-dialog v-model="dialogTableVisible" title="Shipping address"> |
||||
|
<el-table :data="gridData"> |
||||
|
<el-table-column property="date" label="Date" width="150" /> |
||||
|
<el-table-column property="name" label="Name" width="200" /> |
||||
|
<el-table-column property="address" label="Address" /> |
||||
|
</el-table> |
||||
|
|
||||
|
</el-dialog> --> |
||||
|
</template> |
||||
|
<script lang="ts" name="Detailpage" setup> |
||||
|
import { defineProps,watchEffect} from 'vue' |
||||
|
import { useForm, BasicForm } from '/@/components/Form'; |
||||
|
import { formSchemas,ProcessColumns} from './projectInfo.data'; |
||||
|
import{queryProjectInfoById,queryProcessInfo} from './projectInfo.api' |
||||
|
import {BasicTable } from '/@/components/Table'; |
||||
|
import { useListPage } from '/@/hooks/system/useListPage'; |
||||
|
|
||||
|
let proid = defineProps(["dataTo"]) |
||||
|
|
||||
|
watchEffect(async ()=>{ |
||||
|
console.log("dataTo",proid.dataTo) |
||||
|
let param:any = { |
||||
|
projectid:proid.dataTo |
||||
|
} |
||||
|
let res =await queryProjectInfoById(param) |
||||
|
console.log("结果是",res) |
||||
|
setFieldsValue(res) |
||||
|
reload() |
||||
|
}) |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* BasicForm绑定注册; |
||||
|
* useForm 是整个框架的核心用于表单渲染,里边封装了很多公共方法; |
||||
|
* 支持(schemas: 渲染表单列,autoSubmitOnEnter:回车提交,submitButtonOptions:自定义按钮文本和图标等方法); |
||||
|
* 平台通过此封装,简化了代码,支持自定义扩展; |
||||
|
*/ |
||||
|
const [registerProjectForm,{setFieldsValue}] = useForm({ |
||||
|
//注册表单列 |
||||
|
schemas: formSchemas, |
||||
|
showActionButtonGroup: false, |
||||
|
//回车提交 |
||||
|
// autoSubmitOnEnter: true, |
||||
|
// //不显示重置按钮 |
||||
|
// showResetButton: false, |
||||
|
//自定义提交按钮文本和图标 |
||||
|
// submitButtonOptions: { text: '提交', preIcon: '' }, |
||||
|
//查询列占比 24代表一行 取值范围 0-24 |
||||
|
// actionColOptions: { span: 17 }, |
||||
|
labelCol: { style: { width: '120px' } }, |
||||
|
wrapperCol:{ style: { width: 'auto' } }, |
||||
|
disabled:true |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
|
||||
|
const { tableContext } = useListPage({ |
||||
|
tableProps: { |
||||
|
size:'small',//紧凑型表格 |
||||
|
title: '流程审批情况', |
||||
|
api:queryProcessInfo, |
||||
|
columns: ProcessColumns, |
||||
|
showActionColumn:false, |
||||
|
useSearchForm:false, |
||||
|
beforeFetch(params) { |
||||
|
params.status = "1", |
||||
|
params.projectid=proid.dataTo |
||||
|
}, |
||||
|
}, |
||||
|
}); |
||||
|
// BasicTable绑定注册 |
||||
|
const [registerTable,{reload}] = tableContext; |
||||
|
|
||||
|
</script> |
||||
|
<style></style> |
@ -1,38 +0,0 @@ |
|||||
<template> |
|
||||
<div> |
|
||||
<el-form :inline="true" :model="formQueryParam" class="demo-form-inline"> |
|
||||
<el-form-item label="人员名称"> |
|
||||
<el-input v-model="formQueryParam.userName" placeholder="人员名称" clearable /> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="项目编号"> |
|
||||
<el-input v-model="formQueryParam.projectId" placeholder="项目编号" clearable /> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="项目名称"> |
|
||||
<el-input v-model="formQueryParam.projectName" placeholder="项目名称" clearable /> |
|
||||
</el-form-item> |
|
||||
<el-form-item> |
|
||||
<el-button type="primary" @click="query">查询</el-button> |
|
||||
|
|
||||
</el-form-item> |
|
||||
</el-form> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
</template> |
|
||||
|
|
||||
<script lang="ts" setup> |
|
||||
import {ref } from 'vue'; |
|
||||
|
|
||||
const formQueryParam = ref<any>({ |
|
||||
userName:"", |
|
||||
projectId:"", |
|
||||
projectName:"" |
|
||||
}) |
|
||||
function query(){ |
|
||||
|
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style lang="less"> |
|
||||
@import './index.less'; |
|
||||
</style> |
|
@ -1,13 +0,0 @@ |
|||||
//noinspection LessUnresolvedVariable |
|
||||
@prefix-cls: ~'@{namespace}-address-list'; |
|
||||
|
|
||||
.@{prefix-cls} { |
|
||||
// update-begin-author:liusq date:20230625 for: [issues/563]暗色主题部分失效 |
|
||||
background-color: @component-background; |
|
||||
// update-end-author:liusq date:20230625 for: [issues/563]暗色主题部分失效 |
|
||||
&--box { |
|
||||
.ant-tabs-nav { |
|
||||
padding: 0 20px; |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -0,0 +1,72 @@ |
|||||
|
<template> |
||||
|
<!-- 自定义表单 --> |
||||
|
<el-divider content-position="left">项目入库详情</el-divider> |
||||
|
<BasicForm @register="registerProjectForm" /> |
||||
|
<el-divider content-position="left">上传项目资料</el-divider> |
||||
|
<BasicForm @register="registerFormUploadFile" /> |
||||
|
<!-- <el-dialog v-model="dialogTableVisible" title="Shipping address"> |
||||
|
<el-table :data="gridData"> |
||||
|
<el-table-column property="date" label="Date" width="150" /> |
||||
|
<el-table-column property="name" label="Name" width="200" /> |
||||
|
<el-table-column property="address" label="Address" /> |
||||
|
</el-table> |
||||
|
|
||||
|
</el-dialog> --> |
||||
|
</template> |
||||
|
<script lang="ts" name="uploadFile" setup> |
||||
|
import { defineProps,watchEffect} from 'vue' |
||||
|
import { useForm, BasicForm } from '/@/components/Form'; |
||||
|
import { formSchemas,uploadFileformSchemas} from './projectInfo.data'; |
||||
|
import{queryProjectInfoById,queryProcessInfo} from './projectInfo.api'; |
||||
|
|
||||
|
let proid = defineProps(["dataTo"]) |
||||
|
//加载项目数据 |
||||
|
watchEffect(async ()=>{ |
||||
|
console.log("dataTo",proid.dataTo) |
||||
|
let param:any = { |
||||
|
projectid:proid.dataTo |
||||
|
} |
||||
|
let res =await queryProjectInfoById(param) |
||||
|
console.log("结果是",res) |
||||
|
setProjectFieldsValue(res) |
||||
|
}) |
||||
|
|
||||
|
|
||||
|
//项目入库详情 |
||||
|
const [registerProjectForm,{setFieldsValue:setProjectFieldsValue}] = useForm({ |
||||
|
//注册表单列 |
||||
|
schemas: formSchemas, |
||||
|
showActionButtonGroup: false, |
||||
|
//回车提交 |
||||
|
// autoSubmitOnEnter: true, |
||||
|
// //不显示重置按钮 |
||||
|
// showResetButton: false, |
||||
|
//自定义提交按钮文本和图标 |
||||
|
// submitButtonOptions: { text: '提交', preIcon: '' }, |
||||
|
//查询列占比 24代表一行 取值范围 0-24 |
||||
|
// actionColOptions: { span: 17 }, |
||||
|
labelCol: { style: { width: '120px' } }, |
||||
|
wrapperCol:{ style: { width: 'auto' } }, |
||||
|
disabled:true |
||||
|
}); |
||||
|
|
||||
|
const [registerFormUploadFile] = useForm({ |
||||
|
//注册表单列 |
||||
|
schemas: uploadFileformSchemas, |
||||
|
showActionButtonGroup: false, |
||||
|
//回车提交 |
||||
|
// autoSubmitOnEnter: true, |
||||
|
// //不显示重置按钮 |
||||
|
// showResetButton: false, |
||||
|
//自定义提交按钮文本和图标 |
||||
|
// submitButtonOptions: { text: '提交', preIcon: '' }, |
||||
|
//查询列占比 24代表一行 取值范围 0-24 |
||||
|
// actionColOptions: { span: 17 }, |
||||
|
labelCol: { style: { width: '120px' } }, |
||||
|
wrapperCol:{ style: { width: 'auto' } }, |
||||
|
disabled:true |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
</script> |
||||
|
<style></style> |
Loading…
Reference in new issue