浏览代码

feat(check): 新增年度保养计划表功能并优化批量新增表单

- 新增 AnnualPlanModal 组件实现年度设备维护保养计划表查询和导出功能
- 在检查作业页面添加年度计划表按钮入口
- 重构批量新增表单,增加标准类型选择和执行班组配置选项
- 优化检查项目选择逻辑,支持按标准类型过滤保养项
- 调整表单字段验证规则,确保必填项完整性
- 移除报修申请单列表中不必要的操作列和筛选条件
- 简化报修申请单查询界面布局,合并搜索关键词输入框
- 更新 API 接口实现年度计划表数据查询和 Excel 导出功能
dazhaxie 3 天之前
父节点
当前提交
816e2936f8

+ 33 - 0
src/api/check/checkjob.js

@@ -287,4 +287,37 @@ export function importCheckJobForUpdate(parameter) {
     },
     data: parameter
   })
+}
+
+/**
+ * 年度保养计划表查询
+ * parameter: { searchYear, type }
+ * @param parameter
+ * @returns {*}
+ */
+export function getCheckJobAnnualPlan(parameter) {
+  return axios({
+    url: '/check/jobs/annual-plan?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 年度保养计划表导出 Excel
+ * parameter: { searchYear, type }
+ * @param parameter
+ * @returns {*}
+ */
+export function exportCheckJobAnnualPlan(parameter) {
+  return axios({
+    url: '/check/jobs/annual-plan/export?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    responseType: 'blob'
+  })
 }

+ 9 - 1
src/views/check/checkjob/CheckJob.vue

@@ -98,6 +98,7 @@
         <a-button style="margin-left: 8px" type="success" @click="handleSeven">本周</a-button>
         <a-button style="margin-left: 8px" type="success" @click="handleMonth">本月</a-button>
         <a-button style="margin-left: 8px" type="success" @click="handleTuiCalendar">日历图</a-button>
+        <a-button style="margin-left: 8px" type="primary" icon="profile" @click="handleAnnualPlan">年度计划表</a-button>
         <a-button style="margin-left: 8px" type="primary" @click="handleExecuteBatch"
           :disabled="selectedRowKeys.length == 0">
           <a-icon style="margin-left: 8px" type="plus" />
@@ -181,6 +182,7 @@
     <detail :check-type="checkType" ref="detailModal" @ok="handleOk" />
     <import-form-update ref="importModalUpdate" @ok="handleOk" />
     <finish-form ref="finishModal" @ok="handleOk" />
+    <annual-plan-modal ref="annualPlanModal" :check-type="checkType" />
   </a-card>
 </template>
 
@@ -204,6 +206,7 @@ import { fetchSbTypeTree } from '@/api/sb/type'
 import DictCache from '@/utils/dict'
 import ImportFormUpdate from './modules/ImportFormUpdate'
 import FinishForm from './modules/FinishForm'
+import AnnualPlanModal from './modules/AnnualPlanModal'
 import locale from 'ant-design-vue/es/date-picker/locale/zh_CN'
 export default {
   name: 'CheckJobList',
@@ -213,7 +216,8 @@ export default {
     BaseForm,
     ImportFormUpdate,
     Detail,
-    FinishForm
+    FinishForm,
+    AnnualPlanModal
   },
   props: {
     /**
@@ -700,6 +704,10 @@ export default {
       })
     },
 
+    handleAnnualPlan() {
+      this.$refs.annualPlanModal.base()
+    },
+
     handleTuiCalendar() {
       const that = this
       queryTuiCalendarIgnores({ type: 2 }).then((res) => {

+ 168 - 0
src/views/check/checkjob/modules/AnnualPlanModal.vue

@@ -0,0 +1,168 @@
+<template>
+  <a-modal
+    title="年度设备维护保养计划表"
+    :width="1200"
+    :visible="visible"
+    :dialogStyle="{ top: '40px' }"
+    @cancel="handleCancel"
+  >
+    <div class="annual-plan-toolbar">
+      <a-form layout="inline">
+        <a-form-item label="年份">
+          <a-select v-model="queryParam.searchYear" style="width: 120px" :allowClear="false">
+            <a-select-option v-for="year in yearOptions" :key="year" :value="year">{{ year }}</a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-form-item>
+          <a-button type="primary" icon="search" @click="loadData">查询</a-button>
+          <a-button style="margin-left: 8px" icon="download" :loading="exportLoading" @click="doExport">导出Excel</a-button>
+        </a-form-item>
+      </a-form>
+      <span class="annual-plan-tip">说明:√ 表示该设备当月做过保养(已完成);按天保养不计入。</span>
+    </div>
+
+    <a-table
+      size="small"
+      bordered
+      rowKey="rowKey"
+      :columns="columns"
+      :dataSource="dataSource"
+      :loading="loading"
+      :pagination="pagination"
+      :scroll="{ x: 1500 }"
+    >
+    </a-table>
+
+    <template slot="footer">
+      <a-button @click="handleCancel">关闭</a-button>
+    </template>
+  </a-modal>
+</template>
+
+<script>
+import { getCheckJobAnnualPlan, exportCheckJobAnnualPlan } from '@/api/check/checkjob'
+
+export default {
+  name: 'AnnualPlanModal',
+  props: {
+    // 检查类型:1-点检 2-巡检(保养),与列表页保持一致
+    checkType: {
+      type: Number,
+      default: null
+    }
+  },
+  data () {
+    const currentYear = new Date().getFullYear()
+    const yearOptions = []
+    for (let y = currentYear + 1; y >= currentYear - 5; y--) {
+      yearOptions.push(y)
+    }
+    const monthColumns = []
+    for (let m = 1; m <= 12; m++) {
+      monthColumns.push({
+        title: m + '月',
+        dataIndex: 'month' + m,
+        align: 'center',
+        width: 46,
+        customRender: (text) => (text === '√' ? text : '')
+      })
+    }
+    return {
+      visible: false,
+      loading: false,
+      exportLoading: false,
+      currentYear: currentYear,
+      yearOptions: yearOptions,
+      queryParam: {
+        searchYear: currentYear
+      },
+      dataSource: [],
+      pagination: {
+        pageSize: 20,
+        showSizeChanger: true,
+        pageSizeOptions: ['20', '50', '100'],
+        total: 0
+      },
+      columns: [
+        {
+          title: '设备类别',
+          dataIndex: 'category',
+          width: 130,
+          customRender: (text) => text || '-'
+        },
+        {
+          title: '设备',
+          dataIndex: 'sbName',
+          width: 160,
+          customRender: (text) => text || '-'
+        },
+        {
+          title: '保养负责人',
+          dataIndex: 'owner',
+          width: 110,
+          customRender: (text) => text || '-'
+        },
+        {
+          title: '维保设备数量',
+          dataIndex: 'sbNum',
+          width: 100,
+          align: 'center'
+        }
+      ].concat(monthColumns)
+    }
+  },
+  methods: {
+    base () {
+      this.visible = true
+      this.queryParam.searchYear = this.currentYear
+      this.loadData()
+    },
+    buildParams () {
+      const params = {
+        searchYear: this.queryParam.searchYear
+      }
+      if (this.checkType !== null && this.checkType !== undefined) {
+        params.type = this.checkType
+      }
+      return params
+    },
+    loadData () {
+      this.loading = true
+      getCheckJobAnnualPlan(this.buildParams())
+        .then((res) => {
+          const list = (res && res.data) || []
+          // 生成 rowKey,避免同名设备多负责人时 rowKey 重复
+          this.dataSource = list.map((item, index) => ({ ...item, rowKey: index }))
+          this.pagination.total = this.dataSource.length
+        })
+        .finally(() => {
+          this.loading = false
+        })
+    },
+    doExport () {
+      this.exportLoading = true
+      exportCheckJobAnnualPlan(this.buildParams())
+        .then((file) => {
+          this.BaseTool.UPLOAD.downLoadExportExcel(file)
+        })
+        .finally(() => {
+          this.exportLoading = false
+        })
+    },
+    handleCancel () {
+      this.visible = false
+      this.dataSource = []
+    }
+  }
+}
+</script>
+
+<style scoped>
+.annual-plan-toolbar {
+  margin-bottom: 12px;
+}
+.annual-plan-tip {
+  color: #888;
+  font-size: 12px;
+}
+</style>

+ 129 - 40
src/views/check/checkstandard/modules/BatchBaseForm.vue

@@ -17,6 +17,15 @@
             <a-button type="primary" style="width: 20%" @click="handleSbSelect">选择</a-button>
           </a-form-item>
         </row-item>
+        <row-item>
+          <a-form-item label="标准类型" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
+            <a-tree-select style="width: 100%" :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
+              :treeData="treeData" :treeNodeFilterProp="'title'" :showSearch="true"
+              v-decorator="['sbType', {rules: [{required: true, message: '请选择标准类型'}]}]"
+              placeholder="请选择" @change="handleSbTypeChange">
+            </a-tree-select>
+          </a-form-item>
+        </row-item>
       </row-list>
     </a-form>
     <div class="table-operator">
@@ -25,19 +34,27 @@
         添加
       </a-button>
     </div>
-    <a-table :data-source="data" :key="tableKey" :columns="columns" bordered ref="table" :scroll="{x: 1300 }">
+    <a-table :data-source="data" :key="tableKey" :columns="columns" bordered ref="table" :scroll="{x: 1600 }">
       <span slot="level" slot-scope="text, record">
-        <a-select style="width:100%" @change="(val)=>changeLevel(val,record)" v-model="record.level" placeholder="请选择">
+        <a-select style="width:100%" v-model="record.level" placeholder="请选择">
           <a-select-option v-for="(label,value) in levelMap" :key="value" :label="label" :value="parseInt(value)">{{ label }}
           </a-select-option>
         </a-select>
       </span>
       <span slot="checkUserType" slot-scope="text, record">
-        <a-select style="width:100%" disabled v-model="record.checkUserType" placeholder="请选择">
+        <a-select style="width:100%" v-model="record.checkUserType" placeholder="请选择"
+          @change="(val)=>handleCheckUserTypeChange(val, record)">
           <a-select-option v-for="(label,value) in checkUserTypeMap" :key="value" :label="label" :value="parseInt(value)">{{ label }}
           </a-select-option>
         </a-select>
       </span>
+      <span slot="checkDeptId" slot-scope="text, record">
+        <a-tree-select v-if="record.checkUserType === 4" style="width:100%"
+          :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }" :treeData="deptTree"
+          treeNodeFilterProp="title" :showSearch="true" v-model="record.checkDeptId" placeholder="请选择班组">
+        </a-tree-select>
+        <span v-else style="color:#bbb">-</span>
+      </span>
       <span slot="period" slot-scope="text, record">
         <a-input-group compact>
           <a-input-number style="width: 50%" :min="1" v-model="record.period" />
@@ -60,8 +77,9 @@
         <a-date-picker style="width: 100%" :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN" v-model="record.nextDate" />
       </span>
       <span slot="requirementList" slot-scope="text, record">
-        <a-select style="width: 100%" mode="multiple" v-model="record.requirementList" placeholder="请选择">
-          <a-select-option v-for="item in checkDetailList" :key="item.id" :label="item.stdName" :value="item.id">{{ item.stdName }}
+        <a-select style="width: 100%" mode="multiple" v-model="record.requirementList"
+          placeholder="请先选择标准类型" :filterOption="filterOption" :disabled="!sbType">
+          <a-select-option v-for="item in currentRequirementOptions" :key="item.id" :label="item.stdName" :value="item.id">{{ item.stdName }}
           </a-select-option>
         </a-select>
       </span>
@@ -82,10 +100,11 @@
 </template>
 
 <script>
-import pick from 'lodash.pick'
 import SbInfoSelectModal from '@/views/sb/info/modules/SbInfoSelectModal'
-import { batch, getBySbId } from '@/api/check/checkstandard'
+import { batch } from '@/api/check/checkstandard'
 import { queryCheckDetail } from '@/api/check/check-detail'
+import { fetchSbTypeTree } from '@/api/sb/type'
+import { getDeptTree } from '@/api/upms/dept'
 export default {
   components: {
     SbInfoSelectModal,
@@ -97,7 +116,14 @@ export default {
       modalTitle: '批量新增',
       form: this.$form.createForm(this),
       data: [{}],
-      checkDetailList: [],
+      // 保养项字典:Map<sbType(设备类型ID), List<CheckRequirementVO>>
+      checkDetailList: {},
+      // 标准类型树
+      treeData: [],
+      // 部门(班组)树
+      deptTree: [],
+      // 当前选中的标准类型(设备类型ID),作用于所有行
+      sbType: null,
       tableKey: 0,
       columns: [
         {
@@ -109,12 +135,6 @@ export default {
             return index + 1
           },
         },
-        /* {
-          title: '编码',
-          dataIndex: 'no',
-          width: '120px',
-          checked: true
-        }, */
         {
           title: () => {
             return <span style="color:red">维护等级</span>
@@ -125,13 +145,22 @@ export default {
           scopedSlots: { customRender: 'level' },
         },
         {
-          title: '执行人方式',
+          title: () => {
+            return <span style="color:red">执行人方式</span>
+          },
           dataIndex: 'checkUserType',
           checked: true,
-          width: '120px',
+          width: '130px',
           scopedSlots: { customRender: 'checkUserType' },
         },
         {
+          title: '执行班组',
+          dataIndex: 'checkDeptId',
+          checked: true,
+          width: '180px',
+          scopedSlots: { customRender: 'checkDeptId' },
+        },
+        {
           title: () => {
             return <span style="color:red">计划周期</span>
           },
@@ -171,7 +200,9 @@ export default {
           width: '150px',
         },
         {
-          title: '检查项目',
+          title: () => {
+            return <span style="color:red">检查项目</span>
+          },
           dataIndex: 'requirementList',
           checked: true,
           scopedSlots: { customRender: 'requirementList' },
@@ -199,6 +230,15 @@ export default {
       periodTypeMap: {},
     }
   },
+  computed: {
+    // 当前标准类型下可选的保养项列表
+    currentRequirementOptions() {
+      if (!this.sbType) {
+        return []
+      }
+      return this.checkDetailList[this.sbType] || []
+    },
+  },
   created() {
     this.paramTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_STANDARD_PARAM_TYPE)
     this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_STANDARD_TYPE)
@@ -207,12 +247,27 @@ export default {
     this.enableMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
     this.checkUserTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_USER_TYPE)
     this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_PLAN_LEVEL)
+    fetchSbTypeTree().then((res) => {
+      this.treeData = res.data
+    })
+    getDeptTree({}).then((res) => {
+      this.deptTree = res.data || []
+    })
   },
   methods: {
+    filterOption(input, option) {
+      const text = option.componentOptions.children[0].text || ''
+      return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
     base(record) {
       this.visible = true
+      this.sbType = null
+      this.data = [{}]
+      this.tableKey = new Date().getTime()
+      this.form.resetFields()
+      // 加载保养项字典(按设备类型分组)
       queryCheckDetail().then((res) => {
-        this.checkDetailList = res.data
+        this.checkDetailList = res.data || {}
       })
       if (this.BaseTool.Object.isBlank(record)) {
         return
@@ -228,14 +283,12 @@ export default {
           })
         )
       })
-      // getBySbId({ sbId: record.id }).then((res) => {
-      //   this.data = res.data.list
-      // })
     },
     handleCancel() {
-      this.data = []
+      this.data = [{}]
       this.visible = false
       this.confirmLoading = false
+      this.sbType = null
       this.$emit('ok')
       this.form.resetFields()
     },
@@ -250,8 +303,19 @@ export default {
     handleDelOne(record, i) {
       this.data.splice(i, 1)
     },
-    changeLevel(value, record) {
-      record.checkUserType = value
+    // 切换标准类型:检查项目数据源随之变化,清空各行已选检查项目
+    handleSbTypeChange(value) {
+      this.sbType = value
+      this.data.forEach((item) => {
+        this.$set(item, 'requirementList', [])
+      })
+      this.tableKey = new Date().getTime()
+    },
+    // 切换执行人方式:非班组时清空执行班组
+    handleCheckUserTypeChange(value, record) {
+      if (value !== 4) {
+        this.$set(record, 'checkDeptId', null)
+      }
       this.tableKey = new Date().getTime()
     },
     handleSbSelectd(keys, rows) {
@@ -261,7 +325,6 @@ export default {
         form: { setFieldsValue },
       } = this
       this.sbId = key
-      // 日期处理
       this.$nextTick(() => {
         setFieldsValue(
           Object.assign({
@@ -270,9 +333,10 @@ export default {
           })
         )
       })
-      getBySbId({ sbId: key }).then((res) => {
-        this.data = res.data.list
-      })
+      // 批量新增为纯新增语义:切换设备后重置为一条空行,
+      // 不加载设备已有标准,避免已有标准被当作新增行重复创建。
+      this.data = [{}]
+      this.tableKey = new Date().getTime()
     },
     handleSbSelect() {
       this.$refs.sbInfoSelectModal.base()
@@ -287,12 +351,30 @@ export default {
           this.confirmLoading = false
           return
         }
+        if (!this.sbType) {
+          this.$message.error('请选择标准类型')
+          this.confirmLoading = false
+          return
+        }
+        if (!this.data || this.data.length === 0) {
+          this.$message.error('请至少添加一条保养标准')
+          this.confirmLoading = false
+          return
+        }
         let isReturn = false
-        this.data = this.data.map((item, i) => {
+        this.data.forEach((item, i) => {
           if (!item.level) {
             this.$message.error(`第${i + 1}行维护等级不能为空!`)
             isReturn = true
           }
+          if (!item.checkUserType) {
+            this.$message.error(`第${i + 1}行执行人方式不能为空!`)
+            isReturn = true
+          }
+          if (item.checkUserType === 4 && !item.checkDeptId) {
+            this.$message.error(`第${i + 1}行执行人方式为班组时,必须选择执行班组!`)
+            isReturn = true
+          }
           if (!item.period) {
             this.$message.error(`第${i + 1}行计划周期不能为空!`)
             isReturn = true
@@ -309,25 +391,32 @@ export default {
             this.$message.error(`第${i + 1}行检查项目不能为空!`)
             isReturn = true
           }
-          item.nextDate = item.nextDate
-            ? this.BaseTool.Date.formatter(item.nextDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
-            : null
-          item.lastDate = item.lastDate
-            ? this.BaseTool.Date.formatter(item.lastDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
-            : null
-          return item
         })
         if (isReturn) {
           this.confirmLoading = false
           return
         }
-        values.list = this.data.map((item) => ({
-          ...item,
-          requirementList: item.requirementList.map((item) => item.id),
-        }))
+        const allRequirements = this.checkDetailList[this.sbType] || []
+        // 构造提交数据:requirementList 由 ID 数组转为对象数组(含 id、sbType),
+        // 与单条新增保持一致,后端据此关联保养项并生成首期任务。
+        values.list = this.data.map((item) => {
+          const selectedRequirements = allRequirements.filter((r) => item.requirementList.includes(r.id))
+          return {
+            ...item,
+            sbType: this.sbType,
+            requirementList: selectedRequirements,
+            lastDate: item.lastDate
+              ? this.BaseTool.Date.formatter(item.lastDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+              : null,
+            nextDate: item.nextDate
+              ? this.BaseTool.Date.formatter(item.nextDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+              : null,
+          }
+        })
 
         batch(values)
           .then(() => {
+            this.$message.success('批量新增成功')
             this.handleCancel(values)
           })
           .catch(() => {

+ 15 - 176
src/views/repair/application-form/RepairCheckForm.vue

@@ -6,17 +6,7 @@
           <a-row :gutter="48">
             <a-col :md="6" :sm="24">
               <a-form-item label="关键字">
-                <a-input v-model="queryParam.keyword" placeholder="请输入设备名称/设备新号" />
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="设备旧号">
-                <a-input v-model="queryParam.zbh" placeholder="请输入设备旧号" />
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="报修人">
-                <a-input v-model="queryParam.actualUser" placeholder="请输入报修人" />
+                <a-input v-model="queryParam.keyword" placeholder="工单号/设备名称/设备编号/报修人/维修人" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -25,20 +15,6 @@
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="问题描述">
-                <a-input v-model="queryParam.content" placeholder="问题描述模糊查询" />
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="状态">
-                <a-select v-model="queryParam.status" placeholder="请选择">
-                  <a-select-option v-for="(label, value) in statusMap" :key="value" :label="label"
-                    :value="parseInt(value)">{{ label }}
-                  </a-select-option>
-                </a-select>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
               <a-form-item label="报修开始日期">
                 <a-date-picker v-model="queryParam.searchStartTime" style="width: 100%"
                   :format="BaseTool.Date.PICKER_NORM_DATETIME_PATTERN" />
@@ -50,7 +26,7 @@
                   :format="BaseTool.Date.PICKER_NORM_DATETIME_PATTERN" />
               </a-form-item>
             </a-col>
-            <a-col :md="8 || 24" :sm="24">
+            <a-col :md="6" :sm="24">
               <span class="table-page-search-submitButtons">
                 <a-button type="primary" @click="handleOk()">查询</a-button>
                 <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
@@ -60,63 +36,37 @@
         </a-form>
       </div>
 
-      <div class="table-operator">
-      </div>
-
-      <s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData" :alert="options.alert"
-        :scroll="{ x: 1000, y: BaseTool.Constant.scrollY }" :rowSelection="options.rowSelection" showPagination="auto">
+      <s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData" :alert="false"
+        :scroll="{ x: 1000, y: BaseTool.Constant.scrollY }" showPagination="auto">
         <span slot="action" slot-scope="record">
-          <template>
-            <a @click="handleView(record)">查看</a>
-
-            <operation-button
-              v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status && $auth('repair-application-forms-edit')"
-              @click="handleEdit(record)">修改</operation-button>
-            <operation-button
-              v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status && $auth('repair-application-forms-del')"
-              :type="2" title="是否要删除该条数据?" @confirm="batchDelete(record.id)">删除</operation-button>
-            <!--<operation-button
-              v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status && $auth('repair-application-forms-dispatch')"
-              @click="handleDispatching(record)" >派工</operation-button>-->
-          </template>
+          <a @click="handleView(record)">查看</a>
         </span>
         <span slot="status" slot-scope="text">
           <badge :text="BaseTool.Object.getField(statusMap, text)"
             :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_STATUS[text]" />
         </span>
-        <span slot="level" slot-scope="text">
-          <badge :text="BaseTool.Object.getField(levelMap, text)"
-            :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_LEVEL[text]" />
-        </span>
       </s-table>
     </div>
-    <base-form ref="baseModal" @ok="handleOk" />
     <detailCheck ref="detailCheckModal" @ok="handleOk" />
-    <dispatch-base-form ref="dispatchBaseForm" @ok="handleOk" />
   </a-card>
 </template>
 
 <script>
 import { STable, Ellipsis } from '@/components'
-import BaseForm from './modules/BaseForm'
 import DetailCheck from './modules/DetailCheck'
-import { getRepairApplicationFormPage, deleteRepairApplicationForms, fetchRepairApplicationForm, exportRepairApplicationForm } from '@/api/repair/application-form'
-import DispatchBaseForm from '@/views/repair/application-form/modules/DispatchBaseForm'
+import { getRepairApplicationFormPage, fetchRepairApplicationForm } from '@/api/repair/application-form'
 
 export default {
   name: 'RepairApplicationFormList',
   components: {
     STable,
     Ellipsis,
-    BaseForm,
-    DetailCheck,
-    DispatchBaseForm
+    DetailCheck
   },
   data() {
     return {
-      // 查询参数
+      // 查询参数:searchType=3 时后端强制只查「审核中 + 已驳回」工单,前端不再传状态条件
       queryParam: {
-        filter: 0,
         searchType: 3,
         searchStartTime: '',
         searchEndTime: ''
@@ -162,15 +112,6 @@ export default {
           width: '120px',
           dataIndex: 'repairUserName'
         },
-        /*{
-          title: '报修来源',
-          checked: true,
-          width: '100px',
-          dataIndex: 'source',
-          customRender: (text, record, index) => {
-            return this.BaseTool.Object.getField(this.sourceMap, text)
-          }
-        },*/
         {
           title: '工单类型',
           checked: true,
@@ -186,23 +127,6 @@ export default {
           width: '200px',
           dataIndex: 'applyTime'
         },
-        /* {
-          title: '紧急等级',
-          checked: true,
-          width: '200px',
-          dataIndex: 'level',
-          customRender: (text, record, index) => {
-            return this.BaseTool.Object.getField(this.levelMap, text)
-          }
-        },
-        {
-          title: '计划性维修',
-          checked: true,
-          dataIndex: 'needStop',
-          customRender: (text, record, index) => {
-            return this.BaseTool.Object.getField(this.needStopMap, text)
-          }
-        }, */
         {
           title: '创建日期',
           width: '200px',
@@ -247,51 +171,31 @@ export default {
           checked: true,
           fixed: 'right',
           key: 'action',
-          width: '150px',
+          width: '80px',
           align: 'center',
           scopedSlots: { customRender: 'action' }
         }
       ],
       // 下拉框map
-      sourceMap: {},
-      levelMap: {},
       statusMap: {},
-      needStopMap: {},
       planFlagMap: {},
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        parameter = {
+        return getRepairApplicationFormPage({
           ...parameter,
           ...this.queryParam,
+          // 固定排序:审核中(4)排在已驳回(5)之前,同状态内按报修时间倒序
           dataScope: {
             sortBy: 'asc, desc',
             sortName: 'status, apply_time'
           }
-        }
-        return getRepairApplicationFormPage(Object.assign(parameter, this.queryParam))
-          .then(res => {
-            return res.data
-          })
-      },
-      selectedRowKeys: [],
-      selectedRows: [],
-
-      options: {
-        alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
-        rowSelection: {
-          selectedRowKeys: this.selectedRowKeys,
-          onChange: this.onSelectChange
-        }
-      },
-      optionAlertShow: false
+        }).then(res => res.data)
+      }
     }
   },
   created() {
-    // 下拉框map
-    this.sourceMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_SOURCE)
-    this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_LEVEL)
+    // 下拉框map:仅保留列表中实际渲染用到的字典
     this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_STATUS)
-    this.needStopMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
     this.planFlagMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_CATEGORY)
     // 获取浏览器的请求参数:报修单编号:no
     const no = this.$route.query.no
@@ -300,57 +204,8 @@ export default {
     }
     // 记录进页面时的参数,重置时恢复为相同逻辑
     this.initQueryParam = { ...this.queryParam }
-    this.tableOption()
   },
   methods: {
-    tableOption() {
-      if (!this.optionAlertShow) {
-        this.options = {
-          alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
-          rowSelection: {
-            selectedRowKeys: this.selectedRowKeys,
-            onChange: this.onSelectChange,
-            getCheckboxProps: record => ({
-              props: {
-                disabled: false,
-                name: record.id
-              }
-            })
-          }
-        }
-        this.optionAlertShow = true
-      } else {
-        this.options = {
-          alert: false,
-          rowSelection: null
-        }
-        this.optionAlertShow = false
-      }
-    },
-    batchDelete(id) {
-      let ids = []
-      if (this.BaseTool.String.isBlank(id)) {
-        const length = this.selectedRows.length
-        if (length === 0) {
-          this.$message.info('请选择要删除的记录')
-          return
-        }
-        ids = this.selectedRows.map(item => item.id)
-      } else {
-        ids = [id]
-      }
-      deleteRepairApplicationForms(ids).then(res => {
-        this.$message.info('删除成功')
-        this.handleOk()
-        this.$refs.table.clearSelected()
-      })
-    },
-    handleEdit(record) {
-      fetchRepairApplicationForm({ id: record.id }).then(res => {
-        const modal = this.$refs.baseModal
-        modal.base(res.data)
-      })
-    },
     handleView(record) {
       fetchRepairApplicationForm({ id: record.id }).then(res => {
         this.visible = false
@@ -364,26 +219,10 @@ export default {
       this.queryParam.searchEndTime = this.queryParam.searchEndTime ? this.BaseTool.Date.formatter(this.queryParam.searchEndTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN) : null
       this.$refs.table.refresh()
     },
-    onSelectChange(selectedRowKeys, selectedRows) {
-      this.selectedRowKeys = selectedRowKeys
-      this.selectedRows = selectedRows
-    },
     resetSearchForm() {
-      // 恢复为刚进页面时的查询状态(保留 filter/searchType/no 等固定参数)
+      // 恢复为刚进页面时的查询状态(保留 searchType/no 等固定参数)
       this.queryParam = { ...this.initQueryParam }
       this.$refs.table.refresh(true)
-    },
-    doExport() {
-      const parameter = {
-        ...this.queryParam
-      }
-      exportRepairApplicationForm(parameter).then(file => {
-        this.BaseTool.UPLOAD.downLoadExportExcel(file)
-      })
-    },
-    handleDispatching(record) {
-      const modal = this.$refs.dispatchBaseForm
-      modal.base(record)
     }
   }
 }