引用码段关于业务类型接口的联调,重复使用的界面抽离成单独组件
已修改25个文件
已删除31个文件
已添加7个文件
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const referDataGrid = (page, limit, params) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/referBtmTypeController/referDataGrid', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | page, |
| | | limit, |
| | | } |
| | | }) |
| | | } |
| | | export const gridAttributesByBtmId = (page, limit, params) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/referBtmTypeController/gridAttributesByBtmId', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | page, |
| | | limit, |
| | | } |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog |
| | | title="é«çº§æ¥è¯¢" |
| | | append-to-body |
| | | width="55vw" |
| | | style="height: 115vh; overflow: hidden" |
| | | :visible.sync="isShowDialog" |
| | | @close="recoverPage" |
| | | destroy-on-close> |
| | | <div class="search-total"> |
| | | <el-row> |
| | | <div class="grid-content"> |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | | icon="el-icon-search" |
| | | @click="searchSubmit"> |
| | | æ¥è¯¢ |
| | | </el-button> |
| | | <el-button |
| | | type="warning" |
| | | size="small" |
| | | icon="el-icon-refresh" |
| | | @click="resetInput"> |
| | | éç½® |
| | | </el-button> |
| | | </div> |
| | | </el-row> |
| | | <el-row |
| | | v-for="(item,index) in initOptions.column" |
| | | :key="item.value" |
| | | class="search-content" |
| | | :span="24"> |
| | | <el-col :span="4"> |
| | | <div class="grid-content"> |
| | | <el-select placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="feildName in item.searchfeildName" |
| | | :key="feildName.value" |
| | | :label="feildName.label" |
| | | :value="feildName.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <div class="grid-content"> |
| | | <el-select placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="condition in item.searchCondition" |
| | | :key="condition.value" |
| | | :label="condition.label" |
| | | :value="condition.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="13"> |
| | | <div class="grid-content"> |
| | | <div class="el-input"> |
| | | <input type="text" placeholder="请è¾å
¥" autocomplete="off" class="el-input__inner" :value="value"> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div class="grid-content"> |
| | | <i class="el-icon-close" @click="removeInput(index)"></i> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "advancedQuery", |
| | | props: { |
| | | // å¯¹è¯æ¡æ¾ç¤ºéèæ§å¶ |
| | | visible: { |
| | | type: "Boolean", |
| | | default: false, |
| | | }, |
| | | // 页颿¾ç¤ºé
ç½® |
| | | options: { |
| | | type: "Object", |
| | | default: {}, |
| | | }, |
| | | // 页颿°æ®æ¸²æé
ç½® |
| | | searchForm: { |
| | | type: "Object", |
| | | default: {}, |
| | | }, |
| | | value:{ |
| | | type: "String", |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | // å¯¹è¯æ¡æ¾ç¤ºæ§å¶ |
| | | isShowDialog: this.visible, |
| | | initOptions: {}, |
| | | searchForm: {}, |
| | | } |
| | | }, |
| | | watch: { |
| | | // çå¬ç¶ç»ä»¶ä¼ ççªå£æ¾ç¤ºéèçå¼ |
| | | visible (){ |
| | | this.isShowDialog = this.visible; |
| | | } |
| | | }, |
| | | created () { |
| | | // å°optionsé
ç½®èµå¼å°dataä¸çoptionä¸ï¼é¿å
æ·±æµ
æ·è´çé®é¢æä»¥éè¦è½¬jsonä¹ååèµå¼ |
| | | const data = JSON.stringify(this.options); |
| | | this.initOptions = JSON.parse(data); |
| | | console.log(this.searchForm); |
| | | }, |
| | | methods: { |
| | | // ç§»é¤æç´¢æ¡ |
| | | removeInput(index){ |
| | | //console.log(this.options.column); |
| | | this.$delete(this.initOptions.column,index); |
| | | }, |
| | | // éç½®å½åçé¢çè¾å
¥æ¡ |
| | | resetInput(){ |
| | | const data = JSON.stringify(this.options); |
| | | this.initOptions = JSON.parse(data); |
| | | }, |
| | | // æ¢å¤é¡µé¢ |
| | | recoverPage(){ |
| | | this.resetInput(); |
| | | this.$emit('update:visible', false); |
| | | }, |
| | | // æäº¤å½å页é¢çè¾å
¥ |
| | | searchSubmit(){ |
| | | console.log(11); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | |
| | | .search-total { |
| | | border-radius: 4px; |
| | | min-height: 36px; |
| | | // margin-left: 35px; |
| | | margin-top: -20px; |
| | | } |
| | | .search-total > .el-row{ |
| | | margin-bottom: 10px; |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | .search-total > .el-col { |
| | | border-radius: 4px; |
| | | } |
| | | .search-total > .el-col > .grid-content { |
| | | border-radius: 4px; |
| | | min-height: 36px; |
| | | } |
| | | .search-content > .el-col { |
| | | margin-right: 6px; |
| | | &:last-child { |
| | | margin-right: 0; |
| | | } |
| | | } |
| | | .grid-content > .el-icon-close { |
| | | font-size: 35px; |
| | | cursor: pointer; |
| | | color: rgb(222, 130, 105); |
| | | } |
| | | .grid-content > .el-icon-close:hover{ |
| | | font-size: 38px; |
| | | color: rgb(219, 52, 6); |
| | | } |
| | | |
| | | |
| | | </style> |
| | |
| | | export default { |
| | | name: "formulaEditor", |
| | | props: { |
| | | // å¯¹è¯æ¡æ¾ç¤ºéèæ§å¶ |
| | | visible: { |
| | | type: "Boolean", |
| | | default: false, |
| | | }, |
| | | //æ¬åºæ¯åé |
| | | thisSceneTableData: { |
| | | type: Array, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | isShowformulaEdit: false, //å
¬å¼ç¼è¾æ¡å¯¹è¯æ¡æ¾ç¤ºæ§å¶ |
| | | isShowformulaEdit: this.visible, //å
¬å¼ç¼è¾æ¡å¯¹è¯æ¡æ¾ç¤ºæ§å¶ |
| | | formulaContent: '', //å
¬å¼ç¼è¾æ¡å
容,æ¹ä¾¿å¼çåä¼ |
| | | activeName: 'first', //å½åæ´»å¨çtab |
| | | activeNameAttr: 'first', //åéä¸çå½åæ´»å¨tab |
| | |
| | | ], |
| | | }; |
| | | }, |
| | | watch: { |
| | | // çå¬ç¶ç»ä»¶ä¼ ççªå£æ¾ç¤ºéèçå¼ |
| | | visible (){ |
| | | this.isShowformulaEdit = this.visible; |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | //å廿·»å å
¬å¼å
容 |
| | |
| | | //å
³éæ¶æ¸
ç©ºä¸æ¬¡å
¬å¼å
容 |
| | | closeFormulaEdit(){ |
| | | this.resetFormulaContent(); |
| | | this.$emit('update:visible',false); |
| | | }, |
| | | //ç¼è¾å®æå
¬å¼å
容忾并å
³éå¯¹è¯æ¡ |
| | | saveFormulaContent(){ |
| | |
| | | return; |
| | | } |
| | | //å
¬å¼å
容忾 |
| | | this.$emit('updateFormulaContent', this.formulaContent) // 触åupdate:dataå°åç»ä»¶å¼ä¼ éç»ç¶ç»ä»¶ |
| | | // 触åupdate:dataå°åç»ä»¶å¼ä¼ éç»ç¶ç»ä»¶ |
| | | this.$emit('updateFormulaContent', this.formulaContent) |
| | | this.isShowformulaEdit = false; |
| | | }, |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog |
| | | title="为ãåç
§å¼ç¨çä¸å¡ç±»åãéåå¼" |
| | | append-to-body |
| | | :visible.sync="referBtmDialogParams.isShowDialog" |
| | | @close="recoverPage" |
| | | width="65%" |
| | | style="height: 150vh; margin-top: -13vh;"> |
| | | <avue-crud |
| | | :page.sync="referBtmDialogParams.referBtmDataPage" |
| | | :ref="referBtmDialogParams.ref" |
| | | :option="referBtmDialogParams.referBtmOption" |
| | | :table-loading="referBtmDialogParams.referBtmDialogLoading" |
| | | :data="referBtmDialogParams.referBtmData" |
| | | @refresh-change="referBtmDataChange" |
| | | @search-change="referBtmSearchChange" |
| | | @search-reset="referBtmSearchReset" |
| | | @selection-change="referBtmSelectionChange" |
| | | @current-change="referBtmCurrentChange" |
| | | @size-change="referBtmSizeChange" |
| | | @on-load="referBtmOnLoad" |
| | | @row-click="referBtmRowClick"> |
| | | </avue-crud> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="saveSelectedReferBtm">ä¿ å</el-button> |
| | | <el-button @click="referBtmDialogParams.isShowDialog = false">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import referBtmOption from "@/const/code/referBtmDialog"; |
| | | import {referDataGrid} from "@/api/code/referBtmType"; |
| | | export default { |
| | | name: "referBtmTypeCrudDialog", |
| | | props: { |
| | | // å¯¹è¯æ¡æ¾ç¤ºéèæ§å¶ |
| | | visible: { |
| | | type: "Boolean", |
| | | default: false, |
| | | }, |
| | | }, |
| | | watch: { |
| | | // çå¬ç¶ç»ä»¶ä¼ ççªå£æ¾ç¤ºéèçå¼ |
| | | visible (){ |
| | | this.referBtmDialogParams.isShowDialog = this.visible; |
| | | } |
| | | }, |
| | | data() { |
| | | return{ |
| | | /** åç
§å¼ç¨çä¸å¡ç±»åå¯¹è¯æ¡ç¸å
³æ°æ® */ |
| | | referBtmDialogParams: { |
| | | ref: 'crudReferBtm', |
| | | isShowDialog: this.visible, //å¯¹è¯æ¡æ¾ç¤ºæ§å¶ |
| | | referBtmDialogLoading: true, //è¡¨æ ¼æ°æ®å è½½æç¤º |
| | | referBtmDataPage: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | referBtmOption: referBtmOption, //è¡¨æ ¼é
ç½® |
| | | referBtmData: [], //è¡¨æ ¼æ°æ® |
| | | referBtmQuery: {}, //æ¥è¯¢æ¡ä»¶ |
| | | referBtmSelectionList: [], //å½åéä¸è¡ |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | // æ¢å¤é¡µé¢ |
| | | recoverPage(){ |
| | | this.referBtmSelectionClear(); |
| | | this.$emit('update:visible', false); |
| | | }, |
| | | /** 为åç
§å¼ç¨çä¸å¡ç±»åéåå¼ï¼ç¬¬äºå±åµå¥å¯¹è¯æ¡ï¼åå
¶ç¸å
³æ¹æ³ */ |
| | | // è¡¨æ ¼æ°æ®å·æ°æé® |
| | | referBtmDataChange() { |
| | | this.referBtmOnLoad(this.referBtmDialogParams.referBtmDataPage, this.referBtmDialogParams.referBtmQuery); |
| | | }, |
| | | saveSelectedReferBtm() { |
| | | if(this.referBtmDialogParams.referBtmSelectionList.length != 1){ |
| | | this.$message.warning("è¯·éæ©ä¸æ¡æ°æ®!"); |
| | | return false; |
| | | } |
| | | // è°ç¨ç¶ç»ä»¶çæ¹æ³å¹¶ä¼ éå½åéä¸çåæ°å¼ï¼å®ç°åæ¾ |
| | | this.$emit('echoReferBtmType', this.referBtmDialogParams.referBtmSelectionList[0]) |
| | | //æ¸
空å½åéä¸çè¡ |
| | | this.referBtmSelectionClear(); |
| | | this.referBtmDialogParams.isShowDialog = false; |
| | | }, |
| | | referBtmSearchReset() { |
| | | this.referBtmDialogParams.referBtmQuery = {}; |
| | | this.referBtmOnLoad(); |
| | | }, |
| | | referBtmSearchChange(params, done) { |
| | | this.referBtmDialogParams.referBtmQuery = params; |
| | | this.referBtmDialogParams.referBtmDataPage.currentPage = 1; |
| | | this.referBtmOnLoad(); |
| | | done(); |
| | | }, |
| | | // åå»éä¸è¡¨æ ¼è¡æ¶è§¦å |
| | | referBtmRowClick(row){ |
| | | this.$refs[this.referBtmDialogParams.ref].toggleSelection(); |
| | | this.referBtmDialogParams.referBtmSelectionList = row; |
| | | this.$refs[this.referBtmDialogParams.ref].setCurrentRow(row); |
| | | this.$refs[this.referBtmDialogParams.ref].toggleRowSelection(row); //éä¸å½åè¡ |
| | | }, |
| | | referBtmSelectionChange(list) { |
| | | this.referBtmDialogParams.referBtmSelectionList = list; |
| | | this.$refs[this.referBtmDialogParams.ref].setCurrentRow(this.referBtmDialogParams.referBtmSelectionList[list.length-1]); |
| | | }, |
| | | referBtmSelectionClear() { |
| | | this.referBtmDialogParams.referBtmSelectionList = []; |
| | | this.$nextTick(() => { |
| | | this.$refs[this.referBtmDialogParams.ref].toggleSelection(); |
| | | }); |
| | | }, |
| | | referBtmCurrentChange(currentPage){ |
| | | this.referBtmDialogParams.referBtmDataPage.currentPage = currentPage; |
| | | }, |
| | | referBtmSizeChange(pageSize){ |
| | | this.referBtmDialogParams.referBtmDataPage.pageSize = pageSize; |
| | | }, |
| | | refreshReferBtmDataChange() { |
| | | this.referBtmOnLoad(this.referBtmDialogParams.referBtmDataPage, this.referBtmDialogParams.referBtmQuery); |
| | | }, |
| | | //å è½½ä¸åç
§å¼ç¨çä¸å¡ç±»åçæ°æ® |
| | | referBtmOnLoad() { |
| | | let referBtmParams = this.referBtmDialogParams; |
| | | this.referBtmDialogParams.referBtmDialogLoading = true; |
| | | let param = {}; |
| | | // å¤ä¸ªconditionMapè¿æ ·ä¼ å |
| | | if(referBtmParams.referBtmQuery){ |
| | | Object.keys(referBtmParams.referBtmQuery).forEach(key=>{ |
| | | param['conditionMap['+key+']'] = referBtmParams.referBtmQuery[key]; |
| | | }); |
| | | } |
| | | referDataGrid( |
| | | referBtmParams.referBtmDataPage.currentPage, |
| | | referBtmParams.referBtmDataPage.pageSize, |
| | | param |
| | | ).then(res => { |
| | | //console.log(res.data); |
| | | const data = res.data.data; |
| | | this.referBtmDialogParams.referBtmDataPage.total = data.total; |
| | | this.referBtmDialogParams.referBtmData = data.records; |
| | | this.referBtmDialogParams.referBtmDialogLoading = false; |
| | | //this.referBtmSelectionClear(); |
| | | //è¡¨æ ¼è¡éä½é®é¢ |
| | | this.$nextTick(() => { |
| | | this.$refs[this.referBtmDialogParams.ref].doLayout(); |
| | | }) |
| | | }); |
| | | }, |
| | | |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | </style> |
| | |
| | | import { getReferConfigPage } from "@/api/code/codeReferConfig"; |
| | | export default { |
| | | name: "referConfigDialog", |
| | | props: { |
| | | }, |
| | | data() { |
| | | return{ |
| | | isShowReferConfigCrud:false, |
| | | referConfigCrudOption: { |
| | | border: true, |
| | | height: '45vh', |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | index: true, |
| | | selection: false, |
| | | menu: false, |
| | | addBtn: false, |
| | | refreshBtn: false, |
| | | searchShowBtn: false, |
| | | columnBtn: false, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | align: 'center', |
| | | menuAlign: 'center', |
| | | column: [ |
| | | { |
| | | label: '-', |
| | | prop: 'radio', |
| | | width: 60, |
| | | hide: false |
| | | },{ |
| | | label: 'åç
§é
ç½®ç¼å·', |
| | | width: 120, |
| | | search: true, |
| | | searchSpan: 9, |
| | | searchLabelWidth: 100, |
| | | prop: 'id' |
| | | },{ |
| | | label: 'åç
§é
ç½®åç§°', |
| | | search: true, |
| | | searchSpan: 9, |
| | | searchLabelWidth: 100, |
| | | prop: 'name' |
| | | },{ |
| | | label: 'åç
§çä¸å¡ç±»å', |
| | | search: false, |
| | | prop: 'referTypeName' |
| | | },{ |
| | | label: 'æ¾ç¤ºç屿§', |
| | | search: false, |
| | | prop: 'textField' |
| | | },{ |
| | | label: 'åå¨å¼ç屿§', |
| | | search: false, |
| | | prop: 'valueField' |
| | | },{ |
| | | label: 'åç
§çªå£ç±»å', |
| | | search: false, |
| | | prop: 'typeText', |
| | | } |
| | | ], |
| | | }, |
| | | referConfigParams: { |
| | | ref: "referConfigCrud", |
| | | referConfigLoading: false, |
| | | referConfigData: [], |
| | | referConfigPage: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | referConfigQuery: {}, |
| | | referConfigSelectedRowData: '', |
| | | // å½åéä¸è¡ |
| | | referConfigSelectedRow: '', |
| | | }, |
| | | formOption: { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | labelWidth: '150', //é»è®¤æ ç¾å®½åº¦ |
| | | // é»è®¤é
置就为æ 形类åï¼æ¹äºä¼åºç°é®é¢ |
| | | column: [ |
| | | { |
| | | label: 'æ å½¢çä¸çº§å±æ§', |
| | | prop: 'parentFieldName', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'ä¸çº§å±æ§å¼å¯¹åºå±æ§', |
| | | prop: 'parentUsedField', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'æ ¹èç¹çå¼', |
| | | prop: 'parentValue', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'æ å è½½æ¹å¼', |
| | | prop: 'loadType', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | dicData: [{ |
| | | label: 'å
¨é¨', value: 'all' |
| | | }, { |
| | | label: 'é级å è½½', value: 'node' |
| | | }], |
| | | },{ |
| | | label: 'æ¯å¦åªè½éæ©å¶åèç¹', |
| | | prop: 'onlyLeaf', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'æåºå段', |
| | | prop: 'sortField', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'æåºç±»å', |
| | | prop: 'sortType', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | dicData: [{ |
| | | label: 'ååº', value: 'asc' |
| | | }, { |
| | | label: 'éåº', value: 'desc' |
| | | }], |
| | | }, |
| | | ], |
| | | }, |
| | | referConfigForm:{}, |
| | | // æåºç±»åç表åé
ç½® |
| | | sortColumn:[{ |
| | | label: 'æ¯é¡µæ¾ç¤ºæ¡æ°', |
| | | prop: 'limit', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'æåºå段', |
| | | prop: 'sortField', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'æåºç±»å', |
| | | prop: 'sortType', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | dicData: [{ |
| | | label: 'ååº', value: 'asc' |
| | | }, { |
| | | label: 'éåº', value: 'desc' |
| | | }], |
| | | }], |
| | | // æ 形类åç表åé
ç½® |
| | | treeColumn:[{ |
| | | label: 'æ å½¢çä¸çº§å±æ§', |
| | | prop: 'parentFieldName', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'ä¸çº§å±æ§å¼å¯¹åºå±æ§', |
| | | prop: 'parentUsedField', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'æ ¹èç¹çå¼', |
| | | prop: 'parentValue', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | }, |
| | | { |
| | | label: 'æ å è½½æ¹å¼', |
| | | prop: 'loadType', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | dicData: [{ |
| | | label: 'å
¨é¨', value: 'all' |
| | | }, { |
| | | label: 'é级å è½½', value: 'node' |
| | | }], |
| | | },{ |
| | | label: 'æ¯å¦åªè½éæ©å¶åèç¹', |
| | | prop: 'onlyLeaf', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'æåºå段', |
| | | prop: 'sortField', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'æåºç±»å', |
| | | prop: 'sortType', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | dicData: [{ |
| | | label: 'ååº', value: 'asc' |
| | | }, { |
| | | label: 'éåº', value: 'desc' |
| | | }], |
| | | }, |
| | | props: { |
| | | }, |
| | | data() { |
| | | return{ |
| | | isShowReferConfigCrud:false, |
| | | referConfigCrudOption: { |
| | | border: true, |
| | | height: '45vh', |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | index: true, |
| | | selection: false, |
| | | menu: false, |
| | | addBtn: false, |
| | | refreshBtn: false, |
| | | searchShowBtn: false, |
| | | columnBtn: false, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | align: 'center', |
| | | menuAlign: 'center', |
| | | column: [ |
| | | { |
| | | label: '-', |
| | | prop: 'radio', |
| | | width: 60, |
| | | hide: false |
| | | },{ |
| | | label: 'åç
§é
ç½®ç¼å·', |
| | | width: 120, |
| | | search: true, |
| | | searchSpan: 9, |
| | | searchLabelWidth: 100, |
| | | prop: 'id' |
| | | },{ |
| | | label: 'åç
§é
ç½®åç§°', |
| | | search: true, |
| | | searchSpan: 9, |
| | | searchLabelWidth: 100, |
| | | prop: 'name' |
| | | },{ |
| | | label: 'åç
§çä¸å¡ç±»å', |
| | | search: false, |
| | | prop: 'referTypeName' |
| | | },{ |
| | | label: 'æ¾ç¤ºç屿§', |
| | | search: false, |
| | | prop: 'textField' |
| | | },{ |
| | | label: 'åå¨å¼ç屿§', |
| | | search: false, |
| | | prop: 'valueField' |
| | | },{ |
| | | label: 'åç
§çªå£ç±»å', |
| | | search: false, |
| | | prop: 'typeText', |
| | | } |
| | | ], |
| | | // å¹³å°ç±»åç表åé
ç½® |
| | | standColumn:[{ |
| | | label: 'åèçUIä¸ä¸æ', |
| | | prop: 'referContent', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | }, |
| | | referConfigParams: { |
| | | ref: "referConfigCrud", |
| | | referConfigLoading: false, |
| | | referConfigData: [], |
| | | referConfigPage: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | { |
| | | label: 'å¹³å°çè¡¨æ ¼ç¼å·', |
| | | prop: 'displayTable', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | referConfigQuery: {}, |
| | | referConfigSelectedRowData: '', |
| | | // å½åéä¸è¡ |
| | | referConfigSelectedRow: '', |
| | | }, |
| | | formOption: { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | labelWidth: '150', //é»è®¤æ ç¾å®½åº¦ |
| | | // é»è®¤é
置就为æ 形类åï¼æ¹äºä¼åºç°é®é¢ |
| | | column: [ |
| | | { |
| | | label: 'æ å½¢çä¸çº§å±æ§', |
| | | prop: 'parentFieldName', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'ä¸çº§å±æ§å¼å¯¹åºå±æ§', |
| | | prop: 'parentUsedField', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'æ ¹èç¹çå¼', |
| | | prop: 'parentValue', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'æ å è½½æ¹å¼', |
| | | prop: 'loadType', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | dicData: [{ |
| | | label: 'å
¨é¨', value: 'all' |
| | | }, { |
| | | label: 'é级å è½½', value: 'node' |
| | | }], |
| | | },{ |
| | | label: 'æ¯å¦åªè½éæ©å¶åèç¹', |
| | | prop: 'onlyLeaf', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'æåºå段', |
| | | prop: 'sortField', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'æåºç±»å', |
| | | prop: 'sortType', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | dicData: [{ |
| | | label: 'ååº', value: 'asc' |
| | | }, { |
| | | label: 'éåº', value: 'desc' |
| | | }], |
| | | }, |
| | | ], |
| | | }, |
| | | referConfigForm:{}, |
| | | // æåºç±»åç表åé
ç½® |
| | | sortColumn:[{ |
| | | label: 'æ¯é¡µæ¾ç¤ºæ¡æ°', |
| | | prop: 'limit', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'æåºå段', |
| | | prop: 'sortField', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'æåºç±»å', |
| | | prop: 'sortType', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | dicData: [{ |
| | | label: 'ååº', value: 'asc' |
| | | }, { |
| | | label: 'éåº', value: 'desc' |
| | | }], |
| | | }], |
| | | // æ 形类åç表åé
ç½® |
| | | treeColumn:[{ |
| | | label: 'æ å½¢çä¸çº§å±æ§', |
| | | prop: 'parentFieldName', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'ä¸çº§å±æ§å¼å¯¹åºå±æ§', |
| | | prop: 'parentUsedField', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'æ ¹èç¹çå¼', |
| | | prop: 'parentValue', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | }, |
| | | { |
| | | label: 'æ å è½½æ¹å¼', |
| | | prop: 'loadType', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | dicData: [{ |
| | | label: 'å
¨é¨', value: 'all' |
| | | }, { |
| | | label: 'é级å è½½', value: 'node' |
| | | }], |
| | | },{ |
| | | label: 'æ¯å¦åªè½éæ©å¶åèç¹', |
| | | prop: 'onlyLeaf', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'æåºå段', |
| | | prop: 'sortField', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | },{ |
| | | label: 'æåºç±»å', |
| | | prop: 'sortType', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | dicData: [{ |
| | | label: 'ååº', value: 'asc' |
| | | }, { |
| | | label: 'éåº', value: 'desc' |
| | | }], |
| | | }, |
| | | ], |
| | | // å¹³å°ç±»åç表åé
ç½® |
| | | standColumn:[{ |
| | | label: 'åèçUIä¸ä¸æ', |
| | | prop: 'referContent', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | }, |
| | | { |
| | | label: 'å¹³å°çè¡¨æ ¼ç¼å·', |
| | | prop: 'displayTable', |
| | | span: 24, |
| | | disabled: true, |
| | | row: true, |
| | | placeholder: ' ', |
| | | }], |
| | | |
| | | // æ¥è¯¢æ¡ä»¶è¡¨æ ¼åºå |
| | | srchCondOption: { |
| | | border: true, |
| | | height: '40vh', |
| | | tip: false, |
| | | searchShow: false, |
| | | searchMenuSpan: 6, |
| | | index: true, |
| | | selection: false, |
| | | menu: false, |
| | | addBtn: false, |
| | | refreshBtn: false, |
| | | searchShowBtn: false, |
| | | columnBtn: false, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | align: 'center', |
| | | menuAlign: 'center', |
| | | column: [ |
| | | { |
| | | label: 'æ¥è¯¢æ¡ä»¶', |
| | | children: [ |
| | | { |
| | | label: 'çéåæ®µ', |
| | | prop: 'filterField', |
| | | },{ |
| | | label: 'çéç±»å', |
| | | prop: 'filterType', |
| | | },{ |
| | | label: 'çéçå¼', |
| | | prop: 'filterValue', |
| | | } |
| | | ], |
| | | }, |
| | | ], |
| | | }, |
| | | srchCondParams: { |
| | | ref: "srchCondCrud", |
| | | srchCondLoading: false, |
| | | srchCondData: [], |
| | | isShow: true, |
| | | }, |
| | | toggleSrchCrudWidth: { |
| | | width: '40%', |
| | | height: '100%', |
| | | }, |
| | | // æ¥è¯¢æ¡ä»¶è¡¨æ ¼åºå |
| | | srchCondOption: { |
| | | border: true, |
| | | height: '40vh', |
| | | tip: false, |
| | | searchShow: false, |
| | | searchMenuSpan: 6, |
| | | index: true, |
| | | selection: false, |
| | | menu: false, |
| | | addBtn: false, |
| | | refreshBtn: false, |
| | | searchShowBtn: false, |
| | | columnBtn: false, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | align: 'center', |
| | | menuAlign: 'center', |
| | | column: [ |
| | | { |
| | | label: 'æ¥è¯¢æ¡ä»¶', |
| | | children: [ |
| | | { |
| | | label: 'çéåæ®µ', |
| | | prop: 'filterField', |
| | | },{ |
| | | label: 'çéç±»å', |
| | | prop: 'filterType', |
| | | },{ |
| | | label: 'çéçå¼', |
| | | prop: 'filterValue', |
| | | } |
| | | ], |
| | | }, |
| | | ], |
| | | }, |
| | | srchCondParams: { |
| | | ref: "srchCondCrud", |
| | | srchCondLoading: false, |
| | | srchCondData: [], |
| | | isShow: true, |
| | | }, |
| | | toggleSrchCrudWidth: { |
| | | width: '40%', |
| | | height: '100%', |
| | | }, |
| | | |
| | | //æ¾ç¤ºç屿§è¡¨æ ¼é
ç½®åºå |
| | | showAttrOption: { |
| | | border: true, |
| | | height: '40vh', |
| | | tip: false, |
| | | searchShow: false, |
| | | searchMenuSpan: 6, |
| | | index: true, |
| | | selection: false, |
| | | menu: false, |
| | | addBtn: false, |
| | | refreshBtn: false, |
| | | searchShowBtn: false, |
| | | columnBtn: false, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | align: 'center', |
| | | menuAlign: 'center', |
| | | column: [ |
| | | { |
| | | label: 'æ¾ç¤ºç屿§', |
| | | children: [ |
| | | { |
| | | label: 'ååæ®µ', |
| | | // width: 120, |
| | | prop: 'field', |
| | | //type: 'select', |
| | | // props: { |
| | | // label: 'name', |
| | | // value: 'code' |
| | | // }, |
| | | // dicUrl: 'https://cli.avuejs.com/api/area/getProvince' |
| | | },{ |
| | | label: 'åå', |
| | | prop: 'title' |
| | | },{ |
| | | label: 'åæ®µç±»å', |
| | | prop: 'fieldTypeText' |
| | | },{ |
| | | label: 'åè¡¨å¯æåº', |
| | | prop: 'sort' |
| | | },{ |
| | | label: 'æåºå段', |
| | | prop: 'attrSortField' |
| | | },{ |
| | | label: 'åæ®µå®½åº¦', |
| | | prop: 'width' |
| | | },{ |
| | | label: 'ååºå®ä½ç½®', |
| | | prop: 'fixedPositionText' |
| | | },{ |
| | | label: 'jsæ¾ç¤ºä»£ç ', |
| | | prop: 'templet' |
| | | },{ |
| | | label: 'æ¯å¦å¿«éæ¥è¯¢', |
| | | prop: 'isQuery' |
| | | } |
| | | ] |
| | | }, |
| | | ], |
| | | }, |
| | | showAttrParams: { |
| | | ref: "showAttrCrud", |
| | | showAttrLoading: false, |
| | | showAttrData: [], |
| | | isShow: true, |
| | | }, |
| | | //æ¾ç¤ºç屿§è¡¨æ ¼é
ç½®åºå |
| | | showAttrOption: { |
| | | border: true, |
| | | height: '40vh', |
| | | tip: false, |
| | | searchShow: false, |
| | | searchMenuSpan: 6, |
| | | index: true, |
| | | selection: false, |
| | | menu: false, |
| | | addBtn: false, |
| | | refreshBtn: false, |
| | | searchShowBtn: false, |
| | | columnBtn: false, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | align: 'center', |
| | | menuAlign: 'center', |
| | | column: [ |
| | | { |
| | | label: 'æ¾ç¤ºç屿§', |
| | | children: [ |
| | | { |
| | | label: 'ååæ®µ', |
| | | // width: 120, |
| | | prop: 'field', |
| | | //type: 'select', |
| | | // props: { |
| | | // label: 'name', |
| | | // value: 'code' |
| | | // }, |
| | | // dicUrl: 'https://cli.avuejs.com/api/area/getProvince' |
| | | },{ |
| | | label: 'åå', |
| | | prop: 'title' |
| | | },{ |
| | | label: 'åæ®µç±»å', |
| | | prop: 'fieldTypeText' |
| | | },{ |
| | | label: 'åè¡¨å¯æåº', |
| | | prop: 'sort' |
| | | },{ |
| | | label: 'æåºå段', |
| | | prop: 'attrSortField' |
| | | },{ |
| | | label: 'åæ®µå®½åº¦', |
| | | prop: 'width' |
| | | },{ |
| | | label: 'ååºå®ä½ç½®', |
| | | prop: 'fixedPositionText' |
| | | },{ |
| | | label: 'jsæ¾ç¤ºä»£ç ', |
| | | prop: 'templet' |
| | | },{ |
| | | label: 'æ¯å¦å¿«éæ¥è¯¢', |
| | | prop: 'isQuery' |
| | | } |
| | | ] |
| | | }, |
| | | ], |
| | | }, |
| | | showAttrParams: { |
| | | ref: "showAttrCrud", |
| | | showAttrLoading: false, |
| | | showAttrData: [], |
| | | isShow: true, |
| | | }, |
| | | |
| | | // æ¯å¦æ¾ç¤ºåå¨ç表ååºå |
| | | isShowForm: true, |
| | | toggleBasicCrudWidth: { |
| | | height: '100%', |
| | | width: '70%', |
| | | }, |
| | | |
| | | // æ¯å¦æ¾ç¤ºå±æ§è¡¨æ ¼ |
| | | isShowAttrCrud: true, |
| | | |
| | | defaultOrGridForm: ['limit','sortField','sortType'], |
| | | standForm: ['referContent','displayTable'], |
| | | treeForm: [ |
| | | 'parentFieldName', |
| | | // æ¯å¦æ¾ç¤ºåå¨ç表ååºå |
| | | isShowForm: true, |
| | | toggleBasicCrudWidth: { |
| | | height: '100%', |
| | | width: '70%', |
| | | }, |
| | | |
| | | // æ¯å¦æ¾ç¤ºå±æ§è¡¨æ ¼ |
| | | isShowAttrCrud: true, |
| | | |
| | | defaultOrGridForm: ['limit','sortField','sortType'], |
| | | standForm: ['referContent','displayTable'], |
| | | treeForm: [ |
| | | 'parentFieldName', |
| | | 'parentUsedField', |
| | | 'parentValue', |
| | | 'loadType', |
| | | 'onlyLeaf', |
| | | 'sortField', |
| | | 'sortType' |
| | | ], |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | // ä¸ä¸æ¥è¦è¿è¡çæä½éæ©å¹¶ä¿åæéæ©å¹¶ä¿®æ¹ |
| | | selectedreferConfig(condition) { |
| | | // å½åéä¸çåç
§é
ç½®è¡ |
| | | let currentSeletedRow = this.referConfigParams.referConfigSelectedRowData; |
| | | if(!currentSeletedRow){ |
| | | this.$message.warning("è¯·éæ©ä¸æ¡æ°æ®ï¼"); |
| | | return; |
| | | } |
| | | let filterForm = this.filterForm(currentSeletedRow); |
| | | if(condition == "selectedSave"){ |
| | | // ç´æ¥ä¿å,æä»¥ç´æ¥è°ç¨codeçé¢ççé¢åæ¾ |
| | | this.$emit('echoReferConfig',filterForm); |
| | | // console.log(filterForm); |
| | | }else { |
| | | // éæ©å¹¶ä¿®æ¹,æ§è¡codeæå¡ä¸çæå¼çé¢ï¼æä»¥è¦å
æé åºæéçæ°æ® |
| | | let submitForm = { |
| | | referBtmName: filterForm.referType, |
| | | referBtmId: filterForm.referTypeName, |
| | | referConfig: JSON.stringify(filterForm), |
| | | } |
| | | this.$emit('openReconfigInterFace',submitForm); |
| | | } |
| | | this.isShowReferConfigCrud = false; |
| | | }, |
| | | // è¿æ»¤åºå½åç±»åæéè¦ç屿§ |
| | | filterForm(currentRow){ |
| | | // éè¦ä¿ççåºç¡å±æ§ |
| | | let submittDefaultForm = [ |
| | | 'referTypeName', |
| | | 'referType', |
| | | 'textField', |
| | | 'valueField', |
| | | 'type', //åç
§çªå£ç±»å |
| | | 'url', |
| | | 'backPath', |
| | | 'method', |
| | | 'height', |
| | | 'useFormKey', |
| | | 'paramForFormKey', |
| | | 'isMuti', |
| | | 'mapFields', |
| | | 'isOpenGlobal', //æ¯å¦å¼å¯å
¨å± |
| | | 'isPersistence', |
| | | 'id', |
| | | 'name', |
| | | ]; |
| | | // éè¦æ ¹æ®ç±»åæ·»å ç屿§ |
| | | let addArray = []; |
| | | let newForm ={}; |
| | | // æ ¹æ®ä¸åç±»åè¿æ»¤åºä¸åçç表å屿§ |
| | | if(currentRow.type == 'stand'){ |
| | | addArray = ['referContent', 'displayTable']; |
| | | } else if(currentRow.type == 'default' || currentRow.type == 'grid'){ |
| | | addArray = ['limit', 'sortField', 'sortType']; |
| | | } else if(currentRow.type == 'tree'){ |
| | | addArray = [ |
| | | "parentFieldName", |
| | | 'parentUsedField', |
| | | 'parentValue', |
| | | 'parentValue', |
| | | 'loadType', |
| | | 'onlyLeaf', |
| | | 'sortField', |
| | | 'sortType' |
| | | ], |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | // ä¸ä¸æ¥è¦è¿è¡çæä½éæ©å¹¶ä¿åæéæ©å¹¶ä¿®æ¹ |
| | | selectedreferConfig(condition) { |
| | | // å½åéä¸çåç
§é
ç½®è¡ |
| | | let currentSeletedRow = this.referConfigParams.referConfigSelectedRowData; |
| | | if(!currentSeletedRow){ |
| | | this.$message.warning("è¯·éæ©ä¸æ¡æ°æ®ï¼"); |
| | | return; |
| | | } |
| | | let filterForm = this.filterForm(currentSeletedRow); |
| | | if(condition == "selectedSave"){ |
| | | // ç´æ¥ä¿å,æä»¥ç´æ¥è°ç¨codeçé¢ççé¢åæ¾ |
| | | this.$emit('echoReferConfig',filterForm); |
| | | // console.log(filterForm); |
| | | }else { |
| | | // éæ©å¹¶ä¿®æ¹,æ§è¡codeæå¡ä¸çæå¼çé¢ï¼æä»¥è¦å
æé åºæéçæ°æ® |
| | | let submitForm = { |
| | | referBtmName: filterForm.referType, |
| | | referBtmId: filterForm.referTypeName, |
| | | referConfig: JSON.stringify(filterForm), |
| | | } |
| | | this.$emit('openReconfigInterFace',submitForm); |
| | | } |
| | | this.isShowReferConfigCrud = false; |
| | | }, |
| | | // è¿æ»¤åºå½åç±»åæéè¦ç屿§ |
| | | filterForm(currentRow){ |
| | | // éè¦ä¿ççåºç¡å±æ§ |
| | | let submittDefaultForm = [ |
| | | 'referTypeName', |
| | | 'referType', |
| | | 'textField', |
| | | 'valueField', |
| | | 'type', //åç
§çªå£ç±»å |
| | | 'url', |
| | | 'backPath', |
| | | 'method', |
| | | 'height', |
| | | 'useFormKey', |
| | | 'paramForFormKey', |
| | | 'isMuti', |
| | | 'mapFields', |
| | | 'isOpenGlobal', //æ¯å¦å¼å¯å
¨å± |
| | | 'isPersistence', |
| | | 'id', |
| | | 'name', |
| | | ]; |
| | | // éè¦æ ¹æ®ç±»åæ·»å ç屿§ |
| | | let addArray = []; |
| | | let newForm ={}; |
| | | // æ ¹æ®ä¸åç±»åè¿æ»¤åºä¸åçç表å屿§ |
| | | if(currentRow.type == 'stand'){ |
| | | addArray = ['referContent', 'displayTable']; |
| | | } else if(currentRow.type == 'default' || currentRow.type == 'grid'){ |
| | | addArray = ['limit', 'sortField', 'sortType']; |
| | | } else if(currentRow.type == 'tree'){ |
| | | addArray = [ |
| | | "parentFieldName", |
| | | 'parentUsedField', |
| | | 'parentValue', |
| | | 'loadType', |
| | | 'onlyLeaf', |
| | | 'sortField', |
| | | 'sortType' |
| | | ]; |
| | | } |
| | | // æ¼æ¥ä¸¤ä¸ªæ°ç» |
| | | submittDefaultForm = submittDefaultForm.concat(addArray); |
| | | if(currentRow.codeSrchCondConfigVOS.length > 0){ |
| | | //console.log(currentRow.codeSrchCondConfigVOS); |
| | | newForm = { |
| | | codeSrchCondConfigVOS: currentRow.codeSrchCondConfigVOS, |
| | | } |
| | | // æ¼æ¥ä¸¤ä¸ªæ°ç» |
| | | submittDefaultForm = submittDefaultForm.concat(addArray); |
| | | if(currentRow.codeSrchCondConfigVOS.length > 0){ |
| | | //console.log(currentRow.codeSrchCondConfigVOS); |
| | | newForm = { |
| | | codeSrchCondConfigVOS: currentRow.codeSrchCondConfigVOS, |
| | | } |
| | | } |
| | | if((currentRow.type == 'default' || currentRow.type == 'grid') && currentRow.codeShowFieldConfigVOS.length >= 0){ |
| | | newForm = Object.assign(newForm,{codeShowFieldConfigVOS: currentRow.codeShowFieldConfigVOS}); |
| | | } |
| | | // è¿æ»¤åºç©ºå¼å±æ§åä¸éè¦ç屿§ |
| | | submittDefaultForm.forEach(item=>{ |
| | | // console.log(!this.checkStringIsEmpty(currentRow[item]) || !this.checkArrayIsUndefined(currentRow[item])); |
| | | if((item == 'isMuti' || item == 'onlyLeaf') || (!this.checkStringIsEmpty(currentRow[item]) || !this.checkArrayIsUndefined(currentRow[item]))){ |
| | | //console.log(item,currentRow[item]); |
| | | newForm = Object.assign(newForm,{[item]:currentRow[item]}); |
| | | } |
| | | if((currentRow.type == 'default' || currentRow.type == 'grid') && currentRow.codeShowFieldConfigVOS.length >= 0){ |
| | | newForm = Object.assign(newForm,{codeShowFieldConfigVOS: currentRow.codeShowFieldConfigVOS}); |
| | | } |
| | | // è¿æ»¤åºç©ºå¼å±æ§åä¸éè¦ç屿§ |
| | | submittDefaultForm.forEach(item=>{ |
| | | // console.log(!this.checkStringIsEmpty(currentRow[item]) || !this.checkArrayIsUndefined(currentRow[item])); |
| | | if((item == 'isMuti' || item == 'onlyLeaf') || (!this.checkStringIsEmpty(currentRow[item]) || !this.checkArrayIsUndefined(currentRow[item]))){ |
| | | //console.log(item,currentRow[item]); |
| | | newForm = Object.assign(newForm,{[item]:currentRow[item]}); |
| | | } |
| | | }); |
| | | // console.log(newForm); |
| | | return newForm; |
| | | }, |
| | | /** |
| | | * 为空 |
| | | * @param val |
| | | * @returns {boolean} |
| | | */ |
| | | checkStringIsEmpty(val){ |
| | | if ( |
| | | val === null || |
| | | typeof val === 'undefined' || |
| | | (typeof val === 'string' && val === "" && val !== 'undefined') |
| | | ) { |
| | | return true; |
| | | } |
| | | return false; |
| | | }, |
| | | /** |
| | | * æ¯å¦ä¸ºå®ä¹ |
| | | * @param val |
| | | * @returns {boolean} |
| | | */ |
| | | checkArrayIsUndefined(val){ |
| | | return typeof val === 'array' && (val.length === 0 || val === null || typeof val === 'undefined' || val === []); |
| | | }, |
| | | referConfigOnload(){ |
| | | let refer = this.referConfigParams; |
| | | refer.referConfigLoading = true; |
| | | let param = {}; |
| | | // å¤ä¸ªconditionMapè¿æ ·ä¼ å |
| | | if(refer.referConfigQuery){ |
| | | Object.keys(refer.referConfigQuery).forEach(key=>{ |
| | | param['conditionMap['+key+']'] = refer.referConfigQuery[key]; |
| | | }); |
| | | } |
| | | getReferConfigPage( |
| | | refer.referConfigPage.currentPage, |
| | | refer.referConfigPage.pageSize, |
| | | param |
| | | ).then(res=>{ |
| | | const data = res.data.data; |
| | | this.referConfigParams.referConfigPage.total = data.total; |
| | | this.referConfigParams.referConfigData = data.records; |
| | | this.referConfigParams.referConfigLoading = false; |
| | | //console.log(this.referConfigParams.referConfigData.length > 0); |
| | | // 渲æå
¶ä»åºåæ°æ® |
| | | if(this.referConfigParams.referConfigData.length > 0) { |
| | | this.$nextTick(() => { |
| | | // è¡¨æ ¼éè¡é®é¢ |
| | | this.$refs[this.referConfigParams.ref].doLayout() |
| | | // é»è®¤éä¸ç¬¬ä¸è¡ |
| | | this.referConfigParams.referConfigSelectedRow = 0; |
| | | this.$refs[this.referConfigParams.ref].setCurrentRow(this.referConfigParams.referConfigData[0]); |
| | | this.referConfigParams.referConfigSelectedRowData = this.referConfigParams.referConfigData[0]; |
| | | this.attrAndSrchCondOnload(this.referConfigParams.referConfigData[0]); |
| | | this.loadDefaultOrGridOrStandOrTreeForm(this.referConfigParams.referConfigData[0]); |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | referBtmTypeSizeChange(pageSize){ |
| | | this.referConfigParams.referConfigPage.pageSize = pageSize; |
| | | }, |
| | | referBtmTypeCurrentChange(currentPage){ |
| | | this.referConfigParams.referConfigPage.currentPage = currentPage; |
| | | }, |
| | | referConfigRowClick(row){ |
| | | // 对å½åéä¸è¡è¿è¡è®°å½ |
| | | this.referConfigParams.referConfigSelectedRowData = row; |
| | | // åéæ¡éä¸ |
| | | this.referConfigParams.referConfigSelectedRow = row.$index |
| | | this.attrAndSrchCondOnload(row); |
| | | this.loadDefaultOrGridOrStandOrTreeForm(row); |
| | | }, |
| | | referConfigSearchChange(params, done){ |
| | | this.referConfigParams.referConfigQuery = params; |
| | | this.referConfigParams.referConfigPage.currentPage = 1; |
| | | this.referConfigOnload(); |
| | | done(); |
| | | }, |
| | | referConfigSearchReset(){ |
| | | this.referConfigParams.referConfigQuery = {}; |
| | | this.referConfigOnload(this.referConfigParams.referConfigPage); |
| | | }, |
| | | referConfigCurrentChange(currentPage){ |
| | | this.referConfigParams.referConfigPage.currentPage = currentPage; |
| | | }, |
| | | referConfigSizeChange(pageSize){ |
| | | this.referConfigParams.referConfigPage.pageSize = pageSize; |
| | | }, |
| | | // å è½½è¡¨åæ¾ç¤ºå
容 |
| | | loadDefaultOrGridOrStandOrTreeForm(currentFormData){ |
| | | if(currentFormData.type != 'tree' & |
| | | currentFormData.type != 'stand' & |
| | | currentFormData.type != 'default'& |
| | | currentFormData.type != 'grid') { |
| | | //æ§å¶åç
§é
ç½®è¡¨æ ¼åè¡¨åæ¾ç¤ºæ¯ä¾ |
| | | this.isShowForm = false; |
| | | this.toggleBasicCrudWidth.width = '100%'; |
| | | }else { |
| | | this.isShowForm = true; |
| | | this.toggleBasicCrudWidth.width = '70%'; |
| | | this.toggleFormOption(currentFormData); |
| | | } |
| | | this.toggleCurdWidth(currentFormData); |
| | | //console.log(this.isShowForm); |
| | | //console.log(this.toggleBasicCrudWidth.width); |
| | | }, |
| | | |
| | | // æ ¹æ®typeçåå¨åæ¢è¡¨åçé
ç½®option |
| | | toggleFormOption(data){ |
| | | //console.log(data); |
| | | let currentForm = ''; |
| | | if(data.type=='default' || data.type=='grid'){ |
| | | this.formOption.column = this.sortColumn; |
| | | currentForm = 'defaultOrGridForm'; |
| | | }else if(data.type == 'stand'){ |
| | | this.formOption.column = this.standColumn; |
| | | currentForm = 'standForm'; |
| | | }else if(data.type == 'tree'){ |
| | | this.formOption.column = this.treeColumn; |
| | | currentForm = 'treeForm' |
| | | } |
| | | this.referConfigForm = {}, |
| | | //console.log( this.formOption); |
| | | this[currentForm].forEach(item=>{ |
| | | Vue.set(this.referConfigForm, item, data[item]) |
| | | //this.referConfigForm = Object.assign(this.referConfigForm,{[item]:data[item]}) |
| | | }) |
| | | // console.log(this.referConfigForm); |
| | | }, |
| | | // æ ¹æ®typeçåå¨åæ¢attrè¡¨æ ¼çæ¾ç¤ºéèï¼è°æ´æ¥è¯¢æ¡ä»¶è¡¨æ ¼ç宽度 |
| | | toggleCurdWidth(data) { |
| | | if(data.type=='default' || data.type=='grid'){ |
| | | this.showAttrParams.isShow = true; |
| | | // ä¸éè¦æ¾ç¤ºå±æ§è¡¨æ ¼ææéè¦å°æ¥è¯¢è°ä»·è¡¨æ ¼ç¼©å°ä¸º100% |
| | | this.toggleSrchCrudWidth.width = '40%'; |
| | | }else { |
| | | this.showAttrParams.isShow = false; |
| | | // ä¸éè¦æ¾ç¤ºå±æ§è¡¨æ ¼ææéè¦å°æ¥è¯¢è°ä»·è¡¨æ ¼ç¼©å°ä¸º100% |
| | | this.toggleSrchCrudWidth.width = '100%'; |
| | | } |
| | | // console.log(this.toggleSrchCrudWidth); |
| | | // console.log(this.showAttrParams.isShow); |
| | | }, |
| | | |
| | | // æ¾ç¤ºç屿§åæ¥è¯¢æ¡ä»¶ç¸å
³æ¹æ³ |
| | | attrAndSrchCondOnload(row){ |
| | | this.srchCondParams.srchCondLoading = true; |
| | | this.showAttrParams.showAttrLoading = true; |
| | | this.$nextTick(() => { |
| | | this.$refs[this.srchCondParams.ref].doLayout() |
| | | this.$refs[this.showAttrParams.ref].doLayout() |
| | | }); |
| | | this.srchCondParams.srchCondData = row.codeSrchCondConfigVOS |
| | | this.showAttrParams.showAttrData = row.codeShowFieldConfigVOS |
| | | //console.log(this.showAttrParams.showAttrData); |
| | | this.srchCondParams.srchCondLoading = false; |
| | | this.showAttrParams.showAttrLoading = false; |
| | | }, |
| | | |
| | | }); |
| | | // console.log(newForm); |
| | | return newForm; |
| | | }, |
| | | /** |
| | | * 为空 |
| | | * @param val |
| | | * @returns {boolean} |
| | | */ |
| | | checkStringIsEmpty(val){ |
| | | if ( |
| | | val === null || |
| | | typeof val === 'undefined' || |
| | | (typeof val === 'string' && val === "" && val !== 'undefined') |
| | | ) { |
| | | return true; |
| | | } |
| | | return false; |
| | | }, |
| | | /** |
| | | * æ¯å¦ä¸ºå®ä¹ |
| | | * @param val |
| | | * @returns {boolean} |
| | | */ |
| | | checkArrayIsUndefined(val){ |
| | | return typeof val === 'array' && (val.length === 0 || val === null || typeof val === 'undefined' || val === []); |
| | | }, |
| | | referConfigOnload(){ |
| | | let refer = this.referConfigParams; |
| | | refer.referConfigLoading = true; |
| | | let param = {}; |
| | | // å¤ä¸ªconditionMapè¿æ ·ä¼ å |
| | | if(refer.referConfigQuery){ |
| | | Object.keys(refer.referConfigQuery).forEach(key=>{ |
| | | param['conditionMap['+key+']'] = refer.referConfigQuery[key]; |
| | | }); |
| | | } |
| | | getReferConfigPage( |
| | | refer.referConfigPage.currentPage, |
| | | refer.referConfigPage.pageSize, |
| | | param |
| | | ).then(res=>{ |
| | | const data = res.data.data; |
| | | this.referConfigParams.referConfigPage.total = data.total; |
| | | this.referConfigParams.referConfigData = data.records; |
| | | this.referConfigParams.referConfigLoading = false; |
| | | //console.log(this.referConfigParams.referConfigData.length > 0); |
| | | // 渲æå
¶ä»åºåæ°æ® |
| | | if(this.referConfigParams.referConfigData.length > 0) { |
| | | this.$nextTick(() => { |
| | | // è¡¨æ ¼éè¡é®é¢ |
| | | this.$refs[this.referConfigParams.ref].doLayout() |
| | | // é»è®¤éä¸ç¬¬ä¸è¡ |
| | | this.referConfigParams.referConfigSelectedRow = 0; |
| | | this.$refs[this.referConfigParams.ref].setCurrentRow(this.referConfigParams.referConfigData[0]); |
| | | this.referConfigParams.referConfigSelectedRowData = this.referConfigParams.referConfigData[0]; |
| | | this.attrAndSrchCondOnload(this.referConfigParams.referConfigData[0]); |
| | | this.loadDefaultOrGridOrStandOrTreeForm(this.referConfigParams.referConfigData[0]); |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | referBtmTypeSizeChange(pageSize){ |
| | | this.referConfigParams.referConfigPage.pageSize = pageSize; |
| | | }, |
| | | referBtmTypeCurrentChange(currentPage){ |
| | | this.referConfigParams.referConfigPage.currentPage = currentPage; |
| | | }, |
| | | referConfigRowClick(row){ |
| | | // 对å½åéä¸è¡è¿è¡è®°å½ |
| | | this.referConfigParams.referConfigSelectedRowData = row; |
| | | // åéæ¡éä¸ |
| | | this.referConfigParams.referConfigSelectedRow = row.$index |
| | | this.attrAndSrchCondOnload(row); |
| | | this.loadDefaultOrGridOrStandOrTreeForm(row); |
| | | }, |
| | | referConfigSearchChange(params, done){ |
| | | this.referConfigParams.referConfigQuery = params; |
| | | this.referConfigParams.referConfigPage.currentPage = 1; |
| | | this.referConfigOnload(); |
| | | done(); |
| | | }, |
| | | referConfigSearchReset(){ |
| | | this.referConfigParams.referConfigQuery = {}; |
| | | this.referConfigOnload(this.referConfigParams.referConfigPage); |
| | | }, |
| | | referConfigCurrentChange(currentPage){ |
| | | this.referConfigParams.referConfigPage.currentPage = currentPage; |
| | | }, |
| | | referConfigSizeChange(pageSize){ |
| | | this.referConfigParams.referConfigPage.pageSize = pageSize; |
| | | }, |
| | | // å è½½è¡¨åæ¾ç¤ºå
容 |
| | | loadDefaultOrGridOrStandOrTreeForm(currentFormData){ |
| | | if(currentFormData.type != 'tree' & |
| | | currentFormData.type != 'stand' & |
| | | currentFormData.type != 'default'& |
| | | currentFormData.type != 'grid') { |
| | | //æ§å¶åç
§é
ç½®è¡¨æ ¼åè¡¨åæ¾ç¤ºæ¯ä¾ |
| | | this.isShowForm = false; |
| | | this.toggleBasicCrudWidth.width = '100%'; |
| | | }else { |
| | | this.isShowForm = true; |
| | | this.toggleBasicCrudWidth.width = '70%'; |
| | | this.toggleFormOption(currentFormData); |
| | | } |
| | | this.toggleCurdWidth(currentFormData); |
| | | //console.log(this.isShowForm); |
| | | //console.log(this.toggleBasicCrudWidth.width); |
| | | }, |
| | | |
| | | // æ ¹æ®typeçåå¨åæ¢è¡¨åçé
ç½®option |
| | | toggleFormOption(data){ |
| | | //console.log(data); |
| | | let currentForm = ''; |
| | | if(data.type=='default' || data.type=='grid'){ |
| | | this.formOption.column = this.sortColumn; |
| | | currentForm = 'defaultOrGridForm'; |
| | | }else if(data.type == 'stand'){ |
| | | this.formOption.column = this.standColumn; |
| | | currentForm = 'standForm'; |
| | | }else if(data.type == 'tree'){ |
| | | this.formOption.column = this.treeColumn; |
| | | currentForm = 'treeForm' |
| | | } |
| | | this.referConfigForm = {}, |
| | | //console.log( this.formOption); |
| | | this[currentForm].forEach(item=>{ |
| | | Vue.set(this.referConfigForm, item, data[item]) |
| | | //this.referConfigForm = Object.assign(this.referConfigForm,{[item]:data[item]}) |
| | | }) |
| | | // console.log(this.referConfigForm); |
| | | }, |
| | | // æ ¹æ®typeçåå¨åæ¢attrè¡¨æ ¼çæ¾ç¤ºéèï¼è°æ´æ¥è¯¢æ¡ä»¶è¡¨æ ¼ç宽度 |
| | | toggleCurdWidth(data) { |
| | | if(data.type=='default' || data.type=='grid'){ |
| | | this.showAttrParams.isShow = true; |
| | | // ä¸éè¦æ¾ç¤ºå±æ§è¡¨æ ¼ææéè¦å°æ¥è¯¢è°ä»·è¡¨æ ¼ç¼©å°ä¸º100% |
| | | this.toggleSrchCrudWidth.width = '40%'; |
| | | }else { |
| | | this.showAttrParams.isShow = false; |
| | | // ä¸éè¦æ¾ç¤ºå±æ§è¡¨æ ¼ææéè¦å°æ¥è¯¢è°ä»·è¡¨æ ¼ç¼©å°ä¸º100% |
| | | this.toggleSrchCrudWidth.width = '100%'; |
| | | } |
| | | // console.log(this.toggleSrchCrudWidth); |
| | | // console.log(this.showAttrParams.isShow); |
| | | }, |
| | | |
| | | // æ¾ç¤ºç屿§åæ¥è¯¢æ¡ä»¶ç¸å
³æ¹æ³ |
| | | attrAndSrchCondOnload(row){ |
| | | this.srchCondParams.srchCondLoading = true; |
| | | this.showAttrParams.showAttrLoading = true; |
| | | this.$nextTick(() => { |
| | | this.$refs[this.srchCondParams.ref].doLayout() |
| | | this.$refs[this.showAttrParams.ref].doLayout() |
| | | }); |
| | | this.srchCondParams.srchCondData = row.codeSrchCondConfigVOS |
| | | this.showAttrParams.showAttrData = row.codeShowFieldConfigVOS |
| | | //console.log(this.showAttrParams.showAttrData); |
| | | this.srchCondParams.srchCondLoading = false; |
| | | this.showAttrParams.showAttrLoading = false; |
| | | }, |
| | | |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | |
| | | <el-button @click="isShowReferConfigForm = false">å æ¶</el-button> |
| | | </div> |
| | | |
| | | <el-dialog title="为ãåç
§çä¸å¡ç±»åãéåå¼" |
| | | append-to-body |
| | | :visible.sync="isShowReferBtmType" |
| | | width="70%" |
| | | destroy-on-close |
| | | @close="clearTableRowSelection('referType')" |
| | | style="height: 110vh; margin-top: -12vh; overflow-y: hidden"> |
| | | <avue-crud :option="selectionReferBtmTypeOption" |
| | | :table-loading="selectReferBtmTypeLoading" |
| | | :data="selectReferBtmTypeData" |
| | | :page.sync="selectReferBtmTypePage" |
| | | ref="selectReferBtmTypeCrud" |
| | | class="referBtmType-crud" |
| | | @row-click="referBtmTypeRowClick" |
| | | @search-change="referBtmTypeSearchChange" |
| | | @search-reset="referBtmTypeSearchReset" |
| | | @current-change="referBtmTypeCurrentChange" |
| | | @size-change="referBtmTypeSizeChange"> |
| | | <template #radio="{row}"> |
| | | <el-radio v-model="referBtmTypeSelectRow" |
| | | :label="row.$index"> |
| | | |
| | | </el-radio> |
| | | </template> |
| | | </avue-crud> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="selectedReferBtmType">ç¡® å®</el-button> |
| | | <el-button @click="isShowReferBtmType = false">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- å¯¹è¯æ¡,为ãåç
§å¼ç¨çä¸å¡ç±»åãéåå¼å¯¹è¯æ¡ --> |
| | | <refer-btm-type-crud-dialog |
| | | :visible.sync="referBtmDialogParams.selectReferBtmSettingBox" |
| | | :ref="referBtmDialogParams.ref" |
| | | @echoReferBtmType="echoReferBtmType"> |
| | | </refer-btm-type-crud-dialog> |
| | | |
| | | <el-dialog title="为ãæåºå段ãéåå¼" |
| | | <!-- <el-dialog title="为ãæåºå段ãéåå¼" |
| | | append-to-body |
| | | :visible.sync="isShowSortField" |
| | | width="70%" |
| | |
| | | <el-button type="primary" @click="selectedSortField">ç¡® å®</el-button> |
| | | <el-button @click="isShowSortField = false">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </el-dialog> --> |
| | | |
| | | <refer-select-btm-attr-dialog |
| | | title="为ãæåºå段ãéåå¼" |
| | | :visible.sync="selectedBtmTypeAttrParams.selectedBtmTypeAttrSettingBox" |
| | | :ref="selectedBtmTypeAttrParams.ref" |
| | | @echoSelectedAttr="echoSelectedAttr"> |
| | | </refer-select-btm-attr-dialog> |
| | | |
| | | <el-dialog title="éæ©æ¾ç¤ºå段" |
| | | append-to-body |
| | |
| | | activeName: 'first', //å½åæ´»å¨çtabs |
| | | |
| | | |
| | | //为ãåç
§çä¸å¡ç±»åãéåå¼å¯¹è¯æ¡ |
| | | selectionReferBtmTypeOption: { |
| | | border: true, |
| | | height: '260', |
| | | tip: false, |
| | | //searchShow: false, |
| | | index: true, |
| | | selection: false, |
| | | menu: false, |
| | | addBtn: false, |
| | | refreshBtn: false, |
| | | searchShowBtn: false, |
| | | columnBtn: false, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | align: 'center', |
| | | menuAlign: 'center', |
| | | column: [{ |
| | | label: '-', |
| | | prop: 'radio', |
| | | width: 60, |
| | | hide: false |
| | | },{ |
| | | label: 'ä¸å¡ç±»åç¼å·', |
| | | width: 120, |
| | | search: true, |
| | | searchSpan: 8, |
| | | searchLabelWidth: 100, |
| | | prop: 'id' |
| | | },{ |
| | | label: 'ä¸å¡ç±»ååç§°', |
| | | search: true, |
| | | searchSpan: 8, |
| | | searchLabelWidth: 100, |
| | | prop: 'name' |
| | | },{ |
| | | label: 'æè¿°', |
| | | search: false, |
| | | prop: 'description' |
| | | }], |
| | | /** åç
§å¼ç¨çä¸å¡ç±»åå¯¹è¯æ¡ç¸å
³åæ° */ |
| | | referBtmDialogParams: { |
| | | ref: 'crudReferBtm', |
| | | selectReferBtmSettingBox: false, |
| | | }, |
| | | selectReferBtmTypeLoading: false, |
| | | selectReferBtmTypeData: [], |
| | | selectReferBtmTypePage: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | /** éæ©å
³èçä¸å¡ç±»å屿§ç¸å
³çå¯¹è¯æ¡ç¸å
³åæ° */ |
| | | selectedBtmTypeAttrParams: { |
| | | ref: 'selectedBtmTypeAttrCrud', |
| | | selectedBtmTypeAttrSettingBox: false, |
| | | }, |
| | | referBtmTypeQuery: {}, |
| | | isShowReferBtmType: false, |
| | | referBtmTypeSelectRowData: '', |
| | | referBtmTypeSelectRow: '', |
| | | |
| | | |
| | | // 为ãæåºå段ãéåå¼å¯¹è¯æ¡ |
| | | isShowSortField: false, |
| | | selectionSortFieldOption: { |
| | | border: true, |
| | | height: '220px', |
| | | tip: false, |
| | | //searchShow: false, |
| | | index: true, |
| | | selection: false, |
| | | addBtn: false, |
| | | menu: false, |
| | | refreshBtn: false, |
| | | searchShowBtn: false, |
| | | columnBtn: false, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | align: 'center', |
| | | menuAlign: 'center', |
| | | border: true, |
| | | column: [{ |
| | | label: '-', |
| | | prop: 'radio', |
| | | width: 60, |
| | | hide: false |
| | | },{ |
| | | label: '屿§è±æç¼å·', |
| | | width: 120, |
| | | search: true, |
| | | searchSpan: 8, |
| | | searchLabelWidth: 100, |
| | | prop: 'id' |
| | | },{ |
| | | label: '屿§ä¸æåç§°', |
| | | search: true, |
| | | searchSpan: 8, |
| | | searchLabelWidth: 100, |
| | | prop: 'name' |
| | | },{ |
| | | label: '屿§é¿åº¦', |
| | | search: false, |
| | | prop: 'attrLength' |
| | | },{ |
| | | label: '屿§ç±»å', |
| | | search: false, |
| | | prop: 'attrType' |
| | | }], |
| | | seletedBtmTypeAttrOptions: { |
| | | title: '', //å¯¹è¯æ¡æ¾ç¤ºçæ é¢ |
| | | condition: '', //å½åæå¼å¯¹è¯æ¡çç±»å |
| | | btmTypeId: '', //æ¥è¯¢æ¡ä»¶ï¼ä¸å¡ç±»åid |
| | | }, |
| | | selectSortFieldLoading: false, |
| | | selectSortFieldData: [], |
| | | selectSortFieldPage: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | sortFieldQuery: {}, |
| | | sortFieldSelectRow: '', |
| | | sortFieldSelectRowData: '', |
| | | |
| | | |
| | | //éæ©æ¾ç¤ºå段 |
| | | isShowShowField: false, |
| | | selectionShowFieldOption: { |
| | | border: true, |
| | | height: '220px', |
| | | tip: false, |
| | | //searchShow: false, |
| | | index: true, |
| | | selection: true, |
| | | addBtn: false, |
| | | menu: false, |
| | | refreshBtn: false, |
| | | searchShowBtn: false, |
| | | columnBtn: false, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | align: 'center', |
| | | menuAlign: 'center', |
| | | border: true, |
| | | column: [{ |
| | | label: '屿§è±æç¼å·', |
| | | width: 120, |
| | | search: true, |
| | | searchSpan: 8, |
| | | searchLabelWidth: 100, |
| | | prop: 'id' |
| | | },{ |
| | | label: '屿§ä¸æåç§°', |
| | | search: true, |
| | | searchSpan: 8, |
| | | searchLabelWidth: 100, |
| | | prop: 'name' |
| | | },{ |
| | | label: '屿§é¿åº¦', |
| | | search: false, |
| | | prop: 'attrLength' |
| | | },{ |
| | | label: '屿§ç±»å', |
| | | search: false, |
| | | prop: 'attrType' |
| | | }], |
| | | }, |
| | | showFieldQuery: {}, |
| | | selectShowFieldLoading: false, |
| | | selectShowFieldData: [], |
| | | showFieldSelectList: [], |
| | | |
| | | //æ·»å æ¥è¯¢æ¡ä»¶ |
| | | isShowSearchCondition: false, |
| | | selectionSearchConditionOption: { |
| | | border: true, |
| | | height: '220px', |
| | | tip: false, |
| | | //searchShow: false, |
| | | index: true, |
| | | selection: true, |
| | | addBtn: false, |
| | | menu: false, |
| | | refreshBtn: false, |
| | | searchShowBtn: false, |
| | | columnBtn: false, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | align: 'center', |
| | | menuAlign: 'center', |
| | | border: true, |
| | | column: [{ |
| | | label: '屿§è±æç¼å·', |
| | | width: 120, |
| | | search: true, |
| | | searchSpan: 8, |
| | | searchLabelWidth: 100, |
| | | prop: 'id' |
| | | },{ |
| | | label: '屿§ä¸æåç§°', |
| | | search: true, |
| | | searchSpan: 8, |
| | | searchLabelWidth: 100, |
| | | prop: 'name' |
| | | },{ |
| | | label: '屿§é¿åº¦', |
| | | search: false, |
| | | prop: 'attrLength' |
| | | },{ |
| | | label: '屿§ç±»å', |
| | | search: false, |
| | | prop: 'attrType' |
| | | }], |
| | | }, |
| | | selectSearchConditionLoading: false, |
| | | selectSearchConditionData: [], |
| | | searchConditionQuery: {}, |
| | | searchConditionSelectList: [], |
| | | |
| | | //ä¸ä¸æ¬¡ç¹å»çè¡ç¼è¾æ°æ® |
| | | preClickAttrRow: '', |
| | |
| | | checkArrayIsUndefined(val){ |
| | | return typeof val === 'array' && (val.length === 0 ||val === null || typeof val === 'undefined'); |
| | | }, |
| | | // æå¼è¡¨æ ¼éæ©æ¡ |
| | | openSelectionTable(condition){ |
| | | if (condition == 'referType'){ |
| | | this.isShowReferBtmType = true; |
| | | this.referBtmTypeOnLoad(); |
| | | }else if (condition == 'sortField'){ |
| | | this.isShowSortField = true; |
| | | this.sortFieldOnLoad(); |
| | | }else { |
| | | if(this.form.referType == '' || this.form.referType == null){ |
| | | this.$message.warning("请è¾å
¥åç
§çä¸å¡ç±»å") |
| | | return; |
| | | } |
| | | if(condition == 'addSearchCondition'){ |
| | | this.isShowSearchCondition = true; |
| | | this.selectSearchConditionDataOnload(); |
| | | }else { |
| | | this.isShowShowField = true; |
| | | this.selectShowFieldDataOnload(); |
| | | } |
| | | } |
| | | }, |
| | | |
| | | // æ¸
ç©ºè¡¨æ ¼éæ©æ¡ |
| | | clearSelectionTable(condition){ |
| | | if(condition == 'referType'){ |
| | |
| | | this.form.sortField = ''; |
| | | } |
| | | }, |
| | | // å
³éå¯¹è¯æ¡æ¶å¯¹éä¸å
容è¿è¡æ¸
空ï¼å¹¶è§£ç»å
¨å±çå¬äºä»¶ |
| | | clearTableRowSelection(condition){ |
| | | // æå¼è¡¨æ ¼éæ©æ¡ |
| | | openSelectionTable(condition){ |
| | | // æå¼éæ©åç
§å¼ç¨å¯¹è¯æ¡ |
| | | if (condition == 'referType'){ |
| | | this.referBtmDialogParams.selectReferBtmSettingBox = true; |
| | | // console.log(this.referBtmDialogParams.ref); |
| | | // è°ç¨åç»ä»¶å·æ°è¡¨æ ¼æ°æ® |
| | | this.$refs[this.referBtmDialogParams.ref].referBtmOnLoad(); |
| | | return; |
| | | } |
| | | // æç¤º |
| | | if(this.form.referType == '' || this.form.referType == null){ |
| | | this.$message.warning("请è¾å
¥åç
§çä¸å¡ç±»å") |
| | | return; |
| | | } |
| | | let params = this.seletedBtmTypeAttrOptions; |
| | | params.btmTypeId = this.form.referType |
| | | // éæ©æåºå段 |
| | | if(condition == 'sortField'){ |
| | | this.sortFieldSelectRow = ''; |
| | | this.sortFieldSelectRowData = ''; |
| | | }else if(condition == 'referType'){ |
| | | this.referBtmTypeSelectRow=''; |
| | | this.referBtmTypeSelectRowData = ''; |
| | | params.title = '为ãæåºå段ãéåå¼å¯¹è¯æ¡'; |
| | | params.condition = 'sortField'; |
| | | }else if(condition == 'addSearchCondition'){ |
| | | // éæ©æ¥è¯¢æ¡ä»¶ |
| | | params.title = 'éæ©æ¥è¯¢æ¡ä»¶'; |
| | | params.condition = 'addSearchCondition'; |
| | | }else{ |
| | | // 鿩屿§ |
| | | params.title = 'éæ©æ¾ç¤ºå段'; |
| | | params.condition = 'selectAttr'; |
| | | } |
| | | |
| | | this.$refs[this.selectedBtmTypeAttrParams.ref].selectedBtmTypeAttrOnLoad(params); |
| | | this.selectedBtmTypeAttrParams.selectedBtmTypeAttrSettingBox = true; |
| | | }, |
| | | |
| | | /** 为ãåç
§å¼ç¨çä¸å¡ç±»åãéåå¼ä¹åçå
容忾æ¶è°ç¨ */ |
| | | echoReferBtmType(content){ |
| | | // å®ç°åæ¾ |
| | | this.form.referTypeName = content.name; |
| | | this.form.referType = content.id; |
| | | }, |
| | | /** æåºåæ®µãæ¾ç¤ºç屿§ãæ¥è¯¢æ¡ä»¶çè¡¨æ ¼è¡éæ©ä¹ååæ¾ */ |
| | | echoSelectedAttr(data){ |
| | | console.log(data); |
| | | // 为ãæåºå段ãéåå¼ |
| | | if(data.condition === 'sortField'){ |
| | | this.form.sortField = data.selectedArrary[0].id; |
| | | }else if(data.condition === 'addSearchCondition') { |
| | | data.selectedArrary.forEach(item => { |
| | | this.form.codeSrchCondConfigVOS.push( |
| | | { |
| | | filterField: item.id, |
| | | filterType: '=', |
| | | filterTypeText: item.name, |
| | | filterValue: '', |
| | | $cellEdit: false |
| | | } |
| | | ) |
| | | }) |
| | | }else{ |
| | | // éæ©æ¾ç¤ºå段 |
| | | data.selectedArrary.forEach(item => { |
| | | this.codeShowFieldConfigVOS.push( |
| | | { |
| | | field: item.id, |
| | | title: item.id, |
| | | fieldType: item.attrType, |
| | | fieldTypeText: item.attrTypeText, |
| | | sort: false, |
| | | attrSortField: item.id, |
| | | width: item.attrLength, |
| | | isquery: false, |
| | | $cellEdit: false |
| | | } |
| | | ) |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | // 为ãåç
§çä¸å¡ç±»åãéåå¼ |
| | | referBtmTypeOnLoad(page, params = {}){ |
| | | this.selectReferBtmTypeLoading = true; |
| | | // è°ç¨apiè¯·æ± |
| | | const data = { |
| | | total: 2, |
| | | data: [{ |
| | | id: 't2', |
| | | name: 'test2', |
| | | description: 'test2', |
| | | }, { |
| | | id: 't3', |
| | | name: 'test3', |
| | | description: 'test3', |
| | | }] |
| | | } |
| | | this.selectReferBtmTypeData = data.data; |
| | | this.selectReferBtmTypePage.total = data.total; |
| | | this.selectReferBtmTypeLoading = false; |
| | | }, |
| | | referBtmTypeSizeChange(pageSize){ |
| | | this.selectReferBtmTypePage.pageSize = pageSize; |
| | | }, |
| | | referBtmTypeSearchChange(params, done){ |
| | | this.referBtmTypeQuery = params; |
| | | this.selectReferBtmTypePage.currentPage = 1; |
| | | this.referBtmTypeOnLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | referBtmTypeSearchReset(){ |
| | | this.referBtmTypeQuery = {}; |
| | | this.referBtmTypeOnLoad(this.selectReferBtmTypePage); |
| | | }, |
| | | referBtmTypeRowClick(row){ |
| | | this.referBtmTypeSelectRowData = row; |
| | | this.referBtmTypeSelectRow = row.$index |
| | | //console.log( this.referBtmTypeSelectRowData); |
| | | }, |
| | | referBtmTypeCurrentChange(currentPage){ |
| | | this.selectReferBtmTypePage.currentPage = currentPage; |
| | | }, |
| | | selectedReferBtmType(){ |
| | | if(!this.referBtmTypeSelectRowData) { |
| | | this.$message.warning("è¯·éæ©ä¸æ¡æ°æ®"); |
| | | return; |
| | | } |
| | | this.form.referTypeName = this.referBtmTypeSelectRowData.name; |
| | | this.form.referType = this.referBtmTypeSelectRowData.id; |
| | | this.isShowReferBtmType = false; |
| | | }, |
| | | |
| | | // 为ãæåºå段ãéåå¼ |
| | | sortFieldOnLoad(page, params = {}){ |
| | | this.selectSortFieldLoading = true; |
| | | // è°ç¨apiè¯·æ± |
| | | const data = { |
| | | total: 2, |
| | | data: [{ |
| | | id: 'test', |
| | | name: 'æµè¯', |
| | | attrLength: 11, |
| | | attrType: 'å符串' |
| | | }, { |
| | | id: 'test1', |
| | | name: 'æµè¯1', |
| | | attrLength: 12, |
| | | attrType: 'æ°å' |
| | | }] |
| | | } |
| | | this.selectSortFieldData = data.data; |
| | | this.selectSortFieldPage.total = data.total; |
| | | this.selectSortFieldLoading = false; |
| | | }, |
| | | sortFieldSizeChange(pageSize){ |
| | | this.selectSortFieldPage.pageSize = pageSize; |
| | | }, |
| | | sortFieldSearchChange(params, done){ |
| | | this.sortFieldQuery = params; |
| | | this.selectSortFieldPage.currentPage = 1; |
| | | this.sortFieldOnLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | sortFieldSearchReset(){ |
| | | this.sortFieldQuery = {}; |
| | | this.sortFieldOnLoad(this.selectSortFieldPage); |
| | | }, |
| | | sortFieldRowClick(row){ |
| | | this.sortFieldSelectRowData = row; |
| | | this.sortFieldSelectRow = row.$index |
| | | //console.log( this.sortFieldSelectRowData); |
| | | }, |
| | | sortFieldCurrentChange(currentPage){ |
| | | this.selectReferBtmTypePage.currentPage = currentPage; |
| | | }, |
| | | selectedSortField(){ |
| | | if(!this.sortFieldSelectRowData) { |
| | | this.$message.warning("è¯·éæ©ä¸æ¡æ°æ®"); |
| | | return; |
| | | } |
| | | this.form.sortField = this.sortFieldSelectRowData.id; |
| | | this.isShowSortField = false; |
| | | }, |
| | | |
| | | // éæ©æ¾ç¤ºå段 |
| | | selectShowFieldDataOnload(params = {}){ |
| | | this.selectShowFieldLoading = true; |
| | | // è°ç¨apiè¯·æ± |
| | | const data = { |
| | | total: 2, |
| | | data: [{ |
| | | id: 'test', |
| | | name: 'æµè¯', |
| | | attrLength: 11, |
| | | attrType: 'text', |
| | | attrTypeText: 'ææ¬æ¡' |
| | | }, { |
| | | id: 'test1', |
| | | name: 'æµè¯1', |
| | | attrLength: 12, |
| | | attrType: 'number', |
| | | attrTypeText: 'æ°å' |
| | | }, { |
| | | id: 'test2', |
| | | name: 'æµè¯2', |
| | | attrLength: 13, |
| | | attrType: 'date', |
| | | attrTypeText: 'æ¥æ' |
| | | }] |
| | | } |
| | | this.selectShowFieldData = data.data; |
| | | this.selectShowFieldLoading = false; |
| | | }, |
| | | selectionShowFieldDataChange(list){ |
| | | this.showFieldSelectList = list; |
| | | this.$refs.selectShowFieldCrud.setCurrentRow(this.showFieldSelectList[list.length-1]); |
| | | }, |
| | | showFieldRowClick(row){ |
| | | //this.showFieldSelectList.push(row); |
| | | this.$refs.selectShowFieldCrud.setCurrentRow(row); |
| | | this.$refs.selectShowFieldCrud.toggleRowSelection(row); //éä¸å½åè¡ |
| | | }, |
| | | showFieldSearchChange(params, done){ |
| | | this.showFieldQuery = params; |
| | | this.selectShowFieldDataOnload(params); |
| | | done(); |
| | | }, |
| | | showFieldSearchReset(){ |
| | | this.showFieldQuery = {}; |
| | | this.sortFieldOnLoad(); |
| | | }, |
| | | selectedShowField(){ |
| | | //console.log(this.showFieldSelectList); |
| | | if(this.showFieldSelectList.length <= 0) { |
| | | this.$message.warning("请è³å°éæ©ä¸æ¡æ°æ®"); |
| | | return; |
| | | } |
| | | //this.showFieldSelectList; |
| | | this.showFieldSelectList.forEach(item => { |
| | | this.codeShowFieldConfigVOS.push( |
| | | { |
| | | field: item.id, |
| | | title: item.id, |
| | | fieldType: item.attrType, |
| | | fieldTypeText: item.attrTypeText, |
| | | sort: false, |
| | | attrSortField: item.id, |
| | | width: item.attrLength, |
| | | isquery: false, |
| | | $cellEdit: false |
| | | } |
| | | ) |
| | | |
| | | }) |
| | | this.isShowShowField = false; |
| | | }, |
| | | |
| | | |
| | | // éæ©æ¥è¯¢æ¡ä»¶ |
| | | selectSearchConditionDataOnload(params = {}){ |
| | | this.selectSearchConditionLoading = true; |
| | | // è°ç¨apiè¯·æ± |
| | | this.selectSearchConditionData = [{ |
| | | id: 'test', |
| | | name: 'æµè¯', |
| | | attrLength: 11, |
| | | attrType: 'å符串', |
| | | $cellEdit: false, |
| | | }, { |
| | | id: 'test1', |
| | | name: 'æµè¯1', |
| | | attrLength: 12, |
| | | attrType: 'æ°å', |
| | | $cellEdit: false, |
| | | }, { |
| | | id: 'test2', |
| | | name: 'æµè¯2', |
| | | attrLength: 13, |
| | | attrType: 'æ¥æ', |
| | | $cellEdit: false, |
| | | }]; |
| | | this.selectSearchConditionLoading = false; |
| | | }, |
| | | searchConditionRowClick(row){ |
| | | this.$refs.selectSearchConditionCrud.setCurrentRow(row); |
| | | this.$refs.selectSearchConditionCrud.toggleRowSelection(row); //éä¸å½åè¡ |
| | | }, |
| | | searchConditionDataChange(list){ |
| | | this.searchConditionSelectList = list; |
| | | this.$refs.selectSearchConditionCrud.setCurrentRow(this.searchConditionSelectList[list.length-1]); |
| | | }, |
| | | searchConditionSearchChange(params, done){ |
| | | this.searchConditionQuery = params; |
| | | this.selectSearchConditionDataOnload(params); |
| | | done(); |
| | | }, |
| | | searchConditionSearchReset(){ |
| | | this.searchConditionQuery = {}; |
| | | this.sortFieldOnLoad(); |
| | | }, |
| | | selectedSearchCondition(){ |
| | | // console.log(this.searchConditionSelectList); |
| | | if(this.searchConditionSelectList.length <= 0) { |
| | | this.$message.warning("请è³å°éæ©ä¸æ¡æ°æ®"); |
| | | return; |
| | | } |
| | | this.searchConditionSelectList.forEach(item => { |
| | | this.form.codeSrchCondConfigVOS.push( |
| | | { |
| | | filterField: item.id, |
| | | filterType: '=', |
| | | filterTypeText: item.name, |
| | | filterValue: '', |
| | | $cellEdit: false |
| | | } |
| | | ) |
| | | |
| | | }) |
| | | this.isShowSearchCondition = false; |
| | | }, |
| | | |
| | | } |
| | | }; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog |
| | | :title="options.title" |
| | | append-to-body |
| | | :visible.sync="crudParams.isShowDialog" |
| | | width="65%" |
| | | destroy-on-close |
| | | @close="clearTableRowSelection" |
| | | style="height: 110vh; margin-top: -12vh; overflow-y: hidden"> |
| | | <avue-crud :option="crudParams.crudOption" |
| | | :table-loading="crudParams.crudLoading" |
| | | :data="crudParams.crudData" |
| | | :ref="crudParams.ref" |
| | | @row-click="selectedBtmTypeAttrRowClick" |
| | | @selection-change="selectionBtmTypeAttrChange" |
| | | @search-change="selectedBtmTypeAttrSrchChange" |
| | | @search-reset="selectedBtmTypeAttrSrchReset"> |
| | | </avue-crud> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="selectedBtmTypeAttr">ç¡® å®</el-button> |
| | | <el-button @click="crudParams.isShowDialog = false">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import { gridAttributesByBtmId } from "@/api/code/referBtmType"; |
| | | export default { |
| | | name: "referSelectBtmAttrDialog", |
| | | props: { |
| | | // å¯¹è¯æ¡æ¾ç¤ºéèæ§å¶ |
| | | visible: { |
| | | type: "Boolean", |
| | | default: false, |
| | | }, |
| | | |
| | | |
| | | }, |
| | | watch: { |
| | | // çå¬ç¶ç»ä»¶ä¼ ççªå£æ¾ç¤ºéèçå¼ |
| | | visible (){ |
| | | this.crudParams.isShowDialog = this.visible; |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | // è¡¨æ ¼ç¸å
³åæ° |
| | | crudParams: { |
| | | ref: "selectedAttrCrud", |
| | | isShowDialog: this.visible, //å¯¹è¯æ¡æ¾ç¤ºæ§å¶ |
| | | crudLoading: false, |
| | | crudOption: { |
| | | border: true, |
| | | height: '250px', |
| | | tip: false, |
| | | //searchShow: false, |
| | | index: true, |
| | | selection: true, |
| | | addBtn: false, |
| | | menu: false, |
| | | // refreshBtn: false, |
| | | searchShowBtn: false, |
| | | columnBtn: false, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | searchMenuSpan: 5, |
| | | align: 'center', |
| | | menuAlign: 'center', |
| | | border: true, |
| | | column: [{ |
| | | label: '屿§è±æç¼å·', |
| | | width: 120, |
| | | search: true, |
| | | searchSpan: 8, |
| | | searchLabelWidth: 100, |
| | | prop: 'id' |
| | | },{ |
| | | label: '屿§ä¸æåç§°', |
| | | search: true, |
| | | searchSpan: 8, |
| | | searchLabelWidth: 100, |
| | | prop: 'name' |
| | | },{ |
| | | label: '屿§é¿åº¦', |
| | | search: false, |
| | | prop: 'attrLength' |
| | | },{ |
| | | label: '屿§ç±»å', |
| | | search: false, |
| | | prop: 'attrType' |
| | | }], |
| | | }, |
| | | crudData: [], |
| | | crudQuery: {}, |
| | | crudSelectedRowData: [], |
| | | }, |
| | | // è°ç¨æ¹ä¼ è¿æ¥çç¸å
³åæ° |
| | | options: {}, |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | // æ¸
空éä¸ |
| | | clearTableRowSelection(){ |
| | | this.crudParams.crudSelectedRow=''; |
| | | this.crudParams.crudSelectedRowData = ''; |
| | | this.$emit('update:visible', false); |
| | | }, |
| | | |
| | | // crudç¸å
³æ¹æ³ |
| | | selectedBtmTypeAttrOnLoad(params){ |
| | | this.options = params; |
| | | this.crudParams.crudLoading = true; |
| | | // è°ç¨apiè¯·æ± |
| | | const data = { |
| | | total: 2, |
| | | data: [{ |
| | | id: 'test', |
| | | name: 'æµè¯', |
| | | attrLength: 11, |
| | | attrType: 'å符串' |
| | | }, { |
| | | id: 'test1', |
| | | name: 'æµè¯1', |
| | | attrLength: 12, |
| | | attrType: 'æ°å' |
| | | }] |
| | | } |
| | | let param = {}; |
| | | // å¤ä¸ªconditionMapè¿æ ·ä¼ å |
| | | if(crudParams.crudQuery){ |
| | | Object.keys(crudParams.crudQuery).forEach(key=>{ |
| | | param['conditionMap['+key+']'] = crudParams.crudQuery[key]; |
| | | }); |
| | | } |
| | | gridAttributesByBtmId(1,-1,param).then(res=>{ |
| | | console.log(res); |
| | | }) |
| | | this.crudParams.crudData = data.data; |
| | | this.crudParams.crudLoading = false; |
| | | }, |
| | | selectedBtmTypeAttrSrchChange(params, done){ |
| | | this.crudParams.crudQuery = params; |
| | | this.selectedBtmTypeAttrOnLoad(this.options); |
| | | done(); |
| | | }, |
| | | selectedBtmTypeAttrSrchReset(){ |
| | | this.crudParams.crudQuery = {}; |
| | | this.selectedBtmTypeAttrOnLoad(this.options); |
| | | }, |
| | | selectedBtmTypeAttrRowClick(row){ |
| | | this.crudParams.crudSelectedRowData = row; |
| | | this.$refs[this.crudParams.ref].toggleSelection(); |
| | | this.$refs[this.crudParams.ref].setCurrentRow(row); |
| | | this.$refs[this.crudParams.ref].toggleRowSelection(row); //éä¸å½åè¡ |
| | | }, |
| | | selectionBtmTypeAttrChange(list){ |
| | | this.crudParams.crudSelectedRowData = list; |
| | | this.$refs[this.crudParams.ref].setCurrentRow(this.crudParams.crudSelectedRowData[list.length-1]); |
| | | //å½åéä¸è¡ä¸ºç©ºçæ¶åå°±å°ç 段管çè¡¨æ ¼æ°æ®ç½®ç©º |
| | | }, |
| | | // éä¸å±æ§ä¹å |
| | | selectedBtmTypeAttr(){ |
| | | if(this.crudParams.crudSelectedRowData.length<=0 || (this.options.condition == 'sortField' && this.crudParams.crudSelectedRowData.length!=1)) { |
| | | this.$message.warning("è¯·éæ©ä¸æ¡æ°æ®"); |
| | | return; |
| | | } |
| | | // æé åæ¾ç¶ç»ä»¶éè¦ä¼ éçç¸å
³åæ° |
| | | let data = { |
| | | selectedArrary: this.crudParams.crudSelectedRowData, |
| | | condition: this.options.condition |
| | | }; |
| | | this.$emit('echoSelectedAttr',data); |
| | | this.crudParams.isShowDialog = false; |
| | | }, |
| | | |
| | | }, |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | </style> |
| | |
| | | "parentId": 0, |
| | | "title": classifyitem.text, |
| | | "value": classifyitem.oid, |
| | | "btmTypeOid": classifyitem.attributes.btmTypeOid, |
| | | } |
| | | return { |
| | | ...item, |
| | |
| | | viewBtn: false, |
| | | selection: true, |
| | | menu: false, |
| | | columnBtn: false, |
| | | searchShowBtn: false, // è¡¨æ ¼æç´¢æ¾éæé® |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | column: [ |
| | |
| | | prop: "id", |
| | | search: true, |
| | | searchLabelWidth: 100, |
| | | searchSpan: 7, |
| | | searchSpan: 8, |
| | | }, |
| | | { |
| | | label: "ä¸å¡ç±»ååç§°", |
| | | prop: "name", |
| | | search: true, |
| | | searchLabelWidth: 100, |
| | | searchSpan: 7, |
| | | searchSpan: 8, |
| | | }, |
| | | { |
| | | label: "æè¿°", |
| | |
| | | export default { |
| | | height: '41vh', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 5, |
| | | searchMenuSpan: 6, |
| | | disablePage: false, |
| | | border: true, |
| | | index: true, |
| | |
| | | prop: "id", |
| | | search: true, |
| | | searchLabelWidth: 100, |
| | | searchSpan: 7, |
| | | searchSpan: 9, |
| | | }, |
| | | { |
| | | label: "屿§ä¸æåç§°", |
| | | prop: "name", |
| | | search: true, |
| | | searchLabelWidth: 100, |
| | | searchSpan: 7, |
| | | searchSpan: 9, |
| | | }, |
| | | { |
| | | label: "屿§é¿åº¦", |
| | | prop: "attrlength", |
| | | prop: "attributeLength", |
| | | search: false, |
| | | }, |
| | | { |
| | | label: "屿§ç±»å", |
| | | prop: "attributedatatypetext", |
| | | prop: "attrDataTypeText", |
| | | search: false, |
| | | } |
| | | ] |
| | |
| | | import formulaEditor from "@/components/code-dialog-page/formulaEditor" |
| | | import referConfigCrudDialog from "@/components/code-dialog-page/referConfigCrudDialog" |
| | | import referConfigFormDialog from "@/components/code-dialog-page/referConfigFormDialog" |
| | | import referBtmTypeCrudDialog from "@/components/code-dialog-page/referBtmTypeCrudDialog" |
| | | import referSelectBtmAttrDialog from "@/components/code-dialog-page/referSelectBtmAttrDialog" |
| | | import advancedQuery from "@/components/advanced-query/advancedQuery" |
| | | import businessAdd from "@/views/modeling/BusinessAdd" |
| | | import TableCrud from "@/components/Crud/Crud" |
| | | import originalAdd from "@/views/modeling/originalAdd" |
| | |
| | | Vue.component('formulaEditor',formulaEditor) |
| | | Vue.component('referConfigCrudDialog',referConfigCrudDialog) |
| | | Vue.component('referConfigFormDialog',referConfigFormDialog) |
| | | Vue.component('advancedQuery',advancedQuery) |
| | | Vue.component('businessAdd',businessAdd) |
| | | Vue.component('attrCrud',attrCrud) |
| | | Vue.component('TableCrud',TableCrud) |
| | | Vue.component('originalAdd',originalAdd) |
| | | |
| | | Vue.component('referBtmTypeCrudDialog',referBtmTypeCrudDialog) |
| | | Vue.component('referSelectBtmAttrDialog',referSelectBtmAttrDialog) |
| | | |
| | | // å è½½ç¸å
³urlå°å |
| | | Object.keys(urls).forEach(key => { |
| | |
| | | @click="enableOrDeactivatse(scope.row.oid,'enable')">å¯ ç¨ |
| | | </el-button> |
| | | </template> |
| | | <!-- è¡¨æ ¼å·¦ä¸æ¹æé®åºå --> |
| | | <!-- è¡¨æ ¼ä¸æ¹æé®åºå --> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | @click="handleDelete">å é¤ |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | @click="handleDelete"> |
| | | å é¤ |
| | | </el-button> |
| | | <el-button size="small" |
| | | icon="icon-kelong" |
| | | plain |
| | | @click="openCodeRuleDialog">å
é |
| | | icon="icon-kelong" |
| | | plain |
| | | @click="openCodeRuleDialog"> |
| | | å
é |
| | | </el-button> |
| | | <el-button size="small" |
| | | icon="icon-lianjiekelong" |
| | | style="font-size: 12px;" |
| | | plain |
| | | @click="openOtherCodeRuleDialog">ä»å
¶ä»è§åä¸å
éç æ®µ |
| | | icon="icon-lianjiekelong" |
| | | style="font-size: 12px;" |
| | | plain |
| | | @click="openOtherCodeRuleDialog"> |
| | | ä»å
¶ä»è§åä¸å
éç æ®µ |
| | | </el-button> |
| | | <el-button size="small" |
| | | icon="el-icon-s-help" |
| | | plain |
| | | @click="handleRange">使ç¨èå´ |
| | | icon="el-icon-s-help" |
| | | plain |
| | | @click="handleRange"> |
| | | 使ç¨èå´ |
| | | </el-button> |
| | | <el-button size="small" |
| | | icon="icon-qingkong" |
| | | plain |
| | | @click="clearAllCodeSec">æ¸
空ç å¼ |
| | | icon="icon-qingkong" |
| | | plain |
| | | @click="clearAllCodeSec"> |
| | | æ¸
空ç å¼ |
| | | </el-button> |
| | | <el-button size="small" |
| | | icon="el-icon-search" |
| | | plain |
| | | @click="openAdvancedQuery"> |
| | | é«çº§æ¥è¯¢ |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | |
| | | <!-- é«çº§æ¥è¯¢å¯¹è¯æ¡ --> |
| | | <advanced-query |
| | | ref="advancedQuery" |
| | | :options="advancedQueryParam.options" |
| | | :visible.sync="advancedQueryParam.advancedQuerySettingBox" |
| | | v-model="value"> |
| | | </advanced-query> |
| | | <!-- ç¼ç è§åç¸å
³å¯¹è¯æ¡ --> |
| | | <el-dialog title="ç¼ç è§å使ç¨èå´" |
| | | append-to-body |
| | | :visible.sync="codeRangeSettingBox" |
| | | width="800px" |
| | | style="height: 116vh; margin-top: -10vh;"> |
| | | style="height: 116vh; margin-top: -10vh;"> |
| | | <avue-crud |
| | | :option="dialogeOption" |
| | | :table-loading="dialogLoading" |
| | |
| | | <el-form-item label="ç æ®µç±»å" :label-width="leftFormLabelWidth" required> |
| | | <el-select v-model="form.secType" placeholder="è¯·éæ©" @change="changeSectypeFormItems(null)" :disabled="basicSecOnlyRead"> |
| | | <el-option |
| | | v-for="item in sectypeList" |
| | | v-for="item in enumParam.secTypeList" |
| | | :key="item.itemValue" |
| | | :label="item.itemName" |
| | | :value="item.itemValue"> |
| | |
| | | <el-form-item label="ç æ®µé¿åº¦ç±»å:" :label-width="rightFormLabelWidth" required> |
| | | <el-select v-model="form.codeSecLengthType" placeholder="è¯·éæ©" :disabled="basicSecOnlyRead"> |
| | | <el-option |
| | | v-for="item in codeSecLengthType" |
| | | v-for="item in enumParam.codeSecLengthType" |
| | | :key="item.itemValue" |
| | | :label="item.itemName" |
| | | :value="item.itemValue"> |
| | |
| | | <el-form-item label="ç¼ç è¡¥ä½æ¹å¼:" :label-width="rightFormLabelWidth" required> |
| | | <el-select v-model="form.codeFillType" placeholder="è¯·éæ©" :disabled="basicSecOnlyRead"> |
| | | <el-option label="左补ä½" value="codeattrsec" |
| | | v-for="item in codeFillType" |
| | | v-for="item in enumParam.codeFillType" |
| | | :key="item.itemValue" |
| | | :label="item.itemName" |
| | | :value="item.itemValue"> |
| | |
| | | <el-form-item label="è¡¥ä½æ¶çå符:" :label-width="rightFormLabelWidth"> |
| | | <el-select v-model="form.codeFillSeparatorSelect" @blur="inputSelectBlur" filterable placeholder="è¯·éæ©" :disabled="basicSecOnlyRead"> |
| | | <el-option |
| | | v-for="item in codeFillSeparator" |
| | | v-for="item in enumParam.codeFillSeparator" |
| | | :key="item.itemValue" |
| | | :label="item.itemName" |
| | | :value="item.itemValue"> |
| | |
| | | <el-form-item label="å±çº§ç±»å:" :label-width="rightFormLabelWidth" required> |
| | | <el-select v-model="form.codeLevelType" placeholder="è¯·éæ©" :disabled="basicSecOnlyRead"> |
| | | <el-option |
| | | v-for="item in codeLevelType" |
| | | v-for="item in enumParam.codeLevelType" |
| | | :key="item.itemValue" |
| | | :label="item.itemName" |
| | | :value="item.itemValue"> |
| | |
| | | <el-form-item label="å符æªåç±»å:" :label-width="rightFormLabelWidth" required> |
| | | <el-select v-model="form.valueCutType" placeholder="è¯·éæ©" :disabled="basicSecOnlyRead"> |
| | | <el-option |
| | | v-for="item in codeCutType" |
| | | v-for="item in enumParam.codeCutType" |
| | | :key="item.itemValue" |
| | | :label="item.itemName" |
| | | :value="item.itemValue"> |
| | |
| | | <el-form-item label="åå¼ç±»å:" :label-width="rightFormLabelWidth"> |
| | | <el-select v-model="form.codeGetValueType" placeholder="è¯·éæ©" :disabled="basicSecOnlyRead"> |
| | | <el-option |
| | | v-for="item in codeGetValueType" |
| | | v-for="item in enumParam.codeGetValueType" |
| | | :key="item.itemValue" |
| | | :label="item.itemName" |
| | | :value="item.itemValue"> |
| | |
| | | placeholder="è¯·éæ©" |
| | | prefix-icon="el-icon-search" |
| | | readonly="true" |
| | | v-model="form.referBtmId" |
| | | v-model="form.referBtmName" |
| | | @focus="openAttrSelectOrGetValue('referBtmId')" |
| | | :disabled="basicSecOnlyRead"> |
| | | <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('referBtmId')" style="margin-right: 5px;cursor: pointer;"></i> |
| | |
| | | <el-form-item label="ç æ®µé¿åº¦ç±»å:" :label-width="rightFormLabelWidth" required> |
| | | <el-select v-model="form.codeSecLengthType" placeholder="è¯·éæ©" :disabled="basicSecOnlyRead"> |
| | | <el-option |
| | | v-for="item in codeSecLengthType" |
| | | v-for="item in enumParam.codeSecLengthType" |
| | | :key="item.itemValue" |
| | | :label="item.itemName" |
| | | :value="item.itemValue"> |
| | |
| | | <el-form-item label="ç¼ç è¡¥ä½æ¹å¼:" :label-width="rightFormLabelWidth" required> |
| | | <el-select v-model="form.codeFillType" placeholder="è¯·éæ©" :disabled="basicSecOnlyRead"> |
| | | <el-option |
| | | v-for="item in codeFillType" |
| | | v-for="item in enumParam.codeFillType" |
| | | :key="item.itemValue" |
| | | :label="item.itemName" |
| | | :value="item.itemValue"> |
| | |
| | | <el-form-item label="è¡¥ä½æ¶çå符:" :label-width="rightFormLabelWidth"> |
| | | <el-select v-model="form.codeFillSeparatorSelect" filterable @blur="inputSelectBlur" placeholder="è¯·éæ©" :disabled="basicSecOnlyRead"> |
| | | <el-option |
| | | v-for="item in codeFillSeparator" |
| | | v-for="item in enumParam.codeFillSeparator" |
| | | :key="item.itemValue" |
| | | :label="item.itemName" |
| | | :value="item.itemValue"> |
| | |
| | | <basic-container> |
| | | <div class="bbox"> |
| | | <avue-crud |
| | | :data="selectattrData" |
| | | :option="attrOption" |
| | | :table-loading="selectAttrOptionLoading" |
| | | ref="selectionAttrCrud" |
| | | :data="selectAttrParams.selectAttrData" |
| | | :option="selectAttrParams.attrOption" |
| | | :table-loading="selectAttrParams.selectAttrOptionLoading" |
| | | :ref="selectAttrParams.ref" |
| | | @search-change="selectAttrSearchChange" |
| | | @search-reset="searchAttrReset" |
| | | @row-click="selectionAttrRowClick" |
| | |
| | | </el-dialog> |
| | | |
| | | <!-- 第äºå±å¯¹è¯æ¡,屿§ç 段ï¼å
¬å¼ç¼è¾æ¡å¯¹è¯æ¡ç»ä»¶ --> |
| | | <formula-editor ref="formulaEditor" |
| | | <formula-editor |
| | | ref="formulaEditor" |
| | | @updateFormulaContent="updateFormulaContent" |
| | | :thisSceneTableData="thisSceneTableData" |
| | | :systemVariableTableData="systemVariableTableData"> |
| | | :thisSceneTableData="formulaEditorParams.thisSceneTableData" |
| | | :visible.sync="formulaEditorParams.formulaEditorSettingBox" |
| | | :systemVariableTableData="formulaEditorParams.systemVariableTableData"> |
| | | </formula-editor> |
| | | |
| | | <!-- 第äºå±å¯¹è¯æ¡,为ãç¶åç±»ç æ®µãéåå¼å¯¹è¯æ¡ --> |
| | | <el-dialog title="为ãç¶åç±»ç æ®µãéåå¼" |
| | | append-to-body |
| | | :visible.sync="isShowParentClassifyOption" |
| | | :visible.sync="parentClsfyParams.isShowParentClassifySettingBox" |
| | | width="65%" |
| | | style="height: 150vh; margin-top: -13vh;" |
| | | destroy-on-close> |
| | | <avue-crud |
| | | :page.sync="parentClassifyDataPage" |
| | | ref="crudParentClassify" |
| | | :option="parentClassifyParentOption" |
| | | :table-loading="classifyDialogLoading" |
| | | :data="parentClassifyData" |
| | | :page.sync="parentClsfyParams.parentClassifyDataPage" |
| | | :ref="parentClsfyParams.ref" |
| | | :option="parentClsfyParams.parentClassifyParentOption" |
| | | :table-loading="parentClsfyParams.classifyDialogLoading" |
| | | :data="parentClsfyParams.parentClassifyData" |
| | | @refresh-change="refreshParentClassifyDataChange" |
| | | @search-change="parentClassifySearchChange" |
| | | @search-reset="parentClassifySearchReset" |
| | |
| | | </avue-crud> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="saveSelectedParentClassify">ä¿ å</el-button> |
| | | <el-button @click="isShowParentClassifyOption = false">å æ¶</el-button> |
| | | <el-button @click="parentClsfyParams.isShowParentClassifySettingBox = false">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- 第äºå±å¯¹è¯æ¡,为ãåç
§å¼ç¨çä¸å¡ç±»åãéåå¼å¼¹å¯¹è¯æ¡ --> |
| | | <el-dialog title="为ãåç
§å¼ç¨çä¸å¡ç±»åãéåå¼" |
| | | append-to-body |
| | | :visible.sync="isShowSelectReferBtmOption" |
| | | width="65%" |
| | | style="height: 150vh; margin-top: -13vh;"> |
| | | <avue-crud |
| | | :page.sync="referBtmDataPage" |
| | | ref="crudReferBtm" |
| | | :option="referBtmOption" |
| | | :table-loading="referBtmDialogLoading" |
| | | :data="referBtmData" |
| | | @refresh-change="referBtmDataChange" |
| | | @search-change="referBtmSearchChange" |
| | | @search-reset="referBtmSearchReset" |
| | | @selection-change="referBtmSelectionChange" |
| | | @current-change="referBtmCurrentChange" |
| | | @size-change="referBtmSizeChange" |
| | | @row-click="referBtmRowClick"> |
| | | </avue-crud> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="saveSelectedreferBtm">ä¿ å</el-button> |
| | | <el-button @click="isShowSelectReferBtmOption = false">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 第äºå±å¯¹è¯æ¡,为ãåç
§å¼ç¨çä¸å¡ç±»åãéåå¼å¯¹è¯æ¡ --> |
| | | <refer-btm-type-crud-dialog |
| | | :visible.sync="referBtmDialogParams.selectReferBtmSettingBox" |
| | | :ref="referBtmDialogParams.ref" |
| | | @echoReferBtmType="echoReferBtmType"> |
| | | </refer-btm-type-crud-dialog> |
| | | |
| | | <!-- 第äºå±å¯¹è¯æ¡,èªå®ä¹åç
§é
ç½®Formç»ä»¶ --> |
| | | <refer-config-form-dialog |
| | |
| | | import optionBasic from "@/const/code/codebasic"; |
| | | import cloneOption from "@/const/code/cloneOption"; |
| | | import cloneBasicOption from "@/const/code/cloneBasicDialogOption"; |
| | | import cloneCodeRuleOption from "@/const/code/cloneCodeRuleDialogOption.js"; |
| | | import cloneCodeRuleOption from "@/const/code/cloneCodeRuleDialogOption"; |
| | | import optionRule from "@/const/code/mdmrule"; |
| | | import attrOption from "@/const/code/selectAttrOptionDialog"; |
| | | import treeOption from "@/const/code/classifyTreeOptionDialog"; |
| | |
| | | import fixedValueOption from "@/const/code/fixedValueMgrDialog"; |
| | | import {mapGetters} from "vuex"; |
| | | import func from "@/util/func"; |
| | | import {MasterTable} from "@/api/GetItem"; |
| | | import referBtmTypeCrudDialog from '../../components/code-dialog-page/referBtmTypeCrudDialog.vue'; |
| | | |
| | | export default { |
| | | components: { referBtmTypeCrudDialog }, |
| | | data() { |
| | | return { |
| | | value:"1", |
| | | ruleForm: {}, |
| | | query: {}, |
| | | loading: true, |
| | |
| | | treeOption: treeOption, |
| | | currentSelectTreeData: '', //å½åéä¸çæ èç¹ |
| | | /* ä¸ºå±æ§éå¼å³ä¾§è¡¨æ ¼ç¸å
³æ°æ® */ |
| | | attrOption: attrOption, |
| | | selectattrData: [], |
| | | selectAttrOptionLoading: false, |
| | | selectionChangeAttrList: [], |
| | | // 屿§ç 段ï¼å
¬å¼ç¼è¾æ¡ç»ä»¶çæ¬åºæ¯æ¾ç¤ºåéãä¸ç³»ç»åé |
| | | thisSceneTableData: [ |
| | | { |
| | | formula: "${}", |
| | | desc: "", |
| | | } |
| | | ], |
| | | systemVariableTableData: [ |
| | | { |
| | | formula: "#CURRENTUSER.OID#", |
| | | desc: "å½åç¨æ·ç主é®", |
| | | }, |
| | | { |
| | | formula: "#CURRENTUSER.ID#", |
| | | desc: "å½åç¨æ·çè´¦æ·", |
| | | }, |
| | | { |
| | | formula: "#CURRENTTIME#", |
| | | desc: "å½åæ¶é´", |
| | | }, |
| | | { |
| | | formula: "#CURRENTDATE#", |
| | | desc: "å½åæ¥æ", |
| | | }, |
| | | { |
| | | formula: "#CURRENTDATETIME#", |
| | | desc: "å½åæ¥ææ¶é´", |
| | | }, |
| | | { |
| | | formula: "#CURRENTUSER_NAME#", |
| | | desc: "å½åç¨æ·çå§å", |
| | | }, |
| | | { |
| | | formula: "#CURRENTUSER.SECRETGRADE#", |
| | | desc: "å½åç¨æ·å¯çº§", |
| | | }, |
| | | { |
| | | formula: "#CURRENTUSER.IPSECRET#", |
| | | desc: "å½åç¨æ·çIPå¯çº§", |
| | | }, |
| | | { |
| | | formula: "#CURRENTUSER.BUSINESSUNIT#", |
| | | desc: "å½åç¨æ·æå±ä¸å¡åå
", |
| | | }, |
| | | { |
| | | formula: "#CURRENTUSER.BUSINESSUNITNAME#", |
| | | desc: "å½åç¨æ·æå±ä¸å¡åå
åç§°", |
| | | }, |
| | | { |
| | | formula: "#CURRENTUSER.GROUPOID#", |
| | | desc: "å½åç¨æ·çé¨é¨ä¸»é®", |
| | | }, |
| | | { |
| | | formula: "#CURRENTUSER.GROUPNAME#", |
| | | desc: "å½åç¨æ·æå±é¨é¨åç§°", |
| | | }, |
| | | { |
| | | formula: "#CURRENTUSER.EMAIL#", |
| | | desc: "å½åç¨æ·é®ä»¶å°å", |
| | | }, |
| | | { |
| | | formula: "#CURRENTUSER.ROLENAME#", |
| | | desc: "å½åç¨æ·æå±è§è²åç§°", |
| | | }, |
| | | ], |
| | | |
| | | /* ç¶åç±»ç æ®µå¯¹è¯æ¡ */ |
| | | isShowParentClassifyOption: false, //ç¶åç±»ç æ®µå¯¹è¯æ¡æ¾ç¤ºæ§å¶ |
| | | classifyDialogLoading: true, //è¡¨æ ¼æ°æ®å è½½æç¤º |
| | | parentClassifyParentOption: parentClassifyParentOption, //è¡¨æ ¼é
ç½® |
| | | parentClassifyData: [], //è¡¨æ ¼æ°æ® |
| | | //å页忰é
ç½® |
| | | parentClassifyDataPage: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | |
| | | selectAttrParams: { |
| | | ref: "selectionAttrCrud", |
| | | attrOption: attrOption, |
| | | selectAttrData: [], |
| | | selectAttrOptionLoading: false, |
| | | selectionChangeAttrList: [], |
| | | selectAttrQeury: {}, |
| | | }, |
| | | parentClassifyQuery: {}, //æ¥è¯¢æ¡ä»¶ |
| | | parentClassifySelectionList: [], //å½åéä¸è¡ |
| | | |
| | | // 屿§ç 段ï¼å
¬å¼ç¼è¾æ¡ç»ä»¶çæ¬åºæ¯æ¾ç¤ºåéãä¸ç³»ç»åé |
| | | formulaEditorParams: { |
| | | thisSceneTableData: [ |
| | | { |
| | | formula: "${}", |
| | | desc: "", |
| | | } |
| | | ], |
| | | systemVariableTableData: [ |
| | | { |
| | | formula: "#CURRENTUSER.OID#", |
| | | desc: "å½åç¨æ·ç主é®", |
| | | }, |
| | | { |
| | | formula: "#CURRENTUSER.ID#", |
| | | desc: "å½åç¨æ·çè´¦æ·", |
| | | }, |
| | | { |
| | | formula: "#CURRENTTIME#", |
| | | desc: "å½åæ¶é´", |
| | | }, |
| | | { |
| | | formula: "#CURRENTDATE#", |
| | | desc: "å½åæ¥æ", |
| | | }, |
| | | { |
| | | formula: "#CURRENTDATETIME#", |
| | | desc: "å½åæ¥ææ¶é´", |
| | | }, |
| | | { |
| | | formula: "#CURRENTUSER_NAME#", |
| | | desc: "å½åç¨æ·çå§å", |
| | | }, |
| | | { |
| | | formula: "#CURRENTUSER.SECRETGRADE#", |
| | | desc: "å½åç¨æ·å¯çº§", |
| | | }, |
| | | { |
| | | formula: "#CURRENTUSER.IPSECRET#", |
| | | desc: "å½åç¨æ·çIPå¯çº§", |
| | | }, |
| | | { |
| | | formula: "#CURRENTUSER.BUSINESSUNIT#", |
| | | desc: "å½åç¨æ·æå±ä¸å¡åå
", |
| | | }, |
| | | { |
| | | formula: "#CURRENTUSER.BUSINESSUNITNAME#", |
| | | desc: "å½åç¨æ·æå±ä¸å¡åå
åç§°", |
| | | }, |
| | | { |
| | | formula: "#CURRENTUSER.GROUPOID#", |
| | | desc: "å½åç¨æ·çé¨é¨ä¸»é®", |
| | | }, |
| | | { |
| | | formula: "#CURRENTUSER.GROUPNAME#", |
| | | desc: "å½åç¨æ·æå±é¨é¨åç§°", |
| | | }, |
| | | { |
| | | formula: "#CURRENTUSER.EMAIL#", |
| | | desc: "å½åç¨æ·é®ä»¶å°å", |
| | | }, |
| | | { |
| | | formula: "#CURRENTUSER.ROLENAME#", |
| | | desc: "å½åç¨æ·æå±è§è²åç§°", |
| | | }, |
| | | ], |
| | | formulaEditorSettingBox: false, |
| | | }, |
| | | |
| | | /* ç¶åç±»ç æ®µå¯¹è¯æ¡ */ |
| | | parentClsfyParams: { |
| | | ref: 'crudParentClassify', |
| | | isShowParentClassifySettingBox: false, //ç¶åç±»ç æ®µå¯¹è¯æ¡æ¾ç¤ºæ§å¶ |
| | | classifyDialogLoading: true, //è¡¨æ ¼æ°æ®å è½½æç¤º |
| | | parentClassifyParentOption: parentClassifyParentOption, //è¡¨æ ¼é
ç½® |
| | | parentClassifyData: [], //è¡¨æ ¼æ°æ® |
| | | //å页忰é
ç½® |
| | | parentClassifyDataPage: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | parentClassifyQuery: {}, //æ¥è¯¢æ¡ä»¶ |
| | | parentClassifySelectionList: [], //å½åéä¸è¡ |
| | | }, |
| | | |
| | | /** åç
§å¼ç¨çä¸å¡ç±»åå¯¹è¯æ¡ç¸å
³æ°æ® */ |
| | | isShowSelectReferBtmOption: false, //å¯¹è¯æ¡æ¾ç¤ºæ§å¶ |
| | | referBtmDialogLoading: true, //è¡¨æ ¼æ°æ®å è½½æç¤º |
| | | referBtmDataPage: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | referBtmDialogParams: { |
| | | ref: 'crudReferBtm', |
| | | selectReferBtmSettingBox: false, |
| | | }, |
| | | referBtmOption: referBtmOption, //è¡¨æ ¼é
ç½® |
| | | referBtmData: [], //è¡¨æ ¼æ°æ® |
| | | referBtmQuery: {}, //æ¥è¯¢æ¡ä»¶ |
| | | referBtmSelectionList: [], //å½åéä¸è¡ |
| | | |
| | | /** åºç¡ç 段æ°å¢è¡¨å */ |
| | | form: { |
| | |
| | | componentCodeFlag: false, //æ¯å¦åä¸ç¼ç |
| | | pkCodeRule: '', //æå±ç¼ç è§å |
| | | }, |
| | | // formRules: { |
| | | // id: [ |
| | | // { required: true, message: '请è¾å
¥ç 段ç¼å·', trigger: 'blur' }, |
| | | // ], |
| | | // name: [ |
| | | // { required: true, message: '请è¾å
¥ç 段åç§°', trigger: 'blur' }, |
| | | // ], |
| | | // secType: [ |
| | | // { required: true, message: '请éä¸ç 段类å', trigger: 'change' }, |
| | | // ], |
| | | // codeSecLengthType: [ |
| | | // { required: true, message: 'è¯·éæ©ç æ®µé¿åº¦ç±»å', trigger: 'change' }, |
| | | // ], |
| | | // codeSecLength: [ |
| | | // { required: true, message: '请è¾å
¥ç 段çé¿åº¦', trigger: ['blur', 'change']}, |
| | | // { type: 'number', message: 'ç æ®µçé¿åº¦å¿
须为æ°åå¼',trigger: ['blur', 'change']} |
| | | // ], |
| | | // referAttributeName: [ |
| | | // { required: true, message: 'è¯·éæ©å±æ§', trigger: 'change' }, |
| | | // ], |
| | | // serialStart: [ |
| | | // { type: 'number', message: 'æµæ°´å·çèµ·å§å¼å¿
须为æ°åå¼',trigger: ['blur', 'change']} |
| | | // ], |
| | | // serialStep: [ |
| | | // { type: 'number', message: 'æµæ°´çæ¥é¿å¿
须为æ°åå¼',trigger: ['blur', 'change']} |
| | | // ], |
| | | // codeFillType: [ |
| | | // { required: true, message: 'è¯·éæ©ç¼ç è¡¥ä½æ¹å¼', trigger: ['blur', 'change']}, |
| | | // ], |
| | | // // è®¾ç½®è¡¥ä½æ¶çå符ï¼éè¦èªå®ä¹æ¥å夿 |
| | | // codeFillSeparatorSelect: [ |
| | | // { validator: validateCodeFill, trigger: ['blur', 'change'] }, |
| | | // ], |
| | | // codeFillLength: [ |
| | | // { required: true, message: '请è¾å
¥å¡«å
é¿åº¦', trigger: ['blur', 'change'] }, |
| | | // { type: 'number', message: 'å¡«å
é¿åº¦å¿
须为æ°åå¼',trigger: ['blur', 'change']} |
| | | // ], |
| | | // codeFillLimit: [ |
| | | // { required: true, message: '请è¾å
¥æµæ°´ä¸é', trigger: ['blur', 'change'] }, |
| | | // { type: 'number', message: 'æµæ°´ä¸éå¿
须为æ°åå¼',trigger: ['blur', 'change']} |
| | | // ], |
| | | // codeLevelType: [ |
| | | // { required: true, message: 'è¯·éæ©å±çº§ç±»å', trigger: 'change' }, |
| | | // ], |
| | | // codeLevelValue: [ |
| | | // { required: false, type: 'number', message: 'å±çº§çå¼å¿
须为æ°åå¼', trigger: 'change'} |
| | | // ], |
| | | // valueCutType: [ |
| | | // { required: true, message: 'è¯·éæ©å符æªåç±»å', trigger: 'change' }, |
| | | // ], |
| | | // referBtmId: [ |
| | | // { required: true, message: 'è¯·éæ©åç
§åºç¨çä¸å¡ç±»å', trigger: 'change' }, |
| | | // ], |
| | | // referConfig: [ |
| | | // { required: true, message: 'è¯·éæ©åç
§é
ç½®', trigger: 'change' }, |
| | | // ], |
| | | // codeDateFormatStr: [ |
| | | // { required: true, message: '请è¾å
¥æ¥ææ ¼å¼', trigger: ['blur', 'change'] }, |
| | | // ], |
| | | |
| | | // }, |
| | | |
| | | //æä¸¾åå¯è¾å¯éæ¥è¯¢ |
| | | sectypeList:[], //ç æ®µç±»å |
| | | codeSecLengthType:[], //ç æ®µé¿åº¦ç±»å |
| | | codeFillType:[], //ç¼ç è¡¥ä½æ¹å¼ |
| | | codeFillSeparator:[], //è¡¥ä½æ¶çå符ï¼å¯è¾å¯éå
容 |
| | | codeLevelType:[], //å±çº§ç±»å |
| | | codeCutType:[], //å符æªåç±»å |
| | | codeGetValueType:[], //åå¼ç±»å |
| | | enumParam: { |
| | | secTypeList:[], //ç æ®µç±»å |
| | | codeSecLengthType:[], //ç æ®µé¿åº¦ç±»å |
| | | codeFillType:[], //ç¼ç è¡¥ä½æ¹å¼ |
| | | codeFillSeparator:[], //è¡¥ä½æ¶çå符ï¼å¯è¾å¯éå
容 |
| | | codeLevelType:[], //å±çº§ç±»å |
| | | codeCutType:[], //å符æªåç±»å |
| | | codeGetValueType:[], //åå¼ç±»å |
| | | }, |
| | | |
| | | //表åå
ç´ æ ç¾å®½åº¦ |
| | | leftFormLabelWidth: '110px', |
| | | rightFormLabelWidth: '150px', |
| | | |
| | | // é«çº§æ¥è¯¢å¯¹è¯æ¡ç¸å
³åæ° |
| | | advancedQueryParam: { |
| | | advancedQuerySettingBox: false, |
| | | searchForm: { |
| | | name: 'advanced', |
| | | }, |
| | | options: { |
| | | labelWidth: '110px', |
| | | // æ¥è¯¢å段 |
| | | searchfeildName: [ |
| | | { |
| | | label: 'ç¼å·', |
| | | value: 'id', |
| | | }, |
| | | { |
| | | label: 'åç§°', |
| | | value: 'name', |
| | | }, |
| | | { |
| | | label: 'ç¶æ', |
| | | value: 'status', |
| | | }, |
| | | ], |
| | | // æ¥è¯¢æ¡ä»¶ çäºãå
å«ãä¸çäºãä»äºâ¦â¦ |
| | | searchCondition: [ |
| | | { |
| | | label: 'çäº', |
| | | value: '=', |
| | | }, |
| | | { |
| | | label: 'å
å«', |
| | | value: 'like', |
| | | }, |
| | | { |
| | | label: '大äºçäº', |
| | | value: '>=', |
| | | }, |
| | | { |
| | | label: 'å°äºçäº', |
| | | value: '<=', |
| | | }, |
| | | { |
| | | label: 'ä¸çäº', |
| | | value: '!=', |
| | | }, |
| | | { |
| | | label: 'ä»äº', |
| | | value: 'between', |
| | | }, |
| | | ], |
| | | column: [ |
| | | { |
| | | type: 'text', |
| | | |
| | | |
| | | }, |
| | | { |
| | | |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | |
| | | |
| | | }; |
| | | }, |
| | |
| | | }; |
| | | }, |
| | | }, |
| | | created() { |
| | | MasterTable({ |
| | | codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3", |
| | | functionId: 5, |
| | | }).then(res=>{ |
| | | console.log(res.data.tableDefineVO.seniorQueryColumns); |
| | | }) |
| | | }, |
| | | methods: { |
| | | |
| | | /* å
¬å¼ç¼è¾æ¡å
容æ¹å,åç»ä»¶ç¼è¾å®å
¬å¼ä¹åå
容忾æ¶è°ç¨ */ |
| | | updateFormulaContent(content){ |
| | | this.form.getValueClass = content; |
| | | }, |
| | | |
| | | /* å¼ç¨ç 段åç
§é
ç½®,åç»ä»¶å¡«å®åç
§é
ç½®ä¹åå
容忾æ¶è°ç¨ */ |
| | | echoReferConfig(content){ |
| | | // console.log(content.referTypeName); |
| | |
| | | let submitFormJson = JSON.stringify(content); |
| | | this.form.referConfig = submitFormJson; |
| | | }, |
| | | /** å¼ç¨ç 段为ãåç
§å¼ç¨çä¸å¡ç±»åãéåå¼ä¹åçå
容忾æ¶è°ç¨ */ |
| | | echoReferBtmType(content){ |
| | | // å®ç°åæ¾ |
| | | this.form.referBtmId = content.id; |
| | | this.form.referBtmName = content.name; |
| | | }, |
| | | |
| | | /** 为åç
§å¼ç¨çä¸å¡ç±»åéåå¼ï¼ç¬¬äºå±åµå¥å¯¹è¯æ¡ï¼åå
¶ç¸å
³æ¹æ³ */ |
| | | // è¡¨æ ¼æ°æ®å·æ°æé® |
| | | referBtmDataChange(){ |
| | | this.referBtmOnLoad(this.referBtmDataPage, this.referBtmQuery); |
| | | }, |
| | | saveSelectedreferBtm(){ |
| | | if(this.referBtmSelectionList.length != 1){ |
| | | this.$message.warning("åªè½éæ©ä¸æ¡æ°æ®!"); |
| | | return false; |
| | | } |
| | | //è°ç¨åç»ä»¶å¹¶ä¼ éå½åéä¸çåæ°å¼ï¼å®ç°åæ¾ |
| | | this.form.referBtmId = this.referBtmSelectionList[0].id; |
| | | this.form.referBtmName = this.referBtmSelectionList[0].name; |
| | | //æ¸
空å½åéä¸çè¡ |
| | | this.referBtmSelectionClear(); |
| | | this.isShowSelectReferBtmOption = false; |
| | | }, |
| | | referBtmSearchReset() { |
| | | this.referBtmQuery = {}; |
| | | this.referBtmOnLoad(this.referBtmDataPage); |
| | | }, |
| | | referBtmSearchChange(params, done) { |
| | | this.referBtmQuery = params; |
| | | this.referBtmDataPage.currentPage = 1; |
| | | this.referBtmOnLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | // åå»éä¸è¡¨æ ¼è¡æ¶è§¦å |
| | | referBtmRowClick(row){ |
| | | this.$refs.crudReferBtm.toggleSelection(); |
| | | this.referBtmSelectionList = row; |
| | | this.$refs.crudReferBtm.setCurrentRow(row); |
| | | this.$refs.crudReferBtm.toggleRowSelection(row); //éä¸å½åè¡ |
| | | }, |
| | | referBtmSelectionChange(list) { |
| | | this.referBtmSelectionList = list; |
| | | this.$refs.crudReferBtm.setCurrentRow(this.referBtmSelectionList[list.length-1]); |
| | | }, |
| | | referBtmSelectionClear() { |
| | | this.referBtmSelectionList = []; |
| | | this.$refs.crudReferBtm.toggleSelection(); |
| | | }, |
| | | referBtmCurrentChange(currentPage){ |
| | | this.referBtmDataPage.currentPage = currentPage; |
| | | }, |
| | | referBtmSizeChange(pageSize){ |
| | | this.referBtmDataPage.pageSize = pageSize; |
| | | }, |
| | | refreshReferBtmDataChange() { |
| | | this.referBtmOnLoad(this.referBtmDataPage, this.referBtmQuery); |
| | | }, |
| | | //å è½½ä¸åç
§å¼ç¨çä¸å¡ç±»åçæ°æ® |
| | | referBtmOnLoad(page, params = {}) { |
| | | //è¡¨æ ¼è¡éä½é®é¢ |
| | | this.$nextTick(() => { |
| | | this.$refs.crudReferBtm.doLayout(); |
| | | }) |
| | | this.referBtmDialogLoading = true; |
| | | let oid = this.selectionList.length==0 ? this.form.pkCodeRule:this.selectionList[0].oid; |
| | | Object.assign(params,{pkCodeRule:oid}) |
| | | //æ¥å£è¿æªæä¾ï¼å¾
æ´æ¹ |
| | | refDataGridClassifySec(page.currentPage, page.pageSize, Object.assign(params, this.parentClassifyQuery)).then(res => { |
| | | //console.log(res.data); |
| | | const data = res.data.data; |
| | | this.referBtmDataPage.total = data.total; |
| | | this.referBtmData = data.records; |
| | | this.referBtmDialogLoading = false; |
| | | this.referBtmSelectionClear(); |
| | | }); |
| | | }, |
| | | |
| | | |
| | | /** ç¶åç±»éæ©å¯¹è¯æ¡ï¼ç¬¬äºå±åµå¥å¯¹è¯æ¡ï¼åå
¶ç¸å
³æ¹æ³ */ |
| | | // ä¿åå½åç¶åç±»ç æ®µçéä¸è¡ï¼å¹¶è¿è¡åæ¾ |
| | | saveSelectedParentClassify(){ |
| | | //console.log(this.parentClassifySelectionList.length); |
| | | if(this.parentClassifySelectionList.length != 1){ |
| | | //console.log(this.parentClsfyParams.parentClassifySelectionList.length); |
| | | if(this.parentClsfyParams.parentClassifySelectionList.length != 1){ |
| | | this.$message.warning("è¯·éæ©ä¸æ¡æ°æ®!"); |
| | | return false; |
| | | } |
| | | //åæ°å¼ï¼å®ç°åæ¾ |
| | | this.form.parentClassifySecOid = this.parentClassifySelectionList[0].oid; |
| | | this.form.parentClassifySecText = this.parentClassifySelectionList[0].name; |
| | | this.form.parentClassifySecOid = this.parentClsfyParams.parentClassifySelectionList[0].oid; |
| | | this.form.parentClassifySecText = this.parentClsfyParams.parentClassifySelectionList[0].name; |
| | | //æ¸
空å½åéä¸çè¡ |
| | | this.parentClassifySelectionClear(); |
| | | this.isShowParentClassifyOption = false; |
| | | this.parentClsfyParams.isShowParentClassifySettingBox = false; |
| | | }, |
| | | parentClassifySearchReset() { |
| | | this.parentClassifyQuery = {}; |
| | | this.parentClassifyOnLoad(this.parentClassifyDataPage); |
| | | this.parentClsfyParams.parentClassifyQuery = {}; |
| | | this.parentClassifyOnLoad(this.parentClsfyParams.parentClassifyDataPage); |
| | | }, |
| | | parentClassifySearchChange(params, done) { |
| | | this.parentClassifyQuery = params; |
| | | this.parentClassifyDataPage.currentPage = 1; |
| | | this.parentClsfyParams.parentClassifyQuery = params; |
| | | this.parentClsfyParams.parentClassifyDataPage.currentPage = 1; |
| | | this.parentClassifyOnLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | parentClassifyRowClick(row){ |
| | | this.$refs.crudParentClassify.toggleSelection(); |
| | | this.parentClassifySelectionList = row; |
| | | this.$refs.crudParentClassify.setCurrentRow(row); |
| | | this.$refs.crudParentClassify.toggleRowSelection(row); //éä¸å½åè¡ |
| | | this.$refs[this.parentClsfyParams.ref].toggleSelection(); |
| | | this.parentClsfyParams.parentClassifySelectionList = row; |
| | | this.$refs[this.parentClsfyParams.ref].setCurrentRow(row); |
| | | this.$refs[this.parentClsfyParams.ref].toggleRowSelection(row); //éä¸å½åè¡ |
| | | }, |
| | | parentClassifySelectionChange(list) { |
| | | this.parentClassifySelectionList = list; |
| | | this.$refs.crudParentClassify.setCurrentRow(this.parentClassifySelectionList[list.length-1]); |
| | | this.parentClsfyParams.parentClassifySelectionList = list; |
| | | this.$refs[this.parentClsfyParams.ref].setCurrentRow(this.parentClsfyParams.parentClassifySelectionList[list.length-1]); |
| | | }, |
| | | parentClassifySelectionClear() { |
| | | this.parentClassifySelectionList = []; |
| | | this.$refs.crudParentClassify.toggleSelection(); |
| | | this.parentClsfyParams.parentClassifySelectionList = []; |
| | | this.$refs[this.parentClsfyParams.ref].toggleSelection(); |
| | | }, |
| | | parentClassifyCurrentChange(currentPage){ |
| | | this.parentClassifyDataPage.currentPage = currentPage; |
| | | this.parentClsfyParams.parentClassifyDataPage.currentPage = currentPage; |
| | | }, |
| | | parentClassifySizeChange(pageSize){ |
| | | this.parentClassifyDataPage.pageSize = pageSize; |
| | | this.parentClsfyParams.parentClassifyDataPage.pageSize = pageSize; |
| | | }, |
| | | refreshParentClassifyDataChange() { |
| | | this.parentClassifyOnLoad(this.parentClassifyDataPage, this.parentClassifyQuery); |
| | | this.parentClassifyOnLoad(this.parentClsfyParams.parentClassifyDataPage, this.parentClsfyParams.parentClassifyQuery); |
| | | }, |
| | | parentClassifyOnLoad(page, params = {}) { |
| | | this.classifyDialogLoading = true; |
| | | let parentClsParam = this.parentClsfyParams; |
| | | parentClsParam.classifyDialogLoading = true; |
| | | let oid = this.selectionList.length==0 ? this.form.pkCodeRule:this.selectionList[0].oid; |
| | | Object.assign(params,{pkCodeRule:oid}) |
| | | refDataGridClassifySec(page.currentPage, page.pageSize, Object.assign(params, this.parentClassifyQuery)).then(res => { |
| | | refDataGridClassifySec(page.currentPage, page.pageSize, Object.assign(params, parentClsParam.parentClassifyQuery)).then(res => { |
| | | //console.log(res.data); |
| | | const data = res.data.data; |
| | | this.parentClassifyDataPage.total = data.total; |
| | | this.parentClassifyData = data.records; |
| | | this.classifyDialogLoading = false; |
| | | parentClsParam.parentClassifyDataPage.total = data.total; |
| | | parentClsParam.parentClassifyData = data.records; |
| | | parentClsParam.classifyDialogLoading = false; |
| | | this.parentClassifySelectionClear(); |
| | | }); |
| | | }, |
| | |
| | | this.loadlistClassifyLinkAttr() |
| | | }, |
| | | // å è½½åç±»è¿æ¥å±æ§è¡¨æ ¼æ°æ® |
| | | loadlistClassifyLinkAttr(condition) { |
| | | //è¿å¿è¿éè¦å®å |
| | | this.selectAttrOptionLoading = true; |
| | | listClassifyLinkAttr({"page": 1,"limit": -1,'conditionMap[codeClassifyOid]':this.currentSelectTreeData.oid}).then(res=>{ |
| | | console.log(res.data.data); |
| | | this.selectattrData = res.data.data; |
| | | this.selectAttrOptionLoading = false; |
| | | loadlistClassifyLinkAttr() { |
| | | let attrParam = this.selectAttrParams; |
| | | //console.log(this.currentSelectTreeData); |
| | | attrParam.selectAttrOptionLoading = true; |
| | | let param = {}; |
| | | // å¤ä¸ªconditionMapè¿æ ·ä¼ å |
| | | if(attrParam.selectAttrQeury){ |
| | | Object.keys(attrParam.selectAttrQeury).forEach(key=>{ |
| | | param['conditionMap['+key+']'] = attrParam.selectAttrQeury[key]; |
| | | }); |
| | | } |
| | | param['conditionMap[codeClassifyOid]'] = this.currentSelectTreeData.oid; |
| | | param['conditionMap[btmTypeOid]'] = this.currentSelectTreeData.btmTypeOid; |
| | | listClassifyLinkAttr(param).then(res=>{ |
| | | //console.log(res.data.data); |
| | | attrParam.selectAttrData = res.data.data; |
| | | attrParam.selectAttrOptionLoading = false; |
| | | this.$nextTick(() => { |
| | | this.$refs[attrParam.ref].doLayout() |
| | | }); |
| | | }) |
| | | }, |
| | | // ç¹å»æç´¢å触å该äºä»¶ |
| | | selectAttrSearchChange(params, done) { |
| | | this.query = params; |
| | | this.selectAttrParams.selectAttrQeury = params; |
| | | //console.log(params); //è¿å¿éè¦æ¹ |
| | | this.loadlistClassifyLinkAttr(Object.assign(params,{'conditionMap[codeClassifyOid]':this.currentSelectTreeData.oid})); |
| | | this.loadlistClassifyLinkAttr(); |
| | | done(); |
| | | }, |
| | | // ä¸ºå±æ§éå¼çé¢ï¼åå»è¡¨æ ¼è¡æ¶è§¦å该äºä»¶ |
| | | selectionAttrRowClick(row){ |
| | | this.$refs.selectionAttrCrud.toggleSelection(); |
| | | this.selectionChangeAttrList = row; |
| | | this.$refs.selectionAttrCrud.setCurrentRow(row); |
| | | this.$refs.selectionAttrCrud.toggleRowSelection(row); //éä¸å½åè¡ |
| | | this.$refs[this.selectAttrParams.ref].toggleSelection(); |
| | | this.selectAttrParams.selectionChangeAttrList = row; |
| | | this.$refs[this.selectAttrParams.ref].setCurrentRow(row); |
| | | this.$refs[this.selectAttrParams.ref].toggleRowSelection(row); //éä¸å½åè¡ |
| | | }, |
| | | // 屿§åå¼å½åéä¸è¡åçååæ¶è§¦å |
| | | selectionChangeAttr(list){ |
| | | this.selectionChangeAttrList = list; |
| | | this.$refs.selectionAttrCrud.setCurrentRow(this.selectionChangeAttrList[list.length-1]); |
| | | this.selectAttrParams.selectionChangeAttrList = list; |
| | | this.$refs[this.selectAttrParams.ref].setCurrentRow(this.selectAttrParams.selectionChangeAttrList[list.length-1]); |
| | | }, |
| | | // éç½®ä½å±æ§éåå¼è¡¨æ ¼çæç´¢æ¡ä¹åçåè° |
| | | searchAttrReset() { |
| | | this.selectAttrParams.selectAttrQeury = {}; |
| | | this.loadlistClassifyLinkAttr() |
| | | }, |
| | | // ä¸ºå±æ§éåå¼ä¹åçåæ¾ |
| | | selectedListClassifyLinkAttr(){ |
| | | if(this.selectionChangeAttrList.length != 1){ |
| | | if(this.selectAttrParams.selectionChangeAttrList.length != 1){ |
| | | this.$message.warning("è¯·éæ©ä¸æ¡æ°æ®!"); |
| | | return false; |
| | | } |
| | | //è°ç¨åç»ä»¶å¹¶ä¼ éå½åéä¸çåæ°å¼ï¼å®ç°åæ¾ |
| | | this.form = Object.assign({}, this.form, { |
| | | referAttributeId:this.selectionChangeAttrList[0].id, |
| | | referAttributeName:this.selectionChangeAttrList[0].name, |
| | | referAttributeId:this.selectAttrParams.selectionChangeAttrList[0].id, |
| | | referAttributeName:this.selectAttrParams.selectionChangeAttrList[0].name, |
| | | referCodeClassifyOid: this.currentSelectTreeData.key, |
| | | referCodeClassifyOidName: this.currentSelectTreeData.title, |
| | | }) |
| | |
| | | window.console.log(error); |
| | | }); |
| | | }else { |
| | | if(this.codeClassifyForm.id.trim() == ''){ |
| | | this.$message.warning("ç å¼ä¸è½ä¸ºç©ºï¼"); |
| | | return; |
| | | } |
| | | if(this.codeClassifyForm.id.trim().length > 4 ){ |
| | | this.$message.warning("ç å¼é¿åº¦ä¸è½å¤§äº4ï¼"); |
| | | return; |
| | | } |
| | | this.codeClassifyForm.codeClassifySecOid = this.codefixedsecOrCodeclassifysecOid; |
| | | console.log(this.codeClassifyForm); |
| | | // console.log(this.codeClassifyForm); |
| | | addSaveCodeClassifyValue(this.codeClassifyForm).then(() => { |
| | | this.loadClassifyValueData({"oid":this.codefixedsecOrCodeclassifysecOid}); |
| | | this.clearFixedOrClassifyForm('codeclassifyvaluesec'); |
| | |
| | | |
| | | |
| | | /** ç¼ç è§åç¸å
³æ¹æ³ */ |
| | | // æå¼é«çº§æ¥è¯¢çªå£ |
| | | openAdvancedQuery(){ |
| | | //this.$refs.advancedQuery.visible = true; |
| | | //this.advancedQueryParam.timer = new Date().getTime() |
| | | this.advancedQueryParam.advancedQuerySettingBox = !this.advancedQueryParam.advancedQuerySettingBox; |
| | | }, |
| | | // æ¥è¯¢ä½¿ç¨èå´ |
| | | handleRange(){ |
| | | if(!this.tipsMessage(this.selectionList)){ |
| | |
| | | this.isShowSelectAttrOption = true; |
| | | }else if(condition === 'value'){ |
| | | //æå¼å
¬å¼ç¼è¾æ¡ï¼ç¬¬äºå±åµå¥å¯¹è¯æ¡ |
| | | this.$refs.formulaEditor.isShowformulaEdit = true; |
| | | //this.$refs.formulaEditor.isShowformulaEdit = true; |
| | | this.formulaEditorParams.formulaEditorSettingBox = true; |
| | | }else if(condition === 'parentClassifySecOid'){ |
| | | this.isShowParentClassifyOption = true; |
| | | this.parentClsfyParams.isShowParentClassifySettingBox = true; |
| | | }else if(condition === 'referBtmId'){ |
| | | this.isShowSelectReferBtmOption = true; |
| | | this.refreshReferBtmDataChange(); |
| | | this.referBtmDialogParams.selectReferBtmSettingBox = true; |
| | | // è°ç¨åç»ä»¶å·æ°è¡¨æ ¼æ°æ® |
| | | this.$refs[this.referBtmDialogParams.ref].referBtmOnLoad(); |
| | | }else if(condition === 'referConfig'){ |
| | | if(func.notEmpty(this.form.referConfig) || func.notEmpty(this.form.referBtmName)){ |
| | | this.openReconfigInterFace(this.form); |
| | | }else{ |
| | | this.openTipsChooseOrCust(); |
| | | } |
| | | //this.$refs.referConfigFormDialog.onloadAttrData(); |
| | | } |
| | | }, |
| | | |
| | | // å½åå·²åå¨ç¼è¾è¿çåå±é
ç½®ï¼æä»¥ç´æ¥æå¼åç
§é
ç½®çé¢ |
| | | // å½åå·²åå¨ç¼è¾è¿çåç
§é
ç½®ï¼æä»¥ç´æ¥æå¼åç
§é
ç½®çé¢ |
| | | openReconfigInterFace(preReferConfigForm){ |
| | | // console.log(preReferConfigForm); |
| | | this.$refs.referConfigFormDialog.isShowReferConfigForm = true; |
| | |
| | | // ç æ®µç±»åæ¹åæ¶ï¼å¢å 对åºçform表åä¸ç屿§ |
| | | changeSectypeFormItems(row){ |
| | | //console.log(row); |
| | | if(this.sectypeList.length==0){ |
| | | if(this.enumParam.secTypeList.length==0){ |
| | | this.loadCodeSecType(); |
| | | } |
| | | if(row != null){ |
| | |
| | | codeSecLength: row!=null&&row.codeSecLength != '' ? row.codeSecLength:'', //ç æ®µçé¿åº¦ |
| | | serialStart: row!=null&&row.serialStart != '' ? row.serialStart:1, //æµæ°´å·èµ·å§å¼ |
| | | serialStep: row!=null&&row.serialStep != '' ? row.serialStep:1, //æµæ°´çæ¥é¿ |
| | | codeFillType: row!=null&&row.codeFillType != '' ? row.codeFillType:'code_fill_right', //ç¼ç è¡¥ä½æ¹å¼ |
| | | codeFillType: row!=null&&row.codeFillType != '' ? row.codeFillType:'code_fill_left', //ç¼ç è¡¥ä½æ¹å¼ |
| | | codeFillSeparatorSelect: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparatorSelect:0, //è¡¥ä½æ¶çå符ï¼éä¸ç䏿æ¡ç䏿 |
| | | codeFillSeparator: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparator:0, //è¡¥ä½æ¶çå符 |
| | | codeFillLength: row!=null&&row.codeFillLength != '' ? row.codeFillLength:'', //å¡«å
é¿åº¦ |
| | |
| | | //æä¸¾åå¯è¾å¯éå
容æ¥è¯¢ |
| | | loadCodeSecType(){ |
| | | getDictionary({code: "codeSecType"}).then(res=>{ |
| | | this.sectypeList = res.data.data; |
| | | this.enumParam.secTypeList = res.data.data; |
| | | }) |
| | | this.loadCodeSecLength(); |
| | | }, |
| | | loadCodeSecLength(){ |
| | | getDictionary({code: "codeSecLength"}).then(res=>{ |
| | | this.codeSecLengthType = res.data.data; |
| | | this.enumParam.codeSecLengthType = res.data.data; |
| | | }) |
| | | }, |
| | | loadCodeFillType(){ |
| | | getDictionary({code: "codeFillType"}).then(res=>{ |
| | | this.codeFillType = res.data.data; |
| | | this.enumParam.codeFillType = res.data.data; |
| | | }) |
| | | }, |
| | | loadCodeFillSeparator(){ |
| | | getDictionary({code: "codeFillSeparator"}).then(res=>{ |
| | | this.codeFillSeparator = res.data.data; |
| | | this.enumParam.codeFillSeparator = res.data.data; |
| | | }) |
| | | }, |
| | | loadCodeLevelType(){ |
| | | getDictionary({code: "codeLevelType"}).then(res=>{ |
| | | this.codeLevelType = res.data.data; |
| | | this.enumParam.codeLevelType = res.data.data; |
| | | }) |
| | | }, |
| | | loadCodeCutType(){ |
| | | getDictionary({code: "codeCutType"}).then(res=>{ |
| | | this.codeCutType = res.data.data; |
| | | this.enumParam.codeCutType = res.data.data; |
| | | }) |
| | | }, |
| | | loadCodeGetValueType(){ |
| | | getDictionary({code: "codeGetValueType"}).then(res=>{ |
| | | this.codeGetValueType = res.data.data; |
| | | this.enumParam.codeGetValueType = res.data.data; |
| | | }) |
| | | }, |
| | | |
| | |
| | | } |
| | | |
| | | .el-card__body > .treeBox { |
| | | height: 50vh; |
| | | height: 56vh; |
| | | } |
| | | |
| | | .el-col-5 > .box { |
| | | height: 55vh; |
| | | height: 56vh; |
| | | } |
| | | |
| | | .operator_,filter, .layui-btn{ |
| | |
| | | /** æ°å¢ç 段 */ |
| | | .add-basicsec-total { |
| | | width: 100%; |
| | | padding: 20px 0 0 0; |
| | | } |
| | | |
| | | .add-basicsec-total .el-input__inner,.add-basicsec-total .el-textarea__inner { |
| | |
| | | * 屿§æ§å¶è¾å
¥çé¿åº¦ |
| | | */ |
| | | //@Column(columnDefinition = "屿§æ§å¶è¾å
¥çé¿åº¦",defaultValue = "254") |
| | | private Integer controlLength = 254; |
| | | private Integer controlLength; |
| | | |
| | | /** |
| | | * 表å䏿¾ç¤ºçæ ·å¼ |
| | |
| | | package com.vci.ubcs.omd.feign; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import org.springblade.core.launch.constant.AppConstant; |
| | |
| | | * @param baseQueryObject æ¥è¯¢æ¡ä»¶å¯¹è±¡ |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @GetMapping(GET_REF_PAGE) |
| | | R<IPage<BtmTypeVO>> getRefPage(@RequestBody BaseQueryObject baseQueryObject); |
| | | @PostMapping(GET_REF_PAGE) |
| | | R<Page<BtmTypeVO>> getRefPage(@RequestBody BaseQueryObject baseQueryObject); |
| | | |
| | | /** |
| | | * åç
§å表æ¥è¯¢ |
| | |
| | | package com.vci.ubcs.omd.feign; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vci.ubcs.omd.entity.Attribute; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @Override |
| | | public R<IPage<BtmTypeVO>> getRefPage(BaseQueryObject baseQueryObject) { |
| | | public R<Page<BtmTypeVO>> getRefPage(BaseQueryObject baseQueryObject) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | |
| | | */ |
| | | private String attrDataType; |
| | | |
| | | /** |
| | | * æ°æ®ç±»åæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | private String attrDataTypeText; |
| | | |
| | | /** |
| | | * æ¯å¦å¯ä»¥ä¸ºç©º |
| | | */ |
| | |
| | | * é»è®¤å¼ |
| | | */ |
| | | private String defaultValue; |
| | | |
| | | |
| | | /** |
| | | * å°æ°ç²¾åº¦ä½æ° |
| | |
| | | private boolean enumFlag; |
| | | |
| | | /** |
| | | z * å
嫿䏾çå¼ |
| | | * å
嫿䏾çå¼ |
| | | */ |
| | | private Map<String,String> enumItemMap; |
| | | |
| | |
| | | private String id; |
| | | |
| | | private String name; |
| | | |
| | | //éå¢ç |
| | | @TableField(exist = false) |
| | | private String groupcode; |
| | | |
| | | private String description; |
| | |
| | | import com.vci.ubcs.code.entity.CodeClassify; |
| | | import com.vci.ubcs.code.mapper.CodeClassifyMapper; |
| | | import com.vci.ubcs.code.service.ICodeClassifyService; |
| | | import com.vci.ubcs.code.vo.CodeOsattributeVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyVO; |
| | | import com.vci.ubcs.code.wrapper.CodeClassifyWrapper; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.starter.revision.model.TreeQueryObject; |
| | | import com.vci.ubcs.starter.util.BladeTreeQueryObject; |
| | | import com.vci.ubcs.starter.util.LocalFileUtil; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.DataGrid; |
| | |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.io.File; |
| | |
| | | * @return 屿§çä¿¡æ¯ï¼å
å«é»è®¤ç屿§ |
| | | */ |
| | | @GetMapping("/listClassifyLinkAttr") |
| | | public DataGrid<CodeOsattributeVO> listClassifyLinkAttr(BaseQueryObject baseQueryObject){ |
| | | public DataGrid<BtmTypeAttributeVO> listClassifyLinkAttr(BaseQueryObject baseQueryObject){ |
| | | return codeClassifyService.listClassifyLinkAttr(baseQueryObject); |
| | | } |
| | | |
| | |
| | | import com.vci.ubcs.code.dto.CodeClassifyTemplateAttrDTO; |
| | | import com.vci.ubcs.code.entity.CodeClassifyTemplateAttr; |
| | | import com.vci.ubcs.code.service.ICodeClassifyTemplateAttrService; |
| | | import com.vci.ubcs.code.vo.CodeOsbtmtypeattributeVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyTemplateAttrVO; |
| | | import com.vci.ubcs.code.wrapper.CodeClassifyTemplateAttrWrapper; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.DataGrid; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/codeClassifyTemplateAttrByBtm") |
| | | public DataGrid<CodeOsbtmtypeattributeVO> codeClassifyTemplateAttrByBtm(BaseQueryObject baseQueryObject){ |
| | | public DataGrid<BtmTypeAttributeVO> codeClassifyTemplateAttrByBtm(BaseQueryObject baseQueryObject){ |
| | | return CodeClstempattrService.codeClassifyTemplateAttrByBtm(baseQueryObject); |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/codeClassifyTemplateAttrByBtmHave") |
| | | public DataGrid<CodeOsbtmtypeattributeVO> codeClassifyTemplateAttrByBtmHave(BaseQueryObject baseQueryObject){ |
| | | public DataGrid<BtmTypeAttributeVO> codeClassifyTemplateAttrByBtmHave(BaseQueryObject baseQueryObject){ |
| | | return CodeClstempattrService.codeClassifyTemplateAttrByBtmHave(baseQueryObject); |
| | | } |
| | | |
| | |
| | | * @return æ§è¡ç»æ success为true为å¯ä»¥å é¤ï¼falseè¡¨ç¤ºææ°æ®å¼ç¨ï¼obj为true表示æä¸çº§ |
| | | */ |
| | | @PostMapping( "/checkIsCanDelete") |
| | | public R checkIsCanDelete( CodeClassifyValueDTO codeClassifyValueDTO) { |
| | | public R checkIsCanDelete(CodeClassifyValueDTO codeClassifyValueDTO) { |
| | | return codeClassifyValueService.checkIsCanDelete(codeClassifyValueDTO); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import com.vci.ubcs.code.constant.MdmBtmTypeConstant; |
| | | import com.vci.ubcs.code.service.ICodeReferBtmTypeService; |
| | | import com.vci.ubcs.omd.feign.IBtmTypeClient; |
| | | import com.vci.ubcs.omd.vo.AttributeVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.DataGrid; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.launch.constant.AppConstant; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ludc |
| | | * @date 2023/6/1 18:36 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/referBtmTypeController") |
| | | @Api(value = "ç¼ç è§å管ç-å¼ç¨ç 段&&屿§ç 段-ä¸å¡ç±»åæ¥è¯¢", tags = "ç¼ç è§å管ç-å¼ç¨ç 段-ä¸å¡ç±»åæ¥è¯¢") |
| | | public class CodeReferBtmTypeController { |
| | | |
| | | @Resource |
| | | private ICodeReferBtmTypeService codeReferBtmTypeService; |
| | | |
| | | /** |
| | | * è·åä¸å¡ç±»åå表 |
| | | * @param baseQueryObject æ¥è¯¢æ¡ä»¶ |
| | | * @return å表çå
容 |
| | | */ |
| | | @GetMapping("/referDataGrid") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "è·åä¸å¡ç±»åå表", notes = "baseQueryObject") |
| | | public R<Page<BtmTypeVO>> referDataGrid(BaseQueryObject baseQueryObject){ |
| | | return R.data(codeReferBtmTypeService.referDataGrid(baseQueryObject)); |
| | | } |
| | | |
| | | @GetMapping(value = "/gridAttributesByBtmId") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "è·åä¸å¡ç±»åå
å«ç屿§ï¼ä¸å页", notes = "baseQueryObject") |
| | | public R<Page<AttributeVO>> gridAttributesByBtmId(BaseQueryObject baseQueryObject){ |
| | | return R.data(codeReferBtmTypeService.gridAttributesByBtmId(baseQueryObject)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vci.ubcs.code.bo.CodeClassifyFullInfoBO; |
| | | import com.vci.ubcs.code.entity.CodeClassify; |
| | | import com.vci.ubcs.code.vo.CodeOsattributeVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.revision.model.TreeQueryObject; |
| | | import com.vci.ubcs.starter.util.BladeTreeQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.DataGrid; |
| | | import com.vci.ubcs.starter.web.pagemodel.Tree; |
| | | import com.vci.ubcs.starter.web.pagemodel.DataGrid;import com.vci.ubcs.starter.web.pagemodel.Tree; |
| | | import org.springblade.core.tool.api.R; |
| | | |
| | | import java.io.File; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | |
| | | * @param baseQueryObject æ¥è¯¢å¯¹è±¡ï¼å¿
é¡»æcodeClassifyOidï¼æ¯æidånameä¸¤ç§æ¥è¯¢æ¡ä»¶ |
| | | * @return 屿§çä¿¡æ¯ï¼å
å«é»è®¤ç屿§ |
| | | */ |
| | | DataGrid<CodeOsattributeVO> listClassifyLinkAttr(BaseQueryObject baseQueryObject); |
| | | DataGrid<BtmTypeAttributeVO> listClassifyLinkAttr(BaseQueryObject baseQueryObject); |
| | | |
| | | /** |
| | | * è·åå½ååç±»çé¡¶å±åç±» |
| | |
| | | * @return åç±»çæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | CodeClassifyVO getObjectByIdPath(String idPath); |
| | | |
| | | |
| | | /** |
| | | * 主é¢åºçæ |
| | |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.vci.ubcs.code.dto.CodeClassifyTemplateAttrDTO; |
| | | import com.vci.ubcs.code.entity.CodeClassifyTemplateAttr; |
| | | import com.vci.ubcs.code.vo.CodeOsbtmtypeattributeVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyTemplateAttrVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.DataGrid; |
| | |
| | | * @param baseQueryObject |
| | | * @return |
| | | */ |
| | | DataGrid<CodeOsbtmtypeattributeVO> codeClassifyTemplateAttrByBtm(BaseQueryObject baseQueryObject); |
| | | DataGrid<BtmTypeAttributeVO> codeClassifyTemplateAttrByBtm(BaseQueryObject baseQueryObject); |
| | | |
| | | /** |
| | | * æ¥è¯¢è¿ä¸ªæ¨¡æ¿ï¼ä¸å¡ç±»åä¸å·²éæ©ç屿§ |
| | | * @param baseQueryObject |
| | | * @return |
| | | */ |
| | | DataGrid<CodeOsbtmtypeattributeVO> codeClassifyTemplateAttrByBtmHave(BaseQueryObject baseQueryObject); |
| | | DataGrid<BtmTypeAttributeVO> codeClassifyTemplateAttrByBtmHave(BaseQueryObject baseQueryObject); |
| | | |
| | | /** |
| | | * 忥å°å
¶ä»æ¨¡æ¿ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vci.ubcs.omd.vo.AttributeVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import com.vci.ubcs.starter.web.enumpck.BooleanEnum; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.ubcs.starter.web.util.BeanUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 对omd䏿ä¾çfeignæ¥å£è¿è¡è°ç¨ï¼ä»¥åå¤çç¸å
³é»è¾ |
| | | * @author ludc |
| | | * @date 2023/6/1 18:39 |
| | | */ |
| | | public interface ICodeReferBtmTypeService { |
| | | |
| | | /** |
| | | * è·åä¸å¡ç±»åå表 |
| | | * @param baseQueryObject æ¥è¯¢æ¡ä»¶ |
| | | * @return å表çå
容 |
| | | */ |
| | | Page<BtmTypeVO> referDataGrid(BaseQueryObject baseQueryObject); |
| | | |
| | | /** |
| | | * è·åä¸å¡ç±»åå
å«ç屿§ï¼ä¸å页 |
| | | * @param baseQueryObject æ¥è¯¢å¯¹è±¡ |
| | | * @return 屿§çä¿¡æ¯ |
| | | */ |
| | | Page<AttributeVO> gridAttributesByBtmId(BaseQueryObject baseQueryObject); |
| | | |
| | | |
| | | } |
| | |
| | | import com.vci.ubcs.code.bo.CodeClassifyFullInfoBO; |
| | | import com.vci.ubcs.code.entity.CodeClassify; |
| | | import com.vci.ubcs.code.entity.CodeClassifyTemplate; |
| | | import com.vci.ubcs.code.entity.CodeOsbtmtypeEntity; |
| | | import com.vci.ubcs.code.entity.CodeOsbtmtypeattributeEntity; |
| | | import com.vci.ubcs.code.enumpack.FrameworkDataLCStatus; |
| | | import com.vci.ubcs.code.mapper.CodeClassifyMapper; |
| | | import com.vci.ubcs.code.mapper.CodeClassifyTemplateMapper; |
| | | import com.vci.ubcs.code.mapper.CodeOsbtmtypeMapper; |
| | | import com.vci.ubcs.code.mapper.CodeOsbtmtypeattributeMapper; |
| | | import com.vci.ubcs.code.po.CodeClassifyPO; |
| | | import com.vci.ubcs.code.service.ICodeClassifyService; |
| | | import com.vci.ubcs.code.service.ICodeKeyAttrRepeatService; |
| | | import com.vci.ubcs.code.service.ICodeOsattributeService; |
| | | import com.vci.ubcs.code.service.ICodeRuleService; |
| | | import com.vci.ubcs.code.vo.CodeOsattributeVO; |
| | | import com.vci.ubcs.code.vo.CodeOsbtmtypeVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeKeyAttrRepeatRuleVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeRuleVO; |
| | | import com.vci.ubcs.omd.cache.EnumCache; |
| | | import com.vci.ubcs.omd.enums.EnumEnum; |
| | | import com.vci.ubcs.omd.feign.IBtmTypeClient; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import com.vci.ubcs.starter.bo.WriteExcelData; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | |
| | | import com.vci.ubcs.starter.util.LocalFileUtil; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.DataGrid; |
| | | import com.vci.ubcs.starter.web.pagemodel.PageHelper; |
| | | import com.vci.ubcs.starter.web.pagemodel.Tree; |
| | | import com.vci.ubcs.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.ubcs.starter.web.util.LangBaseUtil; |
| | |
| | | private ICodeRuleService codeRuleService; |
| | | |
| | | @Resource |
| | | private CodeOsbtmtypeMapper codeOsbtmtypeMapper; |
| | | |
| | | @Resource |
| | | private CodeOsbtmtypeattributeMapper codeOsbtmtypeattributeMapper; |
| | | |
| | | @Resource |
| | | private IBtmTypeClient btmTypeClient; |
| | | |
| | | /** |
| | | * 屿§æå¡ |
| | | */ |
| | | // @Autowired |
| | | // private OsAttributeServiceI attributeService; |
| | | |
| | | /** |
| | | * æ¥å¿ |
| | |
| | | return excelName; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导å
¥åç±» |
| | | * |
| | |
| | | |
| | | List<String> btmOids = poList.stream().filter(s -> StringUtils.isNotBlank(s.getKeyRepeatRuleId())) |
| | | .map(CodeClassifyPO::getBtmTypeId).collect(Collectors.toList()); |
| | | Map<String, CodeOsbtmtypeEntity> btmVOMap = Optional.ofNullable(btmOids.size()==0 ? null: codeOsbtmtypeMapper.selectBatchIds(btmOids) |
| | | ).orElse(new ArrayList<>()).stream().collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t,(o1,o2)->o2)); |
| | | // Map<String, CodeOsbtmtypeVO> btmVOMap = null; |
| | | Map<String, BtmTypeVO> btmVOMap = Optional |
| | | .ofNullable(btmOids.size()==0 ? null: btmTypeClient.selectByIdCollection(btmOids).getData()) |
| | | .orElse(new ArrayList<BtmTypeVO>()).stream().collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t,(o1,o2)->o2)); |
| | | // Map<String, CodeOsbtmtypeVO> btmVOMap = null; |
| | | Map<String/**è·¯å¾**/,String/**主é®**/> oidPathMap = new HashMap<>(); |
| | | |
| | | //æä»¬éè¦æ¥è¯¢ææå·²ç»åå¨çåç±»ï¼ä¸»è¦æ¯è·¯å¾ï¼ç¨æ¥å¤æåç±»çæ°æ® |
| | |
| | | classify.setDescription(po.getDescription()); |
| | | oidPathMap.put(po.getPath(),classify.getOid()); |
| | | if(StringUtils.isNotBlank(po.getBtmTypeId())){ |
| | | CodeOsbtmtypeVO typeVO = (CodeOsbtmtypeVO)btmVOMap.get(po.getBtmTypeId().toLowerCase(Locale.ROOT)); |
| | | BtmTypeVO typeVO = (BtmTypeVO)btmVOMap.get(po.getBtmTypeId().toLowerCase(Locale.ROOT)); |
| | | classify.setBtmTypeId(typeVO.getId()); |
| | | classify.setBtmTypeName(typeVO.getName()); |
| | | } |
| | |
| | | * @return 屿§çä¿¡æ¯ï¼å
å«é»è®¤ç屿§ |
| | | */ |
| | | @Override |
| | | public DataGrid<CodeOsattributeVO> listClassifyLinkAttr(BaseQueryObject baseQueryObject) { |
| | | public DataGrid<BtmTypeAttributeVO> listClassifyLinkAttr(BaseQueryObject baseQueryObject) { |
| | | if(baseQueryObject == null){ |
| | | baseQueryObject = new BaseQueryObject(); |
| | | } |
| | |
| | | baseQueryObject.setConditionMap(new HashMap<>()); |
| | | } |
| | | String classifyOid = baseQueryObject.getConditionMap().getOrDefault("codeClassifyOid",""); |
| | | String btmTypeOid = baseQueryObject.getConditionMap().getOrDefault("btmTypeOid",""); |
| | | String id = baseQueryObject.getConditionMap().getOrDefault("id",""); |
| | | String name = baseQueryObject.getConditionMap().getOrDefault("name",""); |
| | | if(StringUtils.isBlank(classifyOid)){ |
| | | return new DataGrid<>(); |
| | | } |
| | | if(StringUtils.isBlank(btmTypeOid)){ |
| | | return new DataGrid<>(); |
| | | } |
| | | CodeClassifyVO topClassifyVO = getTopClassifyVO(classifyOid); |
| | |
| | | |
| | | Map<String,Object> condition = new HashMap<>(1); |
| | | condition.put("pkbtmtype",topClassifyVO.getBtmtypeid()); |
| | | |
| | | List<CodeOsbtmtypeattributeEntity> unDefaultAttributes = codeOsbtmtypeattributeMapper.selectByMap(condition); |
| | | BtmTypeVO data = btmTypeClient.getDetail(btmTypeOid).getData(); |
| | | List<BtmTypeAttributeVO> unDefaultAttributes = data.getAttributes(); |
| | | // List<CodeOsbtmtypeattributeEntity> unDefaultAttributes = codeOsbtmtypeattributeMapper.selectByMap(condition); |
| | | // List<OsBtmTypeAttributeVO> unDefaultAttributes = btmService. (topClassifyVO.getBtmtypeid()); |
| | | List<CodeOsattributeVO> attributeVOS = new ArrayList<>(); |
| | | List<BtmTypeAttributeVO> attributeVOS = new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(unDefaultAttributes)){ |
| | | unDefaultAttributes.stream().forEach(attr->{ |
| | | CodeOsattributeVO attributeVO = new CodeOsattributeVO(); |
| | | BtmTypeAttributeVO attributeVO = new BtmTypeAttributeVO(); |
| | | BeanUtils.copyProperties(attr,attributeVO); |
| | | attributeVO.setAttributedatatype(attr.getAttrdatatype()); |
| | | attributeVO.setAttrlength(Short.valueOf(attr.getAttributelength())); |
| | | attributeVO.setBtmtypeid(attr.getReferbtmtypeid()); |
| | | attributeVO.setBtmtypename(attr.getReferbtmtypename()); |
| | | attributeVO.setAttributedatatypetext(attr.getReferbtmtypename()); |
| | | attributeVO.setAttrDataType(attr.getAttrDataType()); |
| | | attributeVO.setAttributeLength(attr.getAttributeLength()); |
| | | attributeVO.setBtmTypeId(data.getId()); |
| | | attributeVO.setBtmname(data.getName()); |
| | | attributeVO.setAttrDataTypeText(EnumCache.getValue(EnumEnum.VCO_FIELD_TYPE,attr.getAttrDataType())); |
| | | boolean add = true; |
| | | if(StringUtils.isNotBlank(id) && !attributeVO.getId().contains(id.replace("*",""))){ |
| | | add = false; |
| | |
| | | } |
| | | }); |
| | | } |
| | | // if(!CollectionUtils.isEmpty(codeOsattributeService.getDefaultAttributeVOs())){ |
| | | // codeOsattributeService.getDefaultAttributeVOs().stream().forEach(attr->{ |
| | | // boolean add = true; |
| | | // if(StringUtils.isNotBlank(id) && !attr.getId().contains(id.replace("*",""))){ |
| | | // add = false; |
| | | // } |
| | | // if(StringUtils.isNotBlank(name) && !attr.getId().contains(name.replace("*",""))){ |
| | | // add = false; |
| | | // } |
| | | // if(add){ |
| | | // attributeVOS.add(attr); |
| | | // } |
| | | // }); |
| | | // } |
| | | DataGrid<CodeOsattributeVO> dataGrid = new DataGrid<>(); |
| | | DataGrid<BtmTypeAttributeVO> dataGrid = new DataGrid<>(); |
| | | dataGrid.setData(attributeVOS); |
| | | dataGrid.setTotal(attributeVOS.size()); |
| | | return dataGrid; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 主é¢åºçæ ,å·²ç»èè°ä¸å¡ç±»åæ¥è¯¢ |
| | | * 主é¢åºçæ ,å·²èè°ä¸å¡ç±»åæ¥è¯¢feign |
| | | * |
| | | * @param treeQueryObject æ å½¢æ¥è¯¢å¯¹è±¡ |
| | | * @return 主é¢åºæ¾ç¤ºæ |
| | |
| | | if(Func.isEmpty(btmTypeVOS) || Func.isEmpty(trees)){ |
| | | return null; |
| | | } |
| | | List<Tree> treeList = trees.stream().filter(tree -> btmTypeVOS.stream(). |
| | | anyMatch(btmType -> Objects.equals(tree.getAttributes().get("id"), btmType.getId()))).collect(Collectors.toList()); |
| | | List<Tree> treeList = trees.stream().filter(tree -> !CollectionUtils.isEmpty(btmTypeVOS.stream().filter(btmType -> { |
| | | if(Objects.equals(tree.getAttributes().get("id"), btmType.getId())){ |
| | | tree.getAttributes().put("btmTypeOid",btmType.getOid()); |
| | | return true; |
| | | } |
| | | return false; |
| | | }).collect(Collectors.toList()))) |
| | | .collect(Collectors.toList()); |
| | | return treeList; |
| | | } |
| | | |
| | |
| | | import com.vci.ubcs.code.enumpack.CodeLevelTypeEnum; |
| | | import com.vci.ubcs.code.mapper.CodeClassifyTemplateAttrMapper; |
| | | import com.vci.ubcs.code.mapper.CodeClassifyTemplateMapper; |
| | | import com.vci.ubcs.code.mapper.CodeOsbtmtypeattributeMapper; |
| | | import com.vci.ubcs.code.service.ICodeClassifyTemplateAttrService; |
| | | import com.vci.ubcs.code.service.ICodeTempphaseService; |
| | | import com.vci.ubcs.code.vo.CodeOsbtmtypeattributeVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyTemplateAttrVO; |
| | | import com.vci.ubcs.code.wrapper.CodeClassifyTemplateAttrWrapper; |
| | | import com.vci.ubcs.omd.feign.IAttributeClient; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.revision.service.RevisionModelUtil; |
| | | import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil; |
| | |
| | | |
| | | @Resource |
| | | IDictBizClient iDictBizClient; |
| | | |
| | | @Resource |
| | | CodeClassifyTemplateMapper codeClassifyTemplateMapper; |
| | | @Resource |
| | | CodeOsbtmtypeattributeMapper codeOsbtmtypeattributeMapper; |
| | | |
| | | @Resource |
| | | @Lazy |
| | | ICodeTempphaseService codeTempphaseService; |
| | | |
| | | /** |
| | | * 对象çæä½ |
| | | */ |
| | | @Autowired(required = false) |
| | | private RevisionModelUtil revisionModelUtil; |
| | | |
| | | /** |
| | | * 屿§æå¡å¯¹è±¡ |
| | | */ |
| | | @Resource |
| | | private IAttributeClient attributeClient; |
| | | |
| | | /** |
| | | * æ¥è¯¢ææç主é¢åºåç±»çæ¨¡æ¿å±æ§ |
| | |
| | | } |
| | | return isKV; |
| | | } |
| | | |
| | | public boolean checkKVObj(String kvString){ |
| | | boolean isKV = true; |
| | | try { |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public DataGrid<CodeOsbtmtypeattributeVO> codeClassifyTemplateAttrByBtm(BaseQueryObject baseQueryObject){ |
| | | public DataGrid<BtmTypeAttributeVO> codeClassifyTemplateAttrByBtm(BaseQueryObject baseQueryObject){ |
| | | if(baseQueryObject.getConditionMap() == null){ |
| | | baseQueryObject.setConditionMap(new HashMap<>()); |
| | | } |
| | | DataGrid<CodeOsbtmtypeattributeVO> dataGrid=new DataGrid<CodeOsbtmtypeattributeVO>(); |
| | | DataGrid<BtmTypeAttributeVO> dataGrid=new DataGrid<BtmTypeAttributeVO>(); |
| | | //模æ¿oid |
| | | String templateAttrOid = baseQueryObject.getConditionMap().get("oid"); |
| | | String name = baseQueryObject.getConditionMap().getOrDefault("name",""); |
| | |
| | | CodeClassifyTemplate codeClassifyTemplateDO = codeClassifyTemplateMapper.selectById(templateAttrOid); |
| | | |
| | | //è¿ä¸ªä¸å¡ç±»åä¸çææå±æ§ |
| | | List<CodeOsbtmtypeattributeVO> boAttrs = (List<CodeOsbtmtypeattributeVO>) codeOsbtmtypeattributeMapper.selectById(codeClassifyTemplateDO.getBtmTypeId());// this.btmService.listAttributeByBtmId(codeClassifyTemplateDO.getBtmTypeId()); |
| | | // codeOsbtmtypeattributeMapper.selectById(codeClassifyTemplateDO.getBtmTypeId()); |
| | | // BeanUtils.copyProperties(codeOsbtmtypeattributeMapper.selectById(codeClassifyTemplateDO.getBtmTypeId()),boAttrs); |
| | | // å¾
å®å |
| | | List<BtmTypeAttributeVO> boAttrs = null; //(List<BtmTypeAttributeVO>)attributeClient.selectById(codeClassifyTemplateDO.getBtmTypeId());// this.btmService.listAttributeByBtmId(codeClassifyTemplateDO.getBtmTypeId()); |
| | | // codeOsbtmtypeattributeMapper.selectById(codeClassifyTemplateDO.getBtmTypeId()); |
| | | // BeanUtils.copyProperties(codeOsbtmtypeattributeMapper.selectById(codeClassifyTemplateDO.getBtmTypeId()),boAttrs); |
| | | //æé»è®¤ç屿§ä¹æ·»å å°boAttrs |
| | | if(boAttrs == null){ |
| | | boAttrs = new ArrayList<>(); |
| | |
| | | } |
| | | |
| | | //è¿æ»¤æå·²ç»åå¨ç屿§ |
| | | List<CodeOsbtmtypeattributeVO> boAttrss = new ArrayList<CodeOsbtmtypeattributeVO>(); |
| | | List<BtmTypeAttributeVO> boAttrss = new ArrayList<BtmTypeAttributeVO>(); |
| | | |
| | | for (CodeOsbtmtypeattributeVO osBtmTypeAttributeVO:boAttrs){ |
| | | for (BtmTypeAttributeVO osBtmTypeAttributeVO:boAttrs){ |
| | | if(!btmOids.contains(osBtmTypeAttributeVO.getId())){ |
| | | //ççæ¯ä¸æ¯ææ¨¡ç³æ¥è¯¢ |
| | | boolean inSearch = true; |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public DataGrid<CodeOsbtmtypeattributeVO> codeClassifyTemplateAttrByBtmHave(BaseQueryObject baseQueryObject){ |
| | | DataGrid<CodeOsbtmtypeattributeVO> dataGrid=new DataGrid<CodeOsbtmtypeattributeVO>(); |
| | | public DataGrid<BtmTypeAttributeVO> codeClassifyTemplateAttrByBtmHave(BaseQueryObject baseQueryObject){ |
| | | DataGrid<BtmTypeAttributeVO> dataGrid=new DataGrid<BtmTypeAttributeVO>(); |
| | | //模æ¿oid |
| | | String templateAttrOid = baseQueryObject.getConditionMap().get("oid"); |
| | | |
| | |
| | | CodeClassifyTemplate codeClassifyTemplateDO = codeClassifyTemplateMapper.selectById(templateAttrOid); |
| | | |
| | | //è¿ä¸ªä¸å¡ç±»åä¸çææå±æ§ |
| | | List<CodeOsbtmtypeattributeVO> boAttrs = (List<CodeOsbtmtypeattributeVO>) codeOsbtmtypeattributeMapper.selectById(codeClassifyTemplateDO.getBtmTypeId());//this.btmService.listAttributeByBtmIdHasDefault(codeClassifyTemplateDO.getBtmTypeId()); |
| | | // å¾
å®å |
| | | List<BtmTypeAttributeVO> boAttrs = null; // (List<BtmTypeAttributeVO>) attributeClient.selectById(codeClassifyTemplateDO.getBtmTypeId());//this.btmService.listAttributeByBtmIdHasDefault(codeClassifyTemplateDO.getBtmTypeId()); |
| | | // codeOsbtmtypeattributeMapper.selectById(codeClassifyTemplateDO.getBtmTypeId()); |
| | | // BeanUtils.copyProperties(codeOsbtmtypeattributeMapper.selectById(codeClassifyTemplateDO.getBtmTypeId()),boAttrs); |
| | | //è¿ä¸ªæ¨¡æ¿ä¸å·²ç»æç屿§ |
| | |
| | | } |
| | | |
| | | //è¿æ»¤æé¤äºèªèº«çå«ç屿§ |
| | | List<CodeOsbtmtypeattributeVO> boAttrss = new ArrayList<CodeOsbtmtypeattributeVO>(); |
| | | List<BtmTypeAttributeVO> boAttrss = new ArrayList<BtmTypeAttributeVO>(); |
| | | |
| | | for (CodeOsbtmtypeattributeVO osBtmTypeAttributeVO:boAttrs){ |
| | | for (BtmTypeAttributeVO osBtmTypeAttributeVO:boAttrs){ |
| | | if(btmOids.contains(osBtmTypeAttributeVO.getId())){ |
| | | boAttrss.add(osBtmTypeAttributeVO); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.service.impl; |
| | | |
| | | import com.alibaba.cloud.commons.lang.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vci.ubcs.code.service.ICodeReferBtmTypeService; |
| | | import com.vci.ubcs.omd.feign.IAttributeClient; |
| | | import com.vci.ubcs.omd.feign.IBtmTypeClient; |
| | | import com.vci.ubcs.omd.vo.AttributeVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import com.vci.ubcs.starter.web.enumpck.BooleanEnum; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.DataGrid; |
| | | import com.vci.ubcs.starter.web.util.BeanUtil; |
| | | import org.springblade.core.launch.constant.AppConstant; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.rmi.ServerException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 对omd䏿ä¾çfeignæ¥å£è¿è¡è°ç¨ï¼ä»¥åå¤çç¸å
³é»è¾ |
| | | * @author ludc |
| | | * @date 2023/6/1 18:39 |
| | | */ |
| | | @Service |
| | | public class CodeReferBtmTypeServiceImpl implements ICodeReferBtmTypeService { |
| | | |
| | | /** |
| | | * ä¸å¡ç±»åæå¡ |
| | | */ |
| | | @Resource |
| | | private IBtmTypeClient btmTypeClient; |
| | | |
| | | /** |
| | | * ä¸å¡ç±»å屿§æå¡ |
| | | */ |
| | | @Resource |
| | | private IAttributeClient attributeClient; |
| | | |
| | | /** |
| | | * è·åä¸å¡ç±»åå表 |
| | | * @param baseQueryObject æ¥è¯¢æ¡ä»¶ |
| | | * @return å表çå
容 |
| | | */ |
| | | @Override |
| | | public Page<BtmTypeVO> referDataGrid(BaseQueryObject baseQueryObject) throws ServiceException { |
| | | Map<String, String> conditionMap = baseQueryObject.getConditionMap(); |
| | | conditionMap.put("domain", AppConstant.APPLICATION_NAME_CODE); |
| | | baseQueryObject.setConditionMap(conditionMap); |
| | | Page<BtmTypeVO> refPage = null; |
| | | try { |
| | | refPage = btmTypeClient.getRefPage(baseQueryObject).getData(); |
| | | }catch (Exception e){ |
| | | throw new ServiceException("ä¸å¡ç±»åfeignæ¥å£è°ç¨é误"); |
| | | } |
| | | return refPage; |
| | | } |
| | | |
| | | /** |
| | | * è·åä¸å¡ç±»åå
å«ç屿§ï¼ä¸å页 |
| | | * @param baseQueryObject æ¥è¯¢å¯¹è±¡ |
| | | * @return 屿§çä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public Page<AttributeVO> gridAttributesByBtmId(BaseQueryObject baseQueryObject) { |
| | | String btmTypeId = baseQueryObject.getConditionMap().containsKey("btmTypeId")?baseQueryObject.getConditionMap().get("btmTypeId"):""; |
| | | if(StringUtils.isBlank(btmTypeId)){ |
| | | return new Page<AttributeVO>(); |
| | | } |
| | | String hasDefaultAttr = baseQueryObject.getConditionMap().getOrDefault("hasDefaultAttr","false"); |
| | | String attrId = baseQueryObject.getConditionMap().containsKey("name")?baseQueryObject.getConditionMap().get("name").replace("*",""):""; |
| | | String attrName = baseQueryObject.getConditionMap().containsKey("label") ? baseQueryObject.getConditionMap().get("label").replace("*","") : ""; |
| | | // TODO æ ¹æ®ä¸å¡ç±»åidè·åå
³èç屿§ |
| | | List<BtmTypeAttributeVO> boAttrs = null; //attributeClient.get(); |
| | | if(boAttrs == null){ |
| | | boAttrs = new ArrayList<>(); |
| | | } |
| | | if(BooleanEnum.TRUE.getValue().equalsIgnoreCase(hasDefaultAttr)){ |
| | | // TODO è·åé»è®¤ç屿§ |
| | | List<BtmTypeAttributeVO> finalBoAttrs = boAttrs; |
| | | |
| | | List<BtmTypeAttributeVO> btmTypeAttributeVOS = new ArrayList<>(); //attributeClient.getDefaultAttributeVOs(); |
| | | btmTypeAttributeVOS.stream().forEach(attr->{ |
| | | BtmTypeAttributeVO attributeVO = new BtmTypeAttributeVO(); |
| | | BeanUtil.convert(attr,attributeVO); |
| | | attributeVO.setAttributeLength(attr.getAttributeLength()); |
| | | attributeVO.setAttrDataType(attr.getAttrDataType()); |
| | | attributeVO.setReferBtmTypeId(attr.getBtmTypeId()); |
| | | attributeVO.setReferBtmTypeName(attr.getReferBtmTypeName()); |
| | | finalBoAttrs.add(attributeVO); |
| | | }); |
| | | boAttrs = finalBoAttrs; |
| | | } |
| | | List<BtmTypeAttributeVO> attrList = boAttrs.stream().filter(s->{ |
| | | boolean usedFlag = true; |
| | | if(StringUtils.isNotBlank(attrId) && !s.getId().contains(attrId.replace("*",""))){ |
| | | usedFlag = false; |
| | | } |
| | | if(StringUtils.isNotBlank(attrName) && !s.getName().contains(attrName.replace("*",""))){ |
| | | usedFlag = false; |
| | | } |
| | | return usedFlag; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | return new Page<>(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.vci.ubcs.code.dto.datapush.BaseModelDTO; |
| | | import com.vci.ubcs.code.entity.*; |
| | | import com.vci.ubcs.code.enumpack.*; |
| | | import com.vci.ubcs.code.mapper.CodeOsbtmtypeMapper; |
| | | import com.vci.ubcs.code.mapper.CodeWupinMapper; |
| | | import com.vci.ubcs.code.mapper.CommonsMapper; |
| | | import com.vci.ubcs.code.service.*; |
| | |
| | | import com.vci.ubcs.code.vo.pagemodel.UITableFieldVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.UITablePageVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.*; |
| | | import com.vci.ubcs.omd.feign.IAttributeClient; |
| | | import com.vci.ubcs.omd.feign.IBtmTypeClient; |
| | | import com.vci.ubcs.omd.feign.IEnumClient; |
| | | import com.vci.ubcs.omd.feign.IRevisionRuleClient; |
| | |
| | | */ |
| | | @Resource |
| | | private CodeClstemplateServiceImpl templateService; |
| | | /** |
| | | * 模æ¿çæå¡ |
| | | */ |
| | | |
| | | @Resource |
| | | private CodeOsbtmtypeMapper codeOsbtmtypeMapper; |
| | | @Resource |
| | | private CodeOsattributeServiceImpl attributeService; |
| | | private IAttributeClient attributeClient; |
| | | |
| | | /** |
| | | * çæç¼ç çæå¡ |
| | | */ |
| | | @Resource |
| | | private MdmProductCodeService productCodeService; |
| | | |
| | | /** |
| | | * å¯è¾å¯éçæå¡ |
| | | */ |
| | | @Resource |
| | | IDictBizClient iDictBizClient; |
| | | |
| | | /** |
| | | * åå
¸çæå¡ |
| | | */ |
| | | @Resource |
| | | IEnumClient enumClient; |
| | | |
| | | /** |
| | | * å
¬å¼çæå¡ |
| | | */ |
| | |
| | | List<String> oids = VciBaseUtil.str2List(baseModelDTO.getOid()); |
| | | // List<ClientBusinessObject> cboList = boService.selectCBOByOidCollection(oids, baseModelDTO.getBtmname()); |
| | | //æä¸ªç¹ ä¸å¡ç±»å宿åéè¦ä¿®æ¹ |
| | | QueryWrapper<CodeOsbtmtypeEntity> wrapper = new QueryWrapper<>(); |
| | | QueryWrapper<BtmTypeVO> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("BTMNAME",baseModelDTO.getBtmname()); |
| | | wrapper.in("OID",oids); |
| | | List<CodeOsbtmtypeEntity> cboList = codeOsbtmtypeMapper.selectList(wrapper); |
| | | // å¾
å®å |
| | | List<BtmTypeVO> cboList = null; // btmTypeClient.selectList(wrapper); |
| | | //è¿éè¦ä¿®æ¹allCodeççå½å¨æ |
| | | // Map<String, String> conditionMap = new HashMap<>(); |
| | | QueryWrapper<CodeAllCode> allCodeWrapper = new QueryWrapper<>(); |
| | |
| | | // List<ClientBusinessObject> codeCbos = boService.queryCBO(MdmBtmTypeConstant.CODE_ALL_CODE, conditionMap); |
| | | // åæ¶éè¦ä¸å¡æ°æ®å é¤ |
| | | if (CodeDefaultLC.TASK_BACK.getValue().equals(baseModelDTO.getLcStatus())) { |
| | | // BatchCBO batchCBO = new BatchCBO(); |
| | | // batchCBO.getDeleteCbos().addAll(cboList); |
| | | codeOsbtmtypeMapper.deleteBatchIds(cboList); |
| | | // boService.persistenceBatch(batchCBO); |
| | | } else { |
| | | // lifeCycleService.transCboStatus(cboList, baseModelDTO.getLcStatus()); |
| | | } |
| | | // lifeCycleService.transCboStatus(codeCbos, baseModelDTO.getLcStatus()); |
| | | } |
| | | // BatchCBO batchCBO = new BatchCBO(); |
| | | // batchCBO.getDeleteCbos().addAll(cboList); |
| | | |
| | | // å¾
å®å |
| | | //btmTypeClient.deleteBatchIds(cboList); |
| | | |
| | | //boService.persistenceBatch(batchCBO); |
| | | } else { |
| | | // lifeCycleService.transCboStatus(cboList, baseModelDTO.getLcStatus()); |
| | | } |
| | | // lifeCycleService.transCboStatus(codeCbos, baseModelDTO.getLcStatus()); |
| | | } |
| | | |
| | | /** |
| | | * ç³è¯·åä¸ç¼ç |
| | |
| | | selectFieldList.add(referTableNick + "." + showFieldInSource + " as " + referShowField); |
| | | }); |
| | | } |
| | | Optional.ofNullable(attributeService.getDefaultAttributeVOMap()).orElseGet(() -> new HashMap<>()).keySet().stream().forEach(attrId -> { |
| | | if (!selectFieldList.contains(attrId) && !"secretgrade".equalsIgnoreCase(attrId)) { |
| | | selectFieldList.add(attrId); |
| | | } |
| | | }); |
| | | // å¾
å®å |
| | | // Optional.ofNullable(attributeService.getDefaultAttributeVOMap()).orElseGet(() -> new HashMap<>()).keySet().stream().forEach(attrId -> { |
| | | // if (!selectFieldList.contains(attrId) && !"secretgrade".equalsIgnoreCase(attrId)) { |
| | | // selectFieldList.add(attrId); |
| | | // } |
| | | // }); |
| | | if (!selectFieldList.contains(CODE_FIELD)) { |
| | | selectFieldList.add(CODE_FIELD); |
| | | } |
| | |
| | | */ |
| | | private String getSqlByValue(String selectKey, String value, Map<String, CodeClassifyTemplateAttrVO> attrVOMap) { |
| | | StringBuilder sql = new StringBuilder(); |
| | | if (!selectKey.contains(".") && (attrVOMap.containsKey(selectKey.toLowerCase(Locale.ROOT)) || attributeService.isDefaultAttr(selectKey) || selectKey.matches(RegExpConstant.LETTER))) { |
| | | sql.append("t."); |
| | | } |
| | | // å¾
å®å |
| | | // if (!selectKey.contains(".") && (attrVOMap.containsKey(selectKey.toLowerCase(Locale.ROOT)) || attributeService.isDefaultAttr(selectKey) || selectKey.matches(RegExpConstant.LETTER))) { |
| | | // sql.append("t."); |
| | | // } |
| | | if (value.startsWith(QueryOptionConstant.IN)) { |
| | | sql.append(selectKey) |
| | | .append(SPACE) |
| | |
| | | @Override |
| | | public CodeRuleVO entityVO(CodeRule codeRule) { |
| | | CodeRuleVO codeRuleVO = Objects.requireNonNull(BeanUtil.copy(codeRule, CodeRuleVO.class)); |
| | | if(StringUtils.isNotBlank(codeRuleVO.getLcStatus())){ |
| | | codeRuleVO.setLcStatusText(EnumCache.getValue(EnumEnum.CODE_RULE_LC,codeRuleVO.getLcStatus())); |
| | | if(StringUtils.isNotBlank(codeRule.getLcStatus())){ |
| | | codeRuleVO.setLcStatusText(EnumCache.getValue(EnumEnum.CODE_RULE_LC,codeRule.getLcStatus())); |
| | | } |
| | | return codeRuleVO; |
| | | } |
| | |
| | | <select id="selectAllLevelChildOid" resultType="java.util.HashMap"> |
| | | select oid, level |
| | | from PL_CODE_CLASSIFY |
| | | START WITH parentCodeClassifyOid = #{oid}CONNECT BY |
| | | START WITH parentCodeClassifyOid = #{oid} CONNECT BY |
| | | PRIOR OID = parentCodeClassifyOid |
| | | </select> |
| | | |
| | |
| | | */ |
| | | private final IBtmTypeService btmTypeService; |
| | | |
| | | |
| | | /** |
| | | * æ¥ç详æ
|
| | | * |
| | |
| | | */ |
| | | @Override |
| | | @PostMapping(GET_REF_PAGE) |
| | | public R<IPage<BtmTypeVO>> getRefPage(BaseQueryObject baseQueryObject) { |
| | | public R<Page<BtmTypeVO>> getRefPage(BaseQueryObject baseQueryObject) { |
| | | Map<String, String> conditionMap = baseQueryObject.getConditionMap(); |
| | | if (conditionMap == null){ |
| | | conditionMap = new HashMap<>(16); |
| | |
| | | query.setSize(pageHelper.getLimit()); |
| | | query.setCurrent(pageHelper.getPage()); |
| | | IPage<BtmType> page = btmTypeService.page(Condition.getPage(query), Condition.getQueryWrapper(queryObj).lambda().eq(BtmType::getDomain, domainValue).orderByAsc(BtmType::getId)); |
| | | IPage<BtmTypeVO> pageVO = new Page<>(); |
| | | Page<BtmTypeVO> pageVO = new Page<>(); |
| | | BeanUtil.copy(page,pageVO); |
| | | pageVO.setRecords(BtmTypeWrapper.build().listEntityVO(page.getRecords())); |
| | | R<IPage<BtmTypeVO>> r = R.data(pageVO); |
| | | R<Page<BtmTypeVO>> r = R.data(pageVO); |
| | | r.setSuccess(true); |
| | | return r; |
| | | } |