qushaowei
2023-11-18 eb48d3bada053e26def2a94d46dbe115a5a7bb2f
src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue
@@ -339,43 +339,6 @@
          <a>删除</a>
        </a-popconfirm>
      </span>
      <!-- <span
        slot="photo"
        slot-scope="text,record"
      >
        <Tooltip
          placement="top"
          title="预览图片"
        >
          <img
            v-if=" record.upload.path && (record.upload.format.toLowerCase()=='jpg'||record.upload.format.toLowerCase()=='bmp'||record.upload.format.toLowerCase()=='png'||record.upload.format.toLowerCase()=='jpeg'||record.upload.format.toLowerCase()=='gif')"
            width="30"
            height="14"
            border="1"
            draggable="false"
            preview="1"
            :preview-text="''"
            :src="record.upload.src"
          />
        </Tooltip>
        <a
          v-if="record.upload.path && record.upload.format.toLowerCase()=='pdf'"
          href="javascript:;"
          @click="view(record.upload)"
        >
          预览
        </a>
        <a-divider
          v-if="record.upload.path && (record.upload.format.toLowerCase()=='jpg'||record.upload.format.toLowerCase()=='bmp'||record.upload.format.toLowerCase()=='png'||record.upload.format.toLowerCase()=='jpeg'||record.upload.format.toLowerCase()=='gif'||record.upload.format.toLowerCase()=='pdf')"
          type="vertical"
        />
        <a
          href="javascript:;"
          @click="handleUpload(record)"
        >上传</a>
      </span> -->
    </a-table>
    <template slot="footer">
      <a-button
@@ -486,31 +449,31 @@
        //   align: 'center',
        //   dataIndex: 'maintenanceSpecialtyName'
        // },
        {
          title: '安全要求',
          align: 'center',
          dataIndex: 'maintenanceRequire',
          scopedSlots: { customRender: 'maintenanceRequire' },
          width: 150,
        },
        {
          title: '工时定额',
          align: 'center',
          dataIndex: 'workingHourQuota'
        },
        {
          title: '示意图',
          align: 'center',
          dataIndex: 'photo',
          scopedSlots: { customRender: 'photo' },
          width: 150,
        },
        // {
        //   title: '安全要求',
        //   align: 'center',
        //   dataIndex: 'maintenanceRequire',
        //   scopedSlots: { customRender: 'maintenanceRequire' },
        //   width: 150,
        // },
        // {
        //   title: '工时定额',
        //   align: 'center',
        //   dataIndex: 'workingHourQuota'
        // },
        // {
        //   title: '示意图',
        //   align: 'center',
        //   dataIndex: 'photo',
        //   scopedSlots: { customRender: 'photo' },
        //   width: 150,
        // },
        {
          title: '保养部位',
          align: 'center',
          dataIndex: 'location',
          scopedSlots: { customRender: 'location' },
          width: 150,
          // scopedSlots: { customRender: 'location' },
          // width: 150,
        },
        {
          title: '周期',
@@ -596,7 +559,7 @@
        list: "/eam/maintenanceStandardDetail/getMaintenanceStandardDetailListByIds",
        add: "/eam/maintenanceStandard/add",
        edit: "/eam/maintenanceStandard/edit",
        addDetail: "/eam/maintenanceStandardDetail/add",
        // addDetail: "/eam/maintenanceStandardDetail/add",
        getMaintenanceCycle: "/eam/maintenanceStandardDetail/getPeriodicMaintenanceCycle",
        realDelete: "/eam/maintenanceStandardDetail/realDelete",
        revise: '/eam/maintenanceStandard/revise',
@@ -676,7 +639,7 @@
    edit(record) {
      let that = this;
      this.initOptions();
      // this.initOptions();
      // this.getMaintenanceCycle()
      this.dataSource = [];
      this.form.resetFields();
@@ -766,7 +729,6 @@
    },
    handleOk() {
      console.log("123")
      const that = this;
      this.form.validateFields((err, values) => {
        if (!err) {
@@ -782,10 +744,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 });
@@ -825,7 +789,6 @@
    },
    getMaintenanceCycle(equipmentId) {
      debugger
      getAction(this.url.getMaintenanceCycle, { equipmentId: equipmentId }).then((res) => {
        if (res.success) {
          this.maintenanceCycles = res.result