# Conflicts:
#	src/views/services/serviceDirective/ConfigServiceDirectiveList.vue
This commit is contained in:
1378012178@qq.com 2025-08-25 14:57:15 +08:00
commit 3368d90522
54 changed files with 1355 additions and 716 deletions

BIN
src/assets/iot/fxj.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
src/assets/iot/fxj_blue.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
src/assets/iot/sxt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

View File

@ -3,7 +3,7 @@
* @Description: logo component
-->
<template>
<div class="anticon" :class="getAppLogoClass" @click="goHome" style="text-align: center;">
<div class="anticon" :class="getAppLogoClass" @click="goHome" style="background: #e2edff !important;text-align: center;">
<img src="../../../assets/images/logo.png" />
<div class="ml-2 truncate md:opacity-100" :class="getTitleClass" v-show="showTitle">
{{ shortTitle }}

View File

@ -203,6 +203,7 @@
.jeecg-menu-light.jeecg-menu-vertical .jeecg-menu-item-active.jeecg-menu-submenu {
color: #606266 !important;
background: #f0f0f0;
padding-bottom: 10px;;
}
.jeecg-menu-vertical .jeecg-menu-item, .jeecg-menu-vertical .jeecg-menu-submenu-title {
@ -222,4 +223,17 @@
// margin: 10px 20px 0 20px;
transform: scale(1.02);
}
.ant-drawer-close {
position: absolute;
right: 0;
left: auto !important;
margin-right: 16px;
}
// .jeecg-layout-content{
// position: relative;
// flex: 1 1 auto;
// min-height: 0;
// padding: 3px;
// }
</style>

View File

@ -501,8 +501,8 @@
padding: 10px;
.ant-form {
padding: 24px 10px 0px 10px;
margin-bottom: 8px;
padding: 14px 10px 0px 10px;
// margin-bottom: 8px;
background-color: @component-background;
border-radius: 8px;
}

View File

@ -5,11 +5,20 @@
// update-end--author:liaozhiyang---date:20240130---for【issues/5857】Button color类型颜色失效
// @import './table.less';
.jeecg-basic-table-form-container .ant-form {
margin-bottom: 14px !important;
}
.jeecg-basic-table-form-container .table-page-search-submitButtons {
margin-bottom: 12px !important;
}
.ant-form-item {
margin-bottom: 14px !important;
}
// TODO beta.11 fix
.ant-col {
width: 100%;
}
.ant-image-preview-root {
img {
display: unset;

View File

@ -1,17 +1,17 @@
<template>
<Header :class="getHeaderClass" class="headClass">
<!-- left start -->
<div :class="`${prefixCls}-left`">
<div :class="`${prefixCls}-left`" >
<!-- logo -->
<AppLogo v-if="getShowHeaderLogo || getIsMobile" :class="`${prefixCls}-logo`" :theme="getHeaderTheme"
:style="getLogoWidth" />
<LayoutTrigger v-if="(getShowContent && getShowHeaderTrigger && !getSplit && !getIsMixSidebar) || getIsMobile"
:theme="getHeaderTheme" :sider="false" />
<AppLogo v-if="getShowHeaderLogo || getIsMobile" :class="`${prefixCls}-logo`" :theme="getHeaderTheme" :style="getLogoWidth" />
<LayoutTrigger
v-if="(getShowContent && getShowHeaderTrigger && !getSplit && !getIsMixSidebar) || getIsMobile"
:theme="getHeaderTheme"
:sider="false"
/>
<LayoutBreadcrumb v-if="getShowContent && getShowBread" :theme="getHeaderTheme" />
<!-- 欢迎语 -->
<span v-if="getShowContent && getShowBreadTitle && !getIsMobile"
:class="[prefixCls, `${prefixCls}--${getHeaderTheme}`, 'headerIntroductionClass']">
{{ t('layout.header.welcomeIn') }} {{ title }} </span>
<span v-if="getShowContent && getShowBreadTitle && !getIsMobile" style="background:#e2edff !important" :class="[prefixCls, `${prefixCls}--${getHeaderTheme}`,'headerIntroductionClass']"> {{t('layout.header.welcomeIn')}} {{ title }} </span>
</div>
<!-- left end -->
@ -24,20 +24,19 @@
<!-- action -->
<div :class="`${prefixCls}-action`">
<!-- <AppSearch :class="`${prefixCls}-action__item `" v-if="getShowSearch" /> -->
<span >{{ orgName }}</span>
<a-divider type="vertical" />
<ErrorAction v-if="getUseErrorHandle" :class="`${prefixCls}-action__item error-action`" />
<a-divider type="vertical" v-if="getUseErrorHandle" />
<a-divider type="vertical" v-if="getUseErrorHandle" />
<Notify v-if="getShowNotice" :class="`${prefixCls}-action__item notify-item`" />
<a-divider type="vertical" v-if="getShowNotice" />
<a-divider type="vertical" v-if="getShowNotice" />
<FullScreen v-if="getShowFullScreen" :class="`${prefixCls}-action__item fullscreen-item`" />
<a-divider type="vertical" v-if="getShowFullScreen" />
<a-divider type="vertical" v-if="getShowFullScreen" />
<LockScreen v-if="getUseLockPage" />
<a-divider type="vertical" v-if="getUseLockPage" />
<a-divider type="vertical" v-if="getUseLockPage" />
<!-- <AppLocalePicker v-if="getShowLocalePicker" :reload="true" :showText="false" :class="`${prefixCls}-action__item`" /> -->
<UserDropDown :theme="getHeaderTheme" />
<a-divider type="vertical" />
<a-divider type="vertical" />
<SettingDrawer v-if="getShowSetting" :class="`${prefixCls}-action__item`" />
<!-- ai助手 -->
<!-- <Aide></Aide> -->
@ -46,235 +45,228 @@
<LoginSelect ref="loginSelectRef" @success="loginSelectOk"></LoginSelect>
</template>
<script lang="ts">
import { defineComponent, unref, computed, ref, onMounted, toRaw } from 'vue';
import { useGlobSetting } from '/@/hooks/setting';
import { propTypes } from '/@/utils/propTypes';
import { defineComponent, unref, computed, ref, onMounted, toRaw } from 'vue';
import { useGlobSetting } from '/@/hooks/setting';
import { propTypes } from '/@/utils/propTypes';
import { Layout } from 'ant-design-vue';
import { AppLogo } from '/@/components/Application';
import LayoutMenu from '../menu/index.vue';
import LayoutTrigger from '../trigger/index.vue';
import { Layout } from 'ant-design-vue';
import { AppLogo } from '/@/components/Application';
import LayoutMenu from '../menu/index.vue';
import LayoutTrigger from '../trigger/index.vue';
import { AppSearch } from '/@/components/Application';
import { AppSearch } from '/@/components/Application';
import { useHeaderSetting } from '/@/hooks/setting/useHeaderSetting';
import { useMenuSetting } from '/@/hooks/setting/useMenuSetting';
import { useRootSetting } from '/@/hooks/setting/useRootSetting';
import { useHeaderSetting } from '/@/hooks/setting/useHeaderSetting';
import { useMenuSetting } from '/@/hooks/setting/useMenuSetting';
import { useRootSetting } from '/@/hooks/setting/useRootSetting';
import { MenuModeEnum, MenuSplitTyeEnum } from '/@/enums/menuEnum';
import { SettingButtonPositionEnum } from '/@/enums/appEnum';
import { AppLocalePicker } from '/@/components/Application';
import { MenuModeEnum, MenuSplitTyeEnum } from '/@/enums/menuEnum';
import { SettingButtonPositionEnum } from '/@/enums/appEnum';
import { AppLocalePicker } from '/@/components/Application';
import { UserDropDown, LayoutBreadcrumb, FullScreen, Notify, ErrorAction, LockScreen } from './components';
import { useAppInject } from '/@/hooks/web/useAppInject';
import { useDesign } from '/@/hooks/web/useDesign';
import { UserDropDown, LayoutBreadcrumb, FullScreen, Notify, ErrorAction, LockScreen } from './components';
import { useAppInject } from '/@/hooks/web/useAppInject';
import { useDesign } from '/@/hooks/web/useDesign';
import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent';
import { useLocale } from '/@/locales/useLocale';
import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent';
import { useLocale } from '/@/locales/useLocale';
import LoginSelect from '/@/views/sys/login/LoginSelect.vue';
import { useUserStore } from '/@/store/modules/user';
import { useI18n } from '/@/hooks/web/useI18n';
import Aide from "@/views/dashboard/ai/components/aide/index.vue"
import { getOrgInfo } from '@/api/common/api'
const { t } = useI18n();
import LoginSelect from '/@/views/sys/login/LoginSelect.vue';
import { useUserStore } from '/@/store/modules/user';
import { useI18n } from '/@/hooks/web/useI18n';
import Aide from "@/views/dashboard/ai/components/aide/index.vue"
const { t } = useI18n();
export default defineComponent({
name: 'LayoutHeader',
components: {
Header: Layout.Header,
AppLogo,
LayoutTrigger,
LayoutBreadcrumb,
LayoutMenu,
UserDropDown,
AppLocalePicker,
FullScreen,
Notify,
AppSearch,
ErrorAction,
LockScreen,
LoginSelect,
SettingDrawer: createAsyncComponent(() => import('/@/layouts/default/setting/index.vue'), {
loading: true,
}),
Aide
},
props: {
fixed: propTypes.bool,
},
setup(props) {
const { prefixCls } = useDesign('layout-header');
const userStore = useUserStore();
const { getShowTopMenu, getShowHeaderTrigger, getSplit, getIsMixMode, getMenuWidth, getIsMixSidebar } = useMenuSetting();
const { getUseErrorHandle, getShowSettingButton, getSettingButtonPosition } = useRootSetting();
const { title } = useGlobSetting();
const orgName = ref('')
const {
getHeaderTheme,
getShowFullScreen,
getShowNotice,
getShowContent,
getShowBread,
getShowHeaderLogo,
getShowHeader,
getShowSearch,
getUseLockPage,
getShowBreadTitle,
} = useHeaderSetting();
export default defineComponent({
name: 'LayoutHeader',
components: {
Header: Layout.Header,
AppLogo,
LayoutTrigger,
LayoutBreadcrumb,
LayoutMenu,
UserDropDown,
AppLocalePicker,
FullScreen,
Notify,
AppSearch,
ErrorAction,
LockScreen,
LoginSelect,
SettingDrawer: createAsyncComponent(() => import('/@/layouts/default/setting/index.vue'), {
loading: true,
}),
Aide
},
props: {
fixed: propTypes.bool,
},
setup(props) {
const { prefixCls } = useDesign('layout-header');
const userStore = useUserStore();
const { getShowTopMenu, getShowHeaderTrigger, getSplit, getIsMixMode, getMenuWidth, getIsMixSidebar } = useMenuSetting();
const { getUseErrorHandle, getShowSettingButton, getSettingButtonPosition } = useRootSetting();
const { title } = useGlobSetting();
const { getShowLocalePicker } = useLocale();
const {
getHeaderTheme,
getShowFullScreen,
getShowNotice,
getShowContent,
getShowBread,
getShowHeaderLogo,
getShowHeader,
getShowSearch,
getUseLockPage,
getShowBreadTitle,
} = useHeaderSetting();
const { getIsMobile } = useAppInject();
const { getShowLocalePicker } = useLocale();
const getHeaderClass = computed(() => {
const theme = unref(getHeaderTheme);
return [
const { getIsMobile } = useAppInject();
const getHeaderClass = computed(() => {
const theme = unref(getHeaderTheme);
return [
prefixCls,
{
[`${prefixCls}--fixed`]: props.fixed,
[`${prefixCls}--mobile`]: unref(getIsMobile),
[`${prefixCls}--${theme}`]: theme,
},
];
});
const getShowSetting = computed(() => {
if (!unref(getShowSettingButton)) {
return false;
}
const settingButtonPosition = unref(getSettingButtonPosition);
if (settingButtonPosition === SettingButtonPositionEnum.AUTO) {
return unref(getShowHeader);
}
return settingButtonPosition === SettingButtonPositionEnum.HEADER;
});
const getLogoWidth = computed(() => {
if (!unref(getIsMixMode) || unref(getIsMobile)) {
return {};
}
const width = unref(getMenuWidth) < 180 ? 180 : unref(getMenuWidth);
return { width: `${width}px` };
});
const getSplitType = computed(() => {
return unref(getSplit) ? MenuSplitTyeEnum.TOP : MenuSplitTyeEnum.NONE;
});
const getMenuMode = computed(() => {
return unref(getSplit) ? MenuModeEnum.HORIZONTAL : null;
});
/**
* 首页多租户部门弹窗逻辑
*/
const loginSelectRef = ref();
function showLoginSelect() {
//update-begin---author:liusq Date:20220101 for----
//
const loginInfo = toRaw(userStore.getLoginInfo) || {};
if (!!loginInfo.isLogin) {
loginSelectRef.value.show(loginInfo);
}
//update-end---author:liusq Date:20220101 for----
}
function loginSelectOk() {
console.log('成功。。。。。');
}
onMounted(() => {
showLoginSelect();
});
return {
prefixCls,
{
[`${prefixCls}--fixed`]: props.fixed,
[`${prefixCls}--mobile`]: unref(getIsMobile),
[`${prefixCls}--${theme}`]: theme,
},
];
});
const getShowSetting = computed(() => {
if (!unref(getShowSettingButton)) {
return false;
}
const settingButtonPosition = unref(getSettingButtonPosition);
if (settingButtonPosition === SettingButtonPositionEnum.AUTO) {
return unref(getShowHeader);
}
return settingButtonPosition === SettingButtonPositionEnum.HEADER;
});
const getLogoWidth = computed(() => {
if (!unref(getIsMixMode) || unref(getIsMobile)) {
return {};
}
const width = unref(getMenuWidth) < 180 ? 180 : unref(getMenuWidth);
return { width: `${width}px` };
});
const getSplitType = computed(() => {
return unref(getSplit) ? MenuSplitTyeEnum.TOP : MenuSplitTyeEnum.NONE;
});
const getMenuMode = computed(() => {
return unref(getSplit) ? MenuModeEnum.HORIZONTAL : null;
});
/**
* 首页多租户部门弹窗逻辑
*/
const loginSelectRef = ref();
function showLoginSelect() {
//update-begin---author:liusq Date:20220101 for----
//
const loginInfo = toRaw(userStore.getLoginInfo) || {};
if (!!loginInfo.isLogin) {
loginSelectRef.value.show(loginInfo);
}
//update-end---author:liusq Date:20220101 for----
}
function loginSelectOk() {
console.log('成功。。。。。');
}
onMounted(() => {
getOrgInfo().then(res => {
orgName.value = res.orgName
})
showLoginSelect();
});
return {
prefixCls,
getHeaderClass,
getShowHeaderLogo,
getHeaderTheme,
getShowHeaderTrigger,
getIsMobile,
getShowBreadTitle,
getShowBread,
getShowContent,
getSplitType,
getSplit,
getMenuMode,
getShowTopMenu,
getShowLocalePicker,
getShowFullScreen,
getShowNotice,
getUseErrorHandle,
getLogoWidth,
getIsMixSidebar,
getShowSettingButton,
getShowSetting,
getShowSearch,
getUseLockPage,
loginSelectOk,
loginSelectRef,
title,
t,
orgName,
};
},
});
getHeaderClass,
getShowHeaderLogo,
getHeaderTheme,
getShowHeaderTrigger,
getIsMobile,
getShowBreadTitle,
getShowBread,
getShowContent,
getSplitType,
getSplit,
getMenuMode,
getShowTopMenu,
getShowLocalePicker,
getShowFullScreen,
getShowNotice,
getUseErrorHandle,
getLogoWidth,
getIsMixSidebar,
getShowSettingButton,
getShowSetting,
getShowSearch,
getUseLockPage,
loginSelectOk,
loginSelectRef,
title,
t
};
},
});
</script>
<style lang="less">
@import './index.less';
//update-begin---author:scott ---date:2022-09-30 for-----------
//
@prefix-cls: ~'@{namespace}-layout-header';
@import './index.less';
//update-begin---author:scott ---date:2022-09-30 for-----------
//
@prefix-cls: ~'@{namespace}-layout-header';
.ant-layout .@{prefix-cls} {
display: flex;
padding: 0 8px;
// update-begin--author:liaozhiyang---date:20240407---forQQYUN-8762
height: @header-height;
// update-end--author:liaozhiyang---date:20240407---forQQYUN-8762
align-items: center;
.ant-layout .@{prefix-cls} {
display: flex;
padding: 0 8px;
// update-begin--author:liaozhiyang---date:20240407---forQQYUN-8762
height: @header-height;
// update-end--author:liaozhiyang---date:20240407---forQQYUN-8762
align-items: center;
.headerIntroductionClass {
margin-right: 4px;
margin-bottom: 2px;
border-bottom: 0px;
border-left: 0px;
}
&--light {
.headerIntroductionClass {
color: #000;
margin-right: 4px;
margin-bottom: 2px;
border-bottom: 0px;
border-left: 0px;
}
&--light {
.headerIntroductionClass {
color: #000;
}
}
&--dark {
.headerIntroductionClass {
color: rgba(255, 255, 255, 1);
}
.anticon, .truncate {
color: rgba(255, 255, 255, 1);
}
}
//update-end---author:scott ---date::2022-09-30 for--------------
}
&--dark {
.headerIntroductionClass {
color: rgba(255, 255, 255, 1);
}
.anticon,
.truncate {
color: rgba(255, 255, 255, 1);
}
}
//update-end---author:scott ---date::2022-09-30 for--------------
}
.jeecg-layout-header--light {
border-bottom: 0px;
border-left: 0px;
}
.headClass{
// background-image: url('../resource/img/bj.png') !important;
// background-repeat: no-repeat;
// background-size: 100% auto;
// background-color: #e5f5f9 !important;
// background-color: #eef3f8 !important;
background: linear-gradient(to right, #e2edff, #eef3f8) !important;
}
</style>

View File

@ -22,9 +22,9 @@
</a-row>
</a-form>
</div>
<a-row>
<a-col :span="6" v-for="(item,index) in dataList" :key="index" style="padding: 5px 10px 0 0;height: 240px;">
<a-row style="padding: 5px;background-color: white;border-radius: 8px;height: 220px;">
<a-row style="margin-top: -5px;">
<a-col v-for="(item,index) in dataList" :key="index" style="padding: 5px 14px 0 0;height: 230px;" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="4" >
<a-row style="padding: 0 5px;background-color: white;border-radius: 8px;height: 220px;">
<a-col :span="4">
<div class="bjclass">
<img :src="handleHeadPath(item.headPath)" style="width: 40px;height:40px;margin-top: 10px;" @error="setDefaultImage"/>

View File

@ -45,37 +45,50 @@
</a-row>
</a-form>
</div>
<a-row>
<a-col v-for="(item,index) in tableData" style="padding: 5px" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6">
<a-card :title="`NUID`+item.nuId"
<a-row style="margin-top: -7px;">
<a-col v-for="(item,index) in tableData" style="padding: 7px 14px 7px 0;" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6">
<a-card
:class="['card-3d']"
:headStyle="{ height: '60px', padding: '0 24px',border:'0px' }"
@mouseenter="item.key"
@mouseleave="item.key"
@click="isSelected = item">
<template #extra>
<span class="lxClass" v-if="item.status == 5">停用</span>
<span class="zxClass" v-if="item.status != 5">启用</span>
<span class="hldyClass" >{{item.areaFlag_dictText}}</span>
</template>
<p>单元名称{{item.nuName}}</p>
<p>创建时间{{item.createTime}}</p>
<p>单元类型{{item.areaFlag_dictText}}</p>
<div style="text-align: center;">
<a-button size="small" @click="handleQiyong(item)" v-if="item.status == 5" style="margin-left:10px" >启用</a-button>
<a-button size="small" @click="handleTingyong(item)" v-if="item.status != 5" style="margin-left:10px" >停用</a-button>
<a-button size="small" @click="handleEdit(item)" style="margin-left:10px" >更名</a-button>
<a-button size="small" @click="handleWlsb(item)" style="margin-left:10px" >设备</a-button>
<a-popover title="二维码" >
<template #content>
<QRCodeWithLogo
:text="item.nuId"
:logoUrl="logoUrl"
:size="150"
:logoSize="40"
/>
</template>
<a-button size="small" style="margin-left:10px">二维码</a-button>
</a-popover>
<template #title>
<a-row>
<a-col>
NUID{{item.nuId}}
</a-col>
</a-row>
</template>
<div style="margin-top: -30px;">
<a-divider style="margin: 0 0 10px 0 " />
<p>单元名称{{item.nuName}}</p>
<p style="margin-top: -10px;">创建时间{{item.createTime}}</p>
<div style="float:left;margin-top: 20px;">
<a-button type="dashed" size="small" @click="handleEdit(item)">更名</a-button>
<a-button type="dashed" size="small" @click="handleWlsb(item)" style="margin-left:10px" >设备</a-button>
<a-popover title="二维码" >
<template #content>
<QRCodeWithLogo
:text="item.nuId"
:logoUrl="logoUrl"
:size="150"
:logoSize="40"
/>
</template>
<a-button type="dashed" size="small" style="margin-left:10px">二维码</a-button>
</a-popover>
</div>
<div style="float:right;margin-top: 20px;">
<a-switch style="margin-left:10px" :checked="item.status!=5" checked-children="" @change="(checked) => handleChangeValidateStatus(item, checked)" un-checked-children="" />
</div>
</div>
</a-card>
</a-col>
</a-row>
@ -138,6 +151,14 @@ const { createMessage } = useMessage();
queryParam.status = '';
}
function handleChangeValidateStatus(record,checked) {
console.log("🚀 ~ handleChangeValidateStatus ~ record,checked:", record,checked)
if (checked) {
handleQiyong(record);
} else {
handleTingyong(record);
}
}
/**
* 编辑事件
@ -257,25 +278,16 @@ const { createMessage } = useMessage();
.zxClass {
.hldyClass {
font-size: 12px;
background: linear-gradient(to right, #1ea0fa, #017de9);
border-radius: 8px;
background: #f5f7ff;
border-radius: 15px;
height: 25px;
color: white;
line-height: 25px;
padding: 5px;
padding: 5px 15px;
border: 1px solid #ebedf2;
}
.lxClass {
font-size: 12px;
background: linear-gradient(to right, #d1d4d5, #d3d5d6);
border-radius: 8px;
height: 25px;
color: white;
line-height: 25px;
padding: 5px;
}
.selected-card {
border: 2px solid #1890ff;
@ -290,17 +302,13 @@ const { createMessage } = useMessage();
.card-3d {
border-radius: 8px;
border: 1px solid #f0f0f0; /* 边框增强立体感 */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
background: white;
position: relative;
}
/* 鼠标悬停:阴影加深 + 轻微上浮 */
.card-3d:hover {
border: 2px solid #1890ff;
box-shadow: 0 4px 8px rgba(24, 144, 255, 0.4);
transform: translate(-3px,-3px);
border: 1px solid #1890ff;
}
</style>

View File

@ -1,49 +1,49 @@
<template>
<div class="p-2">
<div >
<a-row>
<a-col v-for="(item,index) in sxtList.records" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" style="padding: 8px;">
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '60px', padding: '0 24px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }">
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '70px', padding: '0 24px',border:'0px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }">
<template #title>
<a-row style="font-weight: normal;">
<a-col :span="18" style="font-size: 14px;">
<div>SN<span style="font-weight: bold;">{{item.sn}}</span></div>
<div style="font-size: 12px;">名称{{item.deviceName}}</div>
</a-col>
<a-col :span="6" style="text-align: center;padding-top: 4px;">
<div :class="item.relayState=='1'?'zxClass':'lxClass'">{{item.deviceStatus=='1'?'在线':'离线'}}</div>
<a-col :span="6" style="display: flex; justify-content: flex-end;">
<div :class="item.deviceStatus=='1'?'zxClass':'lxClass'">{{item.deviceStatus=='1'?'在线':'离线'}}</div>
</a-col>
<a-col :span="24">
<a-divider style="margin: 10px 0 0 0" />
</a-col>
</a-row>
</template>
<a-row>
<a-col :span="12" style="margin-top: -10px;"><a-tag color="purple">摄像头</a-tag></a-col>
<a-col :span="12" style="margin-top: -10px;text-align:right;">报修状态
<span v-if="item.maintainStatus==0">正常</span>
<span v-if="item.maintainStatus==1">维修中</span>
<span v-if="item.maintainStatus==2">报废</span>
</a-col>
<a-col :span="12" >{{item.nuId_dictText?item.nuId_dictText:'未配置'}}</a-col>
<a-row style="margin-top:-20px;">
<!-- <a-col :span="12" ><span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID: {{item.nuId?item.nuId:'未配置'}}</span></a-col>
<a-col :span="12" style="text-align: right;">
<span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID: {{item.nuId?item.nuId:'未配置'}}</span>
</a-col>
<a-col :span="24" style="text-align: center;font-size: 44px;font-weight: bold;margin-top:18px;">
<span>摄像头</span>
</a-col>
<!-- <a-col :span="8" style="padding: 12px 0 0 5px;margin-top:18px;">
<div style="font-size: 12px;margin: 5px 0 -5px 2px;padding:2px;">KWH</div>
<div style="margin-top:-3px;"><span style="background:#eeeeee;padding: 2px;border-radius:5px;font-size:11px;">用电量</span></div>
{{item.nuName?item.nuName:'未配置'}}
</a-col> -->
<a-col :span="24" style="text-align: center;font-size: 44px;font-weight: bold;margin-top:10px;">
<img src="../../../../assets/iot/sxt.png" style="width:80px;" />
</a-col>
<a-col :span="12" style="margin-top: -1px;"><a-tag color="purple">摄像头</a-tag></a-col>
<a-col :span="12" style="margin-top: -11px;text-align:right;">
<span v-if="item.maintainStatus==0" style="font-weight:700;font-size:16px;">正常</span>
<span v-if="item.maintainStatus==1" style="font-weight:700;font-size:16px;color:red;">维修中</span>
<span v-if="item.maintainStatus==2" style="font-weight:700;font-size:16px;">报废</span>
<div style="font-size: 12px;color: #9d9d9d;margin-top:-5px">报修状态</div>
</a-col>
</a-row>
<a-divider />
<p style="text-align:center;">
<a-divider style="margin: 10px 0 20px 0" />
<p style="text-align:center;margin-bottom:5px !important">
<span style="display:inline-block;cursor: pointer;" @click="handlePreview(item)">
<span class="tbClass"><img src="../../../../assets/iot/a14.png" style="width:20px;" /></span><br/>
<span class="antTitle">预览</span>
</span>
<span style="display:inline-block;margin-left:10px;cursor: pointer;" @click="handlePicConfig(item)">
<!-- <span style="display:inline-block;margin-left:10px;cursor: pointer;" @click="handlePicConfig(item)">
<span class="tbClass"><img src="../../../../assets/iot/a12.png" style="width:20px;" /></span><br/>
<span class="antTitle">画面配置</span>
</span>
</span> -->
<span style="display:inline-block;margin-left:10px;cursor: pointer;" @click="handleBaoxiu(item,'1')" v-if="item.maintainStatus==0">
<span class="tbClass"><img src="../../../../assets/iot/a6.png" style="width:20px;" /></span><br/>
<span class="antTitle">报修</span>
@ -54,48 +54,52 @@
<a-col v-for="(item,index) in zndbList.records" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" style="padding: 8px;">
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '60px', padding: '0 24px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }">
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '70px', padding: '0 24px',border:'0px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }">
<template #title>
<a-row style="font-weight: normal;">
<a-col :span="18" style="font-size: 14px;">
<div>SN<span style="font-weight: bold;">{{item.address}}</span></div>
<div style="font-size: 12px;">抄表时间{{item.readTime?item.readTime:'未抄表'}}</div>
</a-col>
<a-col :span="6" style="text-align: center;padding-top: 4px;">
<div :class="item.relayState=='1'?'zxClass':'lxClass'">{{item.relayState=='1'?'在线':'离线'}}</div>
<a-col :span="6" style="display: flex; justify-content: flex-end;">
<div :class="item.relayState=='1'?'zxClass':'lxClass'">{{item.relayState=='1'?'合闸':'拉闸'}}</div>
</a-col>
<a-col :span="24">
<a-divider style="margin: 10px 0 0 0" />
</a-col>
</a-row>
</template>
<a-row>
<a-col :span="12" style="margin-top: -10px;"><a-tag color="red">智能电表</a-tag></a-col>
<a-col :span="12" style="margin-top: -10px;text-align:right;">报修状态
<span v-if="item.maintainStatus==0">正常</span>
<span v-if="item.maintainStatus==1">维修中</span>
<span v-if="item.maintainStatus==2">报废</span>
</a-col>
<a-col :span="12" >{{item.nuId_dictText?item.nuId_dictText:'未配置'}}</a-col>
<a-row style="margin-top:-20px;">
<!-- <a-col :span="12" ><span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID: {{item.nuId?item.nuId:'未配置'}}</span></a-col>
<a-col :span="12" style="text-align: right;">
<span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID: {{item.nuId?item.nuId:'未配置'}}</span>
</a-col>
<a-col :span="14" style="text-align: right;font-size: 44px;font-weight: bold;margin-top:18px;">
{{item.nuName?item.nuName:'未配置'}}
</a-col> -->
<a-col :span="14" style="text-align: right;font-size: 44px;font-weight: bold;margin-top:10px;">
<span>{{item.eleValue?item.eleValue:'0.00'}}</span>
</a-col>
<a-col :span="8" style="padding: 12px 0 0 5px;margin-top:18px;">
<div style="font-size: 12px;margin: 5px 0 -5px 2px;padding:2px;">KWH</div>
<div style="margin-top:-3px;"><span style="background:#eeeeee;padding: 2px;border-radius:5px;font-size:11px;">用电量</span></div>
</a-col>
<a-col :span="12" style="margin-top: 10px;"><a-tag color="red">智能电表</a-tag></a-col>
<a-col :span="12" style="margin-top: 0px;text-align:right;">
<span v-if="item.maintainStatus==0" style="font-weight:700;font-size:16px;">正常</span>
<span v-if="item.maintainStatus==1" style="font-weight:700;font-size:16px;color:red;">维修中</span>
<span v-if="item.maintainStatus==2" style="font-weight:700;font-size:16px;">报废</span>
<div style="font-size: 12px;color: #9d9d9d;margin-top:-5px">报修状态</div>
</a-col>
</a-row>
<a-divider />
<p style="text-align:center;">
<a-divider style="margin: 10px 0 20px 0" />
<p style="text-align:center;margin-bottom:5px !important">
<span style="display:inline-block;cursor: pointer;" @click="handleRead(item)">
<span class="tbClass"><img src="../../../../assets/iot/a1.png" style="width:20px;" /></span><br/>
<span class="antTitle">抄表</span>
</span>
<span style="display:inline-block;margin-left:10px;cursor: pointer;" @click="handleControlLz(item)">
<span style="display:inline-block;margin-left:10px;cursor: pointer;" @click="handleControlLz(item)" v-if="item.relayState=='1'">
<span class="tbClass"><img src="../../../../assets/iot/a5.png" style="width:20px;" /></span><br/>
<span class="antTitle">拉闸</span>
</span>
<span style="display:inline-block;margin-left:10px;cursor: pointer;" @click="handleControlHz(item)">
<span style="display:inline-block;margin-left:10px;cursor: pointer;" @click="handleControlHz(item)" v-if="item.relayState=='0'">
<span class="tbClass"><img src="../../../../assets/iot/a2.png" style="width:20px;" /></span><br/>
<span class="antTitle">合闸</span>
</span>
@ -117,48 +121,52 @@
<a-col v-for="(item,index) in znsbList.records" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" style="padding: 8px;">
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '60px', padding: '0 24px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }">
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '70px', padding: '0 24px',border:'0px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }">
<template #title>
<a-row style="font-weight: normal;">
<a-col :span="18" style="font-size: 14px;">
<div>SN<span style="font-weight: bold;">{{item.address}}</span></div>
<div style="font-size: 12px;">抄表时间{{item.readTime?item.readTime:'未抄表'}}</div>
</a-col>
<a-col :span="6" style="text-align: center;padding-top: 4px;">
<div :class="item.relayState=='1'?'zxClass':'lxClass'">{{item.relayState=='1'?'在线':'离线'}}</div>
<a-col :span="6" style="display: flex; justify-content: flex-end;">
<div :class="item.relayState=='1'?'zxClass':'lxClass'">{{item.relayState=='1'?'开阀':'关阀'}}</div>
</a-col>
<a-col :span="24">
<a-divider style="margin: 10px 0 0 0" />
</a-col>
</a-row>
</template>
<a-row>
<a-col :span="12" style="margin-top: -10px;"><a-tag color="blue">智能水表</a-tag></a-col>
<a-col :span="12" style="margin-top: -10px;text-align:right;">报修状态
<span v-if="item.maintainStatus==0">正常</span>
<span v-if="item.maintainStatus==1">维修中</span>
<span v-if="item.maintainStatus==2">报废</span>
</a-col>
<a-col :span="12" >{{item.nuId_dictText?item.nuId_dictText:'未配置'}}</a-col>
<a-row style="margin-top:-20px;">
<!-- <a-col :span="12" ><span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID: {{item.nuId?item.nuId:'未配置'}}</span></a-col>
<a-col :span="12" style="text-align: right;">
<span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID: {{item.nuId?item.nuId:'未配置'}}</span>
</a-col>
<a-col :span="14" style="text-align: right;font-size: 44px;font-weight: bold;margin-top:18px;">
<span>{{item.eleValue?item.eleValue:'0.00'}}</span>
{{item.nuName?item.nuName:'未配置'}}
</a-col> -->
<a-col :span="14" style="text-align: right;font-size: 44px;font-weight: bold;margin-top:10px;">
<span>{{item.waterValue?item.waterValue:'0.00'}}</span>
</a-col>
<a-col :span="8" style="padding: 12px 0 0 5px;margin-top:18px;">
<div style="font-size: 12px;margin: 8px 0 -5px 2px;"></div>
<div style="margin-top:-3px;"><span style="background:#eeeeee;padding: 2px;border-radius:5px;font-size:11px;">用水量</span></div>
</a-col>
<a-col :span="12" style="margin-top: 10px;"><a-tag color="blue">智能水表</a-tag></a-col>
<a-col :span="12" style="margin-top: 0px;text-align:right;">
<span v-if="item.maintainStatus==0" style="font-weight:700;font-size:16px;">正常</span>
<span v-if="item.maintainStatus==1" style="font-weight:700;font-size:16px;color:red;">维修中</span>
<span v-if="item.maintainStatus==2" style="font-weight:700;font-size:16px;">报废</span>
<div style="font-size: 12px;color: #9d9d9d;margin-top:-5px">报修状态</div>
</a-col>
</a-row>
<a-divider />
<p style="text-align:center;">
<a-divider style="margin: 10px 0 20px 0" />
<p style="text-align:center;margin-bottom:5px !important">
<span style="display:inline-block;cursor: pointer;" @click="handleSbRead(item)">
<span class="tbClass"><img src="../../../../assets/iot/a1.png" style="width:20px;" /></span><br/>
<span class="antTitle">抄表</span>
</span>
<span style="display:inline-block;margin-left:10px;cursor: pointer;" @click="handleSbControlLz(item)">
<span style="display:inline-block;margin-left:10px;cursor: pointer;" @click="handleSbControlLz(item)" v-if="item.relayState=='0'">
<span class="tbClass"><img src="../../../../assets/iot/a10.png" style="width:20px;" /></span><br/>
<span class="antTitle">开阀</span>
</span>
<span style="display:inline-block;margin-left:10px;cursor: pointer;" @click="handleSbControlHz(item)">
<span style="display:inline-block;margin-left:10px;cursor: pointer;" @click="handleSbControlHz(item)" v-if="item.relayState=='1'">
<span class="tbClass"><img src="../../../../assets/iot/a11.png" style="width:20px;" /></span><br/>
<span class="antTitle">关阀</span>
</span>
@ -179,33 +187,30 @@
</a-col>
<a-col v-for="(item,index) in wsdjList.records" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" style="padding: 8px;">
<a-card style="width: 100%;border-radius: 8px;min-height:280px;" :headStyle="{ height: '60px', padding: '0 24px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }">
<a-card style="width: 100%;border-radius: 8px;min-height:280px;" :headStyle="{ height: '70px', padding: '0 24px',border:'0px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }">
<template #title>
<a-row style="font-weight: normal;">
<a-col :span="18" style="font-size: 14px;">
<div>SN<span style="font-weight: bold;">{{item.sn}}</span></div>
<div style="font-size: 12px;">抄表时间{{item.reportingTime?item.reportingTime:'未抄表'}}</div>
</a-col>
<a-col :span="6" style="text-align: center;padding-top: 4px;">
<div :class="item.relayState=='1'?'zxClass':'lxClass'">{{item.status=='1'?'在线':'离线'}}</div>
<a-col :span="6" style="display: flex; justify-content: flex-end;">
<div :class="item.status=='0'?'zxClass':'lxClass'">{{item.status=='0'?'在线':'离线'}}</div>
</a-col>
<a-col :span="24">
<a-divider style="margin: 10px 0 0 0" />
</a-col>
</a-row>
</template>
<a-row>
<a-col :span="12" style="margin-top: -10px;"><a-tag color="green">温湿度计</a-tag></a-col>
<a-col :span="12" style="margin-top: -10px;text-align:right;">报修状态
<span v-if="item.maintainStatus==0">正常</span>
<span v-if="item.maintainStatus==1">维修中</span>
<span v-if="item.maintainStatus==2">报废</span>
</a-col>
<a-col :span="12" >{{item.nuId_dictText?item.nuId_dictText:'未配置'}}</a-col>
<a-row style="margin-top:-20px;">
<!-- <a-col :span="12" ><span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID: {{item.nuId?item.nuId:'未配置'}}</span></a-col>
<a-col :span="12" style="text-align: right;">
<span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID: {{item.nuId?item.nuId:'未配置'}}</span>
</a-col>
<a-col :span="24" style="padding: 12px 0 0 5px;margin-top:28px;">
{{item.nuName?item.nuName:'未配置'}}
</a-col> -->
<a-col :span="24" style="padding: 12px 0 0 5px;margin-top:10px;">
<a-row>
<a-col :span="11" style="text-align: center;">
<span><img src="../../../../assets/iot/a8.png" style="width:25px;margin-top: -15px;" /></span>
<span><img src="../../../../assets/iot/a8.png" style="width:25px;margin-top: -1px;" /></span>
<span style="font-size: 30px;font-weight:700;">{{item.temperature?item.temperature:'-'}}</span>
<span style="font-size: 16px;"></span>
</a-col>
@ -219,9 +224,16 @@
</a-col>
</a-row>
</a-col>
<a-col :span="12" style="margin-top: 20px;"><a-tag color="green">温湿度计</a-tag></a-col>
<a-col :span="12" style="margin-top: 10px;text-align:right;">
<span v-if="item.maintainStatus==0" style="font-weight:700;font-size:16px;">正常</span>
<span v-if="item.maintainStatus==1" style="font-weight:700;font-size:16px;color:red;">维修中</span>
<span v-if="item.maintainStatus==2" style="font-weight:700;font-size:16px;">报废</span>
<div style="font-size: 12px;color: #9d9d9d;margin-top:-5px">报修状态</div>
</a-col>
</a-row>
<a-divider />
<p style="text-align:center;">
<a-divider style="margin: 10px 0 20px 0" />
<p style="text-align:center;margin-bottom:5px !important;">
<span style="display:inline-block;cursor: pointer;" @click="handleWsdjRead(item)">
<span class="tbClass"><img src="../../../../assets/iot/a7.png" style="width:20px;" /></span><br/>
<span class="antTitle">抄表</span>
@ -455,7 +467,7 @@ function getWsdj(record){
//
async function handleSbControlLz(record) {
if(record.relayState == '0'){
if(record.relayState == '1'){
Modal.info({
title: '开阀',
content: h('div', {}, [
@ -478,7 +490,7 @@ function getWsdj(record){
//
async function handleSbControlHz(record) {
if(record.relayState == '1'){
if(record.relayState == '0'){
Modal.info({
title: '关阀',
content: h('div', {}, [
@ -604,18 +616,24 @@ defineExpose({
font-size:14px;
background: linear-gradient(to right, #1ea0fa, #017de9);
border-radius: 8px;
height: 35px;
height: 25px;
color: white;
line-height: 35px;
line-height: 25px;
text-align: center;
width:50px;
margin-top:11px;
}
.lxClass{
font-size:14px;
background: linear-gradient(to right, #cccccc, #cccccc);
border-radius: 8px;
height: 35px;
height: 25px;
color: white;
line-height: 35px;
line-height: 25px;
text-align: center;
width:50px;
margin-top:11px;
}
.tbClass{
background: #f6f6f6;
@ -623,7 +641,7 @@ defineExpose({
border-radius: 5px;
}
.antTitle{
margin-top: 10px;
margin-top: 8px;
display: block;
font-size: 12px;
}

View File

@ -1,7 +1,13 @@
<template>
<j-modal :title="title" :width="width" :maxHeight="`200px`" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<!-- <j-modal :title="title" :width="width" :maxHeight="`200px`" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"> -->
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true" bodyStyle="padding:14px;"
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
<BaseWlsbListForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></BaseWlsbListForm>
</j-modal>
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
</template>
</a-drawer>
<!-- </j-modal> -->
</template>
<script lang="ts" setup>

View File

@ -7,7 +7,7 @@
<a-row>
<a-col :span="24" style="margin-top: 60px;margin-bottom: 60px;">
<a-form-item label="区域名称" v-bind="validateInfos.nuName" id="NuBaseInfoForm-nuName" name="nuName">
<a-input v-model:value="formData.nuName" placeholder="请输入区域名称" allow-clear></a-input>
<a-input v-model:value="formData.nuName" placeholder="请输入区域名称" maxLength="15" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="24" hidden>
@ -64,6 +64,7 @@ const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const confirmLoading = ref<boolean>(false);
//
const validatorRules = reactive({
nuName: [{ required: true, message: '请输入文件类型!' },],
});
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });

View File

@ -1,7 +1,14 @@
<template>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<!-- <j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"> -->
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true" bodyStyle="padding:14px;"
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
<NuBaseInfoForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></NuBaseInfoForm>
</j-modal>
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
</template>
</a-drawer>
<!-- </j-modal> -->
</template>
<script lang="ts" setup>

View File

@ -5,29 +5,6 @@
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol"
:wrapper-col="wrapperCol">
<a-row :gutter="24">
<!-- <a-col :lg="6">
<a-form-item name="categoryId">
<template #label><span title="一级分类">一级分类</span></template>
<j-dict-select-tag type='list' placeholder="请选择一级分类" v-model:value="queryParam.categoryId"
dictCode="nu_config_material_category,category_name,id,iz_enabled = 0 and del_flag = 0" allow-clear />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="typeId">
<template #label><span title="二级分类">二级分类</span></template>
<j-dict-select-tag type='list' placeholder="请选择二级分类" v-model:value="queryParam.typeId"
:dictCode="`nu_config_material_type,type_name,id,iz_enabled = 0 and del_flag = 0 and category_id = ${queryParam.categoryId || -1}`"
allow-clear />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="medicationId">
<template #label><span title="三级分类">三级分类</span></template>
<j-dict-select-tag type='list' placeholder="请选择三级分类" v-model:value="queryParam.medicationId"
:dictCode="`config_material_medication,medication_name,id,iz_enabled = 0 and del_flag = 0 and type_id = ${queryParam.typeId || -1}`"
allow-clear />
</a-form-item>
</a-col> -->
<a-col :lg="5">
<a-form-item name="materialName">
<template #label><span title="货品名称">货品名称</span></template>
@ -68,7 +45,7 @@
<div>
<div style="width:300px;float: left;">
<div class="container-height"
style="background: white; border-radius: 8px; padding: 8px; margin-right: 18px; overflow-y: auto;">
style="background: white; border-radius: 8px; padding: 8px; margin-right: 14px; overflow-y: auto;">
<div style="width: 100%;height: 40px;">
<div style="text-align: right;float: right;">
<a-radio-group v-model:value="treeParam.izEnabled" @change="getTreeData">

View File

@ -39,17 +39,7 @@
<a-input v-model:value="formData.salesUnitPrice" placeholder="请输入销售单价" maxlength="10" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="参考单价" v-bind="validateInfos.referenceUnitPrice" id="ConfigMaterialInfoForm-referenceUnitPrice" name="referenceUnitPrice">
<a-input v-model:value="formData.referenceUnitPrice" placeholder="请输入参考单价" maxlength="10" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="货品单位" v-bind="validateInfos.materialUnits" id="ConfigMaterialInfoForm-materialUnits" name="materialUnits">
<a-input v-model:value="formData.materialUnits" placeholder="请输入货品单位" maxlength="10" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-col :span="8" hidden>
<a-form-item label="多单位开关" v-bind="validateInfos.multiUnitSwitch" id="ConfigMaterialInfoForm-multiUnitSwitch" name="multiUnitSwitch">
<j-dict-select-tag type='radio' v-model:value="formData.multiUnitSwitch" dictCode="multiUnitSwitch" placeholder="请选择多单位开关" allow-clear />
</a-form-item>
@ -64,42 +54,57 @@
<j-dict-select-tag type='radio' v-model:value="formData.izEnabled" dictCode="iz_enabled" placeholder="请选择是否启用" allow-clear />
</a-form-item>
</a-col>
<a-col :span="8" v-if="formData.multiUnitSwitch == '1'">
<a-form-item label="二级单位" v-bind="validateInfos.oneUnit" id="ConfigMaterialInfoForm-oneUnit" name="oneUnit">
<a-input v-model:value="formData.oneUnit" placeholder="请输入二级单位" maxlength="10" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :span="8" v-if="formData.multiUnitSwitch == '1'">
<a-form-item label="二级单位兑换比例" v-bind="validateInfos.oneUnitProportion" id="ConfigMaterialInfoForm-oneUnitProportion" name="oneUnitProportion">
<a-input-number v-model:value="formData.oneUnitProportion" maxlength="10" placeholder="请输入二级单位兑换比例" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="8" v-if="formData.multiUnitSwitch == '1'">
<a-form-item label="二级单位价格" v-bind="validateInfos.oneUnitPrice" id="ConfigMaterialInfoForm-oneUnitPrice" name="oneUnitPrice">
<a-input-number v-model:value="formData.oneUnitPrice" maxlength="10" placeholder="请输入二级单位价格" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="8" v-if="formData.multiUnitSwitch == '1'">
<a-col :span="8" v-if="formData.multiUnitType == '1'">
<a-form-item label="一级单位" v-bind="validateInfos.twoUnit" id="ConfigMaterialInfoForm-twoUnit" name="twoUnit">
<a-input v-model:value="formData.twoUnit" placeholder="请输入一级单位" maxlength="10" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :span="8" v-if="formData.multiUnitSwitch == '1'">
<a-col :span="8" v-if="formData.multiUnitType == '1'">
<a-form-item label="一级单位兑换比例" v-bind="validateInfos.twoUnitProportion" id="ConfigMaterialInfoForm-twoUnitProportion" name="twoUnitProportion">
<a-input-number v-model:value="formData.twoUnitProportion" maxlength="10" placeholder="请输入一级单位兑换比例" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="8" v-if="formData.multiUnitSwitch == '1'">
<a-col :span="8" v-if="formData.multiUnitType == '1'">
<a-form-item label="一级单位价格" v-bind="validateInfos.twoUnitPrice" id="ConfigMaterialInfoForm-twoUnitPrice" name="twoUnitPrice">
<a-input-number v-model:value="formData.twoUnitPrice" maxlength="10" placeholder="请输入一级单位价格" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="8" v-if="formData.multiUnitType == '1' || formData.multiUnitType == '2'">
<a-form-item label="二级单位" v-bind="validateInfos.oneUnit" id="ConfigMaterialInfoForm-oneUnit" name="oneUnit">
<a-input v-model:value="formData.oneUnit" placeholder="请输入二级单位" maxlength="10" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :span="8" v-if="formData.multiUnitType == '1' || formData.multiUnitType == '2'">
<a-form-item label="二级单位兑换比例" v-bind="validateInfos.oneUnitProportion" id="ConfigMaterialInfoForm-oneUnitProportion" name="oneUnitProportion">
<a-input-number v-model:value="formData.oneUnitProportion" maxlength="10" placeholder="请输入二级单位兑换比例" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="8" v-if="formData.multiUnitType == '1' || formData.multiUnitType == '2'">
<a-form-item label="二级单位价格" v-bind="validateInfos.oneUnitPrice" id="ConfigMaterialInfoForm-oneUnitPrice" name="oneUnitPrice">
<a-input-number v-model:value="formData.oneUnitPrice" maxlength="10" placeholder="请输入二级单位价格" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="三级单位" v-bind="validateInfos.materialUnits" id="ConfigMaterialInfoForm-materialUnits" name="materialUnits">
<a-input v-model:value="formData.materialUnits" placeholder="请输入货品单位" maxlength="10" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="三级单位兑换比例" v-bind="validateInfos.sdwdhbl" id="ConfigMaterialInfoForm-sdwdhbl" name="sdwdhbl">
<a-input-number v-model:value="formData.sdwdhbl" maxlength="10" readonly placeholder="请输入二级单位兑换比例" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="三级单位价格" v-bind="validateInfos.referenceUnitPrice" id="ConfigMaterialInfoForm-referenceUnitPrice" name="referenceUnitPrice">
<a-input v-model:value="formData.referenceUnitPrice" placeholder="请输入参考单价" maxlength="10" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="8" hidden>
<a-form-item label="物料上限" v-bind="validateInfos.upperLimit" id="ConfigMaterialInfoForm-upperLimit" name="upperLimit">
<a-input v-model:value="formData.upperLimit" maxlength="10" placeholder="请输入物料上限" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-col :span="8" hidden>
<a-form-item label="物料下限" v-bind="validateInfos.lowerLimit" id="ConfigMaterialInfoForm-lowerLimit" name="lowerLimit">
<a-input v-model:value="formData.lowerLimit" maxlength="10" placeholder="请输入物料下限" style="width: 100%" />
</a-form-item>
@ -157,20 +162,21 @@
salesUnitPrice: undefined,
referenceUnitPrice: undefined,
materialUnits: '',
multiUnitSwitch: '2',
multiUnitSwitch: '1',
oneUnit: '',
oneUnitProportion: undefined,
oneUnitPrice: undefined,
twoUnit: '',
twoUnitProportion: undefined,
twoUnitPrice: undefined,
multiUnitType: '0',
multiUnitType: '3',
izEnabled: '0',
suppliers: '',
materialImg: '',
materialIdent: '',
upperLimit: undefined,
lowerLimit: undefined,
sdwdhbl:'1'
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 9 } });

View File

@ -6,12 +6,12 @@
<a-row>
<a-col :span="24" v-if="showDictSelect">
<a-form-item label="一级分类" v-bind="validateInfos.categoryId" id="ConfigMaterialMedicationForm-categoryId" name="categoryId">
<j-dict-select-tag type='radio' v-model:value="formData.categoryId" dictCode="nu_config_material_category,category_name,id,iz_enabled = 0 and del_flag = 0" placeholder="请选择一级分类" allow-clear/>
<j-dict-select-tag type='list' v-model:value="formData.categoryId" dictCode="nu_config_material_category,category_name,id,iz_enabled = 0 and del_flag = 0" placeholder="请选择一级分类" allow-clear/>
</a-form-item>
</a-col>
<a-col :span="24" v-if="showDictSelect">
<a-form-item label="二级分类" v-bind="validateInfos.typeId" id="ConfigMaterialMedicationForm-typeId" name="typeId">
<j-dict-select-tag type='radio' v-model:value="formData.typeId" :dictCode="`nu_config_material_type,type_name,id,iz_enabled = 0 and del_flag = 0 and category_id = ${formData.categoryId || -1}`" placeholder="请选择二级分类" allow-clear/>
<j-dict-select-tag type='list' v-model:value="formData.typeId" :dictCode="`nu_config_material_type,type_name,id,iz_enabled = 0 and del_flag = 0 and category_id = ${formData.categoryId || -1}`" placeholder="请选择二级分类" allow-clear/>
</a-form-item>
</a-col>
<a-col :span="24">

View File

@ -6,7 +6,7 @@
<a-row>
<a-col :span="24" v-if="showDictSelect">
<a-form-item label="一级分类" v-bind="validateInfos.categoryId" id="ConfigMaterialTypeForm-categoryId" name="categoryId">
<j-dict-select-tag type='radio' v-model:value="formData.categoryId" dictCode="nu_config_material_category,category_name,id,iz_enabled = 0 and del_flag = 0" placeholder="请选择一级分类" allow-clear/>
<j-dict-select-tag type='list' v-model:value="formData.categoryId" dictCode="nu_config_material_category,category_name,id,iz_enabled = 0 and del_flag = 0" placeholder="请选择一级分类" allow-clear/>
</a-form-item>
</a-col>
<a-col :span="24">

View File

@ -16,12 +16,12 @@
</a-col>
<a-col :span="24" >
<a-form-item label="二级分类" v-bind="validateInfos.typeId" id="ConfigMaterialInfoForm-typeId" name="typeId">
<j-dict-select-tag type='radio' v-model:value="formData.typeId" :dictCode="`nu_config_material_type,type_name,id,category_id = ${formData.categoryId || -1} and iz_enabled = 0 and del_flag = 0 `" placeholder="请选择二级分类" @change="formData.medicationId = null" allow-clear />
<j-dict-select-tag type='radio' v-model:value="formData.typeId" :dictCode="`nu_config_material_type,type_name,id,category_id = '${formData.categoryId || -1}' and iz_enabled = 0 and del_flag = 0 `" placeholder="请选择二级分类" @change="formData.medicationId = null" allow-clear />
</a-form-item>
</a-col>
<a-col :span="24" >
<a-form-item label="三级分类" v-bind="validateInfos.medicationId" id="ConfigMaterialInfoForm-medicationId" name="medicationId">
<j-dict-select-tag type='radio' v-model:value="formData.medicationId" :dictCode="`nu_config_material_medication,medication_name,id,type_id = ${formData.typeId || -1} and iz_enabled = 0 and del_flag = 0`" placeholder="请选择三级分类" allow-clear />
<j-dict-select-tag type='radio' v-model:value="formData.medicationId" :dictCode="`nu_config_material_medication,medication_name,id,type_id = '${formData.typeId || -1}' and iz_enabled = 0 and del_flag = 0`" placeholder="请选择三级分类" allow-clear />
</a-form-item>
</a-col>

View File

@ -37,7 +37,7 @@
* @param record
*/
function edit(record) {
title.value = disableSubmit.value ? '详情' : '编辑';
title.value = disableSubmit.value ? '详情' : '迁移';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record);

View File

@ -82,6 +82,12 @@ export const formSchema: FormSchema[] = [
// }
dynamicDisabled: true
},
{
label: 'SN',
field: 'sn',
component: 'Input',
dynamicDisabled: true
},
{
label: '设备名称',
field: 'deviceName',
@ -119,12 +125,14 @@ export const formSchema: FormSchema[] = [
label: '区域名称',
field: 'regionName',
component: 'Input',
ifShow: false,
dynamicDisabled: true
},
{
label: '父设备名称',
field: 'parentDeviceName',
component: 'Input',
ifShow: false,
dynamicDisabled: true
},
{
@ -137,23 +145,26 @@ export const formSchema: FormSchema[] = [
label: '项目名称',
field: 'projectName',
component: 'Input',
ifShow: false,
dynamicDisabled: true
},
{
label: '位置名称',
field: 'locationName',
component: 'Input',
ifShow: false,
dynamicDisabled: true
},
{
label: '区域',
field: 'nuId',
component: 'JSelectNu',
componentProps: {
rowKey: 'nuId',
labelKey: 'nuName',
selectType: true,
},
component: 'Input',
dynamicDisabled: true,
// componentProps: {
// rowKey: 'nuId',
// labelKey: 'nuName',
// selectType: true,
// },
},
{
label: '设备重启',

View File

@ -1,5 +1,5 @@
<template>
<div class="p-2">
<div style="padding: 4px;">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
@ -23,21 +23,35 @@
</a-row>
</a-form>
</div>
<a-row>
<a-col v-for="(item,index) in tableData.records" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" style="padding: 8px;">
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '60px', padding: '0 24px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }">
<a-row style="margin-top: -20px;">
<a-col v-for="(item,index) in tableData.records" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" style="padding: 8px 6px 6px 8px;">
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '70px', padding: '0 24px',border:'0px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }">
<template #title>
<a-row style="font-weight: normal;">
<a-col :span="18" style="font-size: 14px;">
<div style="font-size: 12px;">设备名称<span style="font-weight: bold;">{{item.deviceName}}</span></div>
<div style="font-size: 12px;">区域名称{{item.regionName?item.regionName:'未配置'}}</div>
<a-col :span="18" >
<div style="font-size: 14px;">SN<span style="font-weight: bold;">{{item.sn?item.sn:'未配置'}}</span></div>
<div style="font-size: 12px;">设备名称{{item.deviceName}}</div>
</a-col>
<a-col :span="6" style="text-align: center;padding-top: 4px;">
<a-col :span="6" style="display: flex; justify-content: flex-end;">
<div :class="item.deviceStatus=='1'?'zxClass':'lxClass'">{{item.deviceStatus =='1'?'在线':'离线'}}</div>
</a-col>
<a-col :span="24">
<a-divider style="margin: 10px 0 0 0" />
</a-col>
</a-row>
</template>
<p style="text-align:center;margin-top: 15px;">
<a-row style="margin-top:-10px;">
<a-col :span="12" style="margin-top: -10px;font-size:12px">{{item.nuId_dictText?item.nuId_dictText:'未配置'}}</a-col>
<a-col :span="12" style="text-align: right;margin-top: -10px;font-size:12px">
<span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID: {{item.nuId?item.nuId:'未配置'}}</span>
</a-col>
<a-col :span="24" style="text-align: center;font-size: 44px;font-weight: bold;margin-top:18px;">
<img src="../../../../../assets/iot/sxt.png" style="width:80px;" />
</a-col>
</a-row>
<a-divider />
<p style="text-align:center;">
<span style="display:inline-block;cursor: pointer;" @click="handlePreview(item)">
<span class="tbClass"><img src="../../../../../assets/iot/a14.png" style="width:20px;" /></span><br/>
<span class="antTitle">预览</span>
@ -46,19 +60,12 @@
<span class="tbClass"><img src="../../../../../assets/iot/a13.png" style="width:20px;" /></span><br/>
<span class="antTitle">编辑</span>
</span>
<span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handlePicConfig(item)">
<!-- <span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handlePicConfig(item)">
<span class="tbClass"><img src="../../../../../assets/iot/a12.png" style="width:20px;" /></span><br/>
<span class="antTitle">画面配置</span>
</span>
</span> -->
</p>
<a-divider />
<a-row>
<a-col :span="12" style="margin-top: -10px;margin-bottom: 10px;">{{item.nuId_dictText?item.nuId_dictText:'未配置'}}</a-col>
<a-col :span="12" style="text-align: right;margin-top: -10px;">
<span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID: {{item.nuId?item.nuId:'未配置'}}</span>
</a-col>
</a-row>
</a-card>
</a-col>
<a-col v-if="tableData.total==0" >
@ -235,18 +242,24 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
font-size:14px;
background: linear-gradient(to right, #1ea0fa, #017de9);
border-radius: 8px;
height: 35px;
height: 25px;
color: white;
line-height: 35px;
line-height: 25px;
text-align: center;
width:50px;
margin-top:11px;
}
.lxClass{
font-size:14px;
background: linear-gradient(to right, #cccccc, #cccccc);
border-radius: 8px;
height: 35px;
height: 25px;
color: white;
line-height: 35px;
line-height: 25px;
text-align: center;
width:50px;
margin-top:11px;
}
.tbClass{
background: #f6f6f6;

View File

@ -0,0 +1,455 @@
<template>
<a-spin :spinning="confirmLoading">
<a-row>
<a-col :span="24">
<div id="video-container-preview"></div>
</a-col>
<a-col :span="20">
<a-col :span="24" style="padding: 5px;">
<span style="margin-left: 5px;" v-show="!izPlaying">
<a-button preIcon="ant-design:play-circle-outlined" @click="play">播放</a-button>
</span>
<span style="margin-left: 5px;" v-show="izPlaying">
<a-button preIcon="ant-design:pause-circle-outlined" @click="pause">暂停</a-button>
</span>
<span style="margin-left: 5px;">
<a-button preIcon="ant-design:swap-outlined" @click="switchResolution">{{ resolution }}</a-button>
</span>
<!-- <span style="margin-left: 5px;">
<a-button preIcon="ant-design:phone-outlined" @click="screenshot">巡航*</a-button>
</span>-->
<span style="margin-left: 5px;" v-show="!izPhone">
<a-button preIcon="ant-design:phone-outlined" @click="startPhone">电话</a-button>
</span>
<span style="margin-left: 5px;" v-show="izPhone">
<a-button type="primary" danger ghost preIcon="ant-design:phone-outlined" @click="stopPhone">电话</a-button>
</span>
<span style="margin-left: 15px;">分屏
<a-select
ref="select"
v-model:value="fishEyeDisplayMode"
style="width: 120px"
@focus="focus"
@change="setFishEyeDisplayMode"
>
<a-select-option value="ORIGIN">原图</a-select-option>
<a-select-option value="FISHEYE_360D">360全景</a-select-option>
<a-select-option value="FISHEYE_180D">180全景</a-select-option>
<a-select-option value="FISHEYE_WIN_PLANE_TOP_QUAD">四分屏</a-select-option>
<a-select-option value="FISHEYE_LONGITUDE">全景拉伸</a-select-option>
</a-select>
</span>
</a-col>
<a-col :span="24" style="padding: 5px;">
<span style="margin-left: 5px;">
<a-button preIcon="ant-design:picture-outlined" @click="screenshot">截图</a-button>
</span>
<span style="margin-left: 5px;" v-show="!izRecording">
<a-button preIcon="ant-design:video-camera-outlined" @click="recordingStart">录制</a-button>
</span>
<span style="margin-left: 5px;" v-show="izRecording">
<a-button type="primary" danger ghost preIcon="ant-design:video-camera-outlined" @click="recordingEnd">录制</a-button>
</span>
<span style="margin-left: 15px;">画面翻转
<a-select v-model:value="formData.flip_type" @change="(value) => changeSwitch('flip_type', value)">
<a-select-option value="off">关闭</a-select-option>
<a-select-option value="left_and_right">左右</a-select-option>
<a-select-option value="up_and_down">上下</a-select-option>
<a-select-option value="center">中心</a-select-option>
</a-select>
</span>
<span style="margin-left: 5px;">
<a-button preIcon="ant-design:alert-outlined" @click="manualAlarm">报警</a-button>
</span>
</a-col>
<a-col :span="24" style="padding: 5px;">
<span style="margin-left: 5px;">
变焦
</span>
<span style="margin-left: 5px;">
<a-button preIcon="ant-design:zoom-out-outlined" @mousedown="moveCtrl(9,1,1)" @mouseup="moveCtrl(9,0,1)" title="缩小">缩小</a-button>
</span>
<span style="margin-left: 5px;">
<a-button preIcon="ant-design:zoom-in-outlined" @mousedown="moveCtrl(10,1,1)" @mouseup="moveCtrl(10,0,1)" title="放大">放大</a-button>
</span>
<span style="margin-left: 5px;">
<a-button preIcon="ant-design:zoom-out-outlined" @mousedown="moveCtrl(11,1,1)" @mouseup="moveCtrl(11,0,1)">对近焦</a-button>
</span>
<span style="margin-left: 5px;">
<a-button preIcon="ant-design:zoom-in-outlined" @mousedown="moveCtrl(11,1,1)" @mouseup="moveCtrl(11,0,1)">对远焦</a-button>
</span>
</a-col>
</a-col>
<a-col :span="4" v-show="formData.ptz == '1'">
<table style="width: 96px;height:96px;margin: 5px 0px 5px 0px;">
<tbody>
<tr>
<td></td>
<td><a-button preIcon="ant-design:caret-up-outlined" @mousedown="moveCtrl(1,1,1)" @mouseup="moveCtrl(1,0,1)"></a-button></td>
<td></td>
</tr>
<tr>
<td><a-button preIcon="ant-design:caret-left-outlined" @mousedown="moveCtrl(3,1,1)" @mouseup="moveCtrl(3,0,1)"></a-button></td>
<td><a-button preIcon="ant-design:compress-outlined"></a-button></td>
<td><a-button preIcon="ant-design:caret-right-outlined" @mousedown="moveCtrl(5,1,1)" @mouseup="moveCtrl(5,0,1)"></a-button></td>
</tr>
<tr>
<td></td>
<td><a-button preIcon="ant-design:caret-down-outlined" @mousedown="moveCtrl(7,1,1)" @mouseup="moveCtrl(7,0,1)"></a-button></td>
<td></td>
</tr>
</tbody>
</table>
</a-col>
</a-row>
</a-spin>
</template>
<script lang="ts" setup>
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage';
import { getValueType } from '/@/utils';
import { Form } from 'ant-design-vue';
import {
getImageCommon,
getMultitransUrl,
getPreviewUrl,
setImageCommon,
testAudio,
motionCtrl
} from "../camera.api";
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({})},
formBpm: { type: Boolean, default: true }
});
const formRef = ref();
const player = ref();
const resolution = ref<string>('流畅');
const izPlaying = ref<boolean>(true);
const izRecording = ref<boolean>(false);
const izPhone = ref<boolean>(false);
const fishEyeDisplayMode = ref<string>('ORIGIN');
const flipType = ref<string>('off');
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
//
deviceIndex: '',//
streamType: 1,// 0 1
//
url: '',//URL
backupUrl: '',//URLIPnull
wsUrl: '',//ws
wssUrl: '',//wss
flip_type: '',// "off"// "left_and_right"// "up_and_down"// "center"//
zoom: 1, //
sliderValue : 1,//
ptz : 0,//
smartCode : 0,//
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const confirmLoading = ref<boolean>(false);
//
const validatorRules = reactive({
});
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
//
const disabled = computed(()=>{
if(props.formBpm === true){
if(props.formData.disabled === false){
return false;
}else{
return true;
}
}
return props.formDisabled;
});
/**
* 详情
*/
async function edit(record) {
await nextTick(() => {
confirmLoading.value=true;
resetFields();
const tmpData = {};
Object.keys(formData).forEach((key) => {
if(record.hasOwnProperty(key)){
tmpData[key] = record[key]
}
})
//
Object.assign(formData, tmpData);
});
createPreview();
getSwitch();
}
/**
* 创建预览
*/
async function createPreview(){
await getPreviewUrl({"deviceIndex":formData.deviceIndex,"streamType":formData.streamType}).then(res=>{
formData.url = res.url;
formData.backupUrl = res.backupUrl;
formData.wsUrl = res.wsUrl;
formData.wssUrl = res.wssUrl;
confirmLoading.value=false;
});
if (player.value){
player.value.destroy().then(() => {
}); //
player.value = null;
}
const TumsPlayer = window['tums-player'].default;
player.value = new TumsPlayer('video-container-preview', {
type: "rtsp", // rtsp
url: formData.url, // , getPreviewUrl
// url: formData.backupUrl, // , getPreviewUrl
socket: formData.wssUrl, // websocket, getPreviewUrl
pluginPath: '/static', // sdkpluginPath
talkEnable: true,
useMultitrans: true,
});
let isPlaying = player.value.isPlaying();
if (!isPlaying) {
if (player.value.isInit) {
player.value.start();
} else {
player.value.play();
}
izPlaying.value = true;
}
}
/**
* 切换超清/流程
*/
function switchResolution(){
if(formData.streamType == 0){
resolution.value = '流畅';
formData.streamType = 1;
}else{
resolution.value = '超清';
formData.streamType = 0;
}
createMessage.info('正在切换至'+resolution.value);
createPreview();
}
/**
* 播放
*/
function play(){
izPlaying.value = true;
player.value.play();
}
/**
* 暂停
*/
function pause(){
izPlaying.value = false;
player.value.pause();
}
/**
* 截屏
*/
function screenshot(){
player.value.screenshot();
}
/**
* 鱼眼画面显示模式
*/
function setFishEyeDisplayMode(){
player.value.setFishEyeDisplayMode(fishEyeDisplayMode.value);
}
/**
* 获取画面翻转
*/
function getSwitch(){
if(formData.deviceIndex==null){
return
}
getImageCommon({
"deviceIndex": formData.deviceIndex,
"type": "switch"
}).then(res=>{
formData.flip_type = res.flip_type; //
});
}
/**
* 画面翻转
*/
function changeSwitch(attr,value){
let param = {};
param[attr] = value;
setImageCommon({
"deviceIndex": formData.deviceIndex,
"type": "switch",
"param": param
}).then(res=>{ });
}
/**
* 手动报警
*/
function manualAlarm(){
let params = {
"deviceIndex": formData.deviceIndex,
"force": 1,
"id": '0'
};
testAudio(params);
}
/**
* 开始录制
*/
function recordingStart(){
izRecording.value = true;
player.value.startRecording({micStream:true}).then((res) => {
// resolve
}).catch((errData) => {
//
// errData.error_code
createMessage.error('录制错误,'+errData.msg);
});
}
/**
* 结束录制
*/
function recordingEnd(){
izRecording.value = false;
let fileName = formData.deviceIndex+'-'+(new Date().getTime());
player.value.stopRecording(fileName, true).then((res) => {
// resolve
}).catch((errData) => {
//
// errData.error_code
createMessage.error('录制错误,'+errData.msg);
});
}
/**
* 开始电话
*/
function startPhone(){
getMultitransUrl({
"videoDevId":formData.deviceIndex
}).then(res=>{
player.value.startVoiceIntercom({
"url": res.url, // url
"wssUrl": res.wssUrl,
"mode": "half_duplex"
});
izPhone.value = true;
});
}
/**
* 结束电话
*/
function stopPhone(){
player.value.stopVoiceIntercom();
izPhone.value = false;
}
/**
* 缩放
*/
function zoomInOut(type){
let delayTime = 6000;
if(type == 'in'){
formData.zoom = formData.zoom+0.4;
if(formData.zoom > 4){
formData.zoom = 4;
}
formData.sliderValue = formData.zoom;
moveCtrl(10,1,1);
if(formData.sliderValue<=2){
delayTime = 0.4*6000;
}else{
delayTime = 0.2*6000;
}
delayExecute(moveCtrl,[10,0,1],delayTime);
}else{
formData.zoom = formData.zoom-0.4;
if(formData.zoom < 1){
formData.zoom = 1;
}
formData.sliderValue = formData.zoom;
moveCtrl(9,1,1);
if(formData.sliderValue<=2){
delayTime = 0.4*6000;
}else{
delayTime = 0.2*6000;
}
delayExecute(moveCtrl,[9,0,1],delayTime);
}
}
/**
* 控制球机
*/
function moveCtrl(direction,startOrNot,speed){
let params = {
"deviceIndex": formData.deviceIndex,
"direction": direction,
"startOrNot": startOrNot,
"speed": speed,
};
motionCtrl(params);
}
function delayExecute(fn, args, delay) {
setTimeout(() => {
fn.apply(this,args) // 使apply
}, delay)
}
/**
* 销毁
*/
function destroy(){
if (player){
player.value.destroy().then(() => {
}); //
player.value = null;
}
}
defineExpose({
edit,
destroy
});
</script>
<style lang="less" scoped>
.antd-modal-form {
padding: 14px;
}
#video-container {
padding: 0px 25px;
width: 600px;
height: 500px;
background: #1a1a1a;
}
</style>

View File

@ -2,10 +2,96 @@
<a-spin :spinning="confirmLoading">
<a-row>
<a-col :span="24">
<div id="video-container-preview"></div>
<div id="video-container-preview" style="min-height: 400px;"></div>
</a-col>
<a-col :span="20">
<a-col :span="24" style="padding: 5px;">
<!-- <a-col :span="24" style="margin-top: -120px;margin-left:40px;" v-show="formData.ptz == '1'"> -->
<a-col :span="24" style="margin-top: -120px;margin-left:40px;" >
<table style="width: 130px;height:96px;margin: 5px 0px 5px 0px;">
<tbody>
<tr>
<td></td>
<td style="width:100px;text-align:center;">
<div class="fxjImgUp" @mousedown="moveCtrl(1,1,1)" @mouseup="moveCtrl(1,0,1)"></div>
</td>
<td></td>
</tr>
<tr>
<td style="width:90px;text-align:center;">
<div class="fxjImgLeft" @mousedown="moveCtrl(3,1,1)" @mouseup="moveCtrl(3,0,1)"></div>
</td>
<td style="width:100px;text-align:center;">
<div class="fxjImgDown" @mousedown="moveCtrl(7,1,1)" @mouseup="moveCtrl(7,0,1)"></div>
</td>
<td style="width:100px;text-align:center;">
<div class="fxjImgRight" @mousedown="moveCtrl(5,1,1)" @mouseup="moveCtrl(5,0,1)"></div>
</td>
</tr>
</tbody>
</table>
</a-col>
<a-col :span="24" style="text-align: center;margin-top: 15px;margin-bottom: 15px;">
<!-- 对讲停止对讲 切换 -->
<!-- <img src="../../../../../assets/iot/monitor_1.png" class="buttonImg"/> -->
<span class="buttonSpan djImg" @click="startPhone" v-show="!izPhone"><span style="margin-left:30px;">对讲</span></span>
<span class="buttonSpan djImg" @click="stopPhone" v-show="izPhone"><span style="margin-left:30px;">结束</span></span>
<!-- 流畅超清 切换 -->
<span class="buttonSpan qxdImg" @click="switchResolution"><span style="margin-left:30px;">{{ resolution }}</span></span>
<!-- 录制结束录制 切换 -->
<span class="buttonSpan lzImg" @click="recordingStart" v-show="!izRecording"><span style="margin-left:30px;">录制</span></span>
<span class="buttonSpan lzImg" @click="recordingEnd" v-show="izRecording"><span style="margin-left:30px;">结束</span></span>
<span class="buttonSpan jtImg" @click="screenshot"><span style="margin-left:30px;">截图</span></span>
<span class="buttonSpan bjImg" @click="manualAlarm"><span style="margin-left:30px;">报警</span></span>
<a-popover >
<template #content>
<div style="text-align: center;">
<div class="selectDiv" @click="setFishEyeDisplayMode('ORIGIN')">原图</div>
<div class="selectDiv" @click="setFishEyeDisplayMode('FISHEYE_360D')">360全景</div>
<div class="selectDiv" @click="setFishEyeDisplayMode('FISHEYE_180D')">180全景</div>
<div class="selectDiv" @click="setFishEyeDisplayMode('FISHEYE_WIN_PLANE_TOP_QUAD')">四分屏</div>
<div class="selectDiv" @click="setFishEyeDisplayMode('FISHEYE_LONGITUDE')">全景拉伸</div>
</div>
</template>
<span class="buttonSpan fpImg"><span style="margin-left:30px;">分屏</span></span>
</a-popover>
<a-popover>
<template #content>
<div style="text-align: center;">
<div class="selectDiv" @click="changeSwitch('flip_type','off')">关闭</div>
<div class="selectDiv" @click="changeSwitch('flip_type','left_and_right')">左右</div>
<div class="selectDiv" @click="changeSwitch('flip_type','up_and_down')">上下</div>
<div class="selectDiv" @click="changeSwitch('flip_type','center')">中心</div>
</div>
</template>
<span class="buttonSpan hmxzImg"><span style="margin-left:30px;">画面旋转</span></span>
</a-popover>
<!-- <a-popover title="变焦">
<template #content>
<div style="line-height: 50px;">
<span style="margin-left: 5px;">
<a-button preIcon="ant-design:zoom-out-outlined" @mousedown="moveCtrl(9,1,1)" @mouseup="moveCtrl(9,0,1)" title="缩小">缩小</a-button>
</span>
<span style="margin-left: 5px;">
<a-button preIcon="ant-design:zoom-in-outlined" @mousedown="moveCtrl(10,1,1)" @mouseup="moveCtrl(10,0,1)" title="放大">放大</a-button>
</span>
<span style="margin-left: 5px;">
<a-button preIcon="ant-design:zoom-out-outlined" @mousedown="moveCtrl(11,1,1)" @mouseup="moveCtrl(11,0,1)">对近焦</a-button>
</span>
<span style="margin-left: 5px;">
<a-button preIcon="ant-design:zoom-in-outlined" @mousedown="moveCtrl(11,1,1)" @mouseup="moveCtrl(11,0,1)">对远焦</a-button>
</span>
</div>
</template>
<span class="buttonSpan">
<img src="../../../../../assets/iot/a1.png" class="buttonImg"/>变焦
</span>
</a-popover> -->
</a-col>
<!-- <a-col :span="24">
<span style="margin-left: 5px;" v-show="!izPlaying">
<a-button preIcon="ant-design:play-circle-outlined" @click="play">播放</a-button>
</span>
@ -15,9 +101,6 @@
<span style="margin-left: 5px;">
<a-button preIcon="ant-design:swap-outlined" @click="switchResolution">{{ resolution }}</a-button>
</span>
<!-- <span style="margin-left: 5px;">
<a-button preIcon="ant-design:phone-outlined" @click="screenshot">巡航*</a-button>
</span>-->
<span style="margin-left: 5px;" v-show="!izPhone">
<a-button preIcon="ant-design:phone-outlined" @click="startPhone">电话</a-button>
</span>
@ -39,8 +122,6 @@
<a-select-option value="FISHEYE_LONGITUDE">全景拉伸</a-select-option>
</a-select>
</span>
</a-col>
<a-col :span="24" style="padding: 5px;">
<span style="margin-left: 5px;">
<a-button preIcon="ant-design:picture-outlined" @click="screenshot">截图</a-button>
</span>
@ -61,8 +142,6 @@
<span style="margin-left: 5px;">
<a-button preIcon="ant-design:alert-outlined" @click="manualAlarm">报警</a-button>
</span>
</a-col>
<a-col :span="24" style="padding: 5px;">
<span style="margin-left: 5px;">
变焦
</span>
@ -78,29 +157,7 @@
<span style="margin-left: 5px;">
<a-button preIcon="ant-design:zoom-in-outlined" @mousedown="moveCtrl(11,1,1)" @mouseup="moveCtrl(11,0,1)">对远焦</a-button>
</span>
</a-col>
</a-col>
<a-col :span="4" v-show="formData.ptz == '1'">
<table style="width: 96px;height:96px;margin: 5px 0px 5px 0px;">
<tbody>
<tr>
<td></td>
<td><a-button preIcon="ant-design:caret-up-outlined" @mousedown="moveCtrl(1,1,1)" @mouseup="moveCtrl(1,0,1)"></a-button></td>
<td></td>
</tr>
<tr>
<td><a-button preIcon="ant-design:caret-left-outlined" @mousedown="moveCtrl(3,1,1)" @mouseup="moveCtrl(3,0,1)"></a-button></td>
<td><a-button preIcon="ant-design:compress-outlined"></a-button></td>
<td><a-button preIcon="ant-design:caret-right-outlined" @mousedown="moveCtrl(5,1,1)" @mouseup="moveCtrl(5,0,1)"></a-button></td>
</tr>
<tr>
<td></td>
<td><a-button preIcon="ant-design:caret-down-outlined" @mousedown="moveCtrl(7,1,1)" @mouseup="moveCtrl(7,0,1)"></a-button></td>
<td></td>
</tr>
</tbody>
</table>
</a-col>
</a-col> -->
</a-row>
</a-spin>
</template>
@ -275,8 +332,8 @@
/**
* 鱼眼画面显示模式
*/
function setFishEyeDisplayMode(){
player.value.setFishEyeDisplayMode(fishEyeDisplayMode.value);
function setFishEyeDisplayMode(value){
player.value.setFishEyeDisplayMode(value);
}
/**
@ -452,4 +509,110 @@
height: 500px;
background: #1a1a1a;
}
.buttonSpan{
display: inline-flex; align-items: flex-end;
margin-left: 20px;
border: 1px solid #f6faff;
padding: 5px 10px;
}
.buttonSpan:hover{
border: 1px solid #1ea0fa;
color: #1ea0fa;
border-radius: 10px;
cursor: pointer;
}
.buttonImg{
width:20px;margin-right:10px;vertical-align: bottom;
}
.fxjImgUp{
width:50px;height: 50px;
margin-right:10px;vertical-align: bottom;
cursor: pointer;
border-radius: 5px;transform: rotate(270deg);
background: url('../../../../../assets/iot/fxj.png') center/contain no-repeat;
}
.fxjImgUp:hover{
background: url('../../../../../assets/iot/fxj_blue.png') center/contain no-repeat;
}
.fxjImgLeft{
width:50px;height: 50px;margin-right:10px;vertical-align: bottom;transform: rotate(180deg);
cursor: pointer;
background: url('../../../../../assets/iot/fxj.png') center/contain no-repeat;
}
.fxjImgLeft:hover{
background: url('../../../../../assets/iot/fxj_blue.png') center/contain no-repeat;
}
.fxjImgDown{
width:50px;height: 50px;margin-right:10px;vertical-align: bottom;transform: rotate(90deg);
cursor: pointer;
background: url('../../../../../assets/iot/fxj.png') center/contain no-repeat;
}
.fxjImgDown:hover{
background: url('../../../../../assets/iot/fxj_blue.png') center/contain no-repeat;
}
.fxjImgRight{
width:50px;height: 50px;margin-right:10px;vertical-align: bottom;
cursor: pointer;
background: url('../../../../../assets/iot/fxj.png') center/contain no-repeat;
}
.fxjImgRight:hover{
background: url('../../../../../assets/iot/fxj_blue.png') center/contain no-repeat;
}
.selectDiv{
text-align: center;
border: 1px solid #f6faff;
padding: 3px 10px;
width: 100px;
margin-top:5px;
}
.selectDiv:hover{
border: 1px solid #a2a3a3;
background: #a2a3a3;
color:white;
border-radius: 10px;
cursor: pointer;
}
.djImg{
background: url('../../../../../assets/iot/monitor_1.png') left/contain no-repeat;
}
.djImg:hover{
background: url('../../../../../assets/iot/monitor_1_1.png') left/contain no-repeat;
}
.qxdImg{
background: url('../../../../../assets/iot/monitor_5.png') left/contain no-repeat;
}
.qxdImg:hover{
background: url('../../../../../assets/iot/monitor_5_1.png') left/contain no-repeat;
}
.lzImg{
background: url('../../../../../assets/iot/monitor_4.png') left/contain no-repeat;
}
.lzImg:hover{
background: url('../../../../../assets/iot/monitor_4_1.png') left/contain no-repeat;
}
.jtImg{
background: url('../../../../../assets/iot/monitor_3.png') left/contain no-repeat;
}
.jtImg:hover{
background: url('../../../../../assets/iot/monitor_3_1.png') left/contain no-repeat;
}
.bjImg{
background: url('../../../../../assets/iot/monitor_8.png') left/contain no-repeat;
}
.bjImg:hover{
background: url('../../../../../assets/iot/monitor_8_1.png') left/contain no-repeat;
}
.fpImg{
background: url('../../../../../assets/iot/monitor_6.png') left/contain no-repeat;
}
.fpImg:hover{
background: url('../../../../../assets/iot/monitor_6_1.png') left/contain no-repeat;
}
.hmxzImg{
background: url('../../../../../assets/iot/monitor_7.png') left/contain no-repeat;
}
.hmxzImg:hover{
background: url('../../../../../assets/iot/monitor_7_1.png') left/contain no-repeat;
}
</style>

View File

@ -1,9 +1,16 @@
<template>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<!-- <j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"> -->
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
<div v-if="showCamera">
<CameraPreviewForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></CameraPreviewForm>
</div>
</j-modal>
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
</template>
</a-drawer>
<!-- </j-modal> -->
</template>
<script lang="ts" setup>
@ -12,7 +19,7 @@
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
const title = ref<string>('');
const width = ref<number>(600);
const width = ref<string>('70%');
const visible = ref<boolean>(false);
const showCamera = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);

View File

@ -1,7 +1,15 @@
<template>
<j-modal :title="title" width="70%" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<!-- <j-modal :title="title" width="70%" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"> -->
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
<DepartUtilsList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></DepartUtilsList>
</j-modal>
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
<!-- <a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button> -->
</template>
</a-drawer>
<!-- </j-modal> -->
</template>
<script lang="ts" setup>
@ -10,7 +18,7 @@
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
const title = ref<string>('');
const width = ref<number>(800);
const width = ref<string>('70%');
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();

View File

@ -1,7 +1,14 @@
<template>
<j-modal :title="title" width="70%" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<!-- <j-modal :title="title" width="70%" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"> -->
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
<WaterApiLogList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></WaterApiLogList>
</j-modal>
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
<!-- <a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button> -->
</template>
</a-drawer>
<!-- </j-modal> -->
</template>
<script lang="ts" setup>
@ -10,7 +17,7 @@
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
const title = ref<string>('');
const width = ref<number>(800);
const width = ref<string>('70%');
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();

View File

@ -1,5 +1,5 @@
<template>
<div class="p-2">
<div style="padding: 4px;">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
@ -23,21 +23,24 @@
</a-row>
</a-form>
</div>
<a-row>
<a-col v-for="(item,index) in tableData.records" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" style="padding: 8px;">
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '60px', padding: '0 24px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }">
<a-row style="margin-top: -18px;">
<a-col v-for="(item,index) in tableData.records" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" style="padding: 8px 6px 6px 8px;">
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '70px', padding: '0 24px',border:'0px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }">
<template #title>
<a-row style="font-weight: normal;">
<a-col :span="18" style="font-size: 14px;">
<div>SN<span style="font-weight: bold;">{{item.address}}</span></div>
<div style="font-size: 12px;">抄表时间{{item.readTime?item.readTime:'未抄表'}}</div>
</a-col>
<a-col :span="6" style="text-align: center;padding-top: 4px;">
<div :class="item.relayState=='1'?'zxClass':'lxClass'">{{item.relayState=='1'?'在线':'离线'}}</div>
<a-col :span="6" style="display: flex; justify-content: flex-end;">
<div :class="item.relayState=='1'?'zxClass':'lxClass'">{{item.relayState=='1'?'合闸':'拉闸'}}</div>
</a-col>
<a-col :span="24">
<a-divider style="margin: 10px 0 0 0" />
</a-col>
</a-row>
</template>
<a-row>
<a-row style="margin-top:-10px;">
<a-col :span="12" style="margin-top: -10px;">{{item.nuId_dictText?item.nuId_dictText:'未配置'}}</a-col>
<a-col :span="12" style="text-align: right;margin-top: -10px;">
<span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID: {{item.nuId?item.nuId:'未配置'}}</span>
@ -56,11 +59,11 @@
<span class="tbClass"><img src="../../../../assets/iot/a1.png" style="width:20px;" /></span><br/>
<span class="antTitle">抄表</span>
</span>
<span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handleControlLz(item)">
<span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handleControlLz(item)" v-if="item.relayState=='1'">
<span class="tbClass"><img src="../../../../assets/iot/a5.png" style="width:20px;" /></span><br/>
<span class="antTitle">拉闸</span>
</span>
<span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handleControlHz(item)">
<span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handleControlHz(item)" v-if="item.relayState=='0'">
<span class="tbClass"><img src="../../../../assets/iot/a2.png" style="width:20px;" /></span><br/>
<span class="antTitle">合闸</span>
</span>
@ -244,18 +247,24 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
font-size:14px;
background: linear-gradient(to right, #1ea0fa, #017de9);
border-radius: 8px;
height: 35px;
height: 25px;
color: white;
line-height: 35px;
line-height: 25px;
text-align: center;
width:50px;
margin-top:11px;
}
.lxClass{
font-size:14px;
background: linear-gradient(to right, #cccccc, #cccccc);
border-radius: 8px;
height: 35px;
height: 25px;
color: white;
line-height: 35px;
line-height: 25px;
text-align: center;
width:50px;
margin-top:11px;
}
.tbClass{
background: #f6f6f6;

View File

@ -1,5 +1,5 @@
<template>
<div class="p-2">
<div style="padding: 4px;">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
@ -23,27 +23,30 @@
</a-row>
</a-form>
</div>
<a-row>
<a-col v-for="(item,index) in tableData.records" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" style="padding: 8px;">
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '60px', padding: '0 24px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }">
<a-row style="margin-top: -18px;">
<a-col v-for="(item,index) in tableData.records" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" style="padding: 8px 6px 6px 8px;">
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '70px', padding: '0 24px',border:'0px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }">
<template #title>
<a-row style="font-weight: normal;">
<a-col :span="18" style="font-size: 14px;">
<div>SN<span style="font-weight: bold;">{{item.address}}</span></div>
<div style="font-size: 12px;">抄表时间{{item.readTime?item.readTime:'未抄表'}}</div>
</a-col>
<a-col :span="6" style="text-align: center;padding-top: 4px;">
<div :class="item.relayState=='1'?'zxClass':'lxClass'">{{item.relayState=='1'?'在线':'离线'}}</div>
<a-col :span="6" style="display: flex; justify-content: flex-end;">
<div :class="item.relayState=='1'?'zxClass':'lxClass'">{{item.relayState=='1'?'开阀':'关阀'}}</div>
</a-col>
<a-col :span="24">
<a-divider style="margin: 10px 0 0 0" />
</a-col>
</a-row>
</template>
<a-row>
<a-row style="margin-top:-10px;">
<a-col :span="12" style="margin-top: -10px;">{{item.nuId_dictText?item.nuId_dictText:'未配置'}}</a-col>
<a-col :span="12" style="text-align: right;margin-top: -10px;">
<span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID: {{item.nuId?item.nuId:'未配置'}}</span>
</a-col>
<a-col :span="14" style="text-align: right;font-size: 44px;font-weight: bold;margin-top:18px;">
<span>{{item.eleValue?item.eleValue:'0.00'}}</span>
<span>{{item.waterValue?item.waterValue:'0.00'}}</span>
</a-col>
<a-col :span="8" style="padding: 12px 0 0 5px;margin-top:18px;">
<div style="font-size: 12px;margin: 8px 0 -5px 2px;"></div>
@ -56,11 +59,11 @@
<span class="tbClass"><img src="../../../../assets/iot/a1.png" style="width:20px;" /></span><br/>
<span class="antTitle">抄表</span>
</span>
<span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handleControlLz(item)">
<span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handleControlLz(item)" v-if="item.relayState=='0'">
<span class="tbClass"><img src="../../../../assets/iot/a10.png" style="width:20px;" /></span><br/>
<span class="antTitle">开阀</span>
</span>
<span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handleControlHz(item)">
<span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handleControlHz(item)" v-if="item.relayState=='1'">
<span class="tbClass"><img src="../../../../assets/iot/a11.png" style="width:20px;" /></span><br/>
<span class="antTitle">关阀</span>
</span>
@ -145,7 +148,7 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
//
async function handleControlLz(record) {
if(record.relayState == '0'){
if(record.relayState == '1'){
Modal.info({
title: '开阀',
content: h('div', {}, [
@ -168,7 +171,7 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
//
async function handleControlHz(record) {
if(record.relayState == '1'){
if(record.relayState == '0'){
Modal.info({
title: '关阀',
content: h('div', {}, [
@ -244,18 +247,24 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
font-size:14px;
background: linear-gradient(to right, #1ea0fa, #017de9);
border-radius: 8px;
height: 35px;
height: 25px;
color: white;
line-height: 35px;
line-height: 25px;
text-align: center;
width:50px;
margin-top:11px;
}
.lxClass{
font-size:14px;
background: linear-gradient(to right, #cccccc, #cccccc);
border-radius: 8px;
height: 35px;
height: 25px;
color: white;
line-height: 35px;
line-height: 25px;
text-align: center;
width:50px;
margin-top:11px;
}
.tbClass{
background: #f6f6f6;

View File

@ -1,7 +1,15 @@
<template>
<j-modal :title="title" width="70%" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<!-- <j-modal :title="title" width="70%" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"> -->
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
<ApiLogAlarmList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ApiLogAlarmList>
</j-modal>
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
<!-- <a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button> -->
</template>
</a-drawer>
<!-- </j-modal> -->
</template>
<script lang="ts" setup>
@ -10,7 +18,7 @@
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
const title = ref<string>('');
const width = ref<number>(800);
const width = ref<string>('70%');
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();

View File

@ -18,7 +18,7 @@
import { useUserStore } from '/@/store/modules/user';
const formRef = ref();
const queryParam = reactive<any>({});
const queryParam = reactive<any>({optType:'read'});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const userStore = useUserStore();

View File

@ -141,7 +141,10 @@ export const formSchema: FormSchema[] = [
field: 'deviceName',
component: 'Input',
required: true,
labelWidth: '160px'
labelWidth: '160px',
componentProps: {
maxlength: 10 // 直接限制输入长度
}
},
{
label: '时区',
@ -172,7 +175,10 @@ export const formSchema: FormSchema[] = [
return values.isUpdate;
},
required: true,
labelWidth: '160px'
labelWidth: '160px',
componentProps: {
maxlength: 2 // 直接限制输入长度
}
},
{
label: '上报间隔(分钟)',
@ -183,7 +189,10 @@ export const formSchema: FormSchema[] = [
return values.isUpdate;
},
required: true,
labelWidth: '160px'
labelWidth: '160px',
componentProps: {
maxlength: 2 // 直接限制输入长度
}
},
{
label: '历史上报时刻(00:00)',
@ -209,7 +218,10 @@ export const formSchema: FormSchema[] = [
return values.isUpdate;
},
required: true,
labelWidth: '160px'
labelWidth: '160px',
componentProps: {
maxlength: 2 // 直接限制输入长度
}
},
{
label: '温度预警-上限',
@ -220,7 +232,10 @@ export const formSchema: FormSchema[] = [
return values.isUpdate;
},
required: true,
labelWidth: '160px'
labelWidth: '160px',
componentProps: {
maxlength: 2 // 直接限制输入长度
}
},
{
label: '温度预警-下限',
@ -231,7 +246,10 @@ export const formSchema: FormSchema[] = [
return values.isUpdate;
},
required: true,
labelWidth: '160px'
labelWidth: '160px',
componentProps: {
maxlength: 2 // 直接限制输入长度
}
},
{
label: '温度缓冲值',
@ -242,7 +260,10 @@ export const formSchema: FormSchema[] = [
return values.isUpdate;
},
required: true,
labelWidth: '160px'
labelWidth: '160px',
componentProps: {
maxlength: 4 // 直接限制输入长度
}
},
{
label: '湿度预警-上限',
@ -253,7 +274,10 @@ export const formSchema: FormSchema[] = [
return values.isUpdate;
},
required: true,
labelWidth: '160px'
labelWidth: '160px',
componentProps: {
maxlength: 2 // 直接限制输入长度
}
},
{
label: '湿度预警-下限',
@ -264,7 +288,10 @@ export const formSchema: FormSchema[] = [
return values.isUpdate;
},
required: true,
labelWidth: '160px'
labelWidth: '160px',
componentProps: {
maxlength: 2 // 直接限制输入长度
}
},
{
label: '湿度缓冲值',
@ -275,7 +302,10 @@ export const formSchema: FormSchema[] = [
return values.isUpdate;
},
required: true,
labelWidth: '160px'
labelWidth: '160px',
componentProps: {
maxlength: 4 // 直接限制输入长度
}
},
{
label: '断电报警开关',

View File

@ -1,5 +1,5 @@
<template>
<div class="p-2">
<div style="padding: 4px;">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
@ -17,27 +17,33 @@
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="reload">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<span class="table-page-search-submitButtons">
<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>
</span>
</a-col>
</a-row>
</a-form>
</div>
<a-row>
<a-col v-for="(item,index) in tableData.records" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" style="padding: 8px;">
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '60px', padding: '0 24px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }">
<a-row style="margin-top: -18px;">
<a-col v-for="(item,index) in tableData.records" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" style="padding: 8px 6px 6px 8px;">
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '70px', padding: '0 24px',border:'0px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }">
<template #title>
<a-row style="font-weight: normal;">
<a-col :span="18" style="font-size: 14px;">
<div>SN<span style="font-weight: bold;">{{item.sn}}</span></div>
<div style="font-size: 12px;">抄表时间{{item.reportingTime?item.reportingTime:'未抄表'}}</div>
</a-col>
<a-col :span="6" style="text-align: center;padding-top: 4px;">
<div :class="item.relayState=='1'?'zxClass':'lxClass'">{{item.status=='1'?'在线':'离线'}}</div>
<a-col :span="6" style="display: flex; justify-content: flex-end;">
<div :class="item.status=='0'?'zxClass':'lxClass'">{{item.status=='0'?'在线':'离线'}}</div>
</a-col>
<a-col :span="24">
<a-divider style="margin: 10px 0 0 0" />
</a-col>
</a-row>
</template>
<a-row>
<a-row style="margin-top:-10px;">
<a-col :span="12" style="margin-top: -10px;">{{item.nuId_dictText?item.nuId_dictText:'未配置'}}</a-col>
<a-col :span="12" style="text-align: right;margin-top: -10px;">
<span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID: {{item.nuId?item.nuId:'未配置'}}</span>
@ -66,10 +72,10 @@
<span class="tbClass"><img src="../../../assets/iot/a7.png" style="width:20px;" /></span><br/>
<span class="antTitle">抄表</span>
</span>
<span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handleEdit(item)">
<!-- <span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handleEdit(item)">
<span class="tbClass"><img src="../../../assets/iot/a6.png" style="width:20px;" /></span><br/>
<span class="antTitle">配置</span>
</span>
</span> -->
<span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="showApiLog(item)">
<span class="tbClass"><img src="../../../assets/iot/a4.png" style="width:20px;" /></span><br/>
<span class="antTitle">日志</span>
@ -201,18 +207,24 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
font-size:14px;
background: linear-gradient(to right, #1ea0fa, #017de9);
border-radius: 8px;
height: 35px;
height: 25px;
color: white;
line-height: 35px;
line-height: 25px;
text-align: center;
width:50px;
margin-top:11px;
}
.lxClass{
font-size:14px;
background: linear-gradient(to right, #cccccc, #cccccc);
border-radius: 8px;
height: 35px;
height: 25px;
color: white;
line-height: 35px;
line-height: 25px;
text-align: center;
width:50px;
margin-top:11px;
}
.tbClass{
background: #f6f6f6;

View File

@ -24,8 +24,8 @@
</a-row>
</a-form>
</div>
<a-row>
<a-col v-for="directive of tableData.records" :key="directive.id" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="4" style="padding: 5px 10px 0 0;height: 200px;">
<a-row style="margin-top: -5px;">
<a-col v-for="directive of tableData.records" :key="directive.id" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="4" style="padding: 5px 14px 0 0;height: 200px;">
<a-row class="cardDivClass">
<a-col :span="24">
<a-row style="padding: 10px">

View File

@ -73,8 +73,7 @@
</a-form>
</div>
<div>
<div
style="width:350px;float: left;height:80vh; background: white; overflow:auto;position: relative;margin-right: 18px;">
<div style="width:350px;float: left;height:80vh; background: white; overflow:auto;position: relative;margin-right: 14px;">
<div
style="position: absolute; top: 8px; right: 8px; z-index: 1; background: white; padding: 0px; border-radius: 4px;">
<a-radio-group v-model:value="filterIzEnabled" @change="searchQuery">
@ -89,7 +88,7 @@
</div>
<a-empty v-if="!treeLoading && treeLoading" />
<a-button v-if="!treeLoading && treeData.length < 1" type="link" class="btnPrivate" @click="addInstruction"
v-show="mainOrgCode == ownOrgCode" preIcon="ant-design:plus-outlined">新增分类标签</a-button>
preIcon="ant-design:plus-outlined">新增分类标签</a-button>
<a-tree class="container-height" style="padding-top: 40px;" v-if="!treeLoading && treeData.length > 0"
:tree-data="treeData" v-model:expandedKeys="expandedKeys" expandAction="click" @select="handleTreeSelect">
<template #title="{ data }">
@ -141,14 +140,8 @@
preIcon="tabler:settings">配置情绪标签</a-button> -->
<!-- <a-button type="primary" class="btnPrivate" @click="handleAdd"
preIcon="ant-design:plus-outlined">新增服务指令</a-button> -->
<a-button type="primary" @click="handleDirectiveMainOpen" v-show="isShowDM"
<a-button type="primary" class="btnPrivate" @click="handleDirectiveMainOpen" v-show="isShowDM"
preIcon="ant-design:profile-outlined">标准指令库</a-button>
<a-button type="primary" preIcon="ant-design:eye-outlined" v-show="ownOrgCode == mainOrgCode"
@click="handleCompare">差异比对</a-button>
<a-button type="primary" preIcon="ant-design:eye-outlined" v-show="ownOrgCode == mainOrgCode"
@click="handleLookNewDirectives">差异指令</a-button>
<!-- <a-button type="primary" @click="handleBatchAdd" preIcon="ant-design:plus-outlined">批量新增</a-button>
<a-button type="primary" @click="onAbnormalListOpen" preIcon="ant-design:edit-twotone">停用指令</a-button> -->
</template>
<!--操作栏-->
<template #action="{ record }">
@ -250,49 +243,6 @@
<EmotionTagList v-if="emotionTagOpen"></EmotionTagList>
</a-drawer> -->
<!-- 差异比对 -->
<a-drawer title="差异比对" width="80vw" :open="compareListOpen" @close="onCompareListClose"
:footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }">
<template #footer>
<a-button type="primary" @click="onCompareListClose" style="margin-right: 10px;">关闭</a-button>
</template>
<CompareDirectiveList ref="compareListRef" v-if="compareListOpen" :ownOrgCode="ownOrgCode" :ownOrgName="ownOrgName">
</CompareDirectiveList>
</a-drawer>
<!-- 批量新增 -->
<a-drawer title="批量新增" width="80vw" :open="batchAddOpen" @close="onBatchAddClose"
:footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }">
<template #footer>
<a-button type="primary" @click="onBatchAddClose" style="margin-right: 10px;">关闭</a-button>
<a-button type="primary" @click="onBatchAddSubmit">确认</a-button>
</template>
<DirectiveMediaList ref="dmRef" :ownOrgCode="ownOrgCode" v-if="batchAddOpen"></DirectiveMediaList>
</a-drawer>
<!-- 停用指令 -->
<a-drawer title="停用指令" width="85vw" :open="abnormalListOpen" @close="onAbnormalListClose"
:footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }">
<template #footer>
<a-button type="primary" @click="onAbnormalListClose" style="margin-right: 10px;">关闭</a-button>
</template>
<AbnormalDirectiveList ref="abnormalListRef" v-if="abnormalListOpen"></AbnormalDirectiveList>
</a-drawer>
<!-- 差异指令 -->
<a-drawer v-model:visible="newDirectiveVisible" title="差异指令" width="85vw" :footer-style="{ textAlign: 'right' }"
:bodyStyle="{ height: '80vh', display: 'flex', flexDirection: 'column', overflow: 'auto' }"
wrapClassName="org-list-modal" @cancel="handleCancelNewDirective">
<template #footer>
<a-button @click="handleCancelNewDirective" type="primary">关闭</a-button>
<!-- <a-button @click="handleAsyncNewDirective" type="primary">同步</a-button> -->
</template>
<div style="padding:0px 8px;">
<CanAddDirectiveList ref="canAddDirectiveRef" :directiveMainOrgInfo="directiveMainOrgInfo"
:existDirectiveIds="existDirectiveIds" @refreshExistIds="refreshDMExistedIds"></CanAddDirectiveList>
</div>
</a-drawer>
<!-- 音频播放 -->
<a-modal v-model:visible="showAudioModal" title="音频播放" :footer="null" @cancel="closeAudioModal"
:bodyStyle="{ padding: '0', maxHeight: '80vh', overflow: 'auto' }" :keyboard="true">
@ -318,11 +268,11 @@
</template>
<script lang="ts" name="serviceDirective-configServiceDirective" setup>
import { ref, reactive, watch, onMounted, computed, nextTick } from 'vue';
import { ref, reactive, watch, onMounted, computed } from 'vue';
import { BasicTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './ConfigServiceDirective.data';
import { list, batchAdd, deleteOne, batchDelete, getImportUrl, getExportUrl, tree } from './ConfigServiceDirective.api';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, tree } from './ConfigServiceDirective.api';
import ConfigServiceDirectiveModal from './components/ConfigServiceDirectiveModal.vue'
import { useUserStore } from '/@/store/modules/user';
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
@ -338,30 +288,16 @@ import { Empty } from 'ant-design-vue';
import InstructionTagModal from '/@/views/services/InstructionTag/components/InstructionTagModal.vue'
import ConfigServiceCategoryModal from '/@/views/services/serviceCategory/components//ConfigServiceCategoryModal.vue'
import ConfigServiceTypeModal from '/@/views/services/serviceType/components//ConfigServiceTypeModal.vue'
import DirectiveMediaList from '/@/views/services/directivemedia/DirectiveMediaList.vue'
import { queryByKey } from '/@/views/admin/sysconfig/SysConfig.api'
import { getOrgInfo } from '@/api/common/api'
import { useMessage } from '/@/hooks/web/useMessage';
import AbnormalDirectiveList from './components/AbnormalDirectiveList.vue'
import CompareDirectiveList from './components/CompareDirectiveList.vue'
import { idListByDS } from './ConfigServiceDirective.api';
import CanAddDirectiveList from '/@/views/services/canadddirective/CanAddDirectiveList.vue'
const { createMessage, createConfirm } = useMessage();
const canAddDirectiveRef = ref()
const existDirectiveIds = ref([])//id
const insRegisterModal = ref();
const catRegisterModal = ref();
const typRegisterModal = ref();
const simpleImage = Empty.PRESENTED_IMAGE_SIMPLE;
const formRef = ref();
const batchAddOpen = ref(false)
const dmRef = ref()
const abnormalListOpen = ref(false)
const abnormalListRef = ref()
const newDirectiveVisible = ref(false)
const compareListRef = ref()
const compareListOpen = ref(false)
const queryParam = reactive<any>({
instructionTagId: '',
categoryId: '',
@ -445,10 +381,17 @@ const typeOpen = ref(false)//服务类型抽屉
const bodyTagOpen = ref(false)//
const emotionTagOpen = ref(false)//
const mainOrgCode = ref()//
const ownOrgCode = ref('') //
const ownOrgName = ref('') //
const filterIzEnabled = ref('enabled')///
const directiveMainOrgInfo = ref()
/**
* 高级查询事件
*/
function handleSuperQuery(params) {
Object.keys(params).map((k) => {
queryParam[k] = params[k];
});
searchQuery();
}
/**
* 新增事件
@ -571,12 +514,9 @@ function searchQuery(reloadTree = true, resetId = true) {
} else {
queryParam.izEnabled = ''
}
reload().then(async res => {
reload().then(() => {
if (reloadTree) {
await initTree();
}
if (res.length == 1) {
expandTreeNodeToLevel4(res[0])
initTree();
}
})
@ -997,11 +937,8 @@ function emotionTagsDetail(data) {
function menuItems(data) {
if (data.level === 1) {
const items = [
{ key: 'addIns', label: '新增分类标签', icon: 'ant-design:plus-outlined', canAdd: true, action: addInstruction },
]
if (!!mainOrgCode.value && mainOrgCode.value == ownOrgCode.value) {
items.push({ key: 'addIns', label: '新增分类标签', icon: 'ant-design:plus-outlined', canAdd: true && !!mainOrgCode.value && mainOrgCode.value == ownOrgCode.value, action: addInstruction },)
}
if (data.canAdd) {
items.push({ key: 'addCat', label: '新增服务类别', icon: 'ant-design:plus-outlined', canAdd: data.canAdd, action: addCategory })
}
@ -1071,7 +1008,6 @@ function setDefaultExpanded(nodes: any[]) {
// expandedKeys.value.push(nodes[0]?.children?.[0]?.key)
// expandedKeys.value.push(nodes[0]?.children?.[0]?.children?.[0]?.key)
}
const treeLoading = ref(false)
function reloadTree() {
@ -1121,17 +1057,17 @@ function handleTreeSelect(selectedKeys: string[], { node }: any) {
searchQuery(false, level != 4);
}
async function initTree() {
treeLoading.value = true;
try {
const res = await tree({ filterIzEnabled: filterIzEnabled.value });
function initTree() {
treeLoading.value = true
tree({ filterIzEnabled: filterIzEnabled.value }).then(res => {
treeData.value = res;
expandedKeys.value = [];
//
// setDefaultExpanded(res);
} finally {
treeLoading.value = false;
}
expandedKeys.value = []
//
setDefaultExpanded(res)
})
.finally(() => {
treeLoading.value = false
})
}
/**
@ -1142,79 +1078,12 @@ function handleDirectiveMainOpen() {
}
async function getDirectiveMainOrgCode() {
let { orgCode, orgName } = await getOrgInfo()
ownOrgCode.value = orgCode
ownOrgName.value = orgName
let { orgCode } = await getOrgInfo()
let { configValue } = await queryByKey({ key: 'directive_main_org_code' })
mainOrgCode.value = configValue
if (orgCode != configValue) isShowDM.value = true
}
function handleBatchAdd() {
batchAddOpen.value = true
nextTick(() => {
dmRef.value?.init()
})
}
function onBatchAddClose() {
batchAddOpen.value = false
}
function onBatchAddSubmit() {
batchAdd(dmRef.value?.selectedRows).then(res => {
createMessage.success('操作成功')
// filterIzEnabled.value = 'all'
searchQuery(true, true)
onBatchAddClose()
})
}
function onAbnormalListOpen() {
abnormalListOpen.value = true
nextTick(() => {
abnormalListRef.value?.reload()
})
}
function onAbnormalListClose() {
abnormalListOpen.value = false
searchQuery(true, true)
}
//
function refreshDMExistedIds(dmOrgInfo, izReset = false, izQuery = true) {
idListByDS({ dataSourceCode: 'master' }).then(res => {
existDirectiveIds.value = res.records
if (izReset) {
canAddDirectiveRef.value?.searchReset()
} else {
canAddDirectiveRef.value?.reload()
}
})
}
function handleLookNewDirectives() {
newDirectiveVisible.value = true
refreshDMExistedIds(directiveMainOrgInfo.value, true)
}
/**
* 关闭新增指令
*/
function handleCancelNewDirective() {
newDirectiveVisible.value = false
}
/**
* 差异比对
*/
function handleCompare() {
compareListOpen.value = true
}
function onCompareListClose() {
compareListOpen.value = false
}
//
onMounted(() => {
if (audioPlayer.value) {

View File

@ -22,8 +22,8 @@
</a-row>
</a-form>
</div>
<a-row>
<a-col :span="6" v-for="directive of tableData.records" :key="directive.id" style="padding: 5px 10px 0 0;height: 240px;">
<a-row style="margin-top: -5px;">
<a-col v-for="directive of tableData.records" :key="directive.id" style="padding: 7px 14px 3px 0;height: 235px;" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" >
<a-row style="padding: 5px;background-color: white;border-radius: 8px;height: 220px;">
<a-col :span="4">
<div class="bjclass">