fix(列表): 样式优化

This commit is contained in:
Zhunianya
2026-03-23 16:22:03 +08:00
parent 94f5a1cbc7
commit d064238e57
26 changed files with 3538 additions and 2100 deletions

View File

@@ -1,24 +1,22 @@
<template>
<div style="padding:6px;">
<el-card v-show="showSearch" style="margin-bottom:5px;">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px" style="margin-bottom:-20px;">
<div style="padding: 6px">
<el-card v-show="showSearch" style="margin-bottom: 5px">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px" style="margin-bottom: -20px">
<el-form-item :label="$t('product.category.142342-0')" prop="categoryName">
<el-input v-model="queryParams.categoryName" :placeholder="$t('product.index.091251-3')" clearable size="small"
@keyup.enter.native="handleQuery" />
<el-input v-model="queryParams.categoryName" :placeholder="$t('product.index.091251-3')" clearable size="small" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('reset') }}</el-button>
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">{{ $t('search') }}</el-button>
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item>
<el-form-item style="float:right;">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['iot:category:add']">{{ $t('add') }}</el-button>
<el-form-item style="float: right">
<el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd" v-hasPermi="['iot:category:add']">{{ $t('add') }}</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card style="padding-bottom:100px;">
<el-table v-loading="loading" :data="categoryList" @selection-change="handleSelectionChange" border>
<el-card style="padding-bottom: 100px">
<el-table v-loading="loading" :data="categoryList" @selection-change="handleSelectionChange" :border="false" header-cell-class-name="table-header">
<el-table-column :label="$t('product.category.142342-0')" align="center" prop="categoryName" />
<el-table-column :label="$t('remark')" align="left" header-align="center" prop="remark" min-width="150" />
<el-table-column :label="$t('template.index.891112-12')" align="center" prop="isSys">
@@ -34,19 +32,28 @@
</el-table-column>
<el-table-column :label="$t('opation')" align="center" class-name="small-padding fixed-width" width="150">
<template slot-scope="scope">
<el-button size="small" type="text" style="padding:5px;" icon="el-icon-edit"
@click="handleUpdate(scope.row)" v-hasPermi="['iot:category:query']"
v-if="scope.row.isSys == '0' ? true : !isTenant">{{ $t('update') }}</el-button>
<el-button size="small" type="text" style="padding:5px;" icon="el-icon-delete"
@click="handleDelete(scope.row)" v-hasPermi="['iot:category:remove']"
v-if="scope.row.isSys == '0' ? true : !isTenant">{{ $t('del') }}</el-button>
<span style="font-size:10px;color:#999;" v-if="scope.row.isSys == '1' && isTenant">{{ $t('template.index.891112-21') }}</span>
<el-button size="small" type="text" style="padding: 5px" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['iot:category:query']" v-if="scope.row.isSys == '0' ? true : !isTenant">
{{ $t('update') }}
</el-button>
<el-button
size="small"
type="text"
style="padding: 5px"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['iot:category:remove']"
v-if="scope.row.isSys == '0' ? true : !isTenant"
>
{{ $t('del') }}
</el-button>
<span style="font-size: 10px; color: #999" v-if="scope.row.isSys == '1' && isTenant">{{ $t('template.index.891112-21') }}</span>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getList" />
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
</div>
<!-- 添加或修改产品分类对话框 -->
<el-dialog :title="$t('product.product-edit.473153-3')" :visible.sync="open" width="500px" append-to-body>
@@ -55,38 +62,28 @@
<el-input v-model="form.categoryName" :placeholder="$t('product.index.091251-3')" />
</el-form-item>
<el-form-item :label="$t('product.category.142342-1')" prop="orderNum">
<el-input-number controls-position="right" v-model="form.orderNum"
:placeholder="$t('product.category.142342-2')" style="width:100%" />
<el-input-number controls-position="right" v-model="form.orderNum" :placeholder="$t('product.category.142342-2')" style="width: 100%" />
</el-form-item>
<el-form-item :label="$t('remark')" prop="remark">
<el-input v-model="form.remark" type="textarea" :placeholder="$t('product.category.142342-3')" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm" v-hasPermi="['iot:category:edit']"
v-show="form.categoryId">{{ $t('update') }}</el-button>
<el-button type="primary" @click="submitForm" v-hasPermi="['iot:category:add']"
v-show="!form.categoryId">{{ $t('add') }}</el-button>
<el-button type="primary" @click="submitForm" v-hasPermi="['iot:category:edit']" v-show="form.categoryId">{{ $t('update') }}</el-button>
<el-button type="primary" @click="submitForm" v-hasPermi="['iot:category:add']" v-show="!form.categoryId">{{ $t('add') }}</el-button>
<el-button @click="cancel">{{ $t('cancel') }}</el-button>
</div>
</el-dialog>
</el-card>
</div>
</template>
<script>
import {
listCategory,
getCategory,
delCategory,
addCategory,
updateCategory
} from "@/api/iot/category";
import { listCategory, getCategory, delCategory, addCategory, updateCategory } from '@/api/iot/category';
export default {
name: "Category",
dicts: ["iot_yes_no"],
name: 'Category',
dicts: ['iot_yes_no'],
data() {
return {
// 是否为租户
@@ -106,7 +103,7 @@ export default {
// 产品分类表格数据
categoryList: [],
// 弹出层标题
title: "",
title: '',
// 是否显示弹出层
open: false,
// 查询参数
@@ -120,40 +117,49 @@ export default {
form: {},
// 表单校验
rules: {
categoryName: [{
required: true,
message: this.$t('product.category.142342-4'),
trigger: "blur"
}, {
min: 1,
max: 64,
message: this.$t('product.category.142342-12'),
},
categoryName: [
{
required: true,
message: this.$t('product.category.142342-4'),
trigger: 'blur',
},
{
min: 1,
max: 64,
message: this.$t('product.category.142342-12'),
},
],
orderNum: [{
required: true,
message: this.$t('product.category.142342-13'),
trigger: 'blur',
}, {
type: 'number',
min: -2147483648,
max: 2147483647,
message: this.$t('product.category.142342-14'),
trigger: 'blur',
}],
remark: [{
required: false,
min: 0,
max: 500,
message: this.$t('product.category.142342-15'),
trigger: 'blur',
}],
isSys: [{
required: true,
message: this.$t('product.category.142342-5'),
trigger: "blur"
}],
}
orderNum: [
{
required: true,
message: this.$t('product.category.142342-13'),
trigger: 'blur',
},
{
type: 'number',
min: -2147483648,
max: 2147483647,
message: this.$t('product.category.142342-14'),
trigger: 'blur',
},
],
remark: [
{
required: false,
min: 0,
max: 500,
message: this.$t('product.category.142342-15'),
trigger: 'blur',
},
],
isSys: [
{
required: true,
message: this.$t('product.category.142342-5'),
trigger: 'blur',
},
],
},
};
},
created() {
@@ -162,14 +168,14 @@ export default {
},
methods: {
init() {
if (this.$store.state.user.roles.indexOf("tenant") !== -1) {
this.isTenant = true
if (this.$store.state.user.roles.indexOf('tenant') !== -1) {
this.isTenant = true;
}
},
/** 查询产品分类列表 */
getList() {
this.loading = true;
listCategory(this.queryParams).then(response => {
listCategory(this.queryParams).then((response) => {
this.categoryList = response.rows;
this.total = response.total;
this.loading = false;
@@ -195,9 +201,9 @@ export default {
createTime: null,
updateBy: null,
updateTime: null,
remark: null
remark: null,
};
this.resetForm("form");
this.resetForm('form');
},
/** 搜索按钮操作 */
handleQuery() {
@@ -206,14 +212,14 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.resetForm('queryForm');
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.categoryId)
this.single = selection.length !== 1
this.multiple = !selection.length
this.ids = selection.map((item) => item.categoryId);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
@@ -224,8 +230,8 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const categoryId = row.categoryId || this.ids
getCategory(categoryId).then(response => {
const categoryId = row.categoryId || this.ids;
getCategory(categoryId).then((response) => {
this.form = response.data;
this.open = true;
this.title = this.$t('product.category.142342-7');
@@ -233,16 +239,16 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
this.$refs['form'].validate((valid) => {
if (valid) {
if (this.form.categoryId != null) {
updateCategory(this.form).then(response => {
updateCategory(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('updateSuccess'));
this.open = false;
this.getList();
});
} else {
addCategory(this.form).then(response => {
addCategory(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('addSuccess'));
this.open = false;
this.getList();
@@ -254,22 +260,68 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const categoryIds = row.categoryId || this.ids;
let msg = "";
this.$modal.confirm(this.$t('product.category.142342-8', [categoryIds])).then(function () {
return delCategory(categoryIds).then(response => {
msg = response.msg;
});
}).then(() => {
this.getList();
this.$modal.msgSuccess(msg);
}).catch(() => { });
let msg = '';
this.$modal
.confirm(this.$t('product.category.142342-8', [categoryIds]))
.then(function () {
return delCategory(categoryIds).then((response) => {
msg = response.msg;
});
})
.then(() => {
this.getList();
this.$modal.msgSuccess(msg);
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('iot/category/export', {
...this.queryParams
}, `category_${new Date().getTime()}.xlsx`)
}
}
this.download(
'iot/category/export',
{
...this.queryParams,
},
`category_${new Date().getTime()}.xlsx`
);
},
},
};
</script>
<style lang="scss" scoped>
.table-header {
background-color: #f5f7fa !important;
color: #606266;
font-weight: 600;
text-align: center;
}
::v-deep .el-table {
th {
background-color: #f5f7fa;
color: #606266;
font-weight: 600;
text-align: center;
}
td {
padding: 12px 0;
}
.el-table__body tr:hover > td {
background-color: #f5f7fa !important;
}
}
.pagination-container {
line-height: 40px;
margin-bottom: 30px;
margin-top: 0;
padding: 0;
}
::v-deep .el-pagination {
padding: 0;
text-align: right;
}
</style>

View File

@@ -11,18 +11,18 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('reset') }}</el-button>
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">{{ $t('search') }}</el-button>
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
<el-tag type="danger" style="margin-left:15px;">{{ $t('system.clientDetails.293742-0') }}</el-tag>
</el-form-item>
<el-form-item style="float:right;">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['iot:clientDetails:add']">{{ $t('add') }}</el-button>
<el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd" v-hasPermi="['iot:clientDetails:add']">{{ $t('add') }}</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card style="padding-bottom: 100px">
<el-table v-loading="loading" :data="clientDetailsList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="clientDetailsList" header-cell-class-name="table-header" :border="false" @selection-change="handleSelectionChange">
<el-table-column :label="$t('speaker.clientDetails.index.893021-0')" align="center" prop="clientId" />
<el-table-column :label="$t('system.clientDetails.293742-1')" align="center" prop="resourceIds" />
<el-table-column :label="$t('speaker.clientDetails.index.893021-12')" align="center" prop="scope" />
@@ -49,13 +49,15 @@
<el-table-column :label="$t('opation')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['iot:clientDetails:edit']">{{ $t('update') }}</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['iot:clientDetails:remove']" disabled>{{ $t('del') }}</el-button>
<el-button size="small" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['iot:clientDetails:edit']">{{ $t('update') }}</el-button>
<el-button size="small" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['iot:clientDetails:remove']" disabled>{{ $t('del') }}</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
</div>
<!-- 添加或修改对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
@@ -290,3 +292,43 @@ export default {
},
};
</script>
</script>
<style lang="scss" scoped>
.table-header {
background-color: #f5f7fa !important;
color: #606266;
font-weight: 600;
text-align: center;
}
::v-deep .el-table {
th {
background-color: #f5f7fa;
color: #606266;
font-weight: 600;
text-align: center;
}
td {
padding: 12px 0;
}
.el-table__body tr:hover > td {
background-color: #f5f7fa !important;
}
}
.pagination-container {
line-height: 40px;
margin-bottom: 30px;
margin-top: 0;
padding: 0;
}
::v-deep .el-pagination {
padding: 0;
text-align: right;
}
</style>

View File

@@ -19,18 +19,18 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('reset') }}</el-button>
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">{{ $t('search') }}</el-button>
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item>
<el-form-item style="float: right">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleEditDevice(0)" v-hasPermi="['iot:device:add']">{{ $t('add') }}</el-button>
<el-button type="primary" plain icon="el-icon-s-grid" size="mini" @click="handleChangeShowType" v-hasPermi="['iot:device:add']">{{ $t('device.index.105953-17') }}</el-button>
<el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleEditDevice(0)" v-hasPermi="['iot:device:add']">{{ $t('add') }}</el-button>
<el-button type="primary" plain icon="el-icon-s-grid" size="small" @click="handleChangeShowType" v-hasPermi="['iot:device:add']">{{ $t('device.index.105953-17') }}</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card style="padding-bottom: 100px" v-if="showType == 'list'">
<el-table v-loading="loading" :data="deviceList" border>
<el-table v-loading="loading" :data="deviceList" :border="false" header-cell-class-name="table-header">
<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-0')" align="center" header-align="center" prop="deviceName" min-width="120" />
<el-table-column :label="$t('device.index.105953-2')" align="center" prop="serialNumber" min-width="130" />
@@ -69,7 +69,7 @@
</el-table-column>
<el-table-column :label="$t('device.index.105953-31')" align="center" prop="firmwareVersion">
<template slot-scope="scope">
<el-tag size="mini" type="info">Ver {{ scope.row.firmwareVersion }}</el-tag>
<el-tag size="small" type="info">Ver {{ scope.row.firmwareVersion }}</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('device.index.105953-32')" align="center" prop="activeTime">
@@ -91,7 +91,9 @@
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" :pageSizes="[12, 24, 36, 60]" @pagination="getList" />
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" :pageSizes="[12, 24, 36, 60]" @pagination="getList" />
</div>
</el-card>
<el-card style="padding-bottom: 100px" v-if="showType == 'card'">
@@ -106,8 +108,8 @@
</el-tooltip>
<svg-icon icon-class="device" v-if="item.isOwner == 1" />
<span style="margin: 0 5px">{{ item.deviceName }}</span>
<!-- <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-tag size="small" type="info">Ver {{item.firmwareVersion}}</el-tag>-->
<!-- <el-text v-if="item.protocolCode" type="info" size="small" style="font-size: 14px; color: #ccc">{{ item.protocolCode }}</el-text> -->
</el-link>
</el-col>
<el-col :span="1.5" style="font-size: 20px; padding-top: 5px; cursor: pointer">
@@ -136,7 +138,7 @@
<!-- <dict-tag :options="dict.type.iot_location_way" :value="item.locationWay" size="small" style="display:inline-block;" /> -->
<!-- <dict-tag :options="dict.type.iot_transport_type" :value="item.transport" size="small" style="display: inline-block" /> -->
</div>
<el-descriptions :column="1" size="mini" style="white-space: nowrap">
<el-descriptions :column="1" size="small" style="white-space: nowrap">
<el-descriptions-item :label="$t('device.index.105953-20')">
{{ item.serialNumber }}
</el-descriptions-item>
@@ -183,15 +185,19 @@
</el-col>
</el-row>
<el-button-group style="margin-top: 15px">
<el-button type="danger" size="mini" style="padding: 5px 10px" icon="el-icon-delete" @click="handleDelete(item)" v-hasPermi="['iot:device:remove']">{{ $t('del') }}</el-button>
<el-button type="primary" size="mini" style="padding: 5px 15px" icon="el-icon-view" @click="handleEditDevice(item, 'basic')" v-hasPermi="['iot:device:add']">{{ $t('look') }}</el-button>
<el-button type="success" size="mini" style="padding: 5px 15px" icon="el-icon-odometer" @click="handleRunDevice(item)" v-hasPermi="['iot:device:add']">{{ $t('device.index.105953-40') }}</el-button>
<el-button type="danger" size="small" style="padding: 5px 10px" icon="el-icon-delete" @click="handleDelete(item)" v-hasPermi="['iot:device:remove']">{{ $t('del') }}</el-button>
<el-button type="primary" size="small" style="padding: 5px 15px" icon="el-icon-view" @click="handleEditDevice(item, 'basic')" v-hasPermi="['iot:device:add']">{{ $t('look') }}</el-button>
<el-button type="success" size="small" style="padding: 5px 15px" icon="el-icon-odometer" @click="handleRunDevice(item)" v-hasPermi="['iot:device:add']">
{{ $t('device.index.105953-40') }}
</el-button>
</el-button-group>
</el-card>
</el-col>
</el-row>
<el-empty :description="$t('device.index.105953-41')" v-if="total == 0"></el-empty>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" :pageSizes="[12, 24, 36, 60]" @pagination="getList" />
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" :pageSizes="[12, 24, 36, 60]" @pagination="getList" />
</div>
</el-card>
<!-- 二维码 -->
<el-dialog :visible.sync="openSummary" width="300px" append-to-body>
@@ -503,4 +509,40 @@ export default {
.card-item {
border-radius: 15px;
}
.table-header {
background-color: #f5f7fa !important;
color: #606266;
font-weight: 600;
text-align: center;
}
::v-deep .el-table {
th {
background-color: #f5f7fa;
color: #606266;
font-weight: 600;
text-align: center;
}
td {
padding: 12px 0;
}
.el-table__body tr:hover > td {
background-color: #f5f7fa !important;
}
}
.pagination-container {
line-height: 40px;
margin-bottom: 30px;
margin-top: 0;
padding: 0;
}
::v-deep .el-pagination {
padding: 0;
text-align: right;
}
</style>

View File

@@ -1,279 +1,313 @@
<template>
<div style="padding: 6px">
<el-card v-show="showSearch" style="margin-bottom: 6px">
<el-form ref="queryForm" :model="queryParams" :inline="true" label-width="68px" style="margin-bottom: -20px">
<el-form-item :label="$t('iot.group.index.637432-0')" prop="groupName">
<el-input v-model="queryParams.groupName" :placeholder="$t('iot.group.index.637432-1')" clearable size="small"
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item v-if="isAdmin" :label="$t('iot.group.index.637432-2')" style="margin: 0 20px">
<el-switch v-model="myGroup" @change="myGroupChange"></el-switch>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('iot.group.index.637432-3') }}</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('iot.group.index.637432-4') }}</el-button>
</el-form-item>
<el-form-item style="float: right">
<el-button v-hasPermi="['iot:group:add']" type="primary" plain icon="el-icon-plus" size="mini"
@click="handleAdd">{{ $t('iot.group.index.637432-5') }}</el-button>
</el-form-item>
</el-form>
</el-card>
<div style="padding: 6px">
<el-card v-show="showSearch" style="margin-bottom: 6px">
<el-form ref="queryForm" :model="queryParams" :inline="true" label-width="68px" style="margin-bottom: -20px">
<el-form-item :label="$t('iot.group.index.637432-0')" prop="groupName">
<el-input v-model="queryParams.groupName" :placeholder="$t('iot.group.index.637432-1')" clearable size="small" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item v-if="isAdmin" :label="$t('iot.group.index.637432-2')" style="margin: 0 20px">
<el-switch v-model="myGroup" @change="myGroupChange"></el-switch>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">{{ $t('iot.group.index.637432-3') }}</el-button>
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('iot.group.index.637432-4') }}</el-button>
</el-form-item>
<el-form-item style="float: right">
<el-button v-hasPermi="['iot:group:add']" type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd">{{ $t('iot.group.index.637432-5') }}</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card style="padding-bottom: 100px">
<el-table v-loading="loading" :data="groupList" border @selection-change="handleSelectionChange">
<el-table-column :label="$t('iot.group.index.637432-0')" align="center" prop="groupName" width="200" />
<el-table-column :label="$t('iot.group.index.637432-6')" align="center" prop="groupOrder" width="100" />
<el-table-column :label="$t('iot.group.index.637432-7')" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column v-if="isAdmin" :label="$t('iot.group.index.637432-8')" align="center" prop="userName" width="100" />
<el-table-column :label="$t('iot.group.index.637432-9')" align="left" header-align="center" prop="remark" />
<el-table-column :label="$t('iot.group.index.637432-10')" align="center" class-name="small-padding fixed-width" width="320">
<template slot-scope="scope">
<el-button v-hasPermi="['iot:device:query']" size="small" type="text" style="padding: 5px"
icon="el-icon-search" @click="handleViewDevice(scope.row.groupId)">{{ $t('iot.group.index.637432-11') }}</el-button>
<el-button v-hasPermi="['iot:group:add']" size="small" type="text" style="padding: 5px" icon="el-icon-folder-add"
@click="selectDevice(scope.row)">{{ $t('iot.group.index.637432-12') }}</el-button>
<el-button v-hasPermi="['iot:group:edit']" size="small" type="text" style="padding: 5px"
icon="el-icon-edit" @click="handleUpdate(scope.row)">{{ $t('iot.group.index.637432-17') }}</el-button>
<el-button v-hasPermi="['iot:group:remove']" size="small" type="text" style="padding: 5px"
icon="el-icon-delete" @click="handleDelete(scope.row)">{{ $t('iot.group.index.637432-14') }}</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<el-card style="padding-bottom: 100px">
<el-table v-loading="loading" :data="groupList" :border="false" @selection-change="handleSelectionChange">
<el-table-column :label="$t('iot.group.index.637432-0')" align="center" prop="groupName" width="200" />
<el-table-column :label="$t('iot.group.index.637432-6')" align="center" prop="groupOrder" width="100" />
<el-table-column :label="$t('iot.group.index.637432-7')" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column v-if="isAdmin" :label="$t('iot.group.index.637432-8')" align="center" prop="userName" width="100" />
<el-table-column :label="$t('iot.group.index.637432-9')" align="left" header-align="center" prop="remark" />
<el-table-column :label="$t('iot.group.index.637432-10')" align="center" class-name="small-padding fixed-width" width="320">
<template slot-scope="scope">
<el-button v-hasPermi="['iot:device:query']" size="small" type="text" style="padding: 5px" icon="el-icon-search" @click="handleViewDevice(scope.row.groupId)">
{{ $t('iot.group.index.637432-11') }}
</el-button>
<el-button v-hasPermi="['iot:group:add']" size="small" type="text" style="padding: 5px" icon="el-icon-folder-add" @click="selectDevice(scope.row)">{{ $t('iot.group.index.637432-12') }}</el-button>
<el-button v-hasPermi="['iot:group:edit']" size="small" type="text" style="padding: 5px" icon="el-icon-edit" @click="handleUpdate(scope.row)">{{ $t('iot.group.index.637432-17') }}</el-button>
<el-button v-hasPermi="['iot:group:remove']" size="small" type="text" style="padding: 5px" icon="el-icon-delete" @click="handleDelete(scope.row)">{{ $t('iot.group.index.637432-14') }}</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
</div>
<!-- 分组设备列表 -->
<deviceList ref="groupDeviceList" :group="group"></deviceList>
<!-- 分组设备列表 -->
<deviceList ref="groupDeviceList" :group="group"></deviceList>
<!-- 添加或修改设备分组对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item :label="$t('iot.group.index.637432-0')" prop="groupName">
<el-input v-model="form.groupName" :placeholder="$t('iot.group.index.637432-1')" />
</el-form-item>
<el-form-item :label="$t('iot.group.index.637432-6')" prop="groupOrder">
<el-input v-model="form.groupOrder" type="number" :placeholder="$t('iot.group.index.637432-15')" />
</el-form-item>
<el-form-item :label="$t('iot.group.index.637432-9')" prop="remark">
<el-input v-model="form.remark" type="textarea" :placeholder="$t('iot.group.index.637432-16')" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">{{ form.groupId ? $t('iot.group.index.637432-17') : $t('iot.group.index.637432-18') }}</el-button>
<el-button @click="cancel">{{ $t('iot.group.index.637432-19') }}</el-button>
</div>
</el-dialog>
</el-card>
</div>
<!-- 添加或修改设备分组对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item :label="$t('iot.group.index.637432-0')" prop="groupName">
<el-input v-model="form.groupName" :placeholder="$t('iot.group.index.637432-1')" />
</el-form-item>
<el-form-item :label="$t('iot.group.index.637432-6')" prop="groupOrder">
<el-input v-model="form.groupOrder" type="number" :placeholder="$t('iot.group.index.637432-15')" />
</el-form-item>
<el-form-item :label="$t('iot.group.index.637432-9')" prop="remark">
<el-input v-model="form.remark" type="textarea" :placeholder="$t('iot.group.index.637432-16')" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">{{ form.groupId ? $t('iot.group.index.637432-17') : $t('iot.group.index.637432-18') }}</el-button>
<el-button @click="cancel">{{ $t('iot.group.index.637432-19') }}</el-button>
</div>
</el-dialog>
</el-card>
</div>
</template>
<script>
import deviceList from './device-list'
import { listGroup, getGroup, delGroup, addGroup, updateGroup } from '@/api/iot/group'
import {getUserId} from "@/utils/auth";
import deviceList from './device-list';
import { listGroup, getGroup, delGroup, addGroup, updateGroup } from '@/api/iot/group';
import { getUserId } from '@/utils/auth';
export default {
name: 'Group',
components: {
deviceList,
},
data() {
return {
// 是否管理员
isAdmin: false,
// 我的分组
myGroup: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 设备分组表格数据
groupList: [],
// 弹出层标题
title: '',
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
groupName: null,
userId: null,
},
// 设备分组
group: {},
// 表单参数
form: {},
// 表单校验
rules: {
groupName: [
{
required: true,
message: this.$t('iot.group.index.637432-20'),
trigger: 'blur',
},
],
groupOrder: [
{
required: true,
message: this.$t('iot.group.index.637432-21'),
trigger: 'blur',
},
],
},
}
},
created() {
this.getList()
this.init()
},
methods: {
init() {
if (this.$store.state.user.roles.indexOf('tenant') === -1 && this.$store.state.user.roles.indexOf('general') === -1) {
this.isAdmin = true
}
name: 'Group',
components: {
deviceList,
},
// 我的分组改变事件
myGroupChange() {
this.queryParams.userId = this.myGroup ? getUserId() : null;
this.handleQuery();
data() {
return {
// 是否管理员
isAdmin: false,
// 我的分组
myGroup: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 设备分组表格数据
groupList: [],
// 弹出层标题
title: '',
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
groupName: null,
userId: null,
},
// 设备分组
group: {},
// 表单参数
form: {},
// 表单校验
rules: {
groupName: [
{
required: true,
message: this.$t('iot.group.index.637432-20'),
trigger: 'blur',
},
],
groupOrder: [
{
required: true,
message: this.$t('iot.group.index.637432-21'),
trigger: 'blur',
},
],
},
};
},
/** 查看设备按钮操作 */
handleViewDevice(groupId) {
this.$router.push({
path: '/iot/device',
query: {
t: Date.now(),
groupId: groupId,
created() {
this.getList();
this.init();
},
methods: {
init() {
if (this.$store.state.user.roles.indexOf('tenant') === -1 && this.$store.state.user.roles.indexOf('general') === -1) {
this.isAdmin = true;
}
},
})
},
/** 查询设备分组列表 */
getList() {
this.loading = true
listGroup(this.queryParams).then((response) => {
this.groupList = response.rows
this.total = response.total
this.loading = false
})
},
// 取消按钮
cancel() {
this.open = false
this.reset()
},
// 表单重置
reset() {
this.form = {
groupId: null,
groupName: null,
groupOrder: null,
userId: null,
userName: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null,
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.groupId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = this.$t('iot.group.index.637432-22')
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const groupId = row.groupId || this.ids
getGroup(groupId).then((response) => {
this.form = response.data
this.open = true
this.title = this.$t('iot.group.index.637432-23')
})
},
/** 选择设备 */
selectDevice(row) {
this.group = row
// 刷新子组件
this.$refs.groupDeviceList.openDeviceList = true
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate((valid) => {
if (valid) {
if (this.form.groupId != null) {
updateGroup(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('iot.group.index.637432-24'))
this.open = false
this.getList()
})
} else {
addGroup(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('iot.group.index.637432-25'))
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const groupIds = row.groupId || this.ids
this.$modal
.confirm(this.$t('iot.group.index.637432-26', [groupIds]))
.then(function () {
return delGroup(groupIds)
})
.then(() => {
this.getList()
this.$modal.msgSuccess(this.$t('iot.group.index.637432-27'))
})
.catch(() => { })
},
/** 导出按钮操作 */
handleExport() {
this.download(
'iot/group/export',
{
...this.queryParams,
// 我的分组改变事件
myGroupChange() {
this.queryParams.userId = this.myGroup ? getUserId() : null;
this.handleQuery();
},
/** 查看设备按钮操作 */
handleViewDevice(groupId) {
this.$router.push({
path: '/iot/device',
query: {
t: Date.now(),
groupId: groupId,
},
});
},
/** 查询设备分组列表 */
getList() {
this.loading = true;
listGroup(this.queryParams).then((response) => {
this.groupList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
groupId: null,
groupName: null,
groupOrder: null,
userId: null,
userName: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null,
};
this.resetForm('form');
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm');
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.groupId);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = this.$t('iot.group.index.637432-22');
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const groupId = row.groupId || this.ids;
getGroup(groupId).then((response) => {
this.form = response.data;
this.open = true;
this.title = this.$t('iot.group.index.637432-23');
});
},
/** 选择设备 */
selectDevice(row) {
this.group = row;
// 刷新子组件
this.$refs.groupDeviceList.openDeviceList = true;
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate((valid) => {
if (valid) {
if (this.form.groupId != null) {
updateGroup(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('iot.group.index.637432-24'));
this.open = false;
this.getList();
});
} else {
addGroup(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('iot.group.index.637432-25'));
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const groupIds = row.groupId || this.ids;
this.$modal
.confirm(this.$t('iot.group.index.637432-26', [groupIds]))
.then(function () {
return delGroup(groupIds);
})
.then(() => {
this.getList();
this.$modal.msgSuccess(this.$t('iot.group.index.637432-27'));
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download(
'iot/group/export',
{
...this.queryParams,
},
`group_${new Date().getTime()}.xlsx`
);
},
`group_${new Date().getTime()}.xlsx`
)
},
},
}
};
</script>
<style lang="scss" scoped>
.table-header {
background-color: #f5f7fa !important;
color: #606266;
font-weight: 600;
text-align: center;
}
::v-deep .el-table {
th {
background-color: #f5f7fa;
color: #606266;
font-weight: 600;
text-align: center;
}
td {
padding: 12px 0;
}
.el-table__body tr:hover > td {
background-color: #f5f7fa !important;
}
}
.pagination-container {
line-height: 40px;
margin-bottom: 30px;
margin-top: 0;
padding: 0;
}
::v-deep .el-pagination {
padding: 0;
text-align: right;
}
</style>

View File

@@ -1,190 +1,185 @@
<template>
<div style="padding:6px;">
<el-card v-show="showSearch" style="margin-bottom:6px;">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px" style="margin-bottom:-20px;">
<el-form-item :label="$t('iot.log.index.902341-0')" prop="logName">
<el-input v-model="queryParams.logName" :placeholder="$t('iot.log.index.902341-1')" clearable size="small" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-2')" prop="logType">
<el-select v-model="queryParams.logType" :placeholder="$t('iot.log.index.902341-3')" clearable size="small">
<el-option v-for="dict in dict.type.iot_things_type" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-4')" prop="logLevel">
<el-input v-model="queryParams.logLevel" :placeholder="$t('iot.log.index.902341-5')" clearable size="small" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-6')" prop="deviceId">
<el-input v-model="queryParams.deviceId" :placeholder="$t('iot.log.index.902341-7')" clearable size="small" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-8')" prop="deviceName">
<el-input v-model="queryParams.deviceName" :placeholder="$t('iot.log.index.902341-9')" clearable size="small" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-10')" prop="userName">
<el-input v-model="queryParams.userName" :placeholder="$t('iot.log.index.902341-11')" clearable size="small" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-12')" prop="tenantName">
<el-input v-model="queryParams.tenantName" :placeholder="$t('iot.log.index.902341-13')" clearable size="small" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-14')" prop="isAlert">
<el-input v-model="queryParams.isAlert" :placeholder="$t('iot.log.index.902341-15')" clearable size="small" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-16')" prop="status">
<el-select v-model="queryParams.status" :placeholder="$t('iot.log.index.902341-17')" clearable size="small">
<el-option v-for="dict in dict.type.iot_yes_no" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $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-form-item>
</el-form>
</el-card>
<el-card style="padding-bottom:100px;">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['iot:log:add']">{{ $t('iot.group.index.637432-5') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['iot:log:edit']">{{ $t('iot.group.index.637432-17') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['iot:log:remove']">{{ $t('iot.group.index.637432-14') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['iot:log:export']">{{ $t('export') }}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="logList" @selection-change="handleSelectionChange" border>
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('iot.log.index.902341-0')" align="center" prop="logName" />
<el-table-column :label="$t('iot.log.index.902341-18')" align="center" prop="logValue" />
<el-table-column :label="$t('iot.log.index.902341-2')" align="center" prop="logType">
<template slot-scope="scope">
<dict-tag :options="dict.type.iot_things_type" :value="scope.row.logType" />
</template>
</el-table-column>
<el-table-column :label="$t('iot.log.index.902341-4')" align="center" prop="logLevel">
<template slot-scope="scope">
<dict-tag :options="dict.type.iot_yes_no" :value="scope.row.logLevel" />
</template>
</el-table-column>
<el-table-column :label="$t('iot.log.index.902341-6')" align="center" prop="deviceId" />
<el-table-column :label="$t('iot.log.index.902341-8')" align="center" prop="deviceName" />
<el-table-column :label="$t('iot.log.index.902341-19')" align="center" prop="userId" />
<el-table-column :label="$t('iot.log.index.902341-10')" align="center" prop="userName" />
<el-table-column :label="$t('iot.log.index.902341-20')" align="center" prop="tenantId" />
<el-table-column :label="$t('iot.log.index.902341-12')" align="center" prop="tenantName" />
<el-table-column :label="$t('iot.log.index.902341-21')" align="center" prop="triggerSource">
<template slot-scope="scope">
<dict-tag :options="dict.type.iot_yes_no" :value="scope.row.triggerSource" />
</template>
</el-table-column>
<el-table-column :label="$t('iot.log.index.902341-14')" align="center" prop="isAlert">
<template slot-scope="scope">
<dict-tag :options="dict.type.iot_yes_no" :value="scope.row.isAlert" />
</template>
</el-table-column>
<el-table-column :label="$t('iot.log.index.902341-16')" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.iot_yes_no" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column :label="$t('iot.group.index.637432-7')" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('iot.group.index.637432-9')" align="center" prop="remark" />
<el-table-column :label="$t('iot.group.index.637432-10')" align="center" class-name="small-padding fixed-width" width="150">
<template slot-scope="scope">
<el-button size="small" type="primary" style="padding:5px;" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['iot:log:edit']">{{ $t('iot.log.index.902341-22') }}</el-button>
<!-- <el-button size="small" type="danger" style="padding:5px;" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['iot:log:remove']">{{ $t('iot.group.index.637432-14') }}</el-button> -->
</template>
</el-table-column>
</el-table>
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
<!-- 添加或修改设备日志对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<div style="padding: 6px">
<el-card v-show="showSearch" style="margin-bottom: 6px">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px" style="margin-bottom: -20px">
<el-form-item :label="$t('iot.log.index.902341-0')" prop="logName">
<el-input v-model="form.logName" :placeholder="$t('iot.log.index.902341-1')" />
<el-input v-model="queryParams.logName" :placeholder="$t('iot.log.index.902341-1')" clearable size="small" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-2')" prop="logType">
<el-select v-model="form.logType" :placeholder="$t('iot.log.index.902341-3')">
<el-option v-for="dict in dict.type.iot_things_type" :key="dict.value" :label="dict.label" :value="parseInt(dict.value)"></el-option>
<el-select v-model="queryParams.logType" :placeholder="$t('iot.log.index.902341-3')" clearable size="small">
<el-option v-for="dict in dict.type.iot_things_type" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-4')" prop="logLevel">
<el-input v-model="form.logLevel" :placeholder="$t('iot.log.index.902341-5')" />
<el-input v-model="queryParams.logLevel" :placeholder="$t('iot.log.index.902341-5')" clearable size="small" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-6')" prop="deviceId">
<el-input v-model="form.deviceId" :placeholder="$t('iot.log.index.902341-7')" />
<el-input v-model="queryParams.deviceId" :placeholder="$t('iot.log.index.902341-7')" clearable size="small" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-8')" prop="deviceName">
<el-input v-model="form.deviceName" :placeholder="$t('iot.log.index.902341-9')" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-19')" prop="userId">
<el-input v-model="form.userId" :placeholder="$t('iot.log.index.902341-23')" />
<el-input v-model="queryParams.deviceName" :placeholder="$t('iot.log.index.902341-9')" clearable size="small" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-10')" prop="userName">
<el-input v-model="form.userName" :placeholder="$t('iot.log.index.902341-11')" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-20')" prop="tenantId">
<el-input v-model="form.tenantId" :placeholder="$t('iot.log.index.902341-24')" />
<el-input v-model="queryParams.userName" :placeholder="$t('iot.log.index.902341-11')" clearable size="small" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-12')" prop="tenantName">
<el-input v-model="form.tenantName" :placeholder="$t('iot.log.index.902341-13')" />
<el-input v-model="queryParams.tenantName" :placeholder="$t('iot.log.index.902341-13')" clearable size="small" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-21')" prop="triggerSource">
<el-input v-model="form.triggerSource" :placeholder="$t('iot.log.index.902341-25')" />
<el-form-item :label="$t('iot.log.index.902341-14')" prop="isAlert">
<el-input v-model="queryParams.isAlert" :placeholder="$t('iot.log.index.902341-15')" clearable size="small" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-26')" prop="isAlert">
<el-input v-model="form.isAlert" :placeholder="$t('iot.log.index.902341-15')" />
<el-form-item :label="$t('iot.log.index.902341-16')" prop="status">
<el-select v-model="queryParams.status" :placeholder="$t('iot.log.index.902341-17')" clearable size="small">
<el-option v-for="dict in dict.type.iot_yes_no" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-16')">
<el-radio-group v-model="form.status">
<el-radio v-for="dict in dict.type.iot_yes_no" :key="dict.value" :label="parseInt(dict.value)">{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('iot.group.index.637432-9')" prop="remark">
<el-input v-model="form.remark" :placeholder="$t('iot.group.index.637432-16')" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-27')" prop="logValue">
<el-input v-model="form.logValue" :placeholder="$t('iot.log.index.902341-28')" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-29')" prop="istop">
<el-input v-model="form.istop" :placeholder="$t('iot.log.index.902341-30')" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-31')" prop="ismonitor">
<el-input v-model="form.ismonitor" :placeholder="$t('iot.log.index.902341-32')" />
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">{{ $t('device.index.105953-8') }}</el-button>
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('device.index.105953-9') }}</el-button>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">{{ $t('device.index.105953-56') }}</el-button>
<el-button @click="cancel">{{ $t('iot.group.index.637432-19') }}</el-button>
</div>
</el-dialog>
</el-card>
</el-card>
</div>
<el-card style="padding-bottom: 100px">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd" v-hasPermi="['iot:log:add']">{{ $t('iot.group.index.637432-5') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="small" :disabled="single" @click="handleUpdate" v-hasPermi="['iot:log:edit']">{{ $t('iot.group.index.637432-17') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="small" :disabled="multiple" @click="handleDelete" v-hasPermi="['iot:log:remove']">{{ $t('iot.group.index.637432-14') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="small" @click="handleExport" v-hasPermi="['iot:log:export']">{{ $t('export') }}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="logList" @selection-change="handleSelectionChange" :border="false">
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('iot.log.index.902341-0')" align="center" prop="logName" />
<el-table-column :label="$t('iot.log.index.902341-18')" align="center" prop="logValue" />
<el-table-column :label="$t('iot.log.index.902341-2')" align="center" prop="logType">
<template slot-scope="scope">
<dict-tag :options="dict.type.iot_things_type" :value="scope.row.logType" />
</template>
</el-table-column>
<el-table-column :label="$t('iot.log.index.902341-4')" align="center" prop="logLevel">
<template slot-scope="scope">
<dict-tag :options="dict.type.iot_yes_no" :value="scope.row.logLevel" />
</template>
</el-table-column>
<el-table-column :label="$t('iot.log.index.902341-6')" align="center" prop="deviceId" />
<el-table-column :label="$t('iot.log.index.902341-8')" align="center" prop="deviceName" />
<el-table-column :label="$t('iot.log.index.902341-19')" align="center" prop="userId" />
<el-table-column :label="$t('iot.log.index.902341-10')" align="center" prop="userName" />
<el-table-column :label="$t('iot.log.index.902341-20')" align="center" prop="tenantId" />
<el-table-column :label="$t('iot.log.index.902341-12')" align="center" prop="tenantName" />
<el-table-column :label="$t('iot.log.index.902341-21')" align="center" prop="triggerSource">
<template slot-scope="scope">
<dict-tag :options="dict.type.iot_yes_no" :value="scope.row.triggerSource" />
</template>
</el-table-column>
<el-table-column :label="$t('iot.log.index.902341-14')" align="center" prop="isAlert">
<template slot-scope="scope">
<dict-tag :options="dict.type.iot_yes_no" :value="scope.row.isAlert" />
</template>
</el-table-column>
<el-table-column :label="$t('iot.log.index.902341-16')" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.iot_yes_no" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column :label="$t('iot.group.index.637432-7')" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('iot.group.index.637432-9')" align="center" prop="remark" />
<el-table-column :label="$t('iot.group.index.637432-10')" align="center" class-name="small-padding fixed-width" width="150">
<template slot-scope="scope">
<el-button size="small" type="primary" style="padding: 5px" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['iot:log:edit']">{{ $t('iot.log.index.902341-22') }}</el-button>
<!-- <el-button size="small" type="danger" style="padding:5px;" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['iot:log:remove']">{{ $t('iot.group.index.637432-14') }}</el-button> -->
</template>
</el-table-column>
</el-table>
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
</div>
<!-- 添加或修改设备日志对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item :label="$t('iot.log.index.902341-0')" prop="logName">
<el-input v-model="form.logName" :placeholder="$t('iot.log.index.902341-1')" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-2')" prop="logType">
<el-select v-model="form.logType" :placeholder="$t('iot.log.index.902341-3')">
<el-option v-for="dict in dict.type.iot_things_type" :key="dict.value" :label="dict.label" :value="parseInt(dict.value)"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-4')" prop="logLevel">
<el-input v-model="form.logLevel" :placeholder="$t('iot.log.index.902341-5')" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-6')" prop="deviceId">
<el-input v-model="form.deviceId" :placeholder="$t('iot.log.index.902341-7')" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-8')" prop="deviceName">
<el-input v-model="form.deviceName" :placeholder="$t('iot.log.index.902341-9')" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-19')" prop="userId">
<el-input v-model="form.userId" :placeholder="$t('iot.log.index.902341-23')" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-10')" prop="userName">
<el-input v-model="form.userName" :placeholder="$t('iot.log.index.902341-11')" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-20')" prop="tenantId">
<el-input v-model="form.tenantId" :placeholder="$t('iot.log.index.902341-24')" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-12')" prop="tenantName">
<el-input v-model="form.tenantName" :placeholder="$t('iot.log.index.902341-13')" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-21')" prop="triggerSource">
<el-input v-model="form.triggerSource" :placeholder="$t('iot.log.index.902341-25')" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-26')" prop="isAlert">
<el-input v-model="form.isAlert" :placeholder="$t('iot.log.index.902341-15')" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-16')">
<el-radio-group v-model="form.status">
<el-radio v-for="dict in dict.type.iot_yes_no" :key="dict.value" :label="parseInt(dict.value)">{{ dict.label }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('iot.group.index.637432-9')" prop="remark">
<el-input v-model="form.remark" :placeholder="$t('iot.group.index.637432-16')" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-27')" prop="logValue">
<el-input v-model="form.logValue" :placeholder="$t('iot.log.index.902341-28')" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-29')" prop="istop">
<el-input v-model="form.istop" :placeholder="$t('iot.log.index.902341-30')" />
</el-form-item>
<el-form-item :label="$t('iot.log.index.902341-31')" prop="ismonitor">
<el-input v-model="form.ismonitor" :placeholder="$t('iot.log.index.902341-32')" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">{{ $t('device.index.105953-56') }}</el-button>
<el-button @click="cancel">{{ $t('iot.group.index.637432-19') }}</el-button>
</div>
</el-dialog>
</el-card>
</div>
</template>
<script>
import {
listLog,
getLog,
delLog,
addLog,
updateLog
} from "@/api/iot/log";
import { listLog, getLog, delLog, addLog, updateLog } from '@/api/iot/log';
export default {
name: "Log",
name: 'Log',
dicts: ['iot_things_type', 'iot_yes_no'],
data() {
return {
@@ -203,7 +198,7 @@ export default {
// 设备日志表格数据
logList: [],
// 弹出层标题
title: "",
title: '',
// 是否显示弹出层
open: false,
// 查询参数
@@ -221,58 +216,76 @@ export default {
isAlert: null,
status: null,
istop: null,
ismonitor: null
ismonitor: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
logName: [{
required: true,
message: this.$t('iot.log.index.902341-33'),
trigger: "blur"
}],
logType: [{
required: true,
message: this.$t('iot.log.index.902341-34'),
trigger: "change"
}],
logLevel: [{
required: true,
message: this.$t('iot.log.index.902341-35'),
trigger: "blur"
}],
deviceId: [{
required: true,
message: this.$t('iot.log.index.902341-36'),
trigger: "blur"
}],
deviceName: [{
required: true,
message: this.$t('iot.log.index.902341-37'),
trigger: "blur"
}],
userId: [{
required: true,
message: this.$t('iot.log.index.902341-38'),
trigger: "blur"
}],
userName: [{
required: true,
message: this.$t('iot.log.index.902341-39'),
trigger: "blur"
}],
tenantId: [{
required: true,
message: this.$t('iot.log.index.902341-40'),
trigger: "blur"
}],
tenantName: [{
required: true,
message: this.$t('iot.log.index.902341-41'),
trigger: "blur"
}],
}
logName: [
{
required: true,
message: this.$t('iot.log.index.902341-33'),
trigger: 'blur',
},
],
logType: [
{
required: true,
message: this.$t('iot.log.index.902341-34'),
trigger: 'change',
},
],
logLevel: [
{
required: true,
message: this.$t('iot.log.index.902341-35'),
trigger: 'blur',
},
],
deviceId: [
{
required: true,
message: this.$t('iot.log.index.902341-36'),
trigger: 'blur',
},
],
deviceName: [
{
required: true,
message: this.$t('iot.log.index.902341-37'),
trigger: 'blur',
},
],
userId: [
{
required: true,
message: this.$t('iot.log.index.902341-38'),
trigger: 'blur',
},
],
userName: [
{
required: true,
message: this.$t('iot.log.index.902341-39'),
trigger: 'blur',
},
],
tenantId: [
{
required: true,
message: this.$t('iot.log.index.902341-40'),
trigger: 'blur',
},
],
tenantName: [
{
required: true,
message: this.$t('iot.log.index.902341-41'),
trigger: 'blur',
},
],
},
};
},
created() {
@@ -282,7 +295,7 @@ export default {
/** 查询设备日志列表 */
getList() {
this.loading = true;
listLog(this.queryParams).then(response => {
listLog(this.queryParams).then((response) => {
this.logList = response.rows;
this.total = response.total;
this.loading = false;
@@ -314,9 +327,9 @@ export default {
remark: null,
logValue: null,
istop: null,
ismonitor: null
ismonitor: null,
};
this.resetForm("form");
this.resetForm('form');
},
/** 搜索按钮操作 */
handleQuery() {
@@ -325,14 +338,14 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.resetForm('queryForm');
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.deviceLogId)
this.single = selection.length !== 1
this.multiple = !selection.length
this.ids = selection.map((item) => item.deviceLogId);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
@@ -343,8 +356,8 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const deviceLogId = row.deviceLogId || this.ids
getLog(deviceLogId).then(response => {
const deviceLogId = row.deviceLogId || this.ids;
getLog(deviceLogId).then((response) => {
this.form = response.data;
this.open = true;
this.title = this.$t('iot.log.index.902341-43');
@@ -352,16 +365,16 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
this.$refs['form'].validate((valid) => {
if (valid) {
if (this.form.deviceLogId != null) {
updateLog(this.form).then(response => {
updateLog(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('iot.group.index.637432-24'));
this.open = false;
this.getList();
});
} else {
addLog(this.form).then(response => {
addLog(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('iot.group.index.637432-25'));
this.open = false;
this.getList();
@@ -373,19 +386,64 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const deviceLogIds = row.deviceLogId || this.ids;
this.$modal.confirm(this.$t('iot.log.index.902341-44', [deviceLogIds])).then(function () {
return delLog(deviceLogIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess(this.$t('iot.group.index.637432-27'));
}).catch(() => {});
this.$modal
.confirm(this.$t('iot.log.index.902341-44', [deviceLogIds]))
.then(function () {
return delLog(deviceLogIds);
})
.then(() => {
this.getList();
this.$modal.msgSuccess(this.$t('iot.group.index.637432-27'));
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('iot/log/export', {
...this.queryParams
}, `log_${new Date().getTime()}.xlsx`)
}
}
this.download(
'iot/log/export',
{
...this.queryParams,
},
`log_${new Date().getTime()}.xlsx`
);
},
},
};
</script>
<style lang="scss" scoped>
.table-header {
background-color: #f5f7fa !important;
color: #606266;
font-weight: 600;
text-align: center;
}
::v-deep .el-table {
th {
background-color: #f5f7fa;
color: #606266;
font-weight: 600;
text-align: center;
}
td {
padding: 12px 0;
}
.el-table__body tr:hover > td {
background-color: #f5f7fa !important;
}
}
.pagination-container {
line-height: 40px;
margin-bottom: 30px;
margin-top: 0;
padding: 0;
}
::v-deep .el-pagination {
padding: 0;
text-align: right;
}
</style>

View File

@@ -29,32 +29,32 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $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="primary" icon="el-icon-search" size="small" @click="handleQuery">{{ $t('device.index.105953-8') }}</el-button>
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('device.index.105953-9') }}</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
<el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd"
v-hasPermi="['iot:news:add']">{{ $t('system.sysclient.652154-4') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
<el-button type="success" plain icon="el-icon-edit" size="small" :disabled="single" @click="handleUpdate"
v-hasPermi="['iot:news:edit']">{{ $t('system.sysclient.652154-5') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
<el-button type="danger" plain icon="el-icon-delete" size="small" :disabled="multiple" @click="handleDelete"
v-hasPermi="['iot:news:remove']">{{ $t('system.sysclient.652154-6') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
<el-button type="warning" plain icon="el-icon-download" size="small" @click="handleExport"
v-hasPermi="['iot:news:export']">{{ $t('system.sysclient.652154-7') }}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="newsList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="newsList" header-cell-class-name="table-header" :border="false" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('system.news.893410-10')" align="center" prop="imgUrl" width="140px;">
<template slot-scope="scope">
@@ -94,18 +94,20 @@
<el-table-column :label="$t('iot.group.index.637432-9')" align="center" prop="remark" />
<el-table-column :label="$t('device.index.105953-34')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-view"
<el-button size="small" type="text" icon="el-icon-view"
@click="openDetailDialog(scope.row.newsId)">{{ $t('system.news.893410-25') }}</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
<el-button size="small" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['iot:news:edit']">{{ $t('system.sysclient.652154-5') }}</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
<el-button size="small" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['iot:news:remove']">{{ $t('system.sysclient.652154-6') }}</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
</div>
<!-- 添加或修改新闻资讯对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
@@ -169,7 +171,7 @@
<!--通知公告详情 -->
<el-dialog :title="form.title" :visible.sync="openDetail" width="800px" append-to-body>
<div style="margin-top:-20px;margin-bottom:10px;">
<el-tag size="mini" effect="dark" type="success">{{ form.categoryName }}</el-tag>
<el-tag size="small" effect="dark" type="success">{{ form.categoryName }}</el-tag>
<span style="margin-left:20px;">{{ form.createTime }}</span>
</div>
<div v-loading="loadingDetail" class="content">
@@ -430,3 +432,43 @@ export default {
border: 1px solid #eee;
border-radius: 10px;
}</style>
</script>
<style lang="scss" scoped>
.table-header {
background-color: #f5f7fa !important;
color: #606266;
font-weight: 600;
text-align: center;
}
::v-deep .el-table {
th {
background-color: #f5f7fa;
color: #606266;
font-weight: 600;
text-align: center;
}
td {
padding: 12px 0;
}
.el-table__body tr:hover > td {
background-color: #f5f7fa !important;
}
}
.pagination-container {
line-height: 40px;
margin-bottom: 30px;
margin-top: 0;
padding: 0;
}
::v-deep .el-pagination {
padding: 0;
text-align: right;
}
</style>

View File

@@ -6,32 +6,32 @@
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $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="primary" icon="el-icon-search" size="small" @click="handleQuery">{{ $t('device.index.105953-8') }}</el-button>
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('device.index.105953-9') }}</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
<el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd"
v-hasPermi="['iot:newsCategory:add']">{{ $t('system.sysclient.652154-4') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
<el-button type="success" plain icon="el-icon-edit" size="small" :disabled="single" @click="handleUpdate"
v-hasPermi="['iot:newsCategory:edit']">{{ $t('system.sysclient.652154-5') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
<el-button type="danger" plain icon="el-icon-delete" size="small" :disabled="multiple" @click="handleDelete"
v-hasPermi="['iot:newsCategory:remove']">{{ $t('system.sysclient.652154-6') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
<el-button type="warning" plain icon="el-icon-download" size="small" @click="handleExport"
v-hasPermi="['iot:newsCategory:export']">{{ $t('system.sysclient.652154-7') }}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="categoryList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="categoryList" header-cell-class-name="table-header" @selection-change="handleSelectionChange" :border="false">
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('system.newsCategory.874509-1')" align="center" prop="categoryId" />
<el-table-column :label="$t('system.newsCategory.874509-0')" align="center" prop="categoryName" />
@@ -44,16 +44,18 @@
<el-table-column :label="$t('iot.group.index.637432-9')" align="center" prop="remark" min-width="200" header-align="center" />
<el-table-column :label="$t('device.index.105953-34')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-view" @click="handleUpdate(scope.row)"
<el-button size="small" type="text" icon="el-icon-view" @click="handleUpdate(scope.row)"
v-hasPermi="['iot:newsCategory:add']">{{ $t('device.index.105953-60') }}</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
<el-button size="small" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['iot:newsCategory:remove']">{{ $t('system.sysclient.652154-6') }}</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
</div>
<!-- 添加或修改新闻分类对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
@@ -241,3 +243,43 @@ export default {
}
};
</script>
</script>
<style lang="scss" scoped>
.table-header {
background-color: #f5f7fa !important;
color: #606266;
font-weight: 600;
text-align: center;
}
::v-deep .el-table {
th {
background-color: #f5f7fa;
color: #606266;
font-weight: 600;
text-align: center;
}
td {
padding: 12px 0;
}
.el-table__body tr:hover > td {
background-color: #f5f7fa !important;
}
}
.pagination-container {
line-height: 40px;
margin-bottom: 30px;
margin-top: 0;
padding: 0;
}
::v-deep .el-pagination {
padding: 0;
text-align: right;
}
</style>

View File

@@ -36,7 +36,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="platformList" :border="false" @selection-change="handleSelectionChange" ref="multipleTable" :row-key="getRowKeys">
<el-table v-loading="loading" :data="platformList" header-cell-class-name="table-header" :border="false" @selection-change="handleSelectionChange" ref="multipleTable" :row-key="getRowKeys">
<el-table-column :reserve-selection="true" type="selection" width="55" align="center" />
<el-table-column align="left" :label="$t('system.platform.675309-3')" prop="platform" min-width="200">
<template slot-scope="scope">
@@ -50,7 +50,14 @@
</el-table-column>
<el-table-column :label="$t('system.platform.675309-4')" align="center" prop="clientId" min-width="180" />
<el-table-column :label="$t('system.platform.675309-5')" align="left" prop="redirectUri" min-width="250" :show-overflow-tooltip="true" />
<el-table-column align="left" :label="$t('system.platform.675309-6')" prop="bindUri" :show-tooltip-when-overflow="true" :render-header="(h, column) => renderHeaderMethods(h, column, columnTips.bindId)" min-width="250" />
<el-table-column
align="left"
:label="$t('system.platform.675309-6')"
prop="bindUri"
:show-tooltip-when-overflow="true"
:render-header="(h, column) => renderHeaderMethods(h, column, columnTips.bindId)"
min-width="250"
/>
<el-table-column
align="left"
:label="$t('system.platform.675309-7')"
@@ -80,49 +87,51 @@
</el-table-column>
</el-table>
<pagination style="margin-bottom: 20px" v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
</el-card>
<!-- 添加或修改第三方登录平台控制对话框 -->
<el-dialog :title="title" :visible.sync="open" width="630px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
<el-form-item :label="$t('system.platform.675309-9')" prop="platform">
<el-select v-model="form.platform" :placeholder="$t('system.platform.675309-10')" style="width: 400px">
<el-option v-for="dict in dict.type.iot_social_platform" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('system.platform.675309-11')" prop="status">
<el-select v-model="form.status" :placeholder="$t('system.platform.675309-2')" style="width: 400px">
<el-option v-for="dict in dict.type.iot_social_platform_status" :key="dict.value" :label="dict.label" :value="Number(dict.value)"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('system.platform.675309-12')" prop="clientId">
<el-input v-model="form.clientId" :placeholder="$t('system.platform.675309-13')" style="width: 400px" />
</el-form-item>
<el-form-item :label="$t('system.platform.675309-14')" prop="secretKey">
<el-input v-model="form.secretKey" :placeholder="$t('system.platform.675309-15')" style="width: 400px" />
</el-form-item>
<el-form-item :label="$t('system.platform.675309-16')" prop="redirectUri">
<el-input v-model="form.redirectUri" :placeholder="$t('system.platform.675309-17')" style="width: 400px" />
</el-form-item>
<el-form-item :label="$t('system.platform.675309-18')" prop="bindUri">
<el-input v-model="form.bindUri" :placeholder="$t('system.platform.675309-19')" style="width: 400px" />
</el-form-item>
<el-form-item :label="$t('system.platform.675309-20')" prop="redirectLoginUri">
<el-input v-model="form.redirectLoginUri" :placeholder="$t('system.platform.675309-21')" style="width: 400px" />
</el-form-item>
<el-form-item :label="$t('system.platform.675309-22')" prop="errorMsgUri">
<el-input v-model="form.errorMsgUri" :placeholder="$t('system.platform.675309-23')" style="width: 400px" />
</el-form-item>
<el-form-item :label="$t('iot.group.index.637432-9')" prop="remark">
<el-input v-model="form.remark" :placeholder="$t('iot.group.index.637432-16')" type="textarea" :autosize="{ minRows: 3, maxRows: 5 }" style="width: 400px" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">{{ $t('device.index.105953-56') }}</el-button>
<el-button @click="cancel">{{ $t('iot.group.index.637432-19') }}</el-button>
<div class="pagination-container">
<pagination style="margin-bottom: 0" v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
</div>
</el-dialog>
<!-- 添加或修改第三方登录平台控制对话框 -->
<el-dialog :title="title" :visible.sync="open" width="630px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
<el-form-item :label="$t('system.platform.675309-9')" prop="platform">
<el-select v-model="form.platform" :placeholder="$t('system.platform.675309-10')" style="width: 400px">
<el-option v-for="dict in dict.type.iot_social_platform" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('system.platform.675309-11')" prop="status">
<el-select v-model="form.status" :placeholder="$t('system.platform.675309-2')" style="width: 400px">
<el-option v-for="dict in dict.type.iot_social_platform_status" :key="dict.value" :label="dict.label" :value="Number(dict.value)"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('system.platform.675309-12')" prop="clientId">
<el-input v-model="form.clientId" :placeholder="$t('system.platform.675309-13')" style="width: 400px" />
</el-form-item>
<el-form-item :label="$t('system.platform.675309-14')" prop="secretKey">
<el-input v-model="form.secretKey" :placeholder="$t('system.platform.675309-15')" style="width: 400px" />
</el-form-item>
<el-form-item :label="$t('system.platform.675309-16')" prop="redirectUri">
<el-input v-model="form.redirectUri" :placeholder="$t('system.platform.675309-17')" style="width: 400px" />
</el-form-item>
<el-form-item :label="$t('system.platform.675309-18')" prop="bindUri">
<el-input v-model="form.bindUri" :placeholder="$t('system.platform.675309-19')" style="width: 400px" />
</el-form-item>
<el-form-item :label="$t('system.platform.675309-20')" prop="redirectLoginUri">
<el-input v-model="form.redirectLoginUri" :placeholder="$t('system.platform.675309-21')" style="width: 400px" />
</el-form-item>
<el-form-item :label="$t('system.platform.675309-22')" prop="errorMsgUri">
<el-input v-model="form.errorMsgUri" :placeholder="$t('system.platform.675309-23')" style="width: 400px" />
</el-form-item>
<el-form-item :label="$t('iot.group.index.637432-9')" prop="remark">
<el-input v-model="form.remark" :placeholder="$t('iot.group.index.637432-16')" type="textarea" :autosize="{ minRows: 3, maxRows: 5 }" style="width: 400px" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">{{ $t('device.index.105953-56') }}</el-button>
<el-button @click="cancel">{{ $t('iot.group.index.637432-19') }}</el-button>
</div>
</el-dialog>
</el-card>
</div>
</template>

View File

@@ -14,11 +14,11 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('reset') }}</el-button>
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">{{ $t('search') }}</el-button>
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item>
<el-form-item style="float:right;">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleEditProduct(0)" v-hasPermi="['iot:product:add']">{{ $t('add') }}</el-button>
<el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleEditProduct(0)" v-hasPermi="['iot:product:add']">{{ $t('add') }}</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -30,15 +30,15 @@
<el-col :span="20" style="text-align:left;">
<el-link type="" :underline="false" @click="handleEditProduct(item)" style="font-weight:bold;font-size:16px;line-height:32px;white-space:nowrap;">
<svg-icon icon-class="product" /> {{item.productName}}
<el-tag type="info" size="mini" style="margin-left:5px;font-weight:200" v-if="item.isSys==1">{{ $t('product.index.091251-47') }}</el-tag>
<el-tag type="info" size="small" style="margin-left:5px;font-weight:200" v-if="item.isSys==1">{{ $t('product.index.091251-47') }}</el-tag>
</el-link>
</el-col>
<el-col :span="4">
<el-tooltip class="item" effect="dark" :content="$t('product.index.091251-12')" placement="top-start" v-if="item.status==2">
<el-button type="success" size="mini" style="padding:5px;" @click="changeProductStatus(item.productId,1,item.deviceType)">{{ $t('product.index.091251-13') }}</el-button>
<el-button type="success" size="small" style="padding:5px;" @click="changeProductStatus(item.productId,1,item.deviceType)">{{ $t('product.index.091251-13') }}</el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('product.index.091251-14')" placement="top-start" v-if="item.status==1">
<el-button type="info" size="mini" style="padding:5px;" @click="changeProductStatus(item.productId,2,item.deviceType)">{{ $t('product.index.091251-15') }}</el-button>
<el-button type="info" size="small" style="padding:5px;" @click="changeProductStatus(item.productId,2,item.deviceType)">{{ $t('product.index.091251-15') }}</el-button>
</el-tooltip>
</el-col>
</el-row>
@@ -55,8 +55,8 @@
<dict-tag :options="dict.type.iot_network_method" :value="item.networkMethod" />
</el-descriptions-item>
<el-descriptions-item :label="$t('product.index.091251-19')">
<el-tag type="success" size="mini" v-if="item.isAuthorize==1">{{ $t('product.index.091251-20') }}</el-tag>
<el-tag type="info" size="mini" v-else>{{ $t('product.index.091251-21') }}</el-tag>
<el-tag type="success" size="small" v-if="item.isAuthorize==1">{{ $t('product.index.091251-20') }}</el-tag>
<el-tag type="info" size="small" v-else>{{ $t('product.index.091251-21') }}</el-tag>
</el-descriptions-item>
</el-descriptions>
</el-col>
@@ -70,17 +70,19 @@
</el-col>
</el-row>
<el-button-group style="margin-top:15px;height:28px;">
<el-button size="mini" type="primary" icon="el-icon-view" @click="handleEditProduct(item)" v-hasPermi="['iot:product:query']">{{ $t('product.index.091251-48') }}</el-button>
<el-button size="mini" type="danger" icon="el-icon-delete" @click="handleDelete(item)" v-hasPermi="['iot:product:remove']" v-if="item.status==1">{{ $t('product.index.091251-23') }}</el-button>
<el-button size="mini" type="success" icon="el-icon-s-check" @click="handleDeviceAuthorize(item)" v-hasPermi="['iot:product:edit']" v-if="item.status==2" :disabled="item.isAuthorize!=1">{{ $t('product.index.091251-19') }}</el-button>
<el-button size="mini" type="warning" icon="el-icon-search" @click="handleViewDevice(item.productId)" v-hasPermi="['iot:device:query']">{{ $t('product.index.091251-24') }}</el-button>
<el-button size="small" type="primary" icon="el-icon-view" @click="handleEditProduct(item)" v-hasPermi="['iot:product:query']">{{ $t('product.index.091251-48') }}</el-button>
<el-button size="small" type="danger" icon="el-icon-delete" @click="handleDelete(item)" v-hasPermi="['iot:product:remove']" v-if="item.status==1">{{ $t('product.index.091251-23') }}</el-button>
<el-button size="small" type="success" icon="el-icon-s-check" @click="handleDeviceAuthorize(item)" v-hasPermi="['iot:product:edit']" v-if="item.status==2" :disabled="item.isAuthorize!=1">{{ $t('product.index.091251-19') }}</el-button>
<el-button size="small" type="warning" icon="el-icon-search" @click="handleViewDevice(item.productId)" v-hasPermi="['iot:device:query']">{{ $t('product.index.091251-24') }}</el-button>
</el-button-group>
</el-card>
</el-col>
</el-row>
<el-empty :description="$t('product.index.091251-25')" v-if="total==0"></el-empty>
<div class="pagination-container">
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" :pageSizes="[12, 24, 36, 60]" @pagination="getList" />
</div>
<!-- 下载SDK -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>

View File

@@ -14,18 +14,18 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('reset') }}</el-button>
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">{{ $t('search') }}</el-button>
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item>
<el-form-item style="float: right">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['iot:video:add']" :disabled="isGeneralUser">{{ $t('sip.index.998533-6') }}</el-button>
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple || isGeneralUser" @click="handleDelete" v-hasPermi="['iot:video:remove']">{{ $t('del') }}</el-button>
<el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd" v-hasPermi="['iot:video:add']" :disabled="isGeneralUser">{{ $t('sip.index.998533-6') }}</el-button>
<el-button type="danger" plain icon="el-icon-delete" size="small" :disabled="multiple || isGeneralUser" @click="handleDelete" v-hasPermi="['iot:video:remove']">{{ $t('del') }}</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card style="margin-bottom: 5px">
<el-table v-loading="loading" :data="sipidList" @selection-change="handleSelectionChange" @cell-dblclick="celldblclick" size="">
<el-table v-loading="loading" :data="sipidList" header-cell-class-name="table-header" :border="false" @selection-change="handleSelectionChange" @cell-dblclick="celldblclick" size="">
<el-table-column type="selection" :selectable="selectable" width="55" align="center" />
<el-table-column :label="$t('sip.index.998533-0')" align="center" prop="deviceSipId">
<template slot-scope="scope">
@@ -35,7 +35,7 @@
<el-table-column :label="$t('sip.index.998533-2')" align="center" prop="channelSipId" />
<el-table-column :label="$t('sip.index.998533-4')" align="center" prop="status" width="80">
<template slot-scope="scope">
<dict-tag :options="dict.type.sip_gen_status" :value="scope.row.status" size="mini" />
<dict-tag :options="dict.type.sip_gen_status" :value="scope.row.status" size="small" />
</template>
</el-table-column>
<el-table-column :label="$t('sip.index.998533-8')" align="center" prop="productName" />
@@ -57,14 +57,16 @@
</el-table-column>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row,'remark')" v-hasPermi="['iot:video:edit']">修改
<el-button size="small" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row,'remark')" v-hasPermi="['iot:video:edit']">修改
</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['iot:video:remove']" v-if="!scope.row.deviceSipId">删除
<el-button size="small" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['iot:video:remove']" v-if="!scope.row.deviceSipId">删除
</el-button>
</template>
</el-table-column> -->
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
</div>
</el-card>
<el-dialog :title="title" :visible.sync="open" width="450px" append-to-body :close-on-click-modal="false">
@@ -456,3 +458,41 @@ export default {
},
};
</script>
<style lang="scss" scoped>
.table-header {
background-color: #f5f7fa !important;
color: #606266;
font-weight: 600;
text-align: center;
}
::v-deep .el-table {
th {
background-color: #f5f7fa;
color: #606266;
font-weight: 600;
text-align: center;
}
td {
padding: 12px 0;
}
.el-table__body tr:hover > td {
background-color: #f5f7fa !important;
}
}
.pagination-container {
line-height: 40px;
margin-bottom: 30px;
margin-top: 0;
padding: 0;
}
::v-deep .el-pagination {
padding: 0;
text-align: right;
}
</style>

View File

@@ -11,17 +11,17 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('reset') }}</el-button>
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">{{ $t('search') }}</el-button>
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item>
<el-form-item style="float: right">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['iot:template:add']">{{ $t('add') }}</el-button>
<el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd" v-hasPermi="['iot:template:add']">{{ $t('add') }}</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card style="padding-bottom: 100px">
<el-table v-loading="loading" :data="templateList" @selection-change="handleSelectionChange" border>
<el-table v-loading="loading" :data="templateList" @selection-change="handleSelectionChange" :border="false">
<el-table-column :label="$t('template.index.891112-22')" align="center" prop="templateName" />
<el-table-column :label="$t('template.index.891112-7')" align="center" prop="identifier" />
<el-table-column :label="$t('template.index.891112-8')" align="center" prop="isMonitor" width="75">
@@ -81,7 +81,9 @@
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
</div>
<!-- 添加或修改通用物模型对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body :close-on-click-modal="false">
@@ -271,9 +273,9 @@
<el-row style="padding: 0 10px 5px" v-for="(item, index) in form.specs.params" :key="index">
<div style="margin-top: 5px" v-if="index == 0"></div>
<el-col :span="18">
<el-input readonly v-model="item.name" size="mini" :placeholder="$t('template.index.891112-76')" style="margin-top: 3px">
<el-input readonly v-model="item.name" size="small" :placeholder="$t('template.index.891112-76')" style="margin-top: 3px">
<template slot="prepend">
<el-tag size="mini" effect="dark" style="margin-left: -21px; height: 26px; line-height: 26px">{{ item.order }}</el-tag>
<el-tag size="small" effect="dark" style="margin-left: -21px; height: 26px; line-height: 26px">{{ item.order }}</el-tag>
{{ form.identifier + '_' + item.id }}
</template>
<el-button slot="append" @click="editParameter(item, index)" size="small">{{ $t('edit') }}</el-button>
@@ -296,9 +298,9 @@
<el-row style="padding: 0 10px 5px" v-for="(item, index) in form.specs.params" :key="index">
<div style="margin-top: 5px" v-if="index == 0"></div>
<el-col :span="18">
<el-input readonly v-model="item.name" size="mini" :placeholder="$t('template.index.891112-76')" style="margin-top: 3px">
<el-input readonly v-model="item.name" size="small" :placeholder="$t('template.index.891112-76')" style="margin-top: 3px">
<template slot="prepend">
<el-tag size="mini" effect="dark" style="margin-left: -21px; height: 26px; line-height: 26px">{{ item.order }}</el-tag>
<el-tag size="small" effect="dark" style="margin-left: -21px; height: 26px; line-height: 26px">{{ item.order }}</el-tag>
{{ form.identifier + '_' + item.id }}
</template>
<el-button slot="append" @click="editParameter(item, index)">{{ $t('edit') }}</el-button>
@@ -899,3 +901,41 @@ export default {
},
};
</script>
<style lang="scss" scoped>
.table-header {
background-color: #f5f7fa !important;
color: #606266;
font-weight: 600;
text-align: center;
}
::v-deep .el-table {
th {
background-color: #f5f7fa;
color: #606266;
font-weight: 600;
text-align: center;
}
td {
padding: 12px 0;
}
.el-table__body tr:hover > td {
background-color: #f5f7fa !important;
}
}
.pagination-container {
line-height: 40px;
margin-bottom: 30px;
margin-top: 0;
padding: 0;
}
::v-deep .el-pagination {
padding: 0;
text-align: right;
}
</style>