ZaiZai 1 anno fa
parent
commit
17ca51287e
1 ha cambiato i file con 21 aggiunte e 11 eliminazioni
  1. 21 11
      src/views/project/modules/gist-list.vue

+ 21 - 11
src/views/project/modules/gist-list.vue

@@ -48,7 +48,7 @@
                                 <hc-card-item class="year-detail" :class="isDrawerType === 'edit' ? 'edit' : ''">
                                     <template #header>
                                         <div class="flex-1 text-center text-[14px]">
-                                            <HcDropdown v-model="yearKey" :datas="yearData" @change="yearChange" />
+                                            <HcDropdown v-model="yearKey" :datas="yearData" :props="{ key: 'year', label: 'year' }" @change="yearChange" />
                                         </div>
                                     </template>
                                     <el-table :data="tableYearData" border class="w-full">
@@ -207,6 +207,7 @@ const completion = (row) => {
     rowDrawerInfo.value = row
     isDrawerType.value = 'edit'
     isDrawer.value = true
+    getDetailData(row.id)
 }
 
 //保存工作完成情况
@@ -222,6 +223,25 @@ const examine = (row) => {
     rowDrawerInfo.value = row
     isDrawerType.value = 'view'
     isDrawer.value = true
+    getDetailData(row.id)
+}
+
+//数据详情
+const yearKey = ref('2023')
+const yearIndex = ref(0)
+const yearChange = (_, index) => {
+    yearIndex.value = index
+}
+
+//获取数据详情
+const yearData = ref([])
+const getDetailData = async (id) => {
+    const { error, code, data, msg } = await mainApi.queryWorkFocusProgressInfoById(id)
+    if (error || code !== 200) {
+        window.$message.error(msg ?? '删除失败')
+        return
+    }
+    console.log(data)
 }
 
 //删除
@@ -247,16 +267,6 @@ const deriveTableItem = async ({ item }, resolve) => {
     await newDownBlob(val)
     resolve()
 }
-
-//年数据
-const yearKey = ref('2023')
-const yearData = ref([
-    { key: '2023', label: '2023年' },
-    { key: '2024', label: '2024年' },
-])
-const yearChange = (_, index) => {
-    console.log(index)
-}
 </script>
 
 <style lang="scss">