Link approval tasks to specific records
This commit is contained in:
1 parent
8b9f156dd4
commit
c3095545d7
6 files changed
+37
-10
No files matched your search
@@ -1265,7 +1265,7 @@ onMounted(async () => {
|
||||
$router.push({
|
||||
path: approvalRoute(item.type),
|
||||
query:
|
||||
item.type === 'StudentDiscipline' ? { id: item.id } : item.type === 'ClassroomReservation' ? { tab: 'review' } : item.type === 'AssessmentDeclaration' ? { tab: 'reviews' } : item.type === 'AssessmentAppeal' ? { tab: 'appeals' } : {},
|
||||
['StudentDiscipline', 'DormitoryApplication'].includes(item.type) ? { id: item.id } : item.type === 'ClassroomReservation' ? { tab: 'review' } : item.type === 'AssessmentDeclaration' ? { tab: 'reviews', id: item.id } : item.type === 'AssessmentAppeal' ? { tab: 'appeals', id: item.id } : {},
|
||||
})
|
||||
"
|
||||
>{{ t("approvalBatch.view") }}</el-button
|
||||
@@ -1308,7 +1308,7 @@ onMounted(async () => {
|
||||
$router.push({
|
||||
path: approvalRoute(item.type),
|
||||
query:
|
||||
item.type === 'StudentDiscipline' ? { id: item.id } : item.type === 'ClassroomReservation' ? { tab: 'review' } : item.type === 'AssessmentDeclaration' ? { tab: 'reviews' } : item.type === 'AssessmentAppeal' ? { tab: 'appeals' } : {},
|
||||
['StudentDiscipline', 'DormitoryApplication'].includes(item.type) ? { id: item.id } : item.type === 'ClassroomReservation' ? { tab: 'review' } : item.type === 'AssessmentDeclaration' ? { tab: 'reviews', id: item.id } : item.type === 'AssessmentAppeal' ? { tab: 'appeals', id: item.id } : {},
|
||||
})
|
||||
"
|
||||
>
|
||||
|
||||
@@ -4,7 +4,7 @@ import { getDisplayLocale } from "../i18n";
|
||||
import { useI18n } from "vue-i18n";
|
||||
const { t } = useI18n();
|
||||
import { computed, onMounted, onUnmounted, reactive, ref, watch } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import {
|
||||
Clock,
|
||||
@@ -23,6 +23,8 @@ import ApprovalAttachmentPicker from "../components/ApprovalAttachmentPicker.vue
|
||||
|
||||
const auth = useAuthStore();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const targetApprovalId = computed(() => typeof route.query.id === 'string' ? route.query.id : undefined);
|
||||
const roles = computed(() => auth.user?.roles ?? []);
|
||||
const isStudent = computed(
|
||||
() =>
|
||||
@@ -418,6 +420,7 @@ async function load() {
|
||||
page: pendingPage.value,
|
||||
pageSize: 30,
|
||||
keyword: pendingKeyword.value || undefined,
|
||||
id: route.query.tab === 'reviews' ? targetApprovalId.value : undefined,
|
||||
},
|
||||
}),
|
||||
http.get("/comprehensive-assessments/appeals", {
|
||||
@@ -425,6 +428,7 @@ async function load() {
|
||||
page: appealPage.value,
|
||||
pageSize: 30,
|
||||
keyword: appealKeyword.value || undefined,
|
||||
id: route.query.tab === 'appeals' ? targetApprovalId.value : undefined,
|
||||
},
|
||||
}),
|
||||
);
|
||||
@@ -1774,6 +1778,10 @@ onUnmounted(() => { if (scheduleClock) clearInterval(scheduleClock); });
|
||||
>
|
||||
</section>
|
||||
<section v-if="activeTab === 'reviews'" class="panel">
|
||||
<el-alert v-if="targetApprovalId && route.query.tab === 'reviews'" :closable="false" type="info" show-icon>
|
||||
{{ getDisplayLocale().startsWith('zh') ? '正在查看审批中心指定的材料。' : 'Showing the declaration selected in the approval center.' }}
|
||||
<el-button link type="primary" @click="router.replace({ query: { tab: 'reviews' } }).then(() => load())">{{ getDisplayLocale().startsWith('zh') ? '查看全部' : 'Show all' }}</el-button>
|
||||
</el-alert>
|
||||
<div class="title">
|
||||
<div>
|
||||
<h2>{{ t("assessmentTemplate.evidenceAwaitingReview") }}</h2>
|
||||
@@ -2092,6 +2100,10 @@ onUnmounted(() => { if (scheduleClock) clearInterval(scheduleClock); });
|
||||
</template>
|
||||
</section>
|
||||
<section v-if="activeTab === 'appeals'" class="panel">
|
||||
<el-alert v-if="targetApprovalId && route.query.tab === 'appeals'" :closable="false" type="info" show-icon>
|
||||
{{ getDisplayLocale().startsWith('zh') ? '正在查看审批中心指定的申诉。' : 'Showing the appeal selected in the approval center.' }}
|
||||
<el-button link type="primary" @click="router.replace({ query: { tab: 'appeals' } }).then(() => load())">{{ getDisplayLocale().startsWith('zh') ? '查看全部' : 'Show all' }}</el-button>
|
||||
</el-alert>
|
||||
<div class="title">
|
||||
<div>
|
||||
<h2>{{ t("batchBusiness.publicNoticeAppeals") }}</h2>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import CustomExportDialog from "../components/CustomExportDialog.vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { getDisplayLocale } from "../i18n";
|
||||
import { useI18n } from "vue-i18n";
|
||||
const { t, locale } = useI18n();
|
||||
@@ -42,6 +43,9 @@ echarts.use([
|
||||
CanvasRenderer,
|
||||
]);
|
||||
const props = defineProps<{ section?: string }>();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const targetApplicationId = computed(() => typeof route.query.id === 'string' ? route.query.id : undefined);
|
||||
type Bed = {
|
||||
id: string;
|
||||
bedNumber: string;
|
||||
@@ -426,7 +430,7 @@ async function loadBuildings() {
|
||||
async function loadApps(page = applicationPage.value) {
|
||||
applicationPage.value = page;
|
||||
const { data } = await http.get("/dormitory-services/applications", {
|
||||
params: { page, pageSize: applicationPageSize.value },
|
||||
params: { page, pageSize: applicationPageSize.value, id: targetApplicationId.value },
|
||||
});
|
||||
applications.value = data.items ?? [];
|
||||
applicationTotal.value = data.total ?? 0;
|
||||
@@ -1821,6 +1825,10 @@ onBeforeUnmount(() => {
|
||||
/></section
|
||||
></template>
|
||||
<section v-else-if="activeTab === 'applications'" class="panel">
|
||||
<el-alert v-if="targetApplicationId" :closable="false" type="info" show-icon>
|
||||
{{ getDisplayLocale().startsWith('zh') ? '正在查看审批中心指定的申请。' : 'Showing the application selected in the approval center.' }}
|
||||
<el-button link type="primary" @click="router.replace({ query: {} }).then(() => loadApps(1))">{{ getDisplayLocale().startsWith('zh') ? '查看全部' : 'Show all' }}</el-button>
|
||||
</el-alert>
|
||||
<div class="title">
|
||||
<div>
|
||||
<h2>{{ t("dormTemplate.transferAndCheckoutReview") }}</h2>
|
||||
|
||||
Reference in new issue
Block a user