|
|
@@ -1,141 +1,212 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <el-form
|
|
|
- :model="queryParams"
|
|
|
- ref="queryForm"
|
|
|
- size="small"
|
|
|
- :inline="true"
|
|
|
- v-show="showSearch"
|
|
|
- label-width="100px"
|
|
|
+ <el-radio-group v-model="tabPosition" style="margin: 5px">
|
|
|
+ <el-radio-button label="first">物资柜位置</el-radio-button>
|
|
|
+ <el-radio-button label="second">物资柜列表</el-radio-button>
|
|
|
+ </el-radio-group>
|
|
|
+ <div
|
|
|
+ style="
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ position: relative;
|
|
|
+ "
|
|
|
+ v-show="tabPosition == 'first'"
|
|
|
>
|
|
|
- <el-form-item label="物资柜编码" prop="cabinetCode">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.cabinetCode"
|
|
|
- placeholder="请输入物资柜编码"
|
|
|
- clearable
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
+ <!-- 缩放容器 -->
|
|
|
+ <div
|
|
|
+ ref="mapContainer"
|
|
|
+ :style="{
|
|
|
+ transform: `scale(${scaleFactor})`,
|
|
|
+ transformOrigin: 'top left',
|
|
|
+ width: '1250px',
|
|
|
+ height: '700px',
|
|
|
+ position: 'relative',
|
|
|
+
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ style="width: 100%; height: 100%"
|
|
|
+ src="@/assets/images/marsBg.png"
|
|
|
+ alt=""
|
|
|
/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="物资柜名称" prop="cabinetName">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.cabinetName"
|
|
|
- placeholder="请输入物资柜名称"
|
|
|
- clearable
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
+ <img
|
|
|
+ v-for="(cabinet, index) in TicketListPage"
|
|
|
+ :key="cabinet.cabinetId"
|
|
|
+ :style="{
|
|
|
+ width: '35px',
|
|
|
+ height: '35px',
|
|
|
+ position: 'absolute',
|
|
|
+ cursor: 'pointer',
|
|
|
+ // 图标垂直居中
|
|
|
+ top: `${deptXLGCenter.top - 53}px`,
|
|
|
+ // 图标水平居中,动态计算偏移
|
|
|
+ left: `${deptXLGCenter.left - (TicketListPage.length * 35 + (TicketListPage.length - 1) * 5) / 2 + index * 40}px`,
|
|
|
+ }"
|
|
|
+ :src="require('@/assets/images/table_map2.png')"
|
|
|
+ alt=""
|
|
|
+ @click="handleCabinetClick(cabinet)"
|
|
|
/>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
-
|
|
|
- <el-form-item>
|
|
|
- <el-button
|
|
|
- v-no-more-click
|
|
|
- type="primary"
|
|
|
- icon="el-icon-search"
|
|
|
- size="mini"
|
|
|
- @click="handleQuery"
|
|
|
- >搜索
|
|
|
- </el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- v-no-more-click
|
|
|
- icon="el-icon-refresh"
|
|
|
- size="mini"
|
|
|
- @click="resetQuery"
|
|
|
- >重置
|
|
|
- </el-button
|
|
|
- >
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
-
|
|
|
- <el-row :gutter="10" class="mb8">
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- v-no-more-click
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- icon="el-icon-plus"
|
|
|
- size="mini"
|
|
|
- @click="handleAdd"
|
|
|
- v-hasPermi="['iscs:cabinet:add']"
|
|
|
- >新增
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- v-no-more-click
|
|
|
- type="danger"
|
|
|
- plain
|
|
|
- icon="el-icon-delete"
|
|
|
- size="mini"
|
|
|
- :disabled="multiple"
|
|
|
- @click="handleDelete"
|
|
|
- v-hasPermi="['mes:mat:info:batchremove']"
|
|
|
- >批量删除
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
|
|
|
- <right-toolbar
|
|
|
- :showSearch.sync="showSearch"
|
|
|
- @queryTable="getList"
|
|
|
- ></right-toolbar>
|
|
|
- </el-row>
|
|
|
+ <!-- deptCCO 区域的图标 -->
|
|
|
+ <img
|
|
|
+ v-for="(cabinet, index) in COCOTicketListPage"
|
|
|
+ :key="cabinet.cabinetId"
|
|
|
+ :style="{
|
|
|
+ width: '35px',
|
|
|
+ height: '35px',
|
|
|
+ position: 'absolute',
|
|
|
+ cursor: 'pointer',
|
|
|
+ // 图标垂直居中
|
|
|
+ top: `${deptCCOCenter.top - 53}px`,
|
|
|
+ // 图标水平居中,动态计算偏移
|
|
|
+ left: `${deptCCOCenter.left - (COCOTicketListPage.length * 35 + (COCOTicketListPage.length - 1) * 5) / 2 + index * 40}px`,
|
|
|
+ }"
|
|
|
+ :src="require('@/assets/images/table_map2.png')"
|
|
|
+ alt=""
|
|
|
+ @click="handleCabinetClick(cabinet)"
|
|
|
+ />
|
|
|
+ <div class="deptXLG" >R&R</div>
|
|
|
+ <div class="deptCCO" >CCO</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-if="tabPosition == 'second'">
|
|
|
+ <el-form
|
|
|
+ :model="queryParams"
|
|
|
+ ref="queryForm"
|
|
|
+ size="small"
|
|
|
+ :inline="true"
|
|
|
+ v-show="showSearch"
|
|
|
+ label-width="100px"
|
|
|
+ >
|
|
|
+ <el-form-item label="物资柜编码" prop="cabinetCode">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.cabinetCode"
|
|
|
+ placeholder="请输入物资柜编码"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="物资柜名称" prop="cabinetName">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.cabinetName"
|
|
|
+ placeholder="请输入物资柜名称"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
|
|
|
- <el-table
|
|
|
- v-loading="loading"
|
|
|
- :data="materialsList"
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
- >
|
|
|
- <el-table-column type="selection" width="55" align="center"/>
|
|
|
- <el-table-column label="物资柜编码" align="center" prop="cabinetCode">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="物资柜名称" align="center" prop="cabinetName"/>
|
|
|
- <el-table-column
|
|
|
- label="硬件名称"
|
|
|
- align="center"
|
|
|
- prop="hardwareName"
|
|
|
- />
|
|
|
-<!-- <el-table-column-->
|
|
|
-<!-- label="工作区域"-->
|
|
|
-<!-- align="center"-->
|
|
|
-<!-- prop="workareaName"-->
|
|
|
-<!-- />-->
|
|
|
- <el-table-column label="创建时间" align="center" prop="createTime"/>
|
|
|
- <el-table-column label="更新时间" align="center" prop="updateTime"/>
|
|
|
|
|
|
- <el-table-column
|
|
|
- label="操作"
|
|
|
- align="center"
|
|
|
- class-name="small-padding fixed-width"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
+ <el-form-item>
|
|
|
<el-button
|
|
|
v-no-more-click
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-search"
|
|
|
size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
- @click="handleUpdate(scope.row)"
|
|
|
- v-hasPermi="['iscs:cabinet:edit']"
|
|
|
- >编辑
|
|
|
- </el-button>
|
|
|
+ @click="handleQuery"
|
|
|
+ >搜索
|
|
|
+ </el-button
|
|
|
+ >
|
|
|
<el-button
|
|
|
v-no-more-click
|
|
|
+ icon="el-icon-refresh"
|
|
|
size="mini"
|
|
|
- type="text"
|
|
|
+ @click="resetQuery"
|
|
|
+ >重置
|
|
|
+ </el-button
|
|
|
+ >
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-row :gutter="10" class="mb8">
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ v-no-more-click
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ icon="el-icon-plus"
|
|
|
+ size="mini"
|
|
|
+ @click="handleAdd"
|
|
|
+ v-hasPermi="['iscs:cabinet:add']"
|
|
|
+ >新增
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ v-no-more-click
|
|
|
+ type="danger"
|
|
|
+ plain
|
|
|
icon="el-icon-delete"
|
|
|
- @click="handleDelete(scope.row)"
|
|
|
- v-hasPermi="['iscs:cabinet:remove']"
|
|
|
- >删除
|
|
|
+ size="mini"
|
|
|
+ :disabled="multiple"
|
|
|
+ @click="handleDelete"
|
|
|
+ v-hasPermi="['mes:mat:info:batchremove']"
|
|
|
+ >批量删除
|
|
|
</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <pagination
|
|
|
- v-show="total > 0"
|
|
|
- :total="total"
|
|
|
- :page.sync="queryParams.pages"
|
|
|
- :limit.sync="queryParams.size"
|
|
|
- @pagination="getList"
|
|
|
- />
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <right-toolbar
|
|
|
+ :showSearch.sync="showSearch"
|
|
|
+ @queryTable="getList"
|
|
|
+ ></right-toolbar>
|
|
|
+ </el-row>
|
|
|
+ <el-table
|
|
|
+ v-loading="loading"
|
|
|
+ :data="materialsList"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="55" align="center"/>
|
|
|
+ <el-table-column label="物资柜编码" align="center" prop="cabinetCode">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="物资柜名称" align="center" prop="cabinetName"/>
|
|
|
+ <el-table-column
|
|
|
+ label="硬件名称"
|
|
|
+ align="center"
|
|
|
+ prop="hardwareName"
|
|
|
+ />
|
|
|
+ <!-- <el-table-column-->
|
|
|
+ <!-- label="工作区域"-->
|
|
|
+ <!-- align="center"-->
|
|
|
+ <!-- prop="workareaName"-->
|
|
|
+ <!-- />-->
|
|
|
+ <el-table-column label="创建时间" align="center" prop="createTime"/>
|
|
|
+ <el-table-column label="更新时间" align="center" prop="updateTime"/>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ label="操作"
|
|
|
+ align="center"
|
|
|
+ class-name="small-padding fixed-width"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ v-no-more-click
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
+ v-hasPermi="['iscs:cabinet:edit']"
|
|
|
+ >编辑
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ v-no-more-click
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
+ v-hasPermi="['iscs:cabinet:remove']"
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination
|
|
|
+ v-show="total > 0"
|
|
|
+ :total="total"
|
|
|
+ :page.sync="queryParams.pages"
|
|
|
+ :limit.sync="queryParams.size"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+
|
|
|
<!-- 添加或修改班组对话框 -->
|
|
|
<el-dialog :visible.sync="open" width="510px" append-to-body>
|
|
|
<div slot="title" class="dialog-title">
|
|
|
@@ -240,7 +311,7 @@ import { genCode } from '@/api/system/autocode/rule'
|
|
|
export default {
|
|
|
name: 'Team',
|
|
|
components: {
|
|
|
- Treeselect,UploadFile
|
|
|
+ Treeselect
|
|
|
},
|
|
|
dicts: ['material_status'],
|
|
|
data() {
|
|
|
@@ -248,6 +319,7 @@ export default {
|
|
|
//自动生成编码
|
|
|
autoGenFlag: false,
|
|
|
optType: undefined,
|
|
|
+ tabPosition:'first',//顶部切换
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 选中数组
|
|
|
@@ -317,10 +389,8 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
-
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
-
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
cabinetCode: [
|
|
|
@@ -334,14 +404,38 @@ export default {
|
|
|
require:true,message:'硬件名称不能为空',trigger:'blur'
|
|
|
}
|
|
|
],
|
|
|
- // workareaId:[
|
|
|
- // {
|
|
|
- // require:true,message:'工作区域不能为空',trigger:'blur'
|
|
|
- // }
|
|
|
- // ]
|
|
|
- },
|
|
|
|
|
|
- workareaOptions: []
|
|
|
+ },
|
|
|
+ workareaOptions: [],
|
|
|
+ TicketListPage:[],//R&R岗位
|
|
|
+ COCOTicketListPage:[],//CCO岗位
|
|
|
+ scaleFactor: 1, // 缩放比例,初始值为1
|
|
|
+ deptXLGPosition: {
|
|
|
+ left: 500,
|
|
|
+ top: 260,
|
|
|
+ width: 65,
|
|
|
+ height: 25
|
|
|
+ },
|
|
|
+ deptCCOPosition: {
|
|
|
+ left: 670,
|
|
|
+ top: 480,
|
|
|
+ width: 65,
|
|
|
+ height: 25
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed:{
|
|
|
+ deptXLGCenter() {
|
|
|
+ return {
|
|
|
+ left: this.deptXLGPosition.left + this.deptXLGPosition.width / 2,
|
|
|
+ top: this.deptXLGPosition.top + this.deptXLGPosition.height / 2
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deptCCOCenter() {
|
|
|
+ return {
|
|
|
+ left: this.deptCCOPosition.left + this.deptCCOPosition.width / 2,
|
|
|
+ top: this.deptCCOPosition.top + this.deptCCOPosition.height / 2
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -359,27 +453,11 @@ export default {
|
|
|
label: item.hardwareName
|
|
|
}
|
|
|
})
|
|
|
- // console.log(response, this.hardWareList, '获取硬件信息')
|
|
|
+
|
|
|
})
|
|
|
- // listWorkarea(this.queryParams).then((response) => {
|
|
|
- // debugger;
|
|
|
- // var depts = this.handleTree(response.data.records, 'workareaId')
|
|
|
- //
|
|
|
- // this.workareaOptions = depts
|
|
|
- // this.loading = false
|
|
|
- // })
|
|
|
+
|
|
|
},
|
|
|
- /** 转换数据结构 */
|
|
|
- // normalizer(node) {
|
|
|
- // if (node.children && !node.children.length) {
|
|
|
- // delete node.children
|
|
|
- // }
|
|
|
- // return {
|
|
|
- // id: node.workareaId,
|
|
|
- // label: node.workareaName,
|
|
|
- // children: node.children
|
|
|
- // }
|
|
|
- // },
|
|
|
+
|
|
|
/** 查询物资类型下拉树结构 */
|
|
|
getTreeselect() {
|
|
|
const data = {
|
|
|
@@ -416,8 +494,11 @@ export default {
|
|
|
this.queryParams.endTime = this.formatDate(this.createTime[1])
|
|
|
}
|
|
|
getMaterialsCabinet(this.queryParams).then((response) => {
|
|
|
- // console.log(response, "获取物资信息allList ");
|
|
|
this.materialsList = response.data.records
|
|
|
+ console.log(response,'所有物资柜')
|
|
|
+ this.TicketListPage=response.data.records.filter((item) => {return item.workstationId=='8'})
|
|
|
+
|
|
|
+ this.COCOTicketListPage=response.data.records.filter((item) => {return item.workstationId=='7'})
|
|
|
this.total = response.data.total
|
|
|
this.machinerytypeList = this.handleTree(
|
|
|
response.data.records,
|
|
|
@@ -428,7 +509,10 @@ export default {
|
|
|
this.loading = false
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+ // 物资柜跳转详情
|
|
|
+ handleCabinetClick(cabinet){
|
|
|
+ console.log(cabinet,'详情拿到的')
|
|
|
+ },
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
this.open = false
|