diff --git a/src/apis/common/common.ts b/src/apis/common/common.ts index 849f45d..f30bc78 100644 --- a/src/apis/common/common.ts +++ b/src/apis/common/common.ts @@ -14,16 +14,6 @@ export function listBranchTree(query: { description: string | unknown }) { return http.get(`${BASE_URL}/tree/branch`, query) } -/** @desc 查询空间树 */ -export function listSpaceTree(query: { description: string | unknown }) { - return http.get(`${BASE_URL}/tree/space`, query) -} - -/** @desc 查询空间树 */ -export function listPointTree(query: { description: string | unknown }) { - return http.get(`${BASE_URL}/tree/point`, query) -} - /** @desc 查询菜单树 */ export function listMenuTree(query: { description: string }) { return http.get(`${BASE_URL}/tree/menu`, query) diff --git a/src/apis/production/productionLine.ts b/src/apis/production/productionLine.ts new file mode 100644 index 0000000..8ad8387 --- /dev/null +++ b/src/apis/production/productionLine.ts @@ -0,0 +1,62 @@ +import http from '@/utils/http' + +const BASE_URL = '/production/productionLine' + +export interface ProductionLineResp { + id: string + lineCode: string + lineName: string + lineType: string + workshop: string + supervisor: string + capacityPerShift: string + status: string + sortOrder: string + remark: string + createUser: string + createTime: string + updateUser: string + updateTime: string + createUserString: string + updateUserString: string + disabled: boolean +} +export interface ProductionLineQuery { + lineCode: string | undefined + lineName: string | undefined + lineType: string | undefined + status: string | undefined + createTime: string | undefined + sort: Array +} +export interface ProductionLinePageQuery extends ProductionLineQuery, PageQuery {} + +/** @desc 查询产线基础列表 */ +export function listProductionLine(query: ProductionLinePageQuery) { + return http.get>(`${BASE_URL}`, query) +} + +/** @desc 查询产线基础详情 */ +export function getProductionLine(id: string) { + return http.get(`${BASE_URL}/${id}`) +} + +/** @desc 新增产线基础 */ +export function addProductionLine(data: any) { + return http.post(`${BASE_URL}`, data) +} + +/** @desc 修改产线基础 */ +export function updateProductionLine(data: any, id: string) { + return http.put(`${BASE_URL}/${id}`, data) +} + +/** @desc 删除产线基础 */ +export function deleteProductionLine(id: string) { + return http.del(`${BASE_URL}/${id}`) +} + +/** @desc 导出产线基础 */ +export function exportProductionLine(query: ProductionLineQuery) { + return http.download(`${BASE_URL}/export`, query) +} diff --git a/src/apis/sysPeople/people.ts b/src/apis/sysPeople/people.ts index 3604cc3..5b710f3 100644 --- a/src/apis/sysPeople/people.ts +++ b/src/apis/sysPeople/people.ts @@ -1,5 +1,4 @@ import http from '@/utils/http' -import type {LabelValueState} from "@/types/global"; const BASE_URL = '/sysPeople/people' diff --git a/src/apis/system/message.ts b/src/apis/system/message.ts index 0152a3e..fafc80a 100644 --- a/src/apis/system/message.ts +++ b/src/apis/system/message.ts @@ -16,8 +16,8 @@ export function deleteMessage(ids: string | Array) { } /** @desc 标记已读 */ -export function readMessage(ids?: string | Array) { - return http.patch(`${BASE_URL}/read`, ids) +export function readMessage() { + return http.patch(`${BASE_URL}/read`) } /** @desc 查询未读消息数量 */ diff --git a/src/hooks/app/equipmentName.ts b/src/hooks/app/equipmentName.ts deleted file mode 100644 index f44cbdb..0000000 --- a/src/hooks/app/equipmentName.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ref } from 'vue' -import type { EquipmentQuery } from '@/apis/equipment/equipment' -import { getEquipmentNameList } from '@/apis/equipment/equipment' -import type { LabelValueState } from '@/types/global' - -/** 设备名称列表 */ -export function equipmentName(query: EquipmentQuery, options?: { onSuccess?: () => void }) { - const loading = ref(false) - const equipmentNameList = ref([]) - - const getEquipmentName = async () => { - try { - loading.value = true - const res = await getEquipmentNameList(query) - equipmentNameList.value = res.data - // eslint-disable-next-line ts/no-unused-expressions - options?.onSuccess && options.onSuccess() - } finally { - loading.value = false - } - } - return { equipmentNameList, getEquipmentName, loading } -} diff --git a/src/hooks/app/index.ts b/src/hooks/app/index.ts index de5c814..bb437f9 100644 --- a/src/hooks/app/index.ts +++ b/src/hooks/app/index.ts @@ -3,7 +3,3 @@ export * from './useDept' export * from './useBranch' export * from './useRole' export * from './useDict' -export * from './space' -export * from './point' -export * from './equipmentName' -export * from './productName' diff --git a/src/hooks/app/parkName.ts b/src/hooks/app/parkName.ts deleted file mode 100644 index 70fd9cb..0000000 --- a/src/hooks/app/parkName.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { LabelValueState } from '@/types/global' -import { type ParkQuery, getParkNameList } from '@/apis/car/park' - -/** 车场名称列表 */ -export function parkName(query: ParkQuery, options?: { onSuccess?: () => void }) { - const loading = ref(false) - const parkNameList = ref([]) - - const getParkName = async () => { - try { - loading.value = true - const res = await getParkNameList(query) - parkNameList.value = res.data - // eslint-disable-next-line ts/no-unused-expressions - options?.onSuccess && options.onSuccess() - } finally { - loading.value = false - } - } - return { parkNameList, getParkName, loading } -} diff --git a/src/hooks/app/point.ts b/src/hooks/app/point.ts deleted file mode 100644 index 915bfc8..0000000 --- a/src/hooks/app/point.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ref } from 'vue' -import type { TreeNodeData } from '@arco-design/web-vue' -import { listPointTree } from '@/apis' - -/** 部门模块 */ -export function point(options?: { onSuccess?: () => void }) { - const loading = ref(false) - const pointList = ref([]) - - const getPointList = async (name?: string) => { - try { - loading.value = true - const res = await listPointTree({ description: name }) - pointList.value = res.data - // eslint-disable-next-line ts/no-unused-expressions - options?.onSuccess && options.onSuccess() - } finally { - loading.value = false - } - } - return { pointList, getPointList, loading } -} diff --git a/src/hooks/app/productName.ts b/src/hooks/app/productName.ts deleted file mode 100644 index 6acbd42..0000000 --- a/src/hooks/app/productName.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ref } from 'vue' -import { getProductNameList } from '@/apis/equipment/product' -import type { LabelValueState } from '@/types/global' - -/** 设备名称列表 */ -export function productName(options?: { onSuccess?: () => void }) { - const loading = ref(false) - const productNameList = ref([]) - - const getProductName = async () => { - try { - loading.value = true - const res = await getProductNameList() - productNameList.value = res.data - // eslint-disable-next-line ts/no-unused-expressions - options?.onSuccess && options.onSuccess() - } finally { - loading.value = false - } - } - return { productNameList, getProductName, loading } -} diff --git a/src/hooks/app/ruleName.ts b/src/hooks/app/ruleName.ts deleted file mode 100644 index 0c31521..0000000 --- a/src/hooks/app/ruleName.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ref } from 'vue' -import type { LabelValueState } from '@/types/global' -import { getRuleNameList } from '@/apis/rule/rule' - -/** 设备名称列表 */ -export function ruleName(options?: { onSuccess?: () => void }) { - const loading = ref(false) - const ruleNameList = ref([]) - - const getRuleName = async () => { - try { - loading.value = true - const res = await getRuleNameList() - ruleNameList.value = res.data - // eslint-disable-next-line ts/no-unused-expressions - options?.onSuccess && options.onSuccess() - } finally { - loading.value = false - } - } - return { ruleNameList, getRuleName, loading } -} diff --git a/src/hooks/app/space.ts b/src/hooks/app/space.ts deleted file mode 100644 index 5780608..0000000 --- a/src/hooks/app/space.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ref } from 'vue' -import type { TreeNodeData } from '@arco-design/web-vue' -import { listSpaceTree } from '@/apis' - -/** 部门模块 */ -export function space(options?: { onSuccess?: () => void }) { - const loading = ref(false) - const spaceList = ref([]) - - const getSpaceList = async (name?: string) => { - try { - loading.value = true - const res = await listSpaceTree({ description: name }) - spaceList.value = res.data - // eslint-disable-next-line ts/no-unused-expressions - options?.onSuccess && options.onSuccess() - } finally { - loading.value = false - } - } - return { spaceList, getSpaceList, loading } -} diff --git a/src/layout/components/HeaderRightBar/index.vue b/src/layout/components/HeaderRightBar/index.vue index a41c303..62ca3de 100644 --- a/src/layout/components/HeaderRightBar/index.vue +++ b/src/layout/components/HeaderRightBar/index.vue @@ -115,8 +115,8 @@ const initWebSocket = (token: string) => { // 查询未读消息数量 const getMessageCount = async () => { - const { data } = await getUnreadMessageCount() - unreadMessageCount.value = data.total + // const { data } = await getUnreadMessageCount() + // unreadMessageCount.value = data.total const token = getToken() if (token) { initWebSocket(token) diff --git a/src/views/production/productionLine/ProductionLineAddModal.vue b/src/views/production/productionLine/ProductionLineAddModal.vue new file mode 100644 index 0000000..104f5fc --- /dev/null +++ b/src/views/production/productionLine/ProductionLineAddModal.vue @@ -0,0 +1,178 @@ + + + + + \ No newline at end of file diff --git a/src/views/production/productionLine/ProductionLineDetailDrawer.vue b/src/views/production/productionLine/ProductionLineDetailDrawer.vue new file mode 100644 index 0000000..0a531d3 --- /dev/null +++ b/src/views/production/productionLine/ProductionLineDetailDrawer.vue @@ -0,0 +1,56 @@ + + + + + \ No newline at end of file diff --git a/src/views/production/productionLine/index.vue b/src/views/production/productionLine/index.vue new file mode 100644 index 0000000..7434e16 --- /dev/null +++ b/src/views/production/productionLine/index.vue @@ -0,0 +1,176 @@ + + + + + \ No newline at end of file diff --git a/src/views/sysPeople/branch/BranchAddModal.vue b/src/views/sysPeople/branch/BranchAddModal.vue index b5906dd..d1cb309 100644 --- a/src/views/sysPeople/branch/BranchAddModal.vue +++ b/src/views/sysPeople/branch/BranchAddModal.vue @@ -14,14 +14,13 @@