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

@@ -11,18 +11,18 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</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="mini" @click="resetQuery">{{ $t('reset') }}</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-tag type="danger" style="margin-left:15px;">{{ $t('system.clientDetails.293742-0') }}</el-tag>
</el-form-item> </el-form-item>
<el-form-item style="float:right;"> <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-item>
</el-form> </el-form>
</el-card> </el-card>
<el-card style="padding-bottom: 100px"> <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('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('system.clientDetails.293742-1')" align="center" prop="resourceIds" />
<el-table-column :label="$t('speaker.clientDetails.index.893021-12')" align="center" prop="scope" /> <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"> <el-table-column :label="$t('opation')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <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="small" 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-delete" @click="handleDelete(scope.row)" v-hasPermi="['iot:clientDetails:remove']" disabled>{{ $t('del') }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> <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> <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
@@ -290,3 +292,43 @@ export default {
}, },
}; };
</script> </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-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</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="mini" @click="resetQuery">{{ $t('reset') }}</el-button> <el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item> </el-form-item>
<el-form-item style="float: right"> <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-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="mini" @click="handleChangeShowType" v-hasPermi="['iot:device:add']">{{ $t('device.index.105953-17') }}</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-item>
</el-form> </el-form>
</el-card> </el-card>
<el-card style="padding-bottom: 100px" v-if="showType == 'list'"> <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-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-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" /> <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>
<el-table-column :label="$t('device.index.105953-31')" align="center" prop="firmwareVersion"> <el-table-column :label="$t('device.index.105953-31')" align="center" prop="firmwareVersion">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('device.index.105953-32')" align="center" prop="activeTime"> <el-table-column :label="$t('device.index.105953-32')" align="center" prop="activeTime">
@@ -91,7 +91,9 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<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" /> <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>
<el-card style="padding-bottom: 100px" v-if="showType == 'card'"> <el-card style="padding-bottom: 100px" v-if="showType == 'card'">
@@ -106,8 +108,8 @@
</el-tooltip> </el-tooltip>
<svg-icon icon-class="device" v-if="item.isOwner == 1" /> <svg-icon icon-class="device" v-if="item.isOwner == 1" />
<span style="margin: 0 5px">{{ item.deviceName }}</span> <span style="margin: 0 5px">{{ item.deviceName }}</span>
<!-- <el-tag size="mini" type="info">Ver {{item.firmwareVersion}}</el-tag>--> <!-- <el-tag size="small" 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="small" style="font-size: 14px; color: #ccc">{{ item.protocolCode }}</el-text> -->
</el-link> </el-link>
</el-col> </el-col>
<el-col :span="1.5" style="font-size: 20px; padding-top: 5px; cursor: pointer"> <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_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" /> --> <!-- <dict-tag :options="dict.type.iot_transport_type" :value="item.transport" size="small" style="display: inline-block" /> -->
</div> </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')"> <el-descriptions-item :label="$t('device.index.105953-20')">
{{ item.serialNumber }} {{ item.serialNumber }}
</el-descriptions-item> </el-descriptions-item>
@@ -183,15 +185,19 @@
</el-col> </el-col>
</el-row> </el-row>
<el-button-group style="margin-top: 15px"> <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="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="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="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="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="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-button-group>
</el-card> </el-card>
</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>
<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" /> <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>
<!-- 二维码 --> <!-- 二维码 -->
<el-dialog :visible.sync="openSummary" width="300px" append-to-body> <el-dialog :visible.sync="openSummary" width="300px" append-to-body>
@@ -503,4 +509,40 @@ export default {
.card-item { .card-item {
border-radius: 15px; 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> </style>

View File

@@ -3,25 +3,23 @@
<el-card v-show="showSearch" style="margin-bottom: 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 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-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" <el-input v-model="queryParams.groupName" :placeholder="$t('iot.group.index.637432-1')" clearable size="small" @keyup.enter.native="handleQuery" />
@keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item v-if="isAdmin" :label="$t('iot.group.index.637432-2')" style="margin: 0 20px"> <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-switch v-model="myGroup" @change="myGroupChange"></el-switch>
</el-form-item> </el-form-item>
<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 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="mini" @click="resetQuery">{{ $t('iot.group.index.637432-4') }}</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>
<el-form-item style="float: right"> <el-form-item style="float: right">
<el-button v-hasPermi="['iot:group:add']" type="primary" plain icon="el-icon-plus" size="mini" <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>
@click="handleAdd">{{ $t('iot.group.index.637432-5') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
<el-card style="padding-bottom: 100px"> <el-card style="padding-bottom: 100px">
<el-table v-loading="loading" :data="groupList" border @selection-change="handleSelectionChange"> <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-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-6')" align="center" prop="groupOrder" width="100" />
<el-table-column :label="$t('iot.group.index.637432-7')" align="center" prop="createTime" width="180"> <el-table-column :label="$t('iot.group.index.637432-7')" align="center" prop="createTime" width="180">
@@ -33,19 +31,18 @@
<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-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"> <el-table-column :label="$t('iot.group.index.637432-10')" align="center" class-name="small-padding fixed-width" width="320">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-hasPermi="['iot:device:query']" size="small" type="text" style="padding: 5px" <el-button v-hasPermi="['iot:device:query']" size="small" type="text" style="padding: 5px" icon="el-icon-search" @click="handleViewDevice(scope.row.groupId)">
icon="el-icon-search" @click="handleViewDevice(scope.row.groupId)">{{ $t('iot.group.index.637432-11') }}</el-button> {{ $t('iot.group.index.637432-11') }}
<el-button v-hasPermi="['iot:group:add']" size="small" type="text" style="padding: 5px" icon="el-icon-folder-add" </el-button>
@click="selectDevice(scope.row)">{{ $t('iot.group.index.637432-12') }}</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" <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>
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>
<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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" <div class="pagination-container">
@pagination="getList" /> <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>
@@ -73,9 +70,9 @@
</template> </template>
<script> <script>
import deviceList from './device-list' import deviceList from './device-list';
import { listGroup, getGroup, delGroup, addGroup, updateGroup } from '@/api/iot/group' import { listGroup, getGroup, delGroup, addGroup, updateGroup } from '@/api/iot/group';
import {getUserId} from "@/utils/auth"; import { getUserId } from '@/utils/auth';
export default { export default {
name: 'Group', name: 'Group',
@@ -134,16 +131,16 @@ export default {
}, },
], ],
}, },
} };
}, },
created() { created() {
this.getList() this.getList();
this.init() this.init();
}, },
methods: { methods: {
init() { init() {
if (this.$store.state.user.roles.indexOf('tenant') === -1 && this.$store.state.user.roles.indexOf('general') === -1) { if (this.$store.state.user.roles.indexOf('tenant') === -1 && this.$store.state.user.roles.indexOf('general') === -1) {
this.isAdmin = true this.isAdmin = true;
} }
}, },
// 我的分组改变事件 // 我的分组改变事件
@@ -159,21 +156,21 @@ export default {
t: Date.now(), t: Date.now(),
groupId: groupId, groupId: groupId,
}, },
}) });
}, },
/** 查询设备分组列表 */ /** 查询设备分组列表 */
getList() { getList() {
this.loading = true this.loading = true;
listGroup(this.queryParams).then((response) => { listGroup(this.queryParams).then((response) => {
this.groupList = response.rows this.groupList = response.rows;
this.total = response.total this.total = response.total;
this.loading = false this.loading = false;
}) });
}, },
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open = false this.open = false;
this.reset() this.reset();
}, },
// 表单重置 // 表单重置
reset() { reset() {
@@ -189,46 +186,46 @@ export default {
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
remark: null, remark: null,
} };
this.resetForm('form') this.resetForm('form');
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1;
this.getList() this.getList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm('queryForm') this.resetForm('queryForm');
this.handleQuery() this.handleQuery();
}, },
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.groupId) this.ids = selection.map((item) => item.groupId);
this.single = selection.length !== 1 this.single = selection.length !== 1;
this.multiple = !selection.length this.multiple = !selection.length;
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset() this.reset();
this.open = true this.open = true;
this.title = this.$t('iot.group.index.637432-22') this.title = this.$t('iot.group.index.637432-22');
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset() this.reset();
const groupId = row.groupId || this.ids const groupId = row.groupId || this.ids;
getGroup(groupId).then((response) => { getGroup(groupId).then((response) => {
this.form = response.data this.form = response.data;
this.open = true this.open = true;
this.title = this.$t('iot.group.index.637432-23') this.title = this.$t('iot.group.index.637432-23');
}) });
}, },
/** 选择设备 */ /** 选择设备 */
selectDevice(row) { selectDevice(row) {
this.group = row this.group = row;
// 刷新子组件 // 刷新子组件
this.$refs.groupDeviceList.openDeviceList = true this.$refs.groupDeviceList.openDeviceList = true;
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
@@ -236,33 +233,33 @@ export default {
if (valid) { if (valid) {
if (this.form.groupId != null) { if (this.form.groupId != null) {
updateGroup(this.form).then((response) => { updateGroup(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('iot.group.index.637432-24')) this.$modal.msgSuccess(this.$t('iot.group.index.637432-24'));
this.open = false this.open = false;
this.getList() this.getList();
}) });
} else { } else {
addGroup(this.form).then((response) => { addGroup(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('iot.group.index.637432-25')) this.$modal.msgSuccess(this.$t('iot.group.index.637432-25'));
this.open = false this.open = false;
this.getList() this.getList();
}) });
} }
} }
}) });
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const groupIds = row.groupId || this.ids const groupIds = row.groupId || this.ids;
this.$modal this.$modal
.confirm(this.$t('iot.group.index.637432-26', [groupIds])) .confirm(this.$t('iot.group.index.637432-26', [groupIds]))
.then(function () { .then(function () {
return delGroup(groupIds) return delGroup(groupIds);
}) })
.then(() => { .then(() => {
this.getList() this.getList();
this.$modal.msgSuccess(this.$t('iot.group.index.637432-27')) this.$modal.msgSuccess(this.$t('iot.group.index.637432-27'));
}) })
.catch(() => { }) .catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
@@ -272,8 +269,45 @@ export default {
...this.queryParams, ...this.queryParams,
}, },
`group_${new Date().getTime()}.xlsx` `group_${new Date().getTime()}.xlsx`
) );
}, },
}, },
} };
</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

@@ -1,7 +1,7 @@
<template> <template>
<div style="padding:6px;"> <div style="padding: 6px">
<el-card v-show="showSearch" style="margin-bottom: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 :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-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-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>
@@ -34,30 +34,30 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<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 type="primary" icon="el-icon-search" size="small" @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 icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('device.index.105953-9') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
<el-card style="padding-bottom:100px;"> <el-card style="padding-bottom: 100px">
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <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-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>
<el-col :span="1.5"> <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-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>
<el-col :span="1.5"> <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-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>
<el-col :span="1.5"> <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-button type="warning" plain icon="el-icon-download" size="small" @click="handleExport" v-hasPermi="['iot:log:export']">{{ $t('export') }}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="logList" @selection-change="handleSelectionChange" border> <el-table v-loading="loading" :data="logList" @selection-change="handleSelectionChange" :border="false">
<el-table-column type="selection" width="55" align="center" /> <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-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-18')" align="center" prop="logValue" />
@@ -100,13 +100,15 @@
<el-table-column :label="$t('iot.group.index.637432-9')" align="center" prop="remark" /> <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"> <el-table-column :label="$t('iot.group.index.637432-10')" align="center" class-name="small-padding fixed-width" width="150">
<template slot-scope="scope"> <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="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> --> <!-- <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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> <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-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
@@ -169,22 +171,15 @@
<el-button @click="cancel">{{ $t('iot.group.index.637432-19') }}</el-button> <el-button @click="cancel">{{ $t('iot.group.index.637432-19') }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import { import { listLog, getLog, delLog, addLog, updateLog } from '@/api/iot/log';
listLog,
getLog,
delLog,
addLog,
updateLog
} from "@/api/iot/log";
export default { export default {
name: "Log", name: 'Log',
dicts: ['iot_things_type', 'iot_yes_no'], dicts: ['iot_things_type', 'iot_yes_no'],
data() { data() {
return { return {
@@ -203,7 +198,7 @@ export default {
// 设备日志表格数据 // 设备日志表格数据
logList: [], logList: [],
// 弹出层标题 // 弹出层标题
title: "", title: '',
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 查询参数 // 查询参数
@@ -221,58 +216,76 @@ export default {
isAlert: null, isAlert: null,
status: null, status: null,
istop: null, istop: null,
ismonitor: null ismonitor: null,
}, },
// 表单参数 // 表单参数
form: {}, form: {},
// 表单校验 // 表单校验
rules: { rules: {
logName: [{ logName: [
{
required: true, required: true,
message: this.$t('iot.log.index.902341-33'), message: this.$t('iot.log.index.902341-33'),
trigger: "blur" trigger: 'blur',
}], },
logType: [{ ],
logType: [
{
required: true, required: true,
message: this.$t('iot.log.index.902341-34'), message: this.$t('iot.log.index.902341-34'),
trigger: "change" trigger: 'change',
}], },
logLevel: [{ ],
logLevel: [
{
required: true, required: true,
message: this.$t('iot.log.index.902341-35'), message: this.$t('iot.log.index.902341-35'),
trigger: "blur" trigger: 'blur',
}], },
deviceId: [{ ],
deviceId: [
{
required: true, required: true,
message: this.$t('iot.log.index.902341-36'), message: this.$t('iot.log.index.902341-36'),
trigger: "blur" trigger: 'blur',
}], },
deviceName: [{ ],
deviceName: [
{
required: true, required: true,
message: this.$t('iot.log.index.902341-37'), message: this.$t('iot.log.index.902341-37'),
trigger: "blur" trigger: 'blur',
}], },
userId: [{ ],
userId: [
{
required: true, required: true,
message: this.$t('iot.log.index.902341-38'), message: this.$t('iot.log.index.902341-38'),
trigger: "blur" trigger: 'blur',
}], },
userName: [{ ],
userName: [
{
required: true, required: true,
message: this.$t('iot.log.index.902341-39'), message: this.$t('iot.log.index.902341-39'),
trigger: "blur" trigger: 'blur',
}], },
tenantId: [{ ],
tenantId: [
{
required: true, required: true,
message: this.$t('iot.log.index.902341-40'), message: this.$t('iot.log.index.902341-40'),
trigger: "blur" trigger: 'blur',
}], },
tenantName: [{ ],
tenantName: [
{
required: true, required: true,
message: this.$t('iot.log.index.902341-41'), message: this.$t('iot.log.index.902341-41'),
trigger: "blur" trigger: 'blur',
}], },
} ],
},
}; };
}, },
created() { created() {
@@ -282,7 +295,7 @@ export default {
/** 查询设备日志列表 */ /** 查询设备日志列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listLog(this.queryParams).then(response => { listLog(this.queryParams).then((response) => {
this.logList = response.rows; this.logList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@@ -314,9 +327,9 @@ export default {
remark: null, remark: null,
logValue: null, logValue: null,
istop: null, istop: null,
ismonitor: null ismonitor: null,
}; };
this.resetForm("form"); this.resetForm('form');
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
@@ -325,14 +338,14 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm('queryForm');
this.handleQuery(); this.handleQuery();
}, },
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.deviceLogId) this.ids = selection.map((item) => item.deviceLogId);
this.single = selection.length !== 1 this.single = selection.length !== 1;
this.multiple = !selection.length this.multiple = !selection.length;
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
@@ -343,8 +356,8 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const deviceLogId = row.deviceLogId || this.ids const deviceLogId = row.deviceLogId || this.ids;
getLog(deviceLogId).then(response => { getLog(deviceLogId).then((response) => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = this.$t('iot.log.index.902341-43'); this.title = this.$t('iot.log.index.902341-43');
@@ -352,16 +365,16 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
if (this.form.deviceLogId != null) { 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.$modal.msgSuccess(this.$t('iot.group.index.637432-24'));
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
} else { } else {
addLog(this.form).then(response => { addLog(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('iot.group.index.637432-25')); this.$modal.msgSuccess(this.$t('iot.group.index.637432-25'));
this.open = false; this.open = false;
this.getList(); this.getList();
@@ -373,19 +386,64 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const deviceLogIds = row.deviceLogId || this.ids; const deviceLogIds = row.deviceLogId || this.ids;
this.$modal.confirm(this.$t('iot.log.index.902341-44', [deviceLogIds])).then(function () { this.$modal
.confirm(this.$t('iot.log.index.902341-44', [deviceLogIds]))
.then(function () {
return delLog(deviceLogIds); return delLog(deviceLogIds);
}).then(() => { })
.then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess(this.$t('iot.group.index.637432-27')); this.$modal.msgSuccess(this.$t('iot.group.index.637432-27'));
}).catch(() => {}); })
.catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('iot/log/export', { this.download(
...this.queryParams 'iot/log/export',
}, `log_${new Date().getTime()}.xlsx`) {
} ...this.queryParams,
} },
`log_${new Date().getTime()}.xlsx`
);
},
},
}; };
</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

@@ -29,32 +29,32 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<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 type="primary" icon="el-icon-search" size="small" @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 icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('device.index.105953-9') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <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> v-hasPermi="['iot:news:add']">{{ $t('system.sysclient.652154-4') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <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> v-hasPermi="['iot:news:edit']">{{ $t('system.sysclient.652154-5') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <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> v-hasPermi="['iot:news:remove']">{{ $t('system.sysclient.652154-6') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <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> v-hasPermi="['iot:news:export']">{{ $t('system.sysclient.652154-7') }}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </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 type="selection" width="55" align="center" />
<el-table-column :label="$t('system.news.893410-10')" align="center" prop="imgUrl" width="140px;"> <el-table-column :label="$t('system.news.893410-10')" align="center" prop="imgUrl" width="140px;">
<template slot-scope="scope"> <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('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"> <el-table-column :label="$t('device.index.105953-34')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <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> @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> 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> v-hasPermi="['iot:news:remove']">{{ $t('system.sysclient.652154-6') }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" /> @pagination="getList" />
</div>
<!-- 添加或修改新闻资讯对话框 --> <!-- 添加或修改新闻资讯对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> <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> <el-dialog :title="form.title" :visible.sync="openDetail" width="800px" append-to-body>
<div style="margin-top:-20px;margin-bottom:10px;"> <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> <span style="margin-left:20px;">{{ form.createTime }}</span>
</div> </div>
<div v-loading="loadingDetail" class="content"> <div v-loading="loadingDetail" class="content">
@@ -430,3 +432,43 @@ export default {
border: 1px solid #eee; border: 1px solid #eee;
border-radius: 10px; border-radius: 10px;
}</style> }</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" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<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 type="primary" icon="el-icon-search" size="small" @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 icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('device.index.105953-9') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <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> v-hasPermi="['iot:newsCategory:add']">{{ $t('system.sysclient.652154-4') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <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> v-hasPermi="['iot:newsCategory:edit']">{{ $t('system.sysclient.652154-5') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <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> v-hasPermi="['iot:newsCategory:remove']">{{ $t('system.sysclient.652154-6') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <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> v-hasPermi="['iot:newsCategory:export']">{{ $t('system.sysclient.652154-7') }}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </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 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-1')" align="center" prop="categoryId" />
<el-table-column :label="$t('system.newsCategory.874509-0')" align="center" prop="categoryName" /> <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('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"> <el-table-column :label="$t('device.index.105953-34')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <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> 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> v-hasPermi="['iot:newsCategory:remove']">{{ $t('system.sysclient.652154-6') }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" /> @pagination="getList" />
</div>
<!-- 添加或修改新闻分类对话框 --> <!-- 添加或修改新闻分类对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
@@ -241,3 +243,43 @@ export default {
} }
}; };
</script> </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> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </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 :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"> <el-table-column align="left" :label="$t('system.platform.675309-3')" prop="platform" min-width="200">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -50,7 +50,14 @@
</el-table-column> </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-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 :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 <el-table-column
align="left" align="left"
:label="$t('system.platform.675309-7')" :label="$t('system.platform.675309-7')"
@@ -80,8 +87,9 @@
</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" @pagination="getList" /> <div class="pagination-container">
</el-card> <pagination style="margin-bottom: 0" 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="630px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="630px" append-to-body>
@@ -123,6 +131,7 @@
<el-button @click="cancel">{{ $t('iot.group.index.637432-19') }}</el-button> <el-button @click="cancel">{{ $t('iot.group.index.637432-19') }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</el-card>
</div> </div>
</template> </template>

View File

@@ -14,11 +14,11 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</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="mini" @click="resetQuery">{{ $t('reset') }}</el-button> <el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item> </el-form-item>
<el-form-item style="float:right;"> <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-item>
</el-form> </el-form>
</el-card> </el-card>
@@ -30,15 +30,15 @@
<el-col :span="20" style="text-align:left;"> <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;"> <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}} <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-link>
</el-col> </el-col>
<el-col :span="4"> <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-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>
<el-tooltip class="item" effect="dark" :content="$t('product.index.091251-14')" placement="top-start" v-if="item.status==1"> <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-tooltip>
</el-col> </el-col>
</el-row> </el-row>
@@ -55,8 +55,8 @@
<dict-tag :options="dict.type.iot_network_method" :value="item.networkMethod" /> <dict-tag :options="dict.type.iot_network_method" :value="item.networkMethod" />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('product.index.091251-19')"> <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="success" size="small" 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="info" size="small" v-else>{{ $t('product.index.091251-21') }}</el-tag>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-col> </el-col>
@@ -70,17 +70,19 @@
</el-col> </el-col>
</el-row> </el-row>
<el-button-group style="margin-top:15px;height:28px;"> <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="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="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="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="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="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="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="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-button-group>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<el-empty :description="$t('product.index.091251-25')" v-if="total==0"></el-empty> <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" /> <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" :pageSizes="[12, 24, 36, 60]" @pagination="getList" />
</div>
<!-- 下载SDK --> <!-- 下载SDK -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>

View File

@@ -14,18 +14,18 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</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="mini" @click="resetQuery">{{ $t('reset') }}</el-button> <el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item> </el-form-item>
<el-form-item style="float: right"> <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="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="mini" :disabled="multiple || isGeneralUser" @click="handleDelete" v-hasPermi="['iot:video:remove']">{{ $t('del') }}</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-item>
</el-form> </el-form>
</el-card> </el-card>
<el-card style="margin-bottom: 5px"> <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 type="selection" :selectable="selectable" width="55" align="center" />
<el-table-column :label="$t('sip.index.998533-0')" align="center" prop="deviceSipId"> <el-table-column :label="$t('sip.index.998533-0')" align="center" prop="deviceSipId">
<template slot-scope="scope"> <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-2')" align="center" prop="channelSipId" />
<el-table-column :label="$t('sip.index.998533-4')" align="center" prop="status" width="80"> <el-table-column :label="$t('sip.index.998533-4')" align="center" prop="status" width="80">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('sip.index.998533-8')" align="center" prop="productName" /> <el-table-column :label="$t('sip.index.998533-8')" align="center" prop="productName" />
@@ -57,14 +57,16 @@
</el-table-column> </el-table-column>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <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>
<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> </el-button>
</template> </template>
</el-table-column> --> </el-table-column> -->
</el-table> </el-table>
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
</div>
</el-card> </el-card>
<el-dialog :title="title" :visible.sync="open" width="450px" append-to-body :close-on-click-modal="false"> <el-dialog :title="title" :visible.sync="open" width="450px" append-to-body :close-on-click-modal="false">
@@ -456,3 +458,41 @@ 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

@@ -11,17 +11,17 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</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="mini" @click="resetQuery">{{ $t('reset') }}</el-button> <el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item> </el-form-item>
<el-form-item style="float: right"> <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-item>
</el-form> </el-form>
</el-card> </el-card>
<el-card style="padding-bottom: 100px"> <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-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-7')" align="center" prop="identifier" />
<el-table-column :label="$t('template.index.891112-8')" align="center" prop="isMonitor" width="75"> <el-table-column :label="$t('template.index.891112-8')" align="center" prop="isMonitor" width="75">
@@ -81,7 +81,9 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> <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"> <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"> <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> <div style="margin-top: 5px" v-if="index == 0"></div>
<el-col :span="18"> <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"> <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 }} {{ form.identifier + '_' + item.id }}
</template> </template>
<el-button slot="append" @click="editParameter(item, index)" size="small">{{ $t('edit') }}</el-button> <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"> <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> <div style="margin-top: 5px" v-if="index == 0"></div>
<el-col :span="18"> <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"> <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 }} {{ form.identifier + '_' + item.id }}
</template> </template>
<el-button slot="append" @click="editParameter(item, index)">{{ $t('edit') }}</el-button> <el-button slot="append" @click="editParameter(item, index)">{{ $t('edit') }}</el-button>
@@ -899,3 +901,41 @@ 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

@@ -144,3 +144,43 @@ export default {
} }
}; };
</script> </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

@@ -2,96 +2,44 @@
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('system.job.356378-0')" prop="jobName"> <el-form-item :label="$t('system.job.356378-0')" prop="jobName">
<el-input <el-input v-model="queryParams.jobName" :placeholder="$t('system.job.356378-1')" clearable @keyup.enter.native="handleQuery" />
v-model="queryParams.jobName"
:placeholder="$t('system.job.356378-1')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('system.job.356378-2')" prop="jobGroup"> <el-form-item :label="$t('system.job.356378-2')" prop="jobGroup">
<el-select v-model="queryParams.jobGroup" :placeholder="$t('system.job.356378-3')" clearable> <el-select v-model="queryParams.jobGroup" :placeholder="$t('system.job.356378-3')" clearable>
<el-option <el-option v-for="dict in dict.type.sys_job_group" :key="dict.value" :label="dict.label" :value="dict.value" />
v-for="dict in dict.type.sys_job_group"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('system.job.356378-4')" prop="status"> <el-form-item :label="$t('system.job.356378-4')" prop="status">
<el-select v-model="queryParams.status" :placeholder="$t('system.job.356378-5')" clearable> <el-select v-model="queryParams.status" :placeholder="$t('system.job.356378-5')" clearable>
<el-option <el-option v-for="dict in dict.type.sys_job_status" :key="dict.value" :label="dict.label" :value="dict.value" />
v-for="dict in dict.type.sys_job_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</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="mini" @click="resetQuery">{{ $t('reset') }}</el-button> <el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd" v-hasPermi="['monitor:job:add']">{{ $t('add') }}</el-button>
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['monitor:job:add']"
>{{ $t('add') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="success" plain icon="el-icon-edit" size="small" :disabled="single" @click="handleUpdate" v-hasPermi="['monitor:job:edit']">{{ $t('update') }}</el-button>
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['monitor:job:edit']"
>{{ $t('update') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="danger" plain icon="el-icon-delete" size="small" :disabled="multiple" @click="handleDelete" v-hasPermi="['monitor:job:remove']">{{ $t('del') }}</el-button>
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['monitor:job:remove']"
>{{ $t('del') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="warning" plain icon="el-icon-download" size="small" @click="handleExport" v-hasPermi="['monitor:job:export']">{{ $t('export') }}</el-button>
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['monitor:job:export']"
>{{ $t('export') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="info" plain icon="el-icon-s-operation" size="small" @click="handleJobLog" v-hasPermi="['monitor:job:query']">{{ $t('system.job.356378-6') }}</el-button>
type="info"
plain
icon="el-icon-s-operation"
size="mini"
@click="handleJobLog"
v-hasPermi="['monitor:job:query']"
>{{ $t('system.job.356378-6') }}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="jobList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="jobList" @selection-change="handleSelectionChange" :border="false">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('system.job.356378-7')" width="100" align="center" prop="jobId" /> <el-table-column :label="$t('system.job.356378-7')" width="100" align="center" prop="jobId" />
<el-table-column :label="$t('system.job.356378-0')" align="center" prop="jobName" :show-overflow-tooltip="true" /> <el-table-column :label="$t('system.job.356378-0')" align="center" prop="jobName" :show-overflow-tooltip="true" />
@@ -104,52 +52,26 @@
<el-table-column :label="$t('system.job.356378-9')" align="center" prop="cronExpression" :show-overflow-tooltip="true" /> <el-table-column :label="$t('system.job.356378-9')" align="center" prop="cronExpression" :show-overflow-tooltip="true" />
<el-table-column :label="$t('status')" align="center"> <el-table-column :label="$t('status')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
v-model="scope.row.status"
active-value="0"
inactive-value="1"
@change="handleStatusChange(scope.row)"
></el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('opation')" align="center" class-name="small-padding fixed-width"> <el-table-column :label="$t('opation')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button size="small" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['monitor:job:edit']">{{ $t('update') }}</el-button>
size="mini" <el-button size="small" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['monitor:job:remove']">{{ $t('del') }}</el-button>
type="text" <el-dropdown size="small" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['monitor:job:changeStatus', 'monitor:job:query']">
icon="el-icon-edit" <el-button size="small" type="text" icon="el-icon-d-arrow-right">{{ $t('more') }}</el-button>
@click="handleUpdate(scope.row)"
v-hasPermi="['monitor:job:edit']"
>{{ $t('update') }}</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['monitor:job:remove']"
>{{ $t('del') }}</el-button>
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['monitor:job:changeStatus', 'monitor:job:query']">
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">{{ $t('more') }}</el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="handleRun" icon="el-icon-caret-right" <el-dropdown-item command="handleRun" icon="el-icon-caret-right" v-hasPermi="['monitor:job:changeStatus']">{{ $t('system.job.356378-10') }}</el-dropdown-item>
v-hasPermi="['monitor:job:changeStatus']">{{ $t('system.job.356378-10') }}</el-dropdown-item> <el-dropdown-item command="handleView" icon="el-icon-view" v-hasPermi="['monitor:job:query']">{{ $t('system.job.356378-11') }}</el-dropdown-item>
<el-dropdown-item command="handleView" icon="el-icon-view" <el-dropdown-item command="handleJobLog" icon="el-icon-s-operation" v-hasPermi="['monitor:job:query']">{{ $t('system.job.356378-12') }}</el-dropdown-item>
v-hasPermi="['monitor:job:query']">{{ $t('system.job.356378-11') }}</el-dropdown-item>
<el-dropdown-item command="handleJobLog" icon="el-icon-s-operation"
v-hasPermi="['monitor:job:query']">{{ $t('system.job.356378-12') }}</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改定时任务对话框 --> <!-- 添加或修改定时任务对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
@@ -163,12 +85,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('system.job.356378-13')" prop="jobGroup"> <el-form-item :label="$t('system.job.356378-13')" prop="jobGroup">
<el-select v-model="form.jobGroup" :placeholder="$t('system.job.356378-14')"> <el-select v-model="form.jobGroup" :placeholder="$t('system.job.356378-14')">
<el-option <el-option v-for="dict in dict.type.sys_job_group" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
v-for="dict in dict.type.sys_job_group"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -179,8 +96,10 @@
<el-tooltip placement="top"> <el-tooltip placement="top">
<div slot="content"> <div slot="content">
{{ $t('system.job.356378-16') }} {{ $t('system.job.356378-16') }}
<br />{{ $t('system.job.356378-17') }} <br />
<br />{{ $t('system.job.356378-18') }} {{ $t('system.job.356378-17') }}
<br />
{{ $t('system.job.356378-18') }}
</div> </div>
<i class="el-icon-question"></i> <i class="el-icon-question"></i>
</el-tooltip> </el-tooltip>
@@ -220,11 +139,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('status')"> <el-form-item :label="$t('status')">
<el-radio-group v-model="form.status"> <el-radio-group v-model="form.status">
<el-radio <el-radio v-for="dict in dict.type.sys_job_status" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
v-for="dict in dict.type.sys_job_status"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -242,7 +157,7 @@
<!-- 任务日志详细 --> <!-- 任务日志详细 -->
<el-dialog :title="$t('system.job.356378-11')" :visible.sync="openView" width="700px" append-to-body> <el-dialog :title="$t('system.job.356378-11')" :visible.sync="openView" width="700px" append-to-body>
<el-form ref="form" :model="form" label-width="120px" size="mini"> <el-form ref="form" :model="form" label-width="120px" size="small">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('system.job.356378-29')">{{ form.jobId }}</el-form-item> <el-form-item :label="$t('system.job.356378-29')">{{ form.jobId }}</el-form-item>
@@ -291,12 +206,12 @@
</template> </template>
<script> <script>
import { listJob, getJob, delJob, addJob, updateJob, runJob, changeJobStatus } from "@/api/monitor/job"; import { listJob, getJob, delJob, addJob, updateJob, runJob, changeJobStatus } from '@/api/monitor/job';
import Crontab from '@/components/Crontab' import Crontab from '@/components/Crontab';
export default { export default {
components: { Crontab }, components: { Crontab },
name: "Job", name: 'Job',
dicts: ['sys_job_group', 'sys_job_status'], dicts: ['sys_job_group', 'sys_job_status'],
data() { data() {
return { return {
@@ -315,7 +230,7 @@ export default {
// 定时任务表格数据 // 定时任务表格数据
jobList: [], jobList: [],
// 弹出层标题 // 弹出层标题
title: "", title: '',
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 是否显示详细弹出层 // 是否显示详细弹出层
@@ -323,29 +238,23 @@ export default {
// 是否显示Cron表达式弹出层 // 是否显示Cron表达式弹出层
openCron: false, openCron: false,
// 传入的表达式 // 传入的表达式
expression: "", expression: '',
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
jobName: undefined, jobName: undefined,
jobGroup: undefined, jobGroup: undefined,
status: undefined status: undefined,
}, },
// 表单参数 // 表单参数
form: {}, form: {},
// 表单校验 // 表单校验
rules: { rules: {
jobName: [ jobName: [{ required: true, message: this.$t('system.job.356378-41'), trigger: 'blur' }],
{ required: true, message: this.$t('system.job.356378-41'), trigger: "blur" } invokeTarget: [{ required: true, message: this.$t('system.job.356378-42'), trigger: 'blur' }],
], cronExpression: [{ required: true, message: this.$t('system.job.356378-43'), trigger: 'blur' }],
invokeTarget: [ },
{ required: true, message: this.$t('system.job.356378-42'), trigger: "blur" }
],
cronExpression: [
{ required: true, message: this.$t('system.job.356378-43'), trigger: "blur" }
]
}
}; };
}, },
created() { created() {
@@ -355,7 +264,7 @@ export default {
/** 查询定时任务列表 */ /** 查询定时任务列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listJob(this.queryParams).then(response => { listJob(this.queryParams).then((response) => {
this.jobList = response.rows; this.jobList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@@ -380,9 +289,9 @@ export default {
cronExpression: undefined, cronExpression: undefined,
misfirePolicy: 1, misfirePolicy: 1,
concurrent: 1, concurrent: 1,
status: "0" status: '0',
}; };
this.resetForm("form"); this.resetForm('form');
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
@@ -391,25 +300,25 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm('queryForm');
this.handleQuery(); this.handleQuery();
}, },
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.jobId); this.ids = selection.map((item) => item.jobId);
this.single = selection.length != 1; this.single = selection.length != 1;
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
// 更多操作触发 // 更多操作触发
handleCommand(command, row) { handleCommand(command, row) {
switch (command) { switch (command) {
case "handleRun": case 'handleRun':
this.handleRun(row); this.handleRun(row);
break; break;
case "handleView": case 'handleView':
this.handleView(row); this.handleView(row);
break; break;
case "handleJobLog": case 'handleJobLog':
this.handleJobLog(row); this.handleJobLog(row);
break; break;
default: default:
@@ -418,26 +327,34 @@ export default {
}, },
// 任务状态修改 // 任务状态修改
handleStatusChange(row) { handleStatusChange(row) {
let text = row.status === "0" ? this.$t('system.job.356378-26') : this.$t('system.job.356378-27'); let text = row.status === '0' ? this.$t('system.job.356378-26') : this.$t('system.job.356378-27');
this.$modal.confirm(this.$t('system.job.356378-44') + '"' + text + '""' + row.jobName + '"' + this.$t('system.job.356378-45')).then(function() { this.$modal
.confirm(this.$t('system.job.356378-44') + '"' + text + '""' + row.jobName + '"' + this.$t('system.job.356378-45'))
.then(function () {
return changeJobStatus(row.jobId, row.status); return changeJobStatus(row.jobId, row.status);
}).then(() => { })
.then(() => {
this.$modal.msgSuccess(text + this.$t('success')); this.$modal.msgSuccess(text + this.$t('success'));
}).catch(function() { })
row.status = row.status === "0" ? "1" : "0"; .catch(function () {
row.status = row.status === '0' ? '1' : '0';
}); });
}, },
/* 立即执行一次 */ /* 立即执行一次 */
handleRun(row) { handleRun(row) {
this.$modal.confirm(this.$t('system.job.356378-46') + '"' + row.jobName + '"' + this.$t('system.job.356378-45')).then(function() { this.$modal
.confirm(this.$t('system.job.356378-46') + '"' + row.jobName + '"' + this.$t('system.job.356378-45'))
.then(function () {
return runJob(row.jobId, row.jobGroup); return runJob(row.jobId, row.jobGroup);
}).then(() => { })
.then(() => {
this.$modal.msgSuccess(this.$t('system.job.356378-47')); this.$modal.msgSuccess(this.$t('system.job.356378-47'));
}).catch(() => {}); })
.catch(() => {});
}, },
/** 任务详细信息 */ /** 任务详细信息 */
handleView(row) { handleView(row) {
getJob(row.jobId).then(response => { getJob(row.jobId).then((response) => {
this.form = response.data; this.form = response.data;
this.openView = true; this.openView = true;
}); });
@@ -454,7 +371,7 @@ export default {
/** 任务日志列表查询 */ /** 任务日志列表查询 */
handleJobLog(row) { handleJobLog(row) {
const jobId = row.jobId || 0; const jobId = row.jobId || 0;
this.$router.push('/monitor/job-log/index/' + jobId) this.$router.push('/monitor/job-log/index/' + jobId);
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
@@ -466,7 +383,7 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const jobId = row.jobId || this.ids; const jobId = row.jobId || this.ids;
getJob(jobId).then(response => { getJob(jobId).then((response) => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = this.$t('system.job.356378-49'); this.title = this.$t('system.job.356378-49');
@@ -474,16 +391,16 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm: function () { submitForm: function () {
this.$refs["form"].validate(valid => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
if (this.form.jobId != undefined) { if (this.form.jobId != undefined) {
updateJob(this.form).then(response => { updateJob(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('updateSuccess')); this.$modal.msgSuccess(this.$t('updateSuccess'));
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
} else { } else {
addJob(this.form).then(response => { addJob(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('addSuccess')); this.$modal.msgSuccess(this.$t('addSuccess'));
this.open = false; this.open = false;
this.getList(); this.getList();
@@ -495,18 +412,27 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const jobIds = row.jobId || this.ids; const jobIds = row.jobId || this.ids;
this.$modal.confirm(this.$t('system.job.356378-50', [jobIds])).then(function() { this.$modal
.confirm(this.$t('system.job.356378-50', [jobIds]))
.then(function () {
return delJob(jobIds); return delJob(jobIds);
}).then(() => { })
.then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess(this.$t('delSuccess')); this.$modal.msgSuccess(this.$t('delSuccess'));
}).catch(() => {}); })
.catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('monitor/job/export', { this.download(
...this.queryParams 'monitor/job/export',
}, `job_${new Date().getTime()}.xlsx`) {
} ...this.queryParams,
} },
`job_${new Date().getTime()}.xlsx`
);
},
},
}; };
</script>

View File

@@ -46,8 +46,8 @@
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</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="mini" @click="resetQuery">{{ $t('reset') }}</el-button> <el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@@ -57,7 +57,7 @@
type="danger" type="danger"
plain plain
icon="el-icon-delete" icon="el-icon-delete"
size="mini" size="small"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['monitor:logininfor:remove']" v-hasPermi="['monitor:logininfor:remove']"
@@ -68,7 +68,7 @@
type="danger" type="danger"
plain plain
icon="el-icon-delete" icon="el-icon-delete"
size="mini" size="small"
@click="handleClean" @click="handleClean"
v-hasPermi="['monitor:logininfor:remove']" v-hasPermi="['monitor:logininfor:remove']"
>{{ $t('clean') }}</el-button> >{{ $t('clean') }}</el-button>
@@ -78,7 +78,7 @@
type="primary" type="primary"
plain plain
icon="el-icon-unlock" icon="el-icon-unlock"
size="mini" size="small"
:disabled="single" :disabled="single"
@click="handleUnlock" @click="handleUnlock"
v-hasPermi="['monitor:logininfor:unlock']" v-hasPermi="['monitor:logininfor:unlock']"
@@ -89,7 +89,7 @@
type="warning" type="warning"
plain plain
icon="el-icon-download" icon="el-icon-download"
size="mini" size="small"
@click="handleExport" @click="handleExport"
v-hasPermi="['monitor:logininfor:export']" v-hasPermi="['monitor:logininfor:export']"
>{{ $t('export') }}</el-button> >{{ $t('export') }}</el-button>
@@ -97,7 +97,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange"> <el-table ref="tables" v-loading="loading" :data="list" :border="false" header-cell-class-name="table-header" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('monitor.logininfor.670912-10')" align="center" prop="infoId" /> <el-table-column :label="$t('monitor.logininfor.670912-10')" align="center" prop="infoId" />
<el-table-column :label="$t('monitor.logininfor.670912-2')" align="center" prop="userName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" /> <el-table-column :label="$t('monitor.logininfor.670912-2')" align="center" prop="userName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
@@ -243,3 +243,43 @@ export default {
}; };
</script> </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

@@ -8,11 +8,11 @@
<el-input v-model="queryParams.userName" :placeholder="$t('online.093480-2')" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.userName" :placeholder="$t('online.093480-2')" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</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="mini" @click="resetQuery">{{ $t('reset') }}</el-button> <el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table v-loading="loading" :data="list.slice((pageNum - 1) * pageSize, pageNum * pageSize)" style="width: 100%"> <el-table v-loading="loading" :data="list.slice((pageNum - 1) * pageSize, pageNum * pageSize)" style="width: 100%" :border="false">
<el-table-column :label="$t('online.093480-3')" type="index" align="center"> <el-table-column :label="$t('online.093480-3')" type="index" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ (pageNum - 1) * pageSize + scope.$index + 1 }}</span> <span>{{ (pageNum - 1) * pageSize + scope.$index + 1 }}</span>
@@ -32,13 +32,15 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('opation')" align="center" class-name="small-padding fixed-width"> <el-table-column :label="$t('opation')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleForceLogout(scope.row)" v-hasPermi="['monitor:online:forceLogout']">{{ $t('online.093480-12') }}</el-button> <el-button size="small" type="text" icon="el-icon-delete" @click="handleForceLogout(scope.row)" v-hasPermi="['monitor:online:forceLogout']">{{ $t('online.093480-12') }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="pageNum" :limit.sync="pageSize" /> <pagination v-show="total > 0" :total="total" :page.sync="pageNum" :limit.sync="pageSize" />
</div> </div>
</div>
</template> </template>
<script> <script>
@@ -102,3 +104,41 @@ 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

@@ -33,25 +33,25 @@
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</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="mini" @click="resetQuery">{{ $t('reset') }}</el-button> <el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['monitor:operlog:remove']">{{ $t('del') }}</el-button> <el-button type="danger" plain icon="el-icon-delete" size="small" :disabled="multiple" @click="handleDelete" v-hasPermi="['monitor:operlog:remove']">{{ $t('del') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" @click="handleClean" v-hasPermi="['monitor:operlog:remove']">{{ $t('operlog.874509-7') }}</el-button> <el-button type="danger" plain icon="el-icon-delete" size="small" @click="handleClean" v-hasPermi="['monitor:operlog:remove']">{{ $t('operlog.874509-7') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['monitor:operlog:export']">{{ $t('export') }}</el-button> <el-button type="warning" plain icon="el-icon-download" size="small" @click="handleExport" v-hasPermi="['monitor:operlog:export']">{{ $t('export') }}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange"> <el-table ref="tables" v-loading="loading" :data="list" :border="false" header-cell-class-name="table-header" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column type="selection" width="50" align="center" /> <el-table-column type="selection" width="50" align="center" />
<el-table-column :label="$t('operlog.874509-8')" align="center" prop="operId" /> <el-table-column :label="$t('operlog.874509-8')" align="center" prop="operId" />
<el-table-column :label="$t('operlog.874509-0')" align="center" prop="title" :show-overflow-tooltip="true" /> <el-table-column :label="$t('operlog.874509-0')" align="center" prop="title" :show-overflow-tooltip="true" />
@@ -80,16 +80,18 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('opation')" align="center" class-name="small-padding fixed-width"> <el-table-column :label="$t('opation')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row, scope.index)" v-hasPermi="['monitor:operlog:query']">{{ $t('operlog.874509-13') }}</el-button> <el-button size="small" type="text" icon="el-icon-view" @click="handleView(scope.row, scope.index)" v-hasPermi="['monitor:operlog:query']">{{ $t('operlog.874509-13') }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
</div>
<!-- 操作日志详细 --> <!-- 操作日志详细 -->
<el-dialog :title="$t('operlog.874509-14')" :visible.sync="open" width="800px" append-to-body> <el-dialog :title="$t('operlog.874509-14')" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" label-width="100px" size="mini"> <el-form ref="form" :model="form" label-width="100px" size="small">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('operlog.874509-15')">{{ form.title }} / {{ typeFormat(form) }}</el-form-item> <el-form-item :label="$t('operlog.874509-15')">{{ form.title }} / {{ typeFormat(form) }}</el-form-item>
@@ -257,3 +259,43 @@ export default {
}, },
}; };
</script> </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

@@ -205,3 +205,43 @@ export default {
} }
}; };
</script> </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

@@ -1,5 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索栏 -->
<el-card shadow="never" class="search-card">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('system.config.898564-0')" prop="configName"> <el-form-item :label="$t('system.config.898564-0')" prop="configName">
<el-input v-model="queryParams.configName" :placeholder="$t('system.config.898564-1')" clearable style="width: 240px" @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.configName" :placeholder="$t('system.config.898564-1')" clearable style="width: 240px" @keyup.enter.native="handleQuery" />
@@ -24,31 +26,34 @@
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</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="mini" @click="resetQuery">{{ $t('reset') }}</el-button> <el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card>
<el-row :gutter="10" class="mb8"> <!-- 操作按钮和数据表格 -->
<el-card shadow="never" class="table-card">
<el-row :gutter="10" style="margin-bottom: 15px">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:config:add']">{{ $t('add') }}</el-button> <el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd" v-hasPermi="['system:config:add']">{{ $t('add') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['system:config:edit']">{{ $t('update') }}</el-button> <el-button type="success" plain icon="el-icon-edit" size="small" :disabled="single" @click="handleUpdate" v-hasPermi="['system:config:edit']">{{ $t('update') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['system:config:remove']">{{ $t('del') }}</el-button> <el-button type="danger" plain icon="el-icon-delete" size="small" :disabled="multiple" @click="handleDelete" v-hasPermi="['system:config:remove']">{{ $t('del') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['system:config:export']">{{ $t('export') }}</el-button> <el-button type="warning" plain icon="el-icon-download" size="small" @click="handleExport" v-hasPermi="['system:config:export']">{{ $t('export') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-refresh" size="mini" @click="handleRefreshCache" v-hasPermi="['system:config:remove']">{{ $t('del') }}</el-button> <el-button type="danger" plain icon="el-icon-refresh" size="small" @click="handleRefreshCache" v-hasPermi="['system:config:remove']">{{ $t('del') }}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="configList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="configList" @selection-change="handleSelectionChange" header-cell-class-name="table-header" :border="false">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('system.config.898564-5')" align="center" prop="configId" /> <el-table-column :label="$t('system.config.898564-5')" align="center" prop="configId" />
<el-table-column :label="$t('system.config.898564-0')" align="center" prop="configName" :show-overflow-tooltip="true" /> <el-table-column :label="$t('system.config.898564-0')" align="center" prop="configName" :show-overflow-tooltip="true" />
@@ -73,7 +78,10 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> <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="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
@@ -266,3 +274,104 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped>
.app-container {
padding: 20px;
min-height: 100vh;
background-color: #f5f7fa;
}
.search-card {
margin-bottom: 15px;
border-radius: 8px;
::v-deep .el-card__body {
padding: 18px 18px 0 18px;
}
}
.table-card {
border-radius: 8px;
::v-deep .el-card__body {
padding: 18px;
}
}
.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;
}
::v-deep .el-table {
th {
background-color: #f5f7fa;
color: #606266;
font-weight: 600;
}
td {
padding: 12px 0;
}
}
.pagination-container {
line-height: 40px;
margin-bottom: 30px;
margin-top: 0;
padding: 0;
}
::v-deep .el-pagination {
padding: 20px 0 0 0;
text-align: right;
}
::v-deep .el-button--mini {
padding: 7px 12px;
font-size: 13px;
}
::v-deep .el-input__inner,
::v-deep .el-select__input {
height: 32px;
line-height: 32px;
border-radius: 4px;
}
::v-deep .el-form-item {
margin-bottom: 18px;
}
</style>

View File

@@ -1,5 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索栏 -->
<el-card shadow="never" class="search-card">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form-item :label="$t('system.dept.780956-0')" prop="deptName"> <el-form-item :label="$t('system.dept.780956-0')" prop="deptName">
<el-input v-model="queryParams.deptName" :placeholder="$t('system.dept.780956-1')" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.deptName" :placeholder="$t('system.dept.780956-1')" clearable @keyup.enter.native="handleQuery" />
@@ -10,22 +12,34 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</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="mini" @click="resetQuery">{{ $t('reset') }}</el-button> <el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card>
<el-row :gutter="10" class="mb8"> <!-- 操作按钮和数据表格 -->
<el-card shadow="never" class="table-card">
<el-row :gutter="10" style="margin-bottom: 15px">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:dept:add']">{{ $t('add') }}</el-button> <el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd" v-hasPermi="['system:dept:add']">{{ $t('add') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="info" plain icon="el-icon-sort" size="mini" @click="toggleExpandAll">{{ $t('expand') }}/{{ $t('collapse') }}</el-button> <el-button type="info" plain icon="el-icon-sort" size="small" @click="toggleExpandAll">{{ $t('expand') }}/{{ $t('collapse') }}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-if="refreshTable" v-loading="loading" :data="deptList" row-key="deptId" :default-expand-all="isExpandAll" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"> <el-table
v-if="refreshTable"
v-loading="loading"
:data="deptList"
row-key="deptId"
:default-expand-all="isExpandAll"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
header-cell-class-name="table-header"
:border="false"
>
<el-table-column prop="deptName" :label="$t('system.dept.780956-0')" width="260"></el-table-column> <el-table-column prop="deptName" :label="$t('system.dept.780956-0')" width="260"></el-table-column>
<el-table-column prop="orderNum" :label="$t('system.dept.780956-2')" width="200"></el-table-column> <el-table-column prop="orderNum" :label="$t('system.dept.780956-2')" width="200"></el-table-column>
<el-table-column prop="status" :label="$t('system.dept.780956-2')" width="100"> <el-table-column prop="status" :label="$t('system.dept.780956-2')" width="100">
@@ -101,6 +115,7 @@
<el-button @click="cancel">{{ $t('cancel') }}</el-button> <el-button @click="cancel">{{ $t('cancel') }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</el-card>
</div> </div>
</template> </template>
@@ -283,3 +298,103 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped>
.app-container {
padding: 20px;
min-height: 100vh;
background-color: #f5f7fa;
}
.search-card {
margin-bottom: 15px;
border-radius: 8px;
::v-deep .el-card__body {
padding: 18px 18px 0 18px;
}
}
.table-card {
border-radius: 8px;
::v-deep .el-card__body {
padding: 18px;
}
}
.table-header {
background-color: #f5f7fa !important;
color: #606266;
font-weight: 600;
}
::v-deep .el-table {
th {
background-color: #f5f7fa;
color: #606266;
font-weight: 600;
}
td {
padding: 12px 0;
}
}
.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;
}
::v-deep .el-pagination {
padding: 20px 0 0 0;
text-align: right;
}
::v-deep .el-button--mini {
padding: 7px 12px;
font-size: 13px;
}
::v-deep .el-input__inner,
::v-deep .el-select__input {
height: 32px;
line-height: 32px;
border-radius: 4px;
}
::v-deep .el-form-item {
margin-bottom: 18px;
}
</style>

View File

@@ -1,5 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索栏 -->
<el-card shadow="never" class="search-card">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('system.dict.index.880996-0')" prop="dictName"> <el-form-item :label="$t('system.dict.index.880996-0')" prop="dictName">
<el-input v-model="queryParams.dictName" :placeholder="$t('system.dict.index.880996-0')" clearable style="width: 240px" @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.dictName" :placeholder="$t('system.dict.index.880996-0')" clearable style="width: 240px" @keyup.enter.native="handleQuery" />
@@ -19,36 +21,39 @@
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
type="daterange" type="daterange"
range-separator="-" range-separator="-"
start-placeholder="$t('system.dict.index.880996-3')" :start-placeholder="$t('system.dict.index.880996-3')"
end-placeholder="$t('system.dict.index.880996-4')" :end-placeholder="$t('system.dict.index.880996-4')"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</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="mini" @click="resetQuery">{{ $t('reset') }}</el-button> <el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card>
<el-row :gutter="10" class="mb8"> <!-- 操作按钮和数据表格 -->
<el-card shadow="never" class="table-card">
<el-row :gutter="10" style="margin-bottom: 15px">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:dict:add']">{{ $t('add') }}</el-button> <el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd" v-hasPermi="['system:dict:add']">{{ $t('add') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['system:dict:edit']">{{ $t('edit') }}</el-button> <el-button type="success" plain icon="el-icon-edit" size="small" :disabled="single" @click="handleUpdate" v-hasPermi="['system:dict:edit']">{{ $t('edit') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['system:dict:remove']">{{ $t('delete') }}</el-button> <el-button type="danger" plain icon="el-icon-delete" size="small" :disabled="multiple" @click="handleDelete" v-hasPermi="['system:dict:remove']">{{ $t('del') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['system:dict:export']">{{ $t('export') }}</el-button> <el-button type="warning" plain icon="el-icon-download" size="small" @click="handleExport" v-hasPermi="['system:dict:export']">{{ $t('export') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-refresh" size="mini" @click="handleRefreshCache" v-hasPermi="['system:dict:remove']">{{ $t('system.dict.index.880996-5') }}</el-button> <el-button type="danger" plain icon="el-icon-refresh" size="small" @click="handleRefreshCache" v-hasPermi="['system:dict:remove']">{{ $t('system.dict.index.880996-5') }}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange" header-cell-class-name="table-header" :border="false">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('system.dict.index.880996-6')" align="center" prop="dictId" /> <el-table-column :label="$t('system.dict.index.880996-6')" align="center" prop="dictId" />
<el-table-column :label="$t('system.dict.index.880996-0')" align="center" prop="dictName" :show-overflow-tooltip="true" /> <el-table-column :label="$t('system.dict.index.880996-0')" align="center" prop="dictName" :show-overflow-tooltip="true" />
@@ -78,8 +83,9 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> <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-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
@@ -103,6 +109,7 @@
<el-button @click="cancel">{{ $t('cancel') }}</el-button> <el-button @click="cancel">{{ $t('cancel') }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</el-card>
</div> </div>
</template> </template>
@@ -267,3 +274,103 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped>
.app-container {
padding: 20px;
min-height: 100vh;
background-color: #f5f7fa;
}
.search-card {
margin-bottom: 15px;
border-radius: 8px;
::v-deep .el-card__body {
padding: 18px 18px 0 18px;
}
}
.table-card {
border-radius: 8px;
::v-deep .el-card__body {
padding: 18px;
}
}
.table-header {
background-color: #f5f7fa !important;
color: #606266;
font-weight: 600;
}
::v-deep .el-table {
th {
background-color: #f5f7fa;
color: #606266;
font-weight: 600;
}
td {
padding: 12px 0;
}
}
.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;
}
::v-deep .el-pagination {
padding: 20px 0 0 0;
text-align: right;
}
::v-deep .el-button--mini {
padding: 7px 12px;
font-size: 13px;
}
::v-deep .el-input__inner,
::v-deep .el-select__input {
height: 32px;
line-height: 32px;
border-radius: 4px;
}
::v-deep .el-form-item {
margin-bottom: 18px;
}
</style>

View File

@@ -1,5 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索栏 -->
<el-card shadow="never" class="search-card">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form-item :label="$t('system.menu.034890-0')" prop="menuName"> <el-form-item :label="$t('system.menu.034890-0')" prop="menuName">
<el-input v-model="queryParams.menuName" :placeholder="$t('system.menu.034890-1')" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.menuName" :placeholder="$t('system.menu.034890-1')" clearable @keyup.enter.native="handleQuery" />
@@ -10,31 +12,43 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</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="mini" @click="resetQuery">{{ $t('reset') }}</el-button> <el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card>
<el-row :gutter="10" class="mb8"> <!-- 操作按钮和数据表格 -->
<el-card shadow="never" class="table-card">
<el-row :gutter="10" style="margin-bottom: 15px">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:menu:add']">{{ $t('add') }}</el-button> <el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd" v-hasPermi="['system:menu:add']">{{ $t('add') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="info" plain icon="el-icon-sort" size="mini" @click="toggleExpandAll">{{ $t('system.menu.034890-6') }}</el-button> <el-button type="info" plain icon="el-icon-sort" size="small" @click="toggleExpandAll">{{ $t('system.menu.034890-6') }}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-if="refreshTable" v-loading="loading" :data="menuList" row-key="menuId" :default-expand-all="isExpandAll" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"> <el-table
v-if="refreshTable"
v-loading="loading"
:data="menuList"
row-key="menuId"
:default-expand-all="isExpandAll"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
header-cell-class-name="table-header"
:border="false"
>
<el-table-column prop="menuName" :label="$t('system.menu.034890-0')" :show-overflow-tooltip="true" width="160"></el-table-column> <el-table-column prop="menuName" :label="$t('system.menu.034890-0')" :show-overflow-tooltip="true" width="160"></el-table-column>
<el-table-column prop="icon" :label="$t('system.menu.034890-7')" align="center" width="100"> <el-table-column prop="icon" :label="$t('system.menu.034890-3')" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<svg-icon :icon-class="scope.row.icon" /> <svg-icon :icon-class="scope.row.icon" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="orderNum" :label="$t('system.menu.034890-8')" width="60"></el-table-column> <el-table-column prop="orderNum" :label="$t('system.menu.034890-4')" width="60"></el-table-column>
<el-table-column prop="perms" :label="$t('system.menu.034890-9')" :show-overflow-tooltip="true"></el-table-column> <el-table-column prop="perms" :label="$t('system.menu.034890-5')" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="component" :label="$t('system.menu.034890-10')" :show-overflow-tooltip="true"></el-table-column> <el-table-column prop="component" :label="$t('system.menu.034890-6')" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="status" :label="$t('system.menu.034890-2')" width="80"> <el-table-column prop="status" :label="$t('system.menu.034890-2')" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" /> <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" />
@@ -198,6 +212,7 @@
<el-button @click="cancel">{{ $t('cancel') }}</el-button> <el-button @click="cancel">{{ $t('cancel') }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</el-card>
</div> </div>
</template> </template>
@@ -376,3 +391,103 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped>
.app-container {
padding: 20px;
min-height: 100vh;
background-color: #f5f7fa;
}
.search-card {
margin-bottom: 15px;
border-radius: 8px;
::v-deep .el-card__body {
padding: 18px 18px 0 18px;
}
}
.table-card {
border-radius: 8px;
::v-deep .el-card__body {
padding: 18px;
}
}
.table-header {
background-color: #f5f7fa !important;
color: #606266;
font-weight: 600;
}
::v-deep .el-table {
th {
background-color: #f5f7fa;
color: #606266;
font-weight: 600;
}
td {
padding: 12px 0;
}
}
.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;
}
::v-deep .el-pagination {
padding: 20px 0 0 0;
text-align: right;
}
::v-deep .el-button--mini {
padding: 7px 12px;
font-size: 13px;
}
::v-deep .el-input__inner,
::v-deep .el-select__input {
height: 32px;
line-height: 32px;
border-radius: 4px;
}
::v-deep .el-form-item {
margin-bottom: 18px;
}
</style>

View File

@@ -1,5 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索栏 -->
<el-card shadow="never" class="search-card">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('system.notice.670989-0')" prop="noticeTitle"> <el-form-item :label="$t('system.notice.670989-0')" prop="noticeTitle">
<el-input v-model="queryParams.noticeTitle" :placeholder="$t('system.notice.670989-1')" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.noticeTitle" :placeholder="$t('system.notice.670989-1')" clearable @keyup.enter.native="handleQuery" />
@@ -13,25 +15,28 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</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="mini" @click="resetQuery">{{ $t('reset') }}</el-button> <el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card>
<el-row :gutter="10" class="mb8"> <!-- 操作按钮和数据表格 -->
<el-card shadow="never" class="table-card">
<el-row :gutter="10" style="margin-bottom: 15px">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:notice:add']">{{ $t('add') }}</el-button> <el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd" v-hasPermi="['system:notice:add']">{{ $t('add') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['system:notice:edit']">{{ $t('edit') }}</el-button> <el-button type="success" plain icon="el-icon-edit" size="small" :disabled="single" @click="handleUpdate" v-hasPermi="['system:notice:edit']">{{ $t('edit') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['system:notice:remove']">{{ $t('del') }}</el-button> <el-button type="danger" plain icon="el-icon-delete" size="small" :disabled="multiple" @click="handleDelete" v-hasPermi="['system:notice:remove']">{{ $t('del') }}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange" header-cell-class-name="table-header" :border="false">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('system.notice.670989-15')" align="center" prop="noticeId" width="100" /> <el-table-column :label="$t('system.notice.670989-15')" align="center" prop="noticeId" width="100" />
<el-table-column :label="$t('system.notice.670989-0')" align="center" prop="noticeTitle" :show-overflow-tooltip="true" /> <el-table-column :label="$t('system.notice.670989-0')" align="center" prop="noticeTitle" :show-overflow-tooltip="true" />
@@ -96,6 +101,7 @@
<el-button @click="cancel">{{ $t('cancel') }}</el-button> <el-button @click="cancel">{{ $t('cancel') }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</el-card>
</div> </div>
</template> </template>
@@ -240,3 +246,103 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped>
.app-container {
padding: 20px;
min-height: 100vh;
background-color: #f5f7fa;
}
.search-card {
margin-bottom: 15px;
border-radius: 8px;
::v-deep .el-card__body {
padding: 18px 18px 0 18px;
}
}
.table-card {
border-radius: 8px;
::v-deep .el-card__body {
padding: 18px;
}
}
.table-header {
background-color: #f5f7fa !important;
color: #606266;
font-weight: 600;
}
::v-deep .el-table {
th {
background-color: #f5f7fa;
color: #606266;
font-weight: 600;
}
td {
padding: 12px 0;
}
}
.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;
}
::v-deep .el-pagination {
padding: 20px 0 0 0;
text-align: right;
}
::v-deep .el-button--mini {
padding: 7px 12px;
font-size: 13px;
}
::v-deep .el-input__inner,
::v-deep .el-select__input {
height: 32px;
line-height: 32px;
border-radius: 4px;
}
::v-deep .el-form-item {
margin-bottom: 18px;
}
</style>

View File

@@ -1,5 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索栏 -->
<el-card shadow="never" class="search-card">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('system.post.236590-0')" prop="postCode"> <el-form-item :label="$t('system.post.236590-0')" prop="postCode">
<el-input v-model="queryParams.postCode" :placeholder="$t('system.post.236590-1')" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.postCode" :placeholder="$t('system.post.236590-1')" clearable @keyup.enter.native="handleQuery" />
@@ -17,24 +19,27 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('reset') }}</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card>
<el-row :gutter="10" class="mb8"> <!-- 操作按钮和数据表格 -->
<el-card shadow="never" class="table-card">
<el-row :gutter="10" style="margin-bottom: 15px">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:post:add']">{{ $t('add') }}</el-button> <el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd" v-hasPermi="['system:post:add']">{{ $t('add') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['system:post:edit']">{{ $t('update') }}</el-button> <el-button type="success" plain icon="el-icon-edit" size="small" :disabled="single" @click="handleUpdate" v-hasPermi="['system:post:edit']">{{ $t('update') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['system:post:remove']">{{ $t('del') }}</el-button> <el-button type="danger" plain icon="el-icon-delete" size="small" :disabled="multiple" @click="handleDelete" v-hasPermi="['system:post:remove']">{{ $t('del') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['system:post:export']">{{ $t('export') }}</el-button> <el-button type="warning" plain icon="el-icon-download" size="small" @click="handleExport" v-hasPermi="['system:post:export']">{{ $t('export') }}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange" header-cell-class-name="table-header" :border="false">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('system.post.236590-5')" align="center" prop="postId" /> <el-table-column :label="$t('system.post.236590-5')" align="center" prop="postId" />
<el-table-column :label="$t('system.post.236590-0')" align="center" prop="postCode" /> <el-table-column :label="$t('system.post.236590-0')" align="center" prop="postCode" />
@@ -58,7 +63,9 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> <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-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
@@ -86,6 +93,7 @@
<el-button @click="cancel">{{ $t('cancel') }}</el-button> <el-button @click="cancel">{{ $t('cancel') }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</el-card>
</div> </div>
</template> </template>
@@ -242,3 +250,74 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped>
.app-container {
padding: 20px;
min-height: 100vh;
background-color: #f5f7fa;
}
.search-card {
margin-bottom: 15px;
border-radius: 8px;
::v-deep .el-card__body {
padding: 18px 18px 0 18px;
}
}
.table-card {
border-radius: 8px;
::v-deep .el-card__body {
padding: 18px;
}
}
.table-header {
background-color: #f5f7fa !important;
color: #606266;
font-weight: 600;
}
::v-deep .el-table {
th {
background-color: #f5f7fa;
color: #606266;
font-weight: 600;
}
td {
padding: 12px 0;
}
}
.pagination-container {
line-height: 40px;
margin-bottom: 30px;
margin-top: 0;
padding: 0;
}
::v-deep .el-pagination {
padding: 20px 0 0 0;
text-align: right;
}
::v-deep .el-button--mini {
padding: 7px 12px;
font-size: 13px;
}
::v-deep .el-input__inner,
::v-deep .el-select__input {
height: 32px;
line-height: 32px;
border-radius: 4px;
}
::v-deep .el-form-item {
margin-bottom: 18px;
}
</style>

View File

@@ -1,5 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索栏 -->
<el-card shadow="never" class="search-card">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form-item :label="$t('role.index.094567-0')" prop="roleName"> <el-form-item :label="$t('role.index.094567-0')" prop="roleName">
<el-input v-model="queryParams.roleName" :placeholder="$t('role.index.094567-1')" clearable style="width: 240px" @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.roleName" :placeholder="$t('role.index.094567-1')" clearable style="width: 240px" @keyup.enter.native="handleQuery" />
@@ -16,30 +18,33 @@
<el-date-picker v-model="dateRange" style="width: 240px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker> <el-date-picker v-model="dateRange" style="width: 240px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</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="mini" @click="resetQuery">{{ $t('reset') }}</el-button> <el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card>
<el-row :gutter="10" class="mb8"> <!-- 操作按钮和数据表格 -->
<el-card shadow="never" class="table-card">
<el-row :gutter="10" style="margin-bottom: 20px">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:role:add']">{{ $t('add') }}</el-button> <el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd" v-hasPermi="['system:role:add']">{{ $t('add') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['system:role:edit']">{{ $t('update') }}</el-button> <el-button type="success" plain icon="el-icon-edit" size="small" :disabled="single" @click="handleUpdate" v-hasPermi="['system:role:edit']">{{ $t('update') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['system:role:remove']">{{ $t('del') }}</el-button> <el-button type="danger" plain icon="el-icon-delete" size="small" :disabled="multiple" @click="handleDelete" v-hasPermi="['system:role:remove']">{{ $t('del') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['system:role:export']">{{ $t('export') }}</el-button> <el-button type="warning" plain icon="el-icon-download" size="small" @click="handleExport" v-hasPermi="['system:role:export']">{{ $t('export') }}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange" header-cell-class-name="table-header" :border="false">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('role.index.094567-5')" prop="roleId" width="120" /> <el-table-column label="id" prop="roleId" width="120" />
<el-table-column :label="$t('role.index.094567-0')" prop="roleName" :show-overflow-tooltip="true" width="150" /> <el-table-column :label="$t('role.index.094567-0')" prop="roleName" :show-overflow-tooltip="true" width="150" />
<el-table-column :label="$t('role.index.094567-0')" prop="roleKey" :show-overflow-tooltip="true" width="150" /> <el-table-column :label="$t('role.index.094567-0')" prop="roleKey" :show-overflow-tooltip="true" width="150" />
<el-table-column :label="$t('role.index.094567-16')" prop="roleSort" width="100" /> <el-table-column :label="$t('role.index.094567-16')" prop="roleSort" width="100" />
@@ -59,7 +64,7 @@
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:role:edit']">{{ $t('update') }}</el-button> <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:role:edit']">{{ $t('update') }}</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:role:remove']">{{ $t('del') }}</el-button> <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:role:remove']">{{ $t('del') }}</el-button>
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']"> <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">{{ $t('role.index.094567-14') }}</el-button> <el-button size="mini" type="text" icon="el-icon-d-arrow-right">{{ $t('role.index.094567-11') }}</el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="handleDataScope" icon="el-icon-circle-check" v-hasPermi="['system:role:edit']">{{ $t('role.index.094567-6') }}</el-dropdown-item> <el-dropdown-item command="handleDataScope" icon="el-icon-circle-check" v-hasPermi="['system:role:edit']">{{ $t('role.index.094567-6') }}</el-dropdown-item>
<el-dropdown-item command="handleAuthUser" icon="el-icon-user" v-hasPermi="['system:role:edit']">{{ $t('role.index.094567-7') }}</el-dropdown-item> <el-dropdown-item command="handleAuthUser" icon="el-icon-user" v-hasPermi="['system:role:edit']">{{ $t('role.index.094567-7') }}</el-dropdown-item>
@@ -68,8 +73,9 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> <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-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
@@ -146,6 +152,7 @@
<el-button @click="cancelDataScope">{{ $t('cancel') }}</el-button> <el-button @click="cancelDataScope">{{ $t('cancel') }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</el-card>
</div> </div>
</template> </template>
@@ -506,3 +513,105 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped>
.app-container {
padding: 20px;
min-height: 100vh;
background-color: #f5f7fa;
}
.search-card {
margin-bottom: 15px;
border-radius: 8px;
::v-deep .el-card__body {
padding: 18px 18px 0 18px;
}
}
.table-card {
::v-deep .el-card__body {
padding: 18px;
}
}
.table-header {
background-color: #f5f7fa !important;
color: #606266;
font-weight: 600;
}
::v-deep .el-table {
th {
background-color: #f5f7fa;
color: #606266;
font-weight: 600;
}
td {
padding: 12px 0;
}
}
.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;
}
::v-deep .el-button--small {
padding: 8px 15px;
font-size: 13px;
}
::v-deep .el-pagination {
padding: 20px 0 0 0;
text-align: right;
}
::v-deep .el-button--mini {
padding: 7px 12px;
font-size: 13px;
}
::v-deep .el-input__inner,
::v-deep .el-select__input {
height: 32px;
border-radius: 4px;
}
::v-deep .el-form-item {
margin-bottom: 18px;
}
</style>

View File

@@ -3,6 +3,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<!--部门数据--> <!--部门数据-->
<el-col :span="4" :xs="24"> <el-col :span="4" :xs="24">
<el-card shadow="never" class="dept-card">
<div class="head-container"> <div class="head-container">
<el-input v-model="deptName" :placeholder="$t('user.index.098976-0')" clearable size="small" prefix-icon="el-icon-search" style="margin-bottom: 20px" /> <el-input v-model="deptName" :placeholder="$t('user.index.098976-0')" clearable size="small" prefix-icon="el-icon-search" style="margin-bottom: 20px" />
</div> </div>
@@ -19,9 +20,12 @@
@node-click="handleNodeClick" @node-click="handleNodeClick"
/> />
</div> </div>
</el-card>
</el-col> </el-col>
<!--用户数据--> <!--用户数据-->
<el-col :span="20" :xs="24"> <el-col :span="20" :xs="24">
<!-- 搜索栏 -->
<el-card shadow="never" class="search-card">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('user.index.098976-1')" prop="userName"> <el-form-item :label="$t('user.index.098976-1')" prop="userName">
<el-input v-model="queryParams.userName" :placeholder="$t('user.index.098976-2')" clearable style="width: 240px" @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.userName" :placeholder="$t('user.index.098976-2')" clearable style="width: 240px" @keyup.enter.native="handleQuery" />
@@ -46,31 +50,34 @@
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</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="mini" @click="resetQuery">{{ $t('reset') }}</el-button> <el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card>
<el-row :gutter="10" class="mb8"> <!-- 操作按钮和数据表格 -->
<el-card shadow="never" class="table-card">
<el-row :gutter="10" style="margin-bottom: 15px">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:user:add']">{{ $t('add') }}</el-button> <el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd" v-hasPermi="['system:user:add']">{{ $t('add') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['system:user:edit']">{{ $t('update') }}</el-button> <el-button type="success" plain icon="el-icon-edit" size="small" :disabled="single" @click="handleUpdate" v-hasPermi="['system:user:edit']">{{ $t('update') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['system:user:remove']">{{ $t('del') }}</el-button> <el-button type="danger" plain icon="el-icon-delete" size="small" :disabled="multiple" @click="handleDelete" v-hasPermi="['system:user:remove']">{{ $t('del') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport" v-hasPermi="['system:user:import']">{{ $t('import') }}</el-button> <el-button type="info" plain icon="el-icon-upload2" size="small" @click="handleImport" v-hasPermi="['system:user:import']">{{ $t('import') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['system:user:export']">{{ $t('export') }}</el-button> <el-button type="warning" plain icon="el-icon-download" size="small" @click="handleExport" v-hasPermi="['system:user:export']">{{ $t('export') }}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange" header-cell-class-name="table-header" :border="false">
<el-table-column type="selection" width="50" align="center" /> <el-table-column type="selection" width="50" align="center" />
<el-table-column :label="$t('user.index.098976-30')" align="center" key="userId" prop="userId" v-if="columns[0].visible" /> <el-table-column :label="$t('user.index.098976-30')" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
<el-table-column :label="$t('user.index.098976-1')" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" /> <el-table-column :label="$t('user.index.098976-1')" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
@@ -102,7 +109,10 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
</div>
</el-card>
</el-col> </el-col>
</el-row> </el-row>
@@ -565,3 +575,118 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped>
.app-container {
padding: 20px;
min-height: 100vh;
background-color: #f5f7fa;
}
.dept-card {
margin-bottom: 15px;
border-radius: 8px;
height: 810px;
::v-deep .el-card__body {
padding: 18px;
}
}
.search-card {
margin-bottom: 15px;
border-radius: 8px;
::v-deep .el-card__body {
padding: 18px 18px 0 18px;
}
}
.table-card {
border-radius: 8px;
::v-deep .el-card__body {
padding: 18px;
}
}
.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;
}
::v-deep .el-table {
th {
background-color: #f5f7fa;
color: #606266;
font-weight: 600;
}
td {
padding: 12px 0;
}
}
.pagination-container {
line-height: 40px;
margin-bottom: 30px;
margin-top: 0;
padding: 0;
}
::v-deep .el-pagination {
padding: 20px 0 0 0;
text-align: right;
}
::v-deep .el-button--mini {
padding: 7px 12px;
font-size: 13px;
}
::v-deep .el-input__inner,
::v-deep .el-select__input {
height: 32px;
line-height: 32px;
border-radius: 4px;
}
::v-deep .el-form-item {
margin-bottom: 18px;
}
::v-deep .el-tree {
background-color: transparent;
}
</style>

View File

@@ -19,31 +19,31 @@
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('search') }}</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="mini" @click="resetQuery">{{ $t('reset') }}</el-button> <el-button icon="el-icon-refresh" size="small" @click="resetQuery">{{ $t('reset') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-download" size="mini" :disabled="multiple" @click="handleGenTable" v-hasPermi="['tool:gen:code']">{{ $t('build.index.2090840-3') }}</el-button> <el-button type="primary" plain icon="el-icon-download" size="small" :disabled="multiple" @click="handleGenTable" v-hasPermi="['tool:gen:code']">{{ $t('build.index.2090840-3') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openCreateTable" v-hasRole="['admin']">{{ $t('add') }}</el-button> <el-button type="primary" plain icon="el-icon-plus" size="small" @click="openCreateTable" v-hasRole="['admin']">{{ $t('add') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="info" plain icon="el-icon-upload" size="mini" @click="openImportTable" v-hasPermi="['tool:gen:import']">{{ $t('import') }}</el-button> <el-button type="info" plain icon="el-icon-upload" size="small" @click="openImportTable" v-hasPermi="['tool:gen:import']">{{ $t('import') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleEditTable" v-hasPermi="['tool:gen:edit']">{{ $t('update') }}</el-button> <el-button type="success" plain icon="el-icon-edit" size="small" :disabled="single" @click="handleEditTable" v-hasPermi="['tool:gen:edit']">{{ $t('update') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['tool:gen:remove']">{{ $t('del') }}</el-button> <el-button type="danger" plain icon="el-icon-delete" size="small" :disabled="multiple" @click="handleDelete" v-hasPermi="['tool:gen:remove']">{{ $t('del') }}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange" :border="false">
<el-table-column type="selection" align="center" width="55"></el-table-column> <el-table-column type="selection" align="center" width="55"></el-table-column>
<el-table-column :label="$t('system.cache.list.093478-1')" type="index" width="50" align="center"> <el-table-column :label="$t('system.cache.list.093478-1')" type="index" width="50" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -65,7 +65,9 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
</div>
<!-- Preview --> <!-- Preview -->
<el-dialog :title="preview.title" :visible.sync="preview.open" width="80%" top="5vh" append-to-body class="scrollbar"> <el-dialog :title="preview.title" :visible.sync="preview.open" width="80%" top="5vh" append-to-body class="scrollbar">
<el-tabs v-model="preview.activeName"> <el-tabs v-model="preview.activeName">
@@ -252,3 +254,43 @@ export default {
}, },
}; };
</script> </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>