王克恕 3 лет назад
Родитель
Сommit
b92bec53b5

+ 2 - 2
imcs-ui/src/views/zuihou/lineSideLibrary/lineSideEmulate/Index.vue

@@ -35,7 +35,7 @@
     </el-row>
 
   	<!-- 货架区域 -->
-  	<div class="areaDiv">
+  	<div class="areaDiv" style="width: 100%;overflow-x: auto;">
 
   		<!-- 货架(单个) -->
   		<template v-for="item in shelvesTreeList">
@@ -198,7 +198,7 @@
   		</div>-->
 
   	</div>
-
+		
     <tenant-edit
       ref="edit"
       :dialog-visible="dialog.isVisible"

+ 344 - 339
imcs-ui/src/views/zuihou/prepareProductMgr/cuttingToolMgr/components/machineCuttingTool/index.vue

@@ -1,339 +1,344 @@
-<template>
-  <div class="app-container">
-    <!-- 搜索模块 -->
-    <div class="filter-container">
-    	<span>
-    		<span>{{$t("cuttingTool.searchForm.machineCuttingtool.resourceName")}}:</span>
-    		<el-input v-model="queryMachineParams.model.name" :placeholder='$t("common.pleaseEnter")' style="width: 120px;" size="medium"/>
-    	</span>
-      <span style="margin-left: 15px;">
-    		<span>{{$t("cuttingTool.searchForm.machineCuttingtool.resourceStatus")}}:</span>
-        <el-select v-model="queryMachineParams.model.linkStatus" :placeholder='$t("common.pleaseSelect")' size="medium" style="width: 180px;">
-        	<el-option :key="index" :label="item" :value="key" v-for="(item, key, index) in dicts.LINK_STATUS" />
-      	</el-select>
-    	</span>
-
-      <span style="margin-left: 15px;">
-	      <el-button plain type="primary" icon="el-icon-search" size="medium" @click="search">
-	        {{ $t("table.search") }}
-	      </el-button>
-	      <el-button plain type="warning" icon="el-icon-refresh" size="medium" @click="reset">
-	        {{ $t("table.reset") }}
-	      </el-button>
-      </span>
-    </div>
-    <!-- 功能按钮 -->
-    <el-row class="filter-container">
-      <el-col>
-        <el-button type="primary" icon="el-icon-loading" size="medium" @click="batchSysMachineCuttingTools">{{ $t("cuttingTool.buttons.machineCuttingtool.synCuttingtool") }}</el-button>
-      </el-col>
-    </el-row>
-
-    <el-table
-      :style="isVisible=false"
-      :key="machineTableKey"
-      ref="table"
-      v-loading="loading"
-      :data="tableData.records"
-      border
-      fit
-      row-key="id"
-      style="width: 100%;"
-      @selection-change="onSelectChange"
-    >
-      <el-table-column :label='$t("common.serialNo")' width="55px" align="center">
-        <template slot-scope="scope">
-          <div>
-            {{scope.$index+(queryMachineParams.current - 1) * queryMachineParams.size + 1}}
-          </div>
-        </template>
-      </el-table-column>
-      <el-table-column align="center" type="selection" width="50" :reserve-selection="true" />
-      <!-- 设备名称 -->
-      <el-table-column align="center" prop="name" :label='$t("cuttingTool.table.machineCuttingtool.resourceName")' :show-overflow-tooltip="true"></el-table-column>
-      <!-- 设备编号 -->
-      <el-table-column align="center" prop="code" :label='$t("cuttingTool.table.machineCuttingtool.resourceNo")' :show-overflow-tooltip="true"></el-table-column>
-      <!-- 所属产线 -->
-      <el-table-column align="center" prop="lineDesc" :label='$t("cuttingTool.table.machineCuttingtool.productlineName")' :show-overflow-tooltip="true"></el-table-column>
-      <!-- 设备连接状态 -->
-      <el-table-column prop="onlineStatus" :label='$t("cuttingTool.table.machineCuttingtool.resourceStatus")' align="center">
-        <template slot-scope="{ row }">
-          <el-tag :type="row.onlineStatus=='1' ? 'success' : 'info'">
-            {{ row.status=='1' ? $t("cuttingTool.common.onlineStatus.online") : $t("cuttingTool.common.onlineStatus.offline") }}
-          </el-tag>
-        </template>
-      </el-table-column>
-      <!-- 同步时间 -->
-      <el-table-column align="center" prop="toolSynTime" :label='$t("cuttingTool.table.machineCuttingtool.sysTime")' :show-overflow-tooltip="true"></el-table-column>
-      <!-- 刀具数量 -->
-      <el-table-column align="center" prop="toolNum" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolNum")' :show-overflow-tooltip="true">
-        <template slot-scope="{ row }">
-          <a style="color: #2db7f5;" @click="queryMachineCuttingTools(row)" >{{row.toolNum}}</a>
-        </template>
-      </el-table-column>
-      <!-- 操作 -->
-      <el-table-column
-        :label="$t('table.operation')"
-        fixed="right"
-        align="center"
-        column-key="operation"
-        width="80px"
-      >
-        <template slot-scope="{ row }">
-          <el-tooltip class="item" :content='$t("cuttingTool.buttons.machineCuttingtool.synCuttingtool")' effect="dark" placement="top-start">
-            <i
-              class="el-icon-loading table-operation"
-              style="color: #2db7f5;"
-              @click="sysMachineCuttingTools(row)"
-            />
-          </el-tooltip>
-        </template>
-      </el-table-column>
-    </el-table>
-    <pagination
-      v-show="tableData.total > 0"
-      :limit.sync="queryMachineParams.size"
-      :page.sync="queryMachineParams.current"
-      :total="Number(tableData.total)"
-      @pagination="fetch"
-    />
-
-    <!--设备刀具信息-->
-    <el-row>
-      <el-col ><div class="grid-content bg-purple-dark">刀具列表</div></el-col>
-    </el-row>
-
-    <el-table
-      :key="machineCuttingToolsTableKey"
-      ref="table"
-      v-loading="loading"
-      :data="machineCuttingToolstableData.records"
-      border
-      fit
-      row-key="id"
-      style="width: 100%;"
-    >
-      <el-table-column :label='$t("common.serialNo")' width="55px" align="center">
-        <template slot-scope="scope">
-          <div>
-            {{scope.$index+(queryMachineCuttingToolsParams.current - 1) * queryMachineCuttingToolsParams.size + 1}}
-          </div>
-        </template>
-      </el-table-column>
-      <!-- 刀具名称 -->
-      <el-table-column align="center" prop="cuttingToolName" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolName")' :show-overflow-tooltip="true"></el-table-column>
-      <!-- 刀具规格 -->
-      <el-table-column align="center" prop="specifications" :label='$t("cuttingTool.table.machineCuttingtool.specifications")' :show-overflow-tooltip="true"></el-table-column>
-      <!-- 刀具图片 -->
-      <el-table-column align="center" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolPicture")' :show-overflow-tooltip="true">
-        <template slot-scope="{ row }">
-          <el-image
-            style="width: 100px; height: 100px"
-            :src="row.cuttingToolPicture"
-            :preview-src-list="[row.cuttingToolPicture]">
-          </el-image>
-        </template>
-      </el-table-column>
-      <!-- 装夹方式 -->
-      <el-table-column align="center" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolInstallPicture")' :show-overflow-tooltip="true">
-        <template slot-scope="{ row }">
-          <el-image
-            style="width: 100px; height: 100px"
-            :src="row.cuttingToolInstallPicture"
-            :preview-src-list="[row.cuttingToolInstallPicture]">
-          </el-image>
-        </template>
-      </el-table-column>
-
-      <!-- 监控方式 -->
-      <el-table-column prop="cuttingToolMonitorType" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolMonitorType")' align="center"></el-table-column>
-      <!-- 额定使用寿命 -->
-      <el-table-column align="center" prop="useageCount" :label='$t("cuttingTool.table.machineCuttingtool.useageCount")' :show-overflow-tooltip="true"></el-table-column>
-      <!-- 剩余使用寿命 -->
-      <el-table-column align="center" prop="surplusCount" :label='$t("cuttingTool.table.machineCuttingtool.surplusCount")' :show-overflow-tooltip="true"></el-table-column>
-      <!-- 预警极限 -->
-      <el-table-column align="center" prop="earlyWarnning" :label='$t("cuttingTool.table.machineCuttingtool.earlyWarnning")' :show-overflow-tooltip="true"></el-table-column>
-      <!-- 刀具id -->
-      <el-table-column align="center" prop="cuttingToolId" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolId")' :show-overflow-tooltip="true"></el-table-column>
-      <!-- 姊妹刀号 -->
-      <el-table-column align="center" prop="sisterCuttingToolId" :label='$t("cuttingTool.table.machineCuttingtool.sisterCuttingToolId")' :show-overflow-tooltip="true"></el-table-column>
-      <!-- 刀沿号 -->
-      <el-table-column align="center" prop="knifeEdgeNumber" :label='$t("cuttingTool.table.machineCuttingtool.knifeEdgeNumber")' :show-overflow-tooltip="true"></el-table-column>
-      <!-- 刀具位置 -->
-      <el-table-column align="center" prop="cuttingToolPosition" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolPosition")' :show-overflow-tooltip="true"></el-table-column>
-      <!-- 刀具半径 -->
-      <el-table-column align="center" prop="cuttingToolRadius" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolRadius")' :show-overflow-tooltip="true"></el-table-column>
-    </el-table>
-    <pagination
-      v-show="machineCuttingToolstableData.total > 0"
-      :limit.sync="queryMachineCuttingToolsParams.size"
-      :page.sync="queryMachineCuttingToolsParams.current"
-      :total="Number(machineCuttingToolstableData.total)"
-      @pagination="queryMachineCuttingTools"
-    />
-  </div>
-</template>
-
-<script>
-	import Pagination from "@/components/Pagination"
-	// 【设备资源管理】-API
-  import equipmentMgrApi from "@/api/resourceProductMgr/equipmentMgr"
-  // 【设备刀具动态资源管理】-API
-  import machineCustomizeCuttingToolMgrApi from "@/api/prepareProductMgr/machineCustomizeCuttingTool"
-	import elDragDialog from '@/directive/el-drag-dialog'
-	import {initDicts, initQueryParams } from '@/utils/commons'
-	export default {
-	  name: "MachineCuttingTool",
-	  directives: { elDragDialog },
-	  components: { Pagination },
-	  props: {
-	  },
-	  data () {
-	    return {
-	      machineTableKey: 0,
-        machineCuttingToolsTableKey: 1,
-	      queryMachineParams: initQueryParams({
-        }),
-        queryMachineCuttingToolsParams: initQueryParams({
-        }),
-        onlineStatusList: [],
-	      selection: [],
-	      loading: false,
-	      tableData: {
-	        total: 0
-	      },
-        machineCuttingToolstableData: {
-            total: 0
-        },
-	      dicts: {
-          LINK_STATUS: {}
-        },
-	    }
-	  },
-	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
-	  created() {
-      // 加载【字典】
-      initDicts(['LINK_STATUS'], this.dicts);
-	  	// 加载列表数据
-	  	this.fetch()
-		},
-	  computed: {
-	  },
-	  mounted () {
-
-	  },
-	  methods: {
-	    onSelectChange (selection) {
-	      this.selection = selection
-	    },
-	    search () {
-	      this.fetch({
-	        ...this.queryMachineParams
-	      })
-	    },
-	    reset () {
-	      this.queryMachineParams = initQueryParams({})
-        this.queryMachineCuttingToolsParams = initQueryParams({})
-	      this.$refs.table.clearSort()
-	      this.$refs.table.clearFilter()
-	      this.search()
-	    },
-	    clearSelections () {
-	      this.$refs.table.clearSelection()
-	    },
-	    fetch (params = {}) {
-	      this.loading = true
-	      this.queryMachineParams.current = params.current ? params.current : this.queryMachineParams.current
-	      this.queryMachineParams.size = params.size ? params.size : this.queryMachineParams.size
-          //TODO 等字典调整后修改
-          this.queryMachineParams.model.resourcesCategory = '1'
-	      // 查询必须参数
-          equipmentMgrApi.page(this.queryMachineParams).then(response => {
-	        const res = response.data
-	        if (res.isSuccess) {
-	          this.tableData = res.data
-	          // 给列表设置条数
-	          this.$emit('setTabNums', res.data.total, 'tab1')
-	        }
-	        // eslint-disable-next-line no-return-assign
-	      }).finally(() => this.loading = false)
-
-	    },
-      sysMachineCuttingTools(row){
-          this.$refs.table.clearSelection()
-          this.$refs.table.toggleRowSelection(row, true)
-          this.sysCuttingTools(row.id)
-      },
-
-      batchSysMachineCuttingTools(){
-        if (!this.selection.length) {
-            this.$message({
-                message: this.$t("tips.noDataSelected"),
-                type: "warning"
-            })
-            return
-        }
-        // console.log(this.selection.length)
-        // if (this.selection.length > 1) {
-        //     this.$message({
-        //         message: this.$t("tips.mustOne"),
-        //         type: "warning"
-        //     })
-        //     return
-        // }
-
-        const ids = []
-        this.selection.forEach(item => {
-            ids.push(item.id)
-        })
-        this.sysCuttingTools(ids)
-      },
-
-      sysCuttingTools (ids) {
-        machineCustomizeCuttingToolMgrApi.sysCuttingTools({ ids: ids }).then(response => {
-          const res = response.data
-          if (res.isSuccess) {
-            this.$message({
-                message: this.$t("cuttingTool.tips.synSuccess"),
-                type: "success"
-            })
-            this.search()
-            // 清理已经删除的数据
-            this.$refs.table.clearSelection()
-          }
-        })
-      },
-
-      queryMachineCuttingTools(row){
-        let params = {}
-        this.queryMachineCuttingToolsParams.current = params.current ? params.current : this.queryMachineCuttingToolsParams.current
-        this.queryMachineCuttingToolsParams.size = params.size ? params.size : this.queryMachineCuttingToolsParams.size
-        this.queryMachineCuttingToolsParams.model.machineId = row.id
-          machineCustomizeCuttingToolMgrApi.page(this.queryMachineCuttingToolsParams).then(response => {
-          const res = response.data
-          if (res.isSuccess) {
-            this.machineCuttingToolstableData = res.data
-          }
-        })
-      }
-	  }
-	}
-</script>
-<style lang="scss" scoped>
-  .el-row {
-    margin-bottom: 20px;
-    &:last-child {
-      margin-bottom: 0;
-    }
-  }
-  .el-col {
-    border-radius: 4px;
-  }
-  .bg-purple-dark {
-    background: #00DD77;
-  }
-  .grid-content {
-    border-radius: 4px;
-    font-size: xx-large;
-  }
-</style>
+<template>
+  <div class="app-container">
+    <!-- 搜索模块 -->
+    <div class="filter-container">
+    	<span>
+    		<span>{{$t("cuttingTool.searchForm.machineCuttingtool.resourceName")}}:</span>
+    		<el-input v-model="queryMachineParams.model.name" :placeholder='$t("common.pleaseEnter")' style="width: 120px;" size="medium"/>
+    	</span>
+      <span style="margin-left: 15px;">
+    		<span>{{$t("cuttingTool.searchForm.machineCuttingtool.resourceStatus")}}:</span>
+        <el-select v-model="queryMachineParams.model.linkStatus" :placeholder='$t("common.pleaseSelect")' size="medium" style="width: 180px;">
+        	<el-option :key="index" :label="item" :value="key" v-for="(item, key, index) in dicts.LINK_STATUS" />
+      	</el-select>
+    	</span>
+
+      <span style="margin-left: 15px;">
+	      <el-button plain type="primary" icon="el-icon-search" size="medium" @click="search">
+	        {{ $t("table.search") }}
+	      </el-button>
+	      <el-button plain type="warning" icon="el-icon-refresh" size="medium" @click="reset">
+	        {{ $t("table.reset") }}
+	      </el-button>
+      </span>
+    </div>
+    <!-- 功能按钮 -->
+    <el-row class="filter-container">
+      <el-col>
+        <el-button type="primary" icon="el-icon-loading" size="medium" @click="batchSysMachineCuttingTools">{{ $t("cuttingTool.buttons.machineCuttingtool.synCuttingtool") }}</el-button>
+      </el-col>
+    </el-row>
+
+    <el-table
+      :style="isVisible=false"
+      :key="machineTableKey"
+      ref="table"
+      v-loading="loading"
+      :data="tableData.data"
+      border
+      fit
+      row-key="id"
+      style="width: 100%;"
+      @selection-change="onSelectChange"
+    >
+      <el-table-column :label='$t("common.serialNo")' width="55px" align="center">
+        <template slot-scope="scope">
+          <div>
+            {{scope.$index+(queryMachineParams.current - 1) * queryMachineParams.size + 1}}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" type="selection" width="50" :reserve-selection="true" />
+      <!-- 设备名称 -->
+      <el-table-column align="center" prop="name" :label='$t("cuttingTool.table.machineCuttingtool.resourceName")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 设备编号 -->
+      <el-table-column align="center" prop="code" :label='$t("cuttingTool.table.machineCuttingtool.resourceNo")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 所属产线 -->
+      <el-table-column align="center" prop="zoneName" :label='$t("cuttingTool.table.machineCuttingtool.productlineName")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 设备连接状态 -->
+      <el-table-column prop="onlineStatus" :label='$t("cuttingTool.table.machineCuttingtool.resourceStatus")' align="center">
+        <template slot-scope="{ row }">
+          <el-tag :type="row.onlineStatus=='1' ? 'success' : 'info'">
+            {{ row.status=='1' ? $t("cuttingTool.common.onlineStatus.online") : $t("cuttingTool.common.onlineStatus.offline") }}
+          </el-tag>
+        </template>
+      </el-table-column>
+      <!-- 同步时间 -->
+      <el-table-column align="center" prop="toolSynTime" :label='$t("cuttingTool.table.machineCuttingtool.sysTime")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 刀具数量 -->
+      <el-table-column align="center" prop="toolNum" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolNum")' :show-overflow-tooltip="true">
+        <template slot-scope="{ row }">
+          <a style="color: #2db7f5;" @click="queryMachineCuttingTools(row)" >{{row.toolNum}}</a>
+        </template>
+      </el-table-column>
+      <!-- 操作 -->
+      <el-table-column
+        :label="$t('table.operation')"
+        fixed="right"
+        align="center"
+        column-key="operation"
+        width="80px"
+      >
+        <template slot-scope="{ row }">
+          <el-tooltip class="item" :content='$t("cuttingTool.buttons.machineCuttingtool.synCuttingtool")' effect="dark" placement="top-start">
+            <i
+              class="el-icon-loading table-operation"
+              style="color: #2db7f5;"
+              @click="sysMachineCuttingTools(row)"
+            />
+          </el-tooltip>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+      v-show="tableData.count > 0"
+      :limit.sync="queryMachineParams.size"
+      :page.sync="queryMachineParams.current"
+      :total="Number(tableData.count)"
+      @pagination="fetch"
+    />
+
+    <!--设备刀具信息-->
+    <el-row>
+      <el-col ><div class="grid-content bg-purple-dark">刀具列表</div></el-col>
+    </el-row>
+
+    <el-table
+      :key="machineCuttingToolsTableKey"
+      ref="table"
+      v-loading="loading"
+      :data="machineCuttingToolstableData.records"
+      border
+      fit
+      row-key="id"
+      style="width: 100%;"
+    >
+      <el-table-column :label='$t("common.serialNo")' width="55px" align="center">
+        <template slot-scope="scope">
+          <div>
+            {{scope.$index+(queryMachineCuttingToolsParams.current - 1) * queryMachineCuttingToolsParams.size + 1}}
+          </div>
+        </template>
+      </el-table-column>
+      <!-- 刀具名称 -->
+      <el-table-column align="center" prop="cuttingToolName" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolName")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 刀具规格 -->
+      <el-table-column align="center" prop="specifications" :label='$t("cuttingTool.table.machineCuttingtool.specifications")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 刀具图片 -->
+      <el-table-column align="center" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolPicture")' :show-overflow-tooltip="true">
+        <template slot-scope="{ row }">
+          <el-image
+            style="width: 100px; height: 100px"
+            :src="row.cuttingToolPicture"
+            :preview-src-list="[row.cuttingToolPicture]">
+          </el-image>
+        </template>
+      </el-table-column>
+      <!-- 装夹方式 -->
+      <el-table-column align="center" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolInstallPicture")' :show-overflow-tooltip="true">
+        <template slot-scope="{ row }">
+          <el-image
+            style="width: 100px; height: 100px"
+            :src="row.cuttingToolInstallPicture"
+            :preview-src-list="[row.cuttingToolInstallPicture]">
+          </el-image>
+        </template>
+      </el-table-column>
+
+      <!-- 监控方式 -->
+      <el-table-column prop="cuttingToolMonitorType" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolMonitorType")' align="center"></el-table-column>
+      <!-- 额定使用寿命 -->
+      <el-table-column align="center" prop="useageCount" :label='$t("cuttingTool.table.machineCuttingtool.useageCount")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 剩余使用寿命 -->
+      <el-table-column align="center" prop="surplusCount" :label='$t("cuttingTool.table.machineCuttingtool.surplusCount")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 预警极限 -->
+      <el-table-column align="center" prop="earlyWarnning" :label='$t("cuttingTool.table.machineCuttingtool.earlyWarnning")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 刀具id -->
+      <el-table-column align="center" prop="cuttingToolId" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolId")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 姊妹刀号 -->
+      <el-table-column align="center" prop="sisterCuttingToolId" :label='$t("cuttingTool.table.machineCuttingtool.sisterCuttingToolId")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 刀沿号 -->
+      <el-table-column align="center" prop="knifeEdgeNumber" :label='$t("cuttingTool.table.machineCuttingtool.knifeEdgeNumber")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 刀具位置 -->
+      <el-table-column align="center" prop="cuttingToolPosition" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolPosition")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 刀具半径 -->
+      <el-table-column align="center" prop="cuttingToolRadius" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolRadius")' :show-overflow-tooltip="true"></el-table-column>
+    </el-table>
+    <pagination
+      v-show="machineCuttingToolstableData.total > 0"
+      :limit.sync="queryMachineCuttingToolsParams.size"
+      :page.sync="queryMachineCuttingToolsParams.current"
+      :total="Number(machineCuttingToolstableData.total)"
+      @pagination="queryMachineCuttingTools"
+    />
+  </div>
+</template>
+
+<script>
+	import Pagination from "@/components/Pagination"
+	// 【设备资源管理】-API
+  import equipmentMgrApi from "@/api/resourceProductMgr/equipmentMgr"
+  // 【设备刀具动态资源管理】-API
+  import machineCustomizeCuttingToolMgrApi from "@/api/prepareProductMgr/machineCustomizeCuttingTool"
+	import elDragDialog from '@/directive/el-drag-dialog'
+	import {initDicts, initQueryParams } from '@/utils/commons'
+	export default {
+	  name: "MachineCuttingTool",
+	  directives: { elDragDialog },
+	  components: { Pagination },
+	  props: {
+	  },
+	  data () {
+	    return {
+	      machineTableKey: 0,
+        machineCuttingToolsTableKey: 1,
+	      queryMachineParams: initQueryParams({
+        }),
+        queryMachineCuttingToolsParams: initQueryParams({
+        }),
+        onlineStatusList: [],
+	      selection: [],
+	      loading: false,
+	      tableData: {
+	        count: 0
+	      },
+        machineCuttingToolstableData: {
+            total: 0
+        },
+	      dicts: {
+          LINK_STATUS: {}
+        },
+	    }
+	  },
+	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
+	  created() {
+      // 加载【字典】
+      initDicts(['LINK_STATUS'], this.dicts);
+	  	// 加载列表数据
+	  	this.fetch()
+		},
+	  computed: {
+	  },
+	  mounted () {
+
+	  },
+	  methods: {
+	    onSelectChange (selection) {
+	      this.selection = selection
+	    },
+	    search () {
+	      this.fetch({
+	        ...this.queryMachineParams
+	      })
+	    },
+	    reset () {
+	      this.queryMachineParams = initQueryParams({})
+        this.queryMachineCuttingToolsParams = initQueryParams({})
+	      this.$refs.table.clearSort()
+	      this.$refs.table.clearFilter()
+	      this.search()
+	    },
+	    clearSelections () {
+	      this.$refs.table.clearSelection()
+	    },
+	    fetch (params = {}) {
+	      this.loading = true
+	      this.queryMachineParams.current = params.current ? params.current : this.queryMachineParams.current
+	      this.queryMachineParams.size = params.size ? params.size : this.queryMachineParams.size
+          //TODO 等字典调整后修改
+          this.queryMachineParams.model.resourcesCategory = '1'
+          // 固定参数(采集的生产资源)
+		      this.queryMachineParams.resourceStatus = "1"
+			    this.queryMachineParams.displayStatus = "1";
+	        this.queryMachineParams.cncProgram = "1";
+	        this.queryMachineParams.displayStatus = "1";
+	      	// 查询必须参数
+          equipmentMgrApi.getPageList(this.queryMachineParams).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	          this.tableData = res.data
+	          // 给列表设置条数
+	          this.$emit('setTabNums', res.data.count, 'tab1')
+	        }
+	        // eslint-disable-next-line no-return-assign
+	      }).finally(() => this.loading = false)
+
+	    },
+      sysMachineCuttingTools(row){
+          this.$refs.table.clearSelection()
+          this.$refs.table.toggleRowSelection(row, true)
+          this.sysCuttingTools(row.id)
+      },
+
+      batchSysMachineCuttingTools(){
+        if (!this.selection.length) {
+            this.$message({
+                message: this.$t("tips.noDataSelected"),
+                type: "warning"
+            })
+            return
+        }
+        // console.log(this.selection.length)
+        // if (this.selection.length > 1) {
+        //     this.$message({
+        //         message: this.$t("tips.mustOne"),
+        //         type: "warning"
+        //     })
+        //     return
+        // }
+
+        const ids = []
+        this.selection.forEach(item => {
+            ids.push(item.id)
+        })
+        this.sysCuttingTools(ids)
+      },
+
+      sysCuttingTools (ids) {
+        machineCustomizeCuttingToolMgrApi.sysCuttingTools({ ids: ids }).then(response => {
+          const res = response.data
+          if (res.isSuccess) {
+            this.$message({
+                message: this.$t("cuttingTool.tips.synSuccess"),
+                type: "success"
+            })
+            this.search()
+            // 清理已经删除的数据
+            this.$refs.table.clearSelection()
+          }
+        })
+      },
+
+      queryMachineCuttingTools(row){
+        let params = {}
+        this.queryMachineCuttingToolsParams.current = params.current ? params.current : this.queryMachineCuttingToolsParams.current
+        this.queryMachineCuttingToolsParams.size = params.size ? params.size : this.queryMachineCuttingToolsParams.size
+        this.queryMachineCuttingToolsParams.model.machineId = row.id
+          machineCustomizeCuttingToolMgrApi.page(this.queryMachineCuttingToolsParams).then(response => {
+          const res = response.data
+          if (res.isSuccess) {
+            this.machineCuttingToolstableData = res.data
+          }
+        })
+      }
+	  }
+	}
+</script>
+<style lang="scss" scoped>
+  .el-row {
+    margin-bottom: 20px;
+    &:last-child {
+      margin-bottom: 0;
+    }
+  }
+  .el-col {
+    border-radius: 4px;
+  }
+  .bg-purple-dark {
+    background: #00DD77;
+  }
+  .grid-content {
+    border-radius: 4px;
+    font-size: xx-large;
+  }
+</style>

+ 619 - 619
imcs-ui/src/views/zuihou/resourceProductMgr/equipmentProgramMgr/Index.vue

@@ -1,619 +1,619 @@
-<template>
-  <div class="app-container">
-		<!-- 搜索模块 -->
-    <div class="filter-container">
-    	<span>
-    		<span>{{$t("resource.searchForm.resourceName")}}:</span>
-    		<el-input v-model="queryParams.model.name" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
-    	</span>
-    	<span style="margin-left: 15px;">
-    		<span>{{$t("resource.searchForm.linkStatus")}}:</span>
-    		<el-select v-model="queryParams.model.status" :placeholder='$t("common.pleaseSelect")' size="medium" style="width: 150px;">
-        	<el-option
-			      v-for="item in audioStatus"
-			      :key="item.value"
-			      :label="item.label"
-			      :value="item.value">
-			    </el-option>
-      	</el-select>
-    	</span>
-      <span style="margin-left: 15px;">
-	      <el-button plain type="primary" icon="el-icon-search" size="medium" @click="search">
-	        {{ $t("table.search") }}
-	      </el-button>
-	      <el-button plain type="warning" icon="el-icon-refresh" size="medium" @click="reset">
-	        {{ $t("table.reset") }}
-	      </el-button>
-      </span>
-    </div>
-
-    <!-- 功能按钮 -->
-    <el-row class="filter-container">
-    	<el-col>
-    		<el-button v-has-permission="['eqpg:synchronization']" type="primary" icon="el-icon-connection" size="medium" @click="synchronousTool">{{$t("resource.buttons.tongbSk")}}</el-button>
-        <el-button v-has-permission="['eqpg:upload']" type="primary" icon="el-icon-connection" size="medium" @click="editUpload">{{$t("resource.buttons.upload")}}</el-button>
-    	</el-col>
-    </el-row>
-
-    <!-- 【设备】列表数据 -->
-    <!-- 列表数据 -->
-    <el-table
-      :key="tableKey"
-      ref="table"
-      v-loading="loading"
-      :data="tableData.data"
-      border
-      stripe
-      fit
-      row-key="id"
-      style="width: 100%;"
-      @selection-change="onSelectChange"
-      @cell-click="cellClick"
-    >
-    	<el-table-column :label='$t("common.serialNo")' width="55px" align="center">
-	      <template slot-scope="scope">
-	        <div>
-	          {{scope.$index+(queryParams.current - 1) * queryParams.size + 1}}
-	        </div>
-	      </template>
-      </el-table-column>
-      <el-table-column align="center" type="selection" width="50" :reserve-selection="true" />
-      <el-table-column prop="pic" :label='$t("resource.table.resours.pic")' align="center" width="150px">
-      	<template slot-scope="{ row }">
-      		<div v-if="row.pic" class="demo-image__preview">
-					  <el-image
-					    style="width: 100px; height: 60px"
-					    :src="row.pic"
-					    :preview-src-list="row.srcList">
-					  </el-image>
-					</div>
-					<span v-else="">{{$t("common.noData")}}</span>
-      	</template>
-      </el-table-column>
-      <el-table-column prop="name" :label='$t("resource.table.resours.name")' :show-overflow-tooltip="true" width="180px"></el-table-column>
-      <el-table-column prop="code" :label='$t("resource.table.resours.no")' :show-overflow-tooltip="true" width="100px"></el-table-column>
-<!--      <el-table-column prop="brand" :label='$t("resource.table.resours.brand")' width="100px"></el-table-column>-->
-<!--      <el-table-column prop="specification" :label='$t("resource.table.resours.specification")' width="180px"></el-table-column>-->
-<!--      <el-table-column prop="model" :label='$t("resource.table.resours.model")'></el-table-column>-->
-<!--      <el-table-column prop="category.data" :label='$t("resource.table.resours.category")' width="100px"></el-table-column>-->
-      <el-table-column prop="zoneName" :label='$t("resource.table.resours.zoneName")' width="180px"></el-table-column>
-<!--      <el-table-column prop="nums" :label='$t("resource.table.resours.nums")' width="120px"></el-table-column>-->
-<!--      <el-table-column prop="cncProgram" :label='$t("resource.table.resours.isProgram")' width="110px" align="center">-->
-<!--      	<template slot-scope="{ row }">-->
-<!--      		<el-tag :type="row.cncProgram == '1' ? 'success' : 'info'">-->
-<!--      			{{row.cncProgram == '1' ? '是' : '否'}}-->
-<!--      		</el-tag>-->
-<!--      	</template>-->
-<!--      </el-table-column>-->
-      <el-table-column prop="linkStatus" :label='$t("resource.table.resours.linkStatus")' width="180px" align="center">
-      	<template slot-scope="{ row }">
-      		<div class="statusDiv" :style="'background:'+ row.linkStatus.background">{{row.linkStatus.text}}</div>
-      	</template>
-      </el-table-column>
-      <el-table-column prop="programSynTime" :label='$t("resource.table.resours.programSynTime")' width="180px"></el-table-column>
-      <el-table-column prop="programNum" :label='$t("resource.table.resours.programNum")' width="180px"></el-table-column>
-<!--      <el-table-column prop="controlStatus" :label='$t("resource.table.resours.controlStatus")' width="180px" align="center">-->
-<!--      	<template slot-scope="{ row }">-->
-<!--      		<div class="statusDiv" :style="'background:'+ row.controlStatus.background">{{row.controlStatus.text}}</div>-->
-<!--      	</template>-->
-<!--      </el-table-column>-->
-<!--      <el-table-column prop="productionStatus" :label='$t("resource.table.resours.productionStatus")' width="180px" align="center">-->
-<!--      	<template slot-scope="{ row }">-->
-<!--      		<div class="statusDiv" :style="'background:'+ row.productionStatus.background">{{row.productionStatus.text}}</div>-->
-<!--      	</template>-->
-<!--      </el-table-column>-->
-    </el-table>
-    <pagination
-      v-show="tableData.count > 0"
-      :limit.sync="queryParams.size"
-      :page.sync="queryParams.current"
-      :total="Number(tableData.count)"
-      @pagination="fetch"
-    />
-
-
-		<!-- 【程序】列表数据 -->
-		<div class="tableTitle">{{$t("resource.common.programList")}}</div>
-    <el-table
-      :key="tableKey2"
-      ref="table2"
-      v-loading="loading2"
-      :data="tableData2.records"
-      border
-      stripe
-      fit
-      row-key="id"
-      style="width: 100%;"
-      @selection-change="onSelectChange2"
-      @cell-click="cellClick2"
-    >
-    	<el-table-column :label='$t("common.serialNo")' width="55px" align="center">
-	      <template slot-scope="scope">
-	        <div>
-	          {{scope.$index+(queryParams2.current - 1) * queryParams2.size + 1}}
-	        </div>
-	      </template>
-      </el-table-column>
-      <el-table-column align="center" type="selection" width="50" :reserve-selection="true" />
-<!--      <el-table-column prop="no" :label='$t("resource.table.program.no")' :show-overflow-tooltip="true"></el-table-column>-->
-      <el-table-column prop="name" :label='$t("resource.table.program.name")' width="280px"></el-table-column>
-<!--      <el-table-column prop="runTime" :label='$t("resource.table.program.runTime")' width="180px"></el-table-column>-->
-      <el-table-column prop="size" :label='$t("resource.table.program.size")' width="180px"></el-table-column>
-<!--      <el-table-column prop="toolNums" :label='$t("resource.table.program.toolNums")' width="180px"></el-table-column>-->
-<!--      <el-table-column prop="version" :label='$t("resource.table.program.version")' width="180px"></el-table-column>-->
-<!--      <el-table-column prop="status" :label='$t("resource.table.program.status")' align="center" width="90px">-->
-<!--      	<template slot-scope="{ row }">-->
-<!--          <el-tag :type="row.status=='1' ? 'success' : 'danger'">-->
-<!--          	{{ row.status=='1' ? $t("common.show") : $t("common.hide") }}-->
-<!--          </el-tag>-->
-<!--        </template>-->
-<!--      </el-table-column>-->
-      <el-table-column prop="synTime" :label='$t("resource.table.program.synTime")' width="250px"></el-table-column>
-      <el-table-column
-        :label="$t('table.operation')"
-        align="center"
-        column-key="operation"
-        width="120px"
-      >
-        <template slot-scope="{ row }">
-        	<el-tooltip class="item" :content='$t("common.view")' effect="dark" placement="top-start">
-	          <i
-	            class="el-icon-view table-operation"
-	            style="color: #87d068;"
-	            @click="view(row)"
-	          />
-          </el-tooltip>
-        	<el-tooltip class="item" :content='$t("resource.common.eqDelete")' effect="dark" placement="top-start">
-	          <i
-	            class="el-icon-delete table-operation"
-	            style="color: #f50f50;"
-	            @click="equipmentDelete(row)"
-	          />
-          </el-tooltip>
-          <a class="el-icon-download table-operation" style="color: #1890ff;" :href="row.filePath" :download="row.submittedFileName"></a>
-        </template>
-      </el-table-column>
-    </el-table>
-    <pagination2
-      v-show="tableData2.total > 0"
-      :limit.sync="queryParams2.size"
-      :page.sync="queryParams2.current"
-      :total="Number(tableData2.total)"
-      @pagination="fetch2"
-    />
-    <tenant-edit
-      ref="edit"
-      :dialog-visible="dialog.isVisible"
-      :title="dialog.title"
-      @close="editClose"
-      @success="editSuccess"
-    />
-    <tenant-view
-      ref="view"
-      :dialog-visible="tenantViewVisible"
-      @close="viewClose"
-    />
-
-    <!-- 上传附件 -->
-    <tenant-upload
-      ref="upload"
-      :dialog-visible="dialogUpload.isVisible"
-      :title="dialogUpload.title"
-      @close="editUploadClose"
-      @success="editUploadSuccess"
-    />
-    <el-dialog
-      v-el-drag-dialog
-      :close-on-click-modal="false"
-      :close-on-press-escape="true"
-      title="预览"
-      width="80%"
-      top="50px"
-      :visible.sync="preview.isVisible"
-    >
-      <el-scrollbar>
-        <div v-html="preview.context" />
-      </el-scrollbar>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-	import Pagination from "@/components/Pagination"
-	import Pagination2 from "@/components/Pagination"
-	import TenantEdit from "./components/Edit"
-	import TenantView from "./components/View"
-  import TenantUpload from "./components/Upload"
-	// 【程序中心】-API
-	import programCenterApi from "@/api/resourceProductMgr/programCenter"
-	// 【设备管理】-API
-	import equipmentMgrApi from "@/api/resourceProductMgr/equipmentMgr"
-	import elDragDialog from '@/directive/el-drag-dialog'
-	import { downloadFile, initEnums, initDicts, initQueryParams } from '@/utils/commons'
-	import axios from 'axios'
-	export default {
-	  name: "WarehouseTypeMgr",
-	  directives: { elDragDialog },
-	  components: { Pagination, Pagination2, TenantEdit, TenantView,TenantUpload },
-	  props: {
-	  },
-	  data () {
-	    return {
-	    	audioStatus: [],
-	      dialog: {
-	        isVisible: false,
-	        title: ""
-	      },
-	      preview: {
-	        isVisible: false,
-	        context: ''
-	      },
-        dialogUpload: {
-          isVisible: false,
-          title: ""
-        },
-	      tenantViewVisible: false,
-	      tableKey: 0,
-	      queryParams: initQueryParams({}),
-	      selection: [],
-	      loading: false,
-	      tableData: {
-	        total: 0
-	      },
-	      currentRow: null,
-	      tableKey2: 2,
-	      queryParams2: initQueryParams({}),
-	      selection2: [],
-	      loading2: false,
-	      tableData2: {
-	        total: 0
-	      },
-	      dicts: {
-          MONITOR_WAY: {}
-        },
-	      enums: {
-	        TenantTypeEnum: {},
-	        TenantStatusEnum: {}
-	      }
-	    }
-	  },
-	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
-	  created() {
-	  	// 调用常量-审核状态
-	  	this.audioStatus = this.$constWKS.INLINESTATUSLIST
-	  	// 加载【字典】
-	  	initDicts(['MONITOR_WAY'], this.dicts);
-	  	// 加载【设备】列表数据
-	  	this.fetch()
-		},
-	  computed: {
-	    currentUser () {
-	      return this.$store.state.account.user
-	    },
-	    nationList() {
-        return convertEnum(this.dicts.MONITOR_WAY)
-      }
-	  },
-	  mounted () {
-
-	  },
-	  methods: {
-	  	// 【同步数控程序】按钮-事件
-	  	synchronousTool(){
-	  		if (!this.selection.length) {
-	        this.$message({
-	          message: this.$t("tips.noDataSelected"),
-	          type: "warning"
-	        })
-	        return
-	      }
-	  		let resourceIdList = []
-	  		this.selection.map(item => {
-	  			resourceIdList.push(item.id)
-	  		})
-	  		programCenterApi.synchronousNumericalProgram({resourceIdList}).then(res => {
-	  			res = res.data
-	  			// console.log("同步数控程序】: ", res)
-	  			if(res.isSuccess){
-	  				this.$message({
-		          message: this.$t("resource.tips.tongbTips"),
-		          type: "success"
-		        })
-	  			}
-	  		})
-	  	},
-
-
-      // 上传框弹出
-      editUpload(){
-        if (this.selection.length!=1) {
-          this.$message({
-            message: this.$t("tips.mustOne"),
-            type: "warning"
-          })
-          return
-        }
-        let row = this.selection[0];
-        this.$refs.upload.setTenant(row, this.dicts)
-        this.$refs.upload.type = "upload"
-        this.dialogUpload.title = this.$t("resource.buttons.upload")
-        this.dialogUpload.isVisible = true
-
-      },
-	  	// 【从设备删除】按钮-事件
-	  	equipmentDelete(row){
-	  		this.$confirm(this.$t("resource.tips.deletePg"), this.$t("common.tips"), {
-	      	distinguishCancelAndClose: true,
-	        confirmButtonText: this.$t("common.confirm"),
-	        cancelButtonText: this.$t("common.cancel"),
-	        type: "warning"
-	      }).then(() => {
-	      	programCenterApi.equipmentDelete(row).then(res => {
-		  			// console.log("【从设备删除】: ", res)
-		  			res = res.data
-		        if (res.isSuccess) {
-		          this.$message({
-		            message: this.$t("tips.deleteSuccess"),
-		            type: "success"
-		          })
-		          // 加载【刀具列表】数据
-		      		this.fetch2()
-		          // 清理已经删除的数据
-		          this.$refs.table2.clearSelection()
-		        }
-		  		})
-	      }).catch(() => {})
-	  	},
-	  	//【执行程序】按钮-事件
-	  	implementProgram(row){
-	  		this.$confirm(this.$t("resource.tips.zxTips"), this.$t("common.tips"), {
-	      	distinguishCancelAndClose: true,
-	        confirmButtonText: this.$t("common.confirm"),
-	        cancelButtonText: this.$t("common.cancel"),
-	        type: "warning"
-	      }).then(() => {
-		  		programCenterApi.implementProgram(row).then(res => {
-		  			// console.log("【执行程序】: ", res)
-		  			res = res.data
-		        if (res.isSuccess) {
-		          this.$message({
-		            message: this.$t("resource.tips.zhixingTips"),
-		            type: "success"
-		          })
-		          // 加载【刀具列表】数据
-		      		this.fetch2()
-		        }
-		  		})
-	  		}).catch(() => {})
-	  	},
-	  	// 选择当前行数据(设备列表)
-	  	handleCurrentChange(val) {
-        this.currentRow = val;
-        // 加载【刀具列表】数据
-	      this.fetch2()
-      },
-	    viewClose () {
-	      this.tenantViewVisible = false
-	    },
-	    editClose () {
-	      this.dialog.isVisible = false
-	    },
-      editUploadClose (){
-        this.dialogUpload.isVisible = false
-      },
-	    editSuccess () {
-	      this.search()
-	    },
-      editUploadSuccess(){
-        this.search()
-      },
-
-	    // 当选择项发生变化时会触发该事件
-	    onSelectChange (selection) {
-	    	// console.log("当选择项发生变化时会触发该事件:", this.selection)
-	      this.selection = selection
-	      // 加载【刀具列表】数据
-	      this.fetch2()
-	    },
-	    onSelectChange2 (selection2) {
-	      this.selection2 = selection2
-	    },
-	    search () {
-	      this.fetch({
-	        ...this.queryParams
-	      })
-	    },
-	    reset () {
-	      this.queryParams = initQueryParams({})
-	      this.$refs.table.clearSort()
-	      this.$refs.table.clearFilter()
-	      this.search()
-	    },
-	    add () {
-	      this.$refs.edit.type = "add"
-	      this.$refs.edit.setTenant(false, this.dicts)
-	      this.dialog.title = this.$t("common.add")
-	      this.dialog.isVisible = true
-	    },
-	    singleDelete (row) {
-	      this.$refs.table.clearSelection()
-	      this.$refs.table.toggleRowSelection(row, true)
-	      this.batchDelete()
-	    },
-	    batchDelete () {
-	      if (!this.selection.length) {
-	        this.$message({
-	          message: this.$t("tips.noDataSelected"),
-	          type: "warning"
-	        })
-	        return
-	      }
-
-	      this.$confirm(this.$t("lineSide.tips.wareTips"), this.$t("common.tips"), {
-	      	distinguishCancelAndClose: true,
-	        confirmButtonText: this.$t("common.confirm"),
-	        cancelButtonText: this.$t("common.cancel"),
-	        type: "warning"
-	      }).then(() => {
-	      	const ids = []
-		      this.selection.forEach(item => {
-		        ids.push(item.id)
-		      })
-		      this.delete(ids)
-	      }).catch(() => {})
-	    },
-	    clearSelections () {
-	      this.$refs.table.clearSelection()
-	    },
-	    delete (ids) {
-	      programCenterApi.remove({ ids: ids }).then(response => {
-	        const res = response.data
-	        if (res.isSuccess) {
-	          this.$message({
-	            message: this.$t("tips.deleteSuccess"),
-	            type: "success"
-	          })
-	          this.search()
-	          // 清理已经删除的数据
-	          this.$refs.table.clearSelection()
-	        }
-	      })
-	    },
-	    view (row) {
-	      this.$refs.edit.setTenant(row, this.dicts)
-	      this.$refs.edit.type = "view"
-	      this.dialog.title = this.$t("common.view")
-	      this.dialog.isVisible = true
-	    },
-	    // 【修改】表头上Btn-事件
-	    editOne() {
-	    	if (!this.selection.length) {
-	        this.$message({
-	          message: this.$t("tips.noDataSelected"),
-	          type: "warning"
-	        })
-	        return
-	      }
-	    	if (this.selection.length > 1) {
-	        this.$message({
-	          message: this.$t("tips.mustOne"),
-	          type: "warning"
-	        })
-	        return
-	      }
-	    	this.edit(this.selection[0]);
-	    },
-	    edit (row) {
-	      this.$refs.edit.setTenant(row, this.dicts)
-	      this.$refs.edit.type = "edit"
-	      this.dialog.title = this.$t("resource.common.setJiankong")
-	      this.dialog.isVisible = true
-	    },
-	    fetch (params = {}) {
-	      this.loading = true
-	      if (this.queryParams.timeRange) {
-	        this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
-	        this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
-	      }
-
-	      this.queryParams.current = params.current ? params.current : this.queryParams.current
-	      this.queryParams.size = params.size ? params.size : this.queryParams.size
-	      // 固定参数(采集的生产资源)
-	      this.queryParams.resourceStatus = "1"
-		    this.queryParams.displayStatus = "1";
-        this.queryParams.cncProgram = "1";
-        this.queryParams.displayStatus = "1";
-	      equipmentMgrApi.getPageList(this.queryParams).then(response => {
-	        const res = response.data
-	        if (res.isSuccess) {
-	          // 赋值
-	          this.tableData = res.data
-			  this.tableData.count = this.tableData.data.length
-	          if(this.tableData.data && this.tableData.data.length > 0){
-	          	// 设置图片,放大属性
-	          	this.tableData.data.forEach((item, index) => {
-		        		// item.url = 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg';
-		        		item.srcList = [item.pic];
-		        	})
-	          	// 默认点击第一条数据
-	          	//this.$refs.table.setCurrentRow(this.tableData.data[0]);  // 单选
-	          	this.$refs.table.toggleRowSelection(this.tableData.data[0], true)  // 多选
-	          	// 加载【刀具列表】数据
-	          	this.fetch2()
-	          }
-	        }
-	        // eslint-disable-next-line no-return-assign
-	      }).finally(() => this.loading = false)
-
-	    },
-	    cellClick (row, column) {
-	      if (column['columnKey'] === "operation") {
-	        return
-	      }
-	      let flag = false
-	      // 如果已经选中,就移除
-	      this.selection.forEach((item) => {
-	        if (item.id === row.id) {
-	          flag = true
-	          this.$refs.table.toggleRowSelection(row)
-	        }
-	      })
-				// 没有选中,就设置选中
-	      if (!flag) {
-	        this.$refs.table.toggleRowSelection(row, true)
-	      }
-	    },
-	    fetch2 (params = {}) {
-	    	// console.log("当前的选中行:", this.selection)
-	      this.loading2 = true
-	      if (this.queryParams2.timeRange) {
-	        this.queryParams2.map.createTime_st = this.queryParams2.timeRange[0]
-	        this.queryParams2.map.createTime_ed = this.queryParams2.timeRange[1]
-	      }
-
-	      this.queryParams2.current = params.current ? params.current : this.queryParams2.current
-	      this.queryParams2.size = params.size ? params.size : this.queryParams2.size
-
-	      // 传【设备】id数组
-	      let resourceIdList = []
-	      if(this.selection && this.selection.length > 0){
-	      	this.selection.map(item => {
-	      		resourceIdList.push(item.id)
-	      	})
-	      }
-	      this.queryParams2.model.resourceIdList = resourceIdList
-	      programCenterApi.page(this.queryParams2).then(response => {
-	        const res = response.data
-	        if (res.isSuccess) {
-	          this.tableData2 = res.data
-	        }
-	        // eslint-disable-next-line no-return-assign
-	      }).finally(() => this.loading2 = false)
-
-	    },
-	    cellClick2 (row, column) {
-	      if (column['columnKey'] === "operation") {
-	        return
-	      }
-	      let flag = false
-	      this.selection2.forEach((item) => {
-	        if (item.id === row.id) {
-	          flag = true
-	          this.$refs.table2.toggleRowSelection(row)
-	        }
-	      })
-
-	      if (!flag) {
-	        this.$refs.table2.toggleRowSelection(row, true)
-	      }
-	    }
-	  }
-	}
-</script>
-<style lang="scss" scoped>
-	.tableTitle{
-		background: #EEEEEE;
-		font-weight: bold;
-		padding: 15px 10px;
-	}
-</style>
+<template>
+  <div class="app-container">
+		<!-- 搜索模块 -->
+    <div class="filter-container">
+    	<span>
+    		<span>{{$t("resource.searchForm.resourceName")}}:</span>
+    		<el-input v-model="queryParams.model.name" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
+    	</span>
+    	<span style="margin-left: 15px;">
+    		<span>{{$t("resource.searchForm.linkStatus")}}:</span>
+    		<el-select v-model="queryParams.model.status" :placeholder='$t("common.pleaseSelect")' size="medium" style="width: 150px;">
+        	<el-option
+			      v-for="item in audioStatus"
+			      :key="item.value"
+			      :label="item.label"
+			      :value="item.value">
+			    </el-option>
+      	</el-select>
+    	</span>
+      <span style="margin-left: 15px;">
+	      <el-button plain type="primary" icon="el-icon-search" size="medium" @click="search">
+	        {{ $t("table.search") }}
+	      </el-button>
+	      <el-button plain type="warning" icon="el-icon-refresh" size="medium" @click="reset">
+	        {{ $t("table.reset") }}
+	      </el-button>
+      </span>
+    </div>
+
+    <!-- 功能按钮 -->
+    <el-row class="filter-container">
+    	<el-col>
+    		<el-button v-has-permission="['eqpg:synchronization']" type="primary" icon="el-icon-connection" size="medium" @click="synchronousTool">{{$t("resource.buttons.tongbSk")}}</el-button>
+        <el-button v-has-permission="['eqpg:upload']" type="primary" icon="el-icon-connection" size="medium" @click="editUpload">{{$t("resource.buttons.upload")}}</el-button>
+    	</el-col>
+    </el-row>
+
+    <!-- 【设备】列表数据 -->
+    <!-- 列表数据 -->
+    <el-table
+      :key="tableKey"
+      ref="table"
+      v-loading="loading"
+      :data="tableData.data"
+      border
+      stripe
+      fit
+      row-key="id"
+      style="width: 100%;"
+      @selection-change="onSelectChange"
+      @cell-click="cellClick"
+    >
+    	<el-table-column :label='$t("common.serialNo")' width="55px" align="center">
+	      <template slot-scope="scope">
+	        <div>
+	          {{scope.$index+(queryParams.current - 1) * queryParams.size + 1}}
+	        </div>
+	      </template>
+      </el-table-column>
+      <el-table-column align="center" type="selection" width="50" :reserve-selection="true" />
+      <el-table-column prop="pic" :label='$t("resource.table.resours.pic")' align="center" width="150px">
+      	<template slot-scope="{ row }">
+      		<div v-if="row.pic" class="demo-image__preview">
+					  <el-image
+					    style="width: 100px; height: 60px"
+					    :src="row.pic"
+					    :preview-src-list="row.srcList">
+					  </el-image>
+					</div>
+					<span v-else="">{{$t("common.noData")}}</span>
+      	</template>
+      </el-table-column>
+      <el-table-column prop="name" :label='$t("resource.table.resours.name")' :show-overflow-tooltip="true" width="180px"></el-table-column>
+      <el-table-column prop="code" :label='$t("resource.table.resours.no")' :show-overflow-tooltip="true" width="100px"></el-table-column>
+<!--      <el-table-column prop="brand" :label='$t("resource.table.resours.brand")' width="100px"></el-table-column>-->
+<!--      <el-table-column prop="specification" :label='$t("resource.table.resours.specification")' width="180px"></el-table-column>-->
+<!--      <el-table-column prop="model" :label='$t("resource.table.resours.model")'></el-table-column>-->
+<!--      <el-table-column prop="category.data" :label='$t("resource.table.resours.category")' width="100px"></el-table-column>-->
+      <el-table-column prop="zoneName" :label='$t("resource.table.resours.zoneName")' width="180px"></el-table-column>
+<!--      <el-table-column prop="nums" :label='$t("resource.table.resours.nums")' width="120px"></el-table-column>-->
+<!--      <el-table-column prop="cncProgram" :label='$t("resource.table.resours.isProgram")' width="110px" align="center">-->
+<!--      	<template slot-scope="{ row }">-->
+<!--      		<el-tag :type="row.cncProgram == '1' ? 'success' : 'info'">-->
+<!--      			{{row.cncProgram == '1' ? '是' : '否'}}-->
+<!--      		</el-tag>-->
+<!--      	</template>-->
+<!--      </el-table-column>-->
+      <el-table-column prop="linkStatus" :label='$t("resource.table.resours.linkStatus")' width="180px" align="center">
+      	<template slot-scope="{ row }">
+      		<div class="statusDiv" :style="'background:'+ row.linkStatus.background">{{row.linkStatus.text}}</div>
+      	</template>
+      </el-table-column>
+      <el-table-column prop="programSynTime" :label='$t("resource.table.resours.programSynTime")' width="180px"></el-table-column>
+      <el-table-column prop="programNum" :label='$t("resource.table.resours.programNum")' width="180px"></el-table-column>
+<!--      <el-table-column prop="controlStatus" :label='$t("resource.table.resours.controlStatus")' width="180px" align="center">-->
+<!--      	<template slot-scope="{ row }">-->
+<!--      		<div class="statusDiv" :style="'background:'+ row.controlStatus.background">{{row.controlStatus.text}}</div>-->
+<!--      	</template>-->
+<!--      </el-table-column>-->
+<!--      <el-table-column prop="productionStatus" :label='$t("resource.table.resours.productionStatus")' width="180px" align="center">-->
+<!--      	<template slot-scope="{ row }">-->
+<!--      		<div class="statusDiv" :style="'background:'+ row.productionStatus.background">{{row.productionStatus.text}}</div>-->
+<!--      	</template>-->
+<!--      </el-table-column>-->
+    </el-table>
+    <pagination
+      v-show="tableData.count > 0"
+      :limit.sync="queryParams.size"
+      :page.sync="queryParams.current"
+      :total="Number(tableData.count)"
+      @pagination="fetch"
+    />
+
+
+		<!-- 【程序】列表数据 -->
+		<div class="tableTitle">{{$t("resource.common.programList")}}</div>
+    <el-table
+      :key="tableKey2"
+      ref="table2"
+      v-loading="loading2"
+      :data="tableData2.records"
+      border
+      stripe
+      fit
+      row-key="id"
+      style="width: 100%;"
+      @selection-change="onSelectChange2"
+      @cell-click="cellClick2"
+    >
+    	<el-table-column :label='$t("common.serialNo")' width="55px" align="center">
+	      <template slot-scope="scope">
+	        <div>
+	          {{scope.$index+(queryParams2.current - 1) * queryParams2.size + 1}}
+	        </div>
+	      </template>
+      </el-table-column>
+      <el-table-column align="center" type="selection" width="50" :reserve-selection="true" />
+<!--      <el-table-column prop="no" :label='$t("resource.table.program.no")' :show-overflow-tooltip="true"></el-table-column>-->
+      <el-table-column prop="name" :label='$t("resource.table.program.name")' width="280px"></el-table-column>
+<!--      <el-table-column prop="runTime" :label='$t("resource.table.program.runTime")' width="180px"></el-table-column>-->
+      <el-table-column prop="size" :label='$t("resource.table.program.size")' width="180px"></el-table-column>
+<!--      <el-table-column prop="toolNums" :label='$t("resource.table.program.toolNums")' width="180px"></el-table-column>-->
+<!--      <el-table-column prop="version" :label='$t("resource.table.program.version")' width="180px"></el-table-column>-->
+<!--      <el-table-column prop="status" :label='$t("resource.table.program.status")' align="center" width="90px">-->
+<!--      	<template slot-scope="{ row }">-->
+<!--          <el-tag :type="row.status=='1' ? 'success' : 'danger'">-->
+<!--          	{{ row.status=='1' ? $t("common.show") : $t("common.hide") }}-->
+<!--          </el-tag>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
+      <el-table-column prop="synTime" :label='$t("resource.table.program.synTime")' width="250px"></el-table-column>
+      <el-table-column
+        :label="$t('table.operation')"
+        align="center"
+        column-key="operation"
+        width="120px"
+      >
+        <template slot-scope="{ row }">
+        	<el-tooltip class="item" :content='$t("common.view")' effect="dark" placement="top-start">
+	          <i
+	            class="el-icon-view table-operation"
+	            style="color: #87d068;"
+	            @click="view(row)"
+	          />
+          </el-tooltip>
+        	<el-tooltip class="item" :content='$t("resource.common.eqDelete")' effect="dark" placement="top-start">
+	          <i
+	            class="el-icon-delete table-operation"
+	            style="color: #f50f50;"
+	            @click="equipmentDelete(row)"
+	          />
+          </el-tooltip>
+          <a class="el-icon-download table-operation" style="color: #1890ff;" :href="row.filePath" :download="row.submittedFileName"></a>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination2
+      v-show="tableData2.total > 0"
+      :limit.sync="queryParams2.size"
+      :page.sync="queryParams2.current"
+      :total="Number(tableData2.total)"
+      @pagination="fetch2"
+    />
+    <tenant-edit
+      ref="edit"
+      :dialog-visible="dialog.isVisible"
+      :title="dialog.title"
+      @close="editClose"
+      @success="editSuccess"
+    />
+    <tenant-view
+      ref="view"
+      :dialog-visible="tenantViewVisible"
+      @close="viewClose"
+    />
+
+    <!-- 上传附件 -->
+    <tenant-upload
+      ref="upload"
+      :dialog-visible="dialogUpload.isVisible"
+      :title="dialogUpload.title"
+      @close="editUploadClose"
+      @success="editUploadSuccess"
+    />
+    <el-dialog
+      v-el-drag-dialog
+      :close-on-click-modal="false"
+      :close-on-press-escape="true"
+      title="预览"
+      width="80%"
+      top="50px"
+      :visible.sync="preview.isVisible"
+    >
+      <el-scrollbar>
+        <div v-html="preview.context" />
+      </el-scrollbar>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+	import Pagination from "@/components/Pagination"
+	import Pagination2 from "@/components/Pagination"
+	import TenantEdit from "./components/Edit"
+	import TenantView from "./components/View"
+  import TenantUpload from "./components/Upload"
+	// 【程序中心】-API
+	import programCenterApi from "@/api/resourceProductMgr/programCenter"
+	// 【设备管理】-API
+	import equipmentMgrApi from "@/api/resourceProductMgr/equipmentMgr"
+	import elDragDialog from '@/directive/el-drag-dialog'
+	import { downloadFile, initEnums, initDicts, initQueryParams } from '@/utils/commons'
+	import axios from 'axios'
+	export default {
+	  name: "WarehouseTypeMgr",
+	  directives: { elDragDialog },
+	  components: { Pagination, Pagination2, TenantEdit, TenantView,TenantUpload },
+	  props: {
+	  },
+	  data () {
+	    return {
+	    	audioStatus: [],
+	      dialog: {
+	        isVisible: false,
+	        title: ""
+	      },
+	      preview: {
+	        isVisible: false,
+	        context: ''
+	      },
+        dialogUpload: {
+          isVisible: false,
+          title: ""
+        },
+	      tenantViewVisible: false,
+	      tableKey: 0,
+	      queryParams: initQueryParams({}),
+	      selection: [],
+	      loading: false,
+	      tableData: {
+	        total: 0
+	      },
+	      currentRow: null,
+	      tableKey2: 2,
+	      queryParams2: initQueryParams({}),
+	      selection2: [],
+	      loading2: false,
+	      tableData2: {
+	        total: 0
+	      },
+	      dicts: {
+          MONITOR_WAY: {}
+        },
+	      enums: {
+	        TenantTypeEnum: {},
+	        TenantStatusEnum: {}
+	      }
+	    }
+	  },
+	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
+	  created() {
+	  	// 调用常量-审核状态
+	  	this.audioStatus = this.$constWKS.INLINESTATUSLIST
+	  	// 加载【字典】
+	  	initDicts(['MONITOR_WAY'], this.dicts);
+	  	// 加载【设备】列表数据
+	  	this.fetch()
+		},
+	  computed: {
+	    currentUser () {
+	      return this.$store.state.account.user
+	    },
+	    nationList() {
+        return convertEnum(this.dicts.MONITOR_WAY)
+      }
+	  },
+	  mounted () {
+
+	  },
+	  methods: {
+	  	// 【同步数控程序】按钮-事件
+	  	synchronousTool(){
+	  		if (!this.selection.length) {
+	        this.$message({
+	          message: this.$t("tips.noDataSelected"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	  		let resourceIdList = []
+	  		this.selection.map(item => {
+	  			resourceIdList.push(item.id)
+	  		})
+	  		programCenterApi.synchronousNumericalProgram({resourceIdList}).then(res => {
+	  			res = res.data
+	  			// console.log("同步数控程序】: ", res)
+	  			if(res.isSuccess){
+	  				this.$message({
+		          message: this.$t("resource.tips.tongbTips"),
+		          type: "success"
+		        })
+	  			}
+	  		})
+	  	},
+
+
+      // 上传框弹出
+      editUpload(){
+        if (this.selection.length!=1) {
+          this.$message({
+            message: this.$t("tips.mustOne"),
+            type: "warning"
+          })
+          return
+        }
+        let row = this.selection[0];
+        this.$refs.upload.setTenant(row, this.dicts)
+        this.$refs.upload.type = "upload"
+        this.dialogUpload.title = this.$t("resource.buttons.upload")
+        this.dialogUpload.isVisible = true
+
+      },
+	  	// 【从设备删除】按钮-事件
+	  	equipmentDelete(row){
+	  		this.$confirm(this.$t("resource.tips.deletePg"), this.$t("common.tips"), {
+	      	distinguishCancelAndClose: true,
+	        confirmButtonText: this.$t("common.confirm"),
+	        cancelButtonText: this.$t("common.cancel"),
+	        type: "warning"
+	      }).then(() => {
+	      	programCenterApi.equipmentDelete(row).then(res => {
+		  			// console.log("【从设备删除】: ", res)
+		  			res = res.data
+		        if (res.isSuccess) {
+		          this.$message({
+		            message: this.$t("tips.deleteSuccess"),
+		            type: "success"
+		          })
+		          // 加载【刀具列表】数据
+		      		this.fetch2()
+		          // 清理已经删除的数据
+		          this.$refs.table2.clearSelection()
+		        }
+		  		})
+	      }).catch(() => {})
+	  	},
+	  	//【执行程序】按钮-事件
+	  	implementProgram(row){
+	  		this.$confirm(this.$t("resource.tips.zxTips"), this.$t("common.tips"), {
+	      	distinguishCancelAndClose: true,
+	        confirmButtonText: this.$t("common.confirm"),
+	        cancelButtonText: this.$t("common.cancel"),
+	        type: "warning"
+	      }).then(() => {
+		  		programCenterApi.implementProgram(row).then(res => {
+		  			// console.log("【执行程序】: ", res)
+		  			res = res.data
+		        if (res.isSuccess) {
+		          this.$message({
+		            message: this.$t("resource.tips.zhixingTips"),
+		            type: "success"
+		          })
+		          // 加载【刀具列表】数据
+		      		this.fetch2()
+		        }
+		  		})
+	  		}).catch(() => {})
+	  	},
+	  	// 选择当前行数据(设备列表)
+	  	handleCurrentChange(val) {
+        this.currentRow = val;
+        // 加载【刀具列表】数据
+	      this.fetch2()
+      },
+	    viewClose () {
+	      this.tenantViewVisible = false
+	    },
+	    editClose () {
+	      this.dialog.isVisible = false
+	    },
+      editUploadClose (){
+        this.dialogUpload.isVisible = false
+      },
+	    editSuccess () {
+	      this.search()
+	    },
+      editUploadSuccess(){
+        this.search()
+      },
+
+	    // 当选择项发生变化时会触发该事件
+	    onSelectChange (selection) {
+	    	// console.log("当选择项发生变化时会触发该事件:", this.selection)
+	      this.selection = selection
+	      // 加载【刀具列表】数据
+	      this.fetch2()
+	    },
+	    onSelectChange2 (selection2) {
+	      this.selection2 = selection2
+	    },
+	    search () {
+	      this.fetch({
+	        ...this.queryParams
+	      })
+	    },
+	    reset () {
+	      this.queryParams = initQueryParams({})
+	      this.$refs.table.clearSort()
+	      this.$refs.table.clearFilter()
+	      this.search()
+	    },
+	    add () {
+	      this.$refs.edit.type = "add"
+	      this.$refs.edit.setTenant(false, this.dicts)
+	      this.dialog.title = this.$t("common.add")
+	      this.dialog.isVisible = true
+	    },
+	    singleDelete (row) {
+	      this.$refs.table.clearSelection()
+	      this.$refs.table.toggleRowSelection(row, true)
+	      this.batchDelete()
+	    },
+	    batchDelete () {
+	      if (!this.selection.length) {
+	        this.$message({
+	          message: this.$t("tips.noDataSelected"),
+	          type: "warning"
+	        })
+	        return
+	      }
+
+	      this.$confirm(this.$t("lineSide.tips.wareTips"), this.$t("common.tips"), {
+	      	distinguishCancelAndClose: true,
+	        confirmButtonText: this.$t("common.confirm"),
+	        cancelButtonText: this.$t("common.cancel"),
+	        type: "warning"
+	      }).then(() => {
+	      	const ids = []
+		      this.selection.forEach(item => {
+		        ids.push(item.id)
+		      })
+		      this.delete(ids)
+	      }).catch(() => {})
+	    },
+	    clearSelections () {
+	      this.$refs.table.clearSelection()
+	    },
+	    delete (ids) {
+	      programCenterApi.remove({ ids: ids }).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	          this.$message({
+	            message: this.$t("tips.deleteSuccess"),
+	            type: "success"
+	          })
+	          this.search()
+	          // 清理已经删除的数据
+	          this.$refs.table.clearSelection()
+	        }
+	      })
+	    },
+	    view (row) {
+	      this.$refs.edit.setTenant(row, this.dicts)
+	      this.$refs.edit.type = "view"
+	      this.dialog.title = this.$t("common.view")
+	      this.dialog.isVisible = true
+	    },
+	    // 【修改】表头上Btn-事件
+	    editOne() {
+	    	if (!this.selection.length) {
+	        this.$message({
+	          message: this.$t("tips.noDataSelected"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	    	if (this.selection.length > 1) {
+	        this.$message({
+	          message: this.$t("tips.mustOne"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	    	this.edit(this.selection[0]);
+	    },
+	    edit (row) {
+	      this.$refs.edit.setTenant(row, this.dicts)
+	      this.$refs.edit.type = "edit"
+	      this.dialog.title = this.$t("resource.common.setJiankong")
+	      this.dialog.isVisible = true
+	    },
+	    fetch (params = {}) {
+	      this.loading = true
+	      if (this.queryParams.timeRange) {
+	        this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
+	        this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
+	      }
+
+	      this.queryParams.current = params.current ? params.current : this.queryParams.current
+	      this.queryParams.size = params.size ? params.size : this.queryParams.size
+	      // 固定参数(采集的生产资源)
+	      this.queryParams.resourceStatus = "1"
+		    this.queryParams.displayStatus = "1";
+        this.queryParams.cncProgram = "1";
+        this.queryParams.displayStatus = "1";
+	      equipmentMgrApi.getPageList(this.queryParams).then(response => {
+	        const res = response.data;
+	        if (res.isSuccess) {
+	          // 赋值
+	          this.tableData = res.data
+			  		this.tableData.count = res.data.count;
+	          if(this.tableData.data && this.tableData.data.length > 0){
+	          	// 设置图片,放大属性
+	          	this.tableData.data.forEach((item, index) => {
+		        		// item.url = 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg';
+		        		item.srcList = [item.pic];
+		        	})
+	          	// 默认点击第一条数据
+	          	//this.$refs.table.setCurrentRow(this.tableData.data[0]);  // 单选
+	          	this.$refs.table.toggleRowSelection(this.tableData.data[0], true)  // 多选
+	          	// 加载【刀具列表】数据
+	          	this.fetch2()
+	          }
+	        }
+	        // eslint-disable-next-line no-return-assign
+	      }).finally(() => this.loading = false)
+
+	    },
+	    cellClick (row, column) {
+	      if (column['columnKey'] === "operation") {
+	        return
+	      }
+	      let flag = false
+	      // 如果已经选中,就移除
+	      this.selection.forEach((item) => {
+	        if (item.id === row.id) {
+	          flag = true
+	          this.$refs.table.toggleRowSelection(row)
+	        }
+	      })
+				// 没有选中,就设置选中
+	      if (!flag) {
+	        this.$refs.table.toggleRowSelection(row, true)
+	      }
+	    },
+	    fetch2 (params = {}) {
+	    	// console.log("当前的选中行:", this.selection)
+	      this.loading2 = true
+	      if (this.queryParams2.timeRange) {
+	        this.queryParams2.map.createTime_st = this.queryParams2.timeRange[0]
+	        this.queryParams2.map.createTime_ed = this.queryParams2.timeRange[1]
+	      }
+
+	      this.queryParams2.current = params.current ? params.current : this.queryParams2.current
+	      this.queryParams2.size = params.size ? params.size : this.queryParams2.size
+
+	      // 传【设备】id数组
+	      let resourceIdList = []
+	      if(this.selection && this.selection.length > 0){
+	      	this.selection.map(item => {
+	      		resourceIdList.push(item.id)
+	      	})
+	      }
+	      this.queryParams2.model.resourceIdList = resourceIdList
+	      programCenterApi.page(this.queryParams2).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	          this.tableData2 = res.data
+	        }
+	        // eslint-disable-next-line no-return-assign
+	      }).finally(() => this.loading2 = false)
+
+	    },
+	    cellClick2 (row, column) {
+	      if (column['columnKey'] === "operation") {
+	        return
+	      }
+	      let flag = false
+	      this.selection2.forEach((item) => {
+	        if (item.id === row.id) {
+	          flag = true
+	          this.$refs.table2.toggleRowSelection(row)
+	        }
+	      })
+
+	      if (!flag) {
+	        this.$refs.table2.toggleRowSelection(row, true)
+	      }
+	    }
+	  }
+	}
+</script>
+<style lang="scss" scoped>
+	.tableTitle{
+		background: #EEEEEE;
+		font-weight: bold;
+		padding: 15px 10px;
+	}
+</style>