<!--计量流程配置管理-->
<template>
    <div class="systemBase">
         <div style="margin-top: 10px;  border-bottom: 1px solid #d5d5d5;">
            <el-form ref="searchData" :inline="true" :model="search"  :rules="ruleValidateSearch">
             <el-form-item label-width="70px" prop="meterTypeName" label="业务类型">
              <el-select v-model="search.meterTypeName" clearable filterable collapse-tags size="small" style="width:120px">
                   <el-option v-for="(item,index) in meterTypeNameItem" :key="index" :label="item.baseName"
                    :value="item.baseName">
                   </el-option>
               </el-select>
             </el-form-item>
              <el-form-item prop="editionNo" label="版本号">
                <el-input v-model="search.editionNo" clearable size="small" style="width:120px" placeholder="请输入"></el-input>
              </el-form-item>
              <el-form-item label-width="20px">
              <el-button icon="el-icon-search" type="primary" size="mini" @click="searchDatas" v-loading.fullscreen.lock="operateLoading"  v-privilege="activeMenu + 'SEARCH'">查询</el-button>
              </el-form-item>
            </el-form>
         </div>
        <el-row>
            <el-col :span='10'>
                  <div style="border-right: 1px solid #d5d5d5">
                    <div class="common-title-div">主流程配置
                        <div class="common-operation-button-div">
                          <el-button size="mini" type="danger" plain icon="el-icon-remove-outline" v-loading.fullscreen.lock="operateLoading"
                           @click="discardData"  v-privilege="activeMenu + 'ABOLISH'">停用</el-button>
                           <el-button icon="el-icon-check" type="primary" size="mini" @click="startData" v-loading.fullscreen.lock="operateLoading"  v-privilege="activeMenu + 'RECOVERY'">启用</el-button>
                         </div>
                  </div>
                </div>
                <div class="common-table-div">
                 <el-table 
                  v-loading="dataLoading" 
                  :row-class-name="tableRowClassName" 
                  @row-click="rowChange" 
                  ref="dataTable" 
                  highlight-current-row
                  border 
                  :height="tableHeight"
                  :data="table.list"
                   @selection-change="handleSelectionChange"
                  :exchangeFilterMap="{'valueFlag':{'0':'有效','1':'无效'}}"
                  :icore-filter-flag="icoreFilterFlag">
                   <el-table-column type="index" label="序号" fixed="left" align="center"></el-table-column>
                   <el-table-column type="selection" width="55" fixed="left" align="center"></el-table-column>
                   <el-table-column sortable :show-overflow-tooltip="true" prop="meterTypeName" label="计量业务" min-width="110" align="center"></el-table-column>
                   <el-table-column sortable :show-overflow-tooltip="true" prop="meterTypeNote" label="业务注释" min-width="80" align="left"></el-table-column>
                   <el-table-column sortable :show-overflow-tooltip="true" prop="editionNo" label="版本号" min-width="80" align="left"></el-table-column>
                   <el-table-column sortable :show-overflow-tooltip="true" prop="createManName" label="配置人" min-width="80" align="left"></el-table-column>
                   <el-table-column sortable :show-overflow-tooltip="true" prop="createTime" label="配置时间" min-width="160" align="left"></el-table-column>
                   <el-table-column sortable :show-overflow-tooltip="true" prop="valueFlag" label="状态" min-width="100" align="left">
                      <template slot-scope="scope">
                        <span v-if="scope.row.valueFlag == 0">有效</span>
                        <span v-else-if="scope.row.valueFlag == 1">无效</span>
                      </template>
                   </el-table-column>
                 </el-table>
                </div>
                <div class="common-foot-style">
                 <el-pagination v-loading="dataLoading" @size-change="pageSizeChange" @current-change="pageCurrentChange"
                   :current-page="page.pageNum" :page-sizes="[100, 500, 1000]" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
                   :total="page.totalPage">
                 </el-pagination>
                </div>
                <div>
                   <div style="border-right: 1px solid #d5d5d5">
                    <div class="common-title-div">编辑区
                        <div class="common-operation-button-div">
                          <el-button size="mini" type="primary" icon="el-icon-circle-plus-outline" @click="addData"
                             v-loading.fullscreen.lock="operateLoading"  v-privilege="activeMenu + 'ADD'">新增</el-button>
                          <el-button size="mini" type="primary" icon="el-icon-edit" @click="updateData"
                             v-loading.fullscreen.lock="operateLoading"  v-privilege="activeMenu + 'UPDATE'">修改</el-button>
                         </div>
                    </div>
                   </div>
                   <div ref="editDiv" class="commom-edit-div" style="border-top: 1px solid #d5d5d5; margin-top: 10px">
                       <el-form ref="baseData" :inline="true" :rules="ruleValidateTable" :model="baseData">
                           <el-form-item prop="meterTypeName" label="计量业务">
                           <el-select v-model="baseData.meterTypeName" clearable filterable collapse-tags size="small" style="width:120px">
                                <el-option v-for="(item,index) in meterTypeNameItem" :key="index" :label="item.baseName"
                                 :value="item.baseName">
                                </el-option>
                            </el-select>
                          </el-form-item>
                         <el-form-item prop="meterTypeNote" label="业务注释">
                           <el-input v-model="baseData.meterTypeNote" clearable size="small" style="width:120px" placeholder="请输入"></el-input>
                         </el-form-item>
                         <el-form-item prop="editionNo" label="版本号">
                           <el-input v-model="baseData.editionNo" clearable size="small" style="width:120px" placeholder="请输入"></el-input>
                         </el-form-item>
                       </el-form>
                   </div>
                </div>
            </el-col>
            <el-col :span='7' style="border-right: 1px solid #d5d5d5; border-left: 1px solid #d5d5d5">
                 <div style="border-right: 1px solid #d5d5d5">
                    <div class="common-title-div">环节配置
                        <div class="common-operation-button-div">
                           <el-button icon="el-icon-circle-plus-outline" type="primary" size="mini" @click="addData2" v-loading.fullscreen.lock="operateLoading2"  v-privilege="activeMenu + 'ADD2'">新增</el-button>
                           <el-button size="mini" type="danger" plain icon="el-icon-remove-outline" v-loading.fullscreen.lock="operateLoading2"
                           @click="discardData2"  v-privilege="activeMenu + 'DELETE2'">删除</el-button>
                         </div>
                  </div>
                </div>
                <div class="common-table-div">
                 <el-table 
                  v-loading="dataLoading2"
                  @row-click="getDataList3"
                  ref="dataTable2" 
                  highlight-current-row
                  border 
                  :height="tableHeight"
                  :data="table.list2"
                  @selection-change="handleSelectionChange2"
                  :icore-filter-flag="icoreFilterFlag">
                   <el-table-column type="selection" width="55" fixed="left" align="center"></el-table-column>
                   <!-- <el-table-column type="index" label="序号" fixed="left" align="center"></el-table-column> -->
                   <el-table-column sortable :show-overflow-tooltip="true" prop="linkOrderNum" label="排序" min-width="50" align="center"></el-table-column>
                   <el-table-column sortable :show-overflow-tooltip="true" prop="linkName" label="环节名称" min-width="110" align="center"></el-table-column>
                   <el-table-column sortable :show-overflow-tooltip="true" prop="linkNote" label="环节描述" min-width="150" align="left"></el-table-column>
                 </el-table>
                </div>
                <div class="common-foot-style">
                 <el-pagination v-loading="dataLoading2" @size-change="pageSizeChange2" @current-change="pageCurrentChange2"
                   :current-page="page2.pageNum" :page-sizes="[100, 500, 1000]" :page-size="page2.pageSize" layout="total, sizes, prev, pager, next, jumper"
                   :total="page2.totalPage">
                 </el-pagination>
                </div>
                <div>
                   <div style="border-right: 1px solid #d5d5d5">
                    <div class="common-title-div">编辑区
                    </div>
                   </div>
                   <div ref="editDiv" class="commom-edit-div" style="border-top: 1px solid #d5d5d5; margin-top: 10px">
                       <el-form ref="baseData2" :inline="true" :rules="ruleValidateTable2" :model="baseData2">
                         <el-form-item prop="linkOrderNum" label="排序">
                           <el-input v-model="baseData2.linkOrderNum" clearable size="small" style="width:120px" placeholder="请输入"></el-input>
                         </el-form-item>
                           <el-form-item prop="linkName" label="环节名称">
                           <el-select v-model="baseData2.linkName" clearable filterable collapse-tags size="small" style="width:120px" @change="getLinkNote(baseData2.linkName)">
                                <el-option v-for="(item,index) in linkNameItem" :key="index" :label="item.baseName"
                                 :value="item.baseName">
                                </el-option>
                            </el-select>
                          </el-form-item>
                         <el-form-item prop="linkNote" label="环节描述">
                           <el-input v-model="baseData2.linkNote" clearable size="small" style="width:120px" disabled readonly></el-input>
                         </el-form-item>
                       </el-form>
                   </div>
                </div>
            </el-col>
            <el-col :span='7'>
                 <div style="border-right: 1px solid #d5d5d5">
                    <div class="common-title-div">场景配置
                        <div class="common-operation-button-div">
                          <el-button icon="el-icon-circle-plus-outline" type="primary" size="mini" @click="addData3" v-loading.fullscreen.lock="operateLoading3"  v-privilege="activeMenu + 'ADD3'">新增</el-button>
                           <el-button size="mini" type="danger" plain icon="el-icon-remove-outline" v-loading.fullscreen.lock="operateLoading3"
                           @click="discardData3"  v-privilege="activeMenu + 'DELETE3'">删除</el-button>
                         </div>
                  </div>
                </div>
                <div class="common-table-div">
                 <el-table 
                  v-loading="dataLoading3" 
                  ref="dataTable3" 
                  highlight-current-row
                  border 
                  :height="tableHeight"
                  :data="table.list3"
                  @selection-change="handleSelectionChange3"
                  :icore-filter-flag="icoreFilterFlag">
                   <el-table-column type="selection" width="55" fixed="left" align="center"></el-table-column>
                   <el-table-column sortable :show-overflow-tooltip="true" prop="sceneOrderNum" label="排序" min-width="60" align="center"></el-table-column>
                   <el-table-column sortable :show-overflow-tooltip="true" prop="sceneName" label="场景名称" min-width="120" align="left"></el-table-column>
                   <el-table-column sortable :show-overflow-tooltip="true" prop="sceneNote" label="场景描述" min-width="180" align="left"></el-table-column>
                 </el-table>
                </div>
                <div class="common-foot-style">
                 <el-pagination v-loading="dataLoading3" @size-change="pageSizeChange3" @current-change="pageCurrentChange3"
                   :current-page="page3.pageNum" :page-sizes="[100, 500, 1000]" :page-size="page3.pageSize" layout="total, sizes, prev, pager, next, jumper"
                   :total="page3.totalPage">
                 </el-pagination>
                </div>
                <div>
                   <div style="border-right: 1px solid #d5d5d5">
                    <div class="common-title-div">编辑区
                    </div>
                   </div>
                   <div ref="editDiv" class="commom-edit-div" style="border-top: 1px solid #d5d5d5; margin-top: 10px">
                       <el-form ref="baseData3" :inline="true" :rules="ruleValidateTable3" :model="baseData3">
                           <el-form-item prop="sceneOrderNum" label="排序">
                           <el-input v-model="baseData3.sceneOrderNum" clearable size="small" style="width:120px" placeholder="请输入"></el-input>
                          </el-form-item>
                           <el-form-item prop="sceneName" label="场景名称">
                           <el-select v-model="baseData3.sceneName" clearable filterable collapse-tags size="small" style="width:120px"  @change="getSceneNote(baseData3.sceneName)">
                                <el-option v-for="(item,index) in sceneNameItem" :key="index" :label="item.sceneName"
                                 :value="item.sceneName">
                                </el-option>
                            </el-select>
                          </el-form-item>
                         <el-form-item prop="sceneNote" label="场景描述">
                           <el-input v-model="baseData3.sceneNote" clearable size="small" style="width:120px" disabled readonly></el-input>
                         </el-form-item>
                       </el-form>
                   </div>
                </div>
            </el-col>
        </el-row>
    </div>
</template>
<script>
export default {
     data () {
      return {
          icoreFilterFlag: true,
          dataLoading: false,
          dataLoading2: false,
          dataLoading3: false,
          operateLoading: false,
          operateLoading2: false,
          operateLoading3: false,
          linkRow: {},
          linkRow2: {},
          multipleSelection: [],
          multipleSelection2: [],
          multipleSelection3: [],
          search: {
              meterTypeName: '',
              editionNo: ''
          },
          baseData: {
              meterTypeName: '',
              meterTypeNote: '',
              editionNo: ''
          },
          baseData2: {
              linkNote: '',
              linkName: '',
              linkOrderNum: ''
          },
          baseData3: {
              sceneNote: '',
              sceneOrderNum: '',
              sceneName: ''
          },
          table:{
              list: [],
              list2: [],
              list3: []
          },
          page: {
              pageSize: 500,
              pageNum: 1,
              totalPage: 0
          },
          page2: {
              pageSize: 500,
              pageNum: 1,
              totalPage: 0
          },
          page3: {
              pageSize: 500,
              pageNum: 1,
              totalPage: 0
          },
          ruleValidateSearch: {},
          ruleValidateTable: {
            editionNo: [{
              required: true,
              message: '该项不能为空',
              trigger: 'change'
            }],
            meterTypeName: [{
              required: true,
              message: '该项不能为空',
              trigger: 'change'
            }],
          },
          ruleValidateTable2: {
            linkOrderNum: [{
              required: true,
              message: '该项不能为空',
              trigger: 'change'
            }],
            linkName: [{
              required: true,
              message: '该项不能为空',
              trigger: 'change'
            }]
          },
          ruleValidateTable3: {
            sceneOrderNum: [{
              required: true,
              message: '该项不能为空',
              trigger: 'change'
            }],
            sceneName: [{
              required: true,
              message: '该项不能为空',
              trigger: 'change'
            }]
          },
          meterTypeNameItem: [],
          linkNameItem: [],
          sceneNameItem: [],
          activeMenu: ''
      }
     },
    created () {
      this.tableHeight = (window.innerHeight - 290) > 400 ? window.innerHeight - 290 : 400
      this.activeMenu = window.top.localStorage.getItem('activeMenu')
    },
    mounted () {
      this.getDataList()
      this.getMeterTypeNameItem()
      this.getLinkNameItem()
      this.getSceneNameItem()
    },
    methods: {
        getCode (code, arr, codeKey, nameKey) {
          if (!code) {
            return '';
          }
          let targetRow = arr.find(item => {
            return item[codeKey] === code;
          });
          return targetRow ? targetRow[nameKey] : '';
        },
        refresh () {
          this.baseData = {
              meterTypeName: '',
              meterTypeNote: '',
              editionNo: ''
            },
          this.baseData.meterTypeName = this.meterTypeNameItem[0].baseName
          this.$refs['baseData'].resetFields()
        },
        refresh2 () {
          this.baseData2 = {
              linkNote: '',
              linkName: '',
              linkOrderNum: ''
            },
          this.baseData2.linkName = this.linkNameItem[0].baseName
          this.baseData2.linkNote = this.linkNameItem[0].memo
          this.$refs['baseData2'].resetFields();
        },
        refresh3 () {
          this.baseData3 = {
              sceneNote: '',
              sceneOrderNum: '',
              sceneName: ''
            },
          this.baseData3.sceneName = this.sceneNameItem[0].sceneName
          this.baseData3.sceneNote = this.sceneNameItem[0].sceneNote
          this.$refs['baseData3'].resetFields();
        },
        getLinkNote(val) {
          this.baseData2.linkNote = this.getCode (val, this.linkNameItem, 'baseName', 'memo')
        },
        getSceneNote(val) {
          this.baseData3.sceneNote = this.getCode (val, this.sceneNameItem, 'sceneName', 'sceneNote')
          console.log( this.baseData3.sceneNote)
        },
        discardData () {
          if (this.multipleSelection.length < 1) {
            this.$message.warning('请选择您要废除的数据！');
            return;
          }
          this.axios.post('pass/systemBase/v1/meterworkmeterprocesss/abolish' , this.multipleSelection, {individualType: 'json'}).then(res => {
             if (res.succeed) {
               this.$message.success('废除成功');
               this.getDataList ();
            }  else {
             this.$message.error(res.message)
            }
            }).catch(e => {
             this.$message.error(e.message)
           })
        },//主流程配置停用
        startData () {
            if (this.multipleSelection.length < 1) {
              this.$message.warning('请选择您要启用的数据！');
              return;
            }
            this.axios.post('pass/systemBase/v1/meterworkmeterprocesss/recover', this.multipleSelection, {individualType: 'json'}).then(res => {
               if (res.succeed) {
                 this.$message.success('启用成功');
                 this.getDataList ();
              }  else {
               this.$message.error(res.message)
              }
              }).catch(e => {
               this.$message.error(e.message)
             })
        },//主流程配置启用
        addData () {
          this.$refs['baseData'].validate((valid) => {
          if (valid) {
               let baseDataAdd = {}
               baseDataAdd.meterTypeName = this.baseData.meterTypeName
               baseDataAdd.meterTypeNote = this.baseData.meterTypeNote
               baseDataAdd.editionNo = this.baseData.editionNo
               baseDataAdd.meterTypeNo = this.getCode (this.baseData.meterTypeName, this.meterTypeNameItem, 'baseName', 'baseCode')
               this.axios.post('pass/systemBase/v1/meterworkmeterprocesss/add', baseDataAdd, {individualType: 'json'}).then(res=>{
                 if (res.succeed) {
                    this.$message.success('新增成功');
                    this.getDataList ();
                    this.refresh();
                 }  else {
                  this.$message.error(res.message)
                 }
                 }).catch(e => {
                  this.$message.error(e.message)
                })
          }
          })
        },//主流程配置新增
        updateData () {
          this.$refs['baseData'].validate((valid) => {
          if (valid) {
              this.baseData.meterTypeNo = this.getCode (this.baseData.meterTypeName, this.meterTypeNameItem, 'baseName', 'baseCode')
              this.axios.post('pass/systemBase/v1/meterworkmeterprocesss/update', this.baseData, {individualType: 'json'}).then(res=>{
                if (res.succeed) {
                   this.$message.success('修改成功');
                   this.getDataList ();
                   this.refresh();
                }  else {
                 this.$message.error(res.message)
                }
                }).catch(e => {
                 this.$message.error(e.message)
               })
          }
          })
        },//主流程配置修改
        rowChange (row, column, event) {
           this.baseData = Object.assign ({}, row);
           this.getDataList2(row);
        },
        addData2 () {
          this.$refs['baseData2'].validate((valid) => {
            if (valid) {
              if (this.multipleSelection.length !== 1) {
               this.$message.warning('请选择一条主流程配置信息！');
               return;
             }
              let baseDataAdd = {}
              baseDataAdd.linkNote = this.baseData2.linkNote
              baseDataAdd.linkName = this.baseData2.linkName
              baseDataAdd.linkOrderNum = this.baseData2.linkOrderNum
              baseDataAdd.processNo = this.multipleSelection[0].processNo
              baseDataAdd.linkCode = this.getCode (this.baseData2.linkName, this.linkNameItem, 'baseName', 'baseCode')
              this.axios.post('pass/systemBase/v1/meterworkmeterlinks/add', baseDataAdd, {individualType: 'json'}).then(res=>{
              if (res.succeed) {
                 this.$message.success('新增成功');
                 this.getDataList2(this.linkRow);
                 this.refresh2();
              }  else {
               this.$message.error(res.message)
              }
              }).catch(e => {
               this.$message.error(e.message)
             })
            }
          })
        },//环节配置新增
        discardData2 () {
              if (this.multipleSelection2.length < 1) {
               this.$message.warning('请选择您要删除的数据！');
               return;
             }
             this.axios.post('pass/systemBase/v1/meterworkmeterlinks/delete' , this.multipleSelection2, {individualType: 'json'}).then(res => {
                if (res.succeed) {
                  this.$message.success('删除成功');
                  this.getDataList2(this.linkRow);
               }  else {
                this.$message.error(res.message)
               }
               }).catch(e => {
                this.$message.error(e.message)
              })
        },//环节配置删除
        addData3 () {
          this.$refs['baseData3'].validate((valid) => {
           if (valid) {
             if (this.multipleSelection2.length !== 1) {
               this.$message.warning('请选择一条环节配置信息！');
               return;
             }
              let baseDataAdd = {}
              baseDataAdd.sceneNote = this.baseData3.sceneNote
              baseDataAdd.sceneOrderNum = this.baseData3.sceneOrderNum
              baseDataAdd.sceneName = this.baseData3.sceneName
              baseDataAdd.processNo = this.multipleSelection2[0].processNo
              baseDataAdd.linkNo = this.multipleSelection2[0].linkNo
              baseDataAdd.sceneCode = this.getCode (this.baseData3.sceneName, this.sceneNameItem, 'sceneName', 'sceneCode')
              this.axios.post('pass/systemBase/v1/meterworkmeterscenes/add', baseDataAdd, {individualType: 'json'}).then(res=>{
              if (res.succeed) {
                 this.$message.success('新增成功');
                 this.getDataList3(this.linkRow2);
                 this.refresh3();
              }  else {
               this.$message.error(res.message)
              }
              }).catch(e => {
               this.$message.error(e.message)
             })
           }
          })
        },//业务配置新增
        discardData3 () {
            if (this.multipleSelection3.length < 1) {
              this.$message.warning('请选择您要删除的数据！');
              return;
            }
            this.axios.post('pass/systemBase/v1/meterworkmeterscenes/delete' , this.multipleSelection3, {individualType: 'json'}).then(res => {
               if (res.succeed) {
                 this.$message.success('删除成功');
                 this.getDataList3(this.linkRow2);
              }  else {
               this.$message.error(res.message)
              }
              }).catch(e => {
               this.$message.error(e.message)
             })
        },//业务配置删除
        handleSelectionChange (val) {//主流程配置
         this.multipleSelection = val;
         this.$refs.dataTable.setCurrentRow(this.multipleSelection[val.length-1])
         this.getDataList2(this.multipleSelection[val.length-1])
        },
        pageSizeChange (size) {
          this.page.pageSize = size;
          this.getDataList();
        },
        pageCurrentChange (index) {
          this.page.pageNum = index;
          this.getDataList();
        },
        handleSelectionChange2 (val) {//环节配置
         this.multipleSelection2 = val;
         this.$refs.dataTable2.setCurrentRow(this.multipleSelection2[val.length-1])
         this.getDataList3(this.multipleSelection2[val.length-1])
        },
        pageSizeChange2 (size) {
          this.page2.pageSize = size;
          this.getDataList2(this.linkRow);
        },
        pageCurrentChange2 (index) {
          this.page2.pageNum = index;
          this.getDataList2(this.linkRow);
        },
        handleSelectionChange3 (val) {//业务配置
         this.multipleSelection3 = val;
        },
        pageSizeChange3 (size) {
          this.page3.pageSize = size;
          this.getDataList3(this.linkRow2);
        },
        pageCurrentChange3 (index) {
          this.page3.pageNum = index;
          this.getDataList3(this.linkRow2);
        },
        searchDatas () {
          this.page.pageNum = 1;
          this.getDataList()
        },
        getDataList() {
           this.dataLoading = true;
           this.table.list2 = []
           this.table.list3 = []
           this.axios.get('pass/systemBase/v1/meterworkmeterprocesss/' + '?pageNum=' + this.page.pageNum + '&pageSize=' + this.page.pageSize + '&meterTypeName=' + this.search.meterTypeName + '&editionNo=' + this.search.editionNo)
             .then(res => {
               this.dataLoading = false;
               this.table.list = res.data.list;
               this.page.totalPage = res.data.total;
               if (this.table.list.length > 0) {
               this.$refs.dataTable.setCurrentRow(this.table.list[0])
               this.getDataList2(this.table.list[0]) 
               }  
             }).catch(e => {
               this.dataLoading = false;
             });
        },//主流程配置
        getDataList2(row) {
           this.linkRow = row;
           if (row === undefined || row === null) {
             this.table.list2 = []
             return
           }
           this.dataLoading2 = true;
           this.axios.get('pass/systemBase/v1/meterworkmeterlinks/' + '?pageNum=' + this.page.pageNum + '&pageSize=' + this.page.pageSize + '&processNo=' + row.processNo)
             .then(res => {
               this.dataLoading2 = false;
               this.table.list2 = res.data.list;
               this.page2.totalPage = res.data.total;
               if (this.table.list2.length > 0) {
               this.$refs.dataTable2.setCurrentRow(this.table.list2[0])
               this.getDataList3(this.table.list2[0]) 
               }
             }).catch(e => {
               this.dataLoading2 = false;
             });
        },//环节配置
        getDataList3(row) {
           this.linkRow2 = row;
           if (row === undefined || row === null) {
             this.table.list3 = []
             return
           }
           this.dataLoading3 = true;
           this.axios.get('pass/systemBase/v1/meterworkmeterscenes/' + '?pageNum=' + this.page.pageNum + '&pageSize=' + this.page.pageSize + '&linkNo=' + row.linkNo)
             .then(res => {
               this.dataLoading3 = false;
               this.table.list3 = res.data.list;
               this.page3.totalPage = res.data.total;
             }).catch(e => {
               this.dataLoading3 = false;
             });
        },//业务配置
        getMeterTypeNameItem() {
           this.axios.get('pass/systemBase/v1/combaseinfos/noPage' + '?pBaseCode=001006' + '&validFlag=1')
          .then(res => {
            this.meterTypeNameItem = res.data;
            this.baseData.meterTypeName = res.data.length > 0 ? res.data[0].baseName : '';
          })
        },
       getLinkNameItem() {
          this.axios.get('pass/systemBase/v1/combaseinfos/noPage' + '?pBaseCode=001021' + '&validFlag=1')
          .then(res => {
            this.linkNameItem = res.data;
            this.baseData2.linkName = res.data.length > 0 ? res.data[0].baseName : '';
            this.baseData2.linkNote = res.data.length > 0 ? res.data[0].memo : '';
          })
       },
       getSceneNameItem () {
          this.axios.get('pass/systemBase/v1/meterworksceneregisters/' + '?valueFlag=0')
          .then(res => {
            this.sceneNameItem = res.data;
            this.baseData3.sceneName = res.data.length > 0 ? res.data[0].sceneName : '';
            this.baseData3.sceneNote = res.data.length > 0 ? res.data[0].sceneNote : '';
          })
       },
       tableRowClassName ({
           row,
           rowIndex
         }) {
           if (row.valueFlag === '1') {
             return 'error-row2';
           }
           return '';
         },
    }
}
</script>
<style scoped>

</style>