|
|
|
@ -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() { |
|
|
|
|