|
@@ -3,18 +3,22 @@
|
|
|
<div class="filter-container" style="padding-bottom: 0px">
|
|
|
<div class="search-box-area" id="searchBox">
|
|
|
<div class="search-item">
|
|
|
- <el-cascader
|
|
|
- class="filter-item form-search-input fl"
|
|
|
- v-model="queryParam.department_id"
|
|
|
- :options="departments"
|
|
|
- clearable
|
|
|
- :props="{
|
|
|
- checkStrictly: true,
|
|
|
- label: 'name',
|
|
|
- value: 'id',
|
|
|
- }"
|
|
|
- @change="handleChange"
|
|
|
- ></el-cascader>
|
|
|
+ <el-select
|
|
|
+ class="filter-item form-search-input fl"
|
|
|
+ v-model="queryParam.wind_id"
|
|
|
+ filterable
|
|
|
+ remote
|
|
|
+ reserve-keyword
|
|
|
+ placeholder="请输入风场名称"
|
|
|
+ :remote-method="remoteMethod"
|
|
|
+ :loading="loading">
|
|
|
+ <el-option
|
|
|
+ v-for="item in options"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</div>
|
|
|
<div class="search-item">
|
|
|
<el-input
|
|
@@ -25,24 +29,7 @@
|
|
|
@keyup.enter.native="handleSearch"
|
|
|
/>
|
|
|
</div>
|
|
|
- <div class="search-item">
|
|
|
- <el-input
|
|
|
- v-model="queryParam.name"
|
|
|
- placeholder="名称"
|
|
|
- clearable
|
|
|
- class="filter-item form-search-input fl"
|
|
|
- @keyup.enter.native="handleSearch"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div class="search-item">
|
|
|
- <el-input
|
|
|
- v-model="queryParam.model"
|
|
|
- placeholder="型号"
|
|
|
- clearable
|
|
|
- class="filter-item form-search-input fl"
|
|
|
- @keyup.enter.native="handleSearch"
|
|
|
- />
|
|
|
- </div>
|
|
|
+
|
|
|
|
|
|
</div>
|
|
|
<div class="search-operate-area">
|
|
@@ -152,7 +139,7 @@
|
|
|
|
|
|
<el-table-column
|
|
|
label="操作"
|
|
|
- min-width="185"
|
|
|
+ min-width="120"
|
|
|
align="center"
|
|
|
fixed="right"
|
|
|
>
|
|
@@ -169,18 +156,6 @@
|
|
|
@click="handleUpdate(record.row)"
|
|
|
></el-button>
|
|
|
</el-tooltip>
|
|
|
- <el-tooltip
|
|
|
- content="查看"
|
|
|
- placement="top"
|
|
|
- :enterable="false"
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="mini"
|
|
|
- icon="el-icon-view"
|
|
|
- @click="handleDetail(record.row)"
|
|
|
- ></el-button>
|
|
|
- </el-tooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -189,7 +164,7 @@
|
|
|
<div class="content">
|
|
|
<div class="head">选择显示字段</div>
|
|
|
<div class="body">
|
|
|
- <el-checkbox v-model="checkList.wind_name" disabled>所属部门风场</el-checkbox>
|
|
|
+ <el-checkbox v-model="checkList.wind_name">所属部门风场</el-checkbox>
|
|
|
<el-checkbox v-model="checkList.number" disabled>编号</el-checkbox>
|
|
|
<el-checkbox v-model="checkList.supplier">供应商</el-checkbox>
|
|
|
<el-checkbox v-model="checkList.production_date">出厂日期</el-checkbox>
|
|
@@ -262,12 +237,11 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
url: "fan",
|
|
|
+ options: [],
|
|
|
queryParam: {
|
|
|
number: "",
|
|
|
- department_id: [],
|
|
|
- name: "",
|
|
|
- model: "",
|
|
|
- is_used: ""
|
|
|
+ wind_id: '',
|
|
|
+
|
|
|
},
|
|
|
current_type: {
|
|
|
0: "success",
|
|
@@ -289,7 +263,7 @@ export default {
|
|
|
showColumn: {
|
|
|
wind_name: true,
|
|
|
production_date: true,
|
|
|
- location:true,
|
|
|
+ location:true,
|
|
|
number: true,
|
|
|
production_date: true,
|
|
|
install_date: true,
|
|
@@ -299,11 +273,11 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
- created() {
|
|
|
- this.$http.get("wind").then((response) => {
|
|
|
- this.departments = response.data;
|
|
|
- });
|
|
|
- },
|
|
|
+ // created() {
|
|
|
+ // // this.$http.get("wind").then((response) => {
|
|
|
+ // // this.departments = response.data;
|
|
|
+ // // });
|
|
|
+ // },
|
|
|
methods: {
|
|
|
|
|
|
handleChange(val) {
|
|
@@ -321,6 +295,19 @@ export default {
|
|
|
this.queryParam.page = this.paginate.current;
|
|
|
this.getList();
|
|
|
},
|
|
|
+ remoteMethod(query) {
|
|
|
+ if (query !== '') {
|
|
|
+ this.loading = true;
|
|
|
+ let url = 'wind?name='+query;
|
|
|
+ this.$http.get(url).then((response) => {
|
|
|
+ this.loading = false;
|
|
|
+ this.options = response.data;
|
|
|
+ });
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.options = [];
|
|
|
+ }
|
|
|
+ },
|
|
|
searchDis() {
|
|
|
this.searchDisplay = !this.searchDisplay;
|
|
|
var searchBoxHeght = document.getElementById("searchBox");
|
|
@@ -337,10 +324,10 @@ export default {
|
|
|
localStorage.setItem("hydColumnSet", JSON.stringify(this.checkList));
|
|
|
this.isShowColumn = false;
|
|
|
},
|
|
|
- handleDetail(row){
|
|
|
- this.detailVisible = true,
|
|
|
- this.detail = row
|
|
|
- },
|
|
|
+ // handleDetail(row){
|
|
|
+ // this.detailVisible = true,
|
|
|
+ // this.detail = row
|
|
|
+ // },
|
|
|
closeDrawer(){
|
|
|
this.detailVisible = false
|
|
|
}
|