Bladeren bron

Merge branch 'master' of http://git.nzklabs.com:3000/huangyuanhao/jfcloud-coldchain

jackzhou 7 maanden geleden
bovenliggende
commit
a9a5d9ab52

+ 92 - 97
snowy-admin-web/src/views/motoring/analyse/curve.vue

@@ -1,104 +1,92 @@
 <template>
 	<div class="table_item">
 		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code">
-			<template #operator> </template>
+			<template #operator>
+				<div class="table-head">
+					<div class="head-left">
+						<a-form
+							ref="searchFormRef"
+							name="advanced_search"
+							layout="inline"
+							:model="searchFormState"
+							class="ant-advanced-search-form"
+						>
+							<a-form-item label="" name="searchKey">
+								<a-range-picker v-model:value="searchFormState.searchKey" value-format="YYYY/MM/DD" />
+							</a-form-item>
+
+							<a-form-item label="报警类型" name="type">
+								<a-select v-model:value="searchFormState.type" placeholder="请选择报警类型">
+									<a-select-option value="qst">趋势图</a-select-option>
+								</a-select>
+							</a-form-item>
+
+							<a-form-item label="是否展示全部区间" name="isshow">
+								<a-select v-model:value="searchFormState.isshow" placeholder="请选择是否展示全部区间">
+									<a-select-option value="1">是</a-select-option>
+									<a-select-option value="1">否</a-select-option>
+								</a-select>
+							</a-form-item>
+						</a-form>
+						<a-button type="primary" @click="tableRef.refresh(true)">查询</a-button>
+						<a-button class="xn-mg08" @click="reset">重置</a-button>
+					</div>
+					<div class="head-right">
+						<a-button>
+							<template #icon><setting-outlined /></template>设置
+						</a-button>
+					</div>
+				</div>
+			</template>
+			<template #headerCell="{ title, column }">
+				<template v-if="column.dataIndex === 'type'">
+					<text>{{ title }}</text>
+					<a-select ref="select" v-model:value="value1" style="width: 250px; margin-left: 10px">
+						<a-select-option value="1">二氧化碳浓度</a-select-option>
+					</a-select>
+				</template>
+			</template>
 		</s-table>
 
 		<div class="item-right">
 			<!-- 单位 -->
 			<div class="unit">
-				<a-input-search
-					v-model:value="searchValue"
-					style="margin-bottom: 8px"
-					placeholder="请输入单位名称"
-					@search="treeSelect"
-				/>
-				<a-tree
-					v-if="treeData"
-					show-icon
-					v-model:expandedKeys="defaultExpandedKeys"
-					:tree-data="treeData"
-					:field-names="treeFieldNames"
-				>
-					<template #icon="{ parentId }">
-						<template v-if="parentId == '0'">
-							<home-outlined />
-						</template>
-
-						<template v-else>
-							<cluster-outlined />
-						</template>
-					</template>
-				</a-tree>
+				<unitSearch ref="unitSearchRef" />
 			</div>
 			<!-- 监控点 -->
 			<div class="monitor">
-				<div class="monitor-search">
-					<a-input-search
-						v-model:value="searchValue"
-						style="margin-bottom: 8px"
-						placeholder="请输入对象-监控点名称"
-					/><a-button type="link">全选</a-button>
-				</div>
-				<a-checkbox-group v-model:value="checkboxValue" style="width: 100%">
-					<a-checkbox v-for="(item, index) in checkboxList" :key="index" :value="item.id" style="width: 100%">{{
-						item.name
-					}}</a-checkbox>
-				</a-checkbox-group>
+				<monitorSearch ref="monitorSearchRef" />
 			</div>
 		</div>
 	</div>
 </template>
 
 <script setup>
-	import tool from '@/utils/tool'
 	import jobApi from '@/api/dev/jobApi'
+	import unitSearch from './unitSearch.vue'
+	import monitorSearch from './monitorSearch.vue'
 
-	const searchValue = ref('') //单位名称搜索字段
-	const treeData = ref([
-		{
-			id: '1',
-			parentId: '0',
-			name: '广州海关技术中心',
-			children: [
-				{ id: '1-1', parentId: '1', name: '广州海关技术中心(生物岛)' },
-				{ id: '1-2', parentId: '1', name: '广州海关技术中心(机场路)' },
-				{ id: '1-3', parentId: '1', name: '广州海关技术中心(花都基地)' },
-				{ id: '1-4', parentId: '1', name: '广州海关技术中心(国家新能源汽车重点实验室科学城基地)' }
-			]
-		},
-		{
-			id: '2',
-			parentId: '0',
-			name: '海南海关技术中心'
-		}
-	]) //单位树形结构
-	const defaultExpandedKeys = ref([]) //  默认展开二级树的节点id
-	// 替换treeNode 中 title,key,children
-	const treeFieldNames = { children: 'children', title: 'name', key: 'id' }
-
-	const checkboxValue = ref([]) //监控点搜索字段
-
-	const checkboxList = ref([
-		{ name: '-89度超低温冷冻储存箱-监控点1', id: '1' },
-		{ name: '医用冰箱-监控点1', id: '2' },
-		{ name: '超低温冰箱-监控点1', id: '3' },
-		{ name: '-100度超低温冷冻储存箱-监控点2', id: '4' },
-		{ name: '医用冰箱-监控点2', id: '5' },
-		{ name: '超低温冰箱-监控点2', id: '6' }
-	]) //监控点数据
+	const unitSearchRef = ref(null)
+	const monitorSearchRef = ref(null)
+
+	const value1 = ref('1') //选择器
+
+	onMounted(() => {
+		unitSearchRef.value.onOpen() //获取单位数据
+		monitorSearchRef.value.onOpen() //获取监控点数据
+	})
 
+	// 搜索表单
 	const searchFormState = ref({
 		type: 'qst',
 		isshow: '1'
 	})
 	const tableRef = ref()
+
 	const columns = [
 		{
-			title: '',
-			dataIndex: 'aaa',
-			align: 'center',
-			ellipsis: true
+			title: '采集类型',
+			dataIndex: 'type'
 		}
 	]
 
@@ -115,11 +103,6 @@
 			return obj
 		})
 	}
-
-	// 点击树查询
-	const treeSelect = (selectedKeys) => {
-		console.log(selectedKeys, 'x')
-	}
 </script>
 
 <style lang="less" scoped>
@@ -128,18 +111,31 @@
 		display: flex;
 		padding: 15px 20px;
 
-		.table-head {
-			width: 100%;
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-
-			.head-left {
+		.table-wrapper {
+			width: 75%;
+			// 搜索及操作按钮区域
+			.table-head {
+				width: 100%;
 				display: flex;
-			}
+				align-items: center;
+				justify-content: space-between;
 
-			.ant-btn {
-				margin-left: 10px;
+				.head-left {
+					width: 90%;
+					display: flex;
+
+					.ant-form-inline {
+						width: 100%;
+
+						.ant-form-item {
+							flex: 1;
+						}
+					}
+				}
+
+				.ant-btn {
+					margin-left: 10px;
+				}
 			}
 		}
 
@@ -158,20 +154,19 @@
 				border: 1px solid #eaeaea;
 				overflow-y: auto;
 			}
-
-			.unit-head,
-			.monitor-search {
-				display: flex;
-			}
 		}
 	}
-	:deep(.ant-table-pagination-right) {
-		justify-content: center !important;
-	}
+	// 树形结构的样式
 	:deep(.ant-tree-treenode) {
 		width: 100%;
 		margin-bottom: 5px;
 		border-radius: 5px;
+		padding: 5px 0 !important;
 		border: 1px solid #eaeaea;
 	}
+
+	// 分页居中显示
+	:deep(.ant-table-pagination-right) {
+		justify-content: center !important;
+	}
 </style>

+ 44 - 92
snowy-admin-web/src/views/motoring/analyse/daily.vue

@@ -52,90 +52,32 @@
 		<div class="item-right">
 			<!-- 单位 -->
 			<div class="unit">
-				<a-input-search
-					v-model:value="searchValue"
-					style="margin-bottom: 8px"
-					placeholder="请输入单位名称"
-					@search="treeSelect"
-				/>
-				<a-tree
-					v-if="treeData"
-					show-icon
-					v-model:expandedKeys="defaultExpandedKeys"
-					:tree-data="treeData"
-					:field-names="treeFieldNames"
-				>
-					<template #icon="{ parentId }">
-						<template v-if="parentId == '0'">
-							<home-outlined />
-						</template>
-
-						<template v-else>
-							<cluster-outlined />
-						</template>
-					</template>
-				</a-tree>
+				<unitSearch ref="unitSearchRef" />
 			</div>
 			<!-- 监控点 -->
 			<div class="monitor">
-				<div class="monitor-search">
-					<a-input-search
-						v-model:value="searchValue"
-						style="margin-bottom: 8px"
-						placeholder="请输入对象-监控点名称"
-					/><a-button type="link">全选</a-button>
-				</div>
-				<a-checkbox-group v-model:value="checkboxValue" style="width: 100%">
-					<a-checkbox v-for="(item, index) in checkboxList" :key="index" :value="item.id" style="width: 100%">{{
-						item.name
-					}}</a-checkbox>
-				</a-checkbox-group>
+				<monitorSearch ref="monitorSearchRef" />
 			</div>
 		</div>
 	</div>
 </template>
 
 <script setup>
-	import tool from '@/utils/tool'
 	import jobApi from '@/api/dev/jobApi'
+	import unitSearch from './unitSearch.vue'
+	import monitorSearch from './monitorSearch.vue'
 
-	const searchValue = ref('') //单位名称搜索字段
-	const treeData = ref([
-		{
-			id: '1',
-			parentId: '0',
-			name: '广州海关技术中心',
-			children: [
-				{ id: '1-1', parentId: '1', name: '广州海关技术中心(生物岛)' },
-				{ id: '1-2', parentId: '1', name: '广州海关技术中心(机场路)' },
-				{ id: '1-3', parentId: '1', name: '广州海关技术中心(花都基地)' },
-				{ id: '1-4', parentId: '1', name: '广州海关技术中心(国家新能源汽车重点实验室科学城基地)' }
-			]
-		},
-		{
-			id: '2',
-			parentId: '0',
-			name: '海南海关技术中心'
-		}
-	]) //单位树形结构
-	const defaultExpandedKeys = ref([]) //  默认展开二级树的节点id
-	// 替换treeNode 中 title,key,children
-	const treeFieldNames = { children: 'children', title: 'name', key: 'id' }
-
-	const checkboxValue = ref([]) //监控点搜索字段
-
-	const checkboxList = ref([
-		{ name: '-89度超低温冷冻储存箱-监控点1', id: '1' },
-		{ name: '医用冰箱-监控点1', id: '2' },
-		{ name: '超低温冰箱-监控点1', id: '3' },
-		{ name: '-100度超低温冷冻储存箱-监控点2', id: '4' },
-		{ name: '医用冰箱-监控点2', id: '5' },
-		{ name: '超低温冰箱-监控点2', id: '6' }
-	]) //监控点数据
-
+	const unitSearchRef = ref(null)
+	const monitorSearchRef = ref(null)
 	const searchFormState = ref({
 		type: 'wd'
 	})
+
+	onMounted(() => {
+		unitSearchRef.value.onOpen() //获取单位数据
+		monitorSearchRef.value.onOpen() //获取监控点数据
+	})
+
 	const tableRef = ref()
 	const columns = [
 		{
@@ -233,11 +175,6 @@
 			return obj
 		})
 	}
-
-	// 点击树查询
-	const treeSelect = (selectedKeys) => {
-		console.log(selectedKeys, 'x')
-	}
 </script>
 
 <style lang="less" scoped>
@@ -246,18 +183,33 @@
 		display: flex;
 		padding: 15px 20px;
 
-		.table-head {
-			width: 100%;
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
+		// 表格区域
+		.table-wrapper {
+			width: 75%;
 
-			.head-left {
+			// 搜索及操作按钮区域
+			.table-head {
+				width: 100%;
 				display: flex;
-			}
+				align-items: center;
+				justify-content: space-between;
 
-			.ant-btn {
-				margin-left: 10px;
+				.head-left {
+					width: 70%;
+					display: flex;
+
+					.ant-form-inline {
+						width: 100%;
+
+						.ant-form-item {
+							flex: 1;
+						}
+					}
+				}
+
+				.ant-btn {
+					margin-left: 10px;
+				}
 			}
 		}
 
@@ -276,20 +228,20 @@
 				border: 1px solid #eaeaea;
 				overflow-y: auto;
 			}
-
-			.unit-head,
-			.monitor-search {
-				display: flex;
-			}
 		}
 	}
-	:deep(.ant-table-pagination-right) {
-		justify-content: center !important;
-	}
+
+	// 树形结构的样式
 	:deep(.ant-tree-treenode) {
 		width: 100%;
 		margin-bottom: 5px;
 		border-radius: 5px;
+		padding: 5px 0 !important;
 		border: 1px solid #eaeaea;
 	}
+
+	// 分页居中显示
+	:deep(.ant-table-pagination-right) {
+		justify-content: center !important;
+	}
 </style>

+ 173 - 2
snowy-admin-web/src/views/motoring/analyse/evaluate.vue

@@ -1,14 +1,185 @@
 <template>
-	<div class="table_item">管理评估</div>
+	<div class="table_item">
+		<s-table ref="tableRef" bordered :columns="columns" :data="loadData" :row-key="(record) => record.code">
+			<template #operator>
+				<div class="table-head">
+					<div class="head-left">
+						<a-form
+							ref="searchFormRef"
+							name="advanced_search"
+							layout="inline"
+							:model="searchFormState"
+							class="ant-advanced-search-form"
+						>
+							<a-form-item label="" name="searchKey">
+								<a-range-picker v-model:value="searchFormState.searchKey" value-format="YYYY/MM/DD" />
+							</a-form-item>
+						</a-form>
+						<a-button type="primary" @click="tableRef.refresh(true)">查询</a-button>
+						<a-button class="xn-mg08" @click="reset">重置</a-button>
+					</div>
+					<div class="head-right">
+						<a-button>
+							<template #icon><download-outlined /></template>导出
+						</a-button>
+						<a-button>
+							<template #icon><printer-outlined /></template>打印预览
+						</a-button>
+					</div>
+				</div>
+			</template>
+		</s-table>
+	</div>
 </template>
 
 <script setup>
-	import tool from '@/utils/tool'
 	import jobApi from '@/api/dev/jobApi'
+	const tableRef = ref()
+	const searchFormState = ref({})
+
+	const columns = [
+		{
+			title: '部门名称',
+			dataIndex: 'bmmc',
+			align: 'center',
+			ellipsis: true
+		},
+		{
+			title: '监控点总数',
+			dataIndex: 'jkdzs',
+			align: 'center',
+			ellipsis: true
+		},
+		{
+			title: '报警及处理情况',
+			dataIndex: 'bjzxz',
+			align: 'center',
+			ellipsis: true,
+			children: [
+				{
+					title: '报警总数',
+					dataIndex: 'bjzs',
+					align: 'center',
+					ellipsis: true
+				},
+				{
+					title: '未及时处理次数',
+					dataIndex: 'wjsclcs',
+					align: 'center',
+					ellipsis: true
+				}
+			]
+		},
+
+		{
+			title: '未按规定登录平台次数',
+			dataIndex: 'wagddlptcs',
+			align: 'center',
+			ellipsis: true
+		},
+
+		{
+			title: '冷链管理评估值',
+			dataIndex: 'llglpgz',
+			align: 'center',
+			ellipsis: true
+		}
+	]
+
+	const loadData = (parameter) => {
+		return jobApi.jobPage(Object.assign(parameter, searchFormState.value)).then((res) => {
+			// return res
+			const obj = {
+				current: 1,
+				pages: 1,
+				records: [
+					{
+						bmmc: '上海海关基数中心1',
+						jkdzs: 33,
+						bjzs: 1,
+						wjsclcs: 0,
+						wagddlptcs: 0,
+						llglpgz: 20
+					},
+					{
+						bmmc: '上海海关基数中心2',
+						jkdzs: 21,
+						bjzs: 0,
+						wjsclcs: 2,
+						wagddlptcs: 0,
+						llglpgz: 34
+					},
+					{
+						bmmc: '上海海关基数中心2',
+						jkdzs: 4,
+						bjzs: 6,
+						wjsclcs: 1,
+						wagddlptcs: 1,
+						llglpgz: 10
+					},
+					{
+						bmmc: '上海海关基数中心4',
+						jkdzs: 24,
+						bjzs: 3,
+						wjsclcs: 3,
+						wagddlptcs: 0,
+						llglpgz: 16
+					},
+					{
+						bmmc: '上海海关基数中心5',
+						jkdzs: 15,
+						bjzs: 0,
+						wjsclcs: 0,
+						wagddlptcs: 1,
+						llglpgz: 12
+					},
+					{
+						bmmc: '上海海关基数中心6',
+						jkdzs: 2,
+						bjzs: 0,
+						wjsclcs: 1,
+						wagddlptcs: 1,
+						llglpgz: 31
+					}
+				],
+				size: 10,
+				total: 6
+			}
+			return obj
+		})
+	}
 </script>
 
 <style lang="less" scoped>
 	.table_item {
+		width: 100%;
+		display: flex;
 		padding: 15px 20px;
+
+		// 表格区域
+		.table-wrapper {
+			width: 100%;
+
+			// 搜索及操作按钮区域
+			.table-head {
+				width: 100%;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+
+				.head-left {
+					display: flex;
+				}
+
+				.ant-btn {
+					margin-left: 10px;
+				}
+			}
+		}
+	}
+
+	// 分页居中显示
+	:deep(.ant-table-pagination-right) {
+		justify-content: center !important;
 	}
 </style>

+ 39 - 0
snowy-admin-web/src/views/motoring/analyse/monitorSearch.vue

@@ -0,0 +1,39 @@
+<template>
+	<div class="monitor-search">
+		<a-input-search
+			v-model:value="searchValue"
+			style="margin-bottom: 8px"
+			placeholder="请输入对象-监控点名称"
+		/><a-button type="link">全选</a-button>
+	</div>
+	<a-checkbox-group v-model:value="checkboxValue" style="width: 100%">
+		<a-checkbox v-for="(item, index) in checkboxList" :key="index" :value="item.id" style="width: 100%">{{
+			item.name
+		}}</a-checkbox>
+	</a-checkbox-group>
+</template>
+
+<script setup>
+	const searchValue = ref('') //单位名称搜索字段
+	const checkboxValue = ref([]) //全选
+	const checkboxList = ref([]) //监控点数据
+	const onOpen = () => {
+		checkboxList.value = [
+			{ name: '-89度超低温冷冻储存箱-监控点1', id: '1' },
+			{ name: '医用冰箱-监控点1', id: '2' },
+			{ name: '超低温冰箱-监控点1', id: '3' },
+			{ name: '-100度超低温冷冻储存箱-监控点2', id: '4' },
+			{ name: '医用冰箱-监控点2', id: '5' },
+			{ name: '超低温冰箱-监控点2', id: '6' }
+		]
+	}
+
+	defineExpose({
+		onOpen
+	})
+</script>
+<style lang="less" scoped>
+	.monitor-search {
+		display: flex;
+	}
+</style>

+ 61 - 0
snowy-admin-web/src/views/motoring/analyse/unitSearch.vue

@@ -0,0 +1,61 @@
+<template>
+	<a-input-search
+		v-model:value="searchValue"
+		style="margin-bottom: 8px"
+		placeholder="请输入单位名称"
+		@search="treeSelect"
+	/>
+	<a-tree
+		v-if="treeData"
+		show-icon
+		v-model:expandedKeys="defaultExpandedKeys"
+		:tree-data="treeData"
+		:field-names="treeFieldNames"
+	>
+		<template #icon="{ parentId }">
+			<template v-if="parentId == '0'">
+				<home-outlined />
+			</template>
+
+			<template v-else>
+				<cluster-outlined />
+			</template>
+		</template>
+	</a-tree>
+</template>
+
+<script setup>
+	const searchValue = ref('') //单位名称搜索字段
+	const treeData = ref([]) //单位树形结构
+	const defaultExpandedKeys = ref([]) //  默认展开二级树的节点id
+	const treeFieldNames = { children: 'children', title: 'name', key: 'id' } // 替换treeNode 中 title,key,children
+	const onOpen = () => {
+		treeData.value = [
+			{
+				id: '1',
+				parentId: '0',
+				name: '广州海关技术中心',
+				children: [
+					{ id: '1-1', parentId: '1', name: '广州海关技术中心(生物岛)' },
+					{ id: '1-2', parentId: '1', name: '广州海关技术中心(机场路)' },
+					{ id: '1-3', parentId: '1', name: '广州海关技术中心(花都基地)' },
+					{ id: '1-4', parentId: '1', name: '广州海关技术中心(国家新能源汽车重点实验室科学城基地)' }
+				]
+			},
+			{
+				id: '2',
+				parentId: '0',
+				name: '海南海关技术中心'
+			}
+		]
+	}
+	// 点击树查询
+	const treeSelect = (selectedKeys) => {
+		console.log(selectedKeys, 'x')
+	}
+
+	defineExpose({
+		onOpen
+	})
+</script>
+<style lang="less" scoped></style>