“linengliang”
2023-09-18 cbac269460317a5e9c350da949b0664a2913f365
编码自动生成
已修改2个文件
43 ■■■■■ 文件已修改
src/views/eam/PredictiveWorkPlanList.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/predictiveWorkPlan/PredictiveWorkPlanModal.vue 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/PredictiveWorkPlanList.vue
@@ -441,12 +441,12 @@
        this.$refs.modalForm.disableSubmit = false
        this.$refs.modalForm.isRevise = false
      },
      handleAdd: function() {
        this.$refs.modalForm.add()
        this.$refs.modalForm.title = '新增'
        this.$refs.modalForm.disableSubmit = false
        this.$refs.modalForm.isRevise = false
      },
      // handleAdd: function() {
      //   this.$refs.modalForm.add()
      //   this.$refs.modalForm.title = '新增'
      //   this.$refs.modalForm.disableSubmit = false
      //   this.$refs.modalForm.isRevise = false
      // },
      //升版
      handleRevise: function(record) {
src/views/eam/modules/predictiveWorkPlan/PredictiveWorkPlanModal.vue
@@ -21,8 +21,8 @@
            >
              <a-input
                allowClear
                :disabled="disableSubmit"
                :placeholder="disableSubmit?'':'请输入方案编码'"
                :placeholder="自动生成"
                :disabled="true"
                v-decorator="[ 'num', validatorRules.num]"
              />
            </a-form-item>
@@ -194,6 +194,7 @@
  import { preview } from 'vue-photo-preview'
  import PdfView from '@views/common/PdfView'
  import EquipmentList from '@/views/eam/common/EquipmentList'
import { getAction } from '../../../../api/manage'
  export default {
    name: 'MaintenanceStandardModal',
@@ -266,7 +267,8 @@
          add: '/eam/predictiveworkplan/add',
          edit: '/eam/predictiveworkplan/edit',
          revise: '/eam/predictiveworkplan/revise',
          getReviseVersion: '/eam/predictiveworkplan/getReviseVersion'
          getReviseVersion: '/eam/predictiveworkplan/getReviseVersion',
          getNum:'/eam/sysIdentity/getNumNew'
        },
        dataSource: [],
@@ -284,9 +286,18 @@
    methods: {
      add() {
        this.edit()
        let that = this;
        let param = {
          type: 'PredictiveWorkPlan',
          length: 4
        };
        getAction(this.url.getNum,param).then(res=>{
          if(res.success){
             that.model.num = res.result;
             that.edit(that.model);
          }
        })
      },
      edit(record) {
        let that = this
        this.dataSource = []
@@ -297,10 +308,12 @@
          that.model.equipmentId = record.equipmentId
          that.model.teamId = record.teamId
          that.form.setFieldsValue(pick(that.model, 'num', 'name', 'monitorType', 'maintenanceMethod', 'assignMode', 'teamName', 'planVersion'))
          that.form.setFieldsValue({
            equipmentName: record.deviceNum + '/' + record.deviceName + '/' + record.deviceModel,
            historyVersion: record.planVersion
          })
          if(that.model.id){
            that.form.setFieldsValue({
              equipmentName: record.deviceNum + '/' + record.deviceName + '/' + record.deviceModel,
              historyVersion: record.planVersion
            })
          }
        })
        if (record.id) {
          this.codeDisable = true