浏览代码

锁具机构信息模块内容检查并修改

wyn 4 月之前
父节点
当前提交
2efac7c71b

+ 2 - 2
src/api/hw/hardware/lockset/index.ts

@@ -46,7 +46,7 @@ export const updateLocksetAPI = async (data: LockVO) => {
 // 删除锁具机构信息
 export const delLocksetAPI = async (ids: number) => {
   return await request.delete({
-    url: '/iscs/lockset/deleteLocksetList',
-    params: { ids: ids }
+    url: '/iscs/lockset/deleteLocksetList?ids='+ids,
+
   })
 }

+ 8 - 7
src/views/hw/hardware/lockset/LocksetForm.vue

@@ -11,7 +11,7 @@
         <el-tree-select
           v-model="formData.locksetTypeId"
           :data="locksetTypeOptions"
-          :props="{ label: 'locksetTypeName', value: 'locksetTypeId', children: 'children' }"
+          :props="{ label: 'locksetTypeName', value: 'id', children: 'children' }"
           placeholder="请选择锁具机构类型"
           class="!w-240px"
         />
@@ -95,8 +95,9 @@ import { ref, reactive } from 'vue'
 import { handleTree } from '@/utils/tree'
 import * as LocksetApi from '@/api/hw/hardware/lockset/index'
 import * as LocksetTypeApi from '@/api/hw/type/locksettype/index'
-import {listLocksetType} from "@/api/hw/type/locksettype/index";
-// import * as MaterialApi from '@/api/mes/material/information'
+
+import * as MaterialApi from '@/api/material/information'
+import {getLocksetInfoAPI} from "@/api/hw/hardware/lockset/index";
 // import * as AutocodeApi from '@/api/system/autocode/rule'
 
 defineOptions({ name: 'LockForm' })
@@ -142,7 +143,7 @@ const open = async (type: string, id?: number) => {
   if (id) {
     formLoading.value = true
     try {
-      formData.value = await LocksetApi.getLockInfoAPI(id)
+      formData.value = await LocksetApi.getLocksetInfoAPI(id)
     } finally {
       formLoading.value = false
     }
@@ -162,10 +163,10 @@ const submitForm = async () => {
   try {
     const data = formData.value
     if (formType.value === 'create') {
-      await LocksetApi.addLocksetApi(data)
+      await LocksetApi.addLocksetAPI(data)
       message.success(t('common.createSuccess'))
     } else {
-      await LocksetApi.updateLocksetApi(data)
+      await LocksetApi.updateLocksetAPI(data)
       message.success(t('common.updateSuccess'))
     }
     dialogVisible.value = false
@@ -205,7 +206,7 @@ const resetForm = () => {
 const getLockTypeList = async () => {
   const data = { pageNo: 1, pageSize: -1 }
   const response = await LocksetTypeApi.listLocksetType(data)
-  locksetTypeOptions.value = handleTree(response.records, 'locksetTypeId', 'parentTypeId', 'children')
+  locksetTypeOptions.value = handleTree(response.list, 'id', 'parentTypeId', )
 }
 
 /** 获取物资列表 */

+ 5 - 5
src/views/hw/hardware/lockset/index.vue

@@ -81,7 +81,7 @@
           <el-button
             link
             type="primary"
-            @click="openForm('update', scope.row.locksetId)"
+            @click="openForm('update', scope.row.id)"
             v-hasPermi="['mes:hw:lk:update']"
           >
             编辑
@@ -89,7 +89,7 @@
           <el-button
             link
             type="danger"
-            @click="handleDelete(scope.row.locksetId)"
+            @click="handleDelete(scope.row.id)"
             v-hasPermi="['mes:hw:lk:delete']"
           >
             删除
@@ -148,7 +148,7 @@ const getList = async () => {
   loading.value = true
   try {
     const data = await LocksetApi.listLocksetAPI(queryParams)
-    list.value = data.records
+    list.value = data.list
     total.value = data.total
   } finally {
     loading.value = false
@@ -159,7 +159,7 @@ const getList = async () => {
 const getLockTypeList = async () => {
   const data = { pageNo: 1, pageSize: -1 }
   const response = await LocksetTypeApi.listLocksetType(data)
-  locksetTypeOptions.value = handleTree(response.records, 'locksetTypeId', 'parentTypeId', 'children')
+  locksetTypeOptions.value = handleTree(response.list, 'id', 'parentTypeId')
 }
 
 /** 搜索按钮操作 */
@@ -176,7 +176,7 @@ const resetQuery = () => {
 
 /** 多选框选中数据 */
 const handleSelectionChange = (selection: any[]) => {
-  selectedIds.value = selection.map(item => item.locksetId)
+  selectedIds.value = selection.map(item => item.id)
 }
 
 /** 添加/修改操作 */

+ 1 - 1
src/views/hw/type/locksettype/index.vue

@@ -93,7 +93,7 @@
       <el-table-column
         prop="locksetTypeSpec"
         label="锁具机构类型规格"
-        
+
         align="center"
       />
       <el-table-column label="操作" align="center" >