提交: 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'
|
||||
|
||||
// 查询项目租户关系列表
|
||||
// 查询项目用户关系列表
|
||||
export function listProject_tenant(query) {
|
||||
return request({
|
||||
url: '/iot/project_tenant/list',
|
||||
|
@ -9,7 +9,7 @@ export function listProject_tenant(query) {
|
|||
})
|
||||
}
|
||||
|
||||
// 查询项目租户关系详细
|
||||
// 查询项目用户关系详细
|
||||
export function getProject_tenant(projectId) {
|
||||
return request({
|
||||
url: '/iot/project_tenant/' + projectId,
|
||||
|
@ -17,7 +17,7 @@ export function getProject_tenant(projectId) {
|
|||
})
|
||||
}
|
||||
|
||||
// 新增项目租户关系
|
||||
// 新增项目用户关系
|
||||
export function addProject_tenant(data) {
|
||||
return request({
|
||||
url: '/iot/project_tenant',
|
||||
|
@ -26,7 +26,7 @@ export function addProject_tenant(data) {
|
|||
})
|
||||
}
|
||||
|
||||
// 修改项目租户关系
|
||||
// 修改项目用户关系
|
||||
export function updateProject_tenant(data) {
|
||||
return request({
|
||||
url: '/iot/project_tenant',
|
||||
|
@ -35,7 +35,7 @@ export function updateProject_tenant(data) {
|
|||
})
|
||||
}
|
||||
|
||||
// 删除项目租户关系
|
||||
// 删除项目用户关系
|
||||
export function delProject_tenant(projectId, tenantId) {
|
||||
let reqUrl = tenantId ? '/' + tenantId : ''
|
||||
return request({
|
||||
|
@ -44,7 +44,7 @@ export function delProject_tenant(projectId, tenantId) {
|
|||
})
|
||||
}
|
||||
|
||||
// 导出项目租户关系
|
||||
// 导出项目用户关系
|
||||
export function exportProject_tenant(query) {
|
||||
return request({
|
||||
url: '/iot/project_tenant/export',
|
||||
|
@ -53,7 +53,7 @@ export function exportProject_tenant(query) {
|
|||
})
|
||||
}
|
||||
|
||||
// 查询没有被绑定的租户
|
||||
// 查询没有被绑定的用户
|
||||
export function listUserdByProjectId(query) {
|
||||
return request({
|
||||
url: '/iot/project_tenant/not-used',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询项目租户关系详细
|
||||
// 查询项目用户关系详细
|
||||
export function getOneselfInfo(deviceKey) {
|
||||
return request({
|
||||
url: '/iot/device/' + deviceKey,
|
||||
|
|
|
@ -62,7 +62,7 @@ export function exportMaintenance(query) {
|
|||
}
|
||||
|
||||
|
||||
// 获取租户下用户
|
||||
// 获取用户下用户
|
||||
export function getTenantHandleUser(query) {
|
||||
return request({
|
||||
url: '/system/user/list',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import request from '@/utils/request'
|
||||
import { preventRepeatFu } from "@/utils/hciot";
|
||||
|
||||
// 查询租户设置列表
|
||||
// 查询用户设置列表
|
||||
export function listConfig(query) {
|
||||
return request({
|
||||
url: '/system/tconfig/list',
|
||||
|
@ -10,7 +10,7 @@ export function listConfig(query) {
|
|||
})
|
||||
}
|
||||
|
||||
// 查询租户设置详细
|
||||
// 查询用户设置详细
|
||||
export function getConfig(configId) {
|
||||
return request({
|
||||
url: '/system/tconfig/' + configId,
|
||||
|
@ -18,7 +18,7 @@ export function getConfig(configId) {
|
|||
})
|
||||
}
|
||||
|
||||
// 新增租户设置
|
||||
// 新增用户设置
|
||||
export function addConfig(data) {
|
||||
preventRepeatFu(true)
|
||||
return request({
|
||||
|
@ -28,7 +28,7 @@ export function addConfig(data) {
|
|||
})
|
||||
}
|
||||
|
||||
// 修改租户设置
|
||||
// 修改用户设置
|
||||
export function updateConfig(data) {
|
||||
preventRepeatFu(true)
|
||||
return request({
|
||||
|
@ -38,7 +38,7 @@ export function updateConfig(data) {
|
|||
})
|
||||
}
|
||||
|
||||
// 删除租户设置
|
||||
// 删除用户设置
|
||||
export function delConfig(configId) {
|
||||
return request({
|
||||
url: '/system/tconfig/' + configId,
|
||||
|
@ -46,7 +46,7 @@ export function delConfig(configId) {
|
|||
})
|
||||
}
|
||||
|
||||
// 查询租户设置列表map
|
||||
// 查询用户设置列表map
|
||||
export function mlistConfig(query) {
|
||||
return request({
|
||||
url: '/system/tconfig/mlist',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import request from '@/utils/request'
|
||||
import { preventRepeatFu } from "@/utils/hciot";
|
||||
|
||||
// 查询企业租户列表
|
||||
// 查询企业用户列表
|
||||
export function listTenant(query) {
|
||||
return request({
|
||||
url: '/system/tenant/list',
|
||||
|
@ -10,7 +10,7 @@ export function listTenant(query) {
|
|||
})
|
||||
}
|
||||
|
||||
// 查询企业租户详细
|
||||
// 查询企业用户详细
|
||||
export function getTenant(tenantId) {
|
||||
return request({
|
||||
url: '/system/tenant/' + tenantId,
|
||||
|
@ -18,7 +18,7 @@ export function getTenant(tenantId) {
|
|||
})
|
||||
}
|
||||
|
||||
// 新增企业租户
|
||||
// 新增企业用户
|
||||
export function addTenant(data) {
|
||||
preventRepeatFu(true)
|
||||
return request({
|
||||
|
@ -28,7 +28,7 @@ export function addTenant(data) {
|
|||
})
|
||||
}
|
||||
|
||||
// 修改企业租户
|
||||
// 修改企业用户
|
||||
export function updateTenant(data) {
|
||||
preventRepeatFu(true)
|
||||
return request({
|
||||
|
@ -38,7 +38,7 @@ export function updateTenant(data) {
|
|||
})
|
||||
}
|
||||
|
||||
// 删除企业租户
|
||||
// 删除企业用户
|
||||
export function delTenant(tenantId) {
|
||||
return request({
|
||||
url: '/system/tenant/' + tenantId,
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
&.has-logo {
|
||||
.el-scrollbar {
|
||||
height: calc(100% - 50px);
|
||||
height: calc(100% - 90px);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<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>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<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>
|
||||
|
|
|
@ -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-scrollbar>
|
||||
<logout />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -32,9 +33,10 @@ import { mapGetters, mapState } from "vuex";
|
|||
import Logo from "./Logo";
|
||||
import SidebarItem from "./SidebarItem";
|
||||
import variables from "@/assets/styles/variables.scss";
|
||||
import Logout from './Logout'
|
||||
|
||||
export default {
|
||||
components: { SidebarItem, Logo },
|
||||
components: { SidebarItem, Logo, Logout },
|
||||
computed: {
|
||||
...mapState(["settings"]),
|
||||
...mapGetters(["sidebarRouters", "sidebar"]),
|
||||
|
|
|
@ -28,7 +28,6 @@ const permission = {
|
|||
GetAttribute({ commit }) {
|
||||
return new Promise(resolve => {
|
||||
// 向后端请求路由数据
|
||||
console.log('請求--GetAttribute')
|
||||
getAttributeConfig().then(res => {
|
||||
commit('SET_ATTRIBUTE', res.data)
|
||||
})
|
||||
|
@ -38,7 +37,7 @@ const permission = {
|
|||
SetAttributeByKey({ commit, state }, params) {
|
||||
return new Promise(resolve => {
|
||||
// 向后端请求路由数据
|
||||
console.log('請求--GetAttribute')
|
||||
console.log('eeee---', Object.assign(state.attribute, params));
|
||||
commit('SET_ATTRIBUTE', Object.assign(state.attribute, params))
|
||||
})
|
||||
},
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<div class="main-block">
|
||||
<e-head
|
||||
ref="mainHead"
|
||||
:handelTile="title"
|
||||
:handelTile="attributeBigTitle"
|
||||
:projectList="projectList"
|
||||
@eventFullscreen="eventFullscreen"
|
||||
@eventProjectId="eventProjectId"
|
||||
|
@ -121,7 +121,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 0; height: 0;">
|
||||
<div style="width: 0; height: 0">
|
||||
<notification-alarm></notification-alarm>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -139,7 +139,7 @@ import MapWrapPersonal from "./profile/personalCenter";
|
|||
import { bigWebSocketUrl } from "@/config/env";
|
||||
import Cookies from "js-cookie";
|
||||
import EProjectCensusTemp from "./profile/EProjectCensusTemp";
|
||||
import NotificationAlarm from './profile/NotificationAlarm';
|
||||
import NotificationAlarm from "./profile/NotificationAlarm";
|
||||
|
||||
import { getWarningAnalysis, homeCount, bigScreenProjectList } from "@/api/app";
|
||||
import {
|
||||
|
@ -171,7 +171,7 @@ export default {
|
|||
projectList: [],
|
||||
projectId: null,
|
||||
regionalismId: null,
|
||||
regionalismLabel: '',
|
||||
regionalismLabel: "",
|
||||
fullscreen: false,
|
||||
thisScrollTopY: 0,
|
||||
userLoginType: "",
|
||||
|
@ -200,24 +200,31 @@ export default {
|
|||
this.resize_window();
|
||||
});
|
||||
},
|
||||
computed: {
|
||||
attributeBigTitle() {
|
||||
return this.$store.getters.attributeInfo["bigTitle"] || this.title;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
// $route(to, from) {
|
||||
// if (from.fullPath === "/index") {
|
||||
// document.getElementById("con_lf_top_div").style.background = "#fff";
|
||||
// document.getElementById("con_lf_top_div").style.height =
|
||||
// "calc(100vh - 84px)";
|
||||
// document.getElementById("con_lf_top_div").style.minHeight =
|
||||
// "calc(100vh - 84px)";
|
||||
// } else if (to.fullPath === "/index") {
|
||||
// document.getElementById("con_lf_top_div").style.background = "#010e45";
|
||||
// document.getElementById("con_lf_top_div").style.height =
|
||||
// "calc(100vh - 84px)";
|
||||
// document.getElementById("con_lf_top_div").style.minHeight =
|
||||
// "calc(100vh - 84px)";
|
||||
// }
|
||||
// if (from.fullPath === "/index") {
|
||||
// document.getElementById("con_lf_top_div").style.background = "#fff";
|
||||
// document.getElementById("con_lf_top_div").style.height =
|
||||
// "calc(100vh - 84px)";
|
||||
// document.getElementById("con_lf_top_div").style.minHeight =
|
||||
// "calc(100vh - 84px)";
|
||||
// } else if (to.fullPath === "/index") {
|
||||
// document.getElementById("con_lf_top_div").style.background = "#010e45";
|
||||
// document.getElementById("con_lf_top_div").style.height =
|
||||
// "calc(100vh - 84px)";
|
||||
// document.getElementById("con_lf_top_div").style.minHeight =
|
||||
// "calc(100vh - 84px)";
|
||||
// }
|
||||
// this.title = this.$store.getters.attributeInfo['bigTitle'] || '智慧能源综合管理系统';
|
||||
// },
|
||||
},
|
||||
created() {
|
||||
// this.title = this.$store.getters.attributeInfo['bigTitle'] || '智慧能源综合管理系统';
|
||||
document.getElementById("app").style.background = "#010e45";
|
||||
this.getProjectList();
|
||||
this.warningAnalysisList();
|
||||
|
@ -247,13 +254,14 @@ export default {
|
|||
});
|
||||
},
|
||||
getGuid() {
|
||||
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(
|
||||
c
|
||||
) {
|
||||
var r = (Math.random() * 16) | 0,
|
||||
v = c == "x" ? r : (r & 0x3) | 0x8;
|
||||
return v.toString(16);
|
||||
});
|
||||
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
|
||||
/[xy]/g,
|
||||
function (c) {
|
||||
var r = (Math.random() * 16) | 0,
|
||||
v = c == "x" ? r : (r & 0x3) | 0x8;
|
||||
return v.toString(16);
|
||||
}
|
||||
);
|
||||
},
|
||||
// 创建一个ws 监听获取报警实时数据
|
||||
connection() {
|
||||
|
@ -264,7 +272,9 @@ export default {
|
|||
return;
|
||||
}
|
||||
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.onclose = this.socket_onclose;
|
||||
|
@ -341,7 +351,7 @@ export default {
|
|||
if (this.$store.getters.userType !== "PERSONAL") {
|
||||
bigScreenProjectList({
|
||||
// regionalismId: this.regionalismId,
|
||||
projectAddress: this.regionalismLabel
|
||||
projectAddress: this.regionalismLabel,
|
||||
}).then((response) => {
|
||||
this.projectList = response.data;
|
||||
});
|
||||
|
@ -377,7 +387,7 @@ export default {
|
|||
},
|
||||
},
|
||||
destroyed() {
|
||||
this.closeWebscoket()
|
||||
this.closeWebscoket();
|
||||
document.getElementById("app").style.background = "#fff";
|
||||
document.getElementById("con_lf_top_div").style.background = "#fff";
|
||||
document.getElementById("con_lf_top_div").style.overflow = "auto";
|
||||
|
@ -460,4 +470,3 @@ export default {
|
|||
margin-left: -960px;
|
||||
}
|
||||
</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>
|
||||
<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-input
|
||||
v-model="queryParams.typeName"
|
||||
|
@ -14,7 +19,7 @@
|
|||
<el-form-item label="设备类型" prop="deviceType">
|
||||
<el-select
|
||||
v-model="queryParams.deviceType"
|
||||
style="width: 100%;"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="请输入报警设备类型"
|
||||
|
@ -32,7 +37,7 @@
|
|||
<el-form-item label="报警划分" prop="alarmDivide">
|
||||
<el-select
|
||||
v-model="queryParams.alarmDivide"
|
||||
style="width: 100%;"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="请输入报警设备类型"
|
||||
|
@ -48,8 +53,16 @@
|
|||
</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-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>
|
||||
|
||||
|
@ -61,7 +74,8 @@
|
|||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['iot:type:add']"
|
||||
>新增</el-button>
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
|
@ -81,7 +95,8 @@
|
|||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['iot:type:remove']"
|
||||
>删除</el-button>
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
|
@ -102,7 +117,12 @@
|
|||
>
|
||||
<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="typeName" />
|
||||
<el-table-column
|
||||
label="名称"
|
||||
align="left"
|
||||
sortable="custom"
|
||||
prop="typeName"
|
||||
/>
|
||||
<el-table-column label="设备类型" align="center" prop="deviceTypeName" />
|
||||
<el-table-column
|
||||
label="报警划分"
|
||||
|
@ -113,11 +133,18 @@
|
|||
/>
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<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>
|
||||
</template>
|
||||
</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">
|
||||
<el-button
|
||||
size="mini"
|
||||
|
@ -126,7 +153,8 @@
|
|||
v-if="scope.row.tenantId === tenantId"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['iot:type:edit']"
|
||||
>修改</el-button>
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
|
@ -134,13 +162,14 @@
|
|||
@click="handleDelete(scope.row)"
|
||||
v-if="scope.row.tenantId === tenantId"
|
||||
v-hasPermi="['iot:type:remove']"
|
||||
>删除</el-button>
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
|
@ -148,14 +177,21 @@
|
|||
/>
|
||||
|
||||
<!-- 添加或修改告警类型对话框 -->
|
||||
<el-dialog
|
||||
<dialog-template
|
||||
class="eldialog-wrap"
|
||||
:close-on-click-modal="false"
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
:visible="open"
|
||||
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-input v-model="form.typeName" placeholder="请输入报警类型名称" />
|
||||
</el-form-item>
|
||||
|
@ -171,7 +207,7 @@
|
|||
<el-form-item label="设备类型" prop="deviceType">
|
||||
<el-select
|
||||
v-model="form.deviceType"
|
||||
style="width: 100%;"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
placeholder="请输入报警设备类型"
|
||||
>
|
||||
|
@ -187,7 +223,7 @@
|
|||
<el-form-item label="联系人" prop="userId">
|
||||
<el-select
|
||||
v-model="form.userId"
|
||||
style="width: 100%;"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
placeholder="请输入联系人"
|
||||
>
|
||||
|
@ -202,7 +238,12 @@
|
|||
|
||||
<el-form-item label="报警划分" prop="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-form-item>
|
||||
|
||||
|
@ -216,11 +257,13 @@
|
|||
></el-switch>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="mini" type="primary" @click="submitForm">确 定</el-button>
|
||||
<div slot="dialog-footer" class="dialog-footer">
|
||||
<el-button size="mini" type="primary" @click="submitForm"
|
||||
>确 定</el-button
|
||||
>
|
||||
<el-button size="mini" @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</dialog-template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -230,17 +273,19 @@ import {
|
|||
getAlarmType,
|
||||
delAlarmType,
|
||||
addAlarmType,
|
||||
updateAlarmType
|
||||
updateAlarmType,
|
||||
} from "@/api/alarm/alarmType";
|
||||
import { listDeviceTypeList } from "@/api/iot/device";
|
||||
import { listUser } from "@/api/system/user";
|
||||
import DialogTemplate from "@/components/DialogTemplate/index";
|
||||
// import { selectedProdmodel } from "@/api/device/prodmodel";
|
||||
const alarmDivideType = {
|
||||
ALARM: "报警",
|
||||
WARNING: "预警"
|
||||
WARNING: "预警",
|
||||
};
|
||||
export default {
|
||||
name: "AlarmType",
|
||||
components: { DialogTemplate },
|
||||
data() {
|
||||
return {
|
||||
alarmDivideType,
|
||||
|
@ -268,33 +313,33 @@ export default {
|
|||
typeName: undefined,
|
||||
tag: undefined,
|
||||
deviceType: "",
|
||||
alarmDivide: '',
|
||||
alarmDivide: "",
|
||||
orderByColumn: "",
|
||||
isAsc: "desc"
|
||||
isAsc: "desc",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
typeName: [
|
||||
{ required: true, message: "类型名称不能为空", trigger: "blur" }
|
||||
{ required: true, message: "类型名称不能为空", trigger: "blur" },
|
||||
],
|
||||
tag: [{ required: true, message: "告警标签不能为空", trigger: "blur" }]
|
||||
tag: [{ required: true, message: "告警标签不能为空", trigger: "blur" }],
|
||||
},
|
||||
tenantId: "",
|
||||
deviceTypeList: [],
|
||||
userList: []
|
||||
userList: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.tenantId = this.$store.getters.tenantId;
|
||||
this.getList();
|
||||
this.getUserList()
|
||||
this.getUserList();
|
||||
this.getDeviceTypeList();
|
||||
},
|
||||
methods: {
|
||||
getUserList() {
|
||||
listUser().then(response => {
|
||||
listUser().then((response) => {
|
||||
this.userList = response.rows;
|
||||
});
|
||||
},
|
||||
|
@ -308,14 +353,14 @@ export default {
|
|||
},
|
||||
// 查询设备类型列表
|
||||
getDeviceTypeList() {
|
||||
listDeviceTypeList().then(response => {
|
||||
listDeviceTypeList().then((response) => {
|
||||
this.deviceTypeList = response.data;
|
||||
});
|
||||
},
|
||||
sortChange(column) {
|
||||
const sort = {
|
||||
isAsc: column.order === "descending" ? "desc" : "asc",
|
||||
orderByColumn: column.prop
|
||||
orderByColumn: column.prop,
|
||||
};
|
||||
this.queryParams = Object.assign(this.queryParams, sort);
|
||||
this.handleQuery();
|
||||
|
@ -329,7 +374,7 @@ export default {
|
|||
/** 查询告警类型列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listAlarmType(this.queryParams).then(response => {
|
||||
listAlarmType(this.queryParams).then((response) => {
|
||||
this.alarmTypeList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
|
@ -348,7 +393,7 @@ export default {
|
|||
typeName: undefined,
|
||||
alarmDivide: "ALARM",
|
||||
status: "1",
|
||||
tag: ""
|
||||
tag: "",
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
|
@ -364,7 +409,7 @@ export default {
|
|||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.typeId);
|
||||
this.ids = selection.map((item) => item.typeId);
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
|
@ -380,7 +425,7 @@ export default {
|
|||
this.reset();
|
||||
this.getDeviceTypeList();
|
||||
const typeId = row.typeId || this.ids;
|
||||
getAlarmType(typeId).then(response => {
|
||||
getAlarmType(typeId).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.form.status = response.data.status.toString();
|
||||
|
@ -388,11 +433,11 @@ export default {
|
|||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.typeId != undefined) {
|
||||
updateAlarmType(this.form).then(response => {
|
||||
updateAlarmType(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
|
@ -400,7 +445,7 @@ export default {
|
|||
}
|
||||
});
|
||||
} else {
|
||||
addAlarmType(this.form).then(response => {
|
||||
addAlarmType(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
|
@ -421,29 +466,29 @@ export default {
|
|||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(function() {
|
||||
.then(function () {
|
||||
return delAlarmType(typeIds);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(function() {});
|
||||
.catch(function () {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"iot/alarmType/export",
|
||||
{
|
||||
...this.queryParams
|
||||
...this.queryParams,
|
||||
},
|
||||
`iot_alarmType.xlsx`
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
</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="qr-wrap">
|
||||
<img src="@/assets/images/gzhqr.jpg"/>
|
||||
|
|
|
@ -250,6 +250,7 @@
|
|||
:visible.sync="upload.open"
|
||||
width="400px"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<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">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<dialog-template :title="title" :visible="open" @close="open = false"
|
||||
class="eldialog-wrap"
|
||||
|
||||
width="720px"
|
||||
>
|
||||
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px" slot="dialog-center">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<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-form-item>
|
||||
</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" @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</dialog-template>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<el-dialog
|
||||
|
@ -322,6 +329,7 @@ import DetailsWrap from "./profile/details";
|
|||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import SelectTableWrap from "@/components/SelectTable/index";
|
||||
import DialogTemplate from "@/components/DialogTemplate/index";
|
||||
|
||||
/////、、、、、、、、、、、、、、、、、、、、
|
||||
import DetailsWrapNew from './profileV2/details'
|
||||
|
@ -333,7 +341,8 @@ export default {
|
|||
Treeselect,
|
||||
DetailsWrap,
|
||||
SelectTableWrap,
|
||||
DetailsWrapNew
|
||||
DetailsWrapNew,
|
||||
DialogTemplate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -407,7 +416,8 @@ export default {
|
|||
// 行政划分树选项
|
||||
regionalismOption: [],
|
||||
componectVal: "",
|
||||
sourceId: ""
|
||||
sourceId: "",
|
||||
userType: ''
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<info-wrap v-if="activeName === 'info'" :infoData="infoData" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="项目租户" name="tenant">
|
||||
<el-tab-pane label="项目用户" name="tenant">
|
||||
<div class="tabs-body">
|
||||
<tenant-wrap v-if="activeName === 'tenant'" :infoData="infoData" />
|
||||
</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>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="mini" type="primary" @click="submitForm">确 定</el-button>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>解除租户</el-button>
|
||||
>解除用户</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -49,7 +49,7 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改项目租户关系对话框 -->
|
||||
<!-- 添加或修改项目用户关系对话框 -->
|
||||
<!-- <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>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
@ -59,7 +59,7 @@
|
|||
</el-dialog> -->
|
||||
|
||||
<el-dialog
|
||||
title="选择租户"
|
||||
title="选择用户"
|
||||
:visible.sync="selectTableShow"
|
||||
width="50%"
|
||||
top="10vh"
|
||||
|
@ -119,7 +119,7 @@ export default {
|
|||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 项目租户关系表格数据
|
||||
// 项目用户关系表格数据
|
||||
project_tenantList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
|
@ -136,7 +136,7 @@ export default {
|
|||
form: {},
|
||||
// 表单校验
|
||||
rules: {},
|
||||
// 租户状态
|
||||
// 用户状态
|
||||
statusOptions: [],
|
||||
tenantTypeOptions: []
|
||||
};
|
||||
|
@ -268,7 +268,7 @@ export default {
|
|||
this.form.tenantId = data.value.tenantId;
|
||||
}
|
||||
},
|
||||
// 租户状态字典翻译
|
||||
// 用户状态字典翻译
|
||||
statusFormat(row, column) {
|
||||
var rulesStr = "";
|
||||
this.statusOptions.forEach(v => {
|
||||
|
@ -287,7 +287,7 @@ export default {
|
|||
});
|
||||
return rulesStr;
|
||||
},
|
||||
/** 查询项目租户关系列表 */
|
||||
/** 查询项目用户关系列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.projectId = this.infoData.projectId;
|
||||
|
@ -338,7 +338,7 @@ export default {
|
|||
getProject_tenant(projectId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改项目租户关系";
|
||||
this.title = "修改项目用户关系";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
|
@ -369,7 +369,7 @@ export default {
|
|||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm("是否确认导出所有项目租户关系数据项?", "警告", {
|
||||
this.$confirm("是否确认导出所有项目用户关系数据项?", "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
|
|
|
@ -4,9 +4,11 @@
|
|||
<el-tab-pane label="项目信息" name="info">
|
||||
<e-object-info v-if="activeName === 'info'" :infoData="projectInfo || {}" :projectTypeOptions="projectTypeOptions"></e-object-info>
|
||||
</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 || {}"/>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="空间" name="space">
|
||||
<e-object-space v-if="activeName === 'space'" :infoData="projectInfo || {}"/>
|
||||
</el-tab-pane>
|
||||
|
@ -33,6 +35,11 @@ export default {
|
|||
type: Array
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
isShowUserTable() {
|
||||
return this.$store.getters.userType === 'SYSTEM';
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'info'
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<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>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
@ -65,13 +65,15 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-search"
|
||||
v-hasPermi="['project:space:device']"
|
||||
@click="handleDetails(scope.row)"
|
||||
>空间设备</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
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
v-hasPermi="['project:space:remove']"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="app-container">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<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>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
@ -27,6 +27,7 @@
|
|||
icon="el-icon-delete"
|
||||
v-if="scope.row.deviceType !== 'MINIATURE_BREAKER'"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['project:device:relieve']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</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>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="mini" type="primary" @click="submitForm">确 定</el-button>
|
||||
|
|
|
@ -7,23 +7,43 @@
|
|||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
v-hasPermi="['project:tenant:add']"
|
||||
@click="handleAdd"
|
||||
|
||||
>新增</el-button>
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :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
|
||||
v-loading="loading"
|
||||
: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="status">
|
||||
<template slot-scope="scope">
|
||||
<span v-text="scope.row.status === '0' ? '正常' : '停用'"></span>
|
||||
</template>
|
||||
</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
|
||||
label="操作"
|
||||
align="center"
|
||||
|
@ -35,21 +55,23 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
v-hasPermi="['project:tenant:relieve']"
|
||||
@click="handleDelete(scope.row)"
|
||||
>解除租户</el-button>
|
||||
>解除用户</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改项目租户关系对话框 -->
|
||||
<!-- 添加或修改项目用户关系对话框 -->
|
||||
<!-- <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>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
@ -59,7 +81,7 @@
|
|||
</el-dialog> -->
|
||||
|
||||
<el-dialog
|
||||
title="选择租户"
|
||||
title="选择用户"
|
||||
:visible.sync="selectTableShow"
|
||||
width="50%"
|
||||
top="10vh"
|
||||
|
@ -78,8 +100,18 @@
|
|||
/>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="mini" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button size="mini" @click="() =>{selectTableShow = false}">取 消</el-button>
|
||||
<el-button size="mini" type="primary" @click="submitForm"
|
||||
>确 定</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="
|
||||
() => {
|
||||
selectTableShow = false;
|
||||
}
|
||||
"
|
||||
>取 消</el-button
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
@ -91,15 +123,14 @@ import {
|
|||
getProject_tenant,
|
||||
delProject_tenant,
|
||||
addProject_tenant,
|
||||
updateProject_tenant,
|
||||
exportProject_tenant,
|
||||
listUserdByProjectId
|
||||
listUserdByProjectId,
|
||||
} from "@/api/iot/projectTenant";
|
||||
import SelectTableWrap from "@/components/SelectTable/index";
|
||||
export default {
|
||||
name: "EObjectTenant",
|
||||
components: {
|
||||
SelectTableWrap
|
||||
SelectTableWrap,
|
||||
},
|
||||
props: ["infoData"],
|
||||
data() {
|
||||
|
@ -119,7 +150,7 @@ export default {
|
|||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 项目租户关系表格数据
|
||||
// 项目用户关系表格数据
|
||||
project_tenantList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
|
@ -130,33 +161,33 @@ export default {
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderByColumn: "expirationTime",
|
||||
isAsc: "desc"
|
||||
isAsc: "desc",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {},
|
||||
// 租户状态
|
||||
// 用户状态
|
||||
statusOptions: [],
|
||||
tenantTypeOptions: []
|
||||
tenantTypeOptions: [],
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
infoData: {
|
||||
handler(newVal) {
|
||||
if (newVal) {
|
||||
this.getList()
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
deep:true, // 深度监听
|
||||
immediate: false, // 初始化监听
|
||||
}
|
||||
deep: true, // 深度监听
|
||||
immediate: false, // 初始化监听
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getDicts("sys_tenant_type").then(response => {
|
||||
this.getDicts("sys_tenant_type").then((response) => {
|
||||
this.tenantTypeOptions = response.data;
|
||||
});
|
||||
this.getDicts("sys_normal_disable").then(response => {
|
||||
this.getDicts("sys_normal_disable").then((response) => {
|
||||
this.statusOptions = response.data;
|
||||
});
|
||||
this.getList();
|
||||
|
@ -164,8 +195,8 @@ export default {
|
|||
methods: {
|
||||
sortChange(column) {
|
||||
const sort = {
|
||||
isAsc: column.order === "descending" ? "desc" : "asc",
|
||||
orderByColumn: column.prop
|
||||
isAsc: column.order === "descending" ? "desc" : "asc",
|
||||
orderByColumn: column.prop,
|
||||
};
|
||||
this.queryParams = Object.assign(this.queryParams, sort);
|
||||
this.handleQuery();
|
||||
|
@ -180,19 +211,19 @@ export default {
|
|||
this.selectResult = {};
|
||||
this.tableSelectOption = {
|
||||
otherOption: {
|
||||
tableType: "device"
|
||||
tableType: "device",
|
||||
},
|
||||
queryOpt: {
|
||||
disable: false,
|
||||
labelWidth: "68px",
|
||||
params: {
|
||||
projectId: this.infoData.projectId,
|
||||
tenantName: ""
|
||||
tenantName: "",
|
||||
},
|
||||
page: {
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
total: 0
|
||||
total: 0,
|
||||
},
|
||||
inline: true,
|
||||
queryChilds: [
|
||||
|
@ -204,9 +235,9 @@ export default {
|
|||
type: "input",
|
||||
key: "tenantName",
|
||||
size: "small",
|
||||
value: ""
|
||||
}
|
||||
]
|
||||
value: "",
|
||||
},
|
||||
],
|
||||
},
|
||||
tableOpt: {
|
||||
loading: false,
|
||||
|
@ -222,7 +253,7 @@ export default {
|
|||
align: "left",
|
||||
width: "",
|
||||
"show-overflow-tooltip": false,
|
||||
tempType: "span"
|
||||
tempType: "span",
|
||||
},
|
||||
{
|
||||
style: "",
|
||||
|
@ -232,7 +263,7 @@ export default {
|
|||
align: "left",
|
||||
width: "",
|
||||
"show-overflow-tooltip": false,
|
||||
tempType: "span"
|
||||
tempType: "span",
|
||||
},
|
||||
{
|
||||
style: "",
|
||||
|
@ -242,7 +273,7 @@ export default {
|
|||
align: "left",
|
||||
width: "",
|
||||
"show-overflow-tooltip": false,
|
||||
tempType: "text1"
|
||||
tempType: "text1",
|
||||
},
|
||||
{
|
||||
style: "",
|
||||
|
@ -252,20 +283,20 @@ export default {
|
|||
align: "center",
|
||||
width: "180",
|
||||
"show-overflow-tooltip": false,
|
||||
tempType: "span"
|
||||
}
|
||||
tempType: "span",
|
||||
},
|
||||
],
|
||||
tableList: {
|
||||
type: Array
|
||||
}
|
||||
type: Array,
|
||||
},
|
||||
},
|
||||
tableList: []
|
||||
tableList: [],
|
||||
};
|
||||
this.selectTableShow = true;
|
||||
},
|
||||
childGetList(data) {
|
||||
listUserdByProjectId(Object.assign(data.page, data.param)).then(
|
||||
response => {
|
||||
(response) => {
|
||||
this.tableSelectOption.tableList = response.rows;
|
||||
this.tableSelectOption.queryOpt.page.total = Number(response.total);
|
||||
}
|
||||
|
@ -279,10 +310,10 @@ export default {
|
|||
this.form.tenantId = data.value.tenantId;
|
||||
}
|
||||
},
|
||||
// 租户状态字典翻译
|
||||
// 用户状态字典翻译
|
||||
statusFormat(row, column) {
|
||||
var rulesStr = "";
|
||||
this.statusOptions.forEach(v => {
|
||||
this.statusOptions.forEach((v) => {
|
||||
if (v.dictValue === row.status) {
|
||||
rulesStr = v.dictLabel;
|
||||
}
|
||||
|
@ -291,18 +322,18 @@ export default {
|
|||
},
|
||||
tenantTypeFormat(row, column) {
|
||||
var rulesStr = "";
|
||||
this.tenantTypeOptions.forEach(v => {
|
||||
this.tenantTypeOptions.forEach((v) => {
|
||||
if (v.dictValue === row.status) {
|
||||
rulesStr = v.dictLabel;
|
||||
}
|
||||
});
|
||||
return rulesStr;
|
||||
},
|
||||
/** 查询项目租户关系列表 */
|
||||
/** 查询项目用户关系列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.projectId = this.infoData.projectId;
|
||||
listProject_tenant(this.queryParams).then(response => {
|
||||
listProject_tenant(this.queryParams).then((response) => {
|
||||
this.project_tenantList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
|
@ -317,7 +348,7 @@ export default {
|
|||
reset() {
|
||||
this.form = {
|
||||
projectId: this.infoData.projectId,
|
||||
tenantId: null
|
||||
tenantId: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
|
@ -333,7 +364,7 @@ export default {
|
|||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.projectId);
|
||||
this.ids = selection.map((item) => item.projectId);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
|
@ -346,22 +377,27 @@ export default {
|
|||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const projectId = row.projectId || this.ids;
|
||||
getProject_tenant(projectId).then(response => {
|
||||
getProject_tenant(projectId).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改项目租户关系";
|
||||
this.title = "修改项目用户关系";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
if ((this.form.tenantId !== null && this.form.tenantId !==undefined) && (this.form.projectId !== null && this.form.projectId !==undefined)) {
|
||||
addProject_tenant(this.form).then(response => {
|
||||
if (
|
||||
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.selectTableShow = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
this.$message.error('没有选择任何数据!');
|
||||
this.$message.error("没有选择任何数据!");
|
||||
}
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
|
@ -371,9 +407,9 @@ export default {
|
|||
this.$confirm("是否删除该选项?", "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
type: "warning",
|
||||
})
|
||||
.then(function() {
|
||||
.then(function () {
|
||||
return delProject_tenant(projectIds, tenantId);
|
||||
})
|
||||
.then(() => {
|
||||
|
@ -384,18 +420,18 @@ export default {
|
|||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm("是否确认导出所有项目租户关系数据项?", "警告", {
|
||||
this.$confirm("是否确认导出所有项目用户关系数据项?", "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
type: "warning",
|
||||
})
|
||||
.then(function() {
|
||||
.then(function () {
|
||||
return exportProject_tenant(queryParams);
|
||||
})
|
||||
.then(response => {
|
||||
.then((response) => {
|
||||
this.download(response.msg);
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['project:price:add']"
|
||||
>新增</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -97,14 +98,14 @@
|
|||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['iot:contract:edit']"
|
||||
v-hasPermi="['project:price:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['iot:contract:remove']"
|
||||
v-hasPermi="['project:price:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
@ -151,7 +151,7 @@ export default {
|
|||
this.form.maxVal = this.form.minVal + 1;
|
||||
}
|
||||
}
|
||||
this.$forceUpdate();
|
||||
this.$forceUpdate();0
|
||||
},
|
||||
reultEventFu() {
|
||||
this.$emit("resultEvent", { result: this.form, index: this.tempIndex });
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['project:scene:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
<el-button @click="handleQuery" size="mini">刷新</el-button>
|
||||
|
@ -98,6 +99,7 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-hasPermi="['project:scene:edit']"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>编辑</el-button
|
||||
>
|
||||
|
@ -106,6 +108,7 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
v-hasPermi="['project:scene:remove']"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
|
@ -118,6 +121,7 @@
|
|||
? 'el-icon-open'
|
||||
: 'el-icon-turn-off'
|
||||
"
|
||||
v-hasPermi="['project:scene:status']"
|
||||
@click="handleChangeStatus(scope.row)"
|
||||
>{{ scope.row.runStatus == "0" ? "停止" : "启用" }}</el-button
|
||||
>
|
||||
|
@ -126,6 +130,7 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-video-play"
|
||||
v-hasPermi="['project:scene:run']"
|
||||
@click="handleSingleRun(scope.row)"
|
||||
>执行</el-button
|
||||
>
|
||||
|
|
|
@ -163,7 +163,7 @@
|
|||
@pagination="getDeviceRecordTable"
|
||||
/>
|
||||
</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%;">
|
||||
<e-leakage-detail v-if="dialogOpen" :sourceId="sourceId" :tempType="tempType" :deviceId="deviceId"></e-leakage-detail>
|
||||
</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>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="mini" type="primary" @click="submitForm">确 定</el-button>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
</div>
|
||||
</el-tab-pane> -->
|
||||
|
||||
<!-- <el-tab-pane label="项目租户" name="tenant">
|
||||
<!-- <el-tab-pane label="项目用户" name="tenant">
|
||||
<div class="tabs-body">
|
||||
<tenant-wrap v-if="activeName === 'tenant'" :infoData="infoData" />
|
||||
</div>
|
||||
|
|
|
@ -447,7 +447,7 @@
|
|||
|
||||
<!-- <el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="选择租户" prop="videoLat">
|
||||
<el-form-item label="选择用户" prop="videoLat">
|
||||
<el-select
|
||||
v-model="form.tenantId"
|
||||
style="width: 100%"
|
||||
|
@ -513,6 +513,7 @@
|
|||
:title="upload.title"
|
||||
:visible.sync="upload.open"
|
||||
width="400px"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<el-upload
|
||||
|
@ -714,7 +715,7 @@ export default {
|
|||
this.queryParams.siteId = data[0].val;
|
||||
this.getList();
|
||||
},
|
||||
// 获取所有租户信息
|
||||
// 获取所有用户信息
|
||||
getTenantList() {
|
||||
this.tenantList = [];
|
||||
listTenant().then((response) => {
|
||||
|
@ -1124,7 +1125,7 @@ export default {
|
|||
this.title = "修改监控设备";
|
||||
});
|
||||
},
|
||||
// 分配租户
|
||||
// 分配用户
|
||||
handleDistri(row) {
|
||||
this.tempType = "distri";
|
||||
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-row>
|
||||
<el-col :span="12">
|
||||
|
@ -216,7 +216,7 @@
|
|||
</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-row>
|
||||
<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-row>
|
||||
<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-row>
|
||||
<el-col :span="12">
|
||||
|
|
|
@ -181,6 +181,7 @@
|
|||
:visible.sync="open"
|
||||
width="450px"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
|
@ -214,6 +215,7 @@
|
|||
title="工单审核"
|
||||
:visible.sync="openDetails"
|
||||
width="700px"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<power-details-wrap
|
||||
:maintenanceInfo="workDetails"
|
||||
|
|
|
@ -369,6 +369,7 @@
|
|||
@close="dialogCloes()"
|
||||
:visible.sync="openDestail"
|
||||
width="800px"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="dialot-details">
|
||||
<details-wrap
|
||||
|
|
|
@ -604,7 +604,7 @@
|
|||
</div>
|
||||
</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 />
|
||||
</el-dialog>
|
||||
</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
|
||||
ref="form"
|
||||
style="padding: 20px 20px 0px 20px"
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
<!-- 添加或修改分组集对话框 -->
|
||||
<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-item label="分组名称:" prop="cmdName">
|
||||
<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-row>
|
||||
<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-item label="属性KEY" prop="enterpriseAttribute">
|
||||
<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-item label="参数名称" prop="configName">
|
||||
<el-input v-model="form.configName" placeholder="请输入参数名称" />
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
</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-row>
|
||||
<el-col :span="24" v-if="form.parentId !== 0">
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
</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-row>
|
||||
<el-form-item label="上级行政区划" prop="parentId">
|
||||
|
|
|
@ -157,6 +157,7 @@
|
|||
: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-item label="角色名称:" prop="roleName">
|
||||
|
@ -220,6 +221,7 @@
|
|||
:visible.sync="openDataScope"
|
||||
width="500px"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form :model="form" label-width="100px">
|
||||
<el-form-item label="角色名称:">
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
/>
|
||||
</el-select>
|
||||
</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-option
|
||||
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="tenantCode" />
|
||||
<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
|
||||
label="有效期"
|
||||
|
@ -138,7 +138,7 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改企业租户对话框 -->
|
||||
<!-- 添加或修改企业用户对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
class="eldialog-wrap"
|
||||
|
@ -165,7 +165,7 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="租户状态:">
|
||||
<el-form-item label="用户状态:">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in statusOptions"
|
||||
|
@ -206,7 +206,7 @@
|
|||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 分配用户租户对话框 -->
|
||||
<!-- 分配用户用户对话框 -->
|
||||
<el-dialog
|
||||
:title="title_user"
|
||||
class="teant-child-dialog"
|
||||
|
@ -316,11 +316,11 @@ export default {
|
|||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
title_select: "选择分配租户",
|
||||
title_select: "选择分配用户",
|
||||
open_select: false,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 企业租户表格数据
|
||||
// 企业用户表格数据
|
||||
tenantList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
|
@ -328,7 +328,7 @@ export default {
|
|||
open: false,
|
||||
// 类型
|
||||
tenantTypeOptions: [],
|
||||
// 租户状态
|
||||
// 用户状态
|
||||
statusOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
|
@ -419,7 +419,7 @@ export default {
|
|||
size: "mini",
|
||||
qx: ["system:tenant:add"],
|
||||
handler: function(scope) {
|
||||
vm.handleAddChildUser(scope.row, "disUser", "租户管理");
|
||||
vm.handleAddChildUser(scope.row, "disUser", "用户管理");
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -543,7 +543,7 @@ export default {
|
|||
});
|
||||
return rulesStr;
|
||||
},
|
||||
// 租户状态字典翻译
|
||||
// 用户状态字典翻译
|
||||
statusFormat(row, column) {
|
||||
var rulesStr = "";
|
||||
this.statusOptions.forEach(v => {
|
||||
|
@ -553,7 +553,7 @@ export default {
|
|||
});
|
||||
return rulesStr;
|
||||
},
|
||||
/** 查询企业租户列表 */
|
||||
/** 查询企业用户列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listTenant(this.queryParams).then(response => {
|
||||
|
@ -605,9 +605,9 @@ export default {
|
|||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加企业租户";
|
||||
this.title = "添加企业用户";
|
||||
},
|
||||
// 添加子租户
|
||||
// 添加子用户
|
||||
handleAddChildUser(row, type, title) {
|
||||
this.tenantId = row.tenantId;
|
||||
this.tempType = type;
|
||||
|
@ -631,7 +631,7 @@ export default {
|
|||
getTenant(tenantId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改企业租户";
|
||||
this.title = "修改企业用户";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
|
@ -691,7 +691,7 @@ export default {
|
|||
// `system_tenant.xlsx`
|
||||
// );
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm("是否确认导出租户数据?", "警告", {
|
||||
this.$confirm("是否确认导出用户数据?", "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
</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-row>
|
||||
<el-col :span="24" >
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
</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-row>
|
||||
<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-item label="岗位名称" prop="postName">
|
||||
<el-input v-model="form.postName" placeholder="请输入岗位名称" />
|
||||
|
|
|
@ -179,6 +179,7 @@
|
|||
width="500px"
|
||||
append-to-body
|
||||
:destroy-on-close="true"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="角色名称" prop="roleName">
|
||||
|
@ -233,7 +234,7 @@
|
|||
</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-item label="角色名称">
|
||||
<el-input v-model="form.roleName" :disabled="true" />
|
||||
|
|
|
@ -187,7 +187,7 @@
|
|||
</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-row>
|
||||
<el-col :span="12">
|
||||
|
@ -328,7 +328,7 @@ import Treeselect from "@riophae/vue-treeselect";
|
|||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
const userType = {
|
||||
"TENANT": "企业租户",
|
||||
"TENANT": "企业用户",
|
||||
"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-item label="邮箱账号" prop="account">
|
||||
<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-item label="邮件用户" prop="configId">
|
||||
<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-item label="厂商类型">
|
||||
<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-item label="短信厂商" prop="configId">
|
||||
<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-item label="连接名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入连接名" />
|
||||
|
@ -231,7 +231,7 @@ export default {
|
|||
// 表单校验
|
||||
rules: {
|
||||
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-item label="策略名称" prop="policyName">
|
||||
<el-input v-model="form.policyName" placeholder="请输入策略名称" />
|
||||
|
@ -177,7 +177,7 @@ export default {
|
|||
// 表单校验
|
||||
rules: {
|
||||
tenantId: [
|
||||
{ required: true, message: "租户ID不能为空", trigger: "blur" }
|
||||
{ required: true, message: "用户ID不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="用户类型:">
|
||||
<span v-text="infoData.userType === 'PERSONAL' ? '租户' : '项目'"></span>
|
||||
<span v-text="infoData.userType === 'PERSONAL' ? '用户' : '项目'"></span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
@ -37,7 +37,7 @@
|
|||
|
||||
<el-row v-if="infoData.state === 1">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属租户:">
|
||||
<el-form-item label="所属用户:">
|
||||
<span>{{ infoData.tenantName }}</span>
|
||||
</el-form-item>
|
||||
</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-row>
|
||||
<el-col :span="17">
|
||||
|
@ -215,7 +215,7 @@ const stateOption = {
|
|||
"1": "待审核"
|
||||
};
|
||||
const userTypeOption = {
|
||||
"1": "租户",
|
||||
"1": "用户",
|
||||
"02": "项目"
|
||||
};
|
||||
export default {
|
||||
|
@ -262,7 +262,7 @@ export default {
|
|||
password: [
|
||||
{ required: true, message: "登录密码不能为空!", trigger: "blur" }
|
||||
],
|
||||
tenantId: [{ required: true, message: "请选择租户", trigger: "blur" }],
|
||||
tenantId: [{ required: true, message: "请选择用户", trigger: "blur" }],
|
||||
roleIds: [{ required: true, message: "请选择角色", trigger: "blur" }],
|
||||
email: [
|
||||
{ required: true, message: "用户昵称不能为空", trigger: "blur" },
|
||||
|
@ -315,7 +315,7 @@ export default {
|
|||
this.rouleList = response.rows;
|
||||
});
|
||||
},
|
||||
// 获取租户下所有部门信息 选择租户之后触发
|
||||
// 获取用户下所有部门信息 选择用户之后触发
|
||||
getDepList() {
|
||||
listDept({
|
||||
tenantId: this.form.tenantId
|
||||
|
@ -348,7 +348,7 @@ export default {
|
|||
this.getRoueList();
|
||||
this.getPostList();
|
||||
},
|
||||
// 获取所有租户信息
|
||||
// 获取所有用户信息
|
||||
getTenantList() {
|
||||
this.tenantList = [];
|
||||
listTenant().then(response => {
|
||||
|
|
|
@ -442,6 +442,7 @@
|
|||
:visible.sync="upload.open"
|
||||
width="400px"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-upload
|
||||
ref="upload"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<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-col :xs="24" :md="12" :style="{height: '350px'}">
|
||||
<vue-cropper
|
||||
|
|
|
@ -56,7 +56,7 @@ export default {
|
|||
spanClass: "span-bg1",
|
||||
valueColor: "#b176e9",
|
||||
value: "twoValue",
|
||||
title: "租户用户 (单位: 人)"
|
||||
title: "用户用户 (单位: 人)"
|
||||
},
|
||||
{
|
||||
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-item label="所属型号:" prop="modelId">
|
||||
<el-input
|
||||
|
|
|
@ -103,7 +103,8 @@ import {
|
|||
listProject,
|
||||
exportProject
|
||||
} 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 "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
|
|
Loading…
Reference in New Issue