Compare commits
7 Commits
d6a09e43a4
...
a92a8dd003
Author | SHA1 | Date |
---|---|---|
|
a92a8dd003 | |
|
685e19cc72 | |
|
491185be53 | |
|
db1a1d47e0 | |
|
cc996cd31f | |
|
c642bfdb82 | |
|
7bc96b0b41 |
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 克隆项目
|
# 克隆项目
|
||||||
git clone https://gitee.com/y_project/MuYu-Vue
|
git clone https://gitea.qinmian.online/ruoyi/cloud-ui.git
|
||||||
|
|
||||||
# 进入项目目录
|
# 进入项目目录
|
||||||
cd muyu-ui
|
cd cloud-ui
|
||||||
|
|
||||||
# 安装依赖
|
# 安装依赖
|
||||||
npm install
|
npm install
|
||||||
|
|
|
@ -0,0 +1,74 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询数据源列表
|
||||||
|
export function listSource(query) {
|
||||||
|
return request({
|
||||||
|
url: '/source/source/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function testConnection(data) {
|
||||||
|
return request({
|
||||||
|
url: '/source/source/testConnection',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询接入类型列表
|
||||||
|
export function listType() {
|
||||||
|
return request({
|
||||||
|
url: '/source/source/findAccessType',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询数据源详细
|
||||||
|
export function getSource(id) {
|
||||||
|
return request({
|
||||||
|
url: '/source/source/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增数据源
|
||||||
|
export function addSource(data) {
|
||||||
|
return request({
|
||||||
|
url: '/source/source',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改数据源
|
||||||
|
export function updateSource(data) {
|
||||||
|
return request({
|
||||||
|
url: '/source/source/'+data.id,
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//同步数据库接入
|
||||||
|
export function Synchronization(data){
|
||||||
|
return request({
|
||||||
|
url:'/source/source/synchronization',
|
||||||
|
method:'post',
|
||||||
|
data:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除数据源
|
||||||
|
export function delSource(id) {
|
||||||
|
return request({
|
||||||
|
url: '/source/source/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//资产属性列表
|
||||||
|
export function findStructure(){
|
||||||
|
return request({
|
||||||
|
url:'/source/source/findStructure',
|
||||||
|
method:'get'
|
||||||
|
})
|
||||||
|
}
|
|
@ -3,7 +3,7 @@ import request from '@/utils/request'
|
||||||
// 查询参数列表
|
// 查询参数列表
|
||||||
export function listConfig(query) {
|
export function listConfig(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/config/plus/list',
|
url: '/system/config/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
|
@ -12,7 +12,7 @@ export function listConfig(query) {
|
||||||
// 查询参数详细
|
// 查询参数详细
|
||||||
export function getConfig(configId) {
|
export function getConfig(configId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/config/plus/' + configId,
|
url: '/system/config/' + configId,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ export function getConfig(configId) {
|
||||||
// 根据参数键名查询参数值
|
// 根据参数键名查询参数值
|
||||||
export function getConfigKey(configKey) {
|
export function getConfigKey(configKey) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/config/plus/configKey/' + configKey,
|
url: '/system/config/configKey/' + configKey,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ export function getConfigKey(configKey) {
|
||||||
// 新增参数配置
|
// 新增参数配置
|
||||||
export function addConfig(data) {
|
export function addConfig(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/config/plus',
|
url: '/system/config',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
|
@ -37,7 +37,7 @@ export function addConfig(data) {
|
||||||
// 修改参数配置
|
// 修改参数配置
|
||||||
export function updateConfig(data) {
|
export function updateConfig(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/config/plus',
|
url: '/system/config',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
|
@ -46,7 +46,7 @@ export function updateConfig(data) {
|
||||||
// 删除参数配置
|
// 删除参数配置
|
||||||
export function delConfig(configId) {
|
export function delConfig(configId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/config/plus/' + configId,
|
url: '/system/config/' + configId,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ export function delConfig(configId) {
|
||||||
// 刷新参数缓存
|
// 刷新参数缓存
|
||||||
export function refreshCache() {
|
export function refreshCache() {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/config/plus/refreshCache',
|
url: '/system/config/refreshCache',
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,28 @@ export function listNotice(query) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function updateAsUserDept(id){
|
||||||
|
return request({
|
||||||
|
url:'/system/userDept/UpdateAsUserDept?id='+id,
|
||||||
|
method:'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getNum(id){
|
||||||
|
return request({
|
||||||
|
url:'/system/userDept/GetNum?noticeId='+id,
|
||||||
|
method:'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getNoticeList(data){
|
||||||
|
return request({
|
||||||
|
url:'/system/notice/GetNoticeList',
|
||||||
|
method:'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询公告详细
|
// 查询公告详细
|
||||||
export function getNotice(noticeId) {
|
export function getNotice(noticeId) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -7,7 +7,9 @@
|
||||||
<top-nav v-if="topNav" id="topmenu-container" class="topmenu-container"/>
|
<top-nav v-if="topNav" id="topmenu-container" class="topmenu-container"/>
|
||||||
|
|
||||||
<div class="right-menu">
|
<div class="right-menu">
|
||||||
|
|
||||||
<template v-if="device!=='mobile'">
|
<template v-if="device!=='mobile'">
|
||||||
|
<i class="el-icon-message-solid" @click="noticeTableList"></i>
|
||||||
<search id="header-search" class="right-menu-item"/>
|
<search id="header-search" class="right-menu-item"/>
|
||||||
<screenfull id="screenfull" class="right-menu-item hover-effect"/>
|
<screenfull id="screenfull" class="right-menu-item hover-effect"/>
|
||||||
|
|
||||||
|
@ -35,6 +37,81 @@
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="公告"
|
||||||
|
:visible.sync="noticeTableVisible"
|
||||||
|
width="50%">
|
||||||
|
<el-radio-group v-model="form.noticeType" @change="getNoticeList">
|
||||||
|
<el-radio-button label="">全部</el-radio-button>
|
||||||
|
<el-radio-button label="1">通知</el-radio-button>
|
||||||
|
<el-radio-button label="2">公告</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
<br> <br>
|
||||||
|
<el-radio-group v-model="form.isRead" @change="getNoticeList">
|
||||||
|
<el-radio-button label="">全部</el-radio-button>
|
||||||
|
<el-radio-button label="0">已读</el-radio-button>
|
||||||
|
<el-radio-button label="1">未读</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
<br><br><br>
|
||||||
|
<el-card class="box-card" v-for="notice in noticeAttr">
|
||||||
|
|
||||||
|
<!-- <div slot="header" class="clearfix">-->
|
||||||
|
<!-- <span>卡片名称</span>-->
|
||||||
|
<!-- <el-button style="float: right">阅 读 消 息</el-button>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div v-for="o in 4" :key="o" class="text item">-->
|
||||||
|
<!-- {{'列表内容 ' + o }}-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<el-descriptions class="margin-top" :title="notice.noticeTitle" :column="2" :size="size" border>
|
||||||
|
<template slot="extra">
|
||||||
|
<el-button size="small" @click="readNotice(notice)">阅读消息</el-button>
|
||||||
|
</template>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
<i class="el-icon-user"></i>
|
||||||
|
消息发布时间
|
||||||
|
</template>
|
||||||
|
{{notice.createTime}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
<i class="el-icon-user"></i>
|
||||||
|
消息发布人
|
||||||
|
</template>
|
||||||
|
{{notice.createBy}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
<i class="el-icon-tickets"></i>
|
||||||
|
消息类型
|
||||||
|
</template>
|
||||||
|
<dict-tag :options="dict.type.sys_notice_type" :value="notice.noticeType"/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
<i class="el-icon-office-building"></i>
|
||||||
|
消息当前状态
|
||||||
|
</template>
|
||||||
|
<dict-tag :options="dict.type.is_read" :value="notice.isRead"/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</el-card>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="noticeTableVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="noticeTableVisible = false">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
<el-dialog
|
||||||
|
:title="noticeInfo.noticeTitle"
|
||||||
|
:visible.sync="noticeVisble"
|
||||||
|
width="30%">
|
||||||
|
<editor v-model="noticeInfo.noticeContent" :min-height="192"/>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="noticeVisble = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="noticeVisble = false">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -46,8 +123,51 @@ import Hamburger from '@/components/Hamburger'
|
||||||
import Screenfull from '@/components/Screenfull'
|
import Screenfull from '@/components/Screenfull'
|
||||||
import SizeSelect from '@/components/SizeSelect'
|
import SizeSelect from '@/components/SizeSelect'
|
||||||
import Search from '@/components/HeaderSearch'
|
import Search from '@/components/HeaderSearch'
|
||||||
|
import {getNoticeList, updateAsUserDept} from "@/api/system/notice";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
dicts: ['is_read', 'sys_notice_type'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
noticeVisble: false,
|
||||||
|
noticeInfo: {},
|
||||||
|
noticeAttr: [
|
||||||
|
{
|
||||||
|
createTime: '',
|
||||||
|
createBy: 'admin',
|
||||||
|
noticeType: '1',
|
||||||
|
isRead: '1',
|
||||||
|
noticeTitle: '哈哈',
|
||||||
|
noticeContent: '嘻嘻嘻嘻嘻',
|
||||||
|
noticeId: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
createTime: '',
|
||||||
|
createBy: 'admin',
|
||||||
|
noticeType: '2',
|
||||||
|
isRead: '0',
|
||||||
|
noticeTitle: '哈撒大大哈',
|
||||||
|
noticeContent: '嘻嘻嘻嘻阿尽快嘻',
|
||||||
|
noticeId: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
createTime: '',
|
||||||
|
createBy: 'admin',
|
||||||
|
noticeType: '1',
|
||||||
|
isRead: '0',
|
||||||
|
noticeTitle: '哈哈是',
|
||||||
|
noticeContent: '嘻嘻嘻萨达嘻嘻',
|
||||||
|
noticeId: 3,
|
||||||
|
}
|
||||||
|
],
|
||||||
|
form: {
|
||||||
|
noticeType: '',
|
||||||
|
isRead: ''
|
||||||
|
},
|
||||||
|
messageTotal: undefined,
|
||||||
|
noticeTableVisible: false
|
||||||
|
}
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
Breadcrumb,
|
Breadcrumb,
|
||||||
TopNav,
|
TopNav,
|
||||||
|
@ -80,6 +200,25 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getNoticeList(){
|
||||||
|
getNoticeList(this.form).then(
|
||||||
|
res=>{
|
||||||
|
console.log(res)
|
||||||
|
this.noticeAttr=res.data;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
readNotice(row){
|
||||||
|
this.noticeIngo=row;
|
||||||
|
this.noticeVisble=true;
|
||||||
|
updateAsUserDept(row.id).then(res=>{
|
||||||
|
this.getNoticeList()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
noticeTableList(){
|
||||||
|
this.getNoticeList();
|
||||||
|
this.noticeTableVisible=true;
|
||||||
|
},
|
||||||
toggleSideBar() {
|
toggleSideBar() {
|
||||||
this.$store.dispatch('app/toggleSideBar')
|
this.$store.dispatch('app/toggleSideBar')
|
||||||
},
|
},
|
||||||
|
|
|
@ -73,7 +73,6 @@ service.interceptors.request.use(config => {
|
||||||
|
|
||||||
// 响应拦截器
|
// 响应拦截器
|
||||||
service.interceptors.response.use(res => {
|
service.interceptors.response.use(res => {
|
||||||
debugger
|
|
||||||
// 未设置状态码则默认成功状态
|
// 未设置状态码则默认成功状态
|
||||||
const code = res.data.code || 200;
|
const code = res.data.code || 200;
|
||||||
// 获取错误信息
|
// 获取错误信息
|
||||||
|
|
|
@ -0,0 +1,157 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>资产模型基本信息</span>
|
||||||
|
</div>
|
||||||
|
<el-descriptions border :column="2">
|
||||||
|
<el-descriptions-item label="表名称">sys_user</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="表备注">用户表</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="数据量">12536</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="是否核心">
|
||||||
|
<el-tag size="small">是</el-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</el-card>
|
||||||
|
<el-card style=" margin-top: 20px;">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>资产模型详细信息</span>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
:data="tableData"
|
||||||
|
style="width: 100%;">
|
||||||
|
<el-table-column prop="name" label="名称" />
|
||||||
|
<el-table-column prop="comment" label="注释" />
|
||||||
|
<el-table-column prop="isPrimaryKey" label="是否主键" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag size="small" :type="scope.row.isPrimaryKey === 'Y' ? 'success' : ''">
|
||||||
|
{{scope.row.isPrimaryKey}}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="type" label="类型" />
|
||||||
|
<el-table-column prop="mappingType" label="映射类型" />
|
||||||
|
<el-table-column prop="length" label="长度" />
|
||||||
|
<el-table-column prop="decimalPlaces" label="小数位" />
|
||||||
|
<el-table-column prop="isNull" label="是否为空" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag size="small" :type="scope.row.isNull === 'Y' ? 'success' : 'danger'">
|
||||||
|
{{scope.row.isNull}}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="defaultValue" label="默认值" />
|
||||||
|
<el-table-column prop="isDict" label="是否字典" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag v-if="scope.row.isDict === 'Y'" size="small" type="success">
|
||||||
|
{{scope.row.isDict}}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="dictKey" label="映射字典" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-popover
|
||||||
|
v-if="scope.row.isDict === 'Y'"
|
||||||
|
placement="left"
|
||||||
|
width="200"
|
||||||
|
trigger="hover">
|
||||||
|
<el-table :data="[
|
||||||
|
{ label: '男', value: '1' },
|
||||||
|
{ label: '女', value: '2' },
|
||||||
|
{ label: '未知', value: '0' },
|
||||||
|
]">
|
||||||
|
<el-table-column property="label" label="字典标签"/>
|
||||||
|
<el-table-column property="value" label="字典值"/>
|
||||||
|
</el-table>
|
||||||
|
<el-tag slot="reference">{{scope.row.dictKey}}</el-tag>
|
||||||
|
</el-popover>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="id" label="操作" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text">编辑</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'OverallAssetStructure',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableData: [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: "id",
|
||||||
|
comment: "主键",
|
||||||
|
isPrimaryKey: "Y",
|
||||||
|
type: "bigint",
|
||||||
|
mappingType: "Long",
|
||||||
|
length: "-",
|
||||||
|
decimalPlaces: "-",
|
||||||
|
isNull: "N",
|
||||||
|
defaultValue: "-",
|
||||||
|
isDict: "N",
|
||||||
|
dictKey: "-",
|
||||||
|
}, {
|
||||||
|
id: 2,
|
||||||
|
name: "name",
|
||||||
|
comment: "姓名",
|
||||||
|
isPrimaryKey: "N",
|
||||||
|
type: "varchar",
|
||||||
|
mappingType: "String",
|
||||||
|
length: "64",
|
||||||
|
decimalPlaces: "-",
|
||||||
|
isNull: "N",
|
||||||
|
defaultValue: "-",
|
||||||
|
isDict: "N",
|
||||||
|
dictKey: "-",
|
||||||
|
}, {
|
||||||
|
id: 3,
|
||||||
|
name: "sex",
|
||||||
|
comment: "性别",
|
||||||
|
isPrimaryKey: "N",
|
||||||
|
type: "char",
|
||||||
|
mappingType: "String",
|
||||||
|
length: "1",
|
||||||
|
decimalPlaces: "-",
|
||||||
|
isNull: "N",
|
||||||
|
defaultValue: "-",
|
||||||
|
isDict: "Y",
|
||||||
|
dictKey: "system_sex",
|
||||||
|
}, {
|
||||||
|
id: 4,
|
||||||
|
name: "price",
|
||||||
|
comment: "金额",
|
||||||
|
isPrimaryKey: "N",
|
||||||
|
type: "double",
|
||||||
|
mappingType: "BigDecimal",
|
||||||
|
length: "10",
|
||||||
|
decimalPlaces: "2",
|
||||||
|
isNull: "N",
|
||||||
|
defaultValue: "0.00",
|
||||||
|
isDict: "N",
|
||||||
|
dictKey: "-",
|
||||||
|
}, {
|
||||||
|
id: 5,
|
||||||
|
name: "create_time",
|
||||||
|
comment: "创建时间",
|
||||||
|
isPrimaryKey: "N",
|
||||||
|
type: "datetime",
|
||||||
|
mappingType: "Date",
|
||||||
|
length: "-",
|
||||||
|
decimalPlaces: "-",
|
||||||
|
isNull: "Y",
|
||||||
|
defaultValue: "-",
|
||||||
|
isDict: "N",
|
||||||
|
dictKey: "-",
|
||||||
|
}, ]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
|
@ -0,0 +1,178 @@
|
||||||
|
<template>
|
||||||
|
<el-row :gutter="40" class="panel-group">
|
||||||
|
<div class="title-header">
|
||||||
|
整体数据资产结构概述
|
||||||
|
</div>
|
||||||
|
<el-col :lg="8" :sm="12" :xs="12" class="card-panel-col">
|
||||||
|
<div class="card-panel" @click="handleSetLineChartData('newVisitis')">
|
||||||
|
<div class="card-panel-icon-wrapper icon-people">
|
||||||
|
<svg-icon class-name="card-panel-icon" icon-class="database"/>
|
||||||
|
</div>
|
||||||
|
<div class="card-panel-description">
|
||||||
|
<div class="card-panel-text">
|
||||||
|
数据接入
|
||||||
|
</div>
|
||||||
|
<count-to :duration="2600" :end-val="4" :start-val="0" class="card-panel-num"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="8" :sm="12" :xs="12" class="card-panel-col">
|
||||||
|
<div class="card-panel" @click="handleSetLineChartData('messages')">
|
||||||
|
<div class="card-panel-icon-wrapper icon-message">
|
||||||
|
<svg-icon class-name="card-panel-icon" icon-class="table"/>
|
||||||
|
</div>
|
||||||
|
<div class="card-panel-description">
|
||||||
|
<div class="card-panel-text">
|
||||||
|
资产模型
|
||||||
|
</div>
|
||||||
|
<count-to :duration="3000" :end-val="96" :start-val="0" class="card-panel-num"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="8" :sm="12" :xs="12" class="card-panel-col">
|
||||||
|
<div class="card-panel" @click="handleSetLineChartData('purchases')">
|
||||||
|
<div class="card-panel-icon-wrapper icon-money">
|
||||||
|
<svg-icon class-name="card-panel-icon" icon-class="field"/>
|
||||||
|
</div>
|
||||||
|
<div class="card-panel-description">
|
||||||
|
<div class="card-panel-text">
|
||||||
|
数据模型
|
||||||
|
</div>
|
||||||
|
<count-to :duration="3200" :end-val="560" :start-val="0" class="card-panel-num"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import CountTo from 'vue-count-to'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
CountTo
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleSetLineChartData(type) {
|
||||||
|
this.$emit('handleSetLineChartData', type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.panel-group {
|
||||||
|
margin-top: 18px;
|
||||||
|
|
||||||
|
.card-panel-col {
|
||||||
|
margin-bottom: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-panel {
|
||||||
|
height: 108px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 12px;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
color: #666;
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
|
||||||
|
border-color: rgba(0, 0, 0, .05);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
.card-panel-icon-wrapper {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-people {
|
||||||
|
background: #40c9c6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-message {
|
||||||
|
background: #36a3f7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-money {
|
||||||
|
background: #f4516c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-shopping {
|
||||||
|
background: #34bfa3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-people {
|
||||||
|
color: #40c9c6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-message {
|
||||||
|
color: #36a3f7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-money {
|
||||||
|
color: #f4516c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-shopping {
|
||||||
|
color: #34bfa3
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-panel-icon-wrapper {
|
||||||
|
float: left;
|
||||||
|
margin: 14px 0 0 14px;
|
||||||
|
padding: 16px;
|
||||||
|
transition: all 0.38s ease-out;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-panel-icon {
|
||||||
|
float: left;
|
||||||
|
font-size: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-panel-description {
|
||||||
|
float: right;
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 26px;
|
||||||
|
margin-left: 0px;
|
||||||
|
|
||||||
|
.card-panel-text {
|
||||||
|
line-height: 18px;
|
||||||
|
color: rgba(0, 0, 0, 0.45);
|
||||||
|
font-size: 16px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-panel-num {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 550px) {
|
||||||
|
.card-panel-description {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-panel-icon-wrapper {
|
||||||
|
float: none !important;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0 !important;
|
||||||
|
|
||||||
|
.svg-icon {
|
||||||
|
display: block;
|
||||||
|
margin: 14px auto !important;
|
||||||
|
float: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.title-header{
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 46px;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 100px;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,187 @@
|
||||||
|
<template>
|
||||||
|
<el-row :gutter="40" class="panel-group">
|
||||||
|
<div class="title-header">
|
||||||
|
{{title}} - 资产结构概述
|
||||||
|
</div>
|
||||||
|
<el-col :sm="12" :xs="12" class="card-panel-col">
|
||||||
|
<div class="card-panel" @click="handleSetLineChartData('messages')">
|
||||||
|
<div class="card-panel-icon-wrapper icon-message">
|
||||||
|
<svg-icon class-name="card-panel-icon" icon-class="table"/>
|
||||||
|
</div>
|
||||||
|
<div class="card-panel-description">
|
||||||
|
<div class="card-panel-text">
|
||||||
|
资产模型
|
||||||
|
</div>
|
||||||
|
<count-to :duration="3000" :end-val="15" :start-val="0" class="card-panel-num"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :sm="12" :xs="12" class="card-panel-col">
|
||||||
|
<div class="card-panel" @click="handleSetLineChartData('purchases')">
|
||||||
|
<div class="card-panel-icon-wrapper icon-money">
|
||||||
|
<svg-icon class-name="card-panel-icon" icon-class="field"/>
|
||||||
|
</div>
|
||||||
|
<div class="card-panel-description">
|
||||||
|
<div class="card-panel-text">
|
||||||
|
数据模型
|
||||||
|
</div>
|
||||||
|
<count-to :duration="3200" :end-val="230" :start-val="0" class="card-panel-num"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-tabs v-model="activeName" type="border-card">
|
||||||
|
<el-tab-pane label="sys_user(用户表)" name="first">
|
||||||
|
<overall-asset-structure/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="sys_dept(部门表)" name="second">sys_dept(部门表)</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import CountTo from 'vue-count-to'
|
||||||
|
import OverallAssetStructure from "@/views/dataSource/assets/OverallAssetStructure.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: "-"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeName: 'first',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
OverallAssetStructure,
|
||||||
|
CountTo
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleSetLineChartData(type) {
|
||||||
|
this.$emit('handleSetLineChartData', type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.panel-group {
|
||||||
|
margin-top: 18px;
|
||||||
|
|
||||||
|
.card-panel-col {
|
||||||
|
margin-bottom: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-panel {
|
||||||
|
height: 108px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 12px;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
color: #666;
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
|
||||||
|
border-color: rgba(0, 0, 0, .05);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
.card-panel-icon-wrapper {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-people {
|
||||||
|
background: #40c9c6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-message {
|
||||||
|
background: #36a3f7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-money {
|
||||||
|
background: #f4516c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-shopping {
|
||||||
|
background: #34bfa3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-people {
|
||||||
|
color: #40c9c6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-message {
|
||||||
|
color: #36a3f7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-money {
|
||||||
|
color: #f4516c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-shopping {
|
||||||
|
color: #34bfa3
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-panel-icon-wrapper {
|
||||||
|
float: left;
|
||||||
|
margin: 14px 0 0 14px;
|
||||||
|
padding: 16px;
|
||||||
|
transition: all 0.38s ease-out;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-panel-icon {
|
||||||
|
float: left;
|
||||||
|
font-size: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-panel-description {
|
||||||
|
float: right;
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 26px;
|
||||||
|
margin-left: 0px;
|
||||||
|
|
||||||
|
.card-panel-text {
|
||||||
|
line-height: 18px;
|
||||||
|
color: rgba(0, 0, 0, 0.45);
|
||||||
|
font-size: 16px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-panel-num {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 550px) {
|
||||||
|
.card-panel-description {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-panel-icon-wrapper {
|
||||||
|
float: none !important;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0 !important;
|
||||||
|
|
||||||
|
.svg-icon {
|
||||||
|
display: block;
|
||||||
|
margin: 14px auto !important;
|
||||||
|
float: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.title-header{
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 46px;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 100px;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,91 @@
|
||||||
|
<template>
|
||||||
|
|
||||||
|
|
||||||
|
<el-container :style="{height: mainHeight + 'px'}">
|
||||||
|
<el-aside>
|
||||||
|
<el-tree :data="assetStructureList"
|
||||||
|
:load="expandTable"
|
||||||
|
lazy
|
||||||
|
@node-click="(data) => showAssets=data.type"
|
||||||
|
:props="defaultProps">
|
||||||
|
<div class="custom-tree-node" slot-scope="{ node, data }">
|
||||||
|
<div v-if="data.type === 0">{{ data. accessSourceName + '('+data.databaseName + '-' + data.dataSourceSystemName+')' }}</div>
|
||||||
|
<div v-if="data.type === 1">{{ data.name + '-'+data.as + '(' + data.dataTotal+'条)' }}</div>
|
||||||
|
</div>
|
||||||
|
</el-tree>
|
||||||
|
</el-aside>
|
||||||
|
<el-container>
|
||||||
|
<el-main>
|
||||||
|
<OverallAssets v-if="showAssets == null"/>
|
||||||
|
<overall-specific-assets v-if="showAssets === 0" :title="title"/>
|
||||||
|
<overall-asset-structure v-if="showAssets === 1" :title="title"/>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import OverallSpecificAssets from "@/views/dataSource/assets/OverallSpecificAssets.vue";
|
||||||
|
import OverallAssets from "@/views/dataSource/assets/OverallAssets.vue";
|
||||||
|
import {findStructure} from "@/api/dataSource/source";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'assets',
|
||||||
|
components: { OverallSpecificAssets, OverallAssets },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
mainHeight: window.innerHeight - 85,
|
||||||
|
defaultProps: {
|
||||||
|
children: 'childrenList',
|
||||||
|
label: 'name'
|
||||||
|
},
|
||||||
|
assetStructureList: [],
|
||||||
|
childrenList: [],
|
||||||
|
showAssets: null,
|
||||||
|
title: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.findTest();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
expandTable(node, resolve) {
|
||||||
|
if (node.level === 0) return resolve(this.assetStructureList);
|
||||||
|
|
||||||
|
|
||||||
|
const {data} = node;
|
||||||
|
this.showAssets = data.type;
|
||||||
|
if (data.type === 1) {
|
||||||
|
return resolve([])
|
||||||
|
}
|
||||||
|
this.title = data.accessSourceName + '('+data.databaseName + '-' + data.dataSourceSystemName+')'
|
||||||
|
setTimeout(() => {
|
||||||
|
resolve(this.childrenList)
|
||||||
|
}, 500);
|
||||||
|
},
|
||||||
|
findTest(){
|
||||||
|
findStructure().then(
|
||||||
|
res=>{
|
||||||
|
this.assetStructureList=res.data.assetStructureList;
|
||||||
|
this.childrenList=res.data.databaseTableInformationList;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.el-aside {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
width: 400px;
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-main {
|
||||||
|
background-color: #f1f1f1;
|
||||||
|
}
|
||||||
|
.custom-tree-node{
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,572 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="接入源名称" prop="accessSourceName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.accessSourceName"
|
||||||
|
placeholder="请输入接入源名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据来源系统名称" prop="dataSourceSystemName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.dataSourceSystemName"
|
||||||
|
placeholder="请输入数据来源系统名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="主机地址" prop="hostAddress">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.hostAddress"
|
||||||
|
placeholder="请输入主机地址"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="主机端口" prop="hostPort">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.hostPort"
|
||||||
|
placeholder="请输入主机端口"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据连接类型ID" prop="dataAccessTypeId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.dataAccessTypeId"
|
||||||
|
placeholder="请输入数据连接类型ID"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据库名称" prop="databaseName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.databaseName"
|
||||||
|
placeholder="请输入数据库名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="初始连接数量" prop="initialQuantity">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.initialQuantity"
|
||||||
|
placeholder="请输入初始连接数量"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="最大连接数量" prop="maximumQuantity">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.maximumQuantity"
|
||||||
|
placeholder="请输入最大连接数量"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="最大等待时间" prop="maximumTime">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.maximumTime"
|
||||||
|
placeholder="请选择最大等待时间"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="最大等待次数" prop="maximumFrequency">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.maximumFrequency"
|
||||||
|
placeholder="请输入最大等待次数"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</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-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['source:source:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['source:source:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['source:source:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['source:source:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="sourceList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="数据管理id" align="center" prop="id" />
|
||||||
|
<el-table-column label="接入源名称" align="center" prop="accessSourceName" />
|
||||||
|
<el-table-column label="数据来源系统名称" align="center" prop="dataSourceSystemName" />
|
||||||
|
<el-table-column label="主机地址" align="center" prop="hostAddress" />
|
||||||
|
<el-table-column label="主机端口" align="center" prop="hostPort" />
|
||||||
|
<el-table-column label="数据连接类型ID" align="center" prop="dataAccessTypeId" />
|
||||||
|
<el-table-column label="数据库名称" align="center" prop="databaseName" />
|
||||||
|
<el-table-column label="数据连接参数" align="center" prop="dataConnectionParameter" />
|
||||||
|
<el-table-column label="初始连接数量" align="center" prop="initialQuantity" />
|
||||||
|
<el-table-column label="最大连接数量" align="center" prop="maximumQuantity" />
|
||||||
|
<el-table-column label="最大等待时间" align="center" prop="maximumTime" />
|
||||||
|
<el-table-column label="最大等待次数" align="center" prop="maximumFrequency" />
|
||||||
|
<el-table-column label="连接数据库用户名" align="center" prop="databaseUserName" />
|
||||||
|
<el-table-column label="连接数据库用户密码" align="center" prop="databaseUserPassword" />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="testConnection(scope.row)"
|
||||||
|
>测试连接</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['source:source:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['source:source:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="Synchronization(scope.row)"
|
||||||
|
>同步数据库</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 添加或修改数据接入对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="80%" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="140px">
|
||||||
|
<el-card>
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>基础配置信息</span>
|
||||||
|
</div>
|
||||||
|
<el-row>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="接入源名称" prop="accessSourceName">
|
||||||
|
<el-input v-model="form.accessSourceName" placeholder="请输入接入源名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="数据来源系统名称" prop="dataSourceSystemName">
|
||||||
|
<el-input v-model="form.dataSourceSystemName" placeholder="请输入数据来源系统名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="主机地址" prop="hostAddress">
|
||||||
|
<el-input v-model="form.hostAddress" placeholder="请输入主机地址" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="主机端口" prop="port">
|
||||||
|
<el-input v-model="form.hostPort" placeholder="请输入主机端口" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="数据接入类型" prop="type">
|
||||||
|
<el-select style="width: 100%" v-model="form.dataAccessTypeId">
|
||||||
|
<el-option
|
||||||
|
v-for="item in accessTypes"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.accessName"
|
||||||
|
:value="item.id">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="数据库名称" prop="databaseName">
|
||||||
|
<el-input v-model="form.databaseName" placeholder="请输入数据库名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="数据库用户名" prop="databaseUserName">
|
||||||
|
<el-input v-model="form.databaseUserName" placeholder="请输入数据库名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="数据库用户密码" prop="databaseUserPassword">
|
||||||
|
<el-input v-model="form.databaseUserPassword" placeholder="请输入数据库名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-card>
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>数据连接参数</span>
|
||||||
|
</div>
|
||||||
|
<el-col :sm="24">
|
||||||
|
<el-form-item label="数据连接参数" prop="dataConnectionParameter">
|
||||||
|
<el-input v-model="form.dataConnectionParameter" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-row :gutter="10" style="margin: 10px 0">
|
||||||
|
<el-col :span="2">
|
||||||
|
<el-button type="primary" @click="addParam()">新增参数</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2">
|
||||||
|
<el-button type="danger" @click="deleteParam(null)">清空参数</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :md="8" :xs="12" style="margin: 10px 0" v-for="(dataSourceParam, dataSourceParamIndex) in dataSourceParamList">
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-input v-model="dataSourceParam.name" placeholder="请输入参数键" @keyup.native="processParam"/>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1"><span style="font-size: 28px; margin: 0 3px 0 0;">:</span></el-col>
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-input v-model="dataSourceParam.val" placeholder="请输入参数值" @keyup.native="processParam"/>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<el-button type="danger" @click="deleteParam(dataSourceParamIndex)">删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<el-card style="margin-top: 20px">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>连接池配置</span>
|
||||||
|
</div>
|
||||||
|
<el-row>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="初始连接数量" prop="initialQuantity">
|
||||||
|
<el-input v-model="form.initialQuantity" placeholder="请输入初始连接数量" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="最大连接数量" prop="maximumQuantity">
|
||||||
|
<el-input v-model="form.maximumQuantity" placeholder="请输入最大连接数量" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="最大等待时间" prop="maximumTime">
|
||||||
|
<el-input v-model="form.maximumTime" placeholder="请输入最大等待时间" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="最大等待次数" prop="maximumFrequency">
|
||||||
|
<el-input v-model="form.maximumFrequency" placeholder="请输入最大等待次数" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card style="margin-top: 20px">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>其他信息</span>
|
||||||
|
</div>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-card>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
listSource,
|
||||||
|
getSource,
|
||||||
|
delSource,
|
||||||
|
addSource,
|
||||||
|
updateSource,
|
||||||
|
listType,
|
||||||
|
testConnection, Synchronization
|
||||||
|
} from "@/api/dataSource/source";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Source",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 数据源表格数据
|
||||||
|
sourceList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
accessSourceName: null,
|
||||||
|
dataSourceSystemName: null,
|
||||||
|
hostAddress: null,
|
||||||
|
hostPort: null,
|
||||||
|
dataAccessTypeId: null,
|
||||||
|
databaseName: null,
|
||||||
|
dataConnectionParameter: null,
|
||||||
|
initialQuantity: null,
|
||||||
|
maximumQuantity: null,
|
||||||
|
maximumTime: null,
|
||||||
|
maximumFrequency: null,
|
||||||
|
databaseUserName: null,
|
||||||
|
databaseUserPassword: null,
|
||||||
|
},
|
||||||
|
accessTypes:[],
|
||||||
|
dataSourceParamList:[],
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
// 条件参数内容
|
||||||
|
dataSourceParamList: [
|
||||||
|
{
|
||||||
|
name: null,
|
||||||
|
val: null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
this.findAccessType();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
Synchronization(dataSource){
|
||||||
|
Synchronization(dataSource).then(
|
||||||
|
res=>{
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
testConnection(source){
|
||||||
|
testConnection(source).then(
|
||||||
|
res=>{
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
//查询接入类型列表
|
||||||
|
findAccessType(){
|
||||||
|
listType().then(
|
||||||
|
res=>{
|
||||||
|
this.accessTypes=res.data;
|
||||||
|
console.log("res",this.accessTypes)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
// 添加参数
|
||||||
|
addParam(){
|
||||||
|
this.dataSourceParamList.push({
|
||||||
|
name: null,
|
||||||
|
val: null
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 删除参数
|
||||||
|
deleteParam(index){
|
||||||
|
if (index != null){
|
||||||
|
this.dataSourceParamList.splice(index, 1);
|
||||||
|
}else {
|
||||||
|
this.dataSourceParamList = []
|
||||||
|
}
|
||||||
|
this.processParam();
|
||||||
|
},
|
||||||
|
// 处理参数
|
||||||
|
processParam(){
|
||||||
|
this.form.dataConnectionParameter = this.dataSourceParamList
|
||||||
|
.filter(item => item.name != null || item.val != null)
|
||||||
|
.map(item => {
|
||||||
|
return item.name + "=" + item.val;
|
||||||
|
}).join("&")
|
||||||
|
console.log(this.form.dataConnectionParameter)
|
||||||
|
},
|
||||||
|
/** 查询数据源列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listSource(this.queryParams).then(response => {
|
||||||
|
this.sourceList = response.data.rows;
|
||||||
|
this.total = response.data.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
accessSourceName: null,
|
||||||
|
dataSourceSystemName: null,
|
||||||
|
hostAddress: null,
|
||||||
|
hostPort: null,
|
||||||
|
dataAccessTypeId: null,
|
||||||
|
databaseName: null,
|
||||||
|
dataConnectionParameter: null,
|
||||||
|
initialQuantity: null,
|
||||||
|
maximumQuantity: null,
|
||||||
|
maximumTime: null,
|
||||||
|
maximumFrequency: null,
|
||||||
|
databaseUserName: null,
|
||||||
|
databaseUserPassword: null,
|
||||||
|
remark: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加数据源";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
this.form = row;
|
||||||
|
this.dataSourceParamList = [];
|
||||||
|
this.form.dataConnectionParameter.split("&").forEach(param => {
|
||||||
|
let paramArr = param.split("=");
|
||||||
|
this.dataSourceParamList.push({
|
||||||
|
name: paramArr[0],
|
||||||
|
val: paramArr[1]
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改数据接入";
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateSource(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addSource(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除数据源编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delSource(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('dataSource/source/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `source_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -80,7 +80,7 @@ export default {
|
||||||
},
|
},
|
||||||
loginRules: {
|
loginRules: {
|
||||||
username: [
|
username: [
|
||||||
{required: true, trigger: "blur", message: "请输入您的账号"}
|
{required: true, trigger: "blur", message: "请输入您的账号/邮箱"}
|
||||||
],
|
],
|
||||||
password: [
|
password: [
|
||||||
{required: true, trigger: "blur", message: "请输入您的密码"}
|
{required: true, trigger: "blur", message: "请输入您的密码"}
|
||||||
|
|
|
@ -234,7 +234,9 @@ export default {
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listDept(this.queryParams).then(response => {
|
listDept(this.queryParams).then(response => {
|
||||||
|
console.log(response.data);
|
||||||
this.deptList = this.handleTree(response.data, "deptId");
|
this.deptList = this.handleTree(response.data, "deptId");
|
||||||
|
console.log(this.deptList);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -99,6 +99,13 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" class-name="small-padding fixed-width" label="操作">
|
<el-table-column align="center" class-name="small-padding fixed-width" label="操作">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
v-hasPermi="['system:notice:edit']"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="noticeDetails(scope.row.noticeId)"
|
||||||
|
>通知详情</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-hasPermi="['system:notice:edit']"
|
v-hasPermi="['system:notice:edit']"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
|
@ -160,6 +167,16 @@
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col v-show="form.noticeType==2">
|
||||||
|
<span style="margin-right: 15px;margin-left: 10px"><b>公告时间</b></span>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.time"
|
||||||
|
type="datetimerange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="内容">
|
<el-form-item label="内容">
|
||||||
<editor v-model="form.noticeContent" :min-height="192"/>
|
<editor v-model="form.noticeContent" :min-height="192"/>
|
||||||
|
@ -167,22 +184,92 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<el-cascader
|
||||||
|
:options="options"
|
||||||
|
:props="props"
|
||||||
|
clearable v-if="form.noticeType==1"></el-cascader>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<el-tabs v-show="form.noticeType == 1" v-model="activeName" @tab-click="handleClick">
|
||||||
|
<el-tab-pane label="部门" name="section">
|
||||||
|
{{ form.sectionList }}
|
||||||
|
<el-cascader
|
||||||
|
v-model="form.sectionList"
|
||||||
|
:options="options1"
|
||||||
|
:props="props"
|
||||||
|
style="width: 350px"
|
||||||
|
clearable>
|
||||||
|
</el-cascader>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="特定人员" name="personnel">
|
||||||
|
{{ form.personnelList }}
|
||||||
|
<el-select v-model="form.personnelList" multiple placeholder="请选择特定人员">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.userId"
|
||||||
|
:label="item.nickName"
|
||||||
|
:value="item.userId">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="通知详情"
|
||||||
|
:visible.sync="numVisable"
|
||||||
|
width="40%">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="6">
|
||||||
|
<div>
|
||||||
|
<el-statistic
|
||||||
|
:value="asUserDeptNum.num"
|
||||||
|
title="总共通知数量"
|
||||||
|
></el-statistic>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<div>
|
||||||
|
<el-statistic
|
||||||
|
:value="asUserDeptNum.readNum"
|
||||||
|
title="已阅读通知数量"
|
||||||
|
></el-statistic>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<div>
|
||||||
|
<el-statistic
|
||||||
|
:value="asUserDeptNum.noReadNum"
|
||||||
|
title="未阅读通知数量"
|
||||||
|
></el-statistic>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="numVisable = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="numVisable = false">确 定</el-button>
|
||||||
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {addNotice, delNotice, getNotice, listNotice, updateNotice} from "@/api/system/notice";
|
import {addNotice, delNotice, getNotice, getNum, listNotice, updateNotice} from "@/api/system/notice";
|
||||||
|
import {listDept} from "@/api/system/dept";
|
||||||
|
import {listUser} from "@/api/system/user";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Notice",
|
name: "Notice",
|
||||||
dicts: ['sys_notice_status', 'sys_notice_type'],
|
dicts: ['sys_notice_status', 'sys_notice_type'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
sectionsList:[],
|
||||||
|
personne1List:[],
|
||||||
|
props: { multiple: true },
|
||||||
|
options:[],
|
||||||
|
options1:[],
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
|
@ -209,6 +296,14 @@ export default {
|
||||||
createBy: undefined,
|
createBy: undefined,
|
||||||
status: undefined
|
status: undefined
|
||||||
},
|
},
|
||||||
|
queryParam:{
|
||||||
|
pageNum:1,
|
||||||
|
pageSize:10,
|
||||||
|
noticeType:undefined,
|
||||||
|
createBy:undefined,
|
||||||
|
status:undefined,
|
||||||
|
},
|
||||||
|
depts:[],
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
|
@ -219,13 +314,46 @@ export default {
|
||||||
noticeType: [
|
noticeType: [
|
||||||
{required: true, message: "公告类型不能为空", trigger: "change"}
|
{required: true, message: "公告类型不能为空", trigger: "change"}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
asUserDeptNum:{},
|
||||||
|
numVisAble:false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.getDeptList();
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
noticeDetails(noticeId){
|
||||||
|
this.numVisAble=true;
|
||||||
|
getNum(noticeId).then(res=>{
|
||||||
|
this.asUserDeptNum=res.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//部门递归
|
||||||
|
recursion(data){
|
||||||
|
data.forEach(res=>{
|
||||||
|
this.$set(res,'value',res.deptId);
|
||||||
|
delete res.deptId;
|
||||||
|
this.$set(res,'label',res.deptName);
|
||||||
|
delete res.deptName;
|
||||||
|
if (res.children){
|
||||||
|
this.recursion(res.children)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//tab选择
|
||||||
|
handleClick(tab,event){
|
||||||
|
|
||||||
|
},
|
||||||
|
getDeptList(){
|
||||||
|
listDept(null).then(
|
||||||
|
res=>{
|
||||||
|
console.log(res.data)
|
||||||
|
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
/** 查询公告列表 */
|
/** 查询公告列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -247,7 +375,9 @@ export default {
|
||||||
noticeTitle: undefined,
|
noticeTitle: undefined,
|
||||||
noticeType: undefined,
|
noticeType: undefined,
|
||||||
noticeContent: undefined,
|
noticeContent: undefined,
|
||||||
status: "0"
|
status: "0",
|
||||||
|
sectionList:[],
|
||||||
|
personne1List:[],
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
@ -272,6 +402,27 @@ export default {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加公告";
|
this.title = "添加公告";
|
||||||
|
listDept(this.queryParam).then(
|
||||||
|
res=>{
|
||||||
|
this.options1=this.handleTree(res.data,"deptId");
|
||||||
|
console.log(this.options1);
|
||||||
|
this.options1.forEach(res=>{
|
||||||
|
this.$set(res,'value',res.deptId);
|
||||||
|
delete res.deptId;
|
||||||
|
this.$set(res,'label',res.deptName);
|
||||||
|
delete res.deptName;
|
||||||
|
if (res.children){
|
||||||
|
this.recursion(res.children)
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
this.loading = false;
|
||||||
|
|
||||||
|
})
|
||||||
|
listUser(this.addDateRange(this.queryParams, [])).then(response => {
|
||||||
|
this.options = response.data.rows;
|
||||||
|
console.log(this.options)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
|
|
|
@ -352,6 +352,7 @@
|
||||||
</el-link>
|
</el-link>
|
||||||
</div>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||||
<el-button @click="upload.open = false">取 消</el-button>
|
<el-button @click="upload.open = false">取 消</el-button>
|
||||||
|
@ -374,6 +375,7 @@ import {
|
||||||
import {getToken} from "@/utils/auth";
|
import {getToken} from "@/utils/auth";
|
||||||
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 {forceLogout, list} from "@/api/monitor/online";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "User",
|
name: "User",
|
||||||
|
@ -381,6 +383,10 @@ export default {
|
||||||
components: {Treeselect},
|
components: {Treeselect},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
// queryParam: {
|
||||||
|
// ipaddr: undefined,
|
||||||
|
// userName: undefined
|
||||||
|
// },
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
|
@ -624,6 +630,14 @@ export default {
|
||||||
}).then(({value}) => {
|
}).then(({value}) => {
|
||||||
resetUserPwd(row.userId, value).then(response => {
|
resetUserPwd(row.userId, value).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功,新密码是:" + value);
|
this.$modal.msgSuccess("修改成功,新密码是:" + value);
|
||||||
|
// list(this.queryParam).then(res => {
|
||||||
|
// const userList = res.data.rows
|
||||||
|
// userList.forEach(userInfo => {
|
||||||
|
// if (userInfo.userName == row.userName){
|
||||||
|
// forceLogout(userInfo.tokenId);
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// })
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue