签报接口
This commit is contained in:
@ -7,13 +7,18 @@ export const formConfig = {
|
||||
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{
|
||||
field: 'code',
|
||||
label: '编号',
|
||||
component: 'Input',
|
||||
field: 'dateAppro',
|
||||
label: '拟稿日期',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
style: { width: '100%' },
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'title',
|
||||
label: '标题',
|
||||
label: '标题/编号',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
@ -29,59 +34,6 @@ export const searchFormSchema: FormSchema[] = [
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'securityCode',
|
||||
label: '密级',
|
||||
component: 'XjrSelect',
|
||||
componentProps: {
|
||||
datasourceType: 'dic',
|
||||
params: { itemId: '2001501242533273602' },
|
||||
labelField: 'name',
|
||||
valueField: 'value',
|
||||
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'urgencyCode',
|
||||
label: '缓级',
|
||||
component: 'XjrSelect',
|
||||
componentProps: {
|
||||
datasourceType: 'dic',
|
||||
params: { itemId: '2001501562994876418' },
|
||||
labelField: 'name',
|
||||
valueField: 'value',
|
||||
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'empId',
|
||||
label: '拟稿人',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'bDeptId',
|
||||
label: '拟稿人所属部门',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'dateAppro',
|
||||
label: '拟稿日期',
|
||||
component: 'XjrSelect',
|
||||
componentProps: {
|
||||
datasourceType: 'api',
|
||||
apiConfig: {
|
||||
path: 'CodeGeneration/selection',
|
||||
method: 'GET',
|
||||
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
|
||||
},
|
||||
labelField: 'label',
|
||||
valueField: 'value',
|
||||
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'approCode',
|
||||
label: '审批状态',
|
||||
@ -95,14 +47,17 @@ export const searchFormSchema: FormSchema[] = [
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'content',
|
||||
label: '内容摘要',
|
||||
component: 'Input',
|
||||
},
|
||||
];
|
||||
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
dataIndex: 'title',
|
||||
title: '标题',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
dataIndex: 'code',
|
||||
title: '编号',
|
||||
@ -113,16 +68,7 @@ export const columns: BasicColumn[] = [
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'title',
|
||||
title: '标题',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'typeCode',
|
||||
dataIndex: 'typeName',
|
||||
title: '签报类型',
|
||||
componentType: 'select',
|
||||
align: 'left',
|
||||
@ -131,7 +77,7 @@ export const columns: BasicColumn[] = [
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'securityCode',
|
||||
dataIndex: 'securityName',
|
||||
title: '密级',
|
||||
componentType: 'select',
|
||||
align: 'left',
|
||||
@ -140,7 +86,7 @@ export const columns: BasicColumn[] = [
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'urgencyCode',
|
||||
dataIndex: 'urgencyName',
|
||||
title: '缓级',
|
||||
componentType: 'select',
|
||||
align: 'left',
|
||||
@ -149,7 +95,7 @@ export const columns: BasicColumn[] = [
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'empId',
|
||||
dataIndex: 'empName',
|
||||
title: '拟稿人',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
@ -158,7 +104,7 @@ export const columns: BasicColumn[] = [
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'bDeptId',
|
||||
dataIndex: 'deptName',
|
||||
title: '拟稿人所属部门',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
@ -176,22 +122,13 @@ export const columns: BasicColumn[] = [
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'approCode',
|
||||
dataIndex: 'approName',
|
||||
title: '审批状态',
|
||||
componentType: 'select',
|
||||
align: 'left',
|
||||
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'content',
|
||||
title: '内容摘要',
|
||||
componentType: 'textarea',
|
||||
align: 'left',
|
||||
|
||||
sorter: true,
|
||||
},
|
||||
];
|
||||
//表单事件
|
||||
export const formEventConfigs = {
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="16">
|
||||
<a-form-item label="标题" name="title" :label-col="{ span: 5, offset }" :wrapper-col="{ span: 24 }">
|
||||
<a-input v-model:value="formState.title" placeholder="请输入标题"/>
|
||||
<a-form-item label="标题" name="title" :label-col="{ span: 4 }" :wrapper-col="{ span: 24 }">
|
||||
<a-input v-model:value="formState.title" :disabled="isDisable" placeholder="请输入标题"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
@ -43,12 +43,12 @@
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="拟稿人" name="empName">
|
||||
<a-input-search v-model:value="formState.empName" placeholder="请选择拟稿人" readonly @search="onSearchUser"/>
|
||||
<a-input-search v-model:value="formState.empName" :disabled="isDisable" placeholder="请选择拟稿人" readonly @search="onSearchUser"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="拟稿人所属部门" name="bDeptName">
|
||||
<a-input-search v-model:value="formState.bDeptName" placeholder="请选择拟稿人部门" readonly @search="onSearch"/>
|
||||
<a-form-item label="拟稿人所属部门" name="deptName">
|
||||
<a-input-search v-model:value="formState.deptName" :disabled="isDisable" placeholder="请选择拟稿人部门" readonly @search="onSearch"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
@ -58,7 +58,7 @@
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="拟稿日期" name="dateAppro">
|
||||
<a-date-picker v-model:value="formState.dateAppro" style="width: 100%" placeholder="请选择评价日期" />
|
||||
<a-date-picker v-model:value="formState.dateAppro" :disabled="isDisable" style="width: 100%" placeholder="请选择评价日期" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
@ -70,12 +70,12 @@
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="22">
|
||||
<a-form-item label="内容摘要" name="content" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
||||
<a-textarea v-model:value="formState.content" :disabled="isDisable" placeholder="请输入备注,最多1000字" :maxlength="1000" :auto-size="{ minRows: 4, }"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="22">
|
||||
<a-form-item label="备注" name="note" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
||||
<a-textarea v-model:value="formState.note" :disabled="isDisable" placeholder="请输入备注,最多200字" :maxlength="200" :auto-size="{ minRows: 2, maxRows: 5 }"/>
|
||||
</a-form-item>
|
||||
@ -156,17 +156,16 @@
|
||||
securityCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
urgencyCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
empName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
bDeptName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
deptName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
comName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
dateAppro: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
content: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
|
||||
};
|
||||
const layout = {
|
||||
labelCol: { span: 9 },
|
||||
wrapperCol: { span: 15 },
|
||||
labelCol: { span: 8 },
|
||||
wrapperCol: { span: 16 },
|
||||
}
|
||||
const dataList= ref([]);
|
||||
const dataFile = ref([]);
|
||||
let optionSelect= reactive({
|
||||
approCodeList: [],
|
||||
@ -225,12 +224,15 @@
|
||||
optionSelect.urgencyCodeList = await getDictionary('LNG_URGEN')
|
||||
optionSelect.approCodeList = await getDictionary('LNG_APPRO')
|
||||
|
||||
const res = await getCompDept(userInfo.id)
|
||||
formState.bDeptName = res?.dept?.name
|
||||
formState.bDeptId = res?.dept?.id
|
||||
if (!pageId.value) {
|
||||
const res = await getCompDept(userInfo.id)
|
||||
formState.deptName = res?.dept?.name
|
||||
formState.bDeptId = res?.dept?.id
|
||||
|
||||
formState.comName = res?.comp?.name
|
||||
formState.comId = res?.comp?.id
|
||||
}
|
||||
|
||||
formState.comName = res?.comp?.name
|
||||
formState.comId = res?.comp?.id
|
||||
}
|
||||
const onSearch = (val)=> {
|
||||
openModalDept(true,{isUpdate: false})
|
||||
@ -242,9 +244,12 @@
|
||||
formState.empName = val[0].name
|
||||
formState.empId = val[0].id
|
||||
}
|
||||
const handleSuccessDept = (val) => {
|
||||
formState.bDeptName = val[0].name
|
||||
const handleSuccessDept = (val, info) => {
|
||||
formState.deptName = val[0].name
|
||||
formState.bDeptId = val[0].id
|
||||
|
||||
formState.comName = info.name
|
||||
formState.comId = info.id
|
||||
}
|
||||
|
||||
function close() {
|
||||
@ -258,7 +263,6 @@
|
||||
await formRef.value.validateFields();
|
||||
let obj = {
|
||||
...formState,
|
||||
lngScoreDtlList: dataList.value,
|
||||
lngFileUploadList: dataFile.value
|
||||
|
||||
}
|
||||
|
||||
@ -74,9 +74,9 @@
|
||||
|
||||
const tableRef = ref();
|
||||
//所有按钮
|
||||
const buttons = ref([{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true},{"isUse":true,"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true},{"isUse":true,"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true}]);
|
||||
const buttons = ref([{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true},{"isUse":true,"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true},{"isUse":true,"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true},,{"name":"变更","code":"update","icon":"ant-design:edit-filled","isDefault":false,"isUse":true},{"isUse":true,"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true}]);
|
||||
//展示在列表内的按钮
|
||||
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord']);
|
||||
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete','update', 'startwork','flowRecord']);
|
||||
const buttonConfigs = computed(()=>{
|
||||
return filterButtonAuth(buttons.value);
|
||||
})
|
||||
@ -89,7 +89,7 @@
|
||||
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
|
||||
});
|
||||
|
||||
const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,startwork : handleStartwork,flowRecord : handleFlowRecord,delete : handleDelete,}
|
||||
const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,startwork : handleStartwork,flowRecord : handleFlowRecord,delete : handleDelete,update: handleUpdate}
|
||||
|
||||
const { currentRoute } = useRouter();
|
||||
const router = useRouter();
|
||||
@ -121,8 +121,8 @@
|
||||
gutter: 16,
|
||||
},
|
||||
schemas: customSearchFormSchema,
|
||||
fieldMapToTime: [],
|
||||
showResetButton: false,
|
||||
fieldMapToTime: [['dateAppro', ['startDate', 'endDate'], 'YYYY-MM-DD HH:mm:ss ', true],],
|
||||
showResetButton: true,
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
return { ...params, FormId: formIdComputedRef.value, PK: 'id',page: params.limit};
|
||||
@ -159,7 +159,8 @@
|
||||
query: {
|
||||
taskId: taskIds[0],
|
||||
formName: formName,
|
||||
formId:currentRoute.value.meta.formId
|
||||
formId:currentRoute.value.meta.formId,
|
||||
id: record.id
|
||||
}
|
||||
});
|
||||
} else if (schemaId && !taskIds && processId) {
|
||||
@ -169,18 +170,32 @@
|
||||
readonly: 1,
|
||||
taskId: '',
|
||||
formName: formName,
|
||||
formId:currentRoute.value.meta.formId
|
||||
formId:currentRoute.value.meta.formId,
|
||||
id: record.id
|
||||
}
|
||||
});
|
||||
} else {
|
||||
router.push({
|
||||
path: '/form/Appro/' + record.id + '/viewForm',
|
||||
query: {
|
||||
formPath: 'approve/Appro',
|
||||
formName: formName,
|
||||
formId:currentRoute.value.meta.formId
|
||||
}
|
||||
});
|
||||
if (schemaIdComputedRef.value) {
|
||||
router.push({
|
||||
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow',
|
||||
query: {
|
||||
formPath: 'approve/Appro',
|
||||
formName: formName,
|
||||
formId:currentRoute.value.meta.formId,
|
||||
type:'edit',
|
||||
id: record.id,
|
||||
disabled: 1,
|
||||
}
|
||||
});
|
||||
}
|
||||
// router.push({
|
||||
// path: '/form/Appro/' + record.id + '/viewForm',
|
||||
// query: {
|
||||
// formPath: 'approve/Appro',
|
||||
// formName: formName,
|
||||
// formId:currentRoute.value.meta.formId
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
||||
@ -211,15 +226,43 @@
|
||||
}
|
||||
|
||||
function handleEdit(record: Recordable) {
|
||||
|
||||
router.push({
|
||||
path: '/form/Appro/' + record.id + '/updateForm',
|
||||
query: {
|
||||
if (schemaIdComputedRef.value) {
|
||||
router.push({
|
||||
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow',
|
||||
query: {
|
||||
formPath: 'approve/Appro',
|
||||
formName: formName,
|
||||
formId:currentRoute.value.meta.formId
|
||||
formId:currentRoute.value.meta.formId,
|
||||
type:'edit',
|
||||
id: record.id
|
||||
}
|
||||
});
|
||||
} else {
|
||||
router.push({
|
||||
path: '/form/Appro/' + record.id + '/updateForm',
|
||||
query: {
|
||||
formPath: 'approve/Appro',
|
||||
formName: formName,
|
||||
formId:currentRoute.value.meta.formId
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
function handleUpdate(record: Recordable) {
|
||||
const { processId, taskIds, schemaId, status } = record.workflowData || {};
|
||||
router.push({
|
||||
path: '/flow/' + schemaId + '/' + processId + '/approveFlow',
|
||||
query: {
|
||||
readonly: 1,
|
||||
taskId: '',
|
||||
formName: formName,
|
||||
formId:currentRoute.value.meta.formId,
|
||||
id: record.id,
|
||||
status
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function handleDelete(record: Recordable) {
|
||||
deleteList([record.id]);
|
||||
@ -289,7 +332,7 @@
|
||||
onClick: btnEvent[button.code].bind(null, record),
|
||||
});
|
||||
}
|
||||
if (['edit', 'delete'].includes(button.code)) {
|
||||
if (['edit', 'delete','update'].includes(button.code)) {
|
||||
editAndDelBtn.push({
|
||||
icon: button?.icon,
|
||||
tooltip: button?.name,
|
||||
@ -312,6 +355,10 @@
|
||||
actionsList = actionsList.concat(editAndDelBtn);
|
||||
}
|
||||
}
|
||||
if (record.approCode !== 'YSP') {
|
||||
let idx = actionsList.findIndex(v =>v.tooltip == '变更')
|
||||
idx>-1 && actionsList.splice(idx, 1)
|
||||
}
|
||||
return actionsList;
|
||||
}
|
||||
function handleStartwork(record: Recordable) {
|
||||
@ -396,6 +443,13 @@
|
||||
:deep(.ant-table-selection-col) {
|
||||
width: 50px;
|
||||
}
|
||||
:deep( .ant-col-8:nth-child(1)) {
|
||||
width: 320px !important;
|
||||
max-width: 320px !important;;
|
||||
}
|
||||
:deep(.ant-col-8:nth-child(1) .ant-form-item-label) {
|
||||
width: 80px !important;
|
||||
}
|
||||
.show{
|
||||
display: flex;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user