yujialong 3 years ago
parent 3dbf213b0a
commit f977c533b7
  1. 3
      src/api/index.js
  2. BIN
      src/assets/img/remove-black.png
  3. 8
      src/layouts/header/index.vue
  4. 105
      src/pages/data/list/index.vue
  5. 49
      src/pages/index/list/index.vue
  6. 4
      src/pages/role/list/index.vue
  7. 29
      src/pages/setting/person/index.vue
  8. 247
      src/pages/setting/person/info.vue

@ -1,5 +1,7 @@
import Setting from '@/setting'
let host1 = 'http://192.168.31.125:9000'//林
let host2 = 'http://192.168.31.137:9000'// 陈赓
let host3 = 'http://39.108.250.202:9000'
export default {
// 登录注册
@ -63,6 +65,7 @@ export default {
getDownloadRecord:`/data/data/myDownload/getDownloadRecord`,
downloadAgain:`/data/data/downloadAgain`,
isDownload:`/data/data/product/isDownload`,
getTableTime:`/data/data/tableTime/getTableTime`,
// 数据操作记录
queryAccumulate:`/data/data/dataRecord/queryAccumulate`,

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

@ -1,7 +1,7 @@
<template>
<div class="header">
<a class="logo" @click="toIndex">
<img v-if="isLogin || (isManager && showSetting) || !isUser" src="@/assets/img/logo.png" alt="">
<img width="180" v-if="isLogin || (isManager && showSetting) || !isUser" src="@/assets/img/logo.png" alt="">
<span v-if="token && isManager && !showSetting">{{schoolName}}</span>
</a>
<div class="inner">
@ -154,7 +154,7 @@ export default {
},
userCommand(command){
if(command == 'person'){
this.$router.push('/setting/person')
this.$router.push('/setting/person').catch(err => {})
}else if(command == 'resetPw'){
this.showPassword()
}else if(command == 'myDownload'){
@ -207,14 +207,10 @@ export default {
position: absolute;
top: 0;
left: 30px;
width: 180px;
font-size: 28px;
color: #568DF2;
line-height: 80px;
cursor: pointer;
img{
width: 100%;
}
}
.search{

@ -1,11 +1,9 @@
<template>
<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 = ''">
<!-- <img src="../../../assets/img/remove-black.png" alt="" class="remove" @click="keyword = ''"> -->
<input v-model="keyword" type="text" placeholder="请输入数据表名称">
<img src="../../../assets/img/search.png" alt="" class="search-icon">
</div>
<div class="left">
@ -89,7 +87,7 @@
{{scope.row.dataSize}}M
</template>
</el-table-column>
<el-table-column prop="createTime" label="更新时间" align="center"></el-table-column>
<el-table-column prop="updateTime" label="更新时间" align="center"></el-table-column>
<el-table-column label="操作" width="220" align="center">
<template slot-scope="scope">
<el-button type="text" @click="preview(scope.row)">预览</el-button>
@ -125,10 +123,10 @@
</div>
</el-form-item>
<el-form-item label="开始时间">
<el-date-picker v-model="startTime" type="date" placeholder="请选择开始时间" size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd"></el-date-picker>
<el-date-picker v-model="startTime" type="date" placeholder="请选择开始时间" size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :picker-options="timeOptions" :disabled="startTimeDisabled" :default-value="timeDefault"></el-date-picker>
</el-form-item>
<el-form-item label="结束时间">
<el-date-picker v-model="endTime" type="date" placeholder="请选择结束时间" size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd"></el-date-picker>
<el-date-picker v-model="endTime" type="date" placeholder="请选择结束时间" size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :picker-options="timeOptions" :disabled="endTimeDisabled" :default-value="timeDefault"></el-date-picker>
</el-form-item>
<el-form-item label="数据频率">
<el-select v-model="frequency" placeholder="请选择数据频率" size="small">
@ -150,9 +148,13 @@ import { mapState } from 'vuex'
import axios from 'axios'
import util from '@/libs/util'
import Setting from '@/setting'
let startTimeLimit = ''
let endTimeLimit = ''
export default {
data() {
return {
that: this,
token: util.local.get(Setting.tokenKey),
keyword: '',
searchTimer: null,
@ -162,6 +164,8 @@ export default {
defaultOpenType: [],
introduce: '',
listData: [],
listDataAll: [],
searchListData: [],
page: 1,
pageSize: 10,
total: 0,
@ -174,6 +178,16 @@ export default {
fieldsList: [],
startTime: '',
endTime: '',
startTimeLimit: '',
startTimeDisabled: false,
endTimeLimit: '',
endTimeDisabled: false,
timeDefault: '',
timeOptions: {
disabledDate(time) {
return time.getTime() < startTimeLimit || time.getTime() > endTimeLimit
},
},
frequency: '',
frequencyList: [
{
@ -205,7 +219,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -274,10 +288,14 @@ export default {
},
getData(){
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.total = res.totalCount
this.listData = res.pageList.records
this.total = res.pageList.total
}).catch(res => {})
},
initData(){
this.page = 1
this.getData()
},
handleCurrentChange(val) {
this.page = val
this.$refs.table.clearSelection()
@ -306,8 +324,7 @@ export default {
this.introduce = introduce
this.previewHead = []
this.previewData = []
this.page = 1
this.getData()
this.initData()
},
openType(index,indexPath){
let typeList = this.typeList
@ -365,6 +382,23 @@ export default {
this.curRow = row
this.downloadVisible = true
this.$get(`${this.api.getTableTime}`,{
tableId: row.id
}).then(res => {
let list = res.message
if(list.startTime){
startTimeLimit = new Date(list.startTime).getTime()
}else{
this.startTimeDisabled = true
}
if(list.endTime){
endTimeLimit = new Date(list.endTime).getTime()
this.timeDefault = list.endTime
}else{
this.endTimeDisabled = true
}
}).catch(res => {})
this.$get(`${this.api.previewData}?tableName=${row.name}&tableId=${row.id}`).then(res => {
let comment = res.comment
let fieldsList = []
@ -461,29 +495,24 @@ export default {
.search{
z-index: 2;
position: absolute;
top: 20px;
right: 20%;
top: 0;
left: 70%;
transform: translate(-50%);
display: flex;
justify-content: space-between;
align-items: center;
width: 300px;
height: 80px;
padding: 7px 20px;
margin: 0 auto;
border-bottom: 2px solid #a5a5a5;
.input{
display: inline-flex;
align-items: center;
margin-right: 20px;
}
background-color: #fff;
input{
width: 195px;
padding-left: 20px;
margin-left: 20px;
font-size: 18px;
color: #999;
margin-left: 10px;
font-size: 14px;
color: #333;
background-color: transparent;
border: 0;
border-left: 2px solid #ccc;
&::-webkit-input-placeholder{color: #999}
&::-moz-placeholder{color: #999}
&:-moz-placeholder{color: #999}
@ -494,18 +523,34 @@ export default {
.remove{
cursor: pointer;
}
.search-icon{
width: 18px;
}
}
.left{
/deep/.left{
margin-right: 20px;
.menu{
width: 200px;
padding: 10px 0;
border-radius: 8px;
overflow: hidden;
&>.el-menu-item,.el-submenu__title{
background-color: rgba(228,237,255,.4);
span{
font-size: 15px;
color: #3381d2;
}
}
.el-submenu .el-menu{
background-color: #fff;
}
.el-submenu.is-active{
.el-submenu__title{
background-color: rgba(147,184,255,.3);
}
}
.el-menu-item.is-active{
color: #fff;
background-color: $main-color;
color: $main-color;
}
}
}

@ -4,11 +4,10 @@
<div class="title" v-if="!keyword">欢迎来到<br>或然数据平台</div>
<div class="search-wrap">
<div class="search">
<div class="input">
<img v-if="keyword" src="../../../assets/img/search-gray.png" alt="">
<img v-else src="../../../assets/img/search-white.png" alt="">
<input v-model="keyword" type="text" placeholder="请输入关键词">
<div class="icon-wrap">
<img src="../../../assets/img/search-white.png" alt="">
</div>
<input ref="keyword" v-model="keyword" type="text" placeholder="请输入关键词">
<img v-if="keyword" src="../../../assets/img/remove-gray.png" alt="" class="remove" @click="keyword = ''">
</div>
<div class="hot" v-if="hotData.length">
@ -75,6 +74,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.$refs.keyword.focus()
this.initData()
},500)
}
@ -123,7 +123,14 @@ export default {
}
},
toData(row){
this.$router.push(`/data?typeId=${row.categoryTwoId}`)
if(this.token){
this.$router.push(`/data?typeId=${row.categoryTwoId}`)
}else{
util.errorMsg('请先登录!')
setTimeout(() => {
this.$router.push('/login')
},1500)
}
}
}
};
@ -146,25 +153,28 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
padding: 7px 20px;
height: 46px;
margin: 0 auto;
border-bottom: 2px solid #fff;
.input{
flex: 1;
border: 2px solid $main-color;
background-color: #fff;
.icon-wrap{
display: inline-flex;
align-items: center;
margin-right: 20px;
height: 100%;
padding: 0 30px;
text-align: center;
background-color: $main-color;
}
input{
flex: 1;
padding-left: 20px;
margin-left: 30px;
font-size: 24px;
color: #fff;
font-size: 18px;
color: #333;
background-color: transparent;
border: 0;
border-left: 2px solid #fff;
&::-webkit-input-placeholder{color: #f5f5f5}
&::-webkit-input-placeholder{color: #999}
&::-moz-placeholder{color: #f5f5f5}
&:-moz-placeholder{color: #f5f5f5}
&:focus{
@ -172,6 +182,7 @@ export default {
}
}
.remove{
margin: 0 10px;
cursor: pointer;
}
}
@ -207,16 +218,6 @@ export default {
border-bottom: 1px solid rgba(228,228,228,0.5);
box-shadow: 0 0 12px 2px rgba(228,228,228,0.8);
}
.search{
border-bottom-color: #cdcdcd;
input{
color: #999;
border-left-color: #cdcdcd;
&::-webkit-input-placeholder{color: #999}
&::-moz-placeholder{color: #999}
&:-moz-placeholder{color: #999}
}
}
.hot{
.name{
color: #333;

@ -30,7 +30,7 @@
<el-table-column label="操作" width="180" align="center">
<template slot-scope="scope">
<el-button type="text" @click="showRole(scope.row)" v-auth>查看</el-button>
<template v-if="scope.row.id != '1409424489820102658'">
<template v-if="scope.row.roleName != '超级管理员'">
<el-button type="text" @click="editRole(scope.row)" v-auth>编辑</el-button>
<el-button type="text" @click="handleDelete(scope.row)" v-auth>删除</el-button>
</template>
@ -232,7 +232,7 @@ export default {
}).then(res => {
let msg = ''
if(res.pageList.total){
msg = '该角色下已有账号,删除角色会将该角色下的账号一并删除,是否继续删除?'
msg = '该角色已被引用,删除后拥有该角色的账号将失去相应权限,是否删除?'
}else{
msg = '此删除操作不可逆,是否确认删除选中项?'
}

@ -19,7 +19,7 @@
</div>
</div>
<div class="right">
<info v-if="active == 1"></info>
<info v-if="active == 1" @updateStatus="updateStatus"></info>
<download v-else></download>
</div>
</div>
@ -46,6 +46,7 @@ export default {
},
],
active: '1',
edited: false
};
},
components: { info,download },
@ -54,6 +55,19 @@ export default {
'avatar'
]),
},
beforeRouteLeave(to, from, next) {
if(this.edited){
this.$confirm(`您修改的信息还没有保存,是否确认离开?`, '提示', {
type: 'warning'
}).then(() => {
next()
}).catch(() => {
next(false)
})
}else{
next()
}
},
mounted() {
},
@ -65,8 +79,19 @@ export default {
this.setAvatar(res.message)
},
handleSelect(key, keyPath){
this.active = key
if(key == 2 && this.edited){
this.$confirm(`您修改的信息还没有保存,是否确认离开?`, '提示', {
type: 'warning'
}).then(() => {
this.active = key
}).catch(() => {})
}else{
this.active = key
}
},
updateStatus(status){
this.edited = status
}
}
};
</script>

@ -1,81 +1,83 @@
<template>
<div>
<div class="block">
<h6 class="title">用户信息</h6>
<ul class="list">
<li>
<label>姓名</label>
<div>
<el-input v-model="form.userName" clearable></el-input>
</div>
</li>
<li>
<label>性别</label>
<div>
<el-select v-model="form.sex">
<el-option v-for="item in sexList" :key="item.value" :label="item.name" :value="item.value"></el-option>
</el-select>
</div>
</li>
<li>
<label>出生年月日</label>
<div>
<el-date-picker v-model="form.dateBirth" :clearable="false" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd"></el-date-picker>
</div>
</li>
<li>
<label>所在国家</label>
<div class="mul">
<div class="child">
<span>国家</span>
<div>
<el-select v-model="form.countries" placeholder>
<el-option v-for="item in countryList" :key="item.value" :label="item.label" :value="item.label"></el-option>
</el-select>
</div>
<div class="page">
<h6 class="p-title bd">用户信息</h6>
<div class="page-content">
<ul class="list">
<li>
<label>姓名</label>
<div>
<el-input size="small" v-model="form.userName" clearable></el-input>
</div>
<div class="child">
<span>省份</span>
<div>
<el-select v-model="form.provinceId" placeholder @change="id => getCity(id,1)">
<el-option v-for="item in provinceList" :key="item.provinceId" :label="item.provinceName" :value="item.provinceId"></el-option>
</el-select>
</div>
</li>
<li>
<label>性别</label>
<div>
<el-select size="small" v-model="form.sex">
<el-option v-for="item in sexList" :key="item.value" :label="item.name" :value="item.value"></el-option>
</el-select>
</div>
</li>
<li>
<label>出生年月日</label>
<div>
<el-date-picker size="small" v-model="form.dateBirth" :clearable="false" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd"></el-date-picker>
</div>
<div class="child">
<span>城市</span>
<div>
<el-select v-model="form.cityId" placeholder :disabled="form.provinceId ? false : true">
<el-option v-for="item in cityList" :key="item.cityId" :label="item.cityName" :value="item.cityId"></el-option>
</el-select>
</li>
<li>
<label>所在国家</label>
<div class="mul">
<div class="child">
<span>国家</span>
<div>
<el-select size="small" v-model="form.countries" placeholder>
<el-option v-for="item in countryList" :key="item.value" :label="item.label" :value="item.label"></el-option>
</el-select>
</div>
</div>
<div class="child">
<span>省份</span>
<div>
<el-select size="small" v-model="form.provinceId" placeholder @change="id => getCity(id,1)">
<el-option v-for="item in provinceList" :key="item.provinceId" :label="item.provinceName" :value="item.provinceId"></el-option>
</el-select>
</div>
</div>
<div class="child">
<span>城市</span>
<div>
<el-select size="small" v-model="form.cityId" placeholder :disabled="form.provinceId ? false : true">
<el-option v-for="item in cityList" :key="item.cityId" :label="item.cityName" :value="item.cityId"></el-option>
</el-select>
</div>
</div>
</div>
</div>
</li>
<li>
<label>证件</label>
<div>
<el-input v-model="form.idNumber" clearable></el-input>
</div>
</li>
<li>
<label>教育程度</label>
<div>
<el-select v-model="form.educationDegree" placeholder="请选择教育程度">
<el-option v-for="(item,index) in educationDegreeList" :key="index" :label="item.name" :value="item.value"></el-option>
</el-select>
</div>
</li>
</ul>
</li>
<li>
<label>证件</label>
<div>
<el-input size="small" v-model="form.idNumber" clearable></el-input>
</div>
</li>
<li>
<label>教育程度</label>
<div>
<el-select size="small" v-model="form.educationDegree" placeholder="请选择教育程度">
<el-option v-for="(item,index) in educationDegreeList" :key="index" :label="item.name" :value="item.value"></el-option>
</el-select>
</div>
</li>
</ul>
</div>
</div>
<div class="block">
<div class="flex j-between a-center m-b-20">
<h6 class="title" style="margin-bottom: 0;">个人档案</h6>
<div class="page">
<div class="flex j-between a-center m-r-20">
<h6 class="p-title">个人档案</h6>
<el-button type="text" icon="el-icon-plus" @click="addArch">新增</el-button>
</div>
<div class="information">
<div class="page-content">
<div class="archives" v-for="(archive,index) in archivesList" :key="index" v-show="index == 0 || showArch">
<ul class="list">
<li>
@ -84,7 +86,7 @@
<div class="child">
<span>职业</span>
<div>
<el-select v-model="archive.personalCareerId" placeholder="选择职业">
<el-select size="small" v-model="archive.personalCareerId" placeholder="选择职业">
<el-option v-for="item in occupationList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
@ -92,7 +94,7 @@
<div class="child">
<span>国家</span>
<div>
<el-select v-model="form.countries" placeholder>
<el-select size="small" v-model="form.countries" placeholder>
<el-option v-for="item in countryList" :key="item.value" :label="item.label" :value="item.label" ></el-option>
</el-select>
</div>
@ -100,7 +102,7 @@
<div class="child">
<span>学校名称</span>
<div>
<el-select v-model="archive.schoolId" filterable placeholder="选择学校" @change="id => getSchoolName(id,index)">
<el-select size="small" v-model="archive.schoolId" filterable placeholder="选择学校" @change="id => getSchoolName(id,index)">
<el-option v-for="item in schoolList" :key="item.value" :label="item.schoolName" :value="item.schoolId"></el-option>
</el-select>
</div>
@ -113,7 +115,7 @@
<div class="child">
<span>专业学科</span>
<div>
<el-select v-model="archive.disciplineId" placeholder="选择专业学科" @change="id => getItemProfessionalClass(id,index)" @clear="() => clearItemClass(index)">
<el-select size="small" v-model="archive.disciplineId" placeholder="选择专业学科" @change="id => getItemProfessionalClass(id,index)" @clear="() => clearItemClass(index)">
<el-option v-for="item in subjectList" :key="item.value" :label="item.disciplineName" :value="item.disciplineId"></el-option>
</el-select>
</div>
@ -121,7 +123,7 @@
<div class="child">
<span>专业类</span>
<div>
<el-select v-model="archive.professionalClassId" placeholder="选择专业类" :disabled="archive.disciplineId ? false : true" @change="id => getItemProfessional(id,index)" @clear="() => clearItemProfess(index)">
<el-select size="small" v-model="archive.professionalClassId" placeholder="选择专业类" :disabled="archive.disciplineId ? false : true" @change="id => getItemProfessional(id,index)" @clear="() => clearItemProfess(index)">
<el-option v-for="item in archive.ProfessionalClassList" :key="item.professionalClassId" :label="item.professionalClassName" :value="item.professionalClassId"></el-option>
</el-select>
</div>
@ -129,7 +131,7 @@
<div class="child">
<span>专业</span>
<div>
<el-select v-model="archive.professionalId" placeholder="选择专业" :disabled="archive.professionalClassId ? false : true" @change="getItemStuGrade">
<el-select size="small" v-model="archive.professionalId" placeholder="选择专业" :disabled="archive.professionalClassId ? false : true" @change="getItemStuGrade">
<el-option v-for="item in archive.ProfessionalList" :key="item.professionalId" :label="item.professionalName" :value="item.professionalId"></el-option>
</el-select>
</div>
@ -138,46 +140,50 @@
</li>
</ul>
</div>
<div class="fold">
<div class="fold" v-if="archivesList.length > 1">
<img :class="{active: showArch}" src="@/assets/img/arrow.png" alt="" @click="showArch = !showArch">
</div>
</div>
</div>
<div class="block">
<h6 class="title">账号信息</h6>
<ul class="list">
<li>
<label>用户账号</label>
<div>
<el-input v-model="form.account" clearable></el-input>
</div>
</li>
<li>
<label>手机号</label>
<div>
<span class="val" v-if="form.phone">{{form.phone}}</span>
<el-button size="small" @click="bindPhone">更换</el-button>
</div>
</li>
<li>
<label>邮箱</label>
<div>
<span class="val" v-if="form.email">{{form.email}}</span>
<el-button size="small" @click="bindEmail">更换</el-button>
</div>
</li>
<li>
<label>密码</label>
<div>
<el-button size="small" @click="bindPassword">更换密码</el-button>
</div>
</li>
</ul>
<div class="text-right">
<el-button type="primary" size="small" v-throttle @click="save">更新</el-button>
<div class="page">
<h6 class="p-title">账号信息</h6>
<div class="page-content">
<ul class="list">
<li>
<label>用户账号</label>
<div>
<el-input size="small" v-model="form.account" clearable></el-input>
</div>
</li>
<li>
<label>手机号</label>
<div>
<el-input class="m-r-10" size="small" v-model="form.phone" disabled></el-input>
<el-button type="primary" size="small" @click="bindPhone">更换</el-button>
</div>
</li>
<li>
<label>邮箱</label>
<div>
<el-input class="m-r-10" size="small" v-model="form.email" disabled></el-input>
<el-button v-if="form.email" type="primary" size="small" @click="bindEmail">更换</el-button>
<el-button v-else size="small" @click="bindEmail">添加</el-button>
</div>
</li>
<li>
<label>密码</label>
<div>
<el-input class="m-r-10" size="small" value="xxxxxxxx" disabled></el-input>
<el-button type="primary" size="small" @click="bindPassword">更换密码</el-button>
</div>
</li>
</ul>
</div>
</div>
<div class="text-center">
<el-button type="primary" size="small" v-throttle @click="save">更新</el-button>
</div>
<el-dialog :title="form.email ? '更换邮箱' : '绑定邮箱'" :visible.sync="emailVisible" :close-on-click-modal="false" @close="closeEmail" width="30%">
<el-form ref="form" :model="form" label-width="60px">
@ -339,9 +345,19 @@ export default {
phoneBtnText: '发送验证码',
phoneCode: '',
phoneDisabled: false,
phoneTimer: null
phoneTimer: null,
updateTime: 0
};
},
watch: {
form: {
handler(val, oldVal){
this.updateTime++
if(this.updateTime > 1) this.$emit('updateStatus',this.updateTime > 1)
},
deep:true
}
},
mounted() {
this.getdata()
this.getProvince()
@ -479,6 +495,8 @@ export default {
userName: form.userName
})
util.successMsg('提交成功')
this.updateTime = 0
this.$emit('updateStatus',false)
this.getdata()
}else{
util.errorMsg('提交失败')
@ -518,7 +536,6 @@ export default {
this.emailVisible = true
},
bindPhone() {
this.phone = this.form.phone
this.phoneVisible = true
},
bindPassword() {
@ -797,19 +814,8 @@ export default {
</script>
<style lang="scss" scoped>
.block{
padding: 34px;
.page{
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;
}
.list{
li{
display: flex;
@ -858,6 +864,7 @@ export default {
text-align: center;
img{
cursor: pointer;
transition: .5s;
&.active{
transform: rotate(180deg);
}

Loading…
Cancel
Save