| | |
| | | "classlist-polyfill": "^1.2.0", |
| | | "crypto-js": "^4.0.0", |
| | | "element-ui": "^2.15.6", |
| | | "instead": "^1.0.3", |
| | | "js-base64": "^2.5.1", |
| | | "js-cookie": "^2.2.0", |
| | | "js-md5": "^0.7.3", |
| | |
| | | return request({ |
| | | url: '/api/ubcs-omd/link-type/get-from-table', |
| | | method: 'get', |
| | | params: { |
| | | params: { |
| | | domain: domain |
| | | } |
| | | }) |
| | |
| | | }) |
| | | } |
| | | |
| | | export const btmPage = (current,size,params) => { |
| | | export const linkPage = (current,size,params) => { |
| | | return request ({ |
| | | url: '/api/ubcs-omd/link-type/page', |
| | | method: 'get', |
| | |
| | | <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"> |
| | | <div> |
| | | <el-table :data="tableData" style="width: 100%" @cell-click="handleCellClick" @cell-dblclick="dbclick"> |
| | | <div v-for="(item,index) in this.tableHeadData" :key="index"> |
| | | <el-table-column :label="item.label" :prop="item.prop"> |
| | | <!-- ç¼è¾åå±ç¤ºé»è¾ --> |
| | | <template slot-scope="{ row }"> |
| | | <el-input v-if="editingRow === row && editShow== item.prop" v-model="row[item.prop]" @blur="saveRow"></el-input> |
| | | <span v-else>{{row[item.prop]}}</span> |
| | | </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> |
| | | <template> |
| | | <div style="display: flex;justify-content: right;margin-top: 15px"> |
| | | <el-button type="primary" size="small">ä¿å</el-button> |
| | | <el-button size="small" @click="enumVisible=false">åæ¶</el-button> |
| | | </div> |
| | | </template> |
| | | <!-- <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" |
| | | :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" |
| | | :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> |
| | | <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> |
| | | <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> |
| | | <el-button size="small" type="primary" plain>å¯¼åº |
| | | <transfer filter-placeholder="请è¾å
¥æ¼é³å
¨æ¼æè
æ¼é³ç¼©å" ></transfer> |
| | | </el-button> |
| | | <el-button size="small" type="primary" plain @click="findvisible=true">æ¥è¯¢ |
| | | <advancedQuery :visible.sync="findvisible" :options="this.options"></advancedQuery> |
| | | </el-button> |
| | | <el-button size="small" type="primary" plain>ç¸ä¼¼é¡¹æ¥è¯¢</el-button> |
| | | <el-button size="small" type="primary" plain style="margin-left: 1px;margin-top:10px">å·æ°</el-button> |
| | | <el-input placeholder="请è¾å
¥å
³é®åæå车æ¥è¯¢" style="width: 180px;margin-left: 5px;margin-top:10px" size="small"></el-input> |
| | | </div> |
| | | <el-row style="height: 700px;width: 100%"> |
| | | <el-table :data="tableData" style="" @cell-click="handleCellClick" max-height="700" @selection-change="handleSelectionChange" @sort-change="sortChange"> |
| | | <el-table-column |
| | | type="selection" |
| | | fixed |
| | | width="55"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | type="index" |
| | | fixed |
| | | label="åºå·" |
| | | width="55"> |
| | | </el-table-column> |
| | | <div v-for="(item,index) in this.tableHeadData" :key="index"> |
| | | <el-table-column :label="item.label" :prop="item.prop" :sortable="item.sortable" :width="item.width"> |
| | | <!-- ç¼è¾åå±ç¤ºé»è¾ --> |
| | | <template slot-scope="{ row }"> |
| | | <el-input v-if="editingRow === row && editShow== item.prop" v-model="row[item.prop]" @blur="saveRow"></el-input> |
| | | <span v-else>{{row[item.prop]}}</span> |
| | | <el-switch |
| | | v-if="editShow === 'true'" |
| | | v-model="row[item.prop]" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | </div> |
| | | </template> |
| | | </avue-crud> |
| | | <!-- <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" |
| | | :page-sizes="page.pageSizes" |
| | | :page-size="page.pageSizes" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="page.total"> |
| | | </el-pagination> |
| | | </div> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {MasterTable, TableData} from "@/api/GetItem"; |
| | | |
| | | export default { |
| | | name: "Crud.vue", |
| | | data() { |
| | | return { |
| | | addvisible:false, |
| | | editvisible:false, |
| | | findvisible:false, |
| | | templateOid: "78B8C7C5-A042-0B96-FE6D-65421451782A", |
| | | codeClassifyOid: "4524E801-6CC6-92E8-1AC3-2AB9604E8F96", |
| | | codeRuleOid: "B95872A6-9CEA-D490-8F1B-9D26548CAF96", |
| | | rowOid: '6EF696C3-CD87-0E7C-1EA1-8DE3913A95C9', |
| | | disabledProp: ["id"], |
| | | editingRow:null, |
| | | editShow: "", |
| | | editAttr:"", |
| | | loading: false, |
| | | data: [], |
| | | options:{}, |
| | | option: { |
| | | //é»è®¤é«åº¦, |
| | | align: 'center', |
| | |
| | | } |
| | | }, |
| | | computed:{ |
| | | editable(){ |
| | | this.tableData.forEach(item=>{ |
| | | this.items=item |
| | | }) |
| | | return this.editShow === this.editingRow[this.items.prop]; |
| | | } |
| | | |
| | | }, |
| | | created() { |
| | | this.CrudHeaderRend(); |
| | |
| | | this.doLayout() |
| | | }, |
| | | methods: { |
| | | handleSizeChange(val){ |
| | | console.log(val) |
| | | }, |
| | | // çå¬åå
æ ¼ç¹å»äºä»¶å¹¶å卿£å¨ç¼è¾çè¡ |
| | | handleCellClick(row, column) { |
| | | this.editingRow = row; |
| | | this.editShow = column.property; |
| | | console.log( this.editingRow['name'], this.editShow) |
| | | }, |
| | | //æä¸¾æ³¨å
¥å é¤ |
| | | //å é¤ |
| | | enumDeleteRow(row) { |
| | | console.log(row) |
| | | this.tableData.splice(row, 1) |
| | |
| | | functionId: 5, |
| | | _: 1685067339479 |
| | | }).then(res => { |
| | | this.options=res.data.tableDefineVO.seniorQueryColumns |
| | | this.List = res.data.tableDefineVO.cols[0]; |
| | | this.List.forEach(item => { |
| | | let columnItem = { |
| | |
| | | templateOid: "A12826E4-2B66-6D56-DE30-92BB1D7F607F", |
| | | codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3", |
| | | page: this.page.currentPage, |
| | | limit: this.page.pageSize, |
| | | limit:9, |
| | | _: 1685089123575 |
| | | }).then(res => { |
| | | this.page.total = res.data.total; |
| | |
| | | }, |
| | | //å页巿° |
| | | async onLoad(val) { |
| | | console.log(val) |
| | | await TableData({ |
| | | templateOid: "A12826E4-2B66-6D56-DE30-92BB1D7F607F", |
| | | codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3", |
| | |
| | | }) |
| | | }, |
| | | //å¤é |
| | | selectionChange(row) { |
| | | handleSelectionChange(row) { |
| | | console.log(row) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | <style lang="scss" scoped> |
| | | .testbox { |
| | | .el-table--scrollable-x .el-table__body-wrapper { |
| | | overflow: auto !important; |
| | | } |
| | | |
| | | .el-table__fixed-right-patch { |
| | | background-color: #f5f7fa !important; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | } |
| | | }) |
| | | //è°ç¨ä¿®æ¹å±æ§åæ¹æ³ |
| | | this.ModifyProperties(this.Treedata, 'text', 'label'); |
| | | this.ModifyProperties(this.CloneTreedata, 'text', 'label'); |
| | | this.ModifyProperties(this.CloneTreedata, 'name', 'label'); |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | |
| | | import TableCrud from "@/components/Crud/Crud" |
| | | import originalAdd from "@/views/modeling/originalAdd" |
| | | import FormTemplateDialog from "@/components/FormTemplate/index" |
| | | import linkTypeAdd from "@/views/modeling/LinkTypeAdd" |
| | | |
| | | // å°å·¥å
·å½æ°æ·»å å°å
¨å± |
| | | import utilFunc from './util/func' |
| | |
| | | Vue.component('referBtmTypeCrudDialog',referBtmTypeCrudDialog) |
| | | Vue.component('referSelectBtmAttrDialog',referSelectBtmAttrDialog) |
| | | Vue.component('FormTemplateDialog',FormTemplateDialog) |
| | | Vue.component('LinkTypeAdd',linkTypeAdd) |
| | | |
| | | // å è½½ç¸å
³urlå°å |
| | | Object.keys(urls).forEach(key => { |
| | |
| | | <el-container> |
| | | <el-aside> |
| | | <basic-container style="height: 85vh; max-height: 155vh; overflow-y: scroll;"> |
| | | <avue-tree :option="option" :data="data" v-model="form" style="height: 80.5vh;padding-top: 5px;padding-bottom: 30px"></avue-tree> |
| | | <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" :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> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getAtrrList, TreeCheckDel, TreeDel, TreeSave} from "@/api/template/templateAttr"; |
| | | |
| | | export default { |
| | | name: "items.vue", |
| | | data(){ |
| | | return{ |
| | | form:{}, |
| | | data:[ |
| | | { |
| | | value:0, |
| | | label:'ä¸çº§é¨é¨', |
| | | children:[ |
| | | { |
| | | value:1, |
| | | label:'ä¸çº§é¨é¨1', |
| | | },{ |
| | | value:2, |
| | | label:'ä¸çº§é¨é¨2', |
| | | } |
| | | ] |
| | | },{ |
| | | value:3, |
| | | label:'äºçº§é¨é¨', |
| | | children:[ |
| | | { |
| | | value:4, |
| | | label:'äºçº§é¨é¨1', |
| | | },{ |
| | | value:5, |
| | | label:'äºçº§é¨é¨2', |
| | | } |
| | | ] |
| | | CloneTreeAvueform:{}, |
| | | loading:false, |
| | | CloneTreedata:[], |
| | | Treeoption: { |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | defaultExpandAll: false, |
| | | menu: false, |
| | | // //è¿ä¸ªæ¯å¤é |
| | | // multiple: true, |
| | | }, |
| | | nodeClickList: "", |
| | | } |
| | | }, |
| | | created() { |
| | | this.getAttr() |
| | | }, |
| | | 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) |
| | | }) |
| | | }, |
| | | //å®ä¹ä¸ä¸ªä¿®æ¹æ°æ®å±æ§åçæ¹æ³ |
| | | ModifyProperties(obj, oldName, newName) { |
| | | for (let key in obj) { |
| | | if (key === oldName) { |
| | | obj[newName] = obj[key]; |
| | | delete obj[key]; |
| | | } |
| | | ], |
| | | option:{ |
| | | title:'ææ¯æ é¢', |
| | | filterText:"æç´¢å
³é®åèªå®ä¹", |
| | | defaultExpandAll:true, |
| | | addBtnText:'æ°å¢èªå®ä¹ææ¡', |
| | | editBtnText:'ä¿®æ¹èªå®ä¹ææ¡', |
| | | delBtnText:'å é¤èªå®ä¹ææ¡', |
| | | defaultExpandedKeys:[1], |
| | | height:900, |
| | | formOption:{ |
| | | labelWidth:100, |
| | | column:[{ |
| | | label:'èªå®ä¹é¡¹', |
| | | prop:'label' |
| | | }], |
| | | }, |
| | | props:{ |
| | | labelText:'æ é¢', |
| | | label:'label', |
| | | value:'value', |
| | | children:'children' |
| | | if (typeof obj[key] === 'object') { |
| | | this.ModifyProperties(obj[key], oldName, newName); |
| | | } |
| | | } |
| | | }, |
| | | //æ èç¹æ·»å æé® |
| | | 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: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | nodeClick(data){ |
| | | this.nodeClickList = data |
| | | console.log(data) |
| | | } |
| | | } |
| | | } |
| | |
| | | <el-card> |
| | | <avue-crud :table-loading="loading" :data="mappingData" :option="optionMapping" ref="crudMapping" |
| | | @row-update="handleMapingUpdate" @row-click="handleMapingClick" |
| | | @row-dblclick="handleMapingRowClick" @selection-change="selectionChange" |
| | | @select="setCurrentRow" @select-all="handleSelectAll"> |
| | | @row-dblclick="handleMapingRowClick" @selection-change="selectionChange" @select="setCurrentRow" |
| | | @select-all="handleSelectAll"> |
| | | <template slot="menuLeft"> |
| | | <el-button icon="el-icon-plus" size="small" type="primary" :disabled="disabledPush" @click="dialogPush = true">æ° å¢ |
| | | </el-button> |
| | |
| | | </el-card> |
| | | </el-main> |
| | | </el-container> |
| | | <el-dialog title="ç¼ç 屿§" :visible.sync="dialogPush" append-to-body="true" destroy-on-close width="30%" |
| | | <!-- <el-dialog title="ç¼ç 屿§" :visible.sync="dialogPush" append-to-body="true" destroy-on-close width="30%" |
| | | :before-close="handleClose"> |
| | | <el-form :model="form"> |
| | | <el-form-item label="æ¥è¯¢æ¡ä»¶" label-width="70px" size="small"> |
| | |
| | | <el-button @click="dialogPush = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="handelTransferSave">ä¿ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </el-dialog> --> |
| | | <integration-transfer :visible.sync="dialogPush" :data="transferData" :props="transferProps" |
| | | @save="handelTransferSave"></integration-transfer> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import transfer from '@/components/transfer/index' |
| | | import integrationTransfer from './integrationTransfer.vue' |
| | | import pinyin from 'js-pinyin' |
| | | import { referCodeClassifyTree, referTree, gridAttrMapping, gridAttrRanges, batchAddSave, listCodeAttributeByClassId, syncClassifyModel } from '@/api/integration/integration.js' |
| | | export default { |
| | | components: { |
| | | transfer |
| | | integrationTransfer |
| | | }, |
| | | name:'Integration', |
| | | name: 'Integration', |
| | | data() { |
| | | const mappingData = [ |
| | | { "oid": "38CF1759-FBF3-44E7-AC45-F6E9A9C3B322", "id": "", "name": "", "description": "", "revisionOid": "b9065e46-6d03-4d11-b1a6-6cffc54e6835", "nameOid": "e6e429f2-0539-4ada-8174-43b37625e7d9", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-799D8-6721-3D79-8EE3-75DAF0680B7E", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890764", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "createtime", "sourceAttrName": "å建æ¶é´", "viewModelName": "", "viewName": "éå®è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 0 }, { "oid": "BB3FAA38-636E-410F-A995-F9BC38EBFF01", "id": "", "name": "", "description": "", "revisionOid": "c4500a61-0c5b-4d3e-b0ea-439203273255", "nameOid": "74d13371-e8b7-49c2-b184-f9b8339a4855", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-9368E-9BA8-38E8-73F3-7D0531A22009", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890764", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "lastmodifier", "sourceAttrName": "æåä¿®æ¹äºº", "viewModelName": "", "viewName": "éå®è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 1 }, { "oid": "B730F997-9D98-46DA-B783-ABF256898B2C", "id": "", "name": "", "description": "", "revisionOid": "df82c828-5c88-4725-b362-88863d28c273", "nameOid": "132ed359-3464-41cb-89bf-e36b30fb7b5e", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-B5416-4928-CFB8-84F5-1955AA890762", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890762", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "lastmodifytime", "sourceAttrName": "æåä¿®æ¹æ¶é´", "viewModelName": "", "viewName": "åºæ¬è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 2 }, { "oid": "354864DA-D613-4013-AEE5-803F1A972F77", "id": "", "name": "", "description": "", "revisionOid": "2e819333-6af0-4cc5-bc35-27494f825d46", "nameOid": "21b1d215-20b2-47e1-9225-a6b5b8b825b5", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-0FED7-90B6-BAF8-B558-2A4693CAAD83", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890762", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "createcompany", "sourceAttrName": "å建å
¬å¸", "viewModelName": "", "viewName": "åºæ¬è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 3 }, { "oid": "D8EDCA74-E0CB-452A-9E3C-7194061B9E8F", "id": "", "name": "", "description": "", "revisionOid": "d3474951-f35d-437b-818d-24dc1bd71e79", "nameOid": "b44b9c81-644f-47cb-babe-b19a9d532354", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-1469D-F1E9-6A31-21B9-E5FF7A03BBEA", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890762", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "kucunwl", "sourceAttrName": "åºåç©æ", "viewModelName": "", "viewName": "åºæ¬è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 4 }, { "oid": "471DAA41-AD8B-4289-BDF0-023D6F9CB36C", "id": "", "name": "", "description": "", "revisionOid": "a54eb585-727c-41e3-b171-398a7458743b", "nameOid": "75bd7a1e-498c-4f7a-b70b-5741e4af0109", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-07512-3fff-4ff0-bf25-f13fcd2a4acf", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890762", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "id", "sourceAttrName": "ç¼ç ", "viewModelName": "", "viewName": "åºæ¬è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 5 }, { "oid": "E53F6F6A-2F50-4C54-960B-B4FD428B375C", "id": "", "name": "", "description": "", "revisionOid": "0b01fc2f-a342-4177-bf6a-570aa8ac529c", "nameOid": "e2ee62eb-4508-41ec-8f5a-067e5ad81c16", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-1fe09-da6f-4412-b92f-f411d341e92d", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890762", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "lcstatus", "sourceAttrName": "ç¶æ", "viewModelName": "", "viewName": "åºæ¬è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 6 }, { "oid": "A929D6F9-88DB-43BE-BE9C-E079E980A69B", "id": "", "name": "", "description": "", "revisionOid": "76a72660-8f93-46d8-8d3c-3f88baf60108", "nameOid": "96b675b6-3a3a-415b-873c-fc8bc014c699", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-F8C09-A123-391B-E119-748B70028952", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890762", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "oldcode", "sourceAttrName": "åå²ç¼å·", "viewModelName": "", "viewName": "åºæ¬è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 7 }, { "oid": "1CCC00C8-572A-40BC-AC6F-49A28D55FF4E", "id": "", "name": "", "description": "", "revisionOid": "6daea0b1-fe5c-460e-9541-c0ffffe894af", "nameOid": "98b38f61-a53a-425d-bb32-c9b8c05ce488", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-9ab10-a3bf-4b51-b8c5-337132018f1d", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890762", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "name", "sourceAttrName": "ç©æåç§°", "viewModelName": "", "viewName": "åºæ¬è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 8 }, { "oid": "8968D5C3-4AE6-4A7B-9DCA-90382170C200", "id": "", "name": "", "description": "", "revisionOid": "e409f2df-88e5-4ee4-838e-3562d3e57625", "nameOid": "144d88b5-acd6-4235-be14-f3d1907eef1a", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-F0DDF-C5DB-8616-D752-20360970AFB6", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890763", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "materialclassify", "sourceAttrName": "ç©æåç±»", "viewModelName": "", "viewName": "éè´è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 9 }, { "oid": "55CBC959-7DF1-4B3B-83BC-1BD6484CA967", "id": "", "name": "", "description": "", "revisionOid": "eef610b7-5c56-4357-a6ff-677f99388300", "nameOid": "def770a7-3a5a-4c8f-85a4-36519de4b77e", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-329e5-b881-4128-aea4-f1b8f67eb5e7", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890763", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "firstfl", "sourceAttrName": "ä¸çº§ç®¡çåç±»", "viewModelName": "", "viewName": "éè´è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 10 }, { "oid": "BD0CA234-065B-43A1-AFEE-555368DF927D", "id": "", "name": "", "description": "", "revisionOid": "34b0de1a-634a-495f-8a2b-51fec7c4d502", "nameOid": "0d8563c8-7c4d-4adf-95ff-a583e8594a63", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-43fc3-a604-4fd8-a2c9-482712301285", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890763", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "secondfl", "sourceAttrName": "äºçº§ç®¡çåç±»", "viewModelName": "", "viewName": "éè´è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 11 }, { "oid": "C2F69279-BAD6-45B2-98A0-69F1E1DBD6E7", "id": "", "name": "", "description": "", "revisionOid": "4cb208a9-8e78-4d67-8498-c9a0f8430ad2", "nameOid": "2d14dfe4-272a-4884-9bb6-bb2461d37d5a", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-8e06b-b297-4738-ad6d-0b1b0064ae3e", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890763", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "thrifl", "sourceAttrName": "ä¸çº§ç®¡çåç±»", "viewModelName": "", "viewName": "éè´è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 12 }, { "oid": "75FDBBFD-A69F-4B09-925D-583C1AF96307", "id": "", "name": "", "description": "", "revisionOid": "5a64c3be-bf36-41ce-8feb-34eac91ff3d4", "nameOid": "06a63d3a-db67-4b97-970a-403f1db18021", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-618cd-475b-4235-8783-20fd3e19e397", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890763", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "xiaoshouwl", "sourceAttrName": "éå®ç©æ", "viewModelName": "", "viewName": "éè´è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 13 }, { "oid": "6118CBF1-E0F1-4DE4-8801-4BB0E6C4F4EB", "id": "", "name": "", "description": "", "revisionOid": "b7216ddc-56bd-4f74-a247-b47c8fcbb661", "nameOid": "9772d9f8-93fa-4995-9802-79255bbbc6db", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-3de12-01e3-4a96-9323-ee025f57fe75", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890763", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "xinghaoguige", "sourceAttrName": "è§æ ¼åå·", "viewModelName": "", "viewName": "éè´è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 14 }, { "oid": "614E51BE-C77F-4723-9E3D-E6C73C85E4DA", "id": "", "name": "", "description": "", "revisionOid": "97b1e20e-ed0e-42a8-bf29-a009df5b5b08", "nameOid": "05626bfd-48f6-4401-b1fb-0b8ce5d4628b", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-059FA-B513-114A-318C-9D7FB3E06736", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890763", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "jiliangdw", "sourceAttrName": "计éåä½", "viewModelName": "", "viewName": "éè´è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 15 }, { "oid": "D8FF1A88-D9E9-4585-A82F-B36B61EB89BF", "id": "", "name": "", "description": "", "revisionOid": "aaa415b8-3220-41b2-aeea-35dfe1d0f660", "nameOid": "6f167320-b672-45ba-985f-53bd2be5a7f6", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-4C611-FC2A-C4EB-D85E-74B008515EAB", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890763", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "chukufangshi", "sourceAttrName": "åºåºæ¹å¼", "viewModelName": "", "viewName": "éè´è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 16 }, { "oid": "EF4ABCFB-755A-4F16-858E-43CF52FE6629", "id": "", "name": "", "description": "", "revisionOid": "589992f1-b6a9-4380-bab5-59f70c76b010", "nameOid": "57515957-02ed-40df-a0ad-745a59f87a67", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-43953-2216-4171-b1a6-139244e63a95", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890763", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "description", "sourceAttrName": "夿³¨è¯´æ", "viewModelName": "", "viewName": "éè´è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 17 }, { "oid": "7EED66A2-9A94-4CDA-A475-964DA724F722", "id": "", "name": "", "description": "", "revisionOid": "70483c08-8c9a-4dc9-bd82-01f35bcebab1", "nameOid": "a568101c-6b70-4a3b-9022-7849c4167189", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-D6882-1BA9-BBA6-2344-B433A6FDCA39", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890763", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "hesuanfenlei", "sourceAttrName": "æ ¸ç®åç±»", "viewModelName": "", "viewName": "éè´è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 18 }, { "oid": "2A6DA1F1-AD1C-46D2-BC81-1BB116F790BD", "id": "", "name": "", "description": "", "revisionOid": "1b50dd67-638a-467d-b315-608007e7e440", "nameOid": "5ff49028-0e07-4ab3-bcfd-0a1469435696", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-E34DA-ABF6-9813-8AB0-7651E4B2D54B", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890764", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "materialtype", "sourceAttrName": "ç©æç±»å", "viewModelName": "", "viewName": "éå®è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 19 }, { "oid": "B6F71DAA-CAD0-498C-988D-6D14DDA55DED", "id": "", "name": "", "description": "", "revisionOid": "fb74ab8e-8f63-4542-925e-9d6c4ac9bc4c", "nameOid": "6e2ac133-2ac8-4739-b50b-6b4247f77881", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-38D7E-E51A-81B3-558D-FF1212DFC757", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890764", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "tuhao", "sourceAttrName": "å¾å·", "viewModelName": "", "viewName": "éå®è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 20 }, { "oid": "1EE65761-7C78-4D1B-95FD-6CFEEA7A941E", "id": "", "name": "", "description": "", "revisionOid": "02a2f43f-e752-49d1-9abd-a67bbc563f67", "nameOid": "70937fe4-ca24-4afa-9517-09140811e4f7", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-BF978-7354-CE66-415B-16ABD3ED036D", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890764", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "zhibaoqi", "sourceAttrName": "è´¨ä¿æ", "viewModelName": "", "viewName": "éå®è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 21 }, { "oid": "6D33C42D-3754-427E-8963-C4BB381A7B30", "id": "", "name": "", "description": "", "revisionOid": "5060a52a-d967-47c8-af78-c7aadb453bc4", "nameOid": "710d539e-a753-4d3b-83da-d51906879f4c", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-46119-D74B-4818-9A89-6235E2234395", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890764", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "revisionvalue", "sourceAttrName": "çæ¬", "viewModelName": "", "viewName": "éå®è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 22 }, { "oid": "4BE71AA3-F86B-4E7B-B1A8-60C77D6D0F9D", "id": "", "name": "", "description": "", "revisionOid": "79c57b17-8856-42da-8336-f7cc90c08ba0", "nameOid": "e8b61f38-9fd3-4344-9bec-45989173da90", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-752FC-DC6E-361E-B960-607D7FF908E6", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "产å", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890764", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "creator", "sourceAttrName": "å建人", "viewModelName": "", "viewName": "éå®è§å¾", "targetClassifyName": "èºæ ", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 23 } |
| | | ] |
| | | const rangeData = [ |
| | | { |
| | | "oid": "2023022114232", |
| | | "id": "", |
| | | "name": "", |
| | | "description": "", |
| | | "revisionOid": "097DC30F-CC8F-595D-0530-7C86C176FC61", |
| | | "nameOid": "D3FB491C-0571-3BB2-604E-563CC579CCAC", |
| | | "btmname": "jrange", |
| | | "lastR": "1", |
| | | "firstR": "1", |
| | | "lastV": "1", |
| | | "firstV": "1", |
| | | "creator": "1", |
| | | "createTime": "2023-03-30 23:35:13", |
| | | "lastModifier": "1", |
| | | "lastModifyTime": "2023-03-30 23:35:13", |
| | | "revisionRule": "", |
| | | "revisionSeq": 1, |
| | | "revisionValue": "", |
| | | "versionRule": "0", |
| | | "versionSeq": 1, |
| | | "versionValue": "1", |
| | | "lcStatus": "Exist", |
| | | "lcStatusText": "", |
| | | "ts": "2023-03-30 23:35:13.027", |
| | | "owner": "1", |
| | | "copyFromVersion": "", |
| | | "secretGrade": -1, |
| | | "secretGradeText": "", |
| | | "lctid": "defaultLC", |
| | | "data": {}, |
| | | "metaListId": "XJ-752FC-DC6E-361E-B960-607D7FF908E6", |
| | | "numText": "ææ", |
| | | "numTextValue": "1001", |
| | | "targetNumText": "ææ", |
| | | "targetNumTextValue": "7" |
| | | } |
| | | ] |
| | | const options = { |
| | | menu: false, |
| | | delBtn: false, |
| | |
| | | cellBtn: true, |
| | | border: true, |
| | | searchMenuSpan: 8, |
| | | highlightCurrentRow:true, |
| | | highlightCurrentRow: true, |
| | | } |
| | | return { |
| | | // 表åå¼ |
| | | form: { |
| | | // æ°å¢å±æ§æ¥è¯¢å¼ |
| | | name: '', |
| | | // é墿 æ¾ç¤ºå¼ |
| | | groupValue: '' |
| | | }, |
| | | // æ£æµæ°å¢æé®ç¶æ |
| | | disabledPush:true, |
| | | disabledPush: true, |
| | | // è¡¨æ ¼å è½½ä¸ |
| | | loading: false, |
| | | // ç©¿æ¢æ¡æ°æ® |
| | | transferData: [], |
| | | // ç©¿æ¢æ¡ååç»å®æ°æ® |
| | | transferValue: [], |
| | | // dialogå¼¹çªå¼å
³ |
| | | dialogPush: false, |
| | | // 屿§æ å°è¡¨æ°æ® |
| | | mappingData: mappingData, |
| | | mappingData: [], |
| | | // 屿§æ å°åå¼è¡¨æ°æ® |
| | | rangeData: rangeData, |
| | | rangeData: [], |
| | | // ä¸»æ°æ®æ æç´¢è¿æ»¤ |
| | | filterText: '', |
| | | // 屿§æ å°åå¼è¡¨é
ç½® |
| | |
| | | isLeaf: '' |
| | | }, |
| | | transferProps: { |
| | | key: 'value', |
| | | label: 'label' |
| | | key: 'oid', |
| | | label: 'name' |
| | | |
| | | }, |
| | | // éå¢åç±»æ å¼ |
| | |
| | | mappingForm: {}, |
| | | // 宿¶å¨ |
| | | times: null, |
| | | |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | this.rangeData = [] |
| | | const response = await gridAttrRanges({ meatId: oid }) |
| | | if (response.status === 200) { |
| | | this.rangeData = response.data |
| | | console.log(response.data) |
| | | this.rangeData = response.data.data |
| | | } |
| | | }, |
| | | // æ¥å£è·åä¸»æ°æ®åç±»å±æ§ä¿¡æ¯ |
| | |
| | | const response = await listCodeAttributeByClassId({ codeClassifyId: oid }) |
| | | if (response.status === 200) { |
| | | const data = response.data.data |
| | | let objs = data.map(item => { |
| | | let pinYin = pinyin.getFullChars(item.name) |
| | | let renPing = pinyin.getCamelChars(item.name) |
| | | const { name, oid } = item |
| | | const obj = { pinyins: pinYin, renPing: renPing, disabled: false, label: name, value: oid } |
| | | return obj |
| | | }) |
| | | this.transferData = objs |
| | | this.optionMapping.column[4].dicData = objs |
| | | console.log(objs) |
| | | this.transferData = data |
| | | } |
| | | }, |
| | | // æ¥å£è·åéå¢åç±»æ |
| | |
| | | // ä¿åæé® |
| | | async handleSave() { |
| | | console.log(this.mappingData) |
| | | // const response = await batchAddSave({ dockingPreAttrMappingVOList: this.tableData }) |
| | | // console.log(response) |
| | | const response = await batchAddSave({ dockingPreAttrMappingVOList: this.mappingData }) |
| | | console.log(response) |
| | | if (response.status === 200) { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "ä¿åæå!" |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | // åæ¥æ°æ® |
| | | async handleSync() { |
| | | const response = await syncClassifyModel({ dockingPreAttrMappingVOList: this.tableData }) |
| | | }, |
| | | // æ°å¢å¼¹çªæ¥è¯¢æé® |
| | | handleQuery(event) { |
| | | this.form.name = event |
| | | }, |
| | | handelTransferSave() { |
| | | handelTransferSave(event) { |
| | | let that = this |
| | | console.log(that.mappingForm) |
| | | if (Object.keys(that.mappingForm).length==0) { |
| | | console.log(event) |
| | | const transferValue = event.value |
| | | if (Object.keys(that.mappingForm).length == 0) { |
| | | this.$message({ |
| | | type: "error", |
| | | message: "è¯·éæ©ä¸æ¡æ°æ®!" |
| | | }); |
| | | } else { |
| | | const findRow = that.mappingData.findIndex(item => item.metaListId === that.mappingForm.metaListId) |
| | | const findtra = that.transferData.findIndex(item => item.value === that.transferValue[0].value) |
| | | console.log(findRow) |
| | | that.mappingData[findRow].targetAttrName = that.transferValue[0].label |
| | | that.mappingData[findRow].targetAttrId = that.transferValue[0].value |
| | | that.transferData[findtra].disabled = true |
| | | that.transferValue = [] |
| | | that.form.name = '' |
| | | that.dialogPush = false |
| | | that.mappingData[findRow].targetAttrName = transferValue[0].name |
| | | that.mappingData[findRow].targetAttrId = transferValue[0].oid |
| | | this.dialogPush =false |
| | | } |
| | | |
| | | }, |
| | | // ç©¿æ¢æ¡æ¥è¯¢æ°æ®è¿æ»¤ |
| | | filterMethod(query, item) { |
| | | return item.pinyins.indexOf(this.form.name) > -1; |
| | | }, |
| | | // 左侧æ ç¹å» |
| | | handelTreeCell(event) { |
| | |
| | | handleUpdate(row, index, done, loading) { |
| | | console.log(row) |
| | | console.log(index) |
| | | let data = [] |
| | | const findRow = this.mappingData.findIndex(item => item.metaListId === row.metaListId) |
| | | this.mappingData[findRow].dockingPreAttrRangeVoList = [row] |
| | | this.rangeData[index] = row |
| | | console.log(this.rangeData) |
| | | this.mappingData[findRow].dockingPreAttrRangeVoList = (this.rangeData) |
| | | console.log('ä¿®æ¹å', row) |
| | | this.$message({ |
| | | showClose: true, |
| | |
| | | }, |
| | | // é墿 å°å±æ§éæ©ï¼åéï¼ |
| | | selectionChange(selection) { |
| | | console.log(selection) |
| | | console.log(this.mappingForm) |
| | | if (selection.length > 1) { |
| | | const nowVal = selection.shift(); |
| | | this.$refs.crudMapping.toggleRowSelection(nowVal, false); |
| | | } else if (selection.length === 1) { |
| | | // 对åéæ°æ®çæä½åå¨è¿é |
| | | this.disabledPush = false |
| | | // this.getGridAttrRanges(row.metaListId) |
| | | this.getGridAttrRanges(this.mappingForm.metaListId) |
| | | } |
| | | }, |
| | | setCurrentRow(selection, row) { |
| | |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .text_tip { |
| | | padding: 10px 0; |
| | | color: #F56C6C; |
| | | } |
| | | |
| | | .setstyle { |
| | | min-height: 200px; |
| | | padding: 0 !important; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog :title="title" :visible.sync="dialogVisible" append-to-body="true" destroy-on-close width="30%" |
| | | @close="handelClose"> |
| | | <el-form :model="form"> |
| | | <el-form-item label="æ¥è¯¢æ¡ä»¶" label-width="70px" size="small"> |
| | | <el-input v-model="inputVal" autocomplete="off" @change="handleQuery"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <p class="text_tip">*éæ©åç±»è¿è¡å±æ§è¿æ»¤, æè
è¾å
¥å±æ§çå
¨æ¼æè
ç®æ¼è¿è¡æ¥è¯¢! å¦: å§å (å¯è¾å
¥xmæxinming )</p> |
| | | <transfer v-model="transferValue" :data="newdata" :filter-method="filterMethod" |
| | | :filter-placeholder="filterPlaceholder" :props="props"></transfer> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="visible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="handelTransferSave">ä¿ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </template> |
| | | <script> |
| | | import transfer from '@/components/transfer/index' |
| | | import pinyin from 'js-pinyin' |
| | | export default { |
| | | components: { |
| | | transfer |
| | | }, |
| | | name: 'Integration', |
| | | props: { |
| | | // æ¯å¦æå¼ |
| | | visible: { |
| | | typeof: Boolean, |
| | | default: false |
| | | }, |
| | | title: { |
| | | typeof: String, |
| | | default: 'ç¼ç 屿§' |
| | | }, |
| | | // æ°æ®æº |
| | | data: { |
| | | typeof: Array, |
| | | default: () => [] |
| | | }, |
| | | // æ°æ®é»è®¤å¼å¾props |
| | | props: { |
| | | typeof: Object, |
| | | default: () => { |
| | | return { |
| | | label: 'label', |
| | | key: 'key', |
| | | disabled: 'disabled' |
| | | }; |
| | | } |
| | | }, |
| | | // æ¥è¯¢ææ¬æ¡çplaceholder |
| | | filterPlaceholder: { |
| | | typeof: String, |
| | | default: '请è¾å
¥æ¼é³å
¨æ¼æè
æ¼é³ç¼©å' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | inputVal: '', |
| | | transferValue: this.value, |
| | | dialogVisible: this.visible, |
| | | } |
| | | }, |
| | | watch: { |
| | | visible(n) { |
| | | this.dialogVisible = n; |
| | | }, |
| | | dialogVisible(n) { |
| | | this.$emit('update:visible', n) |
| | | }, |
| | | }, |
| | | computed: { |
| | | newdata() { |
| | | pinyin.setOptions({ checkPolyphone: false, charCase: 1 }); |
| | | let name = this.props.label |
| | | let key = this.props.key |
| | | let objs = this.data.map(item => { |
| | | let pinYin = pinyin.getFullChars(item[this.props.label]) |
| | | let renPing = pinyin.getCamelChars(item[this.props.label]) |
| | | const obj = { pinyins: pinYin, renPing: renPing, disabled: false, [name]: item[this.props.label], [key]: item[this.props.key] } |
| | | return obj |
| | | }) |
| | | console.log(objs) |
| | | return objs |
| | | } |
| | | }, |
| | | methods: { |
| | | // æ°å¢å¼¹çªæ¥è¯¢æé® |
| | | handleQuery(event) { |
| | | this.inputVal = event |
| | | }, |
| | | // ç©¿æ¢æ¡æ¥è¯¢æ°æ®è¿æ»¤ï¼åæ¡ä»¶ï¼ |
| | | filterMethod(query, item) { |
| | | return item.pinyins.indexOf(this.inputVal) > -1 || item.renPing.indexOf(this.inputVal) > -1 |
| | | }, |
| | | // å
³éæ¸
é¤æææ°æ® |
| | | handelClose() { |
| | | this.transferValue = [] |
| | | this.inputVal = '' |
| | | this.visible = false |
| | | }, |
| | | // ç¡®å®æé®ï¼è¿åå½åæ°æ®åä¿®æ¹åçæ°æ® |
| | | handelTransferSave() { |
| | | let that =this |
| | | let datas= that.newdata |
| | | const findtra = datas.findIndex(item => item.oid === that.transferValue[0].oid) |
| | | datas[findtra].disabled = true |
| | | const obj = { |
| | | // å½åéæ©çæ°æ® |
| | | value: this.transferValue, |
| | | // æ»æ°æ® |
| | | data: datas |
| | | } |
| | | that.$emit('save', obj) |
| | | that.transferValue = [] |
| | | that.inputVal = '' |
| | | }, |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .text_tip { |
| | | padding: 10px 0; |
| | | color: #F56C6C; |
| | | } |
| | | </style> |
| | |
| | | <basic-container> |
| | | <p style="margin-top: 10px;font-weight: 570;font-size: 19px">åºæ¬ä¿¡æ¯</p> |
| | | <el-descriptions class="margin-top" :column="3" :size="size" border> |
| | | <el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i class="el-icon-finished"></i> |
| | | <i :class="icons.key"></i> |
| | | è±æåç§° |
| | | </template> |
| | | {{ obj.id }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i class="el-icon-info"></i> |
| | | <i :class="icons.name"></i> |
| | | 䏿åç§° |
| | | </template> |
| | | {{ obj.name }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i class="el-icon-date"></i> |
| | | <template slot="label" :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <i :class="icons.tableName"></i> |
| | | æ°æ®åºè¡¨å |
| | | </template> |
| | | {{ obj.tableName }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i class="el-icon-folder-opened"></i> |
| | | <i :class="icons.domain"></i> |
| | | æå±é¢å |
| | | </template> |
| | | <el-tag size="small"> |
| | |
| | | </template> |
| | | {{ obj.sss }} |
| | | </el-descriptions-item> --> |
| | | <el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i class="el-icon-s-check"></i> |
| | | <i :class="icons.revisionRule"></i> |
| | | çæ¬è§å |
| | | </template> |
| | | {{ obj.versionRule }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i class="el-icon-refresh-right"></i> |
| | | <i :class="icons.lifeCycle"></i> |
| | | çå½å¨æ |
| | | </template> |
| | | {{ obj.lifeCycleId }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i class="el-icon-view"></i> |
| | | <i :class="icons.view"></i> |
| | | è§å¾ |
| | | </template> |
| | | <el-tag size="small"> |
| | |
| | | </template> |
| | | {{ obj.implClass }} |
| | | </el-descriptions-item> --> |
| | | <el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i class="el-icon-chat-line-square"></i> |
| | | <i :class="icons.desc"></i> |
| | | æè¿° |
| | | </template> |
| | | {{ obj.description }} |
| | |
| | | <basic-container> |
| | | <p style="margin-top: 10px;font-weight: 570;font-size: 19px">屿§å表</p> |
| | | <avue-crud class="attributeCrud" v-model="obj" :data="obj.attributes" :option="loadOption"> |
| | | <template slot="attrDataType" slot-scope="{row}" > |
| | | <el-tag>{{row.attrDataType}}</el-tag> |
| | | <template slot="attrDataTypeText" slot-scope="{row}" > |
| | | <el-tag>{{row.attrDataTypeText}}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | |
| | | addBtn: false, |
| | | props: { |
| | | labelText: '', |
| | | label: 'name', |
| | | label: 'label', |
| | | value: 'oid', |
| | | children: 'childList', |
| | | } |
| | |
| | | }, |
| | | { |
| | | label: "ç±»å", |
| | | prop: "attrDataType", |
| | | prop: "attrDataTypeText", |
| | | align: 'center', |
| | | slot: true |
| | | }, |
| | |
| | | } |
| | | ] |
| | | }, |
| | | descriptionOption: { |
| | | labelStyle:'text-align:center;width:120px', |
| | | contentStyle: 'width:240px;text-align:center;word-break;break-all;' |
| | | }, |
| | | domain: null, |
| | | domainOptions: [], |
| | | icons:{ |
| | | key: 'el-icon-finished', |
| | | name: 'el-icon-info', |
| | | name: 'el-icon-tickets', |
| | | tableName: 'el-icon-date', |
| | | domain: 'el-icon-folder-opened', |
| | | revisionRule: 'el-icon-s-check', |
| | |
| | | width="70%" |
| | | style="height: 115vh;" |
| | | > |
| | | <el-form ref="form" :model="btmType" show-message="true" inline size="medium" label-suffix=":" class="btmTypeForm"> |
| | | |
| | | <el-form-item label="è±æåç§°" label-width="100px" required="true"> |
| | | <el-form ref="form" :model="btmType" show-message="true" inline size="medium" label-suffix=":" class="btmTypeForm" :rules="rules" @resetFields="resetForm" status-icon="true"> |
| | | <el-form-item label="è±æåç§°" label-width="100px" required="true" prop="id"> |
| | | <el-input v-model="btmType.id" :prefix-icon="icons.key"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="䏿åç§°" label-width="100px"> |
| | |
| | | <el-form-item label="æ°æ®åºè¡¨å" label-width="100px"> |
| | | <el-input v-model="btmType.tableName" :prefix-icon="icons.tableName"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æå±é¢å" label-width="100px"> |
| | | <el-form-item label="æå±é¢å" label-width="100px" prop="domain"> |
| | | <el-select v-model="btmType.domain" :prefix-icon="icons.domain"> |
| | | <el-option v-for="item in domainOption" |
| | | :label="item.label" :value="item.value" :key="item.value"></el-option> |
| | |
| | | @on-load="attrRefOnLoad" |
| | | @search-change="attrRefSearch" |
| | | @selection-change="selectionChange"> |
| | | <template slot="name" slot-scope="scope" > |
| | | <el-tag>{{scope}}</el-tag> |
| | | <template slot="typeValue" slot-scope="scope" > |
| | | <el-tag>{{scope.row.typeValue}}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | column: [ |
| | | { |
| | | label: 'è±æåç§°', |
| | | prop: 'key', |
| | | prop: 'id', |
| | | align: 'left', |
| | | search: true, |
| | | width: 230 |
| | | }, { |
| | | label: '䏿åç§°', |
| | | prop: 'label', |
| | | prop: 'name', |
| | | align: 'center', |
| | | }, |
| | | { |
| | | label: "ç±»å", |
| | | prop: "typeValue", |
| | | align: 'center' |
| | | align: 'center', |
| | | slot: true, |
| | | }, |
| | | { |
| | | label: "é»è®¤å¼", |
| | |
| | | ] |
| | | }, |
| | | }, |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: '请è¾å
¥ä¸å¡ç±»åç¼å·', trigger: 'blur' }, |
| | | { pattern: /^[A-Za-z]+$/, message: 'ä¸å¡ç±»åç¼å·åªè½ä¸ºè±æ', trigger: 'blur' }, |
| | | { min: 2, max: 15, message: 'é¿åº¦å¨2å°15个å符', trigger: 'blur' } |
| | | ], |
| | | domain: [ |
| | | { required: true, message: 'è¯·éæ©æå±é¢å', trigger: 'blur' } |
| | | ] |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.btmType = {}; |
| | | this.attrRef.selectData = []; |
| | | this.attrRef.queryNotIn = null; |
| | | this.resetForm(); |
| | | }, |
| | | // å
³é屿§æ± æ¥è¯¢å¼¹çª |
| | | closeAttrDialog(){ |
| | |
| | | name: item.name, |
| | | typeValue: item.typeValue, |
| | | typeKey: item.typeValue, |
| | | attrDataType : item.typeValue, |
| | | attrDataType : item.typeKey, |
| | | defaultValue: item.defaultValue, |
| | | description: item.description, |
| | | attributeLength: item.maxLength |
| | |
| | | this.$delete(this.btmType,'revisionRuleId'); |
| | | this.$delete(this.btmType,'revisionRuleName'); |
| | | this.$delete(this.btmType,'inputRevisionFlag'); |
| | | }, |
| | | resetForm(){ |
| | | this.btmType = {}; |
| | | this.$refs.form.resetFields(); |
| | | } |
| | | } |
| | | } |
| | |
| | | <el-container> |
| | | <!-- 顶端æé® --> |
| | | <el-header class="businessHeader" style="height: 40px;"> |
| | | <el-button-group> |
| | | <el-button type="primary" @click="linkTypeAdd" size="small"> |
| | | <i class="el-icon-plus"></i> |
| | | æ°å¢ |
| | | </el-button> |
| | | <el-button type="primary" @click="linkTypeEdit" size="small"> |
| | | <i class="el-icon-edit"></i> |
| | | ä¿®æ¹ |
| | | </el-button> |
| | | <el-button type="primary" @click="selectFromTable" size="small"> |
| | | <i class="el-icon-thumb"></i> |
| | | ä»å·²æä¸è·å |
| | | </el-button> |
| | | </el-button-group> |
| | | </el-header> |
| | | <el-button-group> |
| | | <el-button type="primary" @click="linkTypeAdd" size="small"> |
| | | <i class="el-icon-plus"></i> |
| | | æ°å¢ |
| | | </el-button> |
| | | <el-button type="primary" @click="linkTypeEdit" size="small"> |
| | | <i class="el-icon-edit"></i> |
| | | ä¿®æ¹ |
| | | </el-button> |
| | | </el-button-group> |
| | | </el-header> |
| | | <!-- ä¾§è¾¹æ æ --> |
| | | <el-container> |
| | | <el-aside width="240px"> |
| | |
| | | <basic-container> |
| | | <p style="margin-top: 10px;font-weight: 570;font-size: 19px">åºæ¬ä¿¡æ¯</p> |
| | | <el-descriptions class="margin-top" :column="2" size="medium" border> |
| | | <el-descriptions-item labelStyle="text-align:center;width:120px" |
| | | contentStyle="width:240px;text-align:center;word-break;break-all;"> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i class="el-icon-finished"></i> |
| | | <i :class="icons.id"></i> |
| | | è±æåç§° |
| | | </template> |
| | | {{ obj.id }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item labelStyle="text-align:center;width:120px" |
| | | contentStyle="width:240px;text-align:center;word-break;break-all;"> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i class="el-icon-info"></i> |
| | | <i :class="icons.name"></i> |
| | | 䏿åç§° |
| | | </template> |
| | | {{ obj.name }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item labelStyle="text-align:center;width:120px" |
| | | contentStyle="width:240px;text-align:center;word-break;break-all;"> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i class="el-icon-date"></i> |
| | | <i :class="icons.tableName"></i> |
| | | æ°æ®åºè¡¨å |
| | | </template> |
| | | {{ obj.tableName }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item labelStyle="text-align:center;width:120px" |
| | | contentStyle="width:240px;text-align:center;word-break;break-all;"> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i class="el-icon-folder-opened"></i> |
| | | <i :class="icons.domain"></i> |
| | | æå±é¢å |
| | | </template> |
| | | <el-tag size="small"> |
| | |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | <el-descriptions class="margin-top" direction="vertical" :column="2" border> |
| | | <el-descriptions-item labelStyle="text-align:center;width:120px" |
| | | contentStyle="width:240px;text-align:center;word-break;break-all;"> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i class="el-icon-sort-down"></i> |
| | | <i :class="icons.from"></i> |
| | | From端类å |
| | | </template> |
| | | <span v-for="item in obj.fromBtmTypes" style="margin-left:2px;"> |
| | | <el-tag size="small" effect="plain" style="width:130px;margin-top: 2px;"> |
| | | <el-tag size="small" effect="plain" style="margin-top: 2px;"> |
| | | {{ item.id + 'ï¼' + item.name + 'ï¼' }} |
| | | </el-tag> |
| | | </span> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item labelStyle="text-align:center;width:120px" |
| | | contentStyle="width:240px;text-align:center;word-break;break-all;"> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i class="el-icon-sort-up"></i> |
| | | <i :class="icons.to"></i> |
| | | To段类å |
| | | </template> |
| | | <span v-for="item in obj.toBtmTypes" style="height:26px;width:140px;margin-left:2px"> |
| | | <el-tag size="small" effect="plain" style="width:130px;margin-top: 2px;"> |
| | | <span v-for="item in obj.toBtmTypes" style="margin-left:2px"> |
| | | <el-tag size="small" effect="plain" style="margin-top: 2px;"> |
| | | {{ item.id + 'ï¼' + item.name + 'ï¼' }} |
| | | </el-tag> |
| | | </span> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | |
| | | <el-descriptions class="margin-top" :column="2" size="medium" border> |
| | | <el-descriptions-item labelStyle="text-align:center;width:120px" |
| | | contentStyle="width:240px;text-align:center;word-break;break-all;"> |
| | | <el-descriptions class="margin-top" :column="2" size="medium" border> |
| | | <!-- |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i class="el-icon-info"></i> |
| | | <i :class="icons.main"></i> |
| | | 主类å |
| | | </template> |
| | | {{ obj.fromBtmTypeName }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item labelStyle="text-align:center;width:120px" |
| | | contentStyle="width:240px;text-align:center;word-break;break-all;"> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i class="el-icon-info"></i> |
| | | <i :class="icons.main"></i> |
| | | 主类å |
| | | </template> |
| | | {{ obj.toBtmTypeName }} |
| | | </el-descriptions-item> |
| | | --> |
| | | <el-descriptions-item span='2' labelStyle="text-align:center;width:120px"> |
| | | <template slot="label"> |
| | | <i class="el-icon-chat-line-square"></i> |
| | | <i :class="icons.desc"></i> |
| | | æè¿° |
| | | </template> |
| | | {{ obj.description }} |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </el-descriptions> |
| | | </basic-container> |
| | | <!-- 屿§å表--> |
| | | <basic-container> |
| | | <p style="margin-top: 10px;font-weight: 570;font-size: 19px">屿§å表</p> |
| | | <avue-crud class="attributeCrud" v-model="obj" :data="obj.attributes" :option="loadOption"> |
| | | <template slot="attrDataType" slot-scope="{row}"> |
| | | <el-tag>{{ row.attrDataType }}</el-tag> |
| | | <template slot="attrDataTypeText" slot-scope="{row}"> |
| | | <el-tag>{{ row.attrDataTypeText }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | |
| | | <link-type-add ref="linkAdd" :linkType="addOption.linkType" :domainOption="domainOptions" :icons="icons" |
| | | @refreshTable="initTreeOnLoad"> |
| | | </link-type-add> |
| | | |
| | | </el-container> |
| | | </template> |
| | |
| | | name: "LinkType", |
| | | data() { |
| | | return { |
| | | treeData: [ |
| | | { id: "1", name: "2", label: "label" }, |
| | | { id: "a", name: "b", label: "c" } |
| | | ], |
| | | addOption: { |
| | | linkType: {}, |
| | | }, |
| | | domain: null, |
| | | domainOptions: [], |
| | | icons: { |
| | | id: 'el-icon-finished', |
| | | name: 'el-icon-tickets', |
| | | tableName: 'el-icon-date', |
| | | domain: 'el-icon-folder-opened', |
| | | from: 'el-icon-sort-down', |
| | | to: 'el-icon-sort-up', |
| | | main: 'el-icon-warning-outline', |
| | | desc: 'el-icon-chat-line-square' |
| | | }, |
| | | treeData: [], |
| | | descriptionOption: { |
| | | labelStyle: 'text-align:center;width:120px', |
| | | contentStyle: 'width:240px;text-align:center;word-break;break-all;' |
| | | }, |
| | | loadOption: { |
| | | border: true, |
| | | height: 360, |
| | |
| | | }, |
| | | { |
| | | label: 'ç±»å', |
| | | prop: 'attrDataType', |
| | | prop: 'attrDataTypeText', |
| | | align: 'center', |
| | | slot: true |
| | | }, |
| | |
| | | } |
| | | ] |
| | | }, |
| | | obj: { |
| | | id: 'linkType', |
| | | name: '龿¥ç±»å', |
| | | tableName: 'PLLT_OMD_LINKTYPE', |
| | | domain: 'ubcs-omd', |
| | | domainText: '对象建模', |
| | | fromBtmTypes: [ |
| | | { id: 'btm', name: 'ä¸å¡ç±»å' }, |
| | | { id: 'btm2', name: 'ä¸å¡ç±»å2' } |
| | | ], |
| | | toBtmTypes: [{ id: 'btm', name: 'ä¸å¡ç±»å' }, { id: 'btm2', name: 'ä¸å¡ç±»å2' }], |
| | | fromBtmTypeName: '', |
| | | toBtmTypeName: '', |
| | | }, |
| | | obj: {}, |
| | | treeOption: { |
| | | defaultExpandAll: true, |
| | | title: '龿¥ç±»åæ ', |
| | | addBtn: false, |
| | | props: { |
| | | labelText: '', |
| | | label: 'name', |
| | | label: 'label', |
| | | value: 'oid', |
| | | children: 'childList', |
| | | } |
| | |
| | | }, |
| | | created() { |
| | | this.initTreeOnLoad(); |
| | | // this.initDomainOption(); |
| | | this.initDomainOption(); |
| | | }, |
| | | |
| | | methods: { |
| | | // æ ç¹å» |
| | | nodeClick(data) { |
| | | console.log(data); |
| | | getDetail(data.oid).then(res => { |
| | | this.obj = res.data.data; |
| | | }) |
| | | }, |
| | | // æ·»å æé®ç¹å»äºä»¶ |
| | | linkTypeAdd() { |
| | | |
| | | this.$refs.linkAdd.showSubmitDialog = true; |
| | | }, |
| | | // ç¼è¾æé®ç¹å»äºä»¶ |
| | | linkTypeEdit() { |
| | | |
| | | this.addOption.linkType = this.obj; |
| | | this.$refs.linkAdd.linkType = this.addOption.linkType; |
| | | this.$refs.linkAdd.showSubmitDialog = true; |
| | | }, |
| | | // ä»å·²æä¸è·åæé®ç¹å»äºä»¶ |
| | | selectFromTable() { |
| | | |
| | | }, |
| | | // å è½½æå¡æ |
| | | initTreeOnLoad() { |
| | | initTree().then(res => { |
| | | this.treeData = res.data.data; |
| | | }); |
| | | } |
| | | }, |
| | | // å è½½æå¡ä¸ææ¡ |
| | | initDomainOption() { |
| | | getDomain().then(res => { |
| | | this.domainOptions = res.data.data; |
| | | }) |
| | | }, |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog title="龿¥ç±»å" :visible.sync="showSubmitDialog" append-to-body @close="closeSubmitDialog" width="70%" |
| | | style="height: 115vh;"> |
| | | <el-form ref="form" :model="linkType" show-message="true" inline size="medium" label-suffix=":" |
| | | class="linkTypeForm" :rules="rules" @resetFields="resetForm" status-icon="true"> |
| | | <el-form-item label="è±æåç§°" label-width="100px" required="true" prop="id"> |
| | | <el-input v-model="linkType.id" :prefix-icon="icons.id" maxlength="15" show-word-limit type="text"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="䏿åç§°" label-width="100px"> |
| | | <el-input v-model="linkType.name" :prefix-icon="icons.name"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ°æ®åºè¡¨å" label-width="100px"> |
| | | <el-input v-model="linkType.tableName" :prefix-icon="icons.tableName"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æå±é¢å" label-width="100px" prop="domain"> |
| | | <el-select v-model="linkType.domain" :prefix-icon="icons.domain"> |
| | | <el-option v-for="item in domainOption" :label="item.label" :value="item.value" |
| | | :key="item.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="From端类å" label-width="100px"> |
| | | <!-- from端ä¸å¡ç±»åéæ© --> |
| | | <el-select v-model="fromBtmValues" :value="fromBtmTypes" value-key="oid" placeholder="è¯·éæ©From端类å" filterable multiple collapse-tags @change="fromSelectChange"> |
| | | <el-option-group v-for="domain in domainList" :key="domain.id" :label="domain.name"> |
| | | <el-option v-for="item in domain.childList" :key="item.oid" :label="item.id + item.name" |
| | | :value="item"> |
| | | </el-option> |
| | | </el-option-group> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="To端类å" label-width="100px"> |
| | | <!-- to端ä¸å¡ç±»åéæ© --> |
| | | <el-select v-model="toBtmValues" :value="toBtmTypes" value-key="oid" placeholder="è¯·éæ©To端类å" filterable multiple collapse-tags @change="toSelectChange"> |
| | | <el-option-group v-for="domain in domainList" :key="domain.id" :label="domain.name"> |
| | | <el-option v-for="item in domain.childList" :key="item.oid" :label="item.id + item.name" |
| | | :value="item"> |
| | | </el-option> |
| | | </el-option-group> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æè¿°" label-width="100px" class="description"> |
| | | <el-input v-model="linkType.description" :prefix-icon="icons.desc" class="descClass" id="descId"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <avue-crud :option="option" :data="linkType.attributes" :page.sync="page" ref="attrTable" |
| | | @cell-mouse-enter="cellEditClick" @cell-mouse-leave="cellEditSave"> |
| | | <template slot-scope="scope" slot="menuLeft"> |
| | | <el-button type="danger" icon="el-icon-plus" size="small" @click="rowAdd()">屿§éæ©</el-button> |
| | | </template> |
| | | |
| | | </avue-crud> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitlinkType">ç¡®å®</el-button> |
| | | <el-button @click="cancleSubmitlinkType">åæ¶</el-button> |
| | | </div> |
| | | |
| | | <!-- 屿§æ± çéæ© --> |
| | | <el-dialog title="屿§æ± " :visible="attrRef.visible" append-to-body @close="closeAttrDialog" width="80%"> |
| | | <avue-crud class="attrRef" :option="attrRef.option" :data="attrRef.data" :page.sync="attrRef.page" ref="attrRef" |
| | | @on-load="attrRefOnLoad" @search-change="attrRefSearch" @selection-change="selectionChange"> |
| | | <template slot="typeValue" slot-scope="scope"> |
| | | <el-tag>{{ scope.row.typeValue }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="confirmSelectAttr">ç¡®å®</el-button> |
| | | <el-button @click="cancleSelectAttr">åæ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | |
| | | import { add, update } from '@/api/omd/linkType'; |
| | | import { queryPage } from '@/api/omd/OmdAttribute'; |
| | | import { getPage } from '@/api/omd/revisionRule'; |
| | | import { initTree } from "@/api/omd/btmType" |
| | | export default { |
| | | name: 'LinkTypeAdd', |
| | | props: { |
| | | linkType: { |
| | | type: Object |
| | | }, |
| | | domainOption: { |
| | | type: Array |
| | | }, |
| | | icons: { |
| | | type: Array |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | showSubmitDialog: false, |
| | | option: { |
| | | height: "330px", |
| | | selection: true, |
| | | headerAlign: 'center', |
| | | border: true, |
| | | index: true, |
| | | rowKey: 'id', |
| | | tabs: true, |
| | | menu: false, |
| | | addBtn: false, |
| | | highlightCurrentRow: true, |
| | | column: [ |
| | | { |
| | | label: 'è±æåç§°', |
| | | prop: 'id', |
| | | align: 'center' |
| | | }, { |
| | | label: '䏿åç§°', |
| | | prop: 'name', |
| | | align: 'center', |
| | | cell: true |
| | | }, |
| | | { |
| | | label: 'ç±»å', |
| | | prop: 'attrDataType', |
| | | align: 'center', |
| | | slot: true |
| | | }, |
| | | { |
| | | label: 'é»è®¤å¼', |
| | | prop: 'defaultValue', |
| | | align: 'center', |
| | | cell: true |
| | | }, |
| | | { |
| | | label: '说æ', |
| | | prop: 'description', |
| | | align: 'center', |
| | | cell: true |
| | | } |
| | | ] |
| | | }, |
| | | attrRef: { |
| | | visible: false, |
| | | page: { |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | | }, |
| | | key: null, |
| | | option: { |
| | | height: 360, |
| | | addBtn: false, |
| | | refreshBtn: false, |
| | | columnBtn: false, |
| | | selection: true, |
| | | menu: false, |
| | | border: true, |
| | | reserveSelection: true, |
| | | searchMenuSpan: 8, |
| | | highlightCurrentRow: true, |
| | | column: [ |
| | | { |
| | | label: 'è±æåç§°', |
| | | prop: 'id', |
| | | align: 'left', |
| | | search: true, |
| | | width: 230 |
| | | }, { |
| | | label: '䏿åç§°', |
| | | prop: 'name', |
| | | align: 'center', |
| | | }, |
| | | { |
| | | label: 'ç±»å', |
| | | prop: 'typeValue', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | label: 'é»è®¤å¼', |
| | | prop: 'defaultValue', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | label: 'å
许为空', |
| | | prop: 'nullable', |
| | | type: 'switch', |
| | | display: false, |
| | | hide: true, |
| | | labelWidth: 132, |
| | | dicData: [{ |
| | | label: 'å¦', |
| | | value: 1 |
| | | }, { |
| | | label: 'æ¯', |
| | | value: 0 |
| | | }] |
| | | }, |
| | | { |
| | | label: '说æ', |
| | | prop: 'description', |
| | | cell: true, |
| | | align: 'center' |
| | | } |
| | | ] |
| | | }, |
| | | data: [], |
| | | queryNotIn: null |
| | | }, |
| | | fromBtmValues: [], |
| | | toBtmValues: [], |
| | | domainList: [], |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: '请è¾å
¥é¾æ¥ç±»åç¼å·', trigger: 'blur' }, |
| | | { pattern: /^[A-Za-z]+$/, message: '龿¥ç±»åç¼å·åªè½ä¸ºè±æ', trigger: 'blur' }, |
| | | { min: 2, max: 15, message: 'é¿åº¦å¨2å°15个å符', trigger: 'blur' } |
| | | ], |
| | | domain: [ |
| | | { required: true, message: 'è¯·éæ©æå±é¢å', trigger: 'blur' } |
| | | ] |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | this.initTreeOnLoad(); |
| | | }, |
| | | methods: { |
| | | // å
³éç»ä»¶å¼¹çª |
| | | closeSubmitDialog() { |
| | | this.showSubmitDialog = false; |
| | | this.linkType.attributes = []; |
| | | this.linkType = {}; |
| | | this.attrRef.selectData = []; |
| | | this.attrRef.queryNotIn = null; |
| | | this.resetForm(); |
| | | }, |
| | | // å
³é屿§æ± æ¥è¯¢å¼¹çª |
| | | closeAttrDialog() { |
| | | this.attrRef.visible = false; |
| | | }, |
| | | initTreeOnLoad() { |
| | | initTree().then(res => { |
| | | this.domainList = res.data.data; |
| | | }); |
| | | }, |
| | | // æ·»å |
| | | rowAdd() { |
| | | this.attrRef.visible = true; |
| | | this.attrRefOnLoad(); |
| | | }, |
| | | // 屿§æ± å è½½ |
| | | attrRefOnLoad() { |
| | | queryPage(this.attrRef.key, this.attrRef.queryNotIn, this.attrRef.page.currentPage, this.attrRef.page.pageSize).then(res => { |
| | | const data = res.data.data; |
| | | this.attrRef.page.total = data.total; |
| | | this.attrRef.data = data.records; |
| | | }); |
| | | this.$nextTick(() => { |
| | | this.$refs.attrRef.refreshTable(); |
| | | }); |
| | | }, |
| | | // 屿§æ± æ£ç´¢ |
| | | attrRefSearch(form, done) { |
| | | this.attrRef.key = form.key |
| | | this.attrRefOnLoad(); |
| | | done(); |
| | | this.attrRef.key = null; |
| | | }, |
| | | // 屿§æ± å¾éäºä»¶ |
| | | selectionChange(list) { |
| | | this.attrRef.selectData = list; |
| | | }, |
| | | // ç¡®è®¤å±æ§æ± å¾é |
| | | confirmSelectAttr() { |
| | | if(!this.linkType.attributes){ |
| | | this.linkType.attributes = []; |
| | | } |
| | | this.attrRef.queryNotIn = ""; |
| | | console.log(this.attrRef.selectData); |
| | | this.attrRef.selectData.forEach(item => { |
| | | this.linkType.attributes.push({ |
| | | id: item.id, |
| | | name: item.name, |
| | | typeValue: item.typeValue, |
| | | typeKey: item.typeValue, |
| | | attrDataType: item.typeKey, |
| | | defaultValue: item.defaultValue, |
| | | description: item.description, |
| | | attributeLength: item.maxLength |
| | | }); |
| | | this.attrRef.queryNotIn += (item.id + ",") |
| | | }); |
| | | this.closeAttrDialog(); |
| | | }, |
| | | // 忶屿§æ± å¾é |
| | | cancleSelectAttr() { |
| | | this.attrRef.selectData = []; |
| | | this.closeAttrDialog(); |
| | | }, |
| | | // æ·»å ä¸å¡ç±»å |
| | | submitlinkType() { |
| | | add(this.linkType, true).then(res => { |
| | | // æ·»å 宿ï¼åè°ç¶ç»ä»¶çå·æ° |
| | | this.$message.success('ä¿åæå'); |
| | | this.cancleSubmitlinkType(); |
| | | this.$emit('refreshTable'); |
| | | }) |
| | | }, |
| | | // åæ¶æ·»å ä¸å¡ç±»å |
| | | cancleSubmitlinkType() { |
| | | this.linkType = {}; |
| | | this.linkType.attributes = []; |
| | | this.showSubmitDialog = false; |
| | | }, |
| | | // å·æ°å±æ§å表 |
| | | refreshAttrTable() { |
| | | this.$nextTick(() => { |
| | | this.$refs.attrTable.refreshTable(); |
| | | }) |
| | | }, |
| | | // |
| | | viewChange() { |
| | | |
| | | }, |
| | | // å表ç¼è¾ |
| | | cellEditClick(cell) { |
| | | cell.$cellEdit = true; |
| | | }, |
| | | // å表ç¼è¾ä¿å |
| | | cellEditSave(row) { |
| | | this.linkType.attributes[row.$index].name = row.name |
| | | this.linkType.attributes[row.$index].defaultValue = row.defaultValue; |
| | | this.linkType.attributes[row.$index].description = row.description; |
| | | row.$cellEdit = false; |
| | | }, |
| | | fromSelectChange(dataList){ |
| | | this.linkType.fromBtmTypes = []; |
| | | var fromBtmName = ""; |
| | | var fromBtmType = ""; |
| | | dataList.forEach(data => { |
| | | //this.linkType.fromBtmTypes.push(data); |
| | | fromBtmName += (data.name + ','); |
| | | fromBtmType += (data.id + ','); |
| | | }) |
| | | this.linkType.fromBtmTypeName = fromBtmName; |
| | | this.linkType.fromBtmType = fromBtmType; |
| | | }, |
| | | toSelectChange(dataList){ |
| | | console.log(dataList); |
| | | this.linkType.toBtmTypes = []; |
| | | var toBtmName = ""; |
| | | var toBtmType = ""; |
| | | dataList.forEach(data => { |
| | | //this.linkType.toBtmTypes.push(data); |
| | | toBtmName += (data.name + ','); |
| | | toBtmType += (data.id + ','); |
| | | }) |
| | | this.linkType.toBtmTypeName = toBtmName; |
| | | this.linkType.toBtmType = toBtmType; |
| | | console.log(this.linkType); |
| | | }, |
| | | resetForm(){ |
| | | this.linkType = {}; |
| | | this.$refs.form.resetFields(); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | /* 屿§æ± åç
§å表 */ |
| | | .attrRef>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu { |
| | | display: none !important; |
| | | } |
| | | |
| | | .revisionRef>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu { |
| | | display: none !important; |
| | | } |
| | | |
| | | .linkTypeForm>.el-form-item>.el-form-item__content>.el-input>.el-input__inner { |
| | | width: 200px; |
| | | } |
| | | |
| | | .descClass>.el-input__inner { |
| | | width: 57vw |
| | | } |
| | | |
| | | #descId { |
| | | width: 57vw; |
| | | } |
| | | </style> |
| | |
| | | // target: 'http://localhost:37000', |
| | | // target: 'http://192.168.1.63:37000', |
| | | //target: 'http://192.168.3.7:37000', |
| | | <<<<<<< HEAD |
| | | // target: 'http://dev.vci-tech.com:37000', |
| | | target: 'http://192.168.1.51:37000/', |
| | | ======= |
| | | target: 'http://dev.vci-tech.com:37000', |
| | | // target: 'http://192.168.1.51:37000/', |
| | | >>>>>>> a3c7b3f7a4778a777a78a72c968b0e172488df03 |
| | | //è¿ç¨æ¼ç¤ºæå¡å°å,å¯ç¨äºç´æ¥å¯å¨é¡¹ç® |
| | | // target: 'https://saber.bladex.vip/api', |
| | | ws: true, |
| | |
| | | /** |
| | | * ç±»å |
| | | */ |
| | | private final String dataType; |
| | | @Setter |
| | | private String dataType; |
| | | |
| | | /** |
| | | * é¿åº¦ |
| | |
| | | @Setter |
| | | private String defaultValue; |
| | | |
| | | public DdlFieldMappingAttrBO() { |
| | | } |
| | | |
| | | public DdlFieldMappingAttrBO(String dataType, Integer dataLength, Integer dataPrecision, Boolean nullable, String defaultValue) { |
| | | this.dataType = dataType; |
| | |
| | | * @date 2023/5/24 |
| | | */ |
| | | @Data |
| | | @TableName("pl_omd_link_type_attr") |
| | | @TableName("pl_omd_link_type_attribute") |
| | | @ApiModel(value = "龿¥ç±»åå
å«ç屿§", description = "龿¥ç±»åå
å«ç屿§") |
| | | public class LinkTypeAttribute implements java.io.Serializable{ |
| | | |
| | |
| | | */ |
| | | private static final long serialVersionUID = -1243940048761060562L; |
| | | |
| | | private String id; |
| | | |
| | | private String name; |
| | | |
| | | private String id; |
| | | private String label; |
| | | |
| | | private String oid; |
| | | |
| | |
| | | package com.vci.ubcs.omd.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | |
| | | * @author LiHang |
| | | * @date 2023/4/3 |
| | | */ |
| | | @Data |
| | | public class LinkTypeAttributeVO implements java.io.Serializable{ |
| | | |
| | | /** |
| | |
| | | * æå±ä¸å¡ç±»å |
| | | */ |
| | | private String pkLinkType; |
| | | |
| | | /** |
| | | * 龿¥ç±»åçç¼å· |
| | | */ |
| | | private String linkTypeId; |
| | | |
| | | /** |
| | | * 屿§çåæ®µåç§° |
| | |
| | | * æ°æ®ç±»å |
| | | */ |
| | | private String attrDataType; |
| | | |
| | | /** |
| | | * æ°æ®ç±»åæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | private String attrDataTypeText; |
| | | |
| | | /** |
| | | * æ¯å¦å¯ä»¥ä¸ºç©º |
| | |
| | | * æ¶é´æ³ï¼æ ¼å¼æ¯yyyy-MM-dd HH:mm:ss.SSS |
| | | */ |
| | | private Date ts; |
| | | |
| | | public String getBtmName() { |
| | | return btmName; |
| | | } |
| | | |
| | | public void setBtmName(String btmName) { |
| | | this.btmName = btmName; |
| | | } |
| | | |
| | | public String getOwner() { |
| | | return owner; |
| | | } |
| | | |
| | | public void setOwner(String owner) { |
| | | this.owner = owner; |
| | | } |
| | | |
| | | public void setOid(String oid) { |
| | | this.oid = oid; |
| | | } |
| | | |
| | | public void setPkLinkType(String pkLinkType) { |
| | | this.pkLinkType = pkLinkType; |
| | | } |
| | | |
| | | public void setDescription(String description) { |
| | | this.description = description; |
| | | } |
| | | |
| | | public void setAttrDataType(String attrDataType) { |
| | | this.attrDataType = attrDataType; |
| | | } |
| | | |
| | | public void setReferBtmTypeId(String referBtmTypeId) { |
| | | this.referBtmTypeId = referBtmTypeId; |
| | | } |
| | | |
| | | public void setReferBtmTypeName(String referBtmTypeName) { |
| | | this.referBtmTypeName = referBtmTypeName; |
| | | } |
| | | |
| | | public void setReferFlag(boolean referFlag) { |
| | | this.referFlag = referFlag; |
| | | } |
| | | |
| | | public void setEnumId(String enumId) { |
| | | this.enumId = enumId; |
| | | } |
| | | |
| | | public void setEnumName(String enumName) { |
| | | this.enumName = enumName; |
| | | } |
| | | |
| | | public void setEnumFlag(boolean enumFlag) { |
| | | this.enumFlag = enumFlag; |
| | | } |
| | | |
| | | public void setEnumItemMap(Map<String, String> enumItemMap) { |
| | | this.enumItemMap = enumItemMap; |
| | | } |
| | | |
| | | public void setCreator(String creator) { |
| | | this.creator = creator; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public void setLastModifier(String lastModifier) { |
| | | this.lastModifier = lastModifier; |
| | | } |
| | | |
| | | public void setLastModifyTime(Date lastModifyTime) { |
| | | this.lastModifyTime = lastModifyTime; |
| | | } |
| | | |
| | | public void setTs(Date ts) { |
| | | this.ts = ts; |
| | | } |
| | | |
| | | public void setNullableFlag(boolean nullableFlag) { |
| | | this.nullableFlag = nullableFlag; |
| | | } |
| | | |
| | | public void setDefaultValue(String defaultValue) { |
| | | this.defaultValue = defaultValue; |
| | | } |
| | | |
| | | public void setPrecisionLength(Integer precisionLength) { |
| | | this.precisionLength = precisionLength; |
| | | } |
| | | |
| | | |
| | | public String getOid() { |
| | | return oid; |
| | | } |
| | | |
| | | public String getPkLinkType() { |
| | | return pkLinkType; |
| | | } |
| | | |
| | | |
| | | public String getDescription() { |
| | | return description; |
| | | } |
| | | |
| | | public String getAttrDataType() { |
| | | return attrDataType; |
| | | } |
| | | |
| | | public String getReferBtmTypeId() { |
| | | return referBtmTypeId; |
| | | } |
| | | |
| | | public String getReferBtmTypeName() { |
| | | return referBtmTypeName; |
| | | } |
| | | |
| | | public boolean isReferFlag() { |
| | | return referFlag; |
| | | } |
| | | |
| | | public String getEnumId() { |
| | | return enumId; |
| | | } |
| | | |
| | | public String getEnumName() { |
| | | return enumName; |
| | | } |
| | | |
| | | public boolean isEnumFlag() { |
| | | return enumFlag; |
| | | } |
| | | |
| | | public Map<String, String> getEnumItemMap() { |
| | | return enumItemMap; |
| | | } |
| | | |
| | | public String getCreator() { |
| | | return creator; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public String getLastModifier() { |
| | | return lastModifier; |
| | | } |
| | | |
| | | public Date getLastModifyTime() { |
| | | return lastModifyTime; |
| | | } |
| | | |
| | | public Date getTs() { |
| | | return ts; |
| | | } |
| | | |
| | | public boolean isNullableFlag() { |
| | | return nullableFlag; |
| | | } |
| | | |
| | | public String getDefaultValue() { |
| | | return defaultValue; |
| | | } |
| | | |
| | | public Integer getPrecisionLength() { |
| | | return precisionLength; |
| | | } |
| | | |
| | | public String getRange() { |
| | | return range; |
| | | } |
| | | |
| | | public void setRange(String range) { |
| | | this.range = range; |
| | | } |
| | | |
| | | public Integer getAttributeLength() { |
| | | return attributeLength; |
| | | } |
| | | |
| | | public void setAttributeLength(Integer attributeLength) { |
| | | this.attributeLength = attributeLength; |
| | | } |
| | | |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public Integer getScaleLength() { |
| | | return scaleLength; |
| | | } |
| | | |
| | | public void setScaleLength(Integer scaleLength) { |
| | | this.scaleLength = scaleLength; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "OsLinkTypeAttributeVO{" + |
| | | "oid='" + oid + '\'' + |
| | | ", pkLinkType='" + pkLinkType + '\'' + |
| | | ", id='" + id + '\'' + |
| | | ", name='" + name + '\'' + |
| | | ", description='" + description + '\'' + |
| | | ", attributeLength=" + attributeLength + |
| | | ", attrDataType='" + attrDataType + '\'' + |
| | | ", nullableFlag=" + nullableFlag + |
| | | ", defaultValue='" + defaultValue + '\'' + |
| | | ", precisionLength=" + precisionLength + |
| | | ", scaleLength=" + scaleLength + |
| | | ", range='" + range + '\'' + |
| | | ", referBtmTypeId='" + referBtmTypeId + '\'' + |
| | | ", referBtmTypeName='" + referBtmTypeName + '\'' + |
| | | ", referFlag=" + referFlag + |
| | | ", enumId='" + enumId + '\'' + |
| | | ", enumName='" + enumName + '\'' + |
| | | ", enumFlag=" + enumFlag + |
| | | ", enumItemMap=" + enumItemMap + |
| | | ", btmname='" + btmName + '\'' + |
| | | ", owner='" + owner + '\'' + |
| | | ", creator='" + creator + '\'' + |
| | | ", createTime=" + createTime + |
| | | ", lastModifier='" + lastModifier + '\'' + |
| | | ", lastModifyTime=" + lastModifyTime + |
| | | ", ts=" + ts + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | */ |
| | | private String domain; |
| | | |
| | | /** |
| | | * é¢åæ¾ç¤ºå¼ |
| | | */ |
| | | private String domainText; |
| | | |
| | | /** |
| | | * å
å«å±æ§ |
| | | */ |
| | |
| | | * @return 主é¢åºåç±»æ¾ç¤ºæ |
| | | */ |
| | | @GetMapping("/referTree") |
| | | public List<Tree> referTree(@RequestBody TreeQueryObject treeQueryObject) { |
| | | public List<Tree> referTree(TreeQueryObject treeQueryObject) { |
| | | return codeClassifyService.referTree(treeQueryObject); |
| | | } |
| | | |
| | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | //@AllArgsConstructor |
| | |
| | | String excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + LocalFileUtil.getFileNameForIE(file.getOriginalFilename()); |
| | | File file1 = new File(excelFileName); |
| | | try { |
| | | // file.transferTo(new File(excelFileName)); |
| | | // CodeImProtRusultVO codeImProtRusultVO = mdmIOService.batchImportCode(orderDTO,file1); |
| | | // if(StringUtils.isNotBlank(codeImProtRusultVO.getFilePath())||StringUtils.isNotBlank(codeImProtRusultVO.getRedisUuid())){ |
| | | // //æ¾å°mapé |
| | | // R result = R.fail("导å
¥å¤±è´¥"); |
| | | // if(StringUtils.isNotBlank(codeImProtRusultVO.getFilePath())) { |
| | | // String filedUUid = ControllerUtil.putErrorFile(codeImProtRusultVO.getFilePath()); |
| | | // codeImProtRusultVO.setFileOid(filedUUid); |
| | | // } |
| | | // result.setData(codeImProtRusultVO); |
| | | // return result; |
| | | // }else { |
| | | // return R.success("æä½æåï¼"); |
| | | // } |
| | | file.transferTo(new File(excelFileName)); |
| | | CodeImProtRusultVO codeImProtRusultVO = mdmIOService.batchImportCode(orderDTO,file1); |
| | | if(StringUtils.isNotBlank(codeImProtRusultVO.getFilePath())||StringUtils.isNotBlank(codeImProtRusultVO.getRedisUuid())){ |
| | | //æ¾å°mapé |
| | | R result = R.fail("导å
¥å¤±è´¥"); |
| | | if(StringUtils.isNotBlank(codeImProtRusultVO.getFilePath())) { |
| | | String filedUUid = ControllerUtil.putErrorFile(codeImProtRusultVO.getFilePath()); |
| | | codeImProtRusultVO.setFileOid(filedUUid); |
| | | } |
| | | result.setData(codeImProtRusultVO); |
| | | return result; |
| | | }else { |
| | | return R.success("æä½æåï¼"); |
| | | } |
| | | }catch (Throwable e) { |
| | | logger.error("导å
¥é误",e); |
| | | String errorFile = LocalFileUtil.getDefaultTempFolder() + File.separator + "é误.txt"; |
| | |
| | | }finally { |
| | | file1.delete(); |
| | | } |
| | | return null; |
| | | // return null; |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | @GetMapping("/thisistest") |
| | | @ResponseBody |
| | | public List<BaseModel> thisistest(String codeClassifyOid, String functionId) throws Exception { |
| | | return engineService.selectByTypeAndOid("wupin", "b1511bb3-a773-43e2-ac85-a7fde7314a0f,3e08970024835e69f6c2b2ecd90c48c3,582ff205-0dfb-43e0-8223-e772ff1851ab,db0400fe-cc90-4d9d-8da7-1edf06b1481b"); |
| | | public Integer thisistest(String codeClassifyOid, String functionId) throws Exception { |
| | | // return engineService.selectByTypeAndOid("wupin", "b1511bb3-a773-43e2-ac85-a7fde7314a0f,3e08970024835e69f6c2b2ecd90c48c3,582ff205-0dfb-43e0-8223-e772ff1851ab,db0400fe-cc90-4d9d-8da7-1edf06b1481b"); |
| | | |
| | | List<BaseModel> models = new ArrayList<>(); |
| | | BaseModel baseModel = new BaseModel(); |
| | | Map<String,String > map = new HashMap<>(); |
| | | map.put("JZL","6789"); |
| | | map.put("JZRXX","67891"); |
| | | map.put("JZXZB","67892"); |
| | | map.put("JSZGL","67893"); |
| | | map.put("JSSXT","67894"); |
| | | baseModel.setBtmname("djii"); |
| | | baseModel.setCreator("fjivis"); |
| | | baseModel.setId("vcia"); |
| | | baseModel.setOid("0d86b1ba-9e9e-4d3d-9ae4-f862c3684e74"); |
| | | baseModel.setCreateTime(new Date()); |
| | | baseModel.setTs(new Date()); |
| | | baseModel.setData(map); |
| | | models.add(baseModel); |
| | | |
| | | BaseModel baseModel1 = new BaseModel(); |
| | | Map<String,String > map1 = new HashMap<>(); |
| | | map1.put("JZL","6789z"); |
| | | map1.put("JZRXX","67891z"); |
| | | map1.put("JZXZB","67892z"); |
| | | map1.put("JSZGL","67893z"); |
| | | map1.put("JSSXT","67894z"); |
| | | baseModel1.setBtmname("djiiz"); |
| | | baseModel1.setCreator("fjivisz"); |
| | | baseModel1.setId("vciaz"); |
| | | baseModel1.setTs(new Date()); |
| | | baseModel1.setOid("4a00be07-f5a8-4a9b-88fb-d52a0d9cf546"); |
| | | baseModel1.setCreateTime(new Date()); |
| | | baseModel1.setData(map1); |
| | | models.add(baseModel1); |
| | | |
| | | BaseModel baseModel2 = new BaseModel(); |
| | | Map<String,String > map2 = new HashMap<>(); |
| | | map2.put("JZL","67892"); |
| | | map2.put("JZRXX","678912"); |
| | | map2.put("JZXZB","678922"); |
| | | map2.put("JSZGL","678932"); |
| | | map2.put("JSSXT","678942"); |
| | | baseModel2.setBtmname("djii2"); |
| | | baseModel2.setCreator("fjivis2"); |
| | | baseModel2.setTs(new Date()); |
| | | baseModel2.setId("vcia2"); |
| | | baseModel2.setOid("fa430ff9-f141-4dcf-8809-6f87905c1dea"); |
| | | baseModel2.setCreateTime(new Date()); |
| | | baseModel2.setData(map2); |
| | | models.add(baseModel2); |
| | | |
| | | return 0; |
| | | |
| | | |
| | | |
| | | // return engineService.updateBatchByBaseModel("wupin", models); |
| | | // return engineService.getUIInfoByClassifyOid(codeClassifyOid,functionId); |
| | | } |
| | | } |
| | |
| | | * @param oid åç±»çä¸»é® |
| | | * @return æ°æ®éå |
| | | */ |
| | | List<CodeClassify> selectCodeClassifyDOByTree(@Param("id") String id,@Param("lcstatus") String lcstatus,@Param("parentcodeclassifyoid") String parentcodeclassifyoid); |
| | | |
| | | /** |
| | | * æ¥æ¾æ å½¢ç»æ |
| | | * |
| | | * @param oid åç±»çä¸»é® |
| | | * @return æ°æ®éå |
| | | */ |
| | | List<CodeClassify> selectAllLevelChildHasPath(@Param("oid") String oid); |
| | | |
| | | |
| | |
| | | public CodeBasicSecVO codeBasicSecDO2VO(CodeBasicSec codeBasicSecDO) throws VciBaseException { |
| | | CodeBasicSecVO codeBasicSecVO = new CodeBasicSecVO(); |
| | | if (codeBasicSecDO != null) { |
| | | BeanUtilForVCI.copyPropertiesIgnoreCase(codeBasicSecVO, codeBasicSecVO); |
| | | BeanUtilForVCI.copyPropertiesIgnoreCase(codeBasicSecDO, codeBasicSecVO); |
| | | codeBasicSecVO.setSecTypeText(CodeSecTypeEnum.getTextByValue(codeBasicSecVO.getSecType())); |
| | | codeBasicSecVO.setCodeLevelTypeText(CodeLevelTypeEnum.getTextByValue(codeBasicSecVO.getCodeLevelType())); |
| | | codeBasicSecVO.setCodeSecLengthTypeText(CodeSecLengthTypeEnum.getTextByValue(codeBasicSecVO.getCodeSecLengthType())); |
| | |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.StringPool; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.cache.Cache; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | |
| | | data.put(CODE_TEMPLATE_OID_FIELD,templateVO.getOid()); |
| | | data.put(CODE_FULL_PATH_FILED,fullPath); |
| | | cbo.setData(data); |
| | | cbo.setOid(VciBaseUtil.getPk()); |
| | | cbo.setCreateTime(new Date()); |
| | | cbo.setLastModifyTime(new Date()); |
| | | cbo.setCreator(AuthUtil.getUser().getUserName()); |
| | | cbo.setLastModifier(AuthUtil.getUser().getUserName()); |
| | | // cbo.setCodeclsfid(classifyFullInfo.getCurrentClassifyVO().getOid()); |
| | | // cbo.setTemplateOid(templateVO.getOid()); |
| | | // cbo.setCodeclsfpath(fullPath); |
| | |
| | | } |
| | | |
| | | int secret = VciBaseUtil.getInt(String.valueOf(cbo.getSecretGrade())); |
| | | //æä¸ªç¹ï¼åç»çå¯çº§æå¡æ¯å¦å¯ç¨ |
| | | //åç»çå¯çº§æå¡æ¯å¦å¯ç¨ |
| | | // if (secret == 0 || !secretService.checkDataSecret(secret)) { |
| | | if (secret == 0 ) { |
| | | Integer userSecret = VciBaseUtil.getCurrentUserSecret(); |
| | |
| | | btmName = btmName.trim().toLowerCase(); |
| | | } |
| | | try { |
| | | String keyPrefix = BTM_NAME.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON); |
| | | String finalBtmName = btmName; |
| | | return CacheUtil.get(BTM_INIT_CACHE, keyPrefix, btmName, () -> { |
| | | BaseModel baseModel = createBaseModel(finalBtmName); |
| | | return baseModel; |
| | | }); |
| | | String keyPrefix = BTM_INIT_CACHE.concat(StringPool.COLON).concat(AuthUtil.getTenantId()).concat(StringPool.COLON); |
| | | // String finalBtmName = btmName; |
| | | Cache.ValueWrapper valueWrapper = CacheUtil.getCache(keyPrefix).get(keyPrefix.concat(String.valueOf(btmName))); |
| | | if(valueWrapper == null){ |
| | | CacheUtil.getCache(keyPrefix).put(keyPrefix.concat(String.valueOf(btmName)), createBaseModel(btmName)); |
| | | valueWrapper = CacheUtil.getCache(keyPrefix).get(keyPrefix.concat(String.valueOf(btmName))); |
| | | } |
| | | return (BaseModel) valueWrapper.get(); |
| | | } catch (Exception e) { |
| | | logger.error("å建ä¸å¡ç±»å对象",e); |
| | | throw new VciBaseException("initBtmError",new String[]{btmName}); |
| | |
| | | referVO.setTextField("name"); |
| | | } |
| | | //表éè¦æ¹ |
| | | //使ç¨ä¼ å
¥çä¸å¡ç±»åæ¥è¯¢è¡¨ |
| | | R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(referVO.getReferType())); |
| | | // String referTable = VciBaseUtil.getTableName(referVO.getReferType()); |
| | | String referTable = "pl_code_wupin"; |
| | | String referTable = listR.getData().get(0).getTableName(); |
| | | // String referTable = "pl_code_classify"; |
| | | String referTableNick = attrVO.getId() + "0"; |
| | | String left = " left join " + referTable + " " + referTableNick + " on " + referTableNick + "." + referVO.getValueField() + " = t." + attrVO.getId(); |
| | | joinTableList.put(attrVO.getId(), left); |
| | |
| | | } |
| | | //è¦æ¹ï¼è¡¨æè·åæé®é¢ |
| | | // String tableName = VciBaseUtil.getTableName(btmType); |
| | | String tableName = "pl_code_wupin"; |
| | | // String tableName = "pl_code_wupin"; |
| | | R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(btmType)); |
| | | // String referTable = VciBaseUtil.getTableName(referVO.getReferType()); |
| | | String tableName = listR.getData().get(0).getTableName(); |
| | | String sql = "select " + selectFieldList.stream().map(s -> (s.contains(".") ? s : ("t." + s))).collect(Collectors.joining(",")) |
| | | + " from " + tableName + SPACE + "t" + SPACE |
| | | + joinTableList.values().stream().collect(Collectors.joining(SPACE)) |
| | |
| | | uiInfoVO.setLeaf(classifyService.countChildrenByClassifyOid(codeClassifyOid) == 0); |
| | | if (StringUtils.isNotBlank(functionId) && !"~".equalsIgnoreCase(functionId)) { |
| | | //åè½æé®æå¡è¿æªå®ç°ï¼çå®ç°äºï¼å¨è¿è¡è°ç¨ |
| | | //List<SmOperationVO> operationVOS = operationService.listButtonByFunctionId(functionId); |
| | | // List<SmOperationVO> operationVOS = operationService.listButtonByFunctionId(functionId); |
| | | // if (operationVOS == null) { |
| | | // operationVOS = new ArrayList<>(); |
| | | // } |
| | | //æ¥è¯¢æ©å±æé® |
| | | // //æ¥è¯¢æ©å±æé® |
| | | // List<CodeButtonVO> buttonVOS = listButtonInToolbarByClassifyOid(codeClassifyOid); |
| | | // if (!CollectionUtils.isEmpty(buttonVOS)) { |
| | | // for (int i = 0; i < buttonVOS.size(); i++) { |
| | |
| | | // operationVO.setUniqueFlag(buttonVO.getId()); |
| | | // operationVO.setName(buttonVO.getName()); |
| | | // operationVO.setAlias(operationVO.getName()); |
| | | // operationVO.setExecuteJs(buttonVO.getExecutejs()); |
| | | // operationVO.setIconCls(buttonVO.getIconcls()); |
| | | // operationVO.setExecuteJs(buttonVO.getExecuteJs()); |
| | | // operationVO.setIconCls(buttonVO.getIconCls()); |
| | | // operationVOS.add(operationVO); |
| | | // } |
| | | // } |
| | |
| | | R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(boName)); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | BaseModel bo = new BaseModel(); |
| | | bo.setOid(VciBaseUtil.getPk()); |
| | | // bo.setOid(VciBaseUtil.getPk()); |
| | | // bo.setRevisionid(VciBaseUtil.getPk()); |
| | | // bo.setNameoid(VciBaseUtil.getPk()); |
| | | bo.setBtmname(boName); |
| | |
| | | import com.vci.ubcs.starter.web.enumpck.VciFieldTypeEnum; |
| | | import com.vci.ubcs.starter.web.pagemodel.DataGrid; |
| | | import com.vci.ubcs.starter.web.pagemodel.KeyValue; |
| | | import com.vci.ubcs.starter.web.util.LangBaseUtil; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import com.vci.ubcs.starter.web.util.VciDateUtil; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | String redisUUid=batchImportCodes(orderDTO,templateVO,dataSet,errorMap,true); |
| | | CodeImProtRusultVO codeImProtRusultVO = new CodeImProtRusultVO(); |
| | | List<String> needRowIndexList = new ArrayList<>(); |
| | | // String filePath = returnErrorToExcel(dataSet.getRowData(), errorMap, needRowIndexList, dataSet.getColName()); |
| | | // if(StringUtils.isNotBlank(filePath)) { |
| | | // codeImProtRusultVO.setFilePath(filePath); |
| | | // } |
| | | // if(StringUtils.isNotBlank(redisUUid)){ |
| | | // codeImProtRusultVO.setRedisUuid(redisUUid); |
| | | // } |
| | | return null; |
| | | // return codeImProtRusultVO; |
| | | String filePath = returnErrorToExcel(dataSet.getRowData(), errorMap, needRowIndexList, dataSet.getColName()); |
| | | if(StringUtils.isNotBlank(filePath)) { |
| | | codeImProtRusultVO.setFilePath(filePath); |
| | | } |
| | | if(StringUtils.isNotBlank(redisUUid)){ |
| | | codeImProtRusultVO.setRedisUuid(redisUUid); |
| | | } |
| | | // return null; |
| | | return codeImProtRusultVO; |
| | | } |
| | | |
| | | /** |
| | | * é误信æ¯è¿åexcel |
| | | * @param rowDataList ææç导å
¥æ°æ® |
| | | * @param errorMap é误çä¿¡æ¯ |
| | | * @param needRowIndexList éè¦åå
¥çæ°æ®çè¡å· |
| | | * @param titleRowData æ é¢è¡ |
| | | * |
| | | * @return é误çexcelæä»¶ï¼æ²¡æé误ä¼è¿å空 |
| | | */ |
| | | private String returnErrorToExcel(Collection<SheetRowData> rowDataList, |
| | | Map<String,String> errorMap, |
| | | List<String> needRowIndexList,List<String> titleRowData){ |
| | | if(CollectionUtils.isEmpty(errorMap)){ |
| | | return ""; |
| | | } |
| | | Map<String, SheetRowData> rowIndexDataMap = rowDataList.stream().filter(s -> !needRowIndexList.contains(s.getRowIndex())).collect(Collectors.toMap(s -> s.getRowIndex(), t -> t)); |
| | | List<WriteExcelData> errorDataList = new ArrayList<>(); |
| | | errorDataList.add(new WriteExcelData(0,0,"é误信æ¯")); |
| | | for (int i = 0; i < titleRowData.size(); i++) { |
| | | //é误信æ¯å¨æå |
| | | errorDataList.add(new WriteExcelData(0,i+1,titleRowData.get(i))); |
| | | } |
| | | Integer[] newRowIndex = new Integer[]{1}; |
| | | errorMap.forEach((index,error)->{ |
| | | //é误信æ¯å
¨é¨ç»åå°ä¸èµ· |
| | | SheetRowData rowData = rowIndexDataMap.getOrDefault(index, null); |
| | | if(rowData!=null){ |
| | | errorDataList.add(new WriteExcelData(newRowIndex[0],0,error)); |
| | | rowData.getData().forEach((colIndex,value)->{ |
| | | errorDataList.add(new WriteExcelData(newRowIndex[0],colIndex+1,value)); |
| | | }); |
| | | newRowIndex[0]++; |
| | | } |
| | | }); |
| | | String excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + "é误信æ¯.xls"; |
| | | WriteExcelOption eo = new WriteExcelOption(errorDataList); |
| | | try { |
| | | new File(excelFileName).createNewFile(); |
| | | } catch (IOException e) { |
| | | throw new VciBaseException(LangBaseUtil.getErrorMsg(e)); |
| | | } |
| | | ExcelUtil.writeDataToFile(excelFileName,eo); |
| | | return excelFileName; |
| | | } |
| | | |
| | | /** |
| | |
| | | connect by prior PARENTCODECLASSIFYOID = oid |
| | | </select> |
| | | |
| | | <select id="selectCodeClassifyDOByTree" resultMap="plCodeClassifyResultMap"> |
| | | select codeclassify0.OWNER as owner, |
| | | codeclassify0.BTMTYPEID as btmtypeid, |
| | | codeclassify0.CREATOR as creator, |
| | | codeclassify0.CREATETIME as createtime, |
| | | codeclassify0.LASTMODIFIER as lastmodifier, |
| | | codeclassify0.DESCRIPTION as description, |
| | | codeclassify0.ORDERNUM as ordernum, |
| | | codeclassify0.CODERULEOID as coderuleoid, |
| | | codeclassify0.OID as oid, |
| | | codeclassify0.BTMNAME as btmname, |
| | | codeclassify0.BTMTYPENAME as btmtypename, |
| | | codeclassify0.CODEKEYATTRREPEATOID as codekeyattrrepeatoid, |
| | | codeclassify0.PARENTCODECLASSIFYOID as parentcodeclassifyoid, |
| | | codeclassify0.NAME as name, |
| | | codeclassify0.LASTMODIFYTIME as lastmodifytime, |
| | | codeclassify0.ID as id, |
| | | codeclassify0.CODERESEMBLERULEOID as coderesembleruleoid, |
| | | codeclassify0.LCSTATUS as lcstatus, |
| | | codeclassify0.TS as ts, |
| | | coderuleoid.name as codeRuleOidName, |
| | | codekeyattrrepeatoid.name as codeKeyAttrRepeatOidName, |
| | | coderesembleruleoid.name as codeResembleRuleOidName |
| | | from pl_code_classify codeclassify0 |
| | | left join pl_code_rule coderuleoid |
| | | on codeclassify0.codeRuleOid = coderuleoid.oid |
| | | left join pl_code_keyattrrepeat codekeyattrrepeatoid |
| | | on codeclassify0.codeKeyAttrRepeatOid = codekeyattrrepeatoid.oid |
| | | left join pl_code_resemblerule coderesembleruleoid |
| | | on codeclassify0.codeResembleRuleOid = coderesembleruleoid.oid |
| | | where codeclassify0.lcstatus = #{lcstatus} |
| | | -- and codeclassify0.parentcodeclassifyoid is null |
| | | -- and codeclassify0.id = 'wupin' |
| | | <if test="parentcodeclassifyoid != null and parentcodeclassifyoid != ''"> |
| | | codeclassify0.parentcodeclassifyoid = '${parentcodeclassifyoid}' |
| | | </if> |
| | | <if test="parentcodeclassifyoid == null or parentcodeclassifyoid == ''"> |
| | | and codeclassify0.parentcodeclassifyoid is null |
| | | and codeclassify0.id = #{id} |
| | | </if> |
| | | order by id asc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | void createDbTablesByOidCollection(Collection<String> oidCollection) throws VciBaseException; |
| | | |
| | | /** |
| | | * è·åå建çsqlè¯å¥ä¸å±æ§é¨å |
| | | * è·åå建çsqlè¯å¥ä¸å±æ§é¨å -- ä¸å¡ç±»å |
| | | * @param attributeVOList 屿§çç«ç¢ |
| | | * @return sqlè¯å¥ |
| | | */ |
| | | String getCreateSqlByAttributeForBtm(List<BtmTypeAttributeVO> attributeVOList); |
| | | |
| | | /** |
| | | * è·åå建çsqlè¯å¥ä¸å±æ§é¨å -- 龿¥ç±»å |
| | | * @param attributeVOList 屿§çç«ç¢ |
| | | * @return sqlè¯å¥ |
| | | */ |
| | | String getCreateSqlByAttributeForLink(List<LinkTypeAttributeVO> attributeVOList); |
| | | |
| | | /** |
| | | * æ¹éå°ä¸å¡ç±»ååå»ºæ°æ®åºè¡¨ |
| | | * @param ids ä¸å¡ç±»åçè±æåç§° |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
å建表åºç°äºéè¯¯çæ¶å伿åºå¼å¸¸ |
| | |
| | | } |
| | | |
| | | /** |
| | | * åå»ºé¾æ¥ç±»åçè¡¨æ ¼ |
| | | * |
| | | * @param linkTypeVO 龿¥ç±»åçæ¾ç¤ºå¯¹è±¡ |
| | | * @throws VciBaseException æ§è¡åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | private void createDbTableForLink(LinkTypeVO linkTypeVO) throws VciBaseException { |
| | | VciBaseUtil.alertNotNull(linkTypeVO, "è¦åå»ºè¡¨æ ¼æå±çä¸å¡ç±»å", linkTypeVO.getTableName(), "ä¸å¡ç±»åçè¡¨æ ¼åç§°"); |
| | | String tableName = linkTypeVO.getTableName(); |
| | | if (!checkTableExistByTableName(tableName)) { |
| | | String attributeSql = getCreateSqlByAttributeForLink(linkTypeVO.getAttributes()); |
| | | dllMapper.createTableBySql(tableName, attributeSql); |
| | | if (StringUtils.isNotBlank(linkTypeVO.getName())) { |
| | | dllMapper.commentTable(tableName, linkTypeVO.getName()); |
| | | } |
| | | linkTypeVO.getAttributes().forEach(s -> { |
| | | dllMapper.commentColumnTable(tableName, s.getId(), s.getName()); |
| | | }); |
| | | } |
| | | } |
| | | /** |
| | | * è·åå建çsqlè¯å¥ä¸å±æ§é¨å |
| | | * |
| | | * @param attributeVOList 屿§çç«ç¢ |
| | |
| | | attributeVOList.forEach(a -> { |
| | | sb.append(a.getId()).append(StringPool.SPACE); |
| | | VciFieldTypeEnum fieldTypeEnum = VciFieldTypeEnum.forValue(a.getAttrDataType()); |
| | | sb.append(dllMapper.getColumnTypeSql(fieldTypeEnum, a)); |
| | | sb.append(dllMapper.getColumnTypeSql(fieldTypeEnum, a)).append(","); |
| | | }); |
| | | return sb.substring(0, sb.lastIndexOf(",")); |
| | | } |
| | | |
| | | /** |
| | | * è·åå建çsqlè¯å¥ä¸å±æ§é¨å |
| | | * |
| | | * @param attributeVOList 屿§çç«ç¢ |
| | | * @return sqlè¯å¥ |
| | | */ |
| | | @Override |
| | | public String getCreateSqlByAttributeForLink(List<LinkTypeAttributeVO> attributeVOList) { |
| | | StringBuilder sb = new StringBuilder(); |
| | | attributeVOList.forEach(a -> { |
| | | BtmTypeAttributeVO attributeVO = Optional.ofNullable(BeanUtil.copy(a, BtmTypeAttributeVO.class)).orElseGet(BtmTypeAttributeVO::new); |
| | | attributeVO.setPkBtmType(a.getPkLinkType()); |
| | | sb.append(a.getId()).append(StringPool.SPACE); |
| | | VciFieldTypeEnum fieldTypeEnum = VciFieldTypeEnum.forValue(a.getAttrDataType()); |
| | | sb.append(dllMapper.getColumnTypeSql(fieldTypeEnum, attributeVO)).append(","); |
| | | }); |
| | | return sb.substring(0, sb.lastIndexOf(",")); |
| | | } |
| | |
| | | @Override |
| | | public void createDbTablesById(String ids) throws VciBaseException { |
| | | VciBaseUtil.alertNotNull(ids, "ä¸å¡ç±»å/龿¥ç±»åçè±æéå"); |
| | | List<BtmTypeVO> btmTypeVOList = BtmTypeCache.selectByIdCollection(VciBaseUtil.str2List(ids)); |
| | | // List<OsLinkTypeVO> linkTypeVOList = linkTypeService.listLinkTypeByIdCollection(VciBaseUtil.str2List(ids)); |
| | | if (!CollectionUtils.isEmpty(btmTypeVOList)) { |
| | | //è¯´ææ¯ä¸å¡ç±»å |
| | | btmTypeVOList.forEach(this::createDbTableForBtm); |
| | | } |
| | | /*//è¯è¯é¾æ¥ç±»å |
| | | if(!CollectionUtils.isEmpty(linkTypeVOList)){ |
| | | //çç¡®æ¯é¾æ¥ç±»å |
| | | linkTypeVOList.stream().forEach( s -> { |
| | | createDbTableForLink(s); |
| | | }); |
| | | }*/ |
| | | // ä¸å¡ç±»å |
| | | Func.toStrList(",",ids).stream().filter(idBtmMap::containsKey).map(idBtmMap::get).forEach(this::createDbTableForBtm); |
| | | // 龿¥ç±»å |
| | | Func.toStrList(",",ids).stream().filter(idLinkMap::containsKey).map(idLinkMap::get).forEach(this::createDbTableForLink); |
| | | } |
| | | |
| | | /** |
| | |
| | | modifyAttributeInfo.setBeforeModifyAttributes(String.join(",", beforeList)); |
| | | } |
| | | } |
| | | modifyAttributeInfoDOList.add(modifyAttributeInfo); |
| | | }); |
| | | return modifyAttributeInfoDOList; |
| | | } |
| | |
| | | } |
| | | |
| | | } |
| | | modifyAttributeInfoDOList.add(modifyAttributeInfo); |
| | | }); |
| | | return modifyAttributeInfoDOList; |
| | | } |
| | |
| | | @Override |
| | | public void reflexDifferent(List<ModifyAttributeInfo> differentAttributeList, List<BtmTypeVO> btmTypeVOList, List<LinkTypeVO> linkTypeVOList) throws VciBaseException { |
| | | VciBaseUtil.alertNotNull(differentAttributeList, "è¦æ¸
ççæ°æ®åºçä¿¡æ¯ä¸ºç©º"); |
| | | Map<String, BtmTypeVO> idBtmTypeMap = btmTypeVOList.stream().collect(Collectors.toMap(BtmTypeVO::getId, t -> t, (o1, o2) -> o1)); |
| | | Map<String, LinkTypeVO> idLinkTypeMap = linkTypeVOList.stream().collect(Collectors.toMap(LinkTypeVO::getId, t -> t, (o1, o2) -> o1)); |
| | | Map<String, BtmTypeVO> idBtmTypeMap = Optional.ofNullable(btmTypeVOList).orElseGet(ArrayList::new).stream().collect(Collectors.toMap(BtmTypeVO::getId, t -> t, (o1, o2) -> o1)); |
| | | Map<String, LinkTypeVO> idLinkTypeMap = Optional.ofNullable(linkTypeVOList).orElseGet(ArrayList::new).stream().collect(Collectors.toMap(LinkTypeVO::getId, t -> t, (o1, o2) -> o1)); |
| | | differentAttributeList.forEach(s -> { |
| | | // BtmTypeVO btmType = idBtmTypeMap.get(id); |
| | | if (ModifyTableTaskEnum.CREATE.getValue().equalsIgnoreCase(s.getTaskName())) { |
| | |
| | | import com.alibaba.cloud.commons.lang.StringUtils; |
| | | import com.alibaba.nacos.api.exception.NacosException; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import com.vci.ubcs.omd.constant.OmdCacheConstant; |
| | | import com.vci.ubcs.omd.dto.LinkTypeDTO; |
| | | import com.vci.ubcs.omd.entity.LinkType; |
| | | import com.vci.ubcs.omd.repeater.DomainRepeater; |
| | | import com.vci.ubcs.omd.service.ILinkTypeService; |
| | |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringPool; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * Description:龿¥ç±»åæ§å¶å¨ |
| | |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "æ¥è¯¢å表", notes = "ä¼ å
¥æ¥è¯¢") |
| | | public R<List<LinkTypeVO>> list(@ApiIgnore @RequestParam Map<String, Object> condition) { |
| | | return R.data(LinkTypeWrapper.build().listEntityVO(linkTypeService.list(Condition.getQueryWrapper(condition, LinkType.class).lambda().orderByAsc(LinkType::getId)))); |
| | | return R.data(LinkTypeWrapper.build().listEntityVO(linkTypeService.list(Condition.getQueryWrapper(condition, LinkType.class).lambda().orderByAsc(LinkType::getId)), null)); |
| | | } |
| | | |
| | | /** |
| | |
| | | IPage<LinkTypeVO> pageVO = new Page<>(); |
| | | IPage<LinkType> page = linkTypeService.page(Condition.getPage(query), Condition.getQueryWrapper(condition, LinkType.class).lambda().orderByAsc(LinkType::getId)); |
| | | BeanUtil.copy(page, pageVO); |
| | | pageVO.setRecords(LinkTypeWrapper.build().listEntityVO(page.getRecords())); |
| | | pageVO.setRecords(LinkTypeWrapper.build().listEntityVO(page.getRecords(), null)); |
| | | return R.data(pageVO); |
| | | } |
| | | |
| | |
| | | package com.vci.ubcs.omd.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vci.ubcs.omd.entity.LinkType; |
| | | import com.vci.ubcs.omd.entity.LinkTypeAttribute; |
| | | import com.vci.ubcs.omd.vo.LinkTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.LinkTypeVO; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Description: 龿¥ç±»åå
å«å±æ§çæå¡æ¥å£ |
| | |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | LinkTypeAttribute selectByPrimaryKey(String oid); |
| | | |
| | | /** |
| | | * æ ¹æ®é¾æ¥ç±»åè·åé»è®¤å段 |
| | | * @param linkTypeVO 龿¥ç±»å |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | List<LinkTypeAttributeVO> getDefaultAttributes(LinkTypeVO linkTypeVO); |
| | | |
| | | /** |
| | | * æ ¹æ®é¾æ¥ç±»åè·åææçåæ®µ |
| | | * @param linkTypeVO 龿¥ç±»å |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | List<LinkTypeAttributeVO> getAllAttributes(LinkTypeVO linkTypeVO); |
| | | |
| | | /** |
| | | * è·åéé»è®¤å段ç龿¥ç±»å屿§ |
| | | * @param linkTypeVO 龿¥ç±»å |
| | | * @return |
| | | */ |
| | | List<LinkTypeAttributeVO> getAttributesNoDefault(LinkTypeVO linkTypeVO); |
| | | |
| | | /** |
| | | * æ¹éè·åéé»è®¤å段ç龿¥ç±»å屿§ |
| | | * @param linkTypeDOList 龿¥ç±»å |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | Map<String, List<LinkTypeAttributeVO>> batchGetAttributesNoDefault(List<LinkType> linkTypeDOList); |
| | | } |
| | |
| | | vo.setId(id); |
| | | vo.setName(name); |
| | | vo.setPkBtmType(btmType.getOid()); |
| | | vo.setAttrDataType(VciFieldTypeEnum.VTString.name()); |
| | | vo.setAttributeLength(150); |
| | | if (Arrays.asList("lastr","firstr","lastv","firstv","revisionseq","versionseq","revisionvalue","versionvalue").contains(id)){ |
| | | vo.setAttributeLength(5); |
| | | vo.setAttrDataType(VciFieldTypeEnum.VTInteger.name()); |
| | |
| | | if (!existFieldMap.containsKey(k)){ |
| | | BtmTypeLinkAttributesDTO attr = new BtmTypeLinkAttributesDTO(); |
| | | attr.setId(k); |
| | | attr.setName(v); |
| | | attr.setAttrDataType(VciFieldTypeEnum.VTString.name()); |
| | | attr.setAttributeLength(50); |
| | | attr.setNullableFlag(false); |
| | |
| | | afterAttributes = updateAttributeForBtm(btmTypeByOid.getOid(),beforeAttributes, attributes); |
| | | } |
| | | BtmTypeVO btmTypeVO = BtmTypeWrapper.build().entityVO(btmTypeDO); |
| | | //å¨åå»ºè¡¨çæ¶åè¿éè¦æé»è®¤çåæ®µå¸¦ä¸ã |
| | | List<BtmTypeAttributeVO> defaultAttribute = btmTypeAttributeService.getDefaultAttribute(btmTypeVO); |
| | | afterAttributes.addAll(defaultAttribute); |
| | | btmTypeVO.setAttributes(afterAttributes); |
| | | try { |
| | | if (autoCreateTable) { |
| | | checkTableSame(btmTypeVO); |
| | | // checkTableSame(btmTypeVO); |
| | | R result = DomainRepeater.submitBtmType(btmTypeDTO.getDomain(), btmTypeVO); |
| | | if (result.isSuccess()){ |
| | | List<ModifyAttributeInfo> infoList = new ArrayList<>(); |
| | |
| | | new Object[]{btmTypeDTO.getRevisionRuleId(), btmTypeDTO.getRevisionRuleName()}); |
| | | } |
| | | } |
| | | btmTypeDTO.setAttributes(addAttributeByFieldMap(btmTypeDTO.getAttributes(),BtmTypeFieldConstant.REVISION_MANAGE_FIELD_MAP)); |
| | | // btmTypeDTO.setAttributes(addAttributeByFieldMap(btmTypeDTO.getAttributes(),BtmTypeFieldConstant.REVISION_MANAGE_FIELD_MAP)); |
| | | } |
| | | if (btmTypeDTO.isLifeCycleFlag()){ |
| | | // éè¦æ§å¶çå½å¨æ |
| | |
| | | // new Object[]{btmTypeDTO.getSubLifeCycleId(), btmTypeDTO.getSubLifeCycleName()}); |
| | | // } |
| | | // } |
| | | btmTypeDTO.setAttributes(addAttributeByFieldMap(btmTypeDTO.getAttributes(),BtmTypeFieldConstant.LIFECYCLE_MANAGE_FIELD_MAP)); |
| | | // btmTypeDTO.setAttributes(addAttributeByFieldMap(btmTypeDTO.getAttributes(),BtmTypeFieldConstant.LIFECYCLE_MANAGE_FIELD_MAP)); |
| | | } |
| | | if (btmTypeDTO.isSecretFlag()){ |
| | | // éè¦æ§å¶å¯çº§ |
| | | btmTypeDTO.setAttributes(addAttributeByFieldMap(btmTypeDTO.getAttributes(),BtmTypeFieldConstant.SECRET_MANAGE_FIELD_MAP)); |
| | | // btmTypeDTO.setAttributes(addAttributeByFieldMap(btmTypeDTO.getAttributes(),BtmTypeFieldConstant.SECRET_MANAGE_FIELD_MAP)); |
| | | } |
| | | } |
| | | @Override |
| | |
| | | String label = domain.get(k); |
| | | BtmTreeVO parent = new BtmTreeVO(); |
| | | parent.setName(label); |
| | | parent.setLabel(label); |
| | | parent.setId(k); |
| | | parent.setChildList(v.stream().map(s -> { |
| | | BtmTreeVO child = new BtmTreeVO(); |
| | | child.setOid(s.getOid()); |
| | | child.setName(s.getId() + " " + (s.getName() == null ? "" : s.getName())); |
| | | child.setName(s.getName()); |
| | | child.setId(s.getId()); |
| | | child.setLabel(s.getId() + (s.getName() == null ? "" : "(" + s.getName() + ")")); |
| | | return child; |
| | | }).collect(Collectors.toList())); |
| | | treeList.add(parent); |
| | |
| | | package com.vci.ubcs.omd.service.impl; |
| | | |
| | | import com.alibaba.cloud.commons.lang.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.vci.ubcs.omd.constant.BtmTypeFieldConstant; |
| | | import com.vci.ubcs.omd.entity.LinkType; |
| | | import com.vci.ubcs.omd.entity.LinkTypeAttribute; |
| | | import com.vci.ubcs.omd.mapper.LinkTypeAttributeMapper; |
| | | import com.vci.ubcs.omd.service.IAttributeService; |
| | | import com.vci.ubcs.omd.service.ILinkTypeAttributeService; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.LinkTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.LinkTypeVO; |
| | | import com.vci.ubcs.omd.wrapper.LinkTypeAttributeWrapper; |
| | | import com.vci.ubcs.starter.web.enumpck.VciFieldTypeEnum; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * Description: 龿¥ç±»åå
å«å±æ§çæå¡ |
| | |
| | | VciBaseUtil.alertNotNull(oid); |
| | | return baseMapper.selectOne(Wrappers.<LinkTypeAttribute>query().lambda().eq(LinkTypeAttribute::getOid,oid)); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®é¾æ¥ç±»åè·åé»è®¤å段 |
| | | * |
| | | * @param linkTypeVO 龿¥ç±»å |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | @Override |
| | | public List<LinkTypeAttributeVO> getDefaultAttributes(LinkTypeVO linkTypeVO) { |
| | | Objects.requireNonNull(linkTypeVO,"龿¥ç±»åä¸è½ä¸ºç©º"); |
| | | List<LinkTypeAttributeVO> list = new ArrayList<>(); |
| | | // ä¸å¡ç±»åçåºæ¬å段 |
| | | BtmTypeFieldConstant.LINK_TYPE_FIELD_MAP.forEach((id, name) -> { |
| | | LinkTypeAttributeVO vo = new LinkTypeAttributeVO(); |
| | | vo.setId(id); |
| | | vo.setName(name); |
| | | vo.setPkLinkType(linkTypeVO.getOid()); |
| | | if (StringUtils.equals(id,"oid")){ |
| | | vo.setNullableFlag(false); |
| | | }else { |
| | | vo.setNullableFlag(true); |
| | | } |
| | | if (Arrays.asList("createtime","lastmodifytime","owner").contains(id)){ |
| | | vo.setAttrDataType(VciFieldTypeEnum.VTDateTime.name()); |
| | | vo.setAttributeLength(6); |
| | | }else { |
| | | vo.setAttrDataType(VciFieldTypeEnum.VTString.name()); |
| | | vo.setAttributeLength(150); |
| | | } |
| | | list.add(vo); |
| | | }); |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®é¾æ¥ç±»åè·åææçåæ®µ |
| | | * |
| | | * @param linkTypeVO 龿¥ç±»å |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | @Override |
| | | public List<LinkTypeAttributeVO> getAllAttributes(LinkTypeVO linkTypeVO) { |
| | | Objects.requireNonNull(linkTypeVO,"龿¥ç±»åä¸è½ä¸ºç©º"); |
| | | List<LinkTypeAttributeVO> attributes = getAttributesNoDefault(linkTypeVO); |
| | | attributes.addAll(getDefaultAttributes(linkTypeVO)); |
| | | return attributes; |
| | | } |
| | | |
| | | /** |
| | | * è·åéé»è®¤å段ç龿¥ç±»å屿§ |
| | | * |
| | | * @param linkTypeVO 龿¥ç±»å |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<LinkTypeAttributeVO> getAttributesNoDefault(LinkTypeVO linkTypeVO) { |
| | | Objects.requireNonNull(linkTypeVO,"龿¥ç±»åä¸è½ä¸ºç©º"); |
| | | return LinkTypeAttributeWrapper.build().listEntityVO(baseMapper.selectList(Wrappers.<LinkTypeAttribute>query().lambda().eq(LinkTypeAttribute::getPkLinkType, linkTypeVO.getOid()))); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éè·åéé»è®¤å段ç龿¥ç±»å屿§ |
| | | * |
| | | * @param linkTypeDOList 龿¥ç±»å |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | @Override |
| | | public Map<String, List<LinkTypeAttributeVO>> batchGetAttributesNoDefault(List<LinkType> linkTypeDOList) { |
| | | VciBaseUtil.alertNotNull(linkTypeDOList,"龿¥ç±»åéå"); |
| | | Set<String> oidSet = linkTypeDOList.stream().map(LinkType::getOid).collect(Collectors.toSet()); |
| | | if (CollectionUtils.isEmpty(oidSet)){ |
| | | return new HashMap<>(); |
| | | } |
| | | List<LinkTypeAttribute> attributes = baseMapper.selectList(Wrappers.<LinkTypeAttribute>query().lambda().in(LinkTypeAttribute::getPkLinkType, oidSet)); |
| | | return LinkTypeAttributeWrapper.build().listEntityVO(Optional.ofNullable(attributes).orElseGet(ArrayList::new)).stream().collect(Collectors.groupingBy(LinkTypeAttributeVO::getPkLinkType)); |
| | | } |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.nacos.api.exception.NacosException; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import com.baomidou.mybatisplus.extension.conditions.query.QueryChainWrapper; |
| | | import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper; |
| | | import com.baomidou.mybatisplus.extension.conditions.update.UpdateChainWrapper; |
| | | import com.baomidou.mybatisplus.extension.kotlin.KtQueryChainWrapper; |
| | | import com.baomidou.mybatisplus.extension.kotlin.KtUpdateChainWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.vci.ubcs.omd.constant.BtmTypeConstant; |
| | | import com.vci.ubcs.omd.dto.BtmAndLinkTypeDdlDTO; |
| | |
| | | import com.vci.ubcs.omd.repeater.DomainRepeater; |
| | | import com.vci.ubcs.omd.service.*; |
| | | import com.vci.ubcs.omd.vo.*; |
| | | import com.vci.ubcs.omd.wrapper.BtmTypeWrapper; |
| | | import com.vci.ubcs.omd.wrapper.LinkTypeAttributeWrapper; |
| | | import com.vci.ubcs.omd.wrapper.LinkTypeWrapper; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.TransactionDefinition; |
| | | import org.springframework.transaction.TransactionStatus; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.support.DefaultTransactionDefinition; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.*; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | if(!CollectionUtils.isEmpty(pkLinkTypeCollection)){ |
| | | List<LinkType> linkTypeDOList = listLinkTypeDOByOidCollection(pkLinkTypeCollection); |
| | | if(!CollectionUtils.isEmpty(linkTypeDOList)) { |
| | | return LinkTypeWrapper.build().listEntityVO(linkTypeDOList); |
| | | Map<String,List<LinkTypeAttributeVO>> pkLinkTypeAndAttributeMap = linkTypeAttributeService.batchGetAttributesNoDefault(linkTypeDOList); |
| | | return LinkTypeWrapper.build().listEntityVO(linkTypeDOList,pkLinkTypeAndAttributeMap); |
| | | } |
| | | } |
| | | return null; |
| | |
| | | linkTypeDOList.addAll(linkTypeDOS); |
| | | } |
| | | }); |
| | | return linkTypeDOList; |
| | | } |
| | | return null; |
| | | } |
| | |
| | | if(!CollectionUtils.isEmpty(linkTypeIdCollection)){ |
| | | List<LinkType> linkTypeDOList = listLinkTypeDOByIdCollection(linkTypeIdCollection); |
| | | if(!CollectionUtils.isEmpty(linkTypeDOList)) { |
| | | return LinkTypeWrapper.build().listEntityVO(linkTypeDOList); |
| | | Map<String,List<LinkTypeAttributeVO>> pkLinkTypeAndAttributeMap = linkTypeAttributeService.batchGetAttributesNoDefault(linkTypeDOList); |
| | | return LinkTypeWrapper.build().listEntityVO(linkTypeDOList, pkLinkTypeAndAttributeMap); |
| | | } |
| | | } |
| | | return null; |
| | |
| | | * @throws VciBaseException æ·»å åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | public LinkTypeVO addSave(LinkTypeVO linkTypeVO, boolean autoCreateTable) throws VciBaseException { |
| | | TransactionStatus transaction = null; |
| | | if(autoCreateTable) { |
| | |
| | | } |
| | | LinkType linkTypeDO = new LinkType(); |
| | | BeanUtil.copy(linkTypeVO, linkTypeDO); |
| | | if (StringUtils.isBlank(linkTypeDO.getTableName())){ |
| | | linkTypeDO.setTableName(getTableName(linkTypeDO.getId(),linkTypeDO.getDomain())); |
| | | } |
| | | String creator = AuthUtil.getUserAccount(); |
| | | Date now = new Date(); |
| | | linkTypeDO.setCreator(creator); |
| | | linkTypeDO.setCreateTime(now); |
| | | linkTypeDO.setOwner(creator); |
| | | linkTypeDO.setBtmName(BtmTypeConstant.LINK_TYPE); |
| | | linkTypeDO.setTs(now); |
| | | LinkTypeWrapper.build().setBeforeInsert(linkTypeDO,creator,now); |
| | | |
| | | //å¤ç屿§ |
| | | addAttributeForLink(linkTypeVO.getAttributes(),linkTypeDO.getOid(),creator,now); |
| | | List<LinkTypeAttributeVO> attributeVOList = addAttributeForLink(linkTypeVO.getAttributes(), linkTypeDO.getOid(), creator, now); |
| | | |
| | | baseMapper.insert(linkTypeDO); |
| | | if(autoCreateTable) { |
| | | dataSourceTransactionManager.commit(transaction); |
| | | LinkTypeVO typeVO = LinkTypeWrapper.build().entityVO(linkTypeDO); |
| | | typeVO.setAttributes(attributeVOList); |
| | | List<LinkTypeAttributeVO> attributes = typeVO.getAttributes(); |
| | | attributes.addAll(linkTypeAttributeService.getDefaultAttributes(typeVO)); |
| | | typeVO.setAttributes(attributes); |
| | | R r = DomainRepeater.submitLinkType(typeVO.getDomain(), typeVO); |
| | | if (!r.isSuccess()){ |
| | | dataSourceTransactionManager.rollback(transaction); |
| | | }else { |
| | | dataSourceTransactionManager.commit(transaction); |
| | | } |
| | | } |
| | | }catch (VciBaseException e){ |
| | | if(autoCreateTable) { |
| | |
| | | } |
| | | throw e; |
| | | } |
| | | if(autoCreateTable) { |
| | | /*if(autoCreateTable) { |
| | | checkTableSame(linkTypeVO); |
| | | } |
| | | }*/ |
| | | return linkTypeVO; |
| | | } |
| | | |
| | |
| | | * @param creator å建人 |
| | | * @param now å½åæ¶é´ |
| | | */ |
| | | private void addAttributeForLink(List<LinkTypeAttributeVO> attributesVOList,String pkLinkType,String creator,Date now){ |
| | | private List<LinkTypeAttributeVO> addAttributeForLink(List<LinkTypeAttributeVO> attributesVOList,String pkLinkType,String creator,Date now){ |
| | | List<LinkTypeAttribute> linkTypeAttributeDOList = new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(attributesVOList)) { |
| | | List<String> attributeIdList = new ArrayList<>(); |
| | | attributesVOList.stream().forEachOrdered(s -> { |
| | | attributesVOList.forEach(s -> { |
| | | linkTypeAttributeService.checkAttribute(s); |
| | | linkTypeAttributeDOList.add(LinkTypeAttributeWrapper.build().copyVO2DO(s, pkLinkType, creator, now)); |
| | | attributeIdList.add(s.getId().toLowerCase().trim()); |
| | |
| | | //æ£æ¥å±æ§æ¯å¦é½åå¨ |
| | | attributeService.checkAttributeExists(attributeIdList); |
| | | linkTypeAttributeService.saveOrUpdateBatch(linkTypeAttributeDOList,10000); |
| | | return LinkTypeAttributeWrapper.build().listEntityVO(linkTypeAttributeDOList); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | if (!CollectionUtils.isEmpty(modifyAttributeInfoDOList)) { |
| | | modifyAttributeService.saveOrUpdateBatch(modifyAttributeInfoDOList); |
| | | modifyAttributeService.finishModify(modifyAttributeInfoDOList); |
| | | } |
| | | modifyAttributeService.finishModify(modifyAttributeInfoDOList); |
| | | } |
| | | |
| | | /** |
| | |
| | | if(StringUtils.isNotBlank(unExistBtmTypeId)){ |
| | | throw new VciBaseException("龿¥ç±»å使ç¨çä¸å¡ç±»å{0}ä¸åå¨ï¼è¯·æ¥è¯",new Object[]{unExistBtmTypeId}); |
| | | } |
| | | |
| | | String creator = AuthUtil.getUserAccount(); |
| | | Date now = new Date(); |
| | | linkTypeDO.setLastModifier(creator); |
| | | linkTypeDO.setLastModifyTime(now); |
| | | linkTypeDO.setTs(now); |
| | | linkTypeDO = LinkTypeWrapper.build().setBeforeUpdate(linkTypeDO,creator,now); |
| | | //å¤ç屿§ |
| | | |
| | | |
| | | LinkTypeWrapper.build().copyLinkTypeVO2DO(linkTypeVO,linkTypeDO,creator,new Date()); |
| | | |
| | | //å
æ¥è¯¢è¿ä¸ªé¾æ¥ç±»åå
å«å¤å°å±æ§ |
| | |
| | | } |
| | | saveOrUpdate(linkTypeDO); |
| | | if(autoCreateTable) { |
| | | List<LinkTypeAttributeVO> defaultAttributes = linkTypeAttributeService.getDefaultAttributes(linkTypeVO); |
| | | List<LinkTypeAttributeVO> attributes = linkTypeVO.getAttributes(); |
| | | attributes.addAll(defaultAttributes); |
| | | linkTypeVO.setAttributes(attributes); |
| | | BtmAndLinkTypeDdlDTO ddlDTO = new BtmAndLinkTypeDdlDTO(); |
| | | DomainRepeater.checkDifferent(ddlDTO,linkTypeVO.getDomain()); |
| | | dataSourceTransactionManager.commit(transaction); |
| | | } |
| | | }catch (VciBaseException e){ |
| | | } catch (Throwable e){ |
| | | if(autoCreateTable) { |
| | | dataSourceTransactionManager.rollback(transaction); |
| | | } |
| | | throw e; |
| | | }catch (Throwable e) { |
| | | if(autoCreateTable) { |
| | | dataSourceTransactionManager.rollback(transaction); |
| | | } |
| | | throw e; |
| | | throw new VciBaseException(e.getMessage()); |
| | | } |
| | | if(autoCreateTable) { |
| | | /*if(autoCreateTable) { |
| | | checkTableSame(linkTypeVO); |
| | | } |
| | | }*/ |
| | | return linkTypeVO; |
| | | } |
| | | |
| | |
| | | attributeVO.setLastModifier(creator); |
| | | attributeVO.setLastModifyTime(now); |
| | | attributeVO.setTs(now); |
| | | //æ¥è¯¢é¾æ¥ç±»åæ¯å¦åå¨ |
| | | linkTypeAttributeService.saveOrUpdate(attributeDO); |
| | | if (autoEdit2Table) { |
| | | BtmAndLinkTypeDdlDTO ddlDTO = new BtmAndLinkTypeDdlDTO(); |
| | | // ddlDTO.setLinkTypeList(); |
| | | // DomainRepeater.checkDifferent(,domain); |
| | | LinkTypeVO linkTypeVO = LinkTypeWrapper.build().entityVO(linkTypeDO); |
| | | ddlDTO.setLinkTypeList(Collections.singletonList(linkTypeVO)); |
| | | DomainRepeater.checkDifferent(ddlDTO,domain); |
| | | dataSourceTransactionManager.commit(transaction); |
| | | } |
| | | // }catch (NacosException e){ |
| | | // if(autoEdit2Table) { |
| | | // dataSourceTransactionManager.rollback(transaction); |
| | | // } |
| | | // throw new RuntimeException(e); |
| | | }catch (NacosException e){ |
| | | if(autoEdit2Table) { |
| | | dataSourceTransactionManager.rollback(transaction); |
| | | } |
| | | throw new RuntimeException(e); |
| | | }catch (Throwable e){ |
| | | if(autoEdit2Table) { |
| | | dataSourceTransactionManager.rollback(transaction); |
| | |
| | | public List<BtmTreeVO> treeDomain() { |
| | | try { |
| | | Map<String, String> domain = Optional.ofNullable(DomainRepeater.getDomain()).orElseGet(ArrayList::new).stream().collect(Collectors.toMap(DomainVO::getValue, DomainVO::getLabel)); |
| | | List<LinkTypeVO> vos = LinkTypeWrapper.build().listEntityVO(baseMapper.selectAll()); |
| | | List<LinkTypeVO> vos = LinkTypeWrapper.build().listEntityVO(baseMapper.selectAll(), null); |
| | | Map<String, List<LinkTypeVO>> domainMap = vos.stream().collect(Collectors.groupingBy(LinkTypeVO::getDomain)); |
| | | List<BtmTreeVO> treeList = new ArrayList<>(); |
| | | domainMap.forEach((k,v)-> { |
| | |
| | | BtmTreeVO parent = new BtmTreeVO(); |
| | | parent.setName(label); |
| | | parent.setId(k); |
| | | parent.setLabel(label); |
| | | parent.setChildList(v.stream().map(s -> { |
| | | BtmTreeVO child = new BtmTreeVO(); |
| | | child.setOid(s.getOid()); |
| | | child.setName(s.getId() + " " + (s.getName() == null ? "" : s.getName())); |
| | | child.setLabel(s.getId() + (s.getName() == null ? "" : "(" + s.getName() + ")")); |
| | | child.setId(s.getId()); |
| | | child.setName(s.getName()); |
| | | return child; |
| | | }).collect(Collectors.toList())); |
| | | treeList.add(parent); |
| | |
| | | package com.vci.ubcs.omd.wrapper; |
| | | |
| | | import com.vci.ubcs.omd.cache.EnumCache; |
| | | import com.vci.ubcs.omd.constant.BtmTypeConstant; |
| | | import com.vci.ubcs.omd.dto.BtmTypeLinkAttributesDTO; |
| | | import com.vci.ubcs.omd.entity.BtmTypeAttribute; |
| | |
| | | public BtmTypeAttributeVO entityVO(BtmTypeAttribute entity) { |
| | | BtmTypeAttributeVO vo = Objects.requireNonNull(BeanUtil.copy(entity, BtmTypeAttributeVO.class)); |
| | | // å¨è¿é设置æä¸¾æ¾ç¤ºå¼ |
| | | vo.setAttrDataTypeText(EnumCache.getValue("attributeType",vo.getAttrDataType())); |
| | | return vo; |
| | | } |
| | | |
| | |
| | | package com.vci.ubcs.omd.wrapper; |
| | | |
| | | import com.alibaba.cloud.commons.lang.StringUtils; |
| | | import com.vci.ubcs.omd.cache.EnumCache; |
| | | import com.vci.ubcs.omd.constant.BtmTypeConstant; |
| | | import com.vci.ubcs.omd.entity.LinkTypeAttribute; |
| | | import com.vci.ubcs.omd.vo.LinkTypeAttributeVO; |
| | |
| | | @Override |
| | | public LinkTypeAttributeVO entityVO(LinkTypeAttribute entity) { |
| | | LinkTypeAttributeVO vo = BeanUtil.copy(entity, LinkTypeAttributeVO.class); |
| | | vo.setAttrDataTypeText(EnumCache.getValue("attributeType",vo.getAttrDataType())); |
| | | return vo; |
| | | } |
| | | |
| | |
| | | attributeDO.setCreateTime(now); |
| | | attributeDO.setTs(now); |
| | | attributeDO.setOwner(creator); |
| | | attributeDO.setLastModifier(creator); |
| | | attributeDO.setLastModifyTime(now); |
| | | attributeDO.setBtmName(BtmTypeConstant.LINK_TYPE_ATTRIBUTE); |
| | | return attributeDO; |
| | | } |
| | |
| | | package com.vci.ubcs.omd.wrapper; |
| | | |
| | | import com.vci.ubcs.omd.cache.BtmTypeCache; |
| | | import com.vci.ubcs.omd.constant.BtmTypeConstant; |
| | | import com.vci.ubcs.omd.entity.LinkType; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import com.vci.ubcs.omd.vo.LinkTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.LinkTypeVO; |
| | | import com.vci.ubcs.starter.web.enumpck.NewAppConstantEnum; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | |
| | | @Override |
| | | public LinkTypeVO entityVO(LinkType entity) { |
| | | LinkTypeVO vo = BeanUtil.copy(entity, LinkTypeVO.class); |
| | | LinkTypeVO vo = Optional.ofNullable(BeanUtil.copy(entity, LinkTypeVO.class)).orElseGet(LinkTypeVO::new); |
| | | List<String> fromIdList = Func.toStrList(",", vo.getFromBtmType()); |
| | | List<String> toIdList = Func.toStrList(",", vo.getToBtmType()); |
| | | Set<String> btmIdSet = new HashSet<>(); |
| | | btmIdSet.addAll(fromIdList); |
| | | btmIdSet.addAll(toIdList); |
| | | List<BtmTypeVO> btmTypeVOList = BtmTypeCache.selectByIdCollection(new ArrayList<>(btmIdSet)); |
| | | List<BtmTypeVO> fromBtm = new ArrayList<>(); |
| | | List<BtmTypeVO> toBtm = new ArrayList<>(); |
| | | Optional.ofNullable(btmTypeVOList).orElseGet(ArrayList::new).forEach(btm -> { |
| | | if (vo.getFromBtmType().contains(btm.getId())){ |
| | | fromBtm.add(btm); |
| | | } |
| | | if (vo.getToBtmType().contains(btm.getId())){ |
| | | toBtm.add(btm); |
| | | } |
| | | }); |
| | | vo.setFromBtmTypes(fromBtm); |
| | | vo.setToBtmTypes(toBtm); |
| | | // æä¸¾å¤ç |
| | | vo.setDomainText(NewAppConstantEnum.getTextByName(vo.getDomain())); |
| | | return vo; |
| | | } |
| | | |
| | | public List<LinkTypeVO> listEntityVO(List<LinkType> entityList){ |
| | | return Optional.ofNullable(entityList).orElseGet(ArrayList::new).stream().map(this::entityVO).collect(Collectors.toList()); |
| | | public List<LinkTypeVO> listEntityVO(List<LinkType> entityList, Map<String, List<LinkTypeAttributeVO>> pkLinkTypeAndAttributeMap){ |
| | | List<LinkTypeVO> voList = Optional.ofNullable(entityList).orElseGet(ArrayList::new).stream().map(this::entityVO).collect(Collectors.toList()); |
| | | if (!CollectionUtils.isEmpty(voList) && pkLinkTypeAndAttributeMap != null){ |
| | | voList.forEach(vo -> { |
| | | List<LinkTypeAttributeVO> attributes = pkLinkTypeAndAttributeMap.getOrDefault(vo.getOid(), new ArrayList<>()); |
| | | vo.setAttributes(attributes); |
| | | }); |
| | | } |
| | | return voList; |
| | | } |
| | | |
| | | public void copyLinkTypeVO2DO(LinkTypeVO linkTypeVO, LinkType linkTypeDO, String creator, Date now) { |
| | |
| | | linkTypeDO.setLastModifyTime(now); |
| | | linkTypeDO.setBtmName(BtmTypeConstant.LINK_TYPE); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ä¿åå设置é»è®¤åæ®µå¼ |
| | | * |
| | | * @param linkTypeDO 龿¥ç±»å |
| | | * @param modifier ä¿®æ¹äºº |
| | | * @param modifyTime ä¿®æ¹æ¶é´ |
| | | * @return |
| | | */ |
| | | public LinkType setBeforeUpdate(LinkType linkTypeDO, String modifier, Date modifyTime) { |
| | | linkTypeDO.setLastModifier(modifier); |
| | | linkTypeDO.setTs(modifyTime); |
| | | linkTypeDO.setLastModifyTime(modifyTime); |
| | | return linkTypeDO; |
| | | } |
| | | |
| | | /** |
| | | * æå
¥å设置é»è®¤å段 |
| | | * @param linkTypeDO 龿¥ç±»å |
| | | * @param creator å建人 |
| | | * @param createTime å建æ¶é´ |
| | | */ |
| | | public void setBeforeInsert(LinkType linkTypeDO, String creator, Date createTime) { |
| | | linkTypeDO.setOid(VciBaseUtil.getPk()); |
| | | linkTypeDO.setCreator(creator); |
| | | linkTypeDO.setCreateTime(createTime); |
| | | linkTypeDO.setOwner(creator); |
| | | linkTypeDO.setBtmName(BtmTypeConstant.LINK_TYPE); |
| | | linkTypeDO.setTs(createTime); |
| | | linkTypeDO.setLastModifyTime(createTime); |
| | | linkTypeDO.setLastModifier(creator); |
| | | } |
| | | } |
| | |
| | | </sql> |
| | | |
| | | <sql id="tableName"> |
| | | pl_omd_link_type_attr |
| | | pl_omd_link_type_attribute |
| | | </sql> |
| | | </mapper> |