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