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' import Setting from '@/setting'
let host1 = 'http://192.168.31.125:9000'//林 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 { export default {
// 登录注册 // 登录注册
@ -63,6 +65,7 @@ export default {
getDownloadRecord:`/data/data/myDownload/getDownloadRecord`, getDownloadRecord:`/data/data/myDownload/getDownloadRecord`,
downloadAgain:`/data/data/downloadAgain`, downloadAgain:`/data/data/downloadAgain`,
isDownload:`/data/data/product/isDownload`, isDownload:`/data/data/product/isDownload`,
getTableTime:`/data/data/tableTime/getTableTime`,
// 数据操作记录 // 数据操作记录
queryAccumulate:`/data/data/dataRecord/queryAccumulate`, queryAccumulate:`/data/data/dataRecord/queryAccumulate`,

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

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

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

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

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

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

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

Loading…
Cancel
Save