Selaa lähdekoodia

刀具管理刀具同步接口联调及测试问题修改

yejian 3 vuotta sitten
vanhempi
commit
2679917bf2

+ 14 - 4
imcs-ui/src/api/prepareProductMgr/machineCustomizeCuttingTool.js

@@ -33,9 +33,13 @@ const apiList = {
     method: 'POST',
     url: `/authority/machineCuttingTool/query`
   },
-  sysCuttingTools: {
+  synCuttingTools: {
     method: 'POST',
-    url: `/authority/machineCuttingTool/sysCuttingTools`
+    url: `/authority/machineCuttingTool/synCuttingTools`
+  },
+  getPageList: {
+    method: 'POST',
+    url: `/authority/productionresourceBiz/page`
   }
 }
 
@@ -58,6 +62,12 @@ export default {
       data
     })
   },
+  getPageList (data) {
+    return axiosApi({
+      ...apiList.getPageList,
+      data
+    })
+  },
   save (data) {
     return axiosApi({
       ...apiList.save,
@@ -88,9 +98,9 @@ export default {
       data
     })
   },
-  sysCuttingTools (data) {
+  synCuttingTools (data) {
     return axiosApi({
-      ...apiList.sysCuttingTools,
+      ...apiList.synCuttingTools,
       data
     })
   },

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

@@ -1,344 +1,353 @@
-<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>
+<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.onlineStatus" :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="querypPageMachineCuttingTools()"
+    />
+  </div>
+</template>
+
+<script>
+	import Pagination from "@/components/Pagination"
+  // 【设备刀具动态资源管理】-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 {
+	      selectMachineId:"",
+	      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
+
+        // 查询必须参数
+        machineCustomizeCuttingToolMgrApi.getPageList(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)
+          const ids = []
+          ids.push(row.id)
+          this.sysCuttingTools(ids)
+      },
+
+      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.synCuttingTools({ 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){
+	      this.selectMachineId = row.id
+        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
+          }
+        })
+      },
+      querypPageMachineCuttingTools(){
+	      console.log(this.selectMachineId);
+        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 = this.selectMachineId
+        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>