| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <x-filament-panels::page>
- <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
- <div class="stats shadow bg-base-100">
- <div class="stat">
- <div class="stat-figure text-primary">
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="inline-block w-8 h-8 stroke-current"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
- </div>
- <div class="stat-title">知识点总数</div>
- <div class="stat-value text-primary">{{ count($knowledgePoints) }}</div>
- <div class="stat-desc">图谱中的活跃节点</div>
- </div>
- </div>
-
- <div class="stats shadow bg-base-100">
- <div class="stat">
- <div class="stat-figure text-secondary">
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="inline-block w-8 h-8 stroke-current"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4"></path></svg>
- </div>
- <div class="stat-title">学段覆盖</div>
- <div class="stat-value text-secondary">{{ collect($knowledgePoints)->pluck('phase')->unique()->count() }}</div>
- <div class="stat-desc">不同的教育阶段</div>
- </div>
- </div>
- <div class="stats shadow bg-base-100">
- <div class="stat">
- <div class="stat-figure text-accent">
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="inline-block w-8 h-8 stroke-current"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4"></path></svg>
- </div>
- <div class="stat-title">学科分类</div>
- <div class="stat-value text-accent">{{ collect($knowledgePoints)->pluck('category')->unique()->count() }}</div>
- <div class="stat-desc">学科类别数量</div>
- </div>
- </div>
- </div>
- <div class="overflow-x-auto bg-base-100 rounded-box shadow-lg">
- <table class="table table-zebra w-full">
- <!-- head -->
- <thead class="bg-base-200 text-base-content/70">
- <tr>
- <th>ID</th>
- <th>编码 / 名称</th>
- <th>学段 / 年级</th>
- <th>分类</th>
- <th>重要性</th>
- <th class="text-right">操作</th>
- </tr>
- </thead>
- <tbody>
- @forelse($knowledgePoints as $point)
- <tr class="hover">
- <td class="font-mono text-xs opacity-50">{{ $point['id'] }}</td>
- <td>
- <div class="flex items-center gap-3">
- <div class="avatar placeholder">
- <div class="bg-neutral text-neutral-content rounded-full w-8">
- <span class="text-xs">{{ substr($point['cn_name'], 0, 1) }}</span>
- </div>
- </div>
- <div>
- <div class="font-bold">{{ $point['cn_name'] }}</div>
- <div class="text-sm opacity-50 font-mono">{{ $point['kp_code'] }}</div>
- </div>
- </div>
- </td>
- <td>
- <div class="flex flex-col gap-1">
- <span class="badge badge-sm badge-ghost">{{ $point['phase'] }}</span>
- @if(isset($point['grade']))
- <span class="text-xs opacity-70">{{ $point['grade'] }}年级</span>
- @endif
- </div>
- </td>
- <td>
- <span class="badge badge-outline badge-primary">{{ $point['category'] }}</span>
- </td>
- <td>
- <div class="rating rating-xs rating-half">
- @for($i = 1; $i <= 5; $i++)
- <input type="radio" name="rating-{{$point['id']}}" class="mask mask-star-2 bg-orange-400" @checked($point['importance'] >= $i) disabled />
- @endfor
- </div>
- </td>
- <td class="text-right">
- <div class="join">
- <button wire:click="edit('{{ $point['kp_code'] }}')" class="btn btn-sm btn-ghost join-item tooltip" data-tip="编辑">
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4">
- <path stroke-linecap="round" stroke-linejoin="round" d="M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10" />
- </svg>
- </button>
- <button wire:click="delete('{{ $point['kp_code'] }}')" class="btn btn-sm btn-ghost text-error join-item tooltip" data-tip="删除">
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4">
- <path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" />
- </svg>
- </button>
- </div>
- </td>
- </tr>
- @empty
- <tr>
- <td colspan="6" class="text-center py-10">
- <div class="flex flex-col items-center justify-center gap-2 text-base-content/50">
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-10 h-10">
- <path stroke-linecap="round" stroke-linejoin="round" d="M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5m8.25 3.25a2.25 2.25 0 100 4.5 2.25 2.25 0 000-4.5zM12 7v13" />
- </svg>
- <span>暂无知识点数据,请尝试导入。</span>
- </div>
- </td>
- </tr>
- @endforelse
- </tbody>
- </table>
- </div>
- <x-filament-actions::modals />
- </x-filament-panels::page>
|