调整智能水表、智能电表、温湿度计的日志页面样式,调整边距等
This commit is contained in:
parent
8cceb6858a
commit
89a6923f5c
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable">
|
||||
<!--插槽:table标题-->
|
||||
|
|
@ -7,14 +7,14 @@
|
|||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
|
||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
<template v-if="column.dataIndex === 'requestValue'">
|
||||
<span >{{ (text == null || text == undefined) ? '-' : ((text == '0' || text == '0.00') ? 0 : text ) }}</span>
|
||||
<span>{{ (text == null || text == undefined) ? '-' : ((text == '0' || text == '0.00') ? 0 : text) }}</span>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'resolveValue'">
|
||||
<span >{{ (text == null || text == undefined) ? '-' : ((text == '0' || text == '0.00') ? 0 : text ) }}</span>
|
||||
<span>{{ (text == null || text == undefined) ? '-' : ((text == '0' || text == '0.00') ? 0 : text) }}</span>
|
||||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
|
|
@ -24,206 +24,212 @@
|
|||
</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 { columns, 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 { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, 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';
|
||||
|
||||
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,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
immediate: false,
|
||||
showActionColumn: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
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,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
immediate: false,
|
||||
showActionColumn: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
exportConfig: {
|
||||
name: "api请求日志",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(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,
|
||||
});
|
||||
},
|
||||
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);
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
searchQuery();
|
||||
}
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
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 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',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
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'
|
||||
}
|
||||
]
|
||||
}
|
||||
auth: 'nuIotTqApiRequestLog:nu_iot_tq_api_request_log:delete'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
function init(record) {
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
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();
|
||||
}
|
||||
queryParam.cid = record.cid;
|
||||
queryParam.type = record.type;
|
||||
reload();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
init,
|
||||
});
|
||||
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%;
|
||||
}
|
||||
.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>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable">
|
||||
<!--插槽:table标题-->
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable">
|
||||
<!--插槽:table标题-->
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<a-tabs v-model:activeKey="activeKey" type="card" @change="handleChange">
|
||||
<a-tab-pane key="3" tab="抄表" >
|
||||
<a-tab-pane key="3" tab="抄表">
|
||||
<ApiRequestLogList ref="ApiRequestLogListModal3"></ApiRequestLogList>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="9" tab="清零" force-render>
|
||||
|
|
@ -18,76 +18,86 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" name="departUtils-sysDepart" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { ref, reactive } from 'vue';
|
||||
|
||||
import ApiRequestLogList from '/@/views/iot/tq/ApiRequestLog/ApiRequestLogList.vue';
|
||||
import ApiRequestLogList2 from '/@/views/iot/tq/ApiRequestLog/ApiRequestLogList2.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 ApiRequestLogListModal9 = ref();
|
||||
const ApiRequestLogListModal3 = ref();
|
||||
const ApiRequestLogListModal10 = ref();
|
||||
const ApiRequestLogListModal11 = ref();
|
||||
function initLog(record){
|
||||
activeKey.value = "3";
|
||||
getDataList(activeKey.value, record);
|
||||
dbsbInfo.value = record;
|
||||
}
|
||||
function initLog(record) {
|
||||
activeKey.value = "3";
|
||||
getDataList(activeKey.value, record);
|
||||
dbsbInfo.value = record;
|
||||
}
|
||||
|
||||
function getDataList(type, record) {
|
||||
console.log("🚀 ~ getDataList ~ type, record:", type, record)
|
||||
var params = {
|
||||
type: type,
|
||||
cid: record.cid
|
||||
}
|
||||
if(type == '9'){
|
||||
ApiRequestLogListModal9.value.init(params);
|
||||
}else if(type == '3'){
|
||||
ApiRequestLogListModal3.value.init(params);
|
||||
}else if(type == '10'){
|
||||
ApiRequestLogListModal10.value.init(params);
|
||||
}else if(type == '11'){
|
||||
ApiRequestLogListModal11.value.init(params);
|
||||
}
|
||||
function getDataList(type, record) {
|
||||
console.log("🚀 ~ getDataList ~ type, record:", type, record)
|
||||
var params = {
|
||||
type: type,
|
||||
cid: record.cid
|
||||
}
|
||||
|
||||
|
||||
function handleChange(key) {
|
||||
console.log("🚀 ~ handleChange ~ key:", key)
|
||||
activeKey.value = key;
|
||||
getDataList(key, dbsbInfo.value);
|
||||
if (type == '9') {
|
||||
ApiRequestLogListModal9.value.init(params);
|
||||
} else if (type == '3') {
|
||||
ApiRequestLogListModal3.value.init(params);
|
||||
} else if (type == '10') {
|
||||
ApiRequestLogListModal10.value.init(params);
|
||||
} else if (type == '11') {
|
||||
ApiRequestLogListModal11.value.init(params);
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
initLog,
|
||||
});
|
||||
|
||||
function handleChange(key) {
|
||||
console.log("🚀 ~ handleChange ~ key:", key)
|
||||
activeKey.value = key;
|
||||
getDataList(key, dbsbInfo.value);
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
initLog,
|
||||
});
|
||||
|
||||
|
||||
</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%;
|
||||
}
|
||||
.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%;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.ant-tabs-nav) {
|
||||
margin: 0 0 0 0;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
<template>
|
||||
<!-- <j-modal :title="title" width="70%" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"> -->
|
||||
|
||||
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
|
||||
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
|
||||
<DepartUtilsList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></DepartUtilsList>
|
||||
|
||||
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
|
||||
:footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }" @close="handleCancel">
|
||||
<DepartUtilsList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false">
|
||||
</DepartUtilsList>
|
||||
<template #footer>
|
||||
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
|
||||
<!-- <a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button> -->
|
||||
|
|
@ -13,62 +14,62 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import DepartUtilsList from './ApiLogList.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<string>('70%');
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import DepartUtilsList from './ApiLogList.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
|
||||
/**
|
||||
* 日志
|
||||
* @param record
|
||||
*/
|
||||
function showApiLog(record) {
|
||||
title.value = '日志';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.initLog(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
const title = ref<string>('');
|
||||
const width = ref<string>('70%');
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback(params) {
|
||||
handleCancel();
|
||||
emit('success',params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
showApiLog,
|
||||
disableSubmit,
|
||||
/**
|
||||
* 日志
|
||||
* @param record
|
||||
*/
|
||||
function showApiLog(record) {
|
||||
title.value = '日志';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.initLog(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback(params) {
|
||||
handleCancel();
|
||||
emit('success', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
showApiLog,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<a-tabs v-model:activeKey="activeKey" type="card" @change="handleChange">
|
||||
<a-tab-pane key="42" tab="抄表" >
|
||||
<a-tab-pane key="42" tab="抄表">
|
||||
<ApiRequestLogList3 ref="ApiRequestLogListModal42"></ApiRequestLogList3>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="49" tab="清零" force-render>
|
||||
|
|
@ -18,76 +18,87 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" name="departUtils-sysDepart" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { ref, reactive } from 'vue';
|
||||
|
||||
import ApiRequestLogList3 from '/@/views/iot/tq/ApiRequestLog/ApiRequestLogList3.vue';
|
||||
import ApiRequestLogList2 from '/@/views/iot/tq/ApiRequestLog/ApiRequestLogList2.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 ApiRequestLogListModal42 = ref();
|
||||
const ApiRequestLogListModal43 = ref();
|
||||
const ApiRequestLogListModal49 = ref();
|
||||
const ApiRequestLogListModal53 = ref();
|
||||
function initLog(record){
|
||||
activeKey.value = "42";
|
||||
getDataList(activeKey.value, record);
|
||||
dbsbInfo.value = record;
|
||||
}
|
||||
function initLog(record) {
|
||||
activeKey.value = "42";
|
||||
getDataList(activeKey.value, record);
|
||||
dbsbInfo.value = record;
|
||||
}
|
||||
|
||||
function getDataList(type, record) {
|
||||
console.log("🚀 ~ getDataList ~ type, record:", type, record)
|
||||
var params = {
|
||||
type: type,
|
||||
cid: record.cid
|
||||
}
|
||||
if(type == '42'){
|
||||
ApiRequestLogListModal42.value.init(params);
|
||||
}else if(type == '43'){
|
||||
ApiRequestLogListModal43.value.init(params);
|
||||
}else if(type == '49'){
|
||||
ApiRequestLogListModal49.value.init(params);
|
||||
}else if(type == '53'){
|
||||
ApiRequestLogListModal53.value.init(params);
|
||||
}
|
||||
function getDataList(type, record) {
|
||||
console.log("🚀 ~ getDataList ~ type, record:", type, record)
|
||||
var params = {
|
||||
type: type,
|
||||
cid: record.cid
|
||||
}
|
||||
|
||||
|
||||
function handleChange(key) {
|
||||
console.log("🚀 ~ handleChange ~ key:", key)
|
||||
activeKey.value = key;
|
||||
getDataList(key, dbsbInfo.value);
|
||||
if (type == '42') {
|
||||
ApiRequestLogListModal42.value.init(params);
|
||||
} else if (type == '43') {
|
||||
ApiRequestLogListModal43.value.init(params);
|
||||
} else if (type == '49') {
|
||||
ApiRequestLogListModal49.value.init(params);
|
||||
} else if (type == '53') {
|
||||
ApiRequestLogListModal53.value.init(params);
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
initLog,
|
||||
});
|
||||
|
||||
function handleChange(key) {
|
||||
console.log("🚀 ~ handleChange ~ key:", key)
|
||||
activeKey.value = key;
|
||||
getDataList(key, dbsbInfo.value);
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
initLog,
|
||||
});
|
||||
|
||||
|
||||
</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%;
|
||||
}
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
margin-bottom: 14px;
|
||||
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 14px;
|
||||
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: 14px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
:deep(.ant-picker),
|
||||
:deep(.ant-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.ant-tabs-nav) {
|
||||
margin: 0 0 0 0;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<!-- <j-modal :title="title" width="70%" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"> -->
|
||||
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
|
||||
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
|
||||
:footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }" @close="handleCancel">
|
||||
<WaterApiLogList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></WaterApiLogList>
|
||||
<template #footer>
|
||||
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
|
||||
|
|
|
|||
|
|
@ -1,56 +1,84 @@
|
|||
<template>
|
||||
<a-tabs v-model:activeKey="activeKey" type="card" @change="handleChange">
|
||||
<a-tab-pane key="1" tab="抄表">
|
||||
<ApiLogList ref="apiLogList"></ApiLogList>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="告警" force-render>
|
||||
<AlarmList ref="alarmList"></AlarmList>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
<div class="p-2">
|
||||
<a-tabs v-model:activeKey="activeKey" type="card" @change="handleChange">
|
||||
<a-tab-pane key="1" tab="抄表">
|
||||
<ApiLogList ref="apiLogList"></ApiLogList>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="告警" force-render>
|
||||
<AlarmList ref="alarmList"></AlarmList>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="departUtils-sysDepart" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import ApiLogList from './ApiLogList.vue';
|
||||
import AlarmList from './AlarmList.vue';
|
||||
const activeKey= ref('1');
|
||||
const dbsbInfo = ref<any>({});
|
||||
const apiLogList = ref();
|
||||
const alarmList = ref();
|
||||
import { ref, reactive } from 'vue';
|
||||
import ApiLogList from './ApiLogList.vue';
|
||||
import AlarmList from './AlarmList.vue';
|
||||
const activeKey = ref('1');
|
||||
const dbsbInfo = ref<any>({});
|
||||
const apiLogList = ref();
|
||||
const alarmList = ref();
|
||||
|
||||
function init(record){
|
||||
activeKey.value = "1";
|
||||
getDataList(activeKey.value, record);
|
||||
dbsbInfo.value = record;
|
||||
function init(record) {
|
||||
activeKey.value = "1";
|
||||
getDataList(activeKey.value, record);
|
||||
dbsbInfo.value = record;
|
||||
}
|
||||
|
||||
function getDataList(type, record) {
|
||||
console.log("🚀 ~ getDataList ~ type, record:", type, record)
|
||||
var params = {
|
||||
sn: record.sn
|
||||
}
|
||||
|
||||
function getDataList(type, record) {
|
||||
console.log("🚀 ~ getDataList ~ type, record:", type, record)
|
||||
var params = {
|
||||
sn: record.sn
|
||||
}
|
||||
if(type == '1'){
|
||||
apiLogList.value.init(params);
|
||||
}else if(type == '2'){
|
||||
alarmList.value.init(params);
|
||||
}
|
||||
if (type == '1') {
|
||||
apiLogList.value.init(params);
|
||||
} else if (type == '2') {
|
||||
alarmList.value.init(params);
|
||||
}
|
||||
}
|
||||
|
||||
function handleChange(key) {
|
||||
console.log("🚀 ~ handleChange ~ key:", key)
|
||||
activeKey.value = key;
|
||||
getDataList(key, dbsbInfo.value);
|
||||
}
|
||||
function handleChange(key) {
|
||||
console.log("🚀 ~ handleChange ~ key:", key)
|
||||
activeKey.value = key;
|
||||
getDataList(key, dbsbInfo.value);
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
init,
|
||||
});
|
||||
defineExpose({
|
||||
init,
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
//:deep(.ant-tabs-nav){
|
||||
// margin: 0 !important;
|
||||
//}
|
||||
.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>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
<template>
|
||||
<!-- <j-modal :title="title" width="70%" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"> -->
|
||||
|
||||
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
|
||||
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
|
||||
<ApiLogAlarmList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ApiLogAlarmList>
|
||||
|
||||
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
|
||||
:footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }" @close="handleCancel">
|
||||
<ApiLogAlarmList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false">
|
||||
</ApiLogAlarmList>
|
||||
<template #footer>
|
||||
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
|
||||
<!-- <a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button> -->
|
||||
|
|
@ -13,62 +14,62 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import ApiLogAlarmList from './ApiLogAlarmList.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import ApiLogAlarmList from './ApiLogAlarmList.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<string>('70%');
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
const title = ref<string>('');
|
||||
const width = ref<string>('70%');
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
|
||||
/**
|
||||
* 日志
|
||||
* @param record
|
||||
*/
|
||||
function showLogAlarm(record) {
|
||||
title.value = '日志';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.init(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback(params) {
|
||||
handleCancel();
|
||||
emit('success',params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
showLogAlarm,
|
||||
disableSubmit,
|
||||
/**
|
||||
* 日志
|
||||
* @param record
|
||||
*/
|
||||
function showLogAlarm(record) {
|
||||
title.value = '日志';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.init(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback(params) {
|
||||
handleCancel();
|
||||
emit('success', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
showLogAlarm,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
|
|||
|
|
@ -111,5 +111,34 @@
|
|||
</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>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue