数据、用户、角色等

ui1
yujialong 3 years ago
parent 75c2aefbf5
commit 8c0c2e4213
  1. 52
      src/api/index.js
  2. BIN
      src/assets/img/arrow.png
  3. 6
      src/libs/util.js
  4. 28
      src/pages/data/list/index.vue
  5. 2
      src/pages/index/list/index.vue
  6. 6
      src/pages/role/list/index.vue
  7. 10
      src/pages/setting/person/download.vue
  8. 141
      src/pages/stat/list/index.vue
  9. 490
      src/pages/user/list/index.vue
  10. 4
      src/plugins/requests/index.js
  11. 6
      src/setting.js

@ -1,7 +1,7 @@
import Setting from '@/setting' import Setting from '@/setting'
let uploadURL = Setting.upload.apiURL let uploadURL = Setting.upload.apiURL
let host = 'http://www.liuwanr.cn' let host = 'http://www.liuwanr.cn'
let host1 = 'http://192.168.31.125:8888' let host1 = 'http://192.168.31.125:9000'
export default { export default {
// 登录注册 // 登录注册
@ -36,9 +36,9 @@ export default {
queryCity: `cjEnterprise/city/queryCity`, queryCity: `cjEnterprise/city/queryCity`,
queryClient: `cjEnterprise/client/list`, queryClient: `cjEnterprise/client/list`,
// 员工管理 // 用户管理
addStaff: `evaluation/tms/system/addStaff`, saveUser: `/data/user/save`,
daleteBatchStaff: `evaluation/tms/system/daleteBatchStaff`, getUserList: `/data/user/getUserList`,
queryStaff: `evaluation/tms/system/queryStaff`, queryStaff: `evaluation/tms/system/queryStaff`,
querystaffDetail: `evaluation/tms/system/querystaffDetail`, querystaffDetail: `evaluation/tms/system/querystaffDetail`,
updateStaff: `evaluation/tms/system/updateStaff`, updateStaff: `evaluation/tms/system/updateStaff`,
@ -49,26 +49,34 @@ export default {
resetPwd:`evaluation/tms/system/resetPwd`, resetPwd:`evaluation/tms/system/resetPwd`,
// 角色管理 // 角色管理
batchRemove:`/data/data/role/batchRemove`, batchRemove:`/data/role/batchRemove`,
getRole:`/data/data/role/get`, getRole:`/data/role/get`,
getName:`/data/data/role/getName`, getName:`/data/role/getName`,
listRole:`/data/data/role/list`, listRole:`/data/role/list`,
removeRole:`/data/data/role/remove`, removeRole:`/data/role/remove`,
saveOrUpdate:`/data/data/role/saveOrUpdate`, saveOrUpdate:`/data/role/saveOrUpdate`,
getRoles:`/data/role/getRole`,
checkAccount:`/data/user/checkAccount`,
// 权限菜单管理 // 权限菜单管理
doAssign:`/data/data/permission/doAssign`, doAssign:`/data/permission/doAssign`,
queryPermissionMenu:`/data/data/permission/queryPermissionMenu`, queryPermissionMenu:`/data/permission/queryPermissionMenu`,
savePer:`/data/data/permission/save`, savePer:`/data/permission/save`,
toAssign:`/data/data/permission/toAssign`, toAssign:`/data/permission/toAssign`,
// 表展示 // 表展示
getIdQueryTable:`/data/huoran/data/table/getIdQueryTable`, getIdQueryTable:`/data/table/getIdQueryTable`,
getTableByClassification:`/data/huoran/data/table/getTableByClassification`, getTableByClassification:`/data/table/getTableByClassification`,
getTableByCondition:`/data/huoran/data/table/getTableByCondition`, getTableByCondition:`/data/table/getTableByCondition`,
downloadData:`${host1}/data/data/download`, downloadData:`${host1}/data/download`,
previewData:`${host1}/data/data/preview`, previewData:`${host1}/data/preview`,
downloadRecord:`${host1}/data/huoran/data/myDownload/downloadRecord`, downloadRecord:`${host1}/data/myDownload/downloadRecord`,
getDownloadRecord:`${host1}/data/huoran/data/myDownload/getDownloadRecord`, getDownloadRecord:`data/myDownload/getDownloadRecord`,
downloadAgain:`${host1}/data/data/downloadAgain`, downloadAgain:`${host1}/data/downloadAgain`,
// 数据操作记录
queryAccumulate:`${host1}/data/dataRecord/queryAccumulate`,
queryDatabaseInfo:`${host1}/data/dataRecord/queryDatabaseInfo`,
queryDatabaseInfoByMonth:`${host1}/data/dataRecord/queryDatabaseInfoByMonth`,
saveRecord:`${host1}/data/dataRecord/saveRecord`,
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 B

@ -106,15 +106,15 @@ const util = {
}, },
// 成功提示 // 成功提示
successMsg(message,duration = 3000) { successMsg(message,duration = 3000) {
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 = 3000) {
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 = 3000) {
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})
}, },
} }

@ -136,6 +136,7 @@ import util from '@/libs/util'
export default { export default {
data() { data() {
return { return {
schoolId: 1001,
typeList: [], typeList: [],
active: '', active: '',
introduce: '', introduce: '',
@ -180,6 +181,7 @@ export default {
this.getType() this.getType()
if(this.$route.query.download){ if(this.$route.query.download){
this.download({ this.download({
id: this.$route.query.id,
name: this.$route.query.name name: this.$route.query.name
}) })
} }
@ -227,6 +229,12 @@ export default {
}, },
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,{
platformUserId: 4,
tableId: row.id,
type: 2,
schoolId: this.schoolId,
}).then(res => {}).catch(res => {})
let comment = res.comment let comment = res.comment
let previewHead = [] let previewHead = []
comment.map(n => { comment.map(n => {
@ -311,18 +319,19 @@ export default {
let newFields = [] let newFields = []
let fieldsList = this.fieldsList let fieldsList = this.fieldsList
fields.map(n => { fields.map(n => {
newFields.push(`fields=${fieldsList.find(e => e.comment == n).field}`) newFields.push(fieldsList.find(e => e.comment == n).field)
}) })
util.successMsg('数据正在生成中,请稍等片刻,生成后会自动下载,您可以先访问其他页面。',5000) let msgObj = util.successMsg('数据正在生成中,请稍等片刻,生成后会自动下载,您可以先访问其他页面。',5000)
this.downloadVisible = false this.downloadVisible = false
let startTime = this.startTime ? this.startTime : '' let startTime = this.startTime ? this.startTime : ''
let endTime = this.endTime ? this.endTime : '' let endTime = this.endTime ? this.endTime : ''
let frequency = this.frequency let frequency = this.frequency
axios.get(`${this.api.downloadData}?tableName=${this.curRow.name}&${newFields.join('&')}&startTime=${startTime}&endTime=${endTime}&frequency=${frequency}`,{ axios.get(`${this.api.downloadData}?tableName=${this.curRow.name}&table_id=${this.curRow.id}&fields=${newFields.join()}&startTime=${startTime}&endTime=${endTime}&frequency=${frequency}`,{
responseType: 'blob' responseType: 'blob'
}).then((res) => { }).then((res) => {
console.log(22,res.data) msgObj.close()
if(res.data.type != 'multipart/form-data') return util.warningMsg('数据总数为零!')
const blob = new Blob([res.data]) const blob = new Blob([res.data])
const fileName = `${this.curRow.showName}.xls` const fileName = `${this.curRow.showName}.xls`
if ('download' in document.createElement('a')) { // IE if ('download' in document.createElement('a')) { // IE
@ -338,7 +347,16 @@ export default {
navigator.msSaveBlob(blob, fileName) navigator.msSaveBlob(blob, fileName)
} }
this.$get(`${this.api.downloadRecord}?platformUserId=4&tableId=${this.curRow.id}&${newFields.join('&')}&startTime=${startTime}&endTime=${endTime}&frequency=${frequency}`).then(res => {}).catch(res => {}) this.$get(`${this.api.downloadRecord}?platformUserId=4&tableId=${this.curRow.id}&fields=${newFields.join()}&startTime=${startTime}&endTime=${endTime}&frequency=${frequency}`).then(res => {}).catch(res => {})
this.$post(this.api.saveRecord,{
platformUserId: 4,
tableId: this.curRow.id,
type: 1,
schoolId: this.schoolId,
}).then(res => {}).catch(res => {})
}).catch(res => {
msgObj.close()
}) })
} }
} }

@ -76,7 +76,7 @@ export default {
this.getData() this.getData()
}, },
download(row){ download(row){
this.$router.push(`/data?download=true&name=${row.name}`) this.$router.push(`/data?download=true&id=${row.id}&name=${row.name}`)
} }
} }
}; };

@ -115,12 +115,6 @@ export default {
}, },
methods: { methods: {
getData() { getData() {
let data = {
clientId: this.clientId
}
if(this.keyword.length){
data.name = this.keyword
}
this.$get(`${this.api.listRole}/${this.page}/${this.pageSize}?name=${this.keyword}&clientId=`).then(res => { this.$get(`${this.api.listRole}/${this.page}/${this.pageSize}?name=${this.keyword}&clientId=`).then(res => {
this.listData = res.items this.listData = res.items
this.total = res.total this.total = res.total

@ -80,9 +80,12 @@ export default {
this.getData() this.getData()
}, },
download(row){ download(row){
axios.get(`${this.api.downloadAgain}?table_id=${row.id}&fields=${row.fields}&startTime=${row.startTime ? row.startTime : ''}&endTime=${row.endTime ? row.endTime : ''}&frequency=${row.frequency ? row.frequency : ''}`,{ 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 : ''}`,{
responseType: 'blob' responseType: 'blob'
}).then(res => { }).then(res => {
msgObj.close()
if(res.data.type != 'multipart/form-data') return util.warningMsg('数据总数为零!')
const blob = new Blob([res.data]) const blob = new Blob([res.data])
const fileName = `${row.databaseName}.xls` const fileName = `${row.databaseName}.xls`
if ('download' in document.createElement('a')) { // IE if ('download' in document.createElement('a')) { // IE
@ -97,7 +100,10 @@ export default {
} else { // IE10+ } else { // IE10+
navigator.msSaveBlob(blob, fileName) navigator.msSaveBlob(blob, fileName)
} }
}).catch(res => {}) this.$post(`${this.api.saveRecord}?platformUserId=4&tableId=${row.id}&type=1&schoolId=1`).then(res => {}).catch(res => {})
}).catch(res => {
msgObj.close()
})
} }
} }
}; };

@ -2,6 +2,7 @@
<div class="wrap"> <div class="wrap">
<div class="left"> <div class="left">
<div class="inner"> <div class="inner">
<h6 class="school">广东工业大学</h6>
<div class="date"> <div class="date">
<span class="name">使用期限</span> <span class="name">使用期限</span>
<div class="val"> <div class="val">
@ -9,6 +10,7 @@
</div> </div>
</div> </div>
<p class="surplus"><span class="name">剩余期限</span><span class="num">300</span> </p> <p class="surplus"><span class="name">剩余期限</span><span class="num">300</span> </p>
<p class="surplus"><span class="name">账号数量</span><span class="num">10</span> </p>
</div> </div>
</div> </div>
<div class="right"> <div class="right">
@ -23,13 +25,13 @@
</li> </li>
<li> <li>
<p class="people"> <p class="people">
<span class="num">2</span> <span class="num">{{dayCount}}</span>
</p> </p>
<p class="text">平均日访客量</p> <p class="text">平均日访客量</p>
</li> </li>
<li> <li>
<p class="people"> <p class="people">
<span class="num">4</span> <span class="num">{{schoolCount}}</span>
</p> </p>
<p class="text">累计下载</p> <p class="text">累计下载</p>
</li> </li>
@ -49,6 +51,10 @@
<label>查询时间区域</label> <label>查询时间区域</label>
<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>
<label>搜索</label>
<el-input placeholder="请输入数据分类/数据库类别" v-model="keyword" suffix-icon="el-icon-search" clearable size="small"></el-input>
</li>
</ul> </ul>
</div> </div>
<div class="flex j-between"> <div class="flex j-between">
@ -62,17 +68,19 @@
<el-table :data="listData" class="table" stripe header-align="center" row-key="id" @selection-change="handleSelectionChange"> <el-table :data="listData" class="table" stripe header-align="center" row-key="id" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="80" align="center"></el-table-column> <el-table-column type="selection" width="80" align="center"></el-table-column>
<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="practiseName" label="数据分类" align="center"></el-table-column> <el-table-column prop="categoryOne" label="数据分类" align="center"></el-table-column>
<el-table-column prop="paperName" label="数据库类别" align="center"></el-table-column> <el-table-column prop="categoryTwo" label="数据库类别" align="center"></el-table-column>
<el-table-column prop="questionsNum" label="下载量" align="center"></el-table-column> <el-table-column prop="download" label="下载量" align="center"></el-table-column>
<el-table-column prop="peopleNum" label="点击量" align="center"></el-table-column> <el-table-column prop="click" label="点击量" align="center"></el-table-column>
</el-table> </el-table>
<div class="m-t-15 text-center">
<img src="../../../assets/img/arrow.png" class="arrow" :class="{active}" @click="toggleList" alt="">
</div>
</div> </div>
<div class="block"> <div class="block">
<div class="flex j-between"> <div class="flex j-between">
<h6 class="title">按月份统计数据库使用概况</h6> <h6 class="title">按月份统计数据库使用概况</h6>
<div> <div>
<el-button type="primary" size="small" v-auth="'/system/list:员工管理:批量导入'">导出数据</el-button> <el-button type="primary" size="small" v-auth="'/system/list:员工管理:批量导入'">导出数据</el-button>
</div> </div>
@ -82,18 +90,18 @@
<el-table-column type="selection" width="80" align="center"></el-table-column> <el-table-column type="selection" width="80" align="center"></el-table-column>
<el-table-column prop="year" label="年份" align="center"></el-table-column> <el-table-column prop="year" label="年份" align="center"></el-table-column>
<el-table-column prop="type" label="类别" align="center"></el-table-column> <el-table-column prop="type" label="类别" align="center"></el-table-column>
<el-table-column prop="month1" label="1月" align="center"></el-table-column> <el-table-column prop="1" label="1月" align="center"></el-table-column>
<el-table-column prop="questionsNum" label="2月" align="center"></el-table-column> <el-table-column prop="2" label="2月" align="center"></el-table-column>
<el-table-column prop="questionsNum" label="3月" align="center"></el-table-column> <el-table-column prop="3" label="3月" align="center"></el-table-column>
<el-table-column prop="questionsNum" label="4月" align="center"></el-table-column> <el-table-column prop="4" label="4月" align="center"></el-table-column>
<el-table-column prop="questionsNum" label="5月" align="center"></el-table-column> <el-table-column prop="5" label="5月" align="center"></el-table-column>
<el-table-column prop="questionsNum" label="6月" align="center"></el-table-column> <el-table-column prop="6" label="6月" align="center"></el-table-column>
<el-table-column prop="questionsNum" label="7月" align="center"></el-table-column> <el-table-column prop="7" label="7月" align="center"></el-table-column>
<el-table-column prop="questionsNum" label="8月" align="center"></el-table-column> <el-table-column prop="8" label="8月" align="center"></el-table-column>
<el-table-column prop="questionsNum" label="9月" align="center"></el-table-column> <el-table-column prop="9" label="9月" align="center"></el-table-column>
<el-table-column prop="questionsNum" label="10月" align="center"></el-table-column> <el-table-column prop="10" label="10月" align="center"></el-table-column>
<el-table-column prop="questionsNum" label="11月" align="center"></el-table-column> <el-table-column prop="11" label="11月" align="center"></el-table-column>
<el-table-column prop="questionsNum" label="12月" align="center"></el-table-column> <el-table-column prop="12" label="12月" align="center"></el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
@ -104,10 +112,17 @@
export default { export default {
data() { data() {
return { return {
schoolId: 1001,
dayCount: 0,
schoolCount: 0,
keyword: '',
searchTimer: null,
date: [], date: [],
startTime: '', startTime: '',
endTime: '', endTime: '',
listData: [], listData: [],
listDataKeyword: [],
listDataAll: [],
multipleSelection: [], multipleSelection: [],
monthData: [ monthData: [
{ {
@ -125,9 +140,16 @@ export default {
}, },
], ],
multipleSelection1: [], multipleSelection1: [],
active: false
} }
}, },
watch: { watch: {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.searchData()
},500)
},
date: function(val){ date: function(val){
if(val){ if(val){
this.startTime = val[0] this.startTime = val[0]
@ -136,23 +158,66 @@ export default {
this.startTime = '' this.startTime = ''
this.endTime = '' this.endTime = ''
} }
this.getData() this.getDatabase()
} }
}, },
mounted() { mounted() {
this.getData()
}, },
methods: { methods: {
getData(){ getData(){
this.$get(`${this.api.queryAccumulate}?schoolId=${this.schoolId}`).then(res => {
this.dayCount = res.dayCount
this.schoolCount = res.schoolCount
}).catch(res => {})
this.$get(`${this.api.queryDatabaseInfoByMonth}?schoolId=${this.schoolId}`).then(res => {
let list = res.message
let result = []
for(let i in list){
for(let n in list[i]){
let item = {
year: i,
type: n,
}
list[i][n].map((val,index) => {
item[index + 1] = val
})
result.push(item)
}
}
this.monthData = result
}).catch(res => {})
this.getDatabase()
},
getDatabase(){
this.$get(`${this.api.queryDatabaseInfo}?schoolId=${this.schoolId}&startTime=${this.startTime}&endTime=${this.endTime}`).then(res => {
let list = JSON.parse(res.databaseInfo)
this.listData = list.slice(0,10)
this.listDataAll = list
}).catch(res => {})
},
searchData(){
let list = this.listDataAll
let result = []
list.map(n => {
(n.categoryOne.includes(this.keyword) || n.categoryTwo.includes(this.keyword)) && result.push(n)
})
this.listData = this.active ? result : result.slice(0,10)
this.listDataKeyword = result
}, },
objectSpanMethod({ row, column, rowIndex, columnIndex }) { objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) { if (!columnIndex || columnIndex == 1) {
if (rowIndex % 2 === 0) { if (rowIndex % 3 == 0) {
return { return {
rowspan: 3, rowspan: 3,
colspan: 1 colspan: 1
}; }
}else {
return {
rowspan: 0,
colspan: 0
}
} }
} }
}, },
@ -162,6 +227,22 @@ export default {
handleSelectionChange1(val) { handleSelectionChange1(val) {
this.multipleSelection1 = val this.multipleSelection1 = val
}, },
toggleList(){
if(this.keyword){
if(this.active){
this.listData = this.listDataKeyword.slice(0,10)
}else{
this.listData = this.listDataKeyword
}
}else{
if(this.active){
this.listData = this.listDataAll.slice(0,10)
}else{
this.listData = this.listDataAll
}
}
this.active = !this.active
}
} }
}; };
</script> </script>
@ -176,6 +257,12 @@ export default {
padding: 15px; padding: 15px;
background-color: #fff; background-color: #fff;
border-radius: 8px; border-radius: 8px;
.school{
margin-bottom: 15px;
font-size: 20px;
color: #568DF2;
text-align: center;
}
.date{ .date{
display: flex; display: flex;
align-items: center; align-items: center;
@ -213,6 +300,12 @@ export default {
line-height: 1.8; line-height: 1.8;
border-left: 6px solid; border-left: 6px solid;
} }
.arrow{
cursor: pointer;
&.active{
transform: rotate(180deg)
}
}
.stat{ .stat{
display: flex; display: flex;
li{ li{

@ -2,11 +2,34 @@
<div> <div>
<div class="page"> <div class="page">
<div class="page-content"> <div class="page-content">
<div class="tool"> <div class="tool" style="margin-bottom: 0;">
<ul class="filter"> <ul class="filter">
<li>
<label>创建时间</label>
<el-select v-model="month" placeholder="请选择创建时间" size="small" clearable class="w-150">
<el-option v-for="(item,index) in monthList" :key="index" :label="item.label" :value="item.id"></el-option>
</el-select>
</li>
<li>
<label>时间范围</label>
<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>
<label>角色</label>
<el-select v-model="role" placeholder="请选择角色" size="small" clearable class="w-150" @change="initData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in roleList" :key="index" :label="item.roleName" :value="item.id"></el-option>
</el-select>
</li>
<li>
<label>状态</label>
<el-select v-model="status" placeholder="请选择状态" size="small" clearable class="w-150" @change="initData">
<el-option v-for="(item,index) in statusList" :key="index" :label="item.label" :value="item.id"></el-option>
</el-select>
</li>
<li> <li>
<label>搜索</label> <label>搜索</label>
<el-input style="width: 250px" placeholder="请输入员工姓名/工号/角色名称" v-model="keyword" suffix-icon="el-icon-search" clearable size="small"></el-input> <el-input style="width: 250px" placeholder="请输入员工账号/姓名/工号" v-model="keyword" suffix-icon="el-icon-search" clearable size="small"></el-input>
</li> </li>
</ul> </ul>
<div> <div>
@ -23,20 +46,29 @@
<el-table-column prop="account" label="账号" align="center"></el-table-column> <el-table-column prop="account" label="账号" align="center"></el-table-column>
<el-table-column prop="userName" label="姓名" align="center"></el-table-column> <el-table-column prop="userName" label="姓名" align="center"></el-table-column>
<el-table-column prop="workNumber" label="工号/学号" align="center"></el-table-column> <el-table-column prop="workNumber" label="工号/学号" align="center"></el-table-column>
<el-table-column prop="roleName" label="账号角色" align="center"></el-table-column> <el-table-column label="权限状态" align="center">
<template slot-scope="scope">
{{scope.row.disableAccount ? '禁用' : '启用'}}
</template>
</el-table-column>
<el-table-column label="账号角色" align="center">
<template slot-scope="scope">
{{roleList.find(n => n.id == scope.row.roleId) ? roleList.find(n => n.id == scope.row.roleId).roleName : ''}}
</template>
</el-table-column>
<el-table-column prop="loginNumber" label="登录次数" align="center"> <el-table-column prop="loginNumber" label="登录次数" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.loginNumber ? scope.row.loginNumber : 0}} {{scope.row.loginNumber ? scope.row.loginNumber : 0}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="lastLoginTime" label="上次登录时间" width="160" align="center"></el-table-column> <el-table-column prop="lastLoginTime" label="上次登录时间" width="160" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="200"> <el-table-column label="操作" align="center" width="260">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="showTeacher(scope.row)" v-auth="'/system/list:员工管理:查看'">查看</el-button> <el-button type="text" @click="showTeacher(scope.row)" v-auth="'/system/list:员工管理:查看'">查看</el-button>
<el-button type="text" @click="editTeacher(scope.row)" v-auth="'/system/list:员工管理:编辑'">编辑</el-button> <el-button type="text" @click="editTeacher(scope.row)" v-auth="'/system/list:员工管理:编辑'">编辑</el-button>
<el-button type="text" @click="resetPassword(scope.row)" v-auth="'/system/list:员工管理:重置密码'">重置密码</el-button> <el-button type="text" @click="resetPassword(scope.row)" v-auth="'/system/list:员工管理:重置密码'">重置密码</el-button>
<el-button type="text" @click="delTeacher(scope.row)" v-auth="'/system/list:员工管理:删除'">删除</el-button> <el-button type="text" @click="handleDelete(scope.row)" v-auth="'/system/list:员工管理:删除'">删除</el-button>
<el-switch v-model="scope.row.isDisable" :active-value="0" :inactive-value="1" style="margin: 0 10px 0 5px" :active-text="scope.row.isDisable ? '关' : '开'" @change="switchOff($event,scope.row,scope.$index)"></el-switch> <el-switch v-model="scope.row.disableAccount" :active-value="0" :inactive-value="1" style="margin: 0 10px 0 5px" :active-text="scope.row.disableAccount ? '关' : '开'" @change="switchOff($event,scope.row,scope.$index)"></el-switch>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -44,35 +76,35 @@
<el-pagination background layout="total,prev, pager, next" :current-page="page" @current-change="handleCurrentChange" :total="total"></el-pagination> <el-pagination background layout="total,prev, pager, next" :current-page="page" @current-change="handleCurrentChange" :total="total"></el-pagination>
</div> </div>
<el-dialog :title="isDetail ? '查看员工' : (isAddteacher ? '新增员工' : '编辑员工')" :visible.sync="teacherVisible" width="500px" @close="closeTeacher" class="dialog" :close-on-click-modal="false"> <el-dialog :title="isDetail ? '查看员工' : (form.userId ? '新增员工' : '编辑员工')" :visible.sync="userVisible" width="500px" @close="closeUser" class="dialog" :close-on-click-modal="false">
<el-form ref="teacherForm" :model="teacherForm" :rules="rules" label-width="110px" label-suffix="" :disabled="isDetail"> <el-form ref="form" :model="form" :rules="rules" label-width="110px" label-suffix="" :disabled="isDetail">
<el-form-item prop="userAccount" label="账号"> <el-form-item prop="account" label="账号">
<el-input v-model="teacherForm.userAccount" ref="account" placeholder="请输入职工账号" @change="accountChange"></el-input> <el-input v-model="form.account" ref="account" placeholder="请输入职工账号" @change="accountChange"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="userName" label="用户姓名"> <el-form-item prop="userName" label="用户姓名">
<el-input v-model="teacherForm.userName" placeholder="请输入员工姓名"></el-input> <el-input v-model="form.userName" placeholder="请输入员工姓名"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="roleValue" label="账号角色"> <el-form-item prop="roleId" label="账号角色">
<el-select v-model="teacherForm.roleValue" placeholder="请选择账号角色" :disabled="!isAddteacher"> <el-select v-model="form.roleId" placeholder="请选择账号角色">
<el-option v-for="(item,index) in roleList" :key="index" :label="item.roleName" :value="item.id"></el-option> <el-option v-for="(item,index) in roleList" :key="index" :label="item.roleName" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="uniqueIdentificationAccount" label="唯一标识"> <el-form-item prop="uniqueIdentification" label="唯一标识">
<el-input disabled v-model="teacherForm.uniqueIdentificationAccount" 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="手机号"> <el-form-item prop="phone" label="手机号">
<el-input v-model="teacherForm.phone" placeholder="请输入手机号" maxlength="11"></el-input> <el-input v-model="form.phone" placeholder="请输入手机号" maxlength="11"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="email" label="邮箱"> <el-form-item prop="email" label="邮箱">
<el-input v-model="teacherForm.email" placeholder="请输入邮箱"></el-input> <el-input v-model="form.email" placeholder="请输入邮箱"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="workNumber" label="工号/学号"> <el-form-item prop="workNumber" label="工号/学号">
<el-input v-model="teacherForm.workNumber" placeholder="请输入职工工号" @change="workNumberChange"></el-input> <el-input v-model="form.workNumber" placeholder="请输入职工工号" @change="workNumberChange"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer" v-if="!isDetail"> <span slot="footer" class="dialog-footer" v-if="!isDetail">
<el-button size="small" @click="teacherVisible = false"> </el-button> <el-button size="small" @click="userVisible = false"> </el-button>
<el-button size="small" type="primary" @click="saveSure('teacherForm')"> </el-button> <el-button size="small" type="primary" @click="confirm"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
@ -102,32 +134,60 @@ import util from '@/libs/util'
export default { export default {
data() { data() {
return { return {
pages: 10, schoolId: 1001,
month: '',
monthList: [
{
id: '',
label: '不限'
},{
id: 3,
label: '近3个月'
},{
id: 6,
label: '近6个月'
},{
id: 12,
label: '近1年'
}
],
date: [],
startTime: '',
endTime: '',
role: '',
status: '',
statusList: [
{
id: '',
label: '不限'
},{
id: 0,
label: '启用'
},{
id: 1,
label: '禁用'
}
],
isDetail: false, isDetail: false,
props: { multiple: true }, userVisible: false,
orgList: [],
isAddteacher: false,
teacherVisible: false,
staffShowVisible: false,
roleList: [], roleList: [],
teacherForm: { form: {
teacherId: '', platformId: Setting.platformId,
// type: 1, //
account: '',
userId: '',
userName: '', userName: '',
roleValue: '', roleId: '',
phone: '', phone: '',
uniqueIdentificationAccount: '', uniqueIdentification: '',
workNumber: '', workNumber: '',
email: '', email: '',
major: '', schoolId: this.schoolId,
department: '', password: ''
userAccount: '',
major: '',
clientId: this.clientId,
clientName: this.clientName,
}, },
rules: { rules: {
userAccount: [ account: [
{ required: true, message: '请输入账号', trigger: 'blur' }, { required: true, message: '请输入职工账号', trigger: 'blur' },
{ {
pattern: /^[A-Za-z0-9]+$/, pattern: /^[A-Za-z0-9]+$/,
message: '请输入正确的账号', message: '请输入正确的账号',
@ -137,45 +197,31 @@ export default {
userName: [ userName: [
{ required: true, message: '请输入用户姓名', trigger: 'blur' } { required: true, message: '请输入用户姓名', trigger: 'blur' }
], ],
roleValue: [ roleId: [
{ required: true, message: '请选择账号角色', trigger: 'change' } { required: true, message: '请选择账号角色', trigger: 'change' }
], ],
uniqueIdentificationAccount: [
// { required: true, message: '', trigger: 'blur' },
],
major: [
{ required: true, message: '请选择一级部门', trigger: 'change' }
],
workNumber: [ workNumber: [
{ required: true, message: '请输入职工工号', trigger: 'blur' }, { required: true, message: '请输入工号/学号', trigger: 'blur' },
{ {
pattern: /^[A-Za-z0-9]+$/, pattern: /^[A-Za-z0-9]+$/,
message: '请输入正确的职工工号', message: '请输入正确的工号/学号',
trigger: 'blur' trigger: 'blur'
} }
], ],
department: [
{ required: true, message: '请选择二级部门', trigger: 'change' }
],
phone: [ phone: [
// { required: true, message: '', trigger: 'blur' },
{ {
pattern: /^1[3456789]\d{9}$/, pattern: /^1[3456789]\d{9}$/,
message: '请输入正确的手机号', message: '请输入正确的手机号',
trigger: 'blur' trigger: 'blur'
} }
], ],
email: [ email: [
// { required: true, message: '', trigger: 'blur' },
{ {
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})$/,
message: '请输入正确的邮箱', message: '请输入正确的邮箱',
trigger: 'blur' trigger: 'blur'
} }
], ],
// schoolId: [
// { required: true, message: '', trigger: 'change' }
// ],
}, },
listData: [], listData: [],
importVisible: false, importVisible: false,
@ -183,32 +229,12 @@ export default {
page: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
departmentList: [],
teacherDepartmentList: [],
staffstateProfessId: '',
staffGradeId: '',
multipleSelection: [], multipleSelection: [],
uploadList: [], uploadList: [],
provinceId: this.$store.state.provinceId,
cityId: this.$store.state.cityId,
userId: this.$store.state.userId,
oneDepartmentIds: '',
twoDepartmentIds: '',
ProfessionalClassList: [],
subjectList: [],
ProfessionalList: [],
NoAdd: '',
AccountNoAdd: '',
NumberNoAdd: '',
platformId: this.$store.state.platformId,
schoolList: [],
uploadFaild: false, uploadFaild: false,
token: '', token: '',
accountRepeat: false, accountRepeat: false,
workNumberRepeat: false, workNumberRepeat: false,
originalAccount: '',
originalWorkNumber: '',
password: Setting.initialPassword
}; };
}, },
computed: { computed: {
@ -225,59 +251,45 @@ export default {
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.initData() this.initData()
},500) },500)
},
month: function(val){
if(val){
let unit = 24 * 60 * 60 * 1000
this.date = [util.formatDate('yyyy-MM-dd',new Date(new Date().getTime() - unit * 30 * val)),util.formatDate('yyyy-MM-dd',new Date(new Date().getTime() + unit))]
}else{
this.date = []
}
},
date: function(val){
if(val.length){
this.startTime = val[0]
this.endTime = val[1]
}else{
this.startTime = ''
this.endTime = ''
}
this.initData()
} }
}, },
mounted(){ mounted(){
this.getOrg() this.form.schoolId = this.schoolId
this.teacherForm.clientId = this.clientId
this.teacherForm.clientName = this.clientName
this.getData() this.getData()
this.getRoles() this.getRole()
}, },
methods: { methods: {
getOrg(){
let data = {
schoolId: this.clientId
}
this.$get(this.api.queryStaffPro,data).then(res => {
let firList = res.data.StaffProfessionalArchitectureList
if(firList){
firList.map(e => {
e.isParent = true
e.value = e.staffProfessionalArchitectureId
e.label = e.staffProfessionalArchitectureName
let data = {
staffProfessionalArchitectureId: e.staffProfessionalArchitectureId
}
this.$get(this.api.queryStaffGrade,data).then(res1 => {
res1.data.staffGradeList.map(e => {
e.value = e.staffGradeId
e.label = e.staffGradeName
})
e.children = res1.data.staffGradeList
}).catch(res => {})
})
setTimeout(() => {
this.orgList = firList
},500)
}
}).catch(res => {})
},
getData(){ getData(){
let totalPage = Math.ceil((this.total - 1) / this.pageSize) this.$post(this.api.getUserList,{
let currentPage = this.page > totalPage ? totalPage : this.page createTime: this.startTime,
this.page = currentPage < 1 ? 1 : currentPage disableAccount: this.status,
let data = { endTime: this.endTime,
staffProfessionalArchitectureIds: this.oneDepartmentIds, keyWord: this.keyword,
staffGradeIds: this.twoDepartmentIds,
searchContent: this.keyword,
schoolId: this.clientId,
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize pageSize: this.pageSize,
} platformId: Setting.platformId,
this.$get(`${this.api.queryStaff}/${this.page}/${this.pageSize}`,data).then(res => { roleId: this.role,
this.listData = res.data.staffList.list }).then(res => {
this.total = res.data.staffList.totalCount this.listData = res.pageList.records
this.total = res.pageList.total
if(!this.listData.length && this.total){ if(!this.listData.length && this.total){
this.page-- this.page--
this.getData() this.getData()
@ -288,16 +300,9 @@ export default {
this.page = 1 this.page = 1
this.getData() this.getData()
}, },
orgChange(node){ getRole(){
this.twoDepartmentIds = node.map(n => n[1]).toString() this.$get(this.api.getRoles).then(res => {
this.initData() this.roleList = res.list
},
getRoles(){
let data = {
clientId: this.clientId
}
this.$get(`${this.api.queryRoles}/1/100`,data).then(res => {
this.roleList = res.data.items
}).catch(res => {}) }).catch(res => {})
}, },
resetPassword(row){ resetPassword(row){
@ -319,173 +324,107 @@ export default {
}).catch(() => {}) }).catch(() => {})
}, },
accountChange(){ accountChange(){
if(this.teacherForm.userAccount !== this.originalAccount){ // if(this.form.account !== this.originalAccount){
this.$get(`${this.api.getAccount}?account=${this.teacherForm.userAccount}`).then(res => { this.$get(`${this.api.checkAccount}?account=${this.form.account}&type=1`).then(res => {
if(res.data.userInfo){ if(res.status == 200){
this.accountRepeat = false
}else{
this.accountRepeat = true this.accountRepeat = true
util.warningMsg('该账号已存在') util.warningMsg('该账号已存在')
}else{
this.accountRepeat = false
} }
}).catch(res => {}) }).catch(res => {})
}else{ // }else{
this.accountRepeat = false // this.accountRepeat = false
} // }
}, },
workNumberChange(){ workNumberChange(){
if(this.teacherForm.workNumber !== this.originalWorkNumber){ // if(this.form.workNumber !== this.originalWorkNumber){
this.$get(`${this.api.getWorkNumber}?workNumber=${this.teacherForm.workNumber}`).then(res => { this.$get(`${this.api.checkAccount}?workNumber=${this.form.workNumber}&type=2`).then(res => {
if(res.data.staff){ if(res.status == 200){
this.workNumberRepeat = false
}else{
this.workNumberRepeat = true this.workNumberRepeat = true
util.warningMsg('该工号已存在') util.warningMsg('该工号已存在')
}else{
this.workNumberRepeat = false
} }
}).catch(res => {}) }).catch(res => {})
}else{ // }else{
this.workNumberRepeat = false // this.workNumberRepeat = false
} // }
}, },
closeTeacher(){ closeUser(){
this.$refs.teacherForm.resetFields() this.$refs.form.resetFields()
this.teacherForm.clientId = this.clientId console.log(11,this.form)
this.teacherForm.clientName = this.clientName
this.teacherForm.department = ''
this.teacherForm.major = ''
this.teacherForm.workNumber = ''
this.teacherForm.userId = ''
this.teacherForm.staffId = ''
}, },
addTeacher(){ addTeacher(){
this.isDetail = false this.isDetail = false
this.teacherVisible = true this.userVisible = true
this.isAddteacher = true this.isAddteacher = true
this.teacherForm.teacherId = ''
}, },
getStaffDetail(userId){ getStaffDetail(userId){
this.$get(`${this.api.getStaff}/${userId}`).then(res => { this.$get(`${this.api.getStaff}/${userId}`).then(res => {
let user = res.data.userInfo; let user = res.data.userInfo;
let or = res.data.staff; let or = res.data.staff;
this.teacherForm.uniqueIdentificationAccount = user.uniqueIdentificationAccount this.form.uniqueIdentification = user.uniqueIdentification
this.teacherForm.clientId = user.clientId this.form.userName = user.userName
this.teacherForm.clientName = user.clientName this.form.phone = user.phone
this.teacherForm.userName = user.userName this.form.email = user.email
this.teacherForm.phone = user.phone this.form.account = user.account
this.teacherForm.email = user.email
this.teacherForm.userAccount = user.account
this.originalAccount = user.account this.originalAccount = user.account
this.teacherForm.userId = user.userId this.form.userId = user.userId
this.teacherForm.schoolId = user.schoolId this.form.schoolId = user.schoolId
this.teacherForm.roleValue = user.roleId
this.teacherForm.major = or.staffProfessionalArchitectureId this.form.workNumber = or.workNumber
this.teacherForm.department = or.staffGradeId
this.teacherForm.workNumber = or.workNumber
this.originalWorkNumber = or.workNumber this.originalWorkNumber = or.workNumber
this.isManager = true }).catch(res => {})
this.teacherForm.staffId = or.staffId
this.getDepartment()
}).catch(res => {});
}, },
editTeacher(row){ editTeacher(row){
this.isDetail = false this.isDetail = false
this.teacherVisible = true this.userVisible = true
this.isAddteacher = false this.isAddteacher = false
this.AccountNoAdd = false this.AccountNoAdd = false
this.teacherForm.teacherId = row.staffId this.form.userId = row.userId
this.getStaffDetail(row.staffId) this.getStaffDetail(row.userId)
}, },
showTeacher(row){ showTeacher(row){
this.staffShowVisible = true
this.isDetail = true this.isDetail = true
this.isAddManage = false this.getStaffDetail(row.userId)
this.AccountNoAdd = false
this.teacherForm.manageId = row.staffId
this.getStaffDetail(row.staffId)
}, },
getDepartment(){ confirm(){
let data = { this.$refs.form.validate((valid) => {
staffProfessionalArchitectureId: this.teacherForm.major
}
this.$get(this.api.queryStaffGrade,data).then(res => {
this.departmentList = res.data.staffGradeList
}).catch(res => {});
},
async saveSure(teacherForm){
this.$refs[teacherForm].validate((valid) => {
if (valid) { if (valid) {
if(this.accountRepeat) return util.warningMsg('该账号已存在') if(this.accountRepeat) return util.warningMsg('该账号已存在')
if(this.workNumberRepeat) return util.warningMsg('该工号已存在') if(this.workNumberRepeat) return util.warningMsg('该工号已存在')
let isTeacher = false let data = this.form
let isManager = false if(!data.uniqueIdentification) data.uniqueIdentification = new Date().getTime()
let data = { console.log(22,data)
userInfo: { if(this.form.userId){
userId: this.teacherForm.userId,
userName: this.teacherForm.userName,
account: this.teacherForm.userAccount,
clientId: this.teacherForm.clientId,
clientName: this.teacherForm.clientName,
roleId: this.teacherForm.roleValue,
phone: this.teacherForm.phone,
email: this.teacherForm.email,
isPort: 2,
uniqueIdentificationAccount: this.teacherForm.uniqueIdentificationAccount ? this.teacherForm.uniqueIdentificationAccount : Date.parse(new Date()),
}
}
let oneDepartmentName = '';
for(let i in this.orgList){
if(this.orgList[i].staffProfessionalArchitectureId == this.teacherForm.major) {
oneDepartmentName = this.orgList[i].staffProfessionalArchitectureName
break;
}
}
let twoDepartmentName = this.departmentList.find((n) => {
return n.staffGradeId == this.teacherForm.department
}).staffGradeName;
data.staff = {
roleId: this.teacherForm.roleValue,
isPort: 2,
schoolId: this.teacherForm.clientId,
staffId: this.teacherForm.staffId,
userId: this.teacherForm.userId,
workNumber: this.teacherForm.workNumber,
staffProfessionalArchitectureId: this.teacherForm.major,
staffGradeId: this.teacherForm.department,
staffProfessionalArchitectureName: oneDepartmentName,
staffGradeName: twoDepartmentName,
};
if(this.teacherForm.teacherId){
this.$post(this.api.updateStaff,data).then(res => { this.$post(this.api.updateStaff,data).then(res => {
this.teacherVisible = false this.userVisible = false
util.successMsg('编辑成功'); util.successMsg('编辑成功')
this.getData() this.getData()
}).catch(res => {}); }).catch(res => {})
}else{ }else{
this.$post(this.api.addStaff,data).then(res => { this.$post(this.api.saveUser,data).then(res => {
this.teacherVisible = false this.userVisible = false
util.successMsg('添加成功'); util.successMsg('添加成功')
this.getData() this.getData()
}).catch(res => {}); }).catch(res => {})
} }
}else{
return false;
} }
}) })
}, },
delTeacher(row){ handleDelete(row){
this.$confirm('此删除操作不可逆,是否确认删除选中项?', '提示', { this.$confirm('此删除操作不可逆,是否确认删除选中项?', '提示', {
type: 'warning' type: 'warning'
}) }).then(() => {
.then(() => {
let data = { let data = {
staffIds: row.staffId staffIds: row.staffId
} }
this.$del(this.api.deleteStaffs,data).then(res => { this.$del(this.api.deleteStaffs,data).then(res => {
util.successMsg('删除成功') util.successMsg('删除成功')
this.getData() this.getData()
}).catch(res => {}); }).catch(res => {})
}) }).catch(() => {})
.catch(() => {});
}, },
switchOff(val,row,index) { switchOff(val,row,index) {
let data = { let data = {
@ -493,24 +432,22 @@ export default {
isDisable: val isDisable: val
} }
this.$post(this.api.updateClient,data).then((res) => { this.$post(this.api.updateClient,data).then((res) => {
val == 1 ? util.warningMsg('该院校系统使用权限已关闭') : util.successMsg('该院校系统使用权限已激活') val == 1 ? util.warningMsg('该用权限已关闭') : util.successMsg('该用权限已激活')
}).catch((res) => { }).catch((res) => {
}) })
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val
}, },
delAllSelection() { delAllSelection() {
if(this.multipleSelection.length != ''){ if(this.multipleSelection.length != ''){
let newArr = this.multipleSelection let newArr = this.multipleSelection
let delList = newArr.map(item => { let delList = newArr.map(item => {
return item.staffId return item.userId
}) })
//
this.$confirm(`此批量删除操作不可逆,是否确认删除${util.ellipsisStr(newArr[0].userName)}${newArr.length}个选中项?`, '提示', { this.$confirm(`此批量删除操作不可逆,是否确认删除${util.ellipsisStr(newArr[0].userName)}${newArr.length}个选中项?`, '提示', {
type: 'warning' type: 'warning'
}) }).then(() => {
.then(() => {
let data = { let data = {
staffIds: delList.join(',') staffIds: delList.join(',')
} }
@ -518,8 +455,8 @@ export default {
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
util.successMsg('删除成功') util.successMsg('删除成功')
this.getData() this.getData()
}).catch(res => {}); }).catch(res => {})
}).catch(() => {}); }).catch(() => {})
}else{ }else{
util.errorMsg('请先选择数据 !') util.errorMsg('请先选择数据 !')
} }
@ -544,7 +481,6 @@ export default {
showFaild(){ showFaild(){
location.href = `${this.api.exportFailureStaff}?token=${this.token}` location.href = `${this.api.exportFailureStaff}?token=${this.token}`
}, },
//
handleExceed(files, fileList) { handleExceed(files, fileList) {
util.warningMsg( util.warningMsg(
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!` `当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`
@ -590,6 +526,13 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.filter{
flex-wrap: wrap;
li{
width: 30%;
margin-bottom: 16px;
}
}
/deep/.dialog{ /deep/.dialog{
.el-form-item{ .el-form-item{
.el-form-item__label{ .el-form-item__label{
@ -605,23 +548,4 @@ export default {
width: 100%; width: 100%;
} }
} }
.list{ </style>
li{
display: flex;
justify-content: center;
align-items: center;
margin: 32px 0;
.name,.val{
font-size: 16px;
color: rgba(0, 0, 0, 0.65);
}
.name{
width: 45%;
text-align: right;
}
.val{
width: 55%;
}
}
}
</style>

@ -101,10 +101,10 @@ function get(url, params){
if(res){ if(res){
resolve(res) resolve(res)
}else{ }else{
reject() reject(res)
} }
}).catch(err => { }).catch(err => {
reject(err.data) reject(err)
}) })
}) })
} }

@ -16,7 +16,7 @@ const Setting = {
showProgressBar: true, showProgressBar: true,
// 接口请求地址 // 接口请求地址
// apiBaseURL: env === 'development' ? 'http://192.168.31.125:8888' : 'http://39.108.250.202:8000', // apiBaseURL: env === 'development' ? 'http://192.168.31.125:8888' : 'http://39.108.250.202:8000',
apiBaseURL: env === 'development' ? 'http://192.168.31.151:10001' : 'http://www.liuwanr.cn', apiBaseURL: env === 'development' ? 'http://192.168.31.151:9000' : 'http://www.liuwanr.cn',
// 接口请求返回错误时,弹窗的持续时间,单位:秒 // 接口请求返回错误时,弹窗的持续时间,单位:秒
modalDuration: 3, modalDuration: 3,
// 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice
@ -39,6 +39,10 @@ const Setting = {
* 默认密码 * 默认密码
*/ */
initialPassword: '111aaa', initialPassword: '111aaa',
/**
* 所属平台1->职站 2->数据平台
*/
platformId: 2,
/** /**
* 多语言配置 * 多语言配置
* */ * */

Loading…
Cancel
Save