xdd 1 周之前
父节点
当前提交
f85bd6f0f6
共有 3 个文件被更改,包括 42 次插入13 次删除
  1. 9 1
      src/api/qw/QwWorkTask.js
  2. 21 0
      src/views/qw/QwWorkTask/index.vue
  3. 12 12
      src/views/qw/QwWorkTask/qw/qwWorkTask.vue

+ 9 - 1
src/api/qw/QwWorkTask.js

@@ -17,6 +17,14 @@ export function getQwWorkTask(id) {
   })
 }
 
+export function glList(query) {
+  return request({
+    url: '/qw/qw/QwWorkTask/glList',
+    method: 'get',
+    params: query
+  })
+}
+
 // 新增企微任务看板
 export function addQwWorkTask(data) {
   return request({
@@ -50,4 +58,4 @@ export function exportQwWorkTask(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 21 - 0
src/views/qw/QwWorkTask/index.vue

@@ -53,6 +53,27 @@
           <span :style="getScoreStyle(scope.row.score)">{{ scope.row.score }}</span>
         </template>
       </el-table-column>
+      <el-table-column label="用户过往看课记录" align="center" width="200px">
+        <template slot-scope="scope">
+          <div style="display: flex; gap: 4px; justify-content: center;">
+	        <span
+            v-for="(log, index) in scope.row.logs"
+            :key="index"
+            :style="{
+	            display: 'inline-block',
+	            width: '16px',
+	            height: '16px',
+	            borderRadius: '2px',
+	            backgroundColor:
+	              log === 2 ? '#67C23A' :
+				  log === 3 ? '#f55a4f' :
+				  log === 4 ? '#FFD700' :
+				  '#909399'
+	          }"
+          ></span>
+          </div>
+        </template>
+      </el-table-column>
       <el-table-column label="sop编号" align="center" prop="sopId" />
       <el-table-column label="公司id" align="center" prop="companyName" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">

+ 12 - 12
src/views/qw/QwWorkTask/qw/qwWorkTask.vue

@@ -79,18 +79,18 @@
 	  <el-table-column label="用户过往看课记录" align="center" width="200px">
 	    <template slot-scope="scope">
 	      <div style="display: flex; gap: 4px; justify-content: center;">
-	        <span 
-	          v-for="(log, index) in scope.row.logs" 
+	        <span
+	          v-for="(log, index) in scope.row.logs"
 	          :key="index"
 	          :style="{
 	            display: 'inline-block',
 	            width: '16px',
 	            height: '16px',
 	            borderRadius: '2px',
-	            backgroundColor: 
-	              log === 2 ? '#67C23A' : 
-				  log === 3 ? '#f55a4f' : 
-				  log === 4 ? '#FFD700' : 
+	            backgroundColor:
+	              log === 2 ? '#67C23A' :
+				  log === 3 ? '#f55a4f' :
+				  log === 4 ? '#FFD700' :
 				  '#909399'
 	          }"
 	        ></span>
@@ -102,7 +102,7 @@
 	          {{ formatTime(scope.row.lastWatchTime) }}
 	        </template>
 	      </el-table-column>
-	  
+
       <el-table-column label="sopId" align="center" prop="sopId" />
       <el-table-column label="创建时间" align="center" prop="createTime" />
       <el-table-column label="修改时间" align="center" prop="updateTime" />
@@ -220,7 +220,7 @@ export default {
 	  } else {
 		backgroundColor = '#ffffff';    // 白色
 	  }
-	  return { 
+	  return {
 		'background-color': backgroundColor,
 		'padding': '5px 10px',
 		'border-radius': '4px'
@@ -228,17 +228,17 @@ export default {
 	},
 	formatTime(timeStr) {
 	      if (!timeStr && timeStr !== 0) return '';
-	      
+
 	      // 处理数字和字符串输入
 	      const str = String(timeStr).padStart(4, '0');
-	      
+
 	      // 提取有效部分
 	      const hours = str.substring(0, 2);
 	      const minutes = str.substring(2, 4);
-	      
+
 	      // 简单验证
 	      if (hours > 23 || minutes > 59) return '无效时间';
-	      
+
 	      return `${hours}:${minutes}`;
 	    },
     /** 查询企微任务看板列表 */