|
|
@@ -128,12 +128,12 @@
|
|
|
}"
|
|
|
@confirm="handleDelete(scope.row.id)"
|
|
|
/>
|
|
|
- <ActionButton text="下发" @click="handleIssue(scope.row.id)" />
|
|
|
+ <ActionButton text="下发" @click="handleIssue(scope.row)" />
|
|
|
</template>
|
|
|
|
|
|
<!-- 待反馈:作废 / 考核对象 -->
|
|
|
<template v-else-if="Number(scope.row.status) === 2">
|
|
|
- <ActionButton text="下发" @click="handleIssue(scope.row.id)" />
|
|
|
+ <ActionButton text="下发" @click="handleIssue(scope.row)" />
|
|
|
<ActionButton
|
|
|
text="作废"
|
|
|
:popconfirm="{
|
|
|
@@ -255,6 +255,7 @@
|
|
|
value-format="YYYY-MM-DD"
|
|
|
format="YYYY-MM-DD"
|
|
|
style="width: 100%"
|
|
|
+ :disabled="showTimeDisabled"
|
|
|
:disabled-date="(date: Date) => {
|
|
|
if (issueForm.endDate) {
|
|
|
return date > new Date(issueForm.endDate);
|
|
|
@@ -265,6 +266,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="计划结束日期:">
|
|
|
<el-date-picker
|
|
|
+ :disabled="showTimeDisabled"
|
|
|
v-model="issueForm.endDate"
|
|
|
type="date"
|
|
|
placeholder="请选择计划结束日期"
|
|
|
@@ -322,6 +324,8 @@
|
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
|
+ const showTimeDisabled = ref(false);
|
|
|
+
|
|
|
// 表格
|
|
|
const basicTableRef = ref<InstanceType<typeof BasicTable>>();
|
|
|
|
|
|
@@ -444,6 +448,8 @@
|
|
|
item.planStartTime && item.planEndTime
|
|
|
? `${item.planStartTime} 至 ${item.planEndTime}`
|
|
|
: item.planStartTime || item.planEndTime || '-', // 计划完成时间
|
|
|
+ planStartTime: item.planStartTime || '', // 计划开始时间
|
|
|
+ planEndTime: item.planEndTime || '', // 计划结束时间
|
|
|
}));
|
|
|
pagination.total = res.totalRow;
|
|
|
}
|
|
|
@@ -511,17 +517,22 @@
|
|
|
};
|
|
|
|
|
|
// 下发考核表
|
|
|
- const handleIssue = async (id: number) => {
|
|
|
- currentIssueId.value = id;
|
|
|
+ const handleIssue = async (row: any) => {
|
|
|
+ currentIssueId.value = row.id;
|
|
|
issueForm.departmentName = '';
|
|
|
- issueForm.startDate = '';
|
|
|
- issueForm.endDate = '';
|
|
|
+ issueForm.startDate = row.planStartTime;
|
|
|
+ issueForm.endDate = row.planEndTime;
|
|
|
issueForm.userGroupId = undefined;
|
|
|
issueForm.deptSelfApproveUserId = undefined;
|
|
|
issueDeptIds.value = [];
|
|
|
issueDialogVisible.value = true;
|
|
|
+ if(row.planStartTime && row.planEndTime && row.status === 2) {
|
|
|
+ showTimeDisabled.value = true;
|
|
|
+ } else {
|
|
|
+ showTimeDisabled.value = false;
|
|
|
+ }
|
|
|
// 弹窗打开时才加载下发弹窗所需数据
|
|
|
- await Promise.all([getDeptTreeData(), getUserGroupOptions(), getDeptSelfApproveUserList(id)]);
|
|
|
+ await Promise.all([getDeptTreeData(), getUserGroupOptions(), getDeptSelfApproveUserList(row.id)]);
|
|
|
};
|
|
|
|
|
|
const handleIssueDeptChange = () => {
|