QYF-GitLab1
19 小时以前 d2adbd69bf063be99890ae2f828e41bd67efc96c
src/views/classManage/jobManage.vue
@@ -317,7 +317,7 @@
                </el-table-column>
                <el-table-column label="分数" width="120">
                  <template #default="scope">
                    <span style="color: #ff6c00">{{ scope.row.score }}</span>
                    <span style="color: #019e58">{{ scope.row.score }}</span>
                  </template>
                </el-table-column>
                <el-table-column label="设置" width="260">
@@ -550,8 +550,8 @@
  {
    value: config.taskType.homeWork,
    field: 'Type',
    subFilters: []
  }
    subFilters: [],
  },
])
// task
const taskData = reactive({
@@ -563,7 +563,7 @@
  state: '',
  groupId: '',
  beginDate: '',
  endDate: ''
  endDate: '',
})
// question Key
const questionKey = [
@@ -577,7 +577,7 @@
  'Embedded_QuestionBank_QuestionType',
  'Embedded_QuestionBank_Score',
  'Embedded_QuestionBank_Stem',
  'Embedded_QuestionBank_StemStyle'
  'Embedded_QuestionBank_StemStyle',
]
// dialognew
const visible = ref(false)
@@ -589,14 +589,14 @@
  homeworkName: '',
  homeworkStartingDate: '',
  homeworkSubmissionDate: '',
  explain: ''
  explain: '',
})
let pages = reactive({
  currentPage: 1,
  page: 1,
  pageSize: 15,
  count: 0,
  loading: false
  loading: false,
})
// dialogedit
const visibleEdit = ref(false)
@@ -642,7 +642,7 @@
  if (userCache) {
    userInfo.value = JSON.parse(userCache)
  }
  defaultCmsPath.value = classInfo.bookRefCode ? 'jsek_digitalTextbooks' : 'defaultGoodsStore3'
  defaultCmsPath.value = classInfo.bookRefCode ? '*' : 'defaultGoodsStore3'
  getTaskList()
})
@@ -672,7 +672,7 @@
  if (!taskItem.homeworkName) {
    ElMessage({
      type: 'warning',
      message: '请填写作业名称 '
      message: '请填写作业名称 ',
    })
    newLoading.value = false
    return false
@@ -680,7 +680,7 @@
  if (!taskItem.homeworkStartingDate) {
    ElMessage({
      type: 'warning',
      message: '请填写作业开始时间 '
      message: '请填写作业开始时间 ',
    })
    newLoading.value = false
    return false
@@ -688,7 +688,7 @@
  if (!taskItem.homeworkSubmissionDate) {
    ElMessage({
      type: 'warning',
      message: '请填写作业结束时间'
      message: '请填写作业结束时间',
    })
    newLoading.value = false
    return false
@@ -705,7 +705,7 @@
      beginDate: taskItem.homeworkStartingDate,
      endDate: taskItem.homeworkSubmissionDate,
      duration: 0,
      config: JSON.stringify({ scoreData: [] })
      config: JSON.stringify({ scoreData: [] }),
    }
    MG.edu
      .newTask(data)
@@ -739,7 +739,7 @@
    beginDate: moment(taskItem.homeworkStartingDate).format('YYYY-MM-DDTHH:mm:ss'),
    endDate: moment(taskItem.homeworkSubmissionDate).format('YYYY-MM-DDTHH:mm:ss'),
    duration: 0,
    config: JSON.stringify({ scoreData: scoreData.value })
    config: JSON.stringify({ scoreData: scoreData.value }),
  }
  MG.edu
    .updateTask(data)
@@ -766,11 +766,11 @@
    size: pages.pageSize,
    sort: {
      type: 'Desc',
      field: 'CreateDate'
      field: 'CreateDate',
    },
    filterList,
    searchList,
    groupId: classInfo?.id
    groupId: classInfo?.id,
  }
  MG.edu
    .getTaskList(data)
@@ -786,7 +786,7 @@
          return {
            ...item,
            beginDate: moment(item.beginDate).format('YYYY-MM-DD'),
            endDate: moment(item.endDate).format('YYYY-MM-DD')
            endDate: moment(item.endDate).format('YYYY-MM-DD'),
          }
        })
        if (taskData.id) {
@@ -821,8 +821,8 @@
    {
      compareType: 'Contains',
      keywords: searchKey.value,
      field: 'Name'
    }
      field: 'Name',
    },
  ]
  pages.page = 1
  pages.currentPage = 1
@@ -832,7 +832,7 @@
// 删除资源
const removeTaskItem = (item: any) => {
  const data = {
    ids: [item.id]
    ids: [item.id],
  }
  MG.edu
    .delTask(data)
@@ -840,7 +840,7 @@
      if (res) {
        ElMessage({
          message: '删除成功',
          type: 'success'
          type: 'success',
        })
        getTaskList()
      }
@@ -848,7 +848,7 @@
    .catch((e: any) => {
      ElMessage({
        message: '删除失败',
        type: 'error'
        type: 'error',
      })
    })
}
@@ -860,9 +860,9 @@
    requests: checkData.value?.map((item: any) => {
      return {
        path: String(taskData.rootCmsItemId),
        cmsItemId: item.id
        cmsItemId: item.id,
      }
    })
    }),
  }
  MG.edu
    .addTaskCmsItemList(data)
@@ -870,7 +870,7 @@
      if (res) {
        ElMessage({
          message: '已加入',
          type: 'success'
          type: 'success',
        })
        selectCache.value = []
        checkData.value = []
@@ -883,7 +883,7 @@
    .catch((e: any) => {
      ElMessage({
        message: '加入失败',
        type: 'error'
        type: 'error',
      })
    })
}
@@ -898,7 +898,7 @@
    taskId: taskData?.id, // taskData?.id
    path: String(taskData?.rootCmsItemId), //taskData?.rootCmsItemId
    type: '*',
    keys: questionKey
    keys: questionKey,
  }
  MG.edu
    .getTaskCmsItem(data)
@@ -949,7 +949,7 @@
    .catch((e: any) => {
      ElMessage({
        message: '列表获取失败',
        type: 'error'
        type: 'error',
      })
      console.log(e)
    })
@@ -960,16 +960,16 @@
  ElMessageBox.confirm('是否确认删除?', '提示', {
    confirmButtonText: '是',
    cancelButtonText: '否',
    type: 'warning'
    type: 'warning',
  }).then(() => {
    const data = {
      taskId: taskData.id,
      requests: [
        {
          cmsItemId: item.id,
          path: String(taskData.rootCmsItemId)
        }
      ]
          path: String(taskData.rootCmsItemId),
        },
      ],
    }
    MG.edu
      .removeTaskCmsItemList(data)
@@ -977,7 +977,7 @@
        if (res) {
          ElMessage({
            type: 'success',
            message: '已删除'
            message: '已删除',
          })
          selectedIndex.value = 0
          getTaskCmsList()
@@ -986,7 +986,7 @@
      .catch((err: any) => {
        ElMessage({
          type: 'error',
          message: '删除失败,请稍后再试'
          message: '删除失败,请稍后再试',
        })
      })
  })
@@ -1191,7 +1191,7 @@
    content,
    type: 'Normal',
    cmsTypeRefCode: '',
    newDataListRequest: []
    newDataListRequest: [],
  }
  MG.ugc
    .newTopicMessage(data)
@@ -1199,7 +1199,7 @@
      if (res) {
        ElMessage({
          type: 'success',
          message: '已发布'
          message: '已发布',
        })
      }
    })
@@ -1235,8 +1235,8 @@
  router.push({
    path: '/jobDetail',
    query: {
      classInfo: JSON.stringify(obj)
    }
      classInfo: JSON.stringify(obj),
    },
  })
}
@@ -1261,8 +1261,7 @@
    path: defaultCmsPath.value,
    queryType: '*',
    productId: String(classInfo?.bookId),
    storeInfo: defaultCmsPath.value,
    cmsPath: classInfo?.rootCmsItemId
    cmsPath: classInfo?.rootCmsItemId,
  }
  MG.store
    .getProductDetail(query)
@@ -1276,8 +1275,7 @@
          path: defaultCmsPath.value,
          queryType: '*',
          productId: String(classInfo?.bookId),
          storeInfo: defaultCmsPath.value,
          cmsPath: obj.productLinkPath
          cmsPath: obj.productLinkPath,
        }
        MG.store
          .getProductDetail(query)
@@ -1311,7 +1309,6 @@
      path: defaultCmsPath.value,
      queryType: '*',
      productId: String(classInfo?.bookId),
      storeInfo: defaultCmsPath.value,
      cmsPath: item.productLinkPath,
      itemFields: {
        Embedded_QuestionBank_AnalysisCon: [],
@@ -1323,8 +1320,8 @@
        Embedded_QuestionBank_QuestionType: [],
        Embedded_QuestionBank_Score: [],
        Embedded_QuestionBank_Stem: [],
        Embedded_QuestionBank_StemStyle: []
      }
        Embedded_QuestionBank_StemStyle: [],
      },
    })
    if (item.type == 'questionBankFolder' && item.childrenFolderCount == 0) {
      return data.datas.cmsDatas
@@ -1347,7 +1344,6 @@
      path: defaultCmsPath.value,
      queryType: '*',
      productId: String(classInfo?.bookId),
      storeInfo: defaultCmsPath.value,
      cmsPath,
      itemFields: {
        Embedded_QuestionBank_AnalysisCon: [],
@@ -1359,8 +1355,8 @@
        Embedded_QuestionBank_QuestionType: [],
        Embedded_QuestionBank_Score: [],
        Embedded_QuestionBank_Stem: [],
        Embedded_QuestionBank_StemStyle: []
      }
        Embedded_QuestionBank_StemStyle: [],
      },
    }
    MG.store
      .getProductDetail(query)
@@ -1384,8 +1380,7 @@
      path: defaultCmsPath.value,
      queryType: '*',
      productId: String(classInfo?.bookId),
      storeInfo: defaultCmsPath.value,
      cmsPath: item.productLinkPath
      cmsPath: item.productLinkPath,
    }
    MG.store
      .getProductDetail(query)
@@ -1489,7 +1484,7 @@
    { name: '论述题', totalScore: 0, value: 'discuss', data: [] },
    { name: '填空题', totalScore: 0, value: 'completion', data: [] },
    { name: '连线题', totalScore: 0, value: 'matching', data: [] },
    { name: '分类题', totalScore: 0, value: 'classification', data: [] }
    { name: '分类题', totalScore: 0, value: 'classification', data: [] },
  ]
  try {
    let list = []
@@ -1517,7 +1512,7 @@
          questionType: item.Embedded_QuestionBank_QuestionType,
          questionAnalysisCon: item.Embedded_QuestionBank_AnalysisCon,
          questionAnswer: item.Embedded_QuestionBank_Answer,
          customAnswer: null
          customAnswer: null,
        }
      } catch (error) {
        console.log(item)
@@ -1594,13 +1589,13 @@
          color: #333;
          line-height: 30px;
          text-align: left;
          border-left: 6px solid #ff6c00;
          border-left: 6px solid #019e58;
          padding-left: 10px;
        }
      }
      margin-top: 20px;
      ::v-deep .el-tabs__nav-wrap::after {
        background-color: #ff6d00;
        background-color: #019e58;
        height: 1px;
      }
@@ -1611,7 +1606,7 @@
      }
      ::v-deep .is-active {
        background-color: #ff6d00;
        background-color: #019e58;
        color: #fff;
        border-radius: 3px 3px 0 0;
      }
@@ -1748,6 +1743,7 @@
          background: #e0f2ff;
          overflow: auto;
          padding: 10px 18px;
          box-sizing: border-box;
          .searchBox {
            position: sticky;
            top: -10px;
@@ -1877,7 +1873,7 @@
    .leftBg {
      background-color: rgba(255, 173, 65, 0.1);
      border-radius: 5px 5px 5px 5px;
      color: #ff6c00 !important;
      color: #019e58 !important;
    }
    .pageBox {
      padding: 10px 0;