qushaowei
2023-10-07 99b1c362ad86b20c68c5925bd7d641c49f350d76
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"
@@ -304,6 +305,16 @@
            @change="(e)=>handleChange(e, record.key, col, index)"
          >
          </j-image-upload>
          <j-dict-select-tag
            v-if="col.dataIndex == 'maintenanceRole'"
            :value="text"
            allow-clear
            :triggerChange="true"
            dictCode="maintenance_role"
            placeholder="请选择保养角色"
            style="width: 100%"
            @change="(e)=>handleChange(e, record.key, col, index)"
          />
        </div>
      </template>
@@ -485,7 +496,7 @@
          width: 150,
        },
        {
          title: '部位',
          title: '保养部位',
          align: 'center',
          dataIndex: 'location',
          scopedSlots: { customRender: 'location' },
@@ -496,6 +507,13 @@
          align: 'center',
          dataIndex: 'maintenanceCycleId',
          scopedSlots: { customRender: 'maintenanceCycleId' },
          width: 150,
        },
        {
          title: '保养角色',
          align: 'center',
          dataIndex: 'maintenanceRole',
          scopedSlots: { customRender: 'maintenanceRole' },
          width: 150,
        },
        {
@@ -569,7 +587,7 @@
        add: "/eam/maintenanceStandard/add",
        edit: "/eam/maintenanceStandard/edit",
        addDetail: "/eam/maintenanceStandardDetail/add",
        getMaintenanceCycle: "/eam/maintenanceStandardDetail/getMaintenanceCycle",
        getMaintenanceCycle: "/eam/maintenanceStandardDetail/getPeriodicMaintenanceCycle",
        realDelete: "/eam/maintenanceStandardDetail/realDelete",
        revise: '/eam/maintenanceStandard/revise',
        getReviseVersion: "/eam/maintenanceStandard/getReviseVersion",
@@ -593,6 +611,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,
@@ -646,23 +665,21 @@
    edit(record) {
      let that = this;
      this.initOptions();
      this.getMaintenanceCycle()
      // this.getMaintenanceCycle()
      this.dataSource = [];
      this.form.resetFields();
      this.model = Object.assign({}, record);
      this.visible = true;
      if (record.maintenanceStandardDetaillist != undefined) {
        const temp = [...record.maintenanceStandardDetaillist];
        // for (let i = 0; i < temp.length; i++) {
        //   let r = temp[i].upload;
        //   r.src = this.getSrc(temp[i].upload);
        // }
        that.dataSource = temp;
      }
      that.$nextTick(() => {
        that.form.setFieldsValue(pick(that.model, 'num', 'departId', 'teamId', 'equipmentId', 'equipmentName', 'useDepartName', 'useId', 'teamName', 'assignMode', 'version', 'remark'));
      });
      if (record.id) {
        this.maintenanceCycles = []
        this.getMaintenanceCycle(this.model.equipmentId)
        this.codeDisable = true;
        that.$nextTick(() => {
          if (that.isRevise) {
@@ -704,7 +721,9 @@
    sendEquipmentRecord(data) {
      this.dataSource = [];
      let record = data.record;
      this.getMaintenanceCycle(record.id)
      this.form.setFieldsValue({ equipmentId: record.id, equipmentName: record.num + "/" + record.name + "/" + record.model, teamId: record.teamId, teamName: record.teamId_dictText });
    },
    onDepartList() {
@@ -786,8 +805,9 @@
      })
    },
    getMaintenanceCycle() {
      getAction(this.url.getMaintenanceCycle).then((res) => {
    getMaintenanceCycle(equipmentId) {
      debugger
      getAction(this.url.getMaintenanceCycle, { equipmentId: equipmentId }).then((res) => {
        if (res.success) {
          this.maintenanceCycles = res.result
        }
@@ -815,6 +835,9 @@
        if (column.dataIndex == 'location') {
          target[column.dataIndex] = value.target.value;
        }
        if (column.dataIndex == 'maintenanceRole') {
          target[column.dataIndex] = value;
        }
        //显示带过来的数据
        that.dataSource = temp;
      }