qushaowei
2024-07-25 52190152691bc217844d4f87b700274c297b104e
src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue
@@ -131,17 +131,15 @@
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item
              label="派工方式"
              label="管理制度"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <j-dict-select-tag
              <a-input
                allow-clear
                :disabled="disableSubmit"
                :placeholder="disableSubmit?'':'请选择派工方式'"
                :triggerChange="true"
                dictCode="assign_mode"
                v-decorator="['assignMode', validatorRules.assignMode]"
                :disabled="false"
                :placeholder="disableSubmit?'':'请输入管理制度'"
                v-decorator="['disUda1', validatorRules.disUda1 ]"
              />
            </a-form-item>
          </a-col>
@@ -226,7 +224,7 @@
            style="width: 100%"
            :disabled="false"
          />
          <j-image-upload
          <!-- <j-image-upload
            :value="text"
            v-if="col.dataIndex == 'photo'"
            :isMultiple="false"
@@ -234,7 +232,7 @@
            placeholder="请上传图片"
            @change="(e)=>handleChange(e, record.key, col, index)"
          >
          </j-image-upload>
          </j-image-upload> -->
          <a-input
            :value="text"
            v-if="col.dataIndex == 'location'"
@@ -326,7 +324,7 @@
          dataIndex: 'name'
        },
        {
          title: '检测标准',
          title: '完成数据/要求',
          align: 'center',
          dataIndex: 'detectionStandard'
        },
@@ -350,22 +348,21 @@
          align: 'center',
          dataIndex: 'inspectionCycleId',
          scopedSlots: { customRender: 'inspectionCycleId' },
          width: 170,
        },
        {
          title: '示意图',
          align: 'center',
          dataIndex: 'photo',
          scopedSlots: { customRender: 'photo' },
          width: 170,
        },
        {
          title: '部位',
          align: 'center',
          dataIndex: 'location',
          scopedSlots: { customRender: 'location' },
          width: 170,
        },
        // {
        //   title: '示意图',
        //   align: 'center',
        //   dataIndex: 'photo',
        //   scopedSlots: { customRender: 'photo' },
        //   width: 170,
        // },
        // {
        //   title: '部位',
        //   align: 'center',
        //   dataIndex: 'location',
        //   scopedSlots: { customRender: 'location' },
        //   width: 170,
        // },
        {
          title: '操作',
          align: 'center',
@@ -420,6 +417,11 @@
            { required: true, message: '请输入历史版本!' },
          ]
        },
        disUda1: {
          rules: [
            { required: true, message: '请输入管理制度!' },
          ]
        },
      },
      url: {
        add: "/eam/inspectionStandard/add",
@@ -439,6 +441,7 @@
  mounted() {
    this.$bus.$on('selectionRows', (data) => {
      for (let i = 0; i < data.length; i++) {
        debugger
        this.dataSource.push({
          id: data[i].id,
          inspectionProjectId: data[i].id,
@@ -475,7 +478,7 @@
    edit(record) {
      let that = this;
      that.getInspectionCycle()
      that.initOptions();
      // that.initOptions();
      that.dataSource = [];
      that.form.resetFields();
      that.model = Object.assign({}, record);
@@ -485,7 +488,7 @@
        that.dataSource = temp;
      }
      that.$nextTick(() => {
        that.form.setFieldsValue(pick(that.model, 'num', 'equipmentId', 'equipmentName', 'useDepartName', 'useId', 'teamName', 'assignMode', 'version', 'remark'));
        that.form.setFieldsValue(pick(that.model, 'num', 'equipmentId', 'equipmentName', 'useDepartName', 'disUda1', 'useId', 'teamName', 'assignMode', 'version', 'remark'));
      });
      if (record.id) {
        that.codeDisable = true;
@@ -563,10 +566,12 @@
          let obj;
          if (!this.model.id) {
            formData.versionStatus = '1'
            formData.approvalStatus = '1'
            obj = postAction(this.url.add, formData);
          } else {
            if (this.isRevise) {
              formData.versionStatus = '1'
              formData.approvalStatus = '1'
              obj = postAction(this.url.revise, formData);
            } else {
              obj = requestPut(this.url.edit, formData, { id: this.model.id });