qushaowei
2024-07-16 e2dde7449df00d3260b3fc721dd229ea47596f56
src/views/eam/MalfunctionRepair.vue
@@ -88,12 +88,17 @@
            :sm="6"
          >
            <a-form-item label="使用部门">
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择使用部门"
                tree-default-expand-all
                v-model="queryParam.useId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择使用部门"
                v-model="queryParam.useId"
              />
            </a-form-item>
@@ -142,10 +147,10 @@
            :md="6"
            :sm="6"
          >
            <a-form-item label="是否停机维修">
            <a-form-item label="是否停机">
              <j-dict-select-tag
                allow-clear
                placeholder="请选择是否停机维修"
                placeholder="请选择是否停机"
                :triggerChange="true"
                dictCode="is_stop"
                v-model="queryParam.isStop"
@@ -178,12 +183,10 @@
            </a-form-item>
          </a-col>
          <a-col
          :md="6"
            :md="6"
            :sm="6"
          >
            <a-form-item
              label="是否关键设备"
            >
            <a-form-item label="是否关键设备">
              <j-dict-select-tag
                allow-clear
                placeholder="请选择是否关键设备"
@@ -225,7 +228,7 @@
      <a-table
        ref="table"
        size="middle"
        :scroll="{ x: 'calc(1900px + 50%)', y: 900 }"
        :scroll="{ x: 'calc(1500px + 50%)', y: 900 }"
        bordered
        rowKey="id"
        :columns="columns"
@@ -236,13 +239,45 @@
        @change="handleTableChange"
        :customRow="clickThenSelect"
      >
      <span
        <!-- 点击列跳转到事故登记页 -->
        <template
          slot="accidentRegistrationProgress"
          slot-scope="text, record"
        >
          <a
            v-if="text!==''&&text!==null"
            @click="handleAccidentRegistration(record)"
          >
            {{text=='yes'? '已确认':'未确认'}}
          </a>
        </template>
        <!-- 点击列跳转到质量隐患页 -->
        <template
          slot="qualityHiddenDangerProgress"
          slot-scope="text, record"
        >
          <a
            v-if="text!==''&&text!==null"
            @click="handleQualityHiddenDanger(record)"
          >
            {{text=='yes'? '已确认':'未确认'}}
          </a>
        </template>
        <span
          slot="specificEquipment"
          slot-scope="text"
        >
        <a-icon type="check" style="color: chartreuse;" v-if="text==='0'" />
        <a-icon type="close" v-else style="color:red;"/>
      </span>
          <a-icon
            type="check"
            style="color: chartreuse;"
            v-if="text==='0'"
          />
          <a-icon
            type="close"
            v-else
            style="color:red;"
          />
        </span>
        <span
          slot="action"
          slot-scope="text, record"
@@ -405,7 +440,13 @@
        {
          title: '单据号',
          align: "center",
          dataIndex: 'num'
          dataIndex: 'num',
          width: 150
        },
        {
          title: '统一编号',
          align: "center",
          dataIndex: 'equipmentNum'
        },
        {
          title: '状态',
@@ -413,14 +454,16 @@
          dataIndex: 'statusName',
        },
        {
          title: '类型',
          title: '报修类型',
          align: "center",
          dataIndex: 'type',
          customRender: (text) => {
            if (text == '1') {
              return "被动报修";
            } else if (text == '2') {
              return "主动报修";
              return "车间报修";
            } else if (text == '3') {
              return "主动维修";
            }
          },
        },
@@ -442,11 +485,7 @@
          dataIndex: 'specificEquipment',
          scopedSlots: { customRender: 'specificEquipment' }
        },
        {
          title: '统一编号',
          align: "center",
          dataIndex: 'equipmentNum'
        },
        {
          title: '设备名称',
          align: "center",
@@ -457,11 +496,11 @@
          align: "center",
          dataIndex: 'equipmentModel',
        },
        {
          title: '规格',
          align: "center",
          dataIndex: 'equipmentSpecification',
        },
        // {
        //   title: '规格',
        //   align: "center",
        //   dataIndex: 'equipmentSpecification',
        // },
        {
          title: '使用部门',
          align: "center",
@@ -495,10 +534,11 @@
        {
          title: '故障时间',
          align: "center",
          dataIndex: 'faultTime'
          dataIndex: 'faultTime',
          width: 200
        },
        {
          title: '是否停机待修',
          title: '是否停机',
          align: "center",
          dataIndex: 'isStopName',
        },
@@ -525,14 +565,29 @@
          align: "center",
          dataIndex: 'remark'
        },
        //质量隐患确认进度
        {
          title: '质量隐患',
          align: "center",
          dataIndex: 'isConfirm1',
          scopedSlots: { customRender: 'qualityHiddenDangerProgress' }
        },
        //事故登记确认进度
        {
          title: '事故登记',
          align: "center",
          dataIndex: 'isConfirm2',
          scopedSlots: { customRender: 'accidentRegistrationProgress' }
        },
        {
          title: '操作',
          dataIndex: 'action',
          align: "center",
          fixed: "right",
          width: 200,
          width: 100,
          scopedSlots: { customRender: 'action' }
        }
        },
      ],
      url: {
        list: "/eam/equipmentReportRepair/getReportRepairList",
@@ -546,8 +601,8 @@
      /* 分页参数 */
      ipagination: {
        current: 1,
        pageSize: 5,
        pageSizeOptions: ['5', '10', '50'],
        pageSize: 20,
        pageSizeOptions: ['5', '10', '20', '50'],
        showTotal: (total, range) => {
          return range[0] + "-" + range[1] + " 共" + total + "条"
        },
@@ -721,7 +776,27 @@
    handleAccept(record) {
      this.$refs.acceptModel.title = "验收"
      this.$refs.acceptModel.edit(record)
    }
    },
    //点击跳转到事故登记页
    handleAccidentRegistration(record) {
      this.$router.push({
        path: '/eam/FaultInfoList',
        query: {
          id: record.faultInfoId,
          num: record.num
        }
      })
    },
    //点击跳转到质量隐患页
    handleQualityHiddenDanger(record) {
      this.$router.push({
        path: '/eam/QuanlityConfirmList',
        query: {
          id: record.quanlityId,
          num: record.num
        }
      })
    },
  }
}
</script>