|
@@ -80,88 +80,88 @@ let state = ref({
|
|
|
let ruleFormRef = ref();
|
|
|
|
|
|
// 父子级的学校到班级的数据参数
|
|
|
-const options = [
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- name: 'Asia',
|
|
|
- children: [
|
|
|
- {
|
|
|
- id: 2,
|
|
|
- name: 'China',
|
|
|
- children: [
|
|
|
- { id: 3, name: 'Beijing' },
|
|
|
- { id: 4, name: 'Shanghai' },
|
|
|
- { id: 5, name: 'Hangzhou' },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- id: 6,
|
|
|
- name: 'Japan',
|
|
|
- children: [
|
|
|
- { id: 7, name: 'Tokyo' },
|
|
|
- { id: 8, name: 'Osaka' },
|
|
|
- { id: 9, name: 'Kyoto' },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- id: 10,
|
|
|
- name: 'Korea',
|
|
|
- children: [
|
|
|
- { id: 11, name: 'Seoul' },
|
|
|
- { id: 12, name: 'Busan' },
|
|
|
- { id: 13, name: 'Taegu' },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- id: 14,
|
|
|
- name: 'Europe',
|
|
|
- children: [
|
|
|
- {
|
|
|
- id: 15,
|
|
|
- name: 'France',
|
|
|
- children: [
|
|
|
- { id: 16, name: 'Paris' },
|
|
|
- { id: 17, name: 'Marseille' },
|
|
|
- { id: 18, name: 'Lyon' },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- id: 19,
|
|
|
- name: 'UK',
|
|
|
- children: [
|
|
|
- { id: 20, name: 'London' },
|
|
|
- { id: 21, name: 'Birmingham' },
|
|
|
- { id: 22, name: 'Manchester' },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- id: 23,
|
|
|
- name: 'North America',
|
|
|
- children: [
|
|
|
- {
|
|
|
- id: 24,
|
|
|
- name: 'US',
|
|
|
- children: [
|
|
|
- { id: 25, name: 'New York' },
|
|
|
- { id: 26, name: 'Los Angeles' },
|
|
|
- { id: 27, name: 'Washington' },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- id: 28,
|
|
|
- name: 'Canada',
|
|
|
- children: [
|
|
|
- { id: 29, name: 'Toronto' },
|
|
|
- { id: 30, name: 'Montreal' },
|
|
|
- { id: 31, name: 'Ottawa' },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
+let options = [
|
|
|
+ // {
|
|
|
+ // id: 1,
|
|
|
+ // name: 'Asia',
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // id: 2,
|
|
|
+ // name: 'China',
|
|
|
+ // children: [
|
|
|
+ // { id: 3, name: 'Beijing' },
|
|
|
+ // { id: 4, name: 'Shanghai' },
|
|
|
+ // { id: 5, name: 'Hangzhou' },
|
|
|
+ // ],
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 6,
|
|
|
+ // name: 'Japan',
|
|
|
+ // children: [
|
|
|
+ // { id: 7, name: 'Tokyo' },
|
|
|
+ // { id: 8, name: 'Osaka' },
|
|
|
+ // { id: 9, name: 'Kyoto' },
|
|
|
+ // ],
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 10,
|
|
|
+ // name: 'Korea',
|
|
|
+ // children: [
|
|
|
+ // { id: 11, name: 'Seoul' },
|
|
|
+ // { id: 12, name: 'Busan' },
|
|
|
+ // { id: 13, name: 'Taegu' },
|
|
|
+ // ],
|
|
|
+ // },
|
|
|
+ // ],
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 14,
|
|
|
+ // name: 'Europe',
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // id: 15,
|
|
|
+ // name: 'France',
|
|
|
+ // children: [
|
|
|
+ // { id: 16, name: 'Paris' },
|
|
|
+ // { id: 17, name: 'Marseille' },
|
|
|
+ // { id: 18, name: 'Lyon' },
|
|
|
+ // ],
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 19,
|
|
|
+ // name: 'UK',
|
|
|
+ // children: [
|
|
|
+ // { id: 20, name: 'London' },
|
|
|
+ // { id: 21, name: 'Birmingham' },
|
|
|
+ // { id: 22, name: 'Manchester' },
|
|
|
+ // ],
|
|
|
+ // },
|
|
|
+ // ],
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 23,
|
|
|
+ // name: 'North America',
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // id: 24,
|
|
|
+ // name: 'US',
|
|
|
+ // children: [
|
|
|
+ // { id: 25, name: 'New York' },
|
|
|
+ // { id: 26, name: 'Los Angeles' },
|
|
|
+ // { id: 27, name: 'Washington' },
|
|
|
+ // ],
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 28,
|
|
|
+ // name: 'Canada',
|
|
|
+ // children: [
|
|
|
+ // { id: 29, name: 'Toronto' },
|
|
|
+ // { id: 30, name: 'Montreal' },
|
|
|
+ // { id: 31, name: 'Ottawa' },
|
|
|
+ // ],
|
|
|
+ // },
|
|
|
+ // ],
|
|
|
+ // },
|
|
|
]
|
|
|
|
|
|
/**
|
|
@@ -522,7 +522,36 @@ const btnDetail = (res) => {
|
|
|
*/
|
|
|
const optionsUpdate = () => {
|
|
|
|
|
|
-
|
|
|
+ // 先获取所有最顶级的数据
|
|
|
+ let submit = {
|
|
|
+ // 默认优先去顶级所有,传 0 。 否则你要看到 学院, 专业 ,班级 的列表,这里固定就传 学院这个的id值
|
|
|
+ "schoolId" : 0,
|
|
|
+ };
|
|
|
+
|
|
|
+ schoolTree(submit)
|
|
|
+ .then(response => {
|
|
|
+
|
|
|
+ options = [];
|
|
|
+
|
|
|
+ let data = response?.data?.data;
|
|
|
+
|
|
|
+ options = data;
|
|
|
+ // console.log(
|
|
|
+ // "schoolTreeEvent response", response, data
|
|
|
+ // );
|
|
|
+
|
|
|
+ for (let i = 0; i < options.length; i++) {
|
|
|
+
|
|
|
+ let thisOptions = options[i];
|
|
|
+ console.log(
|
|
|
+ "thisOptions", thisOptions
|
|
|
+ );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+
|
|
|
+ });
|
|
|
|
|
|
}
|
|
|
|