diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/controller/PersonalCompScoreController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/controller/PersonalCompScoreController.java index 47a05488..17c3cae0 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/controller/PersonalCompScoreController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/controller/PersonalCompScoreController.java @@ -6,10 +6,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.SecurityUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.jeecg.common.api.vo.Result; import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.vo.LoginUser; import org.jeecg.modules.demo.annualScore.entity.PersonalCompScore; import org.jeecg.modules.demo.annualScore.service.IPersonalCompScoreService; import org.springframework.beans.factory.annotation.Autowired; @@ -73,6 +75,31 @@ public class PersonalCompScoreController extends JeecgController> liststu(PersonalCompScore personalCompScore, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(personalCompScore, req.getParameterMap()); + LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); + queryWrapper.eq("work_on",user.getUsername()); + Page page = new Page(pageNo, pageSize); + IPage pageList = personalCompScoreService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** * 添加 * diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/controller/PersonalCompTotalScoreController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/controller/PersonalCompTotalScoreController.java index c6774685..8c34e5ff 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/controller/PersonalCompTotalScoreController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/controller/PersonalCompTotalScoreController.java @@ -6,11 +6,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.SecurityUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.jeecg.common.api.vo.Result; import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.vo.LoginUser; import org.jeecg.modules.demo.annualScore.entity.PersonalCompTotalScore; import org.jeecg.modules.demo.annualScore.service.IPersonalCompTotalScoreService; import org.springframework.beans.factory.annotation.Autowired; @@ -57,6 +59,32 @@ public class PersonalCompTotalScoreController extends JeecgController> liststu(PersonalCompTotalScore personalCompTotalScore, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(personalCompTotalScore, req.getParameterMap()); + LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); + queryWrapper.eq("work_on",user.getUsername()); + Page page = new Page(pageNo, pageSize); + IPage pageList = personalCompTotalScoreService.page(page, queryWrapper); + return Result.OK(pageList); + } + /** * 添加 * diff --git a/jeecgboot-vue3-master/src/views/stu/annualScore/persoanlCompScore/PersonalCompScore.api.ts b/jeecgboot-vue3-master/src/views/stu/annualScore/persoanlCompScore/PersonalCompScore.api.ts new file mode 100644 index 00000000..40fc77a6 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/stu/annualScore/persoanlCompScore/PersonalCompScore.api.ts @@ -0,0 +1,64 @@ +import {defHttp} from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/annualScore/personalCompScore/liststu', + save='/annualScore/personalCompScore/add', + edit='/annualScore/personalCompScore/edit', + deleteOne = '/annualScore/personalCompScore/delete', + deleteBatch = '/annualScore/personalCompScore/deleteBatch', + importExcel = '/annualScore/personalCompScore/importExcel', + exportXls = '/annualScore/personalCompScore/exportXls', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} diff --git a/jeecgboot-vue3-master/src/views/stu/annualScore/persoanlCompScore/PersonalCompScore.data.ts b/jeecgboot-vue3-master/src/views/stu/annualScore/persoanlCompScore/PersonalCompScore.data.ts new file mode 100644 index 00000000..3f1575b4 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/stu/annualScore/persoanlCompScore/PersonalCompScore.data.ts @@ -0,0 +1,157 @@ +import {BasicColumn, FormSchema} from '/@/components/Table'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '年度', + align: "center", + dataIndex: 'annualId_dictText' + }, + { + title: '年度比赛', + align: "center", + dataIndex: 'annualCompId_dictText' + }, + { + title: '年度比赛项目', + align: "center", + dataIndex: 'annualCompP_dictText' + }, + { + title: '所属院系', + align: "center", + dataIndex: 'depet_dictText' + }, + { + title: '姓名', + align: "center", + dataIndex: 'name' + }, + { + title: '学号', + align: "center", + dataIndex: 'workOn' + }, + { + title: '个人积分', + align: "center", + dataIndex: 'score', + }, + // { + // title: '备注', + // align:"center", + // dataIndex: 'remark' + // }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ + { + label: "年度", + field: 'annualId', + component: 'JDictSelectTag', + componentProps: { + dictCode: "annual,annual_name,id" + }, + colProps: {span: 6}, + }, + { + label: "年度比赛项目", + field: 'annualCompP', + component: 'JDictSelectTag', + componentProps: { + dictCode: "annual_comp_point,obj_name,id" + }, + colProps: {span: 6}, + }, + { + label: "院系", + field: 'depet', + component: 'JDictSelectTag', + componentProps: { + dictCode: "sys_depart,depart_name,id" + }, + colProps: {span: 6}, + }, + { + label: "学号", + field: 'workOn', + // component: 'JDictSelectTag', + // componentProps: { + // dictCode: "sys_user,work_no,work_no" + // }, + component: 'Input', + colProps: {span: 6}, + }, + { + label: "姓名", + field: 'name', + component: 'Input', + colProps: {span: 6}, + }, + // { + // label: "年度比赛", + // field: 'annualCompId', + // component: 'JDictSelectTag', + // componentProps: { + // dictCode: "annual_comp,name,id" + // }, + // colProps: {span: 6}, + // }, +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '学号', + field: 'workOn', + component: 'Input', + // readonly:true + }, + { + label: '姓名', + field: 'name', + component: 'Input', + }, + { + label: '年度', + field: 'annualId', + component: 'Input', + }, + { + label: '年度比赛', + field: 'annualCompId', + component: 'Input', + }, + { + label: '年度比赛项目', + field: 'annualCompP', + component: 'Input', + // componentProps: { readOnly: true }, + }, + { + label: '个人积分', + field: 'score', + component: 'InputNumber', + // isFieldEditable: false, + }, + { + label: '备注', + field: 'remark', + component: 'Input', + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +]; + + +/** + * 流程表单调用这个方法获取formSchema + * @param param + */ +export function getBpmFormSchema(_formData): FormSchema[] { + // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema + return formSchema; +} diff --git a/jeecgboot-vue3-master/src/views/stu/annualScore/persoanlCompScore/PersonalCompScoreList.vue b/jeecgboot-vue3-master/src/views/stu/annualScore/persoanlCompScore/PersonalCompScoreList.vue new file mode 100644 index 00000000..ced3a244 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/stu/annualScore/persoanlCompScore/PersonalCompScoreList.vue @@ -0,0 +1,191 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/stu/annualScore/persoanlCompScore/components/PersonalCompScoreForm.vue b/jeecgboot-vue3-master/src/views/stu/annualScore/persoanlCompScore/components/PersonalCompScoreForm.vue new file mode 100644 index 00000000..6722077b --- /dev/null +++ b/jeecgboot-vue3-master/src/views/stu/annualScore/persoanlCompScore/components/PersonalCompScoreForm.vue @@ -0,0 +1,70 @@ + + + diff --git a/jeecgboot-vue3-master/src/views/stu/annualScore/persoanlCompScore/components/PersonalCompScoreModal.vue b/jeecgboot-vue3-master/src/views/stu/annualScore/persoanlCompScore/components/PersonalCompScoreModal.vue new file mode 100644 index 00000000..ead9e22d --- /dev/null +++ b/jeecgboot-vue3-master/src/views/stu/annualScore/persoanlCompScore/components/PersonalCompScoreModal.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/stu/annualScore/personalCompTotalScore/PersonalCompTotalScore.api.ts b/jeecgboot-vue3-master/src/views/stu/annualScore/personalCompTotalScore/PersonalCompTotalScore.api.ts new file mode 100644 index 00000000..e65774a1 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/stu/annualScore/personalCompTotalScore/PersonalCompTotalScore.api.ts @@ -0,0 +1,64 @@ +import {defHttp} from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/annualScore/personalCompTotalScore/liststu', + save='/annualScore/personalCompTotalScore/add', + edit='/annualScore/personalCompTotalScore/edit', + deleteOne = '/annualScore/personalCompTotalScore/delete', + deleteBatch = '/annualScore/personalCompTotalScore/deleteBatch', + importExcel = '/annualScore/personalCompTotalScore/importExcel', + exportXls = '/annualScore/personalCompTotalScore/exportXls', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} diff --git a/jeecgboot-vue3-master/src/views/stu/annualScore/personalCompTotalScore/PersonalCompTotalScore.data.ts b/jeecgboot-vue3-master/src/views/stu/annualScore/personalCompTotalScore/PersonalCompTotalScore.data.ts new file mode 100644 index 00000000..4a8d6b1d --- /dev/null +++ b/jeecgboot-vue3-master/src/views/stu/annualScore/personalCompTotalScore/PersonalCompTotalScore.data.ts @@ -0,0 +1,100 @@ +import {BasicColumn, FormSchema} from '/@/components/Table'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '院系', + align: "center", + dataIndex: 'depet_dictText' + }, + { + title: '姓名', + align: "center", + dataIndex: 'name' + }, + { + title: '学号', + align: "center", + dataIndex: 'workOn' + }, + { + title: '总积分', + align: "center", + dataIndex: 'score' + }, + // { + // title: '描述', + // align:"center", + // dataIndex: 'remark' + // }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ + { + label: "院系", + field: 'depet', + component: 'JDictSelectTag', + componentProps: { + dictCode: "sys_depart,depart_name,id" + }, + colProps: {span: 6}, + }, + { + label: "学号", + field: 'workOn', + component: 'Input', + // component: 'JDictSelectTag', + // componentProps:{ + // dictCode:"sys_user,work_no,work_no" + // }, + colProps: {span: 6}, + }, + { + label: "姓名", + field: 'name', + component: 'Input', + colProps: {span: 6}, + }, +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '学号', + field: 'workOn', + component: 'Input', + dynamicDisabled: true + }, + { + label: '姓名', + field: 'name', + component: 'Input', + dynamicDisabled: true + }, + { + label: '总积分', + field: 'score', + component: 'InputNumber', + dynamicDisabled: true + }, + { + label: '描述', + field: 'remark', + component: 'Input', + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +]; + + +/** + * 流程表单调用这个方法获取formSchema + * @param param + */ +export function getBpmFormSchema(_formData): FormSchema[] { + // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema + return formSchema; +} diff --git a/jeecgboot-vue3-master/src/views/stu/annualScore/personalCompTotalScore/PersonalCompTotalScoreList.vue b/jeecgboot-vue3-master/src/views/stu/annualScore/personalCompTotalScore/PersonalCompTotalScoreList.vue new file mode 100644 index 00000000..5eb2a84f --- /dev/null +++ b/jeecgboot-vue3-master/src/views/stu/annualScore/personalCompTotalScore/PersonalCompTotalScoreList.vue @@ -0,0 +1,196 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/stu/annualScore/personalCompTotalScore/components/PersonalCompTotalScoreForm.vue b/jeecgboot-vue3-master/src/views/stu/annualScore/personalCompTotalScore/components/PersonalCompTotalScoreForm.vue new file mode 100644 index 00000000..5112b89c --- /dev/null +++ b/jeecgboot-vue3-master/src/views/stu/annualScore/personalCompTotalScore/components/PersonalCompTotalScoreForm.vue @@ -0,0 +1,70 @@ + + + \ No newline at end of file diff --git a/jeecgboot-vue3-master/src/views/stu/annualScore/personalCompTotalScore/components/PersonalCompTotalScoreModal.vue b/jeecgboot-vue3-master/src/views/stu/annualScore/personalCompTotalScore/components/PersonalCompTotalScoreModal.vue new file mode 100644 index 00000000..ed4dd110 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/stu/annualScore/personalCompTotalScore/components/PersonalCompTotalScoreModal.vue @@ -0,0 +1,66 @@ + + + + + \ No newline at end of file