
19 changed files with 1116 additions and 931 deletions
@ -1,139 +1,59 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export default { |
|||
|
|||
// 分页列表
|
|||
pagerList: function (params) { |
|||
return request({ |
|||
url: '/portal/v1/regions/pagerList', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 新增保存
|
|||
save: function (regionDto) { |
|||
return request({ |
|||
url: '/portal/v1/regions/save', |
|||
method: 'post', |
|||
data: regionDto, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// // 根据省sid获取该省的所有市
|
|||
// getCity: function (sid) {
|
|||
// return request({
|
|||
// url: '/portal/v1/regions/getCity',
|
|||
// method: 'get',
|
|||
// params: {
|
|||
// sid
|
|||
// }
|
|||
// })
|
|||
// },
|
|||
//
|
|||
// // 根据市sid获取该省的所有县区
|
|||
// getCounty: function (sid) {
|
|||
// return request({
|
|||
// url: '/portal/v1/regions/getCounty',
|
|||
// method: 'get',
|
|||
// params: {
|
|||
// sid
|
|||
// }
|
|||
// })
|
|||
// },
|
|||
|
|||
// 删除
|
|||
delete: function (sid) { |
|||
return request({ |
|||
url: '/portal/v1/regions/delete/' + sid, |
|||
method: 'delete', |
|||
data: sid |
|||
}) |
|||
}, |
|||
|
|||
//点击修改回显数据
|
|||
updateEcho: function (sid) { |
|||
return request({ |
|||
url: '/portal/v1/regions/getOne/' + sid, |
|||
method: 'post', |
|||
params: { |
|||
sid |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 区域修改保存
|
|||
// system/region/update/{sid}
|
|||
update: function (params, sid) { |
|||
return request({ |
|||
url: '/portal/v1/regions/update/' + sid, |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
|
|||
// 自主学姐计划
|
|||
|
|||
// 分页列表
|
|||
selectSysPlanXs: function (data) { |
|||
return request({ |
|||
url: `v1/sysPlan/selectSysPlanXs/${data.userName}`, |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
// 新增保存
|
|||
saveSysPlan: function (data) { |
|||
return request({ |
|||
url: 'v1/sysPlanSchedule/saveSysPlanSchedule', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
selectSysPlanComment: function (sid) { |
|||
return request({ |
|||
url: 'v1/sysPlan/selectSysPlanComment/' + sid, |
|||
method: 'post' |
|||
}) |
|||
}, |
|||
|
|||
// 删除
|
|||
deleteSysPlan: function (sid) { |
|||
return request({ |
|||
url: '/v1/sysPlan/deleteSysPlan/' + sid, |
|||
method: 'delete' |
|||
}) |
|||
}, |
|||
|
|||
//点击修改回显数据
|
|||
alterSysPlant: function (data) { |
|||
return request({ |
|||
url: '/v1/sysPlan/alterSysPlan', |
|||
method: 'POST', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
|
|||
|
|||
|
|||
// 分页列表
|
|||
export function selectSysPlanXs(data) { |
|||
return request({ |
|||
url: `v1/sysPlan/selectSysPlanXs/${data.userName}`, |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
export function saveSysPlan(data) { |
|||
return request({ |
|||
url: 'v1/sysPlanSchedule/saveSysPlanSchedule', |
|||
method: 'POST', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
// 新增保存
|
|||
export function selectSysPlanComment(sid) { |
|||
return request({ |
|||
url: 'v1/sysPlan/selectSysPlanComment/' + sid, |
|||
method: 'post' |
|||
}) |
|||
} |
|||
// 删除
|
|||
export function deleteSysPlan(sid) { |
|||
return request({ |
|||
url: '/v1/sysPlan/deleteSysPlan/' + sid, |
|||
method: 'delete' |
|||
}) |
|||
} |
|||
//点击修改回显数据
|
|||
export function alterSysPlant(data) { |
|||
return request({ |
|||
url: '/v1/sysPlan/alterSysPlan', |
|||
method: 'POST', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
export function selectSysPlan(data) { |
|||
return request({ |
|||
url: 'v1/sysPlan/selectSysPlan', |
|||
method: 'POST', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
@ -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> |
|||
<div class="app-container"> |
|||
<div> |
|||
<!--标题按钮部分开始--> |
|||
<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> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd"> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span><span class="icon">*</span>流程名称</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item prop="flowName"> |
|||
<el-select v-model="formobj.flowName" placeholder="请选择" @change="changeFlow" filterable> |
|||
<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> |
|||
<div v-show="viewState ==1"> |
|||
<el-tabs class="my-tabs" v-model="activeName" type="card" @tab-click="handleClick"> |
|||
<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> |
|||
<el-button type="danger" size="mini" @click.native.prevent="detail(scope.row)"> |
|||
查看 |
|||
</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> |
|||
</el-tab-pane> |
|||
|
|||
<el-tab-pane label="论坛发布" name="addrole"> |
|||
<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> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<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> |
|||
</el-dialog> |
|||
</el-tabs> |
|||
</div> |
|||
<organizationManageInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { fetchSid, save, roleList } from '@/api/system/liuchengchaosong/liuchengchaosong' |
|||
import { selectFlowList } from '@/api/system/postManage/index' |
|||
|
|||
export default { |
|||
name: 'LiuChengChaoSongAdd', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
role_list: [], |
|||
flow_list: [], |
|||
recipientList: [], |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', // 一条数据的sid |
|||
flowName: '', |
|||
flowKey: '', |
|||
roleNames: [], |
|||
roleSids: [] |
|||
}, |
|||
rules: { |
|||
flowName: [{ required: true, message: '流程名称不能为空', trigger: 'change' }] |
|||
}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
methods: { |
|||
init() { |
|||
roleList({}).then((res) => { |
|||
if (res.success) { |
|||
this.role_list = res.data |
|||
} |
|||
}) |
|||
selectFlowList().then((res) => { |
|||
if (res.success) { |
|||
this.flow_list = res.data |
|||
} |
|||
}) |
|||
import { |
|||
selectSysForum, |
|||
saveSysForum, |
|||
alterSysForum, |
|||
deleteSysForum, |
|||
saveSysForumComment, |
|||
} from "@/api/system/copyofprocess/liuchengchasongguanli.js"; |
|||
import organizationManageInfo from './organizationManageInfo.vue' |
|||
export default { |
|||
components: { |
|||
organizationManageInfo, |
|||
}, |
|||
showAdd() { |
|||
this.init() |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '【新增】流程抄送' |
|||
}, |
|||
showEdit(row) { |
|||
this.init() |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
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 |
|||
}) |
|||
data() { |
|||
return { |
|||
viewState: 1, |
|||
activeName: "roleList", |
|||
dialogTitle: "", |
|||
editDialog: false, |
|||
form: {}, |
|||
formBackup: Object.assign({}, this.form), |
|||
tableData: [], |
|||
commentContent: "", // 评论内容 |
|||
typeList: [{ |
|||
dictKey: "1", |
|||
dictValue: "JAVA", |
|||
}, { |
|||
dictKey: "2", |
|||
dictValue: "Python", |
|||
}, { |
|||
dictKey: "3", |
|||
dictValue: "C++", |
|||
}, { |
|||
dictKey: "4", |
|||
dictValue: "Excel", |
|||
}, { |
|||
dictKey: "5", |
|||
dictValue: "英语四六级考试", |
|||
}, { |
|||
dictKey: "6", |
|||
dictValue: "计算机等级考试", |
|||
} |
|||
|
|||
] |
|||
}; |
|||
}, |
|||
changeFlow(value) { |
|||
const choose = this.flow_list.filter((item) => item.name === value) |
|||
this.formobj.flowKey = choose[0].key |
|||
mounted() { |
|||
this.getPageList(); |
|||
console.log("sssssssssss", window.sessionStorage.getItem('userSid')) |
|||
}, |
|||
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 |
|||
}) |
|||
methods: { |
|||
getType(value) { |
|||
console.log(">>>>>>>>>getType", value) |
|||
const choose = this.typeList.filter((item) => item.dictKey === value) |
|||
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 { |
|||
return false |
|||
this.getPageList(); |
|||
} |
|||
}) |
|||
}, |
|||
save() { |
|||
console.log("form", this.form) |
|||
|
|||
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", |
|||
}); |
|||
}); |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
editRow(row) { |
|||
this.dialogTitle = "评论"; |
|||
this.editDialog = true; |
|||
this.form = Object.assign({}, row); |
|||
}, |
|||
detail(row) { |
|||
this.viewState = 4 |
|||
this.$refs['divInfo'].showAdd(row) |
|||
|
|||
}, |
|||
}, |
|||
// 返回(===既判断) |
|||
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> |
|||
<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> |
|||
<div> |
|||
<el-tabs class="my-tabs" v-model="activeName" type="card" @tab-click="handleClick"> |
|||
<el-tab-pane label="功能列表" name="roleList"> |
|||
<el-tabs |
|||
class="my-tabs" |
|||
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"> |
|||
<el-table :data="tableData" border style="width: 100%"> |
|||
<el-table-column prop="name" label="教师姓名" align="center"> |
|||
</el-table-column> |
|||
<el-table-column prop="infoId" label="教师工号" align="center"> |
|||
</el-table-column> |
|||
<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 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> |
|||
|
|||
<div class="container"> |
|||
<!-- <div class="tab-header"> |
|||
<el-form ref="form" :inline="true" :model="search" label-width="80px"> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="24"> |
|||
<el-form-item label="功能名称"> |
|||
<el-input v-model="search.name" clearable></el-input> |
|||
</el-form-item> |
|||
<el-button @click="getList">查询</el-button> |
|||
</el-col> |
|||
</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" |
|||
<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 prop="name" label="功能名称" width="200px" align="left"></el-table-column> |
|||
<el-table-column label="操作" width="280px" align="center"> |
|||
<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 @click="addChildren(scope.row)" type="primary" size="mini"> 添加子功能</el-button> |
|||
<el-button @click="editRow(scope.row)" v-if="scope.row.isSource == '0'" type="primary" size="mini"> 修改 |
|||
<el-button |
|||
type="danger" |
|||
size="mini" |
|||
@click.native.prevent="deleteRow(scope.row)" |
|||
> |
|||
删除 |
|||
</el-button> |
|||
<el-button @click="delRow(scope.row)" v-if="scope.row.isSource == '0'" type="danger" size="mini"> 删除 |
|||
</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="actionUrl" label="url地址" width="200" align="center"></el-table-column> |
|||
<el-table-column prop="isEnable" label="是否可用" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-switch |
|||
v-model="scope.row.isEnable" |
|||
active-value='1' |
|||
inactive-value='0' |
|||
active-color="#13ce66" |
|||
inactive-color="#ff4949" |
|||
@change="enabledChange($event,scope.row)"> |
|||
</el-switch> |
|||
</template> |
|||
</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="40%"> |
|||
<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> |
|||
<el-button @click="editDialog = false">关 闭</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</el-tab-pane> |
|||
<el-tab-pane label="新增功能" name="addrole"> |
|||
<el-card class="box-card"> |
|||
</el-dialog> |
|||
<!-- 编辑角色信息 --> |
|||
<el-dialog |
|||
:title="dialogTitle + '学生'" |
|||
:visible.sync="editDialog" |
|||
width="40%" |
|||
> |
|||
<table class="e-table" cellspacing="0"> |
|||
<tr> |
|||
<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> |
|||
</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>教师工号</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> |
|||
</tr> |
|||
<tr> |
|||
<td>模块名称</td> |
|||
<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 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>url地址</td> |
|||
<td>学生学号</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 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> |
|||
<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 style="margin-top: 20px; text-align: center"> |
|||
<el-button type="primary" @click="save()">保存</el-button> |
|||
<!--<el-button @click="editDialog = false">关闭</el-button>--> |
|||
</div> |
|||
</el-card> |
|||
</el-tab-pane> |
|||
</el-tabs> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</el-tab-pane> |
|||
</el-tabs> |
|||
</template> |
|||
|
|||
<script> |
|||
import { pageList, savePost, sourceList, delOrgroles, getSingleData, putOrgroles, IsEnable, getMenusForFunction } from '@/api/system/functional/functional.js' |
|||
|
|||
|
|||
<script> |
|||
import { |
|||
pageList, |
|||
saveSysInfoShip, |
|||
selectTeacherDownStudent, |
|||
deleteSysInfoShip, |
|||
} from "@/api/system/sources/index.js"; |
|||
import { selectScoreKM } from "@/api/system/userAdminister/index.js"; |
|||
export default { |
|||
data() { |
|||
return { |
|||
dialogTitle: '', |
|||
activeName: 'roleList', |
|||
roleForm: { |
|||
sid: '', |
|||
parentName: '顶级菜单', |
|||
parentSid: '0', |
|||
name: '', |
|||
actionUrl: '', |
|||
sourceSid: '', |
|||
phoneFunction: '', |
|||
remarks: '', |
|||
cId: '', |
|||
funId: '' |
|||
activeName: "roleList", |
|||
dialogTitle: "", |
|||
editDialog: false, |
|||
lookstuders: false, |
|||
form: {}, |
|||
id:'', |
|||
formList:{}, |
|||
gridData: [], |
|||
teacher: { |
|||
teacherName: "", |
|||
teacherNo: "", |
|||
}, |
|||
// 模块名称 |
|||
sourceNameData: [], |
|||
actionUrl_list: [], |
|||
formBackup: {}, |
|||
search: { |
|||
name: '' |
|||
formBackup: Object.assign({}, this.form), |
|||
page: { |
|||
total: 0, // 默认数据总数 |
|||
current: 1, // 默认开始页面 |
|||
size: 10, // 每页的数据条数 |
|||
type: "js", |
|||
}, |
|||
roleTable: [], |
|||
editDialog: false, |
|||
// 树形 |
|||
loading: false |
|||
} |
|||
pageStu: { |
|||
total: 0, // 默认数据总数 |
|||
current: 1, // 默认开始页面 |
|||
size: 10, // 每页的数据条数 |
|||
type: "xs", |
|||
}, |
|||
tableData: [], |
|||
zylb: [], |
|||
sourceList: [], |
|||
options: {}, |
|||
value: "", |
|||
}; |
|||
}, |
|||
mounted() { |
|||
this.formBackup = Object.assign({}, this.roleForm) |
|||
this.getList() |
|||
this.getsourceList() |
|||
this.getPageList(this.page); |
|||
this.getstuder(); |
|||
selectScoreKM().then((res) => { |
|||
this.formList=res.data |
|||
}); |
|||
}, |
|||
methods: { |
|||
// 分页列表 |
|||
getList() { |
|||
pageList({ name: this.search.name }).then((res) => { |
|||
if (res.success) { |
|||
this.roleTable = res.data |
|||
} |
|||
console.log(res.data) |
|||
}) |
|||
lookstuder(row) { |
|||
this.lookstuders = true; |
|||
selectTeacherDownStudent({ infoId: row.infoId }).then((res) => { |
|||
console.log(res.data); |
|||
this.gridData = res.data; |
|||
}); |
|||
}, |
|||
// 模块名称 |
|||
getsourceList() { |
|||
sourceList({}).then((res) => { |
|||
if (res.success) { |
|||
this.sourceNameData = res.data |
|||
this.loading = false |
|||
} |
|||
}) |
|||
pagination(val) { |
|||
// 分页 |
|||
this.page.current = val.pageNum; |
|||
this.page.size = val.pageSize; |
|||
this.getPageList(this.page); |
|||
}, |
|||
handleClick(tab, event) { |
|||
if (tab.name == 'addrole') { |
|||
this.dialogTitle = '新增' |
|||
this.roleForm = Object.assign({}, this.formBackup) |
|||
} else { |
|||
this.getList() |
|||
} |
|||
resetSearch() { |
|||
// 重置 |
|||
this.page = { |
|||
total: 0, // 默认数据总数 |
|||
current: 1, // 默认开始页面 |
|||
size: 10, // 每页的数据条数 |
|||
params: { |
|||
name: "", |
|||
psid: "", |
|||
sourceId: "", |
|||
sourceName: "", |
|||
}, |
|||
}; |
|||
this.getPageList(); |
|||
}, |
|||
editRow(row) { |
|||
this.dialogTitle = '编辑' |
|||
this.editDialog = true |
|||
this.roleForm = Object.assign({}, row) |
|||
console.log(this.roleForm) |
|||
getSingleData({ id: row.sid }).then((res) => { |
|||
if (res.success) { |
|||
this.roleForm = res.data |
|||
} |
|||
}) |
|||
getMenusForFunction({ sourceSid: this.roleForm.sourceSid }).then((resp) => { |
|||
if (resp.success) { |
|||
this.actionUrl_list = resp.data |
|||
} |
|||
}) |
|||
getstuder() { |
|||
pageList(this.pageStu).then((res) => { |
|||
this.options = res.data.records; |
|||
}); |
|||
}, |
|||
getPageList(data) { |
|||
// 获取列表 |
|||
pageList(data).then((res) => { |
|||
console.log(res); |
|||
this.tableData = res.data.records; |
|||
this.page.total = res.data.total; |
|||
}); |
|||
}, |
|||
addChildren(row) { |
|||
this.refersh() |
|||
this.activeName = 'addrole' |
|||
this.roleForm.parentName = row.name |
|||
this.roleForm.parentSid = row.sid |
|||
if (row.isSource == '1') { |
|||
this.roleForm.parentName = '顶级菜单' |
|||
this.roleForm.parentSid = 0 |
|||
handleClick(tab, event) { |
|||
if (tab.name == "addrole") { |
|||
this.dialogTitle = "新增"; |
|||
this.roleForm = Object.assign({}, this.formBackup); |
|||
} else { |
|||
this.roleForm.parentName = row.name |
|||
this.roleForm.parentSid = row.sid |
|||
this.getPageList(); |
|||
} |
|||
}, |
|||
delRow(row) { |
|||
this.$confirm('确定要删除该功能吗, 是否继续?', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
delOrgroles({ sid: row.sid }).then((res) => { |
|||
if (res.success) { |
|||
this.getList() |
|||
this.$message({ showClose: true, type: 'success', message: '删除成功!' }) |
|||
} |
|||
}) |
|||
}) |
|||
reset() { |
|||
this.form = {}; |
|||
}, |
|||
changeSource(value) { |
|||
const choose = this.sourceNameData.filter((item) => item.sid === value) |
|||
getMenusForFunction({ sourceSid: choose[0].sid }).then((res) => { |
|||
if (res.success) { |
|||
this.actionUrl_list = res.data |
|||
} |
|||
}) |
|||
editRow(row) { |
|||
this.dialogTitle = "添加"; |
|||
this.editDialog = true; |
|||
this.teacher.teacherName = row.name; |
|||
this.teacher.teacherNo = row.infoId; |
|||
this.form = Object.assign({}, row); |
|||
}, |
|||
// 保存角色 |
|||
save() { |
|||
if (this.roleForm.sid) { |
|||
putOrgroles(this.roleForm).then((res) => { |
|||
if (res.success) { |
|||
this.getList() |
|||
this.editDialog = false |
|||
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' }) |
|||
} |
|||
}) |
|||
} |
|||
saveSysInfoShip(this.teacher).then((res) => { |
|||
if (res.code == 200) { |
|||
this.$message({ |
|||
type: "success", |
|||
message: "添加成功!", |
|||
}); |
|||
} |
|||
}); |
|||
this.editDialog = false; |
|||
}, |
|||
refersh() { |
|||
this.roleForm = { |
|||
parentName: '顶级菜单', |
|||
parentSid: '0', |
|||
name: '', |
|||
actionUrl: '', |
|||
sourceSid: '', |
|||
phoneFunction: '', |
|||
remarks: '', |
|||
cId: '', |
|||
funId: '' |
|||
} |
|||
deleteRow(row) { |
|||
this.$confirm("确定要删除该资源吗, 是否继续?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}).then(() => { |
|||
deleteSysInfoShip({ sid: row.sid }).then((res) => { |
|||
this.$message({ |
|||
type: "success", |
|||
message: "删除成功!", |
|||
}); |
|||
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> |
|||
|
|||
<style scoped> |
|||
.el-select > .el-input { |
|||
display: block; |
|||
width: 300px; |
|||
} |
|||
|
|||
|
|||
<style scoped="scoped" lang="scss"> |
|||
.my-tabs { |
|||
margin-top: 10px; |
|||
} |
|||
</style> |
|||
|
@ -1,212 +1,308 @@ |
|||
<template> |
|||
<div class="container"> |
|||
<div class="tab-header"> |
|||
<el-form :inline="true" :model="form" class="demo-form-inline"> |
|||
<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-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"> |
|||
<el-table :data="tableData" border style="width: 100%"> |
|||
<el-table-column prop="name" label="教师姓名" align="center"> |
|||
</el-table-column> |
|||
<el-table-column prop="infoId" label="教师工号" align="center"> |
|||
</el-table-column> |
|||
<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 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> |
|||
|
|||
<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 prop="eventContent" label="日志内容" align="center"> |
|||
</el-table-column> |
|||
<el-table-column prop="userName" label="用户名" align="center"> |
|||
</el-table-column> |
|||
<el-table-column prop="userIp" label="IP地址" align="center"> |
|||
</el-table-column> |
|||
<el-table-column prop="timestamp" label="记录时间" align="center"> |
|||
</el-table-column> |
|||
</el-table> |
|||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> |
|||
</div> |
|||
<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> |
|||
</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> |
|||
</el-dialog> |
|||
</div> |
|||
</el-tab-pane> |
|||
</el-tabs> |
|||
</template> |
|||
|
|||
<script> |
|||
import { logPageList } from '@/api/system/log/index.js' |
|||
import axios from 'axios' |
|||
import { getStorage } from '@/utils/auth' |
|||
export default { |
|||
data() { |
|||
return { |
|||
radio: '1', |
|||
dialogVisible: false, |
|||
disabled: false, |
|||
form: {}, |
|||
page: { |
|||
total: 0, // 默认数据总数 |
|||
current: 1, // 默认开始页面 |
|||
size: 10, // 每页的数据条数 |
|||
params: { |
|||
eventName: '' |
|||
} |
|||
|
|||
<script> |
|||
import { |
|||
pageList, |
|||
saveSysInfoShip, |
|||
selectTeacherDownStudent, |
|||
deleteSysInfoShip, |
|||
} from "@/api/system/sources/index.js"; |
|||
import { selectScoreKM,selectClass,selectStudentScoreYIELD } from "@/api/system/userAdminister/index.js"; |
|||
export default { |
|||
data() { |
|||
return { |
|||
activeName: "roleList", |
|||
dialogTitle: "", |
|||
editDialog: false, |
|||
lookstuders: false, |
|||
form: {}, |
|||
name:'', |
|||
formList:{}, |
|||
gridData: [], |
|||
teacher: { |
|||
teacherName: "", |
|||
teacherNo: "", |
|||
}, |
|||
formBackup: Object.assign({}, this.form), |
|||
page: { |
|||
total: 0, // 默认数据总数 |
|||
current: 1, // 默认开始页面 |
|||
size: 10, // 每页的数据条数 |
|||
type: "js", |
|||
}, |
|||
pageStu: { |
|||
total: 0, // 默认数据总数 |
|||
current: 1, // 默认开始页面 |
|||
size: 10, // 每页的数据条数 |
|||
type: "xs", |
|||
}, |
|||
tableData: [], |
|||
zylb: [], |
|||
sourceList: [], |
|||
options: {}, |
|||
value: "", |
|||
calss:'8班' |
|||
}; |
|||
}, |
|||
mounted() { |
|||
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: { |
|||
lookstuder(row) { |
|||
this.lookstuders = true; |
|||
selectTeacherDownStudent({ infoId: row.infoId }).then((res) => { |
|||
console.log(res.data); |
|||
this.gridData = res.data; |
|||
}); |
|||
}, |
|||
pagination(val) { |
|||
// 分页 |
|||
this.page.current = val.pageNum; |
|||
this.page.size = val.pageSize; |
|||
this.getPageList(this.page); |
|||
}, |
|||
resetSearch() { |
|||
// 重置 |
|||
this.page = { |
|||
total: 0, // 默认数据总数 |
|||
current: 1, // 默认开始页面 |
|||
size: 10, // 每页的数据条数 |
|||
params: { |
|||
name: "", |
|||
psid: "", |
|||
sourceId: "", |
|||
sourceName: "", |
|||
}, |
|||
tableData: [] |
|||
}; |
|||
this.getPageList(); |
|||
}, |
|||
getstuder() { |
|||
pageList(this.pageStu).then((res) => { |
|||
this.options = res.data.records; |
|||
}); |
|||
}, |
|||
getPageList(data) { |
|||
// 获取列表 |
|||
pageList(data).then((res) => { |
|||
console.log(res); |
|||
this.tableData = res.data.records; |
|||
this.page.total = res.data.total; |
|||
}); |
|||
}, |
|||
handleClick(tab, event) { |
|||
if (tab.name == "addrole") { |
|||
this.dialogTitle = "新增"; |
|||
this.roleForm = Object.assign({}, this.formBackup); |
|||
} else { |
|||
this.getPageList(); |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.getPageList(this.page) |
|||
reset() { |
|||
this.form = {}; |
|||
}, |
|||
methods: { |
|||
pagination(val) { // 分页 |
|||
this.page.current = val.pageNum |
|||
this.page.size = val.pageSize |
|||
this.getPageList(this.page) |
|||
}, |
|||
onSearch() { //查询 |
|||
this.getPageList(this.page) |
|||
}, |
|||
resetSearch(){ // 重置 |
|||
this.page = this.pageBackup |
|||
}, |
|||
getPageList(data){ // 获取列表 |
|||
logPageList(data).then((res)=>{ |
|||
this.tableData = res.data.records |
|||
this.page.total = res.data.total |
|||
}) |
|||
}, |
|||
exportExcel(){ // 导出文件 |
|||
axios({ |
|||
method: 'get', |
|||
url: 'api/system/v1/systemlogs/exportLogExcel', |
|||
params: this.page, |
|||
responseType: 'blob', |
|||
headers:{'token': getStorage()} |
|||
}).then(response => { |
|||
let blob = new Blob([response.data], {type:"application/vnd.ms-excel"}); |
|||
if (!!window.ActiveXObject || "ActiveXObject" in window) { |
|||
window.navigator.msSaveOrOpenBlob(blob, '日志'); |
|||
} else { |
|||
let link = document.createElement('a'); |
|||
link.href = window.URL.createObjectURL(blob); |
|||
link.download = "日志"; |
|||
link.click(); |
|||
} |
|||
}).catch((error) => { |
|||
|
|||
}) |
|||
} |
|||
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> |
|||
|
|||
<style scoped="scoped" lang="scss"> |
|||
.zcxx { |
|||
color: #000; |
|||
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 scoped="scoped" lang="scss"> |
|||
.my-tabs { |
|||
margin-top: 10px; |
|||
} |
|||
</style> |
|||
|
Loading…
Reference in new issue