| | |
| | | <template #name="{ row }"> |
| | | <span>{{ row.name }}</span> |
| | | <el-tag v-if="row.nodeType == 60" size="mini" effect="plain">v{{ row.versionNumber }}</el-tag> |
| | | |
| | | <el-button icon="el-icon-download" @click="handleDownload(row)" class="treebtn" v-if="row.nodeType == 70" :size="size" text title="下载"></el-button> |
| | | <el-button class="treebtn" :size="size" text v-if="permission.replace_button && row.nodeType == 60 && row.parentIds.indexOf('0,1,') > -1" |
| | | icon="el-icon-switch" type="primary" @click="replacement(row)" placeholder="替换" title="替换"></el-button> |
| | | <!----> |
| | | <el-button icon="el-icon-unlock" class="treebtn" v-if="permission.lock_button && row.nodeType == 60 && row.parentIds.indexOf('0,2') > -1 && row.isLocked != 1"text type="primary" @click="showLockDlg(row)" placeholder="锁定" title="锁定"></el-button> |
| | | |
| | | <el-button icon="el-icon-lock" class="treebtn" :size="size" text |
| | | v-if="permission.lock_button && row.nodeType == 60 && row.parentIds.indexOf('0,2') > -1 && row.isLocked == 1" |
| | | v-if="permission.lock_button && row.nodeType == 60 && (row.parentIds.indexOf('0,2') > -1 || row.parentIds.indexOf('0,3') > -1)&& row.isLocked == 1" |
| | | type="primary" @click="showUnLockDlg(row)" placeholder="解锁" title="解锁"></el-button> |
| | | |
| | | </template> |
| | |
| | | <template #name="{ row }"> |
| | | <span>{{ row.name }}</span> |
| | | <el-tag v-if="row.nodeType == 60" size="mini" effect="plain">v{{ row.versionNumber }}</el-tag> |
| | | <el-button icon="el-icon-download" @click="handleDownload(row)" class="treebtn" v-if="row.nodeType == 70" :size="size" text title="下载"></el-button> |
| | | <!-- 替换 v-if="permission.auto_dispatch"--> |
| | | <el-button class="treebtn" :size="size" text v-if="permission.replace_button && row.nodeType == 60 && row.parentIds.indexOf('0,1,') > -1" |
| | | icon="el-icon-switch" type="primary" @click="replacement(row)" placeholder="替换" title="替换"></el-button> |
| | |
| | | |
| | | import { Delete, Edit, Search, Share, Upload ,Lock,Unlock} from '@element-plus/icons-vue' |
| | | import debounce from 'lodash/debounce'; |
| | | |
| | | import NProgress from 'nprogress'; |
| | | import { downloadXls } from '@/utils/util'; |
| | | import { exportBlob } from '@/api/common'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import ReplaceLeft from './components/ReplaceLeft.vue'; |
| | | import ReplaceRightTop from './components/ReplaceRightTop.vue'; |
| | |
| | | this.onLoad(); |
| | | this.isSearch = !curS |
| | | }, |
| | | handleDownload(row){ |
| | | NProgress.start(); |
| | | exportBlob( |
| | | `/blade-mdm/program/node/download-by-nodeid?nodeId=${row.id}` |
| | | ).then(res => { |
| | | if (res.status !== 200) { |
| | | return this.$message.error(res.msg); |
| | | } |
| | | downloadXls(res.data, `${row.name}`); |
| | | NProgress.done(); |
| | | }); |
| | | }, |
| | | showLockDlg(row){ |
| | | //this.lockForm = row; |
| | | this.lockForm.id = row.id; |