|
|
@@ -30,7 +30,7 @@ const deptId = useUserStore().getUser.deptId || rootDeptId
|
|
|
const initQuery: QueryParams = {
|
|
|
pageNo: 1,
|
|
|
pageSize: 10,
|
|
|
- deptId: undefined,
|
|
|
+ deptId,
|
|
|
deviceCode: undefined,
|
|
|
deviceName: undefined,
|
|
|
brand: undefined,
|
|
|
@@ -146,26 +146,22 @@ onMounted(() => {
|
|
|
|
|
|
<template>
|
|
|
<div
|
|
|
- class="device-allot-page grid grid-cols-[auto_1fr] grid-rows-[auto_1fr] gap-4 h-[calc(100vh-20px-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))]"
|
|
|
- >
|
|
|
+ class="device-allot-page grid grid-cols-[auto_1fr] grid-rows-[auto_1fr] gap-4 h-[calc(100vh-20px-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))]">
|
|
|
<DeptTreeSelect
|
|
|
:top-id="rootDeptId"
|
|
|
:deptId="deptId"
|
|
|
v-model="queryParams.deptId"
|
|
|
- :init-select="false"
|
|
|
:show-title="false"
|
|
|
request-api="getSimpleDeptList"
|
|
|
class="device-allot-tree row-span-2"
|
|
|
- @node-click="handleDeptNodeClick"
|
|
|
- />
|
|
|
+ @node-click="handleDeptNodeClick" />
|
|
|
|
|
|
<el-form
|
|
|
ref="queryFormRef"
|
|
|
:model="queryParams"
|
|
|
size="default"
|
|
|
label-width="68px"
|
|
|
- class="device-allot-query bg-white dark:bg-[#1d1e1f] rounded-lg shadow px-6 py-3 min-w-0"
|
|
|
- >
|
|
|
+ class="device-allot-query bg-white dark:bg-[#1d1e1f] rounded-lg shadow px-6 py-3 min-w-0">
|
|
|
<div class="query-row">
|
|
|
<el-form-item :label="t('devicePerson.deviceCode')" prop="deviceCode">
|
|
|
<el-input
|
|
|
@@ -173,8 +169,7 @@ onMounted(() => {
|
|
|
:placeholder="t('devicePerson.codeHolder')"
|
|
|
clearable
|
|
|
class="query-control"
|
|
|
- @keyup.enter="handleQuery"
|
|
|
- />
|
|
|
+ @keyup.enter="handleQuery" />
|
|
|
</el-form-item>
|
|
|
<el-form-item :label="t('devicePerson.deviceName')" prop="deviceName">
|
|
|
<el-input
|
|
|
@@ -182,22 +177,19 @@ onMounted(() => {
|
|
|
:placeholder="t('devicePerson.nameHolder')"
|
|
|
clearable
|
|
|
class="query-control"
|
|
|
- @keyup.enter="handleQuery"
|
|
|
- />
|
|
|
+ @keyup.enter="handleQuery" />
|
|
|
</el-form-item>
|
|
|
<el-form-item :label="t('deviceStatus.transfer')" prop="setFlag" label-width="90px">
|
|
|
<el-select
|
|
|
v-model="queryParams.setFlag"
|
|
|
:placeholder="t('deviceStatus.choose')"
|
|
|
clearable
|
|
|
- class="query-control query-control--small"
|
|
|
- >
|
|
|
+ class="query-control query-control--small">
|
|
|
<el-option
|
|
|
v-for="dict in resultOptions"
|
|
|
:key="dict.value"
|
|
|
:label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
- />
|
|
|
+ :value="dict.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="创建时间" prop="createTime">
|
|
|
@@ -209,27 +201,23 @@ onMounted(() => {
|
|
|
end-placeholder="结束日期"
|
|
|
:shortcuts="rangeShortcuts"
|
|
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
|
|
- class="query-control query-control--date"
|
|
|
- />
|
|
|
+ class="query-control query-control--date" />
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
|
v-show="ifShow"
|
|
|
:label="t('devicePerson.status')"
|
|
|
prop="deviceStatus"
|
|
|
- label-width="85px"
|
|
|
- >
|
|
|
+ label-width="85px">
|
|
|
<el-select
|
|
|
v-model="queryParams.deviceStatus"
|
|
|
:placeholder="t('devicePerson.status')"
|
|
|
clearable
|
|
|
- class="query-control query-control--small"
|
|
|
- >
|
|
|
+ class="query-control query-control--small">
|
|
|
<el-option
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.PMS_DEVICE_STATUS)"
|
|
|
:key="dict.value"
|
|
|
:label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
- />
|
|
|
+ :value="dict.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item v-show="ifShow" :label="t('devicePerson.assets')" prop="assetProperty">
|
|
|
@@ -237,14 +225,12 @@ onMounted(() => {
|
|
|
v-model="queryParams.assetProperty"
|
|
|
:placeholder="t('devicePerson.assets')"
|
|
|
clearable
|
|
|
- class="query-control query-control--small"
|
|
|
- >
|
|
|
+ class="query-control query-control--small">
|
|
|
<el-option
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.PMS_ASSET_PROPERTY)"
|
|
|
:key="dict.value"
|
|
|
:label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
- />
|
|
|
+ :value="dict.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item v-show="ifShow" :label="t('devicePerson.brand')" prop="brand">
|
|
|
@@ -253,8 +239,7 @@ onMounted(() => {
|
|
|
:placeholder="t('devicePerson.brandHolder')"
|
|
|
clearable
|
|
|
class="query-control"
|
|
|
- @keyup.enter="handleQuery"
|
|
|
- />
|
|
|
+ @keyup.enter="handleQuery" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
|
|
|
@@ -275,8 +260,7 @@ onMounted(() => {
|
|
|
type="primary"
|
|
|
plain
|
|
|
@click="openForm"
|
|
|
- v-hasPermi="['pms:iot-device-allot-log:create']"
|
|
|
- >
|
|
|
+ v-hasPermi="['pms:iot-device-allot-log:create']">
|
|
|
<Icon icon="ep:plus" class="mr-5px" />{{ t('deviceAllot.setUp') }}
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
@@ -284,8 +268,7 @@ onMounted(() => {
|
|
|
plain
|
|
|
:loading="exportLoading"
|
|
|
@click="handleExport"
|
|
|
- v-hasPermi="['rq:iot-device:export']"
|
|
|
- >
|
|
|
+ v-hasPermi="['rq:iot-device:export']">
|
|
|
<Icon icon="ep:download" class="mr-5px" />导出
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
@@ -301,15 +284,13 @@ onMounted(() => {
|
|
|
:width="width"
|
|
|
:height="height"
|
|
|
:max-height="height"
|
|
|
- show-border
|
|
|
- >
|
|
|
+ show-border>
|
|
|
<ZmTableColumn
|
|
|
type="index"
|
|
|
:label="t('monitor.serial')"
|
|
|
:width="70"
|
|
|
fixed="left"
|
|
|
- hide-in-column-settings
|
|
|
- />
|
|
|
+ hide-in-column-settings />
|
|
|
<ZmTableColumn prop="deviceCode" :label="t('monitor.deviceCode')" fixed="left" />
|
|
|
<ZmTableColumn prop="deviceName" :label="t('monitor.deviceName')" fixed="left">
|
|
|
<template #default="{ row }">
|
|
|
@@ -330,8 +311,7 @@ onMounted(() => {
|
|
|
link
|
|
|
type="primary"
|
|
|
@click="handleView(row.id)"
|
|
|
- v-hasPermi="['rq:iot-device:query']"
|
|
|
- >
|
|
|
+ v-hasPermi="['rq:iot-device:query']">
|
|
|
{{ t('deviceAllot.adjustmentRecords') }}
|
|
|
</el-button>
|
|
|
</template>
|
|
|
@@ -352,8 +332,7 @@ onMounted(() => {
|
|
|
:total="total"
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
@size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- />
|
|
|
+ @current-change="handleCurrentChange" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -362,16 +341,14 @@ onMounted(() => {
|
|
|
ref="showDrawer"
|
|
|
:model-value="drawerVisible"
|
|
|
:device-id="currentDeviceId"
|
|
|
- @update:model-value="(val) => (drawerVisible = val)"
|
|
|
- />
|
|
|
+ @update:model-value="(val) => (drawerVisible = val)" />
|
|
|
</template>
|
|
|
|
|
|
<style scoped>
|
|
|
.device-allot-query {
|
|
|
- display: flex;
|
|
|
- flex-wrap: wrap;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: minmax(0, 1fr) max-content;
|
|
|
+ align-items: start;
|
|
|
gap: 12px 24px;
|
|
|
}
|
|
|
|
|
|
@@ -385,7 +362,7 @@ onMounted(() => {
|
|
|
}
|
|
|
|
|
|
.query-actions {
|
|
|
- flex: 0 0 auto;
|
|
|
+ align-self: start;
|
|
|
}
|
|
|
|
|
|
.query-actions :deep(.el-form-item__content) {
|
|
|
@@ -414,13 +391,6 @@ onMounted(() => {
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
-@media (width >= 2200px) {
|
|
|
- .device-allot-query,
|
|
|
- .query-row {
|
|
|
- flex-wrap: nowrap;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
@media (width <= 1500px) {
|
|
|
.device-allot-query {
|
|
|
gap: 12px 18px;
|
|
|
@@ -463,6 +433,10 @@ onMounted(() => {
|
|
|
.query-actions {
|
|
|
width: 100%;
|
|
|
}
|
|
|
+
|
|
|
+ .device-allot-query {
|
|
|
+ grid-template-columns: minmax(0, 1fr);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@media (width <= 768px) {
|