| | |
| | | @echoSelectedAttr="echoSelectedAttr"> |
| | | </refer-select-btm-attr-dialog> |
| | | |
| | | <el-dialog title="选择显示字段" |
| | | <el-dialog title="选取IN或NOTIN条件" |
| | | append-to-body |
| | | :visible.sync="isShowShowField" |
| | | :visible.sync="isShowInOrNotInCondition" |
| | | width="70%" |
| | | destroy-on-close |
| | | style="height: 110vh; margin-top: -12vh; overflow-y: hidden"> |
| | | <avue-crud :option="selectionShowFieldOption" |
| | | :table-loading="selectShowFieldLoading" |
| | | :data="selectShowFieldData" |
| | | ref="selectShowFieldCrud" |
| | | @row-click="showFieldRowClick" |
| | | @selection-change="selectionShowFieldDataChange" |
| | | @search-change="showFieldSearchChange" |
| | | @search-reset="showFieldSearchReset"> |
| | | <avue-crud :option="selectInOrNotInCondOption" |
| | | :page.sync="inOrNotInPage" |
| | | @current-change="inOrNotInCurrentChange" |
| | | @size-change="inOrNotInSizeChange" |
| | | @selection-change="selectionInOrNotInChange" |
| | | @row-click="rowInOrNotInClick" |
| | | @search-change="selectInOrNotInSearchChange" |
| | | @search-reset="searchInOrNotInReset" |
| | | :data="selectInOrNotInCondData" |
| | | ref="inOrNotInConditionCrud"> |
| | | </avue-crud> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="selectedShowField">确 定</el-button> |
| | | <el-button @click="isShowShowField = false">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="选择查询条件" |
| | | append-to-body |
| | | :visible.sync="isShowSearchCondition" |
| | | width="70%" |
| | | destroy-on-close |
| | | style="height: 110vh; margin-top: -12vh; overflow-y: hidden"> |
| | | <avue-crud :option="selectionSearchConditionOption" |
| | | :table-loading="selectSearchConditionLoading" |
| | | :data="selectSearchConditionData" |
| | | ref="selectSearchConditionCrud" |
| | | @row-click="searchConditionRowClick" |
| | | @selection-change="searchConditionDataChange" |
| | | @search-change="searchConditionSearchChange" |
| | | @search-reset="searchConditionSearchReset"> |
| | | </avue-crud> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="selectedSearchCondition">确 定</el-button> |
| | | <el-button @click="isShowSearchCondition = false">取 消</el-button> |
| | | <!-- <div class="avue-dialog__footer--left valueInfo">{{ valueInfo }}</div> --> |
| | | <el-button type="primary" @click="selectedInOrNotInCond">确 定</el-button> |
| | | <el-button @click="isShowInOrNotInCondition = false">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | |
| | | |
| | | <script> |
| | | import func from "@/util/func"; |
| | | import {getList} from "@/api/refer/table"; |
| | | export default { |
| | | name: "referConfigFormDialog", |
| | | props: { |
| | |
| | | //上一次点击的行编辑数据 |
| | | preClickAttrRow: '', |
| | | preClickAddSearchConditionRow: '', |
| | | |
| | | //点击行弹出in或notin的值 |
| | | isShowInOrNotInCondition: false, |
| | | selectInOrNotInCondData: [], |
| | | selectInOrNotInCondOption: { |
| | | height:'220', |
| | | tip: false, |
| | | addBtn: false, |
| | | editBtn: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | index: true, |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | selection: true, |
| | | disablePage: false, |
| | | refreshBtn: false, |
| | | columnBtn: false, |
| | | menu: false, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | column: [] |
| | | }, |
| | | inOrNotInPage: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | selectionInOrNotInList: [], |
| | | inOrNotInParam: {}, |
| | | |
| | | }; |
| | | }, |
| | |
| | | //console.log(this.codeShowFieldConfigVOS[this.preClickAttrRow.$index]); |
| | | this.form.codeSrchCondConfigVOS[this.preClickAddSearchConditionRow.$index].$cellEdit = false; |
| | | } |
| | | if(row.filterType === '_in' || row.filterType === '_notin'){ |
| | | //console.log(row); |
| | | this.selectInOrNotInCondOption.column = [{ |
| | | prop: row.filterField, |
| | | label: row.filterTypeText, |
| | | search: true, |
| | | searchLabelWidth: 45, |
| | | searchSpan: 8, |
| | | sortable: true, |
| | | }] |
| | | this.initPageData.pageSize = 10; |
| | | this.initPageData.currentPage = 1; |
| | | this.loadInOrNotInConditionData(this.initPageData); |
| | | this.isShowInOrNotInCondition = true; |
| | | } |
| | | row.$cellEdit = true; |
| | | this.preClickAddSearchConditionRow = row; |
| | | }, |
| | | loadInOrNotInConditionData(page, params = {}){ |
| | | let mustParams = { |
| | | referType: this.form.referType, |
| | | referBo: this.form.referType, |
| | | }; |
| | | getList(Object.assign(mustParams,params),page.currentPage,page.pageSize,'/api/ubcs-code/mdmEngineController/defaultReferDataGrid','GET').then(res=>{ |
| | | //console.log(res.data); |
| | | this.selectInOrNotInCondData = res.data.records; |
| | | this.inOrNotInPage.total = res.data.total; |
| | | }); |
| | | }, |
| | | inOrNotInCurrentChange(currentPage) { |
| | | this.inOrNotInPage.currentPage = currentPage; |
| | | }, |
| | | inOrNotInSizeChange(pageSize) { |
| | | this.inOrNotInPage.pageSize = pageSize; |
| | | }, |
| | | rowInOrNotInClick(row){ |
| | | this.$refs.inOrNotInConditionCrud.toggleSelection(); |
| | | this.$refs.inOrNotInConditionCrud.toggleRowSelection(row); //选中当前行 |
| | | }, |
| | | selectionInOrNotInChange(list){ |
| | | if (this.isMuti && list.length > 1) { |
| | | const nowVal = list.shift(); |
| | | this.$refs.inOrNotInConditionCrud.toggleRowSelection(nowVal, false); |
| | | } |
| | | this.selectionInOrNotInList = list |
| | | }, |
| | | selectedInOrNotInCond(){ |
| | | if(this.selectionInOrNotInList && this.selectionInOrNotInList.length > 0){ |
| | | // console.log(this.selectionInOrNotInList) |
| | | this.preClickAddSearchConditionRow.filterValue = this.selectionInOrNotInList.map(item => item[this.selectInOrNotInCondOption.column[0].prop]).join(','); |
| | | this.isShowInOrNotInCondition = false; |
| | | } |
| | | }, |
| | | /** 点击搜索后触发该事件 */ |
| | | selectInOrNotInSearchChange(params, done) { |
| | | this.initPageData.currentPage = 1; |
| | | let requestData = {}; |
| | | if(params) { |
| | | Object.keys(params).forEach((key)=>{ |
| | | requestData["conditionMap" + "["+ key +"_like]"] = params[key].trim(); |
| | | }) |
| | | } |
| | | this.inOrNotInParam = requestData; |
| | | this.loadInOrNotInConditionData(this.initPageData,this.inOrNotInParam); |
| | | done(); |
| | | }, |
| | | /** 重置位属性选取值表格的搜索框之后的回调 */ |
| | | searchInOrNotInReset() { |
| | | this.inOrNotInParam = {}; |
| | | this.loadInOrNotInConditionData(this.initPageData); |
| | | }, |
| | | |
| | | //上一个页面已经选中参照应用的业务类型的情况,和上一次已经配置过参照配置的情况下进行页面初始化渲染 |
| | | initPageData(val){ |
| | | // console.log(val.referConfig); |
| | |
| | | transition:opacity .0s !important; |
| | | } |
| | | |
| | | /* .valueInfo { |
| | | float: left; |
| | | border: 1px solid #E9E7E7; |
| | | display: inline-block; |
| | | vertical-align: middle; |
| | | padding: 9px 15px; |
| | | line-height: 1; |
| | | } */ |
| | | |
| | | </style> |