| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :title="title" |
| | | v-dialogDrag append-to-body="true" |
| | | <el-dialog v-dialogDrag |
| | | :height="options.height|| 'auto'" :title="title" |
| | | :visible.sync="visible" |
| | | top="0" |
| | | class="avue-dialog avue-dialog--top" |
| | | :width="options.width|| '80%'" |
| | | :height="options.height|| 'auto'" |
| | | append-to-body="true" |
| | | class="avue-dialog avue-dialog--top" |
| | | top="0" |
| | | @close="dialogClose" > |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | <avue-crud ref="referCrud" |
| | | v-model="value" |
| | | ref="referCrud" |
| | | :data="data" |
| | | :option="option" |
| | | :page.sync="page" |
| | | :table-loading="loading" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | |
| | | <div class="avue-dialog__footer"> |
| | | <div class="avue-dialog__footer--left valueInfo">{{ valueInfo }} </div> |
| | | <el-button @click="escHandler">取 消</el-button> |
| | | <el-button @click="setValue" type="primary">确 定</el-button> |
| | | <el-button type="primary" @click="setValue">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <avue-input v-model="text" :disabled="disabled" :readonly="true" :placeholder="title" @click="!disabled && (visible=true)"></avue-input> |
| | | <avue-input v-model="text" :disabled="disabled" :placeholder="title" :readonly="true" |
| | | @click="!disabled && (visible=true)"></avue-input> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { validatenull } from "@/util/validate"; |
| | | import {getList,getLazyList,getTableDefinedUrl} from "@/api/refer/table"; |
| | | |
| | | export default { |
| | | name: "vciWebReferTable", |
| | | props:["referConfig","value","text","title","disabled","referType"], |
| | |
| | | |
| | | if(this.options.displayTable){ |
| | | //说明是使用平台的表格 |
| | | getTableDefinedUrl({btmType:(this.options.referBo||this.options.referType),code:this.options.displayTable,isMuti:this.isMuti},this.tableDefinedUrl).then(result => { |
| | | getTableDefinedUrl({ |
| | | btmType: (this.options.referBo || this.options.referType), |
| | | code: this.options.displayTable, |
| | | isMuti: this.isMuti |
| | | }, this.tableDefinedUrl).then(result => { |
| | | console.log('result',result) |
| | | if(result.success){ |
| | | var queryScheme = result.querySchema; |
| | |
| | | } |
| | | this.value=value.join(','); |
| | | this.text=text.join(',') |
| | | this.$emit("setValue", {field:this.referConfig.field,showField:this.referConfig.showField,value:this.value,text:this.text,rawData:this.selectionList,fieldMap:mapFields}); |
| | | this.$emit("setValue", { |
| | | field: this.referConfig.field, |
| | | showField: this.referConfig.showField, |
| | | value: this.value, |
| | | text: this.text, |
| | | rawData: this.selectionList, |
| | | fieldMap: mapFields |
| | | }); |
| | | this.visible=false; |
| | | }, |
| | | searchReset() { |