|
@@ -3,14 +3,14 @@
|
|
<div class="pa-3 d-flex justify-space-between align-center">
|
|
<div class="pa-3 d-flex justify-space-between align-center">
|
|
<Autocomplete v-model="enterpriseId" @change="getList" :item="selectItems" style="width: 300px;" />
|
|
<Autocomplete v-model="enterpriseId" @change="getList" :item="selectItems" style="width: 300px;" />
|
|
<div>
|
|
<div>
|
|
- <v-btn color="primary" elevation="5" prepend-icon="mdi-refresh" @click="handleRefresh">刷 新</v-btn>
|
|
|
|
|
|
+ <v-btn color="primary" elevation="5" prepend-icon="mdi-refresh" @click="getList">刷 新</v-btn>
|
|
<v-btn color="#00897B" class="ml-5" elevation="5" prepend-icon="mdi-plus" @click="handleAddReport">新增报告</v-btn>
|
|
<v-btn color="#00897B" class="ml-5" elevation="5" prepend-icon="mdi-plus" @click="handleAddReport">新增报告</v-btn>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<v-divider class="ma-3"></v-divider>
|
|
<v-divider class="ma-3"></v-divider>
|
|
<!-- 实习报告 -->
|
|
<!-- 实习报告 -->
|
|
<div class="pa-3">
|
|
<div class="pa-3">
|
|
- <div v-if="enterpriseId && items && items.length > 0">
|
|
|
|
|
|
+ <div v-if="items && items.length > 0">
|
|
<div v-for="item in items" :key="item.date" class="mb-3">
|
|
<div v-for="item in items" :key="item.date" class="mb-3">
|
|
<div class="title-date">{{ item.date }}</div>
|
|
<div class="title-date">{{ item.date }}</div>
|
|
<div class="d-flex flex-wrap">
|
|
<div class="d-flex flex-wrap">
|
|
@@ -25,7 +25,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div v-else class="color-666 text-center" style="line-height: 60vh;">请选择要查看的实习企业</div>
|
|
|
|
|
|
+ <Empty v-else :elevation="false" />
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<CtDialog :visible="showDialog" :widthType="2" titleClass="text-h6" :footer="true" title="新增实习报告" @close="handleClose" @submit="handleSubmit">
|
|
<CtDialog :visible="showDialog" :widthType="2" titleClass="text-h6" :footer="true" title="新增实习报告" @close="handleClose" @submit="handleSubmit">
|
|
@@ -77,10 +77,15 @@ const formItems = ref({
|
|
]
|
|
]
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+// 实习报告列表
|
|
const getList = async () => {
|
|
const getList = async () => {
|
|
|
|
+ items.value = []
|
|
try {
|
|
try {
|
|
- const data = await getStudentReportList(enterpriseId.value)
|
|
|
|
- console.log(data, '实习报告')
|
|
|
|
|
|
+ const data = await getStudentReportList(enterpriseId.value ? { enterpriseId: enterpriseId.value } : {})
|
|
|
|
+ if (!data || !Object.keys(data).length) return
|
|
|
|
+ for (let item in data) {
|
|
|
|
+ items.value.push({ date: item, arr: data[item].map(e => e.url) })
|
|
|
|
+ }
|
|
} catch {}
|
|
} catch {}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -88,15 +93,9 @@ onMounted(() => {
|
|
const { id } = route.query
|
|
const { id } = route.query
|
|
if (id) {
|
|
if (id) {
|
|
enterpriseId.value = id
|
|
enterpriseId.value = id
|
|
- getList()
|
|
|
|
}
|
|
}
|
|
-})
|
|
|
|
-
|
|
|
|
-// 刷新
|
|
|
|
-const handleRefresh = () => {
|
|
|
|
- if (!enterpriseId.value) return Snackbar.warning('请先选择要查看的实习企业')
|
|
|
|
getList()
|
|
getList()
|
|
-}
|
|
|
|
|
|
+})
|
|
|
|
|
|
const selectItems = ref({
|
|
const selectItems = ref({
|
|
label: '请选择要查看的企业',
|
|
label: '请选择要查看的企业',
|