Przeglądaj źródła

运行记录统计优化

yuanchao 1 miesiąc temu
rodzic
commit
6a70819249

+ 2 - 2
src/router/modules/remaining.ts

@@ -186,7 +186,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
         }
       },
       {
-        path: 'template/detail/:deptId/:orderStatus',
+        path: 'template/detail/:deptId/:orderStatus/:createTime*',
         component: () => import('@/views/pms/iotopeationfill/index.vue'),
         name: 'FillOrderInfo1',
         meta: {
@@ -198,7 +198,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
         }
       },
       {
-        path: 'template/detail/:deptId/:isFill',
+        path: 'template/detail/:deptId/:isFill/:createTime*',
         component: () => import('@/views/pms/iotopeationfill/StatisticsForm.vue' +
         ''),
         name: 'FillOrderInfo2',

+ 5 - 1
src/views/pms/iotopeationfill/StatisticsForm.vue

@@ -18,7 +18,7 @@
           <el-form-item label="查询条件" prop="orderName">
             <el-input
               v-model="queryParams.orderName"
-              placeholder="请输入设备负责人"
+              placeholder="请输入查询条件"
               clearable
               @keyup.enter="handleQuery"
               class="!w-240px"
@@ -115,6 +115,7 @@ const total = ref(0) // 列表的总页数
 const { params, name } = useRoute() // 查询参数
 const deptId = params.deptId;
 const isFill = params.isFill;
+const createTime = params.createTime;
 const dialogVisible = ref(false) // 弹窗的是否展示
 const dialogTitle = ref('') // 弹窗的标题
 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
@@ -232,6 +233,9 @@ onMounted(async () => {
       queryParams.isFill = isFill;
     }
   }
+  if(createTime){
+    queryParams.createTime = createTime;
+  }
   getList()
   deptList.value = handleTree(await DeptApi.getSimpleDeptList());
 })

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

@@ -170,6 +170,7 @@ const { push } = useRouter()
 const { params, name } = useRoute() // 查询参数
 const deptId= params.deptId;
 const orderStatus = params.orderStatus;
+const createTime = params.createTime;
 /** 巡检工单 列表 */
 defineOptions({ name: 'IotOpeationFill' })
 
@@ -288,6 +289,9 @@ onMounted(() => {
   if(orderStatus != null && orderStatus != 3){
     queryParams.orderStatus = orderStatus;
   }
+  if(createTime){
+    queryParams.createTime = createTime;
+  }
   getList()
 })
 </script>

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

@@ -21,6 +21,11 @@
           <el-form label-width="120px">
             <div style="margin-left: 24px">
               <el-form class="demo-form-inline" :inline="true">
+                <el-form-item :label="t('common.createTime')" class="custom-label1">
+                  <span style="text-decoration: underline;">
+                    {{createTime}}
+                  </span>
+                </el-form-item>
                 <el-form-item :label="t('operationFillForm.team')" class="custom-label1">
                   <span style="text-decoration: underline;">
                     {{item.orgName}}
@@ -116,6 +121,7 @@ const total = ref(0) // 列表的总页数
 const arry1 =ref([]);
 let totalRunTime1: string = '123'
 let fillStatus = params.id.split(",")[4];
+let createTime = formatTimestamp(JSON.parse(deptId.split(",")[2].substring(0,10)));
 let showStatus = true;
 const queryParams = reactive({
   pageNo: 1,

+ 11 - 11
src/views/pms/iotopeationfill/statistics.vue

@@ -67,25 +67,25 @@
           </div>
         </template>
         <el-row class="h-[220px]">
-          <el-col :span="6" class="flex flex-col items-center" @click="openFill(queryParams.deptId,3)">
+          <el-col :span="6" class="flex flex-col items-center" @click="openFill(queryParams.deptId,3,queryParams.createTime)">
             <div ref="reportingChartRef" class="h-[160px] w-full"></div>
             <div class="text-center mt-2"  >
               <span class="text-sm text-gray-600">总数</span>
             </div>
           </el-col>
-          <el-col :span="6" class="flex flex-col items-center" @click="openFill(queryParams.deptId,1)">
+          <el-col :span="6" class="flex flex-col items-center" @click="openFill(queryParams.deptId,1,queryParams.createTime)">
             <div ref="dealFinishedChartRef" class="h-[160px] w-full"></div>
             <div class="text-center mt-2">
               <span class="text-sm text-gray-600">已填写</span>
             </div>
           </el-col>
-          <el-col :span="6" class="flex flex-col items-center" @click="openFill(queryParams.deptId,0)">
+          <el-col :span="6" class="flex flex-col items-center" @click="openFill(queryParams.deptId,0,queryParams.createTime)">
             <div ref="transOrderChartRef" class="h-[160px] w-full"></div>
             <div class="text-center mt-2">
               <span class="text-sm text-gray-600">未填写</span>
             </div>
           </el-col>
-          <el-col :span="6" class="flex flex-col items-center" @click="openFill(queryParams.deptId,2)">
+          <el-col :span="6" class="flex flex-col items-center" @click="openFill(queryParams.deptId,2,queryParams.createTime)">
             <div ref="writeChartRef" class="h-[160px] w-full"></div>
             <div class="text-center mt-2">
               <span class="text-sm text-gray-600">填写中</span>
@@ -102,19 +102,19 @@
           </div>
         </template>
         <el-row class="h-[220px]">
-          <el-col :span="6" class="flex flex-col items-center" @click="openForm(queryParams.deptId,2)">
+          <el-col :span="6" class="flex flex-col items-center" @click="openForm(queryParams.deptId,2,queryParams.createTime)">
             <div ref="reportingChartRef1" class="h-[160px] w-full"></div>
             <div class="text-center mt-2"  >
               <span class="text-sm text-gray-600">总数</span>
             </div>
           </el-col>
-          <el-col :span="6" class="flex flex-col items-center" @click="openForm(queryParams.deptId,1)">
+          <el-col :span="6" class="flex flex-col items-center" @click="openForm(queryParams.deptId,1,queryParams.createTime)">
             <div ref="dealFinishedChartRef1" class="h-[160px] w-full"></div>
             <div class="text-center mt-2">
               <span class="text-sm text-gray-600">已填写</span>
             </div>
           </el-col>
-          <el-col :span="6" class="flex flex-col items-center" @click="openForm(queryParams.deptId,0)">
+          <el-col :span="6" class="flex flex-col items-center" @click="openForm(queryParams.deptId,0,queryParams.createTime)">
             <div ref="transOrderChartRef1" class="h-[160px] w-full"></div>
             <div class="text-center mt-2">
               <span class="text-sm text-gray-600">待填写</span>
@@ -220,15 +220,15 @@ const handleQuery = () => {
 }
 
 const formRef = ref()
-const openForm = (deptId?:string,isFill?:string) => {
+const openForm = (deptId?:string,isFill?:string,createTime?:[]) => {
   /*const type = '填写设备明细';
   const id = queryParams.deptId
   formRef.value.open(type,id)*/
 
-  push({ name: 'FillOrderInfo2',params:{deptId,isFill}})
+  push({ name: 'FillOrderInfo2',params:{deptId,isFill,createTime}})
 }
-const openFill = (deptId?:string,orderStatus?:string) => {
-  push({ name: 'FillOrderInfo1',params:{deptId,orderStatus}})
+const openFill = (deptId?:string,orderStatus?:string,createTime?:[]) => {
+  push({ name: 'FillOrderInfo1',params:{deptId,orderStatus,createTime}})
 }