[update] 修改bug

This commit is contained in:
danshihao
2024-04-11 10:59:19 +08:00
parent b5393f6267
commit b8de008598
12 changed files with 589 additions and 365 deletions
@@ -3,7 +3,7 @@
<a-row :gutter="20" type="flex" class="mb-20">
<a-col flex="556px">
<common-card title="系统设置">
<a-form :form="sysSettingForm" class="custom-vertical-form flex-column-between">
<a-form :form="sysSettingForm" class="custom-vertical-form">
<div class="mb-20">
<a-form-item label="服务器IP">
<a-input placeholder="请输入服务器IP" :max-length="50"
@@ -50,7 +50,7 @@
size="middle"
bordered
rowKey="id"
:scroll="{x: true,y:280}"
:scroll="{x: true,y:286}"
:columns="userInfo.columns"
:dataSource="userInfo.dataSource"
:pagination="userInfo.ipagination"
@@ -65,6 +65,7 @@
<a-tooltip>
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<div class="table-text"
style="width: 76px;"
:class="{
'tag-blue': record.userType === userType.admin.value,
'tag-cyan': record.userType === userType.common.value
@@ -80,11 +81,11 @@
</a-col>
</a-row>
<a-row :gutter="20" type="flex" class="mb-20">
<a-row :gutter="20" type="flex">
<a-col flex="556px">
<common-card title="添加用户">
<a-form :form="addUserForm" class="custom-vertical-form flex-column-between">
<a-form-item>
<a-form :form="addUserForm" class="custom-vertical-form">
<a-form-item style="margin-bottom: 0;">
<div class="upload-avatar-box">
<j-image-upload v-decorator="['avatar', validatorRules.avatar]"
class="upload-avatar"
@@ -93,7 +94,7 @@
accept='.png,.PNG,.jpg,.JPG'></j-image-upload>
</div>
</a-form-item>
<a-row type="flex" :gutter="20" class="mb-20">
<a-row type="flex" :gutter="20" class="mb-4">
<a-col :span="12">
<a-form-item label="用户名称">
<a-input placeholder="请输入用户名称" :max-length="50"
@@ -143,7 +144,7 @@
size="middle"
bordered
rowKey="id"
:scroll="{x: true,y:360}"
:scroll="{x: true,y:286}"
:columns="communicationLog.columns"
:dataSource="communicationLog.dataSource"
:pagination="communicationLog.ipagination"
@@ -154,10 +155,18 @@
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
</a-tooltip>
</template>
<span slot="action" slot-scope="text, record, index" class="operation-btns">
<a class="primary" @click="handleChangeStatus(record, index)">编辑</a>
<a class="danger" @click="handleDelete(record, index)">删除</a>
</span>
<!-- 消息类型 -->
<template slot="msgType" slot-scope="text">
<a-tooltip>
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<div class="table-text"
style="width: 118px;"
:class="{
'tag-blue': text === msgType.hostToDevice.label,
'tag-cyan': text === msgType.deviceToHost.label
}">{{ text || text === 0 ? text : global.emptyLine }}</div>
</a-tooltip>
</template>
</a-table>
</common-card>
</a-col>
@@ -170,7 +179,7 @@
<script>
import CommonCard from '@comp/CommonCard'
import { addUserInfo, delUserInfo, getSysSetting, getUserPage, saveSysSetting } from '@api/systemOverview'
import { dataAcquisitionCycle, dataAcquisitionProtocol, userType } from '@/enums/commonEnums'
import { dataAcquisitionCycle, dataAcquisitionProtocol, msgType, userType } from '@/enums/commonEnums'
import { getRSAPublicKey } from '@/utils/encryption'
import { JSEncrypt } from 'jsencrypt'
import UserInfoModal from '@views/systemOverview/systemSettings/modules/UserInfoModal'
@@ -180,6 +189,7 @@ export default {
data () {
return {
userType,
msgType,
loading: false,
// 系统设置表单
sysSettingForm: this.$form.createForm(this),
@@ -279,7 +289,7 @@ export default {
title: '消息类型',
align: 'center',
width: '30%',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'msgType' }
},
{
dataIndex: 'msgContent',