ÎļþÃû´Ó Source/UBCS-WEB/src/components/Tree/classifyTrees.vue ÐÞ¸Ä |
| | |
| | | <div style="display: flex; margin-top: 10px"> |
| | | <el-button plain size="small" type="primary" @click="Enable">å¯ç¨</el-button> |
| | | <el-button plain size="small" type="primary" @click="Deactivate">åç¨</el-button> |
| | | <el-button plain size="small" type="primary" @click="ImportExcel">导å
¥</el-button> |
| | | <el-button plain size="small" type="primary" @click.native="ImportExcel">导å
¥</el-button> |
| | | <el-button plain size="small" type="primary" @click="ExportExcel">导åº</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 导åº--> |
| | | <ThemeImport :visible.sync="ThemeImportVisible" :codeClassifyOid="this.codeClassifyOid"></ThemeImport> |
| | | </basic-container> |
| | | </el-main> |
| | | </el-container> |
| | |
| | | copy, |
| | | upVersion, |
| | | stopLose, |
| | | startRelease |
| | | startRelease, |
| | | exportClassify |
| | | } from "@/api/template/templateAttr"; |
| | | import {defaultReferDataGrid,referDataGrid} from '@/api/MasterData/master' |
| | | import func from "@/util/func"; |
| | | export default { |
| | | name: "classifyTrees.vue", |
| | | //使ç¨injectæ¥æ¶åæ° |
| | |
| | | inject: ["crudTreeData"], |
| | | data() { |
| | | return { |
| | | //导å
¥ç¶ææ¡ |
| | | ThemeImportVisible:false, |
| | | selectRow:'', |
| | | //æ èç¹æ¾ç¤ºéè |
| | | TreeFlagCode:false, |
| | |
| | | label: '', |
| | | prop: 'radio', |
| | | width: 60, |
| | | hide: false, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "模æ¿ç¼å·", |
| | |
| | | prop:"lcStatusText", |
| | | display:false |
| | | } |
| | | ] |
| | | ], |
| | | batchImportData: { |
| | | visible: false, |
| | | type: '', |
| | | codeClassifyOid: '' |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | methods: { |
| | | /** 导å
¥ */ |
| | | ImportExcel(){ |
| | | |
| | | this.ThemeImportVisible=true; |
| | | }, |
| | | /** å¯¼åº */ |
| | | ExportExcel(){ |
| | | |
| | | if(this.nodeClickList){ |
| | | exportClassify({oid:this.nodeClickList.oid}).then(res=>{ |
| | | console.log(res) |
| | | func.downloadFileByBlob(res); |
| | | }) |
| | | }else { |
| | | this.$message.warning('请å
éæ©è¦å¯¼åºç主é¢åºåç±»') |
| | | } |
| | | }, |
| | | //模æ¿ç®¡çå·²åå¸ç¼è¾ |
| | | // checkShowEditBtn() { |
| | |
| | | //å¯ç¨ååç¨é½å
å¤æç¶æ |
| | | //å¯ç¨ |
| | | Enable() { |
| | | if (this.FlagObj.lcStatus == "Enabled") { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: 'å½ååç±»ä¸æ¯åç¨ç¶æ' |
| | | }); |
| | | } else { |
| | | this.$confirm('æ¯å¦å°ååç±»ä¸å¹¶å¯ç¨ï¼', 'æç¤º', { |
| | | confirmButtonText: 'æ¯', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | TreeEnable(this.nodeClickList).then(() => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'å¯ç¨æå!' |
| | | }); |
| | | this.getAttr() |
| | | }) |
| | | }).catch(() => { |
| | | if(Object.keys(this.nodeClickList).length<1){ |
| | | this.$message.warning('请å
仿 ä¸éæ©ä¸æ¡æ°æ®') |
| | | }else { |
| | | if (this.FlagObj.lcStatus == "Enabled") { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å¯ç¨' |
| | | type: 'warning', |
| | | message: 'å½ååç±»ä¸æ¯åç¨ç¶æ' |
| | | }); |
| | | }); |
| | | } else { |
| | | this.$confirm('æ¯å¦å°ååç±»ä¸å¹¶å¯ç¨ï¼', 'æç¤º', { |
| | | confirmButtonText: 'æ¯', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | TreeEnable(this.nodeClickList).then(() => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'å¯ç¨æå!' |
| | | }); |
| | | this.getAttr() |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å¯ç¨' |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | }, |
| | | //åç¨ |
| | | Deactivate() { |
| | | if (this.FlagObj.lcStatus === "Disabled") { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: 'å½ååç±»ä¸æ¯å¯ç¨ç¶æ!' |
| | | }); |
| | | } else { |
| | | this.$confirm('æ¯å¦åç¨å½ååç±»ï¼åç¨åï¼ååç±»ä¹å°ä¸è½è¢«ä½¿ç¨ï¼æ¯å¦ç»§ç»ï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | TreeDeactivate(this.nodeClickList).then(() => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'åç¨æå!' |
| | | }); |
| | | this.nodeClickList['flag'] = true; |
| | | this.getAttr() |
| | | }) |
| | | }).catch(() => { |
| | | if(Object.keys(this.nodeClickList).length<1){ |
| | | this.$message.warning('请å
仿 ä¸éæ©ä¸æ¡æ°æ®') |
| | | }else { |
| | | if (this.FlagObj.lcStatus === "Disabled") { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶åç¨' |
| | | type: 'warning', |
| | | message: 'å½ååç±»ä¸æ¯å¯ç¨ç¶æ!' |
| | | }); |
| | | }); |
| | | } else { |
| | | this.$confirm('æ¯å¦åç¨å½ååç±»ï¼åç¨åï¼ååç±»ä¹å°ä¸è½è¢«ä½¿ç¨ï¼æ¯å¦ç»§ç»ï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | TreeDeactivate(this.nodeClickList).then(() => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'åç¨æå!' |
| | | }); |
| | | this.nodeClickList['flag'] = true; |
| | | this.getAttr() |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶åç¨' |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | }, |
| | | //æ ç¹å»äºä»¶ |
| | | async nodeClick(data) { |
| | | //å®ä¹ä¸ä¸ªæ¨¡æ¿å±æ§idï¼æ°æ®æ¯æ¨¡æ¿ç®¡çè¡¨æ ¼éé¢çoid |
| | | if(data.parentId == ""){ |
| | | this.TreeFlagCode=true; |
| | | |
| | | } |
| | | this.nodeClickList = data |
| | | this.ProData=[] |
| | | this.ProData=[]; |
| | | this.selectRow=0; |
| | | try { |
| | | await TreeObjcet(data.oid).then(res => { |
| | | this.FlagObj = res.data.data |