e 3 years ago
commit 6a448b47b1
  1. 10
      src/components/Sidebar.vue
  2. 6
      src/store/index.js
  3. 5
      src/utils/api.js
  4. 2
      src/utils/http.js
  5. 7
      src/views/Login.vue
  6. 19
      src/views/customer/AddCustomer.vue
  7. 65
      src/views/data/Framework.vue
  8. 26
      src/views/data/Introduce.vue
  9. 22
      src/views/data/Product.vue
  10. 62
      src/views/user/AddUser.vue

@ -56,17 +56,17 @@ export default {
return {
items: [
{
icon: 'el-icon-lx-home',
icon: 'el-icon-school',
index: 'customer',
title: '客户管理'
},
{
icon: 'el-icon-lx-cascades',
icon: 'el-icon-user',
index: 'user',
title: '用户管理'
},
{
icon: 'el-icon-lx-copy',
icon: 'el-icon-shopping-bag-2',
index: 'order',
title: '订单管理'
},
@ -76,12 +76,12 @@ export default {
// title: ''
// },
{
icon: 'el-icon-lx-emoji',
icon: 'el-icon-document-checked',
index: 'curriculum',
title: '课程管理'
},
{
icon: 'el-icon-lx-emoji',
icon: 'el-icon-notebook-2',
index: 'data',
title: '数据管理'
}

@ -15,7 +15,8 @@ const store = new Vuex.Store({
userLoginId: '',
userName: '',
roleId: '',
loginToken: ''
loginToken: '',
schoolId: ''
},
mutations:{
userAvatar(state,payload){
@ -48,6 +49,9 @@ const store = new Vuex.Store({
tokenData (state, payload) {
state.loginToken = payload.loginToken
},
schoolIdData (state, payload) {
state.schoolId = payload.schoolId
},
}
});

@ -25,10 +25,11 @@ export default {
delCustomers: `${host}/nakadai/nakadai/customer/delCustomers`,
updateCustomer: `${host}/nakadai/nakadai/customer/updateCustomer`,
addCustomer: `${host}/nakadai/nakadai/customer/addCustomer`,
// /nakadai/nakadai/customer/queryCustomerDetails
queryCustomer: `${host}/nakadai/nakadai/customer/queryCustomer`,
queryCustomerDetails: `${host}/nakadai/nakadai/customer/queryCustomerDetails`,
saveOrUpdate:`${host}/data/data/role/saveOrUpdate`,
doAssign:`${host}/data/data/permission/doAssign`,
updateCustomerByRoleId:`${host}/nakadai/nakadai/customer/updateCustomerByRoleId`,
resetPwdCustomer: `${host}/nakadai/nakadai/customer/resetPwd`,
queryCustomerIsExists: `${host}/nakadai/nakadai/customer/queryCustomerIsExists`,

@ -25,6 +25,8 @@ axios.interceptors.request.use(config => {
if(token){
config.headers.token = token
}
let schoolId = store.state.schoolId
if(schoolId) config.headers.schoolId = store.state.schoolId
return config;
}, err => {
Message.error({

@ -197,15 +197,13 @@ export default {
path:'/customer'
});
localStorage.setItem('ms_username', this.param.username);
//
// let user = res.message.retvalue
// this.$store.commit("userLoginData", { userLogin_id : user.userId,userName: user.userName,roleId: user.roleId});
}).catch(err => {
console.log(err,'reserr');
if(err.status===30001){
this.phoneVisible = true
}else if(err.status == 10004){
this.blur()
}
// this.$message.error(err.message)
});
} else {
this.$message.error('请输入账号/密码/验证码');
@ -407,5 +405,6 @@ img{
display: flex;
justify-content: space-between;
border-bottom: 0;
background-color: transparent;
}
</style>

@ -522,6 +522,25 @@ export default {
}).catch((res) => {})
}else{
this.$post(this.api.addCustomer,data).then((res) => {
let customerId = res.customerId
this.$store.commit('schoolIdData',{schoolId: this.form.schoolId})
this.$post(this.api.saveOrUpdate,{
clientId: 0,
id: '',
roleName: '超级管理员',
remark: '拥有一切权限',
isPort: 2
}).then(res => {
let roleId = res.roleId
let perData = {
roleId,
permissionId: ["1408370117262635009","1409351488911056897","1409351867862228993","1408370186435096578","1409352518310699009","1409352550615228418","1409352584240963585","1409352623344459778","1409352647054860289","1409352682471563266","1409352720786530305","1409352742290726913","1408370244584927233","1409352872662278146","1409352903574298626","1409352923509825538","1409352940068937730","1409353018443702273"],
isPort: 2
}
this.$post(this.api.doAssign,perData).then(res => {}).catch(res => {})
this.$post(`${this.api.updateCustomerByRoleId}?customerId=${customerId}&roleId=${roleId}`).then(res => {}).catch(res => {})
}).catch(res => {})
this.$message.success('添加成功')
this.goback()
}).catch((res) => {})

@ -22,7 +22,7 @@
<el-form label-width="80px" class="flex-between mgb20">
<div class="flex-center">
<el-form-item label="更新时间" style="margin: 0 20px 0 0">
<el-date-picker v-model="updateTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="initData"></el-date-picker>
<el-date-picker v-model="updateTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="searchData"></el-date-picker>
</el-form-item>
<el-input placeholder="请输入数据表名称" v-model="keyword" prefix-icon="el-icon-search" clearable></el-input>
</div>
@ -41,7 +41,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>
@ -118,6 +118,8 @@ export default {
defaultTypeActive: [],
defaultTypeChecked: [],
listData: [],
listDataAll: [],
searchListData: [],
keyword: '',
page: 1,
pageSize: 10,
@ -140,7 +142,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.searchData()
},500)
}
},
@ -179,10 +181,36 @@ export default {
},
getData(){
this.$post(`${this.api.getIdQueryTable}?categoryId=${this.categoryId}&showName=${this.keyword}&pageNum=${this.page}&pageSize=${this.pageSize}&updateTime=${this.updateTime ? this.updateTime : ''}`).then(res => {
this.listData = res.list
this.total = res.totalCount
let list = JSON.parse(res.getIdQueryTable)
list.map(n => {
n.updateTime = n.updateTime ? this.formatDate('yyyy-MM-dd hh:mm:ss',new Date(n.updateTime)) : ''
})
this.listDataAll = list
this.total = list.length
this.handlePage()
}).catch(res => {})
},
handlePage(){
let list = this.keyword ? this.searchListData : this.listDataAll
let result = list.slice((this.page - 1) * this.pageSize,this.page * this.pageSize)
this.listData = result
},
searchData(){
let list = this.listDataAll
let result = []
let updateTime = this.updateTime
list.map(n => {
if(updateTime){
if(n.updateTime && updateTime == this.formatDate('yyyy-MM-dd',new Date(n.updateTime)) && n.showName.includes(this.keyword)) result.push(n)
}else{
n.showName.includes(this.keyword) && result.push(n)
}
})
this.searchListData = result
this.listData = result.slice(0,10)
this.total = result.length
},
initData(){
this.page = 1
this.getData()
@ -264,6 +292,7 @@ export default {
this.$post(`${this.api.deleteTable}?tableIds=${row.id}`).then(res => {
this.$message.success('删除成功')
this.getData()
this.cacheTable(this.typeList)
}).catch(res => {})
}).catch(() => {})
},
@ -272,7 +301,7 @@ export default {
},
handleCurrentChange(val) {
this.page = val
this.getData()
this.handlePage()
},
delAllSelection() {
if(this.multipleSelection.length != ''){
@ -287,6 +316,7 @@ export default {
this.$refs.table.clearSelection()
this.$message.success('删除成功')
this.getData()
this.cacheTable(this.typeList)
}).catch(res => {})
}).catch(() => {})
}else{
@ -294,8 +324,9 @@ export default {
}
},
getTable(n,i){
this.$post(`${this.api.originalListById}?categoryId=${n.realId}&showName=&pageNum=1&pageSize=10000`).then(res => {
res.list.map(n => {
this.$post(`${this.api.originalListById}?categoryId=${n.realId}`).then(res => {
let list = JSON.parse(res.originalListById)
list.map(n => {
n.label = n.showName
n.id = String(n.id)
if(this.defaultTypeChecked.includes(n.id)){
@ -303,7 +334,7 @@ export default {
}
})
n.children = res.list
n.children = list
// if(!i && !this.tableName){
// this.tableName = res.list[0].name
// this.curId = res.list[0].id
@ -332,8 +363,8 @@ export default {
})
})
this.$post(`${this.api.getIdQueryTable}?categoryId=${this.categoryId}&showName=${this.keyword}&pageNum=1&pageSize=10000&updateTime=${this.updateTime ? this.updateTime : ''}`).then(res1 => {
this.defaultTypeChecked = res1.list.map(n => n.copyId)
let list = JSON.parse(res1.getIdQueryTable)
this.defaultTypeChecked = list.map(n => n.copyId)
res.map((n,i) => {
if(n.children.length){
n.children.map(n => {
@ -398,7 +429,6 @@ export default {
showNames.push(n.showName)
}
})
console.log(11,names,showNames)
if(!names.length) return this.$message.warning('请选择数据')
this.submited = true
@ -418,10 +448,21 @@ export default {
setTimeout(() => {
this.submited = false
},1000)
this.cacheTable(this.typeList)
}).catch(res => {
this.submited = false
})
},
cacheTable(list){
list.map(n => {
if(n.children.length){
this.cacheTable(n.children)
}else{
this.$post(`${this.api.getIdQueryTable}?categoryId=${n.id}&showName=&pageNum=1&pageSize=1000&updateTime=`).then(res => {}).catch(res => {})
}
})
}
}
};
</script>

@ -10,20 +10,18 @@
<el-card shadow="hover" class="mgb20 teacher_tab">
<div class="flex-between" style="margin-bottom: 10px;">
<p>数据简介</p>
<el-button v-if="edited && !editing" type="primary" size="small" @click="editing = !editing">编辑</el-button>
<el-button v-if="introduceText && !editing" type="primary" size="small" @click="editing = !editing">编辑</el-button>
</div>
<div class="intro" v-if="!edited">
<p class="text">{{introduceText}}</p>
<div class="intro" v-if="!introduceText && !editing">
<p class="text">请添加简介</p>
<div class="btn">
<el-button type="primary" size="small" @click="edit">{{introduceText ? '编辑简介' : '添加简介'}}</el-button>
<el-button type="primary" size="small" @click="edit">添加</el-button>
</div>
</div>
<div v-else>
<el-input placeholder="请输入简介" v-model="introduce" type="textarea" rows="5" :disabled="!editing"></el-input>
<div class="btns" v-if="editing">
<el-button @click="editing = false"> </el-button>
<el-button type="primary" @click="confirmEdit"> </el-button>
</div>
<el-input v-if="introduceText || editing" placeholder="请输入简介" v-model="introduce" type="textarea" rows="5" :disabled="!editing"></el-input>
<div class="btns" v-if="editing">
<el-button @click="editing = false"> </el-button>
<el-button type="primary" @click="confirmEdit"> </el-button>
</div>
</el-card>
</el-col>
@ -41,7 +39,6 @@ export default {
label: 'label'
},
defaultActive: [],
edited: false,
editing: false,
introduce: '',
introduceText: '',
@ -80,21 +77,22 @@ export default {
this.categoryId = item.id
this.defaultActive = [item.id]
this.introduceText = item.introduce
this.introduce = item.introduce
}else{
this.categoryId = res[0].id
this.defaultActive = [res[0].id]
this.introduceText = res[0].introduce
this.introduce = res[0].introduce
}
}).catch(res => {})
},
typeClick(data,node){
this.edited = false
this.editing = false
this.categoryId = data.id
this.introduceText = data.introduce
this.introduce = data.introduce
},
edit(){
this.edited = true
this.editing = true
this.introduce = this.introduceText
},
@ -104,7 +102,7 @@ export default {
introduce: this.introduce
}).then(res => {
this.$message.success(this.introduceText ? '编辑成功' : '新增成功')
this.getData()
this.introduceText = this.introduce
this.editing = false
}).catch(res => {})
}

@ -201,6 +201,7 @@ export default {
pageSizeConfig: 10,
totalConfig: 0,
listConfigData: [],
listConfigAll: [],
previewVisible: false,
previewHead: [],
previewData: []
@ -253,11 +254,12 @@ export default {
},
getTable(n,i){
this.$post(`${this.api.getIdQueryTable}?categoryId=${n.originId}&showName=&pageNum=1&pageSize=10000&updateTime=`).then(res => {
res.list.map(n => {
let list = JSON.parse(res.getIdQueryTable)
list.map(n => {
n.label = n.showName
n.id = String(n.id)
})
n.children = res.list
n.children = list
}).catch(res => {})
},
getType(){
@ -476,17 +478,27 @@ export default {
},
getConfigTable(){
this.$post(`${this.api.getIdQueryTable}?categoryId=${this.categoryId}&showName=${this.keywordConfig}&pageNum=${this.pageConfig}&pageSize=${this.pageSizeConfig}&updateTime=${this.updateTime ? this.updateTime : ''}`).then(res => {
this.listConfigData = res.list
this.totalConfig = res.totalCount
let list = JSON.parse(res.getIdQueryTable)
list.map(n => {
n.updateTime = n.updateTime ? this.formatDate('yyyy-MM-dd hh:mm:ss',new Date(n.updateTime)) : ''
})
this.listConfigAll = list
this.totalConfig = list.length
this.handlePage()
}).catch(res => {})
},
handlePage(){
let list = this.listConfigAll
let result = list.slice((this.pageConfig - 1) * this.pageSize,this.pageConfig * this.pageSizeConfig)
this.listConfigData = result
},
initConfigData(){
this.pageConfig = 1
this.getConfigTable()
},
handleCurrentConfigChange(){
this.pageConfig = val
this.getConfigTable()
this.handlePage()
},
previewConfig(row){
this.$get(`${this.api.previewData}?tableName=${row.name}&tableId=${row.id}`).then(res => {

@ -209,7 +209,7 @@
</div>
<div>
<div class="flex-center" v-for="(item,index) in archivesList" :key="index">
<div class="flex-center" v-for="(item,index) in archivesList" :key="index" v-show="index == 0 || index == 1 || showArch">
<el-col :span="16" :offset="4">
<el-card shadow="hover" class="from_card">
<el-form ref="form" :model="form" :rules="rules" label-width="120px" :disabled="isDetail">
@ -296,7 +296,11 @@
</el-card>
</el-col>
</div>
</div>
</div>
<div class="fold" v-if="archivesList.length > 1">
<img :class="{ 'arrowTransform': showArch, 'arrowTransformReturn': !showArch}" style="width: 21px;height: 17px;" src="../../assets/img/person/open.png" alt="" @click="foldArch">
</div>
</div>
</el-card>
@ -308,7 +312,7 @@
<span>已绑定系统</span>
</div>
<div>
<el-dialog title="查看系统" :visible.sync="dialogFormVisible" :center="!isIE()" :close-on-click-modal="false">
<el-dialog :title="isShow ? '查看系统' : '编辑系统'" :visible.sync="dialogFormVisible" :center="!isIE()" :close-on-click-modal="false">
<el-form :class="{region: !isIE()}" ref="chooseList" :rules="rules" :disabled="isDetail">
<el-form-item label="系统选择" label-width="100px">
<el-select
@ -330,7 +334,6 @@
<el-radio v-model="radio" label="2" disabled>不绑定组织关系</el-radio>
</div>
<div>
<el-card shadow="hover" v-for="(item,index) in chooseList" :key="index" class="school-item">
<p class="school-name">{{index}}</p>
<div class="card" :class="{isie: isIE()}">
@ -348,7 +351,7 @@
<p class="val">{{item1.account}}</p>
</li>
<li>
<el-switch v-model="item1.isEnable" :active-value="1" :inactive-value="0" :active-text="item1.isEnable ? '启用' : '禁用'" @change="switchOff($event,item1)"></el-switch>
<el-switch v-model="item1.isEnable" :active-value="1" :inactive-value="0" :active-text="item1.isEnable ? '启用' : '禁用'" :disabled="isShow" @change="switchOff($event,item1)"></el-switch>
</li>
</div>
<div class="line">
@ -362,7 +365,16 @@
</div>
</div>
</el-card>
</div>
<span slot="footer" class="dialog-footer">
<template v-if="isShow">
<el-button type="primary" @click="dialogFormVisible = false">返回</el-button>
</template>
<template v-else>
<el-button @click="dialogFormVisible = false">取消</el-button>
<el-button type="primary" @click="dialogFormVisible = false">确定</el-button>
</template>
</span>
</el-dialog>
</div>
</div>
@ -380,7 +392,8 @@
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" @click="show(scope.row)">查看</el-button>
<el-button type="text" @click="show(scope.row,true)">查看</el-button>
<el-button type="text" @click="show(scope.row,false)">编辑</el-button>
</template>
</el-table-column>
</el-table>
@ -576,7 +589,9 @@ export default {
},
clickFlag: true,
searchTimer: null
searchTimer: null,
showArch: false,
isShow: false
};
},
mounted() {
@ -800,7 +815,7 @@ export default {
})
}
},
show(row){
show(row,isShow){
let obj = {}
Object.assign(obj,{
regionName: row.platformName,
@ -812,6 +827,7 @@ export default {
this.choosecusArr = ''
this.chooseCusList = []
this.chooseList = []
this.isShow = isShow
this.$get(this.api.selectUserSysBind, { userId: this.userId, platformId: row.platformId}).then(res => {
let list = res.result.map
@ -820,10 +836,7 @@ export default {
list[i] = list[i][n]
}
}
console.log(333,list)
this.chooseList = list
console.log(11,list)
}).catch(res => {})
},
switchOff(val,row){
@ -833,13 +846,36 @@ export default {
}).then(res => {
this.$message.success(val ? '启用成功' : '禁用成功')
}).catch(res => {})
}
},
foldArch() {
this.showArch = !this.showArch
},
}
};
</script>
<style lang="scss" scoped>
.fold{
margin-top: 20px;
text-align: center;
img{
cursor: pointer;
&:hover{
opacity: .8;
}
}
}
.arrowTransform{
transition: 0.5s;
transform-origin: center;
transform: rotateZ(180deg);
}
.arrowTransformReturn{
transition: 0.5s;
transform-origin: center;
transform: rotateZ(0deg);
}
//
.card ::v-deep .el-card {
border-radius: 15px;

Loading…
Cancel
Save