|
|
@@ -1,753 +0,0 @@
|
|
|
-<template>
|
|
|
- <div class="app-container">
|
|
|
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="auto">
|
|
|
- <el-form-item :label="this.$t('sbmc')" prop="productName">
|
|
|
- <el-select style="width: 100%" v-model="queryParams.productId" allow-create filterable>
|
|
|
- <el-option v-for="item in productList" :key="item.productId" :label="item.productName" :value="item.productId">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item>
|
|
|
- <!--<el-button type="primary" size="mini" @click="queryChannelStatus11">{{$t('ss')}}</el-button>-->
|
|
|
- <el-button type="primary" size="mini" @click="queryChannelStatus11">{{$t('ss')}}</el-button>
|
|
|
- <el-button type="primary" style=";background-color: green" size="mini" @click="queryChannelStatus12">{{$t('tdjc')}}</el-button>
|
|
|
-
|
|
|
- </el-form-item>
|
|
|
- <el-form-item style="position: absolute;right: 0%;margin-right: 5%;">
|
|
|
- <el-button type="primary" size="mini" @click="handleZtCommand('open', queryParams.productId)">{{$t('zk')}}</el-button>
|
|
|
- <el-button type="primary" style=";background-color: #656B8B" size="mini" @click="handleZtCommand('close', queryParams.productId)">{{$t('zg')}}</el-button>
|
|
|
- <!--<el-dropdown style="margin-left:10px;" size="mini" @command="(command) => handleZtCommand(command, this.queryParams.productId)" >-->
|
|
|
- <!--<el-button type='primary' size="mini" style="margin-left: 10px;margin-top: 10px;width: 80px;background-color: #656B8B">{{$t('shib')}}{{$t('cz')}}<i class="el-icon-caret-bottom" /></el-button>-->
|
|
|
- <!--<el-dropdown-menu slot="dropdown">-->
|
|
|
- <!--<el-dropdown-item command="open" style="margin-top: 10px;height:40px;width: 90px;text-align: center;font-size: 25px">{{$t('zk')}}</el-dropdown-item>-->
|
|
|
- <!--<el-dropdown-item command="close" style="margin-top: 10px;height:40px;width: 90px;text-align: center;font-size: 25px">{{$t('zg')}}</el-dropdown-item>-->
|
|
|
- <!--</el-dropdown-menu>-->
|
|
|
-
|
|
|
- <!--</el-dropdown>-->
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <el-card v-if="this.productType==='3' || this.productType==='4'" style="min-height: 700px ; border-radius: 15px">
|
|
|
- <el-table min-height="700px" v-loading="loading" max-height="700px" :data="channelList" :span-method="objectSpanMethod" style="overflow-y: auto" :header-cell-style="{ background:'#FFFFFF',color:'#000000'}">
|
|
|
- <!--<el-table-column type="selection" width="55" align="center" />-->
|
|
|
- <el-table-column fixed :label="this.$t('sbmc')" :min-width="getStringWidth(this.$t('sbmc'))" prop="productName" />
|
|
|
- <el-table-column :label="this.$t('sbbh')" v-if="false" prop="productNumber" />
|
|
|
- <el-table-column label="设备id" v-if="false" prop="productId" />
|
|
|
- <el-table-column fixed :label="this.$t('tdmc')" :min-width="getStringWidth(this.$t('tdmc'))" prop="productChName" />
|
|
|
- <el-table-column fixed :label="this.$t('tdh')" :min-width="getStringWidth(this.$t('tdh'))" prop="productChId" :show-overflow-tooltip="true" />
|
|
|
-
|
|
|
- <el-table-column :label="this.$t('sxxx')" :min-width="getStringWidth(this.$t('sxxx'))" prop="productPhOrder" :show-overflow-tooltip="true" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="scope.row.outputStatus=='1'" style="color: green">{{getDity(scope.row,'productPhOrders')}}</span>
|
|
|
- <span v-else style="color: red">{{getDity(scope.row,'productPhOrders')}}</span>
|
|
|
-
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column :label="this.$t('sxxdy')+'(V)'" :min-width="getStringWidth(this.$t('sxxdy'))" prop="productPhOrderDy" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column :label="this.$t('sxxdl')+'(A)'" :min-width="getStringWidth(this.$t('sxxdl'))" prop="productPhOrderDl" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column :label="this.$t('sxxgl')+'(W)'" :min-width="getStringWidth(this.$t('sxxgl'))" prop="productPhOrderGl" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column :label="this.$t('sxxhdl')+'(Kwh)'" :min-width="getStringWidth(this.$t('sxxhdl'))" prop="productPhOrderHdl" :show-overflow-tooltip="true" />
|
|
|
-
|
|
|
-
|
|
|
- <!--<el-table-column :label="this.$t('dy')+'(V)'" width="120" prop="productChVoltage" :show-overflow-tooltip="true" />-->
|
|
|
- <!--<el-table-column :label="this.$t('dl')+'(A)'" width="120" prop="productChCurrent" :show-overflow-tooltip="true" />-->
|
|
|
- <el-table-column :label="this.$t('gl')+'(W)'" :min-width="getStringWidth(this.$t('gl'))" prop="productChPower" :show-overflow-tooltip="true" align="center" />
|
|
|
- <el-table-column :label="this.$t('pl')" v-if="this.productType!='1'" :min-width="getStringWidth(this.$t('pl'))" align="center" prop="productChPowerFreq" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column :label="this.$t('hdl')+'(Kwh)'" :min-width="getStringWidth(this.$t('hdl'))" align="center" prop="productChConsumption" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column :label="this.$t('glys')" v-if="this.productType!='1'" :min-width="getStringWidth(this.$t('glys'))" align="center" prop="productChPowerFactor" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column :label="this.$t('kqys')+'(S)'" :min-width="getStringWidth(this.$t('kqys'))" sortable prop="firingInterval" align="center" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column :label="this.$t('gbys')+'(S)'" :min-width="getStringWidth(this.$t('gbys'))" sortable align="center" prop="closeInterval" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column fixed="right" :label="this.$t('zt')" align="center" prop="productChStatus" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="getDity2(scope.row,'productChStatus', scope.$index)=='0'" style="color: red">{{getDity1(scope.row,'productChStatus', scope.$index)}}</span>
|
|
|
- <span v-else-if="getDity2(scope.row,'productChStatus', scope.$index)=='1'" style="color: green">{{getDity1(scope.row,'productChStatus', scope.$index)}}</span>
|
|
|
- <span v-else style="color: #c747b1">{{getDity1(scope.row,'productChStatus', scope.$index)}}</span>
|
|
|
- <!--<span v-else style="color: green">{{getDity1y1(scope.row,'productChStatus', scope.$index)}}</span>-->
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column fixed="right" :label="this.$t('cz')" align="center" width="140" class-name="small-padding fixed-width">
|
|
|
- <template slot-scope="scope" >
|
|
|
- <el-button
|
|
|
- v-if="scope.row.productChStatus == '0'"
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-refresh"
|
|
|
- @click="handleCommand('channelopen',scope.row)"
|
|
|
- >{{$t('dk')}}</el-button>
|
|
|
- <el-button
|
|
|
- v-if="scope.row.productChStatus == '1'"
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-refresh"
|
|
|
- @click="handleCommand('channelclose',scope.row)"
|
|
|
- >{{$t('gb')}}</el-button>
|
|
|
-
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column fixed="right" :label="this.$t('sclx')" width="120" align="center" prop="outputType" :show-overflow-tooltip="true" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <span @click="onclickOutType(scope.row, scope.$index)" v-if="scope.row.outputType=='1'" style="color: red;cursor: pointer">{{getDity(scope.row,'outputTypes')}}</span>
|
|
|
- <span @click="onclickOutType(scope.row,scope.$index)" v-else style="color: #5C92B7;cursor: pointer">{{getDity(scope.row,'outputTypes')}}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column fixed="right" :label="this.$t('pz')" align="center" width="100" class-name="small-padding fixed-width">
|
|
|
- <template slot-scope="scope" >
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
- @click="handleUpdate(scope.row)"
|
|
|
- >{{$t('xg')}}</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-card>
|
|
|
- <!--<el-card v-if="this.productType==='4'" style="min-height: 700px ; border-radius: 15px">-->
|
|
|
- <!--<el-table min-height="700px" max-height="700px" v-loading="loading" :data="channelList" style="overflow-y: auto" :header-cell-style="{ background:'#FFFFFF',color:'#000000'}">-->
|
|
|
- <!--<!–<el-table-column type="selection" width="55" align="center" />–>-->
|
|
|
- <!--<el-table-column fixed :label="this.$t('sbmc')" prop="productName" />-->
|
|
|
- <!--<el-table-column :label="this.$t('sbbh')" v-if="false" prop="productNumber" />-->
|
|
|
- <!--<el-table-column label="设备id" v-if="false" prop="productId" />-->
|
|
|
- <!--<el-table-column fixed :label="this.$t('tdmc')" prop="productChName" />-->
|
|
|
- <!--<el-table-column fixed :label="this.$t('tdh')" prop="productChId" :show-overflow-tooltip="true" />-->
|
|
|
-
|
|
|
- <!--<el-table-column :label="this.$t('sxxx')" prop="productPhOrder" :show-overflow-tooltip="true" >-->
|
|
|
- <!--<template slot-scope="scope">-->
|
|
|
- <!--<span >{{getDity(scope.row,'productPhOrders')}}</span>-->
|
|
|
- <!--</template>-->
|
|
|
- <!--</el-table-column>-->
|
|
|
-
|
|
|
- <!--<el-table-column :label="this.$t('dy')+'(V)'" width="100" prop="productChVoltage" :show-overflow-tooltip="true" />-->
|
|
|
- <!--<el-table-column :label="this.$t('dl')+'(A)'" width="100" prop="productChCurrent" :show-overflow-tooltip="true" />-->
|
|
|
- <!--<el-table-column :label="this.$t('gl')+'(W)'" width="100" prop="productChPower" :show-overflow-tooltip="true" align="center" />-->
|
|
|
- <!--<el-table-column :label="this.$t('pl')" v-if="this.productType!='1'" align="center" prop="productChPowerFreq" :show-overflow-tooltip="true"/>-->
|
|
|
- <!--<el-table-column :label="this.$t('hdl')+'(Kwh)'" width="120" align="center" prop="productChConsumption" :show-overflow-tooltip="true" />-->
|
|
|
- <!--<el-table-column :label="this.$t('glys')" v-if="this.productType!='1'" align="center" prop="productChPowerFactor" :show-overflow-tooltip="true"/>-->
|
|
|
- <!--<el-table-column :label="this.$t('kqys')+'(S)'" width="140" sortable prop="firingInterval" align="center" :show-overflow-tooltip="true" />-->
|
|
|
- <!--<el-table-column :label="this.$t('gbys')+'(S)'" width="140" sortable align="center" prop="closeInterval" :show-overflow-tooltip="true"/>-->
|
|
|
- <!--<el-table-column fixed="right" :label="this.$t('zt')" align="center" prop="productChStatus" >-->
|
|
|
- <!--<template slot-scope="scope">-->
|
|
|
- <!--<span v-if="scope.row.productChStatus=='0'" style="color: red">{{getDity(scope.row,'productChStatus')}}</span>-->
|
|
|
- <!--<span v-else style="color: green">{{getDity(scope.row,'productChStatus')}}</span>-->
|
|
|
- <!--</template>-->
|
|
|
- <!--</el-table-column>-->
|
|
|
- <!--<el-table-column fixed="right" :label="this.$t('cz')" align="center" width="100" class-name="small-padding fixed-width">-->
|
|
|
- <!--<template slot-scope="scope" >-->
|
|
|
- <!--<el-button-->
|
|
|
- <!--v-if="scope.row.productChStatus == '0'"-->
|
|
|
- <!--size="mini"-->
|
|
|
- <!--type="text"-->
|
|
|
- <!--icon="el-icon-refresh"-->
|
|
|
- <!--@click="handleCommand('channelopen',scope.row)"-->
|
|
|
- <!-->{{$t('dk')}}</el-button>-->
|
|
|
- <!--<el-button-->
|
|
|
- <!--v-if="scope.row.productChStatus == '1'"-->
|
|
|
- <!--size="mini"-->
|
|
|
- <!--type="text"-->
|
|
|
- <!--icon="el-icon-refresh"-->
|
|
|
- <!--@click="handleCommand('channelclose',scope.row)"-->
|
|
|
- <!-->{{$t('gb')}}</el-button>-->
|
|
|
-
|
|
|
- <!--</template>-->
|
|
|
- <!--</el-table-column>-->
|
|
|
- <!--<el-table-column fixed="right" :label="this.$t('pz')" align="center" width="100" class-name="small-padding fixed-width">-->
|
|
|
- <!--<template slot-scope="scope" >-->
|
|
|
- <!--<el-button-->
|
|
|
- <!--size="mini"-->
|
|
|
- <!--type="text"-->
|
|
|
- <!--icon="el-icon-edit"-->
|
|
|
- <!--@click="handleUpdate(scope.row)"-->
|
|
|
- <!-->{{$t('xg')}}</el-button>-->
|
|
|
- <!--</template>-->
|
|
|
- <!--</el-table-column>-->
|
|
|
- <!--</el-table>-->
|
|
|
-
|
|
|
- <!--</el-card>-->
|
|
|
- <el-card v-if="this.productType!='4' && this.productType!='3'" style="min-height: 700px ; border-radius: 15px">
|
|
|
-
|
|
|
- <el-table min-height="700px" max-height="700px" v-loading="loading" :data="channelList" style="overflow-y: auto" :header-cell-style="{ background:'#FFFFFF',color:'#000000'}">
|
|
|
- <!--<el-table-column type="selection" width="55" align="center" />-->
|
|
|
- <el-table-column fixed :label="this.$t('sbmc')" :min-width="getStringWidth(this.$t('sbmc'))" prop="productName" />
|
|
|
- <el-table-column :label="this.$t('sbbh')" v-if="false" prop="productNumber" />
|
|
|
- <el-table-column label="设备id" v-if="false" prop="productId" />
|
|
|
- <el-table-column fixed :label="this.$t('tdmc')" :min-width="getStringWidth(this.$t('tdmc'))" prop="productChName" />
|
|
|
- <el-table-column fixed :label="this.$t('tdh')" :min-width="getStringWidth(this.$t('tdh'))" prop="productChId" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column :label="this.$t('sxxx')" v-if="this.productType=='3'" prop="productPhOrder" :show-overflow-tooltip="true" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <span >{{getDity(scope.row,'productPhOrders')}}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column v-if="this.productType=='3'" :label="this.$t('sxx')+this.$t('dy')+'(V)'" :min-width="getStringWidth(this.$t('dy'))" prop="productPhOrderDy" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column v-if="this.productType=='3'" :label="this.$t('sxx')+this.$t('dl')+'(A)'" :min-width="getStringWidth(this.$t('dl'))" prop="productPhOrderDl" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column v-if="this.productType=='3'" :label="this.$t('sxx')+this.$t('gl')+'(W)'" :min-width="getStringWidth(this.$t('gl'))" prop="productPhOrderGl" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column v-if="this.productType=='3'" :label="this.$t('sxx')+this.$t('hdl')+'(Kwh)'" :min-width="getStringWidth(this.$t('hdl'))" prop="productPhOrderHdl" :show-overflow-tooltip="true" />
|
|
|
-
|
|
|
-
|
|
|
- <el-table-column :label="this.$t('dy')+'(V)'" :min-width="getStringWidth(this.$t('dy'))" prop="productChVoltage" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column :label="this.$t('dl')+'(A)'" :min-width="getStringWidth(this.$t('dl'))" prop="productChCurrent" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column :label="this.$t('gl')+'(W)'" :min-width="getStringWidth(this.$t('gl'))" prop="productChPower" :show-overflow-tooltip="true" align="center" />
|
|
|
- <el-table-column :label="this.$t('pl')" v-if="this.productType!='1'" :min-width="getStringWidth(this.$t('pl'))" align="center" prop="productChPowerFreq" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column :label="this.$t('hdl')+'(Kwh)'" :min-width="getStringWidth(this.$t('hdl'))" align="center" prop="productChConsumption" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column :label="this.$t('glys')" v-if="this.productType!='1'" :min-width="getStringWidth(this.$t('glys'))" align="center" prop="productChPowerFactor" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column :label="this.$t('kqys')+'(S)'" :min-width="getStringWidth(this.$t('kqys'))" sortable prop="firingInterval" align="center" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column :label="this.$t('gbys')+'(S)'" :min-width="getStringWidth(this.$t('gbys'))" sortable align="center" prop="closeInterval" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column fixed="right" :label="this.$t('zt')" align="center" prop="productChStatus" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="scope.row.productChStatus=='0'" style="color: red">{{getDity(scope.row,'productChStatus')}}</span>
|
|
|
- <span v-else-if="scope.row.productChStatus=='1'" style="color: green">{{getDity(scope.row,'productChStatus')}}</span>
|
|
|
- <span v-else style="color: #c747b1">{{getDity(scope.row,'productChStatus')}}</span>
|
|
|
- <!--<span v-else style="color: green">{{getDity(scope.row,'productChStatus')}}</span>-->
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column fixed="right" :label="this.$t('cz')" align="center" width="100" class-name="small-padding fixed-width">
|
|
|
- <template slot-scope="scope" >
|
|
|
- <el-button
|
|
|
- v-if="scope.row.productChStatus == '0'"
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-refresh"
|
|
|
- @click="handleCommand('channelopen',scope.row)"
|
|
|
- >{{$t('dk')}}</el-button>
|
|
|
- <el-button
|
|
|
- v-if="scope.row.productChStatus == '1'"
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-refresh"
|
|
|
- @click="handleCommand('channelclose',scope.row)"
|
|
|
- >{{$t('gb')}}</el-button>
|
|
|
-
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column fixed="right" :label="this.$t('pz')" align="center" width="100" class-name="small-padding fixed-width">
|
|
|
- <template slot-scope="scope" >
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
- @click="handleUpdate(scope.row)"
|
|
|
- >{{$t('xg')}}</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-card>
|
|
|
- <!-- 编辑通道-->
|
|
|
- <el-dialog :title="title" :visible.sync="open" width="500px" :close-on-click-modal="false" :close-on-press-escape="false" append-to-body>
|
|
|
- <el-form ref="form" :model="form" label-width="auto">
|
|
|
- <el-form-item :label="this.$t('tdh')" prop="productChId">
|
|
|
- <el-input :readonly="true" :disabled="true" v-model="form.productChId" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item :label="this.$t('tdmc')" prop="productChName">
|
|
|
- <el-input v-model="form.productChName" />
|
|
|
- </el-form-item>
|
|
|
- <!--<el-form-item :label="this.$t('sxxx')" v-if="this.productType=='4'">-->
|
|
|
- <!--<el-select style="width: 100%" v-model="form.productPhOrder" allow-create clearable filterable>-->
|
|
|
- <!--<el-option v-for="item in productPhOrders" :key="item.id" :label="$t(item.name)" :value="item.id">-->
|
|
|
- <!--</el-option>-->
|
|
|
- <!--</el-select>-->
|
|
|
- <!--</el-form-item>-->
|
|
|
-
|
|
|
- <el-form-item :label="this.$t('tdfzlx')">
|
|
|
- <el-select style="width: 100%" v-model="form.ChannelLoadType" :placeholder="this.$t('tdtisy')" allow-create clearable filterable>
|
|
|
- <el-option v-for="item in channelLoadTypes" :key="item" :label="$t(item)" :value="item">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitForm">{{$t('qd')}}</el-button>
|
|
|
- <el-button @click="cancel">{{$t('qx')}}</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
- <!-- 输出类型弹窗修改-->
|
|
|
- <el-dialog :title="outTitle" :visible.sync="outOpen" width="500px" :close-on-click-modal="false" :close-on-press-escape="false" append-to-body>
|
|
|
- <el-form ref="outForm" :model="outForm" label-width="auto">
|
|
|
- <el-form-item :label="this.$t('tdh')" v-if="false" prop="productChId">
|
|
|
- <el-input :readonly="true" v-model="outForm.productChId" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item :label="this.$t('tdmc')" v-if="false" prop="productChName">
|
|
|
- <el-input v-model="outForm.productChName" />
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item :label="this.$t('sclx')">
|
|
|
- <el-select style="width: 100%" v-model="outForm.outputType" @change="handleSelectChange2" allow-create filterable>
|
|
|
- <el-option v-for="item in outputTypes" :key="item.id" :label="$t(item.name)" :value="item.id">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item :label="this.$t('sxxx')">
|
|
|
- <el-select :disabled="disabled2" style="width: 100%" v-model="outForm.productPhOrder" allow-create filterable>
|
|
|
- <el-option v-for="item in productPhOrders" :key="item.id" :label="$t(item.name)" :value="item.id">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- </el-form>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitForm1">{{$t('qd')}}</el-button>
|
|
|
- <el-button @click="cancel1">{{$t('qx')}}</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
- import { list, forceLogout } from "@/api/monitor/online";
|
|
|
- import {channelStatusMonitoring ,overallStatusMonitoring,equipmentMintenance} from "@/api/pdu/pduServer";
|
|
|
-
|
|
|
- export default {
|
|
|
- name: "Online",
|
|
|
- data() {
|
|
|
- return {
|
|
|
- // 遮罩层
|
|
|
- loading: true,
|
|
|
- // 总条数
|
|
|
- total: 0,
|
|
|
- // 设备列表
|
|
|
- productList:[],
|
|
|
- // 表格数据
|
|
|
- channelList: [],
|
|
|
- // 弹出层标题
|
|
|
- title: "",
|
|
|
- // 是否显示弹出层
|
|
|
- open: false,
|
|
|
- // 输出类型弹出层标题
|
|
|
- outTitle: "",
|
|
|
- // 是否显示输出类型弹出层
|
|
|
- outOpen: false,
|
|
|
- // 通道配置表单参数
|
|
|
- form: {},
|
|
|
- outForm: {},
|
|
|
- channelLoadTypes:["kt","fwq","jhj","lyq","jsj","xsq","d","qt"],
|
|
|
- // 查询参数
|
|
|
- queryParams: {
|
|
|
- productChName: "",
|
|
|
- productId: "",
|
|
|
- productName: "",
|
|
|
- token: "",
|
|
|
- type: "",
|
|
|
- },
|
|
|
- usertoken:"",
|
|
|
- // 通道状态
|
|
|
- productChStatuss:[{"id":"0","name":"duank"},{"id":"1","name":"jt"},{"id":"-1","name":"lix"}],
|
|
|
- //3相类型
|
|
|
- productPhOrders:[{"id":"L1","name":"sxax"},{"id":"L2","name":"sxbx"},{"id":"L3","name":"sxcx"},],
|
|
|
- // 输出类型
|
|
|
- outputTypes:[{"id":"1","name":"sx"},{"id":"2","name":"dx"}],
|
|
|
- // 输出状态
|
|
|
- outputStatus:[{"id":"1","name":"sc"},{"id":"2","name":"bsc"}],
|
|
|
- productType:"",
|
|
|
- disabled2:false
|
|
|
- };
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- //监听websocket消息
|
|
|
-
|
|
|
- this.$bus.$on('CHANNEL_STATUS_MONITORING', this.onSocketMessageToChannel);
|
|
|
- },
|
|
|
- created() {
|
|
|
- this.usertoken= this.$store.state.user.usertoken;
|
|
|
- // this.dataRefreh();
|
|
|
- this.queryProductList();
|
|
|
- },
|
|
|
- methods: {
|
|
|
- getStringWidth(text) {
|
|
|
- //console.log('text', text)
|
|
|
- const font = '14px Arial'
|
|
|
- const canvas = document.createElement('canvas')
|
|
|
- const context = canvas.getContext('2d')
|
|
|
- context.font = font
|
|
|
- const metrics = context.measureText(text)
|
|
|
- // console.log('metrics.width', metrics.width)
|
|
|
- return metrics.width + 40
|
|
|
- },
|
|
|
- handleSelectChange2(type){
|
|
|
- if(type=='1'){
|
|
|
- this.disabled2=true;
|
|
|
- }else{
|
|
|
- this.disabled2=false;
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
- onclickOutType(row,index){
|
|
|
-
|
|
|
- this.outForm =JSON.parse(JSON.stringify(row));
|
|
|
- this.outTitle = this.$t('pz');
|
|
|
- if(row.outputType=='1'){
|
|
|
- this.disabled2=true;
|
|
|
- }else{
|
|
|
- this.disabled2=false;
|
|
|
- }
|
|
|
- var productPhOrder="";
|
|
|
- if(row.outputType=='2'){
|
|
|
- for(var i=index;i<index+2;i++){
|
|
|
- const obj=this.channelList[i];
|
|
|
- if(obj.outputStatus=='1'){
|
|
|
- productPhOrder=obj.productPhOrder;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- this.outForm.productPhOrder=productPhOrder;
|
|
|
- }
|
|
|
-
|
|
|
- this.outOpen=true;
|
|
|
- },
|
|
|
- objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
- if (columnIndex === 0 || columnIndex === 1 || columnIndex === 2 || columnIndex === 8 || columnIndex === 9 || columnIndex === 10 || columnIndex === 11 || columnIndex === 12 || columnIndex === 13 || columnIndex === 14 || columnIndex === 15 || columnIndex === 16 || columnIndex === 17 || columnIndex === 18 || columnIndex === 19 ) {
|
|
|
-
|
|
|
- if (rowIndex % 3 === 0) {
|
|
|
- return {
|
|
|
- rowspan: 3,
|
|
|
- colspan: 1
|
|
|
- };
|
|
|
- } else {
|
|
|
- return {
|
|
|
- rowspan: 0,
|
|
|
- colspan: 0
|
|
|
- };
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- // 设备列表
|
|
|
- queryProductList(){
|
|
|
- const params={};
|
|
|
- params.token= this.usertoken;
|
|
|
- params.type= "listSbRestartQuery";
|
|
|
- equipmentMintenance(params).then(response => {
|
|
|
- this.productList = response.data;
|
|
|
- this.queryParams.productId= this.productList[0].productId;
|
|
|
- this.productType=this.productList[0].productType
|
|
|
- this.handleQuery();
|
|
|
- }).catch(() => {});
|
|
|
- },
|
|
|
- //推送通道状态
|
|
|
- onSocketMessageToChannel(recvMessage) {
|
|
|
- if (recvMessage.success) {
|
|
|
- let resultData =recvMessage.data.data
|
|
|
- if(recvMessage.data!=null && resultData!='' && resultData!=null){
|
|
|
- this.channelList = resultData;
|
|
|
- }
|
|
|
-
|
|
|
- // this.handleQuery();
|
|
|
- }
|
|
|
- },
|
|
|
- //格式化培训形式
|
|
|
- getDity(row,type) {
|
|
|
- var name="";
|
|
|
- var id="";
|
|
|
- var formTrain=[];
|
|
|
- if(type=='productChStatus'){
|
|
|
- formTrain=this.productChStatuss
|
|
|
- id=row.productChStatus
|
|
|
- }else if(type=='alarmStatus'){
|
|
|
- formTrain=this.alarmStatuss
|
|
|
- id=row.alarmStatus
|
|
|
- }else if(type=='connectionStatus'){
|
|
|
- formTrain=this.connectionStatuss
|
|
|
- id=row.connectionStatus
|
|
|
- }else if(type=='waterImmersionState'){
|
|
|
- formTrain=this.waterImmersionStates
|
|
|
- id=row.waterImmersionState
|
|
|
- }else if(type=='waterImmersionState'){
|
|
|
- formTrain=this.waterImmersionStates
|
|
|
- id=row.waterImmersionState
|
|
|
- }else if(type=='productPhOrders'){
|
|
|
- formTrain=this.productPhOrders
|
|
|
- id=row.productPhOrder
|
|
|
- }else if(type=='outputTypes'){
|
|
|
- formTrain=this.outputTypes
|
|
|
- id=row.outputType
|
|
|
- }
|
|
|
- for (var i = 0; i < formTrain.length; i++) {
|
|
|
- let item = formTrain[i]
|
|
|
- if (id== item.id) {
|
|
|
- name=item.name;
|
|
|
- return this.$t(item.name)
|
|
|
- }
|
|
|
- }
|
|
|
- return name;
|
|
|
- },
|
|
|
-
|
|
|
- getDity1(row,type,index) {
|
|
|
- var name="";
|
|
|
- var id="";
|
|
|
- var formTrain=[];
|
|
|
- if(type=='productChStatus'){
|
|
|
- var productChStatus='';
|
|
|
- for(var i=index;i<index+2;i++){
|
|
|
- const obj=this.channelList[i];
|
|
|
- if(obj.outputStatus=='1'){
|
|
|
- productChStatus=obj.productChStatus;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- formTrain=this.productChStatuss
|
|
|
- id=productChStatus
|
|
|
- }else if(type=='alarmStatus'){
|
|
|
- formTrain=this.alarmStatuss
|
|
|
- id=row.alarmStatus
|
|
|
- }else if(type=='connectionStatus'){
|
|
|
- formTrain=this.connectionStatuss
|
|
|
- id=row.connectionStatus
|
|
|
- }else if(type=='waterImmersionState'){
|
|
|
- formTrain=this.waterImmersionStates
|
|
|
- id=row.waterImmersionState
|
|
|
- }else if(type=='waterImmersionState'){
|
|
|
- formTrain=this.waterImmersionStates
|
|
|
- id=row.waterImmersionState
|
|
|
- }else if(type=='productPhOrders'){
|
|
|
- formTrain=this.productPhOrders
|
|
|
- id=row.productPhOrder
|
|
|
- }else if(type=='outputTypes'){
|
|
|
- formTrain=this.outputTypes
|
|
|
- id=row.outputType
|
|
|
- }
|
|
|
- for (var i = 0; i < formTrain.length; i++) {
|
|
|
- let item = formTrain[i]
|
|
|
- if (id== item.id) {
|
|
|
- name=item.name;
|
|
|
- return this.$t(item.name)
|
|
|
- }
|
|
|
- }
|
|
|
- return name;
|
|
|
- },
|
|
|
- getDity2(row,type,index) {
|
|
|
- var name="";
|
|
|
- var id="";
|
|
|
- var formTrain=[];
|
|
|
- if(type=='productChStatus'){
|
|
|
- var productChStatus='';
|
|
|
- for(var i=index;i<index+2;i++){
|
|
|
- const obj=this.channelList[i];
|
|
|
- if(obj.outputStatus=='1'){
|
|
|
- productChStatus=obj.productChStatus;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- formTrain=this.productChStatuss
|
|
|
- id=productChStatus
|
|
|
- }
|
|
|
- return id;
|
|
|
- },
|
|
|
- dataRefreh(){
|
|
|
- // 计时器为空,操作
|
|
|
- setInterval(() => {
|
|
|
- this.queryChannelStatus();
|
|
|
- }, 1000);
|
|
|
- },
|
|
|
- // 通道列表
|
|
|
- queryChannelStatus(){
|
|
|
- this.queryParams.token=this.usertoken;
|
|
|
- this.queryParams.type="listQuery";
|
|
|
- this.loading = true;
|
|
|
- for(var i=0;i<this.productList.length;i++){
|
|
|
- if(this.queryParams.productId==this.productList[i].productId){
|
|
|
- this.productType=this.productList[i].productType
|
|
|
- }
|
|
|
- }
|
|
|
- channelStatusMonitoring(this.queryParams).then(response => {
|
|
|
- if(response.data!=null){
|
|
|
- this.channelList = response.data;
|
|
|
- }
|
|
|
-
|
|
|
- }).catch(() => {});
|
|
|
- this.loading = false;
|
|
|
- },
|
|
|
- queryChannelStatus11(){
|
|
|
- this.queryParams.token=this.usertoken;
|
|
|
- this.queryParams.type="resetChannel";
|
|
|
- this.loading = true;
|
|
|
- for(var i=0;i<this.productList.length;i++){
|
|
|
- if(this.queryParams.productId==this.productList[i].productId){
|
|
|
- this.productType=this.productList[i].productType
|
|
|
- }
|
|
|
- }
|
|
|
- channelStatusMonitoring(this.queryParams).then(response => {
|
|
|
- this.channelList = response.data;
|
|
|
- }).catch(() => {});
|
|
|
- this.loading = false;
|
|
|
- },
|
|
|
- queryChannelStatus12(){
|
|
|
- const param={};
|
|
|
- param.token=this.usertoken;
|
|
|
- param.type="resetChannel";
|
|
|
- param.productId= this.queryParams.productId;
|
|
|
- var aa=this;
|
|
|
- this.$modal.confirm(this.$t('jcqr')).then(function() {
|
|
|
- equipmentMintenance(param).then(response => {
|
|
|
- aa.$modal.msgSuccess(aa.$t('zxcg'));
|
|
|
- aa.queryChannelStatus();
|
|
|
- }).catch(() => {});
|
|
|
- }).then(() => {
|
|
|
-
|
|
|
- }).catch(() => {});
|
|
|
-
|
|
|
- // channelStatusMonitoring(this.queryParams).then(response => {
|
|
|
- // this.channelList = response.data;
|
|
|
- // }).catch(() => {});
|
|
|
-
|
|
|
- },
|
|
|
- /** 修改按钮操作 */
|
|
|
- handleUpdate(row) {
|
|
|
- this.form =row;
|
|
|
- this.open = true;
|
|
|
- this.title = this.$t('xg');
|
|
|
- },
|
|
|
- /** 搜索按钮操作 */
|
|
|
- handleQuery() {
|
|
|
- this.queryChannelStatus();
|
|
|
- },
|
|
|
- /** 重置按钮操作 */
|
|
|
- resetQuery() {
|
|
|
- this.resetForm("queryForm");
|
|
|
- this.handleQuery();
|
|
|
- },
|
|
|
- // 更多操作触发
|
|
|
- handleCommand(command, row) {
|
|
|
- const params={};
|
|
|
- params.token=this.usertoken;
|
|
|
- params.productChId=row.productChId;
|
|
|
- switch (command) {
|
|
|
- case "channelopen":
|
|
|
- params.type="open";
|
|
|
- this.$modal.confirm(this.$t('qrykqm')).then(function() {
|
|
|
- channelStatusMonitoring(params);
|
|
|
- }).then(() => {
|
|
|
- this.$modal.msgSuccess(this.$t('zxcg'));
|
|
|
- this.handleQuery();
|
|
|
- }).catch(() => {});
|
|
|
-
|
|
|
- break;
|
|
|
- case "channelclose":
|
|
|
- params.type="close";
|
|
|
-
|
|
|
- this.$modal.confirm(this.$t('qrygbm')).then(function() {
|
|
|
- channelStatusMonitoring(params);
|
|
|
- }).then(() => {
|
|
|
- this.$modal.msgSuccess(this.$t('zxcg'));
|
|
|
- this.handleQuery();
|
|
|
- }).catch(() => {});
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- /** 提交按钮 */
|
|
|
- submitForm: function() {
|
|
|
- this.$refs["form"].validate(valid => {
|
|
|
- if (valid) {
|
|
|
- const params={};
|
|
|
- params.token=this.usertoken;
|
|
|
- params.type="save";
|
|
|
- params.productChName=this.form.productChName;
|
|
|
- params.productChId=this.form.productChId;
|
|
|
- params.productPhOrder=this.form.productPhOrder;
|
|
|
- params.ChannelLoadType=this.$t(this.form.ChannelLoadType);
|
|
|
- this.loading = true;
|
|
|
- channelStatusMonitoring(params).then(response => {
|
|
|
- this.open = false;
|
|
|
- this.$modal.msgSuccess(this.$t('zxcg'));
|
|
|
- this.handleQuery();
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- /** 三相输出提交按钮 */
|
|
|
- submitForm1: function() {
|
|
|
- this.$refs["outForm"].validate(valid => {
|
|
|
- if (valid) {
|
|
|
- const params={};
|
|
|
- params.token=this.usertoken;
|
|
|
- params.type="threeTypeSave";
|
|
|
- params.productChName=this.outForm.productChName;
|
|
|
- params.productChId=this.outForm.productChId;
|
|
|
- params.productPhOrder=this.outForm.productPhOrder;
|
|
|
- params.outputType=this.outForm.outputType;
|
|
|
- this.loading = true;
|
|
|
- let aa=this;
|
|
|
- this.$modal.confirm(this.$t('qdybcm')).then(function() {
|
|
|
- channelStatusMonitoring(params).then(response => {
|
|
|
- aa.outOpen = false;
|
|
|
- aa.$modal.msgSuccess(aa.$t('zxcg'));
|
|
|
- aa.handleQuery();
|
|
|
- });
|
|
|
- }).then(() => {
|
|
|
- }).catch(() => {});
|
|
|
-
|
|
|
- // channelStatusMonitoring(params).then(response => {
|
|
|
- // this.outOpen = false;
|
|
|
- // this.$modal.msgSuccess(this.$t('zxcg'));
|
|
|
- // this.handleQuery();
|
|
|
- // });
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- // 取消按钮
|
|
|
- cancel() {
|
|
|
- this.open = false;
|
|
|
- // this.reset();
|
|
|
- },
|
|
|
- // 三相输出取消按钮
|
|
|
- cancel1() {
|
|
|
- this.outOpen = false;
|
|
|
- this.handleQuery();
|
|
|
- // this.reset();
|
|
|
- },
|
|
|
-
|
|
|
- // 更多操作触发
|
|
|
- handleZtCommand(command, productChId) {
|
|
|
- const params={};
|
|
|
- params.token=this.usertoken;
|
|
|
- params.productChId=productChId;
|
|
|
- if(productChId==''){
|
|
|
- this.$modal.msgWarning(this.$t('qxz')+this.$t('shib'));
|
|
|
- return;
|
|
|
- }
|
|
|
- switch (command) {
|
|
|
- case "open":
|
|
|
- params.type="open";
|
|
|
- this.$modal.confirm(this.$t('qrykqm2')).then(function() {
|
|
|
- overallStatusMonitoring(params);
|
|
|
- }).then(() => {
|
|
|
- this.$modal.msgSuccess(this.$t('zxcg'));
|
|
|
- this.handleQuery();
|
|
|
- }).catch(() => {});
|
|
|
-
|
|
|
- break;
|
|
|
- case "close":
|
|
|
- params.type="close";
|
|
|
- this.$modal.confirm(this.$t('qrygbm2')).then(function() {
|
|
|
- overallStatusMonitoring(params);
|
|
|
- }).then(() => {
|
|
|
- this.$modal.msgSuccess(this.$t('zxcg'));
|
|
|
- this.handleQuery();
|
|
|
- }).catch(() => {});
|
|
|
-
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- },
|
|
|
- /** 强退按钮操作 */
|
|
|
- handleForceLogout(row) {
|
|
|
- this.$modal.confirm(this.$t('sfqztc') + row.userName + this.$t('yhm')).then(function() {
|
|
|
- return forceLogout(row.tokenId);
|
|
|
- }).then(() => {
|
|
|
- this.getList();
|
|
|
- this.$modal.msgSuccess(this.$t('qtcg'));
|
|
|
- }).catch(() => {});
|
|
|
- }
|
|
|
- }
|
|
|
- };
|
|
|
-</script>
|
|
|
-
|