|
@@ -26,14 +26,15 @@
|
|
|
</el-button>
|
|
|
</span>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<!-- 功能按钮 -->
|
|
|
<el-row class="filter-container">
|
|
|
<el-col>
|
|
|
<el-button type="primary" icon="el-icon-connection" size="medium" @click="synchronousTool">{{$t("resource.buttons.tongbSk")}}</el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-connection" size="medium" @click="editUpload">{{$t("resource.buttons.upload")}}</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
-
|
|
|
+
|
|
|
<!-- 【设备】列表数据 -->
|
|
|
<!-- 列表数据 -->
|
|
|
<el-table
|
|
@@ -60,9 +61,9 @@
|
|
|
<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
|
|
|
+ <el-image
|
|
|
style="width: 100px; height: 60px"
|
|
|
- :src="row.pic"
|
|
|
+ :src="row.pic"
|
|
|
:preview-src-list="row.srcList">
|
|
|
</el-image>
|
|
|
</div>
|
|
@@ -71,34 +72,36 @@
|
|
|
</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="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="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="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-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"
|
|
@@ -197,6 +200,15 @@
|
|
|
: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"
|
|
@@ -218,6 +230,7 @@
|
|
|
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
|
|
@@ -228,7 +241,7 @@
|
|
|
export default {
|
|
|
name: "WarehouseTypeMgr",
|
|
|
directives: { elDragDialog },
|
|
|
- components: { Pagination, Pagination2, TenantEdit, TenantView },
|
|
|
+ components: { Pagination, Pagination2, TenantEdit, TenantView,TenantUpload },
|
|
|
props: {
|
|
|
},
|
|
|
data () {
|
|
@@ -242,6 +255,10 @@
|
|
|
isVisible: false,
|
|
|
context: ''
|
|
|
},
|
|
|
+ dialogUpload: {
|
|
|
+ isVisible: false,
|
|
|
+ title: ""
|
|
|
+ },
|
|
|
tenantViewVisible: false,
|
|
|
tableKey: 0,
|
|
|
queryParams: initQueryParams({}),
|
|
@@ -285,7 +302,7 @@
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
// 【同步数控程序】按钮-事件
|
|
@@ -302,7 +319,7 @@
|
|
|
resourceIdList.push(item.id)
|
|
|
})
|
|
|
programCenterApi.synchronousNumericalProgram({resourceIdList}).then(res => {
|
|
|
- res = res.data
|
|
|
+ res = res.data
|
|
|
// console.log("同步数控程序】: ", res)
|
|
|
if(res.isSuccess){
|
|
|
this.$message({
|
|
@@ -312,6 +329,24 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+
|
|
|
+ // 上传框弹出
|
|
|
+ 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"), {
|
|
@@ -370,9 +405,16 @@
|
|
|
editClose () {
|
|
|
this.dialog.isVisible = false
|
|
|
},
|
|
|
+ editUploadClose (){
|
|
|
+ this.dialogUpload.isVisible = false
|
|
|
+ },
|
|
|
editSuccess () {
|
|
|
this.search()
|
|
|
},
|
|
|
+ editUploadSuccess(){
|
|
|
+ this.search()
|
|
|
+ },
|
|
|
+
|
|
|
// 当选择项发生变化时会触发该事件
|
|
|
onSelectChange (selection) {
|
|
|
// console.log("当选择项发生变化时会触发该事件:", this.selection)
|
|
@@ -413,7 +455,7 @@
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.$confirm(this.$t("lineSide.tips.wareTips"), this.$t("common.tips"), {
|
|
|
distinguishCancelAndClose: true,
|
|
|
confirmButtonText: this.$t("common.confirm"),
|
|
@@ -480,12 +522,12 @@
|
|
|
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.name = "%smu50%"
|
|
|
+ this.queryParams.name = "%smu50%"
|
|
|
equipmentMgrApi.getPageList(this.queryParams).then(response => {
|
|
|
const res = response.data
|
|
|
if (res.isSuccess) {
|
|
@@ -507,7 +549,7 @@
|
|
|
}
|
|
|
// eslint-disable-next-line no-return-assign
|
|
|
}).finally(() => this.loading = false)
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
cellClick (row, column) {
|
|
|
if (column['columnKey'] === "operation") {
|
|
@@ -533,10 +575,10 @@
|
|
|
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){
|
|
@@ -552,7 +594,7 @@
|
|
|
}
|
|
|
// eslint-disable-next-line no-return-assign
|
|
|
}).finally(() => this.loading2 = false)
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
cellClick2 (row, column) {
|
|
|
if (column['columnKey'] === "operation") {
|
|
@@ -565,7 +607,7 @@
|
|
|
this.$refs.table2.toggleRowSelection(row)
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
if (!flag) {
|
|
|
this.$refs.table2.toggleRowSelection(row, true)
|
|
|
}
|