JLBA202505130001_关于吉林银行新建AI智能培训系统的需求_修改首页跳转到任务详情页几个字段不对的问题
This commit is contained in:
+2
-2
@@ -5,14 +5,14 @@ ENV = 'development'
|
||||
#VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001'
|
||||
|
||||
|
||||
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
||||
#VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
|
||||
|
||||
|
||||
# DEV
|
||||
#VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
|
||||
|
||||
# sit
|
||||
#VITE_APP_BASE_API_Url = 'http://25.18.122.91:9786'
|
||||
VITE_APP_BASE_API_Url = 'http://25.18.122.91:9786'
|
||||
|
||||
# UAT
|
||||
# VITE_APP_BASE_API_Url = 'http://25.18.122.78:9786'
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
<view class="item-info-item inline-item">
|
||||
<view class="bg-block inline-item">
|
||||
<view class="bg-gray">
|
||||
<view class="bg-blue" :style="`width: ${ dataInfo.progress }%;`"></view>
|
||||
<view class="bg-blue" :style="`width: ${ progress };`"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="color-blue inline-item">{{dataInfo.progress}}%</view>
|
||||
<view class="color-blue inline-item">{{progress}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-btn">做任务</view>
|
||||
@@ -25,6 +25,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {computed } from 'vue';
|
||||
const props = defineProps({
|
||||
dataInfo: {
|
||||
default: () => ({
|
||||
@@ -33,6 +34,12 @@
|
||||
type: Object
|
||||
}
|
||||
})
|
||||
const progress = computed(() => {
|
||||
const total = props.dataInfo.sumCrs ?? props.dataInfo.taskNumber ?? 0;
|
||||
if (total === 0) return '0%';
|
||||
const completed = props.dataInfo.finishCrs ?? props.dataInfo.learnedNumber ?? 0;
|
||||
return Math.min(Math.round((completed / total) * 1000) / 10, 100) + '%';
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
page: 1,
|
||||
limit: 10
|
||||
});
|
||||
|
||||
const changeDate = (date) => {
|
||||
activeDate.value = date;
|
||||
getDataList(date, 1);
|
||||
@@ -91,7 +92,10 @@
|
||||
common.setPageCache('learning_tasks_details', {
|
||||
...item,
|
||||
taskId: item.id,
|
||||
taskName: item.name
|
||||
taskName: item.name,
|
||||
taskSums:item.planPersionNumber,
|
||||
taskFinishSums:item.realPersionNumber,
|
||||
ossAddr:item.ossKey,
|
||||
});
|
||||
common.navigateTo('/pages/learningTasks/details?taskId=' + item.id);
|
||||
break;
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
const total = item.value.sumCrs ?? item.value.taskNumber ?? 0;
|
||||
if (total === 0) return '0%';
|
||||
const completed = item.value.finishCrs ?? item.value.learnedNumber ?? 0;
|
||||
return Math.min(Math.round((completed / total) * 10000) / 100, 100) + '%';
|
||||
return Math.min(Math.round((completed / total) * 1000) / 10, 100) + '%';
|
||||
});
|
||||
const getStatusClass = (item) => {
|
||||
if (item.isFinish === '02') return 'completed';
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
} else {
|
||||
styleArray.push('not_unlocked');
|
||||
}
|
||||
console.log('styleArray', styleArray);
|
||||
// console.log('styleArray', styleArray);
|
||||
return styleArray;
|
||||
});
|
||||
|
||||
|
||||
@@ -94,13 +94,12 @@
|
||||
const data_list = ref([]);
|
||||
const total = ref(-1);
|
||||
const taskId = ref('');
|
||||
// const progress = computed(() => '30%');
|
||||
const progress = computed(() => {
|
||||
// 计算进度百分比(保留两位小数)
|
||||
const total = detailData.sumCrs ?? detailData.taskNumber ?? 0;
|
||||
if (total === 0) return '0%';
|
||||
const completed = detailData.finishCrs ?? detailData.learnedNumber ?? 0;
|
||||
return Math.min(Math.round((completed / total) * 10000) / 100, 100) + '%';
|
||||
return Math.min(Math.round((completed / total) * 1000) / 10, 100) + '%';
|
||||
});
|
||||
const queryList = async (pageNo, pageSize, from) => {
|
||||
const requests = [queryAllTraTaskCrsInfo({ taskId: taskId.value })];
|
||||
@@ -217,7 +216,7 @@
|
||||
onMounted(() => {
|
||||
pagingRef.value.reload();
|
||||
});
|
||||
onShow(() => {});
|
||||
|
||||
onLoad((e) => {
|
||||
taskId.value = e.taskId;
|
||||
const learning_tasks_details = getPageCache('learning_tasks_details');
|
||||
|
||||
Reference in New Issue
Block a user