|
|
@ -82,6 +82,9 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template v-else-if="column.dataIndex === 'time'"> |
|
|
|
{{ dayjs(+text).format('MM-DD') }} |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
{{ text }} |
|
|
|
</template> |
|
|
@ -119,7 +122,7 @@ |
|
|
|
<div v-for="(item, index) in modalFormState" :key="index"> |
|
|
|
<div class="flex justify-between items-center text-gray-400"> |
|
|
|
<div class="mb-5 text-right" style="width: 120px">计划结果{{ index + 1 }}:</div> |
|
|
|
<DeleteOutlined v-if="modalFormState.length > 1 && !isDisabled" @click="delFormItem(index)" /> |
|
|
|
<DeleteOutlined v-if="modalFormState.length > 1" @click="delFormItem(index)" /> |
|
|
|
</div> |
|
|
|
|
|
|
|
<a-form-item name="taskName" style="margin-bottom: 20px"> |
|
|
@ -127,7 +130,7 @@ |
|
|
|
<label class="flex-shrink-0 text-right" style="width: 120px; line-height: 32px"> |
|
|
|
<span style="color: #ff5353; margin-right: 5px">*</span>今日计划结果{{ index + 1 }}: |
|
|
|
</label> |
|
|
|
<a-textarea v-model:value="item.taskName" :disabled="isDisabled" placeholder="请输入今日计划" /> |
|
|
|
<a-textarea v-model:value="item.taskName" placeholder="请输入今日计划" /> |
|
|
|
</div> |
|
|
|
</a-form-item> |
|
|
|
|
|
|
@ -136,7 +139,7 @@ |
|
|
|
<label class="flex-shrink-0 text-right" style="width: 120px; line-height: 32px"> |
|
|
|
<span style="color: #ff5353; margin-right: 5px">*</span>交付物: |
|
|
|
</label> |
|
|
|
<a-input v-model:value="item.deliverName" :disabled="isDisabled" placeholder="请输入交付物" /> |
|
|
|
<a-input v-model:value="item.deliverName" placeholder="请输入交付物" /> |
|
|
|
</div> |
|
|
|
</a-form-item> |
|
|
|
|
|
|
@ -145,7 +148,7 @@ |
|
|
|
<label class="flex-shrink-0 text-right" style="width: 120px; line-height: 32px"> |
|
|
|
<span style="color: #ff5353; margin-right: 5px">*</span>截止时间: |
|
|
|
</label> |
|
|
|
<a-date-picker class="w-full" v-model:value="item.showDeadLine" :disabled="isDisabled" /> |
|
|
|
<a-date-picker class="w-full" v-model:value="item.showDeadLine" /> |
|
|
|
</div> |
|
|
|
</a-form-item> |
|
|
|
|
|
|
@ -161,7 +164,6 @@ |
|
|
|
v-model:value="item.showDuration" |
|
|
|
:options="workDurations" |
|
|
|
placeholder="请输入工作时长" |
|
|
|
:disabled="isDisabled" |
|
|
|
@change="handleDuration($event, index)" |
|
|
|
/> |
|
|
|
|
|
|
@ -181,7 +183,6 @@ |
|
|
|
:field-names="{ label: 'empName', value: 'empName' }" |
|
|
|
show-search |
|
|
|
placeholder="请选择检查人" |
|
|
|
:disabled="isDisabled" |
|
|
|
:filter-option="filterOption" |
|
|
|
@change="handleInspector($event, index)" |
|
|
|
></a-select> |
|
|
@ -192,8 +193,8 @@ |
|
|
|
<div class="flex"> |
|
|
|
<label class="flex-shrink-0 text-right" style="width: 120px; line-height: 32px"> 是否协作: </label> |
|
|
|
<a-radio-group v-model:value="item.cooperation" class="w-full items-center" style="display: flex"> |
|
|
|
<a-radio class="items-center" style="display: flex" :value="1" :disabled="isDisabled">是</a-radio> |
|
|
|
<a-radio class="items-center" style="display: flex" :value="0" :disabled="isDisabled">否</a-radio> |
|
|
|
<a-radio class="items-center" style="display: flex" :value="1">是</a-radio> |
|
|
|
<a-radio class="items-center" style="display: flex" :value="0">否</a-radio> |
|
|
|
</a-radio-group> |
|
|
|
</div> |
|
|
|
</a-form-item> |
|
|
@ -201,19 +202,19 @@ |
|
|
|
<a-form-item name="deliverLink" style="margin-bottom: 20px"> |
|
|
|
<div class="flex"> |
|
|
|
<label class="flex-shrink-0 text-right" style="width: 120px; line-height: 32px"> 交付物链接: </label> |
|
|
|
<a-textarea v-model:value="item.deliverLink" :disabled="isDisabled" placeholder="请输入交付物链接" /> |
|
|
|
<a-textarea v-model:value="item.deliverLink" placeholder="请输入交付物链接" /> |
|
|
|
</div> |
|
|
|
</a-form-item> |
|
|
|
</div> |
|
|
|
|
|
|
|
<a-form-item v-if="!isDisabled"> |
|
|
|
<a-form-item> |
|
|
|
<div class="flex"> |
|
|
|
<label class="flex-shrink-0 text-right" style="width: 120px"></label> |
|
|
|
<a-button style="color: #1890ff; border-color: #1890ff" type="dashed" @click="addFormItem">+ 添加</a-button> |
|
|
|
</div> |
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
<a-form-item v-if="!isDisabled"> |
|
|
|
<a-form-item> |
|
|
|
<div class="flex items-center"> |
|
|
|
<label class="flex-shrink-0 text-right" style="width: 120px"></label> |
|
|
|
<a-button class="mr-4" type="primary" @click="submitForm">提交</a-button> |
|
|
@ -286,6 +287,7 @@ const currEmpId = ref(null); // 当前点击的用户id |
|
|
|
const currEmpName = ref(null); // 当前点击的用户名 |
|
|
|
const currProId = ref(null); // 当前点击的项目id |
|
|
|
const currProName = ref(null); // 当前点击的项目名 |
|
|
|
const currClickTime = ref(null); // 当前点击的流水账日期 |
|
|
|
|
|
|
|
onMounted(async () => { |
|
|
|
getClockQuery(); |
|
|
@ -368,7 +370,7 @@ async function getQueryTasks() { |
|
|
|
const obj = { |
|
|
|
empId: member.id, |
|
|
|
key, |
|
|
|
time: dayjs(+params.param.startTime).format('MM-DD'), |
|
|
|
time: params.param.startTime, |
|
|
|
staff: `${member.empName}`, |
|
|
|
program: [], |
|
|
|
bgColor: key % 2 === 1 ? 1 : 0, |
|
|
@ -463,6 +465,8 @@ function handlePage(e) { |
|
|
|
|
|
|
|
// 打开今日计划编辑框 |
|
|
|
function showModal(data, proId) { |
|
|
|
console.log(data, proId); |
|
|
|
currClickTime.value = data.time; |
|
|
|
currEmpId.value = data.empId; |
|
|
|
currProId.value = proId; |
|
|
|
const currEmpInfo = memberList.value.find(item => item.id === data.empId); |
|
|
@ -584,7 +588,7 @@ async function submitForm() { |
|
|
|
|
|
|
|
const params = { |
|
|
|
param: { |
|
|
|
time: new Date().getTime(), |
|
|
|
time: currClickTime.value || new Date().getTime(), |
|
|
|
empId: currEmpId.value, |
|
|
|
proId: currProId.value, |
|
|
|
tasks: modalFormState.value, |
|
|
|