feat: 新建赴校信息开发中
This commit is contained in:
parent
9d647f8645
commit
3aaebcb3cf
|
|
@ -6,8 +6,8 @@ import type { Res } from "@/utils/http/types";
|
|||
* @param {string} type 枚举类型 type=StatusEnum
|
||||
* @return {object}
|
||||
*/
|
||||
export function getenum(data) {
|
||||
return http.request<Res<any>>("post", `/back/schools/QueryCombo`, {
|
||||
export function getenumApi(data) {
|
||||
return http.request<Res<any>>("post", `/SchoolBusiness/QueryCombo`, {
|
||||
data
|
||||
});
|
||||
}
|
||||
|
|
@ -16,8 +16,34 @@ export function getenum(data) {
|
|||
* @param {string} type 枚举类型 type=StatusEnum
|
||||
* @return {object}
|
||||
*/
|
||||
export function getPageList(data) {
|
||||
export function getPageListApi(data) {
|
||||
return http.request<Res<any>>("post", `/SchoolBusiness/QueryPageList`, {
|
||||
data
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @description 新增赴校信息或者编辑 id:0(新增),其他(编辑)
|
||||
* @return {object}
|
||||
*/
|
||||
export function addOrEditApi(data: any) {
|
||||
return http.request<Res<any>>("post", `/SchoolBusiness/Edit`, {
|
||||
data
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @description 获取赴校信息详情
|
||||
* @param {string} type 枚举类型 type=StatusEnum
|
||||
* @return {object}
|
||||
*/
|
||||
export function getSchoolBusinessDetailApi(id: string | number) {
|
||||
return http.request<Res<any>>("get", `/SchoolBusiness/${id}`);
|
||||
}
|
||||
/**
|
||||
* @description 删除赴校信息
|
||||
* @return {object}
|
||||
*/
|
||||
export function deleteSchoolBusinessApi(data: Array<string | number>) {
|
||||
return http.request<Res<any>>("post", `/SchoolBusiness/Del`, {
|
||||
data
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@
|
|||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lastTime" label="最后跟进时间" min-width="160" />
|
||||
<!-- <el-table-column prop="lastTime" label="最后跟进时间" min-width="160" /> -->
|
||||
<el-table-column label="操作" fixed="right" min-width="220">
|
||||
<template #default="{ row }">
|
||||
<el-button size="small" type="danger" plain @click="onDelete(row)"
|
||||
|
|
@ -132,11 +132,18 @@
|
|||
</template>
|
||||
<!-- 赴校信息管理菜单 -->
|
||||
<script setup lang="ts" name="Toschoolinfomanage">
|
||||
import { getenum, getPageList } from "@/api/toschoolinfomanage";
|
||||
import {
|
||||
addOrEditApi,
|
||||
getenumApi,
|
||||
getPageListApi,
|
||||
getSchoolBusinessDetailApi,
|
||||
deleteSchoolBusinessApi
|
||||
} from "@/api/toschoolinfomanage";
|
||||
import { ref, reactive, computed, onMounted } from "vue";
|
||||
import dayjs from "dayjs";
|
||||
import { ElMessage } from "element-plus";
|
||||
import AddModal from "./addModal.vue";
|
||||
import { message } from "@/utils/message";
|
||||
interface TableItem {
|
||||
id: number;
|
||||
school: string;
|
||||
|
|
@ -157,7 +164,7 @@ const schoolOptions = ref([
|
|||
]);
|
||||
const isShowAddModal = ref(false);
|
||||
onMounted(() => {
|
||||
getenum({ TextName: "Name", ValueName: "Id" }).then(res => {
|
||||
getenumApi({ TextName: "Name", ValueName: "Id" }).then(res => {
|
||||
if (res.code === 200) {
|
||||
schoolOptions.value = res.data.map(i => ({
|
||||
label: i.text,
|
||||
|
|
@ -165,6 +172,7 @@ onMounted(() => {
|
|||
}));
|
||||
}
|
||||
});
|
||||
// addOrEdit();
|
||||
loadList();
|
||||
});
|
||||
|
||||
|
|
@ -174,6 +182,60 @@ const gradeOptions = [
|
|||
{ label: "高三", value: "高三" },
|
||||
{ label: "初三", value: "初三" }
|
||||
];
|
||||
/**
|
||||
* 新建赴校信息提交
|
||||
*/
|
||||
const addOrEdit = () => {
|
||||
addOrEditApi(
|
||||
addOrEditApi({
|
||||
id: 0,
|
||||
schoolId: 708490619039814,
|
||||
schoolName: "重庆测试学校",
|
||||
grade: "初二",
|
||||
schoolBusinessUser: ["向波4"],
|
||||
startTime: "2025-08-20T07:28:38",
|
||||
// remark: "string",
|
||||
feedbackQuestions: [
|
||||
{
|
||||
endTime: null,
|
||||
question: "xb测试反馈问题1(双师课堂)",
|
||||
questionType: 10,
|
||||
solution: "xb测试反馈问题1建议",
|
||||
sort: "1"
|
||||
}
|
||||
// {
|
||||
// endTime: null,
|
||||
// question: "xb测试反馈问题2(设备)",
|
||||
// questionType: 15,
|
||||
// solution: "xb测试反馈问题2建议",
|
||||
// sort: "2"
|
||||
// },
|
||||
// {
|
||||
// endTime: null,
|
||||
// question: "xb测试反馈问题2(学生)",
|
||||
// questionType: 20,
|
||||
// solution: "xb测试反馈问题3建议",
|
||||
// sort: "3"
|
||||
// }
|
||||
],
|
||||
// solutionRecord: {
|
||||
// solution: "string",
|
||||
// endRecord: "string",
|
||||
// record: [
|
||||
// {
|
||||
// executionRecords: "string",
|
||||
// executionTime: "2025-08-18T08:31:52.716Z"
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// solutionEnd: true,
|
||||
isDiscussion: false,
|
||||
discussion: "开展座谈座谈座谈座谈座谈座谈座谈座谈座谈座谈座谈座谈座谈",
|
||||
isClassMeeting: false,
|
||||
classMeeting: "班会情况班会情况班会情况班会情况班会情况班会情况班会情况"
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
const query = reactive({
|
||||
school: "" as string | undefined,
|
||||
|
|
@ -234,7 +296,7 @@ async function loadList() {
|
|||
payload.startTimeEnd = query.times[1];
|
||||
}
|
||||
try {
|
||||
const res = await getPageList(payload);
|
||||
const res = await getPageListApi(payload);
|
||||
if (res.code === 200) {
|
||||
const rows = Array.isArray(res.data?.data) ? res.data.data : [];
|
||||
listData.value = rows.map(mapApiItemToRow);
|
||||
|
|
@ -285,11 +347,24 @@ function handleSizeChange(s: number) {
|
|||
}
|
||||
|
||||
function onDelete(row: TableItem) {
|
||||
console.log(`删除`);
|
||||
console.log(`删除`, row);
|
||||
deleteSchoolBusinessApi([row.id]).then(res => {
|
||||
if (res.code === 200) {
|
||||
message("删除成功", { type: "success" });
|
||||
loadList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
* @param row
|
||||
*/
|
||||
function onDetail(row: TableItem) {
|
||||
console.log(`详情`);
|
||||
getSchoolBusinessDetailApi(row.id).then(res => {
|
||||
if (res.code === 200) {
|
||||
console.log("详情信息", res.data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function onFollow(row: TableItem) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue