master
yujialong 4 years ago
parent 1ab83a98c5
commit 0978dad5cb
  1. 3
      src/components/page/AddAssessment.vue
  2. 13
      src/components/page/Project.vue

@ -125,6 +125,7 @@ export default {
systemId: this.$config.systemId, systemId: this.$config.systemId,
isDetail: true, isDetail: true,
userId: this.$store.state.userLoginId, userId: this.$store.state.userLoginId,
roleId: this.$store.state.userRoleId.includes(',') ? 2 : Number(this.$store.state.userRoleId),
cacheData: this.$store.state.addClass, cacheData: this.$store.state.addClass,
keyword: '', keyword: '',
searchTimer: null, searchTimer: null,
@ -227,7 +228,7 @@ export default {
}).catch(res => {}); }).catch(res => {});
}, },
getClass(){ getClass(){
this.$get(`${this.api.getMineClass}?userId=${this.userId}&className=${this.keyword}`).then(res => { this.$get(`${this.api.getMineClass}?userId=${this.userId}&className=${this.keyword}&role=${this.roleId == 13 ? 2 : (this.roleId == 14 ? 3 : this.roleId)}`).then(res => {
let list = res.list let list = res.list
list.map(n => { list.map(n => {
n.id = n.classId n.id = n.classId

@ -92,6 +92,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" v-auth @click="show(scope.row)">查看</el-button>
<el-button type="text" v-auth @click="edit(scope.row)" v-if="roleId == 1 || (roleId == 13 && scope.row.founder != '超级管理员') || (roleId == 14 && scope.row.founder == '老师')">编辑</el-button> <el-button type="text" v-auth @click="edit(scope.row)" v-if="roleId == 1 || (roleId == 13 && scope.row.founder != '超级管理员') || (roleId == 14 && scope.row.founder == '老师')">编辑</el-button>
<el-button type="text" v-auth @click="delData(scope.row)" v-if="roleId == 1 || (roleId == 13 && scope.row.founder != '超级管理员') || (roleId == 14 && scope.row.founder == '老师')">删除</el-button> <el-button type="text" v-auth @click="delData(scope.row)" v-if="roleId == 1 || (roleId == 13 && scope.row.founder != '超级管理员') || (roleId == 14 && scope.row.founder == '老师')">删除</el-button>
<el-button type="text" @click="copyData(scope.row)">复制</el-button> <el-button type="text" @click="copyData(scope.row)">复制</el-button>
@ -207,6 +208,7 @@ export default {
projectNameRepeat: false, projectNameRepeat: false,
currentRow: {}, currentRow: {},
projectDataAll: [], projectDataAll: [],
submiting: false
}; };
}, },
watch: { watch: {
@ -254,6 +256,9 @@ export default {
edit(row){ edit(row){
this.$router.push(`/addproject?id=${row.projectId}`); this.$router.push(`/addproject?id=${row.projectId}`);
}, },
show(row){
this.$router.push(`/addproject?id=${row.projectId}&show=true`);
},
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
@ -343,10 +348,9 @@ export default {
}) })
this.currentRow.pooints = point this.currentRow.pooints = point
this.$message.warning('请修改项目名称') this.$message.warning('请修改项目名称')
}) }).catch(res => {})
}, },
copySubmit(){ copySubmit(){
// return console.log(11,this.projectNameRepeat)
if(!this.projectName.length) return this.$message.warning('请填写项目名称') if(!this.projectName.length) return this.$message.warning('请填写项目名称')
if(this.projectNameRepeat) return this.$message.warning('该项目名称已存在') if(this.projectNameRepeat) return this.$message.warning('该项目名称已存在')
let data = this.currentRow let data = this.currentRow
@ -357,10 +361,15 @@ export default {
data.pooints.map(n => { data.pooints.map(n => {
n.userId = this.userId n.userId = this.userId
}) })
if(this.submiting) return false
this.submiting = true
this.$post(this.api.addProjectManagement,data).then((res) => { this.$post(this.api.addProjectManagement,data).then((res) => {
this.submiting = false
this.$message.success('复制成功'); this.$message.success('复制成功');
this.copyVisible = false this.copyVisible = false
this.getData() this.getData()
}).catch(res => {
this.submiting = false
}) })
}, },
goback() { goback() {

Loading…
Cancel
Save