¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/router/axios"; |
| | | //è·åæ å½¢ç»ä»¶æ°æ® |
| | | export const getTreeList = (params) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/codeClassify/referTree', |
| | | method: 'get', |
| | | params:{ |
| | | ...params |
| | | } |
| | | }) |
| | | } |
| | |
| | | <template> |
| | | <basic-container> |
| | | <!-- <avue-crud ref="crud"--> |
| | | <!-- v-loading="loading"--> |
| | | <!-- :data="data"--> |
| | | <!-- :option="option"--> |
| | | <!-- :page="page"--> |
| | | <!-- @sort-change="sortChange"--> |
| | | <!-- @selection-change="selectionChange"--> |
| | | <!-- @on-load="onLoad">--> |
| | | <!-- <template slot="menu">--> |
| | | <!-- <el-button type="text">æåæé®</el-button>--> |
| | | <!-- </template>--> |
| | | <!-- <template slot="menuLeft">--> |
| | | <!-- </template>--> |
| | | <!-- </avue-crud>--> |
| | | |
| | | <div class="testbox"> |
| | | <div style="margin-top: 10px;display: flex;flex-wrap: wrap;width: 100%;"> |
| | | <el-button size="small" type="primary" plain @click="addvisible=true">å¢å |
| | | <FormTemplateDialog |
| | | :visible.sync="addvisible" |
| | | :type="add" |
| | | :templateOid="this.templateOid" |
| | | :codeClassifyOid="this.codeClassifyOid" |
| | | :templateOid="this.templateOids" |
| | | :codeClassifyOid="this.codeClassifyOids" |
| | | :codeRuleOid="this.codeRuleOid" |
| | | :disabledProp="disabledProp" |
| | | :rowOid="rowOid" |
| | | > |
| | | </FormTemplateDialog></el-button> |
| | | |
| | | <el-button size="small" type="primary" plain @click="editvisible=true">ç¼è¾ |
| | | <FormTemplateDialog |
| | | :visible.sync="editvisible" |
| | | :type="edit" |
| | | :templateOid="this.templateOid" |
| | | :codeClassifyOid="this.codeClassifyOid" |
| | | :templateOid="this.templateOids" |
| | | :codeClassifyOid="this.codeClassifyOids" |
| | | :codeRuleOid="this.codeRuleOid" |
| | | :disabledProp="disabledProp" |
| | | :rowOid="rowOid" |
| | | ></FormTemplateDialog></el-button> |
| | | |
| | | <el-button size="small" type="primary" plain>æ¹é导å
¥ç³è¯·</el-button> |
| | | <el-button size="small" type="primary" plain>å岿°æ®å¯¼å
¥</el-button> |
| | | <el-button size="small" type="primary" plain>æ¹éç³è¯·ç¼ç </el-button> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </div> |
| | | <!-- <el-table-column fixed="right" label="æä½" width="120" >--> |
| | | <!-- <template slot-scope="scope" >--> |
| | | <!-- <el-button size="small" type="text" @click.native.prevent="enumDeleteRow(scope.$index, tableData)">--> |
| | | <!-- ç§»é¤--> |
| | | <!-- </el-button>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | </el-table> |
| | | |
| | | </el-row> |
| | | </div> |
| | | <div class="block" style="display: flex;justify-content: flex-end"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="currentPage4" |
| | | :current-page="page.currentPage" |
| | | :page-sizes="page.pageSizes" |
| | | :page-size="page.pageSizes" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | |
| | | </div> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {MasterTable, TableData} from "@/api/GetItem"; |
| | | export default { |
| | | name: "Crud.vue", |
| | | props:{ |
| | | page:{ |
| | | type: Object, |
| | | default: ()=>{ |
| | | return {} |
| | | } |
| | | }, |
| | | templateOid:{ |
| | | type:String, |
| | | default:"" |
| | | }, |
| | | codeClassifyOid:{ |
| | | type:String, |
| | | default:"" |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | addvisible:false, |
| | | editvisible:false, |
| | | findvisible:false, |
| | | templateOid: "78B8C7C5-A042-0B96-FE6D-65421451782A", |
| | | codeClassifyOid: "4524E801-6CC6-92E8-1AC3-2AB9604E8F96", |
| | | templateOids: "78B8C7C5-A042-0B96-FE6D-65421451782A", |
| | | codeClassifyOids: "4524E801-6CC6-92E8-1AC3-2AB9604E8F96", |
| | | codeRuleOid: "B95872A6-9CEA-D490-8F1B-9D26548CAF96", |
| | | rowOid: '6EF696C3-CD87-0E7C-1EA1-8DE3913A95C9', |
| | | disabledProp: ["id"], |
| | |
| | | data: [], |
| | | options:{}, |
| | | option: { |
| | | //é»è®¤é«åº¦, |
| | | align: 'center', |
| | | menuAlign: 'center', |
| | | addBtn: false, |
| | | editBtn: false, |
| | | selection: true, |
| | | selectionFixed: false, |
| | | index: true, |
| | | column: [] |
| | | }, |
| | | List: [], |
| | |
| | | truefalse: "switch", |
| | | number: "number", |
| | | datetime: "datetime", |
| | | }, |
| | | page: { |
| | | total: 0, |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | | pageSizes: [10, 30, 50, 100, 200], |
| | | }, |
| | | tableData:[], |
| | | tableHeadData:[], |
| | |
| | | }, |
| | | methods: { |
| | | handleSizeChange(val){ |
| | | console.log(val) |
| | | this.page.pageSize=val |
| | | this.CrudRend() |
| | | }, |
| | | handleCurrentChange(val){ |
| | | this.page.currentPage=val |
| | | this.CrudRend() |
| | | }, |
| | | // çå¬åå
æ ¼ç¹å»äºä»¶å¹¶å卿£å¨ç¼è¾çè¡ |
| | | handleCellClick(row, column) { |
| | |
| | | //è¡¨æ ¼æ°æ® |
| | | CrudRend() { |
| | | TableData({ |
| | | templateOid: "A12826E4-2B66-6D56-DE30-92BB1D7F607F", |
| | | codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3", |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | page: this.page.currentPage, |
| | | limit:9, |
| | | _: 1685089123575 |
| | | limit:this.page.pageSize, |
| | | }).then(res => { |
| | | this.page.total = res.data.total; |
| | | this.data = res.data.data; |
| | |
| | | order = "desc"; |
| | | } |
| | | TableData({ |
| | | templateOid: "A12826E4-2B66-6D56-DE30-92BB1D7F607F", |
| | | codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3", |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | order: order, |
| | | sort: val.prop, |
| | | page: this.page.currentPage, |
| | |
| | | //å页巿° |
| | | async onLoad(val) { |
| | | await TableData({ |
| | | templateOid: "A12826E4-2B66-6D56-DE30-92BB1D7F607F", |
| | | codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3", |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | page: val.currentPage, |
| | | limit: val.pageSize, |
| | | _: 1685089123575 |
| | | }).then(res => { |
| | | this.data = res.data.data; |
| | | }) |
| | |
| | | TreeObjcet, |
| | | TreeEnable, |
| | | TreeDeactivate, |
| | | importClassify, |
| | | gridCodeClassifyTemplate, |
| | | getObjectByOid, |
| | | gridCodeClassifyTemplateAttr, |
| | |
| | | editSave, |
| | | copy |
| | | } from "@/api/template/templateAttr"; |
| | | import done from "@/views/work/done"; |
| | | |
| | | export default { |
| | | name: "classifyTrees.vue", |
| | |
| | | getAtrrList().then(res => { |
| | | this.Treedata = res.data; |
| | | this.CloneTreedata = res.data; |
| | | this.Treedata.forEach((item) => { |
| | | this.Treedata.forEach(() => { |
| | | for (let i = 0; i < this.Treedata.length; i++) { |
| | | this.Treedata[i].value = i; |
| | | } |
| | |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | TreeEnable(this.nodeClickList).then((res) => { |
| | | TreeEnable(this.nodeClickList).then(() => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'å¯ç¨æå!' |
| | |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | TreeDeactivate(this.nodeClickList).then((res) => { |
| | | TreeDeactivate(this.nodeClickList).then(() => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'åç¨æå!' |
| | |
| | | } else { |
| | | let codeClassifyOid = this.codeClassifyOid |
| | | this.$set(row, "codeclassifyoid", codeClassifyOid) |
| | | addSave(row).then(res => { |
| | | addSave(row).then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "æ·»å æå!" |
| | |
| | | }, |
| | | //模æ¿ç®¡çä¿®æ¹ |
| | | CrudRowUpdata(row,index,done) { |
| | | editSave(row).then((res) => { |
| | | editSave(row).then(() => { |
| | | this.CrudRend() |
| | | this.$message({ |
| | | type: "success", |
| | |
| | | }, |
| | | //模æ¿ç®¡çå é¤ |
| | | CrudRowDel(row) { |
| | | deleteData(row).then(res => { |
| | | deleteData(row).then(()=> { |
| | | this.CrudRend() |
| | | }).catch(res => { |
| | | this.$message({ |
| | |
| | | //éæ°èµå¼CloneSelectä¼ éçæ°æ®ä¸ºè¾å
¥æ¡å¯ä»¥ä¿®æ¹çæ°æ®ï¼CloneModelæäº¤è¡¨åè¾å
¥æ¡ååç»å®æ°æ® |
| | | this.CloneSelect[0].id=this.CloneModel.id; |
| | | this.CloneSelect[0].name=this.CloneModel.name; |
| | | copy(this.CloneSelect[0]).then(res=>{ |
| | | copy(this.CloneSelect[0]).then(()=>{ |
| | | //å 为æ¯åµå¥å¼¹çªæä»¥æå¨å
³éCloneinnerVisibleï¼CloneVisible两个弹çªã |
| | | this.CloneinnerVisible=false |
| | | this.CloneVisible=false |
| | |
| | | <el-container> |
| | | <el-aside> |
| | | <basic-container style="height: 85vh; max-height: 155vh; overflow-y: scroll;"> |
| | | <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" :defaultExpandAll="false" |
| | | <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="Treedata" :defaultExpandAll="false" |
| | | :option="Treeoption" |
| | | style="height: 80.5vh;padding-top: 5px;padding-bottom: 30px" |
| | | @node-click=" nodeClick" |
| | | @check-change="checkChange" |
| | | ></avue-tree> |
| | | </basic-container> |
| | | </el-aside> |
| | | <el-main> |
| | | <TableCrud></TableCrud> |
| | | <TableCrud :page="this.page" :templateOid="this.templateOid" :codeClassifyOid="this.codeClassifyOid"></TableCrud> |
| | | </el-main> |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getAtrrList, TreeCheckDel, TreeDel, TreeSave} from "@/api/template/templateAttr"; |
| | | |
| | | import {getTreeList} from "@/api/MasterData/master" |
| | | export default { |
| | | name: "items.vue", |
| | | data(){ |
| | | return{ |
| | | // å页 |
| | | page: { |
| | | total: 0, |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | | pageSizes: [10, 30, 50, 100, 200], |
| | | }, |
| | | templateOid: "A12826E4-2B66-6D56-DE30-92BB1D7F607F", |
| | | codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3", |
| | | CloneTreeAvueform:{}, |
| | | loading:false, |
| | | CloneTreedata:[], |
| | | Treedata:[], |
| | | Treeoption: { |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | defaultExpandAll: false, |
| | | menu: false, |
| | | // //è¿ä¸ªæ¯å¤é |
| | | // multiple: true, |
| | | lazy: true, |
| | | // treeLoad:function (node,resolve){ |
| | | // console.log(node) |
| | | // console.log(resolve) |
| | | // } |
| | | treeLoad:function (node, resolve){ |
| | | if(node.loading){ |
| | | const parentId = (node.level === 0) ? 0 : node.data.oid; |
| | | const parentBtmName = node.data.attributes.btmname |
| | | getTreeList({parentOid:parentId,parentBtmName:parentBtmName}).then(res=>{ |
| | | console.log(res) |
| | | }) |
| | | } |
| | | }, |
| | | }, |
| | | nodeClickList: "", |
| | | } |
| | | }, |
| | | created() { |
| | | this.getAttr() |
| | | // this.getAttr() |
| | | this.getTreeList() |
| | | }, |
| | | methods:{ |
| | | getAttr() { |
| | | getAtrrList().then(res => { |
| | | this.Treedata = res.data; |
| | | this.CloneTreedata = res.data; |
| | | this.Treedata.forEach((item) => { |
| | | for (let i = 0; i < this.Treedata.length; i++) { |
| | | this.Treedata[i].value = i; |
| | | } |
| | | }) |
| | | //è°ç¨ä¿®æ¹å±æ§åæ¹æ³ |
| | | this.ModifyProperties(this.CloneTreedata, 'name', 'label'); |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | getTreeList(){ |
| | | getTreeList({'conditionMap[id]': 'wupin'}).then(res=>{ |
| | | this.Treedata=res.data |
| | | this.ModifyProperties(this.Treedata, 'text', 'label'); |
| | | console.log(this.Treedata) |
| | | }).catch(res=>{ |
| | | console.log(res) |
| | | }) |
| | | }, |
| | | |
| | | //å®ä¹ä¸ä¸ªä¿®æ¹æ°æ®å±æ§åçæ¹æ³ |
| | | ModifyProperties(obj, oldName, newName) { |
| | | for (let key in obj) { |
| | |
| | | } |
| | | }, |
| | | //æ èç¹æ·»å æé® |
| | | TreeAdd() { |
| | | this.TreeAddFormVisible = true; |
| | | // 夿å½åæ¯å¦æç¹å»å项 |
| | | if (this.nodeClickList !== "") { |
| | | this.TreeFlag = true |
| | | } |
| | | }, |
| | | //æ èç¹æ·»å äºä»¶ |
| | | TreeAddHandler() { |
| | | const data = this.TreeAddform |
| | | this.$set(data, "parentCodeClassifyOid", this.nodeClickList.oid) |
| | | TreeSave(data).then(() => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æ·»å æå!' |
| | | }); |
| | | this.getAttr(); |
| | | this.TreeAddFormVisible = false |
| | | this.TreeAddform = "" |
| | | }).catch(res => { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: res |
| | | }); |
| | | }) |
| | | }, |
| | | // TreeAdd() { |
| | | // this.TreeAddFormVisible = true; |
| | | // // 夿å½åæ¯å¦æç¹å»å项 |
| | | // if (this.nodeClickList !== "") { |
| | | // this.TreeFlag = true |
| | | // } |
| | | // }, |
| | | // //æ èç¹æ·»å äºä»¶ |
| | | // TreeAddHandler() { |
| | | // const data = this.TreeAddform |
| | | // this.$set(data, "parentCodeClassifyOid", this.nodeClickList.oid) |
| | | // TreeSave(data).then(() => { |
| | | // this.$message({ |
| | | // type: 'success', |
| | | // message: 'æ·»å æå!' |
| | | // }); |
| | | // this.getAttr(); |
| | | // this.TreeAddFormVisible = false |
| | | // this.TreeAddform = "" |
| | | // }).catch(res => { |
| | | // this.$message({ |
| | | // type: 'warning', |
| | | // message: res |
| | | // }); |
| | | // }) |
| | | // }, |
| | | //æ èç¹å é¤æé® |
| | | TreeDel() { |
| | | this.$confirm('æ¯å¦å é¤å½åéæ©çåç±»ï¼å°ä¼æååç±»ä¸å¹¶å é¤ï¼å¦æåå¨ç¼ç æ°æ®å°ä¸è½è¢«å é¤ï¼æ¯å¦ç»§ç»ï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning', |
| | | customClass: 'my-messagebox', |
| | | }).then(() => { |
| | | TreeCheckDel(this.nodeClickList).then(res => { |
| | | if (res.data.data) { |
| | | TreeDel(this.nodeClickList).then(() => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'å 餿å!' |
| | | }); |
| | | this.getAttr(); |
| | | }).catch(res => { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: res |
| | | }); |
| | | }) |
| | | } else { |
| | | this.$confirm('å½åæ°æ®å
嫿ä¸çº§æ°æ®ï¼è¦å é¤çè¯ä¼åä¸çº§æ°æ®ä¸èµ·å é¤ï¼ä½ 确认继ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning', |
| | | customClass: 'my-messageboxs', |
| | | }).then(() => { |
| | | TreeDel(this.nodeClickList).then(() => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'å 餿å!' |
| | | }); |
| | | this.getAttr(); |
| | | }).catch(res => { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: res |
| | | }); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // TreeDel() { |
| | | // this.$confirm('æ¯å¦å é¤å½åéæ©çåç±»ï¼å°ä¼æååç±»ä¸å¹¶å é¤ï¼å¦æåå¨ç¼ç æ°æ®å°ä¸è½è¢«å é¤ï¼æ¯å¦ç»§ç»ï¼', 'æç¤º', { |
| | | // confirmButtonText: 'ç¡®å®', |
| | | // cancelButtonText: 'åæ¶', |
| | | // type: 'warning', |
| | | // customClass: 'my-messagebox', |
| | | // }).then(() => { |
| | | // TreeCheckDel(this.nodeClickList).then(res => { |
| | | // if (res.data.data) { |
| | | // TreeDel(this.nodeClickList).then(() => { |
| | | // this.$message({ |
| | | // type: 'success', |
| | | // message: 'å 餿å!' |
| | | // }); |
| | | // this.getAttr(); |
| | | // }).catch(res => { |
| | | // this.$message({ |
| | | // type: 'warning', |
| | | // message: res |
| | | // }); |
| | | // }) |
| | | // } else { |
| | | // this.$confirm('å½åæ°æ®å
嫿ä¸çº§æ°æ®ï¼è¦å é¤çè¯ä¼åä¸çº§æ°æ®ä¸èµ·å é¤ï¼ä½ 确认继ç»?', 'æç¤º', { |
| | | // confirmButtonText: 'ç¡®å®', |
| | | // cancelButtonText: 'åæ¶', |
| | | // type: 'warning', |
| | | // customClass: 'my-messageboxs', |
| | | // }).then(() => { |
| | | // TreeDel(this.nodeClickList).then(() => { |
| | | // this.$message({ |
| | | // type: 'success', |
| | | // message: 'å 餿å!' |
| | | // }); |
| | | // this.getAttr(); |
| | | // }).catch(res => { |
| | | // this.$message({ |
| | | // type: 'warning', |
| | | // message: res |
| | | // }); |
| | | // }) |
| | | // }).catch(() => { |
| | | // this.$message({ |
| | | // type: 'info', |
| | | // message: '已忶å é¤' |
| | | // }); |
| | | // }); |
| | | // } |
| | | // }) |
| | | // }).catch(() => { |
| | | // this.$message({ |
| | | // type: 'info', |
| | | // message: '已忶å é¤' |
| | | // }); |
| | | // }); |
| | | // }, |
| | | nodeClick(data){ |
| | | this.nodeClickList = data |
| | | console.log(data) |
| | |
| | | proxy: { |
| | | '/api': { |
| | | //æ¬å°æå¡æ¥å£å°å |
| | | target: 'http://localhost:37000', |
| | | // target: 'http://192.168.1.63:37000', |
| | | // target: 'http://localhost:37000', |
| | | // target: 'http://localhost:37000', |
| | | // target: 'http://192.168.1.51:37000', |
| | | //target: 'http://192.168.3.7:37000', |
| | | // target: 'http://dev.vci-tech.com:37000', |
| | | //target: 'http://dev.vci-tech.com:37000', |
| | | // target: 'http://192.168.1.51:37000/', |
| | | // target: 'http://localhost:37000', |
| | | // target: 'http://192.168.1.63:37000', |
| | | //target: 'http://192.168.3.7:37000', |
| | | target: 'http://dev.vci-tech.com:37000', |
| | | //target: 'http://192.168.1.51:37000/', |
| | | //è¿ç¨æ¼ç¤ºæå¡å°å,å¯ç¨äºç´æ¥å¯å¨é¡¹ç® |
| | | // target: 'https://saber.bladex.vip/api', |
| | | ws: true, |