Merge branch 'developer'
This commit is contained in:
@@ -109,6 +109,17 @@ export const putObj = (obj: any) => {
|
|||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
* @param obj
|
||||||
|
*/
|
||||||
|
export const editObj = (obj: any) => {
|
||||||
|
return request({
|
||||||
|
url: '/basic/basicstudentinfo/edit',
|
||||||
|
method: 'post',
|
||||||
|
data: obj,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑学生毕业登记
|
* 编辑学生毕业登记
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ export function getArchiveDownloadUrl(purchaseId: string | number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 下载审批表:导出采购审批表 Word 文档(apply.docx 模板,仅占位符替换)
|
* 下载审批表:导出采购审批表 PDF 文档(apply.docx 模板)
|
||||||
* @param id 采购申请ID
|
* @param id 采购申请ID
|
||||||
*/
|
*/
|
||||||
export function getApplyTemplateDownloadUrl(id: string | number) {
|
export function getApplyTemplateDownloadUrl(id: string | number) {
|
||||||
@@ -282,7 +282,7 @@ export function getApplyTemplateDownloadUrl(id: string | number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 下载文件审批表:导出招标文件审批表 Word 文档(fileapply.docx 模板)
|
* 下载文件审批表:导出招标文件审批表 PDF 文档(fileapply.docx 模板)
|
||||||
* @param id 采购申请ID
|
* @param id 采购申请ID
|
||||||
*/
|
*/
|
||||||
export function getFileApplyTemplateDownloadUrl(id: string | number) {
|
export function getFileApplyTemplateDownloadUrl(id: string | number) {
|
||||||
|
|||||||
@@ -69,11 +69,23 @@ export const importSub = (id: string, file: File) => {
|
|||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
return request({
|
return request({
|
||||||
url: `/stuwork/activityinfo/importSub/${id}`,
|
url: '/stuwork/file/importActivityInfoSub',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: formData,
|
data: formData,
|
||||||
|
params: { activityInfoId: id },
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'multipart/form-data',
|
'Content-Type': 'multipart/form-data',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载活动子项导入模板
|
||||||
|
*/
|
||||||
|
export const downloadImportTemplate = () => {
|
||||||
|
return request({
|
||||||
|
url: '/stuwork/file/getActivityInfoSubImportTemplate',
|
||||||
|
method: 'get',
|
||||||
|
responseType: 'blob',
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
@@ -96,3 +96,16 @@ export function validateExist(rule: any, value: any, callback: any, isEdit: bool
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取日卫生学年学期统计
|
||||||
|
* @param {Object} [query] - 查询参数(schoolYear, schoolTerm)
|
||||||
|
* @returns {Promise} 请求的 Promise 对象。
|
||||||
|
*/
|
||||||
|
export function summary(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/stuwork/classRoomHygieneDaily/summary',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
@@ -57,3 +57,16 @@ export const importData = (data: FormData) => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取月卫生学年学期统计
|
||||||
|
* @param {Object} [query] - 查询参数(schoolYear, schoolTerm)
|
||||||
|
* @returns {Promise} 请求的 Promise 对象。
|
||||||
|
*/
|
||||||
|
export const monthlySummaryByYearTerm = (query?: Object) => {
|
||||||
|
return request({
|
||||||
|
url: '/stuwork/classroomhygienemonthly/monthlySummaryByYearTerm',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
@@ -96,3 +96,16 @@ export function validateExist(rule: any, value: any, callback: any, isEdit: bool
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取班级班主任查看状况统计
|
||||||
|
* @param {Object} [query] - 查询参数(schoolYear, schoolTerm)
|
||||||
|
* @returns {Promise} 请求的 Promise 对象。
|
||||||
|
*/
|
||||||
|
export function readStatistics(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/stuwork/weekPlan/readStatistics',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -299,6 +299,35 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 证书导出弹窗 -->
|
||||||
|
<el-dialog title="证书导出" v-model="exportCertificateDialogVisible" :close-on-click-modal="false" draggable width="450px">
|
||||||
|
<el-form :model="exportCertificateForm" label-width="80px">
|
||||||
|
<el-form-item label="班级" required>
|
||||||
|
<el-select v-model="exportCertificateForm.classCode" placeholder="请选择班级" filterable style="width: 100%">
|
||||||
|
<el-option v-for="item in classList" :key="item.classCode" :label="item.classNo" :value="item.classCode" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="导出类型">
|
||||||
|
<el-select v-model="exportCertificateForm.exportType" placeholder="请选择导出类型" clearable style="width: 100%">
|
||||||
|
<el-option label="全部" :value="null" />
|
||||||
|
<el-option v-for="item in majorLevelList" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="exportCertificateDialogVisible = false">取 消</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="handleExportCertificateConfirm"
|
||||||
|
:loading="exportCertificateLoading"
|
||||||
|
:disabled="!exportCertificateForm.classCode">
|
||||||
|
确认导出
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -392,6 +421,14 @@ const workYearList = ref<any[]>([]);
|
|||||||
const applyInternshipForm = reactive({
|
const applyInternshipForm = reactive({
|
||||||
year: '',
|
year: '',
|
||||||
});
|
});
|
||||||
|
// 证书导出相关
|
||||||
|
const exportCertificateDialogVisible = ref(false);
|
||||||
|
const exportCertificateLoading = ref(false);
|
||||||
|
const majorLevelList = ref<any[]>([]);
|
||||||
|
const exportCertificateForm = reactive({
|
||||||
|
classCode: '',
|
||||||
|
exportType: '' as string | null,
|
||||||
|
});
|
||||||
|
|
||||||
// 表格列配置
|
// 表格列配置
|
||||||
const tableColumns = [
|
const tableColumns = [
|
||||||
@@ -817,14 +854,45 @@ const handleExportStudentCard = async () => {
|
|||||||
|
|
||||||
// 证书导出
|
// 证书导出
|
||||||
const handleExportCertificate = async () => {
|
const handleExportCertificate = async () => {
|
||||||
|
// 获取导出类型字典
|
||||||
|
if (majorLevelList.value.length === 0) {
|
||||||
|
try {
|
||||||
|
const res = await getDicts('major_level');
|
||||||
|
if (res.data && Array.isArray(res.data)) {
|
||||||
|
majorLevelList.value = res.data.map((item: any) => ({
|
||||||
|
label: item.label || item.dictLabel || item.name,
|
||||||
|
value: item.value || item.dictValue || item.code,
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
majorLevelList.value = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 重置表单
|
||||||
|
exportCertificateForm.classCode = searchForm.classCode || '';
|
||||||
|
exportCertificateForm.exportType = null;
|
||||||
|
exportCertificateDialogVisible.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 确认证书导出
|
||||||
|
const handleExportCertificateConfirm = async () => {
|
||||||
|
if (!exportCertificateForm.classCode) {
|
||||||
|
useMessage().warning('请选择班级');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
exportCertificateLoading.value = true;
|
||||||
try {
|
try {
|
||||||
await makeExportSkillLevelTask({
|
await makeExportSkillLevelTask({
|
||||||
deptCode: searchForm.deptCode,
|
classCode: exportCertificateForm.classCode,
|
||||||
classCode: searchForm.classCode,
|
exportType: exportCertificateForm.exportType || null,
|
||||||
});
|
});
|
||||||
useMessage().success('导出任务已创建,请在文件管理中下载');
|
useMessage().success('导出任务已创建,请在文件管理中下载');
|
||||||
|
exportCertificateDialogVisible.value = false;
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
useMessage().error(err.msg || '创建导出任务失败');
|
useMessage().error(err.msg || '创建导出任务失败');
|
||||||
|
} finally {
|
||||||
|
exportCertificateLoading.value = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -153,7 +153,7 @@
|
|||||||
:file-type="['pdf', 'jpg', 'jpeg', 'png']"
|
:file-type="['pdf', 'jpg', 'jpeg', 'png']"
|
||||||
:data="{ fileType: FILE_TYPE_MAP.deptSelfMeetingMinutes }"
|
:data="{ fileType: FILE_TYPE_MAP.deptSelfMeetingMinutes }"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload"
|
upload-file-url="/purchase/purchasingfiles/upload"
|
||||||
:disabled="flowFieldDisabled('deptSelfMeetingMinutes')"
|
:disabled="isViewMode || flowFieldDisabled('deptSelfMeetingMinutes')"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -249,7 +249,7 @@
|
|||||||
:file-type="['doc', 'docx']"
|
:file-type="['doc', 'docx']"
|
||||||
:data="{ fileType: FILE_TYPE_MAP.serviceDirectSelect }"
|
:data="{ fileType: FILE_TYPE_MAP.serviceDirectSelect }"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload"
|
upload-file-url="/purchase/purchasingfiles/upload"
|
||||||
:disabled="flowFieldDisabled('serviceDirectSelect')"
|
:disabled="isViewMode || flowFieldDisabled('serviceDirectSelect')"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -277,7 +277,7 @@
|
|||||||
:file-type="['doc', 'docx']"
|
:file-type="['doc', 'docx']"
|
||||||
:data="{ fileType: FILE_TYPE_MAP.serviceInviteSelect }"
|
:data="{ fileType: FILE_TYPE_MAP.serviceInviteSelect }"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload"
|
upload-file-url="/purchase/purchasingfiles/upload"
|
||||||
:disabled="flowFieldDisabled('serviceInviteSelect')"
|
:disabled="isViewMode || flowFieldDisabled('serviceInviteSelect')"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -299,7 +299,7 @@
|
|||||||
:file-type="['doc', 'docx']"
|
:file-type="['doc', 'docx']"
|
||||||
:data="{ fileType: FILE_TYPE_MAP.purchaseRequirementTemplate }"
|
:data="{ fileType: FILE_TYPE_MAP.purchaseRequirementTemplate }"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload"
|
upload-file-url="/purchase/purchasingfiles/upload"
|
||||||
:disabled="flowFieldDisabled('purchaseRequirementTemplate')"
|
:disabled="isViewMode || flowFieldDisabled('purchaseRequirementTemplate')"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -328,7 +328,7 @@
|
|||||||
:file-type="['doc', 'docx']"
|
:file-type="['doc', 'docx']"
|
||||||
:data="{ fileType: FILE_TYPE_MAP.serviceInviteSelect }"
|
:data="{ fileType: FILE_TYPE_MAP.serviceInviteSelect }"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload"
|
upload-file-url="/purchase/purchasingfiles/upload"
|
||||||
:disabled="flowFieldDisabled('serviceInviteSelect')"
|
:disabled="isViewMode || flowFieldDisabled('serviceInviteSelect')"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -349,7 +349,7 @@
|
|||||||
:file-type="['doc', 'docx']"
|
:file-type="['doc', 'docx']"
|
||||||
:data="{ fileType: FILE_TYPE_MAP.servicePublicSelectAuto }"
|
:data="{ fileType: FILE_TYPE_MAP.servicePublicSelectAuto }"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload"
|
upload-file-url="/purchase/purchasingfiles/upload"
|
||||||
:disabled="flowFieldDisabled('servicePublicSelectAuto')"
|
:disabled="isViewMode || flowFieldDisabled('servicePublicSelectAuto')"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -370,7 +370,7 @@
|
|||||||
:file-type="['zip']"
|
:file-type="['zip']"
|
||||||
:data="{ fileType: FILE_TYPE_MAP.otherMaterials }"
|
:data="{ fileType: FILE_TYPE_MAP.otherMaterials }"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload"
|
upload-file-url="/purchase/purchasingfiles/upload"
|
||||||
:disabled="flowFieldDisabled('otherMaterials')"
|
:disabled="isViewMode || flowFieldDisabled('otherMaterials')"
|
||||||
/>
|
/>
|
||||||
<div class="template-note">支持上传zip格式的压缩包文件</div>
|
<div class="template-note">支持上传zip格式的压缩包文件</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -391,7 +391,7 @@
|
|||||||
:file-type="['pdf', 'jpg', 'jpeg', 'png']"
|
:file-type="['pdf', 'jpg', 'jpeg', 'png']"
|
||||||
:data="{ fileType: FILE_TYPE_MAP.deptSelfMeetingMinutes }"
|
:data="{ fileType: FILE_TYPE_MAP.deptSelfMeetingMinutes }"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload"
|
upload-file-url="/purchase/purchasingfiles/upload"
|
||||||
:disabled="flowFieldDisabled('deptSelfMeetingMinutes')"
|
:disabled="isViewMode || flowFieldDisabled('deptSelfMeetingMinutes')"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -499,7 +499,7 @@
|
|||||||
:file-type="['pdf', 'jpg', 'jpeg', 'png']"
|
:file-type="['pdf', 'jpg', 'jpeg', 'png']"
|
||||||
:data="{ fileType: FILE_TYPE_MAP.feasibilityReport }"
|
:data="{ fileType: FILE_TYPE_MAP.feasibilityReport }"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload"
|
upload-file-url="/purchase/purchasingfiles/upload"
|
||||||
:disabled="flowFieldDisabled('feasibilityReport')"
|
:disabled="isViewMode || flowFieldDisabled('feasibilityReport')"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -520,7 +520,7 @@
|
|||||||
:file-type="['pdf', 'jpg', 'jpeg', 'png']"
|
:file-type="['pdf', 'jpg', 'jpeg', 'png']"
|
||||||
:data="{ fileType: FILE_TYPE_MAP.meetingMinutes }"
|
:data="{ fileType: FILE_TYPE_MAP.meetingMinutes }"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload"
|
upload-file-url="/purchase/purchasingfiles/upload"
|
||||||
:disabled="flowFieldDisabled('meetingMinutes')"
|
:disabled="isViewMode || flowFieldDisabled('meetingMinutes')"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -533,7 +533,7 @@
|
|||||||
:file-type="['pdf', 'jpg', 'jpeg', 'png']"
|
:file-type="['pdf', 'jpg', 'jpeg', 'png']"
|
||||||
:data="{ fileType: FILE_TYPE_MAP.singleSourceProof }"
|
:data="{ fileType: FILE_TYPE_MAP.singleSourceProof }"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload"
|
upload-file-url="/purchase/purchasingfiles/upload"
|
||||||
:disabled="flowFieldDisabled('singleSourceProof')"
|
:disabled="isViewMode || flowFieldDisabled('singleSourceProof')"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -555,7 +555,7 @@
|
|||||||
:file-type="['pdf', 'jpg', 'jpeg', 'png']"
|
:file-type="['pdf', 'jpg', 'jpeg', 'png']"
|
||||||
:data="{ fileType: FILE_TYPE_MAP.importApplication }"
|
:data="{ fileType: FILE_TYPE_MAP.importApplication }"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload"
|
upload-file-url="/purchase/purchasingfiles/upload"
|
||||||
:disabled="flowFieldDisabled('importApplication')"
|
:disabled="isViewMode || flowFieldDisabled('importApplication')"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -593,7 +593,7 @@
|
|||||||
:file-type="['doc', 'docx']"
|
:file-type="['doc', 'docx']"
|
||||||
:data="{ fileType: FILE_TYPE_MAP.serviceInviteSelectSchool }"
|
:data="{ fileType: FILE_TYPE_MAP.serviceInviteSelectSchool }"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload"
|
upload-file-url="/purchase/purchasingfiles/upload"
|
||||||
:disabled="flowFieldDisabled('serviceInviteSelectSchool')"
|
:disabled="isViewMode || flowFieldDisabled('serviceInviteSelectSchool')"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -612,7 +612,7 @@
|
|||||||
:file-type="['doc', 'docx']"
|
:file-type="['doc', 'docx']"
|
||||||
:data="{ fileType: FILE_TYPE_MAP.servicePublicSelectSchoolAuto }"
|
:data="{ fileType: FILE_TYPE_MAP.servicePublicSelectSchoolAuto }"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload"
|
upload-file-url="/purchase/purchasingfiles/upload"
|
||||||
:disabled="flowFieldDisabled('servicePublicSelectSchoolAuto')"
|
:disabled="isViewMode || flowFieldDisabled('servicePublicSelectSchoolAuto')"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -632,7 +632,7 @@
|
|||||||
:file-type="['doc', 'docx']"
|
:file-type="['doc', 'docx']"
|
||||||
:data="{ fileType: FILE_TYPE_MAP.servicePublicSelectSchool }"
|
:data="{ fileType: FILE_TYPE_MAP.servicePublicSelectSchool }"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload"
|
upload-file-url="/purchase/purchasingfiles/upload"
|
||||||
:disabled="flowFieldDisabled('servicePublicSelectSchool')"
|
:disabled="isViewMode || flowFieldDisabled('servicePublicSelectSchool')"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -651,7 +651,7 @@
|
|||||||
:file-type="['doc', 'docx']"
|
:file-type="['doc', 'docx']"
|
||||||
:data="{ fileType: FILE_TYPE_MAP.purchaseRequirement }"
|
:data="{ fileType: FILE_TYPE_MAP.purchaseRequirement }"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload"
|
upload-file-url="/purchase/purchasingfiles/upload"
|
||||||
:disabled="flowFieldDisabled('purchaseRequirement')"
|
:disabled="isViewMode || flowFieldDisabled('purchaseRequirement')"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -673,7 +673,7 @@
|
|||||||
:file-type="['pdf', 'jpg', 'jpeg', 'png']"
|
:file-type="['pdf', 'jpg', 'jpeg', 'png']"
|
||||||
:data="{ fileType: FILE_TYPE_MAP.governmentPurchaseIntent }"
|
:data="{ fileType: FILE_TYPE_MAP.governmentPurchaseIntent }"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload"
|
upload-file-url="/purchase/purchasingfiles/upload"
|
||||||
:disabled="flowFieldDisabled('governmentPurchaseIntent')"
|
:disabled="isViewMode || flowFieldDisabled('governmentPurchaseIntent')"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -694,7 +694,7 @@
|
|||||||
:file-type="['zip']"
|
:file-type="['zip']"
|
||||||
:data="{ fileType: FILE_TYPE_MAP.otherMaterials }"
|
:data="{ fileType: FILE_TYPE_MAP.otherMaterials }"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload"
|
upload-file-url="/purchase/purchasingfiles/upload"
|
||||||
:disabled="flowFieldDisabled('otherMaterials')"
|
:disabled="isViewMode || flowFieldDisabled('otherMaterials')"
|
||||||
/>
|
/>
|
||||||
<div class="template-note">支持上传zip格式的压缩包文件</div>
|
<div class="template-note">支持上传zip格式的压缩包文件</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="visible"
|
v-model="visible"
|
||||||
:title="dialogTitle"
|
:title="dialogTitle"
|
||||||
width="90%"
|
fullscreen
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
destroy-on-close
|
destroy-on-close
|
||||||
class="form-iframe-dialog"
|
class="form-iframe-dialog"
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="需求部门" prop="deptId">
|
<el-form-item label="需求部门" prop="deptId">
|
||||||
<el-select v-model="state.queryForm.deptCode" placeholder="请选择需求部门" clearable filterable style="width: 200px">
|
<el-select v-model="state.queryForm.deptCode" placeholder="请选择需求部门" clearable filterable style="width: 200px">
|
||||||
<el-option v-for="item in secondDeptList" :key="item.id" :label="item.name" :value="item.id" />
|
<el-option v-for="item in secondDeptList" :key="item.id" :label="item.deptName" :value="item.deptCode" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@@ -1352,8 +1352,8 @@ const loadSecondDeptList = async () => {
|
|||||||
const res = await getDeptListByLevelTwo();
|
const res = await getDeptListByLevelTwo();
|
||||||
if (res.data && Array.isArray(res.data)) {
|
if (res.data && Array.isArray(res.data)) {
|
||||||
secondDeptList.value = res.data.map((item: any) => ({
|
secondDeptList.value = res.data.map((item: any) => ({
|
||||||
id: item.id || item.deptId,
|
deptCode: item.deptCode,
|
||||||
name: item.name || item.deptName,
|
deptName: item.deptName,
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -123,7 +123,10 @@
|
|||||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||||
<template #tip>
|
<template #tip>
|
||||||
<div class="el-upload__tip">只能上传 xlsx/xls 文件</div>
|
<div class="el-upload__tip">
|
||||||
|
只能上传 xlsx/xls 文件,
|
||||||
|
<el-link type="primary" :underline="false" @click="handleDownloadTemplate">下载导入模板</el-link>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@@ -139,7 +142,7 @@
|
|||||||
<script setup lang="ts" name="ActivityInfo">
|
<script setup lang="ts" name="ActivityInfo">
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { BasicTableProps, useTable } from '/@/hooks/table';
|
import { BasicTableProps, useTable } from '/@/hooks/table';
|
||||||
import { fetchList, delObj, importSub } from '/@/api/stuwork/activityinfo';
|
import { fetchList, delObj, importSub, downloadImportTemplate } from '/@/api/stuwork/activityinfo';
|
||||||
import { useMessage, useMessageBox } from '/@/hooks/message';
|
import { useMessage, useMessageBox } from '/@/hooks/message';
|
||||||
import { parseTime } from '/@/utils/formatTime';
|
import { parseTime } from '/@/utils/formatTime';
|
||||||
import TableColumnControl from '/@/components/TableColumnControl/index.vue';
|
import TableColumnControl from '/@/components/TableColumnControl/index.vue';
|
||||||
@@ -254,6 +257,22 @@ const handleImportSubmit = async () => {
|
|||||||
importLoading.value = false;
|
importLoading.value = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 下载导入模板
|
||||||
|
const handleDownloadTemplate = async () => {
|
||||||
|
try {
|
||||||
|
const res = await downloadImportTemplate();
|
||||||
|
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||||
|
const url = window.URL.createObjectURL(blob);
|
||||||
|
const link = document.createElement('a');
|
||||||
|
link.href = url;
|
||||||
|
link.download = '活动子项导入模板.xlsx';
|
||||||
|
link.click();
|
||||||
|
window.URL.revokeObjectURL(url);
|
||||||
|
} catch (err: any) {
|
||||||
|
useMessage().error(err.msg || '下载模板失败');
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -59,6 +59,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<div class="header-actions">
|
<div class="header-actions">
|
||||||
<el-button icon="FolderAdd" type="primary" @click="formDialogRef.openDialog()"> 新增 </el-button>
|
<el-button icon="FolderAdd" type="primary" @click="formDialogRef.openDialog()"> 新增 </el-button>
|
||||||
|
<el-button icon="DataAnalysis" type="info" class="ml10" @click="handleOpenSummary"> 学期统计 </el-button>
|
||||||
<el-button icon="Upload" type="success" class="ml10" @click="handleImport"> 导入 </el-button>
|
<el-button icon="Upload" type="success" class="ml10" @click="handleImport"> 导入 </el-button>
|
||||||
<el-button icon="Download" type="warning" class="ml10" @click="handleExport"> 导出 </el-button>
|
<el-button icon="Download" type="warning" class="ml10" @click="handleExport"> 导出 </el-button>
|
||||||
<right-toolbar
|
<right-toolbar
|
||||||
@@ -166,19 +167,56 @@
|
|||||||
:temp-url="templateUrl"
|
:temp-url="templateUrl"
|
||||||
@refreshDataList="getDataList"
|
@refreshDataList="getDataList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- 学期统计弹出框 -->
|
||||||
|
<el-dialog v-model="summaryVisible" title="日卫生学年学期统计" width="900px" destroy-on-close>
|
||||||
|
<el-form :model="summaryForm" :inline="true" class="mb10">
|
||||||
|
<el-form-item label="学年">
|
||||||
|
<el-select v-model="summaryForm.schoolYear" placeholder="请选择学年" clearable filterable style="width: 180px">
|
||||||
|
<el-option v-for="item in schoolYearList" :key="item.year" :label="item.year" :value="item.year" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="学期">
|
||||||
|
<el-select v-model="summaryForm.schoolTerm" placeholder="请选择学期" clearable style="width: 180px">
|
||||||
|
<el-option v-for="item in schoolTermList" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="学院">
|
||||||
|
<el-select v-model="summaryForm.deptCode" placeholder="请选择学院" clearable filterable style="width: 180px">
|
||||||
|
<el-option v-for="item in deptList" :key="item.deptCode" :label="item.deptName" :value="item.deptCode" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handleQuerySummary">查询</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-table :data="summaryData" v-loading="summaryLoading" stripe max-height="400" :cell-style="{ padding: '8px 0', textAlign: 'center' }" :header-cell-style="{ background: '#f5f7fa', color: '#606266', fontWeight: 'bold', textAlign: 'center' }">
|
||||||
|
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||||
|
<el-table-column prop="deptName" label="学院" min-width="120" align="center" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="className" label="班级" min-width="120" align="center" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="totalScore" label="总分" min-width="100" align="center" />
|
||||||
|
<el-table-column prop="plusScore" label="加分" min-width="100" align="center" />
|
||||||
|
<el-table-column prop="minusScore" label="扣分" min-width="100" align="center" />
|
||||||
|
</el-table>
|
||||||
|
<template v-if="summaryData.length === 0 && !summaryLoading">
|
||||||
|
<el-empty description="暂无统计数据" :image-size="80" />
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="ClassRoomHygieneDaily">
|
<script setup lang="ts" name="ClassRoomHygieneDaily">
|
||||||
import { ref, reactive, defineAsyncComponent, onMounted } from 'vue';
|
import { ref, reactive, defineAsyncComponent, onMounted } from 'vue';
|
||||||
import { BasicTableProps, useTable } from '/@/hooks/table';
|
import { BasicTableProps, useTable } from '/@/hooks/table';
|
||||||
import { fetchList, delObjs } from '/@/api/stuwork/classroomhygienedaily';
|
import { fetchList, delObjs, summary } from '/@/api/stuwork/classroomhygienedaily';
|
||||||
import { downloadClassRoomHygieneDailyTemplate, makeExportClassRoomHygieneDailyTask, downloadBlobFile } from '/@/api/stuwork/file';
|
import { downloadClassRoomHygieneDailyTemplate, makeExportClassRoomHygieneDailyTask, downloadBlobFile } from '/@/api/stuwork/file';
|
||||||
import { useMessage, useMessageBox } from '/@/hooks/message';
|
import { useMessage, useMessageBox } from '/@/hooks/message';
|
||||||
import { getDeptList } from '/@/api/basic/basicclass';
|
import { getDeptList } from '/@/api/basic/basicclass';
|
||||||
import { getClassListByRole } from '/@/api/basic/basicclass';
|
import { getClassListByRole } from '/@/api/basic/basicclass';
|
||||||
|
import { queryAllSchoolYear } from '/@/api/basic/basicyear';
|
||||||
|
import { getDicts } from '/@/api/admin/dict';
|
||||||
import TableColumnControl from '/@/components/TableColumnControl/index.vue';
|
import TableColumnControl from '/@/components/TableColumnControl/index.vue';
|
||||||
import { List, OfficeBuilding, Grid, Calendar, Minus, Document, Setting, Menu, Search, EditPen } from '@element-plus/icons-vue';
|
import { List, OfficeBuilding, Grid, Calendar, Minus, Document, Setting, Menu, Search, EditPen, DataAnalysis } from '@element-plus/icons-vue';
|
||||||
import { useTableColumnControl } from '/@/hooks/tableColumn';
|
import { useTableColumnControl } from '/@/hooks/tableColumn';
|
||||||
|
|
||||||
// 引入组件
|
// 引入组件
|
||||||
@@ -197,6 +235,18 @@ const classList = ref<any[]>([]);
|
|||||||
// 模板文件URL
|
// 模板文件URL
|
||||||
const templateUrl = ref('/stuwork/classRoomHygieneDaily/import/template');
|
const templateUrl = ref('/stuwork/classRoomHygieneDaily/import/template');
|
||||||
|
|
||||||
|
// 统计相关变量
|
||||||
|
const summaryVisible = ref(false);
|
||||||
|
const summaryLoading = ref(false);
|
||||||
|
const summaryData = ref<any[]>([]);
|
||||||
|
const schoolYearList = ref<any[]>([]);
|
||||||
|
const schoolTermList = ref<any[]>([]);
|
||||||
|
const summaryForm = reactive({
|
||||||
|
schoolYear: '',
|
||||||
|
schoolTerm: '',
|
||||||
|
deptCode: ''
|
||||||
|
});
|
||||||
|
|
||||||
// 表格列配置
|
// 表格列配置
|
||||||
const tableColumns = [
|
const tableColumns = [
|
||||||
{ prop: 'deptName', label: '学院', icon: OfficeBuilding },
|
{ prop: 'deptName', label: '学院', icon: OfficeBuilding },
|
||||||
@@ -313,10 +363,72 @@ const handleDelete = async (ids: string[]) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 打开统计弹窗
|
||||||
|
const handleOpenSummary = () => {
|
||||||
|
summaryVisible.value = true;
|
||||||
|
summaryForm.schoolYear = '';
|
||||||
|
summaryForm.schoolTerm = '';
|
||||||
|
summaryForm.deptCode = '';
|
||||||
|
summaryData.value = [];
|
||||||
|
};
|
||||||
|
|
||||||
|
// 查询统计数据
|
||||||
|
const handleQuerySummary = async () => {
|
||||||
|
if (!summaryForm.schoolYear || !summaryForm.schoolTerm) {
|
||||||
|
useMessage().warning('请选择学年和学期');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
summaryLoading.value = true;
|
||||||
|
try {
|
||||||
|
const res = await summary({
|
||||||
|
schoolYear: summaryForm.schoolYear,
|
||||||
|
schoolTerm: summaryForm.schoolTerm,
|
||||||
|
deptCode: summaryForm.deptCode
|
||||||
|
});
|
||||||
|
summaryData.value = Array.isArray(res.data) ? res.data : [];
|
||||||
|
} catch (err: any) {
|
||||||
|
useMessage().error(err.msg || '获取统计数据失败');
|
||||||
|
summaryData.value = [];
|
||||||
|
} finally {
|
||||||
|
summaryLoading.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 获取学年列表
|
||||||
|
const getSchoolYearListData = async () => {
|
||||||
|
try {
|
||||||
|
const res = await queryAllSchoolYear();
|
||||||
|
if (res.data) {
|
||||||
|
schoolYearList.value = Array.isArray(res.data) ? res.data : [];
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
schoolYearList.value = [];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 获取学期字典
|
||||||
|
const getSchoolTermDict = async () => {
|
||||||
|
try {
|
||||||
|
const res = await getDicts('school_term');
|
||||||
|
if (res.data) {
|
||||||
|
schoolTermList.value = Array.isArray(res.data)
|
||||||
|
? res.data.map((item: any) => ({
|
||||||
|
label: item.label || item.dictLabel || item.name,
|
||||||
|
value: item.value || item.dictValue || item.code,
|
||||||
|
}))
|
||||||
|
: [];
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
schoolTermList.value = [];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 初始化
|
// 初始化
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getDeptListData();
|
getDeptListData();
|
||||||
getClassListData();
|
getClassListData();
|
||||||
|
getSchoolYearListData();
|
||||||
|
getSchoolTermDict();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -59,6 +59,7 @@
|
|||||||
<div class="header-actions">
|
<div class="header-actions">
|
||||||
<el-button icon="Upload" type="primary" @click="handleImport"> 导入 </el-button>
|
<el-button icon="Upload" type="primary" @click="handleImport"> 导入 </el-button>
|
||||||
<el-button icon="Download" type="warning" class="ml10" @click="handleExport"> 导出 </el-button>
|
<el-button icon="Download" type="warning" class="ml10" @click="handleExport"> 导出 </el-button>
|
||||||
|
<el-button icon="DataAnalysis" type="info" class="ml10" @click="handleOpenSummary"> 学期统计 </el-button>
|
||||||
<el-button icon="DocumentChecked" type="success" class="ml10" @click="handleCheck"> 考核 </el-button>
|
<el-button icon="DocumentChecked" type="success" class="ml10" @click="handleCheck"> 考核 </el-button>
|
||||||
<right-toolbar v-model:showSearch="showSearch" class="ml10" @queryTable="getDataList">
|
<right-toolbar v-model:showSearch="showSearch" class="ml10" @queryTable="getDataList">
|
||||||
<TableColumnControl
|
<TableColumnControl
|
||||||
@@ -192,6 +193,40 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 学期统计弹出框 -->
|
||||||
|
<el-dialog v-model="summaryVisible" title="月卫生学年学期统计" width="900px" destroy-on-close>
|
||||||
|
<el-form :model="summaryForm" :inline="true" class="mb10">
|
||||||
|
<el-form-item label="学年">
|
||||||
|
<el-select v-model="summaryForm.schoolYear" placeholder="请选择学年" clearable filterable style="width: 180px">
|
||||||
|
<el-option v-for="item in schoolYearList" :key="item.year" :label="item.year" :value="item.year" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="学期">
|
||||||
|
<el-select v-model="summaryForm.schoolTerm" placeholder="请选择学期" clearable style="width: 180px">
|
||||||
|
<el-option v-for="item in schoolTermList" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="学院">
|
||||||
|
<el-select v-model="summaryForm.deptCode" placeholder="请选择学院" clearable filterable style="width: 180px">
|
||||||
|
<el-option v-for="item in deptList" :key="item.deptCode" :label="item.deptName" :value="item.deptCode" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handleQuerySummary">查询</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-table :data="summaryData" v-loading="summaryLoading" stripe max-height="400" :cell-style="{ padding: '8px 0', textAlign: 'center' }" :header-cell-style="{ background: '#f5f7fa', color: '#606266', fontWeight: 'bold', textAlign: 'center' }">
|
||||||
|
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||||
|
<el-table-column prop="deptName" label="学院" min-width="120" align="center" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="className" label="班级" min-width="120" align="center" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="avgScore" label="平均分" min-width="100" align="center" />
|
||||||
|
<el-table-column prop="recordCount" label="考核月数" min-width="100" align="center" />
|
||||||
|
</el-table>
|
||||||
|
<template v-if="summaryData.length === 0 && !summaryLoading">
|
||||||
|
<el-empty description="暂无统计数据" :image-size="80" />
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -199,7 +234,7 @@
|
|||||||
import { ref, reactive, defineAsyncComponent, computed, onMounted } from 'vue';
|
import { ref, reactive, defineAsyncComponent, computed, onMounted } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { BasicTableProps, useTable } from '/@/hooks/table';
|
import { BasicTableProps, useTable } from '/@/hooks/table';
|
||||||
import { fetchList, delObjs, checkClassRoomHygieneMonthly } from '/@/api/stuwork/classroomhygienemonthly';
|
import { fetchList, delObjs, checkClassRoomHygieneMonthly, monthlySummaryByYearTerm } from '/@/api/stuwork/classroomhygienemonthly';
|
||||||
import { makeExportClassRoomHygieneMonthlyTask } from '/@/api/stuwork/file';
|
import { makeExportClassRoomHygieneMonthlyTask } from '/@/api/stuwork/file';
|
||||||
import { useMessage, useMessageBox } from '/@/hooks/message';
|
import { useMessage, useMessageBox } from '/@/hooks/message';
|
||||||
import { queryAllSchoolYear } from '/@/api/basic/basicyear';
|
import { queryAllSchoolYear } from '/@/api/basic/basicyear';
|
||||||
@@ -244,6 +279,16 @@ const checkDialogVisible = ref(false);
|
|||||||
// 模板文件URL - 使用后端接口
|
// 模板文件URL - 使用后端接口
|
||||||
const templateUrl = ref('/stuwork/classroomhygienemonthly/import/template');
|
const templateUrl = ref('/stuwork/classroomhygienemonthly/import/template');
|
||||||
|
|
||||||
|
// 统计相关变量
|
||||||
|
const summaryVisible = ref(false);
|
||||||
|
const summaryLoading = ref(false);
|
||||||
|
const summaryData = ref<any[]>([]);
|
||||||
|
const summaryForm = reactive({
|
||||||
|
schoolYear: '',
|
||||||
|
schoolTerm: '',
|
||||||
|
deptCode: ''
|
||||||
|
});
|
||||||
|
|
||||||
// 表格列配置
|
// 表格列配置
|
||||||
const tableColumns = [
|
const tableColumns = [
|
||||||
{ prop: 'schoolYear', label: '学年' },
|
{ prop: 'schoolYear', label: '学年' },
|
||||||
@@ -524,6 +569,37 @@ const formatSchoolTerm = (value: string | number) => {
|
|||||||
return dictItem ? dictItem.label : value;
|
return dictItem ? dictItem.label : value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 打开统计弹窗
|
||||||
|
const handleOpenSummary = () => {
|
||||||
|
summaryVisible.value = true;
|
||||||
|
summaryForm.schoolYear = '';
|
||||||
|
summaryForm.schoolTerm = '';
|
||||||
|
summaryForm.deptCode = '';
|
||||||
|
summaryData.value = [];
|
||||||
|
};
|
||||||
|
|
||||||
|
// 查询统计数据
|
||||||
|
const handleQuerySummary = async () => {
|
||||||
|
if (!summaryForm.schoolYear || !summaryForm.schoolTerm) {
|
||||||
|
useMessage().warning('请选择学年和学期');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
summaryLoading.value = true;
|
||||||
|
try {
|
||||||
|
const res = await monthlySummaryByYearTerm({
|
||||||
|
schoolYear: summaryForm.schoolYear,
|
||||||
|
schoolTerm: summaryForm.schoolTerm,
|
||||||
|
deptCode: summaryForm.deptCode
|
||||||
|
});
|
||||||
|
summaryData.value = Array.isArray(res.data) ? res.data : [];
|
||||||
|
} catch (err: any) {
|
||||||
|
useMessage().error(err.msg || '获取统计数据失败');
|
||||||
|
summaryData.value = [];
|
||||||
|
} finally {
|
||||||
|
summaryLoading.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 初始化
|
// 初始化
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getSchoolYearList();
|
getSchoolYearList();
|
||||||
|
|||||||
@@ -62,16 +62,16 @@
|
|||||||
每周工作计划列表
|
每周工作计划列表
|
||||||
</span>
|
</span>
|
||||||
<div class="header-actions">
|
<div class="header-actions">
|
||||||
<el-button
|
<el-button
|
||||||
icon="FolderAdd"
|
icon="FolderAdd"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="formDialogRef.openDialog()">
|
@click="formDialogRef.openDialog()">
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<right-toolbar
|
<right-toolbar
|
||||||
v-model:showSearch="showSearch"
|
v-model:showSearch="showSearch"
|
||||||
:export="'stuwork_weekPlan_export'"
|
:export="'stuwork_weekPlan_export'"
|
||||||
@exportExcel="exportExcel"
|
@exportExcel="exportExcel"
|
||||||
class="ml10"
|
class="ml10"
|
||||||
@queryTable="getDataList">
|
@queryTable="getDataList">
|
||||||
<TableColumnControl
|
<TableColumnControl
|
||||||
@@ -132,30 +132,37 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</template>
|
</template>
|
||||||
<el-table-column label="操作" width="250" align="center" fixed="right">
|
<el-table-column label="操作" width="300" align="center" fixed="right">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-icon><Setting /></el-icon>
|
<el-icon><Setting /></el-icon>
|
||||||
<span style="margin-left: 4px">操作</span>
|
<span style="margin-left: 4px">操作</span>
|
||||||
</template>
|
</template>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
icon="View"
|
icon="View"
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleViewDetail(scope.row.id)">
|
@click="handleViewDetail(scope.row.id)">
|
||||||
查看详情
|
查看详情
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
icon="EditPen"
|
icon="DataAnalysis"
|
||||||
link
|
link
|
||||||
type="primary"
|
type="success"
|
||||||
|
@click="handleOpenStatistics(scope.row.id)">
|
||||||
|
查看统计
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
icon="EditPen"
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
@click="formDialogRef.openDialog(scope.row.id)">
|
@click="formDialogRef.openDialog(scope.row.id)">
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
icon="Delete"
|
icon="Delete"
|
||||||
link
|
link
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="handleDelete([scope.row.id])">
|
@click="handleDelete([scope.row.id])">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -180,21 +187,56 @@
|
|||||||
|
|
||||||
<!-- 编辑、新增 -->
|
<!-- 编辑、新增 -->
|
||||||
<FormDialog ref="formDialogRef" @refresh="getDataList(false)" />
|
<FormDialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||||
|
|
||||||
<!-- 详情对话框 -->
|
<!-- 详情对话框 -->
|
||||||
<DetailDialog ref="detailDialogRef" @refresh="getDataList(false)" />
|
<DetailDialog ref="detailDialogRef" @refresh="getDataList(false)" />
|
||||||
|
|
||||||
|
<!-- 查看统计弹出框 -->
|
||||||
|
<el-dialog v-model="statisticsVisible" title="班级班主任查看状况统计" width="800px" destroy-on-close>
|
||||||
|
<el-form :model="statisticsForm" :inline="true" class="mb10">
|
||||||
|
<el-form-item label="学院">
|
||||||
|
<el-select v-model="statisticsForm.deptCode" placeholder="请选择学院" clearable filterable style="width: 180px">
|
||||||
|
<el-option v-for="item in deptList" :key="item.deptCode" :label="item.deptName" :value="item.deptCode" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handleQueryStatistics">查询</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-table :data="statisticsData" v-loading="statisticsLoading" stripe max-height="400" :cell-style="{ padding: '8px 0', textAlign: 'center' }" :header-cell-style="{ background: '#f5f7fa', color: '#606266', fontWeight: 'bold', textAlign: 'center' }">
|
||||||
|
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||||
|
<el-table-column prop="className" label="班级" min-width="150" align="center" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="teacherRealName" label="班主任" min-width="100" align="center" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="hasRead" label="是否已查看" min-width="100" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag :type="scope.row.hasRead ? 'success' : 'danger'" size="small">
|
||||||
|
{{ scope.row.hasRead ? '已查看' : '未查看' }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="readTime" label="查看时间" min-width="160" align="center" show-overflow-tooltip>
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.readTime || '-' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<template v-if="statisticsData.length === 0 && !statisticsLoading">
|
||||||
|
<el-empty description="暂无统计数据" :image-size="80" />
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="WeekPlan">
|
<script setup lang="ts" name="WeekPlan">
|
||||||
import { ref, reactive, defineAsyncComponent, onMounted, nextTick } from 'vue'
|
import { ref, reactive, defineAsyncComponent, onMounted, nextTick } from 'vue'
|
||||||
import { BasicTableProps, useTable } from "/@/hooks/table";
|
import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||||
import { fetchList, delObjs } from "/@/api/stuwork/weekplan";
|
import { fetchList, delObjs, readStatistics } from "/@/api/stuwork/weekplan";
|
||||||
import { useMessage, useMessageBox } from "/@/hooks/message";
|
import { useMessage, useMessageBox } from "/@/hooks/message";
|
||||||
import { queryAllSchoolYear } from '/@/api/basic/basicyear'
|
import { queryAllSchoolYear } from '/@/api/basic/basicyear'
|
||||||
|
import { getDeptList } from '/@/api/basic/basicclass'
|
||||||
import TableColumnControl from '/@/components/TableColumnControl/index.vue'
|
import TableColumnControl from '/@/components/TableColumnControl/index.vue'
|
||||||
import {
|
import {
|
||||||
List, Calendar, Clock, Document, User, Setting, Menu, Search, EditPen
|
List, Calendar, Clock, Document, User, Setting, Menu, Search, EditPen, DataAnalysis
|
||||||
} from '@element-plus/icons-vue'
|
} from '@element-plus/icons-vue'
|
||||||
import { useTableColumnControl } from '/@/hooks/tableColumn'
|
import { useTableColumnControl } from '/@/hooks/tableColumn'
|
||||||
|
|
||||||
@@ -210,6 +252,16 @@ const columnControlRef = ref<any>()
|
|||||||
// 搜索变量
|
// 搜索变量
|
||||||
const showSearch = ref(true)
|
const showSearch = ref(true)
|
||||||
const schoolYearList = ref<any[]>([])
|
const schoolYearList = ref<any[]>([])
|
||||||
|
const deptList = ref<any[]>([])
|
||||||
|
|
||||||
|
// 统计相关变量
|
||||||
|
const statisticsVisible = ref(false)
|
||||||
|
const statisticsLoading = ref(false)
|
||||||
|
const statisticsData = ref<any[]>([])
|
||||||
|
const statisticsForm = reactive({
|
||||||
|
weekPlanId: '',
|
||||||
|
deptCode: ''
|
||||||
|
})
|
||||||
|
|
||||||
// 搜索表单
|
// 搜索表单
|
||||||
const searchForm = reactive({
|
const searchForm = reactive({
|
||||||
@@ -326,9 +378,47 @@ const getSchoolYearList = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取学院列表
|
||||||
|
const getDeptListData = async () => {
|
||||||
|
try {
|
||||||
|
const res = await getDeptList()
|
||||||
|
if (res.data) {
|
||||||
|
deptList.value = Array.isArray(res.data) ? res.data : []
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
deptList.value = []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 打开统计弹窗
|
||||||
|
const handleOpenStatistics = (weekPlanId: string) => {
|
||||||
|
statisticsVisible.value = true
|
||||||
|
statisticsForm.weekPlanId = weekPlanId
|
||||||
|
statisticsForm.deptCode = ''
|
||||||
|
statisticsData.value = []
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询统计数据
|
||||||
|
const handleQueryStatistics = async () => {
|
||||||
|
statisticsLoading.value = true
|
||||||
|
try {
|
||||||
|
const res = await readStatistics({
|
||||||
|
weekPlanId: statisticsForm.weekPlanId,
|
||||||
|
deptCode: statisticsForm.deptCode
|
||||||
|
})
|
||||||
|
statisticsData.value = Array.isArray(res.data) ? res.data : []
|
||||||
|
} catch (err: any) {
|
||||||
|
useMessage().error(err.msg || '获取统计数据失败')
|
||||||
|
statisticsData.value = []
|
||||||
|
} finally {
|
||||||
|
statisticsLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 初始化
|
// 初始化
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getSchoolYearList()
|
getSchoolYearList()
|
||||||
|
getDeptListData()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user