| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="treecFileData" style="width: 100%"> |
| | | <el-table-column prop="name" label="名称" /> |
| | | <el-table-column prop="fileModifyTime" label="创建日期" /> |
| | | <el-table-column prop="fileModifyTime" label="修改日期" /> |
| | | <el-table-column prop="fileSizeDisplay" label="大小" /> |
| | | <el-table-column fixed="right" label="操作" min-width="120"> |
| | | <el-table-column prop="name" label="名称"/> |
| | | <el-table-column prop="fileModifyTime" label="创建日期" width="160"/> |
| | | <el-table-column prop="fileModifyTime" label="修改日期" width="160"/> |
| | | <el-table-column prop="fileSizeDisplay" label="大小" width="100"/> |
| | | <el-table-column fixed="right" label="操作" min-width="110"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" @click="fileView(scope.row)">查看</el-button> |
| | | <el-button link type="primary" size="small" @click="fileEdit(scope.row)">编辑</el-button> |
| | | <el-button type="primary" text size="small" @click.stop="viewHistory(scope.row, scope.index)">修改记录</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=='SEND'" text size="small" @click.stop="changeName(scope.row)">重命名</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <code-diff :old-string="this.content1" :new-string="this.content2" output-format="side-by-side" :hideStat="true" :filename="codeDiffFileName1" :newFilename="codeDiffFileName2"/> |
| | | </div> |
| | | </el-drawer> |
| | | |
| | | <el-dialog title="修改文件名" width="400" append-to-body v-model="changeNameModel"> |
| | | <avue-form :option="changeNameOption" v-model="changeNameForm" @submit="changeNameSubmit"> |
| | | |
| | | </avue-form> |
| | | |
| | | </el-dialog> |
| | | </template> |
| | | <script> |
| | | import { |
| | | getFileChangeList |
| | | } from '@/api/wel/changehis'; |
| | | import { pageHeaderEmits } from 'element-plus'; |
| | | import qs from 'qs'; |
| | | export default { |
| | | name: 'OrganizationTree', |
| | | components: {}, |
| | |
| | | filterData: [], // 过滤后的数据 |
| | | activeNode: null, |
| | | |
| | | changeNameModel:false, |
| | | changeNameForm : {}, |
| | | changeNameOption:{ |
| | | labelWidth:80, |
| | | size:'mini', |
| | | column:[ |
| | | { |
| | | span:22, |
| | | label:'文件名', |
| | | prop:"name" |
| | | } |
| | | ] |
| | | }, |
| | | defaultKeys: [], |
| | | fileOptionTitle: "", |
| | | fileContent: "", |
| | |
| | | }, |
| | | fileView(row) { |
| | | this.fileOptionTitle = "查看"; |
| | | this.getFileContent(row); |
| | | if(row.dirType != 'PROGRAM'){ |
| | | this.getFileContent(row); |
| | | }else{ |
| | | this.getProgramDirFileContent(row); |
| | | } |
| | | }, |
| | | fileEdit(row) { |
| | | this.fileOptionTitle = "编辑"; |
| | |
| | | this.getFileContent(row); |
| | | }, |
| | | viewHistory(row){ |
| | | console.log(row); |
| | | this.viewHisModel = true; |
| | | this.queryHis.machineFileId = row.id; |
| | | this.onLoadHis(); |
| | | }, |
| | | |
| | | changeName(row){ |
| | | //alert(row.id) |
| | | this.changeNameForm.id = row.id; |
| | | this.changeNameForm.name = row.name; |
| | | this.changeNameModel = true; |
| | | }, |
| | | 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.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(); |
| | | }, |
| | | searchChangeHis(params, done) { |
| | | let data = {} |
| | | console.log(params) |
| | |
| | | }, |
| | | hisCompare(row){ |
| | | //文件比对 |
| | | this.loading = true; |
| | | this.loading = true; |
| | | axios({ |
| | | url: '/blade-mdm/gkw/node/his-compare', |
| | | method: 'get', |
| | |
| | | } |
| | | ); |
| | | }, |
| | | getProgramDirFileContent(row) { |
| | | this.loading = true; |
| | | axios({ |
| | | url: '/blade-mdm/ossfile/file-content', |
| | | method: 'get', |
| | | params: {ossFileName:row.ossName}, |
| | | }).then( |
| | | res => { |
| | | this.loading = false; |
| | | this.fileDialogVisible = true; |
| | | this.fileContent = res.data.data; |
| | | } |
| | | ); |
| | | }, |
| | | onQuery() { |
| | | this.size = 10; |
| | | this.searchTable(this.TreeNode); |