diff --git a/src/components/Form/src/components/FormItem.vue b/src/components/Form/src/components/FormItem.vue index 9f0b863..2978639 100644 --- a/src/components/Form/src/components/FormItem.vue +++ b/src/components/Form/src/components/FormItem.vue @@ -320,11 +320,11 @@ name={field} colon={colon} class={{ 'suffix-item': showSuffix }} + labelCol={labelCol} + wrapperCol={wrapperCol} {...(itemProps as Recordable)} label={renderLabelHelpMessage()} rules={handleRules()} - labelCol={labelCol} - wrapperCol={wrapperCol} >
{/* author: sunjianlei for: 【VUEN-744】此处加上 width: 100%; 因为要防止组件宽度超出 FormItem */} diff --git a/src/views/kc/detection/KcDetectionDetailed.api.ts b/src/views/kc/detection/KcDetectionDetailed.api.ts new file mode 100644 index 0000000..5a72cc2 --- /dev/null +++ b/src/views/kc/detection/KcDetectionDetailed.api.ts @@ -0,0 +1,64 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/detection/kcDetectionDetailed/list', + save = '/detection/kcDetectionDetailed/add', + edit = '/detection/kcDetectionDetailed/edit', + deleteOne = '/detection/kcDetectionDetailed/delete', + deleteBatch = '/detection/kcDetectionDetailed/deleteBatch', + importExcel = '/detection/kcDetectionDetailed/importExcel', + exportXls = '/detection/kcDetectionDetailed/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/src/views/kc/detection/KcDetectionDetailed.data.ts b/src/views/kc/detection/KcDetectionDetailed.data.ts new file mode 100644 index 0000000..1c26109 --- /dev/null +++ b/src/views/kc/detection/KcDetectionDetailed.data.ts @@ -0,0 +1,131 @@ +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: 'rwbh' + }, + { + title: '课程编号', + align: "center", + dataIndex: 'kcbh' + }, + { + title: '课程名称', + align: "center", + dataIndex: 'kcmc' + }, + { + title: '教室编号', + align: "center", + dataIndex: 'jsbh' + }, + { + title: '学年学期内部用', + align: "center", + dataIndex: 'xnxq' + }, + { + title: '检测url', + align: "center", + dataIndex: 'detectionUrl' + }, + { + title: '截取图片结果URL', + align: "center", + dataIndex: 'detectionOutImgUrl' + }, + { + title: '截取图片计算人数返回结果', + align: "center", + dataIndex: 'detectionOutImgRes' + }, + { + title: '检测次数(当前是第几次)', + align: "center", + dataIndex: 'detectionNum' + }, + { + title: '当次检测人数', + align: "center", + dataIndex: 'num' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '任务编号(课堂)', + field: 'rwbh', + component: 'Input', + }, + { + label: '课程编号', + field: 'kcbh', + component: 'Input', + }, + { + label: '课程名称', + field: 'kcmc', + component: 'Input', + }, + { + label: '教室编号', + field: 'jsbh', + component: 'Input', + }, + { + label: '学年学期内部用', + field: 'xnxq', + component: 'Input', + }, + { + label: '检测url', + field: 'detectionUrl', + component: 'Input', + }, + { + label: '截取图片结果URL', + field: 'detectionOutImgUrl', + component: 'Input', + }, + { + label: '截取图片计算人数返回结果', + field: 'detectionOutImgRes', + component: 'Input', + }, + { + label: '检测次数(当前是第几次)', + field: 'detectionNum', + component: 'InputNumber', + }, + { + label: '当次检测人数', + field: 'num', + component: 'InputNumber', + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +]; + + + +/** +* 流程表单调用这个方法获取formSchema +* @param param +*/ +export function getBpmFormSchema(_formData): FormSchema[] { + // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema + return formSchema; +} \ No newline at end of file diff --git a/src/views/kc/detection/KcDetectionDetailedList.vue b/src/views/kc/detection/KcDetectionDetailedList.vue new file mode 100644 index 0000000..56ae730 --- /dev/null +++ b/src/views/kc/detection/KcDetectionDetailedList.vue @@ -0,0 +1,177 @@ + + + + + \ No newline at end of file diff --git a/src/views/kc/detection/KcDetectionMain.api.ts b/src/views/kc/detection/KcDetectionMain.api.ts new file mode 100644 index 0000000..65717e6 --- /dev/null +++ b/src/views/kc/detection/KcDetectionMain.api.ts @@ -0,0 +1,64 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/detection/kcDetectionMain/list', + save = '/detection/kcDetectionMain/add', + edit = '/detection/kcDetectionMain/edit', + deleteOne = '/detection/kcDetectionMain/delete', + deleteBatch = '/detection/kcDetectionMain/deleteBatch', + importExcel = '/detection/kcDetectionMain/importExcel', + exportXls = '/detection/kcDetectionMain/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/src/views/kc/detection/KcDetectionMain.data.ts b/src/views/kc/detection/KcDetectionMain.data.ts new file mode 100644 index 0000000..8d11641 --- /dev/null +++ b/src/views/kc/detection/KcDetectionMain.data.ts @@ -0,0 +1,208 @@ +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: 'xnxq' + }, + { + title: '课程名称', + align: "center", + dataIndex: 'kcmc' + }, + + { + title: '任务编号', + align: "center", + dataIndex: 'rwbh' + }, + { + title: '课程编号', + align: "center", + dataIndex: 'kcbh' + }, + { + title: '教室编号', + align: "center", + dataIndex: 'jsbh' + }, + { + title: '检测url', + align: "center", + dataIndex: 'detectionUrl' + }, + { + title: '检测次数', + align: "center", + dataIndex: 'detectionNum' + }, + { + title: '人数(累加)', + align: "center", + dataIndex: 'allNum' + }, + { + title: '平均数', + align: "center", + dataIndex: 'averageNum', + }, + // { + // title: 'A', + // align: "center", + // dataIndex: ['ketangbiaoInfo', 'kcmc'], + // // customRender: ({ record }) => { + // // return record?.ketangbiaoInfo?.kcmc; + // // } + // }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '任务编号', + field: 'rwbh', + component: 'Input', + }, + { + label: '课程编号', + field: 'kcbh', + component: 'Input', + }, + { + label: '课程名称', + field: 'kcmc', + component: 'Input', + }, + { + label: '教室编号', + field: 'jsbh', + component: 'Input', + }, + { + label: '学年学期', + field: 'xnxq', + component: 'Input', + }, + { + label: '检测url', + field: 'detectionUrl', + component: 'Input', + }, + { + label: '检测次数', + field: 'detectionNum', + component: 'InputNumber', + }, + { + label: '人数(累加)', + field: 'allNum', + component: 'InputNumber', + }, + { + label: '平均数', + field: 'averageNum', + component: 'InputNumber', + }, + { + label: '', + field: 'detectionDetailedList', + component: 'Input', + slot: 'detectionDetailedList', + + itemProps: { + labelCol: { + span: 0, + }, + wrapperCol: { + span: 24, + }, + }, + + //span: 24, + // colProps: { + // span:0 + // }, + // itemProps: { + // span:24 + // } + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +]; + +//表单里的子列表 +export const detectionDetailedListColumns: BasicColumn[] = [ + // { + // title: '学年学期', + // align: "center", + // dataIndex: 'xnxq' + // }, + // { + // title: '课程名称', + // align: "center", + // dataIndex: 'kcmc' + // }, + // { + // title: '任务编号', + // align: "center", + // dataIndex: 'rwbh' + // }, + // { + // title: '课程编号', + // align: "center", + // dataIndex: 'kcbh' + // }, + // { + // title: '教室编号', + // align: "center", + // dataIndex: 'jsbh' + // }, + { + title: '截取图片', + align: "center", + dataIndex: 'detectionOutImgUrl', + slots: { customRender: 'imgSlot' }, + }, + { + title: '检测序号', + align: "center", + dataIndex: 'detectionNum' + }, + { + title: '人数', + align: "center", + dataIndex: 'num' + }, + { + title: '人数计算结果', + align: "center", + dataIndex: 'detectionOutImgRes' + }, // { + // title: 'A', + // align: "center", + // dataIndex: ['ketangbiaoInfo', 'kcmc'], + // // customRender: ({ record }) => { + // // return record?.ketangbiaoInfo?.kcmc; + // // } + // }, +]; + +/** +* 流程表单调用这个方法获取formSchema +* @param param +*/ +export function getBpmFormSchema(_formData): FormSchema[] { + // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema + return formSchema; +} \ No newline at end of file diff --git a/src/views/kc/detection/KcDetectionMainList.vue b/src/views/kc/detection/KcDetectionMainList.vue new file mode 100644 index 0000000..5db570e --- /dev/null +++ b/src/views/kc/detection/KcDetectionMainList.vue @@ -0,0 +1,182 @@ + + + + + \ No newline at end of file diff --git a/src/views/kc/detection/components/KcDetectionDetailedForm.vue b/src/views/kc/detection/components/KcDetectionDetailedForm.vue new file mode 100644 index 0000000..abb1f15 --- /dev/null +++ b/src/views/kc/detection/components/KcDetectionDetailedForm.vue @@ -0,0 +1,70 @@ + + + \ No newline at end of file diff --git a/src/views/kc/detection/components/KcDetectionDetailedModal.vue b/src/views/kc/detection/components/KcDetectionDetailedModal.vue new file mode 100644 index 0000000..d3ffc49 --- /dev/null +++ b/src/views/kc/detection/components/KcDetectionDetailedModal.vue @@ -0,0 +1,66 @@ + + + + + \ No newline at end of file diff --git a/src/views/kc/detection/components/KcDetectionMainForm.vue b/src/views/kc/detection/components/KcDetectionMainForm.vue new file mode 100644 index 0000000..4923f3b --- /dev/null +++ b/src/views/kc/detection/components/KcDetectionMainForm.vue @@ -0,0 +1,70 @@ + + + \ No newline at end of file diff --git a/src/views/kc/detection/components/KcDetectionMainModal.vue b/src/views/kc/detection/components/KcDetectionMainModal.vue new file mode 100644 index 0000000..18fbd74 --- /dev/null +++ b/src/views/kc/detection/components/KcDetectionMainModal.vue @@ -0,0 +1,95 @@ + + + + + \ No newline at end of file