|
|
@ -30,9 +30,18 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="time-box" v-if="item.checkDuration"> |
|
|
<view class="time-box" v-if="item.checkDuration"> |
|
|
<view class="initial-duration bg-yellow-400" :style="{width: item.initialPercent + '%'}"></view> |
|
|
<view class="relative"> |
|
|
<view class="duration bg-blue-400" :style="{width: item.currPercent + '%'}"></view> |
|
|
<view class="initial-duration bg-yellow-400" :style="{width: item.initialPercent + '%'}"></view> |
|
|
<view class="check-duration bg-green-400" :style="{width: item.checkPercent + '%'}"></view> |
|
|
<text class="absolute duration-value">默认值:{{ deliverData.initialDuration / 3600000 }}小时</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="relative"> |
|
|
|
|
|
<view class="duration bg-blue-400" :style="{width: item.currPercent + '%'}"></view> |
|
|
|
|
|
<text class="absolute duration-value">工作量时长:{{ deliverData.duration / 3600000 }}小时</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="relative"> |
|
|
|
|
|
<view class="check-duration bg-green-400" :style="{width: item.checkPercent + '%'}"></view> |
|
|
|
|
|
<text class="absolute duration-value">确认工作:{{ item.checkDuration / 3600000 }}小时</text> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 自己是审核人 且审核过 当前审核人的审核状态并展示得分情况 --> |
|
|
<!-- 自己是审核人 且审核过 当前审核人的审核状态并展示得分情况 --> |
|
|
@ -69,8 +78,9 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 时长 --> |
|
|
<!-- 时长 --> |
|
|
<view class="flex item-center justify-end flex-1 text-sm"> |
|
|
<view class="flex items-center justify-end flex-1 text-sm"> |
|
|
<u-input v-model="checkDuration" type="text" placeholder="工作量时长" class="input" style="text-align: right;"></u-input> |
|
|
<u-input v-model="checkDuration" type="text" placeholder="工作量时长" class="input" style="text-align: right;"></u-input> |
|
|
|
|
|
小时 |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
@ -121,9 +131,18 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="time-box" v-if="item.checkDuration"> |
|
|
<view class="time-box" v-if="item.checkDuration"> |
|
|
<view class="initial-duration bg-yellow-400" :style="{width: item.initialPercent + '%'}"></view> |
|
|
<view class="relative"> |
|
|
<view class="duration bg-blue-400" :style="{width: item.currPercent + '%'}"></view> |
|
|
<view class="initial-duration bg-yellow-400" :style="{width: item.initialPercent + '%'}"></view> |
|
|
<view class="check-duration bg-green-400" :style="{width: item.checkPercent + '%'}"></view> |
|
|
<text class="absolute duration-value">默认值:{{ deliverData.initialDuration / 3600000 }}小时</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="relative"> |
|
|
|
|
|
<view class="duration bg-blue-400" :style="{width: item.currPercent + '%'}"></view> |
|
|
|
|
|
<text class="absolute duration-value">工作量时长:{{ deliverData.duration / 3600000 }}小时</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="relative"> |
|
|
|
|
|
<view class="check-duration bg-green-400" :style="{width: item.checkPercent + '%'}"></view> |
|
|
|
|
|
<text class="absolute duration-value">确认工作:{{ item.checkDuration / 3600000 }}小时</text> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 不是自己 显示审核状态 --> |
|
|
<!-- 不是自己 显示审核状态 --> |
|
|
@ -165,7 +184,7 @@ const deliverData = computed(() => (Object.keys(props.deliverData).length ? prop |
|
|
const tasks = inject('task'); |
|
|
const tasks = inject('task'); |
|
|
const task = computed(() => (Object.keys(props.task).length ? props.task : tasks.value)); |
|
|
const task = computed(() => (Object.keys(props.task).length ? props.task : tasks.value)); |
|
|
|
|
|
|
|
|
const checkDuration = ref('2小时'); // 工作量时长 |
|
|
const checkDuration = ref(2); // 工作量时长 |
|
|
const checkedIndex = ref(2); // 默认选中 |
|
|
const checkedIndex = ref(2); // 默认选中 |
|
|
const score = ref(100); // 评分 |
|
|
const score = ref(100); // 评分 |
|
|
const commit = ref(''); // 提交的信息 |
|
|
const commit = ref(''); // 提交的信息 |
|
|
@ -175,44 +194,46 @@ const showWords = ref(false); // 是否显示常用语 |
|
|
const emits = defineEmits(['submit-end']); |
|
|
const emits = defineEmits(['submit-end']); |
|
|
|
|
|
|
|
|
if (Object.keys(deliverData.value).length) { |
|
|
if (Object.keys(deliverData.value).length) { |
|
|
checkDuration.value = deliverData.value.duration; // 工作量时长 |
|
|
checkDuration.value = Number(deliverData.value.duration) / 3600000; // 工作量时长 |
|
|
checkedIndex.value = checkDuration.value === '半小时' ? 0 : checkDuration.value === '1小时' ? 1 : checkDuration.value === '2小时' ? 2 : -1; |
|
|
checkedIndex.value = checkDuration.value == 0.5 ? 0 : checkDuration.value == 1 ? 1 : checkDuration.value == 2 ? 2 : -1; |
|
|
|
|
|
|
|
|
|
|
|
handleDataRender(deliverData.value); |
|
|
|
|
|
console.log('deliverData',deliverData.value) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
watch(deliverData, () => { |
|
|
watch(deliverData, () => { |
|
|
checkDuration.value = deliverData.value.duration; // 工作量时长 |
|
|
checkDuration.value = Number(deliverData.value.duration) / 3600000; // 工作量时长 |
|
|
checkedIndex.value = checkDuration.value === '半小时' ? 0 : checkDuration.value === '1小时' ? 1 : checkDuration.value === '2小时' ? 2 : -1; |
|
|
checkedIndex.value = checkDuration.value == 0.5 ? 0 : checkDuration.value == 1 ? 1 : checkDuration.value == 2 ? 2 : -1; |
|
|
|
|
|
|
|
|
handleDataRender(deliverData.value.checkerList); |
|
|
handleDataRender(deliverData.value); |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
// 选择工作量时长 |
|
|
// 选择工作量时长 |
|
|
function handleSelectTime(data) { |
|
|
function handleSelectTime(data) { |
|
|
checkedIndex.value = data; |
|
|
checkedIndex.value = data; |
|
|
checkDuration.value = data === 0 ? '半小时' : data === 1 ? '1小时' : '2小时'; |
|
|
checkDuration.value = data === 0 ? 0.5 : data === 1 ? 1 : 2; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 处理审核记录数据 |
|
|
// 处理审核记录数据 |
|
|
async function handleDataRender(data) { |
|
|
async function handleDataRender(data) { |
|
|
console.log('111111', data); |
|
|
|
|
|
maxDuration.value = deliverData.value.initialDuration > deliverData.value.duration ? deliverData.value.initialDuration : deliverData.value.duration; |
|
|
maxDuration.value = deliverData.value.initialDuration > deliverData.value.duration ? deliverData.value.initialDuration : deliverData.value.duration; |
|
|
|
|
|
|
|
|
data.checkerList.forEach(item => { |
|
|
data.checkerList.forEach(item => { |
|
|
if (item.checkDuration) { |
|
|
if (item.checkDuration) { |
|
|
maxDuration.value = maxDuration > item.checkDuration ? maxDuration : item.checkDuration; |
|
|
maxDuration.value = maxDuration.value > item.checkDuration ? maxDuration.value : item.checkDuration; |
|
|
|
|
|
|
|
|
if (maxDuration === deliverData.value.initialDuration) { |
|
|
if (maxDuration.value == deliverData.value.initialDuration) { |
|
|
item.initialPercent = 100; |
|
|
item.initialPercent = 100; |
|
|
item.currPercent = Math.floor(deliverData.value.duration / deliverData.value.initialDuration); |
|
|
item.currPercent = Math.floor(deliverData.value.duration / deliverData.value.initialDuration * 100); |
|
|
item.checkPercent = Math.floor(item.checkDuration / deliverData.value.initialDuration); |
|
|
item.checkPercent = Math.floor(item.checkDuration / deliverData.value.initialDuration * 100); |
|
|
} else if (maxDuration === deliverData.value.duration) { |
|
|
} else if (maxDuration.value == deliverData.value.duration) { |
|
|
item.currPercent = 100; |
|
|
item.currPercent = 100; |
|
|
item.initialPercent = Math.floor(deliverData.value.initialDuration / deliverData.value.duration); |
|
|
item.initialPercent = Math.floor(deliverData.value.initialDuration / deliverData.value.duration * 100); |
|
|
item.checkPercent = Math.floor(item.checkDuration / deliverData.value.duration); |
|
|
item.checkPercent = Math.floor(item.checkDuration / deliverData.value.duration * 100); |
|
|
} else if (maxDuration === item.checkDuration) { |
|
|
} else if (maxDuration.value == item.checkDuration) { |
|
|
item.checkPercent = 100; |
|
|
item.checkPercent = 100; |
|
|
item.initialPercent = Math.floor(deliverData.value.initialDuration / item.checkDuration); |
|
|
item.initialPercent = Math.floor(deliverData.value.initialDuration / item.checkDuration * 100); |
|
|
item.currPercent = Math.floor(deliverData.value.duration / item.checkDuration); |
|
|
item.currPercent = Math.floor(deliverData.value.duration / item.checkDuration * 100); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
@ -236,7 +257,7 @@ async function handleSubmit(mode) { |
|
|
type: mode, |
|
|
type: mode, |
|
|
remark: commit.value, |
|
|
remark: commit.value, |
|
|
score: score.value, |
|
|
score: score.value, |
|
|
checkDuration: checkDuration.value, |
|
|
checkDuration: checkDuration.value * 3600000, |
|
|
msgId: task.value.msgId, |
|
|
msgId: task.value.msgId, |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
@ -270,4 +291,22 @@ function handleHide() { |
|
|
.word-item { |
|
|
.word-item { |
|
|
border-bottom: 1px solid #E5E7EB; |
|
|
border-bottom: 1px solid #E5E7EB; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.time-box { |
|
|
|
|
|
width: 120px; |
|
|
|
|
|
|
|
|
|
|
|
view { |
|
|
|
|
|
height: 15px; |
|
|
|
|
|
border-radius: 2px; |
|
|
|
|
|
margin: 2px 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.duration-value { |
|
|
|
|
|
height: 15px; |
|
|
|
|
|
line-height: 15px; |
|
|
|
|
|
font-size: 12px; |
|
|
|
|
|
top: 0; |
|
|
|
|
|
left: 0; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |
|
|
|