| | |
| | | <template> |
| | | <!-- 第二层对话框,属性码段,公式编辑框弹窗 --> |
| | | <el-dialog |
| | | :close-on-click-modal="false" |
| | | title="参照配置" |
| | | append-to-body |
| | | :visible.sync="isShowReferConfigForm" |
| | | width="90%" |
| | | id="refer-config-form" |
| | | top="0" |
| | | class= "avue-dialog avue-dialog--top" |
| | | destroy-on-close |
| | | @close="recoveryDataAndForm('initData')" |
| | | style="height: 115vh; margin-top: -14vh; overflow-y: hidden"> |
| | |
| | | <el-input :disabled="disabled" |
| | | :size="size" |
| | | v-model="form.referTypeName" |
| | | ref="referTypeName" |
| | | ref="referTypeName" |
| | | placeholder="请选择 参照的业务类型" |
| | | prefix-icon="el-icon-search" |
| | | readonly="true" |
| | |
| | | <el-input :disabled="disabled" |
| | | :size="size" |
| | | v-model="form.sortField" |
| | | ref="sortField" |
| | | ref="sortField" |
| | | placeholder="请选择 排序字段" |
| | | prefix-icon="el-icon-search" |
| | | readonly="true" |
| | |
| | | <el-input :disabled="disabled" |
| | | :size="size" |
| | | v-model="form.sortField" |
| | | ref="sortField" |
| | | ref="sortField" |
| | | placeholder="请选择 排序字段" |
| | | prefix-icon="el-icon-search" |
| | | readonly="true" |
| | |
| | | <span slot="label"><i class="el-icon-search"></i>添加查询条件</span> |
| | | <avue-crud |
| | | ref="crudAddCondition" |
| | | :option="addSearchCondtionOption" |
| | | :option="addSearchCondtionOption" |
| | | @cell-click="clickAddSearchCondtionEdit" |
| | | :data="form.codeSrchCondConfigVOS"> |
| | | <!-- 表格内操作按钮 --> |
| | |
| | | </el-dialog> |
| | | |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import func from "@/util/func"; |
| | | export default { |
| | | name: "referConfigFormDialog", |
| | | props: { |
| | | |
| | | |
| | | }, |
| | | data() { |
| | | let element = ''; |
| | |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | indexFixed: false, |
| | | menuFixed: false, |
| | | menuFixed: false, |
| | | column: [ |
| | | { |
| | | label: "列字段(*)", |
| | |
| | | emptyBtn: false, |
| | | labelWidth: '145', //默认标签宽度 |
| | | group: [ |
| | | { |
| | | { |
| | | // 基础表单信息展示区域 |
| | | //display: this.form.type=='default'||this.form.type=='grid', |
| | | icon: 'el-icon-info', |
| | |
| | | change: ({ value, column }) => { |
| | | // console.log("start",value); |
| | | // 复原表单,因为其他分组中如果存在值,在切换时,会保留输入的字段值所以需要还原 |
| | | let addFrom = {}; |
| | | let addFrom = {}; |
| | | this.activeName = 'first'; // 默认切换至第一个tab |
| | | //根据类型对form表单属性进行调整 |
| | | if(value == 'stand'){ |
| | |
| | | span: 6, |
| | | type: 'switch', |
| | | },{ |
| | | display: this.form.isPersistence | this.form.isPersistence=='true', |
| | | display: this.form.isPersistence || this.form.isPersistence=='true', |
| | | label: '参照配置编号', |
| | | prop: 'id', |
| | | tip: '设置该参照配置持久化存储时的编号。', |
| | |
| | | }], |
| | | span: 6, |
| | | },{ |
| | | display: this.form.isPersistence | this.form.isPersistence=='true', |
| | | display: this.form.isPersistence || this.form.isPersistence=='true', |
| | | label: '参照配置名称', |
| | | prop: 'name', |
| | | tip: '设置该参照配置持久化存储时的名称。', |
| | |
| | | }], |
| | | span: 6, |
| | | } |
| | | |
| | | |
| | | ] |
| | | }, |
| | | { |
| | | { |
| | | icon: 'el-icon-info', |
| | | label: '页面参数配置', |
| | | collapse: false, |
| | |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | { |
| | | icon: 'el-icon-info', |
| | | label: '后台参数配置', |
| | | collapse: false, |
| | |
| | | { |
| | | label: '自定义的后台路径', |
| | | prop: 'url', |
| | | tip: '通常为空;如果是列表,后台必须返回DataGrid,如果是树,后台必须返回List<Tree>', |
| | | tip: '通常为空;如果是列表,后台必须返回DataGrid,如果是树,后台必须返回List<Theme>', |
| | | tipPlacement: 'right', |
| | | span: 7, |
| | | },{ |
| | |
| | | emptyBtn: false, |
| | | labelWidth: '145', //默认标签宽度 |
| | | group: [ |
| | | { |
| | | { |
| | | display: this.form.type=='default'||this.form.type=='grid', |
| | | icon: 'el-icon-info', |
| | | label: this.form.type=='default' ? '默认参照的配置(下方列表)':'列表参照的配置(下方列表)', |
| | |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | { |
| | | display: this.form.type=='stand', |
| | | icon: 'el-icon-info', |
| | | label: 'stand(平台配置)参照', |
| | |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | { |
| | | display: this.form.type=='tree', |
| | | icon: 'el-icon-info', |
| | | 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;"> |
| | | if (!this.$refs.crudAttr.$el.contains(e.target) && |
| | | if (!this.$refs.crudAttr.$el.contains(e.target) && |
| | | this.preClickAttrRow != '') { |
| | | this.preClickAttrRow.$cellEdit = false; |
| | | } |
| | | if (!this.$refs.crudAddCondition.$el.contains(e.target) && |
| | | if (!this.$refs.crudAddCondition.$el.contains(e.target) && |
| | | this.preClickAddSearchConditionRow != '') { |
| | | this.preClickAddSearchConditionRow.$cellEdit = false; |
| | | } |
| | |
| | | }, |
| | | // 监听父组件传的窗口显示隐藏的值 |
| | | isShowReferConfigForm (){ |
| | | if(this.isShowReferConfigForm){ |
| | | if(this.isShowReferConfigForm && this.codeShowFieldConfigVOS.length <= 0){ |
| | | this.onloadAttrData(); |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | |
| | | // 选择完参照配置之后点击保存按钮触发 |
| | | async selectedListReferConfig(){ |
| | | // 标记所有表单是否通过校验的变量 |
| | |
| | | } |
| | | isValid = false; |
| | | //console.log(valid); |
| | | } |
| | | } |
| | | done(); |
| | | }) |
| | | }) |
| | |
| | | // 属性表格行编辑失去焦点时保存方法 |
| | | // updateAttrBlur(value){ |
| | | //console.log(this.codeShowFieldConfigVOS[0]); |
| | | |
| | | |
| | | // }, |
| | | |
| | | // 单击表格实现表格行编辑 |
| | |
| | | // console.log(val.referConfig); |
| | | if(func.notEmpty(val.referConfig)){ |
| | | this.form = JSON.parse(val.referConfig); |
| | | this.form.isPersistence = this.form.isPersistence == 'true'||this.form.isPersistence ? true:false; |
| | | // 参照引用的业务类型不可选 |
| | | // this.referTypeIsReadOnly = true; |
| | | if((this.form.type == 'default' || this.form.type == 'grid') && (this.form.codeShowFieldConfigVOS != undefined && this.form.codeShowFieldConfigVOS.length > 0)){ |
| | |
| | | // this.form.displayTable = ''; |
| | | return; |
| | | } |
| | | Object.assign(this.$data,this.$options.data()); |
| | | Object.assign(this.$data,this.$options.data()); |
| | | //this.preClickAttrRow.$cellEdit = false; |
| | | //console.log(this.preClickAttrRow.$cellEdit); |
| | | // 移除绑定在该页面对话框上的全局监听事件 |
| | | if(this.element != ''){ |
| | | let te = window.removeEventListener('click', this.element) |
| | | } |
| | | } |
| | | }, |
| | | // 提交表单之前过滤掉空或不需要的表单数据 |
| | | filterForm(){ |
| | |
| | | 'useFormKey', |
| | | 'paramForFormKey', |
| | | 'isMuti', |
| | | 'mapFields', |
| | | 'codeSrchCondConfigVOS', |
| | | 'mapFields', |
| | | 'codeSrchCondConfigVOS', |
| | | 'isOpenGlobal', //是否开启全局 |
| | | 'isPersistence', |
| | | ]; |
| | |
| | | addArray = ['limit', 'sortField', 'sortType']; |
| | | } else if(oldForm.type == 'tree'){ |
| | | addArray = [ |
| | | "parentFieldName", |
| | | "parentFieldName", |
| | | 'parentUsedField', |
| | | 'parentValue', |
| | | 'parentValue', |
| | | 'loadType', |
| | | 'onlyLeaf', |
| | | 'sortField', |
| | |
| | | ]; |
| | | } |
| | | // 开启持久化参照配置 |
| | | if(oldForm.isPersistence=='true' | oldForm.isPersistence){ |
| | | if(oldForm.isPersistence=='true' || oldForm.isPersistence){ |
| | | submittDefaultForm = submittDefaultForm.concat(['id','name']) |
| | | } |
| | | submittDefaultForm = submittDefaultForm.concat(addArray); |
| | |
| | | // console.log(!this.checkStringIsEmpty(oldForm[item]) || !this.checkArrayIsUndefined(oldForm[item])); |
| | | if((item == 'isMuti' || item == 'onlyLeaf') || (!this.checkStringIsEmpty(oldForm[item]) || !this.checkArrayIsUndefined(oldForm[item]))){ |
| | | //console.log(item,oldForm[item]); |
| | | newForm = Object.assign(newForm,{[item]:oldForm[item]}); |
| | | newForm = Object.assign(newForm,{[item]:oldForm[item]}); |
| | | } |
| | | }); |
| | | //console.log(newForm); |
| | |
| | | this.$refs[this.selectedBtmTypeAttrParams.ref].selectedBtmTypeAttrOnLoad(params); |
| | | this.selectedBtmTypeAttrParams.selectedBtmTypeAttrSettingBox = true; |
| | | }, |
| | | |
| | | |
| | | /** 为【参照引用的业务类型】选取值之后的内容回显时调用 */ |
| | | echoReferBtmType(content){ |
| | | // 实现回显 |
| | |
| | | { |
| | | filterField: item.id, |
| | | filterType: '_equal', |
| | | filterTypeText: item.name, |
| | | filterTypeText: item.name, |
| | | filterValue: '', |
| | | $cellEdit: false |
| | | } |
| | |
| | | } |
| | | }, |
| | | |
| | | |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | -webkit-transition:opacity .0s !important; |
| | | transition:opacity .0s !important; |
| | | } |
| | | |
| | | </style> |
| | | |
| | | </style> |