2023年6月24日 在智慧教室上添加按钮
This commit is contained in:
parent
021ff80859
commit
024abb6d3a
|
@ -14,6 +14,9 @@
|
|||
<a-col :lg="6">
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
||||
|
||||
<a-button type="primary" preIcon="ant-design:check-square-outlined" @click="closeQuartz" v-if="shangXianQuartz.status == 0" style="margin-left: 8px">停止自动调整教室</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:border-outlined" @click="openQuartz" v-if="shangXianQuartz.status == -1" style="margin-left: 8px">开启自动调整教室</a-button>
|
||||
<!--<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
|
||||
{{ toggleSearchStatus ? '收起' : '展开' }}
|
||||
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
|
||||
|
@ -108,6 +111,7 @@ import { useMessage } from '/@/hooks/web/useMessage';
|
|||
import showAllLive from './showAllLive.vue';
|
||||
import { execAvyApi, getAvyCtrlLiveOpenOrCloseUrl } from "/@/views/site/utils/index";
|
||||
import { JInput } from '/@/components/Form';
|
||||
import { resumeJob, pauseJob } from '/@/views/monitor/quartz/quartz.api';
|
||||
|
||||
|
||||
// const _document:any = window.document;
|
||||
|
@ -142,6 +146,8 @@ const list = (params) => defHttp.get({ url: Api.list, params });
|
|||
const updateAllLive = (params) => defHttp.get({ url: Api.updateAllLive, params });
|
||||
const changeAvyLiveApi = (params) => defHttp.get({ url: Api.changeAvyLiveApi, params });
|
||||
|
||||
const shangXianQuartz = ref<any>({});
|
||||
|
||||
const labelCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 },
|
||||
|
@ -235,6 +241,8 @@ function loadData(){
|
|||
// let mainDiv:any = _document?.querySelector('.ant-layout .jeecg-default-layout-main > div');
|
||||
// topWidth.value =mainDiv?.style?.height?? '0';
|
||||
});
|
||||
|
||||
getAutoShangXianQuartz();
|
||||
}
|
||||
|
||||
function ylLive(record){
|
||||
|
@ -341,6 +349,38 @@ function searchReset() {
|
|||
//刷新数据
|
||||
loadData();
|
||||
}
|
||||
|
||||
function getAutoShangXianQuartz(){
|
||||
defHttp.get({ url: '/jiaoshi/kcZhihuijiaoshi/getAutoShangXianQuartz', params: {} }).then(res => {
|
||||
shangXianQuartz.value = res;
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 启动
|
||||
*/
|
||||
async function openQuartz(){
|
||||
await resumeJob({ id: shangXianQuartz.value.id }, loadData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 暂停
|
||||
*/
|
||||
async function closeQuartz(){
|
||||
await pauseJob({ id: shangXianQuartz.value.id }, loadData);
|
||||
}
|
||||
|
||||
// async function handlerPause(record) {
|
||||
// await pauseJob({ id: record.id }, reload);
|
||||
// }
|
||||
|
||||
// async function handlerResume(record) {
|
||||
// await resumeJob({ id: record.id }, reload);
|
||||
// }
|
||||
|
||||
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.videoMax{
|
||||
|
|
Loading…
Reference in New Issue