|
@@ -4,7 +4,8 @@
|
|
|
<!--<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"
|
|
|
+ :filterable="filterable" :clearable="clearable"
|
|
|
+ :remote="remote" :remote-method="remoteMethod"
|
|
|
:multiple="multiple" :collapse-tags="collapseTags"
|
|
|
@change="corpChange" >
|
|
|
<el-option
|
|
@@ -15,38 +16,38 @@
|
|
|
</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>-->
|
|
|
+ <el-button icon="el-icon-search" size="mini" @click="corpVisible = true"></el-button>
|
|
|
+ <el-tooltip effect="dark" content="获取最新资料" placement="top-start">
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @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>-->
|
|
|
+ <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>
|
|
|
+ <div>
|
|
|
+ <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="24">
|
|
|
+ <slot></slot>
|
|
|
+ <!--<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>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="corpVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" >确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -55,6 +56,8 @@
|
|
|
data(){
|
|
|
return {
|
|
|
selectValue:null,
|
|
|
+ // 弹窗关闭
|
|
|
+ corpVisible:false,
|
|
|
}
|
|
|
},
|
|
|
props:{
|
|
@@ -97,6 +100,11 @@
|
|
|
type:Boolean,
|
|
|
default:false
|
|
|
},
|
|
|
+ // 弹窗的标题
|
|
|
+ title:{
|
|
|
+ type:String,
|
|
|
+ default:'选择数据'
|
|
|
+ },
|
|
|
},
|
|
|
methods:{
|
|
|
// 下拉change
|
|
@@ -104,21 +112,19 @@
|
|
|
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 = [];
|
|
|
+ remoteMethod(name) {
|
|
|
+ console.log(name,103)
|
|
|
+ if (name == null || name === "") {
|
|
|
+ return false;
|
|
|
}
|
|
|
- }
|
|
|
+ this.$emit('remoteMethod',name)
|
|
|
+ },
|
|
|
+ // 获取最新数据
|
|
|
+ refreshData(){
|
|
|
+ this.$emit('remoteMethod')
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|