Browse Source

Merge remote-tracking branch 'origin/master'

master
yuliang 6 months ago
parent
commit
7a29f6c835
  1. 42
      src/editor/widgets/task/TaskView2.vue
  2. 2
      src/router/index.ts
  3. 27
      src/views/Home.less
  4. 16
      src/views/device/vehicles.vue
  5. 8
      src/views/inventory/account.vue
  6. 13
      src/views/inventory/query.vue
  7. 14
      src/views/user/roles.vue
  8. 14
      src/views/user/users.vue

42
src/editor/widgets/task/TaskView2.vue

@ -5,6 +5,8 @@ import { localeText as localeTextCn } from "@/components/yvTable/yv-aggrid-cn.lo
import { Request } from "@ease-forge/shared";
import type { GridOptions } from "ag-grid-enterprise";
import type { GridApi, GridReadyEvent } from "ag-grid-community";
import { Refresh } from "@element-plus/icons-vue";
import { ElButton, ElInput, ElSwitch } from "element-plus";
defineOptions({
name: 'TaskView',
@ -20,12 +22,14 @@ const props = withDefaults(defineProps<TaskViewProps>(), {});
// State
interface TaskViewState {
loading: boolean;
automaticTracking: boolean;
grid1Data: Array<any>;
}
// state
const state = reactive<TaskViewState>({
loading: false,
automaticTracking: false,
grid1Data: [],
});
@ -50,6 +54,7 @@ const data: TaskViewData = {
{ field: 'type', headerName: '类型', width: 120 },
{ field: 'status', headerName: '状态', width: 120 },
{ field: 'err', headerName: '异常' },
{ field: 'progress', headerName: '进度' },
{ field: 'payload', headerName: '任务负载', width: 600 },
{ field: 'priority', headerName: '优先级', width: 120 },
{ field: 'info', headerName: '任务明细', width: 800 },
@ -65,7 +70,7 @@ const data: TaskViewData = {
field: 'title',
width: 300,
},
groupDefaultExpanded: -1,
// groupDefaultExpanded: -1,
onGridReady(event: GridReadyEvent) {
data.api = event.api;
},
@ -160,12 +165,13 @@ function toTreeData(data: Array<any>) {
info: `报文类型: ${device.packetType}, 报文目标点: ${device.packetEndPoint}, 报文内容: ${device.packetPayload}, 执行器ID: ${device.deviceItemId}`,
children: [],
};
// planNode.children.push(deviceNode);
planNode.children.push(deviceNode);
tree.push(deviceNode);
}
// bizNode.children.push(planNode);
bizNode.children.push(planNode);
tree.push(planNode);
}
bizNode.progress = `${bizNode.children.filter(item => item.status === PlanTaskStatus.FINISHED).length}/${bizNode.children.length}`;
tree.push(bizNode);
}
return tree;
@ -190,10 +196,27 @@ export type {
</script>
<template>
<div class="task-view">
<div class="task-view flex-column-container">
<div class="tools flex-item-fixed flex-row-container">
<ElButton :icon="Refresh" :loading="state.loading" @click="reload">刷新</ElButton>
<div class="flex-row-container flex-align-items-center">
<div class="flex-item-fixed" style="padding-right: 4px;">自动追踪:</div>
<ElSwitch
class="flex-item-fixed"
v-model="state.automaticTracking"
inline-prompt
active-text="开启"
inactive-text="关闭"
/>
</div>
<div class="flex-row-container flex-align-items-center">
<div class="flex-item-fixed" style="padding-right: 4px;">筛选过滤:</div>
<ElInput class="flex-item-fixed" placeholder="关键字"/>
</div>
</div>
<AgGridVue
ref="gridRef"
:class="['ag-theme-alpine', 'yv-table', 'hi-light-selected-row','allow-vertical-line', 'grid1']"
:class="['ag-theme-alpine', 'yv-table', 'hi-light-selected-row','allow-vertical-line', 'flex-item-fill','grid1']"
v-bind="{...data.gridSetting}"
:modelValue="state.grid1Data"
>
@ -206,7 +229,12 @@ export type {
height: 100%;
}
.task-view > .grid1 {
height: 100%;
.tools {
padding: 8px;
column-gap: 8px;
}
.task-view .grid1 {
}
</style>

2
src/router/index.ts

@ -32,7 +32,7 @@ const router = createRouter({
meta: {
title: '任务查询'
},
component: () => import('@/views/taskManagement/taskQuery.vue')
component: () => import('@/editor/widgets/task/TaskView2.vue')
},
{
path: '/automatedPresentation',

27
src/views/Home.less

@ -41,5 +41,32 @@
font-weight: 300;
}
}
.ag-ltr .ag-row .ag-cell{
border-right:1px solid #ebeef5;
&:last-child{
border-right:none;
}
&[tabindex="-1"]{
border-right:1px solid #ebeef5;
}
}
.ag-header-cell{
border-right:1px solid #dfe6ec;
&:last-child{
border-right:none;
}
&[tabindex="-1"]{
border-right:1px solid #dfe6ec;
}
}
}
}
.el-breadcrumb{
font-size: 16px;
}
@media (max-width: 768px) {
.data-form-row{
flex-wrap: wrap!important;
}
}

16
src/views/device/vehicles.vue

@ -102,19 +102,17 @@ function reload() {
</script>
<template>
<div class="dashboard flex-column-container">
<div class="tools flex-item-fixed">
<ElButton :icon="Search" :loading="state.loading" @click="reload">查询</ElButton>
<div class="common-layout dashboard flex-column-container">
<div class="flex-item-fixed toolbar">
<ElButton :icon="Search" :loading="state.loading" @click="reload" type="warning" plain>查询</ElButton>
</div>
<DataForm
class="query-form flex-item-fixed"
style="width: 500px;"
:data="state.queryData"
:formFields="data.formFields"
:columnCount="2"
:columnCount="4"
layout="bothFixed"
labelWidth="120px"
inputWidth="200px"
:inline="true"
/>
<AgGridVue
ref="gridRef"
@ -131,10 +129,6 @@ function reload() {
height: 100%;
}
.tools {
margin-bottom: 8px;
}
.query-form {
height: unset;
}

8
src/views/inventory/account.vue

@ -114,19 +114,19 @@ function serverSideDatasource(params: IServerSideGetRowsParams) {
</script>
<template>
<div class="dashboard flex-column-container">
<div class="tools flex-item-fixed">
<ElButton :icon="Search" :loading="state.loading" @click="reload">查询</ElButton>
<div class="common-layout dashboard flex-column-container">
<div class="flex-item-fixed toolbar">
<ElButton :icon="Search" :loading="state.loading" @click="reload" type="warning" plain>查询</ElButton>
</div>
<DataForm
class="query-form flex-item-fixed"
style="width: 500px;"
:data="state.queryData"
:formFields="data.formFields"
:columnCount="2"
layout="bothFixed"
labelWidth="85px"
inputWidth="200px"
:inline="true"
/>
<AgGridVue
ref="gridRef"

13
src/views/inventory/query.vue

@ -127,19 +127,19 @@ function serverSideDatasource(params: IServerSideGetRowsParams) {
</script>
<template>
<div class="dashboard flex-column-container">
<div class="tools flex-item-fixed">
<ElButton :icon="Search" :loading="state.loading" @click="reload">查询</ElButton>
<div class="common-layout dashboard flex-column-container">
<div class="flex-item-fixed toolbar">
<ElButton :icon="Search" :loading="state.loading" @click="reload" type="warning" plain>查询</ElButton>
</div>
<DataForm
class="query-form flex-item-fixed"
style="width: 500px;"
:data="state.queryData"
:formFields="data.formFields"
:columnCount="2"
layout="bothFixed"
labelWidth="85px"
inputWidth="200px"
:inline="true"
/>
<AgGridVue
ref="gridRef"
@ -154,11 +154,6 @@ function serverSideDatasource(params: IServerSideGetRowsParams) {
.dashboard {
height: 100%;
}
.tools {
margin-bottom: 8px;
}
.query-form {
height: unset;
}

14
src/views/user/roles.vue

@ -197,22 +197,22 @@ function delRole() {
</script>
<template>
<div class="dashboard flex-column-container">
<div class="tools flex-item-fixed">
<ElButton :icon="Search" :loading="state.loading" @click="reload">查询</ElButton>
<div class="common-layout dashboard flex-column-container">
<div class="toolbar flex-item-fixed">
<ElButton :icon="Search" :loading="state.loading" @click="reload" type="warning" plain>查询</ElButton>
<ElButton :icon="Plus" @click="addOrUpdate(true)">新增</ElButton>
<ElButton :icon="EditPen" @click="addOrUpdate(false)">编辑</ElButton>
<ElButton :icon="Delete" type="danger" :plain="true" @click="delRole">删除</ElButton>
</div>
<DataForm
class="query-form flex-item-fixed"
style="width: 500px;"
:data="state.queryData"
:formFields="data.formFields"
:columnCount="2"
:columnCount="4"
layout="bothFixed"
labelWidth="85px"
inputWidth="200px"
:inline="true"
/>
<AgGridVue
ref="gridRef"
@ -229,10 +229,6 @@ function delRole() {
height: 100%;
}
.tools {
margin-bottom: 8px;
}
.query-form {
height: unset;
}

14
src/views/user/users.vue

@ -210,22 +210,22 @@ function delUser() {
</script>
<template>
<div class="dashboard flex-column-container">
<div class="tools flex-item-fixed">
<ElButton :icon="Search" :loading="state.loading" @click="reload">查询</ElButton>
<div class="common-layout dashboard flex-column-container">
<div class="toolbar flex-item-fixed">
<ElButton :icon="Search" :loading="state.loading" @click="reload" type="warning" plain>查询</ElButton>
<ElButton :icon="Plus" @click="addOrUpdate(true)">新增</ElButton>
<ElButton :icon="EditPen" @click="addOrUpdate(false)">编辑</ElButton>
<ElButton :icon="Delete" type="danger" :plain="true" @click="delUser">删除</ElButton>
</div>
<DataForm
class="query-form flex-item-fixed"
style="width: 500px;"
:data="state.queryData"
:formFields="data.formFields"
:columnCount="2"
:columnCount="4"
layout="bothFixed"
labelWidth="85px"
inputWidth="200px"
:inline="true"
/>
<AgGridVue
ref="gridRef"
@ -241,10 +241,6 @@ function delUser() {
height: 100%;
}
.tools {
margin-bottom: 8px;
}
.query-form {
height: unset;
}

Loading…
Cancel
Save