
19 changed files with 1116 additions and 931 deletions
@ -1,32 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
|
|
||||
// 委托人分页列表
|
|
||||
export function clientList(data){ |
|
||||
return request({ |
|
||||
url: '/jlcyry/v1/clientalterrecords/pagerList', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 变更选择委托人列表
|
|
||||
export function setclientList(data){ |
|
||||
return request({ |
|
||||
url: '/jlcyry/v1/clientalterrecords/staffClientList', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 变更为被委托人
|
|
||||
export function doClientAlter(data){ |
|
||||
return request({ |
|
||||
url: '/jlcyry/v1/clientalterrecords/doClientAlter', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
@ -1,178 +1,214 @@ |
|||||
<template> |
<template> |
||||
<div class="app-container"> |
<div class="app-container"> |
||||
<div> |
<div v-show="viewState ==1"> |
||||
<!--标题按钮部分开始--> |
<el-tabs class="my-tabs" v-model="activeName" type="card" @tab-click="handleClick"> |
||||
<div class="tab-header webtop"> |
<el-tab-pane label="论坛信息" name="roleList"> |
||||
<!--标题--> |
<div class="container"> |
||||
<div>{{ viewTitle }}</div> |
<el-table :data="tableData" border style="width: 100%"> |
||||
<!--start 添加修改按钮--> |
<el-table-column label="序号" width="70px" type="index" align="center"> |
||||
<div> |
</el-table-column> |
||||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="save()">保存 |
<el-table-column label="操作" width="150px" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="editRow(scope.row)"> |
||||
|
评论 |
||||
</el-button> |
</el-button> |
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
<el-button type="danger" size="mini" @click.native.prevent="detail(scope.row)"> |
||||
</div> |
查看 |
||||
|
</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="type" label="论坛类别" align="center" /> |
||||
|
<el-table-column prop="title" label="论坛标题" align="center" /> |
||||
|
<el-table-column prop="content" label="论坛内容" align="center" /> |
||||
|
</el-table> |
||||
</div> |
</div> |
||||
<!--标题按钮部分结束--> |
</el-tab-pane> |
||||
<!--Start 新增修改部分--> |
|
||||
<div class="listconadd"> |
<el-tab-pane label="论坛发布" name="addrole"> |
||||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd"> |
<table class="e-table" cellspacing="0"> |
||||
<el-row style="border-top: 1px solid #E0E3EB"> |
<tr> |
||||
<el-col :span="4" class="tleftb"> |
<td>论坛类别</td> |
||||
<span><span class="icon">*</span>流程名称</span> |
<td> |
||||
</el-col> |
<el-select v-model="form.type" class="addinputw" placeholder="请选择论坛类别" style="width:300px" |
||||
<el-col :span="20"> |
@change="getType"> |
||||
<el-form-item prop="flowName"> |
<el-option v-for="item in typeList" :key="item.dictKey" :label="item.dictValue" |
||||
<el-select v-model="formobj.flowName" placeholder="请选择" @change="changeFlow" filterable> |
:value="item.dictKey" /> |
||||
<el-option v-for="item in flow_list" :key="item.key" :label="item.name" :value="item.name"></el-option> |
|
||||
</el-select> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="4" class="tleftb"> |
|
||||
<span>角色</span> |
|
||||
</el-col> |
|
||||
<el-col :span="20"> |
|
||||
<el-form-item> |
|
||||
<el-select v-model="recipientList" placeholder="请选择" filterable multiple> |
|
||||
<el-option v-for="item in role_list" :key="item.sid" :label="item.name" :value="item.sid"></el-option> |
|
||||
</el-select> |
</el-select> |
||||
</el-form-item> |
</td> |
||||
</el-col> |
</tr> |
||||
</el-row> |
<tr> |
||||
</el-form> |
<td>论坛标题</td> |
||||
|
<td> |
||||
|
<el-input v-model="form.title" style="width: 300px"></el-input> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>论坛内容</td> |
||||
|
<td> |
||||
|
<el-input v-model="form.content" style="width: 300px"></el-input> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
<div style="margin-top: 20px; text-align: center"> |
||||
|
<el-button type="primary" @click="save()">保存</el-button> |
||||
|
</div> |
||||
|
</el-tab-pane> |
||||
|
<el-dialog :title="dialogTitle + '论坛信息'" :visible.sync="editDialog" width="40%"> |
||||
|
<table class="e-table" cellspacing="0"> |
||||
|
<tr> |
||||
|
<td>论坛类别</td> |
||||
|
<td> |
||||
|
<!-- <el-select v-model="form.type" class="addinputw" placeholder="请选择论坛类别" style="width:300px" |
||||
|
@change="getType"> |
||||
|
<el-option v-for="item in typeList" :key="item.dictKey" :label="item.dictValue" |
||||
|
:value="item.dictKey" /> |
||||
|
</el-select> --> |
||||
|
<span>{{form.type}}</span> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>论坛标题</td> |
||||
|
<td> |
||||
|
<span>{{form.title}}</span> |
||||
|
<!-- <el-input v-model="form.title" style="width: 300px"></el-input> --> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>论坛内容</td> |
||||
|
<td> |
||||
|
<span>{{form.content}}</span> |
||||
|
<!-- <el-input v-model="form.content" style="width: 300px"></el-input> --> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>评论内容</td> |
||||
|
<td> |
||||
|
<!-- <span>{{form.content}}</span> --> |
||||
|
<el-input v-model="commentContent"></el-input> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
<div style="margin-top: 20px; text-align: center"> |
||||
|
<el-button type="primary" @click="save()">保存</el-button> |
||||
</div> |
</div> |
||||
|
</el-dialog> |
||||
|
</el-tabs> |
||||
</div> |
</div> |
||||
|
<organizationManageInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" /> |
||||
</div> |
</div> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import { fetchSid, save, roleList } from '@/api/system/liuchengchaosong/liuchengchaosong' |
import { |
||||
import { selectFlowList } from '@/api/system/postManage/index' |
selectSysForum, |
||||
|
saveSysForum, |
||||
export default { |
alterSysForum, |
||||
name: 'LiuChengChaoSongAdd', |
deleteSysForum, |
||||
|
saveSysForumComment, |
||||
|
} from "@/api/system/copyofprocess/liuchengchasongguanli.js"; |
||||
|
import organizationManageInfo from './organizationManageInfo.vue' |
||||
|
export default { |
||||
|
components: { |
||||
|
organizationManageInfo, |
||||
|
}, |
||||
data() { |
data() { |
||||
return { |
return { |
||||
viewTitle: '', |
viewState: 1, |
||||
index: 0, |
activeName: "roleList", |
||||
tableKey: 0, |
dialogTitle: "", |
||||
role_list: [], |
editDialog: false, |
||||
flow_list: [], |
form: {}, |
||||
recipientList: [], |
formBackup: Object.assign({}, this.form), |
||||
// 表单数据 |
tableData: [], |
||||
formobj: { |
commentContent: "", // 评论内容 |
||||
sid: '', // 一条数据的sid |
typeList: [{ |
||||
flowName: '', |
dictKey: "1", |
||||
flowKey: '', |
dictValue: "JAVA", |
||||
roleNames: [], |
}, { |
||||
roleSids: [] |
dictKey: "2", |
||||
}, |
dictValue: "Python", |
||||
rules: { |
}, { |
||||
flowName: [{ required: true, message: '流程名称不能为空', trigger: 'change' }] |
dictKey: "3", |
||||
}, |
dictValue: "C++", |
||||
submitdisabled: false |
}, { |
||||
|
dictKey: "4", |
||||
|
dictValue: "Excel", |
||||
|
}, { |
||||
|
dictKey: "5", |
||||
|
dictValue: "英语四六级考试", |
||||
|
}, { |
||||
|
dictKey: "6", |
||||
|
dictValue: "计算机等级考试", |
||||
} |
} |
||||
|
|
||||
|
] |
||||
|
}; |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.getPageList(); |
||||
|
console.log("sssssssssss", window.sessionStorage.getItem('userSid')) |
||||
}, |
}, |
||||
methods: { |
methods: { |
||||
init() { |
getType(value) { |
||||
roleList({}).then((res) => { |
console.log(">>>>>>>>>getType", value) |
||||
if (res.success) { |
const choose = this.typeList.filter((item) => item.dictKey === value) |
||||
this.role_list = res.data |
this.form.type = choose[0].dictValue |
||||
|
// this.form.typeSid = choose[0].dictKey |
||||
|
}, |
||||
|
getPageList() { |
||||
|
// 获取列表 |
||||
|
selectSysForum().then((res) => { |
||||
|
this.tableData = res.data; |
||||
|
}); |
||||
|
}, |
||||
|
handleClick(tab, event) { |
||||
|
if (tab.name == "addrole") { |
||||
|
this.dialogTitle = "新增"; |
||||
|
this.roleForm = Object.assign({}, this.formBackup); |
||||
|
} else { |
||||
|
this.getPageList(); |
||||
} |
} |
||||
}) |
}, |
||||
selectFlowList().then((res) => { |
save() { |
||||
if (res.success) { |
console.log("form", this.form) |
||||
this.flow_list = res.data |
|
||||
|
saveSysForumComment( |
||||
|
|
||||
|
{ |
||||
|
forumSid: this.form.sid, |
||||
|
content: this.commentContent, |
||||
|
createBySid: window.sessionStorage.getItem('userSid') |
||||
} |
} |
||||
}) |
|
||||
|
).then((res) => { |
||||
|
this.commentContent = "" |
||||
|
this.editDialog = false; |
||||
|
this.getPageList(); |
||||
|
this.$message({ |
||||
|
message: res.msg, |
||||
|
type: "success", |
||||
|
}); |
||||
|
}); |
||||
}, |
}, |
||||
showAdd() { |
resetState() { |
||||
this.init() |
this.viewState = 1 |
||||
this.$nextTick(() => { |
|
||||
this.$refs['form_obj'].clearValidate() |
|
||||
}) |
|
||||
this.viewTitle = '【新增】流程抄送' |
|
||||
}, |
}, |
||||
showEdit(row) { |
editRow(row) { |
||||
this.init() |
this.dialogTitle = "评论"; |
||||
this.$nextTick(() => { |
this.editDialog = true; |
||||
this.$refs['form_obj'].clearValidate() |
this.form = Object.assign({}, row); |
||||
}) |
|
||||
this.viewTitle = '【设置】流程抄送' |
|
||||
console.log('编辑回显', row.sid) |
|
||||
fetchSid(row.sid).then((resp) => { |
|
||||
this.formobj = resp.data |
|
||||
this.recipientList = this.formobj.roleSids |
|
||||
}).catch((e) => { |
|
||||
this.formobj = row |
|
||||
}) |
|
||||
}, |
}, |
||||
changeFlow(value) { |
detail(row) { |
||||
const choose = this.flow_list.filter((item) => item.name === value) |
this.viewState = 4 |
||||
this.formobj.flowKey = choose[0].key |
this.$refs['divInfo'].showAdd(row) |
||||
|
|
||||
}, |
}, |
||||
save() { |
|
||||
console.log(this.formobj) |
|
||||
if (this.recipientList.length === 0) { |
|
||||
this.$message({ showClose: true, type: 'error', message: '角色不能为空' }) |
|
||||
return |
|
||||
} else { |
|
||||
const aa = [] |
|
||||
const bb = [] |
|
||||
for (var i = 0; i < this.recipientList.length; i++) { |
|
||||
for (var k = 0; k < this.role_list.length; k++) { |
|
||||
if (this.recipientList[i] === this.role_list[k].sid) { |
|
||||
aa.push(this.role_list[k].name) |
|
||||
bb.push(this.role_list[k].sid) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
this.formobj.roleNames = aa |
|
||||
this.formobj.roleSids = bb |
|
||||
} |
|
||||
this.$refs['form_obj'].validate((valid) => { |
|
||||
if (valid) { |
|
||||
this.submitdisabled = true |
|
||||
save(this.formobj).then((resp) => { |
|
||||
if (resp.success) { |
|
||||
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|
||||
this.handleReturn('true') |
|
||||
} |
|
||||
}).catch(() => { |
|
||||
this.submitdisabled = false |
|
||||
}) |
|
||||
} else { |
|
||||
return false |
|
||||
} |
|
||||
}) |
|
||||
}, |
}, |
||||
// 返回(===既判断) |
}; |
||||
handleReturn(isreload) { |
|
||||
if (isreload === 'true') this.$emit('reloadlist') |
|
||||
// 表单数据 |
|
||||
this.formobj = { |
|
||||
sid: '', // 一条数据的sid |
|
||||
flowName: '', |
|
||||
flowKey: '', |
|
||||
roleNames: [], |
|
||||
roleSids: [] |
|
||||
} |
|
||||
this.recipientList = [] |
|
||||
this.submitdisabled = false |
|
||||
this.$refs['form_obj'].resetFields() |
|
||||
this.$emit('doback') |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
<style scoped> |
|
||||
.title { |
|
||||
padding: 7px; |
|
||||
display: flex; |
|
||||
flex-direction: row; |
|
||||
justify-content: space-between; |
|
||||
align-items: center; |
|
||||
} |
|
||||
</style> |
|
||||
|
|
||||
|
<style scoped="scoped" lang="scss"> |
||||
|
.my-tabs { |
||||
|
margin-top: 10px; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,157 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div> |
||||
|
<div class="tab-header webtop"> |
||||
|
<div>【查看】论坛信息</div> |
||||
|
<div> |
||||
|
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="listconadd"> |
||||
|
<el-form ref="dataForm" :model="form" label-position="top" label-width="190px" class="formadd"> |
||||
|
<div class="titwu">论坛信息</div> |
||||
|
<div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px"> |
||||
|
<div>主体信息</div> |
||||
|
</div> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">论坛类别</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="20"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span>{{form.type}}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">论坛标题</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="20"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span>{{form.title}}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">论坛内容</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="20"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span>{{form.content}}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px"> |
||||
|
<div>评论信息</div> |
||||
|
</div> |
||||
|
<el-table v-loading="listLoading" :data="temp" border style="width: 100%;" |
||||
|
:row-style="{height: '40px'}"> |
||||
|
<!-- <el-table-column type="selection" align="center" width="50"/> --> |
||||
|
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" /> |
||||
|
<el-table-column label="操作" wid align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<!-- <el-button type="primary" size="mini" @click="toPersonnelDetail(scope.row.sid)">查看</el-button> --> |
||||
|
<!-- <el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button> --> |
||||
|
<el-button :disabled='userSid != scope.row.createBySid' type="primary" size="mini" @click="doDel(scope.row)">删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="评论人员" prop="name" align="center" /> |
||||
|
<el-table-column label="评论时间" prop="createTime" align="center" /> |
||||
|
<el-table-column label="评论内容" prop="content" align="center" /> |
||||
|
</el-table> |
||||
|
|
||||
|
</el-form> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
selectSysForumCommentOne, |
||||
|
deleteSysForumComment, |
||||
|
} from "@/api/system/copyofprocess/liuchengchasongguanli.js"; |
||||
|
|
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
listLoading: false, |
||||
|
activeNames: ['1'], |
||||
|
form: {}, |
||||
|
temp: [] ,// 添加和修改 |
||||
|
userSid :window.sessionStorage.getItem('userSid') |
||||
|
}; |
||||
|
}, |
||||
|
mounted() { |
||||
|
console.log("ddddddddddddddd", this.userSid ) |
||||
|
}, |
||||
|
methods: { |
||||
|
// 序号 |
||||
|
indexMethod(index) { |
||||
|
// var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
||||
|
// var pageindex = index + 1 + pagestart |
||||
|
return index + 1 |
||||
|
}, |
||||
|
doDel(row) { |
||||
|
const tip = '请确认是否删除所选记录?' |
||||
|
this.$confirm(tip, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
deleteSysForumComment(row.sid).then((response) => { |
||||
|
if (response.success) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'success', |
||||
|
message: '删除成功' |
||||
|
}) |
||||
|
this.showAdd( this.form) |
||||
|
} else { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'error', |
||||
|
message: '删除失败' |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
showAdd(row) { |
||||
|
this.form = row |
||||
|
selectSysForumCommentOne(row.sid) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
console.log("ddddddddddddddd", resp) |
||||
|
this.temp = resp.data |
||||
|
} |
||||
|
|
||||
|
}) |
||||
|
.catch(e => { |
||||
|
this.$emit('doback') |
||||
|
}) |
||||
|
}, |
||||
|
// 组件返回 |
||||
|
handleReturn() { |
||||
|
this.$emit('doback') |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped="scoped" lang="scss"> |
||||
|
.my-tabs { |
||||
|
margin-top: 10px; |
||||
|
} |
||||
|
</style> |
||||
|
|
@ -1,354 +1,300 @@ |
|||||
<template> |
<template> |
||||
<div> |
<el-tabs |
||||
<el-tabs class="my-tabs" v-model="activeName" type="card" @tab-click="handleClick"> |
class="my-tabs" |
||||
<el-tab-pane label="功能列表" name="roleList"> |
v-model="activeName" |
||||
|
type="card" |
||||
|
@tab-click="handleClick" |
||||
|
> |
||||
|
<el-tab-pane label="成绩设置" name="roleList"> |
||||
|
<el-input |
||||
|
placeholder="请输入班级" |
||||
|
v-model="input" |
||||
|
clearable |
||||
|
style="width: 120px" |
||||
|
> |
||||
|
</el-input> |
||||
|
<el-select |
||||
|
v-model="id" |
||||
|
class="addinputw" |
||||
|
placeholder="请选择科目" |
||||
|
style="width: 150px; margin-left: 20px" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="(item, i) in formList" |
||||
|
:key="i" |
||||
|
:label="item.type" |
||||
|
:value="item.id" |
||||
|
/> |
||||
|
</el-select> |
||||
|
<el-button style="margin-left: 20px" type="primary" @click="toLook()" |
||||
|
>查询</el-button |
||||
|
> |
||||
<div class="container"> |
<div class="container"> |
||||
<!-- <div class="tab-header"> |
<el-table :data="tableData" border style="width: 100%"> |
||||
<el-form ref="form" :inline="true" :model="search" label-width="80px"> |
<el-table-column prop="name" label="教师姓名" align="center"> |
||||
<el-row :gutter="20"> |
</el-table-column> |
||||
<el-col :span="24"> |
<el-table-column prop="infoId" label="教师工号" align="center"> |
||||
<el-form-item label="功能名称"> |
</el-table-column> |
||||
<el-input v-model="search.name" clearable></el-input> |
<el-table-column label="查看" align="center" width="100px"> |
||||
</el-form-item> |
<template slot-scope="scope"> |
||||
<el-button @click="getList">查询</el-button> |
<el-button type="text" @click="lookstuder(scope.row)" |
||||
</el-col> |
>查看学生</el-button |
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div>--> |
|
||||
<!-- table --> |
|
||||
<el-table :data="roleTable" border style="width: 100%;" |
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }" |
|
||||
row-key="sid" |
|
||||
ref="multipleTable" |
|
||||
header-cell-class-name="table-header" |
|
||||
> |
> |
||||
<el-table-column prop="name" label="功能名称" width="200px" align="left"></el-table-column> |
</template> |
||||
<el-table-column label="操作" width="280px" align="center"> |
</el-table-column> |
||||
|
<el-table-column label="操作" align="center"> |
||||
<template slot-scope="scope"> |
<template slot-scope="scope"> |
||||
<el-button @click="addChildren(scope.row)" type="primary" size="mini"> 添加子功能</el-button> |
<el-button type="primary" size="mini" @click="editRow(scope.row)"> |
||||
<el-button @click="editRow(scope.row)" v-if="scope.row.isSource == '0'" type="primary" size="mini"> 修改 |
添加 |
||||
</el-button> |
|
||||
<el-button @click="delRow(scope.row)" v-if="scope.row.isSource == '0'" type="danger" size="mini"> 删除 |
|
||||
</el-button> |
</el-button> |
||||
</template> |
</template> |
||||
</el-table-column> |
</el-table-column> |
||||
<el-table-column prop="actionUrl" label="url地址" width="200" align="center"></el-table-column> |
</el-table> |
||||
<el-table-column prop="isEnable" label="是否可用" align="center"> |
|
||||
|
<pagination |
||||
|
:total="page.total" |
||||
|
:page.sync="page.current" |
||||
|
:limit.sync="page.size" |
||||
|
@pagination="pagination" |
||||
|
/> |
||||
|
<el-dialog title="学生" :visible.sync="lookstuders"> |
||||
|
<el-table |
||||
|
ref="multipleTable" |
||||
|
:data="gridData" |
||||
|
row-key="sid" |
||||
|
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }" |
||||
|
border |
||||
|
> |
||||
|
<el-table-column |
||||
|
property="studentName" |
||||
|
label="姓名" |
||||
|
width="200" |
||||
|
></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"> |
<template slot-scope="scope"> |
||||
<el-switch |
<el-button |
||||
v-model="scope.row.isEnable" |
type="danger" |
||||
active-value='1' |
size="mini" |
||||
inactive-value='0' |
@click.native.prevent="deleteRow(scope.row)" |
||||
active-color="#13ce66" |
> |
||||
inactive-color="#ff4949" |
删除 |
||||
@change="enabledChange($event,scope.row)"> |
</el-button> |
||||
</el-switch> |
|
||||
</template> |
</template> |
||||
</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> |
||||
|
<!-- 编辑角色信息 --> |
||||
<!-- 编辑功能信息 --> |
<el-dialog |
||||
<el-dialog :title="dialogTitle + '功能信息'" :visible.sync="editDialog" width="40%"> |
: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> |
||||
<el-input v-model="roleForm.parentName" :disabled="true" style="width:300px"></el-input> |
<el-input |
||||
|
v-model="teacher.teacherName" |
||||
|
style="width: 300px" |
||||
|
></el-input> |
||||
</td> |
</td> |
||||
</tr> |
</tr> |
||||
<tr> |
<tr> |
||||
<td>终端权限</td> |
<td>教师工号</td> |
||||
<td> |
|
||||
<el-radio-group v-model="roleForm.phoneFunction"> |
|
||||
<el-radio label="0">pc端</el-radio> |
|
||||
<el-radio label="1">移动端</el-radio> |
|
||||
</el-radio-group> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr v-show="roleForm.phoneFunction == '0'"> |
|
||||
<td>pc端功能ID</td> |
|
||||
<td> |
|
||||
<el-input clearable style="width:300px" v-model="roleForm.cId"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr v-show="roleForm.phoneFunction == '1'"> |
|
||||
<td>移动端功能ID</td> |
|
||||
<td> |
<td> |
||||
<el-input clearable style="width:300px" v-model="roleForm.funId"></el-input> |
<el-input |
||||
|
v-model="teacher.teacherNo" |
||||
|
style="width: 300px" |
||||
|
></el-input> |
||||
</td> |
</td> |
||||
</tr> |
</tr> |
||||
<tr> |
<tr> |
||||
<td>模块名称</td> |
<td>学生姓名</td> |
||||
<td> |
<td> |
||||
<el-select v-model="roleForm.sourceSid" style="width:300px" @change="changeSource"> |
<el-select v-model="teacher.studentName" placeholder="请选择"> |
||||
<el-option v-for="item in sourceNameData" :key="item.sid" :label="item.sourceName" :value="item.sid"></el-option> |
<el-option |
||||
|
v-for="item in options" |
||||
|
:key="item.value" |
||||
|
:label="item.name" |
||||
|
:value="item.name" |
||||
|
> |
||||
|
</el-option> |
||||
</el-select> |
</el-select> |
||||
</td> |
</td> |
||||
</tr> |
</tr> |
||||
<tr> |
<tr> |
||||
<td>url地址</td> |
<td>学生学号</td> |
||||
<td> |
<td> |
||||
<el-select v-model="roleForm.actionUrl" filterable style="width:300px"> |
<el-select v-model="teacher.studentNo" placeholder="请选择"> |
||||
<el-option v-for="item in actionUrl_list" :key="item.sid" :label="item.name" :value="item.url"></el-option> |
<el-option |
||||
|
v-for="item in options" |
||||
|
:key="item.value" |
||||
|
:label="item.infoId" |
||||
|
:value="item.infoId" |
||||
|
> |
||||
|
</el-option> |
||||
</el-select> |
</el-select> |
||||
</td> |
</td> |
||||
</tr> |
</tr> |
||||
<tr> |
|
||||
<td>功能名称</td> |
|
||||
<td> |
|
||||
<el-input v-model="roleForm.name" 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> |
</table> |
||||
<div style="margin-top: 20px; text-align: center;"> |
<div style="margin-top: 20px; text-align: center"> |
||||
<el-button type="primary" @click="save()">保 存</el-button> |
<el-button type="primary" @click="save()">保存</el-button> |
||||
<el-button @click="editDialog = false">关 闭</el-button> |
<!--<el-button @click="editDialog = false">关闭</el-button>--> |
||||
</div> |
</div> |
||||
</el-dialog> |
</el-dialog> |
||||
</div> |
</div> |
||||
</el-tab-pane> |
</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.parentName" :disabled="true" style="width:300px"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>终端权限</td> |
|
||||
<td> |
|
||||
<el-radio-group v-model="roleForm.phoneFunction"> |
|
||||
<el-radio label="0">pc端</el-radio> |
|
||||
<el-radio label="1">移动端</el-radio> |
|
||||
</el-radio-group> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr v-show="roleForm.phoneFunction == '0'"> |
|
||||
<td>pc端功能ID</td> |
|
||||
<td> |
|
||||
<el-input clearable style="width:300px" v-model="roleForm.cId"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr v-show="roleForm.phoneFunction == '1'"> |
|
||||
<td>移动端功能ID</td> |
|
||||
<td> |
|
||||
<el-input clearable style="width:300px" v-model="roleForm.funId"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>模块名称</td> |
|
||||
<td> |
|
||||
<el-select v-model="roleForm.sourceSid" style="width:300px" @change="changeSource"> |
|
||||
<el-option v-for="item in sourceNameData" :key="item.sid" :label="item.sourceName" :value="item.sid"></el-option> |
|
||||
</el-select> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>url地址</td> |
|
||||
<td> |
|
||||
<el-select v-model="roleForm.actionUrl" filterable style="width:300px"> |
|
||||
<el-option v-for="item in actionUrl_list" :key="item.sid" :label="item.name" :value="item.url"></el-option> |
|
||||
</el-select> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>功能名称</td> |
|
||||
<td> |
|
||||
<el-input v-model="roleForm.name" 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> |
</el-tabs> |
||||
</div> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import { pageList, savePost, sourceList, delOrgroles, getSingleData, putOrgroles, IsEnable, getMenusForFunction } from '@/api/system/functional/functional.js' |
import { |
||||
|
pageList, |
||||
|
saveSysInfoShip, |
||||
|
selectTeacherDownStudent, |
||||
|
deleteSysInfoShip, |
||||
|
} from "@/api/system/sources/index.js"; |
||||
|
import { selectScoreKM } from "@/api/system/userAdminister/index.js"; |
||||
export default { |
export default { |
||||
data() { |
data() { |
||||
return { |
return { |
||||
dialogTitle: '', |
activeName: "roleList", |
||||
activeName: 'roleList', |
dialogTitle: "", |
||||
roleForm: { |
editDialog: false, |
||||
sid: '', |
lookstuders: false, |
||||
parentName: '顶级菜单', |
form: {}, |
||||
parentSid: '0', |
id:'', |
||||
name: '', |
formList:{}, |
||||
actionUrl: '', |
gridData: [], |
||||
sourceSid: '', |
teacher: { |
||||
phoneFunction: '', |
teacherName: "", |
||||
remarks: '', |
teacherNo: "", |
||||
cId: '', |
|
||||
funId: '' |
|
||||
}, |
}, |
||||
// 模块名称 |
formBackup: Object.assign({}, this.form), |
||||
sourceNameData: [], |
page: { |
||||
actionUrl_list: [], |
total: 0, // 默认数据总数 |
||||
formBackup: {}, |
current: 1, // 默认开始页面 |
||||
search: { |
size: 10, // 每页的数据条数 |
||||
name: '' |
type: "js", |
||||
}, |
}, |
||||
roleTable: [], |
pageStu: { |
||||
editDialog: false, |
total: 0, // 默认数据总数 |
||||
// 树形 |
current: 1, // 默认开始页面 |
||||
loading: false |
size: 10, // 每页的数据条数 |
||||
} |
type: "xs", |
||||
|
}, |
||||
|
tableData: [], |
||||
|
zylb: [], |
||||
|
sourceList: [], |
||||
|
options: {}, |
||||
|
value: "", |
||||
|
}; |
||||
}, |
}, |
||||
mounted() { |
mounted() { |
||||
this.formBackup = Object.assign({}, this.roleForm) |
this.getPageList(this.page); |
||||
this.getList() |
this.getstuder(); |
||||
this.getsourceList() |
selectScoreKM().then((res) => { |
||||
|
this.formList=res.data |
||||
|
}); |
||||
}, |
}, |
||||
methods: { |
methods: { |
||||
// 分页列表 |
lookstuder(row) { |
||||
getList() { |
this.lookstuders = true; |
||||
pageList({ name: this.search.name }).then((res) => { |
selectTeacherDownStudent({ infoId: row.infoId }).then((res) => { |
||||
if (res.success) { |
console.log(res.data); |
||||
this.roleTable = res.data |
this.gridData = res.data; |
||||
} |
}); |
||||
console.log(res.data) |
|
||||
}) |
|
||||
}, |
}, |
||||
// 模块名称 |
pagination(val) { |
||||
getsourceList() { |
// 分页 |
||||
sourceList({}).then((res) => { |
this.page.current = val.pageNum; |
||||
if (res.success) { |
this.page.size = val.pageSize; |
||||
this.sourceNameData = res.data |
this.getPageList(this.page); |
||||
this.loading = false |
|
||||
} |
|
||||
}) |
|
||||
}, |
}, |
||||
handleClick(tab, event) { |
resetSearch() { |
||||
if (tab.name == 'addrole') { |
// 重置 |
||||
this.dialogTitle = '新增' |
this.page = { |
||||
this.roleForm = Object.assign({}, this.formBackup) |
total: 0, // 默认数据总数 |
||||
} else { |
current: 1, // 默认开始页面 |
||||
this.getList() |
size: 10, // 每页的数据条数 |
||||
} |
params: { |
||||
|
name: "", |
||||
|
psid: "", |
||||
|
sourceId: "", |
||||
|
sourceName: "", |
||||
}, |
}, |
||||
editRow(row) { |
}; |
||||
this.dialogTitle = '编辑' |
this.getPageList(); |
||||
this.editDialog = true |
}, |
||||
this.roleForm = Object.assign({}, row) |
getstuder() { |
||||
console.log(this.roleForm) |
pageList(this.pageStu).then((res) => { |
||||
getSingleData({ id: row.sid }).then((res) => { |
this.options = res.data.records; |
||||
if (res.success) { |
}); |
||||
this.roleForm = res.data |
|
||||
} |
|
||||
}) |
|
||||
getMenusForFunction({ sourceSid: this.roleForm.sourceSid }).then((resp) => { |
|
||||
if (resp.success) { |
|
||||
this.actionUrl_list = resp.data |
|
||||
} |
|
||||
}) |
|
||||
}, |
}, |
||||
addChildren(row) { |
getPageList(data) { |
||||
this.refersh() |
// 获取列表 |
||||
this.activeName = 'addrole' |
pageList(data).then((res) => { |
||||
this.roleForm.parentName = row.name |
console.log(res); |
||||
this.roleForm.parentSid = row.sid |
this.tableData = res.data.records; |
||||
if (row.isSource == '1') { |
this.page.total = res.data.total; |
||||
this.roleForm.parentName = '顶级菜单' |
}); |
||||
this.roleForm.parentSid = 0 |
}, |
||||
|
handleClick(tab, event) { |
||||
|
if (tab.name == "addrole") { |
||||
|
this.dialogTitle = "新增"; |
||||
|
this.roleForm = Object.assign({}, this.formBackup); |
||||
} else { |
} else { |
||||
this.roleForm.parentName = row.name |
this.getPageList(); |
||||
this.roleForm.parentSid = row.sid |
|
||||
} |
} |
||||
}, |
}, |
||||
delRow(row) { |
reset() { |
||||
this.$confirm('确定要删除该功能吗, 是否继续?', '提示', { |
this.form = {}; |
||||
confirmButtonText: '确定', |
|
||||
cancelButtonText: '取消', |
|
||||
type: 'warning' |
|
||||
}).then(() => { |
|
||||
delOrgroles({ sid: row.sid }).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.getList() |
|
||||
this.$message({ showClose: true, type: 'success', message: '删除成功!' }) |
|
||||
} |
|
||||
}) |
|
||||
}) |
|
||||
}, |
}, |
||||
changeSource(value) { |
editRow(row) { |
||||
const choose = this.sourceNameData.filter((item) => item.sid === value) |
this.dialogTitle = "添加"; |
||||
getMenusForFunction({ sourceSid: choose[0].sid }).then((res) => { |
this.editDialog = true; |
||||
if (res.success) { |
this.teacher.teacherName = row.name; |
||||
this.actionUrl_list = res.data |
this.teacher.teacherNo = row.infoId; |
||||
} |
this.form = Object.assign({}, row); |
||||
}) |
|
||||
}, |
}, |
||||
// 保存角色 |
|
||||
save() { |
save() { |
||||
if (this.roleForm.sid) { |
saveSysInfoShip(this.teacher).then((res) => { |
||||
putOrgroles(this.roleForm).then((res) => { |
if (res.code == 200) { |
||||
if (res.success) { |
this.$message({ |
||||
this.getList() |
type: "success", |
||||
this.editDialog = false |
message: "添加成功!", |
||||
this.$message({ showClose: true, message: res.msg, type: 'success' }) |
}); |
||||
} |
|
||||
}) |
|
||||
} else { |
|
||||
savePost(this.roleForm).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.getList() |
|
||||
this.activeName = 'roleList' |
|
||||
this.$message({ showClose: true, message: res.msg, type: 'success' }) |
|
||||
} |
|
||||
}) |
|
||||
} |
} |
||||
|
}); |
||||
|
this.editDialog = false; |
||||
}, |
}, |
||||
refersh() { |
deleteRow(row) { |
||||
this.roleForm = { |
this.$confirm("确定要删除该资源吗, 是否继续?", "提示", { |
||||
parentName: '顶级菜单', |
confirmButtonText: "确定", |
||||
parentSid: '0', |
cancelButtonText: "取消", |
||||
name: '', |
type: "warning", |
||||
actionUrl: '', |
}).then(() => { |
||||
sourceSid: '', |
deleteSysInfoShip({ sid: row.sid }).then((res) => { |
||||
phoneFunction: '', |
this.$message({ |
||||
remarks: '', |
type: "success", |
||||
cId: '', |
message: "删除成功!", |
||||
funId: '' |
}); |
||||
} |
this.lookstuders = false; |
||||
|
}); |
||||
|
}); |
||||
}, |
}, |
||||
// 是否可用 按钮 |
}, |
||||
enabledChange(value, row) { |
}; |
||||
IsEnable({ sid: row.sid, isEnable: row.isEnable }).then(res => { |
|
||||
this.$message({ showClose: true, type: 'success', message: res.msg }) |
|
||||
}) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style scoped> |
<style scoped="scoped" lang="scss"> |
||||
.el-select > .el-input { |
|
||||
display: block; |
|
||||
width: 300px; |
|
||||
} |
|
||||
|
|
||||
.my-tabs { |
.my-tabs { |
||||
margin-top: 10px; |
margin-top: 10px; |
||||
} |
} |
||||
</style> |
</style> |
||||
|
|
@ -1,212 +1,308 @@ |
|||||
<template> |
<template> |
||||
|
<el-tabs |
||||
|
class="my-tabs" |
||||
|
v-model="activeName" |
||||
|
type="card" |
||||
|
@tab-click="handleClick" |
||||
|
> |
||||
|
<el-tab-pane label="统计信息管理" name="roleList"> |
||||
|
<el-input |
||||
|
placeholder="请输入班级" |
||||
|
v-model="calss" |
||||
|
clearable |
||||
|
style="width: 120px" |
||||
|
> |
||||
|
</el-input> |
||||
|
<el-select |
||||
|
v-model="name" |
||||
|
class="addinputw" |
||||
|
placeholder="请选择科目" |
||||
|
style="width: 150px; margin-left: 20px" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="(item, i) in formList" |
||||
|
:key="i" |
||||
|
:label="item.type" |
||||
|
:value="item.id" |
||||
|
/> |
||||
|
</el-select> |
||||
|
<el-button style="margin-left: 20px" type="primary" @click="toLook()" |
||||
|
>查询</el-button |
||||
|
> |
||||
<div class="container"> |
<div class="container"> |
||||
<div class="tab-header"> |
<el-table :data="tableData" border style="width: 100%"> |
||||
<el-form :inline="true" :model="form" class="demo-form-inline"> |
<el-table-column prop="name" label="教师姓名" align="center"> |
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="16"> |
|
||||
<el-form-item label="日志类别"> |
|
||||
<el-input v-model="page.params.eventName" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<el-form-item style="float: right;"> |
|
||||
<el-button type="primary" @click="getPageList(page)">查询</el-button> |
|
||||
<el-button type="primary" @click="exportExcel" >导出日志</el-button> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
|
|
||||
<el-table :data="tableData" border style="width: 100%;"> |
|
||||
<el-table-column label="序号" type="index" align="center" width="70px"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="eventName" label="日志类别" align="center"> |
|
||||
</el-table-column> |
</el-table-column> |
||||
<el-table-column prop="eventContent" label="日志内容" align="center"> |
<el-table-column prop="infoId" label="教师工号" align="center"> |
||||
</el-table-column> |
</el-table-column> |
||||
<el-table-column prop="userName" label="用户名" align="center"> |
<el-table-column label="查看" align="center" width="100px"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="text" @click="lookstuder(scope.row)" |
||||
|
>查看学生</el-button |
||||
|
> |
||||
|
</template> |
||||
</el-table-column> |
</el-table-column> |
||||
<el-table-column prop="userIp" label="IP地址" align="center"> |
<el-table-column label="操作" 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> |
||||
<el-table-column prop="timestamp" label="记录时间" align="center"> |
</el-table> |
||||
|
|
||||
|
<pagination |
||||
|
:total="page.total" |
||||
|
:page.sync="page.current" |
||||
|
:limit.sync="page.size" |
||||
|
@pagination="pagination" |
||||
|
/> |
||||
|
<el-dialog title="学生" :visible.sync="lookstuders"> |
||||
|
<el-table |
||||
|
ref="multipleTable" |
||||
|
:data="gridData" |
||||
|
row-key="sid" |
||||
|
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }" |
||||
|
border |
||||
|
> |
||||
|
<el-table-column |
||||
|
property="studentName" |
||||
|
label="姓名" |
||||
|
width="200" |
||||
|
></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-column> |
||||
</el-table> |
</el-table> |
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> |
</el-dialog> |
||||
|
<!-- 编辑角色信息 --> |
||||
|
<el-dialog |
||||
|
:title="dialogTitle + '学生'" |
||||
|
:visible.sync="editDialog" |
||||
|
width="40%" |
||||
|
> |
||||
|
<table class="e-table" cellspacing="0"> |
||||
|
<tr> |
||||
|
<td>教师姓名</td> |
||||
|
<td> |
||||
|
<el-input |
||||
|
v-model="teacher.teacherName" |
||||
|
style="width: 300px" |
||||
|
></el-input> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>教师工号</td> |
||||
|
<td> |
||||
|
<el-input |
||||
|
v-model="teacher.teacherNo" |
||||
|
style="width: 300px" |
||||
|
></el-input> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>学生姓名</td> |
||||
|
<td> |
||||
|
<el-select v-model="teacher.studentName" placeholder="请选择"> |
||||
|
<el-option |
||||
|
v-for="item in options" |
||||
|
:key="item.value" |
||||
|
:label="item.name" |
||||
|
:value="item.name" |
||||
|
> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>学生学号</td> |
||||
|
<td> |
||||
|
<el-select v-model="teacher.studentNo" placeholder="请选择"> |
||||
|
<el-option |
||||
|
v-for="item in options" |
||||
|
:key="item.value" |
||||
|
:label="item.infoId" |
||||
|
:value="item.infoId" |
||||
|
> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</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> |
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</el-tab-pane> |
||||
|
</el-tabs> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import { logPageList } from '@/api/system/log/index.js' |
import { |
||||
import axios from 'axios' |
pageList, |
||||
import { getStorage } from '@/utils/auth' |
saveSysInfoShip, |
||||
export default { |
selectTeacherDownStudent, |
||||
|
deleteSysInfoShip, |
||||
|
} from "@/api/system/sources/index.js"; |
||||
|
import { selectScoreKM,selectClass,selectStudentScoreYIELD } from "@/api/system/userAdminister/index.js"; |
||||
|
export default { |
||||
data() { |
data() { |
||||
return { |
return { |
||||
radio: '1', |
activeName: "roleList", |
||||
dialogVisible: false, |
dialogTitle: "", |
||||
disabled: false, |
editDialog: false, |
||||
|
lookstuders: false, |
||||
form: {}, |
form: {}, |
||||
|
name:'', |
||||
|
formList:{}, |
||||
|
gridData: [], |
||||
|
teacher: { |
||||
|
teacherName: "", |
||||
|
teacherNo: "", |
||||
|
}, |
||||
|
formBackup: Object.assign({}, this.form), |
||||
page: { |
page: { |
||||
total: 0, // 默认数据总数 |
total: 0, // 默认数据总数 |
||||
current: 1, // 默认开始页面 |
current: 1, // 默认开始页面 |
||||
size: 10, // 每页的数据条数 |
size: 10, // 每页的数据条数 |
||||
params: { |
type: "js", |
||||
eventName: '' |
|
||||
} |
|
||||
}, |
}, |
||||
tableData: [] |
pageStu: { |
||||
} |
total: 0, // 默认数据总数 |
||||
|
current: 1, // 默认开始页面 |
||||
|
size: 10, // 每页的数据条数 |
||||
|
type: "xs", |
||||
|
}, |
||||
|
tableData: [], |
||||
|
zylb: [], |
||||
|
sourceList: [], |
||||
|
options: {}, |
||||
|
value: "", |
||||
|
calss:'8班' |
||||
|
}; |
||||
}, |
}, |
||||
mounted() { |
mounted() { |
||||
this.getPageList(this.page) |
this.getPageList(this.page); |
||||
|
this.getstuder(); |
||||
|
selectScoreKM().then((res) => { |
||||
|
this.formList=res.data |
||||
|
}); |
||||
|
selectClass().then((res) => { |
||||
|
// this.formList=res.data |
||||
|
console.log(res); |
||||
|
}); |
||||
|
selectStudentScoreYIELD(this.name,this.calss).then((res)=>{ |
||||
|
console.log(res); |
||||
|
}) |
||||
}, |
}, |
||||
methods: { |
methods: { |
||||
pagination(val) { // 分页 |
lookstuder(row) { |
||||
this.page.current = val.pageNum |
this.lookstuders = true; |
||||
this.page.size = val.pageSize |
selectTeacherDownStudent({ infoId: row.infoId }).then((res) => { |
||||
this.getPageList(this.page) |
console.log(res.data); |
||||
|
this.gridData = res.data; |
||||
|
}); |
||||
}, |
}, |
||||
onSearch() { //查询 |
pagination(val) { |
||||
this.getPageList(this.page) |
// 分页 |
||||
|
this.page.current = val.pageNum; |
||||
|
this.page.size = val.pageSize; |
||||
|
this.getPageList(this.page); |
||||
}, |
}, |
||||
resetSearch(){ // 重置 |
resetSearch() { |
||||
this.page = this.pageBackup |
// 重置 |
||||
|
this.page = { |
||||
|
total: 0, // 默认数据总数 |
||||
|
current: 1, // 默认开始页面 |
||||
|
size: 10, // 每页的数据条数 |
||||
|
params: { |
||||
|
name: "", |
||||
|
psid: "", |
||||
|
sourceId: "", |
||||
|
sourceName: "", |
||||
}, |
}, |
||||
getPageList(data){ // 获取列表 |
}; |
||||
logPageList(data).then((res)=>{ |
this.getPageList(); |
||||
this.tableData = res.data.records |
}, |
||||
this.page.total = res.data.total |
getstuder() { |
||||
}) |
pageList(this.pageStu).then((res) => { |
||||
|
this.options = res.data.records; |
||||
|
}); |
||||
}, |
}, |
||||
exportExcel(){ // 导出文件 |
getPageList(data) { |
||||
axios({ |
// 获取列表 |
||||
method: 'get', |
pageList(data).then((res) => { |
||||
url: 'api/system/v1/systemlogs/exportLogExcel', |
console.log(res); |
||||
params: this.page, |
this.tableData = res.data.records; |
||||
responseType: 'blob', |
this.page.total = res.data.total; |
||||
headers:{'token': getStorage()} |
}); |
||||
}).then(response => { |
}, |
||||
let blob = new Blob([response.data], {type:"application/vnd.ms-excel"}); |
handleClick(tab, event) { |
||||
if (!!window.ActiveXObject || "ActiveXObject" in window) { |
if (tab.name == "addrole") { |
||||
window.navigator.msSaveOrOpenBlob(blob, '日志'); |
this.dialogTitle = "新增"; |
||||
|
this.roleForm = Object.assign({}, this.formBackup); |
||||
} else { |
} else { |
||||
let link = document.createElement('a'); |
this.getPageList(); |
||||
link.href = window.URL.createObjectURL(blob); |
|
||||
link.download = "日志"; |
|
||||
link.click(); |
|
||||
} |
|
||||
}).catch((error) => { |
|
||||
|
|
||||
}) |
|
||||
} |
} |
||||
}, |
}, |
||||
|
reset() { |
||||
|
this.form = {}; |
||||
|
}, |
||||
|
editRow(row) { |
||||
|
this.dialogTitle = "添加"; |
||||
|
this.editDialog = true; |
||||
|
this.teacher.teacherName = row.name; |
||||
|
this.teacher.teacherNo = row.infoId; |
||||
|
this.form = Object.assign({}, row); |
||||
|
}, |
||||
|
save() { |
||||
|
saveSysInfoShip(this.teacher).then((res) => { |
||||
|
if (res.code == 200) { |
||||
|
this.$message({ |
||||
|
type: "success", |
||||
|
message: "添加成功!", |
||||
|
}); |
||||
} |
} |
||||
|
}); |
||||
|
this.editDialog = false; |
||||
|
}, |
||||
|
deleteRow(row) { |
||||
|
this.$confirm("确定要删除该资源吗, 是否继续?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}).then(() => { |
||||
|
deleteSysInfoShip({ sid: row.sid }).then((res) => { |
||||
|
this.$message({ |
||||
|
type: "success", |
||||
|
message: "删除成功!", |
||||
|
}); |
||||
|
this.lookstuders = false; |
||||
|
}); |
||||
|
}); |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
</script> |
</script> |
||||
|
|
||||
<style scoped="scoped" lang="scss"> |
<style scoped="scoped" lang="scss"> |
||||
.zcxx { |
.my-tabs { |
||||
color: #000; |
margin-top: 10px; |
||||
width: 98%; |
} |
||||
margin: 0px auto 30px; |
|
||||
background-color: #f7f9fc; |
|
||||
border: 1px solid #e6e9f0; |
|
||||
height: 60px; |
|
||||
line-height: 60px; |
|
||||
|
|
||||
p { |
|
||||
font-size: 18px; |
|
||||
float: left; |
|
||||
margin-top: 0px; |
|
||||
margin-left: 10px; |
|
||||
font-weight: bold; |
|
||||
width: 300px; |
|
||||
} |
|
||||
|
|
||||
.el-button { |
|
||||
float: right; |
|
||||
margin-top: 13px; |
|
||||
border: none; |
|
||||
width: 80px; |
|
||||
padding: 0; |
|
||||
text-align: center; |
|
||||
padding-top: 10px; |
|
||||
padding-bottom: 10px; |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
|
|
||||
table { |
|
||||
width: 98%; |
|
||||
margin: 0 auto; |
|
||||
|
|
||||
tr { |
|
||||
height: 45px; |
|
||||
vertical-align: top; |
|
||||
} |
|
||||
|
|
||||
td:first-child { |
|
||||
text-align: right; |
|
||||
width: 20%; |
|
||||
} |
|
||||
|
|
||||
td:nth-child(2) { |
|
||||
padding-left: 30px; |
|
||||
width: 23%; |
|
||||
} |
|
||||
|
|
||||
td:nth-child(3) { |
|
||||
text-align: right; |
|
||||
width: 20%; |
|
||||
} |
|
||||
|
|
||||
td:nth-child(4) { |
|
||||
padding-left: 30px; |
|
||||
|
|
||||
} |
|
||||
|
|
||||
span { |
|
||||
font-size: 14px; |
|
||||
color: #015bff; |
|
||||
margin-left: 20px; |
|
||||
} |
|
||||
|
|
||||
.sfz { |
|
||||
border: 1px solid #e6e9f0; |
|
||||
width: 45%; |
|
||||
|
|
||||
} |
|
||||
|
|
||||
#bei { |
|
||||
width: 21.4%; |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
|
|
||||
.avatar-uploader .el-upload { |
|
||||
border: 1px dashed #d9d9d9; |
|
||||
border-radius: 6px; |
|
||||
cursor: pointer; |
|
||||
position: relative; |
|
||||
overflow: hidden; |
|
||||
} |
|
||||
|
|
||||
.avatar-uploader .el-upload:hover { |
|
||||
border-color: #409EFF; |
|
||||
} |
|
||||
|
|
||||
.avatar-uploader-icon { |
|
||||
font-size: 28px; |
|
||||
color: #8c939d; |
|
||||
width: 148px; |
|
||||
height: 148px; |
|
||||
line-height: 148px; |
|
||||
text-align: center; |
|
||||
} |
|
||||
|
|
||||
.avatar { |
|
||||
width: 148px; |
|
||||
height: 148px; |
|
||||
display: block; |
|
||||
} |
|
||||
</style> |
</style> |
||||
|
|
Loading…
Reference in new issue