From 86c2d61ba9d33f1886cfc904dcaf17f033e4c80a Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 17 Jan 2026 13:52:53 +0800
Subject: [PATCH] Merge branch 'master' of http://139.196.74.78:10010/r/jagzwxm/ja_web

---
 applications/drone-command/src/views/basicManage/deviceStock/index.vue |  257 +++++++++++++++++++++++++++++++--------------------
 1 files changed, 156 insertions(+), 101 deletions(-)

diff --git a/applications/drone-command/src/views/basicManage/deviceStock/index.vue b/applications/drone-command/src/views/basicManage/deviceStock/index.vue
index e3c5c44..4c00e14 100644
--- a/applications/drone-command/src/views/basicManage/deviceStock/index.vue
+++ b/applications/drone-command/src/views/basicManage/deviceStock/index.vue
@@ -1,104 +1,114 @@
 <template>
 	<basic-container>
-		<el-form ref="queryParamsRef" :model="searchParams">
-			<el-row :gutter="16">
-				<el-col :span="4">
-					<el-form-item label="名称" prop="deviceName">
-						<el-input v-model="searchParams.deviceName" placeholder="请输入" clearable @clear="handleSearch" />
-					</el-form-item>
-				</el-col>
-				<el-col :span="4">
-					<el-form-item label="类型" prop="deviceType">
-						<el-select v-model="searchParams.deviceType" placeholder="请选择" clearable @change="handleSearch">
-							<el-option
-								v-for="item in dictObj.deviceType"
-								:key="item.dictKey"
-								:label="item.dictValue"
-								:value="item.dictKey"
-							/>
-						</el-select>
-					</el-form-item>
-				</el-col>
-				<el-col :span="4">
-					<el-form-item label="部门" prop="belongDept">
-						<el-tree-select
-							v-model="searchParams.belongDept"
-							:data="deptTree"
-							:props="treeProps"
-							node-key="id"
-							check-strictly
-							clearable
-							@change="handleSearch"
-						/>
-					</el-form-item>
-				</el-col>
-				<el-col :span="4">
-					<el-form-item label="时间">
-						<el-date-picker
-							popper-class="ztzf-date-picker-popper"
-							class="ztzf-date-picker"
-							v-model="dateRange"
-							type="daterange"
-							range-separator="至"
-							start-placeholder="开始日期"
-							end-placeholder="结束日期"
-							value-format="YYYY-MM-DD HH:mm:ss"
-							@change="handleSearch"
-						/>
-					</el-form-item>
-				</el-col>
-				<el-col :span="4">
-					<el-form-item>
-						<el-button @click="resetForm">重置</el-button>
-						<el-button type="primary" @click="handleSearch">查询</el-button>
-					</el-form-item>
-				</el-col>
-			</el-row>
+		<div class="chart">
+			<DeviceChart1 />
+			<DeviceChart2 />
+			<DeviceChart3 />
+		</div>
+
+		<el-form ref="queryParamsRef" :model="searchParams" class="command-page-history-search">
+			<el-form-item label="设备名称" prop="deviceName">
+				<el-input
+					class="command-data-cockpit-search-input"
+					v-model="searchParams.deviceName"
+					placeholder="请输入"
+					clearable
+					@clear="handleSearch"
+				/>
+			</el-form-item>
+
+			<el-form-item label="设备类型" prop="deviceType">
+				<el-select
+					class="command-data-cockpit-select"
+					popper-class="command-data-cockpit-select-popper"
+					v-model="searchParams.deviceType"
+					placeholder="请选择"
+					clearable
+					@change="handleSearch"
+				>
+					<el-option
+						v-for="item in dictObj.deviceType"
+						:key="item.dictKey"
+						:label="item.dictValue"
+						:value="item.dictKey"
+					/>
+				</el-select>
+			</el-form-item>
+
+			<el-form-item label="所属部门" prop="belongDept">
+				<el-tree-select
+					class="command-data-cockpit-select"
+					popper-class="command-data-cockpit-tree-select-popper"
+					v-model="searchParams.belongDept"
+					:data="deptTree"
+					:props="treeProps"
+					node-key="id"
+					check-strictly
+					clearable
+					@change="handleSearch"
+				/>
+			</el-form-item>
+			<el-form-item class="history-search-actions">
+				<el-button :icon="RefreshRight" @click="resetForm"></el-button>
+				<el-button class="search-btn" :icon="Search" @click="handleSearch"></el-button>
+			</el-form-item>
 		</el-form>
-		<div>
-			<el-button type="primary" @click="handleAdd">新增</el-button>
-			<el-button type="primary" @click="exportFile" :loading="exportLoading">导出</el-button>
+
+		<div class="command-table-toolbar">
+			<el-button :icon="Plus" color="#284FE3" type="primary" @click="handleAdd">设备建档</el-button>
 			<!--			<el-button type="danger" :disabled="!selectedIds.length" @click="handleDelete()">删除</el-button>-->
 		</div>
-		<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
-			<el-table-column type="selection" width="55" />
-			<el-table-column type="index" width="60" label="序号" />
-			<el-table-column prop="deviceName" label="设备名称" />
-			<el-table-column prop="deviceType" label="类型">
-				<template v-slot="{ row }">
-					{{ getDictLabel(row.deviceType, dictObj.deviceType) }}
-				</template>
-			</el-table-column>
-			<el-table-column prop="deviceModel" label="型号" />
-			<el-table-column prop="deviceSpecification" label="规格" />
-			<el-table-column prop="manufacturer" label="生产厂商" />
-			<el-table-column prop="createTime" label="入库时间" />
-			<el-table-column prop="source" label="来源" />
-			<el-table-column prop="purpose" label="用途" />
-			<el-table-column prop="belongDeptName" label="所属部门" />
-			<el-table-column prop="charger" label="负责人" />
-			<el-table-column prop="yxzt" label="运行状态">
-				<template v-slot="{ row }">
-					{{ DEVICE_STATUS[row.status] || '-' }}
-				</template>
-			</el-table-column>
-			<el-table-column label="操作">
-				<template v-slot="{ row }">
-					<el-link @click="handleView(row)" type="primary">查看</el-link>
-					<el-link @click="handleEdit(row)" type="warning">编辑</el-link>
-					<el-link @click="outbound(row)" type="warning">出库</el-link>
-					<el-link @click="scrap(row)" type="warning" v-if="row.status !== 3">报废</el-link>
-					<!--					<el-link @click="handleDelete(row)" type="danger">删除</el-link>-->
-				</template>
-			</el-table-column>
-		</el-table>
-		<div>
-			<el-pagination
-				v-model:current-page="searchParams.current"
-				v-model:page-size="searchParams.size"
-				:total="total"
-				@change="getList"
-			/>
+
+		<div class="command-table-container" v-loading="loading" element-loading-background="rgba(5, 5, 15, 0.6)">
+			<div class="command-table-content command-table-content-bg">
+				<el-table class="command-data-cockpit-table" :data="list" @selection-change="handleSelectionChange">
+					<el-table-column type="selection" width="46" />
+					<el-table-column type="index" show-overflow-tooltip width="64" label="序号" />
+					<el-table-column prop="deviceName" show-overflow-tooltip width="130" label="设备名称" />
+					<el-table-column prop="deviceType" show-overflow-tooltip width="130" label="设备类型">
+						<template v-slot="{ row }">
+							{{ getDictLabel(row.deviceType, dictObj.deviceType) }}
+						</template>
+					</el-table-column>
+					<el-table-column prop="deviceModel" show-overflow-tooltip width="98" label="型号" />
+					<el-table-column prop="deviceSpecification" show-overflow-tooltip width="112" label="规格" />
+					<el-table-column prop="manufacturer" show-overflow-tooltip width="130" label="生产厂商" />
+					<el-table-column prop="createTime" show-overflow-tooltip width="96" label="入库时间">
+						<template v-slot="{ row }">
+							{{ dayjs(row.createTime).format('YYYY-MM-DD') }}
+						</template>
+					</el-table-column>
+					<el-table-column prop="source" show-overflow-tooltip width="112" label="来源" />
+					<el-table-column prop="purpose" show-overflow-tooltip width="206" label="用途" />
+					<el-table-column prop="belongDeptName" show-overflow-tooltip width="124" label="所属部门" />
+					<el-table-column prop="charger" show-overflow-tooltip width="100" label="负责人" />
+					<el-table-column prop="yxzt" show-overflow-tooltip width="116" label="运行状态">
+						<template v-slot="{ row }">
+							{{ getDictLabel(row.status, dictObj.deviceStatus) }}
+						</template>
+					</el-table-column>
+					<el-table-column label="操作" class-name="operation-btns">
+						<template v-slot="{ row }">
+							<el-link @click="handleView(row)">查看</el-link>
+							<el-link @click="handleEdit(row)">编辑</el-link>
+							<el-link @click="outbound(row)">出库</el-link>
+							<el-link @click="scrap(row)" v-if="row.status !== 3">报废</el-link>
+							<!--					<el-link @click="handleDelete(row)" type="danger">删除</el-link>-->
+						</template>
+					</el-table-column>
+				</el-table>
+			</div>
+
+			<div class="command-table-pagination">
+				<el-pagination
+					popper-class="command-data-cockpit-select-popper"
+					v-model:current-page="searchParams.current"
+					v-model:page-size="searchParams.size"
+					layout="total, prev, pager, next, sizes"
+					:total="total"
+					@change="getList"
+				/>
+			</div>
 		</div>
 
 		<FormDiaLog ref="dialogRef" @success="getList" />
@@ -108,16 +118,20 @@
 </template>
 
 <script setup>
+import { Search, RefreshRight, Plus, Download } from '@element-plus/icons-vue'
 import { onMounted, ref } from 'vue'
 import { ElMessage, ElMessageBox } from 'element-plus'
 import { exportFwDeviceApi, fwDevicePageApi, fwDeviceRemoveApi } from '@/views/basicManage/deviceStock/fwDevice'
 import FormDiaLog from './FormDiaLog.vue'
 import { getDictionaryByCode } from '@/api/system/dictbiz'
 import { getDeptTree } from '@/api/system/dept'
-import { blobDownload, dateRangeFormat, getDictLabel } from '@ztzf/utils'
-import { DEVICE_STATUS } from '@ztzf/constants'
+import { blobDownload, dateRangeFormat, getDictLabel, formatDateToSlash } from '@ztzf/utils'
 import DeviceTrackDiaLog from '@/views/basicManage/deviceStock/DeviceTrackDiaLog.vue'
 import DeviceScrapDiaLog from '@/views/basicManage/deviceStock/DeviceScrapDiaLog.vue'
+import DeviceChart1 from '@/views/basicManage/deviceStock/DeviceChart1.vue'
+import DeviceChart2 from '@/views/basicManage/deviceStock/DeviceChart2.vue'
+import DeviceChart3 from '@/views/basicManage/deviceStock/DeviceChart3.vue'
+import dayjs from 'dayjs'
 
 const initSearchParams = () => ({
 	deviceName: '', // 设备名称
@@ -127,7 +141,7 @@
 	size: 10, // 每页大小
 })
 const searchParams = ref(initSearchParams()) // 查询参数
-const loading = ref(false) // 列表加载中
+const loading = ref(true) // 列表加载中
 const list = ref([]) // 列表数据
 const total = ref(0) // 总数
 const selectedIds = ref([]) // 勾选的设备ID列表
@@ -224,7 +238,7 @@
 
 // 获取字典
 function getDictList() {
-	getDictionaryByCode('deviceType,deviceAtt').then(res => {
+	getDictionaryByCode('deviceType,deviceAtt,deviceStatus').then(res => {
 		dictObj.value = res.data.data
 	})
 }
@@ -247,4 +261,45 @@
 	getDeptTreeFun()
 })
 </script>
-<style scoped lang="scss"></style>
+<style scoped lang="scss">
+.chart {
+	margin-bottom: 30px;
+	width: 100%;
+	height: 234px;
+	display: flex;
+	:deep() {
+		* {
+			box-sizing: border-box;
+		}
+		.deviceChart {
+			margin-left: 20px;
+			height: 100%;
+			background: rgba(26, 26, 42, 0.3);
+			border-radius: 10px 10px 10px 10px;
+			position: relative;
+			display: flex;
+			flex-direction: column;
+			justify-content: space-between;
+			align-items: center;
+			padding: 10px;
+
+			&:first-child {
+				margin-left: 0;
+			}
+
+			.titleBg {
+				font-weight: 400;
+				font-size: 18px;
+				color: #ffffff;
+				font-family: PangMen, serif;
+				padding-left: 22px;
+			}
+			.chartBox {
+				width: 100%;
+				height: 0;
+				flex-grow: 1;
+			}
+		}
+	}
+}
+</style>

--
Gitblit v1.9.3