This commit is contained in:
1378012178@qq.com 2025-06-30 17:47:19 +08:00
commit fecbc8a3e8
56 changed files with 2520 additions and 885 deletions

View File

@ -15,7 +15,7 @@ enum Api {
getDictItems = '/sys/dict/getDictItems/', getDictItems = '/sys/dict/getDictItems/',
getTableList = '/sys/user/queryUserComponentData', getTableList = '/sys/user/queryUserComponentData',
getCategoryData = '/sys/category/loadAllData', getCategoryData = '/sys/category/loadAllData',
getNuList = '/iot/cameraInfo/nuList',//后期调整 getNuList = '/iot/tplink/cameraInfo/nuList',//后期调整
} }
/** /**

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -4,13 +4,13 @@ import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage(); const { createConfirm } = useMessage();
enum Api { enum Api {
list = '/nuIotTqApiRequestLog/nuIotTqApiRequestLog/list', list = '/configMaterialInfo/configMaterialInfo/list',
save='/nuIotTqApiRequestLog/nuIotTqApiRequestLog/add', save='/configMaterialInfo/configMaterialInfo/add',
edit='/nuIotTqApiRequestLog/nuIotTqApiRequestLog/edit', edit='/configMaterialInfo/configMaterialInfo/edit',
deleteOne = '/nuIotTqApiRequestLog/nuIotTqApiRequestLog/delete', deleteOne = '/configMaterialInfo/configMaterialInfo/delete',
deleteBatch = '/nuIotTqApiRequestLog/nuIotTqApiRequestLog/deleteBatch', deleteBatch = '/configMaterialInfo/configMaterialInfo/deleteBatch',
importExcel = '/nuIotTqApiRequestLog/nuIotTqApiRequestLog/importExcel', importExcel = '/configMaterialInfo/configMaterialInfo/importExcel',
exportXls = '/nuIotTqApiRequestLog/nuIotTqApiRequestLog/exportXls', exportXls = '/configMaterialInfo/configMaterialInfo/exportXls',
} }
/** /**

View File

@ -0,0 +1,109 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '货品名称',
align: "center",
dataIndex: 'materialName'
},
{
title: '货品编码',
align: "center",
dataIndex: 'materialNo',
width:'100px'
},
{
title: '规格型号',
align: "center",
dataIndex: 'specificationModel'
},
{
title: '销售单价',
align: "center",
dataIndex: 'salesUnitPrice',
width:'100px'
},
{
title: '参考单价',
align: "center",
dataIndex: 'referenceUnitPrice',
width:'100px'
},
{
title: '货品单位',
align: "center",
dataIndex: 'materialUnits',
width:'100px'
},
{
title: '供应商',
align: "center",
dataIndex: 'suppliers_dictText',
width:'200px'
},
{
title: '物料类别',
align: "center",
dataIndex: 'categoryId_dictText',
width:'100px'
},
{
title: '物料类型',
align: "center",
dataIndex: 'typeId_dictText',
width:'100px'
},
{
title: '用药类型',
align: "center",
dataIndex: 'medicationId_dictText',
width:'100px'
},
// {
// title: '物料图片',
// align: "center",
// dataIndex: 'materialImg',
// customRender: render.renderImage,
// },
// {
// title: '物料标识',
// align: "center",
// dataIndex: 'materialIdent',
// customRender: render.renderImage,
// },
{
title: '是否启用',
align: "center",
dataIndex: 'izEnabled_dictText',
width:'100px'
},
];
// 高级查询数据
export const superQuerySchema = {
categoryId: {title: '物料类别',order: 0,view: 'radio', type: 'string',dictTable: "nu_config_material_category", dictCode: 'id', dictText: 'category_name',},
typeId: {title: '物料类型',order: 1,view: 'radio', type: 'string',dictTable: "nu_config_material_type", dictCode: 'id', dictText: 'type_name',},
medicationId: {title: '用药类型',order: 2,view: 'radio', type: 'string',dictTable: "nu_config_material_medication", dictCode: 'id', dictText: 'medication_name',},
materialName: {title: '货品名称',order: 3,view: 'text', type: 'string',},
materialNo: {title: '货品编码',order: 4,view: 'text', type: 'string',},
specificationModel: {title: '规格型号',order: 5,view: 'text', type: 'string',},
salesUnitPrice: {title: '销售单价',order: 6,view: 'number', type: 'number',},
referenceUnitPrice: {title: '参考单价',order: 7,view: 'number', type: 'number',},
materialUnits: {title: '货品单位',order: 8,view: 'text', type: 'string',},
multiUnitSwitch: {title: '多单位开关',order: 9,view: 'switch', type: 'string',},
oneUnit: {title: '父级单位',order: 10,view: 'text', type: 'string',},
oneUnitProportion: {title: '父级单位兑换比例',order: 11,view: 'number', type: 'number',},
oneUnitPrice: {title: '父级单位价格',order: 12,view: 'number', type: 'number',},
twoUnit: {title: '爷级单位',order: 13,view: 'text', type: 'string',},
twoUnitProportion: {title: '爷级单位兑换比例',order: 14,view: 'number', type: 'number',},
twoUnitPrice: {title: '爷级单位价格',order: 15,view: 'number', type: 'number',},
multiUnitType: {title: '多单位采购默认使用 0子集 1父级 2爷级',order: 16,view: 'text', type: 'string',},
suppliers: {title: '供应商',order: 17,view: 'text', type: 'string',},
materialImg: {title: '物料图片',order: 18,view: 'image', type: 'string',},
materialIdent: {title: '物料标识',order: 19,view: 'image', type: 'string',},
izEnabled: {title: '是否启用',order: 20,view: 'radio', type: 'string',dictCode: ' iz_enabled',},
};

View File

@ -0,0 +1,302 @@
<template>
<div class="p-2">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<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="materialName">
<template #label><span title="货品名称">货品名称</span></template>
<j-input placeholder="请输入货品名称" v-model:value="queryParam.materialName" allow-clear ></j-input>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="materialNo">
<template #label><span title="货品编码">货品编码</span></template>
<j-input placeholder="请输入货品编码" v-model:value="queryParam.materialNo" allow-clear ></j-input>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="pinyin">
<template #label><span title="拼音检索">拼音检索</span></template>
<j-input placeholder="请输入拼音" v-model:value="queryParam.pinyin" allow-clear ></j-input>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="izEnabled">
<template #label><span title="是否启用">是否启用</span></template>
<j-dict-select-tag type='list' placeholder="请选择是否启用" v-model:value="queryParam.izEnabled" dictCode="iz_enabled" allow-clear />
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" >
<!--插槽:table标题-->
<template #tableTitle>
<div style="padding:10px 0 0 0;">
<a-badge :count="count" style="z-index: 9;" offset="-1">
<a-button type="primary" @click="handleAdd"> 请购车</a-button>
</a-badge>
</div>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" />
</template>
<template v-slot:bodyCell="{ column, record, index, text }">
</template>
</BasicTable>
<!-- 表单区域 -->
<ConfigMaterialInfoModal ref="registerModal" @success="handleSuccess"></ConfigMaterialInfoModal>
</div>
</template>
<script lang="ts" name="configMaterialInfo-configMaterialInfo" setup>
import { ref, reactive,onMounted } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './JxcInfo.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './JxcInfo.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import ConfigMaterialInfoModal from '/@/views/invoicing/ConfigMaterial/components/ConfigMaterialInfoModal.vue'
import { useUserStore } from '/@/store/modules/user';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSwitch from '/@/components/Form/src/jeecg/components/JSwitch.vue';
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
import { JInput } from '/@/components/Form';
import type { TreeProps } from 'ant-design-vue';
import { DownOutlined } from '@ant-design/icons-vue';
import { defHttp } from '/@/utils/http/axios';
import type { CollapseProps } from 'ant-design-vue';
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const userStore = useUserStore();
const count = ref<number>(5);
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '物料信息',
api: list,
columns,
canResize:false,
useSearchForm: false,
showIndexColumn: true,
actionColumn: {
width: 100,
fixed: 'right',
},
beforeFetch: async (params) => {
return Object.assign(params, queryParam);
},
},
exportConfig: {
name: "物料信息",
url: getExportUrl,
params: queryParam,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs:24,
sm:6,
xl:6,
xxl:6
});
const wrapperCol = reactive({
xs: 24,
sm: 20,
});
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '请购',
onClick: handleEdit.bind(null, record),
},
];
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
selectedRowKeys.value = [];
queryParam.treeId = null;
//
reload();
}
//
onMounted(() => {
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help){
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),:deep(.ant-input-number){
width: 100%;
}
}
.all-card {
width: 80px;
height: 730px;
// background-color: rgb(217, 230, 239);
// display: flex;
/* justify-content: flex-end; */
align-items: flex-end;
flex-direction: column;
// padding-top: 10px;
}
.card {
display: flex;
justify-content: center;
align-items: center;
width: 80px;
height: 120px;
flex-direction: column;
background-color: rgb(243, 248, 251);
/* border-radius: 25px; */
}
.card-target {
display: flex;
justify-content: center;
align-items: center;
width: 80px;
height: 120px;
flex-direction: column;
background-color: #fff;
border-top-left-radius: 30px;
border-bottom-left-radius: 30px;
/* position: relative; */
/* border-radius: 10px; */
}
.sanjiao-down {
position: absolute;
bottom: -26px;
left: 17px;
width: 64px;
/* 上边长度 */
height: 27px;
/* 右边长度 */
background-color: #fff;
/* 三角形填充色 */
/* 三点依次为:右上 (100% 0),右下 (100% 100%),左上 (0 0) */
clip-path: polygon(100% 0, 100% 100%, 0 0);
z-index: 999;
}
.sanjiao-up {
position: absolute;
top: -26px;
left: 17px;
width: 64px;
height: 27px;
background-color: #fff;
/* 三点依次为:右下 (100% 100%),左下 (0 100%),右上 (100% 0) */
clip-path: polygon(100% 100%, 0 100%, 100% 0);
z-index: 999;
}
</style>

View File

@ -4,13 +4,13 @@ import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage(); const { createConfirm } = useMessage();
enum Api { enum Api {
list = '/nuIotTqElectricitySyncLog/nuIotTqElectricitySyncLog/list', list = '/nuInvoicingQgdInfo/nuInvoicingQgdInfo/list',
save='/nuIotTqElectricitySyncLog/nuIotTqElectricitySyncLog/add', save='/nuInvoicingQgdInfo/nuInvoicingQgdInfo/add',
edit='/nuIotTqElectricitySyncLog/nuIotTqElectricitySyncLog/edit', edit='/nuInvoicingQgdInfo/nuInvoicingQgdInfo/edit',
deleteOne = '/nuIotTqElectricitySyncLog/nuIotTqElectricitySyncLog/delete', deleteOne = '/nuInvoicingQgdInfo/nuInvoicingQgdInfo/delete',
deleteBatch = '/nuIotTqElectricitySyncLog/nuIotTqElectricitySyncLog/deleteBatch', deleteBatch = '/nuInvoicingQgdInfo/nuInvoicingQgdInfo/deleteBatch',
importExcel = '/nuIotTqElectricitySyncLog/nuIotTqElectricitySyncLog/importExcel', importExcel = '/nuInvoicingQgdInfo/nuInvoicingQgdInfo/importExcel',
exportXls = '/nuIotTqElectricitySyncLog/nuIotTqElectricitySyncLog/exportXls', exportXls = '/nuInvoicingQgdInfo/nuInvoicingQgdInfo/exportXls',
} }
/** /**

View File

@ -0,0 +1,66 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '请购单编号',
align: "center",
dataIndex: 'mainNo'
},
{
title: '物料编码',
align: "center",
dataIndex: 'wlMaterialNo'
},
{
title: '物料名称',
align: "center",
dataIndex: 'wlName'
},
{
title: '采购单位',
align: "center",
dataIndex: 'wlUnits'
},
{
title: '规格型号',
align: "center",
dataIndex: 'wlSpecificationModel'
},
{
title: '上限',
align: "center",
dataIndex: 'wlUpperLimit'
},
{
title: '下限',
align: "center",
dataIndex: 'wlLowerLimit'
},
{
title: '供应商名称',
align: "center",
dataIndex: 'suppliersName'
},
{
title: '请购数量',
align: "center",
dataIndex: 'purchaseQuantity'
},
];
// 高级查询数据
export const superQuerySchema = {
mainNo: {title: '请购单编号',order: 0,view: 'text', type: 'string',},
wlMaterialNo: {title: '物料编码',order: 1,view: 'text', type: 'string',},
wlName: {title: '物料名称',order: 2,view: 'text', type: 'string',},
wlUnits: {title: '采购单位',order: 3,view: 'text', type: 'string',},
wlSpecificationModel: {title: '规格型号',order: 4,view: 'text', type: 'string',},
wlUpperLimit: {title: '上限',order: 5,view: 'text', type: 'string',},
wlLowerLimit: {title: '下限',order: 6,view: 'text', type: 'string',},
suppliersName: {title: '供应商名称',order: 7,view: 'text', type: 'string',},
purchaseQuantity: {title: '请购数量',order: 8,view: 'number', type: 'number',},
};

View File

@ -0,0 +1,235 @@
<template>
<div class="p-2">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" v-auth="'nuInvoicingQgdInfo:nu_invoicing_qgd_info:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" v-auth="'nuInvoicingQgdInfo:nu_invoicing_qgd_info:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" v-auth="'nuInvoicingQgdInfo:nu_invoicing_qgd_info:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button v-auth="'nuInvoicingQgdInfo:nu_invoicing_qgd_info:deleteBatch'">批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
<!-- 高级查询 -->
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<template v-slot:bodyCell="{ column, record, index, text }">
</template>
</BasicTable>
<!-- 表单区域 -->
<NuInvoicingQgdInfoModal ref="registerModal" @success="handleSuccess"></NuInvoicingQgdInfoModal>
</div>
</template>
<script lang="ts" name="nuInvoicingQgdInfo-nuInvoicingQgdInfo" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './NuInvoicingQgdInfo.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './NuInvoicingQgdInfo.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import NuInvoicingQgdInfoModal from './components/NuInvoicingQgdInfoModal.vue'
import { useUserStore } from '/@/store/modules/user';
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const userStore = useUserStore();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '请购单-请购信息',
api: list,
columns,
canResize:false,
useSearchForm: false,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: async (params) => {
return Object.assign(params, queryParam);
},
},
exportConfig: {
name: "请购单-请购信息",
url: getExportUrl,
params: queryParam,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs:24,
sm:4,
xl:6,
xxl:4
});
const wrapperCol = reactive({
xs: 24,
sm: 20,
});
//
const superQueryConfig = reactive(superQuerySchema);
/**
* 高级查询事件
*/
function handleSuperQuery(params) {
Object.keys(params).map((k) => {
queryParam[k] = params[k];
});
searchQuery();
}
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
auth: 'nuInvoicingQgdInfo:nu_invoicing_qgd_info:edit'
},
];
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
placement: 'topLeft',
},
auth: 'nuInvoicingQgdInfo:nu_invoicing_qgd_info:delete'
}
]
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
selectedRowKeys.value = [];
//
reload();
}
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help){
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),:deep(.ant-input-number){
width: 100%;
}
}
</style>

View File

@ -2,46 +2,51 @@
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<JFormContainer :disabled="disabled"> <JFormContainer :disabled="disabled">
<template #detail> <template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="NuIotTqElectricitySyncLogForm"> <a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="NuInvoicingQgdInfoForm">
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="主表名称" v-bind="validateInfos.mainName" id="NuIotTqElectricitySyncLogForm-mainName" name="mainName"> <a-form-item label="请购单编号" v-bind="validateInfos.mainNo" id="NuInvoicingQgdInfoForm-mainNo" name="mainNo">
<a-input v-model:value="formData.mainName" placeholder="请输入主表名称" allow-clear ></a-input> <a-input v-model:value="formData.mainNo" placeholder="请输入请购单编号" allow-clear ></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="同步类型" v-bind="validateInfos.syncType" id="NuIotTqElectricitySyncLogForm-syncType" name="syncType"> <a-form-item label="物料编码" v-bind="validateInfos.wlMaterialNo" id="NuInvoicingQgdInfoForm-wlMaterialNo" name="wlMaterialNo">
<a-input v-model:value="formData.syncType" placeholder="请输入同步类型" allow-clear ></a-input> <a-input v-model:value="formData.wlMaterialNo" placeholder="请输入物料编码" allow-clear ></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="原机构名称" v-bind="validateInfos.orgName" id="NuIotTqElectricitySyncLogForm-orgName" name="orgName"> <a-form-item label="物料名称" v-bind="validateInfos.wlName" id="NuInvoicingQgdInfoForm-wlName" name="wlName">
<a-input v-model:value="formData.orgName" placeholder="请输入原机构名称" allow-clear ></a-input> <a-input v-model:value="formData.wlName" placeholder="请输入物料名称" allow-clear ></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="原机构编码" v-bind="validateInfos.orgCode" id="NuIotTqElectricitySyncLogForm-orgCode" name="orgCode"> <a-form-item label="采购单位" v-bind="validateInfos.wlUnits" id="NuInvoicingQgdInfoForm-wlUnits" name="wlUnits">
<a-input v-model:value="formData.orgCode" placeholder="请输入原机构编码" allow-clear ></a-input> <a-input v-model:value="formData.wlUnits" placeholder="请输入采购单位" allow-clear ></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="新机构名称" v-bind="validateInfos.newOrgName" id="NuIotTqElectricitySyncLogForm-newOrgName" name="newOrgName"> <a-form-item label="规格型号" v-bind="validateInfos.wlSpecificationModel" id="NuInvoicingQgdInfoForm-wlSpecificationModel" name="wlSpecificationModel">
<a-input v-model:value="formData.newOrgName" placeholder="请输入新机构名称" allow-clear ></a-input> <a-input v-model:value="formData.wlSpecificationModel" placeholder="请输入规格型号" allow-clear ></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="新机构编码" v-bind="validateInfos.newOrgCode" id="NuIotTqElectricitySyncLogForm-newOrgCode" name="newOrgCode"> <a-form-item label="上限" v-bind="validateInfos.wlUpperLimit" id="NuInvoicingQgdInfoForm-wlUpperLimit" name="wlUpperLimit">
<a-input v-model:value="formData.newOrgCode" placeholder="请输入新机构编码" allow-clear ></a-input> <a-input v-model:value="formData.wlUpperLimit" placeholder="请输入上限" allow-clear ></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="状态" v-bind="validateInfos.status" id="NuIotTqElectricitySyncLogForm-status" name="status"> <a-form-item label="下限" v-bind="validateInfos.wlLowerLimit" id="NuInvoicingQgdInfoForm-wlLowerLimit" name="wlLowerLimit">
<a-input v-model:value="formData.status" placeholder="请输入状态" allow-clear ></a-input> <a-input v-model:value="formData.wlLowerLimit" placeholder="请输入下限" allow-clear ></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="备注" v-bind="validateInfos.content" id="NuIotTqElectricitySyncLogForm-content" name="content"> <a-form-item label="供应商名称" v-bind="validateInfos.suppliersName" id="NuInvoicingQgdInfoForm-suppliersName" name="suppliersName">
<a-input v-model:value="formData.content" placeholder="请输入备注" allow-clear ></a-input> <a-input v-model:value="formData.suppliersName" placeholder="请输入供应商名称" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="请购数量" v-bind="validateInfos.purchaseQuantity" id="NuInvoicingQgdInfoForm-purchaseQuantity" name="purchaseQuantity">
<a-input-number v-model:value="formData.purchaseQuantity" placeholder="请输入请购数量" style="width: 100%" />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@ -56,7 +61,7 @@
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { getValueType } from '/@/utils'; import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../NuIotTqElectricitySyncLog.api'; import { saveOrUpdate } from '../NuInvoicingQgdInfo.api';
import { Form } from 'ant-design-vue'; import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue'; import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
const props = defineProps({ const props = defineProps({
@ -69,14 +74,15 @@
const emit = defineEmits(['register', 'ok']); const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({ const formData = reactive<Record<string, any>>({
id: '', id: '',
mainName: '', mainNo: '',
syncType: '', wlMaterialNo: '',
orgName: '', wlName: '',
orgCode: '', wlUnits: '',
newOrgName: '', wlSpecificationModel: '',
newOrgCode: '', wlUpperLimit: '',
status: '', wlLowerLimit: '',
content: '', suppliersName: '',
purchaseQuantity: undefined,
}); });
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } }); const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });

View File

@ -1,12 +1,12 @@
<template> <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="关闭">
<NuIotTqElectricitySyncLogForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></NuIotTqElectricitySyncLogForm> <NuInvoicingQgdInfoForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></NuInvoicingQgdInfoForm>
</j-modal> </j-modal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue'; import { ref, nextTick, defineExpose } from 'vue';
import NuIotTqElectricitySyncLogForm from './NuIotTqElectricitySyncLogForm.vue' import NuInvoicingQgdInfoForm from './NuInvoicingQgdInfoForm.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue'; import JModal from '/@/components/Modal/src/JModal/JModal.vue';
const title = ref<string>(''); const title = ref<string>('');

View File

@ -0,0 +1,72 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/nuInvoicingQgdMain/nuInvoicingQgdMain/list',
save='/nuInvoicingQgdMain/nuInvoicingQgdMain/add',
edit='/nuInvoicingQgdMain/nuInvoicingQgdMain/edit',
deleteOne = '/nuInvoicingQgdMain/nuInvoicingQgdMain/delete',
deleteBatch = '/nuInvoicingQgdMain/nuInvoicingQgdMain/deleteBatch',
importExcel = '/nuInvoicingQgdMain/nuInvoicingQgdMain/importExcel',
exportXls = '/nuInvoicingQgdMain/nuInvoicingQgdMain/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
/**
*
* @param params
* @param handleSuccess
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
* @param handleSuccess
*/
export const batchDelete = (params, handleSuccess) => {
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
* @param isUpdate
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}

View File

@ -0,0 +1,24 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '请购单号',
align: "center",
dataIndex: 'qgdNo'
},
{
title: '请购状态 0未下单 1已下单',
align: "center",
dataIndex: 'status'
},
];
// 高级查询数据
export const superQuerySchema = {
qgdNo: {title: '请购单号',order: 0,view: 'number', type: 'number',},
status: {title: '请购状态 0未下单 1已下单',order: 1,view: 'number', type: 'number',},
};

View File

@ -0,0 +1,235 @@
<template>
<div class="p-2">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" v-auth="'nuInvoicingQgdMain:nu_invoicing_qgd_main:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" v-auth="'nuInvoicingQgdMain:nu_invoicing_qgd_main:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" v-auth="'nuInvoicingQgdMain:nu_invoicing_qgd_main:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button v-auth="'nuInvoicingQgdMain:nu_invoicing_qgd_main:deleteBatch'">批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
<!-- 高级查询 -->
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<template v-slot:bodyCell="{ column, record, index, text }">
</template>
</BasicTable>
<!-- 表单区域 -->
<NuInvoicingQgdMainModal ref="registerModal" @success="handleSuccess"></NuInvoicingQgdMainModal>
</div>
</template>
<script lang="ts" name="nuInvoicingQgdMain-nuInvoicingQgdMain" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './NuInvoicingQgdMain.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './NuInvoicingQgdMain.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import NuInvoicingQgdMainModal from './components/NuInvoicingQgdMainModal.vue'
import { useUserStore } from '/@/store/modules/user';
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const userStore = useUserStore();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '请购单',
api: list,
columns,
canResize:false,
useSearchForm: false,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: async (params) => {
return Object.assign(params, queryParam);
},
},
exportConfig: {
name: "请购单",
url: getExportUrl,
params: queryParam,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs:24,
sm:4,
xl:6,
xxl:4
});
const wrapperCol = reactive({
xs: 24,
sm: 20,
});
//
const superQueryConfig = reactive(superQuerySchema);
/**
* 高级查询事件
*/
function handleSuperQuery(params) {
Object.keys(params).map((k) => {
queryParam[k] = params[k];
});
searchQuery();
}
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
auth: 'nuInvoicingQgdMain:nu_invoicing_qgd_main:edit'
},
];
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
placement: 'topLeft',
},
auth: 'nuInvoicingQgdMain:nu_invoicing_qgd_main:delete'
}
]
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
selectedRowKeys.value = [];
//
reload();
}
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help){
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),:deep(.ant-input-number){
width: 100%;
}
}
</style>

View File

@ -0,0 +1,151 @@
<template>
<a-spin :spinning="confirmLoading">
<JFormContainer :disabled="disabled">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="NuInvoicingQgdMainForm">
<a-row>
<a-col :span="24">
<a-form-item label="请购单号" v-bind="validateInfos.qgdNo" id="NuInvoicingQgdMainForm-qgdNo" name="qgdNo">
<a-input-number v-model:value="formData.qgdNo" placeholder="请输入请购单号" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="请购状态 0未下单 1已下单" v-bind="validateInfos.status" id="NuInvoicingQgdMainForm-status" name="status">
<a-input-number v-model:value="formData.status" placeholder="请输入请购状态 0未下单 1已下单" style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</template>
</JFormContainer>
</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 { saveOrUpdate } from '../NuInvoicingQgdMain.api';
import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({})},
formBpm: { type: Boolean, default: true }
});
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
qgdNo: undefined,
status: undefined,
});
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;
});
/**
* 新增
*/
function add() {
edit({});
}
/**
* 编辑
*/
function edit(record) {
nextTick(() => {
resetFields();
const tmpData = {};
Object.keys(formData).forEach((key) => {
if(record.hasOwnProperty(key)){
tmpData[key] = record[key]
}
})
//
Object.assign(formData, tmpData);
});
}
/**
* 提交数据
*/
async function submitForm() {
try {
//
await validate();
} catch ({ errorFields }) {
if (errorFields) {
const firstField = errorFields[0];
if (firstField) {
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
}
}
return Promise.reject(errorFields);
}
confirmLoading.value = true;
const isUpdate = ref<boolean>(false);
//
let model = formData;
if (model.id) {
isUpdate.value = true;
}
//
for (let data in model) {
//
if (model[data] instanceof Array) {
let valueType = getValueType(formRef.value.getProps, data);
//
if (valueType === 'string') {
model[data] = model[data].join(',');
}
}
}
await saveOrUpdate(model, isUpdate.value)
.then((res) => {
if (res.success) {
createMessage.success(res.message);
emit('ok');
} else {
createMessage.warning(res.message);
}
})
.finally(() => {
confirmLoading.value = false;
});
}
defineExpose({
add,
edit,
submitForm,
});
</script>
<style lang="less" scoped>
.antd-modal-form {
padding: 14px;
}
</style>

View File

@ -1,12 +1,12 @@
<template> <template>
<j-modal :title="title" width="80%" :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="关闭">
<NuIotTqElectricitySyncLogList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></NuIotTqElectricitySyncLogList> <NuInvoicingQgdMainForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></NuInvoicingQgdMainForm>
</j-modal> </j-modal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue'; import { ref, nextTick, defineExpose } from 'vue';
import NuIotTqElectricitySyncLogList from './NuIotTqElectricitySyncLogList.vue' import NuInvoicingQgdMainForm from './NuInvoicingQgdMainForm.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue'; import JModal from '/@/components/Modal/src/JModal/JModal.vue';
const title = ref<string>(''); const title = ref<string>('');
@ -16,16 +16,26 @@
const registerForm = ref(); const registerForm = ref();
const emit = defineEmits(['register', 'success']); const emit = defineEmits(['register', 'success']);
/**
* 新增
*/
function add() {
title.value = '新增';
visible.value = true;
nextTick(() => {
registerForm.value.add();
});
}
/** /**
* 编辑 * 编辑
* @param record * @param record
*/ */
function init(record) { function edit(record) {
title.value = disableSubmit.value ? '详情' : '编辑'; title.value = disableSubmit.value ? '详情' : '编辑';
visible.value = true; visible.value = true;
nextTick(() => { nextTick(() => {
registerForm.value.init(record); registerForm.value.edit(record);
}); });
} }
@ -52,7 +62,8 @@
} }
defineExpose({ defineExpose({
init, add,
edit,
disableSubmit, disableSubmit,
}); });
</script> </script>

View File

@ -1,43 +1,45 @@
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
enum Api { enum Api {
queryProjectTreeSync = '/iot/projectInfo/queryRegionTreeSync', queryProjectTreeSync = '/iot/tplink/projectInfo/queryRegionTreeSync',
queryRegionTreeSync = '/iot/regionInfo/queryRegionTreeSync', queryRegionTreeSync = '/iot/tplink/regionInfo/queryRegionTreeSync',
syncProject = '/iot/projectInfo/sync', syncProject = '/iot/tplink/projectInfo/sync',
syncRegion = '/iot/regionInfo/sync', syncRegion = '/iot/tplink/regionInfo/sync',
list = '/iot/cameraInfo/list', list = '/iot/tplink/cameraInfo/list',
ipcCapability = '/iot/cameraInfo/getIpcCapability', syncProjectIpcDevice = '/iot/tplink/cameraInfo/syncProjectIpcDevice',
nuList = '/iot/cameraInfo/nuList', ipcCapability = '/iot/tplink/cameraInfo/getIpcCapability',
edit = '/iot/cameraInfo/edit', nuList = '/iot/tplink/cameraInfo/nuList',
rebootDevice = '/iot/cameraInfo/rebootDevice', edit = '/iot/tplink/cameraInfo/edit',
previewUrl = '/iot/cameraInfo/getPreviewUrl', rebootDevice = '/iot/tplink/cameraInfo/rebootDevice',
getImageCommon = '/iot/cameraInfo/getImageCommon', previewUrl = '/iot/tplink/cameraInfo/getPreviewUrl',
setImageCommon = '/iot/cameraInfo/setImageCommon', getImageCommon = '/iot/tplink/cameraInfo/getImageCommon',
getOsdCapability = '/iot/cameraInfo/getOsdCapability', setImageCommon = '/iot/tplink/cameraInfo/setImageCommon',
getOsd = '/iot/cameraInfo/getOsd', getOsdCapability = '/iot/tplink/cameraInfo/getOsdCapability',
setOsd = '/iot/cameraInfo/setOsd', getOsd = '/iot/tplink/cameraInfo/getOsd',
getTamperDet = '/iot/cameraInfo/getTamperDet', setOsd = '/iot/tplink/cameraInfo/setOsd',
setTamperDet = '/iot/cameraInfo/setTamperDet', getTamperDet = '/iot/tplink/cameraInfo/getTamperDet',
getTamperNotif = '/iot/cameraInfo/getTamperNotif', setTamperDet = '/iot/tplink/cameraInfo/setTamperDet',
setTamperNotif = '/iot/cameraInfo/setTamperNotif', getTamperNotif = '/iot/tplink/cameraInfo/getTamperNotif',
testAudio = '/iot/cameraInfo/testAudio', setTamperNotif = '/iot/tplink/cameraInfo/setTamperNotif',
getAlarmInfo = '/iot/cameraInfo/getAlarmInfo', testAudio = '/iot/tplink/cameraInfo/testAudio',
setAlarmInfo = '/iot/cameraInfo/setAlarmInfo', getAlarmInfo = '/iot/tplink/cameraInfo/getAlarmInfo',
getAlarmPlan = '/iot/cameraInfo/getAlarmPlan', setAlarmInfo = '/iot/tplink/cameraInfo/setAlarmInfo',
setAlarmPlan = '/iot/cameraInfo/setAlarmPlan', getAlarmPlan = '/iot/tplink/cameraInfo/getAlarmPlan',
getVideoParams = '/iot/cameraInfo/getVideoParams', setAlarmPlan = '/iot/tplink/cameraInfo/setAlarmPlan',
setVideoParams = '/iot/cameraInfo/setVideoParams', getVideoParams = '/iot/tplink/cameraInfo/getVideoParams',
configRecovery = '/iot/cameraInfo/configRecovery', setVideoParams = '/iot/tplink/cameraInfo/setVideoParams',
searchVideo = '/iot/cameraInfo/searchVideo', configRecovery = '/iot/tplink/cameraInfo/configRecovery',
getPlaybackUrlList = '/iot/cameraInfo/getPlaybackUrlList', searchVideo = '/iot/tplink/cameraInfo/searchVideo',
deletePlaybackChn = '/iot/cameraInfo/deletePlaybackChn', getPlaybackUrlList = '/iot/tplink/cameraInfo/getPlaybackUrlList',
getMultitransUrl = '/iot/cameraInfo/getMultitransUrl', deletePlaybackChn = '/iot/tplink/cameraInfo/deletePlaybackChn',
getRecordCfgs = '/iot/cameraInfo/getRecordCfgs', getMultitransUrl = '/iot/tplink/cameraInfo/getMultitransUrl',
setRecordCfgs = '/iot/cameraInfo/setRecordCfgs', getRecordCfgs = '/iot/tplink/cameraInfo/getRecordCfgs',
getBatchProgress = '/iot/cameraInfo/getBatchProgress', setRecordCfgs = '/iot/tplink/cameraInfo/setRecordCfgs',
uploadToServer = '/iot/cameraInfo/uploadToServer', getBatchProgress = '/iot/tplink/cameraInfo/getBatchProgress',
stopUploadToServer = '/iot/cameraInfo/stopUploadToServer', uploadToServer = '/iot/tplink/cameraInfo/uploadToServer',
getUploadToServerProcess = '/iot/cameraInfo/getUploadToServerProcess', stopUploadToServer = '/iot/tplink/cameraInfo/stopUploadToServer',
getUploadToServerProcess = '/iot/tplink/cameraInfo/getUploadToServerProcess',
motionCtrl = '/iot/tplink/cameraInfo/motionCtrl',
} }
@ -72,6 +74,12 @@ export const syncRegion = (params?) => defHttp.get({ url: Api.syncRegion, params
*/ */
export const list = (params) => defHttp.get({ url: Api.list, params }); export const list = (params) => defHttp.get({ url: Api.list, params });
/**
* IPC设备
* @param params
*/
export const syncProjectIpcDevice = (params) => defHttp.get({ url: Api.syncProjectIpcDevice, params });
/** /**
* IPC能力集 * IPC能力集
* @param params * @param params
@ -266,3 +274,9 @@ export const stopUploadToServer = (params) => defHttp.get({ url: Api.stopUploadT
*/ */
export const getUploadToServerProcess = (params) => defHttp.get({ url: Api.getUploadToServerProcess, params }); export const getUploadToServerProcess = (params) => defHttp.get({ url: Api.getUploadToServerProcess, params });
/**
*
* @param params
*/
export const motionCtrl = (params) => defHttp.get({ url: Api.motionCtrl, params });

View File

@ -3,10 +3,7 @@
<a-spin :spinning="syncoading"> <a-spin :spinning="syncoading">
<div class="j-table-operator" style="width: 100%"> <div class="j-table-operator" style="width: 100%">
<a-button preIcon="ant-design:sync-outlined" @click="loadRootTreeData">刷新</a-button> <a-button preIcon="ant-design:sync-outlined" @click="loadRootTreeData">刷新</a-button>
<!-- <a-button type="primary" preIcon="ant-design:sync-outlined" @click="syncProjectInfo">同步项目</a-button>--> <a-button type="primary" preIcon="ant-design:sync-outlined" @click="getProjectIpcDevice">同步设备</a-button>
<!-- <template v-if="currentRegion !=null">-->
<!-- <a-button preIcon="ant-design:sync-outlined" @click="syncRegionInfo">同步区域</a-button>-->
<!-- </template>-->
</div> </div>
<a-spin :spinning="loading"> <a-spin :spinning="loading">
<!--区域树--> <!--区域树-->
@ -35,8 +32,9 @@
import { useModal } from '/@/components/Modal'; import { useModal } from '/@/components/Modal';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { useMethods } from '/@/hooks/system/useMethods'; import { useMethods } from '/@/hooks/system/useMethods';
import { syncProjectIpcDevice,queryProjectTreeSync, queryRegionTreeSync, syncProject, syncRegion } from '../camera.api';
const { createMessage } = useMessage(); const { createMessage } = useMessage();
import { queryProjectTreeSync, queryRegionTreeSync, syncProject, syncRegion } from '../camera.api';
const emit = defineEmits(['select', 'rootTreeData']); const emit = defineEmits(['select', 'rootTreeData']);
const syncoading = ref<boolean>(false); const syncoading = ref<boolean>(false);
@ -172,31 +170,21 @@
} }
/** /**
* 同步项目 * 同步设备
*/ */
// async function syncProjectInfo(){ async function getProjectIpcDevice(){
// syncoading.value = true; let data = currentRegion.value;
// await syncProject(); if (data == null) {
// await loadRootTreeData(); createMessage.warning('请先选择一个区域');
// } return;
}
/** const record = {
* 同步区域 projectId: data.projectId
*/ };
// async function syncRegionInfo(){ await syncProjectIpcDevice(record);
// let data = currentRegion.value; currentRegion.value["timestamp"] = new Date().getTime();
// if (data == null) { emit('select', currentRegion.value);
// createMessage.warning(''); }
// return;
// }
// const record = {
// projectId: data.projectId,
// regionId: data.regionId
// };
// syncoading.value = true;
// await syncRegion(record);
// await loadRootTreeData();
// }
defineExpose({ defineExpose({
loadRootTreeData, loadRootTreeData,

View File

@ -61,6 +61,17 @@
<a-button preIcon="ant-design:alert-outlined" @click="manualAlarm">报警</a-button> <a-button preIcon="ant-design:alert-outlined" @click="manualAlarm">报警</a-button>
</span> </span>
</a-col> </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" @click="zoomInOut('out')" title="缩小"></a-button>
</span>
<span style="margin-left: 5px;">
<a-button preIcon="ant-design:zoom-in-outlined" @click="zoomInOut('in')" title="放大"></a-button>
</span>
</a-col>
</a-row> </a-row>
</a-spin> </a-spin>
</template> </template>
@ -76,7 +87,8 @@
getMultitransUrl, getMultitransUrl,
getPreviewUrl, getPreviewUrl,
setImageCommon, setImageCommon,
testAudio testAudio,
motionCtrl
} from "../camera.api"; } from "../camera.api";
const props = defineProps({ const props = defineProps({
@ -328,6 +340,59 @@
izPhone.value = false; 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)
}
/** /**
* 销毁 * 销毁
*/ */

View File

@ -63,5 +63,10 @@
.jee-hidden { .jee-hidden {
display: none !important; display: none !important;
} }
.ant-modal-body {
height: auto !important;
overflow: hidden !important;
}
</style> </style>
<style lang="less" scoped></style> <style lang="less" scoped></style>

View File

@ -2,16 +2,16 @@ import { defHttp } from '/@/utils/http/axios';
import {Modal} from "ant-design-vue"; import {Modal} from "ant-design-vue";
enum Api { enum Api {
queryProjectTreeSync = '/iot/projectInfo/queryRegionTreeSync', queryProjectTreeSync = '/iot/tplink/projectInfo/queryRegionTreeSync',
queryRegionTreeSync = '/iot/regionInfo/queryRegionTreeSync', queryRegionTreeSync = '/iot/tplink/regionInfo/queryRegionTreeSync',
queryTreeList = '/iot/cameraInfo/queryTreeList', queryTreeList = '/iot/tplink/cameraInfo/queryTreeList',
getStorageDevice = '/iot/cameraInfo/getStorageDevice', getStorageDevice = '/iot/tplink/cameraInfo/getStorageDevice',
getAllRecordPlans = '/iot/cameraInfo/getAllRecordPlans', getAllRecordPlans = '/iot/tplink/cameraInfo/getAllRecordPlans',
getRecordCfgs = '/iot/cameraInfo/getRecordCfgs', getRecordCfgs = '/iot/tplink/cameraInfo/getRecordCfgs',
addRecordCfgs = '/iot/cameraInfo/addRecordCfgs', addRecordCfgs = '/iot/tplink/cameraInfo/addRecordCfgs',
setRecordCfgs = '/iot/cameraInfo/setRecordCfgs', setRecordCfgs = '/iot/tplink/cameraInfo/setRecordCfgs',
delRecordCfgs = '/iot/cameraInfo/delRecordCfgs', delRecordCfgs = '/iot/tplink/cameraInfo/delRecordCfgs',
getBatchProgress = '/iot/cameraInfo/getBatchProgress', getBatchProgress = '/iot/tplink/cameraInfo/getBatchProgress',
} }
/** /**

View File

@ -1,11 +1,11 @@
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
enum Api { enum Api {
list = '/iot/projectInfo/list', list = '/iot/tplink/projectInfo/list',
sync = '/iot/projectInfo/sync', sync = '/iot/tplink/projectInfo/sync',
add = '/iot/projectInfo/add', add = '/iot/tplink/projectInfo/add',
edit = '/iot/projectInfo/edit', edit = '/iot/tplink/projectInfo/edit',
delete = '/iot/projectInfo/delete', delete = '/iot/tplink/projectInfo/delete',
} }
/** /**

View File

@ -1,16 +1,16 @@
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
enum Api { enum Api {
queryProjectTreeSync = '/iot/projectInfo/queryRegionTreeSync', queryProjectTreeSync = '/iot/tplink/projectInfo/queryRegionTreeSync',
queryRegionTreeSync = '/iot/regionInfo/queryRegionTreeSync', queryRegionTreeSync = '/iot/tplink/regionInfo/queryRegionTreeSync',
syncProject = '/iot/projectInfo/sync', syncProject = '/iot/tplink/projectInfo/sync',
syncRegion = '/iot/regionInfo/sync', syncRegion = '/iot/tplink/regionInfo/sync',
syncRegionChildren = '/iot/regionInfo/syncChildren', syncRegionChildren = '/iot/tplink/regionInfo/syncChildren',
list = '/iot/regionInfo/list', list = '/iot/tplink/regionInfo/list',
sync = '/iot/regionInfo/sync', sync = '/iot/tplink/regionInfo/sync',
add = '/iot/regionInfo/add', add = '/iot/tplink/regionInfo/add',
edit = '/iot/regionInfo/edit', edit = '/iot/tplink/regionInfo/edit',
delete = '/iot/regionInfo/delete', delete = '/iot/tplink/regionInfo/delete',
queryChildrenByParentId = '/sys/sysDepart/queryChildrenByParentId', queryChildrenByParentId = '/sys/sysDepart/queryChildrenByParentId',
} }

View File

@ -0,0 +1,72 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/iot/tq/ApiRequestLog/list',
save='/iot/tq/ApiRequestLog/add',
edit='/iot/tq/ApiRequestLog/edit',
deleteOne = '/iot/tq/ApiRequestLog/delete',
deleteBatch = '/iot/tq/ApiRequestLog/deleteBatch',
importExcel = '/iot/tq/ApiRequestLog/importExcel',
exportXls = '/iot/tq/ApiRequestLog/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
/**
*
* @param params
* @param handleSuccess
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
* @param handleSuccess
*/
export const batchDelete = (params, handleSuccess) => {
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
* @param isUpdate
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}

View File

@ -6,60 +6,104 @@ import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据 //列表数据
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '表号', title: 'SN',
align: "center", align: "center",
dataIndex: 'address' dataIndex: 'address'
}, },
// {
// title: '类型',
// align: "center",
// dataIndex: 'type_dictText'
// },
{ {
title: '类型', title: '操作时间',
align: "center",
dataIndex: 'type_dictText'
},
{
title: '请求时的值',
align: "center",
dataIndex: 'requestValue'
},
{
title: '请求时间',
align: "center", align: "center",
dataIndex: 'requestTime' dataIndex: 'requestTime'
}, },
{ {
title: '请求状态', title: '上次电表值',
align: "center", align: "center",
dataIndex: 'requestStatus_dictText' dataIndex: 'requestValue'
}, },
{ {
title: '请求描述', title: '电表值',
align: "center",
dataIndex: 'requestRemark'
},
{
title: '反馈值',
align: "center", align: "center",
dataIndex: 'resolveValue' dataIndex: 'resolveValue'
}, },
{ {
title: '反馈时间', title: '状态',
align: "center", align: "center",
dataIndex: 'resolveTime' dataIndex: 'resolveStatus'
},
// {
// title: '本次反馈时间',
// align: "center",
// dataIndex: 'resolveTime'
// },
// {
// title: '本次抄表状态',
// align: "center",
// dataIndex: 'resolveStatus_dictText'
// },
// {
// title: '反馈描述',
// align: "center",
// dataIndex: 'resolveRemark',
// defaultHidden: true
// },
];
//列表数据
export const columns2: BasicColumn[] = [
{
title: 'SN',
align: "center",
dataIndex: 'address'
}, },
{ {
title: '反馈状态', title: '操作时间',
align: "center", align: "center",
dataIndex: 'resolveStatus_dictText' dataIndex: 'requestTime'
}, },
{ {
title: '反馈描述', title: '状态',
align: "center", align: "center",
dataIndex: 'resolveRemark' dataIndex: 'resolveStatus'
}, },
]; ];
//列表数据
export const columns3: BasicColumn[] = [
{
title: 'SN',
align: "center",
dataIndex: 'address'
},
{
title: '操作时间',
align: "center",
dataIndex: 'requestTime'
},
{
title: '上次水表值',
align: "center",
dataIndex: 'requestValue'
},
{
title: '水表值',
align: "center",
dataIndex: 'resolveValue'
},
{
title: '状态',
align: "center",
dataIndex: 'resolveStatus'
},
];
// 高级查询数据 // 高级查询数据
export const superQuerySchema = { export const superQuerySchema = {
address: {title: '表号',order: 0,view: 'text', type: 'string',}, address: {title: 'SN',order: 0,view: 'text', type: 'string',},
type: {title: '类型',order: 1,view: 'list', type: 'string',dictCode: 'dbsb_type',}, type: {title: '类型',order: 1,view: 'list', type: 'string',dictCode: 'dbsb_type',},
requestValue: {title: '请求时的值',order: 2,view: 'text', type: 'string',}, requestValue: {title: '请求时的值',order: 2,view: 'text', type: 'string',},
requestTime: {title: '请求时间',order: 3,view: 'text', type: 'string',}, requestTime: {title: '请求时间',order: 3,view: 'text', type: 'string',},

View File

@ -1,32 +1,5 @@
<template> <template>
<div class="p-2"> <div class="p-2">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<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="requestStatus">
<template #label><span title="请求状态">请求状态</span></template>
<j-select-multiple placeholder="请选择请求状态" v-model:value="queryParam.requestStatus" dictCode="dbsb_status" allow-clear />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="resolveStatus">
<template #label><span title="反馈状态">反馈状态</span></template>
<j-select-multiple placeholder="请选择反馈状态" v-model:value="queryParam.resolveStatus" dictCode="dbsb_status" allow-clear />
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格--> <!--引用表格-->
<BasicTable @register="registerTable"> <BasicTable @register="registerTable">
<!--插槽:table标题--> <!--插槽:table标题-->
@ -40,18 +13,18 @@
</template> </template>
</BasicTable> </BasicTable>
<!-- 表单区域 --> <!-- 表单区域 -->
<NuIotTqApiRequestLogModal ref="registerModal" @success="handleSuccess"></NuIotTqApiRequestLogModal> <ApiRequestLogModal ref="registerModal" @success="handleSuccess"></ApiRequestLogModal>
</div> </div>
</template> </template>
<script lang="ts" name="nuIotTqApiRequestLog-nuIotTqApiRequestLog" setup> <script lang="ts" name="ApiRequestLog-ApiRequestLog" setup>
import { ref, reactive } from 'vue'; import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table'; import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage'; import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './NuIotTqApiRequestLog.data'; import { columns, superQuerySchema } from './ApiRequestLog.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './NuIotTqApiRequestLog.api'; import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ApiRequestLog.api';
import { downloadFile } from '/@/utils/common/renderUtils'; import { downloadFile } from '/@/utils/common/renderUtils';
import NuIotTqApiRequestLogModal from './components/NuIotTqApiRequestLogModal.vue' import ApiRequestLogModal from './components/ApiRequestLogModal.vue'
import { useUserStore } from '/@/store/modules/user'; import { useUserStore } from '/@/store/modules/user';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue'; import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';

View File

@ -0,0 +1,224 @@
<template>
<div class="p-2">
<!--引用表格-->
<BasicTable @register="registerTable">
<!--插槽:table标题-->
<template #tableTitle>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<template v-slot:bodyCell="{ column, record, index, text }">
</template>
</BasicTable>
<!-- 表单区域 -->
<ApiRequestLogModal ref="registerModal" @success="handleSuccess"></ApiRequestLogModal>
</div>
</template>
<script lang="ts" name="ApiRequestLog-ApiRequestLog" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns2, superQuerySchema } from './ApiRequestLog.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ApiRequestLog.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import ApiRequestLogModal from './components/ApiRequestLogModal.vue'
import { useUserStore } from '/@/store/modules/user';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
import { columns } from '../../tplink/camera/camera.data';
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const userStore = useUserStore();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: 'api请求日志',
api: list,
columns: columns2,
canResize:false,
useSearchForm: false,
immediate: false,
showActionColumn: false,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: async (params) => {
return Object.assign(params, queryParam);
},
},
exportConfig: {
name: "api请求日志",
url: getExportUrl,
params: queryParam,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs:24,
sm:8,
xl:6,
xxl:8
});
const wrapperCol = reactive({
xs: 24,
sm: 16,
});
//
const superQueryConfig = reactive(superQuerySchema);
/**
* 高级查询事件
*/
function handleSuperQuery(params) {
Object.keys(params).map((k) => {
queryParam[k] = params[k];
});
searchQuery();
}
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
auth: 'nuIotTqApiRequestLog:nu_iot_tq_api_request_log:edit'
},
];
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
placement: 'topLeft',
},
auth: 'nuIotTqApiRequestLog:nu_iot_tq_api_request_log:delete'
}
]
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
selectedRowKeys.value = [];
//
reload();
}
function init(record) {
console.log("🚀 ~ init ~ record:", record)
queryParam.cid = record.cid;
queryParam.type = record.type;
reload();
}
defineExpose({
init,
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help){
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),:deep(.ant-input-number){
width: 100%;
}
}
</style>

View File

@ -0,0 +1,224 @@
<template>
<div class="p-2">
<!--引用表格-->
<BasicTable @register="registerTable">
<!--插槽:table标题-->
<template #tableTitle>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<template v-slot:bodyCell="{ column, record, index, text }">
</template>
</BasicTable>
<!-- 表单区域 -->
<ApiRequestLogModal ref="registerModal" @success="handleSuccess"></ApiRequestLogModal>
</div>
</template>
<script lang="ts" name="ApiRequestLog-ApiRequestLog" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns3, superQuerySchema } from './ApiRequestLog.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ApiRequestLog.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import ApiRequestLogModal from './components/ApiRequestLogModal.vue'
import { useUserStore } from '/@/store/modules/user';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
import { columns } from '../../tplink/camera/camera.data';
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const userStore = useUserStore();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: 'api请求日志',
api: list,
columns: columns3,
canResize:false,
useSearchForm: false,
immediate: false,
showActionColumn: false,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: async (params) => {
return Object.assign(params, queryParam);
},
},
exportConfig: {
name: "api请求日志",
url: getExportUrl,
params: queryParam,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs:24,
sm:8,
xl:6,
xxl:8
});
const wrapperCol = reactive({
xs: 24,
sm: 16,
});
//
const superQueryConfig = reactive(superQuerySchema);
/**
* 高级查询事件
*/
function handleSuperQuery(params) {
Object.keys(params).map((k) => {
queryParam[k] = params[k];
});
searchQuery();
}
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
auth: 'nuIotTqApiRequestLog:nu_iot_tq_api_request_log:edit'
},
];
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
placement: 'topLeft',
},
auth: 'nuIotTqApiRequestLog:nu_iot_tq_api_request_log:delete'
}
]
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
selectedRowKeys.value = [];
//
reload();
}
function init(record) {
console.log("🚀 ~ init ~ record:", record)
queryParam.cid = record.cid;
queryParam.type = record.type;
reload();
}
defineExpose({
init,
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help){
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),:deep(.ant-input-number){
width: 100%;
}
}
</style>

View File

@ -2,55 +2,55 @@
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<JFormContainer :disabled="disabled"> <JFormContainer :disabled="disabled">
<template #detail> <template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="NuIotTqApiRequestLogForm"> <a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="ApiRequestLogForm">
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="表号" v-bind="validateInfos.address" id="NuIotTqApiRequestLogForm-address" name="address"> <a-form-item label="SN" v-bind="validateInfos.address" id="ApiRequestLogForm-address" name="address">
<a-input v-model:value="formData.address" placeholder="请输入表号" allow-clear ></a-input> <a-input v-model:value="formData.address" placeholder="请输入SN" allow-clear ></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="类型" v-bind="validateInfos.type" id="NuIotTqApiRequestLogForm-type" name="type"> <a-form-item label="类型" v-bind="validateInfos.type" id="ApiRequestLogForm-type" name="type">
<j-dict-select-tag v-model:value="formData.type" dictCode="dbsb_type" placeholder="请选择类型" allow-clear /> <j-dict-select-tag v-model:value="formData.type" dictCode="dbsb_type" placeholder="请选择类型" allow-clear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="请求时的值" v-bind="validateInfos.requestValue" id="NuIotTqApiRequestLogForm-requestValue" name="requestValue"> <a-form-item label="请求时的值" v-bind="validateInfos.requestValue" id="ApiRequestLogForm-requestValue" name="requestValue">
<a-input v-model:value="formData.requestValue" placeholder="请输入请求时的值" allow-clear ></a-input> <a-input v-model:value="formData.requestValue" placeholder="请输入请求时的值" allow-clear ></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="请求时间" v-bind="validateInfos.requestTime" id="NuIotTqApiRequestLogForm-requestTime" name="requestTime"> <a-form-item label="请求时间" v-bind="validateInfos.requestTime" id="ApiRequestLogForm-requestTime" name="requestTime">
<a-input v-model:value="formData.requestTime" placeholder="请输入请求时间" allow-clear ></a-input> <a-input v-model:value="formData.requestTime" placeholder="请输入请求时间" allow-clear ></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="请求状态" v-bind="validateInfos.requestStatus" id="NuIotTqApiRequestLogForm-requestStatus" name="requestStatus"> <a-form-item label="请求状态" v-bind="validateInfos.requestStatus" id="ApiRequestLogForm-requestStatus" name="requestStatus">
<j-dict-select-tag v-model:value="formData.requestStatus" dictCode="" placeholder="请选择请求状态" allow-clear /> <j-dict-select-tag v-model:value="formData.requestStatus" dictCode="" placeholder="请选择请求状态" allow-clear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="请求描述" v-bind="validateInfos.requestRemark" id="NuIotTqApiRequestLogForm-requestRemark" name="requestRemark"> <a-form-item label="请求描述" v-bind="validateInfos.requestRemark" id="ApiRequestLogForm-requestRemark" name="requestRemark">
<a-input v-model:value="formData.requestRemark" placeholder="请输入请求描述" allow-clear ></a-input> <a-input v-model:value="formData.requestRemark" placeholder="请输入请求描述" allow-clear ></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="反馈值" v-bind="validateInfos.resolveValue" id="NuIotTqApiRequestLogForm-resolveValue" name="resolveValue"> <a-form-item label="反馈值" v-bind="validateInfos.resolveValue" id="ApiRequestLogForm-resolveValue" name="resolveValue">
<a-input v-model:value="formData.resolveValue" placeholder="请输入反馈值" allow-clear ></a-input> <a-input v-model:value="formData.resolveValue" placeholder="请输入反馈值" allow-clear ></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="反馈时间" v-bind="validateInfos.resolveTime" id="NuIotTqApiRequestLogForm-resolveTime" name="resolveTime"> <a-form-item label="反馈时间" v-bind="validateInfos.resolveTime" id="ApiRequestLogForm-resolveTime" name="resolveTime">
<a-input v-model:value="formData.resolveTime" placeholder="请输入反馈时间" allow-clear ></a-input> <a-input v-model:value="formData.resolveTime" placeholder="请输入反馈时间" allow-clear ></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="反馈状态" v-bind="validateInfos.resolveStatus" id="NuIotTqApiRequestLogForm-resolveStatus" name="resolveStatus"> <a-form-item label="反馈状态" v-bind="validateInfos.resolveStatus" id="ApiRequestLogForm-resolveStatus" name="resolveStatus">
<j-dict-select-tag v-model:value="formData.resolveStatus" dictCode="dbsb_status" placeholder="请选择反馈状态" allow-clear /> <j-dict-select-tag v-model:value="formData.resolveStatus" dictCode="dbsb_status" placeholder="请选择反馈状态" allow-clear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="反馈描述" v-bind="validateInfos.resolveRemark" id="NuIotTqApiRequestLogForm-resolveRemark" name="resolveRemark"> <a-form-item label="反馈描述" v-bind="validateInfos.resolveRemark" id="ApiRequestLogForm-resolveRemark" name="resolveRemark">
<a-input v-model:value="formData.resolveRemark" placeholder="请输入反馈描述" allow-clear ></a-input> <a-input v-model:value="formData.resolveRemark" placeholder="请输入反馈描述" allow-clear ></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -67,7 +67,7 @@
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { getValueType } from '/@/utils'; import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../NuIotTqApiRequestLog.api'; import { saveOrUpdate } from '../ApiRequestLog.api';
import { Form } from 'ant-design-vue'; import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue'; import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
const props = defineProps({ const props = defineProps({

View File

@ -6,7 +6,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue'; import { ref, nextTick, defineExpose } from 'vue';
import NuIotTqApiRequestLogForm from './NuIotTqApiRequestLogForm.vue' import NuIotTqApiRequestLogForm from './ApiRequestLogForm.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue'; import JModal from '/@/components/Modal/src/JModal/JModal.vue';
const title = ref<string>(''); const title = ref<string>('');

View File

@ -2,16 +2,16 @@
<div class="p-2"> <div class="p-2">
<a-tabs v-model:activeKey="activeKey" type="card" @change="handleChange"> <a-tabs v-model:activeKey="activeKey" type="card" @change="handleChange">
<a-tab-pane key="3" tab="抄表" > <a-tab-pane key="3" tab="抄表" >
<NuIotTqApiRequestLogList ref="nuIotTqApiRequestLogListModal3"></NuIotTqApiRequestLogList> <ApiRequestLogList ref="ApiRequestLogListModal3"></ApiRequestLogList>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="9" tab="清零" force-render> <a-tab-pane key="9" tab="清零" force-render>
<NuIotTqApiRequestLogList ref="nuIotTqApiRequestLogListModal9"></NuIotTqApiRequestLogList> <ApiRequestLogList ref="ApiRequestLogListModal9"></ApiRequestLogList>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="10" tab="电表拉闸" force-render> <a-tab-pane key="10" tab="电表拉闸" force-render>
<NuIotTqApiRequestLogList ref="nuIotTqApiRequestLogListModal10"></NuIotTqApiRequestLogList> <ApiRequestLogList2 ref="ApiRequestLogListModal10"></ApiRequestLogList2>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="11" tab="电表合闸" force-render> <a-tab-pane key="11" tab="电表合闸" force-render>
<NuIotTqApiRequestLogList ref="nuIotTqApiRequestLogListModal11"></NuIotTqApiRequestLogList> <ApiRequestLogList2 ref="ApiRequestLogListModal11"></ApiRequestLogList2>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</div> </div>
@ -20,14 +20,15 @@
<script lang="ts" name="departUtils-sysDepart" setup> <script lang="ts" name="departUtils-sysDepart" setup>
import { ref, reactive } from 'vue'; import { ref, reactive } from 'vue';
import NuIotTqApiRequestLogList from '/@/views/iot/tq/nuIotTqApiRequestLog/NuIotTqApiRequestLogList.vue'; import ApiRequestLogList from '/@/views/iot/tq/ApiRequestLog/ApiRequestLogList.vue';
import ApiRequestLogList2 from '/@/views/iot/tq/ApiRequestLog/ApiRequestLogList2.vue';
const activeKey= ref('3'); const activeKey= ref('3');
const dbsbInfo = ref<any>({}); const dbsbInfo = ref<any>({});
const nuIotTqApiRequestLogListModal9 = ref(); const ApiRequestLogListModal9 = ref();
const nuIotTqApiRequestLogListModal3 = ref(); const ApiRequestLogListModal3 = ref();
const nuIotTqApiRequestLogListModal10 = ref(); const ApiRequestLogListModal10 = ref();
const nuIotTqApiRequestLogListModal11 = ref(); const ApiRequestLogListModal11 = ref();
function initLog(record){ function initLog(record){
activeKey.value = "3"; activeKey.value = "3";
getDataList(activeKey.value, record); getDataList(activeKey.value, record);
@ -41,13 +42,13 @@ const nuIotTqApiRequestLogListModal11 = ref();
cid: record.cid cid: record.cid
} }
if(type == '9'){ if(type == '9'){
nuIotTqApiRequestLogListModal9.value.init(params); ApiRequestLogListModal9.value.init(params);
}else if(type == '3'){ }else if(type == '3'){
nuIotTqApiRequestLogListModal3.value.init(params); ApiRequestLogListModal3.value.init(params);
}else if(type == '10'){ }else if(type == '10'){
nuIotTqApiRequestLogListModal10.value.init(params); ApiRequestLogListModal10.value.init(params);
}else if(type == '11'){ }else if(type == '11'){
nuIotTqApiRequestLogListModal11.value.init(params); ApiRequestLogListModal11.value.init(params);
} }
} }

View File

@ -2,16 +2,16 @@
<div class="p-2"> <div class="p-2">
<a-tabs v-model:activeKey="activeKey" type="card" @change="handleChange"> <a-tabs v-model:activeKey="activeKey" type="card" @change="handleChange">
<a-tab-pane key="42" tab="抄表" > <a-tab-pane key="42" tab="抄表" >
<NuIotTqApiRequestLogList ref="nuIotTqApiRequestLogListModal42"></NuIotTqApiRequestLogList> <ApiRequestLogList3 ref="ApiRequestLogListModal42"></ApiRequestLogList3>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="49" tab="清零" force-render> <a-tab-pane key="49" tab="清零" force-render>
<NuIotTqApiRequestLogList ref="nuIotTqApiRequestLogListModal49"></NuIotTqApiRequestLogList> <ApiRequestLogList3 ref="ApiRequestLogListModal49"></ApiRequestLogList3>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="43" tab="开阀" force-render> <a-tab-pane key="43" tab="开阀" force-render>
<NuIotTqApiRequestLogList ref="nuIotTqApiRequestLogListModal43"></NuIotTqApiRequestLogList> <ApiRequestLogList2 ref="ApiRequestLogListModal43"></ApiRequestLogList2>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="53" tab="关阀" force-render> <a-tab-pane key="53" tab="关阀" force-render>
<NuIotTqApiRequestLogList ref="nuIotTqApiRequestLogListModal43"></NuIotTqApiRequestLogList> <ApiRequestLogList2 ref="ApiRequestLogListModal53"></ApiRequestLogList2>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</div> </div>
@ -20,14 +20,15 @@
<script lang="ts" name="departUtils-sysDepart" setup> <script lang="ts" name="departUtils-sysDepart" setup>
import { ref, reactive } from 'vue'; import { ref, reactive } from 'vue';
import NuIotTqApiRequestLogList from '/@/views/iot/tq/nuIotTqApiRequestLog/NuIotTqApiRequestLogList.vue'; import ApiRequestLogList3 from '/@/views/iot/tq/ApiRequestLog/ApiRequestLogList3.vue';
import ApiRequestLogList2 from '/@/views/iot/tq/ApiRequestLog/ApiRequestLogList2.vue';
const activeKey= ref('42'); const activeKey= ref('42');
const dbsbInfo = ref<any>({}); const dbsbInfo = ref<any>({});
const nuIotTqApiRequestLogListModal42 = ref(); const ApiRequestLogListModal42 = ref();
const nuIotTqApiRequestLogListModal43 = ref(); const ApiRequestLogListModal43 = ref();
const nuIotTqApiRequestLogListModal49 = ref(); const ApiRequestLogListModal49 = ref();
const nuIotTqApiRequestLogListModal53 = ref(); const ApiRequestLogListModal53 = ref();
function initLog(record){ function initLog(record){
activeKey.value = "42"; activeKey.value = "42";
getDataList(activeKey.value, record); getDataList(activeKey.value, record);
@ -41,13 +42,13 @@ const nuIotTqApiRequestLogListModal53 = ref();
cid: record.cid cid: record.cid
} }
if(type == '42'){ if(type == '42'){
nuIotTqApiRequestLogListModal42.value.init(params); ApiRequestLogListModal42.value.init(params);
}else if(type == '43'){ }else if(type == '43'){
nuIotTqApiRequestLogListModal43.value.init(params); ApiRequestLogListModal43.value.init(params);
}else if(type == '49'){ }else if(type == '49'){
nuIotTqApiRequestLogListModal49.value.init(params); ApiRequestLogListModal49.value.init(params);
}else if(type == '53'){ }else if(type == '53'){
nuIotTqApiRequestLogListModal53.value.init(params); ApiRequestLogListModal53.value.init(params);
} }
} }

View File

@ -14,7 +14,7 @@ export const columns: BasicColumn[] = [
dataIndex: 'nuName' dataIndex: 'nuName'
}, },
{ {
title: '表号', title: 'SN',
align: "center", align: "center",
dataIndex: 'address' dataIndex: 'address'
}, },
@ -106,7 +106,7 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 6 }, colProps: { span: 6 },
}, },
{ {
label: '表号', label: 'SN',
field: 'address', field: 'address',
component: 'Input', component: 'Input',
colProps: { span: 6 }, colProps: { span: 6 },

View File

@ -6,8 +6,14 @@
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :lg="6"> <a-col :lg="6">
<a-form-item name="address"> <a-form-item name="address">
<template #label><span title="同步类型">表号</span></template> <template #label><span title="SN">SN</span></template>
<a-input placeholder="请输入同步类型" v-model:value="queryParam.address" allow-clear ></a-input> <j-input placeholder="请输入SN" v-model:value="queryParam.address" allow-clear ></j-input>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="nuId">
<template #label><span title="护理单元">护理单元</span></template>
<j-dict-select-tag type='list' v-model:value="queryParam.nuId" :dictCode="`nu_base_info,nu_name,nu_id`" placeholder="请选护理单元" allow-clear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
@ -19,46 +25,63 @@
</div> </div>
<a-row> <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-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;"> <a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '60px', padding: '0 24px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }">
<template #title> <template #title>
<div class="cardTitle"> <a-row style="font-weight: normal;">
<a-row> <a-col :span="18" style="font-size: 14px;">
<a-col :span="12"> <div>SN<span style="font-weight: bold;">{{item.address}}</span></div>
<span style="margin-left:15px;font-size:14px;">表号{{item.address}}</span> <div style="font-size: 12px;">抄表时间{{item.readTime?item.readTime:'未抄表'}}</div>
</a-col> </a-col>
<a-col :span="12" style="text-align: right;"> <a-col :span="6" style="text-align: center;padding-top: 4px;">
<span style="margin-right:15px;font-size:14px;">{{item.relayState=='1'?'在线':'离线'}}</span> <div :class="item.relayState=='1'?'zxClass':'lxClass'">{{item.relayState=='1'?'在线':'离线'}}</div>
</a-col> </a-col>
</a-row> </a-row>
</div>
</template> </template>
<p> <a-row>
<span>护理单元名称{{item.nuName?item.nuName:'未配置'}}</span> <a-col :span="12" style="margin-top: -10px;">{{item.nuId_dictText?item.nuId_dictText:'未配置'}}</a-col>
</p> <a-col :span="12" style="text-align: right;margin-top: -10px;">
<p> <span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID: {{item.nuId?item.nuId:'未配置'}}</span>
<span>上次抄表时间{{item.readTime?item.readTime:'未抄表'}}</span> </a-col>
</p> <a-col :span="14" style="text-align: right;font-size: 44px;font-weight: bold;margin-top:18px;">
<p style="margin-top: 20px;"> <span>{{item.eleValue?item.eleValue:'0.00'}}</span>
<span><Statistic title="用电量(KWH)" :value="item.eleValue?item.eleValue:'无'" style="text-align:center;" /></span> </a-col>
</p> <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-row>
<a-divider /> <a-divider />
<p style="text-align:center;"> <p style="text-align:center;">
<span> <span style="display:inline-block;" @click="handleRead(item)">
<a @click="handleRead(item)">抄表</a> <span class="tbClass"><img src="../../../../assets/iot/a1.png" style="width:20px;" /></span><br/>
<a-divider type="vertical" /> <span class="antTitle">抄表</span>
<a @click="handleControlLz(item)">拉闸</a> </span>
<a-divider type="vertical" /> <span style="display:inline-block;margin-left:10%;" @click="handleControlLz(item)">
<a @click="handleControlHz(item)">合闸</a> <span class="tbClass"><img src="../../../../assets/iot/a5.png" style="width:20px;" /></span><br/>
<a-divider type="vertical" /> <span class="antTitle">拉闸</span>
<a @click="handleReset(item)">清零</a> </span>
<a-divider type="vertical" /> <span style="display:inline-block;margin-left:10%;" @click="handleControlHz(item)">
<a @click="showApiLog(item)">日志</a> <span class="tbClass"><img src="../../../../assets/iot/a2.png" style="width:20px;" /></span><br/>
<span class="antTitle">合闸</span>
</span>
<span style="display:inline-block;margin-left:10%;" @click="handleReset(item)">
<span class="tbClass"><img src="../../../../assets/iot/a3.png" style="width:20px;" /></span><br/>
<span class="antTitle">清零</span>
</span>
<span style="display:inline-block;margin-left:10%;" @click="showApiLog(item)">
<span class="tbClass"><img src="../../../../assets/iot/a4.png" style="width:20px;" /></span><br/>
<span class="antTitle">日志</span>
</span> </span>
</p> </p>
</a-card> </a-card>
</a-col> </a-col>
<a-col v-if="tableData.total==0" >
<div style="margin: 30px auto;">
<a-empty />
</div>
</a-col>
</a-row> </a-row>
<div <div v-if="tableData.total > 0"
style="float:right;bottom: 20px;z-index: 999;padding: 8px 16px;border-radius: 4px;display: flex;align-items: center;"> style="float:right;bottom: 20px;z-index: 999;padding: 8px 16px;border-radius: 4px;display: flex;align-items: center;">
<span style="margin-right: 10px;"> {{ tableData.total }} 条数据</span> <span style="margin-right: 10px;"> {{ tableData.total }} 条数据</span>
<Pagination showLessItems v-model:current="pageParams.pageNo" :pageSize="pageParams.pageSize" size="small" <Pagination showLessItems v-model:current="pageParams.pageNo" :pageSize="pageParams.pageSize" size="small"
@ -76,6 +99,8 @@
import {Modal} from "ant-design-vue"; import {Modal} from "ant-design-vue";
import {list, eleReset, eleControl, eleRead } from './electricity.api'; import {list, eleReset, eleControl, eleRead } from './electricity.api';
import { Pagination } from 'ant-design-vue'; import { Pagination } from 'ant-design-vue';
import { JInput } from '/@/components/Form';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import ApiLogModal from "@/views/iot/tq/electricity/apilog/ApiLogModal.vue"; import ApiLogModal from "@/views/iot/tq/electricity/apilog/ApiLogModal.vue";
import { set } from 'lodash-es'; import { set } from 'lodash-es';
@ -215,4 +240,31 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
display: block; display: block;
position: absolute; position: absolute;
} }
.zxClass{
font-size:14px;
background: linear-gradient(to right, #1ea0fa, #017de9);
border-radius: 8px;
height: 35px;
color: white;
line-height: 35px;
}
.lxClass{
font-size:14px;
background: linear-gradient(to right, #cccccc, #cccccc);
border-radius: 8px;
height: 35px;
color: white;
line-height: 35px;
}
.tbClass{
background: #f6f6f6;
padding: 8px;
border-radius: 5px;
}
.antTitle{
margin-top: 10px;
display: block;
font-size: 12px;
}
</style> </style>

View File

@ -1,68 +0,0 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '同步时间',
align: "center",
dataIndex: 'createTime'
},
{
title: '同步类型',
align: "center",
dataIndex: 'syncType'
},
{
title: '原机构名称',
align: "center",
dataIndex: 'orgName'
},
{
title: '原机构编码',
align: "center",
dataIndex: 'orgCode',
defaultHidden: true
},
{
title: '新机构名称',
align: "center",
dataIndex: 'newOrgName'
},
{
title: '新机构编码',
align: "center",
dataIndex: 'newOrgCode',
defaultHidden: true
},
{
title: '状态',
align: "center",
dataIndex: 'status'
},
{
title: '备注',
align: "center",
dataIndex: 'content'
},
{
title: '服务类型',
align: "center",
dataIndex: 'serverType'
},
];
// 高级查询数据
export const superQuerySchema = {
mainName: {title: '主表名称',order: 0,view: 'text', type: 'string',},
syncType: {title: '同步类型',order: 1,view: 'text', type: 'string',},
orgName: {title: '原机构名称',order: 2,view: 'text', type: 'string',},
orgCode: {title: '原机构编码',order: 3,view: 'text', type: 'string',},
newOrgName: {title: '新机构名称',order: 4,view: 'text', type: 'string',},
newOrgCode: {title: '新机构编码',order: 5,view: 'text', type: 'string',},
status: {title: '状态',order: 6,view: 'text', type: 'string',},
content: {title: '备注',order: 7,view: 'text', type: 'string',},
serverType: {title: '服务类型',order: 8,view: 'text', type: 'string',},
};

View File

@ -1,169 +0,0 @@
<template>
<div class="p-2">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<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="syncType">
<template #label><span title="同步类型">同步类型</span></template>
<a-input placeholder="请输入同步类型" v-model:value="queryParam.syncType" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="status">
<template #label><span title="状态">状态</span></template>
<a-input placeholder="请输入状态" v-model:value="queryParam.status" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" >
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="handleSync" preIcon="ant-design:sync-outlined"> 同步</a-button>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<template v-slot:bodyCell="{ column, record, index, text }">
</template>
</BasicTable>
</div>
</template>
<script lang="ts" name="nuIotTqElectricitySyncLog-nuIotTqElectricitySyncLog" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './NuIotTqElectricitySyncLog.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './NuIotTqElectricitySyncLog.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import NuIotTqElectricitySyncLogModal from './components/NuIotTqElectricitySyncLogModal.vue'
import { useUserStore } from '/@/store/modules/user';
import { defHttp } from '/@/utils/http/axios';
const formRef = ref();
const queryParam = reactive<any>({});
const syncInfo = ref<any>({});
const toggleSearchStatus = ref<boolean>(false);
const userStore = useUserStore();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '同步日志',
api: list,
columns,
canResize:false,
useSearchForm: false,
immediate: false,
showIndexColumn: true,
showActionColumn: false,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: async (params) => {
return Object.assign(params, queryParam);
},
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs:24,
sm:4,
xl:6,
xxl:4
});
const wrapperCol = reactive({
xs: 24,
sm: 20,
});
/**
* 同步事件
*/
function handleSync() {
defHttp.post({
url: '/iot/tq/electricityMeter/syncElectricity',
params: syncInfo.value,
}).then((res) => {
reload();
});
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
selectedRowKeys.value = [];
//
reload();
}
//
function init(record){
console.log("🚀 ~ init ~ record:", record)
syncInfo.value = record;
queryParam.mainId = record.id;
reload();
}
defineExpose({
init,
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help){
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),:deep(.ant-input-number){
width: 100%;
}
}
</style>

View File

@ -6,8 +6,14 @@
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :lg="6"> <a-col :lg="6">
<a-form-item name="address"> <a-form-item name="address">
<template #label><span title="同步类型">表号</span></template> <template #label><span title="SN">SN</span></template>
<a-input placeholder="请输入同步类型" v-model:value="queryParam.address" allow-clear ></a-input> <j-input placeholder="请输入SN" v-model:value="queryParam.address" allow-clear ></j-input>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="nuId">
<template #label><span title="护理单元">护理单元</span></template>
<j-dict-select-tag type='list' v-model:value="queryParam.nuId" :dictCode="`nu_base_info,nu_name,nu_id`" placeholder="请选护理单元" allow-clear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
@ -19,46 +25,63 @@
</div> </div>
<a-row> <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-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;"> <a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '60px', padding: '0 24px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }">
<template #title> <template #title>
<div class="cardTitle"> <a-row style="font-weight: normal;">
<a-row> <a-col :span="18" style="font-size: 14px;">
<a-col :span="12"> <div>SN<span style="font-weight: bold;">{{item.address}}</span></div>
<span style="margin-left:15px;font-size:14px;">表号{{item.address}}</span> <div style="font-size: 12px;">抄表时间{{item.readTime?item.readTime:'未抄表'}}</div>
</a-col> </a-col>
<a-col :span="12" style="text-align: right;"> <a-col :span="6" style="text-align: center;padding-top: 4px;">
<span style="margin-right:15px;font-size:14px;">{{item.relayState=='1'?'在线':'离线'}}</span> <div :class="item.relayState=='1'?'zxClass':'lxClass'">{{item.relayState=='1'?'在线':'离线'}}</div>
</a-col> </a-col>
</a-row> </a-row>
</div>
</template> </template>
<p> <a-row>
<span>护理单元名称{{item.nuName?item.nuName:'未配置'}}</span> <a-col :span="12" style="margin-top: -10px;">{{item.nuId_dictText?item.nuId_dictText:'未配置'}}</a-col>
</p> <a-col :span="12" style="text-align: right;margin-top: -10px;">
<p> <span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID: {{item.nuId?item.nuId:'未配置'}}</span>
<span>上次抄表时间{{item.readTime?item.readTime:'未抄表'}}</span> </a-col>
</p> <a-col :span="14" style="text-align: right;font-size: 44px;font-weight: bold;margin-top:18px;">
<p style="margin-top: 20px;"> <span>{{item.eleValue?item.eleValue:'0.00'}}</span>
<span><Statistic title="用水量m³" :value="item.eleValue?item.eleValue:'无'" style="text-align:center;" /></span> </a-col>
</p> <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-row>
<a-divider /> <a-divider />
<p style="text-align:center;"> <p style="text-align:center;">
<span> <span style="display:inline-block;" @click="handleRead(item)">
<a @click="handleRead(item)">抄表</a> <span class="tbClass"><img src="../../../../assets/iot/a1.png" style="width:20px;" /></span><br/>
<a-divider type="vertical" /> <span class="antTitle">抄表</span>
<a @click="handleControlLz(item)">开阀</a> </span>
<a-divider type="vertical" /> <span style="display:inline-block;margin-left:10%;" @click="handleControlLz(item)">
<a @click="handleControlHz(item)">关阀</a> <span class="tbClass"><img src="../../../../assets/iot/a10.png" style="width:20px;" /></span><br/>
<a-divider type="vertical" /> <span class="antTitle">开阀</span>
<a @click="handleReset(item)">清零</a> </span>
<a-divider type="vertical" /> <span style="display:inline-block;margin-left:10%;" @click="handleControlHz(item)">
<a @click="showApiLog(item)">日志</a> <span class="tbClass"><img src="../../../../assets/iot/a11.png" style="width:20px;" /></span><br/>
<span class="antTitle">关阀</span>
</span>
<span style="display:inline-block;margin-left:10%;" @click="handleReset(item)">
<span class="tbClass"><img src="../../../../assets/iot/a3.png" style="width:20px;" /></span><br/>
<span class="antTitle">清零</span>
</span>
<span style="display:inline-block;margin-left:10%;" @click="showApiLog(item)">
<span class="tbClass"><img src="../../../../assets/iot/a4.png" style="width:20px;" /></span><br/>
<span class="antTitle">日志</span>
</span> </span>
</p> </p>
</a-card> </a-card>
</a-col> </a-col>
<a-col v-if="tableData.total==0" >
<div style="margin: 30px auto;">
<a-empty />
</div>
</a-col>
</a-row> </a-row>
<div <div v-if="tableData.total > 0"
style="float:right;bottom: 20px;z-index: 999;padding: 8px 16px;border-radius: 4px;display: flex;align-items: center;"> style="float:right;bottom: 20px;z-index: 999;padding: 8px 16px;border-radius: 4px;display: flex;align-items: center;">
<span style="margin-right: 10px;"> {{ tableData.total }} 条数据</span> <span style="margin-right: 10px;"> {{ tableData.total }} 条数据</span>
<Pagination showLessItems v-model:current="pageParams.pageNo" :pageSize="pageParams.pageSize" size="small" <Pagination showLessItems v-model:current="pageParams.pageNo" :pageSize="pageParams.pageSize" size="small"
@ -78,7 +101,9 @@
import { Pagination } from 'ant-design-vue'; import { Pagination } from 'ant-design-vue';
import ApiLogModal from "@/views/iot/tq/electricity/apilog/WaterApiLogModal.vue"; import ApiLogModal from "@/views/iot/tq/electricity/apilog/WaterApiLogModal.vue";
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { set } from 'lodash-es'; import { set } from 'lodash-es';
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
const formRef = ref(); const formRef = ref();
const queryParam = reactive<any>({}); const queryParam = reactive<any>({});
@ -215,4 +240,31 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
display: block; display: block;
position: absolute; position: absolute;
} }
.zxClass{
font-size:14px;
background: linear-gradient(to right, #1ea0fa, #017de9);
border-radius: 8px;
height: 35px;
color: white;
line-height: 35px;
}
.lxClass{
font-size:14px;
background: linear-gradient(to right, #cccccc, #cccccc);
border-radius: 8px;
height: 35px;
color: white;
line-height: 35px;
}
.tbClass{
background: #f6f6f6;
padding: 8px;
border-radius: 5px;
}
.antTitle{
margin-top: 10px;
display: block;
font-size: 12px;
}
</style> </style>

View File

@ -1,177 +0,0 @@
<template>
<div class="p-2">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="6">
<a-form-item name="sn">
<template #label><span title="同步类型">表号</span></template>
<a-input placeholder="请输入同步类型" v-model:value="queryParam.sn" allow-clear ></a-input>
</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>
</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;">
<template #title >
<div class="cardTitle">
<a-row>
<a-col :span="12">
<span style="margin-left:15px;font-size:14px;">表号{{item.sn}}</span>
</a-col>
<a-col :span="12" style="text-align: right;">
<span style="margin-right:15px;font-size:14px;">{{item.status=='0'?'在线':'离线'}}</span>
</a-col>
</a-row>
</div>
</template>
<p>
<span>护理单元名称{{item.nuName?item.nuName:'未配置'}}</span>
</p>
<p>
<span>上次抄表时间{{item.readTime?item.readTime:'未抄表'}}</span>
</p>
<p style="margin-top: 20px;">
<a-row>
<a-col :span="12">
<span><Statistic title="温度" :value="item.temperature?item.temperature:'无'" style="text-align:center;" /></span>
</a-col>
<a-col :span="12">
<span><Statistic title="湿度" :value="item.humidity?item.humidity:'无'" style="text-align:center;" /></span>
</a-col>
</a-row>
</p>
<a-divider />
<p style="text-align:center;">
<span>
<a @click="handleRead(item)">抄表</a>
<a-divider type="vertical" />
<a @click="handleEdit(item)">配置</a>
<a-divider type="vertical" />
<a @click="showApiLog(item)">日志</a>
</span>
</p>
</a-card>
</a-col>
</a-row>
<div
style="float:right;bottom: 20px;z-index: 999;padding: 8px 16px;border-radius: 4px;display: flex;align-items: center;">
<span style="margin-right: 10px;"> {{ tableData.total }} 条数据</span>
<Pagination showLessItems v-model:current="pageParams.pageNo" :pageSize="pageParams.pageSize" size="small"
show-quick-jumper :total="tableData.total" @change="reload" />
</div>
<!--引用表格-->
<ApiLogAlarmModal ref="apiLogAlarmModal"></ApiLogAlarmModal>
<DeviceInfoDrawer @register="registerDrawer" @success="handleSuccess" />
</div>
</template>
<script lang="ts" name="iot-nuIotRegionInfo" setup>
import {reactive, ref,h,onMounted} from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { Statistic } from 'ant-design-vue';
import {Modal} from "ant-design-vue";
import {list, eleReset, eleControl, eleRead } from './wsdDevice.api';
import {deleteDevice, updateDeviceRealTime} from './humid.api';
import { Pagination } from 'ant-design-vue';
import ApiLogAlarmModal from './components/ApiLogAlarmModal.vue'
import DeviceInfoDrawer from "./components/DeviceInfoDrawer.vue";
import { set } from 'lodash-es';
import {useDrawer} from "@/components/Drawer";
//drawer
const [registerDrawer, { openDrawer }] = useDrawer();
const formRef = ref();
const queryParam = reactive<any>({});
const apiLogAlarmModal = ref();
const tableData = ref<any>([]);
const pageParams = ref({ pageNo: 1, pageSize: 8 })
const labelCol = reactive({
xs:24,
sm:4,
xl:6,
xxl:4
});
const wrapperCol = reactive({
xs: 24,
sm: 20,
});
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
//
reload();
}
//
async function handleRead(record) {
const params = {
'sn' : record.sn,
};
await updateDeviceRealTime(params);
setTimeout(() => {
reload();
}, 4000);
}
//
async function handleEdit(record) {
record["isUpdate"] = true;
console.log(record);
openDrawer(true, {
record,
isUpdate: true,
showFooter: true,
tenantSaas: false,
});
}
/**
* 查看api日志
*/
function showApiLog(record){
apiLogAlarmModal.value.disableSubmit = true;
apiLogAlarmModal.value.showLogAlarm(record);
}
function reload(){
queryParam.pageSize = pageParams.value.pageSize;
queryParam.pageNo = pageParams.value.pageNo;
defHttp.get({url: '/iot/yiweilian/humidDevice/list',params:queryParam}).then(res => {
console.log("🚀 ~ defHttp.get ~ res:", res)
tableData.value = res;
});
}
//
onMounted(() => {
reload();
});
</script>
<style lang="less" scoped>
.cardTitle{
background: #1ea0fa;
width: 100%;
margin: -28px -24px;
padding-top: 15px;
border-radius: 5px 5px 0px 0px;
color: white;
height: 55px;
display: block;
position: absolute;
}
</style>

View File

@ -1,46 +0,0 @@
import { defHttp } from '/@/utils/http/axios';
enum Api {
list = '/iot/tq/waterMeter/list',
eleReset = '/iot/tq/waterMeter/eleReset',
eleControl = '/iot/tq/waterMeter/eleControl',
eleRead = '/iot/tq/waterMeter/eleRead',
getAllMeter = '/iot/tq/common/device/getAllMeter',
getAllCollector = '/iot/tq/common/device/getAllCollector',
}
/**
*
* @param params
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
/**
*
* @param params
*/
export const eleReset = (params?) => defHttp.get({ url: Api.eleReset, params });
/**
*
* @param params
*/
export const eleControl = (params?) => defHttp.get({ url: Api.eleControl, params });
/**
*
* @param params
*/
export const eleRead = (params?) => defHttp.get({ url: Api.eleRead, params });
/**
*
* @param params
*/
export const getAllMeter = (params?) => defHttp.get({ url: Api.getAllMeter, params });
/**
*
* @param params
*/
export const getAllCollector = (params?) => defHttp.get({ url: Api.getAllCollector, params });

View File

@ -1,6 +1,6 @@
<template> <template>
<!--引用表格--> <!--引用表格-->
<BasicTable @register="registerTable"> <BasicTable @register="registerTable" style="margin-top: -8px;">
<!--插槽:table标题--> <!--插槽:table标题-->
<template #tableTitle> <template #tableTitle>
</template> </template>
@ -30,6 +30,7 @@
columns:alarmColumns, columns:alarmColumns,
canResize:false, canResize:false,
showActionColumn: false, showActionColumn: false,
useSearchForm: false,
// showTableSetting: false, // showTableSetting: false,
formConfig: { formConfig: {
//labelWidth: 120, //labelWidth: 120,

View File

@ -1,6 +1,6 @@
<template> <template>
<!--引用表格--> <!--引用表格-->
<BasicTable @register="registerTable"> <BasicTable @register="registerTable" style="margin-top: -8px;">
<!--插槽:table标题--> <!--插槽:table标题-->
<template #tableTitle> <template #tableTitle>
</template> </template>
@ -31,6 +31,7 @@
canResize:false, canResize:false,
showActionColumn: false, showActionColumn: false,
// showTableSetting: false, // showTableSetting: false,
useSearchForm: false,
formConfig: { formConfig: {
//labelWidth: 120, //labelWidth: 120,
schemas: logQuerySchema, schemas: logQuerySchema,

View File

@ -25,7 +25,6 @@ import {Modal} from "ant-design-vue";
import {ExclamationCircleOutlined} from "@ant-design/icons-vue"; import {ExclamationCircleOutlined} from "@ant-design/icons-vue";
import { formSchema } from "../humid.data"; import { formSchema } from "../humid.data";
import {insertDevice, updateDevice, getDeviceParameters} from '../humid.api'; import {insertDevice, updateDevice, getDeviceParameters} from '../humid.api';
import {getMultitransUrl} from "@/views/iot/tplink/camera/camera.api";
// Emits // Emits
const emit = defineEmits(['success', 'register']); const emit = defineEmits(['success', 'register']);

View File

@ -14,7 +14,7 @@ export const columns: BasicColumn[] = [
dataIndex: 'nuName' dataIndex: 'nuName'
}, },
{ {
title: '设备序号', title: 'SN',
align: "center", align: "center",
dataIndex: 'sn' dataIndex: 'sn'
}, },
@ -99,7 +99,7 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 6 }, colProps: { span: 6 },
}, },
{ {
label: '设备序号', label: 'SN',
field: 'sn', field: 'sn',
component: 'Input', component: 'Input',
colProps: { span: 6 }, colProps: { span: 6 },
@ -127,7 +127,7 @@ export const formSchema: FormSchema[] = [
ifShow: false, ifShow: false,
}, },
{ {
label: '设备序号', label: 'SN',
field: 'sn', field: 'sn',
component: 'Input', component: 'Input',
dynamicDisabled: ({ values }) => { dynamicDisabled: ({ values }) => {
@ -347,108 +347,49 @@ export const formSchema: FormSchema[] = [
//列表数据 //列表数据
export const logColumns: BasicColumn[] = [ export const logColumns: BasicColumn[] = [
{ {
title: '设备序号', title: 'SN',
align: "center", align: "center",
dataIndex: 'sn' dataIndex: 'sn'
}, },
{ {
title: '操作时间', title: '抄表时间',
align: "center", align: "center",
dataIndex: 'optTime' dataIndex: 'optTime'
}, },
// {
// title: '数据上报时间',
// align: "center",
// dataIndex: 'reportingTime'
// },
// {
// title: '操作人',
// align: "center",
// dataIndex: 'optBy'
// },
{ {
title: '操作人', title: '温度',
align: "center", align: "center",
dataIndex: 'optBy' dataIndex: 'temperature',
}, },
{ {
title: '操作类型', title: '湿度',
align: "center", align: "center",
dataIndex: 'optType', dataIndex: 'humidity',
},
// {
// title: '设备状态',
// align: "center",
// dataIndex: 'status',
// customRender:({record})=>{
// return record.status?(record.status=='0'?'在线':'离线'):'';
// },
// },
{
title: '状态',
align: "center",
dataIndex: 'status',
customRender:({record})=>{ customRender:({record})=>{
if(record.optType == 'insert'){ return record.status?(record.status=='0'?'抄表成功':'抄表失败'):'';
return '新增';
}else if(record.optType == 'update'){
return '修改';
}else if(record.optType == 'delete'){
return '删除';
}else{
return '';
}
},
},
{
title: '记录间隔',
align: "center",
dataIndex: 'recordInterval'
},
{
title: '上报间隔',
align: "center",
dataIndex: 'reportingInterval'
},
{
title: '历史数据上报时刻',
align: "center",
dataIndex: 'historyReportTime'
},
{
title: '历史数据上报间隔',
align: "center",
dataIndex: 'historyInterval'
},
{
title: '温度预警-上限',
align: "center",
dataIndex: 'temperatureHigh'
},
{
title: '温度预警-下限',
align: "center",
dataIndex: 'temperatureLow'
},
{
title: '温度缓冲值',
align: "center",
dataIndex: 'temperatureBuffer'
},
{
title: '湿度预警-上限',
align: "center",
dataIndex: 'humidityHigh'
},
{
title: '湿度预警-下限',
align: "center",
dataIndex: 'humidityLow'
},
{
title: '湿度缓冲值',
align: "center",
dataIndex: 'humidityBuffer'
},
{
title: '断电报警',
align: "center",
dataIndex: 'izOutages',
customRender:({record})=>{
return record.izOutages?(record.izOutages=='0'?'开启':'关闭'):'';
},
},
{
title: '低电报警',
align: "center",
dataIndex: 'izLowBattery',
customRender:({record})=>{
return record.izLowBattery?(record.izLowBattery=='0'?'开启':'关闭'):'';
},
},
{
title: '上下线通知',
align: "center",
dataIndex: 'izOnline',
customRender:({record})=>{
return record.izOnline?(record.izOnline=='0'?'开启':'关闭'):'';
}, },
}, },
]; ];
@ -473,22 +414,22 @@ export const logQuerySchema: FormSchema[] = [
//列表数据 //列表数据
export const alarmColumns: BasicColumn[] = [ export const alarmColumns: BasicColumn[] = [
{ {
title: '设备序号', title: 'SN',
align: "center", align: "center",
dataIndex: 'sn' dataIndex: 'sn'
}, },
{ // {
title: '状态', // title: '状态',
align: "center", // align: "center",
dataIndex: 'status', // dataIndex: 'status',
customRender:({record})=>{ // customRender:({record})=>{
if(record.optType == '0'){ // if(record.optType == '0'){
return '告警'; // return '告警';
}else { // }else {
return '清除'; // return '清除';
} // }
}, // },
}, // },
{ {
title: '告警时间', title: '告警时间',
align: "center", align: "center",
@ -505,20 +446,20 @@ export const alarmColumns: BasicColumn[] = [
dataIndex: 'wrData' dataIndex: 'wrData'
}, },
{ {
title: '清除时间', title: '消除告警时间',
align: "center", align: "center",
dataIndex: 'clearDate' dataIndex: 'clearDate'
}, },
{ // {
title: '清除内容', // title: '清除内容',
align: "center", // align: "center",
dataIndex: 'clearContent' // dataIndex: 'clearContent'
}, // },
{ // {
title: '清除值', // title: '清除值',
align: "center", // align: "center",
dataIndex: 'clearData' // dataIndex: 'clearData'
}, // },
]; ];
export const alarmQuerySchema: FormSchema[] = [ export const alarmQuerySchema: FormSchema[] = [

View File

@ -0,0 +1,227 @@
<template>
<div class="p-2">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="6">
<a-form-item name="sn">
<template #label><span title="SN">SN</span></template>
<j-input placeholder="请输入SN" v-model:value="queryParam.sn" allow-clear ></j-input>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="nuId">
<template #label><span title="护理单元">护理单元</span></template>
<j-dict-select-tag type='list' v-model:value="queryParam.nuId" :dictCode="`nu_base_info,nu_name,nu_id`" placeholder="请选护理单元" allow-clear />
</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>
</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' }">
<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>
</a-row>
</template>
<a-row>
<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="24" style="padding: 12px 0 0 5px;margin-top:18px;">
<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 style="font-size: 30px;font-weight:700;">{{item.temperature?item.temperature:'-'}}</span>
<span style="font-size: 16px;"></span>
</a-col>
<a-col :span="2" style="text-align: center;">
<a-divider type="vertical" style="height: 40px;"/>
</a-col>
<a-col :span="11" style="text-align: center;">
<span style="margin-top:0px;"><img src="../../../assets/iot/a9.png" style="width:25px;margin-top: -15px;" /></span>
<span style="font-size: 30px;font-weight:700;margin-left: 6px;">{{item.humidity?item.humidity:'-'}}</span>
<span style="font-size: 16px;">%</span>
</a-col>
</a-row>
</a-col>
</a-row>
<a-divider />
<p style="text-align:center;">
<span style="display:inline-block;" @click="handleRead(item)">
<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%;" @click="handleEdit(item)">
<span class="tbClass"><img src="../../../assets/iot/a6.png" style="width:20px;" /></span><br/>
<span class="antTitle">配置</span>
</span>
<span style="display:inline-block;margin-left:10%;" @click="showApiLog(item)">
<span class="tbClass"><img src="../../../assets/iot/a4.png" style="width:20px;" /></span><br/>
<span class="antTitle">日志</span>
</span>
</p>
</a-card>
</a-col>
<a-col v-if="tableData.total==0" >
<div style="margin: 30px auto;">
<a-empty />
</div>
</a-col>
</a-row>
<div
style="float:right;bottom: 20px;z-index: 999;padding: 8px 16px;border-radius: 4px;display: flex;align-items: center;">
<span style="margin-right: 10px;"> {{ tableData.total }} 条数据</span>
<Pagination showLessItems v-model:current="pageParams.pageNo" :pageSize="pageParams.pageSize" size="small"
show-quick-jumper :total="tableData.total" @change="reload" />
</div>
<!--引用表格-->
<ApiLogAlarmModal ref="apiLogAlarmModal"></ApiLogAlarmModal>
<DeviceInfoDrawer @register="registerDrawer" @success="handleSuccess" />
</div>
</template>
<script lang="ts" name="iot-nuIotRegionInfo" setup>
import {reactive, ref,h,onMounted} from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { Statistic } from 'ant-design-vue';
import {Modal} from "ant-design-vue";
import {updateDeviceRealTime} from './humid.api';
import { Pagination } from 'ant-design-vue';
import ApiLogAlarmModal from './components/ApiLogAlarmModal.vue'
import DeviceInfoDrawer from "./components/DeviceInfoDrawer.vue";
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { set } from 'lodash-es';
import {useDrawer} from "@/components/Drawer";
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
//drawer
const [registerDrawer, { openDrawer }] = useDrawer();
const formRef = ref();
const queryParam = reactive<any>({});
const apiLogAlarmModal = ref();
const tableData = ref<any>([]);
const pageParams = ref({ pageNo: 1, pageSize: 8 })
const labelCol = reactive({
xs:24,
sm:4,
xl:6,
xxl:4
});
const wrapperCol = reactive({
xs: 24,
sm: 20,
});
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
//
reload();
}
//
async function handleRead(record) {
const params = {
'sn' : record.sn,
};
await updateDeviceRealTime(params);
setTimeout(() => {
reload();
}, 4000);
}
//
async function handleEdit(record) {
record["isUpdate"] = true;
console.log(record);
openDrawer(true, {
record,
isUpdate: true,
showFooter: true,
tenantSaas: false,
});
}
/**
* 查看api日志
*/
function showApiLog(record){
apiLogAlarmModal.value.disableSubmit = true;
apiLogAlarmModal.value.showLogAlarm(record);
}
function reload(){
queryParam.pageSize = pageParams.value.pageSize;
queryParam.pageNo = pageParams.value.pageNo;
defHttp.get({url: '/iot/yiweilian/humidDevice/list',params:queryParam}).then(res => {
console.log("🚀 ~ defHttp.get ~ res:", res)
tableData.value = res;
});
}
//
onMounted(() => {
reload();
});
</script>
<style lang="less" scoped>
.cardTitle{
background: #1ea0fa;
width: 100%;
margin: -28px -24px;
padding-top: 15px;
border-radius: 5px 5px 0px 0px;
color: white;
height: 55px;
display: block;
position: absolute;
}
.zxClass{
font-size:14px;
background: linear-gradient(to right, #1ea0fa, #017de9);
border-radius: 8px;
height: 35px;
color: white;
line-height: 35px;
}
.lxClass{
font-size:14px;
background: linear-gradient(to right, #cccccc, #cccccc);
border-radius: 8px;
height: 35px;
color: white;
line-height: 35px;
}
.tbClass{
background: #f6f6f6;
padding: 8px;
border-radius: 5px;
}
.antTitle{
margin-top: 10px;
display: block;
font-size: 12px;
}
</style>