提交: 1.权限说明doc, 增加doc 目录; 2. 监控大屏 title 增设 配置管理 设置参数(bigTitle); 3.左侧 菜单栏 下方增加 '退出登录' 操作,快捷退出!4. 企业端 项目详情 同步(去除 用户列表, 权限配置 企业用户按钮操作,/doc/权限说明.md)
This commit is contained in:
parent
300fd1c3b1
commit
dceb330503
|
@ -0,0 +1,30 @@
|
||||||
|
## 权限设置方式
|
||||||
|
|
||||||
|
* v-hasPermi="['iot:project:add']"
|
||||||
|
|
||||||
|
* 组件添加 上述代码
|
||||||
|
|
||||||
|
* 菜单管理 添加 按钮菜单 --> 赋予用户权限(超级管理员默认拥有所有权限) --> 刷新加载
|
||||||
|
|
||||||
|
|
||||||
|
#### 项目详情 按钮权限
|
||||||
|
|
||||||
|
project:tenant:add --- 项目-租户(用户)-新增
|
||||||
|
project:tenant:relieve --- 项目-租户(用户)-解除
|
||||||
|
|
||||||
|
project:space:add --- 项目-空间-新增
|
||||||
|
project:space:remove --- 项目-空间-删除
|
||||||
|
project:space:edit --- 项目-空间-编辑
|
||||||
|
project:space:device --- 项目-空间-设备管理
|
||||||
|
project:device:add --- 项目-空间-设备-添加
|
||||||
|
project:device:relieve --- 项目-空间-设备-删除
|
||||||
|
|
||||||
|
project:price:add --- 项目-能源-合同-删除
|
||||||
|
project:price:edit --- 项目-能源-合同-编辑
|
||||||
|
project:price:remove --- 项目-能源-合同-删除
|
||||||
|
|
||||||
|
project:scene:add --- 项目-场景-新增
|
||||||
|
project:scene:edit --- 项目-场景-编辑
|
||||||
|
project:scene:remove --- 项目-场景-删除
|
||||||
|
project:scene:run --- 项目-场景-执行一次
|
||||||
|
project:scene:status --- 项目-场景-禁用/启用
|
|
@ -1,6 +1,6 @@
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 查询项目租户关系列表
|
// 查询项目用户关系列表
|
||||||
export function listProject_tenant(query) {
|
export function listProject_tenant(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/iot/project_tenant/list',
|
url: '/iot/project_tenant/list',
|
||||||
|
@ -9,7 +9,7 @@ export function listProject_tenant(query) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询项目租户关系详细
|
// 查询项目用户关系详细
|
||||||
export function getProject_tenant(projectId) {
|
export function getProject_tenant(projectId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/iot/project_tenant/' + projectId,
|
url: '/iot/project_tenant/' + projectId,
|
||||||
|
@ -17,7 +17,7 @@ export function getProject_tenant(projectId) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增项目租户关系
|
// 新增项目用户关系
|
||||||
export function addProject_tenant(data) {
|
export function addProject_tenant(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/iot/project_tenant',
|
url: '/iot/project_tenant',
|
||||||
|
@ -26,7 +26,7 @@ export function addProject_tenant(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改项目租户关系
|
// 修改项目用户关系
|
||||||
export function updateProject_tenant(data) {
|
export function updateProject_tenant(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/iot/project_tenant',
|
url: '/iot/project_tenant',
|
||||||
|
@ -35,7 +35,7 @@ export function updateProject_tenant(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除项目租户关系
|
// 删除项目用户关系
|
||||||
export function delProject_tenant(projectId, tenantId) {
|
export function delProject_tenant(projectId, tenantId) {
|
||||||
let reqUrl = tenantId ? '/' + tenantId : ''
|
let reqUrl = tenantId ? '/' + tenantId : ''
|
||||||
return request({
|
return request({
|
||||||
|
@ -44,7 +44,7 @@ export function delProject_tenant(projectId, tenantId) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出项目租户关系
|
// 导出项目用户关系
|
||||||
export function exportProject_tenant(query) {
|
export function exportProject_tenant(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/iot/project_tenant/export',
|
url: '/iot/project_tenant/export',
|
||||||
|
@ -53,7 +53,7 @@ export function exportProject_tenant(query) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询没有被绑定的租户
|
// 查询没有被绑定的用户
|
||||||
export function listUserdByProjectId(query) {
|
export function listUserdByProjectId(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/iot/project_tenant/not-used',
|
url: '/iot/project_tenant/not-used',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 查询项目租户关系详细
|
// 查询项目用户关系详细
|
||||||
export function getOneselfInfo(deviceKey) {
|
export function getOneselfInfo(deviceKey) {
|
||||||
return request({
|
return request({
|
||||||
url: '/iot/device/' + deviceKey,
|
url: '/iot/device/' + deviceKey,
|
||||||
|
|
|
@ -62,7 +62,7 @@ export function exportMaintenance(query) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 获取租户下用户
|
// 获取用户下用户
|
||||||
export function getTenantHandleUser(query) {
|
export function getTenantHandleUser(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/list',
|
url: '/system/user/list',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
import { preventRepeatFu } from "@/utils/hciot";
|
import { preventRepeatFu } from "@/utils/hciot";
|
||||||
|
|
||||||
// 查询租户设置列表
|
// 查询用户设置列表
|
||||||
export function listConfig(query) {
|
export function listConfig(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/tconfig/list',
|
url: '/system/tconfig/list',
|
||||||
|
@ -10,7 +10,7 @@ export function listConfig(query) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询租户设置详细
|
// 查询用户设置详细
|
||||||
export function getConfig(configId) {
|
export function getConfig(configId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/tconfig/' + configId,
|
url: '/system/tconfig/' + configId,
|
||||||
|
@ -18,7 +18,7 @@ export function getConfig(configId) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增租户设置
|
// 新增用户设置
|
||||||
export function addConfig(data) {
|
export function addConfig(data) {
|
||||||
preventRepeatFu(true)
|
preventRepeatFu(true)
|
||||||
return request({
|
return request({
|
||||||
|
@ -28,7 +28,7 @@ export function addConfig(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改租户设置
|
// 修改用户设置
|
||||||
export function updateConfig(data) {
|
export function updateConfig(data) {
|
||||||
preventRepeatFu(true)
|
preventRepeatFu(true)
|
||||||
return request({
|
return request({
|
||||||
|
@ -38,7 +38,7 @@ export function updateConfig(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除租户设置
|
// 删除用户设置
|
||||||
export function delConfig(configId) {
|
export function delConfig(configId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/tconfig/' + configId,
|
url: '/system/tconfig/' + configId,
|
||||||
|
@ -46,7 +46,7 @@ export function delConfig(configId) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询租户设置列表map
|
// 查询用户设置列表map
|
||||||
export function mlistConfig(query) {
|
export function mlistConfig(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/tconfig/mlist',
|
url: '/system/tconfig/mlist',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
import { preventRepeatFu } from "@/utils/hciot";
|
import { preventRepeatFu } from "@/utils/hciot";
|
||||||
|
|
||||||
// 查询企业租户列表
|
// 查询企业用户列表
|
||||||
export function listTenant(query) {
|
export function listTenant(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/tenant/list',
|
url: '/system/tenant/list',
|
||||||
|
@ -10,7 +10,7 @@ export function listTenant(query) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询企业租户详细
|
// 查询企业用户详细
|
||||||
export function getTenant(tenantId) {
|
export function getTenant(tenantId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/tenant/' + tenantId,
|
url: '/system/tenant/' + tenantId,
|
||||||
|
@ -18,7 +18,7 @@ export function getTenant(tenantId) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增企业租户
|
// 新增企业用户
|
||||||
export function addTenant(data) {
|
export function addTenant(data) {
|
||||||
preventRepeatFu(true)
|
preventRepeatFu(true)
|
||||||
return request({
|
return request({
|
||||||
|
@ -28,7 +28,7 @@ export function addTenant(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改企业租户
|
// 修改企业用户
|
||||||
export function updateTenant(data) {
|
export function updateTenant(data) {
|
||||||
preventRepeatFu(true)
|
preventRepeatFu(true)
|
||||||
return request({
|
return request({
|
||||||
|
@ -38,7 +38,7 @@ export function updateTenant(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除企业租户
|
// 删除企业用户
|
||||||
export function delTenant(tenantId) {
|
export function delTenant(tenantId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/tenant/' + tenantId,
|
url: '/system/tenant/' + tenantId,
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
&.has-logo {
|
&.has-logo {
|
||||||
.el-scrollbar {
|
.el-scrollbar {
|
||||||
height: calc(100% - 50px);
|
height: calc(100% - 90px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container dialog-bit">
|
<div class="app-container dialog-bit">
|
||||||
<el-dialog class="eldialog-wrap-t" @close="close" :title="title" :close-on-click-modal="false" :visible.sync="visible" :width="width">
|
<el-dialog class="eldialog-wrap-t" @close="close" :title="title" :close-on-click-modal="false" append-to-body :visible.sync="visible" :width="width">
|
||||||
<slot name="dialog-center"></slot>
|
<slot name="dialog-center"></slot>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<slot name="dialog-footer"></slot>
|
<slot name="dialog-footer"></slot>
|
||||||
|
@ -59,4 +59,26 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.eldialog-wrap-t {
|
||||||
|
.el-dialog__header {
|
||||||
|
border-bottom: 1px solid #747373;
|
||||||
|
}
|
||||||
|
.el-dialog__body {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
.el-dialog__footer {
|
||||||
|
height: 60px;
|
||||||
|
border-top: 1px solid #747373;
|
||||||
|
text-align: right;
|
||||||
|
width: 100%;
|
||||||
|
padding: 0px;
|
||||||
|
padding-top: 15px;
|
||||||
|
.el-button + .el-button {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.el-button {
|
||||||
|
padding-top: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
import EDialogTableInput from './src/main'
|
||||||
|
|
||||||
|
/* istanbul ignore next */
|
||||||
|
EDialogTableInput.install = function(Vue) {
|
||||||
|
Vue.component(EDialogTableInput.name, EDialogTableInput);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default EDialogTableInput;
|
||||||
|
|
|
@ -0,0 +1,216 @@
|
||||||
|
<template>
|
||||||
|
<div class="e-dialog-table-select">
|
||||||
|
<div @click="openTableSelectDialog">
|
||||||
|
<el-input
|
||||||
|
:placeholder="'点击选择' + title"
|
||||||
|
v-model="value"
|
||||||
|
class="input-with-select"
|
||||||
|
:clearable="pclearable"
|
||||||
|
:size="psize"
|
||||||
|
suffix-icon="el-icon-caret-bottom"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<el-dialog
|
||||||
|
:title="'请选择__' + title"
|
||||||
|
:visible.sync="selectTableShow"
|
||||||
|
width="75%"
|
||||||
|
top="10vh"
|
||||||
|
class="select-table-dialog"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<e-dynamic-table
|
||||||
|
v-if="selectTableShow"
|
||||||
|
:tableOption="table.tableOption"
|
||||||
|
:queryOption="table.queryOption"
|
||||||
|
:otherOption="table.otherOption"
|
||||||
|
:refurbishFun="refurbishFun"
|
||||||
|
:response="response"
|
||||||
|
@returnEvent="returnEvent($event)"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button size="mini" v-show="selectResult !== null" type="primary" @click="resuleClick"
|
||||||
|
>确 定</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
@click="
|
||||||
|
() => {
|
||||||
|
selectTableShow = false;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
>取 消</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import EDynamicTable from '@/components/EDynamicTable'
|
||||||
|
export default {
|
||||||
|
name: "EDialogTableInput",
|
||||||
|
components: {
|
||||||
|
EDynamicTable
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
table: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {
|
||||||
|
otherOption: {
|
||||||
|
tableType: "site",
|
||||||
|
},
|
||||||
|
queryOption: {
|
||||||
|
disable: false,
|
||||||
|
labelWidth: "68px",
|
||||||
|
params: {
|
||||||
|
},
|
||||||
|
inline: true,
|
||||||
|
queryChilds: [],
|
||||||
|
},
|
||||||
|
tableOption: {
|
||||||
|
loading: false,
|
||||||
|
rowKey: "prodId",
|
||||||
|
selection: false,
|
||||||
|
maxHeight: "45vh",
|
||||||
|
childs: [],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: "选择",
|
||||||
|
},
|
||||||
|
pclearable: {
|
||||||
|
type: [Boolean, String],
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
psize: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
localKey: {
|
||||||
|
type: String,
|
||||||
|
default: "ZF_RECENT_KEY",
|
||||||
|
},
|
||||||
|
param: {
|
||||||
|
type: Object,
|
||||||
|
},
|
||||||
|
fileName: {
|
||||||
|
type: String,
|
||||||
|
require: true
|
||||||
|
},
|
||||||
|
showFileName: {
|
||||||
|
type: String,
|
||||||
|
require: true
|
||||||
|
},
|
||||||
|
refurbishFun: {
|
||||||
|
type: Function,
|
||||||
|
require: true,
|
||||||
|
},
|
||||||
|
preference: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
response: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {
|
||||||
|
total: "total",
|
||||||
|
data: "rows",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
selectResult: null,
|
||||||
|
tempForm: {},
|
||||||
|
statValue: '',
|
||||||
|
selectTableShow: false,
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created(){
|
||||||
|
if (this.preference) {
|
||||||
|
this.handlePreference();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
value() {
|
||||||
|
if(!this.value) {
|
||||||
|
if (this.preference) {
|
||||||
|
this.handlePreference();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 执行 查询列表并且首选
|
||||||
|
handlePreference() {
|
||||||
|
this.refurbishFun({ pageSize: 1, pageNum: 1 }).then(res => {
|
||||||
|
let resData = res[this.response.data];
|
||||||
|
if (resData && resData.length > 0) {
|
||||||
|
var result = this.fileNameResult(resData[0]);
|
||||||
|
this.handleEvent(result);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 抛回去原有数据操作
|
||||||
|
handleEvent(result) {
|
||||||
|
this.$emit("input", result[this.showFileName] || '');
|
||||||
|
this.$emit('change', result);
|
||||||
|
this.selectResult = null;
|
||||||
|
},
|
||||||
|
// 开启 筛选表格
|
||||||
|
openTableSelectDialog() {
|
||||||
|
this.selectResult = null;
|
||||||
|
this.selectTableShow = true;
|
||||||
|
},
|
||||||
|
// 点击或者双击数据回调
|
||||||
|
returnEvent(data) {
|
||||||
|
this.selectResult = null;
|
||||||
|
if (data.type === "dblclick") {
|
||||||
|
var result = this.fileNameResult(data.value);
|
||||||
|
this.selectTableShow = false;
|
||||||
|
this.handleEvent(result);
|
||||||
|
} else if (data.type === "click") {
|
||||||
|
this.selectResult = data.value;
|
||||||
|
this.selectResult.tableType = data.otherOption.tableType;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 根据 fileName 获取反馈数据;
|
||||||
|
fileNameResult(row) {
|
||||||
|
if (this.fileName) {
|
||||||
|
let fileArray = this.fileName.split(',');
|
||||||
|
var result = {};
|
||||||
|
|
||||||
|
fileArray.forEach(v => {
|
||||||
|
result[v] = row[v];
|
||||||
|
});
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 点击确定按钮
|
||||||
|
resuleClick() {
|
||||||
|
var result = this.fileNameResult(this.selectResult);
|
||||||
|
this.selectTableShow = false;
|
||||||
|
this.handleEvent(result);
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.e-dialog-table-select {
|
||||||
|
.el-dialog__body {
|
||||||
|
padding: 10px 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
|
@ -0,0 +1,7 @@
|
||||||
|
import EDynamicTable from './src/main'
|
||||||
|
|
||||||
|
EDynamicTable.install = function (Vue) {
|
||||||
|
Vue.component(EDynamicTable.name, EDynamicTable)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default EDynamicTable;
|
|
@ -0,0 +1,169 @@
|
||||||
|
<!-- 动态表格改进 1.0.1 2022-10-18-->
|
||||||
|
<!--
|
||||||
|
改动内容:
|
||||||
|
1. 去掉 外部控制 getList;
|
||||||
|
2. 添加 表格条件 重置 按钮;
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col v-if="queryOption.disable === false" :span="20" :xs="24">
|
||||||
|
<el-form
|
||||||
|
:model="queryOption.params"
|
||||||
|
ref="queryForm"
|
||||||
|
:inline="queryOption.inline"
|
||||||
|
:label-width="
|
||||||
|
queryOption.labelWidth ? queryOption.labelWidth : '100px'
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
v-for="item in queryOption.queryChilds"
|
||||||
|
:key="item.key"
|
||||||
|
:label="item.label"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-if="!item.type || item.type === 'input'"
|
||||||
|
v-model="queryOption.params[item.key]"
|
||||||
|
:placeholder="item.placeholder || ''"
|
||||||
|
:clearable="item.clearable"
|
||||||
|
:size="item.size || 'small'"
|
||||||
|
:style="item.style || ''"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-select
|
||||||
|
v-if="item.type === 'select'"
|
||||||
|
v-model="queryOption.params[item.key]"
|
||||||
|
:clearable="item.clearable"
|
||||||
|
:placeholder="item.placeholder"
|
||||||
|
:size="item.size || 'small'"
|
||||||
|
:style="item.style || ''"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="items in item.options"
|
||||||
|
:key="items[item.optionKey.key]"
|
||||||
|
:label="items[item.optionKey.label]"
|
||||||
|
:value="items[item.optionKey.value]"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> -->
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="tableLoading"
|
||||||
|
:data="tableList"
|
||||||
|
class="select-table"
|
||||||
|
:height="tableOption.maxHeight"
|
||||||
|
:highlight-pageNum-row="true"
|
||||||
|
default-expand-all
|
||||||
|
highlight-current-row
|
||||||
|
:tree-props="tableOption.treeProps"
|
||||||
|
:row-key="tableOption.rowKey"
|
||||||
|
@row-click="row_clicks"
|
||||||
|
@row-dblclick="rowDblclick"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
type="index"
|
||||||
|
label="序号"
|
||||||
|
align="center"
|
||||||
|
:index="indexFormatter"
|
||||||
|
width="80px"
|
||||||
|
></el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
v-if="tableOption.selection === true"
|
||||||
|
type="selection"
|
||||||
|
width="50"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
v-for="(item, index) in tableOption.childs"
|
||||||
|
:key="index"
|
||||||
|
:type="item.type"
|
||||||
|
:width="item.width"
|
||||||
|
:align="item.align"
|
||||||
|
:label="item.label"
|
||||||
|
:prop="item.prop"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope" v-if="item.tempType !== ''">
|
||||||
|
<el-switch
|
||||||
|
v-if="item.tempType === 'switch'"
|
||||||
|
v-model="scope.row[item.prop]"
|
||||||
|
:active-value="item.option['active-value']"
|
||||||
|
:inactive-value="item.option['inactive-value']"
|
||||||
|
:disable="item.option.disable"
|
||||||
|
></el-switch>
|
||||||
|
|
||||||
|
<span v-else-if="item.tempType === 'span'">{{
|
||||||
|
scope.row[item.prop]
|
||||||
|
}}</span>
|
||||||
|
|
||||||
|
<svg-icon
|
||||||
|
v-else-if="item.tempType === 'icon'"
|
||||||
|
:icon-class="scope.row[item.prop]"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<span v-else-if="item.tempType === 'time'">{{
|
||||||
|
parseTime(new Date(scope.row[item.prop]))
|
||||||
|
}}</span>
|
||||||
|
|
||||||
|
<span
|
||||||
|
v-else-if="item.tempType === 'text1'"
|
||||||
|
v-html="scope.row[item.prop] === '0' ? '正常' : '禁用'"
|
||||||
|
></span>
|
||||||
|
|
||||||
|
<span v-else-if="item.tempType === 'strType'">
|
||||||
|
{{ item.option[scope.row[item.prop]] }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import TableMixins from "./mixins/TableMixins";
|
||||||
|
export default {
|
||||||
|
mixins: [TableMixins],
|
||||||
|
name: 'EDynamicTable',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
orderByColumn: "createTime",
|
||||||
|
isAsc: "desc",
|
||||||
|
},
|
||||||
|
tableList: [],
|
||||||
|
tableLoading: false,
|
||||||
|
total: 0,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -0,0 +1,147 @@
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
otherOption: {
|
||||||
|
type: Object,
|
||||||
|
default: {},
|
||||||
|
},
|
||||||
|
queryOption: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {
|
||||||
|
disable: false,
|
||||||
|
params: {},
|
||||||
|
inline: true,
|
||||||
|
queryChilds: [
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
placeholder: "请输入用户名称",
|
||||||
|
clearable: true,
|
||||||
|
label: "用户名称",
|
||||||
|
type: "input",
|
||||||
|
key: "userName",
|
||||||
|
size: "small",
|
||||||
|
value: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
tableOption: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
treeProps: "{ children: 'children', hasChildren: 'hasChildren'}",
|
||||||
|
rowKey: "deptId",
|
||||||
|
selection: true,
|
||||||
|
maxHeight: "45vh",
|
||||||
|
childs: [
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "",
|
||||||
|
type: "selection",
|
||||||
|
prop: "userName",
|
||||||
|
align: "center",
|
||||||
|
width: "50",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "用户编号",
|
||||||
|
type: "",
|
||||||
|
prop: "userName",
|
||||||
|
align: "center",
|
||||||
|
width: "50",
|
||||||
|
"show-overflow-tooltip": true,
|
||||||
|
tempType: "",
|
||||||
|
option: {
|
||||||
|
"active-value": "0",
|
||||||
|
"inactive-value": "1",
|
||||||
|
disable: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
option: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
refurbishFun: {
|
||||||
|
type: Function,
|
||||||
|
},
|
||||||
|
response: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {
|
||||||
|
total: "total",
|
||||||
|
data: "rows",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 表格排序
|
||||||
|
indexFormatter(val) {
|
||||||
|
return (
|
||||||
|
val + 1 + (this.queryParams.pageNum - 1) * this.queryParams.pageSize
|
||||||
|
);
|
||||||
|
},
|
||||||
|
// 获取数据
|
||||||
|
getList() {
|
||||||
|
this.tableLoading = true;
|
||||||
|
this.refurbishFun(
|
||||||
|
Object.assign(this.queryParams, this.queryOption.params)
|
||||||
|
).then((res) => {
|
||||||
|
this.tableList = res[this.response.data] || [];
|
||||||
|
this.total = res[this.response.total] || 0;
|
||||||
|
this.tableLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.$emit("returnEvent", {
|
||||||
|
value: selection,
|
||||||
|
type: "select",
|
||||||
|
otherOption: this.otherOption,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
if (
|
||||||
|
this.queryOption["queryChilds"] &&
|
||||||
|
this.queryOption["queryChilds"].length > 0
|
||||||
|
) {
|
||||||
|
this.queryOption["queryChilds"].forEach((v) => {
|
||||||
|
this.queryOption.params[v] = "";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 表格 点击一行做的事情
|
||||||
|
row_clicks(row) {
|
||||||
|
this.$emit("returnEvent", {
|
||||||
|
value: row,
|
||||||
|
type: "click",
|
||||||
|
otherOption: this.otherOption,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
rowDblclick(row) {
|
||||||
|
this.$emit("returnEvent", {
|
||||||
|
value: row,
|
||||||
|
type: "dblclick",
|
||||||
|
otherOption: this.otherOption,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
|
@ -0,0 +1,48 @@
|
||||||
|
<template>
|
||||||
|
<div class="e-logout" @click="handleLogout">
|
||||||
|
{{ title }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "Logout",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: "退出登录",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async handleLogout() {
|
||||||
|
this.$confirm("确定注销并退出系统吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
}).then(() => {
|
||||||
|
this.$store.dispatch("LogOut").then(() => {
|
||||||
|
location.href = "/index";
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.e-logout {
|
||||||
|
width: 100%;
|
||||||
|
height: 35px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #ffffff00;
|
||||||
|
z-index: 100;
|
||||||
|
color: #bfcbd9;
|
||||||
|
font-size: 16px;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
.e-logout:hover {
|
||||||
|
background-color: #00e7ff;
|
||||||
|
border: 1px solid #00e7ff;
|
||||||
|
box-shadow: 0px 0px 5px 1px #00e7ff;
|
||||||
|
color: #0953a9;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -24,6 +24,7 @@
|
||||||
/>
|
/>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<logout />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -32,9 +33,10 @@ import { mapGetters, mapState } from "vuex";
|
||||||
import Logo from "./Logo";
|
import Logo from "./Logo";
|
||||||
import SidebarItem from "./SidebarItem";
|
import SidebarItem from "./SidebarItem";
|
||||||
import variables from "@/assets/styles/variables.scss";
|
import variables from "@/assets/styles/variables.scss";
|
||||||
|
import Logout from './Logout'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { SidebarItem, Logo },
|
components: { SidebarItem, Logo, Logout },
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["settings"]),
|
...mapState(["settings"]),
|
||||||
...mapGetters(["sidebarRouters", "sidebar"]),
|
...mapGetters(["sidebarRouters", "sidebar"]),
|
||||||
|
|
|
@ -28,7 +28,6 @@ const permission = {
|
||||||
GetAttribute({ commit }) {
|
GetAttribute({ commit }) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
// 向后端请求路由数据
|
// 向后端请求路由数据
|
||||||
console.log('請求--GetAttribute')
|
|
||||||
getAttributeConfig().then(res => {
|
getAttributeConfig().then(res => {
|
||||||
commit('SET_ATTRIBUTE', res.data)
|
commit('SET_ATTRIBUTE', res.data)
|
||||||
})
|
})
|
||||||
|
@ -38,7 +37,7 @@ const permission = {
|
||||||
SetAttributeByKey({ commit, state }, params) {
|
SetAttributeByKey({ commit, state }, params) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
// 向后端请求路由数据
|
// 向后端请求路由数据
|
||||||
console.log('請求--GetAttribute')
|
console.log('eeee---', Object.assign(state.attribute, params));
|
||||||
commit('SET_ATTRIBUTE', Object.assign(state.attribute, params))
|
commit('SET_ATTRIBUTE', Object.assign(state.attribute, params))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<div class="main-block">
|
<div class="main-block">
|
||||||
<e-head
|
<e-head
|
||||||
ref="mainHead"
|
ref="mainHead"
|
||||||
:handelTile="title"
|
:handelTile="attributeBigTitle"
|
||||||
:projectList="projectList"
|
:projectList="projectList"
|
||||||
@eventFullscreen="eventFullscreen"
|
@eventFullscreen="eventFullscreen"
|
||||||
@eventProjectId="eventProjectId"
|
@eventProjectId="eventProjectId"
|
||||||
|
@ -121,7 +121,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 0; height: 0;">
|
<div style="width: 0; height: 0">
|
||||||
<notification-alarm></notification-alarm>
|
<notification-alarm></notification-alarm>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -139,7 +139,7 @@ import MapWrapPersonal from "./profile/personalCenter";
|
||||||
import { bigWebSocketUrl } from "@/config/env";
|
import { bigWebSocketUrl } from "@/config/env";
|
||||||
import Cookies from "js-cookie";
|
import Cookies from "js-cookie";
|
||||||
import EProjectCensusTemp from "./profile/EProjectCensusTemp";
|
import EProjectCensusTemp from "./profile/EProjectCensusTemp";
|
||||||
import NotificationAlarm from './profile/NotificationAlarm';
|
import NotificationAlarm from "./profile/NotificationAlarm";
|
||||||
|
|
||||||
import { getWarningAnalysis, homeCount, bigScreenProjectList } from "@/api/app";
|
import { getWarningAnalysis, homeCount, bigScreenProjectList } from "@/api/app";
|
||||||
import {
|
import {
|
||||||
|
@ -171,7 +171,7 @@ export default {
|
||||||
projectList: [],
|
projectList: [],
|
||||||
projectId: null,
|
projectId: null,
|
||||||
regionalismId: null,
|
regionalismId: null,
|
||||||
regionalismLabel: '',
|
regionalismLabel: "",
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
thisScrollTopY: 0,
|
thisScrollTopY: 0,
|
||||||
userLoginType: "",
|
userLoginType: "",
|
||||||
|
@ -200,24 +200,31 @@ export default {
|
||||||
this.resize_window();
|
this.resize_window();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
attributeBigTitle() {
|
||||||
|
return this.$store.getters.attributeInfo["bigTitle"] || this.title;
|
||||||
|
},
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// $route(to, from) {
|
// $route(to, from) {
|
||||||
// if (from.fullPath === "/index") {
|
// if (from.fullPath === "/index") {
|
||||||
// document.getElementById("con_lf_top_div").style.background = "#fff";
|
// document.getElementById("con_lf_top_div").style.background = "#fff";
|
||||||
// document.getElementById("con_lf_top_div").style.height =
|
// document.getElementById("con_lf_top_div").style.height =
|
||||||
// "calc(100vh - 84px)";
|
// "calc(100vh - 84px)";
|
||||||
// document.getElementById("con_lf_top_div").style.minHeight =
|
// document.getElementById("con_lf_top_div").style.minHeight =
|
||||||
// "calc(100vh - 84px)";
|
// "calc(100vh - 84px)";
|
||||||
// } else if (to.fullPath === "/index") {
|
// } else if (to.fullPath === "/index") {
|
||||||
// document.getElementById("con_lf_top_div").style.background = "#010e45";
|
// document.getElementById("con_lf_top_div").style.background = "#010e45";
|
||||||
// document.getElementById("con_lf_top_div").style.height =
|
// document.getElementById("con_lf_top_div").style.height =
|
||||||
// "calc(100vh - 84px)";
|
// "calc(100vh - 84px)";
|
||||||
// document.getElementById("con_lf_top_div").style.minHeight =
|
// document.getElementById("con_lf_top_div").style.minHeight =
|
||||||
// "calc(100vh - 84px)";
|
// "calc(100vh - 84px)";
|
||||||
// }
|
// }
|
||||||
|
// this.title = this.$store.getters.attributeInfo['bigTitle'] || '智慧能源综合管理系统';
|
||||||
// },
|
// },
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
// this.title = this.$store.getters.attributeInfo['bigTitle'] || '智慧能源综合管理系统';
|
||||||
document.getElementById("app").style.background = "#010e45";
|
document.getElementById("app").style.background = "#010e45";
|
||||||
this.getProjectList();
|
this.getProjectList();
|
||||||
this.warningAnalysisList();
|
this.warningAnalysisList();
|
||||||
|
@ -247,13 +254,14 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getGuid() {
|
getGuid() {
|
||||||
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
|
||||||
c
|
/[xy]/g,
|
||||||
) {
|
function (c) {
|
||||||
var r = (Math.random() * 16) | 0,
|
var r = (Math.random() * 16) | 0,
|
||||||
v = c == "x" ? r : (r & 0x3) | 0x8;
|
v = c == "x" ? r : (r & 0x3) | 0x8;
|
||||||
return v.toString(16);
|
return v.toString(16);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
},
|
},
|
||||||
// 创建一个ws 监听获取报警实时数据
|
// 创建一个ws 监听获取报警实时数据
|
||||||
connection() {
|
connection() {
|
||||||
|
@ -264,7 +272,9 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.stompClient = new WebSocket(
|
this.stompClient = new WebSocket(
|
||||||
`${bigWebSocketUrl}/${this.getGuid()}/${this.$store.getters.userId}/${this.projectId || -1}`
|
`${bigWebSocketUrl}/${this.getGuid()}/${this.$store.getters.userId}/${
|
||||||
|
this.projectId || -1
|
||||||
|
}`
|
||||||
);
|
);
|
||||||
this.stompClient.onmessage = this.socket_onmsg;
|
this.stompClient.onmessage = this.socket_onmsg;
|
||||||
this.stompClient.onclose = this.socket_onclose;
|
this.stompClient.onclose = this.socket_onclose;
|
||||||
|
@ -341,7 +351,7 @@ export default {
|
||||||
if (this.$store.getters.userType !== "PERSONAL") {
|
if (this.$store.getters.userType !== "PERSONAL") {
|
||||||
bigScreenProjectList({
|
bigScreenProjectList({
|
||||||
// regionalismId: this.regionalismId,
|
// regionalismId: this.regionalismId,
|
||||||
projectAddress: this.regionalismLabel
|
projectAddress: this.regionalismLabel,
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
this.projectList = response.data;
|
this.projectList = response.data;
|
||||||
});
|
});
|
||||||
|
@ -377,7 +387,7 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
this.closeWebscoket()
|
this.closeWebscoket();
|
||||||
document.getElementById("app").style.background = "#fff";
|
document.getElementById("app").style.background = "#fff";
|
||||||
document.getElementById("con_lf_top_div").style.background = "#fff";
|
document.getElementById("con_lf_top_div").style.background = "#fff";
|
||||||
document.getElementById("con_lf_top_div").style.overflow = "auto";
|
document.getElementById("con_lf_top_div").style.overflow = "auto";
|
||||||
|
@ -460,4 +470,3 @@ export default {
|
||||||
margin-left: -960px;
|
margin-left: -960px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
@ -1,98 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="dashboard-editor-container">
|
|
||||||
|
|
||||||
<panel-group @handleSetLineChartData="handleSetLineChartData" />
|
|
||||||
|
|
||||||
<el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
|
|
||||||
<line-chart :chart-data="lineChartData" />
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row :gutter="32">
|
|
||||||
<el-col :xs="24" :sm="24" :lg="8">
|
|
||||||
<div class="chart-wrapper">
|
|
||||||
<raddar-chart />
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :xs="24" :sm="24" :lg="8">
|
|
||||||
<div class="chart-wrapper">
|
|
||||||
<pie-chart />
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :xs="24" :sm="24" :lg="8">
|
|
||||||
<div class="chart-wrapper">
|
|
||||||
<bar-chart />
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import PanelGroup from './dashboard/PanelGroup'
|
|
||||||
import LineChart from './dashboard/LineChart'
|
|
||||||
import RaddarChart from './dashboard/RaddarChart'
|
|
||||||
import PieChart from './dashboard/PieChart'
|
|
||||||
import BarChart from './dashboard/BarChart'
|
|
||||||
|
|
||||||
const lineChartData = {
|
|
||||||
newVisitis: {
|
|
||||||
expectedData: [100, 120, 161, 134, 105, 160, 165],
|
|
||||||
actualData: [120, 82, 91, 154, 162, 140, 145]
|
|
||||||
},
|
|
||||||
messages: {
|
|
||||||
expectedData: [200, 192, 120, 144, 160, 130, 140],
|
|
||||||
actualData: [180, 160, 151, 106, 145, 150, 130]
|
|
||||||
},
|
|
||||||
purchases: {
|
|
||||||
expectedData: [80, 100, 121, 104, 105, 90, 100],
|
|
||||||
actualData: [120, 90, 100, 138, 142, 130, 130]
|
|
||||||
},
|
|
||||||
shoppings: {
|
|
||||||
expectedData: [130, 140, 141, 142, 145, 150, 160],
|
|
||||||
actualData: [120, 82, 91, 154, 162, 140, 130]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'Index',
|
|
||||||
components: {
|
|
||||||
PanelGroup,
|
|
||||||
LineChart,
|
|
||||||
RaddarChart,
|
|
||||||
PieChart,
|
|
||||||
BarChart
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
lineChartData: lineChartData.newVisitis
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
handleSetLineChartData(type) {
|
|
||||||
this.lineChartData = lineChartData[type]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.dashboard-editor-container {
|
|
||||||
padding: 32px;
|
|
||||||
background-color: rgb(240, 242, 245);
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.chart-wrapper {
|
|
||||||
background: #fff;
|
|
||||||
padding: 16px 16px 0;
|
|
||||||
margin-bottom: 32px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width:1024px) {
|
|
||||||
.chart-wrapper {
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,169 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="app-container tenant-home">
|
|
||||||
主页暂未开发
|
|
||||||
<!-- <div class="top-wrap">
|
|
||||||
<div v-for="(doctTop, index) in topOption" :Key="index">
|
|
||||||
<div class="icon-wrap">
|
|
||||||
<img :src="doctTop.leftImg" class="top-img" alt="dark" />
|
|
||||||
<span :class="'jg-span ' + doctTop.spanClass"></span>
|
|
||||||
</div>
|
|
||||||
<div class="info-block">
|
|
||||||
<span>{{doctTop.title}}</span>
|
|
||||||
<div class="info-wrap" :style="{'color': doctTop.valueColor}">{{topValue[doctTop.value]}}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="beas-wrap">
|
|
||||||
<div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
// import './rhea.js'
|
|
||||||
// var container = require('./rhea.js');
|
|
||||||
// var container = require('rhea');
|
|
||||||
export default {
|
|
||||||
name: "tenantHome",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
topValue: {
|
|
||||||
farstValue: 158,
|
|
||||||
twoValue: 5,
|
|
||||||
threeValue: 159,
|
|
||||||
lastVlaue: 1158
|
|
||||||
},
|
|
||||||
topOption: [
|
|
||||||
{
|
|
||||||
leftImg: "/images/quickStart_icon_subuserCounts.992898a.png",
|
|
||||||
spanClass: "span-bg1",
|
|
||||||
valueColor: "#b176e9",
|
|
||||||
value: "farstValue",
|
|
||||||
title: "注册用户"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
leftImg: "/images/quickStart_icon_subuserCounts.992898a.png",
|
|
||||||
spanClass: "span-bg1",
|
|
||||||
valueColor: "#b176e9",
|
|
||||||
value: "twoValue",
|
|
||||||
title: "项目总数"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
leftImg: "/images/quickStart_icon_subuserCounts.992898a.png",
|
|
||||||
spanClass: "span-bg1",
|
|
||||||
valueColor: "#b176e9",
|
|
||||||
value: "threeValue",
|
|
||||||
title: "设备总数"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
leftImg: "/images/quickStart_icon_subuserCounts.992898a.png",
|
|
||||||
spanClass: "span-bg1",
|
|
||||||
valueColor: "#b176e9",
|
|
||||||
value: "lastVlaue",
|
|
||||||
title: "告警总数"
|
|
||||||
}
|
|
||||||
// {
|
|
||||||
// leftImg: "/images/quickStart_icon_subuserCounts.992898a.png",
|
|
||||||
// spanClass: "span-bg1",
|
|
||||||
// valueColor: "#b176e9",
|
|
||||||
// value: "lastVlaue",
|
|
||||||
// title: "注册用户 (单位: 人)"
|
|
||||||
// }
|
|
||||||
]
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created(){
|
|
||||||
// console.log(container)
|
|
||||||
// var connection = container['__proto__'].websocket_connect({'host':'192.168.18.134','port':5672,'username':'admin','password':'fd2018'});
|
|
||||||
// console.log(connection)
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style lang="scss">
|
|
||||||
.tenant-home {
|
|
||||||
.top-wrap {
|
|
||||||
width: calc(100%);
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
> div {
|
|
||||||
width: calc((100% - 60px) / 4);
|
|
||||||
height: 120px;
|
|
||||||
display: flex;
|
|
||||||
padding: 10px 10px;
|
|
||||||
color: #f7f7f7;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-around;
|
|
||||||
box-shadow: 0px 0px 5px #a5a4a4;
|
|
||||||
.icon-wrap {
|
|
||||||
width: 35%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
align-items: center;
|
|
||||||
.top-img {
|
|
||||||
width: 55%;
|
|
||||||
height: 60%;
|
|
||||||
}
|
|
||||||
.jg-span {
|
|
||||||
display: block;
|
|
||||||
width: 3px;
|
|
||||||
background: #c7c3c3;
|
|
||||||
height: 70px;
|
|
||||||
margin: 0 10px;
|
|
||||||
background: -webkit-linear-gradient(
|
|
||||||
bottom,
|
|
||||||
#2196f36e,
|
|
||||||
#b176e9 50%,
|
|
||||||
#2196f36e
|
|
||||||
);
|
|
||||||
}
|
|
||||||
.span-bg1 {
|
|
||||||
background: -webkit-linear-gradient(
|
|
||||||
bottom,
|
|
||||||
#2196f36e,
|
|
||||||
#b176e9 50%,
|
|
||||||
#2196f36e
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.info-block {
|
|
||||||
width: calc(100% - 35%);
|
|
||||||
display: flex;
|
|
||||||
-ms-flex-wrap: wrap;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
height: 75%;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: left;
|
|
||||||
.info-wrap {
|
|
||||||
color: #b176e9;
|
|
||||||
font-size: 1.5vw;
|
|
||||||
width: 100%;
|
|
||||||
height: 70%;
|
|
||||||
align-items: center;
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
> span {
|
|
||||||
color: #9c9c9c;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
height: 20px;
|
|
||||||
text-align: left;
|
|
||||||
padding-right: 10px;
|
|
||||||
position: relative;
|
|
||||||
top: 0px;
|
|
||||||
left: -6px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
> div:hover{
|
|
||||||
box-shadow: 0px 0px 5px #4db8f7;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.beas-wrap {
|
|
||||||
height: calc((100vh - 260px));
|
|
||||||
width: 100%;
|
|
||||||
border: 1px solid red;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,6 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container alarm-type">
|
<div class="app-container alarm-type">
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
:inline="true"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
<el-form-item label="类型名称" prop="typeName">
|
<el-form-item label="类型名称" prop="typeName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.typeName"
|
v-model="queryParams.typeName"
|
||||||
|
@ -14,7 +19,7 @@
|
||||||
<el-form-item label="设备类型" prop="deviceType">
|
<el-form-item label="设备类型" prop="deviceType">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.deviceType"
|
v-model="queryParams.deviceType"
|
||||||
style="width: 100%;"
|
style="width: 100%"
|
||||||
clearable
|
clearable
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="请输入报警设备类型"
|
placeholder="请输入报警设备类型"
|
||||||
|
@ -32,7 +37,7 @@
|
||||||
<el-form-item label="报警划分" prop="alarmDivide">
|
<el-form-item label="报警划分" prop="alarmDivide">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.alarmDivide"
|
v-model="queryParams.alarmDivide"
|
||||||
style="width: 100%;"
|
style="width: 100%"
|
||||||
clearable
|
clearable
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="请输入报警设备类型"
|
placeholder="请输入报警设备类型"
|
||||||
|
@ -48,8 +53,16 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
@ -61,7 +74,8 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['iot:type:add']"
|
v-hasPermi="['iot:type:add']"
|
||||||
>新增</el-button>
|
>新增</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -81,7 +95,8 @@
|
||||||
:disabled="multiple"
|
:disabled="multiple"
|
||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
v-hasPermi="['iot:type:remove']"
|
v-hasPermi="['iot:type:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -102,7 +117,12 @@
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<!-- <el-table-column label="编码" align="left" sortable="custom" prop="typeCode" /> -->
|
<!-- <el-table-column label="编码" align="left" sortable="custom" prop="typeCode" /> -->
|
||||||
<el-table-column label="名称" align="left" sortable="custom" prop="typeName" />
|
<el-table-column
|
||||||
|
label="名称"
|
||||||
|
align="left"
|
||||||
|
sortable="custom"
|
||||||
|
prop="typeName"
|
||||||
|
/>
|
||||||
<el-table-column label="设备类型" align="center" prop="deviceTypeName" />
|
<el-table-column label="设备类型" align="center" prop="deviceTypeName" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="报警划分"
|
label="报警划分"
|
||||||
|
@ -113,11 +133,18 @@
|
||||||
/>
|
/>
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.status === '0' || scope.row.status === 0">启用</span>
|
<span v-if="scope.row.status === '0' || scope.row.status === 0"
|
||||||
|
>启用</span
|
||||||
|
>
|
||||||
<span v-else>停用</span>
|
<span v-else>停用</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="200" align="center" class-name="small-padding fixed-width">
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
width="200"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
|
@ -126,7 +153,8 @@
|
||||||
v-if="scope.row.tenantId === tenantId"
|
v-if="scope.row.tenantId === tenantId"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['iot:type:edit']"
|
v-hasPermi="['iot:type:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
|
@ -134,13 +162,14 @@
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-if="scope.row.tenantId === tenantId"
|
v-if="scope.row.tenantId === tenantId"
|
||||||
v-hasPermi="['iot:type:remove']"
|
v-hasPermi="['iot:type:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total > 0"
|
||||||
:total="total"
|
:total="total"
|
||||||
:page.sync="queryParams.pageNum"
|
:page.sync="queryParams.pageNum"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@ -148,14 +177,21 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改告警类型对话框 -->
|
<!-- 添加或修改告警类型对话框 -->
|
||||||
<el-dialog
|
<dialog-template
|
||||||
class="eldialog-wrap"
|
class="eldialog-wrap"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:title="title"
|
:title="title"
|
||||||
:visible.sync="open"
|
:visible="open"
|
||||||
width="500px"
|
width="500px"
|
||||||
|
@close="open = false"
|
||||||
>
|
>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
slot="dialog-center"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="80px"
|
||||||
|
>
|
||||||
<el-form-item label="名称" prop="typeName">
|
<el-form-item label="名称" prop="typeName">
|
||||||
<el-input v-model="form.typeName" placeholder="请输入报警类型名称" />
|
<el-input v-model="form.typeName" placeholder="请输入报警类型名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -171,7 +207,7 @@
|
||||||
<el-form-item label="设备类型" prop="deviceType">
|
<el-form-item label="设备类型" prop="deviceType">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.deviceType"
|
v-model="form.deviceType"
|
||||||
style="width: 100%;"
|
style="width: 100%"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入报警设备类型"
|
placeholder="请输入报警设备类型"
|
||||||
>
|
>
|
||||||
|
@ -187,7 +223,7 @@
|
||||||
<el-form-item label="联系人" prop="userId">
|
<el-form-item label="联系人" prop="userId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.userId"
|
v-model="form.userId"
|
||||||
style="width: 100%;"
|
style="width: 100%"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入联系人"
|
placeholder="请输入联系人"
|
||||||
>
|
>
|
||||||
|
@ -202,7 +238,12 @@
|
||||||
|
|
||||||
<el-form-item label="报警划分" prop="alarmDivide">
|
<el-form-item label="报警划分" prop="alarmDivide">
|
||||||
<el-radio-group v-model="form.alarmDivide">
|
<el-radio-group v-model="form.alarmDivide">
|
||||||
<el-radio :label="vals" v-for="(keys, vals) in alarmDivideType" :key="vals">{{keys}}</el-radio>
|
<el-radio
|
||||||
|
:label="vals"
|
||||||
|
v-for="(keys, vals) in alarmDivideType"
|
||||||
|
:key="vals"
|
||||||
|
>{{ keys }}</el-radio
|
||||||
|
>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
@ -216,11 +257,13 @@
|
||||||
></el-switch>
|
></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="dialog-footer" class="dialog-footer">
|
||||||
<el-button size="mini" type="primary" @click="submitForm">确 定</el-button>
|
<el-button size="mini" type="primary" @click="submitForm"
|
||||||
|
>确 定</el-button
|
||||||
|
>
|
||||||
<el-button size="mini" @click="cancel">取 消</el-button>
|
<el-button size="mini" @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</dialog-template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -230,17 +273,19 @@ import {
|
||||||
getAlarmType,
|
getAlarmType,
|
||||||
delAlarmType,
|
delAlarmType,
|
||||||
addAlarmType,
|
addAlarmType,
|
||||||
updateAlarmType
|
updateAlarmType,
|
||||||
} from "@/api/alarm/alarmType";
|
} from "@/api/alarm/alarmType";
|
||||||
import { listDeviceTypeList } from "@/api/iot/device";
|
import { listDeviceTypeList } from "@/api/iot/device";
|
||||||
import { listUser } from "@/api/system/user";
|
import { listUser } from "@/api/system/user";
|
||||||
|
import DialogTemplate from "@/components/DialogTemplate/index";
|
||||||
// import { selectedProdmodel } from "@/api/device/prodmodel";
|
// import { selectedProdmodel } from "@/api/device/prodmodel";
|
||||||
const alarmDivideType = {
|
const alarmDivideType = {
|
||||||
ALARM: "报警",
|
ALARM: "报警",
|
||||||
WARNING: "预警"
|
WARNING: "预警",
|
||||||
};
|
};
|
||||||
export default {
|
export default {
|
||||||
name: "AlarmType",
|
name: "AlarmType",
|
||||||
|
components: { DialogTemplate },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
alarmDivideType,
|
alarmDivideType,
|
||||||
|
@ -268,33 +313,33 @@ export default {
|
||||||
typeName: undefined,
|
typeName: undefined,
|
||||||
tag: undefined,
|
tag: undefined,
|
||||||
deviceType: "",
|
deviceType: "",
|
||||||
alarmDivide: '',
|
alarmDivide: "",
|
||||||
orderByColumn: "",
|
orderByColumn: "",
|
||||||
isAsc: "desc"
|
isAsc: "desc",
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
typeName: [
|
typeName: [
|
||||||
{ required: true, message: "类型名称不能为空", trigger: "blur" }
|
{ required: true, message: "类型名称不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
tag: [{ required: true, message: "告警标签不能为空", trigger: "blur" }]
|
tag: [{ required: true, message: "告警标签不能为空", trigger: "blur" }],
|
||||||
},
|
},
|
||||||
tenantId: "",
|
tenantId: "",
|
||||||
deviceTypeList: [],
|
deviceTypeList: [],
|
||||||
userList: []
|
userList: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.tenantId = this.$store.getters.tenantId;
|
this.tenantId = this.$store.getters.tenantId;
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getUserList()
|
this.getUserList();
|
||||||
this.getDeviceTypeList();
|
this.getDeviceTypeList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getUserList() {
|
getUserList() {
|
||||||
listUser().then(response => {
|
listUser().then((response) => {
|
||||||
this.userList = response.rows;
|
this.userList = response.rows;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -308,14 +353,14 @@ export default {
|
||||||
},
|
},
|
||||||
// 查询设备类型列表
|
// 查询设备类型列表
|
||||||
getDeviceTypeList() {
|
getDeviceTypeList() {
|
||||||
listDeviceTypeList().then(response => {
|
listDeviceTypeList().then((response) => {
|
||||||
this.deviceTypeList = response.data;
|
this.deviceTypeList = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
sortChange(column) {
|
sortChange(column) {
|
||||||
const sort = {
|
const sort = {
|
||||||
isAsc: column.order === "descending" ? "desc" : "asc",
|
isAsc: column.order === "descending" ? "desc" : "asc",
|
||||||
orderByColumn: column.prop
|
orderByColumn: column.prop,
|
||||||
};
|
};
|
||||||
this.queryParams = Object.assign(this.queryParams, sort);
|
this.queryParams = Object.assign(this.queryParams, sort);
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
|
@ -329,7 +374,7 @@ export default {
|
||||||
/** 查询告警类型列表 */
|
/** 查询告警类型列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listAlarmType(this.queryParams).then(response => {
|
listAlarmType(this.queryParams).then((response) => {
|
||||||
this.alarmTypeList = response.rows;
|
this.alarmTypeList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -348,7 +393,7 @@ export default {
|
||||||
typeName: undefined,
|
typeName: undefined,
|
||||||
alarmDivide: "ALARM",
|
alarmDivide: "ALARM",
|
||||||
status: "1",
|
status: "1",
|
||||||
tag: ""
|
tag: "",
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
@ -364,7 +409,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.typeId);
|
this.ids = selection.map((item) => item.typeId);
|
||||||
this.single = selection.length != 1;
|
this.single = selection.length != 1;
|
||||||
this.multiple = !selection.length;
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
|
@ -380,7 +425,7 @@ export default {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.getDeviceTypeList();
|
this.getDeviceTypeList();
|
||||||
const typeId = row.typeId || this.ids;
|
const typeId = row.typeId || this.ids;
|
||||||
getAlarmType(typeId).then(response => {
|
getAlarmType(typeId).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.form.status = response.data.status.toString();
|
this.form.status = response.data.status.toString();
|
||||||
|
@ -388,11 +433,11 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function() {
|
submitForm: function () {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.typeId != undefined) {
|
if (this.form.typeId != undefined) {
|
||||||
updateAlarmType(this.form).then(response => {
|
updateAlarmType(this.form).then((response) => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.msgSuccess("修改成功");
|
this.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
@ -400,7 +445,7 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addAlarmType(this.form).then(response => {
|
addAlarmType(this.form).then((response) => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.msgSuccess("新增成功");
|
this.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
@ -421,29 +466,29 @@ export default {
|
||||||
{
|
{
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(function() {
|
.then(function () {
|
||||||
return delAlarmType(typeIds);
|
return delAlarmType(typeIds);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.msgSuccess("删除成功");
|
||||||
})
|
})
|
||||||
.catch(function() {});
|
.catch(function () {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download(
|
this.download(
|
||||||
"iot/alarmType/export",
|
"iot/alarmType/export",
|
||||||
{
|
{
|
||||||
...this.queryParams
|
...this.queryParams,
|
||||||
},
|
},
|
||||||
`iot_alarmType.xlsx`
|
`iot_alarmType.xlsx`
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
|
@ -160,7 +160,7 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 添加或修改联系人对话框 -->
|
<!-- 添加或修改联系人对话框 -->
|
||||||
<el-dialog class="eldialog-wrap" :close-on-click-modal="false" title="授权扫二维码" :visible.sync="qrCodeDialogOpen" width="650px">
|
<el-dialog class="eldialog-wrap" :close-on-click-modal="false" title="授权扫二维码" :visible.sync="qrCodeDialogOpen" width="650px">
|
||||||
<div class="qrcode-wrap" v-if="qrCodeDialogOpen">
|
<div class="qrcode-wrap" v-if="qrCodeDialogOpen">
|
||||||
<div class="qr-wrap">
|
<div class="qr-wrap">
|
||||||
<img src="@/assets/images/gzhqr.jpg"/>
|
<img src="@/assets/images/gzhqr.jpg"/>
|
||||||
|
|
|
@ -250,6 +250,7 @@
|
||||||
:visible.sync="upload.open"
|
:visible.sync="upload.open"
|
||||||
width="400px"
|
width="400px"
|
||||||
append-to-body
|
append-to-body
|
||||||
|
:close-on-click-modal="false"
|
||||||
>
|
>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="批次" prop="batchId">
|
<el-form-item label="批次" prop="batchId">
|
||||||
|
|
|
@ -125,8 +125,13 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改项目对话框 -->
|
<!-- 添加或修改项目对话框 -->
|
||||||
<el-dialog class="eldialog-wrap" :close-on-click-modal="false" :title="title" :visible.sync="open" width="720px">
|
<dialog-template :title="title" :visible="open" @close="open = false"
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
class="eldialog-wrap"
|
||||||
|
|
||||||
|
width="720px"
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px" slot="dialog-center">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="项目名称:" prop="projectName">
|
<el-form-item label="项目名称:" prop="projectName">
|
||||||
|
@ -263,11 +268,13 @@
|
||||||
<el-input v-model="form.projectDeviceName" suffix-icon="el-icon-caret-bottom" @focus="openTableSelectDialog()" placeholder="请输入总路设备" />
|
<el-input v-model="form.projectDeviceName" suffix-icon="el-icon-caret-bottom" @focus="openTableSelectDialog()" placeholder="请输入总路设备" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="dialog-footer" class="dialog-footer">
|
||||||
<el-button size="mini" type="primary" @click="submitForm">确 定</el-button>
|
<el-button size="mini" type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button size="mini" @click="cancel">取 消</el-button>
|
<el-button size="mini" @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</dialog-template>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
|
@ -322,6 +329,7 @@ import DetailsWrap from "./profile/details";
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
import SelectTableWrap from "@/components/SelectTable/index";
|
import SelectTableWrap from "@/components/SelectTable/index";
|
||||||
|
import DialogTemplate from "@/components/DialogTemplate/index";
|
||||||
|
|
||||||
/////、、、、、、、、、、、、、、、、、、、、
|
/////、、、、、、、、、、、、、、、、、、、、
|
||||||
import DetailsWrapNew from './profileV2/details'
|
import DetailsWrapNew from './profileV2/details'
|
||||||
|
@ -333,7 +341,8 @@ export default {
|
||||||
Treeselect,
|
Treeselect,
|
||||||
DetailsWrap,
|
DetailsWrap,
|
||||||
SelectTableWrap,
|
SelectTableWrap,
|
||||||
DetailsWrapNew
|
DetailsWrapNew,
|
||||||
|
DialogTemplate
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -407,7 +416,8 @@ export default {
|
||||||
// 行政划分树选项
|
// 行政划分树选项
|
||||||
regionalismOption: [],
|
regionalismOption: [],
|
||||||
componectVal: "",
|
componectVal: "",
|
||||||
sourceId: ""
|
sourceId: "",
|
||||||
|
userType: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<info-wrap v-if="activeName === 'info'" :infoData="infoData" />
|
<info-wrap v-if="activeName === 'info'" :infoData="infoData" />
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="项目租户" name="tenant">
|
<el-tab-pane label="项目用户" name="tenant">
|
||||||
<div class="tabs-body">
|
<div class="tabs-body">
|
||||||
<tenant-wrap v-if="activeName === 'tenant'" :infoData="infoData" />
|
<tenant-wrap v-if="activeName === 'tenant'" :infoData="infoData" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改空间设备对话框 -->
|
<!-- 添加或修改空间设备对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px"></el-form>
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"></el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button size="mini" type="primary" @click="submitForm">确 定</el-button>
|
<el-button size="mini" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>解除租户</el-button>
|
>解除用户</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改项目租户关系对话框 -->
|
<!-- 添加或修改项目用户关系对话框 -->
|
||||||
<!-- <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>
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"></el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
</el-dialog> -->
|
</el-dialog> -->
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="选择租户"
|
title="选择用户"
|
||||||
:visible.sync="selectTableShow"
|
:visible.sync="selectTableShow"
|
||||||
width="50%"
|
width="50%"
|
||||||
top="10vh"
|
top="10vh"
|
||||||
|
@ -119,7 +119,7 @@ export default {
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 项目租户关系表格数据
|
// 项目用户关系表格数据
|
||||||
project_tenantList: [],
|
project_tenantList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
|
@ -136,7 +136,7 @@ export default {
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {},
|
rules: {},
|
||||||
// 租户状态
|
// 用户状态
|
||||||
statusOptions: [],
|
statusOptions: [],
|
||||||
tenantTypeOptions: []
|
tenantTypeOptions: []
|
||||||
};
|
};
|
||||||
|
@ -268,7 +268,7 @@ export default {
|
||||||
this.form.tenantId = data.value.tenantId;
|
this.form.tenantId = data.value.tenantId;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 租户状态字典翻译
|
// 用户状态字典翻译
|
||||||
statusFormat(row, column) {
|
statusFormat(row, column) {
|
||||||
var rulesStr = "";
|
var rulesStr = "";
|
||||||
this.statusOptions.forEach(v => {
|
this.statusOptions.forEach(v => {
|
||||||
|
@ -287,7 +287,7 @@ export default {
|
||||||
});
|
});
|
||||||
return rulesStr;
|
return rulesStr;
|
||||||
},
|
},
|
||||||
/** 查询项目租户关系列表 */
|
/** 查询项目用户关系列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.queryParams.projectId = this.infoData.projectId;
|
this.queryParams.projectId = this.infoData.projectId;
|
||||||
|
@ -338,7 +338,7 @@ export default {
|
||||||
getProject_tenant(projectId).then(response => {
|
getProject_tenant(projectId).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改项目租户关系";
|
this.title = "修改项目用户关系";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
|
@ -369,7 +369,7 @@ export default {
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
this.$confirm("是否确认导出所有项目租户关系数据项?", "警告", {
|
this.$confirm("是否确认导出所有项目用户关系数据项?", "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
|
|
|
@ -4,9 +4,11 @@
|
||||||
<el-tab-pane label="项目信息" name="info">
|
<el-tab-pane label="项目信息" name="info">
|
||||||
<e-object-info v-if="activeName === 'info'" :infoData="projectInfo || {}" :projectTypeOptions="projectTypeOptions"></e-object-info>
|
<e-object-info v-if="activeName === 'info'" :infoData="projectInfo || {}" :projectTypeOptions="projectTypeOptions"></e-object-info>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="租户" name="tenant">
|
|
||||||
|
<el-tab-pane label="用户" name="tenant" v-if="isShowUserTable">
|
||||||
<e-object-tenant v-if="activeName === 'tenant'" :infoData="projectInfo || {}"/>
|
<e-object-tenant v-if="activeName === 'tenant'" :infoData="projectInfo || {}"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="空间" name="space">
|
<el-tab-pane label="空间" name="space">
|
||||||
<e-object-space v-if="activeName === 'space'" :infoData="projectInfo || {}"/>
|
<e-object-space v-if="activeName === 'space'" :infoData="projectInfo || {}"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
@ -33,6 +35,11 @@ export default {
|
||||||
type: Array
|
type: Array
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
isShowUserTable() {
|
||||||
|
return this.$store.getters.userType === 'SYSTEM';
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeName: 'info'
|
activeName: 'info'
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
<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>
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" v-hasPermi="['project:space:add']" @click="handleAdd">新增</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>
|
||||||
|
@ -65,13 +65,15 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
|
v-hasPermi="['project:space:device']"
|
||||||
@click="handleDetails(scope.row)"
|
@click="handleDetails(scope.row)"
|
||||||
>空间设备</el-button>
|
>空间设备</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
<el-button size="mini" type="text" icon="el-icon-edit" v-hasPermi="['project:space:edit']" @click="handleUpdate(scope.row)">修改</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
|
v-hasPermi="['project:space:remove']"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<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>
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['project:device:add']" >新增</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>
|
||||||
|
@ -27,6 +27,7 @@
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
v-if="scope.row.deviceType !== 'MINIATURE_BREAKER'"
|
v-if="scope.row.deviceType !== 'MINIATURE_BREAKER'"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['project:device:relieve']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -41,7 +42,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改空间设备对话框 -->
|
<!-- 添加或修改空间设备对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false" >
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px"></el-form>
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"></el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button size="mini" type="primary" @click="submitForm">确 定</el-button>
|
<el-button size="mini" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
|
|
@ -7,23 +7,43 @@
|
||||||
plain
|
plain
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
|
v-hasPermi="['project:tenant:add']"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
|
>新增</el-button
|
||||||
>新增</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="project_tenantList" :default-sort="{prop: 'expirationTime', order: 'descending'}"
|
<el-table
|
||||||
@sort-change="sortChange">
|
v-loading="loading"
|
||||||
<el-table-column type="index" label="序号" align="center" :index="indexFormatter" width="80px"></el-table-column>
|
:data="project_tenantList"
|
||||||
|
:default-sort="{ prop: 'expirationTime', order: 'descending' }"
|
||||||
|
@sort-change="sortChange"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
type="index"
|
||||||
|
label="序号"
|
||||||
|
align="center"
|
||||||
|
:index="indexFormatter"
|
||||||
|
width="80px"
|
||||||
|
></el-table-column>
|
||||||
<el-table-column label="企业名称" align="center" prop="tenantName" />
|
<el-table-column label="企业名称" align="center" prop="tenantName" />
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-text="scope.row.status === '0' ? '正常' : '停用'"></span>
|
<span v-text="scope.row.status === '0' ? '正常' : '停用'"></span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="有效期" align="center" sortable="custom" prop="expirationTime" width="160" />
|
<el-table-column
|
||||||
|
label="有效期"
|
||||||
|
align="center"
|
||||||
|
sortable="custom"
|
||||||
|
prop="expirationTime"
|
||||||
|
width="160"
|
||||||
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作"
|
label="操作"
|
||||||
align="center"
|
align="center"
|
||||||
|
@ -35,21 +55,23 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
|
v-hasPermi="['project:tenant:relieve']"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>解除租户</el-button>
|
>解除用户</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total > 0"
|
||||||
:total="total"
|
:total="total"
|
||||||
:page.sync="queryParams.pageNum"
|
:page.sync="queryParams.pageNum"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改项目租户关系对话框 -->
|
<!-- 添加或修改项目用户关系对话框 -->
|
||||||
<!-- <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>
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"></el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
|
@ -59,7 +81,7 @@
|
||||||
</el-dialog> -->
|
</el-dialog> -->
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="选择租户"
|
title="选择用户"
|
||||||
:visible.sync="selectTableShow"
|
:visible.sync="selectTableShow"
|
||||||
width="50%"
|
width="50%"
|
||||||
top="10vh"
|
top="10vh"
|
||||||
|
@ -78,8 +100,18 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button size="mini" type="primary" @click="submitForm">确 定</el-button>
|
<el-button size="mini" type="primary" @click="submitForm"
|
||||||
<el-button size="mini" @click="() =>{selectTableShow = false}">取 消</el-button>
|
>确 定</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
@click="
|
||||||
|
() => {
|
||||||
|
selectTableShow = false;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
>取 消</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
@ -91,15 +123,14 @@ import {
|
||||||
getProject_tenant,
|
getProject_tenant,
|
||||||
delProject_tenant,
|
delProject_tenant,
|
||||||
addProject_tenant,
|
addProject_tenant,
|
||||||
updateProject_tenant,
|
|
||||||
exportProject_tenant,
|
exportProject_tenant,
|
||||||
listUserdByProjectId
|
listUserdByProjectId,
|
||||||
} from "@/api/iot/projectTenant";
|
} from "@/api/iot/projectTenant";
|
||||||
import SelectTableWrap from "@/components/SelectTable/index";
|
import SelectTableWrap from "@/components/SelectTable/index";
|
||||||
export default {
|
export default {
|
||||||
name: "EObjectTenant",
|
name: "EObjectTenant",
|
||||||
components: {
|
components: {
|
||||||
SelectTableWrap
|
SelectTableWrap,
|
||||||
},
|
},
|
||||||
props: ["infoData"],
|
props: ["infoData"],
|
||||||
data() {
|
data() {
|
||||||
|
@ -119,7 +150,7 @@ export default {
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 项目租户关系表格数据
|
// 项目用户关系表格数据
|
||||||
project_tenantList: [],
|
project_tenantList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
|
@ -130,33 +161,33 @@ export default {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
orderByColumn: "expirationTime",
|
orderByColumn: "expirationTime",
|
||||||
isAsc: "desc"
|
isAsc: "desc",
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {},
|
rules: {},
|
||||||
// 租户状态
|
// 用户状态
|
||||||
statusOptions: [],
|
statusOptions: [],
|
||||||
tenantTypeOptions: []
|
tenantTypeOptions: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
infoData: {
|
infoData: {
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
this.getList()
|
this.getList();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deep:true, // 深度监听
|
deep: true, // 深度监听
|
||||||
immediate: false, // 初始化监听
|
immediate: false, // 初始化监听
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getDicts("sys_tenant_type").then(response => {
|
this.getDicts("sys_tenant_type").then((response) => {
|
||||||
this.tenantTypeOptions = response.data;
|
this.tenantTypeOptions = response.data;
|
||||||
});
|
});
|
||||||
this.getDicts("sys_normal_disable").then(response => {
|
this.getDicts("sys_normal_disable").then((response) => {
|
||||||
this.statusOptions = response.data;
|
this.statusOptions = response.data;
|
||||||
});
|
});
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -164,8 +195,8 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
sortChange(column) {
|
sortChange(column) {
|
||||||
const sort = {
|
const sort = {
|
||||||
isAsc: column.order === "descending" ? "desc" : "asc",
|
isAsc: column.order === "descending" ? "desc" : "asc",
|
||||||
orderByColumn: column.prop
|
orderByColumn: column.prop,
|
||||||
};
|
};
|
||||||
this.queryParams = Object.assign(this.queryParams, sort);
|
this.queryParams = Object.assign(this.queryParams, sort);
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
|
@ -180,19 +211,19 @@ export default {
|
||||||
this.selectResult = {};
|
this.selectResult = {};
|
||||||
this.tableSelectOption = {
|
this.tableSelectOption = {
|
||||||
otherOption: {
|
otherOption: {
|
||||||
tableType: "device"
|
tableType: "device",
|
||||||
},
|
},
|
||||||
queryOpt: {
|
queryOpt: {
|
||||||
disable: false,
|
disable: false,
|
||||||
labelWidth: "68px",
|
labelWidth: "68px",
|
||||||
params: {
|
params: {
|
||||||
projectId: this.infoData.projectId,
|
projectId: this.infoData.projectId,
|
||||||
tenantName: ""
|
tenantName: "",
|
||||||
},
|
},
|
||||||
page: {
|
page: {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
total: 0
|
total: 0,
|
||||||
},
|
},
|
||||||
inline: true,
|
inline: true,
|
||||||
queryChilds: [
|
queryChilds: [
|
||||||
|
@ -204,9 +235,9 @@ export default {
|
||||||
type: "input",
|
type: "input",
|
||||||
key: "tenantName",
|
key: "tenantName",
|
||||||
size: "small",
|
size: "small",
|
||||||
value: ""
|
value: "",
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
tableOpt: {
|
tableOpt: {
|
||||||
loading: false,
|
loading: false,
|
||||||
|
@ -222,7 +253,7 @@ export default {
|
||||||
align: "left",
|
align: "left",
|
||||||
width: "",
|
width: "",
|
||||||
"show-overflow-tooltip": false,
|
"show-overflow-tooltip": false,
|
||||||
tempType: "span"
|
tempType: "span",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
style: "",
|
style: "",
|
||||||
|
@ -232,7 +263,7 @@ export default {
|
||||||
align: "left",
|
align: "left",
|
||||||
width: "",
|
width: "",
|
||||||
"show-overflow-tooltip": false,
|
"show-overflow-tooltip": false,
|
||||||
tempType: "span"
|
tempType: "span",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
style: "",
|
style: "",
|
||||||
|
@ -242,7 +273,7 @@ export default {
|
||||||
align: "left",
|
align: "left",
|
||||||
width: "",
|
width: "",
|
||||||
"show-overflow-tooltip": false,
|
"show-overflow-tooltip": false,
|
||||||
tempType: "text1"
|
tempType: "text1",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
style: "",
|
style: "",
|
||||||
|
@ -252,20 +283,20 @@ export default {
|
||||||
align: "center",
|
align: "center",
|
||||||
width: "180",
|
width: "180",
|
||||||
"show-overflow-tooltip": false,
|
"show-overflow-tooltip": false,
|
||||||
tempType: "span"
|
tempType: "span",
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
tableList: {
|
tableList: {
|
||||||
type: Array
|
type: Array,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
tableList: []
|
tableList: [],
|
||||||
};
|
};
|
||||||
this.selectTableShow = true;
|
this.selectTableShow = true;
|
||||||
},
|
},
|
||||||
childGetList(data) {
|
childGetList(data) {
|
||||||
listUserdByProjectId(Object.assign(data.page, data.param)).then(
|
listUserdByProjectId(Object.assign(data.page, data.param)).then(
|
||||||
response => {
|
(response) => {
|
||||||
this.tableSelectOption.tableList = response.rows;
|
this.tableSelectOption.tableList = response.rows;
|
||||||
this.tableSelectOption.queryOpt.page.total = Number(response.total);
|
this.tableSelectOption.queryOpt.page.total = Number(response.total);
|
||||||
}
|
}
|
||||||
|
@ -279,10 +310,10 @@ export default {
|
||||||
this.form.tenantId = data.value.tenantId;
|
this.form.tenantId = data.value.tenantId;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 租户状态字典翻译
|
// 用户状态字典翻译
|
||||||
statusFormat(row, column) {
|
statusFormat(row, column) {
|
||||||
var rulesStr = "";
|
var rulesStr = "";
|
||||||
this.statusOptions.forEach(v => {
|
this.statusOptions.forEach((v) => {
|
||||||
if (v.dictValue === row.status) {
|
if (v.dictValue === row.status) {
|
||||||
rulesStr = v.dictLabel;
|
rulesStr = v.dictLabel;
|
||||||
}
|
}
|
||||||
|
@ -291,18 +322,18 @@ export default {
|
||||||
},
|
},
|
||||||
tenantTypeFormat(row, column) {
|
tenantTypeFormat(row, column) {
|
||||||
var rulesStr = "";
|
var rulesStr = "";
|
||||||
this.tenantTypeOptions.forEach(v => {
|
this.tenantTypeOptions.forEach((v) => {
|
||||||
if (v.dictValue === row.status) {
|
if (v.dictValue === row.status) {
|
||||||
rulesStr = v.dictLabel;
|
rulesStr = v.dictLabel;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return rulesStr;
|
return rulesStr;
|
||||||
},
|
},
|
||||||
/** 查询项目租户关系列表 */
|
/** 查询项目用户关系列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.queryParams.projectId = this.infoData.projectId;
|
this.queryParams.projectId = this.infoData.projectId;
|
||||||
listProject_tenant(this.queryParams).then(response => {
|
listProject_tenant(this.queryParams).then((response) => {
|
||||||
this.project_tenantList = response.rows;
|
this.project_tenantList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -317,7 +348,7 @@ export default {
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
projectId: this.infoData.projectId,
|
projectId: this.infoData.projectId,
|
||||||
tenantId: null
|
tenantId: null,
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
@ -333,7 +364,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.projectId);
|
this.ids = selection.map((item) => item.projectId);
|
||||||
this.single = selection.length !== 1;
|
this.single = selection.length !== 1;
|
||||||
this.multiple = !selection.length;
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
|
@ -346,22 +377,27 @@ export default {
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const projectId = row.projectId || this.ids;
|
const projectId = row.projectId || this.ids;
|
||||||
getProject_tenant(projectId).then(response => {
|
getProject_tenant(projectId).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改项目租户关系";
|
this.title = "修改项目用户关系";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
if ((this.form.tenantId !== null && this.form.tenantId !==undefined) && (this.form.projectId !== null && this.form.projectId !==undefined)) {
|
if (
|
||||||
addProject_tenant(this.form).then(response => {
|
this.form.tenantId !== null &&
|
||||||
|
this.form.tenantId !== undefined &&
|
||||||
|
this.form.projectId !== null &&
|
||||||
|
this.form.projectId !== undefined
|
||||||
|
) {
|
||||||
|
addProject_tenant(this.form).then((response) => {
|
||||||
this.msgSuccess("新增成功");
|
this.msgSuccess("新增成功");
|
||||||
this.selectTableShow = false;
|
this.selectTableShow = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('没有选择任何数据!');
|
this.$message.error("没有选择任何数据!");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
|
@ -371,9 +407,9 @@ export default {
|
||||||
this.$confirm("是否删除该选项?", "警告", {
|
this.$confirm("是否删除该选项?", "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(function() {
|
.then(function () {
|
||||||
return delProject_tenant(projectIds, tenantId);
|
return delProject_tenant(projectIds, tenantId);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
@ -384,18 +420,18 @@ export default {
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
this.$confirm("是否确认导出所有项目租户关系数据项?", "警告", {
|
this.$confirm("是否确认导出所有项目用户关系数据项?", "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(function() {
|
.then(function () {
|
||||||
return exportProject_tenant(queryParams);
|
return exportProject_tenant(queryParams);
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then((response) => {
|
||||||
this.download(response.msg);
|
this.download(response.msg);
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['project:price:add']"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -97,14 +98,14 @@
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['iot:contract:edit']"
|
v-hasPermi="['project:price:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['iot:contract:remove']"
|
v-hasPermi="['project:price:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
@ -151,7 +151,7 @@ export default {
|
||||||
this.form.maxVal = this.form.minVal + 1;
|
this.form.maxVal = this.form.minVal + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();0
|
||||||
},
|
},
|
||||||
reultEventFu() {
|
reultEventFu() {
|
||||||
this.$emit("resultEvent", { result: this.form, index: this.tempIndex });
|
this.$emit("resultEvent", { result: this.form, index: this.tempIndex });
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['project:scene:add']"
|
||||||
>新增</el-button
|
>新增</el-button
|
||||||
>
|
>
|
||||||
<el-button @click="handleQuery" size="mini">刷新</el-button>
|
<el-button @click="handleQuery" size="mini">刷新</el-button>
|
||||||
|
@ -98,6 +99,7 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
|
v-hasPermi="['project:scene:edit']"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
>编辑</el-button
|
>编辑</el-button
|
||||||
>
|
>
|
||||||
|
@ -106,6 +108,7 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
|
v-hasPermi="['project:scene:remove']"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
|
@ -118,6 +121,7 @@
|
||||||
? 'el-icon-open'
|
? 'el-icon-open'
|
||||||
: 'el-icon-turn-off'
|
: 'el-icon-turn-off'
|
||||||
"
|
"
|
||||||
|
v-hasPermi="['project:scene:status']"
|
||||||
@click="handleChangeStatus(scope.row)"
|
@click="handleChangeStatus(scope.row)"
|
||||||
>{{ scope.row.runStatus == "0" ? "停止" : "启用" }}</el-button
|
>{{ scope.row.runStatus == "0" ? "停止" : "启用" }}</el-button
|
||||||
>
|
>
|
||||||
|
@ -126,6 +130,7 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-video-play"
|
icon="el-icon-video-play"
|
||||||
|
v-hasPermi="['project:scene:run']"
|
||||||
@click="handleSingleRun(scope.row)"
|
@click="handleSingleRun(scope.row)"
|
||||||
>执行</el-button
|
>执行</el-button
|
||||||
>
|
>
|
||||||
|
|
|
@ -163,7 +163,7 @@
|
||||||
@pagination="getDeviceRecordTable"
|
@pagination="getDeviceRecordTable"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog append-to-body :title="dialogTitle" :visible="dialogOpen" width="800px" @close="() => { dialogOpen = false }">
|
<el-dialog append-to-body :title="dialogTitle" :close-on-click-modal="false" :visible="dialogOpen" width="800px" @close="() => { dialogOpen = false }">
|
||||||
<div style="height: 100%; width: 100%;">
|
<div style="height: 100%; width: 100%;">
|
||||||
<e-leakage-detail v-if="dialogOpen" :sourceId="sourceId" :tempType="tempType" :deviceId="deviceId"></e-leakage-detail>
|
<e-leakage-detail v-if="dialogOpen" :sourceId="sourceId" :tempType="tempType" :deviceId="deviceId"></e-leakage-detail>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改空间设备对话框 -->
|
<!-- 添加或修改空间设备对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px"></el-form>
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"></el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button size="mini" type="primary" @click="submitForm">确 定</el-button>
|
<el-button size="mini" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane> -->
|
</el-tab-pane> -->
|
||||||
|
|
||||||
<!-- <el-tab-pane label="项目租户" name="tenant">
|
<!-- <el-tab-pane label="项目用户" name="tenant">
|
||||||
<div class="tabs-body">
|
<div class="tabs-body">
|
||||||
<tenant-wrap v-if="activeName === 'tenant'" :infoData="infoData" />
|
<tenant-wrap v-if="activeName === 'tenant'" :infoData="infoData" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -447,7 +447,7 @@
|
||||||
|
|
||||||
<!-- <el-row :gutter="20">
|
<!-- <el-row :gutter="20">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="选择租户" prop="videoLat">
|
<el-form-item label="选择用户" prop="videoLat">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.tenantId"
|
v-model="form.tenantId"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
@ -513,6 +513,7 @@
|
||||||
:title="upload.title"
|
:title="upload.title"
|
||||||
:visible.sync="upload.open"
|
:visible.sync="upload.open"
|
||||||
width="400px"
|
width="400px"
|
||||||
|
:close-on-click-modal="false"
|
||||||
append-to-body
|
append-to-body
|
||||||
>
|
>
|
||||||
<el-upload
|
<el-upload
|
||||||
|
@ -714,7 +715,7 @@ export default {
|
||||||
this.queryParams.siteId = data[0].val;
|
this.queryParams.siteId = data[0].val;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
// 获取所有租户信息
|
// 获取所有用户信息
|
||||||
getTenantList() {
|
getTenantList() {
|
||||||
this.tenantList = [];
|
this.tenantList = [];
|
||||||
listTenant().then((response) => {
|
listTenant().then((response) => {
|
||||||
|
@ -1124,7 +1125,7 @@ export default {
|
||||||
this.title = "修改监控设备";
|
this.title = "修改监控设备";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 分配租户
|
// 分配用户
|
||||||
handleDistri(row) {
|
handleDistri(row) {
|
||||||
this.tempType = "distri";
|
this.tempType = "distri";
|
||||||
this.reset();
|
this.reset();
|
||||||
|
|
|
@ -138,7 +138,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改定时任务对话框 -->
|
<!-- 添加或修改定时任务对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
@ -216,7 +216,7 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 任务日志详细 -->
|
<!-- 任务日志详细 -->
|
||||||
<el-dialog title="任务详细" :visible.sync="openView" width="700px" append-to-body>
|
<el-dialog title="任务详细" :visible.sync="openView" width="700px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" label-width="120px" size="mini">
|
<el-form ref="form" :model="form" label-width="120px" size="mini">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|
|
@ -131,7 +131,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 调度日志详细 -->
|
<!-- 调度日志详细 -->
|
||||||
<el-dialog title="调度日志详细" :visible.sync="open" width="700px" append-to-body>
|
<el-dialog title="调度日志详细" :visible.sync="open" width="700px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" label-width="100px" size="mini">
|
<el-form ref="form" :model="form" label-width="100px" size="mini">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|
|
@ -143,7 +143,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 操作日志详细 -->
|
<!-- 操作日志详细 -->
|
||||||
<el-dialog title="操作日志详细" :visible.sync="open" width="700px" append-to-body>
|
<el-dialog title="操作日志详细" :visible.sync="open" width="700px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" label-width="100px" size="mini">
|
<el-form ref="form" :model="form" label-width="100px" size="mini">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|
|
@ -181,6 +181,7 @@
|
||||||
:visible.sync="open"
|
:visible.sync="open"
|
||||||
width="450px"
|
width="450px"
|
||||||
append-to-body
|
append-to-body
|
||||||
|
:close-on-click-modal="false"
|
||||||
>
|
>
|
||||||
<el-form>
|
<el-form>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
@ -214,6 +215,7 @@
|
||||||
title="工单审核"
|
title="工单审核"
|
||||||
:visible.sync="openDetails"
|
:visible.sync="openDetails"
|
||||||
width="700px"
|
width="700px"
|
||||||
|
:close-on-click-modal="false"
|
||||||
>
|
>
|
||||||
<power-details-wrap
|
<power-details-wrap
|
||||||
:maintenanceInfo="workDetails"
|
:maintenanceInfo="workDetails"
|
||||||
|
|
|
@ -369,6 +369,7 @@
|
||||||
@close="dialogCloes()"
|
@close="dialogCloes()"
|
||||||
:visible.sync="openDestail"
|
:visible.sync="openDestail"
|
||||||
width="800px"
|
width="800px"
|
||||||
|
:close-on-click-modal="false"
|
||||||
>
|
>
|
||||||
<div class="dialot-details">
|
<div class="dialot-details">
|
||||||
<details-wrap
|
<details-wrap
|
||||||
|
|
|
@ -604,7 +604,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-dialog :visible.sync="dialogVisible" append-to-body>
|
<el-dialog :visible.sync="dialogVisible" append-to-body :close-on-click-modal="false">
|
||||||
<img width="100%" :src="getIotFileUrl(dialogImageUrl)" alt />
|
<img width="100%" :src="getIotFileUrl(dialogImageUrl)" alt />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改功能定义对话框 -->
|
<!-- 添加或修改功能定义对话框 -->
|
||||||
<el-dialog class="eldialog-wrap" :title="title" :visible.sync="attributeopen" width="550px">
|
<el-dialog class="eldialog-wrap" :title="title" :visible.sync="attributeopen" width="550px" :close-on-click-modal="false">
|
||||||
<el-form
|
<el-form
|
||||||
ref="form"
|
ref="form"
|
||||||
style="padding: 20px 20px 0px 20px"
|
style="padding: 20px 20px 0px 20px"
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
<!-- 添加或修改分组集对话框 -->
|
<!-- 添加或修改分组集对话框 -->
|
||||||
<div class="eldialog-wrap">
|
<div class="eldialog-wrap">
|
||||||
<el-dialog :title="title" :visible.sync="open" width="650px">
|
<el-dialog :title="title" :visible.sync="open" width="650px" :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-form-item label="分组名称:" prop="cmdName">
|
<el-form-item label="分组名称:" prop="cmdName">
|
||||||
<el-input v-model="form.cmdName" placeholder="请输入名称" />
|
<el-input v-model="form.cmdName" placeholder="请输入名称" />
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 调度日志详细 -->
|
<!-- 调度日志详细 -->
|
||||||
<el-dialog title="调度日志详细" :visible.sync="open" width="700px" append-to-body>
|
<el-dialog title="调度日志详细" :visible.sync="open" width="700px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" label-width="100px" size="mini">
|
<el-form ref="form" :model="form" label-width="100px" size="mini">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改企业属性对话框 -->
|
<!-- 添加或修改企业属性对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" class="eldialog-wrap" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" class="eldialog-wrap" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="属性KEY" prop="enterpriseAttribute">
|
<el-form-item label="属性KEY" prop="enterpriseAttribute">
|
||||||
<el-input v-model="form.enterpriseAttribute" :disabled="form.recordId != null" placeholder="请输入属性KEY" />
|
<el-input v-model="form.enterpriseAttribute" :disabled="form.recordId != null" placeholder="请输入属性KEY" />
|
||||||
|
|
|
@ -146,7 +146,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改参数配置对话框 -->
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="参数名称" prop="configName">
|
<el-form-item label="参数名称" prop="configName">
|
||||||
<el-input v-model="form.configName" placeholder="请输入参数名称" />
|
<el-input v-model="form.configName" placeholder="请输入参数名称" />
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<!-- 添加或修改部门对话框 -->
|
<!-- 添加或修改部门对话框 -->
|
||||||
<el-dialog class="eldialog-wrap" :close-on-click-modal="false" :title="title" :visible.sync="open" width="600px">
|
<el-dialog class="eldialog-wrap" :close-on-click-modal="false" :title="title" :visible.sync="open" width="600px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24" v-if="form.parentId !== 0">
|
<el-col :span="24" v-if="form.parentId !== 0">
|
||||||
|
|
|
@ -135,7 +135,7 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 添加或修改行政划分对话框 -->
|
<!-- 添加或修改行政划分对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form-item label="上级行政区划" prop="parentId">
|
<el-form-item label="上级行政区划" prop="parentId">
|
||||||
|
|
|
@ -157,6 +157,7 @@
|
||||||
:visible.sync="open"
|
:visible.sync="open"
|
||||||
width="500px"
|
width="500px"
|
||||||
append-to-body
|
append-to-body
|
||||||
|
:close-on-click-modal="false"
|
||||||
>
|
>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-form-item label="角色名称:" prop="roleName">
|
<el-form-item label="角色名称:" prop="roleName">
|
||||||
|
@ -220,6 +221,7 @@
|
||||||
:visible.sync="openDataScope"
|
:visible.sync="openDataScope"
|
||||||
width="500px"
|
width="500px"
|
||||||
append-to-body
|
append-to-body
|
||||||
|
:close-on-click-modal="false"
|
||||||
>
|
>
|
||||||
<el-form :model="form" label-width="100px">
|
<el-form :model="form" label-width="100px">
|
||||||
<el-form-item label="角色名称:">
|
<el-form-item label="角色名称:">
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="租户状态" prop="status">
|
<el-form-item label="用户状态" prop="status">
|
||||||
<el-select v-model="queryParams.status" placeholder="用户状态" clearable size="small">
|
<el-select v-model="queryParams.status" placeholder="用户状态" clearable size="small">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in statusOptions"
|
v-for="dict in statusOptions"
|
||||||
|
@ -109,7 +109,7 @@
|
||||||
<el-table-column label="企业名称" align="center" sortable="custom" prop="tenantName" />
|
<el-table-column label="企业名称" align="center" sortable="custom" prop="tenantName" />
|
||||||
<el-table-column label="企业编码" align="center" sortable="custom" prop="tenantCode" />
|
<el-table-column label="企业编码" align="center" sortable="custom" prop="tenantCode" />
|
||||||
<el-table-column label="类型" align="center" prop="tenantType" :formatter="tenantTypeFormat" />
|
<el-table-column label="类型" align="center" prop="tenantType" :formatter="tenantTypeFormat" />
|
||||||
<el-table-column label="租户状态" align="center" :formatter="statusFormat" width="80" />
|
<el-table-column label="用户状态" align="center" :formatter="statusFormat" width="80" />
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="有效期"
|
label="有效期"
|
||||||
|
@ -138,7 +138,7 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改企业租户对话框 -->
|
<!-- 添加或修改企业用户对话框 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="title"
|
:title="title"
|
||||||
class="eldialog-wrap"
|
class="eldialog-wrap"
|
||||||
|
@ -165,7 +165,7 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="租户状态:">
|
<el-form-item label="用户状态:">
|
||||||
<el-radio-group v-model="form.status">
|
<el-radio-group v-model="form.status">
|
||||||
<el-radio
|
<el-radio
|
||||||
v-for="dict in statusOptions"
|
v-for="dict in statusOptions"
|
||||||
|
@ -206,7 +206,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 分配用户租户对话框 -->
|
<!-- 分配用户用户对话框 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="title_user"
|
:title="title_user"
|
||||||
class="teant-child-dialog"
|
class="teant-child-dialog"
|
||||||
|
@ -316,11 +316,11 @@ export default {
|
||||||
single: true,
|
single: true,
|
||||||
// 非多个禁用
|
// 非多个禁用
|
||||||
multiple: true,
|
multiple: true,
|
||||||
title_select: "选择分配租户",
|
title_select: "选择分配用户",
|
||||||
open_select: false,
|
open_select: false,
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 企业租户表格数据
|
// 企业用户表格数据
|
||||||
tenantList: [],
|
tenantList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
|
@ -328,7 +328,7 @@ export default {
|
||||||
open: false,
|
open: false,
|
||||||
// 类型
|
// 类型
|
||||||
tenantTypeOptions: [],
|
tenantTypeOptions: [],
|
||||||
// 租户状态
|
// 用户状态
|
||||||
statusOptions: [],
|
statusOptions: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
|
@ -419,7 +419,7 @@ export default {
|
||||||
size: "mini",
|
size: "mini",
|
||||||
qx: ["system:tenant:add"],
|
qx: ["system:tenant:add"],
|
||||||
handler: function(scope) {
|
handler: function(scope) {
|
||||||
vm.handleAddChildUser(scope.row, "disUser", "租户管理");
|
vm.handleAddChildUser(scope.row, "disUser", "用户管理");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -543,7 +543,7 @@ export default {
|
||||||
});
|
});
|
||||||
return rulesStr;
|
return rulesStr;
|
||||||
},
|
},
|
||||||
// 租户状态字典翻译
|
// 用户状态字典翻译
|
||||||
statusFormat(row, column) {
|
statusFormat(row, column) {
|
||||||
var rulesStr = "";
|
var rulesStr = "";
|
||||||
this.statusOptions.forEach(v => {
|
this.statusOptions.forEach(v => {
|
||||||
|
@ -553,7 +553,7 @@ export default {
|
||||||
});
|
});
|
||||||
return rulesStr;
|
return rulesStr;
|
||||||
},
|
},
|
||||||
/** 查询企业租户列表 */
|
/** 查询企业用户列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listTenant(this.queryParams).then(response => {
|
listTenant(this.queryParams).then(response => {
|
||||||
|
@ -605,9 +605,9 @@ export default {
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加企业租户";
|
this.title = "添加企业用户";
|
||||||
},
|
},
|
||||||
// 添加子租户
|
// 添加子用户
|
||||||
handleAddChildUser(row, type, title) {
|
handleAddChildUser(row, type, title) {
|
||||||
this.tenantId = row.tenantId;
|
this.tenantId = row.tenantId;
|
||||||
this.tempType = type;
|
this.tempType = type;
|
||||||
|
@ -631,7 +631,7 @@ export default {
|
||||||
getTenant(tenantId).then(response => {
|
getTenant(tenantId).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改企业租户";
|
this.title = "修改企业用户";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
|
@ -691,7 +691,7 @@ export default {
|
||||||
// `system_tenant.xlsx`
|
// `system_tenant.xlsx`
|
||||||
// );
|
// );
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
this.$confirm("是否确认导出租户数据?", "警告", {
|
this.$confirm("是否确认导出用户数据?", "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<!-- 添加或修改部门对话框 -->
|
<!-- 添加或修改部门对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24" >
|
<el-col :span="24" >
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<!-- 添加或修改菜单对话框 -->
|
<!-- 添加或修改菜单对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
|
|
|
@ -107,7 +107,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改岗位对话框 -->
|
<!-- 添加或修改岗位对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="岗位名称" prop="postName">
|
<el-form-item label="岗位名称" prop="postName">
|
||||||
<el-input v-model="form.postName" placeholder="请输入岗位名称" />
|
<el-input v-model="form.postName" placeholder="请输入岗位名称" />
|
||||||
|
|
|
@ -179,6 +179,7 @@
|
||||||
width="500px"
|
width="500px"
|
||||||
append-to-body
|
append-to-body
|
||||||
:destroy-on-close="true"
|
:destroy-on-close="true"
|
||||||
|
:close-on-click-modal="false"
|
||||||
>
|
>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="角色名称" prop="roleName">
|
<el-form-item label="角色名称" prop="roleName">
|
||||||
|
@ -233,7 +234,7 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 分配角色数据权限对话框 -->
|
<!-- 分配角色数据权限对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="openDataScope" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="openDataScope" width="500px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form :model="form" label-width="80px">
|
<el-form :model="form" label-width="80px">
|
||||||
<el-form-item label="角色名称">
|
<el-form-item label="角色名称">
|
||||||
<el-input v-model="form.roleName" :disabled="true" />
|
<el-input v-model="form.roleName" :disabled="true" />
|
||||||
|
|
|
@ -187,7 +187,7 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 添加或修改参数配置对话框 -->
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
@ -328,7 +328,7 @@ import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
|
||||||
const userType = {
|
const userType = {
|
||||||
"TENANT": "企业租户",
|
"TENANT": "企业用户",
|
||||||
"PERSONAL": "个人用户"
|
"PERSONAL": "个人用户"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改邮件用户对话框 -->
|
<!-- 添加或修改邮件用户对话框 -->
|
||||||
<el-dialog class="form-dialog" :title="title" :visible.sync="open" width="480px" append-to-body>
|
<el-dialog class="form-dialog" :title="title" :visible.sync="open" width="480px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-form-item label="邮箱账号" prop="account">
|
<el-form-item label="邮箱账号" prop="account">
|
||||||
<el-input v-model="form.account" placeholder="请输入邮箱账号" />
|
<el-input v-model="form.account" placeholder="请输入邮箱账号" />
|
||||||
|
|
|
@ -117,7 +117,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改邮件模板对话框 -->
|
<!-- 添加或修改邮件模板对话框 -->
|
||||||
<el-dialog class="form-dialog" :title="title" :visible.sync="open" width="680px" append-to-body>
|
<el-dialog class="form-dialog" :title="title" :visible.sync="open" width="680px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="邮件用户" prop="configId">
|
<el-form-item label="邮件用户" prop="configId">
|
||||||
<el-select v-model="form.configId" placeholder="请选择邮件用户">
|
<el-select v-model="form.configId" placeholder="请选择邮件用户">
|
||||||
|
|
|
@ -118,7 +118,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改短信厂商对话框 -->
|
<!-- 添加或修改短信厂商对话框 -->
|
||||||
<el-dialog class="form-dialog" :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog class="form-dialog" :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="厂商类型">
|
<el-form-item label="厂商类型">
|
||||||
<el-select v-model="form.appType" placeholder="请选择厂商类型">
|
<el-select v-model="form.appType" placeholder="请选择厂商类型">
|
||||||
|
|
|
@ -118,7 +118,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改短信模板对话框 -->
|
<!-- 添加或修改短信模板对话框 -->
|
||||||
<el-dialog class="form-dialog" :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog class="form-dialog" :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="短信厂商" prop="configId">
|
<el-form-item label="短信厂商" prop="configId">
|
||||||
<el-select v-model="form.configId" placeholder="请选择短信厂商">
|
<el-select v-model="form.configId" placeholder="请选择短信厂商">
|
||||||
|
|
|
@ -133,7 +133,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改设备时序数据库配置对话框 -->
|
<!-- 添加或修改设备时序数据库配置对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-form-item label="连接名" prop="name">
|
<el-form-item label="连接名" prop="name">
|
||||||
<el-input v-model="form.name" placeholder="请输入连接名" />
|
<el-input v-model="form.name" placeholder="请输入连接名" />
|
||||||
|
@ -231,7 +231,7 @@ export default {
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
tenantId: [
|
tenantId: [
|
||||||
{ required: true, message: "租户ID不能为空", trigger: "blur" }
|
{ required: true, message: "用户ID不能为空", trigger: "blur" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -106,7 +106,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改设备数据保存策略对话框 -->
|
<!-- 添加或修改设备数据保存策略对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="策略名称" prop="policyName">
|
<el-form-item label="策略名称" prop="policyName">
|
||||||
<el-input v-model="form.policyName" placeholder="请输入策略名称" />
|
<el-input v-model="form.policyName" placeholder="请输入策略名称" />
|
||||||
|
@ -177,7 +177,7 @@ export default {
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
tenantId: [
|
tenantId: [
|
||||||
{ required: true, message: "租户ID不能为空", trigger: "blur" }
|
{ required: true, message: "用户ID不能为空", trigger: "blur" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="用户类型:">
|
<el-form-item label="用户类型:">
|
||||||
<span v-text="infoData.userType === 'PERSONAL' ? '租户' : '项目'"></span>
|
<span v-text="infoData.userType === 'PERSONAL' ? '用户' : '项目'"></span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
<el-row v-if="infoData.state === 1">
|
<el-row v-if="infoData.state === 1">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="所属租户:">
|
<el-form-item label="所属用户:">
|
||||||
<span>{{ infoData.tenantName }}</span>
|
<span>{{ infoData.tenantName }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
|
@ -94,7 +94,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改注册用户对话框 -->
|
<!-- 添加或修改注册用户对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="650px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="650px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="17">
|
<el-col :span="17">
|
||||||
|
@ -215,7 +215,7 @@ const stateOption = {
|
||||||
"1": "待审核"
|
"1": "待审核"
|
||||||
};
|
};
|
||||||
const userTypeOption = {
|
const userTypeOption = {
|
||||||
"1": "租户",
|
"1": "用户",
|
||||||
"02": "项目"
|
"02": "项目"
|
||||||
};
|
};
|
||||||
export default {
|
export default {
|
||||||
|
@ -262,7 +262,7 @@ export default {
|
||||||
password: [
|
password: [
|
||||||
{ required: true, message: "登录密码不能为空!", trigger: "blur" }
|
{ required: true, message: "登录密码不能为空!", trigger: "blur" }
|
||||||
],
|
],
|
||||||
tenantId: [{ required: true, message: "请选择租户", trigger: "blur" }],
|
tenantId: [{ required: true, message: "请选择用户", trigger: "blur" }],
|
||||||
roleIds: [{ required: true, message: "请选择角色", trigger: "blur" }],
|
roleIds: [{ required: true, message: "请选择角色", trigger: "blur" }],
|
||||||
email: [
|
email: [
|
||||||
{ required: true, message: "用户昵称不能为空", trigger: "blur" },
|
{ required: true, message: "用户昵称不能为空", trigger: "blur" },
|
||||||
|
@ -315,7 +315,7 @@ export default {
|
||||||
this.rouleList = response.rows;
|
this.rouleList = response.rows;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 获取租户下所有部门信息 选择租户之后触发
|
// 获取用户下所有部门信息 选择用户之后触发
|
||||||
getDepList() {
|
getDepList() {
|
||||||
listDept({
|
listDept({
|
||||||
tenantId: this.form.tenantId
|
tenantId: this.form.tenantId
|
||||||
|
@ -348,7 +348,7 @@ export default {
|
||||||
this.getRoueList();
|
this.getRoueList();
|
||||||
this.getPostList();
|
this.getPostList();
|
||||||
},
|
},
|
||||||
// 获取所有租户信息
|
// 获取所有用户信息
|
||||||
getTenantList() {
|
getTenantList() {
|
||||||
this.tenantList = [];
|
this.tenantList = [];
|
||||||
listTenant().then(response => {
|
listTenant().then(response => {
|
||||||
|
|
|
@ -442,6 +442,7 @@
|
||||||
:visible.sync="upload.open"
|
:visible.sync="upload.open"
|
||||||
width="400px"
|
width="400px"
|
||||||
append-to-body
|
append-to-body
|
||||||
|
:close-on-click-modal="false"
|
||||||
>
|
>
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="upload"
|
ref="upload"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="user-info-head" @click="editCropper()"><img v-bind:src="getIotFileUrl(options.img)" title="点击上传头像" class="img-circle img-lg" /></div>
|
<div class="user-info-head" @click="editCropper()"><img v-bind:src="getIotFileUrl(options.img)" title="点击上传头像" class="img-circle img-lg" /></div>
|
||||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened">
|
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened" >
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :xs="24" :md="12" :style="{height: '350px'}">
|
<el-col :xs="24" :md="12" :style="{height: '350px'}">
|
||||||
<vue-cropper
|
<vue-cropper
|
||||||
|
|
|
@ -56,7 +56,7 @@ export default {
|
||||||
spanClass: "span-bg1",
|
spanClass: "span-bg1",
|
||||||
valueColor: "#b176e9",
|
valueColor: "#b176e9",
|
||||||
value: "twoValue",
|
value: "twoValue",
|
||||||
title: "租户用户 (单位: 人)"
|
title: "用户用户 (单位: 人)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
leftImg: "/images/quickStart_icon_subuserCounts.992898a.png",
|
leftImg: "/images/quickStart_icon_subuserCounts.992898a.png",
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改设备对话框 -->
|
<!-- 添加或修改设备对话框 -->
|
||||||
<el-dialog class="eldialog-wrap" :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px">
|
<el-dialog class="eldialog-wrap" :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" >
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-form-item label="所属型号:" prop="modelId">
|
<el-form-item label="所属型号:" prop="modelId">
|
||||||
<el-input
|
<el-input
|
||||||
|
|
|
@ -103,7 +103,8 @@ import {
|
||||||
listProject,
|
listProject,
|
||||||
exportProject
|
exportProject
|
||||||
} from "@/api/tenant/project";
|
} from "@/api/tenant/project";
|
||||||
import DetailsWrap from "./profile/details";
|
// import DetailsWrap from "./profile/details";
|
||||||
|
import DetailsWrap from '@/views/iot/project/profileV2/details'
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue