From 1427584584848e1a8c7997d84945c0d19488d698 Mon Sep 17 00:00:00 2001 From: hwh <332078369@qq.com> Date: 星期四, 29 八月 2024 14:05:49 +0800 Subject: [PATCH] Merge branch 'hwh' --- Web/src/views/wcs/wcsDevice/index.vue | 26 ++++++++++++++++++++------ 1 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Web/src/views/wcs/wcsDevice/index.vue b/Web/src/views/wcs/wcsDevice/index.vue index adb4f8f..bb543eb 100644 --- a/Web/src/views/wcs/wcsDevice/index.vue +++ b/Web/src/views/wcs/wcsDevice/index.vue @@ -37,7 +37,6 @@ style="margin-left:5px;"> 闅愯棌 </el-button> <el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddWcsDevice" v-auth="'wcsDevice:add'"> 鏂板 </el-button> - </el-button-group> </el-form-item> @@ -59,7 +58,7 @@ <el-table-column prop="level" label="璁惧绾у埆" show-overflow-tooltip=""> <template #default="scope"> <el-tag :type="dv('DeviceLevelEnum', scope.row.level)?.tagType"> {{ dv('DeviceLevelEnum', - scope.row.level)?.name}}</el-tag> + scope.row.level)?.name }}</el-tag> </template> </el-table-column> <el-table-column prop="dbNumber" label="DB鍖哄煙" show-overflow-tooltip="" /> @@ -69,7 +68,7 @@ <el-table-column prop="posType" label="娴佺▼瀛楃被鍨�" show-overflow-tooltip=""> <template #default="scope"> <el-tag :type="dv('PLCDataTypeEnum', scope.row.posType)?.tagType"> {{ dv('PLCDataTypeEnum', - scope.row.posType)?.name}}</el-tag> + scope.row.posType)?.name }}</el-tag> </template> </el-table-column> <el-table-column prop="ledIP" label="鏄剧ず灞廼p鍦板潃" show-overflow-tooltip="" /> @@ -79,13 +78,15 @@ <ModifyRecord :data="scope.row" /> </template> </el-table-column> - <el-table-column label="鎿嶄綔" width="140" align="center" fixed="right" show-overflow-tooltip="" + <el-table-column label="鎿嶄綔" width="220" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('wcsDevice:update') || auth('wcsDevice:delete')"> <template #default="scope"> <el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditWcsDevice(scope.row)" v-auth="'wcsDevice:update'"> 缂栬緫 </el-button> <el-button icon="ele-Delete" size="small" text="" type="primary" @click="delWcsDevice(scope.row)" v-auth="'wcsDevice:delete'"> 鍒犻櫎 </el-button> + <el-button icon="ele-Plus" size="small" text="" type="primary" @click="generateDevicePos(scope.row)" + v-auth="'wcsDevice:generate'"> 鐢熸垚鐐逛綅 </el-button> </template> </el-table-column> </el-table> @@ -112,7 +113,7 @@ import printDialog from '/@/views/system/print/component/hiprint/preview.vue' import editDialog from '/@/views/wcs/wcsDevice/component/editDialog.vue' -import { pageWcsDevice, deleteWcsDevice } from '/@/api/wcs/wcsDevice'; +import { pageWcsDevice, deleteWcsDevice, generatePos } from '/@/api/wcs/wcsDevice'; import { getWcsPlcPlcIdDropdown } from '/@/api/wcs/wcsDevice'; const showAdvanceQueryUI = ref(false); @@ -167,7 +168,20 @@ editWcsDeviceTitle.value = '缂栬緫璁惧淇℃伅'; editDialogRef.value.openDialog(row); }; - +//鐢熸垚鐐逛綅 +const generateDevicePos = (row: any) => { + ElMessageBox.prompt('璇疯緭鍏ヨ捣濮嬬偣浣�', '鐢熸垚鐐逛綅', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + }) + .then(async ({ value }) => { + await generatePos({ id: row.id, pos: value }); + ElMessage({ + type: 'success', + message: `鐢熸垚鐐逛綅鎴愬姛`, + }) + }) +} // 鍒犻櫎 const delWcsDevice = (row: any) => { ElMessageBox.confirm(`纭畾瑕佸垹闄ゅ悧?`, "鎻愮ず", { -- Gitblit v1.8.0