This commit is contained in:
fengdong777
2023-05-10 11:40:50 +08:00
parent 4c7c48d111
commit bcefdbc02c
9 changed files with 461 additions and 403 deletions

View File

@@ -6,4 +6,4 @@ VUE_APP_BASE_API = '/api'
## 配置测试和本地开发时的 接口地址 ## 配置测试和本地开发时的 接口地址
##VUE_APP_URL = "http://39.104.100.138:9112" ##VUE_APP_URL = "http://39.104.100.138:9112"
VUE_APP_URL = "http://192.168.3.183:9112" VUE_APP_URL = "http://192.168.1.177:9112"

View File

@@ -8,6 +8,15 @@ export function alterSysPlan(data) {
headers: { 'Content-Type': 'application/json' } headers: { 'Content-Type': 'application/json' }
}) })
}
export function saveSysPlanSchedule(data) {
return request({
url: 'v1/sysPlanSchedule/saveSysPlanSchedule',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
} }
// 自主学习计划指导 // 自主学习计划指导

View File

@@ -22,6 +22,16 @@ export function saveSysPlanSchedule(data) {
} }
}) })
} }
export function saveSysPlan(data) {
return request({
url: 'v1/sysPlan/saveSysPlan',
method: 'POST',
data: data,
headers: {
'Content-Type': 'application/json'
}
})
}
// 提交 // 提交
export function upSysPlan(data) { export function upSysPlan(data) {
return request({ return request({

View File

@@ -1,25 +1,30 @@
<template> <template>
<el-tabs v-model="activeName" class="my-tabs" type="card" @tab-click="handleClick"> <el-tabs
v-model="activeName"
class="my-tabs"
type="card"
@tab-click="handleClick"
>
<el-tab-pane label="菜单列表" name="roleList"> <el-tab-pane label="菜单列表" name="roleList">
<div class="content"> <div class="content">
<div class="table-describe clearfix"> <div class="table-describe clearfix">
<h4 style="color:#000;">菜单列表</h4> <h4 style="color: #000">菜单列表</h4>
</div> </div>
<el-table <el-table
ref="multipleTable" ref="multipleTable"
:data="tableData" :data="tableData"
border border
style="width: 100%;" style="width: 100%"
row-key="sid" row-key="sid"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
> >
<el-table-column prop="name" label="菜单名称" width="220"/> <el-table-column prop="name" label="菜单名称" width="220" />
<el-table-column label="操作" width="260" align="center"> <el-table-column label="操作" width="260" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="editRol(scope.row)"> <el-button type="primary" size="mini" @click="editRol(scope.row)">
添加权限 添加权限
</el-button> </el-button>
<el-button type="primary" size="mini" @click="editRow(scope.row)"> <el-button type="primary" size="mini" @click="editRow(scope.row)">
修改 修改
</el-button> </el-button>
<el-button <el-button
@@ -31,51 +36,55 @@
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="pageUrl" label="链接地址" align="center"/> <el-table-column prop="pageUrl" label="链接地址" align="center" />
<el-table-column prop="isEnable" label="可见性" align="center"> <el-table-column prop="isShow" label="可见性" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
v-model="scope.row.isEnable" v-model="scope.row.isShow"
active-color="#13ce66" active-color="#13ce66"
inactive-color="#ff4949" inactive-color="#ff4949"
active-value="1" active-value="1"
inactive-value="0" inactive-value="0"
@change="enabledChange(scope.row.isEnable,scope.row)" @change="enabledChange(scope.row.isShow, scope.row)"
/> />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<el-dialog :title="dialogTitle + '功能信息'" :visible.sync="editDialog" width="40%"> <el-dialog
:title="dialogTitle + '功能信息'"
:visible.sync="editDialog"
width="40%"
>
<table class="e-table" cellspacing="0"> <table class="e-table" cellspacing="0">
<tr> <tr>
<td>菜单名称</td> <td>菜单名称</td>
<td> <td>
<el-input v-model="form.name"/> <el-input v-model="form.name" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td>菜单路由</td> <td>菜单路由</td>
<td> <td>
<el-input v-model="form.menuUrl"/> <el-input v-model="form.menuUrl" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td>菜单图片路径</td> <td>菜单图片路径</td>
<td> <td>
<el-input v-model="form.iconUrl"/> <el-input v-model="form.iconUrl" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td>前端页面名称</td> <td>前端页面名称</td>
<td> <td>
<el-input v-model="form.pageName"/> <el-input v-model="form.pageName" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td>前端页面路径</td> <td>前端页面路径</td>
<td> <td>
<el-input v-model="form.pageUrl"/> <el-input v-model="form.pageUrl" />
</td> </td>
</tr> </tr>
<tr> <tr>
@@ -90,48 +99,49 @@
<tr> <tr>
<td>排序号</td> <td>排序号</td>
<td> <td>
<el-input v-model="form.sortNo"/> <el-input v-model="form.sortNo" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td>备注</td> <td>备注</td>
<td> <td>
<el-input v-model="form.remarks"/> <el-input v-model="form.remarks" />
</td> </td>
</tr> </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>
<!-- 添加角色权限 --> <!-- 添加角色权限 -->
<el-dialog :title="dialogTitle + '角色权限'" :visible.sync="editRolDialog" width="40%"> <el-dialog
:title="dialogTitle + '角色权限'"
:visible.sync="editRolDialog"
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="Rol.menuSid"/> <el-input v-model="Rol.menuSid" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td>备注</td> <td>角色</td>
<td> <td>
<el-select <el-select v-model="Rol.roleSid" style="width: 300px">
v-model="Rol.roleSid" <el-option
style="width: 300px" v-for="(item, i) in postSidData"
> :key="i"
<el-option :label="item.name"
v-for="(item,i) in postSidData" :value="item.sid"
:key="i" ></el-option>
:label="item.name" </el-select>
:value="item.sid"
></el-option>
</el-select>
</td> </td>
</tr> </tr>
</table> </table>
<div style="margin-top: 20px; text-align: center;"> <div style="margin-top: 20px; text-align: center">
<el-button type="primary" @click="saveRol()"> </el-button> <el-button type="primary" @click="saveRol()"> </el-button>
<el-button @click="editRolDialog = false"> </el-button> <el-button @click="editRolDialog = false"> </el-button>
</div> </div>
@@ -144,31 +154,31 @@
<tr> <tr>
<td>菜单名称</td> <td>菜单名称</td>
<td> <td>
<el-input v-model="form.name" style="width:300px"/> <el-input v-model="form.name" style="width: 300px" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td>菜单路由</td> <td>菜单路由</td>
<td> <td>
<el-input v-model="form.menuUrl" style="width:300px"/> <el-input v-model="form.menuUrl" style="width: 300px" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td>菜单图片路径</td> <td>菜单图片路径</td>
<td> <td>
<el-input v-model="form.iconUrl" style="width:300px"/> <el-input v-model="form.iconUrl" style="width: 300px" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td>前端页面名称</td> <td>前端页面名称</td>
<td> <td>
<el-input v-model="form.pageName" style="width:300px"/> <el-input v-model="form.pageName" style="width: 300px" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td>前端页面路径</td> <td>前端页面路径</td>
<td> <td>
<el-input v-model="form.pageUrl" style="width:300px"/> <el-input v-model="form.pageUrl" style="width: 300px" />
</td> </td>
</tr> </tr>
<tr> <tr>
@@ -183,376 +193,388 @@
<tr> <tr>
<td>排序号</td> <td>排序号</td>
<td> <td>
<el-input v-model="form.sortNo" style="width:300px"/> <el-input v-model="form.sortNo" style="width: 300px" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td>备注</td> <td>备注</td>
<td> <td>
<el-input v-model="form.remarks"/> <el-input v-model="form.remarks" />
</td> </td>
</tr> </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>
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</template> </template>
<script> <script>
import {pageList, menusTreelist, saveMenusInfo, putMenusInfo, delMenus, IsEnable} from '@/api/system/menu/index.js' import {
import {sourceList,alterRole,addSysMenuRole} from '@/api/system/functional/functional.js' pageList,
menusTreelist,
saveMenusInfo,
putMenusInfo,
delMenus,
IsEnable,
} from "@/api/system/menu/index.js";
import {
sourceList,
alterRole,
addSysMenuRole,
} from "@/api/system/functional/functional.js";
export default { export default {
data() { data() {
return { return {
activeName: 'roleList', activeName: "roleList",
editDialog: false, editDialog: false,
editRolDialog:false, editRolDialog: false,
dialogTitle: '', dialogTitle: "",
checked: '', checked: "",
Rol:{ Rol: {
menuSid:'' menuSid: "",
},
form: {
pname: "顶级菜单",
iconUrl: "",
isShow: 1,
menuName: "",
menuUrl: "",
pageAliasName: "",
pageName: "",
pageUrl: "",
pageUrlRedirect: "",
psid: "",
remarks: "",
sortNo: 0,
sourceSid: "",
},
rolsid: "",
postSidData: {},
formBackup: Object.assign({}, this.form),
tableData: [],
page: {
current: 1,
size: 10,
total: 0,
params: {
name: "",
psid: "",
sourceName: "",
sourceSid: "",
}, },
form: { },
pname: '顶级菜单', rank: "1",
iconUrl: '', sourceNameData: [], // 资源
isShow: 1, isadd: false,
menuName: '', };
menuUrl: '', },
pageAliasName: '', mounted() {
pageName: '', this.getPageList();
pageUrl: '', this.getsourceList();
pageUrlRedirect: '',
psid: '', alterRole().then((res) => {
remarks: '', this.postSidData = res.data;
sortNo: 0, });
sourceSid: '' },
}, methods: {
rolsid:'', pagination(val) {
postSidData:{}, // 分页
formBackup: Object.assign({}, this.form), this.page.current = val.pageNum;
tableData: [], this.page.size = val.pageSize;
page: { this.getPageList();
current: 1, },
size: 10, resetSearch() {
total: 0, // 重置
params: { this.page.params = this.pageBackup;
name: '', },
psid: '', getPageList() {
sourceName: '', // 获取列表
sourceSid: '' pageList(this.page).then((res) => {
} console.log("这里是条件查询", this.page);
}, const treedata = res.data;
rank: '1', console.log("菜单列表", res);
sourceNameData: [], // 资源 this.tableData = treedata;
isadd: false this.page.total = res.data.total;
});
},
// 资源名称
getsourceList() {
const params = {};
sourceList(params).then((res) => {
this.sourceNameData = res.data;
this.loading = false;
});
},
handleClick(tab, event) {
if (tab.name == "addrole") {
this.dialogTitle = "新增";
this.roleForm = Object.assign({}, this.formBackup);
} else {
this.getPageList();
} }
}, },
mounted() { add(row) {
this.getPageList() this.activeName = "addrole";
this.getsourceList() // if(row == 0){
// this.isadd = false
alterRole().then(res => { // }else{
this.postSidData=res.data // this.isadd = true
}) // }
// this.dialogTitle = '新增'
// this.editDialog = true
this.form = Object.assign({}, this.formBackup);
this.form.isShow = 1;
// this.form.psid = row.sid || 0
this.form.pname = row.name || "顶级菜单";
this.form.sourceSid = row.sourceSid || "";
if (row.isSource == "1") {
this.form.psid = 0;
} else {
this.form.psid = row.sid;
}
}, },
methods: { editRow(row) {
pagination(val) { // 分页 this.dialogTitle = "编辑";
this.page.current = val.pageNum this.editDialog = true;
this.page.size = val.pageSize this.form = Object.assign({}, row);
this.getPageList() this.form.isShow = 1;
}, this.form.pname = row.psid == "0" ? "顶级菜单" : row.pname;
resetSearch() { // 重置 },
this.page.params = this.pageBackup editRol(row) {
}, this.dialogTitle = "添加";
getPageList() { // 获取列表 this.editRolDialog = true;
pageList(this.page).then((res) => { this.form = Object.assign({}, row);
console.log('这里是条件查询', this.page) this.Rol.menuSid = row.name;
const treedata = res.data this.rolsid = row.sid;
console.log('菜单列表', res) console.log(this.rolsid);
this.tableData = treedata },
this.page.total = res.data.total save() {
}) if (this.form.sid) {
}, putMenusInfo(this.form).then((res) => {
// 资源名称 this.editDialog = false;
getsourceList() { this.getPageList(this.page);
const params = {}
sourceList(params).then(res => {
this.sourceNameData = res.data
this.loading = false
})
},
handleClick(tab, event) {
if (tab.name == 'addrole') {
this.dialogTitle = '新增'
this.roleForm = Object.assign({}, this.formBackup)
} else {
this.getPageList()
}
},
add(row) {
this.activeName = 'addrole'
// if(row == 0){
// this.isadd = false
// }else{
// this.isadd = true
// }
// this.dialogTitle = '新增'
// this.editDialog = true
this.form = Object.assign({}, this.formBackup)
this.form.isShow = 1
// this.form.psid = row.sid || 0
this.form.pname = row.name || '顶级菜单'
this.form.sourceSid = row.sourceSid || ''
if (row.isSource == '1') {
this.form.psid = 0
} else {
this.form.psid = row.sid
}
},
editRow(row) {
this.dialogTitle = '编辑'
this.editDialog = true
this.form = Object.assign({}, row)
this.form.isShow = 1
this.form.pname = row.psid == '0' ? '顶级菜单' : row.pname
},
editRol(row) {
this.dialogTitle = '添加'
this.editRolDialog = true
this.form = Object.assign({}, row)
this.Rol.menuSid=row.name
this.rolsid=row.sid
console.log(this.rolsid);
},
save() {
if (this.form.sid) {
putMenusInfo(this.form).then(res => {
this.editDialog = false
this.getPageList(this.page)
this.$message({
message: res.msg,
type: 'success'
})
})
} else {
saveMenusInfo(this.form).then(res => {
this.activeName = 'roleList'
this.getPageList()
this.$message({
message: res.msg,
type: 'success'
})
})
}
},
saveRol(){
this.editRolDialog = false
this.Rol.menuSid=this.rolsid
console.log(this.Rol);
addSysMenuRole(this.Rol).then((res)=>{
console.log(res);
if(res.code==200){
this.$message({
type: 'success',
message: '添加成功!'
})
}
})
},
deleteRow(row) {
this.$confirm('确定要删除该菜单吗, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delMenus({sid: row.sid}).then(res => {
this.getPageList(this.page)
this.$message({
type: 'success',
message: '删除成功!'
})
})
})
},
// 是否可用 按钮
enabledChange(value, row) {
IsEnable({
sid: row.sid,
isEnable:value
}).then(res => {
this.$message({ this.$message({
type: 'success', message: res.msg,
message: res.msg type: "success",
}) });
}) });
}, } else {
//保存排序 saveMenusInfo(this.form).then((res) => {
getSorting(){ this.activeName = "roleList";
this.getPageList(this.page);
}, this.$message({
retname(sid) { message: res.msg,
obj = this.sourceNameData.find((item) => { type: "success",
return item.sid == sid// 筛选出匹配数据 });
}) });
return obj.name
} }
} },
} saveRol() {
this.editRolDialog = false;
this.Rol.menuSid = this.rolsid;
console.log(this.Rol);
addSysMenuRole(this.Rol).then((res) => {
console.log(res);
if (res.code == 200) {
this.$message({
type: "success",
message: "添加成功!",
});
}
});
},
deleteRow(row) {
this.$confirm("确定要删除该菜单吗, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
delMenus({ sid: row.sid }).then((res) => {
this.getPageList(this.page);
this.$message({
type: "success",
message: "删除成功!",
});
});
});
},
// 是否可用 按钮
enabledChange(value, row) {
putMenusInfo({
sid: row.sid,
id:row.id,
isShow: value,
}).then((res) => {
this.$message({
type: "success",
message: res.msg,
});
});
},
//保存排序
getSorting() {},
retname(sid) {
obj = this.sourceNameData.find((item) => {
return item.sid == sid; // 筛选出匹配数据
});
return obj.name;
},
},
};
</script> </script>
<style> <style>
.el-input__inner { .el-input__inner {
line-height: 32px; line-height: 32px;
height: 32px; height: 32px;
} }
</style> </style>
<style scoped="scoped" lang="scss"> <style scoped="scoped" lang="scss">
.el-pagination.is-background .btn-next, .el-pagination.is-background .btn-next,
.el-pagination.is-background .btn-prev { .el-pagination.is-background .btn-prev {
padding: 0 20px; padding: 0 20px;
border: 1px solid #ccc; border: 1px solid #ccc;
border-radius: 2px; border-radius: 2px;
background-color: #FFFFFF; background-color: #ffffff;
}
.el-icon-arrow-left:before,
.el-icon-arrow-right:before {
content: "下一页";
color: #727272;
}
.el-icon-arrow-left:before {
content: "上一页";
}
.content {
width: 100%;
padding-top: 10px;
font-size: 16px;
color: #fff;
box-sizing: border-box;
}
.shouye {
position: absolute;
top: -3px;
left: 100px;
font-size: 16px;
color: #0395d8;
font-weight: bold;
}
.placename {
position: absolute;
top: -3px;
left: 210px;
font-size: 16px;
color: #fff;
font-weight: bold;
}
.right_cont {
width: 100%;
height: 645px;
background-color: #fff;
margin: 0;
padding: 15px;
box-sizing: border-box;
}
.cont_head {
height: 40px;
width: 97%;
margin-left: 1.5%;
background-color: #f7f9fc;
overflow: hidden;
}
.cont_head p {
float: left;
color: #000;
line-height: 40px;
margin-left: 50px;
}
.cont_head input {
float: left;
height: 24px;
width: 147px;
margin-top: 6px;
border: 1px solid #e6e9f0;
border-radius: 5px;
-webkit-appearance: none;
outline: none;
}
.cont_head select {
float: left;
height: 28px;
width: 147px;
margin-top: 6px;
border: 1px solid #e6e9f0;
border-radius: 5px;
outline: none;
}
.chaxun {
height: 28px;
width: 85px;
line-height: 0px;
background-color: #018ad2;
margin-top: 6px;
text-align: center;
padding: 0;
float: right;
margin-right: 6px;
}
.tishi {
width: 80%;
margin: auto;
tr {
height: 50px;
} }
.el-icon-arrow-left:before, td {
.el-icon-arrow-right:before {
content: '下一页';
color: #727272;
}
.el-icon-arrow-left:before {
content: '上一页';
}
.content {
width: 100%;
padding-top: 10px;
font-size: 16px;
color: #fff;
box-sizing: border-box;
}
.shouye {
position: absolute;
top: -3px;
left: 100px;
font-size: 16px;
color: #0395d8;
font-weight: bold;
}
.placename {
position: absolute;
top: -3px;
left: 210px;
font-size: 16px;
color: #fff;
font-weight: bold;
}
.right_cont {
width: 100%;
height: 645px;
background-color: #fff;
margin: 0;
padding: 15px;
box-sizing: border-box;
}
.cont_head {
height: 40px;
width: 97%;
margin-left: 1.5%;
background-color: #f7f9fc;
overflow: hidden;
}
.cont_head p {
float: left;
color: #000;
line-height: 40px;
margin-left: 50px;
}
.cont_head input {
float: left;
height: 24px;
width: 147px;
margin-top: 6px;
border: 1px solid #e6e9f0; border: 1px solid #e6e9f0;
border-radius: 5px;
-webkit-appearance: none;
outline: none;
}
.cont_head select {
float: left;
height: 28px;
width: 147px;
margin-top: 6px;
border: 1px solid #e6e9f0;
border-radius: 5px;
outline: none;
}
.chaxun {
height: 28px;
width: 85px;
line-height: 0px;
background-color: #018ad2;
margin-top: 6px;
text-align: center; text-align: center;
padding: 0;
float: right;
margin-right: 6px;
} }
.tishi { td:first-child {
background-color: #f7f9fc;
}
input {
width: 80%; width: 80%;
height: 30px;
margin: auto; border: 1px solid #e6e9f0;
tr {
height: 50px;
}
td {
border: 1px solid #e6e9f0;
text-align: center;
}
td:first-child {
background-color: #f7f9fc;
}
input {
width: 80%;
height: 30px;
border: 1px solid #e6e9f0;
}
textarea {
width: 80%;
height: 100px;
border: 1px solid #e6e9f0;
margin-top: 10px;
margin-bottom: 6px;
}
select {
width: 80%;
height: 30px;
border: 1px solid #e6e9f0;
}
} }
.my-tabs { textarea {
width: 80%;
height: 100px;
border: 1px solid #e6e9f0;
margin-top: 10px; margin-top: 10px;
margin-bottom: 6px;
} }
select {
width: 80%;
height: 30px;
border: 1px solid #e6e9f0;
}
}
.my-tabs {
margin-top: 10px;
}
</style> </style>

View File

@@ -32,11 +32,6 @@
label="学习计划" label="学习计划"
align="center" align="center"
/> />
<el-table-column
prop="planOpinion"
label="反馈意见"
align="center"
/>
<el-table-column label="查看进度" width="200px" align="center"> <el-table-column label="查看进度" width="200px" align="center">
<!-- <template slot-scope="scope"> <!-- <template slot-scope="scope">
<el-button type="primary" size="mini" @click="editRow(scope.row)"> <el-button type="primary" size="mini" @click="editRow(scope.row)">
@@ -81,7 +76,7 @@
size="mini" size="mini"
@click.native.prevent="deleteRow(scope.row)" @click.native.prevent="deleteRow(scope.row)"
> >
删除 添加意见
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>

View File

@@ -63,7 +63,7 @@
align="center" align="center"
/> />
<el-table-column <el-table-column
prop="planOpinionYj" prop="planOpinion"
label="反馈意见" label="反馈意见"
align="center" align="center"
/> />

View File

@@ -70,7 +70,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="planOpinionYj" prop="planOpinion"
label="反馈意见" label="反馈意见"
align="center" align="center"
/> />
@@ -224,7 +224,7 @@ import {
saveSysPlan, saveSysPlan,
deleteSysPlan, deleteSysPlan,
upSysPlan, upSysPlan,
selectTeacher selectTeacher,
} from "@/api/system/region/region.js"; } from "@/api/system/region/region.js";
// import organizationManageInfo from './organizationManageInfo.vue' // import organizationManageInfo from './organizationManageInfo.vue'
export default { export default {
@@ -237,21 +237,21 @@ export default {
activeName: "roleList", activeName: "roleList",
dialogTitle: "", dialogTitle: "",
editDialog: false, editDialog: false,
editDialog1:false, editDialog1: false,
form: { form: {
teacherNo:'' teacherNo: "",
}, },
formBackup: Object.assign({}, this.form), formBackup: Object.assign({}, this.form),
tableData: [], tableData: [],
userName: window.sessionStorage.getItem("userName"), userName: window.sessionStorage.getItem("userName"),
formList:{} formList: {},
}; };
}, },
mounted() { mounted() {
this.getPageList(); this.getPageList();
selectTeacher().then((res) => { selectTeacher().then((res) => {
this.formList=res.data this.formList = res.data;
}); });
}, },
methods: { methods: {
getPageList() { getPageList() {
@@ -293,15 +293,15 @@ export default {
} }
this.reset(); this.reset();
}, },
save1(){ save1() {
upSysPlan(this.form).then((res) => { upSysPlan(this.form).then((res) => {
this.getPageList(); this.getPageList();
this.editDialog1 = false; this.editDialog1 = false;
this.$message({ this.$message({
type: "success", type: "success",
message: "提交成功!", message: "提交成功!",
});
}); });
});
}, },
reset() { reset() {
this.form = {}; this.form = {};
@@ -328,7 +328,7 @@ export default {
this.dialogTitle = "编辑"; this.dialogTitle = "编辑";
this.editDialog = true; this.editDialog = true;
this.form = Object.assign({}, row); this.form = Object.assign({}, row);
this.teacherNo=row.teacherNo this.teacherNo = row.teacherNo;
}, },
detail(row) { detail(row) {
this.viewState = 4; this.viewState = 4;

View File

@@ -17,10 +17,11 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" width="150px" align="center"> <el-table-column label="操作" width="150px" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="editRow(scope.row)"> <el-button :disabled="chooseStore1" type="primary" size="mini" @click="editRow(scope.row)">
修改 修改
</el-button> </el-button>
<el-button <el-button
:disabled="chooseStore1"
type="danger" type="danger"
size="mini" size="mini"
@click.native.prevent="deleteRow(scope.row)" @click.native.prevent="deleteRow(scope.row)"
@@ -75,7 +76,7 @@
</el-table-column> </el-table-column>
<el-table-column width="200px" label="成绩录入" align="center"> <el-table-column width="200px" label="成绩录入" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="chengji(scope.row)"> <el-button :disabled="chooseStore" type="primary" size="mini" @click="chengji(scope.row)">
成绩录入 成绩录入
</el-button> </el-button>
</template> </template>
@@ -303,6 +304,8 @@ export default {
dialogTitle: "", dialogTitle: "",
editDialog: false, editDialog: false,
entry: false, entry: false,
chooseStore:false,
chooseStore1:false,
form: { form: {
id:'', id:'',
sid:'', sid:'',
@@ -330,10 +333,12 @@ export default {
], ],
zylb: [], zylb: [],
sourceList: [], sourceList: [],
type: window.sessionStorage.getItem("type"),
}; };
}, },
mounted() { mounted() {
this.getPageList(this.page); this.getPageList(this.page);
this.panduan()
// getsourceList().then(res => { // getsourceList().then(res => {
// this.sourceList = res.data // this.sourceList = res.data
// }) // })
@@ -348,6 +353,15 @@ export default {
this.page.size = val.pageSize; this.page.size = val.pageSize;
this.getPageList(this.page); this.getPageList(this.page);
}, },
panduan(){
console.log(this.type);
if(this.type==0){
this.chooseStore=true,
this.chooseStore1=true
}else{
this.chooseStore1=true
}
},
resetSearch() { resetSearch() {
// 重置 // 重置
this.page = { this.page = {

View File

@@ -7,10 +7,10 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" width="150px" align="center"> <el-table-column label="操作" width="150px" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="editRow(scope.row)"> <el-button :disabled="chooseStore" type="primary" size="mini" @click="editRow(scope.row)">
修改 修改
</el-button> </el-button>
<el-button type="danger" size="mini" @click.native.prevent="deleteRow(scope.row)"> <el-button :disabled="chooseStore" type="danger" size="mini" @click.native.prevent="deleteRow(scope.row)">
删除 删除
</el-button> </el-button>
</template> </template>
@@ -169,6 +169,7 @@
return { return {
activeName: 'roleList', activeName: 'roleList',
dialogTitle: '', dialogTitle: '',
chooseStore:false,
editDialog: false, editDialog: false,
form: { form: {
id:'', id:'',
@@ -187,11 +188,13 @@
}, },
tableData: [], tableData: [],
zylb: [], zylb: [],
sourceList: [] sourceList: [],
type: window.sessionStorage.getItem("type"),
} }
}, },
mounted() { mounted() {
this.getPageList(this.page) this.getPageList(this.page),
this.panduan()
}, },
methods: { methods: {
pagination(val) { // 分页 pagination(val) { // 分页
@@ -213,6 +216,11 @@
} }
this.getPageList(this.page) this.getPageList(this.page)
}, },
panduan(){
if(this.type==1 || this.type==0){
this.chooseStore=true
}
},
getPageList(data) { // 获取列表 getPageList(data) { // 获取列表
pageList(data).then((res) => { pageList(data).then((res) => {
this.tableData = res.data.records this.tableData = res.data.records