123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382 |
- <template>
- <div class="draught-fan-list">
- <div class="query mg-b-8">
- <div class="query-items">
- <div class="query-item">
- <div class="lable">风场:</div>
- <div class="search-input">
- <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select" @change="getWtArray">
- <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
- </el-select>
- </div>
- </div>
- <div class="query-item">
- <div class="lable">风机:</div>
- <div class="search-input">
- <el-select v-model="wtId" clearable placeholder="请选择" popper-class="select">
- <el-option v-for="item in wtArray" :key="item.id" :value="item.id" :label="item.name" />
- </el-select>
- </div>
- </div>
- </div>
- <div class="query-actions">
- <button class="btn green" @click="search()">查询</button>
- </div>
- </div>
- <div class="df-table">
- <ComTable height="78vh" :data="tableData"></ComTable>
- </div>
- </div>
- </template>
- <script>
- import ComTable from "@com/coms/table/table.vue";
- export default {
- // 名称
- name: "cutAnalyse",
- // 使用组件
- components: {
- ComTable
- },
- // 数据
- data () {
- const that = this;
- return {
- wpArray: [],
- wpId: "",
- wtArray: [],
- wtId: "",
- tableData: {
- column: [
- // {
- // name: "风机编号",
- // field: "wtnum",
- // is_num: false,
- // is_light: false,
- // sortable: true
- // },
- // {
- // name: "所属风电场",
- // field: "ownerwf",
- // is_num: false,
- // is_light: false,
- // sortable: true
- // },
- // {
- // name: "所属工程",
- // field: "ownerproject",
- // is_num: false,
- // is_light: false,
- // sortable: true
- // },
- // {
- // name: "所属线路",
- // field: "ownerline",
- // is_num: false,
- // is_light: false,
- // sortable: true
- // },
- // {
- // name: "编号",
- // field: "wtwfnum",
- // is_num: false,
- // is_light: false,
- // sortable: true
- // },
- // {
- // name: "编号",
- // field: "wtgridnum",
- // is_num: false,
- // is_light: false,
- // sortable: true
- // },
- {
- name: "供应商",
- field: "vendor",
- is_num: false,
- is_light: false,
- sortable: true
- },
- {
- name: "型号",
- field: "model",
- is_num: false,
- is_light: false,
- sortable: true
- },
- {
- name: "额定功率",
- field: "ratedpower",
- is_num: false,
- is_light: false,
- sortable: true
- },
- {
- name: "额定风速",
- field: "ratedwinspe",
- is_num: false,
- is_light: false,
- sortable: true
- },
- {
- name: "额定电压",
- field: "ratedvoltage",
- is_num: false,
- is_light: false,
- sortable: true
- },
- {
- name: "额定转速",
- field: "ratedrev",
- is_num: false,
- is_light: false,
- sortable: true
- },
- {
- name: "切入风速",
- field: "cutinwinspe",
- is_num: false,
- is_light: false,
- sortable: true
- },
- {
- name: "切出风速",
- field: "cutoutwinspe",
- is_num: false,
- is_light: false,
- sortable: true
- },
- {
- name: "生存风速",
- field: "maxwinspe",
- is_num: false,
- is_light: false,
- sortable: true
- },
- // {
- // name: "最低温度",
- // field: "lowertemp",
- // is_num: false,
- // is_light: false,
- // sortable: true
- // },
- // {
- // name: "最高温度",
- // field: "hightemp",
- // is_num: false,
- // is_light: false,
- // sortable: true
- // },
- // {
- // name: "最低转速",
- // field: "lowerrev",
- // is_num: false,
- // is_light: false,
- // sortable: true
- // },
- // {
- // name: "最高转速",
- // field: "highrev",
- // is_num: false,
- // is_light: false,
- // sortable: true
- // },
- // {
- // name: "风轮直径",
- // field: "roterdiameter",
- // is_num: false,
- // is_light: false,
- // },
- // {
- // name: "月大风切入合格率",
- // field: "monthinputbigratio",
- // is_num: false,
- // is_light: false,
- // sortable: true
- // },
- // {
- // name: "轮毂高度",
- // field: "hubheight",
- // is_num: false,
- // is_light: false,
- // sortable: true
- // },
- // {
- // name: "出厂日期",
- // field: "releasedate",
- // is_num: false,
- // is_light: false,
- // sortable: true
- // },
- {
- name: "吊装日期",
- field: "installdate",
- is_num: false,
- is_light: false,
- sortable: true
- },
- // {
- // name: "调试日期",
- // field: "testdate",
- // is_num: false,
- // is_light: false,
- // sortable: true
- // },
- // {
- // name: "投运日期",
- // field: "opdate",
- // is_num: false,
- // is_light: false,
- // sortable: true
- // },
- // {
- // name: "位置",
- // field: "location",
- // is_num: false,
- // is_light: false,
- // sortable: true
- // },
- {
- name: "风机位置",
- field: "wflocation",
- is_num: false,
- is_light: false,
- sortable: true
- },
- {
- name: "风机ID",
- field: "wtid",
- is_num: false,
- is_light: false,
- sortable: true
- }
- ],
- data: [],
- }
- };
- },
- // 函数
- methods: {
- // 获取风场
- getWpArray () {
- let that = this;
- that.API.requestData({
- method: "GET",
- subUrl: "powercompare/windfarmAjax",
- success (res) {
- that.wpArray = res.data;
- that.wpId = that.wpId || res.data[0].id;
- that.getWtArray(that.wpId, true);
- }
- });
- },
- // 获取风机
- getWtArray (wpId, keepRequest) {
- let that = this;
- if (wpId) {
- that.API.requestData({
- method: "GET",
- subUrl: "powercompare/windturbineAjax",
- data: {
- wpId
- },
- success (res) {
- that.wtArray = res.data;
- const findRes = res.data.some(ele => {
- return ele.id === that.wtId;
- });
- that.wtId = (findRes ? that.wtId : res.data[0].id);
- that.getTableData();
- }
- });
- } else {
- that.wtArray = [];
- that.wtId = "";
- }
- },
- getTableData () {
- let that = this;
- if (!that.wpId) {
- that.BASE.showMsg({
- msg: "场站与日期不可为空"
- });
- } else {
- that.API.requestData({
- method: "GET",
- baseURL:"http://192.168.10.18:9988/",
- subUrl: "windturbine/list",
- data: {
- wtid:that.wtId
- },
- success (res) {
- res.data.forEach(ele => {
- ele.installdate = new Date(ele.installdate).formatDate("yyyy-MM-dd hh:mm:ss");
- ele.opdate = new Date(ele.opdate).formatDate("yyyy-MM-dd hh:mm:ss");
- ele.releasedate = new Date(ele.releasedate).formatDate("yyyy-MM-dd hh:mm:ss");
- ele.testdate = new Date(ele.testdate).formatDate("yyyy-MM-dd hh:mm:ss");
- });
- that.tableData.data = res.data;
- }
- });
- }
- },
- search () {
- this.getTableData();
- }
- },
- created () {
- this.getWpArray();
- },
- mounted () { },
- unmounted () { },
- };
- </script>
- <style lang="less" scoped>
- .draught-fan-list {
- width: 100%;
- height: 100%;
- display: flex;
- flex-direction: column;
- .btn-group-tabs {
- display: flex;
- flex-direction: row;
- .photovoltaic {
- margin-left: 1.481vh;
- }
- }
- .df-table {
- border: 0.093vh solid fade(@darkgray, 50%);
- position: relative;
- overflow: auto;
- flex-grow: 1;
- margin-top: 1.481vh;
- &:before {
- content: '';
- width: 0.37vh;
- height: 0.37vh;
- background: @write;
- position: absolute;
- left: 0.278vh;
- top: 0.278vh;
- }
- tbody {
- height: calc(100vh - 166px);
- }
- }
- }
- </style>
|