| | |
| | | //import func from "@/util/func"; |
| | | import { getReferConfigPage } from "@/api/code/codeReferConfig"; |
| | | export default { |
| | | name: "referConfigDialog", |
| | | name: "referConfigCrudDialog", |
| | | props: { |
| | | |
| | | }, |
| | | data() { |
| | | return{ |
| | |
| | | ], |
| | | } |
| | | }, |
| | | watch: { |
| | | // çå¬ç¶ç»ä»¶ä¼ ççªå£æ¾ç¤ºéèçå¼ |
| | | isShowReferConfigCrud (){ |
| | | if(this.isShowReferConfigCrud){ |
| | | this.referConfigOnload(); |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | // ä¸ä¸æ¥è¦è¿è¡çæä½éæ©å¹¶ä¿åæéæ©å¹¶ä¿®æ¹ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div v-if="display"> |
| | | <!-- 第äºå±å¯¹è¯æ¡,èªå®ä¹åç
§é
ç½®Formç»ä»¶ --> |
| | | <refer-config-form-dialog |
| | | ref="referConfigFormDialog" |
| | | @echoReferConfig="echoReferConfig"> |
| | | </refer-config-form-dialog> |
| | | <!-- 第äºå±å¯¹è¯æ¡,ç´æ¥éæ©åç
§é
ç½®crudç»ä»¶ --> |
| | | <refer-config-crud-dialog |
| | | ref="referConfigCrudDialog" |
| | | @openReconfigInterFace="openReconfigInterFace" |
| | | @echoReferConfig="echoReferConfig"> |
| | | </refer-config-crud-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import referConfigFormDialog from "./referConfigFormDialog.vue"; |
| | | import referConfigCrudDialog from "./referConfigCrudDialog.vue"; |
| | | import func from "@/util/func"; |
| | | export default { |
| | | name: "referConfigDialog", |
| | | props: ["referConfigOption","display"], |
| | | components: {referConfigFormDialog, referConfigCrudDialog}, |
| | | data() { |
| | | return { |
| | | |
| | | }; |
| | | }, |
| | | watch:{ |
| | | referConfigOption (){ |
| | | if(func.notEmpty(this.referConfigOption.referConfig) || func.notEmpty(this.referConfigOption.referBtmId)){ |
| | | this.openReconfigInterFace(this.referConfigOption); |
| | | }else{ |
| | | this.openTipsChooseOrCust(); |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | echoReferConfig(value) { |
| | | this.emitData = value; |
| | | }, |
| | | // å½åå·²åå¨ç¼è¾è¿çåç
§é
ç½®ï¼æä»¥ç´æ¥æå¼åç
§é
ç½®çé¢ |
| | | openReconfigInterFace(preReferConfigForm){ |
| | | const form = preReferConfigForm; |
| | | let data = { |
| | | referTypeName: form.referBtmName, |
| | | referType: form.referBtmId, |
| | | } |
| | | if(this.referConfigOption.referConfig){ |
| | | // ç¼è¾ç 段æ¶referConfigå¯è½ä¼å¨ä¸ºãåç
§å¼ç¨çä¸å¡ç±»åãéåå¼ä¹åæ¹å |
| | | let referConfigValue =JSON.parse(form.referConfig); |
| | | if(referConfigValue.referType != form.referBtmId){ |
| | | referConfigValue.referType = form.referBtmId || ''; |
| | | referConfigValue.referTypeName = form.referBtmName || form.referBtmId; |
| | | this.referConfigOption.referConfig = JSON.stringify(referConfigValue); |
| | | } |
| | | this.$set(data,"referConfig",this.referConfigOption.referConfig) |
| | | } |
| | | // 馿¬¡ç¹å»æ¥éæªå®ä¹ |
| | | this.$nextTick(()=>{ |
| | | this.$refs.referConfigFormDialog.isShowReferConfigForm = true; |
| | | this.$refs.referConfigFormDialog.initPageData(data); |
| | | }) |
| | | }, |
| | | // æå¼èªå®ä¹åç
§é
ç½®æç´æ¥éæ©åç
§é
ç½®çæç¤ºæ¡ |
| | | openTipsChooseOrCust(){ |
| | | this.$confirm('è¯·éæ©åç
§é
ç½®çå®ä¹æ¹å¼ï¼','åç
§é
ç½®çæ¹å¼', { |
| | | distinguishCancelAndClose: true, |
| | | closeOnClickModal: false, |
| | | confirmButtonText: 'èªå®ä¹åç
§é
ç½®', |
| | | cancelButtonText: 'ç´æ¥éæ©åç
§é
ç½®' |
| | | }) |
| | | .then(() => { |
| | | // æå¼èªå®åç
§é
ç½®å¯¹è¯æ¡ |
| | | this.$refs.referConfigFormDialog.isShowReferConfigForm = true; |
| | | }) |
| | | .catch(action => { |
| | | if (action === "cancel") { |
| | | // æå¼ç´æ¥éæ©åç
§é
ç½®å¯¹è¯æ¡ |
| | | this.$refs.referConfigCrudDialog.isShowReferConfigCrud = true; |
| | | |
| | | } |
| | | }); |
| | | }, |
| | | /* å¼ç¨ç 段åç
§é
ç½®,åç»ä»¶å¡«å®åç
§é
ç½®ä¹åå
容忾æ¶è°ç¨ */ |
| | | echoReferConfig(content){ |
| | | this.$emit('setReferConfigValue', content) // 触åupdate:dataå°åç»ä»¶å¼ä¼ éç»ç¶ç»ä»¶ |
| | | }, |
| | | |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | </style> |
| | |
| | | :visible.sync="isShowReferConfigForm" |
| | | width="90%" |
| | | id="refer-config-form" |
| | | destroy-on-close |
| | | @close="recoveryDataAndForm('initData')" |
| | | style="height: 115vh; margin-top: -14vh; overflow-y: hidden"> |
| | | <div style="width: 100%; overflow-y: auto; height: 70vh"> |
| | |
| | | <script> |
| | | import func from "@/util/func"; |
| | | export default { |
| | | name: "referConfigDialog", |
| | | name: "referConfigFormDialog", |
| | | props: { |
| | | |
| | | }, |
| | | data() { |
| | | let element = ''; |
| | |
| | | labelWidth: '150', // æ é¢å®½åº¦ |
| | | isShowReferConfigForm: false, // 第ä¸å±å¯¹è¯æ¡æ¾ç¤ºéèæ§å¶ |
| | | referTypeIsReadOnly: false, |
| | | |
| | | // 表å对象 |
| | | form: { |
| | | referTypeName: '', //æ¾ç¤ºçå¼ |
| | |
| | | },{ |
| | | value: "_notlike", label: "ä¸å
å«", |
| | | }, { |
| | | value: 'equal', label: 'çäº' |
| | | value: '_equal', label: 'çäº' |
| | | }, { |
| | | value: '_notequal', label: 'ä¸çäº' |
| | | }, { |
| | |
| | | this.element = document.getElementById('refer-config-form'); |
| | | this.element.addEventListener("click", (e) => { |
| | | //<table cellspacing="0" cellpadding="0" border="0" class="el-table__body" style="width: 911px;"> |
| | | //console.log(e.target); |
| | | // console.log(this.$refs.crudAttr); |
| | | // console.log(this.$refs.crudAttr.$el.contains(e.target)); |
| | | //console.log(!this.$refs.crudAttr.$el.contains(e.target) && this.preClickAttrRow != null); |
| | | if (!this.$refs.crudAttr.$el.contains(e.target) && |
| | | this.preClickAttrRow != '') { |
| | | this.preClickAttrRow.$cellEdit = false; |
| | |
| | | // è´¼åï¼åæ¢ç±»åæ¶è¡¨æ ¼ï¼éèåæ¾ç¤ºå°±ä¼åºç°è¡¨æ ¼éä½é®é¢ï¼ |
| | | 'form.type'(value) { |
| | | this.onloadAttrData(); |
| | | }, |
| | | // çå¬ç¶ç»ä»¶ä¼ ççªå£æ¾ç¤ºéèçå¼ |
| | | isShowReferConfigForm (){ |
| | | if(this.isShowReferConfigForm){ |
| | | this.onloadAttrData(); |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | // åå»è¡¨æ ¼å®ç°è¡¨æ ¼è¡ç¼è¾ |
| | | clickAttrEdit(row, column, event){ |
| | | if(this.preClickAttrRow && this.preClickAttrRow != row){ |
| | | //console.log(this.codeShowFieldConfigVOS[this.preClickAttrRow.$index]); |
| | | this.codeShowFieldConfigVOS[this.preClickAttrRow.$index].$cellEdit = false; |
| | | } |
| | | row.$cellEdit = true; |
| | | this.preClickAttrRow = row; |
| | | }, |
| | | // 屿§è¡¨æ ¼è¡ç¼è¾å¤±å»ç¦ç¹æ¶ä¿åæ¹æ³ |
| | | // updateAttrBlur(value){ |
| | | //console.log(this.codeShowFieldConfigVOS[0]); |
| | | |
| | | // }, |
| | | |
| | | // åå»è¡¨æ ¼å®ç°è¡¨æ ¼è¡ç¼è¾ |
| | | clickAddSearchCondtionEdit(row, column, event){ |
| | | if(this.preClickAddSearchConditionRow && this.preClickAddSearchConditionRow != row){ |
| | | //console.log(this.codeShowFieldConfigVOS[this.preClickAttrRow.$index]); |
| | | this.form.codeSrchCondConfigVOS[this.preClickAddSearchConditionRow.$index].$cellEdit = false; |
| | | } |
| | | row.$cellEdit = true; |
| | | this.preClickAddSearchConditionRow = row; |
| | | }, |
| | | //ä¸ä¸ä¸ªé¡µé¢å·²ç»éä¸åç
§åºç¨çä¸å¡ç±»åçæ
åµï¼åä¸ä¸æ¬¡å·²ç»é
ç½®è¿åç
§é
ç½®çæ
åµä¸è¿è¡é¡µé¢åå§å渲æ |
| | | initPageData(val){ |
| | | //console.log(val); |
| | | if(func.notEmpty(val.referConfig)){ |
| | | this.form = JSON.parse(val.referConfig); |
| | | // console.log(this.form); |
| | | this.form.isPersistence = this.form.isPersistence == 'true' ? true:false; |
| | | // åç
§å¼ç¨çä¸å¡ç±»åä¸å¯é |
| | | this.referTypeIsReadOnly = true; |
| | | if((this.form.type == 'default' || this.form.type == 'grid') && (this.form.codeShowFieldConfigVOS != undefined && this.form.codeShowFieldConfigVOS.length > 0)){ |
| | | this.codeShowFieldConfigVOS = this.form.codeShowFieldConfigVOS; |
| | | } |
| | | return; |
| | | }else { |
| | | this.onloadAttrData() |
| | | } |
| | | if(func.notEmpty(val.referType)){ |
| | | this.form.referTypeName = val.referTypeName; |
| | | this.form.referType = val.referType; |
| | | this.referTypeIsReadOnly = true; |
| | | return; |
| | | } |
| | | //console.log(localStorage.getItem("userId")); |
| | | }, |
| | | // éæ©å®åç
§é
ç½®ä¹åç¹å»ä¿åæé®è§¦å |
| | | async selectedListReferConfig(){ |
| | | // æ è®°ææè¡¨åæ¯å¦éè¿æ ¡éªçåé |
| | |
| | | this.isShowReferConfigForm = false; |
| | | } |
| | | }, |
| | | // åå»è¡¨æ ¼å®ç°è¡¨æ ¼è¡ç¼è¾ |
| | | clickAttrEdit(row, column, event){ |
| | | if(this.preClickAttrRow && this.preClickAttrRow != row){ |
| | | //console.log(this.codeShowFieldConfigVOS[this.preClickAttrRow.$index]); |
| | | this.codeShowFieldConfigVOS[this.preClickAttrRow.$index].$cellEdit = false; |
| | | } |
| | | row.$cellEdit = true; |
| | | this.preClickAttrRow = row; |
| | | }, |
| | | // 屿§è¡¨æ ¼è¡ç¼è¾å¤±å»ç¦ç¹æ¶ä¿åæ¹æ³ |
| | | // updateAttrBlur(value){ |
| | | //console.log(this.codeShowFieldConfigVOS[0]); |
| | | |
| | | // }, |
| | | |
| | | // åå»è¡¨æ ¼å®ç°è¡¨æ ¼è¡ç¼è¾ |
| | | clickAddSearchCondtionEdit(row, column, event){ |
| | | if(this.preClickAddSearchConditionRow && this.preClickAddSearchConditionRow != row){ |
| | | //console.log(this.codeShowFieldConfigVOS[this.preClickAttrRow.$index]); |
| | | this.form.codeSrchCondConfigVOS[this.preClickAddSearchConditionRow.$index].$cellEdit = false; |
| | | } |
| | | row.$cellEdit = true; |
| | | this.preClickAddSearchConditionRow = row; |
| | | }, |
| | | //ä¸ä¸ä¸ªé¡µé¢å·²ç»éä¸åç
§åºç¨çä¸å¡ç±»åçæ
åµï¼åä¸ä¸æ¬¡å·²ç»é
ç½®è¿åç
§é
ç½®çæ
åµä¸è¿è¡é¡µé¢åå§å渲æ |
| | | initPageData(val){ |
| | | // console.log(val.referConfig); |
| | | if(func.notEmpty(val.referConfig)){ |
| | | this.form = JSON.parse(val.referConfig); |
| | | // åç
§å¼ç¨çä¸å¡ç±»åä¸å¯é |
| | | // this.referTypeIsReadOnly = true; |
| | | if((this.form.type == 'default' || this.form.type == 'grid') && (this.form.codeShowFieldConfigVOS != undefined && this.form.codeShowFieldConfigVOS.length > 0)){ |
| | | this.codeShowFieldConfigVOS = this.form.codeShowFieldConfigVOS; |
| | | } |
| | | return; |
| | | }else { |
| | | this.onloadAttrData() |
| | | } |
| | | if(func.notEmpty(val.referType)){ |
| | | this.form.referTypeName = val.referTypeName; |
| | | this.form.referType = val.referType; |
| | | this.referTypeIsReadOnly = true; |
| | | return; |
| | | } |
| | | //console.log(localStorage.getItem("userId")); |
| | | }, |
| | | /** å
¶å®éå屿§è¡¨æ ¼çé»è®¤æ°æ®ä¸éè¦å è½½ï¼ |
| | | 使¯å¼¹çªæå¼ä¼æè¡¨æ ¼éè¡é®é¢æä»¥éè¦å¨è¿è°ç¨doLayoutæ¹æ³*/ |
| | | onloadAttrData(){ |
| | |
| | | $cellEdit: false |
| | | } |
| | | ]; |
| | | this.$nextTick(() => { |
| | | this.$refs.crudAttr.doLayout() |
| | | }) |
| | | // this.$nextTick(() => { |
| | | // this.$refs.crudAttr.doLayout() |
| | | // }) |
| | | }, |
| | | // 屿§éæ©è¡¨æ ¼ä¸çç§»é¤æé®åè½ |
| | | removeCurrentRow(row,condition){ |
| | |
| | | this.form.codeSrchCondConfigVOS.push( |
| | | { |
| | | filterField: item.id, |
| | | filterType: 'equal', |
| | | filterType: '_equal', |
| | | filterTypeText: item.name, |
| | | filterValue: '', |
| | | $cellEdit: false |
| | |
| | | import TemplatePro from "@/components/Tree/TemplatePro" |
| | | import attrCrud from "@/components/Tree/attrCrud" |
| | | 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 referConfigDialog from "@/components/code-dialog-page/referConfigDialog" |
| | | import referBtmTypeCrudDialog from "@/components/code-dialog-page/referBtmTypeCrudDialog" |
| | | import referSelectBtmAttrDialog from "@/components/code-dialog-page/referSelectBtmAttrDialog" |
| | | import advancedQuery from "@/components/advanced-query/advancedQuery" |
| | |
| | | Vue.component('classifyTreeform',classifyTreeform) |
| | | Vue.component('TemplatePro',TemplatePro) |
| | | Vue.component('formulaEditor',formulaEditor) |
| | | Vue.component('referConfigCrudDialog',referConfigCrudDialog) |
| | | Vue.component('referConfigFormDialog',referConfigFormDialog) |
| | | Vue.component('referConfigDialog',referConfigDialog) |
| | | Vue.component('advancedQuery',advancedQuery) |
| | | Vue.component('businessAdd',businessAdd) |
| | | Vue.component('attrCrud',attrCrud) |
| | |
| | | <formula-editor |
| | | ref="formulaEditor" |
| | | @updateFormulaContent="updateFormulaContent" |
| | | :thisSceneTableData="formulaEditorParams.thisSceneTableData" |
| | | :visible.sync="formulaEditorParams.formulaEditorSettingBox" |
| | | :thisSceneTableData="formulaEditorParams.thisSceneTableData" |
| | | :systemVariableTableData="formulaEditorParams.systemVariableTableData"> |
| | | </formula-editor> |
| | | |
| | |
| | | @echoReferBtmType="echoReferBtmType"> |
| | | </refer-btm-type-crud-dialog> |
| | | |
| | | <!-- 第äºå±å¯¹è¯æ¡,èªå®ä¹åç
§é
ç½®Formç»ä»¶ --> |
| | | <refer-config-form-dialog |
| | | ref="referConfigFormDialog" |
| | | @echoReferConfig="echoReferConfig"> |
| | | </refer-config-form-dialog> |
| | | |
| | | <!-- 第äºå±å¯¹è¯æ¡,ç´æ¥éæ©åç
§é
ç½®crudç»ä»¶ --> |
| | | <refer-config-crud-dialog |
| | | ref="referConfigCrudDialog" |
| | | @openReconfigInterFace="openReconfigInterFace" |
| | | @echoReferConfig="echoReferConfig"> |
| | | </refer-config-crud-dialog> |
| | | <!-- 第äºå±å¯¹è¯æ¡,åç
§é
ç½®ç»ä»¶ --> |
| | | <refer-config-dialog |
| | | :display="referConfigVisble" |
| | | @setReferConfigValue="setReferConfigValue" |
| | | :referConfigOption="referConfigOption"> |
| | | </refer-config-dialog> |
| | | |
| | | </el-dialog> |
| | | |
| | |
| | | import parentClassifyParentOption from "@/const/code/parentClassifyParentOptionDialog"; |
| | | import fixedValueOption from "@/const/code/fixedValueMgrDialog"; |
| | | import {mapGetters} from "vuex"; |
| | | import func from "@/util/func"; |
| | | import {getByRoleUserList} from "@/api/system/user"; |
| | | |
| | | export default { |
| | |
| | | }, |
| | | classisyValueTreeOption: classisyValueTreeOption, //åç±»ç æ®µæ ç¸å
³é
置项 |
| | | classifyValueTreeData: [], |
| | | //currentSelectClsValueTreeData: '', //å½åéä¸çåç±»ç 弿 èç¹ |
| | | |
| | | /* ä¸ºå±æ§éåå¼çªå£æ¾ç¤ºæå¼æ§å¶åé */ |
| | | isShowSelectAttrOption: false, |
| | |
| | | //conditionMapParams: {}, |
| | | }, |
| | | |
| | | //å¼ç¨ç 段ä¸åç
§é
ç½®ç»ä»¶ç¸å
³åæ° |
| | | referConfigOption: {}, |
| | | referConfigVisble: false, |
| | | |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | }, |
| | | mounted(){ |
| | | this.loadTotalEnum(); |
| | | }, |
| | | // è§£å³è¡¨æ ¼éè¡é®é¢ |
| | | activated () { |
| | | this.$nextTick(() => { |
| | | this.$refs.crud.doLayout(); |
| | | this.$refs.crudBasic.doLayout(); |
| | | }) |
| | | }, |
| | | methods: { |
| | | |
| | |
| | | this.form.getValueClass = content; |
| | | }, |
| | | /* å¼ç¨ç 段åç
§é
ç½®,åç»ä»¶å¡«å®åç
§é
ç½®ä¹åå
容忾æ¶è°ç¨ */ |
| | | echoReferConfig(content){ |
| | | setReferConfigValue(content){ |
| | | // console.log(content.referTypeName); |
| | | this.form.referBtmId = content.referType || ''; |
| | | this.form.referBtmName = content.referTypeName || content.referType; |
| | |
| | | // æä½åºç¡ç æ®µä¸æç´¢æ¸
空çæé®çæ¾ç¤º/éè |
| | | hideBasicTable(hideBoolean){ |
| | | this.$refs.crudBasic.option.refreshBtn = hideBoolean; |
| | | this.$refs.crudBasic.option.columnBtn = hideBoolean; |
| | | this.$refs.crudBasic.option.column[0].search = hideBoolean; |
| | | this.$refs.crudBasic.option.column[1].search = hideBoolean; |
| | | if(!hideBoolean){ |
| | |
| | | // è°ç¨åç»ä»¶å·æ°è¡¨æ ¼æ°æ® |
| | | 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.referConfigVisble = true; |
| | | this.referConfigOption = { |
| | | referBtmName: this.form.referBtmName, |
| | | referBtmId: this.form.referBtmId, |
| | | referConfig: this.form.referConfig || '', |
| | | } |
| | | } |
| | | }, |
| | | |
| | | // å½åå·²åå¨ç¼è¾è¿çåç
§é
ç½®ï¼æä»¥ç´æ¥æå¼åç
§é
ç½®çé¢ |
| | | openReconfigInterFace(preReferConfigForm){ |
| | | const form = preReferConfigForm; |
| | | // ç¼è¾ç 段æ¶referConfigå¯è½ä¼å¨ä¸ºãåç
§å¼ç¨çä¸å¡ç±»åãéåå¼ä¹åæ¹å |
| | | let referConfigValue =JSON.parse(form.referConfig); |
| | | if(referConfigValue.referType != form.referBtmId){ |
| | | referConfigValue.referType = form.referBtmId || ''; |
| | | referConfigValue.referTypeName = form.referBtmName || form.referBtmId; |
| | | this.form.referConfig = JSON.stringify(referConfigValue); |
| | | } |
| | | let data = { |
| | | referTypeName: form.referBtmName, |
| | | referType: form.referBtmId, |
| | | referConfig: this.form.referConfig, |
| | | } |
| | | this.$refs.referConfigFormDialog.isShowReferConfigForm = true; |
| | | this.$refs.referConfigFormDialog.initPageData(data); |
| | | }, |
| | | // æå¼èªå®ä¹åç
§é
ç½®æç´æ¥éæ©åç
§é
ç½®çæç¤ºæ¡ |
| | | openTipsChooseOrCust(){ |
| | | this.$confirm('è¯·éæ©åç
§é
ç½®çå®ä¹æ¹å¼ï¼','åç
§é
ç½®çæ¹å¼', { |
| | | distinguishCancelAndClose: true, |
| | | closeOnClickModal: false, |
| | | confirmButtonText: 'èªå®ä¹åç
§é
ç½®', |
| | | cancelButtonText: 'ç´æ¥éæ©åç
§é
ç½®' |
| | | }) |
| | | .then(() => { |
| | | // æå¼èªå®åç
§é
ç½®å¯¹è¯æ¡ |
| | | this.$refs.referConfigFormDialog.isShowReferConfigForm = true; |
| | | // è¡¨æ ¼éè¡çé®é¢ |
| | | this.$refs.referConfigFormDialog.onloadAttrData(); |
| | | }) |
| | | .catch(action => { |
| | | if (action === "cancel") { |
| | | // æå¼ç´æ¥éæ©åç
§é
ç½®å¯¹è¯æ¡ |
| | | this.$refs.referConfigCrudDialog.isShowReferConfigCrud = true; |
| | | this.$refs.referConfigCrudDialog.referConfigOnload(); |
| | | } |
| | | //console.log(action); |
| | | }); |
| | | // 让åç
§é
ç½®è¾å
¥æ¡å¤±å»ç¦ç¹ï¼å¦å该æç¤ºæ¡æ æ³è¢«å
³é |
| | | this.$refs.referConfig.$el.querySelector('input').blur(); |
| | | } |
| | | }, |
| | | |
| | | // ç¹å»è¾å
¥æ¡çÃå·ï¼æ¸
空è¾å
¥æ¡ä¸çå
容 |
| | |
| | | |
| | | /** |
| | | * 使ç¨è§åç主é®è·å对åºçç æ®µå
容 |
| | | * @param conditionMap è§åçå
容 |
| | | * @param ruleOid è§åçå
容 |
| | | * @return ç æ®µçå
容 |
| | | */ |
| | | List<CodeBasicSecVO> listCodeBasicSecByRuleOid(Map<String,Object> conditionMap); |
| | | List<CodeBasicSecVO> listCodeBasicSecByRuleOid(String ruleOid); |
| | | |
| | | /** |
| | | * æ¹éæ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | |
| | | |
| | | import com.alibaba.cloud.commons.lang.StringUtils; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | |
| | | /** |
| | | * 使ç¨è§åç主é®è·å对åºçç æ®µå
容 |
| | | * |
| | | * @param conditionMap è§åçå
容 |
| | | * @param ruleOid è§åçå
容 |
| | | * @return ç æ®µçå
容 |
| | | */ |
| | | @Override |
| | | public List<CodeBasicSecVO> listCodeBasicSecByRuleOid(Map<String,Object> conditionMap)throws ServiceException { |
| | | if(Func.isBlank(conditionMap.getOrDefault("pkCodeRule","").toString())){ |
| | | public List<CodeBasicSecVO> listCodeBasicSecByRuleOid(String ruleOid)throws ServiceException { |
| | | if(StringUtils.isBlank(ruleOid)){ |
| | | return new ArrayList<>(); |
| | | } |
| | | QueryWrapper<CodeBasicSec> wrapper = UBCSCondition.getQueryWrapper(conditionMap, CodeBasicSec.class); |
| | | wrapper.orderByAsc("orderNum"); |
| | | List<CodeBasicSec> secDOList = baseMapper.selectList(wrapper);//.selectByCondition(conditionMap, pageHelper); |
| | | LambdaQueryWrapper<CodeBasicSec> wrapper = Wrappers.<CodeBasicSec>query().lambda() |
| | | .eq(CodeBasicSec::getPkCodeRule, ruleOid) |
| | | .orderByAsc(CodeBasicSec::getOrderNum); |
| | | List<CodeBasicSec> secDOList = baseMapper.selectList(wrapper);// |
| | | return codeBasicSecDO2VOs(secDOList,true); |
| | | } |
| | | |
| | |
| | | package com.vci.ubcs.code.service.impl; |
| | | |
| | | import com.alibaba.cloud.commons.lang.StringUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | |
| | | */ |
| | | @Override |
| | | public R checkLikeCodeRule(String oid) throws VciBaseException { |
| | | CodeRuleVO codeRuleVO = getObjectByOid(oid); |
| | | // 1ãå»ææµæ°´ç 段ï¼è®¡ç®åºå
¶ä»ç 段å¼é¿åº¦ï¼å¨å·²åå¸çè§å䏿¯å¯¹åºé¿åº¦ä¸è´çç¼ç è§å |
| | | HashMap<String, Object> condtionMap = new HashMap<>(); |
| | | condtionMap.put("pkCodeRule_equal",codeRuleVO.getOid()); |
| | | condtionMap.put("secType_notequal", CodeSecTypeEnum.CODE_SERIAL_SEC); |
| | | codeRuleVO.setSecVOList(codeBasicSecService.listCodeBasicSecByRuleOid(condtionMap)); |
| | | // 1ãæ¥è¯¢åºå½åè¦åå¸çè§å |
| | | CodeRuleVO codeRuleVO = getObjectHasSecByOid(oid); |
| | | // 2ãæ¾åºä¸å½ååå¸çè§åç æ®µé¡ºåºä¸è´çè§å |
| | | if(Func.isNotEmpty(codeRuleVO.getSecVOList())){ |
| | | String secType = codeRuleVO.getSecVOList().stream().map(CodeBasicSecVO::getSecType).collect(Collectors.joining(",")); |
| | | |
| | | } |
| | | |
| | | // TODO å¾
å®å |
| | | |
| | | |
| | |
| | | //妿ælcstatusçç±»çè¯ |
| | | vo.setLcStatusText(CodeRuleLC.getTextByValue(vo.getLcStatus())); |
| | | if (hasSec) { |
| | | Map<String, Object> condtionMap = new HashMap<>(); |
| | | condtionMap.put("pkCodeRule",vo.getOid()); |
| | | List<CodeBasicSecVO> codeBasicSecVOS = codeBasicSecService.listCodeBasicSecByRuleOid(condtionMap); |
| | | List<CodeBasicSecVO> codeBasicSecVOS = codeBasicSecService.listCodeBasicSecByRuleOid(vo.getOid()); |
| | | //æ¥è¯¢ç 段 |
| | | vo.setSecVOList(codeBasicSecVOS); |
| | | } |
| | |
| | | CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(codeClassifyOid); |
| | | |
| | | List<UIFormItemVO> itemVOS = new ArrayList<>(); |
| | | Map<String, List<CodeClassifyTemplateAttrVO>> attrGroupMap = templateVO.getAttributes().stream(). |
| | | filter(s -> StringUtils.isNotBlank(s.getAttributeGroup())).collect(Collectors.groupingBy(s -> s.getAttributeGroup())); |
| | | |
| | | Map<String, List<CodeClassifyTemplateAttrVO>> attrGroupMap = new HashMap<>(); |
| | | if (Func.isNotEmpty(templateVO.getAttributes())) { |
| | | attrGroupMap = templateVO.getAttributes().stream(). |
| | | filter(s -> StringUtils.isNotBlank(s.getAttributeGroup())).collect(Collectors.groupingBy(s -> s.getAttributeGroup())); |
| | | templateVO.getAttributes().forEach(attrVO -> { |
| | | UIFormItemVO formItemVO = templateAttr2FormField(attrVO, templateVO.getBtmTypeId()); |
| | | itemVOS.add(formItemVO); |
| | | }); |
| | | } |
| | | //å¤ç屿§åç» |
| | | if (!CollectionUtils.isEmpty(attrGroupMap)) { |
| | | //æç
§åç»ç屿§æåï¼æ¾å°æ¯ä¸ä¸ªåç»ç第ä¸ä¸ªå±æ§ |
| | |
| | | } |
| | | //å
转æ¢ä¸ä¸æ¶é´æ ¼å¼ |
| | | List<String> finalOnlySelectAttrIdList = onlySelectAttrIdList.stream().collect(Collectors.toList()); |
| | | List<CodeClassifyTemplateAttrVO> dateFormatAttrVOs = templateVO.getAttributes().stream().filter( |
| | | List<CodeClassifyTemplateAttrVO> dateFormatAttrVOs = new ArrayList<>(); |
| | | List<CodeClassifyTemplateAttrVO> enumAttrVOs = new ArrayList<>(); |
| | | if (Func.isNotEmpty(templateVO.getAttributes())) { |
| | | dateFormatAttrVOs = templateVO.getAttributes().stream().filter( |
| | | s -> StringUtils.isNotBlank(s.getCodeDateFormat()) && |
| | | (finalOnlySelectAttrIdList.size() == 0 || finalOnlySelectAttrIdList.contains(s.getId().toLowerCase(Locale.ROOT))) |
| | | ).collect(Collectors.toList()); |
| | | //æä¸¾çå
容 |
| | | List<CodeClassifyTemplateAttrVO> enumAttrVOs = templateVO.getAttributes().stream().filter( |
| | | enumAttrVOs = templateVO.getAttributes().stream().filter( |
| | | s -> (StringUtils.isNotBlank(s.getEnumId()) || StringUtils.isNotBlank(s.getEnumString())) |
| | | && |
| | | (finalOnlySelectAttrIdList.size() == 0 || finalOnlySelectAttrIdList.contains(s.getId().toLowerCase(Locale.ROOT))) |
| | | ).collect(Collectors.toList()); |
| | | } |
| | | |
| | | List<String> userIds = new ArrayList<>(); |
| | | List<CodeClassifyTemplateAttrVO> finalDateFormatAttrVOs = dateFormatAttrVOs; |
| | | List<CodeClassifyTemplateAttrVO> finalEnumAttrVOs = enumAttrVOs; |
| | | dataMap.stream().forEach(data -> { |
| | | //å¤çæ¶é´ |
| | | if (!form) { |
| | | //表åçæ¶ååªè½ç¨ç»ä¸çæ¶é´æ ¼å¼ |
| | | wrapperDateFormat(dateFormatAttrVOs, data); |
| | | wrapperDateFormat(finalDateFormatAttrVOs, data); |
| | | } |
| | | //å¤çæä¸¾ |
| | | wrapperEnum(enumAttrVOs, data); |
| | | wrapperEnum(finalEnumAttrVOs, data); |
| | | String lcstatus = data.get(VciQueryWrapperForDO.LC_STATUS_FIELD); |
| | | String copyFromVersion = data.getOrDefault(COPY_FROM_VERSION, ""); |
| | | if ((CodeDefaultLC.EDITING.getValue().equalsIgnoreCase(lcstatus) || CodeDefaultLC.AUDITING.getValue().equalsIgnoreCase(lcstatus)) |
| | |
| | | //å 为åç
§ä¸ä¸å®æ¯å¨å¹³å°ç屿§æ± éé¢è®¾ç½®ï¼æä»¥æä»¬å¾éè¦èªè¡å¤ç |
| | | //åèVciQueryWrapperæ¥å¤ç |
| | | //1. æ¾å°ææçåæ®µï¼ |
| | | Map<String, CodeClassifyTemplateAttrVO> attrVOMap = templateVO.getAttributes().stream().collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t)); |
| | | List<String> selectFieldList = attrVOMap.keySet().stream().collect(Collectors.toList()); |
| | | Map<String, CodeClassifyTemplateAttrVO> attrVOMap = new HashMap<>(); |
| | | List<String> selectFieldList = new ArrayList<>(); |
| | | if(Func.isNotEmpty(templateVO.getAttributes())){ |
| | | attrVOMap = templateVO.getAttributes().stream().collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t)); |
| | | selectFieldList = attrVOMap.keySet().stream().collect(Collectors.toList()); |
| | | } |
| | | |
| | | //ææçåç
§çåæ®µ |
| | | Map<String/**屿§å段**/, String> joinTableList = new ConcurrentHashMap<>(); |
| | | List<CodeClassifyTemplateAttrVO> referAttrVOs = templateVO.getAttributes().stream().filter( |
| | | List<CodeClassifyTemplateAttrVO> referAttrVOs = null; |
| | | if (Func.isNotEmpty(templateVO.getAttributes())) { |
| | | referAttrVOs = templateVO.getAttributes().stream().filter( |
| | | s -> StringUtils.isNotBlank(s.getReferBtmId()) || StringUtils.isNotBlank(s.getReferConfig()) |
| | | ).collect(Collectors.toList()); |
| | | } |
| | | Map<String/**åç
§ç屿§**/, String/**å®é
çåæ®µ**/> referFieldMap = new ConcurrentHashMap<>(); |
| | | if (!CollectionUtils.isEmpty(referAttrVOs)) { |
| | | List<String> finalSelectFieldList = selectFieldList; |
| | | referAttrVOs.parallelStream().forEach(attrVO -> { |
| | | UIFormReferVO referVO = null; |
| | | if (StringUtils.isNotBlank(attrVO.getReferConfig())) { |
| | |
| | | showFieldInSource = textFields.get(0); |
| | | } |
| | | referFieldMap.put(attrVO.getId(), referTableNick + "." + showFieldInSource); |
| | | selectFieldList.add(referTableNick + "." + showFieldInSource + " as " + referShowField); |
| | | finalSelectFieldList.add(referTableNick + "." + showFieldInSource + " as " + referShowField); |
| | | }); |
| | | } |
| | | R<BtmTypeVO> allAttributeByBtmId = btmTypeClient.getDefaultAttrByBtmId(btmType); |
| | |
| | | } |
| | | }); |
| | | |
| | | Map<String, CodeClassifyTemplateAttrVO> finalAttrVOMap = attrVOMap; |
| | | andCondtionMap.forEach((k, v) -> { |
| | | andSql.add(getConditionSql(k.toLowerCase(), v, referFieldMap, attrVOMap, btmType)); |
| | | andSql.add(getConditionSql(k.toLowerCase(), v, referFieldMap, finalAttrVOMap, btmType)); |
| | | }); |
| | | orConditionMap.forEach((k, v) -> { |
| | | orSql.add(getConditionSql(k.toLowerCase(), v, referFieldMap, attrVOMap, btmType)); |
| | | orSql.add(getConditionSql(k.toLowerCase(), v, referFieldMap, finalAttrVOMap, btmType)); |
| | | }); |
| | | } |
| | | //ç»åèµ·æ¥ |
| | |
| | | List<UITableFieldVO> fieldVOList = new ArrayList<>(); |
| | | Map<String, String> comboxOrReferFieldMap = new HashMap<>(); |
| | | |
| | | if (Func.isNotEmpty(templateVO.getAttributes())) { |
| | | templateVO.getAttributes().forEach(attrVO -> { |
| | | UITableFieldVO tableFieldVO = templateAttr2TableField(attrVO, forEdit); |
| | | if ("combox".equalsIgnoreCase(tableFieldVO.getFieldType())) { |
| | |
| | | } |
| | | fieldVOList.add(tableFieldVO); |
| | | }); |
| | | } |
| | | List<List<UITableFieldVO>> cols = new ArrayList<>(); |
| | | cols.add(fieldVOList); |
| | | tableDefineVO.setCols(cols); |
| | | Map<String, UITableFieldVO> fieldVOMap = fieldVOList.stream().collect(Collectors.toMap(s -> s.getField().toLowerCase(Locale.ROOT), t -> t)); |
| | | List<CodeClassifyTemplateAttrVO> seniorQueryAttrVOs = null; |
| | | if (Func.isNotEmpty(templateVO.getAttributes())) { |
| | | //æ¥è¯¢å±æ§ |
| | | List<CodeClassifyTemplateAttrVO> queryAttrVOs = templateVO.getAttributes().stream().filter(s -> BooleanEnum.TRUE.getValue().equalsIgnoreCase(s.getQueryAttrFlag())).collect(Collectors.toList()); |
| | | if (!CollectionUtils.isEmpty(queryAttrVOs)) { |
| | |
| | | tableDefineVO.setQueryColumns(queryFieldVOs); |
| | | } |
| | | //é«çº§å±æ§ |
| | | List<CodeClassifyTemplateAttrVO> seniorQueryAttrVOs = templateVO.getAttributes().stream().filter(s -> BooleanEnum.TRUE.getValue().equalsIgnoreCase(s.getSeniorQueryAttrFlag())).collect(Collectors.toList()); |
| | | seniorQueryAttrVOs = templateVO.getAttributes().stream().filter(s -> BooleanEnum.TRUE.getValue().equalsIgnoreCase(s.getSeniorQueryAttrFlag())).collect(Collectors.toList()); |
| | | } |
| | | if (!CollectionUtils.isEmpty(seniorQueryAttrVOs)) { |
| | | List<UITableFieldVO> queryFieldVOs = new ArrayList<>(); |
| | | seniorQueryAttrVOs.stream().forEach(attrVO -> { |