qushaowei
2023-09-05 85340187a01ab2cfd064d88f20741f95386f3295
保养位置自动代入数据
已修改4个文件
107 ■■■■■ 文件已修改
src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyMaintenanceStandard/JSelectMaintenanceStandardModal.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/specialtyMaintenanceStandard/JSelectMaintenanceStandardModal.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/specialtyMaintenanceStandard/SpecialtyMaintenanceStandardModal.vue 89 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue
@@ -292,8 +292,9 @@
            v-if="col.dataIndex == 'location'"
            :maxLength="500"
            auto-size
            placeholder="请输入位置"
            placeholder="请输入保养位置"
            @change="(e)=>handleChange(e, record.key, col, index)"
            :disabled="true"
          />
          <j-image-upload
            :value="text"
@@ -485,7 +486,7 @@
          width: 150,
        },
        {
          title: '部位',
          title: '保养部位',
          align: 'center',
          dataIndex: 'location',
          scopedSlots: { customRender: 'location' },
@@ -593,6 +594,7 @@
          standard: data[i].standard,
          maintenanceMethodName: data[i].maintenanceMethod_dictText,
          maintenanceTool: data[i].maintenanceTool,
          location: data[i].location,
          maintenanceSpecialtyName: data[i].maintenanceSpecialtyId_dictText,
          maintenanceRequire: data[i].maintenanceRequire,
          workingHourQuota: data[i].workingHourQuota,
src/views/eam/modules/dailyMaintenanceStandard/JSelectMaintenanceStandardModal.vue
@@ -118,6 +118,11 @@
          dataIndex: 'maintenanceSpecialtyId_dictText'
        },
        {
          title: '保养部位',
          align: 'center',
          dataIndex: 'location'
        },
        {
          title: '安全要求',
          align: 'center',
          dataIndex: 'maintenanceRequire'
src/views/eam/modules/specialtyMaintenanceStandard/JSelectMaintenanceStandardModal.vue
@@ -8,7 +8,7 @@
    @cancel='close'
    style='top:50px'
    cancelText='关闭'
    :width='1250'
    :width='1500'
  >
    <a-card :bordered='false'>
      <div class='table-page-search-wrapper'>
@@ -123,6 +123,11 @@
          dataIndex: 'maintenanceRequire'
        },
        {
          title: '保养部位',
          align: 'center',
          dataIndex: 'location'
        },
        {
          title: '工时定额',
          align: 'center',
          dataIndex: 'workingHourQuota'
src/views/eam/modules/specialtyMaintenanceStandard/SpecialtyMaintenanceStandardModal.vue
@@ -1,7 +1,7 @@
<template>
  <a-modal
    :title="title"
    :width="1250"
    :width="1500"
    :visible="visible"
    :maskClosable="false"
    @ok="handleOk"
@@ -32,7 +32,7 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
            <a-input-search
              <a-input-search
                :disabled="disableSubmit"
                placeholder="请选择设备"
                enter-button
@@ -42,14 +42,17 @@
              />
            </a-form-item>
          </a-col>
          <a-col :span="12" hidden >
          <a-col
            :span="12"
            hidden
          >
            <!-- v-if="false" -->
            <a-form-item
              label="设备名称Id"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
            <a-input
              <a-input
                :disabled="disableSubmit"
                placeholder="请选择设备名称Id"
                enter-button
@@ -83,11 +86,11 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
            <j-dict-select-tag
              <j-dict-select-tag
                allow-clear
                :placeholder="disableSubmit?'':'请选择对象部门'"
                :triggerChange="true"
                :disabled = "true"
                :disabled="true"
                dictCode="sys_depart,depart_name,id"
                v-decorator="['departId', validatorRules.departId]"
              />
@@ -196,8 +199,9 @@
            v-if="col.dataIndex == 'location'"
            :maxLength="500"
            auto-size
            placeholder="请输入位置"
            placeholder="请输入保养部位"
            @change="(e)=>handleChange(e, record.key, col, index)"
            :disabled="true"
          />
          <j-image-upload
            :value="text"
@@ -226,7 +230,7 @@
        slot="photo"
        slot-scope="text,record"
      > -->
        <!-- <Tooltip
      <!-- <Tooltip
          placement="top"
          title="预览图片"
        >
@@ -386,7 +390,7 @@
          width: 140,
        },
        {
          title: '部位',
          title: '保养部位',
          align: 'center',
          dataIndex: 'location',
          scopedSlots: { customRender: 'location' },
@@ -464,7 +468,7 @@
          ]
        },
        version: {
          rules: [
          rules: [
            { required: true, message: '请输入版本!' },
          ]
        },
@@ -478,7 +482,7 @@
        getMaintenanceMode: "/eam/maintenanceStandardDetail/getMaintenanceMode",
        realDelete: "/eam/maintenanceStandardDetail/realDelete",
        revise: '/eam/maintenanceStandard/revise',
        getReviseVersion:"/eam/maintenanceStandard/getReviseVersion"
        getReviseVersion: "/eam/maintenanceStandard/getReviseVersion"
      },
      dataSource: [],
@@ -495,6 +499,7 @@
          maintenanceProjectId: data[i].id,
          name: data[i].name,
          standard: data[i].standard,
          location: data[i].location,
          maintenanceMethodName: data[i].maintenanceMethod_dictText,
          maintenanceTool: data[i].maintenanceTool,
          maintenanceSpecialtyName: data[i].maintenanceSpecialtyId_dictText,
@@ -566,7 +571,7 @@
        that.dataSource = temp;
      }
      that.$nextTick(() => {
        that.form.setFieldsValue(pick(that.model,'version', 'num', 'departId', 'teamId', 'equipmentId','equipmentName','remark'));
        that.form.setFieldsValue(pick(that.model, 'version', 'num', 'departId', 'teamId', 'equipmentId', 'equipmentName', 'remark'));
      });
      if (record.id) {
        that.codeDisable = true;
@@ -609,35 +614,35 @@
            that.confirmLoading = false;
            return
          }
          for(var i = 0;i<that.dataSource.length;i++){
              if(that.dataSource[i].maintenanceRequire==null||that.dataSource[i].maintenanceRequire==undefined||that.dataSource[i].maintenanceRequire==''){
                this.$message.error("第"+(i+1)+"行安全要求为空,请填写")
                that.confirmLoading = false
                   return false;
              }
              if(that.dataSource[i].photo==null||that.dataSource[i].photo==undefined||that.dataSource[i].photo==''){
                this.$message.error("第"+(i+1)+"行示意图为空,请上传")
                that.confirmLoading = false
                   return false;
              }
              if(that.dataSource[i].location==null||that.dataSource[i].location==undefined||that.dataSource[i].location==''){
                this.$message.error("第"+(i+1)+"行部位为空,请填写")
                that.confirmLoading = false
                   return false;
              }
              if(that.dataSource[i].maintenanceCycleId==null||that.dataSource[i].maintenanceCycleId==undefined){
                this.$message.error("第"+(i+1)+"行周期为空,请选择")
                that.confirmLoading = false
                   return false;
              }
              if(that.dataSource[i].maintenanceMode==null||that.dataSource[i].maintenanceMode==undefined||that.dataSource[i].maintenanceMode==''){
                this.$message.error("第"+(i+1)+"行维保方式为空,请选择")
                that.confirmLoading = false
                   return false;
              }
          for (var i = 0; i < that.dataSource.length; i++) {
            if (that.dataSource[i].maintenanceRequire == null || that.dataSource[i].maintenanceRequire == undefined || that.dataSource[i].maintenanceRequire == '') {
              this.$message.error("第" + (i + 1) + "行安全要求为空,请填写")
              that.confirmLoading = false
              return false;
            }
            if (that.dataSource[i].photo == null || that.dataSource[i].photo == undefined || that.dataSource[i].photo == '') {
              this.$message.error("第" + (i + 1) + "行示意图为空,请上传")
              that.confirmLoading = false
              return false;
            }
            if (that.dataSource[i].location == null || that.dataSource[i].location == undefined || that.dataSource[i].location == '') {
              this.$message.error("第" + (i + 1) + "行部位为空,请填写")
              that.confirmLoading = false
              return false;
            }
            if (that.dataSource[i].maintenanceCycleId == null || that.dataSource[i].maintenanceCycleId == undefined) {
              this.$message.error("第" + (i + 1) + "行周期为空,请选择")
              that.confirmLoading = false
              return false;
            }
            if (that.dataSource[i].maintenanceMode == null || that.dataSource[i].maintenanceMode == undefined || that.dataSource[i].maintenanceMode == '') {
              this.$message.error("第" + (i + 1) + "行维保方式为空,请选择")
              that.confirmLoading = false
              return false;
            }
          }
          formData.maintenanceStandardDetaillist = that.dataSource;
          formData.type = 'specialty';
@@ -816,7 +821,7 @@
      this.dataSource = [];
      let record = data.record;
      console.log(record.id)
      this.form.setFieldsValue({ departId:record.useId,equipmentId: record.id, equipmentName: record.num + "/" + record.name + "/" + record.model });
      this.form.setFieldsValue({ departId: record.useId, equipmentId: record.id, equipmentName: record.num + "/" + record.name + "/" + record.model });
    },