Compare commits
No commits in common. "6b2aaa7aebb463ab1881577c99f455ffa2d094fe" and "a7477deb9f71165278ff9621d1315117f8746444" have entirely different histories.
6b2aaa7aeb
...
a7477deb9f
|
|
@ -1,4 +1,3 @@
|
||||||
import { Ref } from "vue";
|
|
||||||
import { array } from "vue-types";
|
import { array } from "vue-types";
|
||||||
|
|
||||||
export interface Dialog {
|
export interface Dialog {
|
||||||
|
|
@ -330,8 +329,6 @@ export interface TableConfig {
|
||||||
searchCallback?: (s: SearchConditions) => void;
|
searchCallback?: (s: SearchConditions) => void;
|
||||||
/** 新增/修改回调函数 */
|
/** 新增/修改回调函数 */
|
||||||
editCallback?: (from: any) => void;
|
editCallback?: (from: any) => void;
|
||||||
/** 编辑表单初始化回调函数 */
|
|
||||||
editInitCallback?: (from: Ref<Record<string, TableColumn>>) => void;
|
|
||||||
/** 展开行的回调 */
|
/** 展开行的回调 */
|
||||||
expandChange?: (row: any, expandedRows: any[]) => void;
|
expandChange?: (row: any, expandedRows: any[]) => void;
|
||||||
/** API地址 */
|
/** API地址 */
|
||||||
|
|
|
||||||
|
|
@ -46,9 +46,6 @@ onMounted(() => {
|
||||||
intiColumn();
|
intiColumn();
|
||||||
fetchInitData();
|
fetchInitData();
|
||||||
fetchFormData();
|
fetchFormData();
|
||||||
//回调
|
|
||||||
if (editData.value.table.editInitCallback)
|
|
||||||
editData.value.table.editInitCallback(column);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function execute(obj, btn) {
|
function execute(obj, btn) {
|
||||||
|
|
|
||||||
|
|
@ -69,13 +69,13 @@ const tableData: TableConfig = intTableData({
|
||||||
{
|
{
|
||||||
topBtn: true, // 头部按钮
|
topBtn: true, // 头部按钮
|
||||||
label: "导入",
|
label: "导入",
|
||||||
click: entryAdminnfo,
|
click:entryAdminnfo,
|
||||||
btnStyle: "info", // topBtn: true才生效 success danger
|
btnStyle: "info", // topBtn: true才生效 success danger
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
topBtn: true, // 头部按钮
|
topBtn: true, // 头部按钮
|
||||||
label: "导入模板",
|
label: "导入模板",
|
||||||
click: DwImportTemplate,
|
click:DwImportTemplate,
|
||||||
btnStyle: "info", // topBtn: true才生效 success danger
|
btnStyle: "info", // topBtn: true才生效 success danger
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
@ -149,7 +149,7 @@ function entryAdminnfo(eid: number) {
|
||||||
const url = res && window.URL.createObjectURL(res);
|
const url = res && window.URL.createObjectURL(res);
|
||||||
const link = document.createElement("a");
|
const link = document.createElement("a");
|
||||||
link.href = url;
|
link.href = url;
|
||||||
link.setAttribute("download", "导入失败管理员信息.xlsx");
|
link.setAttribute("download","导入失败管理员信息.xlsx");
|
||||||
document.body.appendChild(link);
|
document.body.appendChild(link);
|
||||||
link.click();
|
link.click();
|
||||||
document.body.removeChild(link);
|
document.body.removeChild(link);
|
||||||
|
|
@ -158,7 +158,7 @@ function entryAdminnfo(eid: number) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
fileE.click();
|
fileE.click();
|
||||||
} catch (error) {}
|
} catch (error) { }
|
||||||
}
|
}
|
||||||
function DwImportTemplate(obj, row, callBack) {
|
function DwImportTemplate(obj, row, callBack) {
|
||||||
const baseUrl = import.meta.env.VITE_API_BASEURL;
|
const baseUrl = import.meta.env.VITE_API_BASEURL;
|
||||||
|
|
|
||||||
|
|
@ -108,27 +108,16 @@ const tableData: TableConfig = intTableData({
|
||||||
rules: ruleClassName,
|
rules: ruleClassName,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
elective1: {
|
type: {
|
||||||
label: "主修",
|
label: "类型",
|
||||||
width: "100px",
|
|
||||||
type: "dropdown",
|
|
||||||
edit: {
|
|
||||||
edit: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
elective2: {
|
|
||||||
label: "选修1",
|
|
||||||
width: "100px",
|
|
||||||
type: "dropdown",
|
|
||||||
edit: {
|
|
||||||
edit: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
elective3: {
|
|
||||||
label: "选修2",
|
|
||||||
type: "dropdown",
|
type: "dropdown",
|
||||||
|
search: {
|
||||||
|
yes: true,
|
||||||
|
},
|
||||||
edit: {
|
edit: {
|
||||||
|
add: true,
|
||||||
edit: true,
|
edit: true,
|
||||||
|
rules: ruleRequired,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -142,13 +131,9 @@ const tableData: TableConfig = intTableData({
|
||||||
const showTable = ref(false);
|
const showTable = ref(false);
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
//初始化数据原
|
//初始化数据原
|
||||||
const subjectC = (await getenum("SubjectEnum")).data;
|
|
||||||
tableData.column.elective1.setting.datasource = subjectC;
|
|
||||||
tableData.column.elective2.setting.datasource = subjectC;
|
|
||||||
tableData.column.elective3.setting.datasource = subjectC;
|
|
||||||
|
|
||||||
tableData.column.Grade.setting.datasource = gradeComboModel();
|
tableData.column.Grade.setting.datasource = gradeComboModel();
|
||||||
// tableData.column.type.setting.datasource = (await getenum("ClassTypeEnum")).data;
|
tableData.column.type.setting.datasource = (await getenum("ClassTypeEnum")).data;
|
||||||
tableData.column.schoolId.setting.datasource = (
|
tableData.column.schoolId.setting.datasource = (
|
||||||
await SchoolApi.querycombo({ TextName: "Name", ValueName: "Id" })
|
await SchoolApi.querycombo({ TextName: "Name", ValueName: "Id" })
|
||||||
).data;
|
).data;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue