From f6a1069aeb859a93f2a3ffe66e3e2631fd869742 Mon Sep 17 00:00:00 2001 From: bai <1643359946@qq.com> Date: Tue, 9 Jan 2024 22:49:22 +0800 Subject: [PATCH] =?UTF-8?q?2024=E5=B9=B41=E6=9C=889=E6=97=A5=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=97=AE=E9=A2=98=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=AE=B9?= =?UTF-8?q?=E9=87=8F=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kc/jiaoshi/KcJiaoshirongliang.api.ts | 64 +++++++ .../kc/jiaoshi/KcJiaoshirongliang.data.ts | 141 ++++++++++++++ .../kc/jiaoshi/KcJiaoshirongliangList.vue | 173 ++++++++++++++++++ .../components/KcJiaoshirongliangForm.vue | 70 +++++++ .../components/KcJiaoshirongliangModal.vue | 66 +++++++ src/views/kc/jiaoshi/index.vue | 61 +++--- src/views/kc/jiaoshi/indexDetail.vue | 62 +++++-- .../site/common/video/videojs/viewPage2.vue | 3 +- 8 files changed, 602 insertions(+), 38 deletions(-) create mode 100644 src/views/kc/jiaoshi/KcJiaoshirongliang.api.ts create mode 100644 src/views/kc/jiaoshi/KcJiaoshirongliang.data.ts create mode 100644 src/views/kc/jiaoshi/KcJiaoshirongliangList.vue create mode 100644 src/views/kc/jiaoshi/components/KcJiaoshirongliangForm.vue create mode 100644 src/views/kc/jiaoshi/components/KcJiaoshirongliangModal.vue diff --git a/src/views/kc/jiaoshi/KcJiaoshirongliang.api.ts b/src/views/kc/jiaoshi/KcJiaoshirongliang.api.ts new file mode 100644 index 0000000..209caa0 --- /dev/null +++ b/src/views/kc/jiaoshi/KcJiaoshirongliang.api.ts @@ -0,0 +1,64 @@ +import {defHttp} from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/jiaoshi/kcJiaoshirongliang/list', + save='/jiaoshi/kcJiaoshirongliang/add', + edit='/jiaoshi/kcJiaoshirongliang/edit', + deleteOne = '/jiaoshi/kcJiaoshirongliang/delete', + deleteBatch = '/jiaoshi/kcJiaoshirongliang/deleteBatch', + importExcel = '/jiaoshi/kcJiaoshirongliang/importExcel', + exportXls = '/jiaoshi/kcJiaoshirongliang/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/jiaoshi/KcJiaoshirongliang.data.ts b/src/views/kc/jiaoshi/KcJiaoshirongliang.data.ts new file mode 100644 index 0000000..533a621 --- /dev/null +++ b/src/views/kc/jiaoshi/KcJiaoshirongliang.data.ts @@ -0,0 +1,141 @@ +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: 'jsbh' + }, + { + title: '教室名称', + align:"center", + dataIndex: 'jsmc' + }, + { + title: '所属单位', + align:"center", + dataIndex: 'ssdw' + }, + { + title: '教室类型', + align:"center", + dataIndex: 'jslx' + }, + { + title: '楼层', + align:"center", + dataIndex: 'lc' + }, + { + title: '教室容量', + align:"center", + dataIndex: 'jsrl' + }, + { + title: '教室图片', + align:"center", + dataIndex: 'jstp' + }, + { + title: '建筑物名称', + align:"center", + dataIndex: 'jzwmc' + }, + { + title: '校区名称', + align:"center", + dataIndex: 'xqmc' + }, + { + title: '是否笔试考试', + align:"center", + dataIndex: 'sfbsks' + }, + { + title: '门牌号', + align:"center", + dataIndex: 'mph' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '教室编号', + field: 'jsbh', + component: 'Input', + }, + { + label: '教室名称', + field: 'jsmc', + component: 'Input', + }, + { + label: '所属单位', + field: 'ssdw', + component: 'Input', + }, + { + label: '教室类型', + field: 'jslx', + component: 'Input', + }, + { + label: '楼层', + field: 'lc', + component: 'Input', + }, + { + label: '教室容量', + field: 'jsrl', + component: 'Input', + }, + { + label: '教室图片', + field: 'jstp', + component: 'Input', + }, + { + label: '建筑物名称', + field: 'jzwmc', + component: 'Input', + }, + { + label: '校区名称', + field: 'xqmc', + component: 'Input', + }, + { + label: '是否笔试考试', + field: 'sfbsks', + component: 'Input', + }, + { + label: '门牌号', + field: 'mph', + component: 'Input', + }, + // 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/jiaoshi/KcJiaoshirongliangList.vue b/src/views/kc/jiaoshi/KcJiaoshirongliangList.vue new file mode 100644 index 0000000..5b3cea9 --- /dev/null +++ b/src/views/kc/jiaoshi/KcJiaoshirongliangList.vue @@ -0,0 +1,173 @@ + + + + + + + 新增 + 导出 + 导入 + + + + + + 删除 + + + + 批量操作 + + + + + + + + + + + + + + + {{ getAreaTextByCode(text) }} + + + 无文件 + 下载 + + + + + + + + + + \ No newline at end of file diff --git a/src/views/kc/jiaoshi/components/KcJiaoshirongliangForm.vue b/src/views/kc/jiaoshi/components/KcJiaoshirongliangForm.vue new file mode 100644 index 0000000..97c566f --- /dev/null +++ b/src/views/kc/jiaoshi/components/KcJiaoshirongliangForm.vue @@ -0,0 +1,70 @@ + + + + + 提 交 + + + + + \ No newline at end of file diff --git a/src/views/kc/jiaoshi/components/KcJiaoshirongliangModal.vue b/src/views/kc/jiaoshi/components/KcJiaoshirongliangModal.vue new file mode 100644 index 0000000..40fc3d0 --- /dev/null +++ b/src/views/kc/jiaoshi/components/KcJiaoshirongliangModal.vue @@ -0,0 +1,66 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/views/kc/jiaoshi/index.vue b/src/views/kc/jiaoshi/index.vue index 28dd51e..fc02d92 100644 --- a/src/views/kc/jiaoshi/index.vue +++ b/src/views/kc/jiaoshi/index.vue @@ -17,7 +17,7 @@ - + {{ allClassNum }} @@ -117,12 +117,12 @@ - {{ item.jsNum }} + {{ item.jsNum }} {{ item.child.length }} {{ item.child.filter(x => x.sfyx == 0).length || 0 }} 未检测 {{ statusLogList.filter(x => x.jxlName == item.jxlName && x.type != 'green' ).length }} - 总数 + 总数 可直播 开放听课 @@ -303,7 +303,7 @@ 请选择 是 - 否 + 尚未接入 @@ -400,20 +400,26 @@ - {{ text == 0?'是':'否' }} + {{ text == 0?'是':'尚未接入' }} - - {{ text == 0?'是':'否' }} + + {{ text == 0?'是':'否' }} + - - - - + + + + + + + - + @@ -467,14 +473,23 @@ - 预览 | - - 开启直播 | - 关闭直播 | - 开放听课 - 关闭听课 - + + 预览 | + + 开启直播 | + 关闭直播 | + 开放听课 + 关闭听课 + + + + 预览 | + 开启直播 | + 关闭直播 | + 开放听课 + 关闭听课 + @@ -520,7 +535,9 @@ const btnLoading:Ref = ref(false); const twoShowType:Ref = ref(true); const { createMessage, createInfoModal, createErrorModal } = useMessage(); const route = useRouter(); -const queryParam:Ref = ref({}); +const queryParam:Ref = ref({ + zbgn: '0' +}); const onLineTitle:Ref = ref({ 'green':'直播正常', @@ -773,7 +790,7 @@ function loadData(){ function openDetail(param){ console.log(`🚀 -----------------------------------------------------------------------🚀`); - console.log(`🚀 ~ file: index.vue:501 ~ openDetail ~ indexDetailRef:`, indexDetailRef); + console.log(`🚀 ~ file: index.vue:501 ~ openDetail ~ indexDetailRef:`, indexDetailRef, param); console.log(`🚀 -----------------------------------------------------------------------🚀`); indexDetailRef.value.open(param); // indexDetailRef.value.changeQueryParam(param); @@ -1116,7 +1133,9 @@ function searchQuery() { * 重置 */ function searchReset() { - queryParam.value = {}; + queryParam.value = { + zbgn: '0' + }; //刷新数据 filterComputedDataSource.value = filterDataSource(); //loadData(); diff --git a/src/views/kc/jiaoshi/indexDetail.vue b/src/views/kc/jiaoshi/indexDetail.vue index ab66111..94c9b67 100644 --- a/src/views/kc/jiaoshi/indexDetail.vue +++ b/src/views/kc/jiaoshi/indexDetail.vue @@ -20,7 +20,7 @@ 请选择 是 - 否 + 尚未接入 @@ -103,21 +103,27 @@ - {{ text == 0?'是':'否' }} + {{ text == 0?'是':'尚未接入' }} - - {{ text == 0?'是':'否' }} + + {{ text == 0?'是':'否' }} + - - + + + + - + + @@ -133,14 +139,23 @@ - 预览 | - - 开启直播 | - 关闭直播 | - 开放听课 - 关闭听课 - + + 预览 | + + 开启直播 | + 关闭直播 | + 开放听课 + 关闭听课 + + + + 预览 | + 开启直播 | + 关闭直播 | + 开放听课 + 关闭听课 + @@ -184,7 +199,15 @@ const isShowPage:Ref = ref(false); const loading:Ref = ref(false); const { createMessage, createInfoModal, createErrorModal } = useMessage(); const route = useRouter(); -const queryParam:Ref = ref({}); +const queryParam:Ref = ref({ + zbgn: '0' +}); + +const onLineTitle:Ref = ref({ + 'green':'直播正常', + 'yellow':'部分异常', + 'red':'设备异常', +}); onMounted(() => { loadData(); @@ -261,7 +284,12 @@ function changeLoadDataLoading(loadingType){ } function changeQueryParam(param){ - queryParam.value = param; + queryParam.value = Object.assign({ zbgn: '0' }, param); + + console.log(`🚀 -----------------------------------------------------------🚀`); + console.log(`🚀 ~ changeQueryParam ~ queryParam.value:`, queryParam.value, Object.assign({ zbgn: '0' }, param), param); + console.log(`🚀 -----------------------------------------------------------🚀`); + nextTick(() => { filterComputedDataSource.value = filterDataSource(); }) @@ -558,7 +586,9 @@ function searchQuery() { * 重置 */ function searchReset() { - queryParam.value = {}; + queryParam.value = { + zbgn: '0' + }; //刷新数据 filterComputedDataSource.value = filterDataSource(); //loadData(); diff --git a/src/views/site/common/video/videojs/viewPage2.vue b/src/views/site/common/video/videojs/viewPage2.vue index 034724c..2f504d8 100644 --- a/src/views/site/common/video/videojs/viewPage2.vue +++ b/src/views/site/common/video/videojs/viewPage2.vue @@ -32,6 +32,7 @@ --> {{ mainVideoCardBoxTitle || '' }} + 本教室容量:{{ktangInfo?.jiaoshirongliang?.jsrl}}座位