|
|
|
@ -14,17 +14,37 @@
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item :label="$t('device.index.105953-59')" prop="deptId" class="compact-dept">
|
|
|
|
|
|
|
|
<treeselect
|
|
|
|
|
|
|
|
v-model="queryParams.deptId"
|
|
|
|
|
|
|
|
:options="deptOptions"
|
|
|
|
|
|
|
|
:show-count="true"
|
|
|
|
|
|
|
|
:clearable="true"
|
|
|
|
|
|
|
|
:placeholder="$t('device.index.105953-60')"
|
|
|
|
|
|
|
|
append-to-body
|
|
|
|
|
|
|
|
class="treeselect-mini"
|
|
|
|
|
|
|
|
style="width: 150px"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<template v-if="searchShow">
|
|
|
|
<template v-if="searchShow">
|
|
|
|
<el-form-item :label="$t('device.index.105953-6')">
|
|
|
|
<el-form-item :label="$t('device.index.105953-6')">
|
|
|
|
<el-select v-model="queryParams.groupId" :placeholder="$t('device.index.105953-7')" clearable style="width: 150px">
|
|
|
|
<el-select v-model="queryParams.groupId" :placeholder="$t('device.index.105953-7')" clearable
|
|
|
|
<el-option v-for="group in myGroupList" :key="group.groupId" :label="group.groupName" :value="group.groupId" />
|
|
|
|
style="width: 150px">
|
|
|
|
|
|
|
|
<el-option v-for="group in myGroupList" :key="group.groupId" :label="group.groupName"
|
|
|
|
|
|
|
|
:value="group.groupId"/>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item style="float: right">
|
|
|
|
<el-form-item style="float: right">
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('device.index.105953-8') }}</el-button>
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('device.index.105953-9') }}</el-button>
|
|
|
|
{{ $t('device.index.105953-8') }}
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{
|
|
|
|
|
|
|
|
$t('device.index.105953-9')
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
<el-button type="text" @click="searchChange">
|
|
|
|
<el-button type="text" @click="searchChange">
|
|
|
|
{{ searchShow ? $t('template.index.891112-113') : $t('template.index.891112-112') }}
|
|
|
|
{{ searchShow ? $t('template.index.891112-113') : $t('template.index.891112-112') }}
|
|
|
|
<i :class="{ 'el-icon-arrow-down': !searchShow, 'el-icon-arrow-up': searchShow }"></i>
|
|
|
|
<i :class="{ 'el-icon-arrow-down': !searchShow, 'el-icon-arrow-up': searchShow }"></i>
|
|
|
|
@ -42,8 +62,12 @@
|
|
|
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
|
<el-dropdown-item command="handleEditDevice" v-hasPermi="['iot:device:add']">{{ $t('device.index.105953-11') }}</el-dropdown-item>
|
|
|
|
<el-dropdown-item command="handleEditDevice" v-hasPermi="['iot:device:add']">
|
|
|
|
<el-dropdown-item command="handleBatchImport" v-hasPermi="['iot:device:add']">{{ $t('device.index.105953-12') }}</el-dropdown-item>
|
|
|
|
{{ $t('device.index.105953-11') }}
|
|
|
|
|
|
|
|
</el-dropdown-item>
|
|
|
|
|
|
|
|
<el-dropdown-item command="handleBatchImport" v-hasPermi="['iot:device:add']">
|
|
|
|
|
|
|
|
{{ $t('device.index.105953-12') }}
|
|
|
|
|
|
|
|
</el-dropdown-item>
|
|
|
|
</el-dropdown-menu>
|
|
|
|
</el-dropdown-menu>
|
|
|
|
</el-dropdown>
|
|
|
|
</el-dropdown>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
@ -54,31 +78,49 @@
|
|
|
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
|
<el-dropdown-item command="handleSelectAllot" v-hasPermi="['iot:device:assignment']">{{ $t('device.index.105953-14') }}</el-dropdown-item>
|
|
|
|
<el-dropdown-item command="handleSelectAllot" v-hasPermi="['iot:device:assignment']">
|
|
|
|
<el-dropdown-item command="handleImportAllot" v-hasPermi="['iot:device:assignment']">{{ $t('device.index.105953-15') }}</el-dropdown-item>
|
|
|
|
{{ $t('device.index.105953-14') }}
|
|
|
|
|
|
|
|
</el-dropdown-item>
|
|
|
|
|
|
|
|
<el-dropdown-item command="handleImportAllot" v-hasPermi="['iot:device:assignment']">
|
|
|
|
|
|
|
|
{{ $t('device.index.105953-15') }}
|
|
|
|
|
|
|
|
</el-dropdown-item>
|
|
|
|
</el-dropdown-menu>
|
|
|
|
</el-dropdown-menu>
|
|
|
|
</el-dropdown>
|
|
|
|
</el-dropdown>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button size="mini" type="primary" plain @click="recycleDevice" v-hasPermi="['iot:device:recovery']">{{ $t('device.index.105953-16') }}</el-button>
|
|
|
|
<el-button size="mini" type="primary" plain @click="recycleDevice" v-hasPermi="['iot:device:recovery']">
|
|
|
|
|
|
|
|
{{ $t('device.index.105953-16') }}
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-dropdown @command="(command) => handleCommandMore(command)" v-hasPermi="['iot:device:record:list', 'iot:device:batchGenerator']">
|
|
|
|
<el-dropdown @command="(command) => handleCommandMore(command)"
|
|
|
|
|
|
|
|
v-hasPermi="['iot:device:record:list', 'iot:device:batchGenerator']">
|
|
|
|
<el-button size="mini" type="primary" plain>
|
|
|
|
<el-button size="mini" type="primary" plain>
|
|
|
|
{{ $t('device.index.105953-48') }}
|
|
|
|
{{ $t('device.index.105953-48') }}
|
|
|
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
|
<el-dropdown-item command="importRecord" v-hasPermi="['iot:device:record:list']">{{ $t('device.index.105953-49') }}</el-dropdown-item>
|
|
|
|
<el-dropdown-item command="importRecord" v-hasPermi="['iot:device:record:list']">
|
|
|
|
<el-dropdown-item command="generateSerialNumber" v-hasPermi="['iot:device:batchGenerator']">{{ $t('device.index.105953-50') }}</el-dropdown-item>
|
|
|
|
{{ $t('device.index.105953-49') }}
|
|
|
|
<el-dropdown-item command="recycleRecord" v-hasPermi="['iot:device:record:list']">{{ $t('device.index.105953-51') }}</el-dropdown-item>
|
|
|
|
</el-dropdown-item>
|
|
|
|
<el-dropdown-item command="allotRecord" v-hasPermi="['iot:device:record:list']">{{ $t('device.index.105953-52') }}</el-dropdown-item>
|
|
|
|
<el-dropdown-item command="generateSerialNumber" v-hasPermi="['iot:device:batchGenerator']">
|
|
|
|
|
|
|
|
{{ $t('device.index.105953-50') }}
|
|
|
|
|
|
|
|
</el-dropdown-item>
|
|
|
|
|
|
|
|
<el-dropdown-item command="recycleRecord" v-hasPermi="['iot:device:record:list']">
|
|
|
|
|
|
|
|
{{ $t('device.index.105953-51') }}
|
|
|
|
|
|
|
|
</el-dropdown-item>
|
|
|
|
|
|
|
|
<el-dropdown-item command="allotRecord" v-hasPermi="['iot:device:record:list']">
|
|
|
|
|
|
|
|
{{ $t('device.index.105953-52') }}
|
|
|
|
|
|
|
|
</el-dropdown-item>
|
|
|
|
</el-dropdown-menu>
|
|
|
|
</el-dropdown-menu>
|
|
|
|
</el-dropdown>
|
|
|
|
</el-dropdown>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5" style="line-height: 28px">
|
|
|
|
<el-col :span="1.5" style="line-height: 28px">
|
|
|
|
<el-checkbox v-model="queryParams.showChild" style="margin: 0px 10px" @change="handleQuery">{{ $t('device.index.105953-18') }}</el-checkbox>
|
|
|
|
<el-checkbox v-model="queryParams.showChild" style="margin: 0px 10px" @change="handleQuery">
|
|
|
|
<el-tooltip :content="$t('device.index.105953-19')" placement="top"><i class="el-icon-question"></i></el-tooltip>
|
|
|
|
{{ $t('device.index.105953-18') }}
|
|
|
|
|
|
|
|
</el-checkbox>
|
|
|
|
|
|
|
|
<el-tooltip :content="$t('device.index.105953-19')" placement="top"><i class="el-icon-question"></i>
|
|
|
|
|
|
|
|
</el-tooltip>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList">
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList">
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
@ -91,8 +133,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
<div v-if="showType == 'list'">
|
|
|
|
<div v-if="showType == 'list'">
|
|
|
|
<el-table v-loading="loading" :data="deviceList" :border="false">
|
|
|
|
<el-table v-loading="loading" :data="deviceList" :border="false">
|
|
|
|
<el-table-column :label="$t('device.index.105953-20')" align="center" header-align="center" prop="deviceId" width="50" />
|
|
|
|
<el-table-column :label="$t('device.index.105953-20')" align="center" header-align="center" prop="deviceId"
|
|
|
|
<el-table-column :label="$t('device.index.105953-0')" align="center" header-align="center" prop="deviceName" min-width="180" />
|
|
|
|
width="50"/>
|
|
|
|
|
|
|
|
<el-table-column :label="$t('device.index.105953-0')" align="center" header-align="center" prop="deviceName"
|
|
|
|
|
|
|
|
min-width="180"/>
|
|
|
|
<el-table-column :label="$t('device.index.105953-2')" align="center" prop="serialNumber" min-width="180"/>
|
|
|
|
<el-table-column :label="$t('device.index.105953-2')" align="center" prop="serialNumber" min-width="180"/>
|
|
|
|
<el-table-column :label="$t('device.index.105953-21')" align="center" prop="productName" min-width="180"/>
|
|
|
|
<el-table-column :label="$t('device.index.105953-21')" align="center" prop="productName" min-width="180"/>
|
|
|
|
<el-table-column :label="$t('device.index.105953-22')" align="center" prop="transport" min-width="90"/>
|
|
|
|
<el-table-column :label="$t('device.index.105953-22')" align="center" prop="transport" min-width="90"/>
|
|
|
|
@ -104,7 +148,10 @@
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column :label="$t('device.index.105953-25')" align="center" prop="isShadow" width="80">
|
|
|
|
<el-table-column :label="$t('device.index.105953-25')" align="center" prop="isShadow" width="80">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-tag type="success" size="small" v-if="scope.row.isShadow == 1">{{ $t('device.index.105953-26') }}</el-tag>
|
|
|
|
<el-tag type="success" size="small" v-if="scope.row.isShadow == 1">{{
|
|
|
|
|
|
|
|
$t('device.index.105953-26')
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
</el-tag>
|
|
|
|
<el-tag type="info" size="small" v-else>{{ $t('device.index.105953-27') }}</el-tag>
|
|
|
|
<el-tag type="info" size="small" v-else>{{ $t('device.index.105953-27') }}</el-tag>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
@ -116,9 +163,12 @@
|
|
|
|
<el-table-column :label="$t('device.index.105953-29')" align="center" prop="rssi" width="60">
|
|
|
|
<el-table-column :label="$t('device.index.105953-29')" align="center" prop="rssi" width="60">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<svg-icon v-if="scope.row.status == 3 && scope.row.rssi >= '-55'" icon-class="wifi_4"/>
|
|
|
|
<svg-icon v-if="scope.row.status == 3 && scope.row.rssi >= '-55'" icon-class="wifi_4"/>
|
|
|
|
<svg-icon v-else-if="scope.row.status == 3 && scope.row.rssi >= '-70' && scope.row.rssi < '-55'" icon-class="wifi_3" />
|
|
|
|
<svg-icon v-else-if="scope.row.status == 3 && scope.row.rssi >= '-70' && scope.row.rssi < '-55'"
|
|
|
|
<svg-icon v-else-if="scope.row.status == 3 && scope.row.rssi >= '-85' && scope.row.rssi < '-70'" icon-class="wifi_2" />
|
|
|
|
icon-class="wifi_3"/>
|
|
|
|
<svg-icon v-else-if="scope.row.status == 3 && scope.row.rssi >= '-100' && scope.row.rssi < '-85'" icon-class="wifi_1" />
|
|
|
|
<svg-icon v-else-if="scope.row.status == 3 && scope.row.rssi >= '-85' && scope.row.rssi < '-70'"
|
|
|
|
|
|
|
|
icon-class="wifi_2"/>
|
|
|
|
|
|
|
|
<svg-icon v-else-if="scope.row.status == 3 && scope.row.rssi >= '-100' && scope.row.rssi < '-85'"
|
|
|
|
|
|
|
|
icon-class="wifi_1"/>
|
|
|
|
<svg-icon v-else icon-class="wifi_0"/>
|
|
|
|
<svg-icon v-else icon-class="wifi_0"/>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
@ -143,36 +193,49 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column fixed="right" :label="$t('device.index.105953-34')" align="center" class-name="small-padding fixed-width" width="183">
|
|
|
|
<el-table-column fixed="right" :label="$t('device.index.105953-34')" align="center"
|
|
|
|
|
|
|
|
class-name="small-padding fixed-width" width="183">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-button type="text" size="small" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['iot:device:remove']">
|
|
|
|
<el-button type="text" size="small" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
|
|
|
|
|
|
|
v-hasPermi="['iot:device:remove']">
|
|
|
|
{{ $t('device.index.105953-35') }}
|
|
|
|
{{ $t('device.index.105953-35') }}
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
<el-button type="text" size="small" icon="el-icon-view" @click="handleEditDevice(scope.row)" v-hasPermi="['iot:device:query']">
|
|
|
|
<el-button type="text" size="small" icon="el-icon-view" @click="handleEditDevice(scope.row)"
|
|
|
|
|
|
|
|
v-hasPermi="['iot:device:query']">
|
|
|
|
{{ $t('device.index.105953-36') }}
|
|
|
|
{{ $t('device.index.105953-36') }}
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
<el-button type="text" size="small" @click="openSummaryDialog(scope.row)" v-if="form.deviceId != 0" v-hasPermi="['iot:device:query']">
|
|
|
|
<el-button type="text" size="small" @click="openSummaryDialog(scope.row)" v-if="form.deviceId != 0"
|
|
|
|
|
|
|
|
v-hasPermi="['iot:device:query']">
|
|
|
|
{{ $t('device.index.105953-37') }}
|
|
|
|
{{ $t('device.index.105953-37') }}
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
|
|
<pagination style="margin-bottom: 20px" v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" :pageSizes="[12, 24, 36, 60]" @pagination="getList" />
|
|
|
|
<pagination style="margin-bottom: 20px" v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
|
|
|
|
|
|
|
:limit.sync="queryParams.pageSize" :pageSizes="[12, 24, 36, 60]" @pagination="getList"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-if="showType == 'card'">
|
|
|
|
<div v-if="showType == 'card'">
|
|
|
|
<el-row :gutter="20" v-loading="loading" style="display: flex; flex-wrap: wrap;">
|
|
|
|
<el-row :gutter="20" v-loading="loading" style="display: flex; flex-wrap: wrap;">
|
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="6" v-for="(item, index) in deviceList" :key="index" style="margin-bottom: 20px; text-align: center; display: flex;">
|
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="6" v-for="(item, index) in deviceList" :key="index"
|
|
|
|
<el-card :body-style="{ padding: '20px', display: 'flex', flexDirection: 'column', height: '100%' }" shadow="always" style="width: 100%; display: flex; flex-direction: column;">
|
|
|
|
style="margin-bottom: 20px; text-align: center; display: flex;">
|
|
|
|
|
|
|
|
<el-card :body-style="{ padding: '20px', display: 'flex', flexDirection: 'column', height: '100%' }"
|
|
|
|
|
|
|
|
shadow="always" style="width: 100%; display: flex; flex-direction: column;">
|
|
|
|
<el-row type="flex" :gutter="10" justify="space-between">
|
|
|
|
<el-row type="flex" :gutter="10" justify="space-between">
|
|
|
|
<el-col :span="20" style="text-align: left">
|
|
|
|
<el-col :span="20" style="text-align: left">
|
|
|
|
<el-link type="" :underline="false" @click="handleDeviceDetail(item)" style="font-weight: bold; font-size: 16px; line-height: 32px; display: flex; align-items: center; width: 100%;">
|
|
|
|
<el-link type="" :underline="false" @click="handleDeviceDetail(item)"
|
|
|
|
<el-tooltip class="item" effect="dark" :content="$t('device.index.105953-38')" placement="top-start">
|
|
|
|
style="font-weight: bold; font-size: 16px; line-height: 32px; display: flex; align-items: center; width: 100%;">
|
|
|
|
|
|
|
|
<el-tooltip class="item" effect="dark" :content="$t('device.index.105953-38')"
|
|
|
|
|
|
|
|
placement="top-start">
|
|
|
|
<svg-icon icon-class="share" style="font-size: 20px; flex-shrink: 0;" v-if="item.isOwner != 1"/>
|
|
|
|
<svg-icon icon-class="share" style="font-size: 20px; flex-shrink: 0;" v-if="item.isOwner != 1"/>
|
|
|
|
</el-tooltip>
|
|
|
|
</el-tooltip>
|
|
|
|
<svg-icon icon-class="device" style="flex-shrink: 0;" v-if="item.isOwner == 1"/>
|
|
|
|
<svg-icon icon-class="device" style="flex-shrink: 0;" v-if="item.isOwner == 1"/>
|
|
|
|
<el-tooltip :content="item.deviceName" placement="top" :disabled="!item.deviceName || item.deviceName.length <= 20">
|
|
|
|
<el-tooltip :content="item.deviceName" placement="top"
|
|
|
|
<span style="margin: 0 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0;">{{ item.deviceName }}</span>
|
|
|
|
:disabled="!item.deviceName || item.deviceName.length <= 20">
|
|
|
|
|
|
|
|
<span
|
|
|
|
|
|
|
|
style="margin: 0 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0;">{{
|
|
|
|
|
|
|
|
item.deviceName
|
|
|
|
|
|
|
|
}}</span>
|
|
|
|
</el-tooltip>
|
|
|
|
</el-tooltip>
|
|
|
|
<!-- <el-tag size="mini" type="info">Ver {{item.firmwareVersion}}</el-tag>-->
|
|
|
|
<!-- <el-tag size="mini" type="info">Ver {{item.firmwareVersion}}</el-tag>-->
|
|
|
|
<!-- <el-text v-if="item.protocolCode" type="info" size="mini" style="font-size: 14px; color: #ccc">{{ item.protocolCode }}</el-text> -->
|
|
|
|
<!-- <el-text v-if="item.protocolCode" type="info" size="mini" style="font-size: 14px; color: #ccc">{{ item.protocolCode }}</el-text> -->
|
|
|
|
@ -184,34 +247,51 @@
|
|
|
|
<el-col :span="3">
|
|
|
|
<el-col :span="3">
|
|
|
|
<div style="font-size: 28px; color: #ccc">
|
|
|
|
<div style="font-size: 28px; color: #ccc">
|
|
|
|
<svg-icon v-if="item.status == 3 && item.rssi >= '-55'" icon-class="wifi_4"/>
|
|
|
|
<svg-icon v-if="item.status == 3 && item.rssi >= '-55'" icon-class="wifi_4"/>
|
|
|
|
<svg-icon v-else-if="item.status == 3 && item.rssi >= '-70' && item.rssi < '-55'" icon-class="wifi_3" />
|
|
|
|
<svg-icon v-else-if="item.status == 3 && item.rssi >= '-70' && item.rssi < '-55'"
|
|
|
|
<svg-icon v-else-if="item.status == 3 && item.rssi >= '-85' && item.rssi < '-70'" icon-class="wifi_2" />
|
|
|
|
icon-class="wifi_3"/>
|
|
|
|
<svg-icon v-else-if="item.status == 3 && item.rssi >= '-100' && item.rssi < '-85'" icon-class="wifi_1" />
|
|
|
|
<svg-icon v-else-if="item.status == 3 && item.rssi >= '-85' && item.rssi < '-70'"
|
|
|
|
|
|
|
|
icon-class="wifi_2"/>
|
|
|
|
|
|
|
|
<svg-icon v-else-if="item.status == 3 && item.rssi >= '-100' && item.rssi < '-85'"
|
|
|
|
|
|
|
|
icon-class="wifi_1"/>
|
|
|
|
<svg-icon v-else icon-class="wifi_0"/>
|
|
|
|
<svg-icon v-else icon-class="wifi_0"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
<el-row :gutter="10" style="flex: 1; min-height: 0;">
|
|
|
|
<el-row :gutter="10" style="flex: 1; min-height: 0;">
|
|
|
|
<el-col :span="17" style="display: flex; flex-direction: column;">
|
|
|
|
<el-col :span="17" style="display: flex; flex-direction: column;">
|
|
|
|
<div style="text-align: left; line-height: 28px; min-height: 28px; word-wrap: break-word; overflow-wrap: break-word; flex-shrink: 0;">
|
|
|
|
<div
|
|
|
|
<dict-tag :options="dict.type.iot_device_status" :value="item.status" size="mini" style="display: inline-block; margin-bottom: 4px; vertical-align: middle;" />
|
|
|
|
style="text-align: left; line-height: 28px; min-height: 28px; word-wrap: break-word; overflow-wrap: break-word; flex-shrink: 0;">
|
|
|
|
|
|
|
|
<dict-tag :options="dict.type.iot_device_status" :value="item.status" size="mini"
|
|
|
|
|
|
|
|
style="display: inline-block; margin-bottom: 4px; vertical-align: middle;"/>
|
|
|
|
<span style="display: inline-block; margin: 0 5px 4px 5px; vertical-align: middle;">
|
|
|
|
<span style="display: inline-block; margin: 0 5px 4px 5px; vertical-align: middle;">
|
|
|
|
<el-tag type="primary" size="mini" v-if="item.protocolCode" style="margin-bottom: 4px;">{{ item.protocolCode }}</el-tag>
|
|
|
|
<el-tag type="primary" size="mini" v-if="item.protocolCode"
|
|
|
|
|
|
|
|
style="margin-bottom: 4px;">{{ item.protocolCode }}</el-tag>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<el-tag type="primary" size="mini" v-if="item.transport" style="margin-bottom: 4px;">{{ item.transport }}</el-tag>
|
|
|
|
<el-tag type="primary" size="mini" v-if="item.transport" style="margin-bottom: 4px;">
|
|
|
|
<el-tag type="danger" size="mini" style="display: inline-block; margin: 0 0 4px 5px;" v-if="item.alertCount">
|
|
|
|
{{ item.transport }}
|
|
|
|
|
|
|
|
</el-tag>
|
|
|
|
|
|
|
|
<el-tag type="danger" size="mini" style="display: inline-block; margin: 0 0 4px 5px;"
|
|
|
|
|
|
|
|
v-if="item.alertCount">
|
|
|
|
{{ $t('device.index.105953-53') }}{{ item.alertCount.unprocessedCount }}
|
|
|
|
{{ $t('device.index.105953-53') }}{{ item.alertCount.unprocessedCount }}
|
|
|
|
</el-tag>
|
|
|
|
</el-tag>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<el-descriptions :column="1" size="mini" style="margin-top: 8px; flex: 1;">
|
|
|
|
<el-descriptions :column="1" size="mini" style="margin-top: 8px; flex: 1;">
|
|
|
|
<el-descriptions-item :label="$t('device.index.105953-20')">
|
|
|
|
<el-descriptions-item :label="$t('device.index.105953-20')">
|
|
|
|
<el-tooltip :content="item.serialNumber" placement="top" :disabled="!item.serialNumber || item.serialNumber.length <= 15">
|
|
|
|
<el-tooltip :content="item.serialNumber" placement="top"
|
|
|
|
<span style="display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">{{ item.serialNumber }}</span>
|
|
|
|
:disabled="!item.serialNumber || item.serialNumber.length <= 15">
|
|
|
|
|
|
|
|
<span
|
|
|
|
|
|
|
|
style="display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">{{
|
|
|
|
|
|
|
|
item.serialNumber
|
|
|
|
|
|
|
|
}}</span>
|
|
|
|
</el-tooltip>
|
|
|
|
</el-tooltip>
|
|
|
|
</el-descriptions-item>
|
|
|
|
</el-descriptions-item>
|
|
|
|
<el-descriptions-item :label="$t('device.index.105953-39')">
|
|
|
|
<el-descriptions-item :label="$t('device.index.105953-39')">
|
|
|
|
<el-tooltip :content="item.productName" placement="top" :disabled="!item.productName || item.productName.length <= 20">
|
|
|
|
<el-tooltip :content="item.productName" placement="top"
|
|
|
|
<span style="display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">{{ item.productName }}</span>
|
|
|
|
:disabled="!item.productName || item.productName.length <= 20">
|
|
|
|
|
|
|
|
<span
|
|
|
|
|
|
|
|
style="display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">{{
|
|
|
|
|
|
|
|
item.productName
|
|
|
|
|
|
|
|
}}</span>
|
|
|
|
</el-tooltip>
|
|
|
|
</el-tooltip>
|
|
|
|
</el-descriptions-item>
|
|
|
|
</el-descriptions-item>
|
|
|
|
<el-descriptions-item :label="$t('device.index.105953-32')">
|
|
|
|
<el-descriptions-item :label="$t('device.index.105953-32')">
|
|
|
|
@ -254,13 +334,16 @@
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
<el-button-group style="margin-top: 15px; width: 100%; display: flex; justify-content: center;">
|
|
|
|
<el-button-group style="margin-top: 15px; width: 100%; display: flex; justify-content: center;">
|
|
|
|
<el-button type="danger" size="mini" style="padding: 5px 10px; flex: 1;" icon="el-icon-delete" @click="handleDelete(item)" v-hasPermi="['iot:device:remove']">
|
|
|
|
<el-button type="danger" size="mini" style="padding: 5px 10px; flex: 1;" icon="el-icon-delete"
|
|
|
|
|
|
|
|
@click="handleDelete(item)" v-hasPermi="['iot:device:remove']">
|
|
|
|
{{ $t('device.index.105953-35') }}
|
|
|
|
{{ $t('device.index.105953-35') }}
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
<el-button type="primary" size="mini" style="padding: 5px 15px; flex: 1;" icon="el-icon-view" @click="handleEditDevice(item, 'basic')" v-hasPermi="['iot:device:query']">
|
|
|
|
<el-button type="primary" size="mini" style="padding: 5px 15px; flex: 1;" icon="el-icon-view"
|
|
|
|
|
|
|
|
@click="handleEditDevice(item, 'basic')" v-hasPermi="['iot:device:query']">
|
|
|
|
{{ $t('device.index.105953-36') }}
|
|
|
|
{{ $t('device.index.105953-36') }}
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
<el-button type="success" size="mini" style="padding: 5px 15px; flex: 1;" icon="el-icon-odometer" @click="handleRunDevice(item)" v-hasPermi="['iot:device:query']">
|
|
|
|
<el-button type="success" size="mini" style="padding: 5px 15px; flex: 1;" icon="el-icon-odometer"
|
|
|
|
|
|
|
|
@click="handleRunDevice(item)" v-hasPermi="['iot:device:query']">
|
|
|
|
{{ $t('device.index.105953-40') }}
|
|
|
|
{{ $t('device.index.105953-40') }}
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
</el-button-group>
|
|
|
|
</el-button-group>
|
|
|
|
@ -268,7 +351,8 @@
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
<el-empty :description="$t('device.index.105953-41')" v-if="total == 0"></el-empty>
|
|
|
|
<el-empty :description="$t('device.index.105953-41')" v-if="total == 0"></el-empty>
|
|
|
|
<pagination style="margin: 0 0 20px 0" v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" :pageSizes="[12, 24, 36, 60]" @pagination="getList" />
|
|
|
|
<pagination style="margin: 0 0 20px 0" v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
|
|
|
|
|
|
|
:limit.sync="queryParams.pageSize" :pageSizes="[12, 24, 36, 60]" @pagination="getList"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-card>
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
|
|
@ -283,11 +367,14 @@
|
|
|
|
<el-dialog :title="$t('device.index.105953-54')" :visible.sync="openGenerate" width="500px" append-to-body>
|
|
|
|
<el-dialog :title="$t('device.index.105953-54')" :visible.sync="openGenerate" width="500px" append-to-body>
|
|
|
|
<el-form v-model="elForm" style="height: 100%; padding: 0 20px">
|
|
|
|
<el-form v-model="elForm" style="height: 100%; padding: 0 20px">
|
|
|
|
<el-form-item label-width="80px" :label="$t('device.index.105953-55')">
|
|
|
|
<el-form-item label-width="80px" :label="$t('device.index.105953-55')">
|
|
|
|
<el-input v-model="elForm.count" type="number" style="width: 240px" :max="200" oninput="if(value>200)value=200;if(value<0)value=0"></el-input>
|
|
|
|
<el-input v-model="elForm.count" type="number" style="width: 240px" :max="200"
|
|
|
|
|
|
|
|
oninput="if(value>200)value=200;if(value<0)value=0"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<el-button type="primary" @click="submitForm" v-hasPermi="['iot:device:batchGenerator']">{{ $t('device.index.105953-56') }}</el-button>
|
|
|
|
<el-button type="primary" @click="submitForm" v-hasPermi="['iot:device:batchGenerator']">
|
|
|
|
|
|
|
|
{{ $t('device.index.105953-56') }}
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
<el-button @click="openGenerate = false">{{ $t('device.index.105953-57') }}</el-button>
|
|
|
|
<el-button @click="openGenerate = false">{{ $t('device.index.105953-57') }}</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
@ -308,6 +395,7 @@
|
|
|
|
import vueQr from 'vue-qr';
|
|
|
|
import vueQr from 'vue-qr';
|
|
|
|
import {listDeviceShort, delDevice} from '@/api/iot/device';
|
|
|
|
import {listDeviceShort, delDevice} from '@/api/iot/device';
|
|
|
|
import {listGroup} from '@/api/iot/group';
|
|
|
|
import {listGroup} from '@/api/iot/group';
|
|
|
|
|
|
|
|
import {deptsTreeSelect} from '@/api/system/user';
|
|
|
|
import {delSipDeviceBySipId} from '@/api/iot/sipdevice';
|
|
|
|
import {delSipDeviceBySipId} from '@/api/iot/sipdevice';
|
|
|
|
import auth from '@/plugins/auth';
|
|
|
|
import auth from '@/plugins/auth';
|
|
|
|
import Treeselect from '@riophae/vue-treeselect';
|
|
|
|
import Treeselect from '@riophae/vue-treeselect';
|
|
|
|
@ -317,6 +405,7 @@ import allotImport from './allot-import-dialog';
|
|
|
|
import importRecord from './import-record';
|
|
|
|
import importRecord from './import-record';
|
|
|
|
import recycleRecord from './recycle-record';
|
|
|
|
import recycleRecord from './recycle-record';
|
|
|
|
import allotRecord from './allot-record';
|
|
|
|
import allotRecord from './allot-record';
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: 'Device',
|
|
|
|
name: 'Device',
|
|
|
|
dicts: ['iot_device_status', 'iot_is_enable', 'iot_location_way', 'iot_transport_type'],
|
|
|
|
dicts: ['iot_device_status', 'iot_is_enable', 'iot_location_way', 'iot_transport_type'],
|
|
|
|
@ -349,17 +438,20 @@ export default {
|
|
|
|
deviceList: [],
|
|
|
|
deviceList: [],
|
|
|
|
// 我的分组列表数据
|
|
|
|
// 我的分组列表数据
|
|
|
|
myGroupList: [],
|
|
|
|
myGroupList: [],
|
|
|
|
|
|
|
|
// 机构树
|
|
|
|
|
|
|
|
deptOptions: [],
|
|
|
|
// 根路径
|
|
|
|
// 根路径
|
|
|
|
baseUrl: process.env.VUE_APP_BASE_API,
|
|
|
|
baseUrl: process.env.VUE_APP_BASE_API,
|
|
|
|
// 查询参数
|
|
|
|
// 查询参数
|
|
|
|
queryParams: {
|
|
|
|
queryParams: {
|
|
|
|
pageNum: 1,
|
|
|
|
pageNum: 1,
|
|
|
|
pageSize: 12,
|
|
|
|
pageSize: 12,
|
|
|
|
showChild: true,
|
|
|
|
showChild: false,
|
|
|
|
entrance: 1,
|
|
|
|
entrance: 1,
|
|
|
|
deviceName: null,
|
|
|
|
deviceName: null,
|
|
|
|
productId: null,
|
|
|
|
productId: null,
|
|
|
|
groupId: null,
|
|
|
|
groupId: null,
|
|
|
|
|
|
|
|
deptId: null,
|
|
|
|
productName: null,
|
|
|
|
productName: null,
|
|
|
|
userId: null,
|
|
|
|
userId: null,
|
|
|
|
userName: null,
|
|
|
|
userName: null,
|
|
|
|
@ -416,6 +508,7 @@ export default {
|
|
|
|
this.queryParams.productId = null;
|
|
|
|
this.queryParams.productId = null;
|
|
|
|
this.queryParams.groupId = null;
|
|
|
|
this.queryParams.groupId = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.getDeptTree();
|
|
|
|
this.connectMqtt();
|
|
|
|
this.connectMqtt();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
activated() {
|
|
|
|
activated() {
|
|
|
|
@ -618,6 +711,12 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.$mqttTool.subscribe(topics);
|
|
|
|
this.$mqttTool.subscribe(topics);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
/** 查询机构下拉树 */
|
|
|
|
|
|
|
|
getDeptTree() {
|
|
|
|
|
|
|
|
deptsTreeSelect().then((response) => {
|
|
|
|
|
|
|
|
this.deptOptions = response.data || [];
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
/** 查询设备分组列表 */
|
|
|
|
/** 查询设备分组列表 */
|
|
|
|
getGroupList() {
|
|
|
|
getGroupList() {
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true;
|
|
|
|
@ -656,7 +755,8 @@ export default {
|
|
|
|
...this.$route.query,
|
|
|
|
...this.$route.query,
|
|
|
|
pageNum: this.queryParams.pageNum,
|
|
|
|
pageNum: this.queryParams.pageNum,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}).catch(() => {});
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
@ -669,6 +769,8 @@ export default {
|
|
|
|
this.queryParams.productId = null;
|
|
|
|
this.queryParams.productId = null;
|
|
|
|
this.queryParams.groupId = null;
|
|
|
|
this.queryParams.groupId = null;
|
|
|
|
this.queryParams.serialNumber = null;
|
|
|
|
this.queryParams.serialNumber = null;
|
|
|
|
|
|
|
|
this.queryParams.deptId = null;
|
|
|
|
|
|
|
|
this.queryParams.showChild = false;
|
|
|
|
this.resetForm('queryForm');
|
|
|
|
this.resetForm('queryForm');
|
|
|
|
this.handleQuery();
|
|
|
|
this.handleQuery();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -745,7 +847,8 @@ export default {
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
this.$modal.msgSuccess(this.$t('device.index.105953-47'));
|
|
|
|
this.$modal.msgSuccess(this.$t('device.index.105953-47'));
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch(() => {});
|
|
|
|
.catch(() => {
|
|
|
|
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 未启用设备影子*/
|
|
|
|
/** 未启用设备影子*/
|
|
|
|
shadowUnEnable(device, thingsModel) {
|
|
|
|
shadowUnEnable(device, thingsModel) {
|
|
|
|
@ -770,6 +873,10 @@ export default {
|
|
|
|
.iot-device {
|
|
|
|
.iot-device {
|
|
|
|
padding: 20px;
|
|
|
|
padding: 20px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .compact-dept {
|
|
|
|
|
|
|
|
margin-left: -28px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-upload-dragger {
|
|
|
|
::v-deep .el-upload-dragger {
|
|
|
|
width: 510px;
|
|
|
|
width: 510px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -778,4 +885,32 @@ export default {
|
|
|
|
font-size: 12px;
|
|
|
|
font-size: 12px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .treeselect-mini {
|
|
|
|
|
|
|
|
.vue-treeselect__control {
|
|
|
|
|
|
|
|
min-height: 28px;
|
|
|
|
|
|
|
|
height: 28px;
|
|
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.vue-treeselect__placeholder,
|
|
|
|
|
|
|
|
.vue-treeselect__single-value {
|
|
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
|
|
line-height: 26px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.vue-treeselect__value-remove {
|
|
|
|
|
|
|
|
line-height: 24px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.vue-treeselect__arrow {
|
|
|
|
|
|
|
|
top: 6px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 如果下拉菜单也需要迷你风格
|
|
|
|
|
|
|
|
.vue-treeselect__option {
|
|
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
|
|
padding: 4px 8px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|