xg
“linengliang”
2024-03-13 b9b0777972f6563075a886cbfc58991e51c1a097
src/views/eam/MalfunctionRepair.vue
@@ -8,14 +8,17 @@
      <a-form
        layout="inline"
        @keyup.enter.native="searchQuery"
      > <a-row :gutter="24" style="margin-bottom: 1%;">
      > <a-row
          :gutter="24"
          style="margin-bottom: 1%;"
        >
          <a-col
            :md="24"
            :sm="6"
          >
          <a-form-item label="统一编号群">
            <a-form-item label="统一编号群">
              <a-textarea
                placeholder="请输入所有统一编码,须用空格隔开,否则可能查询出错误信息"
                placeholder="请输入所有统一编码,须用换行隔开,否则可能查询出错误信息"
                v-model="queryParam.nums"
                :auto-size="{ minRows: 2, maxRows:2 }"
              ></a-textarea>
@@ -139,10 +142,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"
@@ -174,34 +177,53 @@
              ></a-input>
            </a-form-item>
          </a-col>
          <a-col
            :md="6"
            :sm="6"
          >
            <a-form-item label="是否关键设备">
              <j-dict-select-tag
                allow-clear
                placeholder="请选择是否关键设备"
                :triggerChange="true"
                dictCode="specific_equipment"
                v-model="queryParam.specificEquipment"
              />
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <div class="table-operator">
              <a-button
                type="primary"
                @click="searchQuery"
                icon="search"
              >查询</a-button>
              <a-button
                type="primary"
                @click="searchReset"
                icon="reload"
                style="margin-left: 8px"
              >重置</a-button>
      <a-button
        type="primary"
        @click="searchQuery"
        icon="search"
      >查询</a-button>
      <a-button
        type="primary"
        @click="searchReset"
        icon="reload"
        style="margin-left: 8px"
      >重置</a-button>
      <a-button
        @click="handleAdd"
        type="primary"
        icon="plus"
        v-has="'report:add&edit'"
      >新增</a-button>
      <a-button
        type="primary"
        icon="download"
        @click="handleExportXls('故障报修')"
      >导出</a-button>
    </div>
    <div>
      <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"
@@ -212,6 +234,41 @@
        @change="handleTableChange"
        :customRow="clickThenSelect"
      >
      <!-- 点击列跳转到事故登记页 -->
        <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>
        <span
          slot="action"
          slot-scope="text, record"
@@ -279,8 +336,14 @@
            </a-menu>
          </a-dropdown> -->
        </span>
        <span slot="jell" slot-scope="text">
            <j-ellipsis :value="text" :length="10" />
        <span
          slot="jell"
          slot-scope="text"
        >
          <j-ellipsis
            :value="text"
            :length="10"
          />
        </span>
      </a-table>
@@ -298,7 +361,10 @@
          class="table-operator"
          style="margin-top: 0px"
        >
          <FaultDescriptionList ref="FaultDescriptionList"   @ok="modalFormOk"/>
          <FaultDescriptionList
            ref="FaultDescriptionList"
            @ok="modalFormOk"
          />
        </div>
      </a-tab-pane>
@@ -314,8 +380,8 @@
      @cancel='approvalModalFormOk'
    ></approvel-modal>
    <accept-model
    ref="acceptModel"
    @ok="modalFormOk"
      ref="acceptModel"
      @ok="modalFormOk"
    ></accept-model>
  </a-card>
</template>
@@ -345,8 +411,8 @@
  },
  data() {
    return {
      treeData:[],
      faultTime:[],
      treeData: [],
      faultTime: [],
      description: '故障报修',
      queryParam: { delflag: 0 },
      selectedRowKeys: [],
@@ -363,14 +429,46 @@
          }
        },
        {
          title: '单据号',
          align: "center",
          dataIndex: 'num'
        },
        {
          title: '状态',
          align: "center",
          dataIndex: 'statusName',
        },
        {
          title: '单据号',
          title: '报修类型',
          align: "center",
          dataIndex: 'num'
          dataIndex: 'type',
          customRender: (text) => {
            if (text == '1') {
              return "被动报修";
            } else if (text == '2') {
              return "主动报修";
            } else if (text == '3') {
              return "主动维修";
            }
          },
        },
        {
          title: '来源',
          align: "center",
          dataIndex: 'source',
          customRender: (text) => {
            if (text == '1') {
              return "手动创建";
            } else if (text == '2') {
              return "点检报修";
            }
          },
        },
        {
          title: '关键设备',
          align: "center",
          dataIndex: 'specificEquipment',
          scopedSlots: { customRender: 'specificEquipment' }
        },
        {
          title: '统一编号',
@@ -387,11 +485,11 @@
          align: "center",
          dataIndex: 'equipmentModel',
        },
        {
          title: '规格',
          align: "center",
          dataIndex: 'equipmentSpecification',
        },
        // {
        //   title: '规格',
        //   align: "center",
        //   dataIndex: 'equipmentSpecification',
        // },
        {
          title: '使用部门',
          align: "center",
@@ -406,8 +504,8 @@
          title: '故障描述',
          align: "center",
          dataIndex: 'faultDescription',
          scopedSlots: {
            customRender: 'faultDescription'
          scopedSlots: {
            customRender: 'faultDescription'
          }
        },
@@ -425,10 +523,11 @@
        {
          title: '故障时间',
          align: "center",
          dataIndex: 'faultTime'
          dataIndex: 'faultTime',
          width: 200
        },
        {
          title: '是否停机待修',
          title: '是否停机',
          align: "center",
          dataIndex: 'isStopName',
        },
@@ -446,8 +545,8 @@
          title: '验收意见',
          align: "center",
          dataIndex: 'errUda5',
          scopedSlots: {
            customRender: 'jell'
          scopedSlots: {
            customRender: 'jell'
          }
        },
        {
@@ -455,14 +554,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",
@@ -476,8 +590,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 + "条"
        },
@@ -488,7 +602,7 @@
    }
  },
  created() {
       this.initOptions();
    this.initOptions();
  },
  computed: {
    importExcelUrl: function () {
@@ -644,14 +758,34 @@
        }
      })
    },
    timeChange(){
    timeChange() {
      this.queryParam.faultStartTime = moment(this.faultTime[0]).format("YYYY-MM-DD HH:mm:ss")
      this.queryParam.faultEndTime = moment(this.faultTime[1]).format("YYYY-MM-DD HH:mm:ss")
    },
    handleAccept(record){
      this.$refs.acceptModel.title="验收"
    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>