lihang
2023-05-23 1d91a31301494b9f0b7e17b3eef280f8d54e2806
Source/UBCS-WEB/src/views/modeling/original.vue
@@ -4,14 +4,19 @@
      <basic-container>
        <avue-crud v-model="form" :option="option" :data="data" ref="crud" @on-load="onLoad" @row-save="rowSave"
          @row-update="rowUpdate" :before-open="beforeOpen" @row-del="rowDel" :page.sync="page"
          @refresh-change="refreshChange" @row-click="rowClick">
          @refresh-change="refreshChange" @row-click="rowClick"
          @selection-change="selectChange">
          <template slot-scope="{row,index,type}" slot="selInputForm">
          <div style="margin-left: 75px">
            <el-input v-model="form.text" :size="size" style="width: 210px" :readonly="true" @focus="selectBtmType" :disabled="referType.disable"></el-input>
            <!-- <el-button type="primary" style="margin-left: 10px" @click="addHandle">选择</el-button> -->
            <!-- <el-button type="info">取消</el-button> -->
          </div>
        </template>
        <template slot="radio"
                slot-scope="{row}">
                    <el-radio v-model="selectRow"
                        :label="row.$index">&nbsp;
                    </el-radio>
                </template>
        </avue-crud>
        <el-dialog :visible.sync="referType.display" append-to-body :title="referType.title" width="1000px">
          <original-range @rowchange="rowchange"></original-range>
@@ -94,7 +99,7 @@
  update, getPage
} from "@/api/omd/OmdAttribute";
import { getDictionary } from "@/api/omd/dict";
import { getDictionary } from "@/api/omd/enum";
export default {
  name: "original",
@@ -136,24 +141,30 @@
        currentPage: 1,
        total: 100
      },
      selectRow: '',
      data: [
      ],
      option: {
        height: "550px",
        selection: true,
        headerAlign: 'center',
        border: true,
        index: true,
        rowKey: 'id',
        tabs: true,
        highlightCurrentRow:true,
        column: [
        highlightCurrentRow: true,
        column: [{
            label: '选择',
            prop: 'radio',
            width: 60,
            hide: false
          },
          {
            label: '属性编号',
            prop: 'key',
            align: 'left',
            display: false
            display: false,
            width: 200
          }, {
            label: '属性名称',
            prop: 'label',
@@ -541,18 +552,17 @@
        this.loading = false;
        this.data = res.data.data.records
        this.itemData = this.data[0];
        this.$nextTick(() => {
          this.$refs.crud.setCurrentRow(this.data[0]);
        })
      })
    },
    rowClick(row) {
      this.itemData = row
      this.itemData = row;
      this.selectRow = row.$index;
    }
    ,selectBtmType(){
        this.referType.display = true;
        this.referType.title = "请选择" + this.referType.value
    }
    },
  },
}
</script>