From 957988936420b094e0025ef70ec5eabfeb95158b Mon Sep 17 00:00:00 2001 From: WMK Date: Fri, 29 Jan 2021 13:10:13 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=B8=88=E7=94=9F=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/cloudacademy.js | 56 +++++++++++ src/api/cloudmajor.js | 56 +++++++++++ src/api/cloudschool.js | 56 +++++++++++ src/api/cloudstudent.js | 56 +++++++++++ src/api/cloudteacher.js | 56 +++++++++++ src/const/crud/cloudacademy.js | 27 ++++++ src/const/crud/cloudmajor.js | 27 ++++++ src/const/crud/cloudschool.js | 73 ++++++++++++++ src/const/crud/cloudstudent.js | 39 ++++++++ src/const/crud/cloudteacher.js | 43 +++++++++ src/views/cuim/cloudacademy/index.vue | 130 +++++++++++++++++++++++++ src/views/cuim/cloudmajor/index.vue | 130 +++++++++++++++++++++++++ src/views/cuim/cloudschool/index.vue | 133 ++++++++++++++++++++++++++ src/views/cuim/cloudstudent/index.vue | 130 +++++++++++++++++++++++++ src/views/cuim/cloudteacher/index.vue | 130 +++++++++++++++++++++++++ 15 files changed, 1142 insertions(+) create mode 100644 src/api/cloudacademy.js create mode 100644 src/api/cloudmajor.js create mode 100644 src/api/cloudschool.js create mode 100644 src/api/cloudstudent.js create mode 100644 src/api/cloudteacher.js create mode 100644 src/const/crud/cloudacademy.js create mode 100644 src/const/crud/cloudmajor.js create mode 100644 src/const/crud/cloudschool.js create mode 100644 src/const/crud/cloudstudent.js create mode 100644 src/const/crud/cloudteacher.js create mode 100644 src/views/cuim/cloudacademy/index.vue create mode 100644 src/views/cuim/cloudmajor/index.vue create mode 100644 src/views/cuim/cloudschool/index.vue create mode 100644 src/views/cuim/cloudstudent/index.vue create mode 100644 src/views/cuim/cloudteacher/index.vue diff --git a/src/api/cloudacademy.js b/src/api/cloudacademy.js new file mode 100644 index 00000000..ebe0671e --- /dev/null +++ b/src/api/cloudacademy.js @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2018-2025, lengleng All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the pig4cloud.com developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: lengleng (wangiegie@gmail.com) + */ + +import request from '@/router/axios' + +export function fetchList(query) { + return request({ + url: '/cuim/cloudacademy/page', + method: 'get', + params: query + }) +} + +export function addObj(obj) { + return request({ + url: '/cuim/cloudacademy', + method: 'post', + data: obj + }) +} + +export function getObj(id) { + return request({ + url: '/cuim/cloudacademy/' + id, + method: 'get' + }) +} + +export function delObj(id) { + return request({ + url: '/cuim/cloudacademy/' + id, + method: 'delete' + }) +} + +export function putObj(obj) { + return request({ + url: '/cuim/cloudacademy', + method: 'put', + data: obj + }) +} diff --git a/src/api/cloudmajor.js b/src/api/cloudmajor.js new file mode 100644 index 00000000..ed5d47f6 --- /dev/null +++ b/src/api/cloudmajor.js @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2018-2025, lengleng All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the pig4cloud.com developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: lengleng (wangiegie@gmail.com) + */ + +import request from '@/router/axios' + +export function fetchList(query) { + return request({ + url: '/cuim/cloudmajor/page', + method: 'get', + params: query + }) +} + +export function addObj(obj) { + return request({ + url: '/cuim/cloudmajor', + method: 'post', + data: obj + }) +} + +export function getObj(id) { + return request({ + url: '/cuim/cloudmajor/' + id, + method: 'get' + }) +} + +export function delObj(id) { + return request({ + url: '/cuim/cloudmajor/' + id, + method: 'delete' + }) +} + +export function putObj(obj) { + return request({ + url: '/cuim/cloudmajor', + method: 'put', + data: obj + }) +} diff --git a/src/api/cloudschool.js b/src/api/cloudschool.js new file mode 100644 index 00000000..90a5c814 --- /dev/null +++ b/src/api/cloudschool.js @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2018-2025, lengleng All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the pig4cloud.com developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific pri0or written permission. + * Author: lengleng (wangiegie@gmail.com) + */ + +import request from '@/router/axios' + +export function fetchList(query) { + return request({ + url: '/cuim/cloudschool/page', + method: 'get', + params: query + }) +} + +export function addObj(obj) { + return request({ + url: '/cuim/cloudschool', + method: 'post', + data: obj + }) +} + +export function getObj(id) { + return request({ + url: '/cuim/cloudschool/' + id, + method: 'get' + }) +} + +export function delObj(id) { + return request({ + url: '/cuim/cloudschool/' + id, + method: 'delete' + }) +} + +export function putObj(obj) { + return request({ + url: '/cuim/cloudschool', + method: 'put', + data: obj + }) +} diff --git a/src/api/cloudstudent.js b/src/api/cloudstudent.js new file mode 100644 index 00000000..9dec7d16 --- /dev/null +++ b/src/api/cloudstudent.js @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2018-2025, lengleng All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the pig4cloud.com developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: lengleng (wangiegie@gmail.com) + */ + +import request from '@/router/axios' + +export function fetchList(query) { + return request({ + url: '/cuim/cloudstudent/page', + method: 'get', + params: query + }) +} + +export function addObj(obj) { + return request({ + url: '/cuim/cloudstudent', + method: 'post', + data: obj + }) +} + +export function getObj(id) { + return request({ + url: '/cuim/cloudstudent/' + id, + method: 'get' + }) +} + +export function delObj(id) { + return request({ + url: '/cuim/cloudstudent/' + id, + method: 'delete' + }) +} + +export function putObj(obj) { + return request({ + url: '/cuim/cloudstudent', + method: 'put', + data: obj + }) +} diff --git a/src/api/cloudteacher.js b/src/api/cloudteacher.js new file mode 100644 index 00000000..90323097 --- /dev/null +++ b/src/api/cloudteacher.js @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2018-2025, lengleng All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the pig4cloud.com developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: lengleng (wangiegie@gmail.com) + */ + +import request from '@/router/axios' + +export function fetchList(query) { + return request({ + url: '/cuim/cloudteacher/page', + method: 'get', + params: query + }) +} + +export function addObj(obj) { + return request({ + url: '/cuim/cloudteacher', + method: 'post', + data: obj + }) +} + +export function getObj(id) { + return request({ + url: '/cuim/cloudteacher/' + id, + method: 'get' + }) +} + +export function delObj(id) { + return request({ + url: '/cuim/cloudteacher/' + id, + method: 'delete' + }) +} + +export function putObj(obj) { + return request({ + url: '/cuim/cloudteacher', + method: 'put', + data: obj + }) +} diff --git a/src/const/crud/cloudacademy.js b/src/const/crud/cloudacademy.js new file mode 100644 index 00000000..9a421149 --- /dev/null +++ b/src/const/crud/cloudacademy.js @@ -0,0 +1,27 @@ +export const tableOption = { + "border": true, + "index": true, + "indexLabel": "序号", + "stripe": true, + "menuAlign": "center", + "align": "center", + "searchMenuSpan": 6, + "column": [ + { + "type": "input", + "label": "学院id(主键)", + "prop": "id" + }, { + "type": "input", + "label": "学校id", + "prop": "schoolId" + }, { + "type": "input", + "label": "学院名称", + "prop": "name" + }, { + "type": "input", + "label": "描述", + "prop": "description" + } ] +} diff --git a/src/const/crud/cloudmajor.js b/src/const/crud/cloudmajor.js new file mode 100644 index 00000000..b280a88d --- /dev/null +++ b/src/const/crud/cloudmajor.js @@ -0,0 +1,27 @@ +export const tableOption = { + "border": true, + "index": true, + "indexLabel": "序号", + "stripe": true, + "menuAlign": "center", + "align": "center", + "searchMenuSpan": 6, + "column": [ + { + "type": "input", + "label": "专业id(主键)", + "prop": "id" + }, { + "type": "input", + "label": "学院id", + "prop": "academyId" + }, { + "type": "input", + "label": "专业名称", + "prop": "name" + }, { + "type": "input", + "label": "描述", + "prop": "description" + } ] +} diff --git a/src/const/crud/cloudschool.js b/src/const/crud/cloudschool.js new file mode 100644 index 00000000..d92f4dc9 --- /dev/null +++ b/src/const/crud/cloudschool.js @@ -0,0 +1,73 @@ +export const tableOption = { + "border": true, + "index": true, + "selection":true, + "indexLabel": "序号", + "stripe": true, + "menuAlign": "center", + "align": "center", + "searchMenuSpan": 6, + "column": [ + { + "type": "input", + "label": "学校id(主键)", + "prop": "id", + "hide":true, + "span": 24, + "showColumn":false, + "addDisplay": false, + "editDisplay": false + }, { + "type": "input", + "label": "学校名称", + "prop": "name", + "search":true, + "span": 24, + rules: [{ + required: true, + message: '学校名称' + }, + { + min: 3, + max: 20, + message: '长度在 3 到 20 个字符', + trigger: 'blur' + } + ] + + }, { + "type": "input", + "label": "所在地", + "prop": "loacation", + "search":true, + "span": 24, + rules: [{ + required: true, + message: '所在地' + }, + { + min: 3, + max: 50, + message: '长度在 3 到 50 个字符', + trigger: 'blur' + } + ] + }, { + "type": "input", + "label": "描述", + "prop": "description", + "search":true, + "span": 24, + rules: [{ + required: true, + message: '描述' + }, + { + min: 5, + max: 100, + message: '长度在 5 到 100 个字符', + trigger: 'blur' + } + ] + } ] +} diff --git a/src/const/crud/cloudstudent.js b/src/const/crud/cloudstudent.js new file mode 100644 index 00000000..58f3013d --- /dev/null +++ b/src/const/crud/cloudstudent.js @@ -0,0 +1,39 @@ +export const tableOption = { + "border": true, + "index": true, + "indexLabel": "序号", + "stripe": true, + "menuAlign": "center", + "align": "center", + "searchMenuSpan": 6, + "column": [ + { + "type": "input", + "label": "学生id(主键)", + "prop": "id" + }, { + "type": "input", + "label": "用户id", + "prop": "userId" + }, { + "type": "input", + "label": "专业id", + "prop": "majorId" + }, { + "type": "input", + "label": "姓名", + "prop": "name" + }, { + "type": "input", + "label": "性别", + "prop": "sex" + }, { + "type": "input", + "label": "个人电话", + "prop": "phone" + }, { + "type": "input", + "label": "电子邮箱", + "prop": "email" + } ] +} diff --git a/src/const/crud/cloudteacher.js b/src/const/crud/cloudteacher.js new file mode 100644 index 00000000..dc27a3f8 --- /dev/null +++ b/src/const/crud/cloudteacher.js @@ -0,0 +1,43 @@ +export const tableOption = { + "border": true, + "index": true, + "indexLabel": "序号", + "stripe": true, + "menuAlign": "center", + "align": "center", + "searchMenuSpan": 6, + "column": [ + { + "type": "input", + "label": "老师id(主键)", + "prop": "id" + }, { + "type": "input", + "label": "用户id", + "prop": "userId" + }, { + "type": "input", + "label": "专业id", + "prop": "majorId" + }, { + "type": "input", + "label": "姓名", + "prop": "name" + }, { + "type": "input", + "label": "性别", + "prop": "sex" + }, { + "type": "input", + "label": "个人电话", + "prop": "phone" + }, { + "type": "input", + "label": "电子邮箱", + "prop": "email" + }, { + "type": "input", + "label": "职务", + "prop": "position" + } ] +} diff --git a/src/views/cuim/cloudacademy/index.vue b/src/views/cuim/cloudacademy/index.vue new file mode 100644 index 00000000..8bff87bd --- /dev/null +++ b/src/views/cuim/cloudacademy/index.vue @@ -0,0 +1,130 @@ + + + + diff --git a/src/views/cuim/cloudmajor/index.vue b/src/views/cuim/cloudmajor/index.vue new file mode 100644 index 00000000..cd332b83 --- /dev/null +++ b/src/views/cuim/cloudmajor/index.vue @@ -0,0 +1,130 @@ + + + + diff --git a/src/views/cuim/cloudschool/index.vue b/src/views/cuim/cloudschool/index.vue new file mode 100644 index 00000000..481f1ed5 --- /dev/null +++ b/src/views/cuim/cloudschool/index.vue @@ -0,0 +1,133 @@ + + + + diff --git a/src/views/cuim/cloudstudent/index.vue b/src/views/cuim/cloudstudent/index.vue new file mode 100644 index 00000000..5929e985 --- /dev/null +++ b/src/views/cuim/cloudstudent/index.vue @@ -0,0 +1,130 @@ + + + + diff --git a/src/views/cuim/cloudteacher/index.vue b/src/views/cuim/cloudteacher/index.vue new file mode 100644 index 00000000..6a592fd0 --- /dev/null +++ b/src/views/cuim/cloudteacher/index.vue @@ -0,0 +1,130 @@ + + + + -- Gitee From 9efc189e02d5904671dee0f484de88e8037637c1 Mon Sep 17 00:00:00 2001 From: WMK Date: Mon, 1 Feb 2021 16:05:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=B8=88=E7=94=9F=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E5=88=9D=E5=A7=8B=E8=AF=9D=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E7=9B=AE=E5=BD=95=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/{ => cuim}/cloudacademy.js | 9 +++ src/api/{ => cuim}/cloudmajor.js | 0 src/api/{ => cuim}/cloudschool.js | 0 src/api/{ => cuim}/cloudstudent.js | 0 src/api/{ => cuim}/cloudteacher.js | 0 src/const/crud/cloudacademy.js | 27 -------- src/const/crud/cuim/cloudacademy.js | 77 +++++++++++++++++++++++ src/const/crud/{ => cuim}/cloudmajor.js | 0 src/const/crud/{ => cuim}/cloudschool.js | 0 src/const/crud/{ => cuim}/cloudstudent.js | 0 src/const/crud/{ => cuim}/cloudteacher.js | 0 src/views/cuim/cloudacademy/index.vue | 45 ++++++++++++- src/views/cuim/cloudmajor/index.vue | 4 +- src/views/cuim/cloudschool/index.vue | 4 +- src/views/cuim/cloudstudent/index.vue | 4 +- src/views/cuim/cloudteacher/index.vue | 4 +- 16 files changed, 136 insertions(+), 38 deletions(-) rename src/api/{ => cuim}/cloudacademy.js (90%) rename src/api/{ => cuim}/cloudmajor.js (100%) rename src/api/{ => cuim}/cloudschool.js (100%) rename src/api/{ => cuim}/cloudstudent.js (100%) rename src/api/{ => cuim}/cloudteacher.js (100%) delete mode 100644 src/const/crud/cloudacademy.js create mode 100644 src/const/crud/cuim/cloudacademy.js rename src/const/crud/{ => cuim}/cloudmajor.js (100%) rename src/const/crud/{ => cuim}/cloudschool.js (100%) rename src/const/crud/{ => cuim}/cloudstudent.js (100%) rename src/const/crud/{ => cuim}/cloudteacher.js (100%) diff --git a/src/api/cloudacademy.js b/src/api/cuim/cloudacademy.js similarity index 90% rename from src/api/cloudacademy.js rename to src/api/cuim/cloudacademy.js index ebe0671e..de0e5e99 100644 --- a/src/api/cloudacademy.js +++ b/src/api/cuim/cloudacademy.js @@ -25,6 +25,15 @@ export function fetchList(query) { }) } +export function fetchSchoolInfoList(query) { + return request({ + url: '/cuim/cloudschool/page', + method: 'get', + params: query + }) +} + + export function addObj(obj) { return request({ url: '/cuim/cloudacademy', diff --git a/src/api/cloudmajor.js b/src/api/cuim/cloudmajor.js similarity index 100% rename from src/api/cloudmajor.js rename to src/api/cuim/cloudmajor.js diff --git a/src/api/cloudschool.js b/src/api/cuim/cloudschool.js similarity index 100% rename from src/api/cloudschool.js rename to src/api/cuim/cloudschool.js diff --git a/src/api/cloudstudent.js b/src/api/cuim/cloudstudent.js similarity index 100% rename from src/api/cloudstudent.js rename to src/api/cuim/cloudstudent.js diff --git a/src/api/cloudteacher.js b/src/api/cuim/cloudteacher.js similarity index 100% rename from src/api/cloudteacher.js rename to src/api/cuim/cloudteacher.js diff --git a/src/const/crud/cloudacademy.js b/src/const/crud/cloudacademy.js deleted file mode 100644 index 9a421149..00000000 --- a/src/const/crud/cloudacademy.js +++ /dev/null @@ -1,27 +0,0 @@ -export const tableOption = { - "border": true, - "index": true, - "indexLabel": "序号", - "stripe": true, - "menuAlign": "center", - "align": "center", - "searchMenuSpan": 6, - "column": [ - { - "type": "input", - "label": "学院id(主键)", - "prop": "id" - }, { - "type": "input", - "label": "学校id", - "prop": "schoolId" - }, { - "type": "input", - "label": "学院名称", - "prop": "name" - }, { - "type": "input", - "label": "描述", - "prop": "description" - } ] -} diff --git a/src/const/crud/cuim/cloudacademy.js b/src/const/crud/cuim/cloudacademy.js new file mode 100644 index 00000000..b4c44753 --- /dev/null +++ b/src/const/crud/cuim/cloudacademy.js @@ -0,0 +1,77 @@ +export const tableOption = { + "border": true, + "index": true, + "indexLabel": "序号", + "stripe": true, + "menuAlign": "center", + "align": "center", + "searchMenuSpan": 6, + "column": [ + { + "type": "hide", + "label": "学院id(主键)", + "prop": "id", + "hide":true, + "span": 16, + "showColumn":false, + "addDisplay": false, + "editDisplay": false + }, { + "type": "input", + "label": "学院名称", + "prop": "name", + "span": 16, + "search":true + }, { + "type": "input", + "label": "所属学校", + "span": 16, + "prop": "schoolName", + "search":true, + "addDisplay": false, + "editDisplay": false + }, { + "label": "所属学校", + "prop": "schoolId", + formslot: true, + slot: true, + span: 16, + hide: true, + rules: [{ + required: true, + message: '请选择学校', + trigger: 'change' + }] + }, { + "type": "input", + "label": "描述", + "span": 16, + "prop": "description", + "search":true + } ] +} + +export const schoolTableSelectFormOption = { + children:{ + border: true, + "column": [ + { + "label": "学校id(主键)", + "prop": "id", + "hide":true + }, { + "label": "学校名称", + "prop": "name", + "search":true, + }, { + "label": "所在地", + "prop": "loacation", + "search":true, + }, { + "label": "描述", + "prop": "description", + "search": true, + } + ] + } +} diff --git a/src/const/crud/cloudmajor.js b/src/const/crud/cuim/cloudmajor.js similarity index 100% rename from src/const/crud/cloudmajor.js rename to src/const/crud/cuim/cloudmajor.js diff --git a/src/const/crud/cloudschool.js b/src/const/crud/cuim/cloudschool.js similarity index 100% rename from src/const/crud/cloudschool.js rename to src/const/crud/cuim/cloudschool.js diff --git a/src/const/crud/cloudstudent.js b/src/const/crud/cuim/cloudstudent.js similarity index 100% rename from src/const/crud/cloudstudent.js rename to src/const/crud/cuim/cloudstudent.js diff --git a/src/const/crud/cloudteacher.js b/src/const/crud/cuim/cloudteacher.js similarity index 100% rename from src/const/crud/cloudteacher.js rename to src/const/crud/cuim/cloudteacher.js diff --git a/src/views/cuim/cloudacademy/index.vue b/src/views/cuim/cloudacademy/index.vue index 8bff87bd..acd94221 100644 --- a/src/views/cuim/cloudacademy/index.vue +++ b/src/views/cuim/cloudacademy/index.vue @@ -23,6 +23,7 @@ :permission="permissionList" :table-loading="tableLoading" :option="tableOption" + v-model = "form" @on-load="getList" @search-change="searchChange" @refresh-change="refreshChange" @@ -31,14 +32,17 @@ @row-update="handleUpdate" @row-save="handleSave" @row-del="rowDel"> + diff --git a/src/views/cuim/cloudmajor/index.vue b/src/views/cuim/cloudmajor/index.vue index cd332b83..ba3d05fb 100644 --- a/src/views/cuim/cloudmajor/index.vue +++ b/src/views/cuim/cloudmajor/index.vue @@ -37,8 +37,8 @@