xiejun
2023-08-23 205056bc17023dd44e6d262cfe78b6e146ee2f20
Source/UBCS-WEB/src/components/refer/vciWebReferDefalut.vue
@@ -16,6 +16,7 @@
                 @search-change="searchChange"
                 @search-reset="searchReset"
                 @selection-change="selectionChange"
                 @row-click="rowClick"
                 @current-change="currentChange"
                 @size-change="sizeChange"
                 @refresh-change="refreshChange"
@@ -50,6 +51,7 @@
        label: this.referConfig.textField || this.referConfig.options.textField || "name"
      },
      url: this.referConfig.options.url || '/api/ubcs-code/mdmEngineController/defaultReferDataGrid',
      method: this.referConfig.options.method || 'GET',
      tableDefinedUrl:'',//平台表格地址
      copyParam: ['referBo', 'textField', 'valueField', 'displayTable', 'whereSql',  'queryScheme'],
      query: {},
@@ -73,6 +75,7 @@
        border: true,
        index: true,
        selection: true,
        reserveSelection:true,
        dialogClickModal: false,
        highlightCurrentRow: true,
        column: []
@@ -81,8 +84,6 @@
  },
  created() {
    this.getParams();
    console.log('referConfig:')
    console.log(this.referConfig)
  },
  mounted() {
    if(this.referConfig.options.page){
@@ -155,13 +156,13 @@
        this.option.column = [{
          prop: 'id',
          label: '英文名称',
          sort: true,
          sortable: true,
          width: 150,
          search: true
        }, {
          prop: 'name',
          label: '中文名称',
          sort: true,
          sortable: true,
          width: 150,
          search: true
        }, {
@@ -182,7 +183,9 @@
              label: item.title,
              prop: item.field,
              formatter:item.template,
              search: true
              search:this.options.tableConfig.queryColumns.some(qItem=>{
                return qItem.field==item.field
              })
            }
          }
        })
@@ -252,6 +255,11 @@
    sizeChange(pageSize){
      this.page.pageSize = pageSize;
    },
    rowClick (row) {
      this.$refs.referDefalutCrud.toggleSelection();
      this.$refs.referDefalutCrud.toggleRowSelection(row); //选中当前行
      this.selectionList=[row]
    },
    selectionChange(list) {
      if (!this.isMuti && list.length > 1) {
        const nowVal = list.shift();
@@ -275,9 +283,9 @@
            query['conditionMap["' + key + '"]'] = this.query[key];
          }
        }
        getList(Object.assign(params,this.params,this.query, query),page.currentPage, page.pageSize, this.url).then(res => {
          this.data = res.data;
          this.page.total=res.total
        getList(Object.assign(params,this.params,this.query, query),page.currentPage, page.pageSize, this.url, this.method).then(res => {
          this.data = res.data.records;
          this.page.total=res.data.total
          this.loading = false;
          this.selectionClear();
        }).catch(error=>{