Merge branch 'dev' of github.com:jetlinks/jetlinks-ui-vue into dev

This commit is contained in:
JiangQiming 2023-02-02 17:23:44 +08:00
commit 2c6e4173f8
10 changed files with 126 additions and 45 deletions

View File

@ -0,0 +1,7 @@
import server from '@/utils/request'
/**
*
* @param data
*/
export const queryList = (data: any) => server.post(`/network/card/stateOperate/_log`, data)

View File

@ -5,6 +5,8 @@
width="1100px"
:visible="true"
title="选择设备"
okText="确定"
cancelText="取消"
@ok="handleOk"
@cancel="handleCancel"
:confirmLoading="btnLoading"
@ -12,8 +14,9 @@
<div style="margin-top: 10px">
<Search
:columns="columns"
target="iot-card-management-search"
target="iot-card-bind-device"
@search="handleSearch"
type="simple"
/>
<JTable
ref="bindDeviceRef"
@ -121,9 +124,8 @@ const columns = [
},
];
const handleSearch = (params: any) => {
console.log(params);
params.value = params;
const handleSearch = (e: any) => {
params.value = e;
};
const onSelectChange = (record: any) => {

View File

@ -4,6 +4,8 @@
:maskClosable="false"
:visible="true"
title="导出"
okText="确定"
cancelText="取消"
@ok="handleOk"
@cancel="handleCancel"
>

View File

@ -4,6 +4,8 @@
:maskClosable="false"
:visible="true"
title="导入"
okText="确定"
cancelText="取消"
@ok="handleCancel"
@cancel="handleCancel"
>

View File

@ -4,6 +4,8 @@
width="600px"
:visible="true"
:title="type === 'add' ? '新增' : '编辑'"
okText="确定"
cancelText="取消"
@ok="handleOk"
@cancel="handleCancel"
:confirmLoading="btnLoading"

View File

@ -1,6 +1,6 @@
<!-- 物联卡管理 -->
<template>
<page-container class="container">
<page-container>
<Search
:columns="columns"
target="iot-card-management-search"
@ -124,10 +124,7 @@
</slot>
</template>
<template #content>
<h3
class="card-item-content-title"
@click.stop="handleView(slotProps.id)"
>
<h3 class="card-item-content-title">
{{ slotProps.id }}
</h3>
<a-row>
@ -553,6 +550,8 @@ const getActions = (
popConfirm: data.deviceId
? {
title: '确认解绑设备?',
okText: '确定',
cancelText: '取消',
onConfirm: async () => {
unbind(data.id).then((resp: any) => {
if (resp.status === 200) {
@ -599,6 +598,8 @@ const getActions = (
: data.cardStateType?.value === 'deactivate'
? '确认复机?'
: '确认停用?',
okText: '确定',
cancelText: '取消',
onConfirm: async () => {
if (data.cardStateType?.value === 'toBeActivated') {
changeDeploy(data.id).then((resp) => {
@ -633,6 +634,8 @@ const getActions = (
},
popConfirm: {
title: '确认删除?',
okText: '确定',
cancelText: '取消',
onConfirm: async () => {
const resp: any = await del(data.id);
if (resp.status === 200) {
@ -648,9 +651,8 @@ const getActions = (
];
};
const handleSearch = (params: any) => {
console.log(params);
params.value = params;
const handleSearch = (e: any) => {
params.value = e;
};
const onSelectChange = (keys: string[], rows: []) => {
@ -671,13 +673,6 @@ const handleClick = (dt: any) => {
}
};
/**
* 查看
*/
const handleView = (id: string) => {
message.warn(id + '暂未开发');
};
/**
* 新增
*/
@ -792,25 +787,19 @@ const handelRemove = async () => {
</script>
<style scoped lang="less">
.container {
.search {
width: calc(100% - 330px);
}
.flow-text {
font-size: 20px;
font-weight: 600;
}
.progress-text {
display: flex;
justify-content: space-between;
align-items: center;
}
:deep(.ant-progress-inner) {
border-radius: 0px;
}
:deep(.ant-progress-bg) {
border-radius: 0px;
}
.flow-text {
font-size: 20px;
font-weight: 600;
}
.progress-text {
display: flex;
justify-content: space-between;
align-items: center;
}
:deep(.ant-progress-inner) {
border-radius: 0px;
}
:deep(.ant-progress-bg) {
border-radius: 0px;
}
</style>

View File

@ -289,9 +289,8 @@ const getActions = (
];
};
const handleSearch = (params: any) => {
console.log(params);
params.value = params;
const handleSearch = (e: any) => {
params.value = e;
};
/**

View File

@ -4,6 +4,8 @@
width="600px"
:visible="true"
title="充值"
okText="确定"
cancelText="取消"
@ok="handleOk"
@cancel="handleCancel"
:confirmLoading="btnLoading"

View File

@ -151,9 +151,8 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
];
};
const handleSearch = (params: any) => {
console.log(params);
params.value = params;
const handleSearch = (e: any) => {
params.value = e;
};
/**

View File

@ -0,0 +1,77 @@
<!-- 操作记录 -->
<template>
<page-container>
<Search
:columns="columns"
target="record-search"
@search="handleSearch"
/>
<JTable
ref="RecordRef"
:columns="columns"
:request="queryList"
:defaultParams="{ sorts: [{ name: 'time', order: 'desc' }] }"
:params="params"
:model="'TABLE'"
>
<template #time="slotProps">
{{
slotProps.time
? moment(slotProps.time).format('YYYY-MM-DD HH:mm:ss')
: ''
}}
</template>
</JTable>
</page-container>
</template>
<script setup lang="ts">
import { queryList } from '@/api/iot-card/record';
import moment from 'moment';
const params = ref<Record<string, any>>({});
const columns = [
{
title: '卡号',
dataIndex: 'cardId',
key: 'cardId',
ellipsis: true,
search: {
type: 'string',
},
},
{
title: '操作类型',
dataIndex: 'type',
key: 'type',
search: {
type: 'string',
},
},
{
title: '操作时间',
dataIndex: 'time',
key: 'time',
scopedSlots: true,
search: {
type: 'date',
},
},
{
title: '操作人',
dataIndex: 'operator',
key: 'operator',
ellipsis: true,
search: {
type: 'string',
},
},
];
const handleSearch = (e: any) => {
params.value = e;
};
</script>
<style scoped lang="less"></style>