| | |
| | | <el-button link type="primary" size="small" @click="fileView(scope.row)">查看</el-button> |
| | | <el-button link type="primary" v-if="scope.row.dirType!='PROGRAM'" size="small" @click="fileEdit(scope.row)">编辑</el-button> |
| | | <el-button type="primary" v-if="scope.row.dirType!='PROGRAM'" text size="small" @click.stop="viewHistory(scope.row, scope.index)">修改记录</el-button> |
| | | <el-button type="primary" v-if="scope.row.dirType=='REC'" text size="small" @click.stop="changeName(scope.row)">改名</el-button> |
| | | <el-button type="primary" v-if="scope.row.dirType=='SEND'" text size="small" @click.stop="changeName(scope.row)">重命名</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | changeNameSubmit(form,done){ |
| | | axios.post('/blade-mdm/gkw/node/change-file-name',qs.stringify(form)).then(res=>{ |
| | | if (res.data.code == 200) { |
| | | this.$message.success('操作成功!'); |
| | | this.$message.success('操作成功!正在处理文件,请稍后刷新查看。'); |
| | | this.changeNameModel = false; |
| | | } else { |
| | | this.$message({ type: 'error', message: res.data.msg }); |
| | | } |
| | | }).catch(error => { |
| | | this.$message.error(res.data.msg ); |
| | | }); |
| | | }).finally(() => { |
| | | // 不管成功还是失败,都延迟 1 秒后刷新列表 |
| | | setTimeout(() => { |
| | | this.searchTable(this.TreeNode) |
| | | }, 5000); // 1000 毫秒 = 1 秒 |
| | | });; |
| | | |
| | | done(); |
| | | }, |