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,
isDetail: true,
userId: this.$store.state.userLoginId,
roleId: this.$store.state.userRoleId.includes(',') ? 2 : Number(this.$store.state.userRoleId),
cacheData: this.$store.state.addClass,
keyword: '',
searchTimer: null,
@ -227,7 +228,7 @@ export default {
}).catch(res => {});
},
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
list.map(n => {
n.id = n.classId

@ -92,6 +92,7 @@
</el-table-column>
<el-table-column label="操作">
<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="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>
@ -207,6 +208,7 @@ export default {
projectNameRepeat: false,
currentRow: {},
projectDataAll: [],
submiting: false
};
},
watch: {
@ -254,6 +256,9 @@ export default {
edit(row){
this.$router.push(`/addproject?id=${row.projectId}`);
},
show(row){
this.$router.push(`/addproject?id=${row.projectId}&show=true`);
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
@ -343,10 +348,9 @@ export default {
})
this.currentRow.pooints = point
this.$message.warning('请修改项目名称')
})
}).catch(res => {})
},
copySubmit(){
// return console.log(11,this.projectNameRepeat)
if(!this.projectName.length) return this.$message.warning('请填写项目名称')
if(this.projectNameRepeat) return this.$message.warning('该项目名称已存在')
let data = this.currentRow
@ -357,10 +361,15 @@ export default {
data.pooints.map(n => {
n.userId = this.userId
})
if(this.submiting) return false
this.submiting = true
this.$post(this.api.addProjectManagement,data).then((res) => {
this.submiting = false
this.$message.success('复制成功');
this.copyVisible = false
this.getData()
}).catch(res => {
this.submiting = false
})
},
goback() {

Loading…
Cancel
Save