5.4
This commit is contained in:
@@ -2,10 +2,10 @@ import request from '@/utils/request'
|
|||||||
import qs from 'qs'
|
import qs from 'qs'
|
||||||
let tokens = window.sessionStorage.getItem('token')
|
let tokens = window.sessionStorage.getItem('token')
|
||||||
|
|
||||||
// 获取菜单 分页列表
|
// 查询字典
|
||||||
export function pageList(data) {
|
export function pageList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/portal/v1/dicttypes/pageList',
|
url: 'v1/DictType/pageList',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
@@ -16,18 +16,18 @@ export function pageList(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 根据sid 修改
|
// 根据sid 修改
|
||||||
export function putDictType(data) {
|
export function delOrgroles(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/portal/v1/dicttypes/update/' + data.sid,
|
url: 'v1/DictType/delete/' + data.sid,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: qs.stringify(data)
|
data: qs.stringify(data)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存 角色信息
|
// 保存 角色信息
|
||||||
export function saveDictType(data) {
|
export function save(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/portal/v1/dicttypes/save',
|
url: 'v1/DictType/save',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
||||||
|
|||||||
@@ -16,10 +16,11 @@ export function roleOrgList(data){
|
|||||||
|
|
||||||
export function postList(data){
|
export function postList(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/portal/v1/syspost/list',
|
url: 'v1/sysrole/RoleOne',
|
||||||
method: 'get',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json'}
|
headers: {'Content-Type': 'application/json'},
|
||||||
|
'token':tokens
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -31,19 +32,6 @@ export function typeValues(data) {
|
|||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置是否可用:isEnable:1可用,0不可用
|
|
||||||
export function setRoleEnable(data) {
|
|
||||||
return request({
|
|
||||||
url: '/portal/v1/sysrole/setIsEnable/' + data.sid + '/' + data.isEnable,
|
|
||||||
method: 'POST',
|
|
||||||
data: data,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <新增 保存角色>
|
* <新增 保存角色>
|
||||||
* @orgSid 机构SID
|
* @orgSid 机构SID
|
||||||
@@ -52,7 +40,7 @@ export function setRoleEnable(data) {
|
|||||||
* */
|
* */
|
||||||
export function saveOrgroles(data) {
|
export function saveOrgroles(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/portal/v1/sysrole/save',
|
url: 'v1/sysrole/addRole',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -69,7 +57,7 @@ export function saveOrgroles(data) {
|
|||||||
* */
|
* */
|
||||||
export function putOrgroles(data) {
|
export function putOrgroles(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/portal/v1/sysrole/update/${data.sid}`,
|
url: 'v1/sysrole/alterRole',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -84,22 +72,14 @@ export function putOrgroles(data) {
|
|||||||
* */
|
* */
|
||||||
export function delOrgroles(data) {
|
export function delOrgroles(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/portal/v1/sysrole/delBySids/${data.sid}`,
|
url: `v1/sysrole/deleteRole/${data.sid}`,
|
||||||
method: 'get',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
'token':tokens
|
'token':tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 移动端授权
|
|
||||||
export function getRoleMenuList(data) {
|
|
||||||
return request({
|
|
||||||
url: '/portal/v1/sysmobilemenurole/getRoleMenuList',
|
|
||||||
method: 'post',
|
|
||||||
params: { roleSid: data }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 菜单授权保存
|
// 菜单授权保存
|
||||||
export function saveRoleMenuList(data) {
|
export function saveRoleMenuList(data) {
|
||||||
|
|||||||
@@ -27,7 +27,18 @@ export function saveSourcesInfo(data) {
|
|||||||
// 修改 保存 资源信息
|
// 修改 保存 资源信息
|
||||||
export function putSourcesInfo(data) {
|
export function putSourcesInfo(data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'v1/sysinfo/alterInfo',
|
url: 'v1/sysuser/alterInfoUser',
|
||||||
|
method: 'POST',
|
||||||
|
data: data,
|
||||||
|
headers: {'Content-Type': 'application/json',
|
||||||
|
'token':tokens
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 修改登录密码
|
||||||
|
export function alterPassword(data) {
|
||||||
|
return request({
|
||||||
|
url: 'v1/sysuser/alterPassword',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -76,59 +87,17 @@ export function delSources(data) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 获取获取资源类别
|
export function deleteSysInfoShip(data) {
|
||||||
export function getZzylb(data) {
|
|
||||||
return request({
|
|
||||||
url: '/portal/v1/syssource/listAll',
|
|
||||||
method: 'post',
|
|
||||||
headers: {'Content-Type': 'application/json'}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取资源 不分页列表
|
|
||||||
export function sourcesList(data) {
|
|
||||||
return request({
|
return request({
|
||||||
url: '/system/v1/sources/list',
|
url: 'v1/sysinfoship/deleteSysInfoShip/' + data.sid,
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: data,
|
data: qs.stringify(data),
|
||||||
headers: {'Content-Type': 'application/json'}
|
headers: {'Content-Type': 'application/json',
|
||||||
|
'token':tokens
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取资源列表 不分页下拉
|
|
||||||
export function getsourceList(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/v1/sources/sourceList',
|
|
||||||
method: 'post'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
////获取资源 分页列表
|
|
||||||
//export function sourcesPageList(data) {
|
|
||||||
//return request({
|
|
||||||
// url: '/system/v1/sources/pagelist',
|
|
||||||
// method: 'POST',
|
|
||||||
// data: data,
|
|
||||||
// headers: {'Content-Type': 'application/json'}
|
|
||||||
//})
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//根据sid 获取单个 资源信息
|
//根据sid 获取单个 资源信息
|
||||||
export function getSourcesInfo(data) {
|
export function getSourcesInfo(data) {
|
||||||
@@ -139,3 +108,14 @@ export function getSourcesInfo(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 获取个人信息
|
||||||
|
export function UserInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: `v1/sysuser/selectUserInfo/${data.sid}`,
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
headers: {'Content-Type': 'application/json',
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export function registUser(data) {
|
|||||||
data,
|
data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 获取手机验证码
|
// 获取
|
||||||
export function getVerificationCode(data) {
|
export function getVerificationCode(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/getVerificationCode',
|
url: '/system/user/getVerificationCode',
|
||||||
@@ -25,21 +25,6 @@ export function getVerificationCode(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取登录验证码
|
|
||||||
export function imgCode() {
|
|
||||||
return request({
|
|
||||||
url: '/system/api/defaultBlendCode?temm=' + new Date().getTime(),
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取用信息
|
|
||||||
export function getInfo(token) {
|
|
||||||
return request({
|
|
||||||
url: '/system/user/loginDetails',
|
|
||||||
method: 'post',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 根据token值获取登录后的用户信息
|
// 根据token值获取登录后的用户信息
|
||||||
export function loginDetails(data) {
|
export function loginDetails(data) {
|
||||||
|
|||||||
@@ -1,343 +1,13 @@
|
|||||||
<template>
|
.<template>
|
||||||
<div id="tags-view-container" class="tags-view-container">
|
|
||||||
<scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll">
|
|
||||||
<router-link
|
|
||||||
v-for="(tag,index) in visitedViews"
|
|
||||||
ref="tag"
|
|
||||||
:key="tag.path"
|
|
||||||
:class="isActive(tag)?'active':''"
|
|
||||||
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
|
|
||||||
tag="span"
|
|
||||||
class="tags-view-item"
|
|
||||||
@click.middle.native="!isAffix(tag)?closeSelectedTag(tag):''"
|
|
||||||
@contextmenu.prevent.native="openMenu(tag,$event)"
|
|
||||||
>
|
|
||||||
{{ tag.title }}
|
|
||||||
<span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(index)" />
|
|
||||||
</router-link>
|
|
||||||
</scroll-pane>
|
|
||||||
<!--<div class="tags-close-box">
|
|
||||||
<el-dropdown @command="handleTags">
|
|
||||||
<el-button size="mini" type="primary"> 标签选项<i class="el-icon-arrow-down el-icon--right"></i> </el-button>
|
|
||||||
<el-dropdown-menu size="small" slot="dropdown">
|
|
||||||
<el-dropdown-item command="other">关闭其他</el-dropdown-item>
|
|
||||||
<el-dropdown-item command="all">关闭所有</el-dropdown-item>
|
|
||||||
</el-dropdown-menu>
|
|
||||||
</el-dropdown>
|
|
||||||
</div>-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
|
|
||||||
<li @click="refreshSelectedTag(selectedTag)">刷新</li>
|
|
||||||
<li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)">关闭</li>
|
|
||||||
<li @click="closeOthersTags">关闭其他</li>
|
|
||||||
<li @click="closeAllTags(selectedTag)">关闭所有</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ScrollPane from './ScrollPane'
|
|
||||||
import path from 'path'
|
|
||||||
export default {
|
export default {
|
||||||
components: { ScrollPane },
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
visible: false,
|
|
||||||
top: 0,
|
|
||||||
left: 0,
|
|
||||||
selectedTag: {},
|
|
||||||
affixTags: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
visitedViews() {
|
|
||||||
return this.$store.state.tagsView.visitedViews
|
|
||||||
},
|
|
||||||
routes() {
|
|
||||||
return this.$store.state.permission.routes
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
$route() {
|
|
||||||
this.addTags()
|
|
||||||
this.moveToCurrentTag()
|
|
||||||
},
|
|
||||||
visible(value) {
|
|
||||||
if (value) {
|
|
||||||
document.body.addEventListener('click', this.closeMenu)
|
|
||||||
} else {
|
|
||||||
document.body.removeEventListener('click', this.closeMenu)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.initTags()
|
|
||||||
this.addTags()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
isActive(route) {
|
|
||||||
return route.path === this.$route.path
|
|
||||||
},
|
|
||||||
isAffix(tag) {
|
|
||||||
return tag.meta && tag.meta.affix
|
|
||||||
},
|
|
||||||
filterAffixTags(routes, basePath = '/') {
|
|
||||||
let tags = []
|
|
||||||
routes.forEach(route => {
|
|
||||||
if (route.meta && route.meta.affix) {
|
|
||||||
const tagPath = path.resolve(basePath, route.path)
|
|
||||||
tags.push({
|
|
||||||
fullPath: tagPath,
|
|
||||||
path: tagPath,
|
|
||||||
name: route.name,
|
|
||||||
meta: { ...route.meta }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (route.children) {
|
|
||||||
const tempTags = this.filterAffixTags(route.children, route.path)
|
|
||||||
if (tempTags.length >= 1) {
|
|
||||||
tags = [...tags, ...tempTags]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return tags
|
|
||||||
},
|
|
||||||
initTags() {
|
|
||||||
const affixTags = this.affixTags = this.filterAffixTags(this.routes)
|
|
||||||
for (const tag of affixTags) {
|
|
||||||
// Must have tag name
|
|
||||||
if (tag.name) {
|
|
||||||
this.$store.dispatch('tagsView/addVisitedView', tag)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
addTags() {
|
|
||||||
const { name } = this.$route
|
|
||||||
if (name) {
|
|
||||||
this.$store.dispatch('tagsView/addView', this.$route)
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
},
|
|
||||||
moveToCurrentTag() {
|
|
||||||
const tags = this.$refs.tag
|
|
||||||
this.$nextTick(() => {
|
|
||||||
for (const tag of tags) {
|
|
||||||
if (tag.to.path === this.$route.path) {
|
|
||||||
this.$refs.scrollPane.moveToTarget(tag)
|
|
||||||
// when query is different then update
|
|
||||||
if (tag.to.fullPath !== this.$route.fullPath) {
|
|
||||||
this.$store.dispatch('tagsView/updateVisitedView', this.$route)
|
|
||||||
}
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
refreshSelectedTag(view) {
|
|
||||||
this.$store.dispatch('tagsView/delCachedView', view).then(() => {
|
|
||||||
const { fullPath } = view
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$router.replace({
|
|
||||||
path: '/redirect' + fullPath
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
closeSelectedTag(index) {
|
|
||||||
const delItem = this.visitedViews.splice(index, 1)[0];
|
|
||||||
const item = this.visitedViews[index] ? this.visitedViews[index] : this.visitedViews[index - 1];
|
|
||||||
if (item) {
|
|
||||||
delItem.path === this.$route.fullPath && this.$router.push(item.path);
|
|
||||||
} else {
|
|
||||||
this.$router.push('/index');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
|
|
||||||
// if (this.isActive(view)) {
|
|
||||||
// this.toLastView(visitedViews, view)
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
},
|
|
||||||
closeOthersTags() {
|
|
||||||
this.$router.push(this.selectedTag)
|
|
||||||
this.$store.dispatch('tagsView/delOthersViews', this.selectedTag).then(() => {
|
|
||||||
this.moveToCurrentTag()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
closeAllTags(view) {
|
|
||||||
this.$store.dispatch('tagsView/delAllViews').then(({ visitedViews }) => {
|
|
||||||
if (this.affixTags.some(tag => tag.path === view.path)) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.toLastView(visitedViews, view)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
toLastView(visitedViews, view) {
|
|
||||||
const latestView = visitedViews.slice(-1)[0]
|
|
||||||
if (latestView) {
|
|
||||||
this.$router.push(latestView.fullPath)
|
|
||||||
} else {
|
|
||||||
// now the default is to redirect to the home page if there is no tags-view,
|
|
||||||
// you can adjust it according to your needs.
|
|
||||||
if (view.name === 'Dashboard') {
|
|
||||||
// to reload home page
|
|
||||||
this.$router.replace({ path: '/redirect' + view.fullPath })
|
|
||||||
} else {
|
|
||||||
this.$router.push('/')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
openMenu(tag, e) {
|
|
||||||
const menuMinWidth = 105
|
|
||||||
const offsetLeft = this.$el.getBoundingClientRect().left // container margin left
|
|
||||||
const offsetWidth = this.$el.offsetWidth // container width
|
|
||||||
const maxLeft = offsetWidth - menuMinWidth // left boundary
|
|
||||||
const left = e.clientX - offsetLeft + 15 // 15: margin right
|
|
||||||
if (left > maxLeft) {
|
|
||||||
this.left = maxLeft
|
|
||||||
} else {
|
|
||||||
this.left = left
|
|
||||||
}
|
|
||||||
this.top = e.clientY - 32
|
|
||||||
this.visible = true
|
|
||||||
this.selectedTag = tag
|
|
||||||
},
|
|
||||||
closeMenu() {
|
|
||||||
this.visible = false
|
|
||||||
},
|
|
||||||
handleScroll() {
|
|
||||||
this.closeMenu()
|
|
||||||
},
|
|
||||||
handleTags(command) {
|
|
||||||
command === 'other' ? this.closeOther() : this.closeAll();
|
|
||||||
},
|
|
||||||
// 关闭全部标签
|
|
||||||
closeAll() {
|
|
||||||
// this.visitedViews = [];
|
|
||||||
this.visitedViews.splice(0, this.visitedViews.length);
|
|
||||||
this.$router.push('/index');
|
|
||||||
},
|
|
||||||
// 关闭其他标签
|
|
||||||
closeOther() {
|
|
||||||
return this.visitedViews.filter((item) => {
|
|
||||||
return item.path === this.$route.fullPath;
|
|
||||||
});
|
|
||||||
// this.visitedViews = curItem;
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style>
|
||||||
@import "~@/styles/variables.scss";
|
|
||||||
.tags-view-container {
|
|
||||||
position:relative;
|
|
||||||
height: 40px;
|
|
||||||
width: 100%;
|
|
||||||
// background: $menuHover;
|
|
||||||
background: #FFFFFF;
|
|
||||||
border-bottom: 1px solid #d8dce5;
|
|
||||||
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04);
|
|
||||||
.tags-view-wrapper {
|
|
||||||
height: 40px;
|
|
||||||
.tags-view-item {
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
cursor: pointer;
|
|
||||||
height: 30px;
|
|
||||||
line-height: 30px;
|
|
||||||
border-radius: 10px 10px 0 0;
|
|
||||||
color: #495060;
|
|
||||||
border: 1px solid #d8dce5;
|
|
||||||
background: #FFFFFF;
|
|
||||||
padding: 0 10px;
|
|
||||||
font-size: 14px;
|
|
||||||
margin-left: 5px;
|
|
||||||
margin-top: 9px;
|
|
||||||
&:first-of-type {
|
|
||||||
margin-left: 15px;
|
|
||||||
}
|
|
||||||
&:last-of-type {
|
|
||||||
margin-right: 15px;
|
|
||||||
}
|
|
||||||
&.active {
|
|
||||||
background-color: $menuHover;
|
|
||||||
color: #FFFFFF;
|
|
||||||
&::before {
|
|
||||||
content: '';
|
|
||||||
background: #FFFFFF;
|
|
||||||
display: inline-block;
|
|
||||||
width: 8px;
|
|
||||||
height: 8px;
|
|
||||||
border-radius: 50%;
|
|
||||||
position: relative;
|
|
||||||
margin-right: 2px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.contextmenu {
|
|
||||||
margin: 0;
|
|
||||||
background: #fff;
|
|
||||||
z-index: 3000;
|
|
||||||
position: absolute;
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 5px 0;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #333;
|
|
||||||
box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, .3);
|
|
||||||
li {
|
|
||||||
margin: 0;
|
|
||||||
padding: 7px 16px;
|
|
||||||
cursor: pointer;
|
|
||||||
&:hover {
|
|
||||||
background: #eee;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
//reset element css of el-icon-close
|
|
||||||
.tags-view-wrapper {
|
|
||||||
.tags-view-item {
|
|
||||||
.el-icon-close {
|
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
vertical-align: 1px;
|
|
||||||
border-radius: 50%;
|
|
||||||
text-align: center;
|
|
||||||
transition: all .3s cubic-bezier(.645, .045, .355, 1);
|
|
||||||
transform-origin: 100% 50%;
|
|
||||||
&:before {
|
|
||||||
// transform: scale(.6);
|
|
||||||
// display: inline-block;
|
|
||||||
vertical-align: -1px;
|
|
||||||
}
|
|
||||||
&:hover {
|
|
||||||
background-color: #b4bccc;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.tags-close-box {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding-top: 1px;
|
|
||||||
text-align: center;
|
|
||||||
width: 110px;
|
|
||||||
height: 30px;
|
|
||||||
background: #fff;
|
|
||||||
box-shadow: -3px 0 15px 3px rgba(0, 0, 0, 0.1);
|
|
||||||
z-index: 10;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
@@ -44,7 +44,8 @@ const actions = {
|
|||||||
roleName: data.roleName,
|
roleName: data.roleName,
|
||||||
defaultOrgPathName: data.defaultOrgPathName,
|
defaultOrgPathName: data.defaultOrgPathName,
|
||||||
defaultOrgPath: data.defaultOrgPath,
|
defaultOrgPath: data.defaultOrgPath,
|
||||||
postName: data.postName
|
postName: data.postName,
|
||||||
|
sid: data.sid
|
||||||
}
|
}
|
||||||
commit('SET_UESRINFO', user)
|
commit('SET_UESRINFO', user)
|
||||||
window.sessionStorage.setItem('userSid', user.userSid)
|
window.sessionStorage.setItem('userSid', user.userSid)
|
||||||
@@ -56,6 +57,7 @@ const actions = {
|
|||||||
window.sessionStorage.setItem('defaultOrgPathName', user.defaultOrgPathName)
|
window.sessionStorage.setItem('defaultOrgPathName', user.defaultOrgPathName)
|
||||||
window.sessionStorage.setItem('defaultOrgPath', user.defaultOrgPath)
|
window.sessionStorage.setItem('defaultOrgPath', user.defaultOrgPath)
|
||||||
window.sessionStorage.setItem('postName', user.postName)
|
window.sessionStorage.setItem('postName', user.postName)
|
||||||
|
window.sessionStorage.setItem('sid', user.sid)
|
||||||
resolve(data)
|
resolve(data)
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
|
|||||||
@@ -1,140 +1,395 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="content">
|
<div>
|
||||||
|
<div v-if="this.msg != 5">
|
||||||
|
<span>
|
||||||
|
查询不到您的个人信息请添加:
|
||||||
|
<el-button type="primary" size="mini" @click="saveSid()">
|
||||||
|
添加
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="this.infoSid != null">
|
||||||
|
<el-tabs v-model="activeName" class="my-tabs" type="card">
|
||||||
|
<el-tab-pane label="学生信息" name="roleList">
|
||||||
|
<div class="container">
|
||||||
|
<el-table :data="tableData" border style="width: 100%">
|
||||||
|
<el-table-column
|
||||||
|
label="序号"
|
||||||
|
width="70px"
|
||||||
|
type="index"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="150px" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="mini"
|
||||||
|
@click="editRow(scope.row)"
|
||||||
|
>
|
||||||
|
修改
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="name"
|
||||||
|
label="学生姓名"
|
||||||
|
width="100px"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="userName"
|
||||||
|
label="学号ID"
|
||||||
|
align="center"
|
||||||
|
width="150px"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="sex"
|
||||||
|
label="性别"
|
||||||
|
align="center"
|
||||||
|
width="70px"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="nickName"
|
||||||
|
width="100px"
|
||||||
|
label="昵称"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="calss"
|
||||||
|
label="所属班级"
|
||||||
|
align="center"
|
||||||
|
width="100px"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="department"
|
||||||
|
label="系别"
|
||||||
|
align="center"
|
||||||
|
width="100px"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="speciality"
|
||||||
|
label="专业"
|
||||||
|
align="center"
|
||||||
|
width="150px"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="studyYear"
|
||||||
|
label="入学年份"
|
||||||
|
align="center"
|
||||||
|
width="150px"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="修改密码" name="addrole">
|
||||||
<div class="right_cont">
|
<div class="right_cont">
|
||||||
<!-- table -->
|
<!-- table -->
|
||||||
<div style="padding-top: 15px;"></div>
|
<div style="padding-top: 15px"></div>
|
||||||
<table class="tishi" cellspacing="0" style="margin:0 auto 30px">
|
<table class="tishi" cellspacing="0" style="margin: 0 auto 30px">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border-bottom: none; border-right: none;">原密码</td>
|
<td style="border-bottom: none; border-right: none">新密码</td>
|
||||||
<td style="border-bottom: none;">
|
<td style="border-bottom: none">
|
||||||
<el-input type="password" v-model="form.original" show-password/>
|
<el-input
|
||||||
|
type="password"
|
||||||
|
v-model="usePwd.password"
|
||||||
|
show-password
|
||||||
|
/>
|
||||||
<span>*</span>
|
<span>*</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border-bottom: none; border-right: none;">新密码</td>
|
<td style="border-right: none">确认密码</td>
|
||||||
<td style="border-bottom: none;">
|
|
||||||
<el-input type="password" v-model="form.password" show-password/>
|
|
||||||
<span>*</span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="border-right: none;">确认密码</td>
|
|
||||||
<td>
|
<td>
|
||||||
<el-input type="password" v-model="form.confirmPassword" show-password/>
|
<el-input
|
||||||
|
type="password"
|
||||||
|
v-model="usePwd.id"
|
||||||
|
show-password
|
||||||
|
/>
|
||||||
<span>*</span>
|
<span>*</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<span slot="footer" class="dialog-footer" style="margin-left:40%;">
|
<span slot="footer" class="dialog-footer" style="margin-left: 40%">
|
||||||
<el-button style=" margin-left: 8%; width: 100px;height: 40px;" type="primary"
|
<el-button
|
||||||
@click="updatePsw()">确认</el-button>
|
style="margin-left: 8%; width: 100px; height: 40px"
|
||||||
<!-- <el-button style="margin-left: 6%; width: 100px;height: 40px;" type="danger" @click="$router.go(-1)">关闭</el-button> -->
|
type="primary"
|
||||||
|
@click="updatePsw()"
|
||||||
|
>确认</el-button
|
||||||
|
>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
<!-- 编辑角色信息 -->
|
||||||
|
<el-dialog
|
||||||
|
:title="dialogTitle + '角色信息'"
|
||||||
|
:visible.sync="editDialog"
|
||||||
|
width="40%"
|
||||||
|
>
|
||||||
|
<table class="e-table" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td>学生姓名</td>
|
||||||
|
<td>
|
||||||
|
<el-input v-model="form.name" style="width: 300px"></el-input>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>学号ID</td>
|
||||||
|
<td>
|
||||||
|
<el-input v-model="form.infoId" style="width: 300px"></el-input>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>昵称</td>
|
||||||
|
<td>
|
||||||
|
<el-input v-model="form.nickName" style="width: 300px"></el-input>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>性别</td>
|
||||||
|
<td>
|
||||||
|
<el-input v-model="form.sex" style="width: 300px"></el-input>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>所属班级</td>
|
||||||
|
<td>
|
||||||
|
<el-input v-model="form.calss" style="width: 300px"></el-input>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>系别</td>
|
||||||
|
<td>
|
||||||
|
<el-input v-model="form.department" style="width: 300px"></el-input>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>专业</td>
|
||||||
|
<td>
|
||||||
|
<el-input v-model="form.speciality" style="width: 300px"></el-input>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>入学年份</td>
|
||||||
|
<td>
|
||||||
|
<el-input v-model="form.studyYear" style="width: 300px"></el-input>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div style="margin-top: 20px; text-align: center">
|
||||||
|
<el-button type="primary" @click="save()">保存</el-button>
|
||||||
|
<!--<el-button @click="editDialog = false">关闭</el-button>-->
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import login from '@/api/User/login.js'
|
import {
|
||||||
import {removeStorage} from '@/utils/auth'
|
putSourcesInfo,
|
||||||
import User from '@/api/User/login.js'
|
UserInfo,
|
||||||
import myviewer from '@/components/viewerjs/index.vue'
|
saveSourcesInfo,
|
||||||
|
alterPassword
|
||||||
export default {
|
} from "@/api/system/sources/index.js";
|
||||||
components: {myviewer},
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
checked: '',
|
activeName: "roleList",
|
||||||
|
dialogTitle: "",
|
||||||
|
editDialog: false,
|
||||||
|
entry: false,
|
||||||
form: {
|
form: {
|
||||||
confirmPassword: '',
|
userSid: "",
|
||||||
original: '',
|
id: "9",
|
||||||
password: '',
|
|
||||||
userSid: window.sessionStorage.getItem('userSid')
|
|
||||||
},
|
},
|
||||||
token: window.sessionStorage.getItem('token')
|
student: {},
|
||||||
}
|
type: "xs",
|
||||||
|
infoSid: "",
|
||||||
|
jiuye: "已就业",
|
||||||
|
formBackup: Object.assign({}, this.form),
|
||||||
|
page: {
|
||||||
|
total: 0, // 默认数据总数
|
||||||
|
current: 1, // 默认开始页面
|
||||||
|
size: 10, // 每页的数据条数
|
||||||
|
params: {
|
||||||
|
psid: "",
|
||||||
|
sourceId: "",
|
||||||
|
sourceName: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
msg: 0,
|
||||||
|
tableData: [],
|
||||||
|
zylb: [],
|
||||||
|
sourceList: [],
|
||||||
|
usePwd: {
|
||||||
|
id: "",
|
||||||
|
password: ""
|
||||||
|
},
|
||||||
|
token: window.sessionStorage.getItem("token"),
|
||||||
|
sid: window.sessionStorage.getItem("sid"),
|
||||||
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.loginform();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
updatePsw() {
|
loginform() {
|
||||||
if (this.form.password != this.form.confirmPassword) {
|
UserInfo({ sid: this.sid }).then((res) => {
|
||||||
|
this.msg = res.msg.length;
|
||||||
|
console.log(res);
|
||||||
|
let qyArry = Object.keys(res.data).map((item) => {
|
||||||
|
if (res.data[item] == null) {
|
||||||
|
delete res.data[item];
|
||||||
|
}
|
||||||
|
return res.data;
|
||||||
|
});
|
||||||
|
this.qyArry = Object.values(qyArry[0]);
|
||||||
|
console.log(qyArry);
|
||||||
|
this.tableData = qyArry;
|
||||||
|
this.form.id = qyArry.id;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
pagination(val) {
|
||||||
|
// 分页
|
||||||
|
this.page.current = val.pageNum;
|
||||||
|
this.page.size = val.pageSize;
|
||||||
|
},
|
||||||
|
resetSearch() {
|
||||||
|
// 重置
|
||||||
|
this.page = {
|
||||||
|
total: 0, // 默认数据总数
|
||||||
|
current: 1, // 默认开始页面
|
||||||
|
size: 10, // 每页的数据条数
|
||||||
|
params: {
|
||||||
|
name: "",
|
||||||
|
psid: "",
|
||||||
|
sourceId: "",
|
||||||
|
sourceName: "",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
this.getPageList();
|
||||||
|
},
|
||||||
|
getPageList() {},
|
||||||
|
saveSid() {
|
||||||
|
this.dialogTitle = "添加";
|
||||||
|
this.editDialog = true;
|
||||||
|
},
|
||||||
|
save() {
|
||||||
|
if (this.msg != 5) {
|
||||||
|
this.form.userSid = this.sid;
|
||||||
|
this.dialogTitle = "新增";
|
||||||
|
console.log(this.form.userSid);
|
||||||
|
saveSourcesInfo(this.form).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
this.editDialog = false;
|
||||||
|
if (res.code == 200) {
|
||||||
|
location.reload(true);
|
||||||
|
}
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'warning',
|
message: res.msg,
|
||||||
message: '两次密码输入不一致!'
|
type: "success",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
putSourcesInfo(this.form).then((res) => {
|
||||||
|
this.form.userSid = this.sid;
|
||||||
|
this.editDialog = false;
|
||||||
|
this.loginform();
|
||||||
|
this.$message({
|
||||||
|
message: res.msg,
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
});
|
});
|
||||||
return
|
|
||||||
}
|
}
|
||||||
login.updatePassword(this.form).then(res => {
|
this.reset();
|
||||||
this.$alert('密码修改成!请重新登录点击确定后退出。', '修改成功', {
|
},
|
||||||
confirmButtonText: '确定',
|
reset() {
|
||||||
callback: action => {
|
this.form = {};
|
||||||
User.logout({token: this.token}).then(res => {
|
},
|
||||||
// removeToken()
|
editRow(row) {
|
||||||
window.sessionStorage.removeStorage('token')
|
this.dialogTitle = "编辑";
|
||||||
window.sessionStorage.removeStorage('userSid')
|
this.editDialog = true;
|
||||||
this.$router.push({path: '/login'})
|
this.form = Object.assign({}, row);
|
||||||
})
|
// getSourcesInfo({sid: row.sid}).then(res => {
|
||||||
.catch(() => {
|
// this.form = res.data
|
||||||
this.$router.push({path: '/login'})
|
// })
|
||||||
})
|
},
|
||||||
|
updatePsw() {
|
||||||
|
// if (this.formPwd.password != this.formPwd.confirmPassword) {
|
||||||
|
// this.$message({
|
||||||
|
// type: 'warning',
|
||||||
|
// message: '两次密码输入不一致!'
|
||||||
|
// });
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
alterPassword(this.usePwd).then((res) => {
|
||||||
|
if(res.code===200){
|
||||||
|
this.$alert("密码修改成!请重新登录点击确定后退出。", "修改成功", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
callback: (action) => {
|
||||||
|
window.sessionStorage.removeStorage("token");
|
||||||
|
window.sessionStorage.removeStorage("userSid");
|
||||||
|
this.$router.push({ path: "/login" });
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// this.$message({
|
|
||||||
// type: 'success',
|
|
||||||
// message: '!'
|
|
||||||
// });
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
guanli() {
|
|
||||||
this.$router.push({
|
|
||||||
name: 'roleAdminister'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped="scoped" lang="scss">
|
<style scoped="scoped" lang="scss">
|
||||||
|
.my-tabs {
|
||||||
.content {
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
.content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.shouye {
|
.shouye {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -3px;
|
top: -3px;
|
||||||
left: 100px;
|
left: 100px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #0395d8;
|
color: #0395d8;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.placename {
|
.placename {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -3px;
|
top: -3px;
|
||||||
left: 210px;
|
left: 210px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right_cont {
|
.right_cont {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 645px;
|
height: 645px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tishi {
|
.tishi {
|
||||||
width: 560px;
|
width: 560px;
|
||||||
color: #000;
|
color: #000;
|
||||||
padding-left: 1.5%;
|
padding-left: 1.5%;
|
||||||
@@ -163,5 +418,5 @@
|
|||||||
color: red;
|
color: red;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -124,6 +124,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
registUser(this.userForm)
|
registUser(this.userForm)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
console.log(this.userForm)
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.btnDisabled = false;
|
this.btnDisabled = false;
|
||||||
this.$confirm("注册成功, 是否关闭页面?", "提示", {
|
this.$confirm("注册成功, 是否关闭页面?", "提示", {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,248 +1,246 @@
|
|||||||
<template>
|
<template xmlns="">
|
||||||
|
<div>
|
||||||
|
<el-tabs
|
||||||
|
class="my-tabs"
|
||||||
|
v-model="activeName"
|
||||||
|
type="card"
|
||||||
|
>
|
||||||
|
<el-tab-pane label="字典列表" name="roleList">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div v-show="viewState == 1">
|
<!-- table -->
|
||||||
<div class="tab-header">
|
<el-table :data="roleTable" border style="width: 100%">
|
||||||
<el-form ref="form" :inline="true" :model="form" label-width="80px">
|
<el-table-column
|
||||||
<el-row :gutter="20">
|
label="序号"
|
||||||
<el-col :span="14">
|
width="50px"
|
||||||
<el-form-item label="数据value">
|
type="index"
|
||||||
<el-input v-model="page.params.dictValue" clearable></el-input>
|
align="center"
|
||||||
</el-form-item>
|
>
|
||||||
</el-col>
|
|
||||||
<el-col :span="10">
|
|
||||||
<el-form-item style="float: right;">
|
|
||||||
<el-button type="primary" @click="onSearch()">查 询</el-button>
|
|
||||||
<el-button @click="add()">添 加</el-button>
|
|
||||||
<el-button @click="closeDict">返 回</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<el-table :data="tableData" border style="width: 100%;">
|
|
||||||
<el-table-column label="序号" width="50px" type="index" align="center">
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="280px">
|
<el-table-column label="操作" width="520px" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- <el-button type="primary" size="mini" @click="add(scope.row)">-->
|
<el-button
|
||||||
<!-- 添加子级-->
|
@click="editRow(scope.row)"
|
||||||
<!-- </el-button>-->
|
type="primary"
|
||||||
<el-button type="primary" size="mini" @click="editRow(scope.row)">
|
size="mini"
|
||||||
修改
|
>修改</el-button
|
||||||
</el-button>
|
>
|
||||||
<el-button type="danger" size="mini" @click.native.prevent="deleteRow(scope.row)">
|
<el-button @click="delRow(scope.row)" type="danger" size="mini"
|
||||||
删除
|
>删除</el-button
|
||||||
</el-button>
|
>
|
||||||
<el-button type="primary" size="mini" @click="handleMap(scope.row)">
|
|
||||||
映射
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="dictType" label="字典分类编码" align="center">
|
<el-table-column
|
||||||
|
prop="dictTypeCode"
|
||||||
|
label="类型代码"
|
||||||
|
width="220px"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="groupName" label="数据分组" align="center">
|
<el-table-column
|
||||||
|
prop="dictTypeName"
|
||||||
|
label="类型名称"
|
||||||
|
width="220px"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="dictKey" label="数据key" align="center">
|
<el-table-column prop="remarks" label="类型说明" align="center">
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="dictValue" label="数据value" align="center">
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/>
|
|
||||||
|
|
||||||
<!-- 分类编辑 -->
|
<!-- 编辑字典信息 -->
|
||||||
<el-dialog :title="dialogTitle + '字典数据'" :visible.sync="editDialog" width="50%">
|
<el-dialog
|
||||||
|
:title="dialogTitle + '字典信息'"
|
||||||
|
:visible.sync="editDialog"
|
||||||
|
width="40%"
|
||||||
|
>
|
||||||
<table class="e-table" cellspacing="0">
|
<table class="e-table" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td>字典分类编码</td>
|
<td>类型代码</td>
|
||||||
<td>
|
<td>
|
||||||
{{ form.dictType }}
|
<el-input
|
||||||
|
v-model="roleForm.dictTypeCode"
|
||||||
|
style="width: 300px"
|
||||||
|
></el-input>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>数据分组</td>
|
<td>类型名称</td>
|
||||||
<td>
|
<td>
|
||||||
<el-input v-model="form.groupName"></el-input>
|
<el-input
|
||||||
|
v-model="roleForm.dictTypeName"
|
||||||
|
style="width: 300px"
|
||||||
|
></el-input>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>数据key</td>
|
<td>类型说明</td>
|
||||||
<td>
|
<td>
|
||||||
<el-input v-model="form.dictKey"></el-input>
|
<el-input
|
||||||
</td>
|
type="textarea"
|
||||||
</tr>
|
v-model="roleForm.remarks"
|
||||||
<tr>
|
></el-input>
|
||||||
<td>数据value</td>
|
|
||||||
<td>
|
|
||||||
<el-input v-model="form.dictValue"></el-input>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div style="margin-top: 20px; text-align: center">
|
||||||
<el-button type="primary" @click="save()">保 存</el-button>
|
<el-button type="primary" @click="save1()">保 存</el-button>
|
||||||
<el-button @click="editDialog = false">关 闭</el-button>
|
<el-button @click="editDialog = false">关 闭</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
<dictMap v-show="viewState == 2" ref="divAdd" @doback="resetState"/>
|
</el-tab-pane>
|
||||||
|
<!-- 添加字典 -->
|
||||||
|
<el-tab-pane label="添加字典" name="addrole">
|
||||||
|
<el-card class="box-card">
|
||||||
|
<table class="e-table" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td>类型代码</td>
|
||||||
|
<td>
|
||||||
|
<el-input
|
||||||
|
v-model="roleForm.dictTypeCode"
|
||||||
|
style="width: 300px"
|
||||||
|
></el-input>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>类型名称</td>
|
||||||
|
<td>
|
||||||
|
<el-input
|
||||||
|
v-model="roleForm.dictTypeName"
|
||||||
|
style="width: 300px"
|
||||||
|
></el-input>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>类型说明</td>
|
||||||
|
<td>
|
||||||
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 4, maxRows: 6 }"
|
||||||
|
v-model="roleForm.remarks"
|
||||||
|
></el-input>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div style="margin-top: 20px; text-align: center">
|
||||||
|
<el-button type="primary" @click="save()">保 存</el-button>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>;
|
||||||
import { deldictCommon, dictCommonList, putdictCommon, savedictCommon } from '@/api/system/dictType/dictCommon.js'
|
import { save,pageList,delOrgroles } from '@/api/system/dictType/index.js'
|
||||||
import dictMap from './dictMap'
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
dictMap
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
editDialog: false,
|
dialogTitle: "",
|
||||||
dialogTitle: '',
|
activeName: "roleList",
|
||||||
viewState: 1,
|
editDialog:false,
|
||||||
form: {
|
roleForm: {
|
||||||
dictKey: '',
|
dictTypeCode: "",
|
||||||
dictType: '',
|
dictTypeName: "",
|
||||||
groupName: '',
|
remarks: ""
|
||||||
dictValue: '',
|
},
|
||||||
parentSid: ''
|
formBackup: {},
|
||||||
|
search: {
|
||||||
|
name: "",
|
||||||
},
|
},
|
||||||
page: {
|
page: {
|
||||||
total: 0, // 默认数据总数
|
total: 0, // 默认数据总数
|
||||||
current: 1, // 默认开始页面
|
current: 1, // 默认开始页面
|
||||||
size: 10, // 每页的数据条数
|
size: 10, // 每页的数据条数
|
||||||
params: {
|
|
||||||
dictKey: '',
|
|
||||||
dictType: '',
|
|
||||||
dictValue: '',
|
|
||||||
parentSid: '',
|
|
||||||
sidPath: '',
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
tableData: []
|
roleTable: [],
|
||||||
}
|
postSidData1: [],
|
||||||
},
|
postSidData: [
|
||||||
props: ['dictData'],
|
{ num: "0", type: "学生" },
|
||||||
watch: {
|
{ num: "1", type: "教师" },
|
||||||
dictData: {
|
{ num: "2", type: "管理员" },
|
||||||
handler(val) {
|
],
|
||||||
this.form.parentSid = val.sid
|
};
|
||||||
this.form.dictType = val.dictType
|
|
||||||
this.form.groupName = val.groupName
|
|
||||||
this.page.params.parentSid = val.sid
|
|
||||||
this.page.params.dictType = val.dictType
|
|
||||||
this.getPageList(this.page)
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// if (this.$route.query.sid) {
|
this.formBackup = Object.assign({}, this.roleForm);
|
||||||
// sessionStorage.setItem('dictType', this.$route.query.dictType);
|
this.getroleOrgList();
|
||||||
// sessionStorage.setItem('parentSid', this.$route.query.sid);
|
this.getPostList();
|
||||||
// this.page.params.dictType = this.$route.query.dictType
|
|
||||||
// this.page.params.parentSid = this.$route.query.sid
|
|
||||||
// this.form.dictType = this.$route.query.dictType;
|
|
||||||
// this.form.parentSid = this.$route.query.sid
|
|
||||||
// } else {
|
|
||||||
// this.page.params.dictType = sessionStorage.getItem('dictType');
|
|
||||||
// this.page.params.parentSid = sessionStorage.getItem('parentSid');
|
|
||||||
// this.form.dictType = sessionStorage.getItem('dictType');
|
|
||||||
// this.form.parentSid = sessionStorage.getItem('parentSid');
|
|
||||||
// }
|
|
||||||
this.getPageList(this.page)
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
pagination(val) { // 分页
|
getPostList() {
|
||||||
this.page.current = val.pageNum
|
pageList(this.page).then((res) => {
|
||||||
this.page.size = val.pageSize
|
console.log(res);
|
||||||
this.getPageList(this.page)
|
if (res.success) {
|
||||||
},
|
this.roleTable = res.data.records;
|
||||||
onSearch() { // 查询
|
|
||||||
this.getPageList(this.page)
|
|
||||||
},
|
|
||||||
resetSearch() { // 重置
|
|
||||||
this.getPageList(this.page)
|
|
||||||
},
|
|
||||||
getPageList(data) { // 获取列表
|
|
||||||
dictCommonList(data).then((res) => {
|
|
||||||
this.tableData = res.data.records
|
|
||||||
this.page.total = res.data.total
|
|
||||||
})
|
|
||||||
},
|
|
||||||
add(row) {
|
|
||||||
if (row) {
|
|
||||||
this.form.dictType = row.dictType
|
|
||||||
this.form.parentSid = row.sid
|
|
||||||
} else {
|
|
||||||
this.form.parentSid = 0
|
|
||||||
// this.form.dictType = row.dictType
|
|
||||||
}
|
}
|
||||||
this.dialogTitle = '新增'
|
});
|
||||||
this.editDialog = true
|
|
||||||
this.form.dictKey = ''
|
|
||||||
this.form.groupName = ''
|
|
||||||
this.form.dictValue = ''
|
|
||||||
this.form.sid = ''
|
|
||||||
},
|
},
|
||||||
closeDict() {
|
// 分页列表
|
||||||
this.form.parentSid = ''
|
getroleOrgList(flag) {
|
||||||
this.form.dictType = ''
|
if (flag == "1") {
|
||||||
this.form.groupName = ''
|
this.page.current = 1;
|
||||||
this.page.params.parentSid = ''
|
}
|
||||||
this.page.params.dictType = ''
|
let params = this.page;
|
||||||
this.$emit('doback')
|
params.params = this.search;
|
||||||
},
|
},
|
||||||
editRow(row) {
|
editRow(row) {
|
||||||
this.dialogTitle = '编辑'
|
this.dialogTitle = "编辑";
|
||||||
this.editDialog = true
|
this.editDialog = true;
|
||||||
this.form = Object.assign({}, row)
|
this.roleForm = Object.assign({}, row);
|
||||||
},
|
},
|
||||||
save() {
|
delRow(row) {
|
||||||
if (this.form.sid) {
|
console.log("rowrow",row);
|
||||||
putdictCommon(this.form).then(res => {
|
this.$confirm("确定要删除该角色吗, 是否继续?", "提示", {
|
||||||
this.editDialog = false
|
confirmButtonText: "确定",
|
||||||
this.getPageList(this.page)
|
cancelButtonText: "取消",
|
||||||
this.$message({
|
type: "warning",
|
||||||
message: res.msg,
|
|
||||||
type: 'success'
|
|
||||||
})
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
savedictCommon(this.form).then(res => {
|
|
||||||
this.editDialog = false
|
|
||||||
this.getPageList(this.page)
|
|
||||||
this.$message({
|
|
||||||
message: res.msg,
|
|
||||||
type: 'success'
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
deleteRow(row) {
|
|
||||||
this.$confirm('确定要删除该数据吗, 是否继续?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
deldictCommon({ sid: row.sid }).then(res => {
|
delOrgroles({ sid: row.sid }).then((res) => {
|
||||||
this.getPageList(this.page)
|
if (res.success) {
|
||||||
|
this.getPostList();
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'success',
|
showClose: true,
|
||||||
message: '删除成功!'
|
type: "success",
|
||||||
})
|
message: "删除成功!",
|
||||||
})
|
});
|
||||||
})
|
|
||||||
},
|
|
||||||
handleMap(row) {
|
|
||||||
this.viewState = 2
|
|
||||||
this.$refs['divAdd'].showAdd(row)
|
|
||||||
},
|
|
||||||
resetState() {
|
|
||||||
this.viewState = 1
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 保存角色
|
||||||
|
save() {
|
||||||
|
save(this.roleForm).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.success) {
|
||||||
|
this.$message({
|
||||||
|
showClose: true,
|
||||||
|
message: res.msg,
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
(this.activeName = "roleList"), this.getPostList();
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
},
|
||||||
|
save1(){
|
||||||
|
save(this.roleForm).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.getPostList();
|
||||||
|
this.editDialog = false;
|
||||||
|
this.$message({
|
||||||
|
showClose: true,
|
||||||
|
message: res.msg,
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.my-tabs {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,200 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="container">
|
|
||||||
<div v-show="viewState == 1">
|
|
||||||
<div class="tab-header">
|
|
||||||
<el-form ref="form" :inline="true" :model="form" label-width="80px">
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="分类名称">
|
|
||||||
<el-input clearable v-model="page.params.dictTypeName"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="说明">
|
|
||||||
<el-input clearable v-model="page.params.remarks"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="10">
|
|
||||||
<el-form-item style="float: right;">
|
|
||||||
<el-button type="primary" @click="onSearch()">查询</el-button>
|
|
||||||
<el-button @click="add()">添加</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<el-table :data="tableData" border style="width: 100%;">
|
|
||||||
<el-table-column label="序号" width="50px" type="index" align="center">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" align="center" width="300px">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button type="primary" size="mini" @click="guanli(scope.row)">
|
|
||||||
管理
|
|
||||||
</el-button>
|
|
||||||
<el-button type="primary" size="mini" @click="editRow(scope.row)">
|
|
||||||
修改
|
|
||||||
</el-button>
|
|
||||||
<el-button type="danger" size="mini" @click.native.prevent="deleteRow(scope.row)">
|
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="dictTypeCode" label="字典分类编码" align="center">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="dictTypeName" label="字典分类名称" align="center">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="remarks" label="说明" align="center">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/>
|
|
||||||
<!-- 分类编辑 -->
|
|
||||||
<el-dialog :title="dialogTitle + '字典分类'" :visible.sync="editDialog" width="50%">
|
|
||||||
<el-form>
|
|
||||||
<table class="e-table" cellspacing="0">
|
|
||||||
<tr>
|
|
||||||
<td>数据字典code</td>
|
|
||||||
<td>
|
|
||||||
<el-input v-model="form.dictTypeCode"></el-input>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>数据分类名称</td>
|
|
||||||
<td>
|
|
||||||
<el-input v-model="form.dictTypeName"></el-input>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>说明</td>
|
|
||||||
<td>
|
|
||||||
<el-input type="textarea" v-model="form.remarks"></el-input>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="save()">保 存</el-button>
|
|
||||||
<el-button @click="editDialog = false">关 闭</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
<dict-common @doback="resetState" :dictData='dictData' v-show="viewState == 2"/>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { pageList, saveDictType, putDictType, delDictType } from '@/api/system/dictType/index.js'
|
|
||||||
import dictCommon from './dictCommon.vue'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
editDialog: false,
|
|
||||||
dialogTitle: '',
|
|
||||||
form: {},
|
|
||||||
formBackup: Object.assign({}, this.form),
|
|
||||||
page: {
|
|
||||||
total: 0, // 默认数据总数
|
|
||||||
current: 1, // 默认开始页面
|
|
||||||
size: 10, // 每页的数据条数
|
|
||||||
params: {
|
|
||||||
dictTypeName: '',
|
|
||||||
dictTypeCode: ''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
tableData: [],
|
|
||||||
viewState: 1,
|
|
||||||
dictData: {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: {
|
|
||||||
dictCommon
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.getPageList(this.page)
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
pagination(val) { // 分页
|
|
||||||
this.page.current = val.pageNum
|
|
||||||
this.page.size = val.pageSize
|
|
||||||
this.getPageList(this.page)
|
|
||||||
},
|
|
||||||
onSearch() { // 查询
|
|
||||||
this.getPageList()
|
|
||||||
},
|
|
||||||
resetSearch() { // 重置
|
|
||||||
this.page.current = 1
|
|
||||||
this.getPageList()
|
|
||||||
},
|
|
||||||
getPageList() { // 获取列表
|
|
||||||
pageList(this.page).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.tableData = res.data.records
|
|
||||||
this.page.total = res.data.total
|
|
||||||
} else {
|
|
||||||
this.tableData = []
|
|
||||||
this.page.total = 0
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
add() {
|
|
||||||
this.dialogTitle = '新增'
|
|
||||||
this.editDialog = true
|
|
||||||
this.form = Object.assign({}, this.formBackup)
|
|
||||||
},
|
|
||||||
editRow(row) {
|
|
||||||
this.dialogTitle = '编辑'
|
|
||||||
this.editDialog = true
|
|
||||||
this.form = Object.assign({}, row)
|
|
||||||
},
|
|
||||||
save() {
|
|
||||||
if (this.form.sid) {
|
|
||||||
putDictType(this.form).then(res => {
|
|
||||||
this.editDialog = false
|
|
||||||
this.getPageList(this.page)
|
|
||||||
this.$message({
|
|
||||||
message: res.msg,
|
|
||||||
type: 'success'
|
|
||||||
})
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
saveDictType(this.form).then(res => {
|
|
||||||
this.editDialog = false
|
|
||||||
this.getPageList(this.page)
|
|
||||||
this.$message({
|
|
||||||
message: res.msg,
|
|
||||||
type: 'success'
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
deleteRow(row) {
|
|
||||||
this.$confirm('确定要删除该条数据吗, 是否继续?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
delDictType({ sid: row.sid }).then(res => {
|
|
||||||
this.getPageList(this.page)
|
|
||||||
this.$message({
|
|
||||||
type: 'success',
|
|
||||||
message: '删除成功!'
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
guanli(row) {
|
|
||||||
this.dictData = { dictType: row.dictTypeCode }
|
|
||||||
this.viewState = 2
|
|
||||||
},
|
|
||||||
resetState() {
|
|
||||||
this.viewState = 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped="scoped">
|
|
||||||
.my-tabs {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,155 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-app-container">
|
|
||||||
<div class="tab-header webtop">
|
|
||||||
<!--标题-->
|
|
||||||
<div>{{ viewTitle }}</div>
|
|
||||||
<!--start 添加修改按钮-->
|
|
||||||
<div>
|
|
||||||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="save()">保存
|
|
||||||
</el-button>
|
|
||||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="listconadd">
|
|
||||||
<el-form ref="form_obj" class="formadd" :model="formobj">
|
|
||||||
<div class="title">
|
|
||||||
<div>[{{ dictionariesKey }}+{{dictionariesValue}}]映射列表</div>
|
|
||||||
<el-button type="primary" size="mini" @click="Add">添加</el-button>
|
|
||||||
</div>
|
|
||||||
<el-table :key="tableKey" :data="formobj.listDtos" :index="index" border style="width: 100%">
|
|
||||||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
|
|
||||||
<el-table-column fixed prop="name" label="操作" width="100px" align="center" header-align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button size="mini" type="danger" @click="dataDelete(scope.$index)">删除
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="映射来源" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-select v-model="scope.row.map_sourceValue" filterable placeholder="" @change="changeSource($event, scope.row)">
|
|
||||||
<el-option v-for="item in mappingsource_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="映射实体名称" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-input v-model="scope.row.map_object" placeholder="" clearable/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="映射项目类别" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-input v-model="scope.row.map_item" placeholder="" clearable/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="映射项目编码" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-input v-model="scope.row.map_itemKey" placeholder="" clearable/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="映射项目值" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-input v-model="scope.row.map_itemValue" placeholder="" clearable/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { typeValues } from '@/api/system/roleAdminister/index'
|
|
||||||
import { saveMappingList, selectMappingListInfo } from '@/api/system/dictType/index.js'
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return{
|
|
||||||
viewTitle: '数据字典-映射管理',
|
|
||||||
tableKey: 0,
|
|
||||||
index: 0,
|
|
||||||
dictionariesKey: '',
|
|
||||||
dictionariesValue: '',
|
|
||||||
mappingsource_list: [],
|
|
||||||
formobj: {
|
|
||||||
userSid: '',
|
|
||||||
dictSid: '',
|
|
||||||
listDtos: []
|
|
||||||
},
|
|
||||||
submitdisabled: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
showAdd(row) {
|
|
||||||
this.formobj.dictSid = row.sid
|
|
||||||
this.dictionariesKey = row.dictType
|
|
||||||
this.dictionariesValue = row.dictValue
|
|
||||||
this.formobj.userSid = window.sessionStorage.getItem('userSid')
|
|
||||||
typeValues({ type: 'sys_mappingsource' }).then((resp) => {
|
|
||||||
if (resp.success) {
|
|
||||||
this.mappingsource_list = resp.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
selectMappingListInfo({ dictSid: row.sid }).then((resp) => {
|
|
||||||
if (resp.success) {
|
|
||||||
this.formobj.listDtos = resp.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
Add() {
|
|
||||||
this.formobj.listDtos.push({
|
|
||||||
map_item: '',
|
|
||||||
map_itemKey: '',
|
|
||||||
map_itemValue: '',
|
|
||||||
map_object: '',
|
|
||||||
map_sourceKey: '',
|
|
||||||
map_sourceValue: '',
|
|
||||||
sid: ''
|
|
||||||
})
|
|
||||||
},
|
|
||||||
changeSource(value, row) {
|
|
||||||
let bb = null
|
|
||||||
this.mappingsource_list.forEach((e) => {
|
|
||||||
if (e.dictValue === value) {
|
|
||||||
bb = {
|
|
||||||
value: e.dictValue,
|
|
||||||
key: e.dictKey
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
row.map_sourceKey = bb.key
|
|
||||||
},
|
|
||||||
dataDelete(index) {
|
|
||||||
this.formobj.listDtos.splice(index, 1)
|
|
||||||
},
|
|
||||||
save() {
|
|
||||||
if (this.formobj.listDtos.length === 0) {
|
|
||||||
this.$message({ showClose: true, type: 'error', message: '映射列表不能为空' })
|
|
||||||
return
|
|
||||||
}
|
|
||||||
saveMappingList(this.formobj).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.$message({ showClose: true, type: 'success', message: '保存成功' })
|
|
||||||
this.handleReturn()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleReturn() {
|
|
||||||
this.formobj = {
|
|
||||||
userSid: '',
|
|
||||||
dictSid: '',
|
|
||||||
listDtos: []
|
|
||||||
}
|
|
||||||
this.$emit('doback')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.title {
|
|
||||||
padding: 7px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -24,13 +24,6 @@
|
|||||||
<el-button type="primary" size="mini" @click="editRow(scope.row)">
|
<el-button type="primary" size="mini" @click="editRow(scope.row)">
|
||||||
添加
|
添加
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
size="mini"
|
|
||||||
@click.native.prevent="deleteRow(scope.row)"
|
|
||||||
>
|
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -41,19 +34,32 @@
|
|||||||
:limit.sync="page.size"
|
:limit.sync="page.size"
|
||||||
@pagination="pagination"
|
@pagination="pagination"
|
||||||
/>
|
/>
|
||||||
<el-dialog title="收货地址" :visible.sync="lookstuders">
|
<el-dialog title="学生" :visible.sync="lookstuders">
|
||||||
<el-table :data="gridData">
|
<el-table
|
||||||
|
ref="multipleTable"
|
||||||
|
:data="gridData"
|
||||||
|
row-key="sid"
|
||||||
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||||
|
border
|
||||||
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
property="infoId"
|
property="studentName"
|
||||||
label="日期"
|
|
||||||
width="150"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
property="name"
|
|
||||||
label="姓名"
|
label="姓名"
|
||||||
width="200"
|
width="200"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column property="address" label="地址"></el-table-column>
|
<el-table-column property="studentNo" label="学号"></el-table-column>
|
||||||
|
<el-table-column property="calss" label="班级"></el-table-column>
|
||||||
|
<el-table-column label="操作" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
size="mini"
|
||||||
|
@click.native.prevent="deleteRow(scope.row)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 编辑角色信息 -->
|
<!-- 编辑角色信息 -->
|
||||||
@@ -89,7 +95,7 @@
|
|||||||
v-for="item in options"
|
v-for="item in options"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.name"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -103,7 +109,7 @@
|
|||||||
v-for="item in options"
|
v-for="item in options"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.infoId"
|
:label="item.infoId"
|
||||||
:value="item.id"
|
:value="item.infoId"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -125,6 +131,7 @@ import {
|
|||||||
pageList,
|
pageList,
|
||||||
saveSysInfoShip,
|
saveSysInfoShip,
|
||||||
selectTeacherDownStudent,
|
selectTeacherDownStudent,
|
||||||
|
deleteSysInfoShip
|
||||||
} from "@/api/system/sources/index.js";
|
} from "@/api/system/sources/index.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -135,7 +142,7 @@ export default {
|
|||||||
editDialog: false,
|
editDialog: false,
|
||||||
lookstuders: false,
|
lookstuders: false,
|
||||||
form: {},
|
form: {},
|
||||||
gridData: {},
|
gridData: [],
|
||||||
teacher: {},
|
teacher: {},
|
||||||
type: "js",
|
type: "js",
|
||||||
formBackup: Object.assign({}, this.form),
|
formBackup: Object.assign({}, this.form),
|
||||||
@@ -166,9 +173,9 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
lookstuder(row) {
|
lookstuder(row) {
|
||||||
this.lookstuders = true;
|
this.lookstuders = true;
|
||||||
console.log(row.infoId);
|
|
||||||
selectTeacherDownStudent({ infoId: row.infoId }).then((res) => {
|
selectTeacherDownStudent({ infoId: row.infoId }).then((res) => {
|
||||||
this.gridData=res.data
|
console.log(res.data);
|
||||||
|
this.gridData = res.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
pagination(val) {
|
pagination(val) {
|
||||||
@@ -216,7 +223,6 @@ export default {
|
|||||||
this.form = Object.assign({}, row);
|
this.form = Object.assign({}, row);
|
||||||
},
|
},
|
||||||
save() {
|
save() {
|
||||||
console.log(this.teacher);
|
|
||||||
saveSysInfoShip(this.teacher).then((res) => {
|
saveSysInfoShip(this.teacher).then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
});
|
});
|
||||||
@@ -228,8 +234,8 @@ export default {
|
|||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
delSources({ sid: row.sid }).then((res) => {
|
deleteSysInfoShip({ sid: row.sid }).then((res) => {
|
||||||
this.getPageList();
|
this.getPageList()
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "success",
|
type: "success",
|
||||||
message: "删除成功!",
|
message: "删除成功!",
|
||||||
|
|||||||
@@ -100,6 +100,8 @@ export default {
|
|||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
login(data) {
|
login(data) {
|
||||||
|
console.log(data);
|
||||||
|
console.log(this.loginForm);
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.loginForm.verifyCode = data.verifyCode;
|
this.loginForm.verifyCode = data.verifyCode;
|
||||||
this.loginForm.uuid = data.uuid;
|
this.loginForm.uuid = data.uuid;
|
||||||
@@ -161,7 +163,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
regist(){
|
regist(){
|
||||||
this.$router.push('/reg')
|
this.$router.push('/Regist')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,33 +1,77 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-tabs class="my-tabs" v-model="activeName" type="card" @tab-click="handleClick">
|
<el-tabs
|
||||||
|
v-model="activeName"
|
||||||
|
class="my-tabs"
|
||||||
|
type="card"
|
||||||
|
@tab-click="handleClick"
|
||||||
|
>
|
||||||
<el-tab-pane label="学生信息" name="roleList">
|
<el-tab-pane label="学生信息" name="roleList">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<el-table :data="tableData" border style="width: 100%">
|
<el-table :data="tableData" border style="width: 100%">
|
||||||
<el-table-column label="序号" width="70px" type="index" align="center">
|
<el-table-column
|
||||||
|
label="序号"
|
||||||
|
width="70px"
|
||||||
|
type="index"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="150px" align="center">
|
<el-table-column label="操作" width="150px" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="primary" size="mini" @click="editRow(scope.row)">
|
<el-button type="primary" size="mini" @click="editRow(scope.row)">
|
||||||
修改
|
修改
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="danger" size="mini" @click.native.prevent="deleteRow(scope.row)">
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
size="mini"
|
||||||
|
@click.native.prevent="deleteRow(scope.row)"
|
||||||
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="name" label="学生姓名" width="100px" align="center">
|
<el-table-column
|
||||||
|
prop="name"
|
||||||
|
label="学生姓名"
|
||||||
|
width="100px"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="infoId" label="学号ID" align="center" width="150px">
|
<el-table-column
|
||||||
|
prop="infoId"
|
||||||
|
label="学号ID"
|
||||||
|
align="center"
|
||||||
|
width="150px"
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="sex" label="性别" align="center" width="70px">
|
<el-table-column prop="sex" label="性别" align="center" width="70px">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="calss" label="所属班级" align="center" width="100px">
|
<el-table-column
|
||||||
|
prop="calss"
|
||||||
|
label="所属班级"
|
||||||
|
align="center"
|
||||||
|
width="100px"
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="department" label="系别" align="center" width="100px">
|
<el-table-column
|
||||||
|
prop="department"
|
||||||
|
label="系别"
|
||||||
|
align="center"
|
||||||
|
width="100px"
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="speciality" label="专业" align="center" width="150px">
|
<el-table-column
|
||||||
|
prop="speciality"
|
||||||
|
label="专业"
|
||||||
|
align="center"
|
||||||
|
width="150px"
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="studyYear" label="入学年份" align="center" width="150px">
|
<el-table-column
|
||||||
|
prop="studyYear"
|
||||||
|
label="入学年份"
|
||||||
|
align="center"
|
||||||
|
width="150px"
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column width="200px" label="成绩录入" align="center">
|
<el-table-column width="200px" label="成绩录入" align="center">
|
||||||
<template>
|
<template>
|
||||||
@@ -38,9 +82,18 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination" />
|
<pagination
|
||||||
|
:total="page.total"
|
||||||
|
:page.sync="page.current"
|
||||||
|
:limit.sync="page.size"
|
||||||
|
@pagination="pagination"
|
||||||
|
/>
|
||||||
<!-- 编辑角色信息 -->
|
<!-- 编辑角色信息 -->
|
||||||
<el-dialog :title="dialogTitle + '角色信息'" :visible.sync="editDialog" width="40%">
|
<el-dialog
|
||||||
|
:title="dialogTitle + '角色信息'"
|
||||||
|
:visible.sync="editDialog"
|
||||||
|
width="40%"
|
||||||
|
>
|
||||||
<table class="e-table" cellspacing="0">
|
<table class="e-table" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td>学生姓名</td>
|
<td>学生姓名</td>
|
||||||
@@ -69,20 +122,29 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>系别</td>
|
<td>系别</td>
|
||||||
<td>
|
<td>
|
||||||
<el-input v-model="form.department" style="width: 300px"></el-input>
|
<el-input
|
||||||
|
v-model="form.department"
|
||||||
|
style="width: 300px"
|
||||||
|
></el-input>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>专业</td>
|
<td>专业</td>
|
||||||
<td>
|
<td>
|
||||||
<el-input v-model="form.speciality" style="width: 300px"></el-input>
|
<el-input
|
||||||
|
v-model="form.speciality"
|
||||||
|
style="width: 300px"
|
||||||
|
></el-input>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>入学年份</td>
|
<td>入学年份</td>
|
||||||
<td>
|
<td>
|
||||||
<el-input v-model="form.studyYear" style="width: 300px"></el-input>
|
<el-input
|
||||||
|
v-model="form.studyYear"
|
||||||
|
style="width: 300px"
|
||||||
|
></el-input>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -147,30 +209,46 @@
|
|||||||
<!--</div>-->
|
<!--</div>-->
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- 学生成绩录入 -->
|
<!-- 学生成绩录入 -->
|
||||||
<el-dialog :title="dialogTitle + '学生成绩'" :visible.sync="entry" width="40%">
|
<el-dialog
|
||||||
|
:title="dialogTitle + '学生成绩'"
|
||||||
|
:visible.sync="entry"
|
||||||
|
width="40%"
|
||||||
|
>
|
||||||
<table class="e-table" cellspacing="0">
|
<table class="e-table" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td>学号ID</td>
|
<td>学号ID</td>
|
||||||
<td>
|
<td>
|
||||||
<el-input v-model="student.studentNo" style="width: 300px"></el-input>
|
<el-input
|
||||||
|
v-model="student.studentNo"
|
||||||
|
style="width: 300px"
|
||||||
|
></el-input>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>四级(分)</td>
|
<td>四级(分)</td>
|
||||||
<td>
|
<td>
|
||||||
<el-input v-model="student.fourScore" style="width: 300px"></el-input>
|
<el-input
|
||||||
|
v-model="student.fourScore"
|
||||||
|
style="width: 300px"
|
||||||
|
></el-input>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>六级(分)</td>
|
<td>六级(分)</td>
|
||||||
<td>
|
<td>
|
||||||
<el-input v-model="student.sixScore" style="width: 300px"></el-input>
|
<el-input
|
||||||
|
v-model="student.sixScore"
|
||||||
|
style="width: 300px"
|
||||||
|
></el-input>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>计算机(分)</td>
|
<td>计算机(分)</td>
|
||||||
<td>
|
<td>
|
||||||
<el-input v-model="student.computerScore" style="width: 300px"></el-input>
|
<el-input
|
||||||
|
v-model="student.computerScore"
|
||||||
|
style="width: 300px"
|
||||||
|
></el-input>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -210,15 +288,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
pageList,
|
pageList,
|
||||||
saveSourcesInfo,
|
saveSourcesInfo,
|
||||||
putSourcesInfo,
|
putSourcesInfo,
|
||||||
delSources,
|
delSources,
|
||||||
addStudentScore
|
addStudentScore
|
||||||
} from "@/api/system/sources/index.js";
|
} from '@/api/system/sources/index.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeName: "roleList",
|
activeName: "roleList",
|
||||||
@@ -228,7 +306,7 @@
|
|||||||
form: {},
|
form: {},
|
||||||
student: {},
|
student: {},
|
||||||
type: "xs",
|
type: "xs",
|
||||||
jiuye: '已就业',
|
jiuye: "已就业",
|
||||||
formBackup: Object.assign({}, this.form),
|
formBackup: Object.assign({}, this.form),
|
||||||
page: {
|
page: {
|
||||||
total: 0, // 默认数据总数
|
total: 0, // 默认数据总数
|
||||||
@@ -241,6 +319,8 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
|
tableData1:[{name:'小王',infoId:'xs123',calss:'1',sex:'男',department:'2',speciality:'1',studyYear:'2023'},
|
||||||
|
],
|
||||||
zylb: [],
|
zylb: [],
|
||||||
sourceList: [],
|
sourceList: [],
|
||||||
};
|
};
|
||||||
@@ -318,7 +398,7 @@
|
|||||||
console.log(this.student);
|
console.log(this.student);
|
||||||
addStudentScore(this.student).then((res) => {
|
addStudentScore(this.student).then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {};
|
this.form = {};
|
||||||
@@ -341,23 +421,21 @@
|
|||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
delSources({
|
delSources({ sid: row.sid }).then((res) => {
|
||||||
sid: row.sid
|
|
||||||
}).then((res) => {
|
|
||||||
this.getPageList();
|
this.getPageList();
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "success",
|
type: 'success',
|
||||||
message: "删除成功!",
|
message: '删除成功!'
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped="scoped" lang="scss">
|
<style scoped="scoped" lang="scss">
|
||||||
.my-tabs {
|
.my-tabs {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user