设备登记列表
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
"crypto-js": "^4.2.0",
|
||||
"echarts": "^5.4.3",
|
||||
"echarts4": "npm:echarts@^4.9.0",
|
||||
"element-plus": "^2.5.3",
|
||||
"element-plus": "^2.7.5",
|
||||
"html2canvas": "^1.4.1",
|
||||
"jquery": "^3.7.1",
|
||||
"lodash-es": "^4.17.21",
|
||||
|
||||
3152
pnpm-lock.yaml
generated
3152
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -31,7 +31,6 @@ export const resetEquipmentDelivery = (id: any) => {
|
||||
}
|
||||
|
||||
// 编辑出厂设备
|
||||
|
||||
export const editEquipmentDelivery = (data: any) => {
|
||||
return createAxios({
|
||||
url: '/cs-device-boot/EquipmentDelivery/updateEquipmentDelivery',
|
||||
@@ -64,3 +63,27 @@ export const batchImportDevice = (file: any) => {
|
||||
data: form
|
||||
})
|
||||
}
|
||||
|
||||
// 直连设备注册接入
|
||||
export const governDeviceRegister = (data: any) => {
|
||||
return createAxios({
|
||||
url: `/access-boot/device/register?nDid=${data.nDid}&type=${data.type}`,
|
||||
method: 'POST'
|
||||
})
|
||||
}
|
||||
|
||||
// 便携式设备注册
|
||||
export const portableDeviceRegister = (data: any) => {
|
||||
return createAxios({
|
||||
url: `/access-boot/device/wlRegister?nDid=${data.nDid}`,
|
||||
method: 'POST',
|
||||
})
|
||||
}
|
||||
|
||||
// 便携式设备接入
|
||||
export const portableDeviceAccess = (data: any) => {
|
||||
return createAxios({
|
||||
url: `/access-boot/device/wlAccess?nDid=${data.nDid}`,
|
||||
method: 'POST',
|
||||
})
|
||||
}
|
||||
|
||||
@@ -69,7 +69,27 @@ body,
|
||||
background: #fff;
|
||||
margin: var(--ba-main-space) var(--ba-main-space) 0px var(--ba-main-space);
|
||||
}
|
||||
.form-style {
|
||||
|
||||
.form-one {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
.el-form-item {
|
||||
display: flex;
|
||||
width: 98%;
|
||||
margin-bottom: 15px !important;
|
||||
.el-form-item__content {
|
||||
flex: 1;
|
||||
.el-select,
|
||||
.el-cascader,
|
||||
.el-input__inner,
|
||||
.el-date-editor {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.form-two {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
@@ -78,19 +98,40 @@ body,
|
||||
width: 48%;
|
||||
.el-form-item__content {
|
||||
flex: 1;
|
||||
.el-select {
|
||||
width: 100%;
|
||||
}
|
||||
.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
.el-select,
|
||||
.el-cascader,
|
||||
.el-input__inner,
|
||||
.el-date-editor {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//修改上传文件filelist位置
|
||||
.uploadFile {
|
||||
.el-form-item__content {
|
||||
line-height: 20px !important;
|
||||
div {
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
}
|
||||
.el-upload-list__item-name {
|
||||
width: 150px !important;
|
||||
}
|
||||
.el-upload-list--text {
|
||||
margin: 0px 20px 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-tree{
|
||||
.el-tree-node__children{
|
||||
display: block !important;
|
||||
overflow: auto;
|
||||
}
|
||||
.el-tree-node .is-hidden .is-focusable{
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
.zoom-handle {
|
||||
position: absolute;
|
||||
width: 20px;
|
||||
@@ -157,53 +198,53 @@ body,
|
||||
|
||||
/* 表格-e */
|
||||
|
||||
/* 新增/编辑表单-s */
|
||||
.cn-operate-dialog {
|
||||
overflow: hidden;
|
||||
border-radius: var(--el-border-radius-base);
|
||||
}
|
||||
// /* 新增/编辑表单-s */
|
||||
// .cn-operate-dialog {
|
||||
// overflow: hidden;
|
||||
// border-radius: var(--el-border-radius-base);
|
||||
// }
|
||||
|
||||
.cn-operate-dialog .el-dialog__header {
|
||||
padding-bottom: 16px;
|
||||
border-bottom: 1px solid var(--ba-bg-color);
|
||||
}
|
||||
// .cn-operate-dialog .el-dialog__header {
|
||||
// padding-bottom: 16px;
|
||||
// border-bottom: 1px solid var(--ba-bg-color);
|
||||
// }
|
||||
|
||||
.cn-operate-dialog .el-dialog__body {
|
||||
height: 60vh;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 52px;
|
||||
}
|
||||
// .cn-operate-dialog .el-dialog__body {
|
||||
// max-height: 60vh;
|
||||
// padding-top: 20px;
|
||||
// padding-bottom: 52px;
|
||||
// }
|
||||
|
||||
.cn-operate-dialog .el-dialog__body .el-scrollbar {
|
||||
// padding-right: 60px;
|
||||
}
|
||||
// .cn-operate-dialog .el-dialog__body .el-scrollbar {
|
||||
// // padding-right: 60px;
|
||||
// }
|
||||
|
||||
.cn-operate-dialog .el-dialog__footer {
|
||||
padding: 10px var(--el-dialog-padding-primary);
|
||||
box-shadow: var(--el-box-shadow);
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
}
|
||||
// .cn-operate-dialog .el-dialog__footer {
|
||||
// padding: 15px;
|
||||
// box-shadow: var(--el-box-shadow);
|
||||
// position: absolute;
|
||||
// width: 100%;
|
||||
// bottom: 0;
|
||||
// }
|
||||
|
||||
.cn-operate-dialog .el-form {
|
||||
width: calc(100% - 60px);
|
||||
}
|
||||
// .cn-operate-dialog .el-form {
|
||||
// width: calc(100% - 60px);
|
||||
// }
|
||||
|
||||
.cn-operate-dialog .el-form--inline {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
|
||||
grid-gap: 20px 10px;
|
||||
// .cn-operate-dialog .el-form--inline {
|
||||
// display: grid;
|
||||
// grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
|
||||
// grid-gap: 20px 10px;
|
||||
|
||||
.el-form-item {
|
||||
margin-right: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
// .el-form-item {
|
||||
// margin-right: 0;
|
||||
// margin-bottom: 0;
|
||||
// }
|
||||
// }
|
||||
|
||||
.cn-operate-dialog .el-form--inline .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
// .cn-operate-dialog .el-form--inline .el-select {
|
||||
// width: 100%;
|
||||
// }
|
||||
|
||||
.ba-operate-form {
|
||||
padding-top: 20px;
|
||||
@@ -351,21 +392,31 @@ body,
|
||||
background: #fff;
|
||||
z-index: 2;
|
||||
}
|
||||
.bjs-powered-by {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "AlimamaFangYuanTiVF";
|
||||
font-family: 'AlimamaFangYuanTiVF';
|
||||
src: url('../assets/font/ali/AlimamaFangYuanTiVF-Thin.woff') format('woff'),
|
||||
url("../assets/font/ali/AlimamaFangYuanTiVF-Thin.woff2") format('woff2');
|
||||
url('../assets/font/ali/AlimamaFangYuanTiVF-Thin.woff2') format('woff2');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
//阿里变形字体
|
||||
@font-face {
|
||||
font-family: 'nablaRegular';
|
||||
src: url('../assets/font/ali/Nabla_Regular.woff') format('woff'),
|
||||
url('../assets/font/ali/Nabla_Regular.woff2') format('woff2');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "AlimamaDongFangDaKai";
|
||||
font-family: 'AlimamaDongFangDaKai';
|
||||
src: url('../assets/font/ali/AlimamaDongFangDaKai-Regular.woff') format('woff'),
|
||||
url("../assets/font/ali/AlimamaDongFangDaKai-Regular.woff2") format('woff2');
|
||||
url('../assets/font/ali/AlimamaDongFangDaKai-Regular.woff2') format('woff2');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,16 +29,38 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-dialog {
|
||||
padding: 0px !important;
|
||||
|
||||
.el-dialog__footer {
|
||||
padding: 15px;
|
||||
box-shadow: var(--el-box-shadow);
|
||||
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
.el-dialog__body {
|
||||
max-height: 60vh;
|
||||
overflow-y: auto;
|
||||
padding: 10px;
|
||||
}
|
||||
.el-dialog__header {
|
||||
background: var(--el-color-primary);
|
||||
margin-right: 0;
|
||||
padding: 15px;
|
||||
margin-right: 0px;
|
||||
|
||||
.el-dialog__headerbtn {
|
||||
top: 5px;
|
||||
.el-icon {
|
||||
color: var(--el-color-white);
|
||||
}
|
||||
}
|
||||
.el-dialog__headerbtn:hover {
|
||||
.el-icon {
|
||||
color: #409eff;
|
||||
}
|
||||
}
|
||||
|
||||
.el-dialog__title {
|
||||
color: var(--el-color-white);
|
||||
@@ -61,10 +83,6 @@
|
||||
padding: 5px 11px;
|
||||
}
|
||||
|
||||
.el-dialog__body {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
/* dialog滚动条-s */
|
||||
.el-overlay-dialog,
|
||||
.el-tabs__content,
|
||||
@@ -131,7 +149,7 @@
|
||||
}
|
||||
|
||||
.el-select {
|
||||
min-width: 220px;
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
.el-tabs__content {
|
||||
@@ -143,8 +161,8 @@
|
||||
|
||||
.el-button--primary:focus {
|
||||
color: var(--el-color-white);
|
||||
border-color: var(--el-color-primary);
|
||||
background-color: var(--el-color-primary);
|
||||
// border-color: var(--el-color-primary);
|
||||
// background-color: var(--el-color-primary);
|
||||
outline: 0;
|
||||
}
|
||||
.el-button--primary:hover {
|
||||
@@ -173,3 +191,24 @@
|
||||
color: var(--el-color-primary-light-5);
|
||||
background-color: var(--el-color-primary-light-9) !important;
|
||||
}
|
||||
|
||||
.el-divider--horizontal {
|
||||
margin: 15px 0;
|
||||
}
|
||||
.el-step__title {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner,
|
||||
.el-radio__input.is-disabled.is-checked .el-radio__inner {
|
||||
background-color: var(--el-color-primary);
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.sgmap-ctrl-bottom-left {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.el-drawer__header {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
@@ -75,21 +75,22 @@ const tableStore = new TableStore({
|
||||
url: '/system-boot/csDictData/list',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '数据分类', field: 'dataTypeName' },
|
||||
{ title: '数据名称', field: 'name' },
|
||||
{ title: '别名', field: 'otherName' },
|
||||
{ title: '展示名称', field: 'showName' },
|
||||
{ title: '数据分类', field: 'dataTypeName' , width: 170 },
|
||||
{ title: '数据名称', field: 'name' , width: 220 },
|
||||
{ title: '别名', field: 'otherName' , width: 220 },
|
||||
{ title: '展示名称', field: 'showName' , width: 170 },
|
||||
{ title: '相别', field: 'phaseName', width: 80 },
|
||||
{ title: '单位', field: 'unit', width: 80 },
|
||||
{ title: '基础数据类型', field: 'type', width: 80 },
|
||||
{ title: '数据谐波次数', field: 'harmStartEnd' },
|
||||
{ title: '数据统计方法', field: 'statMethod' },
|
||||
{ title: '数据存储', field: 'classIdName' },
|
||||
{ title: '数据来源', field: 'resourcesIdName' },
|
||||
{ title: '基础数据类型', field: 'type', width: 170 },
|
||||
{ title: '数据谐波次数', field: 'harmStartEnd', width: 170 },
|
||||
{ title: '数据统计方法', field: 'statMethod', width: 170 },
|
||||
{ title: '数据存储', field: 'classIdName' , width: 120 },
|
||||
{ title: '数据来源', field: 'resourcesIdName' , width: 120 },
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
|
||||
@@ -66,8 +66,9 @@
|
||||
:title="dialogTitle"
|
||||
v-model="dialogFormVisible"
|
||||
:close-on-click-modal="false"
|
||||
class="cn-operate-dialog"
|
||||
:before-close="resetForm"
|
||||
draggable
|
||||
width="40%"
|
||||
>
|
||||
<el-form :model="form" label-width="120px" :rules="rules" ref="ruleFormRef">
|
||||
<el-form-item label="设备名称:" prop="name">
|
||||
@@ -136,7 +137,10 @@ import {
|
||||
deleteEquipmentDelivery,
|
||||
editEquipmentDelivery,
|
||||
batchImportDevice,
|
||||
resetEquipmentDelivery
|
||||
resetEquipmentDelivery,
|
||||
governDeviceRegister,
|
||||
portableDeviceRegister,
|
||||
portableDeviceAccess
|
||||
} from '@/api/cs-system-boot/device'
|
||||
import html2canvas from 'html2canvas'
|
||||
import { fullUrl } from '@/utils/common'
|
||||
@@ -216,20 +220,14 @@ const tableStore = new TableStore({
|
||||
title: '设备类型',
|
||||
field: 'devType',
|
||||
formatter: row => {
|
||||
return (
|
||||
devTypeOptions.value.filter((item: any) => item.value == row.cellValue)[0] &&
|
||||
devTypeOptions.value.filter((item: any) => item.value == row.cellValue)[0].label
|
||||
)
|
||||
return devTypeOptions.value.filter((item: any) => item.value == row.cellValue)[0]?.label
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '设备型号',
|
||||
field: 'devModel',
|
||||
formatter: row => {
|
||||
return (
|
||||
devModelOptions.value.filter((item: any) => item.value == row.cellValue)[0] &&
|
||||
devModelOptions.value.filter((item: any) => item.value == row.cellValue)[0].label
|
||||
)
|
||||
return devModelOptions.value.filter((item: any) => item.value == row.cellValue)[0]?.label
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -244,15 +242,13 @@ const tableStore = new TableStore({
|
||||
{
|
||||
title: '状态',
|
||||
field: 'status',
|
||||
// formatter: row => {
|
||||
// return row.cellValue == 1 ? '未注册' : row.cellValue == 2 ? '注册' : '接入'
|
||||
// },
|
||||
width: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
1: 'warning',
|
||||
2: 'success',
|
||||
3: 'primary',
|
||||
4: 'danger'
|
||||
4: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '未注册',
|
||||
@@ -260,6 +256,9 @@ const tableStore = new TableStore({
|
||||
3: '接入',
|
||||
4: '已取消'
|
||||
}
|
||||
// formatter: row => {
|
||||
// return row.cellValue == 1 ? '未注册' : row.cellValue == 2 ? '注册' : '接入'
|
||||
// },
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@@ -267,6 +266,104 @@ const tableStore = new TableStore({
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
|
||||
//直连装置注册
|
||||
{
|
||||
title: '注册',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Grid',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return (
|
||||
(row.devType == '8b45cf6b7f5266e777d07c166ad5fa77' &&
|
||||
row.devModel == 'a0d4da4b5c17b2172362a3f5a27bf217') ||
|
||||
row.status != '1'
|
||||
)
|
||||
},
|
||||
click: row => {
|
||||
// 直连设备注册
|
||||
ElMessageBox.confirm('确定注册该设备吗?', '提示', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
governDeviceRegister({
|
||||
nDid: row.ndid,
|
||||
type: '4'
|
||||
}).then(res => {
|
||||
ElMessage.success(res.message)
|
||||
tableStore.onTableAction('search', {})
|
||||
})
|
||||
})
|
||||
.catch(e => {})
|
||||
}
|
||||
},
|
||||
//便携式设备注册
|
||||
{
|
||||
title: '注册',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Grid',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return (
|
||||
(row.devType != '8b45cf6b7f5266e777d07c166ad5fa77' &&
|
||||
row.devModel != 'a0d4da4b5c17b2172362a3f5a27bf217') ||
|
||||
row.status != '1'
|
||||
)
|
||||
},
|
||||
click: row => {
|
||||
// 便携式设备注册
|
||||
ElMessageBox.confirm('确定注册该设备吗?', '提示', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
portableDeviceRegister({
|
||||
nDid: row.ndid
|
||||
}).then(res => {
|
||||
console.log(res,"8888");
|
||||
ElMessage.success(res.message)
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
.catch(e => {})
|
||||
}
|
||||
},
|
||||
//直连设备接入
|
||||
{
|
||||
title: '接入',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Grid',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return (
|
||||
(row.devType == '8b45cf6b7f5266e777d07c166ad5fa77' &&
|
||||
row.devModel == 'a0d4da4b5c17b2172362a3f5a27bf217') ||
|
||||
row.status != '2'
|
||||
)
|
||||
},
|
||||
click: row => {
|
||||
// 直连设备接入
|
||||
ElMessageBox.confirm('确定接入该设备吗?', '提示', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
governDeviceRegister({
|
||||
nDid: row.ndid,
|
||||
type: '4'
|
||||
}).then(res => {
|
||||
ElMessage.success(res.message)
|
||||
tableStore.onTableAction('search', {})
|
||||
})
|
||||
})
|
||||
.catch(e => {})
|
||||
}
|
||||
},
|
||||
//便携式设备接入
|
||||
{
|
||||
title: '接入',
|
||||
type: 'primary',
|
||||
@@ -276,11 +373,25 @@ const tableStore = new TableStore({
|
||||
return (
|
||||
(row.devType != '8b45cf6b7f5266e777d07c166ad5fa77' &&
|
||||
row.devModel != 'a0d4da4b5c17b2172362a3f5a27bf217') ||
|
||||
row.status == '3'
|
||||
row.status != '2'
|
||||
)
|
||||
},
|
||||
click: row => {
|
||||
console.log('接入')
|
||||
// 便携式设备接入
|
||||
ElMessageBox.confirm('确定接入该设备吗?', '提示', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
portableDeviceAccess({
|
||||
nDid: row.ndid
|
||||
}).then(res => {
|
||||
ElMessage.success(res.message)
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
.catch(e => {})
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -339,12 +450,14 @@ const tableStore = new TableStore({
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
})
|
||||
.then(() => {
|
||||
deleteEquipmentDelivery(row.id).then(res => {
|
||||
ElMessage.success('删除成功!')
|
||||
tableStore.onTableAction('search', {})
|
||||
})
|
||||
})
|
||||
.catch(e => {})
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user