|
|
@@ -29,7 +29,8 @@
|
|
|
<div v-if="data.type!='模块'" style="font-size: 12px;color: #1c84c6">({{ data.type }})</div>
|
|
|
<el-popover
|
|
|
placement="right"
|
|
|
- trigger="hover">
|
|
|
+ trigger="hover"
|
|
|
+ >
|
|
|
<el-button size="mini" type="primary" @click="handleAdd(data)"
|
|
|
v-hasPermi="['task:project:add']">新增</el-button>
|
|
|
<el-button size="mini" @click="handleUpdate(data)" v-hasPermi="['task:project:edit']">修改</el-button>
|
|
|
@@ -37,14 +38,16 @@
|
|
|
v-hasPermi="['task:project:delete']">删除</el-button>
|
|
|
<el-button size="mini" @click="handleDetail(data)" v-if="data.type==='项目'"
|
|
|
v-hasPermi="['task:project:query']">详情</el-button>
|
|
|
- <i class="el-icon-share" slot="reference"></i>
|
|
|
+ <i class="el-icon-share" slot="reference"
|
|
|
+ v-hasPermi="['task:project:add','task:project:edit','task:project:delete','task:project:query']"></i>
|
|
|
</el-popover>
|
|
|
</span>
|
|
|
</el-tree>
|
|
|
</div>
|
|
|
|
|
|
<!-- 添加或修改项目配置对话框 -->
|
|
|
- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
|
|
|
+ <el-dialog :title="title" :visible.sync="open" @close="cancel" width="500px" append-to-body
|
|
|
+ :close-on-click-modal="false">
|
|
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
|
|
<el-form-item label="名称" prop="projectName">
|
|
|
<el-input v-model="form.projectName" placeholder="请输入名称"/>
|
|
|
@@ -222,20 +225,26 @@ export default {
|
|
|
this.form.viewable = val.join();
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
- handleUpdate(row) {
|
|
|
+ async handleUpdate(row) {
|
|
|
this.reset();
|
|
|
- listProject().then(response => {
|
|
|
+ let arr = []
|
|
|
+ arr.push(listProject().then(response => {
|
|
|
this.projectOptions = this.handleTree(response.data, "id");
|
|
|
- });
|
|
|
- getProject(row.id).then(res => {
|
|
|
+ }))
|
|
|
+
|
|
|
+ arr.push(getDeptUserTree('').then(res => {
|
|
|
+ this.userList = res.data
|
|
|
+ }))
|
|
|
+ arr.push(getProject(row.id).then(res => {
|
|
|
this.form = res.data;
|
|
|
this.open = true;
|
|
|
this.title = "修改项目";
|
|
|
this.typeDisable = true
|
|
|
- });
|
|
|
+ }))
|
|
|
+ await Promise.all(arr)
|
|
|
+ this.$refs.dut.setCheckedNode(this.form.viewable)
|
|
|
},
|
|
|
|
|
|
-
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|