|
@@ -0,0 +1,843 @@
|
|
|
|
+
|
|
|
|
+<template>
|
|
|
|
+ <div class='exam-process-list-item'>
|
|
|
|
+ <div class="examprocess-body-content">
|
|
|
|
+ <div class="examprocess-body-content-title">
|
|
|
|
+ {{Item.title}}
|
|
|
|
+ </div>
|
|
|
|
+ <div class="examprocess-body-content-dot" >
|
|
|
|
+ <div :class="chooseType(Item.point)" :style="`background-color:${Item.backgroundcolor}`">
|
|
|
|
+ {{Item.point==1?'开始':Item.point==4?'结束':''}}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="examprocess-body-content-date">
|
|
|
|
+ {{Item.date}}
|
|
|
|
+ </div>
|
|
|
|
+ <div class="examprocess-body-content-time">
|
|
|
|
+ {{Item.time}}
|
|
|
|
+ </div>
|
|
|
|
+ <div class="examprocess-body-content-details" :style="`color:${Item.color}`">
|
|
|
|
+ {{Item.content}}
|
|
|
|
+ <span class="examprocess-body-content-details-time" :style="`color:${Item.timecolor}`">
|
|
|
|
+ {{Item.timeConsum}}
|
|
|
|
+ </span>
|
|
|
|
+ <span class="examprocess-body-content-details-matter" :style="`color:${Item.othercolor}`">
|
|
|
|
+ {{Item.other}}
|
|
|
|
+ </span>
|
|
|
|
+ <span class="examprocess-body-content-details-button" @click="showDialog(Item)">
|
|
|
|
+ {{isShowButton(Item)}}
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <el-dialog :visible.sync="dialogshow_card" :show-close="false" width="26%" center top="20%" >
|
|
|
|
+ <div style="height:20px;"/>
|
|
|
|
+ <div style="display: flex;flex-direction: column;align-items: start;margin: 0px 20px;">
|
|
|
|
+ <div style="text-align:center;width: 100%;"><span style="color:#6abc69">平均扫描耗时:</span>{{this.dialogshow_card_data.scan_time_avg}}</div>
|
|
|
|
+ <div style="text-align:center;width: 100%;"><span style="color:#6abc69">答卷平均上传耗时:</span>{{this.dialogshow_card_data.upload_card_time_avg}}</div>
|
|
|
|
+ <div style="text-align:center;width: 100%;"><span style="color:#6abc69">原卷平均上传耗时:</span>{{this.dialogshow_card_data.upload_paper_time_avg}}</div>
|
|
|
|
+ </div>
|
|
|
|
+ <div style="height:20px;"/>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
|
|
+ <el-dialog :visible.sync="dialogshow_backlog" :show-close="false" width="50%" center top="20%">
|
|
|
|
+ <div style="height:20px;"/>
|
|
|
|
+ <class-detail :arrayList="dialogshow_backlog_data"/>
|
|
|
|
+ <div style="height:20px;"/>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
|
|
+ <el-dialog :visible.sync="dialogshow_class" :show-close="false" width="50%" center top="20%">
|
|
|
|
+ <div style="height:20px;"/>
|
|
|
|
+ <class-detail :arrayList="dialogshow_class_data"/>
|
|
|
|
+ <div style="height:20px;"/>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
|
|
+ <el-dialog :visible.sync="dialogshow_product" :show-close="false" class="lucency">
|
|
|
|
+ <div style="height: 30px;line-height: 30px;margin-bottom:10px;" v-if="Item.product_type">
|
|
|
|
+ <el-tabs v-model="activeName" @tab-click="handleClick" type="border-card">
|
|
|
|
+ <el-tab-pane v-for="item in Object.keys(dialogshow_product_data_list)" :key="item" :label="productName(item)" :name="item">
|
|
|
|
+ <div style="display: flex;height: 30px;line-height: 30px;justify-content: space-between;margin-bottom:30px;">
|
|
|
|
+ <span style="color:#6abc69">共计需生成{{student_count}}人</span>
|
|
|
|
+ <el-button type="text" @click="dialogshow_product_class = true">展开班级详情</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <product-detail :arrayList="dialogshow_product_data"/>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+ </el-tabs>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <el-dialog
|
|
|
|
+ :show-close="false"
|
|
|
|
+ width="40%"
|
|
|
|
+ :visible.sync="dialogshow_product_class"
|
|
|
|
+ append-to-body>
|
|
|
|
+ <div style="height: 30px;line-height: 30px;margin-bottom:10px;" v-if="Item.product_type">
|
|
|
|
+ <el-tabs v-model="activeName_class" @tab-click="handleClick_class" type="border-card">
|
|
|
|
+ <el-tab-pane v-for="item in Object.keys(dialogshow_product_data_class_list)" :key="item" :label="productName(item)" :name="item">
|
|
|
|
+ <div style="display: flex;height: 30px;line-height: 30px;justify-content: space-between;margin-bottom:30px;">
|
|
|
|
+ <span style="color:#6abc69">共计需生成{{student_count_class}}人</span>
|
|
|
|
+ </div>
|
|
|
|
+ <product-detail-class :arrayList="dialogshow_product_data_class"/>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+ </el-tabs>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+<script >
|
|
|
|
+import ClassDetail from "./ClassDetail.vue";
|
|
|
|
+import ProductDetail from "./ProductDetail.vue";
|
|
|
|
+import ProductDetailClass from "./ProductDetailClass.vue";
|
|
|
|
+import {
|
|
|
|
+ getExamProcessClass,
|
|
|
|
+ getExamProcessProduct,
|
|
|
|
+} from "../../api/examprocess/examprocess";
|
|
|
|
+import {getFormData} from "@/lib/util.js"
|
|
|
|
+export default ({
|
|
|
|
+ name:'',
|
|
|
|
+ components: {
|
|
|
|
+ ClassDetail,
|
|
|
|
+ ProductDetail,
|
|
|
|
+ ProductDetailClass
|
|
|
|
+ },
|
|
|
|
+ props: {
|
|
|
|
+ Item:Object,
|
|
|
|
+ index:Number,
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ data(){
|
|
|
|
+ return {
|
|
|
|
+ dialogshow_card:false,
|
|
|
|
+ dialogshow_card_data:{},
|
|
|
|
+
|
|
|
|
+ dialogshow_backlog:false,
|
|
|
|
+ dialogshow_backlog_data:[],
|
|
|
|
+
|
|
|
|
+ dialogshow_class:false,
|
|
|
|
+ dialogshow_class_data:[],
|
|
|
|
+
|
|
|
|
+ dialogshow_product:false,
|
|
|
|
+ dialogshow_product_data:[],
|
|
|
|
+ dialogshow_product_data_list:[],
|
|
|
|
+ student_count:'',
|
|
|
|
+ activeName: '',
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ dialogshow_product_class:false,
|
|
|
|
+ dialogshow_product_data_class:[],
|
|
|
|
+ dialogshow_product_data_class_list:[],
|
|
|
|
+ student_count_class:'',
|
|
|
|
+ activeName_class: '',
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ watch: {
|
|
|
|
+ dialogshow_product:{
|
|
|
|
+ handler: function(newVal,oldVal) {
|
|
|
|
+ this.activeName = '';
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ dialogshow_product_data:{
|
|
|
|
+ handler: function(newVal,oldVal) {
|
|
|
|
+ this.activeName=Object.keys(this.dialogshow_product_data_list)[0]
|
|
|
|
+ },
|
|
|
|
+ // immediate: true,
|
|
|
|
+ // deep: true
|
|
|
|
+ },
|
|
|
|
+ dialogshow_product_class:{
|
|
|
|
+ handler: function(newVal,oldVal) {
|
|
|
|
+ this.activeName_class = '';
|
|
|
|
+ if(newVal){
|
|
|
|
+ let obj = {
|
|
|
|
+ examGroupId:this.$route.query.examGroupId
|
|
|
|
+ // examGroupId:'876667915794558976'
|
|
|
|
+ // examGroupId:'877110590882619392' //含待办
|
|
|
|
+ // examGroupId:'877115916298133504' //含待办
|
|
|
|
+ // examGroupId:'877091508825268224' //第三方
|
|
|
|
+ };
|
|
|
|
+ let examGroupId = getFormData(obj);
|
|
|
|
+ getExamProcessClass(examGroupId).then((res) => {
|
|
|
|
+ this.dialogshow_product_data_class_list = res.data
|
|
|
|
+ this.activeName_class=Object.keys(this.dialogshow_product_data_class_list)[0]
|
|
|
|
+ this.dialogshow_product_data_class = this.filterClass(res.data[Object.keys(res.data)[0]],this.productName(Object.keys(res.data)[0]))
|
|
|
|
+ this.student_count_class = res.data[Object.keys(res.data)[0]].student_count;
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // immediate: true,
|
|
|
|
+ // deep: true
|
|
|
|
+ },
|
|
|
|
+ Item: {
|
|
|
|
+ handler: function(newVal,oldVal) {
|
|
|
|
+ // debugger
|
|
|
|
+ },
|
|
|
|
+ immediate: true
|
|
|
|
+ // deep: true
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ created (){
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ mounted (){
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ handleClick() {
|
|
|
|
+ this.dialogshow_product_data = this.filterProduct(this.dialogshow_product_data_list[this.activeName],this.productName(this.activeName))
|
|
|
|
+ this.student_count = this.dialogshow_product_data_list[this.activeName].student_count;
|
|
|
|
+ },
|
|
|
|
+ handleClick_class() {
|
|
|
|
+ this.dialogshow_product_data_class = this.filterClass(this.dialogshow_product_data_class_list[this.activeName_class],this.productName(this.activeName_class))
|
|
|
|
+ this.student_count_class = this.dialogshow_product_data_class_list[this.activeName_class].student_count;
|
|
|
|
+ },
|
|
|
|
+ productName(key){
|
|
|
|
+ // 产品名称
|
|
|
|
+ switch (key) {
|
|
|
|
+ case '1': return '错题本';
|
|
|
|
+ case '2': return '个性化学习方案';
|
|
|
|
+ case '3': return '个性化学习宝';
|
|
|
|
+ case '31': return '方法宝';
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ isShowButton(item){
|
|
|
|
+ // 什么情况下展示什么按钮的逻辑
|
|
|
|
+ if(item.content=='答题卡已全部上传完成'){
|
|
|
|
+ return '查看详情'
|
|
|
|
+ }
|
|
|
|
+ if(item.content=='已点击待办'){
|
|
|
|
+ return '展开班级详情'
|
|
|
|
+ }
|
|
|
|
+ if(item.content=='已开始阅卷'){
|
|
|
|
+ return '展开班级详情'
|
|
|
|
+ }
|
|
|
|
+ if(item.content&&item.content.includes('已开始生成产品')){
|
|
|
|
+ return '查看详情'
|
|
|
|
+ }
|
|
|
|
+ return ''
|
|
|
|
+ },
|
|
|
|
+ showDialog(item){
|
|
|
|
+ // 掉函数看要展示哪个弹窗 调用哪个接口
|
|
|
|
+ if(item.content=='答题卡已全部上传完成'){
|
|
|
|
+ this.dialogshow_card = true;
|
|
|
|
+ this.dialogshow_card_data = {
|
|
|
|
+ scan_time_avg:item.scan_time_avg,
|
|
|
|
+ upload_card_time_avg:item.upload_card_time_avg,
|
|
|
|
+ upload_paper_time_avg:item.upload_paper_time_avg
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(item.content=='已点击待办'){
|
|
|
|
+ this.dialogshow_backlog = true;
|
|
|
|
+ this.dialogshow_backlog_data = item.classes
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if(item.content=='已开始阅卷'){
|
|
|
|
+ this.dialogshow_class = true;
|
|
|
|
+ this.dialogshow_class_data = this.filterMarking(
|
|
|
|
+ item.class_marking_info,item.marking_start_time,item.marking_end_time)
|
|
|
|
+ }
|
|
|
|
+ if(item.content&&item.content.includes('已开始生成产品')){
|
|
|
|
+ this.dialogshow_product = true;
|
|
|
|
+
|
|
|
|
+ let obj = {
|
|
|
|
+ examGroupId:this.$route.query.examGroupId
|
|
|
|
+ // examGroupId:'876667915794558976'
|
|
|
|
+ // examGroupId:'877110590882619392' //含待办
|
|
|
|
+ // examGroupId:'877115916298133504' //含待办
|
|
|
|
+ // examGroupId:'877091508825268224' //第三方
|
|
|
|
+ };
|
|
|
|
+ let examGroupId = getFormData(obj);
|
|
|
|
+ getExamProcessProduct(examGroupId).then((res) => {
|
|
|
|
+ this.dialogshow_product_data_list = res.data
|
|
|
|
+ this.dialogshow_product_data = this.filterProduct(res.data[Object.keys(res.data)[0]],this.productName(Object.keys(res.data)[0]))
|
|
|
|
+ this.student_count = res.data[Object.keys(res.data)[0]].student_count;
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ filterMarking(classArr,start,end){//阅卷班级详情
|
|
|
|
+
|
|
|
|
+ // 新增排序效果 后端对进度做了排序 但这里的时间同时也是进度时间 完成时间 即进度排序等于时间排序 前端无需排序
|
|
|
|
+ let arr = [];
|
|
|
|
+ // 开始
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'开始阅卷',
|
|
|
|
+ point: 3,
|
|
|
|
+ date: this.revtimeToStringDate(start),
|
|
|
|
+ time: this.revtimeToStringTime(start),
|
|
|
|
+ content : `开始阅卷`,
|
|
|
|
+ })
|
|
|
|
+ arr.push({title:'',point:2})
|
|
|
|
+
|
|
|
|
+ // 空时间排序
|
|
|
|
+ classArr.forEach((it,index)=>{
|
|
|
|
+ if(!it.class_marking_end_time||it.class_marking_end_time==0){
|
|
|
|
+ it.sortime=Math.floor(new Date().getTime()/1000)
|
|
|
|
+ }else{
|
|
|
|
+ it.sortime=it.class_marking_end_time
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ classArr&&classArr.sort((it1,it2)=>{
|
|
|
|
+ return it1.sortime- it2.sortime
|
|
|
|
+ })
|
|
|
|
+ classArr.forEach((it,index)=>{
|
|
|
|
+ if(it.class_marking_end_time&&it.class_marking_end_time!='0'){
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'',
|
|
|
|
+ point: 3,
|
|
|
|
+ date: index==0?this.revtimeToStringDate(start)==this.revtimeToStringDate(it.class_marking_end_time)?'':this.revtimeToStringDate(it.class_marking_end_time)
|
|
|
|
+ :this.revtimeToStringDate(classArr[index-1].class_marking_end_time)==this.revtimeToStringDate(it.class_marking_end_time)?'':this.revtimeToStringDate(it.class_marking_end_time),
|
|
|
|
+ time: this.revtimeToStringTime(it.class_marking_end_time),
|
|
|
|
+ content : `【${it.class_name}】已完成阅卷`,
|
|
|
|
+ })
|
|
|
|
+ arr.push({title:'',point:2})
|
|
|
|
+ }else{
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'',
|
|
|
|
+ point: 3,
|
|
|
|
+ date: index==0?this.revtimeToStringDate(start)==this.revtimeToStringDate(it.class_marking_end_time)?'':this.revtimeToStringDate(it.class_marking_end_time)
|
|
|
|
+ :this.revtimeToStringDate(classArr[index-1].class_marking_end_time)==this.revtimeToStringDate(it.class_marking_end_time)?'':this.revtimeToStringDate(it.class_marking_end_time),
|
|
|
|
+ time: this.revtimeToStringTime(it.class_marking_end_time),
|
|
|
|
+ content : `【${it.class_name}】已完成${it.class_marking_process}%`,
|
|
|
|
+ color:'#cccccc',
|
|
|
|
+ backgroundcolor:'#cccccc'
|
|
|
|
+ })
|
|
|
|
+ arr.push({title:'',point:2})
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ if(end&&end!='0'){
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'完成阅卷',
|
|
|
|
+ point: 3,
|
|
|
|
+ date: this.revtimeToStringDate(end),
|
|
|
|
+ time: this.revtimeToStringTime(end),
|
|
|
|
+ content : `已全部完成阅卷`,
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ return arr;
|
|
|
|
+ },
|
|
|
|
+ filterClass(obj,name){//产品班级详情
|
|
|
|
+
|
|
|
|
+ // 空时间排序
|
|
|
|
+ obj.create&&obj.create.forEach((it,index)=>{
|
|
|
|
+ if(!it.product_create_time||it.product_create_time==0){
|
|
|
|
+ it.sortime=Math.floor(new Date().getTime()/1000)
|
|
|
|
+ }else{
|
|
|
|
+ it.sortime=it.product_create_time
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ obj.download&&obj.download.forEach((it,index)=>{
|
|
|
|
+ if(!it.product_download_time||it.product_download_time==0){
|
|
|
|
+ it.sortime=Math.floor(new Date().getTime()/1000)
|
|
|
|
+ }else{
|
|
|
|
+ it.sortime=it.product_download_time
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ obj.signature&&obj.signature.forEach((it,index)=>{
|
|
|
|
+ if(!it.signatureTime||it.signatureTime==0){
|
|
|
|
+ it.sortime=Math.floor(new Date().getTime()/1000)
|
|
|
|
+ }else{
|
|
|
|
+ it.sortime=Math.floor(new Date(it.signatureTime.replace(/-/g, '/')).getTime()/1000);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // 班级时间排序 obj.create obj.download obj.signature
|
|
|
|
+ obj.create&&obj.create.sort((it1,it2)=>{
|
|
|
|
+ return it1.sortime- it2.sortime
|
|
|
|
+ })
|
|
|
|
+ obj.download&&obj.download.sort((it1,it2)=>{
|
|
|
|
+ return it1.sortime- it2.sortime
|
|
|
|
+ })
|
|
|
|
+ obj.signature&&obj.signature.sort((it1,it2)=>{
|
|
|
|
+ return it1.sortime- it2.sortime
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ // 复合排序 再根据状态排一次
|
|
|
|
+ obj.create&&obj.create.sort((it1,it2)=>{
|
|
|
|
+ return it2.all_created - it1.all_created
|
|
|
|
+ })
|
|
|
|
+ obj.download&&obj.download.sort((it1,it2)=>{
|
|
|
|
+ return it2.all_downloaded - it1.all_downloaded
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ let arr = [];
|
|
|
|
+ // 生成
|
|
|
|
+ if(obj.product_create_start_time&&obj.product_create_start_time!='0'&&obj.create&&Object.keys(obj.create).length>0){
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'生成',
|
|
|
|
+ point: 3,
|
|
|
|
+ date: this.revtimeToStringDate(obj.product_create_start_time),
|
|
|
|
+ time: this.revtimeToStringTime(obj.product_create_start_time),
|
|
|
|
+ content : `【${name}】已开始生成`,
|
|
|
|
+ })
|
|
|
|
+ arr.push({title:'',point:2})
|
|
|
|
+ Object.keys(obj.create).forEach((item,index)=>{
|
|
|
|
+ if(obj.create[item].all_created==1&&obj.create[item].product_create_time&&obj.create[item].product_create_time!='0'){
|
|
|
|
+ // 已全部生成
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'',
|
|
|
|
+ point: 3,
|
|
|
|
+ date: index==0?this.revtimeToStringDate(obj.product_create_start_time)==this.revtimeToStringDate(obj.create[item].product_create_time)?'':this.revtimeToStringDate(obj.create[item].product_create_time)
|
|
|
|
+ :this.revtimeToStringDate(obj.create[Object.keys(obj.create)[index-1]].product_create_time)==this.revtimeToStringDate(obj.create[item].product_create_time)?'':this.revtimeToStringDate(obj.create[item].product_create_time),
|
|
|
|
+ time: this.revtimeToStringTime(obj.create[item].product_create_time),
|
|
|
|
+ content : `【${obj.create[item].class_name}】已全部生成`,
|
|
|
|
+ color:'#606266', //待补全 未给颜色却展示灰色 879927376903733248
|
|
|
|
+ })
|
|
|
|
+ }else if(obj.create[item].all_created==0&&obj.create[item].product_create_time&&obj.create[item].product_create_time!='0'){
|
|
|
|
+ // 未全部生成
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'',
|
|
|
|
+ point: 3,
|
|
|
|
+ content : `【${obj.create[item].class_name}】生成中`,
|
|
|
|
+ backgroundcolor:'#cccccc',
|
|
|
|
+ color:'#cccccc'
|
|
|
|
+ })
|
|
|
|
+ }else if(obj.create[item].all_created==0&&(!obj.create[item].product_create_time||obj.create[item].product_create_time=='0')){
|
|
|
|
+ // 未开始生成
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'',
|
|
|
|
+ point: 3,
|
|
|
|
+ content : `【${obj.create[item].class_name}】未开始生成`,
|
|
|
|
+ backgroundcolor:'#cccccc',
|
|
|
|
+ color:'#cccccc'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ arr.push({title:'',point:2})
|
|
|
|
+ })
|
|
|
|
+ let len = 0;
|
|
|
|
+ Object.keys(obj.create).forEach(it=>{
|
|
|
|
+ if(obj.create[it].all_created==1){
|
|
|
|
+ len++;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ if(len==Object.keys(obj.create).length){
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'',
|
|
|
|
+ point: 3,
|
|
|
|
+ content : `【${name}】已全部生成完成`,
|
|
|
|
+ date: '',
|
|
|
|
+ time: this.revtimeToStringTime(obj.create[Object.keys(obj.create)[Object.keys(obj.create).length-1]].product_create_time),
|
|
|
|
+ timeConsum:`生成${this.timeConsum(obj.product_create_start_time,obj.product_create_end_time)}`
|
|
|
|
+ })
|
|
|
|
+ arr.push({title:'',point:2})
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ // arr.push({
|
|
|
|
+ // title:'生成',
|
|
|
|
+ // point: 3,
|
|
|
|
+ // content : `未开始生成【${name}】`,
|
|
|
|
+ // color:'#cccccc',
|
|
|
|
+ // backgroundcolor:'#cccccc'
|
|
|
|
+ // })
|
|
|
|
+ // arr.push({title:'',point:2})
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 下载/云印
|
|
|
|
+ if(obj.product_download_start_time&&obj.product_download_start_time!="0"&&obj.download&&Object.keys(obj.download).length>0){
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'下载/云印',
|
|
|
|
+ point: 3,
|
|
|
|
+ date: this.revtimeToStringDate(obj.product_download_start_time),
|
|
|
|
+ time: this.revtimeToStringTime(obj.product_download_start_time),
|
|
|
|
+ content : `【${name}】已开始下载/已发送云印任务`,
|
|
|
|
+ })
|
|
|
|
+ arr.push({title:'',point:2})
|
|
|
|
+ Object.keys(obj.download).forEach((item,index)=>{
|
|
|
|
+ if(obj.download[item].all_downloaded==1&&obj.download[item].product_download_time&&obj.download[item].product_download_time!='0'){
|
|
|
|
+ // 已全部下载
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'',
|
|
|
|
+ point: 3,
|
|
|
|
+ date: index==0?this.revtimeToStringDate(obj.product_download_start_time)==this.revtimeToStringDate(obj.download[item].product_download_time)?'':this.revtimeToStringDate(obj.download[item].product_download_time)
|
|
|
|
+ :this.revtimeToStringDate(obj.download[item-1].product_download_time)==this.revtimeToStringDate(obj.download[item].product_download_time)?'':this.revtimeToStringDate(obj.download[item].product_download_time),
|
|
|
|
+ time: this.revtimeToStringTime(obj.download[item].product_download_time),
|
|
|
|
+ content : `【${obj.download[item].class_name}】已全部下载`,
|
|
|
|
+ color:'#606266' //待补全 未给颜色却展示灰色 879927376903733248
|
|
|
|
+ })
|
|
|
|
+ }else if(obj.download[item].all_downloaded==0&&obj.download[item].product_download_time&&obj.download[item].product_download_time!='0'){
|
|
|
|
+ // 未全部下载
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'',
|
|
|
|
+ point: 3,
|
|
|
|
+ content : `【${obj.download[item].class_name}】下载中`,
|
|
|
|
+ backgroundcolor:'#cccccc',
|
|
|
|
+ color:'#cccccc'
|
|
|
|
+ })
|
|
|
|
+ }else if(obj.download[item].all_downloaded==0&&(!obj.download[item].product_download_time||obj.download[item].product_download_time=='0')){
|
|
|
|
+ // 未开始下载
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'',
|
|
|
|
+ point: 3,
|
|
|
|
+ content : `【${obj.download[item].class_name}】未开始下载`,
|
|
|
|
+ backgroundcolor:'#cccccc',
|
|
|
|
+ color:'#cccccc'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ arr.push({title:'',point:2})
|
|
|
|
+ })
|
|
|
|
+ let len = 0;
|
|
|
|
+ Object.keys(obj.download).forEach(it=>{
|
|
|
|
+ if(obj.download[it].all_downloaded==1){
|
|
|
|
+ len++;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ if(len==Object.keys(obj.download).length){
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'',
|
|
|
|
+ point: 3,
|
|
|
|
+ content : `【${name}】已全部下载完成`,
|
|
|
|
+ date: '',
|
|
|
|
+ time: this.revtimeToStringTime(obj.download[Object.keys(obj.download)[Object.keys(obj.download).length-1]].product_download_time),
|
|
|
|
+ timeConsum:`下载${this.timeConsum(obj.product_download_start_time,obj.product_download_end_time)}`
|
|
|
|
+ })
|
|
|
|
+ arr.push({title:'',point:2})
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+ // arr.push({
|
|
|
|
+ // title:'下载/云印',
|
|
|
|
+ // point: 3,
|
|
|
|
+ // content : `【${name}】未开始下载/发送云印任务`,
|
|
|
|
+ // color:'#cccccc',
|
|
|
|
+ // backgroundcolor:'#cccccc'
|
|
|
|
+ // })
|
|
|
|
+ // arr.push({title:'',point:2})
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // 签收
|
|
|
|
+ if(obj.signature_begin_time&&obj.signature&&obj.signature.length>0){
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'签收',
|
|
|
|
+ point: 3,
|
|
|
|
+ date: obj.signature_begin_time.slice(0,10),
|
|
|
|
+ time: obj.signature_begin_time.slice(11),
|
|
|
|
+ content : `【${name}】已开始签收`,
|
|
|
|
+ })
|
|
|
|
+ arr.push({title:'',point:2})
|
|
|
|
+ obj.signature.forEach((item,index)=>{
|
|
|
|
+ if(item.signatureTime!=null){
|
|
|
|
+ // 已签收 待补全 待测试
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'',
|
|
|
|
+ point: 3,
|
|
|
|
+ date: index==0?
|
|
|
|
+ obj.signature_begin_time.slice(0,10)==item.signatureTime.slice(0,10)?'':item.signatureTime.slice(0,10)
|
|
|
|
+ :obj.signature[index-1].signatureTime.slice(0,10)==item.signatureTime.slice(0,10)?'':item.signatureTime.slice(0,10),
|
|
|
|
+ time: item.signatureTime.slice(11),
|
|
|
|
+ content : `【${item.clazzName}】已签收`,
|
|
|
|
+ color:'#606266' //待补全 未给颜色却展示灰色 879927376903733248
|
|
|
|
+ })
|
|
|
|
+ }else if(item.signatureTime==null){
|
|
|
|
+ // 未全部生成
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'',
|
|
|
|
+ point: 3,
|
|
|
|
+ content : `【${item.clazzName}】未签收`,
|
|
|
|
+ backgroundcolor:'#cccccc',
|
|
|
|
+ color:'#cccccc'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ arr.push({title:'',point:2})
|
|
|
|
+ })
|
|
|
|
+ let len = 0;
|
|
|
|
+ obj.signature.forEach(it=>{
|
|
|
|
+ if(it.signatureTime!=null){
|
|
|
|
+ len++;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ if(len==obj.signature.length){
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'',
|
|
|
|
+ point: 3,
|
|
|
|
+ content : `【${name}】已全部签收`,
|
|
|
|
+ color:'#606266', //待补全 未给颜色却展示灰色 879927376903733248
|
|
|
|
+ date: '',
|
|
|
|
+ time: obj.signature[obj.signature.length-1].signatureTime.slice(11),
|
|
|
|
+ timeConsum:`签收${this.timeConsum(new Date(obj.signature_begin_time.replace(/-/g, '/')).getTime()/1000,new Date(obj.signature_end_time.replace(/-/g, '/')).getTime()/1000)}`
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+ // arr.push({
|
|
|
|
+ // title:'签收',
|
|
|
|
+ // point: 3,
|
|
|
|
+ // content : `【${name}】未开始下载/发送云印任务`,
|
|
|
|
+ // color:'#cccccc',
|
|
|
|
+ // backgroundcolor:'#cccccc'
|
|
|
|
+ // })
|
|
|
|
+ }
|
|
|
|
+ return arr;
|
|
|
|
+ },
|
|
|
|
+ filterProduct(obj,name){
|
|
|
|
+ let arr = [];
|
|
|
|
+
|
|
|
|
+ // 生成
|
|
|
|
+ if(obj.create_start_time&&obj.create_start_time!='0'){
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'生成',
|
|
|
|
+ point: 3,
|
|
|
|
+ date: this.revtimeToStringDate(obj.create_start_time),
|
|
|
|
+ time: this.revtimeToStringTime(obj.create_start_time),
|
|
|
|
+ content : `【${name}】已开始生成`,
|
|
|
|
+ })
|
|
|
|
+ arr.push({title:'',point:2})
|
|
|
|
+ }else{
|
|
|
|
+ // arr.push({
|
|
|
|
+ // title:'',
|
|
|
|
+ // point: 3,
|
|
|
|
+ // backgroundcolor:'#cccccc'
|
|
|
|
+ // })
|
|
|
|
+ // arr.push({title:'',point:2})
|
|
|
|
+ // return arr;
|
|
|
|
+ }
|
|
|
|
+ if(obj.create_end_time&&obj.create_end_time!='0'){
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'',
|
|
|
|
+ point: 3,
|
|
|
|
+ date: this.revtimeToStringDate(obj.create_start_time)==this.revtimeToStringDate(obj.create_end_time)?'':this.revtimeToStringDate(obj.create_end_time),
|
|
|
|
+ time: this.revtimeToStringTime(obj.create_end_time),
|
|
|
|
+ content : `【${name}】已全部生成`,
|
|
|
|
+ color:'#606266', //待补全 未给颜色却展示灰色 879927376903733248
|
|
|
|
+ timeConsum:this.timeConsum(obj.create_start_time,obj.create_end_time)
|
|
|
|
+ })
|
|
|
|
+ arr.push({title:'',point:2})
|
|
|
|
+ }else{
|
|
|
|
+ // arr.push({
|
|
|
|
+ // title:'',
|
|
|
|
+ // point: 3,
|
|
|
|
+ // backgroundcolor:'#cccccc'
|
|
|
|
+ // })
|
|
|
|
+ // arr.push({title:'',point:2})
|
|
|
|
+ // return arr;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 下载
|
|
|
|
+ if(obj.download_first_time&&obj.download_first_time!='0'){
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'下载/云印',
|
|
|
|
+ point: 3,
|
|
|
|
+ date: this.revtimeToStringDate(obj.download_first_time),
|
|
|
|
+ time: this.revtimeToStringTime(obj.download_first_time),
|
|
|
|
+ content : `【${name}】已开始下载`,
|
|
|
|
+ })
|
|
|
|
+ arr.push({title:'',point:2})
|
|
|
|
+ }else{
|
|
|
|
+ // arr.push({
|
|
|
|
+ // title:'',
|
|
|
|
+ // point: 3,
|
|
|
|
+ // backgroundcolor:'#cccccc'
|
|
|
|
+ // })
|
|
|
|
+ // arr.push({title:'',point:2})
|
|
|
|
+ // return arr;
|
|
|
|
+ }
|
|
|
|
+ if(obj.download_last_time&&obj.download_last_time!='0'){
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'',
|
|
|
|
+ point: 3,
|
|
|
|
+ date: this.revtimeToStringDate(obj.download_first_time)==this.revtimeToStringDate(obj.download_last_time)?'':this.revtimeToStringDate(obj.download_last_time),
|
|
|
|
+ time: this.revtimeToStringTime(obj.download_last_time),
|
|
|
|
+ content : `【${name}】已全部下载完成`,
|
|
|
|
+ timeConsum:this.timeConsum(obj.download_first_time,obj.download_last_time)
|
|
|
|
+ })
|
|
|
|
+ arr.push({title:'',point:2})
|
|
|
|
+ }else{
|
|
|
|
+ // arr.push({
|
|
|
|
+ // title:'',
|
|
|
|
+ // point: 3,
|
|
|
|
+ // backgroundcolor:'#cccccc'
|
|
|
|
+ // })
|
|
|
|
+ // arr.push({title:'',point:2})
|
|
|
|
+ // return arr;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 签收
|
|
|
|
+ if(obj.signature.signature_begin_time&&obj.signature.signature_begin_time!='0'){
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'签收',
|
|
|
|
+ point: 3,
|
|
|
|
+ date: obj.signature.signature_begin_time.slice(0,10),
|
|
|
|
+ time: obj.signature.signature_begin_time.slice(11),
|
|
|
|
+ content : `【${name}】已开始签收`,
|
|
|
|
+ })
|
|
|
|
+ arr.push({title:'',point:2})
|
|
|
|
+ }else{
|
|
|
|
+ // arr.push({
|
|
|
|
+ // title:'',
|
|
|
|
+ // point: 3,
|
|
|
|
+ // backgroundcolor:'#cccccc'
|
|
|
|
+ // })
|
|
|
|
+ // arr.push({title:'',point:2})
|
|
|
|
+ // return arr;
|
|
|
|
+ }
|
|
|
|
+ if(obj.signature.signature_end_time&&obj.signature.signature_end_time!='0'){
|
|
|
|
+ arr.push({
|
|
|
|
+ title:'',
|
|
|
|
+ point: 3,
|
|
|
|
+ date: obj.signature.signature_begin_time.slice(0,10)==obj.signature.signature_end_time.slice(0,10)?'':obj.signature.signature_end_time.slice(0,10),
|
|
|
|
+ time: obj.signature.signature_end_time.slice(11),
|
|
|
|
+ content : `【${name}】已全部签收完成`,
|
|
|
|
+ timeConsum:`签收${this.timeConsum(new Date(obj.signature.signature_begin_time.replace(/-/g, '/')).getTime()/1000,new Date(obj.signature.signature_end_time.replace(/-/g, '/')).getTime()/1000)}`
|
|
|
|
+ })
|
|
|
|
+ arr.push({title:'',point:2})
|
|
|
|
+ }else{
|
|
|
|
+ // arr.push({
|
|
|
|
+ // title:'',
|
|
|
|
+ // point: 3,
|
|
|
|
+ // backgroundcolor:'#cccccc'
|
|
|
|
+ // })
|
|
|
|
+ // arr.push({title:'',point:2})
|
|
|
|
+ // return arr;
|
|
|
|
+ }
|
|
|
|
+ return arr;
|
|
|
|
+ },
|
|
|
|
+ chooseType(key){
|
|
|
|
+ switch (key) {
|
|
|
|
+ case 1: return 'examprocess-body-content-dot-start';
|
|
|
|
+ case 2: return 'examprocess-body-content-dot-line';
|
|
|
|
+ case 3: return 'examprocess-body-content-dot-content';
|
|
|
|
+ case 4: return 'examprocess-body-content-dot-end';
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ timeConsum(start,end){ //计算耗时 最大天最小秒
|
|
|
|
+ if(!start||!end){return null}
|
|
|
|
+ let d = '';
|
|
|
|
+ let date = '';
|
|
|
|
+ if(end=='single'){
|
|
|
|
+ d = start //非毫秒值时*1000
|
|
|
|
+ date = '';
|
|
|
|
+ }else{
|
|
|
|
+ d = (end-start); //非毫秒值时*1000
|
|
|
|
+ date = '共耗时';
|
|
|
|
+ }
|
|
|
|
+ if(start==end){return '共耗时0秒'}
|
|
|
|
+ let day = d/86400>=1?Math.floor(d/86400):0;
|
|
|
|
+ let hour = d%86400/3600>=1?Math.floor(d%86400/3600):0;
|
|
|
|
+ let minute = d%86400%3600/60>=1?Math.floor(d%86400%3600/60):0;
|
|
|
|
+ let second = d%86400%3600%60%60>=1?Math.floor(d%86400%3600%60):0;
|
|
|
|
+ date += day?`${day}天`:''
|
|
|
|
+ date += hour?`${hour}小时`:''
|
|
|
|
+ date += minute?`${minute}分钟`:''
|
|
|
|
+ date += second?`${second}秒`:''
|
|
|
|
+ return date;
|
|
|
|
+ },
|
|
|
|
+ revtimeToStringDate(timestamp){
|
|
|
|
+ if(!timestamp){return null}
|
|
|
|
+ let d = new Date(timestamp*1000); //非毫秒值时*1000
|
|
|
|
+ let date = (d.getFullYear()) + "-" +
|
|
|
|
+ (d.getMonth() + 1).toString().padStart(2,'0') + "-" +
|
|
|
|
+ (d.getDate()).toString().padStart(2,'0')
|
|
|
|
+ return date;
|
|
|
|
+ },
|
|
|
|
+ revtimeToStringTime(timestamp){
|
|
|
|
+ if(!timestamp){return null}
|
|
|
|
+ let d = new Date(timestamp*1000); //非毫秒值时*1000
|
|
|
|
+ let date =
|
|
|
|
+ (d.getHours()).toString().padStart(2,'0') + ":" +
|
|
|
|
+ (d.getMinutes()).toString().padStart(2,'0') + ":" +
|
|
|
|
+ (d.getSeconds()).toString().padStart(2,'0');
|
|
|
|
+ return date;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+})
|
|
|
|
+</script>
|
|
|
|
+<style scoped lang="less">
|
|
|
|
+/deep/ .el-dialog__body{
|
|
|
|
+ padding: 0px;
|
|
|
|
+}
|
|
|
|
+/deep/ .el-dialog__header{
|
|
|
|
+ padding: 0px;
|
|
|
|
+ height: 0px;
|
|
|
|
+}
|
|
|
|
+.exam-process-list-item{
|
|
|
|
+ .examprocess-body-content{
|
|
|
|
+ line-height: 20px;
|
|
|
|
+ height: 20px;
|
|
|
|
+ width: 100%;
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: row;
|
|
|
|
+ .examprocess-body-content-title{
|
|
|
|
+ width: 120px;
|
|
|
|
+ height: 20px;
|
|
|
|
+ text-align: right;
|
|
|
|
+ color:#3366ff;
|
|
|
|
+ // background-color: brown;
|
|
|
|
+ }
|
|
|
|
+ .examprocess-body-content-dot{
|
|
|
|
+ width: 40px;
|
|
|
|
+ height: 20px;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ .examprocess-body-content-dot-content{
|
|
|
|
+ width: 15px;
|
|
|
|
+ height: 15px;
|
|
|
|
+ border-radius: 50%;
|
|
|
|
+ background-color:#6abc69;
|
|
|
|
+ }
|
|
|
|
+ .examprocess-body-content-dot-start{
|
|
|
|
+ width: 30px;
|
|
|
|
+ height: 30px;
|
|
|
|
+ border-radius: 50%;
|
|
|
|
+ background-color:#ff6600;
|
|
|
|
+ color:#fff;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ line-height: 30px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ }
|
|
|
|
+ .examprocess-body-content-dot-end{
|
|
|
|
+ width: 30px;
|
|
|
|
+ height: 30px;
|
|
|
|
+ border-radius: 50%;
|
|
|
|
+ background-color:#ff6600;
|
|
|
|
+ color:#fff;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ line-height: 30px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ }
|
|
|
|
+ .examprocess-body-content-dot-line{
|
|
|
|
+ height: 20px;
|
|
|
|
+ width: 2px;
|
|
|
|
+ background-color:#e6e6e6;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .examprocess-body-content-date{
|
|
|
|
+ width: 80px;
|
|
|
|
+ height: 20px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ color:#3366ff;
|
|
|
|
+ // background-color:blueviolet;
|
|
|
|
+ }
|
|
|
|
+ .examprocess-body-content-time{
|
|
|
|
+ width: 80px;
|
|
|
|
+ height: 20px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ // background-color:cornflowerblue;
|
|
|
|
+ }
|
|
|
|
+ .examprocess-body-content-details{
|
|
|
|
+ width: 600px;
|
|
|
|
+ height: 20px;
|
|
|
|
+ // background-color:yellowgreen;
|
|
|
|
+ .examprocess-body-content-details-time{
|
|
|
|
+ margin: 0 5px;
|
|
|
|
+ color:#ff7e52;
|
|
|
|
+ }
|
|
|
|
+ .examprocess-body-content-details-button{
|
|
|
|
+ margin: 0 5px;
|
|
|
|
+ color:#3366ff;
|
|
|
|
+ cursor:pointer;
|
|
|
|
+ }
|
|
|
|
+ .examprocess-body-content-details-matter{
|
|
|
|
+ margin: 0 5px;
|
|
|
|
+ color:#ff0000
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</style>
|