Просмотр исходного кода

feat: 保养工单列表展示填报人

- 在保养工单列表新增填报人列
- 补充保养工单接口类型中的 applicant 字段
Zimo 1 день назад
Родитель
Сommit
4ef71956e7
2 измененных файлов с 24 добавлено и 44 удалено
  1. 1 0
      src/api/pms/iotmainworkorder/index.ts
  2. 23 44
      src/views/pms/iotmainworkorder/index.vue

+ 1 - 0
src/api/pms/iotmainworkorder/index.ts

@@ -24,6 +24,7 @@ export interface IotMainWorkOrderVO {
   status: number // 状态 0启用  1停用
   status: number // 状态 0启用  1停用
   processInstanceId: string // 流程实例id
   processInstanceId: string // 流程实例id
   auditStatus: number // 审批状态 未提交、审批中、审批通过、审批不通过、已取消
   auditStatus: number // 审批状态 未提交、审批中、审批通过、审批不通过、已取消
+  applicant: string // 申请人id
 }
 }
 
 
 // 保养工单 API
 // 保养工单 API

+ 23 - 44
src/views/pms/iotmainworkorder/index.vue

@@ -273,8 +273,7 @@ onMounted(() => {
 
 
 <template>
 <template>
   <div
   <div
-    class="main-work-order-page grid grid-cols-[auto_1fr] grid-rows-[auto_1fr] gap-4 h-[calc(100vh-20px-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))]"
-  >
+    class="main-work-order-page grid grid-cols-[auto_1fr] grid-rows-[auto_1fr] gap-4 h-[calc(100vh-20px-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))]">
     <DeptTreeSelect
     <DeptTreeSelect
       :top-id="rootDeptId"
       :top-id="rootDeptId"
       :deptId="deptId"
       :deptId="deptId"
@@ -283,16 +282,14 @@ onMounted(() => {
       :show-title="false"
       :show-title="false"
       request-api="getSimpleDeptList"
       request-api="getSimpleDeptList"
       class="main-work-order-tree row-span-2"
       class="main-work-order-tree row-span-2"
-      @node-click="handleDeptNodeClick"
-    />
+      @node-click="handleDeptNodeClick" />
 
 
     <el-form
     <el-form
       ref="queryFormRef"
       ref="queryFormRef"
       :model="queryParams"
       :model="queryParams"
       size="default"
       size="default"
       label-width="68px"
       label-width="68px"
-      class="main-work-order-query bg-white dark:bg-[#1d1e1f] rounded-lg shadow px-6 py-3 min-w-0"
-    >
+      class="main-work-order-query bg-white dark:bg-[#1d1e1f] rounded-lg shadow px-6 py-3 min-w-0">
       <div class="query-row">
       <div class="query-row">
         <el-form-item :label="t('bomList.name')" prop="name">
         <el-form-item :label="t('bomList.name')" prop="name">
           <el-input
           <el-input
@@ -300,22 +297,19 @@ onMounted(() => {
             :placeholder="t('bomList.nHolder')"
             :placeholder="t('bomList.nHolder')"
             clearable
             clearable
             class="query-control"
             class="query-control"
-            @keyup.enter="handleQuery"
-          />
+            @keyup.enter="handleQuery" />
         </el-form-item>
         </el-form-item>
         <el-form-item :label="t('bomList.status')" prop="result">
         <el-form-item :label="t('bomList.status')" prop="result">
           <el-select
           <el-select
             v-model="queryParams.result"
             v-model="queryParams.result"
             :placeholder="t('bomList.status')"
             :placeholder="t('bomList.status')"
             clearable
             clearable
-            class="query-control query-control--small"
-          >
+            class="query-control query-control--small">
             <el-option
             <el-option
               v-for="dict in resultOptions"
               v-for="dict in resultOptions"
               :key="dict.value"
               :key="dict.value"
               :label="dict.label"
               :label="dict.label"
-              :value="dict.value"
-            />
+              :value="dict.value" />
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
         <el-form-item :label="t('common.createTime')" prop="createTime" label-width="100px">
         <el-form-item :label="t('common.createTime')" prop="createTime" label-width="100px">
@@ -326,8 +320,7 @@ onMounted(() => {
             :start-placeholder="t('operationFill.start')"
             :start-placeholder="t('operationFill.start')"
             :end-placeholder="t('operationFill.end')"
             :end-placeholder="t('operationFill.end')"
             :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
             :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
-            class="query-control query-control--date"
-          />
+            class="query-control query-control--date" />
         </el-form-item>
         </el-form-item>
       </div>
       </div>
 
 
@@ -342,8 +335,7 @@ onMounted(() => {
           type="primary"
           type="primary"
           plain
           plain
           @click="openForm('create')"
           @click="openForm('create')"
-          v-hasPermi="['pms:iot-main-work-order:create']"
-        >
+          v-hasPermi="['pms:iot-main-work-order:create']">
           <Icon icon="ep:plus" class="mr-5px" />{{ t('operationFill.add') }}
           <Icon icon="ep:plus" class="mr-5px" />{{ t('operationFill.add') }}
         </el-button>
         </el-button>
         <el-button
         <el-button
@@ -351,8 +343,7 @@ onMounted(() => {
           plain
           plain
           :loading="exportLoading"
           :loading="exportLoading"
           @click="handleExport"
           @click="handleExport"
-          v-hasPermi="['pms:iot-main-work-order:export']"
-        >
+          v-hasPermi="['pms:iot-main-work-order:export']">
           <Icon icon="ep:download" class="mr-5px" />导出
           <Icon icon="ep:download" class="mr-5px" />导出
         </el-button>
         </el-button>
       </el-form-item>
       </el-form-item>
@@ -368,15 +359,13 @@ onMounted(() => {
               :width="width"
               :width="width"
               :height="height"
               :height="height"
               :max-height="height"
               :max-height="height"
-              show-border
-            >
+              show-border>
               <ZmTableColumn
               <ZmTableColumn
                 type="index"
                 type="index"
                 :label="t('iotDevice.serial')"
                 :label="t('iotDevice.serial')"
                 :width="70"
                 :width="70"
                 fixed="left"
                 fixed="left"
-                hide-in-column-settings
-              />
+                hide-in-column-settings />
               <ZmTableColumn prop="name" :label="t('bomList.name')" fixed="left" min-width="300" />
               <ZmTableColumn prop="name" :label="t('bomList.name')" fixed="left" min-width="300" />
               <ZmTableColumn prop="deptName" :label="t('iotDevice.dept')" min-width="150" />
               <ZmTableColumn prop="deptName" :label="t('iotDevice.dept')" min-width="150" />
               <ZmTableColumn prop="result" :label="t('bomList.status')" width="120">
               <ZmTableColumn prop="result" :label="t('bomList.status')" width="120">
@@ -399,19 +388,18 @@ onMounted(() => {
               <ZmTableColumn
               <ZmTableColumn
                 prop="responsiblePersonName"
                 prop="responsiblePersonName"
                 :label="t('iotMaintain.PersonInCharge')"
                 :label="t('iotMaintain.PersonInCharge')"
-                min-width="150"
-              />
+                min-width="150" />
               <ZmTableColumn
               <ZmTableColumn
                 prop="createTime"
                 prop="createTime"
                 :label="t('dict.createTime')"
                 :label="t('dict.createTime')"
                 :formatter="dateFormatter2"
                 :formatter="dateFormatter2"
-                width="180"
-              />
+                width="180" />
               <ZmTableColumn prop="updateTime" :label="t('dict.fillTime')" width="180">
               <ZmTableColumn prop="updateTime" :label="t('dict.fillTime')" width="180">
                 <template #default="{ row }">
                 <template #default="{ row }">
                   <span v-if="row.result == 2">{{ formatCellDate(row.updateTime) }}</span>
                   <span v-if="row.result == 2">{{ formatCellDate(row.updateTime) }}</span>
                 </template>
                 </template>
               </ZmTableColumn>
               </ZmTableColumn>
+              <ZmTableColumn prop="applicant" label="填报人" />
               <ZmTableColumn :label="t('iotMaintain.operation')" width="140" fixed="right" action>
               <ZmTableColumn :label="t('iotMaintain.operation')" width="140" fixed="right" action>
                 <template #default="{ row }">
                 <template #default="{ row }">
                   <el-button
                   <el-button
@@ -419,8 +407,7 @@ onMounted(() => {
                     link
                     link
                     :type="getDelayReasonButtonType(row.delayReason)"
                     :type="getDelayReasonButtonType(row.delayReason)"
                     @click="openDelayReasonDialog(row)"
                     @click="openDelayReasonDialog(row)"
-                    v-hasPermi="['pms:iot-main-work-order:update']"
-                  >
+                    v-hasPermi="['pms:iot-main-work-order:update']">
                     {{ t('mainPlan.delayed') || '延时' }}
                     {{ t('mainPlan.delayed') || '延时' }}
                   </el-button>
                   </el-button>
                   <el-button
                   <el-button
@@ -428,16 +415,14 @@ onMounted(() => {
                     link
                     link
                     type="primary"
                     type="primary"
                     @click="openForm('update', row.id)"
                     @click="openForm('update', row.id)"
-                    v-hasPermi="['pms:iot-main-work-order:update']"
-                  >
+                    v-hasPermi="['pms:iot-main-work-order:update']">
                     {{ t('operationFill.fill') }}
                     {{ t('operationFill.fill') }}
                   </el-button>
                   </el-button>
                   <el-button
                   <el-button
                     link
                     link
                     type="primary"
                     type="primary"
                     @click="detail(row.id)"
                     @click="detail(row.id)"
-                    v-hasPermi="['pms:iot-main-work-order:query']"
-                  >
+                    v-hasPermi="['pms:iot-main-work-order:query']">
                     {{ t('operationFill.view') }}
                     {{ t('operationFill.view') }}
                   </el-button>
                   </el-button>
                   <el-button
                   <el-button
@@ -445,8 +430,7 @@ onMounted(() => {
                     link
                     link
                     type="danger"
                     type="danger"
                     @click="handleBack(row.id)"
                     @click="handleBack(row.id)"
-                    v-hasPermi="['pms:iot-main-work-order:back']"
-                  >
+                    v-hasPermi="['pms:iot-main-work-order:back']">
                     {{ t('workOrderMaterial.back') }}
                     {{ t('workOrderMaterial.back') }}
                   </el-button>
                   </el-button>
                   <el-button
                   <el-button
@@ -459,8 +443,7 @@ onMounted(() => {
                     type="warning"
                     type="warning"
                     class="warning-btn"
                     class="warning-btn"
                     @click="openModifyForm('modify', row.id)"
                     @click="openModifyForm('modify', row.id)"
-                    v-hasPermi="['pms:iot-main-work-order:update']"
-                  >
+                    v-hasPermi="['pms:iot-main-work-order:update']">
                     {{ t('modelTemplate.update') }}
                     {{ t('modelTemplate.update') }}
                   </el-button>
                   </el-button>
                 </template>
                 </template>
@@ -481,8 +464,7 @@ onMounted(() => {
           :total="total"
           :total="total"
           layout="total, sizes, prev, pager, next, jumper"
           layout="total, sizes, prev, pager, next, jumper"
           @size-change="handleSizeChange"
           @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-        />
+          @current-change="handleCurrentChange" />
       </div>
       </div>
     </div>
     </div>
   </div>
   </div>
@@ -491,14 +473,12 @@ onMounted(() => {
     v-model="delayReasonDialogVisible"
     v-model="delayReasonDialogVisible"
     :title="t('workOrderMaterial.delayReason') || '延时原因'"
     :title="t('workOrderMaterial.delayReason') || '延时原因'"
     width="500px"
     width="500px"
-    :close-on-click-modal="false"
-  >
+    :close-on-click-modal="false">
     <el-form
     <el-form
       ref="delayReasonFormRef"
       ref="delayReasonFormRef"
       :model="delayReasonForm"
       :model="delayReasonForm"
       :rules="delayReasonRules"
       :rules="delayReasonRules"
-      label-width="0px"
-    >
+      label-width="0px">
       <el-form-item label=" " prop="delayReason" class="required-item" label-width="16px">
       <el-form-item label=" " prop="delayReason" class="required-item" label-width="16px">
         <el-input
         <el-input
           v-model="delayReasonForm.delayReason"
           v-model="delayReasonForm.delayReason"
@@ -506,8 +486,7 @@ onMounted(() => {
           :rows="4"
           :rows="4"
           :placeholder="t('workOrderMaterial.inputDelayReason') || '请输入延时原因'"
           :placeholder="t('workOrderMaterial.inputDelayReason') || '请输入延时原因'"
           maxlength="500"
           maxlength="500"
-          show-word-limit
-        />
+          show-word-limit />
       </el-form-item>
       </el-form-item>
     </el-form>
     </el-form>
     <template #footer>
     <template #footer>