|
|
@@ -244,7 +244,7 @@
|
|
|
</el-table>
|
|
|
</el-card>
|
|
|
|
|
|
- <el-card v-if="this.productType!='4' && this.productType!='3'" style="min-height: 700px ; border-radius: 15px">
|
|
|
+ <el-card v-if="this.productType!='4' && this.productType!='3' && this.productType!='6'" 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" />-->
|
|
|
@@ -341,6 +341,113 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</el-card>
|
|
|
+ <el-card v-if="this.productType==='6'" style="min-height: 700px ; border-radius: 15px">
|
|
|
+ <el-table min-height="700px" v-loading="loading" max-height="700px" :data="channelList" :span-method="objectSpanMethod2" 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')" key="1" :min-width="getStringWidth(this.$t('sbmc'))" prop="productName" />
|
|
|
+ <el-table-column :label="this.$t('sbbh')" v-if="false" key="52" prop="productNumber" />
|
|
|
+ <el-table-column label="设备id" v-if="false" prop="productId" key="53" />
|
|
|
+ <el-table-column fixed :label="this.$t('tdmc')" key="2" :min-width="getStringWidth(this.$t('tdmc'))" prop="productChName" />
|
|
|
+ <el-table-column fixed :label="this.$t('tdh')" key="3" :min-width="getStringWidth(this.$t('tdh'))" prop="productChId" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column align="center" v-if="this.productParams.dwkjk=='1'" key="4" :label="this.$t('MACadress')" :min-width="getStringWidth(this.$t('MACadress'))+50" prop="MACadress" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column align="center" v-if="this.productParams.dwkjk=='1'" key="5" :label="this.$t('IPadress')" :min-width="getStringWidth(this.$t('IPadress'))+50" prop="IPadress" :show-overflow-tooltip="true" />
|
|
|
+
|
|
|
+ <el-table-column :label="this.$t('sxxx')" :min-width="getStringWidth(this.$t('sxxx'))" key="6" 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)'" key="7" :min-width="getStringWidth(this.$t('sxxdy')+'(V)')" prop="productPhOrderDy" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column :label="this.$t('sxxdl')+'(A)'" key="8" :min-width="getStringWidth(this.$t('sxxdl')+'(A)')" prop="productPhOrderDl" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column :label="this.$t('sxxgl')+'(W)'" key="9" :min-width="getStringWidth(this.$t('sxxgl')+'(W)')" prop="productPhOrderGl" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column :label="this.$t('sxxhdl')+'(kWh)'" key="10" :min-width="getStringWidth(this.$t('sxxhdl')+'(kWh)')" 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')+'(W)')" key="11" prop="productChPower" :show-overflow-tooltip="true" align="center" />
|
|
|
+ <el-table-column :label="this.$t('pl')" v-if="this.productType!='1'" key="12" :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')+'(kWh)')" key="13" align="center" prop="productChConsumption" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column :label="this.$t('glys')" v-if="this.productType!='1'" key="14" :min-width="getStringWidth(this.$t('glys'))" align="center" prop="productChPowerFactor" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column v-if="this.productParams.jkfs==='2'" key="115" :label="this.$t('kqys')+'(S)'" :min-width="getStringWidth(this.$t('kqys')+'(S)')" prop="firingInterval" align="center" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column v-if="this.productParams.jkfs==='2'" key="116" :label="this.$t('gbys')+'(S)'" :min-width="getStringWidth(this.$t('gbys')+'(S)')" align="center" prop="closeInterval" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column fixed="right" :label="this.$t('lxzt')" key="17" v-if="this.productParams.lxkz=='1'" :min-width="getStringWidth(this.$t('lxzt'))" align="center" prop="productChZeroStatus" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="getDity2(scope.row,'productChZeroStatus', scope.$index)=='0'" style="color: red">{{getDity1(scope.row,'productChZeroStatus', scope.$index)}}</span>
|
|
|
+ <span v-else-if="getDity2(scope.row,'productChZeroStatus', scope.$index)=='1'" style="color: green">{{getDity1(scope.row,'productChZeroStatus', scope.$index)}}</span>
|
|
|
+ <span v-else style="color: #c747b1">{{getDity1(scope.row,'productChZeroStatus', 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('lxcz')" key="18" v-if="this.productParams.lxkz=='1'" align="center" :min-width="getStringWidth(this.$t('lxcz'))" class-name="small-padding fixed-width">
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <el-button
|
|
|
+ v-if="getDity2(scope.row,'productChZeroStatus', scope.$index)=='0'"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-refresh"
|
|
|
+ @click="handleCommand2('channelopen',scope.row)"
|
|
|
+ >{{$t('dk')}}</el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="getDity2(scope.row,'productChZeroStatus', scope.$index)=='1'"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-refresh"
|
|
|
+ @click="handleCommand2('channelclose',scope.row)"
|
|
|
+ >{{$t('gb')}}</el-button>
|
|
|
+
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column fixed="right" :label="this.$t('zt')" key="19" v-if="this.productParams.jkfs==='2'" width="100" 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')" key="20" v-if="this.productParams.jkfs==='2'" align="center" :min-width="getStringWidth(this.$t('cz'))" class-name="small-padding fixed-width">
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <el-button
|
|
|
+ v-if="getDity2(scope.row,'productChStatus', scope.$index)=='0'"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-refresh"
|
|
|
+ @click="handleCommand('channelopen',scope.row)"
|
|
|
+ >{{$t('dk')}}</el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="getDity2(scope.row,'productChStatus', scope.$index)=='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')" key="21" :min-width="getStringWidth(this.$t('sclx'))" 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' || scope.row.outputType=='3'" 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')" :min-width="getStringWidth($t('pz'))" key="22" v-if="this.productParams.jkfs=='2'" align="center" 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">
|
|
|
@@ -380,19 +487,26 @@
|
|
|
<el-input v-model="outForm.productChName" />
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item :label="this.$t('sclx')">
|
|
|
+ <el-form-item :label="this.$t('sclx')" v-if="this.productType!='6'">
|
|
|
+ <el-select :disabled="disabled3" style="width: 100%" v-model="outForm.outputType" @change="handleSelectChange2" allow-create filterable>
|
|
|
+ <el-option v-for="item in outputTypes2" :key="item.id" :label="$t(item.name)" :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item :label="this.$t('sclx')" v-else >
|
|
|
<el-select :disabled="disabled3" 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 v-for="item in outputTypes3" :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-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 v-for="item in productPhOrders2" :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>
|
|
|
@@ -468,8 +582,18 @@
|
|
|
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"},],
|
|
|
+
|
|
|
+ //3相类型
|
|
|
+ productPhOrders2:[],
|
|
|
// 输出类型
|
|
|
- outputTypes:[{"id":"1","name":"sx"},{"id":"2","name":"dx"}],
|
|
|
+ outputTypes:[{"id":"1","name":"sx"},{"id":"2","name":"dx"},{"id":"3","name":"shuangx"}],
|
|
|
+
|
|
|
+ //三相 输出类型
|
|
|
+ outputTypes2:[{"id":"1","name":"sx"},{"id":"2","name":"dx"}],
|
|
|
+
|
|
|
+ // 双相输出类型
|
|
|
+ outputTypes3:[{"id":"2","name":"dx"},{"id":"3","name":"shuangx"}],
|
|
|
+
|
|
|
// 输出状态
|
|
|
outputStatus:[{"id":"1","name":"sc"},{"id":"2","name":"bsc"}],
|
|
|
|
|
|
@@ -512,7 +636,7 @@
|
|
|
return metrics.width + 40
|
|
|
},
|
|
|
handleSelectChange2(type){
|
|
|
- if(type=='1'){
|
|
|
+ if(type=='1' || type=='3'){
|
|
|
this.disabled2=true;
|
|
|
}else{
|
|
|
this.disabled2=false;
|
|
|
@@ -520,10 +644,27 @@
|
|
|
|
|
|
},
|
|
|
onclickOutType(row,index){
|
|
|
-
|
|
|
this.outForm =JSON.parse(JSON.stringify(row));
|
|
|
this.outTitle = this.$t('pz');
|
|
|
- if(row.outputType=='1'){
|
|
|
+ var productPhOrders3=[];
|
|
|
+ if(this.productType=='6'){
|
|
|
+ for(var i=index;i<=index+1;i++){
|
|
|
+ const obj=this.channelList[i];
|
|
|
+ const productPhOrder={};
|
|
|
+ productPhOrder.id=obj.productPhOrder;
|
|
|
+ for(const aaa of this.productPhOrders){
|
|
|
+ if(obj.productPhOrder==aaa.id){
|
|
|
+ productPhOrder.name=aaa.name;
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ productPhOrders3.push(productPhOrder);
|
|
|
+ }
|
|
|
+ this.productPhOrders2=productPhOrders3;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(row.outputType=='1' || row.outputType=='3'){
|
|
|
if(this.productType=='4' ){
|
|
|
this.disabled3=true;
|
|
|
return
|
|
|
@@ -544,6 +685,19 @@
|
|
|
}
|
|
|
this.outForm.productPhOrder=productPhOrder;
|
|
|
}
|
|
|
+ if(row.outputType=='3'){
|
|
|
+ for(var i=index;i<=index+1;i++){
|
|
|
+ const obj=this.channelList[i];
|
|
|
+ if(obj.outputStatus=='1'){
|
|
|
+ productPhOrder=obj.productPhOrder;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.outForm.productPhOrder=productPhOrder;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
this.outOpen=true;
|
|
|
},
|
|
|
@@ -588,6 +742,48 @@
|
|
|
}
|
|
|
|
|
|
|
|
|
+ },
|
|
|
+ objectSpanMethod2({ row, column, rowIndex, columnIndex }) {
|
|
|
+ // 三项判断默认全部三项列都显示
|
|
|
+ //监控方式:1-总检测 2-分监分控 3-分监不控
|
|
|
+ var jkfs=this.productParams.jkfs;
|
|
|
+ //电网口监测0-不启用 1-启用
|
|
|
+ var dwkjk=this.productParams.dwkjk;
|
|
|
+ //零线控制0-不启用 1-启用
|
|
|
+ var lxkz=this.productParams.lxkz;
|
|
|
+ if(dwkjk=="1"){
|
|
|
+ if (columnIndex != 5 && columnIndex != 6 && columnIndex != 7 && columnIndex != 8 && columnIndex != 9 ) {
|
|
|
+
|
|
|
+ if (rowIndex % 2 === 0) {
|
|
|
+ return {
|
|
|
+ rowspan: 2,
|
|
|
+ colspan: 1
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ return {
|
|
|
+ rowspan: 0,
|
|
|
+ colspan: 0
|
|
|
+ };
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if (columnIndex != 3 && columnIndex != 4 && columnIndex != 5 && columnIndex != 6 && columnIndex != 7 ) {
|
|
|
+
|
|
|
+ if (rowIndex % 2 === 0) {
|
|
|
+ return {
|
|
|
+ rowspan: 2,
|
|
|
+ colspan: 1
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ return {
|
|
|
+ rowspan: 0,
|
|
|
+ colspan: 0
|
|
|
+ };
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
|
|
|
// 设备列表
|