Sfoglia il codice sorgente

去掉所有debugger

lipenghui 2 mesi fa
parent
commit
8986588be0
33 ha cambiato i file con 15 aggiunte e 58 eliminazioni
  1. 0 1
      src/config/axios/service.ts
  2. 0 1
      src/views/Home/Index.vue
  3. 0 1
      src/views/pms/device/MaintenanceDetail.vue
  4. 0 2
      src/views/pms/device/RecordInfo.vue
  5. 15 13
      src/views/pms/device/monitor/TdDeviceInfo.vue
  6. 0 1
      src/views/pms/failure/index.vue
  7. 0 1
      src/views/pms/information/IotInformationDbForm.vue
  8. 0 1
      src/views/pms/inspect/item/IotInspectItemForm.vue
  9. 0 1
      src/views/pms/inspect/order/InspectOrderDetail.vue
  10. 0 1
      src/views/pms/inspect/order/OrderComponent.vue
  11. 0 4
      src/views/pms/inspect/order/WriteOrder.vue
  12. 0 1
      src/views/pms/inspect/order/WriteOrdertest.vue
  13. 0 1
      src/views/pms/inspect/order/index.vue
  14. 0 1
      src/views/pms/inspect/plan/InspectRouteList.vue
  15. 0 2
      src/views/pms/inspect/plan/IotInspectPlan.vue
  16. 0 1
      src/views/pms/inspect/plan/RouteInspectItemDrawer.vue
  17. 0 1
      src/views/pms/inspect/route/InspectItemList.vue
  18. 0 4
      src/views/pms/inspect/route/IotInspectRoute.vue
  19. 0 2
      src/views/pms/iotinfo/IotInfoForm.vue
  20. 0 2
      src/views/pms/iotinfo/IotInfoFormTree.vue
  21. 0 1
      src/views/pms/iotmainworkorder/IotMainWorkOrderDetail.vue
  22. 0 1
      src/views/pms/iotmainworkorder/WorkOrderMaterial.vue
  23. 0 1
      src/views/pms/iotopeationfill/index.vue
  24. 0 1
      src/views/pms/iotopeationfill/index1.vue
  25. 0 1
      src/views/pms/maintain/IotMaintain.vue
  26. 0 2
      src/views/pms/maintain/IotMaintainDetail.vue
  27. 0 1
      src/views/pms/maintain/material/MaintainMaterialDrawer.vue
  28. 0 1
      src/views/pms/maintain/material/index.vue
  29. 0 2
      src/views/pms/productclassify/ProductClassifyForm.vue
  30. 0 1
      src/views/pms/stat/inspect.vue
  31. 0 1
      src/views/pms/stat/maintain.vue
  32. 0 2
      src/views/pms/stat/maintenance.vue
  33. 0 1
      src/views/system/tree/index.vue

+ 0 - 1
src/config/axios/service.ts

@@ -183,7 +183,6 @@ service.interceptors.response.use(
       if (requestUrl.includes('rq/')||requestUrl.includes('system/dict')||requestUrl.includes('system/auth/get-permission-info')||requestUrl.includes('system/menu/list')) {
         const localeStore = useLocaleStore()
         const lang = localeStore.getCurrentLocale.lang
-        debugger
         if (data&& data.data) {
           if (data.data.list) {
             if (Array.isArray(data.data.list)) {

+ 0 - 1
src/views/Home/Index.vue

@@ -258,7 +258,6 @@ const safe = ref()
 const getStats = async () => {
   // 获取基础统计数据
   IotStatApi.getDeviceCount().then((res) => {
-    debugger
     device.value = res
   })
   IotStatApi.getMaintainCount().then((res) => {

+ 0 - 1
src/views/pms/device/MaintenanceDetail.vue

@@ -671,7 +671,6 @@ const submitForm = async () => {
       mainWorkOrderBom: list.value,
       mainWorkOrderMaterials: materialList.value
     }
-    debugger
     await IotMainWorkOrderApi.fillWorkOrder(data)
     message.success(t('common.createSuccess'))
     close()

+ 0 - 2
src/views/pms/device/RecordInfo.vue

@@ -135,7 +135,6 @@ const getList = async () => {
     // queryParams.createTime = formatTimestamp(JSON.parse(deptId.split(",")[2].substring(0,10)));
     queryParams.orderId = orderId
     queryParams.deviceId = deviceId
-    debugger
     const data = await IotOpeationFillApi.getIotOrderPage(queryParams);
     list.value = data;
     // if(cxStatus){
@@ -197,7 +196,6 @@ const getAttrList = async () => {
   try {
     totalRunTime1 = 0;
     queryParams.createTime = formatTimestamp(createtime);
-    debugger
     const data = await IotOpeationFillApi.getAttrs(queryParams)
     attrList.value = data;
     attrList.value.forEach(function (item,index){

+ 15 - 13
src/views/pms/device/monitor/TdDeviceInfo.vue

@@ -127,10 +127,10 @@ const topicName = ref([])
 const loading = ref(false)
 const topic = ref('')
 
-const handleDateChange = (val) => {
+const handleDateChange = async (val) => {
   if (val && val.length === 2) {
-
-    renderChart(getChart(val))
+    await getChart(val)
+    await renderChart()
 
   }
 }
@@ -140,10 +140,11 @@ const dateRange = ref([
   defaultStart.format('YYYY-MM-DD HH:mm:ss'),
   defaultEnd.format('YYYY-MM-DD HH:mm:ss')
 ])
-const labelSelect = (row) =>{
+const labelSelect =async (row) =>{
   topic.value = row.identifier
   topicName.value = row.modelName
-  renderChart(getChart(dateRange.value))
+  await getChart(dateRange.value)
+  await renderChart()
 }
 
 const chartContainer = ref(null)
@@ -155,13 +156,13 @@ const formatTime = timestamp => {
     .toLocaleTimeString('zh-CN', { hour: '2-digit', minute: '2-digit',second:'2-digit' })
     .slice(0, 5)
 }
+const result = ref([])
 const getChart = async (range) =>{
 
-  const result = await IotStatApi.getDeviceInfoChart(params.code, topic.value, range[0], range[1])
-  return result
+  result.value = await IotStatApi.getDeviceInfoChart(params.code, topic.value, range[0], range[1])
 }
 // 初始化图表
-const renderChart = async (result) => {
+const renderChart = async () => {
   if (!chartContainer.value) return
 
   // 销毁旧实例
@@ -177,8 +178,9 @@ const renderChart = async (result) => {
     xAxis: {
       type: 'category',
       // data: result.map(d => formatTime(d.timestamp)),
-      data: result.map(item => Object.keys(item)[0]),
-      axisLabel: { rotate: 45 } // X轴标签旋转防止重叠
+      data: result.value.map(item => Object.keys(item)[0]),
+      axisLabel: { rotate: 45 }, // X轴标签旋转防止重叠
+      inverse: true,
     },
     yAxis: { type: 'value' },
     dataZoom: [{
@@ -189,7 +191,7 @@ const renderChart = async (result) => {
     }],
     series: [{
       // data: result.map(d => d.value),
-      data: result.map(item => {
+      data: result.value.map(item => {
         const key = Object.keys(item)[0]; // 获取当前元素的key
         return item[key][0][topic.value]; // 提取value数组中第一个对象的属性
       }),
@@ -220,8 +222,8 @@ onMounted(async () => {
     topic.value = specs.value[0].identifier
     topicName.value = specs.value[0].modelName
   })
-  debugger
-  await renderChart(getChart(dateRange.value))
+  await getChart(dateRange.value)
+  await renderChart()
 
 
 })

+ 0 - 1
src/views/pms/failure/index.vue

@@ -356,7 +356,6 @@ const submitProcess = async (row: IotFailureReportVO) => {
     // 提交审核的二次确认
     await message.confirm(`您确定提交审核吗?`)
     // 提交审核
-    debugger
     loading.value = true
     await IotFailureReportApi.submitForApproval(row).then((res) => {
       loading.value = false

+ 0 - 1
src/views/pms/information/IotInformationDbForm.vue

@@ -118,7 +118,6 @@ const submitForm = async () => {
   formLoading.value = true
   try {
     const data = formData.value as unknown as IotInformationDbVO
-    debugger
     if (formType.value === 'create') {
       await IotInformationDbApi.createIotInformationDb(data)
       message.success(t('common.createSuccess'))

+ 0 - 1
src/views/pms/inspect/item/IotInspectItemForm.vue

@@ -152,7 +152,6 @@ const submitForm = async () => {
   // 提交请求
   formLoading.value = true
   try {
-    debugger
     const data = formData.value as unknown as IotInspectItemVO
     if (formType.value === 'create') {
       await IotInspectItemApi.createIotInspectItem(data)

+ 0 - 1
src/views/pms/inspect/order/InspectOrderDetail.vue

@@ -134,7 +134,6 @@ const deviceChoose = (rows) => {
 }
 
 const viewRoute = (itemJson) => {
-  debugger
   drawerVisible.value = true
   showDrawer.value.openDrawer(itemJson)
 }

+ 0 - 1
src/views/pms/inspect/order/OrderComponent.vue

@@ -125,7 +125,6 @@ const isLastStep = computed(() => currentStep.value === totalSteps - 1)
 onMounted(() => {
   // 初始化时滚动到第一个步骤
   scrollToCurrentStep()
-  debugger
 })
 </script>
 

+ 0 - 4
src/views/pms/inspect/order/WriteOrder.vue

@@ -199,7 +199,6 @@ const completedSteps = (tabIndex) => {
 // 步骤验证
 const isStepValid = (tabIndex) => {
   const current = currentStep.value[tabIndex]
-  debugger
   if (
     formData[tabIndex][current].ifNormal === null ||
     formData[tabIndex][current].ifNormal === undefined
@@ -230,7 +229,6 @@ const handleNext = (tabIndex, deviceId) => {
   }
   const current = currentStep.value[tabIndex]
   const totalSteps = tabs.value[tabIndex].orderDetails.length
-  debugger
   if (currentStep.value[tabIndex] < totalSteps - 1) {
     formData[tabIndex][current].indexId = current + 1
     formData[tabIndex][current].deviceId = deviceId
@@ -244,7 +242,6 @@ const handleNext = (tabIndex, deviceId) => {
 }
 
 const isLastStep = (tabIndex) => {
-  debugger
   return currentStep.value[tabIndex] === tabs.value[tabIndex].orderDetails.length - 1
 }
 
@@ -258,7 +255,6 @@ const submitForm = (tabIndex, current, type) => {
       push({ name: 'IotInspectOrder', params: {} })
     }
   } catch (error) {
-    debugger
     ElMessage.error('提交失败,请检查数据')
   }
 }

+ 0 - 1
src/views/pms/inspect/order/WriteOrdertest.vue

@@ -124,7 +124,6 @@ onMounted(async () => {
   if (id) {
     const iotInspectOrder = await IotInspectOrderApi.getIotInspectOrder(id)
     tabs.value = JSON.parse(iotInspectOrder.deviceIds)
-    debugger
     initFormData(JSON.parse(iotInspectOrder.deviceIds))
     loading.value = false
   }

+ 0 - 1
src/views/pms/inspect/order/index.vue

@@ -224,7 +224,6 @@ const openForm = (id?: number) => {
 }
 const openWrite = (id?: number) => {
   IotInspectOrderApi.getIotInspectOrder(id).then((res) => {
-    debugger
     if (res.status === 'finished') {
       message.warning('该工单已执行')
       return

+ 0 - 1
src/views/pms/inspect/plan/InspectRouteList.vue

@@ -186,7 +186,6 @@ const handleRowClick = (row) => {
 const open = async (classify) => {
   dialogVisible.value = true
   queryParams.assetClass = classify
-  debugger
   queryParams.deviceName = undefined
   queryParams.createTime = undefined
   await getList()

+ 0 - 2
src/views/pms/inspect/plan/IotInspectPlan.vue

@@ -242,7 +242,6 @@ const submitForm = async () => {
   try {
     const user = wsCache.get(CACHE_KEY.USER)
     formData.value.deviceIds = JSON.stringify(list.value)
-    debugger
     const data = formData.value as unknown as IotInspectPlanVO
     if (formType.value === 'create') {
       formData.value.deptId = user.user.deptId
@@ -251,7 +250,6 @@ const submitForm = async () => {
       message.success(t('common.createSuccess'))
       close()
     } else {
-      debugger
       await IotInspectPlanApi.updateIotInspectPlan(data)
       message.success(t('common.updateSuccess'))
       close()

+ 0 - 1
src/views/pms/inspect/plan/RouteInspectItemDrawer.vue

@@ -75,7 +75,6 @@ const openWeb = (url) => {
 // 打开抽屉
 const openDrawer = (itemJson) => {
   drawerVisible.value = true
-  debugger
   items.value = itemJson
 }
 

+ 0 - 1
src/views/pms/inspect/route/InspectItemList.vue

@@ -152,7 +152,6 @@ const open = async (classify, id) => {
   queryParams.item = undefined
   queryParams.pageNo = 1
   queryParams.deviceId = undefined
-  debugger
   if (id) {
     queryParams.deviceId = id
     await getList()

+ 0 - 4
src/views/pms/inspect/route/IotInspectRoute.vue

@@ -208,7 +208,6 @@ const openForm = () => {
     message.error('请选择设备类别')
     return
   }
-  debugger
   inspectItemFormRef.value.open(formData.value.deviceClassify, formData.value.deviceId)
 }
 const deviceFormRef = ref()
@@ -246,7 +245,6 @@ const { wsCache } = useCache()
 const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
 const submitForm = async () => {
   // 校验表单
-  debugger
   await formRef.value.validate()
   // 提交请求
   formLoading.value = true
@@ -278,7 +276,6 @@ const submitForm = async () => {
 onMounted(async () => {
   const deptId = useUserStore().getUser.deptId
   deptUsers.value = await UserApi.getDeptUsersByDeptId(deptId)
-  debugger
   if (id) {
     formType.value = 'update'
     const iotInspectRoute = await IotInspectRouteApi.getIotInspectRoute(id)
@@ -299,7 +296,6 @@ onMounted(async () => {
 const handleDelete = async (id: number) => {
   try {
     const index = list.value.findIndex((item) => item.code === id)
-    debugger
     if (index !== -1) {
       // 通过 splice 删除元素
       list.value.splice(index, 1)

+ 0 - 2
src/views/pms/iotinfo/IotInfoForm.vue

@@ -101,7 +101,6 @@ const open = async (type: string, id?: number) => {
   formType.value = type
   resetForm()
   // 修改时,设置数据
-  debugger
   if (id) {
     formLoading.value = true
     try {
@@ -139,7 +138,6 @@ const submitForm = async () => {
     formData.value.fileList = formData.value.filePath
     formData.value.filePath = ''
     const data = formData.value as unknown as IotInfoVO
-    debugger
     if (formType.value === 'create') {
       data.deviceId = props.deviceId
       // data.filePath = data.filePath.join(',')

+ 0 - 2
src/views/pms/iotinfo/IotInfoFormTree.vue

@@ -102,7 +102,6 @@ const open = async (type: string, id?: number) => {
   formType.value = type
   resetForm()
   // 修改时,设置数据
-  debugger
   if (id) {
     formLoading.value = true
     try {
@@ -142,7 +141,6 @@ const submitForm = async () => {
     formData.value.fileList = formData.value.filePath
     formData.value.filePath = ''
     const data = formData.value as unknown as IotInfoVO
-    debugger
     if (formType.value === 'create') {
       data.deviceId = props.deviceId
       // data.filePath = data.filePath.join(',')

+ 0 - 1
src/views/pms/iotmainworkorder/IotMainWorkOrderDetail.vue

@@ -726,7 +726,6 @@ const submitForm = async () => {
       mainWorkOrderBom: list.value,
       mainWorkOrderMaterials: materialList.value
     }
-    debugger
     await IotMainWorkOrderApi.fillWorkOrder(data)
     message.success(t('common.createSuccess'))
     close()

+ 0 - 1
src/views/pms/iotmainworkorder/WorkOrderMaterial.vue

@@ -245,7 +245,6 @@ const handleConfirm = () => {
     message.error('消耗数量必填')
     return
   }
-  debugger
   emit(
     'choose',
     selectedRows.value.map((row) => ({

+ 0 - 1
src/views/pms/iotopeationfill/index.vue

@@ -204,7 +204,6 @@ const openForm = (id?: number) => {
   push({ name: 'InspectOrderDetail', params:{id} })
 }
 const openWrite = (id?: string) => {
-  debugger
   push({ name: 'FillOrderInfo',params:{id}})
 }
 /** 删除按钮操作 */

+ 0 - 1
src/views/pms/iotopeationfill/index1.vue

@@ -194,7 +194,6 @@ const getAttrList = async () => {
   try {
     totalRunTime1 = 0;
     queryParams.createTime = formatTimestamp(JSON.parse(deptId.split(",")[2].substring(0,10)));
-    debugger
     const data = await IotOpeationFillApi.getAttrs(queryParams)
     attrList.value = data;
     attrList.value.forEach(function (item,index){

+ 0 - 1
src/views/pms/maintain/IotMaintain.vue

@@ -593,7 +593,6 @@ onMounted(async () => {
   if (id) {
     formType.value = 'update'
     const iotMaintain = await IotMaintainApi.getIotMaintain(id)
-    debugger
     deviceLabel.value = iotMaintain.deviceName
     formData.value = iotMaintain
     formData.value.status = undefined

+ 0 - 2
src/views/pms/maintain/IotMaintainDetail.vue

@@ -326,7 +326,6 @@ const handleViewNew = (nodeId, bomId) => {
     bomId: nodeId
   }
   IotMaintainMaterialsApi.getIotMaintainMaterialsPage(queryParams).then((res) => {
-    debugger
     currentBomNodeId.value = bomId
     materialList.value = res.list
   })
@@ -334,7 +333,6 @@ const handleViewNew = (nodeId, bomId) => {
 
 /** 提交表单 */
 onMounted(async () => {
-  debugger
   await IotMaintainApi.getIotMaintain(id).then((res) => {
     formData.value = res
     if (res.outFile) {

+ 0 - 1
src/views/pms/maintain/material/MaintainMaterialDrawer.vue

@@ -81,7 +81,6 @@ defineOptions({
 const materialChoose = (row) => {
   drawerFormData.value.code1 = row.code
   drawerFormData.value.name1 = row.name
-  debugger
   drawerFormData.value.unit1 = row.unit
   materialLabel.value = row.name
 }

+ 0 - 1
src/views/pms/maintain/material/index.vue

@@ -189,7 +189,6 @@ const handleDelete = async (id: number) => {
     // // 刷新列表
     // await getList()
     const index = list.value.findIndex((item) => item.code === id)
-    debugger
     if (index !== -1) {
       // 通过 splice 删除元素
       list.value.splice(index, 1)

+ 0 - 2
src/views/pms/productclassify/ProductClassifyForm.vue

@@ -89,7 +89,6 @@ const open = async (type: string, id?: number, parentId: number) => {
   resetForm()
   formData.value.sort = 0;
   formData.value.parentId = parentId
-  debugger
   // 修改时,设置数据
   if (id) {
     formLoading.value = true
@@ -155,6 +154,5 @@ const getTree = async () => {
   dept.children = handleTree(data)
   deptTree.value.push(dept)
   firstLevelKeys.value = deptTree.value.map(node => node.id);
-  debugger
 }
 </script>

+ 0 - 1
src/views/pms/stat/inspect.vue

@@ -373,7 +373,6 @@ const getStats = async () => {
   })
   IotStatApi.getInspectTodayStatus().then((res) => {
     todayStatus.value = res
-    debugger
     initCharts()
   })
   // statsData.value = await ProductCategoryApi.getIotStatisticsSummary()

+ 0 - 1
src/views/pms/stat/maintain.vue

@@ -405,7 +405,6 @@ const getStats = async () => {
     total.value = res
   })
   IotStatApi.getMainStatus().then((res) => {
-    debugger
     status.value = res
     console.log(JSON.stringify(status.value))
     initCharts()

+ 0 - 2
src/views/pms/stat/maintenance.vue

@@ -369,13 +369,11 @@ const getStats = async () => {
     total.value = res
   })
   IotStatApi.getMaintenanceStatus().then((res) => {
-    debugger
     status.value = res
     initCharts()
   })
   IotStatApi.getMaintenanceTodayStatus().then((res) => {
     todayStatus.value = res
-    debugger
     initCharts()
   })
   IotStatApi.getMaintenanceType().then((res) => {

+ 0 - 1
src/views/system/tree/index.vue

@@ -259,7 +259,6 @@ const deviceId = ref('')
 const clickNodeId = ref('')
 const nodeId = ref('')
 const handleFileNodeClick = async (row) => {
-  debugger
   queryParams.classId = row.id
   if (row.type==='device') {
     const queryParam = {