diff --git a/jeecgboot-vue3-master/src/hooks/system/useListPage.ts b/jeecgboot-vue3-master/src/hooks/system/useListPage.ts index a8c615233..ed47739d8 100644 --- a/jeecgboot-vue3-master/src/hooks/system/useListPage.ts +++ b/jeecgboot-vue3-master/src/hooks/system/useListPage.ts @@ -8,7 +8,7 @@ import { useMessage } from '/@/hooks/web/useMessage'; import { useMethods } from '/@/hooks/system/useMethods'; import { useDesign } from '/@/hooks/web/useDesign'; import { filterObj } from '/@/utils/common/compUtils'; -const { handleExportXls, handleImportXls } = useMethods(); +const { handleExportXls, handleImportXls,handleExportXlsMb } = useMethods(); // 定义 useListPage 方法所需参数 interface ListPageOptions { @@ -26,6 +26,13 @@ interface ListPageOptions { //导出参数 params?: object; }; + exportConfigMb?: { + url: string | (() => string); + // 导出文件名 + name?: string | (() => string); + //导出参数 + params?: object; + }; // 导入配置 importConfig?: { //update-begin-author:taoyan date:20220507 for: erp代码生成 子表 导入地址是动态的 @@ -76,13 +83,13 @@ export function useListPage(options: ListPageOptions) { console.error(e); } //update-end-author:taoyan date:20220507 for: erp代码生成 子表 导出报错,原因未知- - + //update-begin-author:liusq date:20230410 for:[/issues/409]导出功能没有按排序结果导出,设置导出默认排序,创建时间倒序 if(!paramsForm?.column){ Object.assign(paramsForm,{column:'createTime',order:'desc'}); } //update-begin-author:liusq date:20230410 for: [/issues/409]导出功能没有按排序结果导出,设置导出默认排序,创建时间倒序 - + //如果参数不为空,则整合到一起 //update-begin-author:taoyan date:20220507 for: erp代码生成 子表 导出动态设置mainId if (params) { @@ -106,6 +113,51 @@ export function useListPage(options: ListPageOptions) { } } + // 导出 excel模板 + async function onExportXlsMb() { + //update-begin---author:wangshuai ---date:20220411 for:导出新增自定义参数------------ + let { url, name, params } = options?.exportConfigMb ?? {}; + let realUrl = typeof url === 'function' ? url() : url; + if (realUrl) { + let title = typeof name === 'function' ? name() : name; + //update-begin-author:taoyan date:20220507 for: erp代码生成 子表 导出报错,原因未知- + let paramsForm:any = {}; + try { + paramsForm = await getForm().validate(); + } catch (e) { + console.error(e); + } + //update-end-author:taoyan date:20220507 for: erp代码生成 子表 导出报错,原因未知- + + //update-begin-author:liusq date:20230410 for:[/issues/409]导出功能没有按排序结果导出,设置导出默认排序,创建时间倒序 + if(!paramsForm?.column){ + Object.assign(paramsForm,{column:'createTime',order:'desc'}); + } + //update-begin-author:liusq date:20230410 for: [/issues/409]导出功能没有按排序结果导出,设置导出默认排序,创建时间倒序 + + //如果参数不为空,则整合到一起 + //update-begin-author:taoyan date:20220507 for: erp代码生成 子表 导出动态设置mainId + if (params) { + Object.keys(params).map((k) => { + let temp = (params as object)[k]; + if (temp) { + paramsForm[k] = unref(temp); + } + }); + } + //update-end-author:taoyan date:20220507 for: erp代码生成 子表 导出动态设置mainId + if (selectedRowKeys.value && selectedRowKeys.value.length > 0) { + paramsForm['selections'] = selectedRowKeys.value.join(','); + } + console.log() + return handleExportXlsMb(title as string, realUrl, filterObj(paramsForm)); + //update-end---author:wangshuai ---date:20220411 for:导出新增自定义参数-------------- + } else { + $message.createMessage.warn('没有传递 exportConfig.url 参数'); + return Promise.reject(); + } + } + // 导入 excel function onImportXls(file) { let { url, success } = options?.importConfig ?? {}; @@ -167,6 +219,7 @@ export function useListPage(options: ListPageOptions) { ...$design, ...$message, onExportXls, + onExportXlsMb, onImportXls, doRequest, doDeleteRecord, diff --git a/jeecgboot-vue3-master/src/hooks/system/useMethods.ts b/jeecgboot-vue3-master/src/hooks/system/useMethods.ts index e46724b2c..dfdd7dac5 100644 --- a/jeecgboot-vue3-master/src/hooks/system/useMethods.ts +++ b/jeecgboot-vue3-master/src/hooks/system/useMethods.ts @@ -49,6 +49,40 @@ export function useMethods() { window.URL.revokeObjectURL(url); //释放掉blob对象 } } + /** + * 导出模板xls + * @param name + * @param url + */ + async function exportXlsMb(name, url, params, isXlsx = false) { + const data = await defHttp.get({ url: url, params: params, responseType: 'blob' }, { isTransformResponse: false }); + if (!data) { + createMessage.warning('文件下载失败'); + return; + } + if (!name || typeof name != 'string') { + name = '导出文件'; + } + let blobOptions = { type: 'application/vnd.ms-excel' }; + let fileSuffix = '.xls'; + if (isXlsx === true) { + blobOptions['type'] = XLSX_MIME_TYPE; + fileSuffix = XLSX_FILE_SUFFIX; + } + if (typeof window.navigator.msSaveBlob !== 'undefined') { + window.navigator.msSaveBlob(new Blob([data], blobOptions), name + fileSuffix); + } else { + let url = window.URL.createObjectURL(new Blob([data], blobOptions)); + let link = document.createElement('a'); + link.style.display = 'none'; + link.href = url; + link.setAttribute('download', name + fileSuffix); + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); //下载完成移除元素 + window.URL.revokeObjectURL(url); //释放掉blob对象 + } + } /** * 导入xls @@ -93,5 +127,6 @@ export function useMethods() { handleExportXls: (name: string, url: string, params?: object) => exportXls(name, url, params), handleImportXls: (data, url, success) => importXls(data, url, success), handleExportXlsx: (name: string, url: string, params?: object) => exportXls(name, url, params, true), + handleExportXlsMb: (name: string, url: string, params?: object) => exportXlsMb(name, url, params), }; } diff --git a/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPoint.api.ts b/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPoint.api.ts index cafc04256..f7e2241de 100644 --- a/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPoint.api.ts +++ b/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPoint.api.ts @@ -14,6 +14,7 @@ enum Api { updateApply = '/AnnualCompPoint/annualCompPoint/updateApply', collectScore = '/annualScore/personalCompScore/collectScore', pj = '/AnnualCompPoint/annualCompPoint/pj', + cjhz = '/AnnualCompPoint/annualCompPoint/cjhz', } /** @@ -49,6 +50,12 @@ export const pj = (params,handleSuccess) => { handleSuccess(); }); } +export const cjhz = (params,handleSuccess) => { + return defHttp.get({url: Api.cjhz, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + /** * 批量删除 diff --git a/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue b/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue index 2258786c4..a8f8be6aa 100644 --- a/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue +++ b/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue @@ -71,7 +71,8 @@ getExportUrl, updateApply, collectScore, - pj + pj, + cjhz } from './AnnualCompPoint.api'; import {downloadFile} from '/@/utils/common/renderUtils'; import AnnualCompPointModal from './components/AnnualCompPointModal.vue' @@ -94,7 +95,7 @@ canResize: false, useSearchForm: false, actionColumn: { - width: 330, + width: 440, fixed: 'right', }, beforeFetch: (params) => { @@ -195,6 +196,14 @@ await pj({id: record.id}, handleSuccess); } + /** + * 成绩汇总事件 + */ + async function cjhzgl(record) { + await cjhz({id: record.id}, handleSuccess); + } + + /** @@ -241,6 +250,15 @@ } }); } + if(Date.parse(new Date())>Date.parse(record.scoreEndTime)){ + actions.unshift({ + label: '成绩汇总', + popConfirm: { + title: '是否确认成绩汇总', + confirm: cjhzgl.bind(null, record), + } + }); + } if (record.annualCompState === "0") { // 年度比赛状态 0待提交、1已提交(待审核)、2已审核、3待驳回、4已驳回 actions.unshift({ label: '提交', diff --git a/jeecgboot-vue3-master/src/views/awardpersion/AwardPersion.api.ts b/jeecgboot-vue3-master/src/views/awardpersion/AwardPersion.api.ts new file mode 100644 index 000000000..20447dd1b --- /dev/null +++ b/jeecgboot-vue3-master/src/views/awardpersion/AwardPersion.api.ts @@ -0,0 +1,90 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/awardpersion/awardPersion/list', + save='/awardpersion/awardPersion/add', + save1='/AnnualCompPoint/annualCompPoint/cxhq', + edit='/awardpersion/awardPersion/edit', + deleteOne = '/awardpersion/awardPersion/delete', + deleteBatch = '/awardpersion/awardPersion/deleteBatch', + importExcel = '/awardpersion/awardPersion/importExcel', + exportXls = '/awardpersion/awardPersion/exportXls', + exportXlsMb = '/awardpersion/awardPersion/exportXlsMb', + queryCompId = '/annualcompgroup/annualCompGroup/queryCompId', + queryOptions = '/awardpersion/awardPersion/queryOptions', + +} + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +export const getExportUrlMb = Api.exportXlsMb; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +export const queryCompId = (params) => defHttp.get({ url: Api.queryCompId, params }, { successMessageMode: 'none' }); +export const queryOptions = (params) => defHttp.get({ url: Api.queryOptions, params }, { successMessageMode: 'none' }); +/** + * 删除单个 + * @param params + * @param handleSuccess + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +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 + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} + +/** + * 重新获取 + * @param params + * @param isUpdate + */ +export const saveOrUpdate1 = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save1; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} diff --git a/jeecgboot-vue3-master/src/views/awardpersion/AwardPersion.data.ts b/jeecgboot-vue3-master/src/views/awardpersion/AwardPersion.data.ts new file mode 100644 index 000000000..729dc6f07 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/awardpersion/AwardPersion.data.ts @@ -0,0 +1,158 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '年度', + align: "center", + dataIndex: 'annualid_dictText' + }, + { + title: '年度比赛', + align: "center", + dataIndex: 'annalComp_dictText' + }, + { + title: '年度比赛项目', + align: "center", + dataIndex: 'annualCompP_dictText' + }, + { + title: '报名编号', + align: "center", + dataIndex: 'enrollCode' + }, + { + title: '奖项名称', + align: "center", + dataIndex: 'awardname' + }, +/* { + title: '状态', + align: "center", + dataIndex: 'status_dictText' + }, + { + title: '奖项顺序', + align: "center", + dataIndex: 'awardsort' + }, + { + title: '奖项', + align: "center", + dataIndex: 'awardid' + },*/ +]; + +//查询数据 +export const searchFormSchema: FormSchema[] = [ + { + label: "年度", + field: 'annualid', + component: 'JDictSelectTag', + componentProps:{ + dictCode: "annual,annual_name,id" + }, + colProps: {span: 6}, + }, + { + label: "报名编号", + field: 'enrollCode', + component: 'Input', + colProps: {span: 6}, + }, +]; + +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '年度', + field: 'annualid', + component: 'JDictSelectTag', + componentProps:{ + dictCode: "annual,annual_name,id" + }, + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入年度!'}, + ]; + }, + }, + { + label: '年度比赛', + field: 'annalComp', + component: 'JSearchSelect', + componentProps:{ + dict: "annual_comp,name,id" + }, + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入年度比赛!'}, + ]; + }, + }, + { + label: '年度比赛项目', + field: 'annualCompP', + component: 'JSearchSelect', + componentProps:{ + dict: "annual_comp_point,obj_name,id" + }, + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入年度比赛项目!'}, + ]; + }, + }, + { + label: '报名编号', + field: 'enrollCode', + component: 'Input', + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入报名编号!'}, + {...rules.duplicateCheckRule('award_persion', 'enroll_code',model,schema)[0]}, + ]; + }, + }, + { + label: '奖项名称', + field: 'awardname', + component: 'JDictSelectTag', + componentProps:{ + dictCode: "" + }, + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入奖项名称!'}, + ]; + }, + }, + { + label: '状态', + field: 'status', + component: 'JDictSelectTag', + componentProps:{ + dictCode: "sh_status" + }, + }, + { + label: '奖项顺序', + field: 'awardsort', + component: 'InputNumber', + }, + { + label: '奖项', + field: 'awardid', + component: 'Input', + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, +]; diff --git a/jeecgboot-vue3-master/src/views/awardpersion/AwardPersionList.vue b/jeecgboot-vue3-master/src/views/awardpersion/AwardPersionList.vue new file mode 100644 index 000000000..e4d40e6cf --- /dev/null +++ b/jeecgboot-vue3-master/src/views/awardpersion/AwardPersionList.vue @@ -0,0 +1,258 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/awardpersion/AwardPersion_menu_insert.sql b/jeecgboot-vue3-master/src/views/awardpersion/AwardPersion_menu_insert.sql new file mode 100644 index 000000000..8dcc24881 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/awardpersion/AwardPersion_menu_insert.sql @@ -0,0 +1,26 @@ +-- 注意:该页面对应的前台目录为views/awardpersion文件夹下 +-- 如果你想更改到其他目录,请修改sql中component字段对应的值 + + +INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) +VALUES ('2023103103306200480', NULL, '获奖管理', '/awardpersion/awardPersionList', 'awardpersion/AwardPersionList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-10-31 15:30:48', NULL, NULL, 0); + +-- 权限控制sql +-- 新增 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023103103306200481', '2023103103306200480', '添加获奖管理', NULL, NULL, 0, NULL, NULL, 2, 'awardpersion:award_persion:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-31 15:30:48', NULL, NULL, 0, 0, '1', 0); +-- 编辑 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023103103306200482', '2023103103306200480', '编辑获奖管理', NULL, NULL, 0, NULL, NULL, 2, 'awardpersion:award_persion:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-31 15:30:48', NULL, NULL, 0, 0, '1', 0); +-- 删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023103103306200483', '2023103103306200480', '删除获奖管理', NULL, NULL, 0, NULL, NULL, 2, 'awardpersion:award_persion:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-31 15:30:48', NULL, NULL, 0, 0, '1', 0); +-- 批量删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023103103306200484', '2023103103306200480', '批量删除获奖管理', NULL, NULL, 0, NULL, NULL, 2, 'awardpersion:award_persion:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-31 15:30:48', NULL, NULL, 0, 0, '1', 0); +-- 导出excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023103103306200485', '2023103103306200480', '导出excel_获奖管理', NULL, NULL, 0, NULL, NULL, 2, 'awardpersion:award_persion:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-31 15:30:48', NULL, NULL, 0, 0, '1', 0); +-- 导入excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023103103306200486', '2023103103306200480', '导入excel_获奖管理', NULL, NULL, 0, NULL, NULL, 2, 'awardpersion:award_persion:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-31 15:30:48', NULL, NULL, 0, 0, '1', 0); \ No newline at end of file diff --git a/jeecgboot-vue3-master/src/views/awardpersion/components/AwardPersionForm.vue b/jeecgboot-vue3-master/src/views/awardpersion/components/AwardPersionForm.vue new file mode 100644 index 000000000..d058abb2b --- /dev/null +++ b/jeecgboot-vue3-master/src/views/awardpersion/components/AwardPersionForm.vue @@ -0,0 +1,217 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/awardpersion/components/AwardPersionForm1.vue b/jeecgboot-vue3-master/src/views/awardpersion/components/AwardPersionForm1.vue new file mode 100644 index 000000000..4a051fba9 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/awardpersion/components/AwardPersionForm1.vue @@ -0,0 +1,185 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/awardpersion/components/AwardPersionModal.vue b/jeecgboot-vue3-master/src/views/awardpersion/components/AwardPersionModal.vue new file mode 100644 index 000000000..ffc9d9a28 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/awardpersion/components/AwardPersionModal.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/awardpersion/components/AwardPersionModal1.vue b/jeecgboot-vue3-master/src/views/awardpersion/components/AwardPersionModal1.vue new file mode 100644 index 000000000..b40e77e4b --- /dev/null +++ b/jeecgboot-vue3-master/src/views/awardpersion/components/AwardPersionModal1.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/expscore/ExpScore.api.ts b/jeecgboot-vue3-master/src/views/expscore/ExpScore.api.ts new file mode 100644 index 000000000..f6f7b9834 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/expscore/ExpScore.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/expscore/expScore/list', + save='/expscore/expScore/add', + edit='/expscore/expScore/edit', + deleteOne = '/expscore/expScore/delete', + deleteBatch = '/expscore/expScore/deleteBatch', + importExcel = '/expscore/expScore/importExcel', + exportXls = '/expscore/expScore/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 }); + +/** + * 删除单个 + * @param params + * @param handleSuccess + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +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 + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} diff --git a/jeecgboot-vue3-master/src/views/expscore/ExpScore.data.ts b/jeecgboot-vue3-master/src/views/expscore/ExpScore.data.ts new file mode 100644 index 000000000..659df3d99 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/expscore/ExpScore.data.ts @@ -0,0 +1,117 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '年度', + align: "center", + dataIndex: 'annid_dictText' + }, + { + title: '年度比赛', + align: "center", + dataIndex: 'annalComp_dictText' + }, + { + title: '年度比赛项目', + align: "center", + dataIndex: 'annComP_dictText' + }, + { + title: '题目', + align: "center", + dataIndex: 'topid_dictText' + }, + { + title: '报名编号', + align: "center", + dataIndex: 'bmcode' + }, + { + title: '作品', + align: "center", + dataIndex: 'upfilePersionId_dictText' + }, + { + title: '成绩', + align: "center", + dataIndex: 'score' + }, + { + title: '评分人', + align: "center", + dataIndex: 'userid_dictText' + }, + { + title: '是否评分', + align: "center", + dataIndex: 'ispf_dictText' + }, +]; + +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; + +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '年度', + field: 'annid', + component: 'JDictSelectTag', + componentProps:{ + dictCode: "annual,annual_name,id" + }, + }, + { + label: '年度比赛', + field: 'annalComp', + component: 'JSearchSelect', + componentProps:{ + dict: "annual_comp,name,id" + }, + }, + { + label: '年度比赛项目', + field: 'annComP', + component: 'JSearchSelect', + componentProps:{ + dict: "annual_comp_point,obj_name,id" + }, + }, + { + label: '题目', + field: 'topid', + component: 'JSearchSelect', + componentProps:{ + dict: "topic,name,id" + }, + }, + { + label: '报名编号', + field: 'bmcode', + component: 'Input', + }, + { + label: '作品', + field: 'upfilePersionId', + component: 'JSearchSelect', + componentProps:{ + dict: "upfile_persion,topic_name,id" + }, + }, + { + label: '成绩', + field: 'score', + component: 'InputNumber', + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, +]; diff --git a/jeecgboot-vue3-master/src/views/expscore/ExpScoreList.vue b/jeecgboot-vue3-master/src/views/expscore/ExpScoreList.vue new file mode 100644 index 000000000..b315f2e14 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/expscore/ExpScoreList.vue @@ -0,0 +1,218 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/expscore/ExpScore_menu_insert.sql b/jeecgboot-vue3-master/src/views/expscore/ExpScore_menu_insert.sql new file mode 100644 index 000000000..0a499c959 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/expscore/ExpScore_menu_insert.sql @@ -0,0 +1,26 @@ +-- 注意:该页面对应的前台目录为views/expscore文件夹下 +-- 如果你想更改到其他目录,请修改sql中component字段对应的值 + + +INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) +VALUES ('2023110304264750240', NULL, '专家评分', '/expscore/expScoreList', 'expscore/ExpScoreList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-11-03 16:26:24', NULL, NULL, 0); + +-- 权限控制sql +-- 新增 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023110304264750241', '2023110304264750240', '添加专家评分', NULL, NULL, 0, NULL, NULL, 2, 'expscore:exp_score:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-03 16:26:24', NULL, NULL, 0, 0, '1', 0); +-- 编辑 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023110304264750242', '2023110304264750240', '编辑专家评分', NULL, NULL, 0, NULL, NULL, 2, 'expscore:exp_score:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-03 16:26:24', NULL, NULL, 0, 0, '1', 0); +-- 删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023110304264750243', '2023110304264750240', '删除专家评分', NULL, NULL, 0, NULL, NULL, 2, 'expscore:exp_score:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-03 16:26:24', NULL, NULL, 0, 0, '1', 0); +-- 批量删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023110304264750244', '2023110304264750240', '批量删除专家评分', NULL, NULL, 0, NULL, NULL, 2, 'expscore:exp_score:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-03 16:26:24', NULL, NULL, 0, 0, '1', 0); +-- 导出excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023110304264750245', '2023110304264750240', '导出excel_专家评分', NULL, NULL, 0, NULL, NULL, 2, 'expscore:exp_score:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-03 16:26:24', NULL, NULL, 0, 0, '1', 0); +-- 导入excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023110304264750246', '2023110304264750240', '导入excel_专家评分', NULL, NULL, 0, NULL, NULL, 2, 'expscore:exp_score:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-03 16:26:24', NULL, NULL, 0, 0, '1', 0); \ No newline at end of file diff --git a/jeecgboot-vue3-master/src/views/expscore/components/ExpScoreForm.vue b/jeecgboot-vue3-master/src/views/expscore/components/ExpScoreForm.vue new file mode 100644 index 000000000..67ab29361 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/expscore/components/ExpScoreForm.vue @@ -0,0 +1,165 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/expscore/components/ExpScoreModal.vue b/jeecgboot-vue3-master/src/views/expscore/components/ExpScoreModal.vue new file mode 100644 index 000000000..11d228efb --- /dev/null +++ b/jeecgboot-vue3-master/src/views/expscore/components/ExpScoreModal.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/scorepersion/ScorePersion.api.ts b/jeecgboot-vue3-master/src/views/scorepersion/ScorePersion.api.ts new file mode 100644 index 000000000..a03b6c155 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/scorepersion/ScorePersion.api.ts @@ -0,0 +1,87 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/scorepersion/scorePersion/list', + save='/scorepersion/scorePersion/add', + edit='/scorepersion/scorePersion/edit', + deleteOne = '/scorepersion/scorePersion/delete', + deleteBatch = '/scorepersion/scorePersion/deleteBatch', + importExcel = '/scorepersion/scorePersion/importExcel', + exportXls = '/scorepersion/scorePersion/exportXls', + exportXlsMb = '/scorepersion/scorePersion/exportXlsMb', + queryCompId = '/annualcompgroup/annualCompGroup/queryCompId', + save1='/AnnualCompPoint/annualCompPoint/cjcxhq', +} + +export const queryCompId = (params) => defHttp.get({ url: Api.queryCompId, params }, { successMessageMode: 'none' }); + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +export const getExportUrlMb = Api.exportXlsMb; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 删除单个 + * @param params + * @param handleSuccess + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 重新获取 + * @param params + * @param isUpdate + */ +export const saveOrUpdate1 = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save1; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +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 + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} diff --git a/jeecgboot-vue3-master/src/views/scorepersion/ScorePersion.data.ts b/jeecgboot-vue3-master/src/views/scorepersion/ScorePersion.data.ts new file mode 100644 index 000000000..27273ff3b --- /dev/null +++ b/jeecgboot-vue3-master/src/views/scorepersion/ScorePersion.data.ts @@ -0,0 +1,139 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +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: 'enrollCode' + }, + { + title: '得分', + align: "center", + dataIndex: 'score' + }, + { + title: '排名', + align: "center", + dataIndex: 'sort' + }, +]; + +//查询数据 +export const searchFormSchema: FormSchema[] = [ + { + label: "年度", + field: 'annualid', + component: 'JDictSelectTag', + componentProps:{ + dictCode: "annual,annual_name,id" + }, + colProps: {span: 6}, + }, + { + label: "报名编号", + field: 'enrollCode', + component: 'Input', + colProps: {span: 6}, + }, +]; + +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '年度', + field: 'annualid', + component: 'JDictSelectTag', + componentProps:{ + dictCode: "annual,annual_name,id" + }, + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入年度!'}, + ]; + }, + }, + { + label: '年度比赛', + field: 'annualCompid', + component: 'JSearchSelect', + componentProps:{ + dict: "annual_comp,name,id" + }, + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入年度比赛!'}, + ]; + }, + }, + { + label: '年度比赛项目', + field: 'annualCompP', + component: 'JSearchSelect', + componentProps:{ + dict: "annual_comp_point,obj_name,id" + }, + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入年度比赛项目!'}, + ]; + }, + }, + { + label: '报名编号', + field: 'enrollCode', + component: 'Input', + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入报名编号!'}, + {...rules.duplicateCheckRule('score_persion', 'enroll_code',model,schema)[0]}, + ]; + }, + }, + { + label: '得分', + field: 'score', + component: 'Input', + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入得分!'}, + { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!'}, + ]; + }, + }, + { + label: '排名', + field: 'sort', + component: 'InputNumber', + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入排名!'}, + { pattern: /^-?\d+$/, message: '请输入整数!'}, + ]; + }, + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, +]; diff --git a/jeecgboot-vue3-master/src/views/scorepersion/ScorePersionList.vue b/jeecgboot-vue3-master/src/views/scorepersion/ScorePersionList.vue new file mode 100644 index 000000000..771084a52 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/scorepersion/ScorePersionList.vue @@ -0,0 +1,257 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/scorepersion/ScorePersion_menu_insert.sql b/jeecgboot-vue3-master/src/views/scorepersion/ScorePersion_menu_insert.sql new file mode 100644 index 000000000..5fa350aff --- /dev/null +++ b/jeecgboot-vue3-master/src/views/scorepersion/ScorePersion_menu_insert.sql @@ -0,0 +1,26 @@ +-- 注意:该页面对应的前台目录为views/scorepersion文件夹下 +-- 如果你想更改到其他目录,请修改sql中component字段对应的值 + + +INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) +VALUES ('2023110203506870240', NULL, '成绩管理', '/scorepersion/scorePersionList', 'scorepersion/ScorePersionList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-11-02 15:50:24', NULL, NULL, 0); + +-- 权限控制sql +-- 新增 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023110203506870241', '2023110203506870240', '添加成绩管理', NULL, NULL, 0, NULL, NULL, 2, 'scorepersion:score_persion:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-02 15:50:24', NULL, NULL, 0, 0, '1', 0); +-- 编辑 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023110203506870242', '2023110203506870240', '编辑成绩管理', NULL, NULL, 0, NULL, NULL, 2, 'scorepersion:score_persion:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-02 15:50:24', NULL, NULL, 0, 0, '1', 0); +-- 删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023110203506870243', '2023110203506870240', '删除成绩管理', NULL, NULL, 0, NULL, NULL, 2, 'scorepersion:score_persion:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-02 15:50:24', NULL, NULL, 0, 0, '1', 0); +-- 批量删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023110203506870244', '2023110203506870240', '批量删除成绩管理', NULL, NULL, 0, NULL, NULL, 2, 'scorepersion:score_persion:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-02 15:50:24', NULL, NULL, 0, 0, '1', 0); +-- 导出excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023110203506870245', '2023110203506870240', '导出excel_成绩管理', NULL, NULL, 0, NULL, NULL, 2, 'scorepersion:score_persion:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-02 15:50:24', NULL, NULL, 0, 0, '1', 0); +-- 导入excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023110203506870246', '2023110203506870240', '导入excel_成绩管理', NULL, NULL, 0, NULL, NULL, 2, 'scorepersion:score_persion:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-02 15:50:24', NULL, NULL, 0, 0, '1', 0); \ No newline at end of file diff --git a/jeecgboot-vue3-master/src/views/scorepersion/components/ScorePersionForm.vue b/jeecgboot-vue3-master/src/views/scorepersion/components/ScorePersionForm.vue new file mode 100644 index 000000000..fcef9e074 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/scorepersion/components/ScorePersionForm.vue @@ -0,0 +1,191 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/scorepersion/components/ScorePersionForm1.vue b/jeecgboot-vue3-master/src/views/scorepersion/components/ScorePersionForm1.vue new file mode 100644 index 000000000..8f4d18359 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/scorepersion/components/ScorePersionForm1.vue @@ -0,0 +1,172 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/scorepersion/components/ScorePersionModal.vue b/jeecgboot-vue3-master/src/views/scorepersion/components/ScorePersionModal.vue new file mode 100644 index 000000000..c3a322bb7 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/scorepersion/components/ScorePersionModal.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/scorepersion/components/ScorePersionModal1.vue b/jeecgboot-vue3-master/src/views/scorepersion/components/ScorePersionModal1.vue new file mode 100644 index 000000000..0414d41dc --- /dev/null +++ b/jeecgboot-vue3-master/src/views/scorepersion/components/ScorePersionModal1.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/scoresta/ScoreSta.api.ts b/jeecgboot-vue3-master/src/views/scoresta/ScoreSta.api.ts new file mode 100644 index 000000000..b4c29c958 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/scoresta/ScoreSta.api.ts @@ -0,0 +1,77 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/scoresta/scoreSta/list', + save='/scoresta/scoreSta/add', + edit='/scoresta/scoreSta/edit', + deleteOne = '/scoresta/scoreSta/delete', + deleteBatch = '/scoresta/scoreSta/deleteBatch', + importExcel = '/scoresta/scoreSta/importExcel', + exportXls = '/scoresta/scoreSta/exportXls', + queryCompId = '/annualcompgroup/annualCompGroup/queryCompId', + queryTmId = '/annualcompgroup/annualCompGroup/queryTmId', +} + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +export const queryCompId = (params) => defHttp.get({ url: Api.queryCompId, params }, { successMessageMode: 'none' }); + +export const queryTmId = (params) => defHttp.get({ url: Api.queryTmId, params }, { successMessageMode: 'none' }); +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 删除单个 + * @param params + * @param handleSuccess + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +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 + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} diff --git a/jeecgboot-vue3-master/src/views/scoresta/ScoreSta.data.ts b/jeecgboot-vue3-master/src/views/scoresta/ScoreSta.data.ts new file mode 100644 index 000000000..c82b80bfe --- /dev/null +++ b/jeecgboot-vue3-master/src/views/scoresta/ScoreSta.data.ts @@ -0,0 +1,83 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '年度', + align: "center", + dataIndex: 'annualId_dictText' + }, + { + title: '年度比赛', + align: "center", + dataIndex: 'annalComp_dictText' + }, + { + title: '年度比赛项目', + align: "center", + dataIndex: 'annualCompid_dictText' + }, + { + title: '题目', + align: "center", + dataIndex: 'topicid_dictText' + }, +]; + +//查询数据 +export const searchFormSchema: FormSchema[] = [ + { + label: "年度", + field: 'annualId', + component: 'JDictSelectTag', + componentProps:{ + dictCode: "annual,annual_name,id" + }, + colProps: {span: 6}, + }, +]; + +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '年度', + field: 'annualId', + component: 'JDictSelectTag', + componentProps:{ + dictCode: "annual,annual_name,id" + }, + }, + { + label: '年度比赛', + field: 'annalComp', + component: 'JSearchSelect', + componentProps:{ + dict: "annual_comp,name,id" + }, + }, + { + label: '年度比赛项目', + field: 'annualCompid', + component: 'JSearchSelect', + componentProps:{ + dict: "annual_comp_point,obj_name,id" + }, + }, + { + label: '题目', + field: 'topicid', + component: 'JSearchSelect', + componentProps:{ + dict: "topic,name,id" + }, + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, +]; diff --git a/jeecgboot-vue3-master/src/views/scoresta/ScoreStaList.vue b/jeecgboot-vue3-master/src/views/scoresta/ScoreStaList.vue new file mode 100644 index 000000000..a51f1eef9 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/scoresta/ScoreStaList.vue @@ -0,0 +1,235 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/scoresta/ScoreSta_menu_insert.sql b/jeecgboot-vue3-master/src/views/scoresta/ScoreSta_menu_insert.sql new file mode 100644 index 000000000..42f0739e8 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/scoresta/ScoreSta_menu_insert.sql @@ -0,0 +1,26 @@ +-- 注意:该页面对应的前台目录为views/scoresta文件夹下 +-- 如果你想更改到其他目录,请修改sql中component字段对应的值 + + +INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) +VALUES ('2023102503042290370', NULL, '评分标准', '/scoresta/scoreStaList', 'scoresta/ScoreStaList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-10-25 15:04:37', NULL, NULL, 0); + +-- 权限控制sql +-- 新增 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023102503042290371', '2023102503042290370', '添加评分标准', NULL, NULL, 0, NULL, NULL, 2, 'scoresta:score_sta:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-25 15:04:37', NULL, NULL, 0, 0, '1', 0); +-- 编辑 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023102503042290372', '2023102503042290370', '编辑评分标准', NULL, NULL, 0, NULL, NULL, 2, 'scoresta:score_sta:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-25 15:04:37', NULL, NULL, 0, 0, '1', 0); +-- 删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023102503042290373', '2023102503042290370', '删除评分标准', NULL, NULL, 0, NULL, NULL, 2, 'scoresta:score_sta:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-25 15:04:37', NULL, NULL, 0, 0, '1', 0); +-- 批量删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023102503042290374', '2023102503042290370', '批量删除评分标准', NULL, NULL, 0, NULL, NULL, 2, 'scoresta:score_sta:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-25 15:04:37', NULL, NULL, 0, 0, '1', 0); +-- 导出excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023102503042290375', '2023102503042290370', '导出excel_评分标准', NULL, NULL, 0, NULL, NULL, 2, 'scoresta:score_sta:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-25 15:04:37', NULL, NULL, 0, 0, '1', 0); +-- 导入excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023102503042290376', '2023102503042290370', '导入excel_评分标准', NULL, NULL, 0, NULL, NULL, 2, 'scoresta:score_sta:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-25 15:04:37', NULL, NULL, 0, 0, '1', 0); \ No newline at end of file diff --git a/jeecgboot-vue3-master/src/views/scoresta/components/ScoreStaForm.vue b/jeecgboot-vue3-master/src/views/scoresta/components/ScoreStaForm.vue new file mode 100644 index 000000000..380cedb42 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/scoresta/components/ScoreStaForm.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/scoresta/components/ScoreStaModal.vue b/jeecgboot-vue3-master/src/views/scoresta/components/ScoreStaModal.vue new file mode 100644 index 000000000..54dd28579 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/scoresta/components/ScoreStaModal.vue @@ -0,0 +1,75 @@ + + + + +