Merge remote-tracking branch 'origin/master'

dev_2022-05-11
e 3 years ago
commit 3abbbaf09b
  1. 2
      src/api/index.js
  2. 2
      src/pages/achievement/list/index.vue
  3. 13
      src/pages/assessment/add/index.vue
  4. 6
      src/pages/match/list/index.vue
  5. 24
      src/pages/project/list/index.vue

@ -9,6 +9,7 @@ export default {
logins: `${host}users/users/user/login`, //登录 logins: `${host}users/users/user/login`, //登录
verification: `${host}users/users/user/captcha`,// 验证码图片 verification: `${host}users/users/user/captcha`,// 验证码图片
isClient: `${host}users/users/user/isClient`,// 是否为客户 isClient: `${host}users/users/user/isClient`,// 是否为客户
getUserAllRoleByToken : `${host}users/role/getUserAllRoleByToken`,
// 权限管理 // 权限管理
getUserRolesPermissionMenu: `${host}users/user-role/getUserRolesPermissionMenu`, getUserRolesPermissionMenu: `${host}users/user-role/getUserRolesPermissionMenu`,
@ -69,6 +70,7 @@ export default {
myClass: `${host}occupationlab/achievement/myClass`, // 教师端:我的班级 myClass: `${host}occupationlab/achievement/myClass`, // 教师端:我的班级
deleteReportById: `${host}occupationlab/achievement/deleteReportById`, // 批量删除成绩管理中的项目/批量删除成绩管理中的考核 deleteReportById: `${host}occupationlab/achievement/deleteReportById`, // 批量删除成绩管理中的项目/批量删除成绩管理中的考核
experimentOverview: `${host}occupationlab/achievement/reportDetail`, // 查看实验报告 experimentOverview: `${host}occupationlab/achievement/reportDetail`, // 查看实验报告
schoolCourseByAchievement: `${host}nakadai/nakadai/curriculum/schoolCourseByAchievement`, // 获取学校购买订单后的课程
// 项目管理 // 项目管理
getSystemIdBySchool: `${host}occupationlab/projectManage/getSystemIdBySchool`, // 获取学校下拥有的系统 getSystemIdBySchool: `${host}occupationlab/projectManage/getSystemIdBySchool`, // 获取学校下拥有的系统

@ -187,7 +187,7 @@ export default {
this.month = '6' this.month = '6'
}, },
getschoolCourse() { // getschoolCourse() { //
this.$get(this.api.schoolCourse).then(res => { this.$get(this.api.schoolCourseByAchievement).then(res => {
if (res.data && res.data.length) { if (res.data && res.data.length) {
this.curriculumList = res.data; this.curriculumList = res.data;
this.getData(); this.getData();

@ -404,17 +404,10 @@ export default {
projectName:this.keyword projectName:this.keyword
} }
this.$post(this.api.projectListByCourseId,data).then(res => { this.$post(this.api.projectListByCourseId,data).then(res => {
console.log(res)
let { status, data } = res; let { status, data } = res;
if (status === 200 && data.records) { if (status === 200 && data.records) {
let list = data.records; this.projectData = data.records
let result = []; this.total = data.total
list.map(n => {
n.enable || result.push(n);
});
this.projectDataAll = result;
this.total = result.length;
this.handlePage();
} }
}).catch(err => { }).catch(err => {
}); });
@ -546,7 +539,7 @@ export default {
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.page = val; this.page = val;
this.handlePage(); this.getProjectData();
}, },
goBack() { goBack() {
if (this.isDetail) { if (this.isDetail) {

@ -52,7 +52,11 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="gmtCreate" label="创建时间" align="center" width="200"></el-table-column> <el-table-column prop="gmtCreate" label="创建时间" align="center" width="200"></el-table-column>
<el-table-column prop="founder" label="创建人" align="center" width="200"></el-table-column> <el-table-column prop="founder" label="创建人" align="center" width="200">
<template slot-scope="scope">
{{scope.row.founder || '系统默认管理员'}}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100"> <el-table-column label="操作" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="auth('管理')" type="text" @click="manage(scope.row)">管理</el-button> <el-button v-if="auth('管理')" type="text" @click="manage(scope.row)">管理</el-button>

@ -84,11 +84,11 @@
{{ stateKeys[scope.row.state] }} {{ stateKeys[scope.row.state] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="edit(scope.row,'0',queryData.founder)">查看</el-button> <el-button type="text" @click="edit(scope.row,'0',queryData.founder)">查看</el-button>
<el-button v-if="scope.row.founder != 0" type="text" @click="edit(scope.row,'1',queryData.founder)">编辑</el-button> <el-button v-if="scope.row.founder && (isSuper || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))" type="text" @click="edit(scope.row,'1',queryData.founder)">编辑</el-button>
<el-button v-if="scope.row.founder != 0" type="text" @click="handleDelete(scope.row.projectId)">删除</el-button> <el-button v-if="scope.row.founder && (isSuper || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))" type="text" @click="handleDelete(scope.row.projectId)">删除</el-button>
<el-button v-if="auth('复制')" type="text" @click="copyData(scope.row.projectId)">复制</el-button> <el-button v-if="auth('复制')" type="text" @click="copyData(scope.row.projectId)">复制</el-button>
<el-switch <el-switch
v-if="auth('禁用')" v-if="auth('禁用')"
@ -123,6 +123,7 @@
</template> </template>
<script> <script>
import Setting from "@/setting";
import { mapState, mapActions, mapMutations } from "vuex"; import { mapState, mapActions, mapMutations } from "vuex";
import util from "@/libs/util"; import util from "@/libs/util";
@ -201,7 +202,10 @@ export default {
copyVisible: false, copyVisible: false,
projectName: "", projectName: "",
currentRow: {}, // currentRow: {}, //
listDataAll: [] listDataAll: [],
isSuper: false, //
isAdmin: false, //
roleName: '' //
}; };
}, },
computed: { computed: {
@ -232,7 +236,7 @@ export default {
// this.queryData = this.queryDataStatus // this.queryData = this.queryDataStatus
// }, // },
mounted() { mounted() {
this.getSystemData(); this.getRole()
if(this.queryDataStatus.platformId) { if(this.queryDataStatus.platformId) {
this.queryData = this.queryDataStatus this.queryData = this.queryDataStatus
} }
@ -263,6 +267,16 @@ export default {
}); });
}, },
//
getRole() {
this.$post(`${this.api.getUserAllRoleByToken}?platformId=${Setting.platformId}`).then(res => {
this.isSuper = res.includes('超级管理员')
this.isAdmin = res === '管理员'
this.roleName = res
this.getSystemData();
}).catch(err => {
});
},
getData() { getData() {
this.setSystemId(this.systemId); this.setSystemId(this.systemId);
let data = { let data = {

Loading…
Cancel
Save