|
@@ -0,0 +1,128 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <div style="display:flex">
|
|
|
+ <!--<slot v-if="slot" name="slot"></slot>-->
|
|
|
+ <div style="width: 100%;">
|
|
|
+ <el-select v-model="selectValue" size="small" placeholder="请选择"
|
|
|
+ :filterable="filterable" :clearable="clearable" :remote="remote" :remote-method="remoteMethod"
|
|
|
+ :multiple="multiple" :collapse-tags="collapseTags"
|
|
|
+ @change="corpChange" >
|
|
|
+ <el-option
|
|
|
+ v-for="item in datalist"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.cnName"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <!--<el-button icon="el-icon-search" size="mini" v-if="label != 'shortName'" :disabled="disabled"-->
|
|
|
+ <!-- @click="openDialog()"></el-button>-->
|
|
|
+ <!--<el-tooltip v-if="refresh" effect="dark" content="获取最新资料" placement="top-start">-->
|
|
|
+ <!-- <el-button icon="el-icon-refresh" size="mini" v-if="label != 'shortName'" @click="refreshData"-->
|
|
|
+ <!-- style="margin-left:0px;"></el-button>-->
|
|
|
+ <!--</el-tooltip>-->
|
|
|
+ </div>
|
|
|
+ <!-- <el-dialog :title="title" :visible.sync="corpVisible" width="80%" top="5vh" append-to-body @closed="closed"-->
|
|
|
+ <!-- class="el-dialogDeep" :close-on-click-modal="false" v-dialog-drag>-->
|
|
|
+ <!--<span>-->
|
|
|
+ <!-- <el-row>-->
|
|
|
+ <!-- <el-col :span="4">-->
|
|
|
+ <!-- <el-scrollbar>-->
|
|
|
+ <!-- <basic-container>-->
|
|
|
+ <!-- <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" :style="treeStyle" />-->
|
|
|
+ <!-- </basic-container>-->
|
|
|
+ <!-- </el-scrollbar>-->
|
|
|
+ <!-- </el-col>-->
|
|
|
+ <!-- <el-col :span="20">-->
|
|
|
+ <!-- <avue-crud :option="tableOption" :data="data" ref="crud" v-model="form" :page.sync="page"-->
|
|
|
+ <!-- :search.sync="search" @search-change="searchChange" @search-reset="searchReset"-->
|
|
|
+ <!-- @selection-change="selectionChange" @on-load="onLoad" @tree-load="treeLoad" @saveColumn="saveColumn"-->
|
|
|
+ <!-- @resetColumn="resetColumn" @refresh-change="refreshChange" :table-loading="loading">-->
|
|
|
+ <!-- </avue-crud>-->
|
|
|
+ <!-- </el-col>-->
|
|
|
+ <!-- </el-row>-->
|
|
|
+ <!--</span>-->
|
|
|
+ <!-- <span slot="footer" class="dialog-footer">-->
|
|
|
+ <!-- <el-button @click="corpVisible = false">取 消</el-button>-->
|
|
|
+ <!-- <el-button type="primary" @click="importCorp" :disabled="!multiple && selectionList.length != 1">确 定</el-button>-->
|
|
|
+ <!--</span>-->
|
|
|
+ <!-- </el-dialog>-->
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ export default {
|
|
|
+ data(){
|
|
|
+ return {
|
|
|
+ selectValue:null,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ props:{
|
|
|
+ // 选择框的数据
|
|
|
+ datalist:{
|
|
|
+ type:Array,
|
|
|
+ default:[]
|
|
|
+ },
|
|
|
+ // 选择框数据选择的参数
|
|
|
+ forParameter:{
|
|
|
+ type:Object,
|
|
|
+ default:{
|
|
|
+ key:'value',
|
|
|
+ label:'label',
|
|
|
+ value:'value',
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 是否多选
|
|
|
+ multiple:{
|
|
|
+ type:Boolean,
|
|
|
+ default:false
|
|
|
+ },
|
|
|
+ // 多选时是否将选中值按文字的形式展示
|
|
|
+ collapseTags:{
|
|
|
+ type:Boolean,
|
|
|
+ default:false
|
|
|
+ },
|
|
|
+ // 是否可以搜索
|
|
|
+ filterable:{
|
|
|
+ type:Boolean,
|
|
|
+ default:false
|
|
|
+ },
|
|
|
+ // 是否为远程搜索
|
|
|
+ remote:{
|
|
|
+ type:Boolean,
|
|
|
+ default:false
|
|
|
+ },
|
|
|
+ // 是否可以清空选择项
|
|
|
+ clearable:{
|
|
|
+ type:Boolean,
|
|
|
+ default:false
|
|
|
+ },
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ // 下拉change
|
|
|
+ corpChange(row) {
|
|
|
+ console.log(row,100)
|
|
|
+ },
|
|
|
+ /* 远程模糊查询操作用户 */
|
|
|
+ remoteMethod(query) {
|
|
|
+ console.log(query,103)
|
|
|
+ if (query !== '') {
|
|
|
+ this.loading = true;
|
|
|
+ setTimeout(() => {
|
|
|
+ this.loading = false;
|
|
|
+ // this.options = this.list.filter(item => {
|
|
|
+ // return item.label.toLowerCase()
|
|
|
+ // .indexOf(query.toLowerCase()) > -1;
|
|
|
+ // });
|
|
|
+ }, 200);
|
|
|
+ } else {
|
|
|
+ this.options = [];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+
|
|
|
+</style>
|