“linengliang”
2023-10-24 4ac53eac3402797316e2b7f97e8ddf608c866046
故障报修
已修改4个文件
142 ■■■■ 文件已修改
src/views/eam/MalfunctionRepair.vue 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/malfunctionRepair/EquipmentList.vue 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/malfunctionRepair/MalfunctionRepaireForm.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/malfunctionRepair/MalfunctionRepaireModal.vue 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/MalfunctionRepair.vue
@@ -187,6 +187,9 @@
            </a-menu>
          </a-dropdown>
        </span>
        <span slot="faultDescription" slot-scope="text">
            <j-ellipsis :value="text" :length="10" />
        </span>
      </a-table>
    </div>
@@ -230,6 +233,7 @@
import MalfunctionRepairModal from './modules/malfunctionRepair/MalfunctionRepaireModal'
import FaultDescriptionList from './modules/malfunctionRepair/FaultDescriptionList'
import ApprovelModal from './modules/malfunctionRepair/ApprovelModal'
import JEllipsis from '@/components/jeecg/JEllipsis'
export default {
  name: 'MalfunctionRepairList',
@@ -237,7 +241,8 @@
  components: {
    MalfunctionRepairModal,
    FaultDescriptionList,
    ApprovelModal
    ApprovelModal,
    JEllipsis
  },
  data() {
    return {
@@ -291,15 +296,19 @@
          align: "center",
          dataIndex: 'departName',
        },
        {
          title: '紧急程度',
          align: "center",
          dataIndex: 'urgencyName',
        },
        // {
        //   title: '紧急程度',
        //   align: "center",
        //   dataIndex: 'urgencyName',
        // },
        {
          title: '故障描述',
          align: "center",
          dataIndex: 'faultDescription'
          dataIndex: 'faultDescription',
          scopedSlots: {
            customRender: 'faultDescription'
          }
        },
        // {
        //   title: '故障拍照',
@@ -307,11 +316,11 @@
        //   dataIndex: 'photo',
        //   scopedSlots: { customRender: 'imgSlot' }
        // },
        {
          title: '故障原因',
          align: "center",
          dataIndex: 'faultReason'
        },
        // {
        //   title: '故障原因',
        //   align: "center",
        //   dataIndex: 'faultReason'
        // },
        {
          title: '故障时间',
          align: "center",
@@ -337,14 +346,14 @@
          align: "center",
          dataIndex: 'remark'
        },
        {
          title: '操作',
          dataIndex: 'action',
          align: "center",
          fixed: "right",
          width: 200,
          scopedSlots: { customRender: 'action' }
        }
        // {
        //   title: '操作',
        //   dataIndex: 'action',
        //   align: "center",
        //   fixed: "right",
        //   width: 200,
        //   scopedSlots: { customRender: 'action' }
        // }
      ],
      url: {
        list: "/eam/equipmentReportRepair/getReportRepairList",
src/views/eam/modules/malfunctionRepair/EquipmentList.vue
@@ -174,6 +174,30 @@
    handleCancel() {
      this.close();
    },
    loadData(arg) {
      if (!this.url.list) {
        this.$message.error('请设置url.list属性!')
        return
      }
      //加载数据 若传入参数1则加载第一页的内容
      if (arg === 1) {
        this.ipagination.current = 1
      }
      this.onClearSelected()
      this.queryParam.equipmentStatus = '1';
      var params = this.getQueryParams()//查询条件
      this.loading = true
      getAction(this.url.list, params).then((res) => {
        if (res.success) {
          this.dataSource = res.result.records
          this.ipagination.total = res.result.total
        }
        if (res.code === 510) {
          this.$message.warning(res.message)
        }
        this.loading = false
      })
    },
  },
}
@@ -227,8 +251,7 @@
  height: 90% !important;
  overflow-y: hidden;
}
/deep/ .notshow {
 .notshow {
  display: none;
}
@@ -247,8 +270,7 @@
.dataUnKnow {
  color: #1890ff;
}
/deep/ .frozenRowClass {
 .frozenRowClass {
  color: #c9c9c9;
}
</style>
src/views/eam/modules/malfunctionRepair/MalfunctionRepaireForm.vue
@@ -176,7 +176,8 @@
        add: "/eam/equipmentReportRepair/add",
        edit: "/eam/equipmentReportRepair/edit",
        queryById: "/eam/equipmentReportRepair/queryById",
        equipmentList: '/eam/equipment/list'
        equipmentList: '/eam/equipment/list',
        getNum:'/eam/sysIdentity/getNumNew'
      },
      isMaintenance: [
        { label: '是', value: true },
@@ -272,13 +273,22 @@
    add() {
      this.modelDefault.status = 1
      this.modelDefault.isStop = false
      this.edit(this.modelDefault);
      let that = this;
      let param = {
          type: 'EquipmentReportRepair',
          length: 4
      };
      getAction(this.url.getNum,param).then(res=>{
          if(res.success){
             that.modelDefault.num = res.result;
             that.edit(that.modelDefault);
          }
      })
    },
    async edit(record) {
      await this.fetchList()
      this.model = Object.assign({}, record);
      if (this.model.id) {
        this.selectStatus = Number(record.status)
        record.isStop == 'true' ? this.isStop = true : this.isStop = false
        this.equipmentId = String(record.equipmentId)
src/views/eam/modules/malfunctionRepair/MalfunctionRepaireModal.vue
@@ -19,7 +19,7 @@
              :wrapperCol="wrapperCol"
            >
              <a-input
                :disabled="disableSubmit"
                :disabled="true"
                placeholder="请输入单据号"
                v-decorator="['num', validatorRules.num]"
              />
@@ -33,7 +33,7 @@
            >
              <j-dict-select-tag
                allow-clear
                :disabled="disableSubmit"
                :disabled="true"
                :placeholder="disableSubmit?'':'请选择是否停机维修'"
                :triggerChange="true"
                dictCode="is_stop"
@@ -67,7 +67,7 @@
              :wrapperCol="wrapperCol"
            >
              <j-date
                :disabled="disableSubmit"
                :disabled="true"
                style="width: 100%"
                placeholder="请选择故障时间"
                :showTime="true"
@@ -175,7 +175,7 @@
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
        <!-- <a-row :gutter="24">
          <a-col :span="24/2">
            <a-form-item
              label="紧急程度"
@@ -191,21 +191,21 @@
                v-decorator="['urgency', validatorRules.urgency]"
              />
            </a-form-item>
          </a-col>
          <a-col :span="24/2" v-show="false">
          </a-col> -->
          <!-- <a-col :span="24/2" v-show="false">
            <a-form-item
              label="故障原因"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
            <a-input
              :disabled="disableSubmit"
                :disabled="disableSubmit"
                enter-button
                v-decorator="['faultReason', validatorRules.faultReason]"
              />
            </a-form-item>
          </a-col>
        </a-row>
          </a-col> -->
        <!-- </a-row> -->
        <a-row :gutter="24">
          <a-col :span="24/2">
            <a-form-item
@@ -290,6 +290,8 @@
// import JImageUpload from '@/components/jeecg/JImage2Upload'
import EquipmentList from './EquipmentList'
import Vue from 'vue'
import dayjs from 'dayjs'
export default {
  name: "MalfunctionRepaireModal",
@@ -297,7 +299,8 @@
    JMultiSelectTag,
    Tooltip,
    // JImageUpload,
    EquipmentList
    EquipmentList,
    dayjs
  },
  data() {
    return {
@@ -338,13 +341,19 @@
            { required: true, message: '请选择故障时间!' },
          ]
        },
        faultDescription:{
          rules: [
            { required: true, message: '请描述故障!' },
            { max: 1000, min:1,message: '最多可描述1000字!' },
          ]
        },
      },
      url: {
        add: "/eam/equipmentReportRepair/add",
        edit: "/eam/equipmentReportRepair/edit",
        getSysDeparts: "/eam/equipment/getSysDeparts",
        getNum:'/eam/sysIdentity/getNumNew'
      },
      dataSource: [],
    }
  },
@@ -354,9 +363,21 @@
  },
  methods: {
    add() {
      this.edit({})
      let that = this;
      let param = {
          type: 'EquipmentReportRepair',
          length: 4
      };
      let modelDefault = {};
      getAction(this.url.getNum,param).then(res=>{
          if(res.success){
             modelDefault.num = res.result;
             modelDefault.isStop = '2'
             modelDefault.faultTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss');
             that.edit(modelDefault);
          }
      })
    },
    edit(record) {
      let that = this;