|
@@ -134,7 +134,7 @@
|
|
<el-button
|
|
<el-button
|
|
link
|
|
link
|
|
type="primary"
|
|
type="primary"
|
|
- @click="handleView(scope.row.id)"
|
|
|
|
|
|
+ @click="handleView(scope.row)"
|
|
v-hasPermi="['rq:iot-bom:update']"
|
|
v-hasPermi="['rq:iot-bom:update']"
|
|
>
|
|
>
|
|
{{ t('bomList.materialDetail') }}
|
|
{{ t('bomList.materialDetail') }}
|
|
@@ -163,6 +163,7 @@
|
|
:node-id="currentBomNodeId"
|
|
:node-id="currentBomNodeId"
|
|
:deviceId = "props.deviceId"
|
|
:deviceId = "props.deviceId"
|
|
ref="showDrawer"
|
|
ref="showDrawer"
|
|
|
|
+ :row-info="currentRowInfo"
|
|
@refresh="handleDrawerClosed"
|
|
@refresh="handleDrawerClosed"
|
|
/>
|
|
/>
|
|
</template>
|
|
</template>
|
|
@@ -190,6 +191,13 @@ const currentBomNodeId = ref() // 当前选中的bom节点
|
|
const refreshTable = ref(true) // 重新渲染表格状态
|
|
const refreshTable = ref(true) // 重新渲染表格状态
|
|
const list = ref() // 列表的数据
|
|
const list = ref() // 列表的数据
|
|
const props = defineProps<{ deviceId?: number , deviceCategoryName?:string }>()
|
|
const props = defineProps<{ deviceId?: number , deviceCategoryName?:string }>()
|
|
|
|
+
|
|
|
|
+// 添加存储当前行信息的变量 抽屉页面使用
|
|
|
|
+const currentRowInfo = ref({
|
|
|
|
+ deviceCategoryName: '',
|
|
|
|
+ bomNodeName: ''
|
|
|
|
+})
|
|
|
|
+
|
|
const queryParams = reactive({
|
|
const queryParams = reactive({
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
@@ -238,12 +246,17 @@ const openSelectMaterialForm = (row: any) => {
|
|
}
|
|
}
|
|
|
|
|
|
/** 查看物料详情 */
|
|
/** 查看物料详情 */
|
|
-const handleView = async (nodeId) => {
|
|
|
|
- currentBomNodeId.value = nodeId
|
|
|
|
|
|
+const handleView = async (row) => {
|
|
|
|
+ currentBomNodeId.value = row.id
|
|
|
|
+ // 保存当前行的信息
|
|
|
|
+ currentRowInfo.value = {
|
|
|
|
+ deviceCategoryName: props.deviceCategoryName || '暂无',
|
|
|
|
+ bomNodeName: row.name || '暂无'
|
|
|
|
+ }
|
|
drawerVisible.value = true
|
|
drawerVisible.value = true
|
|
showDrawer.value.openDrawer()
|
|
showDrawer.value.openDrawer()
|
|
// 强制刷新物料数据
|
|
// 强制刷新物料数据
|
|
- await showDrawer.value.loadMaterials(nodeId)
|
|
|
|
|
|
+ await showDrawer.value.loadMaterials(row.id)
|
|
}
|
|
}
|
|
|
|
|
|
const chooseMaterial = async (selectedMaterials) => {
|
|
const chooseMaterial = async (selectedMaterials) => {
|