From 82fbb393cc0afb6f6614c4c032225312712d757a Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期二, 03 九月 2024 09:55:38 +0800
Subject: [PATCH] bug修改

---
 src/assets/images/user.png                                                  |    0 
 src/views/onlineEducation/systemManage/company/components/companyDialog.vue |    2 +-
 src/views/onlineEducation/count/index.vue                                   |   13 +++++++------
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/assets/images/user.png b/src/assets/images/user.png
new file mode 100644
index 0000000..3b565f9
--- /dev/null
+++ b/src/assets/images/user.png
Binary files differ
diff --git a/src/views/onlineEducation/count/index.vue b/src/views/onlineEducation/count/index.vue
index 4efa22c..8dd1a9e 100644
--- a/src/views/onlineEducation/count/index.vue
+++ b/src/views/onlineEducation/count/index.vue
@@ -139,7 +139,7 @@
     state.dataList = res.data.list.map(item => {
       return {
         ...item,
-        passRate: item.passStudentCount!=null && item.paperStudentCount!=null ? (item.passStudentCount / item.paperStudentCount).toFixed(2) *100 + '%': ''
+        passRate: item.passStudentCount  && item.paperStudentCount ? (item.passStudentCount / item.paperStudentCount).toFixed(2) *100 + '%': item.passStudentCount == 0  && item.paperStudentCount == 0? '0%': ''
 
       }
     })
@@ -186,11 +186,12 @@
 //   }, 500)
 // }
 const setDate = () => {
-  let isDate = new Date()
-  let sTime = `${isDate.getFullYear()}-${isDate.getMonth() + 1}-${isDate.getDate()-7}`
-  let eTime = `${isDate.getFullYear()}-${isDate.getMonth() + 1}-${isDate.getDate()}`
-  sTime = `${sTime}`
-  eTime = `${eTime}`
+
+  const end = new Date();
+  const start = new Date();
+  start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+  const sTime = moment(start).format('YYYY-MM-DD')
+  const eTime = moment(end).format('YYYY-MM-DD')
   searchTime.value = [sTime,eTime];
   state.queryParams.startTime = searchTime.value[0]+' 00:00:00'
   state.queryParams.endTime = searchTime.value[1]+' 00:00:00'
diff --git a/src/views/onlineEducation/systemManage/company/components/companyDialog.vue b/src/views/onlineEducation/systemManage/company/components/companyDialog.vue
index e1f4c63..047d46d 100644
--- a/src/views/onlineEducation/systemManage/company/components/companyDialog.vue
+++ b/src/views/onlineEducation/systemManage/company/components/companyDialog.vue
@@ -139,7 +139,7 @@
   length.value = value.listLength
   title.value = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '分配课时' ;
   if(type === 'edit' || type === 'distribute') {
-    state.form = value;
+    state.form = JSON.parse(JSON.stringify(value));
     state.form.totalPeriod = value.totalPeriod / 60;
     state.form.remainPeriod = value.remainPeriod/60;
     startUsername.value = value.username

--
Gitblit v1.9.2