Commit 4899925e by YG8999

bug修复

parent 66b1c116
......@@ -103,16 +103,20 @@
<el-table-column label="消息描述" align="center" prop="mqttDescribe" />
<!-- <el-table-column label="消息主体参数" align="center" prop="payload" />-->
<el-table-column label="消息主题" align="center" prop="topic" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="记录时间" align="center" prop="createTime" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="备注" align="center" prop="remark" />-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['system:log:edit']"-->
<!-- >修改</el-button>-->
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>查看</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
......@@ -120,7 +124,7 @@
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['system:log:remove']"-->
<!-- >删除</el-button>-->
<!-- </template>-->
</template>
</el-table-column>
</el-table>
......@@ -133,8 +137,8 @@
/>
<!-- 添加或修改设备操作日志对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="设备mac" prop="devMac">
<el-input v-model="form.devMac" placeholder="请输入设备mac" />
</el-form-item>
......@@ -144,21 +148,20 @@
<el-form-item label="请求的序列号" prop="seq">
<el-input v-model="form.seq" placeholder="请输入请求的序列号" />
</el-form-item>
<el-form-item label="消息描述:开门、开灯、网关设备绑定等" prop="mqttDescribe">
<el-input v-model="form.mqttDescribe" placeholder="请输入消息描述:开门、开灯、网关设备绑定等" />
<el-form-item label="消息描述" prop="mqttDescribe">
<el-input v-model="form.mqttDescribe" />
</el-form-item>
<el-form-item label="消息主体参数" prop="payload">
<el-input v-model="form.payload" type="textarea" placeholder="请输入内容" />
<el-form-item label="消息参数" prop="payload">
<el-input v-model="form.payload" type="textarea" :rows="5" />
</el-form-item>
<el-form-item label="消息主题" prop="topic">
<el-input v-model="form.topic" placeholder="请输入消息主题" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
<el-form-item label="回复信息" prop="remark">
<el-input v-model="form.remark" type="textarea" :rows="5" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
......@@ -275,29 +278,29 @@ export default {
getLog(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改设备操作日志";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateLog(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addLog(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
this.title = "查看设备操作日志";
});
},
// /** 提交按钮 */
// submitForm() {
// this.$refs["form"].validate(valid => {
// if (valid) {
// if (this.form.id != null) {
// updateLog(this.form).then(response => {
// this.$modal.msgSuccess("修改成功");
// this.open = false;
// this.getList();
// });
// } else {
// addLog(this.form).then(response => {
// this.$modal.msgSuccess("新增成功");
// this.open = false;
// this.getList();
// });
// }
// }
// });
// },
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment