yujialong 3 years ago
parent 1bf612f841
commit 3dbf213b0a
  1. 15
      src/api/index.js
  2. 19
      src/layouts/header/index.vue
  3. 6
      src/libs/util.js
  4. 150
      src/pages/data/list/index.vue
  5. 31
      src/pages/index/list/index.vue
  6. 22
      src/pages/role/list/index.vue
  7. 16
      src/pages/setting/person/download.vue
  8. 4
      src/pages/setting/person/info.vue
  9. 49
      src/pages/stat/list/index.vue
  10. 34
      src/pages/user/list/index.vue
  11. 2
      src/router/permission.js
  12. 2
      src/setting.js
  13. 33
      src/styles/common.scss

@ -1,9 +1,5 @@
import Setting from '@/setting' import Setting from '@/setting'
let uploadURL = Setting.upload.apiURL
let host = 'http://39.108.250.202:9000'//
let host1 = 'http://192.168.31.125:9000'//林 let host1 = 'http://192.168.31.125:9000'//林
let host2 = 'http://192.168.31.140:9000'//7
let host3 = 'http://192.168.31.137:9000'//陈
export default { export default {
// 登录注册 // 登录注册
@ -13,8 +9,6 @@ export default {
// 公用接口 // 公用接口
queryProvince: `/nakadai/nakadai/province/queryProvince`, queryProvince: `/nakadai/nakadai/province/queryProvince`,
queryCity: `/nakadai/nakadai/city/queryCity`, queryCity: `/nakadai/nakadai/city/queryCity`,
queryWorkNumberIsExist:`evaluation/tms/userInfo/queryWorkNumberIsExist`,
queryStaffWorkNumberIsExist:`evaluation/tms/system/queryStaffWorkNumberIsExist`,
querySchool: `/nakadai/nakadai/school/querySchool`, querySchool: `/nakadai/nakadai/school/querySchool`,
queryCourseDiscipline: `/nakadai/nakadai/discipline/queryDiscipline`, queryCourseDiscipline: `/nakadai/nakadai/discipline/queryDiscipline`,
queryCourseProfessionalClass: `/nakadai/nakadai/professionalClass/queryProfessionalClass`, queryCourseProfessionalClass: `/nakadai/nakadai/professionalClass/queryProfessionalClass`,
@ -26,15 +20,6 @@ export default {
updateUser:`/users/users/userInfo/updateUser`, updateUser:`/users/users/userInfo/updateUser`,
findPasswordByEmail:`/users/users/userAccount/findPasswordByEmail`, findPasswordByEmail:`/users/users/userAccount/findPasswordByEmail`,
findPasswordByPhone:`/users/users/userAccount/findPasswordByPhone`, findPasswordByPhone:`/users/users/userAccount/findPasswordByPhone`,
bingEmail:`evaluation/tms/user/bingEmail`,
bindPhone:`evaluation/tms/user/bindPhone`,
// oss文件管理
fileDeletion: `${uploadURL}/oss/manage/fileDeletion`,
fileupload: `${uploadURL}/oss/manage/fileupload`,
getPlayAuth: `${uploadURL}/oss/manage/getPlayAuth`,
removeMoreVideo: `${uploadURL}/oss/manage/removeMoreVideo`,
removeVideo: `${uploadURL}/oss/manage/removeVideo`,
// 用户管理 // 用户管理
saveUser: `/users/users/data/user/save`, saveUser: `/users/users/data/user/save`,

@ -1,9 +1,10 @@
<template> <template>
<div class="header"> <div class="header">
<div class="inner">
<a class="logo" @click="toIndex"> <a class="logo" @click="toIndex">
<img src="@/assets/img/logo.png" alt=""> <img v-if="isLogin || (isManager && showSetting) || !isUser" src="@/assets/img/logo.png" alt="">
<span v-if="token && isManager && !showSetting">{{schoolName}}</span>
</a> </a>
<div class="inner">
<div style="height: 80px;"></div> <div style="height: 80px;"></div>
<navbar ref="nav"></navbar> <navbar ref="nav"></navbar>
<div class="action" v-if="token"> <div class="action" v-if="token">
@ -35,14 +36,14 @@
</div> </div>
<el-dialog title="修改密码" :visible.sync="passwordVisible" :close-on-click-modal="false" @close="closePassword" width="30%"> <el-dialog title="修改密码" :visible.sync="passwordVisible" :close-on-click-modal="false" @close="closePassword" width="30%">
<el-form ref="passwordForm" label-width="60px"> <el-form ref="passwordForm" label-width="82px">
<el-form-item label="原密码"> <el-form-item label="原密码">
<el-input type="password" v-model="passwordForm.password" placeholder="请输入原密码"></el-input> <el-input type="password" v-model="passwordForm.password" placeholder="请输入原密码"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="新密码"> <el-form-item label="新密码">
<el-input type="password" v-model="passwordForm.newPassword" placeholder="请输入新密码" @keyup.enter.native="editPassword"></el-input> <el-input type="password" v-model="passwordForm.newPassword" placeholder="请输入新密码" @keyup.enter.native="editPassword"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="新密码"> <el-form-item label="确认新密码">
<el-input type="password" v-model="passwordForm.reNewPassword" placeholder="请确认新密码" @keyup.enter.native="editPassword"></el-input> <el-input type="password" v-model="passwordForm.reNewPassword" placeholder="请确认新密码" @keyup.enter.native="editPassword"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -68,6 +69,7 @@ export default {
isUser: false, isUser: false,
showSetting: true, showSetting: true,
id: '', id: '',
schoolName: '',
passwordVisible: false, passwordVisible: false,
passwordForm: { passwordForm: {
password: '', password: '',
@ -108,6 +110,7 @@ export default {
} }
this.userName = userAccount.account this.userName = userAccount.account
this.id = userAccount.id this.id = userAccount.id
this.schoolName = res.schoolName
this.setInfo({ this.setInfo({
avatar: userInfo.userAvatars, avatar: userInfo.userAvatars,
schoolId: userAccount.schoolId, schoolId: userAccount.schoolId,
@ -155,7 +158,7 @@ export default {
}else if(command == 'resetPw'){ }else if(command == 'resetPw'){
this.showPassword() this.showPassword()
}else if(command == 'myDownload'){ }else if(command == 'myDownload'){
this.$router.push('/setting/download') this.$router.push('/setting/download').catch(err => {})
}else{ }else{
this.logout() this.logout()
} }
@ -201,7 +204,13 @@ export default {
margin: 0 auto; margin: 0 auto;
} }
.logo{ .logo{
position: absolute;
top: 0;
left: 30px;
width: 180px; width: 180px;
font-size: 28px;
color: #568DF2;
line-height: 80px;
cursor: pointer; cursor: pointer;
img{ img{
width: 100%; width: 100%;

@ -120,15 +120,15 @@ const util = {
} }
}, },
// 成功提示 // 成功提示
successMsg(message,duration = 3000) { successMsg(message,duration = 1500) {
return Message.success({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration}) return Message.success({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration})
}, },
// 警告提示 // 警告提示
warningMsg(message,duration = 3000) { warningMsg(message,duration = 1500) {
return Message.warning({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration}) return Message.warning({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration})
}, },
// 错误提示 // 错误提示
errorMsg(message,duration = 3000) { errorMsg(message,duration = 1500) {
return Message.error({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration}) return Message.error({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration})
}, },
} }

@ -1,5 +1,13 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<div class="search">
<div class="input">
<img src="../../../assets/img/search-gray.png" alt="">
<input v-model="keyword" type="text" placeholder="请输入数据表名称">
</div>
<img v-if="keyword" src="../../../assets/img/remove-gray.png" alt="" class="remove" @click="keyword = ''">
</div>
<div class="left"> <div class="left">
<el-menu class="menu" ref="type" @open="openType" @select="selectType" unique-opened :default-active="defaultType" :default-openeds="defaultOpenType"> <el-menu class="menu" ref="type" @open="openType" @select="selectType" unique-opened :default-active="defaultType" :default-openeds="defaultOpenType">
<template v-for="item in typeList"> <template v-for="item in typeList">
@ -67,11 +75,12 @@
</el-menu> </el-menu>
</div> </div>
<div class="right"> <div class="right">
<div class="block"> <div class="page">
<h6 class="title">数据介绍</h6> <h6 class="p-title">数据介绍</h6>
<div class="page-content">
<div class="desc">{{introduce}}</div> <div class="desc">{{introduce}}</div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" row-key="id"> <el-table :data="listData" class="table" ref="table" stripe header-align="center" row-key="id" highlight-current-row @current-change="previewCurrentChange">
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="showName" label="数据表名称" align="center"></el-table-column> <el-table-column prop="showName" label="数据表名称" align="center"></el-table-column>
<el-table-column prop="dataTotal" label="数据总量" align="center"></el-table-column> <el-table-column prop="dataTotal" label="数据总量" align="center"></el-table-column>
@ -80,7 +89,7 @@
{{scope.row.dataSize}}M {{scope.row.dataSize}}M
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="updateTime" label="更新时间" align="center"></el-table-column> <el-table-column prop="createTime" label="更新时间" align="center"></el-table-column>
<el-table-column label="操作" width="220" align="center"> <el-table-column label="操作" width="220" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="preview(scope.row)">预览</el-button> <el-button type="text" @click="preview(scope.row)">预览</el-button>
@ -92,16 +101,18 @@
<el-pagination background @current-change="handleCurrentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination> <el-pagination background @current-change="handleCurrentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination>
</div> </div>
</div> </div>
</div>
<div class="block" v-if="previewHead.length"> <div class="page" v-if="previewHead.length">
<h6 class="title">数据预览</h6> <h6 class="p-title">数据预览</h6>
<div class="page-content">
<el-table :data="previewData" class="table" stripe header-align="center" row-key="id"> <el-table :data="previewData" class="table" id="previewTable" stripe header-align="center" row-key="id">
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column v-for="(item,index) in previewHead" :prop="item.field" :key="index" :label="item.comment" align="center"></el-table-column> <el-table-column v-for="(item,index) in previewHead" :prop="item.field" :key="index" :label="item.comment" align="center"></el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
</div>
<el-dialog title="下载" :visible.sync="downloadVisible" width="540px" @close="closeDownload" :close-on-click-modal="false"> <el-dialog title="下载" :visible.sync="downloadVisible" width="540px" @close="closeDownload" :close-on-click-modal="false">
<el-form ref="form" label-width="100px" label-suffix=""> <el-form ref="form" label-width="100px" label-suffix="">
@ -143,6 +154,8 @@ export default {
data() { data() {
return { return {
token: util.local.get(Setting.tokenKey), token: util.local.get(Setting.tokenKey),
keyword: '',
searchTimer: null,
typeId: this.$route.query.typeId, typeId: this.$route.query.typeId,
typeList: [], typeList: [],
defaultType: '', defaultType: '',
@ -154,9 +167,6 @@ export default {
total: 0, total: 0,
previewHead: [], previewHead: [],
previewData: [], previewData: [],
pagePreview: 1,
pageSizePreview: 10,
totalPreview: 0,
downloadVisible: false, downloadVisible: false,
curRow: {}, curRow: {},
checkAllFields: false, checkAllFields: false,
@ -183,6 +193,7 @@ export default {
name: '年频' name: '年频'
}, },
], ],
currentRow: null
} }
}, },
computed: { computed: {
@ -190,12 +201,21 @@ export default {
'schoolId' 'schoolId'
]), ]),
}, },
watch: {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
},500)
}
},
mounted() { mounted() {
this.getType() this.getType()
if(this.$route.query.download){ if(this.$route.query.download){
this.download({ this.download({
id: this.$route.query.id, id: this.$route.query.id,
name: this.$route.query.name name: this.$route.query.name,
showName: this.$route.query.showName,
}) })
} }
}, },
@ -203,15 +223,33 @@ export default {
getType(){ getType(){
this.$post(this.api.getTableByClassification).then(res => { this.$post(this.api.getTableByClassification).then(res => {
let typeId = this.typeId let typeId = this.typeId
let introduce = ''
res.map(n => { res.map(n => {
n.id = String(n.id) n.id = String(n.id)
if(typeId && n.id == typeId) introduce = n.introduce
n.children.map(e => { n.children.map(e => {
e.id = String(e.id) e.id = String(e.id)
if(typeId && e.id == typeId){
if(e.introduce){
introduce = e.introduce
}else{
introduce = n.introduce
}
}
if(e.children.length && typeId == e.id){ if(e.children.length && typeId == e.id){
this.defaultOpenType = [n.id,e.id] this.defaultOpenType = [n.id,e.id]
} }
e.children.map(n => { e.children.map(j => {
n.id = String(n.id) if(typeId && j.id == typeId && j.introduce){
if(j.introduce){
introduce = j.introduce
}else if(e.introduce){
introduce = e.introduce
}else{
introduce = n.introduce
}
}
j.id = String(j.id)
}) })
}) })
}) })
@ -221,17 +259,21 @@ export default {
}else{ }else{
if(res[0].children.length && res[0].children[0].children.length){ if(res[0].children.length && res[0].children[0].children.length){
this.defaultType = res[0].children[0].children[0].id this.defaultType = res[0].children[0].children[0].id
introduce = res[0].children[0].children[0].introduce
}else if(res[0].children.length){ }else if(res[0].children.length){
this.defaultType = res[0].children[0].id this.defaultType = res[0].children[0].id
if(!introduce) introduce = res[0].children[0].introduce
}else{ }else{
this.defaultType = res[0].id this.defaultType = res[0].id
if(!introduce) introduce = res[0].introduce
} }
} }
this.introduce = introduce
this.getData() this.getData()
}).catch(res => {}) }).catch(res => {})
}, },
getData(){ getData(){
this.$post(`${this.api.getIdQueryTable}?categoryId=${this.defaultType}&showName=&pageNum=${this.page}&pageSize=${this.pageSize}&updateTime=`).then(res => { this.$post(`${this.api.getIdQueryTable}?categoryId=${this.defaultType}&showName=${this.keyword}&pageNum=${this.page}&pageSize=${this.pageSize}&updateTime=`).then(res => {
this.listData = res.list this.listData = res.list
this.total = res.totalCount this.total = res.totalCount
}).catch(res => {}) }).catch(res => {})
@ -242,8 +284,26 @@ export default {
this.getData() this.getData()
}, },
selectType(index,indexPath){ selectType(index,indexPath){
let introduce = ''
let list = this.typeList
list.map(n => {
if(n.id == index){
introduce = n.introduce
}else{
n.children.map(n => {
if(n.id == index){
introduce = n.introduce
}else{
n.children.map(n => {
if(n.id == index) introduce = n.introduce
})
}
})
}
})
if(!introduce) introduce = list.find(n => n.id == indexPath[0]).introduce
this.defaultType = index this.defaultType = index
this.introduce = this.typeList.find(n => n.id == indexPath[0]).introduce this.introduce = introduce
this.previewHead = [] this.previewHead = []
this.previewData = [] this.previewData = []
this.page = 1 this.page = 1
@ -264,12 +324,16 @@ export default {
} }
this.selectType(id,indexPath) this.selectType(id,indexPath)
}, },
previewCurrentChange(val){
this.currentRow = val
},
preview(row){ preview(row){
this.$get(`${this.api.previewData}?tableName=${row.name}&tableId=${row.id}`).then(res => { this.$get(`${this.api.previewData}?tableName=${row.name}&tableId=${row.id}`).then(res => {
this.$post(this.api.saveRecord,{ this.$post(this.api.saveRecord,{
tableId: row.id, tableId: row.id,
type: 2, type: 2,
}).then(res => {}).catch(res => {}) }).then(res => {}).catch(res => {})
let comment = res.comment let comment = res.comment
let previewHead = [] let previewHead = []
comment.map(n => { comment.map(n => {
@ -284,6 +348,10 @@ export default {
} }
}) })
this.previewData = data this.previewData = data
this.$nextTick(() => {
document.querySelector('#previewTable').scrollIntoView()
})
}).catch(res => {}) }).catch(res => {})
}, },
checkAllFieldsChange(val) { checkAllFieldsChange(val) {
@ -390,6 +458,43 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.wrap{ .wrap{
display: flex; display: flex;
.search{
z-index: 2;
position: absolute;
top: 20px;
right: 20%;
display: flex;
justify-content: space-between;
align-items: center;
width: 300px;
padding: 7px 20px;
margin: 0 auto;
border-bottom: 2px solid #a5a5a5;
.input{
display: inline-flex;
align-items: center;
margin-right: 20px;
}
input{
width: 195px;
padding-left: 20px;
margin-left: 20px;
font-size: 18px;
color: #999;
background-color: transparent;
border: 0;
border-left: 2px solid #ccc;
&::-webkit-input-placeholder{color: #999}
&::-moz-placeholder{color: #999}
&:-moz-placeholder{color: #999}
&:focus{
outline: none;
}
}
.remove{
cursor: pointer;
}
}
.left{ .left{
margin-right: 20px; margin-right: 20px;
@ -407,19 +512,8 @@ export default {
.right{ .right{
flex: 1; flex: 1;
max-width: calc(100% - 220px); max-width: calc(100% - 220px);
.block{ .page{
padding: 34px;
margin-bottom: 20px;
background-color: #fff;
border-radius: 8px;
.title{
padding-left: 11px;
margin-bottom: 20px; margin-bottom: 20px;
font-size: 17px;
color: $main-color;
line-height: 1.8;
border-left: 6px solid;
}
.desc{ .desc{
margin-bottom: 30px; margin-bottom: 30px;
color: #333; color: #333;

@ -1,6 +1,8 @@
<template> <template>
<div class="wrap" :class="{result: keyword}"> <div class="wrap" :class="{result: keyword}">
<hr class="shadow" v-if="keyword">
<div class="title" v-if="!keyword">欢迎来到<br>或然数据平台</div> <div class="title" v-if="!keyword">欢迎来到<br>或然数据平台</div>
<div class="search-wrap">
<div class="search"> <div class="search">
<div class="input"> <div class="input">
<img v-if="keyword" src="../../../assets/img/search-gray.png" alt=""> <img v-if="keyword" src="../../../assets/img/search-gray.png" alt="">
@ -15,6 +17,7 @@
<li v-for="(item,index) in hotData" :key="index" @click="toData(item)">{{item.categoryTwo}}</li> <li v-for="(item,index) in hotData" :key="index" @click="toData(item)">{{item.categoryTwo}}</li>
</ul> </ul>
</div> </div>
</div>
<template v-if="keyword"> <template v-if="keyword">
<div class="tips"> <div class="tips">
@ -31,7 +34,7 @@
{{scope.row.dataSize}}M {{scope.row.dataSize}}M
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="updateTime" label="更新时间" align="center"></el-table-column> <el-table-column prop="createTime" label="更新时间" align="center"></el-table-column>
<el-table-column label="操作" width="180" align="center"> <el-table-column label="操作" width="180" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="download(scope.row)">下载</el-button> <el-button type="text" @click="download(scope.row)">下载</el-button>
@ -77,7 +80,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.token && this.getHot() this.getHot()
}, },
methods: { methods: {
getData(){ getData(){
@ -87,7 +90,7 @@ export default {
}).catch(res => {}) }).catch(res => {})
}, },
getHot(){ getHot(){
this.$get(`${this.api.queryDatabaseInfo}?schoolId=${this.schoolId}&startTime=&endTime=`).then(res => { this.$get(this.api.queryDatabaseInfo).then(res => {
let list = JSON.parse(res.databaseInfo) let list = JSON.parse(res.databaseInfo)
list.map(n => { list.map(n => {
n.download n.download
@ -113,7 +116,7 @@ export default {
tableId: row.id, tableId: row.id,
schoolId: this.schoolId, schoolId: this.schoolId,
}).then(res => { }).then(res => {
this.$router.push(`/data?download=true&id=${row.id}&name=${row.name}`) this.$router.push(`/data?download=true&id=${row.id}&name=${row.name}&showName=${row.showName}`)
}).catch(res => {}) }).catch(res => {})
}else{ }else{
this.$router.push('/login') this.$router.push('/login')
@ -128,17 +131,21 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.wrap{ .wrap{
position: relative;
.title{ .title{
margin: 70px 0 130px; margin: 70px 0 130px;
font-size: 50px; font-size: 50px;
color: #fff; color: #fff;
text-align: center; text-align: center;
} }
.search-wrap{
width: 600px;
margin: 0 auto;
}
.search{ .search{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
width: 930px;
padding: 7px 20px; padding: 7px 20px;
margin: 0 auto; margin: 0 auto;
border-bottom: 2px solid #fff; border-bottom: 2px solid #fff;
@ -170,15 +177,14 @@ export default {
} }
.hot{ .hot{
display: flex; display: flex;
justify-content: center;
align-items: center; align-items: center;
width: 930px; margin: 20px auto 0;
margin: 10px auto 0;
.name{ .name{
font-size: 14px; font-size: 14px;
color: #efefef; color: #efefef;
} }
.list{ .list{
flex: 1;
display: inline-flex; display: inline-flex;
margin-left: 20px; margin-left: 20px;
li{ li{
@ -192,6 +198,15 @@ export default {
&.result{ &.result{
padding: 70px 90px 50px; padding: 70px 90px 50px;
background-color: #fff; background-color: #fff;
.shadow{
position: absolute;
top: 0;
left: 0;
width: 100%;
border: 0;
border-bottom: 1px solid rgba(228,228,228,0.5);
box-shadow: 0 0 12px 2px rgba(228,228,228,0.8);
}
.search{ .search{
border-bottom-color: #cdcdcd; border-bottom-color: #cdcdcd;
input{ input{

@ -1,6 +1,7 @@
<template> <template>
<div> <div>
<div class="page"> <div class="page">
<h6 class="p-title bd">角色列表</h6>
<div class="page-content"> <div class="page-content">
<div class="tool"> <div class="tool">
<ul class="filter"> <ul class="filter">
@ -67,6 +68,7 @@
<script> <script>
import { mapState } from 'vuex' import { mapState } from 'vuex'
import util from '@/libs/util' import util from '@/libs/util'
import Setting from '@/setting'
export default { export default {
name: 'role', name: 'role',
data() { data() {
@ -218,7 +220,24 @@ export default {
}).catch(res => {}) }).catch(res => {})
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('该角色下已有账号,删除角色会将该角色下的账号一并删除,是否继续删除?', '提示', { this.$post(this.api.getUserList,{
createTime: '',
isEnable: '',
endTime: '',
keyWord: '',
pageNum: 1,
pageSize: 1000,
platformId: Setting.platformId,
roleId: row.id
}).then(res => {
let msg = ''
if(res.pageList.total){
msg = '该角色下已有账号,删除角色会将该角色下的账号一并删除,是否继续删除?'
}else{
msg = '此删除操作不可逆,是否确认删除选中项?'
}
this.$confirm(msg, '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$post(`${this.api.removeRole}/${row.id}`).then(res => { this.$post(`${this.api.removeRole}/${row.id}`).then(res => {
@ -226,6 +245,7 @@ export default {
this.getData() this.getData()
}).catch(res => {}) }).catch(res => {})
}).catch(() => {}) }).catch(() => {})
}).catch(res => {})
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val this.multipleSelection = val

@ -13,7 +13,11 @@
<el-table-column prop="databaseType" label="数据类型" width="100" align="center"></el-table-column> <el-table-column prop="databaseType" label="数据类型" width="100" align="center"></el-table-column>
<el-table-column prop="databaseName" label="数据表名称" align="center"></el-table-column> <el-table-column prop="databaseName" label="数据表名称" align="center"></el-table-column>
<el-table-column prop="dataTotal" label="数据总量" align="center"></el-table-column> <el-table-column prop="dataTotal" label="数据总量" align="center"></el-table-column>
<el-table-column prop="dataSize" label="数据大小" align="center"></el-table-column> <el-table-column prop="dataSize" label="数据大小" align="center">
<template slot-scope="scope">
{{scope.row.dataSize}}M
</template>
</el-table-column>
<el-table-column prop="tableUpdateTime" label="更新时间" width="150" align="center"></el-table-column> <el-table-column prop="tableUpdateTime" label="更新时间" width="150" align="center"></el-table-column>
<el-table-column prop="downloadTime" label="下载时间" width="150" align="center"></el-table-column> <el-table-column prop="downloadTime" label="下载时间" width="150" align="center"></el-table-column>
<el-table-column label="操作" width="180" align="center"> <el-table-column label="操作" width="180" align="center">
@ -83,13 +87,13 @@ export default {
}, },
download(row){ download(row){
this.$get(`${this.api.isDownload}`,{ this.$get(`${this.api.isDownload}`,{
tableId: row.id, tableId: row.tableId,
schoolId: this.schoolId, schoolId: this.schoolId,
}).then(res => { }).then(res => {
if(res.status != 200) return util.warningMsg(res.message) if(res.status != 200) return util.warningMsg(res.message)
let msgObj = util.successMsg('数据正在生成中,请稍等片刻,生成后会自动下载,您可以先访问其他页面。',5000) let msgObj = util.successMsg('数据正在生成中,请稍等片刻,生成后会自动下载,您可以先访问其他页面。',5000)
axios.get(`${this.api.downloadData}?tableName=${row.tableNme}&table_id=${row.id}&fields=${row.fields}&startTime=${row.startTime ? row.startTime : ''}&endTime=${row.endTime ? row.endTime : ''}&frequency=${row.frequency ? row.frequency : ''}`,{ axios.get(`${this.api.downloadData}?tableName=${row.tableNme}&table_id=${row.tableId}&fields=${row.fields}&startTime=${row.beginTime ? row.beginTime : ''}&endTime=${row.endTime ? row.endTime : ''}&frequency=${row.frequency ? row.frequency : ''}`,{
headers: { headers: {
token: this.token token: this.token
}, },
@ -99,7 +103,11 @@ export default {
if(res.data.type != 'multipart/form-data') return util.warningMsg('数据总数为零!') if(res.data.type != 'multipart/form-data') return util.warningMsg('数据总数为零!')
util.downloadFileDirect(`${row.databaseName}.xls`,new Blob([res.data])) util.downloadFileDirect(`${row.databaseName}.xls`,new Blob([res.data]))
this.$post(`${this.api.saveRecord}?platformUserId=4&tableId=${row.id}&type=1&schoolId=1`).then(res => {}).catch(res => {}) this.$post(this.api.saveRecord,{
tableId: row.tableId,
type: 1,
schoolId: this.schoolId
}).then(res => {}).catch(res => {})
}).catch(res => { }).catch(res => {
msgObj.close() msgObj.close()
}) })

@ -216,14 +216,14 @@
</el-dialog> </el-dialog>
<el-dialog title="更换密码" :visible.sync="passwordVisible" :close-on-click-modal="false" @close="closePassword" width="30%"> <el-dialog title="更换密码" :visible.sync="passwordVisible" :close-on-click-modal="false" @close="closePassword" width="30%">
<el-form ref="passwordForm" :model="form" label-width="60px"> <el-form ref="passwordForm" :model="form" label-width="82px">
<el-form-item label="原密码"> <el-form-item label="原密码">
<el-input type="password" v-model="passwordForm.password" placeholder="请输入原密码"></el-input> <el-input type="password" v-model="passwordForm.password" placeholder="请输入原密码"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="新密码"> <el-form-item label="新密码">
<el-input type="password" v-model="passwordForm.newPassword" placeholder="请输入新密码" @keyup.enter.native="editPassword"></el-input> <el-input type="password" v-model="passwordForm.newPassword" placeholder="请输入新密码" @keyup.enter.native="editPassword"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="新密码"> <el-form-item label="确认新密码">
<el-input type="password" v-model="passwordForm.reNewPassword" placeholder="请确认新密码" @keyup.enter.native="editPassword"></el-input> <el-input type="password" v-model="passwordForm.reNewPassword" placeholder="请确认新密码" @keyup.enter.native="editPassword"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>

@ -1,7 +1,6 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<div class="left"> <div class="left">
<h6 class="school">{{schoolName}}</h6>
<div class="product" v-for="(item,index) in productList" :key="index"> <div class="product" v-for="(item,index) in productList" :key="index">
<p class="product-name">{{item.productName}}</p> <p class="product-name">{{item.productName}}</p>
<div class="date"> <div class="date">
@ -16,8 +15,9 @@
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<div class="block"> <div class="page">
<h6 class="title">平台数据统计</h6> <h6 class="p-title bd">平台数据统计</h6>
<div class="page-content">
<ul class="stat"> <ul class="stat">
<li> <li>
<p class="people"> <p class="people">
@ -45,9 +45,12 @@
</li> </li>
</ul> </ul>
</div> </div>
</div>
<div class="block"> <div class="page">
<div class="flex m-b-20"> <h6 class="p-title">按数据库统计使用概况</h6>
<div class="page-content">
<div class="flex j-between m-b-20">
<ul class="filter"> <ul class="filter">
<li> <li>
<label>查询时间区域</label> <label>查询时间区域</label>
@ -58,10 +61,6 @@
<el-input placeholder="请输入数据分类/数据库类别" v-model="keyword" suffix-icon="el-icon-search" clearable size="small"></el-input> <el-input placeholder="请输入数据分类/数据库类别" v-model="keyword" suffix-icon="el-icon-search" clearable size="small"></el-input>
</li> </li>
</ul> </ul>
</div>
<div class="flex j-between">
<h6 class="title">按数据库统计使用概况</h6>
<div> <div>
<el-button type="primary" size="small" @click="exportDatabase" v-auth="'/stat/list:数据库统计导出'">导出数据</el-button> <el-button type="primary" size="small" @click="exportDatabase" v-auth="'/stat/list:数据库统计导出'">导出数据</el-button>
</div> </div>
@ -79,14 +78,14 @@
<img src="../../../assets/img/arrow.png" class="arrow" :class="{active}" @click="toggleList" alt=""> <img src="../../../assets/img/arrow.png" class="arrow" :class="{active}" @click="toggleList" alt="">
</div> </div>
</div> </div>
</div>
<div class="block"> <div class="page">
<div class="flex j-between"> <h6 class="p-title">按月份统计数据库使用概况</h6>
<h6 class="title">按月份统计数据库使用概况</h6> <div class="page-content">
<div> <div class="m-b-20 text-right">
<el-button type="primary" size="small" @click="exportDatabaseByMonth" v-auth="'/stat/list:月份统计导出'">导出数据</el-button> <el-button type="primary" size="small" @click="exportDatabaseByMonth" v-auth="'/stat/list:月份统计导出'">导出数据</el-button>
</div> </div>
</div>
<el-table :data="monthData" class="table" stripe header-align="center" row-key="id" :span-method="objectSpanMethod" @selection-change="handleSelectionChange1"> <el-table :data="monthData" class="table" stripe header-align="center" row-key="id" :span-method="objectSpanMethod" @selection-change="handleSelectionChange1">
<el-table-column type="selection" width="80" align="center"></el-table-column> <el-table-column type="selection" width="80" align="center"></el-table-column>
@ -108,6 +107,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
@ -325,14 +325,8 @@ export default {
display: flex; display: flex;
.left{ .left{
margin-right: 20px; margin-right: 20px;
.school{
width: 200px;
margin-bottom: 15px;
font-size: 20px;
color: #568DF2;
text-align: center;
}
.product{ .product{
width: 200px;
padding: 15px; padding: 15px;
margin-bottom: 15px; margin-bottom: 15px;
background-color: #fff; background-color: #fff;
@ -370,19 +364,8 @@ export default {
} }
} }
} }
.block{ .page{
padding: 34px;
margin-bottom: 20px; margin-bottom: 20px;
background-color: #fff;
border-radius: 8px;
.title{
padding-left: 11px;
margin-bottom: 20px;
font-size: 17px;
color: $main-color;
line-height: 1.8;
border-left: 6px solid;
}
.arrow{ .arrow{
cursor: pointer; cursor: pointer;
&.active{ &.active{

@ -1,6 +1,7 @@
<template> <template>
<div> <div>
<div class="page"> <div class="page">
<h6 class="p-title bd">用户列表</h6>
<div class="page-content"> <div class="page-content">
<div class="tool" style="margin-bottom: 0;"> <div class="tool" style="margin-bottom: 0;">
<ul class="filter"> <ul class="filter">
@ -15,7 +16,7 @@
<el-date-picker v-model="date" align="right" unlink-panels type="daterange" start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" clearable size="small"></el-date-picker> <el-date-picker v-model="date" align="right" unlink-panels type="daterange" start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" clearable size="small"></el-date-picker>
</li> </li>
<li> <li>
<label>角色</label> <label style="width: auto;">角色</label>
<el-select v-model="role" placeholder="请选择角色" size="small" clearable class="w-150" @change="initData"> <el-select v-model="role" placeholder="请选择角色" size="small" clearable class="w-150" @change="initData">
<el-option label="不限" value=""></el-option> <el-option label="不限" value=""></el-option>
<el-option label="用户" value="0"></el-option> <el-option label="用户" value="0"></el-option>
@ -88,14 +89,16 @@
<el-form-item prop="roleId" label="账号角色"> <el-form-item prop="roleId" label="账号角色">
<el-radio v-model="defaultUser" label="user" disabled>用户</el-radio> <el-radio v-model="defaultUser" label="user" disabled>用户</el-radio>
<el-radio-group v-model="form.roleId"> <el-radio-group v-model="form.roleId">
<el-radio v-for="(item,index) in roleList" :key="index" :label="item.id">{{item.roleName}}</el-radio> <template v-for="(item,index) in roleList">
<el-radio v-if="item.id != '1409424489820102658'" :key="index" :label="item.id" :disabled="item.id == 'user'">{{item.roleName}}</el-radio>
</template>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item prop="uniqueIdentification" label="唯一标识"> <el-form-item prop="uniqueIdentification" label="唯一标识">
<el-input disabled v-model="form.uniqueIdentification" placeholder="唯一标识"></el-input> <el-input disabled v-model="form.uniqueIdentification" placeholder="唯一标识"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="phone" label="手机号" v-if="isDetail"> <el-form-item prop="phone" label="手机号" v-if="isDetail">
<el-input v-model="form.phone" placeholder="请输入手机号" maxlength="11" disabled></el-input> <el-input v-model="form.phone" maxlength="11" disabled></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="email" label="邮箱"> <el-form-item prop="email" label="邮箱">
<el-input v-model="form.email" placeholder="请输入邮箱"></el-input> <el-input v-model="form.email" placeholder="请输入邮箱"></el-input>
@ -211,13 +214,13 @@ export default {
trigger: 'blur' trigger: 'blur'
} }
], ],
phone: [ // phone: [
{ // {
pattern: /^1[3456789]\d{9}$/, // pattern: /^1[3456789]\d{9}$/,
message: '请输入正确的手机号', // message: '',
trigger: 'blur' // trigger: 'blur'
} // }
], // ],
email: [ email: [
{ {
pattern: /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/, pattern: /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/,
@ -261,7 +264,7 @@ export default {
} }
}, },
date: function(val){ date: function(val){
if(val.length){ if(val && val.length){
this.startTime = val[0] this.startTime = val[0]
this.endTime = val[1] this.endTime = val[1]
}else{ }else{
@ -365,7 +368,7 @@ export default {
accountId, accountId,
userName: data.userName, userName: data.userName,
roleId: data.roleId, roleId: data.roleId,
phone: data.phone ? data.phone : '', phone: data.phone ? data.phone : '暂未绑定',
// uniqueIdentification: data.uniqueIdentification, // uniqueIdentification: data.uniqueIdentification,
workNumber: data.workNumber, workNumber: data.workNumber,
email: data.email, email: data.email,
@ -387,8 +390,8 @@ export default {
confirm(){ confirm(){
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
if(this.accountRepeat) return util.errorMsg('该账号已存在') if(this.accountRepeat) return util.errorMsg('该账号已存在')
if(this.workNumberRepeat) return util.errorMsg('该工号已存在') if(this.workNumberRepeat) return util.errorMsg('该学号/工号已存在')
let data = this.form let data = this.form
data.schoolId = data.schoolId ? data.schoolId : this.schoolId data.schoolId = data.schoolId ? data.schoolId : this.schoolId
if(!data.userId) data.uniqueIdentification = new Date().getTime() if(!data.userId) data.uniqueIdentification = new Date().getTime()
@ -534,6 +537,9 @@ export default {
li{ li{
width: 30%; width: 30%;
margin-bottom: 16px; margin-bottom: 16px;
label{
width: 70px;
}
} }
} }
/deep/.dialog{ /deep/.dialog{

@ -19,7 +19,7 @@ router.beforeEach((to, from, next) => {
// 如果是管理员则需要从获取的路由权限里判断当前访问页面是否有权限访问,如果没权限访问则跳转到403 // 如果是管理员则需要从获取的路由权限里判断当前访问页面是否有权限访问,如果没权限访问则跳转到403
if((mg && atob(decodeURI(mg)) === 'true') || (to.query.mg && atob(decodeURI(to.query.mg)) === 'true')){ if((mg && atob(decodeURI(mg)) === 'true') || (to.query.mg && atob(decodeURI(to.query.mg)) === 'true')){
if(routes.length){ if(routes.length){
if(routes.find(n => n.name == toPath) || toPath == '/setting/person'){ if(routes.find(n => n.name == toPath) || toPath == '/setting/person' || toPath == '/setting/download'){
if(!to.query.mg){ if(!to.query.mg){
next({ next({
path: toPath, path: toPath,

@ -16,7 +16,7 @@ const Setting = {
showProgressBar: true, showProgressBar: true,
// 接口请求地址 // 接口请求地址
// apiBaseURL: env === 'development' ? 'http://192.168.31.216:9000' : 'http://39.108.250.202:9000', // apiBaseURL: env === 'development' ? 'http://192.168.31.216:9000' : 'http://39.108.250.202:9000',
apiBaseURL: env === 'development' ? 'http://39.108.250.202:9000' : 'http://39.108.250.202:9000', apiBaseURL: env === 'development' ? 'http://192.168.31.216:9000' : 'http://39.108.250.202:9000',
// 接口请求返回错误时,弹窗的持续时间,单位:秒 // 接口请求返回错误时,弹窗的持续时间,单位:秒
modalDuration: 3, modalDuration: 3,
// 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice

@ -70,17 +70,11 @@
} }
.page{ .page{
position: relative; position: relative;
padding: 24px 10px;
background-color: #fff; background-color: #fff;
border-radius: 8px; border-radius: 8px;
.p-title{
padding-left: 24px;
line-height: 56px;
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
border-bottom: 1px solid rgba(0,0,0,.06);
}
.page-content{ .page-content{
padding: 24px; padding: 26px 36px 0;
.tool{ .tool{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -127,6 +121,29 @@
} }
} }
.p-title{
position: relative;
padding: 4px 0 4px 10px;
margin-left: 20px;
margin-right: 20px;
font-size: 17px;
color: $main-color;
line-height: 1;
border-left: 6px solid;
&.bd{
margin-bottom: 20px;
&:after{
content: '';
position: absolute;
bottom: -14px;
left: -20px;
width: calc(100% + 34px);
height: 1px;
background-color: #ccc;
}
}
}
.pagination { .pagination {
margin: 20px 0; margin: 20px 0;
text-align: center; text-align: center;

Loading…
Cancel
Save