2023年10月19日 修改直播间错误提示,修改手动推流返回值,新增智慧教室维护,新增智慧教室操作日志,新增智慧教室播放日志

This commit is contained in:
bai 2023-10-19 22:50:01 +08:00
parent 06016b4643
commit 0accf1162a
13 changed files with 477 additions and 162 deletions

View File

@ -12,8 +12,8 @@
<!--插槽:table标题--> <!--插槽:table标题-->
<template #tableTitle> <template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> <!-- <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> -->
<a-dropdown v-if="selectedRowKeys.length > 0"> <a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay> <template #overlay>
<a-menu> <a-menu>

View File

@ -4,11 +4,11 @@ import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils'; import { render } from '/@/utils/common/renderUtils';
//列表数据 //列表数据
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ // {
title: '删除状态', // title: '删除状态',
align:"center", // align:"center",
dataIndex: 'delFlag' // dataIndex: 'delFlag'
}, // },
{ {
title: '教学楼名称', title: '教学楼名称',
align:"center", align:"center",
@ -20,11 +20,11 @@ export const searchFormSchema: FormSchema[] = [
]; ];
//表单数据 //表单数据
export const formSchema: FormSchema[] = [ export const formSchema: FormSchema[] = [
{ // {
label: '删除状态', // label: '删除状态',
field: 'delFlag', // field: 'delFlag',
component: 'InputNumber', // component: 'InputNumber',
}, // },
{ {
label: '教学楼名称', label: '教学楼名称',
field: 'jxlhName', field: 'jxlhName',

View File

@ -5,8 +5,8 @@
<!--插槽:table标题--> <!--插槽:table标题-->
<template #tableTitle> <template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> <!-- <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> -->
<a-dropdown v-if="selectedRowKeys.length > 0"> <a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay> <template #overlay>
<a-menu> <a-menu>
@ -31,7 +31,8 @@
</template> </template>
<!--省市区字段回显插槽--> <!--省市区字段回显插槽-->
<template #pcaSlot="{text}"> <template #pcaSlot="{text}">
{{ getAreaTextByCode(text) }} <!-- {{ getAreaTextByCode(text) }} -->
{{ text }}
</template> </template>
<template #fileSlot="{text}"> <template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>

View File

@ -0,0 +1,75 @@
<template>
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<KcJiaoxuelouInfoList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></KcJiaoxuelouInfoList>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import KcJiaoxuelouInfoList from './KcJiaoxuelouInfoList.vue'
const title = ref<string>('');
const width = ref<number>(800);
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
/**
* 新增
*/
function add() {
title.value = '新增';
visible.value = true;
nextTick(() => {
registerForm.value.add();
});
}
/**
* 编辑
* @param record
*/
function edit(record) {
title.value = disableSubmit.value ? '详情' : '编辑';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
add,
edit,
disableSubmit,
});
</script>
<style>
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>

View File

@ -15,7 +15,27 @@ export const columns: BasicColumn[] = [
dataIndex: 'xm' dataIndex: 'xm'
}, },
{ {
title: '新ip', title: '教学楼ID',
align: "center",
dataIndex: 'jxlId'
},
{
title: '教学楼名称',
align: "center",
dataIndex: 'jxlName'
},
{
title: '教室编号',
align: "center",
dataIndex: 'jsbh'
},
{
title: '教室名称',
align: "center",
dataIndex: 'jsmc'
},
{
title: 'ip',
align: "center", align: "center",
dataIndex: 'ip' dataIndex: 'ip'
}, },
@ -29,11 +49,30 @@ export const columns: BasicColumn[] = [
align: "center", align: "center",
dataIndex: 'mima' dataIndex: 'mima'
}, },
{
title: '推流地址rtmp',
align: "center",
dataIndex: 'pushUrl'
},
{
title: '播放地址http',
align: "center",
dataIndex: 'pullUrl'
},
{ {
title: '备注', title: '备注',
align: "center", align: "center",
dataIndex: 'bz' dataIndex: 'bz'
}, },
{
title: '是否有效',//0-有效 1-无效
align: "center",
dataIndex: 'sfyx',
customRender: ({ text }) => {
let map = ['有效','无效']
return map[text]
},
},
]; ];
//查询数据 //查询数据

View File

@ -5,15 +5,19 @@ import { render } from '/@/utils/common/renderUtils';
//列表数据 //列表数据
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '日志类型1播放成功2播放失败', title: '日志类型',
align:"center", align:"center",
dataIndex: 'logType' dataIndex: 'logType',
customRender: ({ text }) => {
let map = ['','自动执行', '手动操作']
return map[text]
}, },
{
title: '教学楼编号',
align:"center",
dataIndex: 'jxlId'
}, },
// {
// title: '教学楼编号',
// align:"center",
// dataIndex: 'jxlId'
// },
{ {
title: '教学楼名称', title: '教学楼名称',
align:"center", align:"center",
@ -43,10 +47,27 @@ export const columns: BasicColumn[] = [
//查询数据 //查询数据
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ {
label: "日志类型1播放成功2播放失败", label: "日志类型",
field: 'logType', field: 'logType',
component: 'Input', component: 'Select',
colProps: {span: 6}, colProps: {span: 6},
// colProps: {
// span: 8,
// },
componentProps: {
options: [
{
label: '播放成功',
value: 1,
key: 1,
},
{
label: '播放失败',
value: 2,
key: 2,
},
],
},
}, },
{ {
label: "教学楼编号", label: "教学楼编号",
@ -88,9 +109,28 @@ export const searchFormSchema: FormSchema[] = [
//表单数据 //表单数据
export const formSchema: FormSchema[] = [ export const formSchema: FormSchema[] = [
{ {
label: '日志类型1播放成功2播放失败', label: '日志类型',
field: 'logType', field: 'logType',
component: 'InputNumber', // component: 'InputNumber',
component: 'Select',
// colProps: {span: 6},
// colProps: {
// span: 8,
// },
componentProps: {
options: [
{
label: '播放成功',
value: 1,
key: 1,
},
{
label: '播放失败',
value: 2,
key: 2,
},
],
},
}, },
{ {
label: '教学楼编号', label: '教学楼编号',

View File

@ -4,7 +4,7 @@
<BasicTable @register="registerTable" :rowSelection="rowSelection"> <BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题--> <!--插槽:table标题-->
<template #tableTitle> <template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> <!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<a-dropdown v-if="selectedRowKeys.length > 0"> <a-dropdown v-if="selectedRowKeys.length > 0">
@ -19,7 +19,7 @@
<a-button>批量操作 <a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon> <Icon icon="mdi:chevron-down"></Icon>
</a-button> </a-button>
</a-dropdown> </a-dropdown> -->
</template> </template>
<!--操作栏--> <!--操作栏-->
<template #action="{ record }"> <template #action="{ record }">
@ -31,7 +31,8 @@
</template> </template>
<!--省市区字段回显插槽--> <!--省市区字段回显插槽-->
<template #pcaSlot="{text}"> <template #pcaSlot="{text}">
{{ getAreaTextByCode(text) }} <!-- {{ getAreaTextByCode(text) }} -->
{{ text }}
</template> </template>
<template #fileSlot="{text}"> <template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
@ -141,9 +142,13 @@
*/ */
function getTableAction(record){ function getTableAction(record){
return [ return [
// {
// label: '',
// onClick: handleEdit.bind(null, record),
// }
{ {
label: '编辑', label: '详情',
onClick: handleEdit.bind(null, record), onClick: handleDetail.bind(null, record),
} }
] ]
} }
@ -152,16 +157,16 @@
*/ */
function getDropDownAction(record){ function getDropDownAction(record){
return [ return [
{ // {
label: '详情', // label: '',
onClick: handleDetail.bind(null, record), // onClick: handleDetail.bind(null, record),
}, { // }, {
label: '删除', // label: '',
popConfirm: { // popConfirm: {
title: '是否确认删除', // title: '',
confirm: handleDelete.bind(null, record), // confirm: handleDelete.bind(null, record),
} // }
} // }
] ]
} }

View File

@ -12,8 +12,9 @@
<!--插槽:table标题--> <!--插槽:table标题-->
<template #tableTitle> <template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> <a-button type="primary" @click="handleJxlPage" preIcon="ant-design:plus-outlined"> 教学楼维护</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> <!-- <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> -->
<a-dropdown v-if="selectedRowKeys.length > 0"> <a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay> <template #overlay>
<a-menu> <a-menu>
@ -47,6 +48,7 @@
</BasicTable> </BasicTable>
<!-- 表单区域 --> <!-- 表单区域 -->
<KcZhihuijiaoshiModal ref="registerModal" @success="handleSuccess"></KcZhihuijiaoshiModal> <KcZhihuijiaoshiModal ref="registerModal" @success="handleSuccess"></KcZhihuijiaoshiModal>
<KcJiaoxuelouInfoListModal ref="KcJiaoxuelouInfoListModalRef"></KcJiaoxuelouInfoListModal>
</div> </div>
</template> </template>
@ -58,10 +60,12 @@
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './KcZhihuijiaoshi.api'; import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './KcZhihuijiaoshi.api';
import { downloadFile } from '/@/utils/common/renderUtils'; import { downloadFile } from '/@/utils/common/renderUtils';
import KcZhihuijiaoshiModal from './components/KcZhihuijiaoshiModal.vue' import KcZhihuijiaoshiModal from './components/KcZhihuijiaoshiModal.vue'
import KcJiaoxuelouInfoListModal from './KcJiaoxuelouInfoListModal.vue'
const queryParam = ref<any>({}); const queryParam = ref<any>({});
const toggleSearchStatus = ref<boolean>(false); const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref(); const registerModal = ref();
const KcJiaoxuelouInfoListModalRef = ref();
//table //table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: { tableProps: {
@ -136,6 +140,14 @@
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess); await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
} }
/**
* 打开教学楼维护页面
*/
function handleJxlPage(record: Recordable) {
KcJiaoxuelouInfoListModalRef.value.disableSubmit = true;
KcJiaoxuelouInfoListModalRef.value.edit(record);
}
/** /**
* 成功回调 * 成功回调
*/ */

View File

@ -5,15 +5,19 @@ import { render } from '/@/utils/common/renderUtils';
//列表数据 //列表数据
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '日志类型1自动执行日志2手动操作操作日志', title: '日志类型',
align:"center", align:"center",
dataIndex: 'logType' dataIndex: 'logType',
customRender: ({ text }) => {
let map = ['','自动执行', '手动操作']
return map[text]
}, },
{
title: '教学楼编号',
align:"center",
dataIndex: 'jxlId'
}, },
// {
// title: '教学楼编号',
// align:"center",
// dataIndex: 'jxlId'
// },
{ {
title: '教学楼名称', title: '教学楼名称',
align:"center", align:"center",
@ -30,12 +34,17 @@ export const columns: BasicColumn[] = [
dataIndex: 'jsmc' dataIndex: 'jsmc'
}, },
{ {
title: '操作类型(1开启0关闭)', title: '操作类型',
align:"center", align:"center",
dataIndex: 'operateType' dataIndex: 'operateType',
customRender: ({ text }) => {
let map = ['','开启', '关闭']
return map[text]
},
}, },
{ {
title: '操作结果', title: '操作地址',
align:"center", align:"center",
dataIndex: 'operateUrl' dataIndex: 'operateUrl'
}, },
@ -48,60 +57,105 @@ export const columns: BasicColumn[] = [
//查询数据 //查询数据
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ {
label: "日志类型1自动执行日志2手动操作操作日志", label: "日志类型",
field: 'logType', field: 'logType',
component: 'Input', component: 'Select',
colProps: {span: 6}, colProps: {span: 6},
componentProps: {
options: [
{
label: '自动执行',
value: 1,
key: 1,
},
{
label: '手动操作',
value: 2,
key: 2,
},
],
},
}, },
{ {
label: "教学楼编号", label: "教学楼编号",
field: 'jxlId', field: 'jxlId',
component: 'Input', component: 'JInput',
colProps: {span: 6}, colProps: {span: 6},
}, },
{ {
label: "教学楼名称", label: "教学楼名称",
field: 'jxlName', field: 'JInput',
component: 'Input', component: 'Input',
colProps: {span: 6}, colProps: {span: 6},
}, },
{ {
label: "教室编号", label: "教室编号",
field: 'jsbh', field: 'jsbh',
component: 'Input', component: 'JInput',
colProps: {span: 6}, colProps: {span: 6},
}, },
{ {
label: "教室名称", label: "教室名称",
field: 'jsmc', field: 'jsmc',
component: 'Input', component: 'JInput',
colProps: {span: 6}, colProps: {span: 6},
}, },
{ {
label: "操作类型(1开启0关闭)", label: "操作类型",
field: 'operateType', field: 'operateType',
component: 'Input', component: 'Select',
colProps: {span: 6}, colProps: {span: 6},
componentProps: {
options: [
{
label: '开启',
value: '1',
key: '1',
}, },
{ {
label: "操作结果", label: '关闭',
value: '2',
key: '2',
},
],
},
},
{
label: "操作地址",
field: 'operateUrl', field: 'operateUrl',
component: 'Input', component: 'JInput',
colProps: {span: 6}, colProps: {span: 6},
}, },
{ {
label: "操作结果", label: "操作结果",
field: 'operateResult', field: 'operateResult',
component: 'Input', component: 'JInput',
colProps: {span: 6}, colProps: {span: 6},
}, },
]; ];
//表单数据 //表单数据
export const formSchema: FormSchema[] = [ export const formSchema: FormSchema[] = [
{ {
label: '日志类型1自动执行日志2手动操作操作日志', label: '日志类型',
field: 'logType', field: 'logType',
component: 'InputNumber', component: 'Select',
// colProps: {
// span: 8,
// },
componentProps: {
options: [
{
label: '自动执行',
value: 1,
key: 1,
},
{
label: '手动操作',
value: 2,
key: 2,
},
],
},
}, },
{ {
label: '教学楼编号', label: '教学楼编号',
@ -124,12 +178,26 @@ export const formSchema: FormSchema[] = [
component: 'Input', component: 'Input',
}, },
{ {
label: '操作类型(1开启0关闭)', label: '操作类型',
field: 'operateType', field: 'operateType',
component: 'Input', component: 'Select',
componentProps: {
options: [
{
label: '开启',
value: '1',
key: '1',
}, },
{ {
label: '操作结果', label: '关闭',
value: '2',
key: '2',
},
],
},
},
{
label: '操作地址',
field: 'operateUrl', field: 'operateUrl',
component: 'InputTextArea', component: 'InputTextArea',
}, },
@ -147,8 +215,6 @@ export const formSchema: FormSchema[] = [
}, },
]; ];
/** /**
* formSchema * formSchema
* @param param * @param param

View File

@ -4,10 +4,10 @@
<BasicTable @register="registerTable" :rowSelection="rowSelection"> <BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题--> <!--插槽:table标题-->
<template #tableTitle> <template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> <!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> -->
<a-dropdown v-if="selectedRowKeys.length > 0"> <!-- <a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay> <template #overlay>
<a-menu> <a-menu>
<a-menu-item key="1" @click="batchHandleDelete"> <a-menu-item key="1" @click="batchHandleDelete">
@ -19,7 +19,7 @@
<a-button>批量操作 <a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon> <Icon icon="mdi:chevron-down"></Icon>
</a-button> </a-button>
</a-dropdown> </a-dropdown> -->
</template> </template>
<!--操作栏--> <!--操作栏-->
<template #action="{ record }"> <template #action="{ record }">
@ -31,7 +31,8 @@
</template> </template>
<!--省市区字段回显插槽--> <!--省市区字段回显插槽-->
<template #pcaSlot="{text}"> <template #pcaSlot="{text}">
{{ getAreaTextByCode(text) }} <!-- {{ getAreaTextByCode(text) }} -->
{{ text }}
</template> </template>
<template #fileSlot="{text}"> <template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
@ -141,9 +142,13 @@
*/ */
function getTableAction(record){ function getTableAction(record){
return [ return [
// {
// label: '',
// onClick: handleEdit.bind(null, record),
// },
{ {
label: '编辑', label: '详情',
onClick: handleEdit.bind(null, record), onClick: handleDetail.bind(null, record),
} }
] ]
} }
@ -152,16 +157,16 @@
*/ */
function getDropDownAction(record){ function getDropDownAction(record){
return [ return [
{ // {
label: '详情', // label: '',
onClick: handleDetail.bind(null, record), // onClick: handleDetail.bind(null, record),
}, { // }, {
label: '删除', // label: '',
popConfirm: { // popConfirm: {
title: '是否确认删除', // title: '',
confirm: handleDelete.bind(null, record), // confirm: handleDelete.bind(null, record),
} // }
} // }
] ]
} }

View File

@ -2,19 +2,36 @@
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row> <a-row>
<a-col :span="24">
<a-form-item label="厂商名称" v-bind="validateInfos.changshang">
<a-input v-model:value="formData.changshang" placeholder="请输入厂商名称" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="校区" v-bind="validateInfos.xq"> <a-form-item label="校区" v-bind="validateInfos.xq">
<a-input v-model:value="formData.xq" placeholder="请输入校区" :disabled="disabled"></a-input> <a-input v-model:value="formData.xq" placeholder="请输入校区" :disabled="disabled"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24">
<a-form-item label="教学楼" v-bind="validateInfos.jxlId">
<!-- <a-input v-model:value="formData.jxlId" placeholder="请选择教学楼" :disabled="disabled"></a-input>jxlName -->
<JDictSelectTag type="select" v-model:value="formData.jxlId" dictCode="kc_jiaoxuelou_info,jxlh_name,id" placeholder="请选择教学楼" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="教室名称" v-bind="validateInfos.jsbh">
<!-- <a-input v-model:value="formData.jsbh" placeholder="请选择教室名称" :disabled="disabled"></a-input>jsmc -->
<JDictSelectTag type="select" v-model:value="formData.jsbh" dictCode="xxhbjsjbxx,jsmc,jsh" placeholder="请选择教室名称" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="项目" v-bind="validateInfos.xm"> <a-form-item label="项目" v-bind="validateInfos.xm">
<a-input v-model:value="formData.xm" placeholder="请输入项目" :disabled="disabled"></a-input> <a-input v-model:value="formData.xm" placeholder="请输入项目" :disabled="disabled"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="新ip" v-bind="validateInfos.ip"> <a-form-item label="ip" v-bind="validateInfos.ip">
<a-input v-model:value="formData.ip" placeholder="请输入新ip" :disabled="disabled"></a-input> <a-input v-model:value="formData.ip" placeholder="请输入ip" :disabled="disabled"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -27,9 +44,28 @@
<a-input v-model:value="formData.mima" placeholder="请输入密码" :disabled="disabled"></a-input> <a-input v-model:value="formData.mima" placeholder="请输入密码" :disabled="disabled"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24">
<a-form-item label="推流地址rtmp" v-bind="validateInfos.pushUrl">
<a-input v-model:value="formData.pushUrl" placeholder="请输入推流地址rtmp" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="播放地址http" v-bind="validateInfos.pullUrl">
<a-input v-model:value="formData.pullUrl" placeholder="请输入播放地址http" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="是否有效" v-bind="validateInfos.sfyx">
<!-- <a-input v-model:value="formData.sfyx" placeholder="请选择是否有效" :disabled="disabled"></a-input> -->
<a-select v-model:value="formData.sfyx" style="width: 100%" :disabled="disabled">
<a-select-option value="0">有效</a-select-option>
<a-select-option value="1">无效</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="备注" v-bind="validateInfos.bz"> <a-form-item label="备注" v-bind="validateInfos.bz">
<a-input v-model:value="formData.bz" placeholder="请输入备注" :disabled="disabled"></a-input> <a-textarea v-model:value="formData.bz" :rows="4" placeholder="请输入备注" :maxlength="255" :disabled="disabled"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@ -44,6 +80,7 @@
import { getValueType } from '/@/utils'; import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../KcZhihuijiaoshi.api'; import { saveOrUpdate } from '../KcZhihuijiaoshi.api';
import { Form } from 'ant-design-vue'; import { Form } from 'ant-design-vue';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
const props = defineProps({ const props = defineProps({
formDisabled: { type: Boolean, default: false }, formDisabled: { type: Boolean, default: false },
@ -55,12 +92,20 @@
const emit = defineEmits(['register', 'ok']); const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({ const formData = reactive<Record<string, any>>({
id: '', id: '',
changshang: '',
jxlId: '',
jxlName: '',
jsbh: '',
jsmc: '',
xq: '', xq: '',
xm: '', xm: '',
ip: '', ip: '',
user: '', user: '',
mima: '', mima: '',
pushUrl: '',
pullUrl: '',
bz: '', bz: '',
sfyx: '',
}); });
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } }); const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });

View File

@ -325,7 +325,15 @@ function changeLive(record, isEnable){
let content = ''; let content = '';
res.forEach(x => { res.forEach(x => {
content += x.jsmc + "-" + x.xm content += x.jsmc + "-" + x.xm
content += " " + x.resText + "<br/>" let text = '';
if(x.resText){
if(x.resText.includes('ok')){
text = (isEnable?'开启':'关闭')+'直播-操作成功!'
}else{
text = (isEnable?'开启':'关闭')+'直播-操作失败:' + x.resText
}
}
content += " " + text + "<br/>"
}); });
createInfoModal({ width:'50%', title: '结果',content }) createInfoModal({ width:'50%', title: '结果',content })
}).catch(e => { }).catch(e => {

View File

@ -62,9 +62,12 @@
<div v-else style="height: 100%;display: flex;justify-content: center;align-items: center;"> <div v-else style="height: 100%;display: flex;justify-content: center;align-items: center;">
<a-empty> <a-empty>
<template #description> <template #description>
<span> <span v-if="!playStatus">
没有找到直播间 没有找到直播间
</span> </span>
<span v-if="playStatus">
直播间暂无内容
</span>
</template> </template>
<!-- <a-button type="primary" @="">关闭</a-button> --> <!-- <a-button type="primary" @="">关闭</a-button> -->
</a-empty> </a-empty>
@ -96,6 +99,7 @@ import { nextTick } from 'vue';
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import { getUserId } from '/@/views/site/utils/index'; import { getUserId } from '/@/views/site/utils/index';
import KcErrorreportIndexModal from '/@/views/kc/kcErrorreport/components/KcErrorreportIndexZbModal.vue' import KcErrorreportIndexModal from '/@/views/kc/kcErrorreport/components/KcErrorreportIndexZbModal.vue'
import videojs from "video.js";
const mainVideo = ref<any>(); const mainVideo = ref<any>();
const bVideoRefs = ref<any>([]); const bVideoRefs = ref<any>([]);
@ -110,6 +114,7 @@ const tableData = ref<Recordable>([])
const suibiList = ref<Recordable>([]) const suibiList = ref<Recordable>([])
const isError = ref(false); const isError = ref(false);
const tkbjVisible = ref(false); const tkbjVisible = ref(false);
const playStatus = ref(false);
const model = reactive<Record<string, any>>({ notes:'' }); const model = reactive<Record<string, any>>({ notes:'' });
@ -148,6 +153,7 @@ onMounted(() => {
changeLive(tableData.value[0]); changeLive(tableData.value[0]);
} }
savePlayLogFn(tableData.value[0]); savePlayLogFn(tableData.value[0]);
calcPlayStatus(tableData.value[0]);
tableData.value.forEach(x => x.isShow = false);// tableData.value.forEach(x => x.isShow = false);//
}) })
}); });
@ -247,6 +253,19 @@ function savePlayLogFn(item){
savePlayLog({ playUrl: item.pullUrl, jxlId: item.jxlId, jxlName: item.jxlName, jsbh: route.query.id, jsmc: item.jsmc, ketangbiaoId: route.query.ktId,ketangbiaoName: ktangInfo.value.kcmc }) savePlayLog({ playUrl: item.pullUrl, jxlId: item.jxlId, jxlName: item.jxlName, jsbh: route.query.id, jsmc: item.jsmc, ketangbiaoId: route.query.ktId,ketangbiaoName: ktangInfo.value.kcmc })
} }
//
function calcPlayStatus(item){
videojs.xhr.get(item.pullUrl,(err, resp, body) => {
if(err){
playStatus.value = false;
isError.value = true;
}else{
playStatus.value = true;
isError.value = false;
}
})
}
function saveSuibi(){ function saveSuibi(){
//addSuibi editSuibi //addSuibi editSuibi
// if(model.value.id){ // if(model.value.id){