| | |
| | | <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px"> |
| | | <el-option |
| | | v-for="item in SelectOption" |
| | | :key="item.value" |
| | | :key="item.key" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | style="width: 150px"> |
| | |
| | | <el-button plain size="small" style="margin-left: 20px" type="primary" @click="SelectSearchHandler">查询 |
| | | </el-button> |
| | | </template> |
| | | <avue-crud :data="TableData" :option="this.codeType === 'btmCode' ? this.btmOption : this.option" @row-click="rowHandlerClick"> |
| | | <avue-crud :data="TableData" :option="this.codeType === 'btmCode' ? this.btmOption : this.option" @row-click="rowHandlerClick" :table-loading="loading"> |
| | | <template slot="radio" slot-scope="{row}"> |
| | | <el-radio v-model="radioValue" :label="row.$index" style="padding-left: 10px !important;">{{ '' }} |
| | | </el-radio> |
| | |
| | | crudName: '', |
| | | crudOid: '', |
| | | TableData: [], |
| | | loading:false, |
| | | option: { |
| | | addBtn: false, |
| | | index: true, |
| | |
| | | border: true, |
| | | menu: false, |
| | | height: 380, |
| | | rowKey: "oid", |
| | | column: [ |
| | | { |
| | | label: '', |
| | |
| | | border: true, |
| | | menu: false, |
| | | height:380, |
| | | rowKey: "oid", |
| | | column:[ |
| | | { |
| | | label: '', |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.loading = true; |
| | | }, |
| | | mounted() { |
| | | }, |
| | |
| | | }, |
| | | // 模糊查询 |
| | | SelectSearchHandler() { |
| | | if (!this.SelectOption) { |
| | | return; // 如果SelectOption数据不存在直接返回 避免报错 |
| | | this.loading = true; |
| | | if (!this.SelectOption || this.SelectOption.length === 0) { |
| | | this.loading = false; |
| | | return; |
| | | } |
| | | |
| | | const Parameter = {}; |
| | | Parameter[`conditionMap['${this.SelectValue}']`] = this.SelectSearchValue; |
| | | |
| | | if(this.codeType === "btmCode"){ |
| | | this.btmDefaultRend(Parameter) |
| | | }else { |
| | |
| | | ...Parameter |
| | | }).then(res => { |
| | | this.TableData = res.data.records; |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | btmDefaultRend(Parameter) { |
| | | referDataGrid({valueField: 'id', isMuti: 'false', 'limit': '-1', ...Parameter}).then(res => { |
| | | this.TableData = res.data.data.records |
| | | this.TableData = res.data.data.records; |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | } |
| | |
| | | BtmdialogVisible: false, |
| | | SelectOption: [ |
| | | { |
| | | value: 'name', |
| | | label: '中文名称' |
| | | value: 'id', |
| | | label: '英文名称', |
| | | }, |
| | | { |
| | | value: 'id', |
| | | label: '英文名称' |
| | | value: 'name', |
| | | label: '中文名称' |
| | | } |
| | | |
| | | ], |
| | | btmSelectOption: [ |
| | | { |