|
@@ -1,26 +1,9 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<div class="filter-container" style="padding-bottom: 0px">
|
|
|
- <div class="search-box-area" id="searchBox">
|
|
|
- <div class="search-item">
|
|
|
- <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
|
|
|
v-model="queryParam.number"
|
|
|
placeholder="编号"
|
|
@@ -28,13 +11,8 @@
|
|
|
class="filter-item form-search-input fl"
|
|
|
@keyup.enter.native="handleSearch"
|
|
|
/>
|
|
|
- </div>
|
|
|
|
|
|
-
|
|
|
- </div>
|
|
|
- <div class="search-operate-area">
|
|
|
- <!-- <el-input v-model="queryParam.code" placeholder="唯一编码" clearable class="filter-item form-search-input fl" /> -->
|
|
|
- <el-button
|
|
|
+ <el-button
|
|
|
class="filter-item search fl"
|
|
|
icon="el-icon-search"
|
|
|
@click="handleSearch"
|
|
@@ -46,28 +24,17 @@
|
|
|
@click="handleRefresh"
|
|
|
>重置</el-button
|
|
|
>
|
|
|
- <el-button
|
|
|
- class="filter-item search fl"
|
|
|
- :icon="this.searchDisplay ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
|
|
|
- @click="searchDis"
|
|
|
- >{{ word }}</el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
- <div class="list-operate-area">
|
|
|
- <!-- <el-button size="mini" class="filter-item search fl" icon="el-icon-plus" @click="handleCreate">添加</el-button> -->
|
|
|
- <el-button
|
|
|
- class="filter-item search fl"
|
|
|
- icon="el-icon-setting"
|
|
|
- @click="showColumnOption"
|
|
|
- >列设置</el-button
|
|
|
- >
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<el-button
|
|
|
class="filter-item search fl"
|
|
|
icon="el-icon-refresh-right"
|
|
|
@click="refresh"
|
|
|
>刷新</el-button
|
|
|
>
|
|
|
- </div>
|
|
|
+
|
|
|
</div>
|
|
|
<el-table
|
|
|
:data="data"
|
|
@@ -90,60 +57,34 @@
|
|
|
prop="wind_name"
|
|
|
label="风场名称"
|
|
|
align="center"
|
|
|
- v-if="showColumn.wind_name"
|
|
|
+
|
|
|
:show-overflow-tooltip="true"
|
|
|
|
|
|
/>
|
|
|
- <el-table-column
|
|
|
- prop="name"
|
|
|
- label="名称"
|
|
|
- align="center"
|
|
|
- v-if="showColumn.name"
|
|
|
- :show-overflow-tooltip="true"
|
|
|
-
|
|
|
- />
|
|
|
-
|
|
|
+
|
|
|
<el-table-column
|
|
|
prop="number"
|
|
|
- label="编号"
|
|
|
- align="center"
|
|
|
- v-if="showColumn.number"
|
|
|
- :show-overflow-tooltip="true"
|
|
|
-
|
|
|
- />
|
|
|
-
|
|
|
- <el-table-column
|
|
|
- prop="supplier"
|
|
|
- label="供应商"
|
|
|
+ label="机位号"
|
|
|
align="center"
|
|
|
- v-if="showColumn.supplier"
|
|
|
:show-overflow-tooltip="true"
|
|
|
-
|
|
|
/>
|
|
|
- <el-table-column
|
|
|
- prop="production_date"
|
|
|
- label="出厂日期"
|
|
|
+ <el-table-column
|
|
|
+ prop="model_name"
|
|
|
+ label="风机型号"
|
|
|
align="center"
|
|
|
- v-if="showColumn.production_date"
|
|
|
+
|
|
|
:show-overflow-tooltip="true"
|
|
|
-
|
|
|
+
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- prop="install_date"
|
|
|
- label="安装日期"
|
|
|
+ prop="created_at"
|
|
|
+ label="添加时间"
|
|
|
align="center"
|
|
|
- v-if="showColumn.production_date"
|
|
|
+
|
|
|
:show-overflow-tooltip="true"
|
|
|
-
|
|
|
+
|
|
|
/>
|
|
|
- <el-table-column
|
|
|
- prop="location"
|
|
|
- label="位置"
|
|
|
- align="center"
|
|
|
- v-if="showColumn.location"
|
|
|
- :show-overflow-tooltip="true"
|
|
|
|
|
|
- />
|
|
|
|
|
|
<el-table-column
|
|
|
label="操作"
|
|
@@ -168,7 +109,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <transition name="fade">
|
|
|
+ <!-- <transition name="fade">
|
|
|
<div class="columnOption" v-show="isShowColumn">
|
|
|
<div class="content">
|
|
|
<div class="head">选择显示字段</div>
|
|
@@ -188,13 +129,13 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </transition>
|
|
|
+ </transition> -->
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
icon="el-icon-plus"
|
|
|
:loading="downloadLoading"
|
|
|
style="margin-top: 15px"
|
|
|
- @click="handleCreate"
|
|
|
+ @click="handleAddFan()"
|
|
|
>添加</el-button
|
|
|
>
|
|
|
<el-button
|
|
@@ -216,7 +157,13 @@
|
|
|
:layout="paginate.layout"
|
|
|
:total="paginate.total"
|
|
|
/>
|
|
|
- <form-model
|
|
|
+ <form-model
|
|
|
+ @sendVal="closeAddDialog"
|
|
|
+ :formModelVisible="addFormVisible"
|
|
|
+ :title="title"
|
|
|
+ :ref="AddFormName"
|
|
|
+ />
|
|
|
+ <update-model
|
|
|
@sendVal="closeDialog"
|
|
|
:formModelVisible="formVisible"
|
|
|
:title="title"
|
|
@@ -235,12 +182,14 @@ import rlListOperate from "@/layout/rl-list-operate/rlListOperate";
|
|
|
import { action } from "@/directive/permission/index.js";
|
|
|
import detail from "./detail.vue";
|
|
|
import formModel from './formModel.vue';
|
|
|
+import updateModel from './updateModel.vue';
|
|
|
export default {
|
|
|
name: "fan",
|
|
|
directives: { action },
|
|
|
mixins: [rlListOperate],
|
|
|
components: {
|
|
|
formModel,
|
|
|
+ updateModel,
|
|
|
detail,
|
|
|
},
|
|
|
data() {
|
|
@@ -250,13 +199,14 @@ export default {
|
|
|
queryParam: {
|
|
|
number: "",
|
|
|
wind_id: '',
|
|
|
-
|
|
|
},
|
|
|
current_type: {
|
|
|
0: "success",
|
|
|
1: "danger",
|
|
|
},
|
|
|
+ AddFormName:'addFan',
|
|
|
formName:'fan',
|
|
|
+ addFormVisible:false,
|
|
|
formVisible:false,
|
|
|
//搜索
|
|
|
searchDisplay: true,
|
|
@@ -286,7 +236,23 @@ export default {
|
|
|
// // });
|
|
|
// },
|
|
|
methods: {
|
|
|
-
|
|
|
+ handleAddFan(){
|
|
|
+ this.title = '新增'
|
|
|
+ this.isReadonly=false
|
|
|
+ this.id = null
|
|
|
+ this.resetFormFields();
|
|
|
+ this.addFormVisible = true
|
|
|
+ },
|
|
|
+ closeAddDialog(){
|
|
|
+ this.addFormVisible = false
|
|
|
+ },
|
|
|
+ handleAddSubmit() {
|
|
|
+ this.$http.post(this.$refs[this.AddFormName].url, this.$refs[this.AddFormName].formFieldsData).then(response => {
|
|
|
+ this.addFormVisible = false
|
|
|
+ this.handleRefresh()
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
handleChange(val) {
|
|
|
// console.log(val)
|
|
|
this.queryParam.department_id = val;
|
|
@@ -315,26 +281,8 @@ export default {
|
|
|
this.options = [];
|
|
|
}
|
|
|
},
|
|
|
- searchDis() {
|
|
|
- this.searchDisplay = !this.searchDisplay;
|
|
|
- var searchBoxHeght = document.getElementById("searchBox");
|
|
|
- if (this.searchDisplay == false) {
|
|
|
- searchBoxHeght.style.height = 40 + "px";
|
|
|
- } else {
|
|
|
- searchBoxHeght.style.height = "auto";
|
|
|
- }
|
|
|
- },
|
|
|
- showColumnOption() {
|
|
|
- this.isShowColumn = true;
|
|
|
- },
|
|
|
- saveColumn() {
|
|
|
- localStorage.setItem("fan", JSON.stringify(this.checkList));
|
|
|
- this.isShowColumn = false;
|
|
|
- },
|
|
|
- // handleDetail(row){
|
|
|
- // this.detailVisible = true,
|
|
|
- // this.detail = row
|
|
|
- // },
|
|
|
+
|
|
|
+
|
|
|
closeDrawer(){
|
|
|
this.detailVisible = false
|
|
|
}
|
|
@@ -354,21 +302,10 @@ export default {
|
|
|
immediate: true,
|
|
|
},
|
|
|
},
|
|
|
- computed: {
|
|
|
- word: function () {
|
|
|
- if (this.searchDisplay == false) {
|
|
|
- //对文字进行处理
|
|
|
- return "展开";
|
|
|
- } else {
|
|
|
- return "收起";
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
+
|
|
|
mounted() {
|
|
|
// this.getIsUseVoice();
|
|
|
- this.$nextTick(function () {
|
|
|
- this.searchDis();
|
|
|
- });
|
|
|
+
|
|
|
// 发请求得到checkListInitData的列的名字
|
|
|
if (localStorage.getItem("fan")) {
|
|
|
this.checkList = JSON.parse(localStorage.getItem("fan"));
|
|
@@ -387,5 +324,5 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
- @import "@/views/device/hydraulic/index.scss";
|
|
|
+ @import "@/views/wind/fan/index.scss";
|
|
|
</style>
|