qushaowei
2024-01-11 52b10180d77f2962e519300469811a911afa3cf2
保养拆分  页面问题修改
已添加4个文件
已修改13个文件
2452 ■■■■■ 文件已修改
src/views/eam/Daily3MaintenanceOrderList.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/DailyMaintenanceOrderList.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/DailyMaintenanceStandard3List.vue 603 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/DailyMaintenanceStandardList.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/daily3MaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/daily3MaintenanceOrder/MaintenanceOrder3Modal.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderExeDrawer.vue 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue 74 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyMaintenanceOrder/MaintenanceOrderModal.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardDetail.vue 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyMaintenanceStandard3/DailyMaintenanceStandardDetail.vue 289 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyMaintenanceStandard3/DailyMaintenanceStandardModal.vue 950 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyMaintenanceStandard3/JSelectMaintenanceStandardModal.vue 282 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/maintenancePlan/EquipmentMaintenancePlanForm.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/specialtyInspectionOrder/SpecialtyInspectionOrderAssignModal.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/Daily3MaintenanceOrderList.vue
@@ -577,9 +577,9 @@
        //   dataIndex: 'actualWorkingHourQuota',
        // },
        {
          title: '执行人',
          title: '报工人',
          align: "center",
          dataIndex: 'maintenanceUserName'
          dataIndex: 'maintenanceUserId'
        },
        {
          title: '问题及相应处理措施描述',
src/views/eam/DailyMaintenanceOrderList.vue
@@ -422,9 +422,9 @@
        //   dataIndex: 'actualWorkingHourQuota',
        // },
        {
          title: '执行人',
          title: '报工人',
          align: "center",
          dataIndex: 'maintenanceUserName'
          dataIndex: 'maintenanceUserId'
        },
        {
          title: '问题及相应处理措施描述',
src/views/eam/DailyMaintenanceStandard3List.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,603 @@
<template>
  <a-card
    title="三级保养标准"
    :bordered='false'
  >
    <div class='table-page-search-wrapper'>
      <a-form
        layout='inline'
        @keyup.enter.native='searchQuery'
      >
        <a-row :gutter='24'>
          <a-col
            :xl='6'
            :lg='7'
            :md='8'
            :sm='24'
          >
            <a-form-item label='标准编码'>
              <a-input
                placeholder='请输入标准编码'
                v-model='queryParam.num'
              ></a-input>
            </a-form-item>
          </a-col>
          <a-col
            :xl='6'
            :lg='7'
            :md='8'
            :sm='24'
          >
            <a-form-item label='设备名称'>
              <a-input
                placeholder='请输入设备名称'
                v-model='queryParam.name'
              ></a-input>
            </a-form-item>
          </a-col>
          <a-col
            :md="10"
            :sm="8"
          >
            <a-form-item label="版本状态">
              <a-radio-group
                v-model="queryParam.versionStatus"
                @change="onChange"
                default-value="2"
              >
                <a-radio-button value="1">
                  æœªç”Ÿæ•ˆ
                </a-radio-button>
                <a-radio-button value="2">
                  å·²ç”Ÿæ•ˆ
                </a-radio-button>
                <a-radio-button value="3">
                  å·²å¤±æ•ˆ
                </a-radio-button>
              </a-radio-group>
            </a-form-item>
          </a-col>
          <!-- <a-col
            :xl='6'
            :lg='7'
            :md='8'
            :sm='24'
          >
            <span
              style='float: left;overflow: hidden;'
              class='table-page-search-submitButtons'
            >
              <a-button
                type='primary'
                @click='searchQuery'
                icon='search'
              >查询</a-button>
              <a-button
                type='primary'
                @click='searchReset'
                icon='reload'
                style='margin-left: 8px'
              >重置</a-button>
            </span>
          </a-col> -->
        </a-row>
      </a-form>
    </div>
    <div class="table-operator">
      <a-button
        @click='handleAdd'
        type='primary'
        icon='plus'
        v-has="'dailyMaintenance3Standard:add'"
      >编制</a-button>
      <a-button
        type='primary'
        @click='searchQuery'
        icon='search'
      >查询</a-button>
      <a-button
        type='primary'
        @click='searchReset'
        icon='reload'
        style='margin-left: 8px'
      >重置</a-button>
      <a-upload
        name="file"
        :showUploadList="false"
        :multiple="false"
        :headers="tokenHeader"
        :action="importExcelUrl"
        @change="handleImportExcel"
      >
        <a-button
          type="primary"
          icon="import"
          v-has="'dailyMaintenance3Standard:import'"
        >导入</a-button>
      </a-upload>
    </div>
    <!-- table区域-begin -->
    <div>
      <div
        class='ant-alert ant-alert-info'
        style='margin-bottom: 16px;'
      >
        <i class='anticon anticon-info-circle ant-alert-icon'></i> å·²é€‰æ‹© <a style='font-weight: 600'>{{ selectedRowKeys.length }}</a>项
        <a
          style='margin-left: 24px'
          @click='onClearSelected'
        >清空</a>
      </div>
      <a-table
        ref='table'
        size='middle'
        bordered
        rowKey='id'
        :scroll="{ x: 'calc(2300px + 50%)', y: 900 }"
        :columns='columns'
        :dataSource='dataSource'
        :pagination='ipagination'
        :loading='loading'
        :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
        :customRow='clickThenSelect'
        @change='handleTableChange'
      >
        <!-- <span
          slot='action'
          slot-scope='text, record'
        >
          <a @click='handleEdit(record)'>编辑</a>
          <a-divider type='vertical' />
          <a-dropdown>
            <a class='ant-dropdown-link'>更多 <a-icon type='down' /></a>
            <a-menu slot='overlay'>
              <a-menu-item>
                <a-popconfirm
                  title='确定删除吗?'
                  @confirm='() => handleDelete(record.id)'
                >
                  <a>删除</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span> -->
        <span
          slot="action"
          slot-scope="text, record"
        >
          <a
            v-show="record.versionStatus == '1' && record.approvalStatus == '1' "
            @click="handleAuditApproval(record)"
            v-has="'dailyMaintenance3Standard:audit'"
          >审核</a>
          <a-divider type="vertical" />
          <a
            v-show="record.versionStatus == '1' && record.approvalStatus == '4'"
            @click="handleAuditApproval(record)"
            v-has="'dailyMaintenance3Standard:againAudit'"
          >重新审核</a>
          <a-divider type="vertical" />
          <a
            v-show="record.versionStatus == '1'&& record.approvalStatus == '3' "
            @click="handleAuditApproval(record)"
            v-has="'dailyMaintenance3Standard:approval'"
          >审批</a>
          <a-divider type="vertical" />
          <a
            v-show="record.versionStatus == '1' && (record.approvalStatus == '1' || record.approvalStatus == '2')"
            @click="handleEdit(record)"
            v-has="'dailyMaintenance3Standard:edit'"
          >编辑</a>
          <a-divider type="vertical" />
          <a-popconfirm
            v-show="record.versionStatus == '1' && (record.approvalStatus == '1' || record.approvalStatus == '2')"
            title="确定删除吗?"
            @confirm="() => handleDelete(record.id)"
            v-has="'dailyMaintenance3Standard:delete'"
          >
            <a>删除</a>
          </a-popconfirm>
          <a-divider type="vertical" />
          <a
            v-show="record.versionStatus != '1'"
            @click="handleRevise(record)"
            v-has="'dailyMaintenance3Standard:revise'"
          >升版</a>
          <a-divider type="vertical" />
          <a
            v-show="record.versionStatus == '2'"
            @click="handleTakeEffect(record)"
            v-has="'dailyMaintenance3Standard:loseEfficacy'"
          >失效</a>
        </span>
      </a-table>
      <a-tabs
        type="card"
        defaultActiveKey="1"
      >
        <a-tab-pane
          tab='保养明细'
          key="1"
        >
          <div
            class="table-operator"
            style="margin:-16px"
          >
            <daily-maintenance-standard-detail :maintenanceStandardId='maintenanceStandardId' />
          </div>
        </a-tab-pane>
        <!-- <a-tab-pane
          tab='计划用料'
          key="2"
        >
          <div
            class="table-operator"
            style="margin:-16px"
          >
            <maintenance-standard-planning-material :maintenanceStandardId='maintenanceStandardId' />
          </div>
        </a-tab-pane>
        <a-tab-pane
          tab='危险防控'
          key="3"
        >
          <div
            class="table-operator"
            style="margin:-16px"
          >
            <maintenance-standard-safety-requirement :maintenanceStandardId='maintenanceStandardId' />
          </div>
        </a-tab-pane>
        <a-tab-pane
          tab='作业指导书'
          key="4"
        >
          <div
            class="table-operator"
            style="margin:-16px"
          >
            <maintenance-standard-work-instruction :maintenanceStandardId='maintenanceStandardId' />
          </div>
        </a-tab-pane> -->
      </a-tabs>
    </div>
    <daily-maintenance-standard-modal
      ref='modalForm'
      @ok='modalFormOk'
    ></daily-maintenance-standard-modal>
    <audit-approval-modal
      ref='auditApprovalModal'
      @ok='modalFormOk'
    ></audit-approval-modal>
  </a-card>
</template>
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getAction, postAction, requestPut } from '@/api/manage'
import DailyMaintenanceStandardDetail from './modules/dailyMaintenanceStandard3/DailyMaintenanceStandardDetail'
import MaintenanceStandardPlanningMaterial from '@/views/eam/modules/dailyMaintenanceStandard/MaintenanceStandardPlanningMaterial'
import MaintenanceStandardSafetyRequirement from '@/views/eam/modules/dailyMaintenanceStandard/MaintenanceStandardSafetyRequirement'
import DailyMaintenanceStandardModal from './modules/dailyMaintenanceStandard3/DailyMaintenanceStandardModal'
import MaintenanceStandardWorkInstruction from '@/views/eam/modules/dailyMaintenanceStandard/MaintenanceStandardWorkInstruction'
import AuditApprovalModal from './modules/dailyMaintenanceStandard/AuditApprovalModal'
import '@/assets/less/TableExpand.less'
export default {
  name: 'DailyMaintenanceStandardList',
  mixins: [JeecgListMixin],
  components: {
    DailyMaintenanceStandardDetail,
    DailyMaintenanceStandardModal,
    MaintenanceStandardPlanningMaterial,
    MaintenanceStandardSafetyRequirement,
    MaintenanceStandardWorkInstruction,
    AuditApprovalModal
  },
  data() {
    return {
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          }
        },
        {
          title: '标准编码',
          align: 'center',
          dataIndex: 'num',
        },
        {
          title: '标准类型',
          align: 'center',
          dataIndex: 'maintenanceTypeName',
        },
        {
          title: '签审状态',
          align: 'center',
          dataIndex: 'approvalStatusName',
        },
        {
          title: '统一编码',
          align: 'center',
          dataIndex: 'equipmentNum',
        },
        {
          title: '设备名称',
          align: 'center',
          dataIndex: 'equipmentName',
        },
        {
          title: '设备型号',
          align: 'center',
          dataIndex: 'equipmentModel',
        },
        {
          title: '使用部门',
          align: 'center',
          dataIndex: 'useDepartName',
        },
        {
          title: '责任班组',
          align: 'center',
          dataIndex: 'teamName',
        },
        // {
        //   title: '特种设备',
        //   align: 'center',
        //   dataIndex: 'specificEquipment',
        // },
        {
          title: '审核意见',
          align: 'center',
          dataIndex: 'auditFeedback',
        },
        {
          title: '审批意见',
          align: 'center',
          dataIndex: 'approvalFeedback',
        },
        {
          title: '编制人',
          align: 'center',
          dataIndex: 'writePerson',
        },
        {
          title: '审核人',
          align: 'center',
          dataIndex: 'auditPerson',
        },
        {
          title: '审批人',
          align: 'center',
          dataIndex: 'approvalPerson',
        },
        {
          title: '失效人',
          align: 'center',
          dataIndex: 'loseEfficacyPerson',
        },
        {
          title: '编制日期',
          align: 'center',
          dataIndex: 'createTime',
          width: 150,
        },
        {
          title: '生效时间',
          align: 'center',
          dataIndex: 'takeEffectTime',
          width: 150,
        },
        {
          title: '失效时间',
          align: 'center',
          dataIndex: 'loseEfficacyTime',
          width: 150,
        },
        {
          title: '版本',
          align: 'center',
          dataIndex: 'version',
        },
        {
          title: '版本状态',
          align: 'center',
          dataIndex: 'versionStatusName',
        },
        // {
        //   title: '创建人',
        //   align: 'center',
        //   dataIndex: 'createBy',
        // },
        // {
        //   title: '更新人',
        //   align: 'center',
        //   dataIndex: 'updateBy',
        // },
        // {
        //   title: '更新日期',
        //   align: 'center',
        //   dataIndex: 'updateTime',
        // },
        {
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          fixed: 'right',
          scopedSlots: { customRender: 'action' },
          width: 200,
        }
      ],
      url: {
        list: '/eam/maintenanceStandard/getMaintenanceStandardList',
        delete: '/eam/maintenanceStandard/delete',
        deleteBatch: '/eam/maintenanceStandard/deleteBatch',
        versionTakeEffect: "/eam/maintenanceStandard/versionTakeEffect",
        importExcelUrl: "/eam/maintenanceStandard/importExcelOfTwoMaintenance",
      },
      /* åˆ†é¡µå‚æ•° */
      ipagination: {
        current: 1,
        pageSize: 20,
        pageSizeOptions: ['5', '10', '20', '50'],
        showTotal: (total, range) => {
          return range[0] + '-' + range[1] + ' å…±' + total + '条'
        },
        showQuickJumper: true,
        showSizeChanger: true,
        total: 0
      },
      maintenanceStandardId: '-1',
      queryParam: { type: 'daily', maintenanceType: '3' }
    }
  },
  computed: {
    importExcelUrl: function () {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
    }
  },
  watch: {
    selectionRows() {
      this.$bus.$emit('dailyMaintenanceStandardSelectionRows', this.selectionRows);
    },
  },
  methods: {
    clickThenSelect(record) {
      return {
        on: {
          click: () => {
            this.onSelectChange(record.id.split(','), [record])
          }
        }
      }
    },
    onClearSelected() {
      this.selectedRowKeys = []
      this.selectionRows = []
      this.maintenanceStandardId = '-1'
    },
    onSelectChange(selectedRowKeys, selectionRows) {
      if (selectedRowKeys.length == 1) {
        this.maintenanceStandardId = selectionRows[0]['id']
      } else {
        this.maintenanceStandardId = '-1'
      }
      this.selectedRowKeys = selectedRowKeys
      this.selectionRows = selectionRows
    },
    onChange(e) {
      this.queryParam.versionStatus = e.target.value;
      this.loadData();
    },
    loadData(arg) {
      if (!this.url.list) {
        this.$message.error('请设置url.list属性!')
        return
      }
      //加载数据 è‹¥ä¼ å…¥å‚æ•°1则加载第一页的内容
      if (arg === 1) {
        this.ipagination.current = 1
      }
      this.onClearSelected()
      var params = this.getQueryParams()//查询条件
      this.loading = true
      getAction(this.url.list, params).then((res) => {
        if (res.success) {
          this.dataSource = res.result.records
          this.ipagination.total = res.result.total
        }
        if (res.code === 510) {
          this.$message.warning(res.message)
        }
        this.loading = false
      })
    },
    handleEdit: function (record) {
      this.$refs.modalForm.edit(record)
      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;
    },
    //审核审批
    handleAuditApproval: function (record) {
      this.$refs.auditApprovalModal.showModals(record);
      this.$refs.auditApprovalModal.title = "审核";
    },
    //升版
    handleRevise: function (record) {
      this.$refs.modalForm.edit(record);
      this.$refs.modalForm.title = "保养标准版本升级";
      this.$refs.modalForm.disableSubmit = false;
      this.$refs.modalForm.isRevise = true;
    },
    //失效
    handleTakeEffect(record) {
      const that = this;
      that.confirmLoading = true;
      this.$confirm({
        title: '保养标准版本失效!',
        content: '提示:版本失效后将禁止使用,请谨慎操作!',
        okText: '确认',
        cancelText: '取消',
        onOk() {
          requestPut(that.url.versionTakeEffect, { id: record.id, num: record.num, versionStatus: '3' }).then((res) => {
            if (res.success) {
              that.$message.success("版本失效成功!")
              that.loadData(1)
            } else {
              that.$message.warning("版本失效失败!")
            }
          }).finally(() => {
            that.confirmLoading = false;
          })
        },
      })
    },
    searchReset() {
      this.maintenanceStandardId = '-1'
      this.queryParam = { type: 'daily', maintenanceType: '3' }
      this.loadData(1);
    },
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
.table-operator .ant-btn {
  margin: 10px 8px 8px 10px;
}
</style>
src/views/eam/DailyMaintenanceStandardList.vue
@@ -1,6 +1,6 @@
<template>
  <a-card
    title="周期性保养标准"
    title="二级保养标准"
    :bordered='false'
  >
    <div class='table-page-search-wrapper'>
@@ -113,6 +113,7 @@
        <a-button
          type="primary"
          icon="import"
          v-has="'dailyMaintenanceStandard:import'"
        >导入</a-button>
      </a-upload>
    </div>
@@ -468,7 +469,7 @@
        total: 0
      },
      maintenanceStandardId: '-1',
      queryParam: { type: 'daily' }
      queryParam: { type: 'daily', maintenanceType: '2' }
    }
  },
  computed: {
@@ -588,7 +589,7 @@
    searchReset() {
      this.maintenanceStandardId = '-1'
      this.queryParam = { type: 'daily' }
      this.queryParam = { type: 'daily', maintenanceType: '2' }
      this.loadData(1);
    },
  }
src/views/eam/modules/daily3MaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue
@@ -97,7 +97,7 @@
                >
                  <span
                    v-if="this.model != null"
                    class="hight"
                    class="hightColor"
                  >{{ this.model.teamName }}</span>
                  <span
                    v-else
@@ -107,9 +107,9 @@
              </a-col>
            </a-row>
            <a-row :gutter="24">
              <a-col :span="24">
              <a-col :span="17">
                <a-form-item
                  label="问题及处理措施描述"
                  label="问题/处理措施"
                  :labelCol="{span:3}"
                  :wrapperCol="{span:18}"
                  class="hightColor"
@@ -119,6 +119,21 @@
                    :disabled="this.model.status!='4'"
                    :placeholder="'请输入问题及处理措施描述'"
                    v-model="model.description"
                  />
                </a-form-item>
              </a-col>
              <a-col :span="7">
                <a-form-item
                  label="报工人"
                  :labelCol="{span:4}"
                  :wrapperCol="{span:17}"
                  class="hightColor"
                >
                  <a-input
                    :disabled="this.model.status!='4'"
                    allow-clear
                    placeholder="请输入报工人"
                    v-model="model.maintenanceUserId"
                  />
                </a-form-item>
              </a-col>
@@ -417,7 +432,7 @@
        },
        {
          title: '部位',
          title: '保养部位',
          align: 'center',
          dataIndex: 'location',
        },
@@ -430,12 +445,12 @@
        // },
        // class: "notshow"
        {
          title: '保养项目',
          title: '保养内容',
          align: 'center',
          dataIndex: 'maintenanceProjectNum',
        },
        {
          title: '保养标准',
          title: '验收标准',
          align: 'center',
          dataIndex: 'standard',
        },
@@ -594,13 +609,26 @@
    handleReport() {
      const that = this;
      that.confirmLoading = true;
      for (let i = 0; i < that.dataSource.length; i++) {
        let o = this.dataSource[i]
        if (o.maintenanceOrderDetailUda1 == null || o.maintenanceOrderDetailUda1 == '') {
          that.$message.warning("请填写第" + (i + 1) + "保养人!");
          that.confirmLoading = false;
          return
        }
      }
      if (that.model.maintenanceUserId == null || that.model.maintenanceUserId == "") {
        that.$message.warning("请填写报工人!");
        that.confirmLoading = false;
        return
      }
      this.$confirm({
        title: '保养工单报工',
        content: '提示:报工后保养完工,请谨慎操作!',
        okText: '确认',
        cancelText: '取消',
        onOk() {
          requestPut(that.url.report, { id: that.model.id, status: '5', description: that.model.description }).then((res) => {
          requestPut(that.url.report, { id: that.model.id, status: '5', description: that.model.description, dailyMaintenanceOrderDetails: that.dataSource, maintenanceUserId: that.model.maintenanceUserId }).then((res) => {
            if (res.success) {
              that.model.status = '5'
              that.$message.success(res.message)
src/views/eam/modules/daily3MaintenanceOrder/MaintenanceOrder3Modal.vue
@@ -425,17 +425,17 @@
          width: 50,
        },
        {
          title: '部位',
          title: '保养部位',
          align: 'center',
          dataIndex: 'location'
        },
        {
          title: '保养项目',
          title: '保养内容',
          align: 'center',
          dataIndex: 'maintenanceProjectName'
        },
        {
          title: '保养标准',
          title: '验收标准',
          align: 'center',
          dataIndex: 'standard'
        },
src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderExeDrawer.vue
@@ -19,6 +19,14 @@
                type="primary"
                v-has="'dailyInspectionOrder:SW'"
              >开工</a-button>
              <a-button
                :style="{marginRight: '8px'}"
                @click="handleNormalReport"
                :disabled="buttonDistable"
                type="primary"
                v-has="'dailyInspectionOrder:normalReport'"
              >结果全部正常</a-button>
              <a-button
                :style="{marginRight: '8px'}"
                @click="handleReport"
@@ -26,13 +34,6 @@
                type="primary"
                v-has="'dailyInspectionOrder:report'"
              >报工</a-button>
              <a-button
                :style="{marginRight: '8px'}"
                @click="handleNormalReport"
                :disabled="buttonDistable"
                type="primary"
                v-has="'dailyInspectionOrder:normalReport'"
              >结果正常并报工</a-button>
              <a-button
                :style="{marginRight: '8px'}"
                @click="handleReset"
@@ -156,6 +157,16 @@
                        alt=""
                        style="max-width:80px;font-size: 12px;font-style: italic;"
                      />
                      <!-- <j-dict-select-tag
                        v-if="col.dataIndex == 'inspectionProjectResult' "
                        allow-clear
                        @input="handleChange()"
                        :disabled="record.disabled"
                        :placeholder="'请选择点检结果'"
                        :triggerChange="true"
                        style="width: 100%"
                        dictCode="inspection_project_result"
                      /> -->
                      <a-select
                        v-if="col.dataIndex == 'inspectionProjectResult' "
                        :value="text"
@@ -163,7 +174,6 @@
                        style="width: 100%"
                        :disabled="record.disabled"
                      >
                        <!-- :options="record.inspectionCycles" -->
                        <a-select-option value="1">正常</a-select-option>
                        <a-select-option value="2">异常</a-select-option>
                        <a-select-option value="3">故障停机</a-select-option>
@@ -507,7 +517,7 @@
      this.loadData1(1)
    },
    loadData() {
      this.loadData1(1)
      // this.loadData1(1)
    },
    getBackground() {
      return "background-color:rgba(127, 127, 127,0.08)";
@@ -630,8 +640,20 @@
      })
    },
    //报工
    //所有结果正常
    handleNormalReport() {
      const that = this;
      for (let i = 0; i < that.dataSource.length; i++) {
        let o = this.dataSource[i]
        o.inspectionProjectResult = "1"
        o.abnormalDesc = ""
        o.treatmentMeasure = null
      }
    },
    //报工
    handleNormalReport1() {
      const that = this;
      that.confirmLoading = true;
      let formData = Object.assign(this.model);
@@ -757,11 +779,11 @@
          //   }
          // } else {
          target[column.dataIndex] = value;
          // if (value == "1") {
          //   target['judgmentResult'] = "pass";
          // } else {
          //   target['judgmentResult'] = "fail";
          // }
          if (value == 1) {
            target['abnormalDesc'] = null;
          }
          target['treatmentMeasure'] = null;
          // if (value == null || value == "") {
          //   target['judgmentResult'] = "";
          // }
src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue
@@ -107,9 +107,9 @@
              </a-col>
            </a-row>
            <a-row :gutter="24">
              <a-col :span="24">
              <a-col :span="17">
                <a-form-item
                  label="问题及处理措施描述"
                  label="问题/处理措施"
                  :labelCol="{span:3}"
                  :wrapperCol="{span:18}"
                  class="hightColor"
@@ -119,6 +119,21 @@
                    :disabled="this.model.status!='4'"
                    :placeholder="'请输入问题及处理措施描述'"
                    v-model="model.description"
                  />
                </a-form-item>
              </a-col>
              <a-col :span="7">
                <a-form-item
                  label="报工人"
                  :labelCol="{span:4}"
                  :wrapperCol="{span:17}"
                  class="hightColor"
                >
                  <a-input
                    :disabled="this.model.status!='4'"
                    allow-clear
                    placeholder="请输入报工人"
                    v-model="model.maintenanceUserId"
                  />
                </a-form-item>
              </a-col>
@@ -417,11 +432,11 @@
          }
        },
        {
          title: '部位',
          align: 'center',
          dataIndex: 'location',
        },
        // {
        //   title: '部位',
        //   align: 'center',
        //   dataIndex: 'location',
        // },
        // class: "notshow"
        // {
        //   title: '示意图',
@@ -431,15 +446,15 @@
        // },
        // class: "notshow"
        {
          title: '保养项目',
          title: '保养内容',
          align: 'center',
          dataIndex: 'maintenanceProjectNum',
        },
        {
          title: '保养标准',
          align: 'center',
          dataIndex: 'standard',
        },
        // {
        //   title: '保养标准',
        //   align: 'center',
        //   dataIndex: 'standard',
        // },
        // {
        //   title: '方法',
        //   align: 'center',
@@ -599,13 +614,31 @@
    handleReport() {
      const that = this;
      that.confirmLoading = true;
      for (let i = 0; i < that.dataSource.length; i++) {
        let o = this.dataSource[i]
        if (o.maintenanceOrderDetailUda2 == null || o.maintenanceOrderDetailUda2 == '') {
          that.$message.warning("请填写第" + (i + 1) + "执行情况!");
          that.confirmLoading = false;
          return
        }
        if (o.maintenanceOrderDetailUda1 == null || o.maintenanceOrderDetailUda1 == '') {
          that.$message.warning("请填写第" + (i + 1) + "保养人!");
          that.confirmLoading = false;
          return
        }
      }
      if (that.model.maintenanceUserId == null || that.model.maintenanceUserId == "") {
        that.$message.warning("请填写报工人!");
        that.confirmLoading = false;
        return
      }
      this.$confirm({
        title: '保养工单报工',
        content: '提示:报工后保养完工,请谨慎操作!',
        okText: '确认',
        cancelText: '取消',
        onOk() {
          requestPut(that.url.report, { id: that.model.id, status: '5', description: that.model.description }).then((res) => {
          requestPut(that.url.report, { id: that.model.id, status: '5', description: that.model.description, dailyMaintenanceOrderDetails: that.dataSource, maintenanceUserId: that.model.maintenanceUserId }).then((res) => {
            if (res.success) {
              that.model.status = '5'
              that.$message.success(res.message)
@@ -657,6 +690,19 @@
    handleOk() {
      const that = this
      this.loading = true;
      for (let i = 0; i < that.dataSource.length; i++) {
        let o = this.dataSource[i]
        if (o.maintenanceOrderDetailUda2 == null || o.maintenanceOrderDetailUda2 == '') {
          that.$message.warning("请填写第" + (i + 1) + "执行情况!");
          that.loading = false;
          return
        }
        if (o.maintenanceOrderDetailUda1 == null || o.maintenanceOrderDetailUda1 == '') {
          that.$message.warning("请填写第" + (i + 1) + "保养人!");
          that.loading = false;
          return
        }
      }
      this.form.validateFields((err, values) => {
        if (!err) {
          that.confirmLoading = true
src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue
@@ -226,21 +226,21 @@
          dataIndex: 'maintenanceRole'
        },
        {
          title: '部位',
          align: 'center',
          dataIndex: 'location'
        },
        // {
        //   title: '部位',
        //   align: 'center',
        //   dataIndex: 'location'
        // },
        {
          title: '保养项目',
          align: 'center',
          dataIndex: 'maintenanceProjectName'
        },
        {
          title: '保养标准',
          align: 'center',
          dataIndex: 'standard'
        },
        // {
        //   title: '保养标准',
        //   align: 'center',
        //   dataIndex: 'standard'
        // },
        {
          title: '执行情况',
          align: 'center',
src/views/eam/modules/dailyMaintenanceOrder/MaintenanceOrderModal.vue
@@ -424,21 +424,26 @@
          },
          width: 50,
        },
        // {
        //   title: '部位',
        //   align: 'center',
        //   dataIndex: 'location'
        // },
        {
          title: '部位',
          title: '保养角色',
          align: 'center',
          dataIndex: 'location'
          dataIndex: 'maintenanceRole'
        },
        {
          title: '保养项目',
          title: '保养内容',
          align: 'center',
          dataIndex: 'maintenanceProjectName'
        },
        {
          title: '保养标准',
          align: 'center',
          dataIndex: 'standard'
        },
        // {
        //   title: '保养标准',
        //   align: 'center',
        //   dataIndex: 'standard'
        // },
        // {
        //   title: '方法',
        //   align: 'center',
src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardDetail.vue
@@ -137,22 +137,27 @@
        //   scopedSlots: { customRender: 'photo' },
        // },
        {
          title: '保养项目',
          title: '维修保养角色',
          align: "center",
          dataIndex: 'maintenanceRoleName',
        },
        {
          title: '保养内容',
          align: "center",
          dataIndex: 'name',
        },
        {
          title: '保养标准',
          align: "center",
          dataIndex: 'standard',
        // {
        //   title: '保养标准',
        //   align: "center",
        //   dataIndex: 'standard',
        },
        {
          title: '部位',
          align: "center",
          dataIndex: 'location',
        },
        // },
        // {
        //   title: '部位',
        //   align: "center",
        //   dataIndex: 'location',
        // },
        // {
        //   title: '方法',
        //   align: "center",
@@ -184,11 +189,7 @@
        //   align: "center",
        //   dataIndex: 'maintenanceSpecialtyName',
        // },
        {
          title: '维修保养角色',
          align: "center",
          dataIndex: 'maintenanceRoleName',
        },
      ],
      url: {
src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue
@@ -158,7 +158,7 @@
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="12">
          <!-- <a-col :span="12">
            <a-form-item
              label="保养类型"
              :labelCol="labelCol"
@@ -173,7 +173,7 @@
                v-decorator="['maintenanceType', validatorRules.maintenanceType]"
              />
            </a-form-item>
          </a-col>
          </a-col> -->
          <!-- <a-col :span="12">
            <a-form-item
              label="派工方式"
@@ -204,8 +204,6 @@
              />
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col
            v-if="this.isRevise == true"
            :span="12"
@@ -305,7 +303,7 @@
            style="width: 100%"
            :disabled="false"
          /> -->
          <a-textarea
          <!--<a-textarea
            :value="text"
            v-if="col.dataIndex == 'maintenanceRequire'"
            :maxLength="500"
@@ -313,7 +311,7 @@
            placeholder="请输入安全要求"
            @change="(e)=>handleChange(e, record.key, col, index)"
          />
          <a-textarea
           <a-textarea
            :value="text"
            v-if="col.dataIndex == 'location'"
            :maxLength="500"
@@ -321,7 +319,7 @@
            placeholder="请输入保养位置"
            @change="(e)=>handleChange(e, record.key, col, index)"
            :disabled="true"
          />
          />
          <j-image-upload
            :value="text"
            v-if="col.dataIndex == 'photo'"
@@ -330,7 +328,7 @@
            placeholder="请上传图片"
            @change="(e)=>handleChange(e, record.key, col, index)"
          >
          </j-image-upload>
          </j-image-upload>-->
          <j-dict-select-tag
            v-if="col.dataIndex == 'maintenanceRole'"
            :value="text"
@@ -338,8 +336,8 @@
            :triggerChange="true"
            dictCode="maintenance_role"
            placeholder="请选择保养角色"
            style="width: 100%"
            @change="(e)=>handleChange(e, record.key, col, index)"
            style="width: 100%"
          />
        </div>
      </template>
@@ -439,17 +437,30 @@
        //   align: 'center',
        //   dataIndex: 'id'
        // },
        // {
        //   title: '保养部位',
        //   align: 'center',
        //   dataIndex: 'location',
        //   // scopedSlots: { customRender: 'location' },
        //   // width: 150,
        // },
        {
          title: '保养项目',
          title: '保养角色',
          align: 'center',
          dataIndex: 'maintenanceRole',
          scopedSlots: { customRender: 'maintenanceRole' },
        },
        {
          title: '保养内容',
          align: 'center',
          dataIndex: 'name'
        },
        {
          title: '保养标准',
          align: 'center',
          dataIndex: 'standard'
        },
        // {
        //   title: '验收标准',
        //   align: 'center',
        //   dataIndex: 'standard'
        // },
        // {
        //   title: '方法',
        //   align: 'center',
@@ -484,13 +495,7 @@
        //   scopedSlots: { customRender: 'photo' },
        //   width: 150,
        // },
        {
          title: '保养部位',
          align: 'center',
          dataIndex: 'location',
          // scopedSlots: { customRender: 'location' },
          // width: 150,
        },
        // {
        //   title: '周期',
        //   align: 'center',
@@ -498,13 +503,7 @@
        //   scopedSlots: { customRender: 'maintenanceCycleId' },
        //   width: 150,
        // },
        {
          title: '保养角色',
          align: 'center',
          dataIndex: 'maintenanceRole',
          scopedSlots: { customRender: 'maintenanceRole' },
          width: 150,
        },
        {
          title: '操作',
          align: 'center',
@@ -757,6 +756,7 @@
          }
          formData.maintenanceStandardDetaillist = that.dataSource;
          formData.type = 'daily';
          formData.maintenanceType = '2';
          let obj;
          if (!this.model.id) {
            formData.versionStatus = '1'
src/views/eam/modules/dailyMaintenanceStandard3/DailyMaintenanceStandardDetail.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,289 @@
<template>
  <a-card
    :bordered="false"
    :class="'cust-erp-sub-tab'"
  >
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div class="table-page-search-wrapper">
      <a-form
        layout="inline"
        @keyup.enter.native="searchQuery"
      >
        <a-row :gutter="24">
        </a-row>
      </a-form>
    </div>
    <div>
      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :scroll="{x:true}"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        @change="handleTableChange"
      >
        <!-- <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>
        </span> -->
        <template
          slot="photo"
          slot-scope="text,record"
        >
          <span
            v-if="!text"
            style="font-size: 12px;font-style: italic;"
          >无图片</span>
          <img
            v-else
            :src="getImgView(text)"
            :preview="record.id"
            height="25px"
            alt=""
            style="max-width:80px;font-size: 12px;font-style: italic;"
          />
        </template>
      </a-table>
    </div>
    <pdf-view ref="pdfview"></pdf-view>
  </a-card>
</template>
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getAction } from '@/api/manage'
import Tooltip from 'ant-design-vue/es/tooltip'
import { preview } from 'vue-photo-preview'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import Vue from 'vue'
import PdfView from '@views/common/PdfView'
import { getFileAccessHttpUrl } from '@/api/manage';
export default {
  name: "MaintenanceStandardModal",
  components: {
    Tooltip,
    PdfView,
    preview,
  },
  mixins: [JeecgListMixin],
  props: {
    maintenanceStandardId: {
      type: String,
      default: '-1',
      required: false
    }
  },
  watch: {
    maintenanceStandardId: {
      immediate: true,
      handler(val) {
        if (!this.maintenanceStandardId) {
          this.clearList()
        } else {
          this.queryParam['maintenanceStandardId'] = val;
          this.queryParam['delFlag'] = 0;
          this.loadData(1);
        }
      }
    }
  },
  data() {
    return {
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 100,
          align: "center",
          customRender: function (t, r, index) {
            return parseInt(index) + 1;
          }
        },
        // {
        //   title: '示意图',
        //   align: "center",
        //   dataIndex: 'photo',
        //   scopedSlots: { customRender: 'photo' },
        // },
        {
          title: '保养项目',
          align: "center",
          dataIndex: 'name',
        },
        {
          title: '保养标准',
          align: "center",
          dataIndex: 'standard',
        },
        {
          title: '部位',
          align: "center",
          dataIndex: 'location',
        },
        // {
        //   title: '方法',
        //   align: "center",
        //   dataIndex: 'maintenanceMethodName',
        // },
        // {
        //   title: '工具',
        //   align: "center",
        //   dataIndex: 'maintenanceTool',
        // },
        // {
        //   title: '安全要求',
        //   align: "center",
        //   dataIndex: 'maintenanceRequire',
        // },
        // {
        //   title: '工时定额',
        //   align: "center",
        //   dataIndex: 'workingHourQuota',
        // },
        {
          title: '保养周期',
          align: "center",
          dataIndex: 'maintenanceCycleName',
        },
        // {
        //   title: '维保专业',
        //   align: "center",
        //   dataIndex: 'maintenanceSpecialtyName',
        // },
        // {
        //   title: '维修保养角色',
        //   align: "center",
        //   dataIndex: 'maintenanceRoleName',
        // },
      ],
      url: {
        list: "/eam/maintenanceStandardDetail/getMaintenanceStandardList",//数据来源mom_eam_daily_inspection_standard_detail
      },
    }
  },
  created() {
  },
  computed: {
  },
  methods: {
    clearList() {
      this.dataSource = []
      this.selectedRowKeys = []
      this.ipagination.current = 1
    },
    loadData(arg) {
      if (!this.url.list) {
        this.$message.error("请设置url.list属性!")
        return
      }
      //加载数据 è‹¥ä¼ å…¥å‚æ•°1则加载第一页的内容
      if (arg === 1) {
        this.ipagination.current = 1;
      }
      var params = this.getQueryParams();//查询条件
      this.loading = true;
      getAction(this.url.list, params).then((res) => {
        if (res.success) {
          this.dataSource = res.result.records || res.result;
          // for (let i = 0; i < this.dataSource.length; i++) {
          //   let r = this.dataSource[i].upload;
          //   r.src = this.getSrc(this.dataSource[i].upload);
          // }
          if (res.result.total) {
            this.ipagination.total = res.result.total;
          } else {
            this.ipagination.total = 0;
          }
          //update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
        } else {
          this.$message.warning(res.message)
        }
      }).finally(() => {
        this.loading = false
      })
    },
    getSrc(record) {
      if (!record.path) {
        return '';
      }
      //本地:local\Minio:minio\阿里云:alioss
      if (record.uploadType == 'local') {
        let ssoLoginFlag = Vue.ls.get("ssoLoginFlag");
        let deployMode = Vue.ls.get("deployMode");
        if (ssoLoginFlag && deployMode == "container") {
          var baseProject = Vue.ls.get("baseProject");
          console.log("baseProject==>" + baseProject)
          var hostname = window.location.protocol + "//" + window.location.host;
          var url = hostname + '/' + baseProject + '/sys/common/static';
          return getFileAccessHttpUrl(record.path + record.encodeName, url, window._CONFIG['hyperTextTransfer'])
        } else {
          //根据发布状态修改https æˆ– http
          return getFileAccessHttpUrl(record.path + record.encodeName, this.url.urlDownload, window._CONFIG['hyperTextTransfer'])
        }
      } else if (record.uploadType == 'alioss') {
        const OSS = require('ali-oss')
        const client = new OSS({
          // region以杭州为例(oss-cn-hangzhou),其他region按实际情况填写。
          region: window._CONFIG['region'],
          // é˜¿é‡Œäº‘主账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM账号进行API访问或日常运维,请登录RAM控制台创建RAM账号。
          accessKeyId: window._CONFIG['accessKeyId'],
          accessKeySecret: window._CONFIG['accessKeySecret'],
          bucket: window._CONFIG['bucket'],
        })
        // object-key表示从OSS下载文件时需要指定包含文件后缀在内的完整路径,例如abc/efg/123.jpg。
        return client.signatureUrl(record.path)
      }
    },
    view(record) {
      this.$refs.pdfview.showPdf(record.src);
    },
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
src/views/eam/modules/dailyMaintenanceStandard3/DailyMaintenanceStandardModal.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,950 @@
<template>
  <a-modal
    :title="title"
    :width="1500"
    :visible="visible"
    :maskClosable="false"
    @ok="handleOk"
    cancelText="关闭"
    @cancel="handleCancel"
    :confirmLoading="confirmLoading"
  >
    <a-spin :spinning="confirmLoading">
      <a-form :form="form">
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item
              label="标准编码"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input
                allowClear
                :disabled="disableSubmit"
                :placeholder="disableSubmit?'':'请输入标准编码'"
                v-decorator="[ 'num', validatorRules.num]"
              />
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item
              label="使用部门"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <!-- <a-input-search
                :disabled="disableSubmit"
                placeholder="请选择使用部门"
                enter-button
                @search="onDepartList()"
                :read-only="true"
                v-decorator="['useDepartName', validatorRules.useDepartName]"
              />
              <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择部门"
                tree-default-expand-all
                v-decorator="['departId', validatorRules.useId ]"
              />-->
              <j-dict-select-tag
                allow-clear
                :disabled="disableSubmit"
                :placeholder="disableSubmit?'':'请选择使用部门'"
                :triggerChange="true"
                dictCode="sys_depart,depart_name,id,del_flag!='1'"
                v-decorator="['departId', {}]"
              />
            </a-form-item>
          </a-col>
          <!-- <a-col :span="12">
            <a-form-item
              label="设备名称"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <j-dict-select-tag
                allow-clear
                :disabled="disableSubmit"
                :placeholder="disableSubmit?'':'请选择名称'"
                :triggerChange="true"
                dictCode="mom_eam_equipment,name,id,status!='0' and del_flag!='1'"
                v-decorator="['equipmentId', validatorRules.equipmentId]"
                @change="(e)=>handle2Change(e)"
              />
            </a-form-item>
          </a-col> -->
        </a-row>
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item
              label="设备名称"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input-search
                :disabled="disableSubmit"
                placeholder="请选择设备"
                enter-button
                @search="onEquipmentList()"
                :read-only="true"
                v-decorator="['equipmentName', validatorRules.equipmentName]"
              />
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item
              label="责任班组"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input
                allow-clear
                :disabled="true"
                :placeholder="disableSubmit?'':'请输入责任班组'"
                v-decorator="['teamName', {} ]"
              />
            </a-form-item>
          </a-col>
        </a-row>
        <a-row
          hidden
          :gutter="24"
        >
          <a-col :span="12">
            <a-form-item
              label="设备Id"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input
                allow-clear
                :disabled="true"
                :placeholder="disableSubmit?'':'请输入统一编码/名称/型号'"
                v-decorator="['equipmentId', validatorRules.equipmentId ]"
              />
            </a-form-item>
          </a-col>
          <!-- <a-col :span="12">
            <a-form-item
              label="使用部门Id"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input
                allow-clear
                :disabled="true"
                :placeholder="disableSubmit?'':'请输入使用部门id'"
                v-decorator="['departId', validatorRules.useId ]"
              />
            </a-form-item>
          </a-col> -->
          <a-col :span="12">
            <a-form-item
              label="班组Id"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input
                allow-clear
                :disabled="true"
                :placeholder="disableSubmit?'':'请输入班组id'"
                v-decorator="['teamId', validatorRules.teamId ]"
              />
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <!-- <a-col :span="12">
            <a-form-item
              label="保养类型"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <j-dict-select-tag
                allow-clear
                :disabled="disableSubmit"
                :placeholder="disableSubmit?'':'请选择保养类型'"
                :triggerChange="true"
                dictCode="maintenance_type"
                v-decorator="['maintenanceType', validatorRules.maintenanceType]"
              />
            </a-form-item>
          </a-col> -->
          <!-- <a-col :span="12">
            <a-form-item
              label="派工方式"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <j-dict-select-tag
                allow-clear
                :disabled="disableSubmit"
                :placeholder="disableSubmit?'':'请选择派工方式'"
                :triggerChange="true"
                dictCode="assign_mode"
                v-decorator="['assignMode', validatorRules.assignMode]"
              />
            </a-form-item>
          </a-col> -->
          <a-col :span="12">
            <a-form-item
              label="版本"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input
                allowClear
                :disabled="true"
                :placeholder="disableSubmit?'':'请输入版本号'"
                v-decorator="[ 'version', validatorRules.version]"
              />
            </a-form-item>
          </a-col>
          <a-col
            v-if="this.isRevise == true"
            :span="12"
          >
            <a-form-item
              label="历史版本"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input
                allowClear
                :disabled="true"
                :placeholder="disableSubmit?'':'请输入历史版本号'"
                v-decorator="[ 'historyVersion', validatorRules.historyVersion]"
              />
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="24">
            <a-form-item
              label="备注"
              :labelCol="{span:3}"
              :wrapperCol="{span:21}"
            >
              <a-textarea
                allowClear
                :disabled="disableSubmit"
                :placeholder="disableSubmit?'':'请输入备注'"
                v-decorator="[ 'remark', validatorRules.remark]"
              />
            </a-form-item>
          </a-col>
        </a-row>
        <!-- <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item
              label="使用部门"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <j-dict-select-tag
                allow-clear
                :disabled="disableSubmit"
                :placeholder="disableSubmit?'':'请使用部门'"
                :triggerChange="true"
                dictCode="sys_depart,depart_name,id,version = '7' and del_flag!='1'"
                v-decorator="['departId', validatorRules.departId]"
                @change="(e)=>handle2Change(e)"
              />
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item
              label="责任班组"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input
                allowClear
                :disabled="disableSubmit"
                :placeholder="disableSubmit?'':'请输入标准编码'"
                v-decorator="[ 'teamId', validatorRules.teamId]"
              />
            </a-form-item>
          </a-col>
        </a-row> -->
      </a-form>
    </a-spin>
    <a-button
      type="primary"
      :style="{ marginRight: '8px',marginBottom:'8px' }"
      :loading="confirmLoading"
      @click="selectMaintenanceProjects()"
    >保养项目</a-button>
    <a-table
      ref="table"
      bordered
      size="middle"
      rowKey='id'
      :columns="columns"
      :dataSource="dataSource"
      :pagination="false"
    >
      <template
        v-for="col in columns"
        :slot="col.dataIndex"
        slot-scope='text, record, index'
      >
        <div :key="col.dataIndex">
          <!-- <a-select
            v-if="col.dataIndex == 'maintenanceCycleId'"
            :value="text"
            :options="record.maintenanceCycles"
            @change="(e) => handleChange(e, record.key, col, index)"
            style="width: 100%"
            :disabled="false"
          /> -->
          <a-textarea
            :value="text"
            v-if="col.dataIndex == 'maintenanceRequire'"
            :maxLength="500"
            auto-size
            placeholder="请输入安全要求"
            @change="(e)=>handleChange(e, record.key, col, index)"
          />
          <a-textarea
            :value="text"
            v-if="col.dataIndex == 'location'"
            :maxLength="500"
            auto-size
            placeholder="请输入保养位置"
            @change="(e)=>handleChange(e, record.key, col, index)"
            :disabled="true"
          />
          <j-image-upload
            :value="text"
            v-if="col.dataIndex == 'photo'"
            :isMultiple="false"
            auto-size
            placeholder="请上传图片"
            @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>
      <span
        slot="action"
        slot-scope="text, record, index"
      >
        <a-popconfirm
          title="确定删除吗?"
          @confirm="() => handleDelete(text,record, index)"
        >
          <a>删除</a>
        </a-popconfirm>
      </span>
    </a-table>
    <template slot="footer">
      <a-button
        :style="{marginRight: '8px'}"
        @click="handleCancel()"
      >
        å…³é—­
      </a-button>
      <a-button
        @click="handleOk()"
        type="primary"
        :loading="confirmLoading"
      >确定</a-button>
    </template>
    <pdf-view ref="pdfview"></pdf-view>
    <upload-model
      ref="modalForm"
      @ok="modalFormOk"
    ></upload-model>
    <equipment-list
      ref="EquipmentList"
      @sendEquipmentRecord='sendEquipmentRecord'
    ></equipment-list>
    <depart-list
      ref="DepartList"
      @sendDepartRecord='sendDepartRecord'
    ></depart-list>
    <j-select-maintenance-standard-modal ref="maintenanceStandardModalForm"></j-select-maintenance-standard-modal>
  </a-modal>
</template>
<script>
import { getAction, postAction, requestPut, deleteAction } from '@/api/manage'
import pick from 'lodash.pick'
import JMultiSelectTag from '@/components/dict/JMultiSelectTag'
import { duplicateCheck } from '@/api/api'
import Tooltip from 'ant-design-vue/es/tooltip'
import JSelectMaintenanceStandardModal from './JSelectMaintenanceStandardModal'
// import UploadModel from './UploadModel'
import { preview } from 'vue-photo-preview'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import Vue from 'vue'
import PdfView from '@views/common/PdfView'
import { getFileAccessHttpUrl } from '@/api/manage';
import EquipmentList from '.././dailyInspectionStandard/EquipmentList'
import DepartList from '.././dailyInspectionStandard/DepartList'
export default {
  name: "MaintenanceStandardModal",
  components: {
    JMultiSelectTag,
    Tooltip,
    JSelectMaintenanceStandardModal,
    // UploadModel,
    PdfView,
    preview,
    EquipmentList,
    DepartList
  },
  data() {
    return {
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          },
          width: 50,
        },
        // {
        //   title: 'id',
        //   align: 'center',
        //   dataIndex: 'id'
        // },
        {
          title: '保养部位',
          align: 'center',
          dataIndex: 'location',
          // scopedSlots: { customRender: 'location' },
          // width: 150,
        },
        {
          title: '保养内容',
          align: 'center',
          dataIndex: 'name'
        },
        {
          title: '验收标准',
          align: 'center',
          dataIndex: 'standard'
        },
        // {
        //   title: '方法',
        //   align: 'center',
        //   dataIndex: 'maintenanceMethodName'
        // },
        // {
        //   title: '工具',
        //   align: 'center',
        //   dataIndex: 'maintenanceTool'
        // },
        // {
        //   title: '维保专业',
        //   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: 'maintenanceCycleId',
        //   scopedSlots: { customRender: 'maintenanceCycleId' },
        //   width: 150,
        // },
        // {
        //   title: '保养角色',
        //   align: 'center',
        //   dataIndex: 'maintenanceRole',
        //   scopedSlots: { customRender: 'maintenanceRole' },
        //   width: 150,
        // },
        {
          title: '操作',
          align: 'center',
          dataIndex: 'action',
          scopedSlots: {
            customRender: 'action'
          },
        }
      ],
      title: "操作",
      visible: false,
      visible4Confirm: false,
      disableSubmit: false,
      codeDisable: true,
      isRevise: false,
      model: {},
      upload: {},
      maintenanceCycles: {},
      treeData: [],
      labelCol: {
        xs: { span: 24 },
        sm: { span: 6 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 18 },
      },
      confirmLoading: false,
      form: this.$form.createForm(this),
      validatorRules: {
        num: {
          rules: [
            { required: true, message: '请输入编码!' },
          ]
        },
        teamName: {
          rules: [
            { required: true, message: '请选择责任班组!' },
          ]
        },
        useDepartName: {
          rules: [
            { required: true, message: '请选择使用部门!' },
          ]
        },
        equipmentName: {
          rules: [
            { required: true, message: '请选择设备!' },
          ]
        },
        maintenanceType: {
          rules: [
            { required: true, message: '请选择保养类型!' },
          ]
        },
        version: {
          rules: [
            { required: true, message: '请输入版本!' },
          ]
        },
        historyVersion: {
          rules: [
            { required: true, message: '请输入历史版本!' },
          ]
        },
      },
      url: {
        list: "/eam/maintenanceStandardDetail/getMaintenanceStandardDetailListByIds",
        add: "/eam/maintenanceStandard/add",
        edit: "/eam/maintenanceStandard/edit",
        // addDetail: "/eam/maintenanceStandardDetail/add",
        getMaintenanceCycle: "/eam/maintenanceStandardDetail/getPeriodicMaintenanceCycle",
        realDelete: "/eam/maintenanceStandardDetail/realDelete",
        revise: '/eam/maintenanceStandard/revise',
        getReviseVersion: "/eam/maintenanceStandard/getReviseVersion",
        loadOptions: '/sys/sysDepart/loadDepartTreeOptions',
        getNum: '/eam/sysIdentity/getNumNew'
      },
      dataSource: [],
      departId: '',
    }
  },
  mounted() {
    this.$bus.$on('selectionRows', (data) => {
      for (let i = 0; i < data.length; i++) {
        let id = this.getUuiD(15);
        this.dataSource.push({
          id: id,
          maintenanceProjectId: data[i].id,
          name: data[i].name,
          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,
          // upload: this.upload,
          // maintenanceCycles: this.maintenanceCycles,
        })
        // let formData = {};
        // this.confirmLoading = true;
        // formData.maintenanceStandardDetailList = this.dataSource
        // postAction(this.url.addDetail, formData).then((res) => {
        //   if (res.success) {
        //     // this.$message.success(res.message);
        //     // this.$emit('ok');
        //   } else {
        //     // that.$message.warning(res.message);
        //   }
        // }).finally(() => {
        //   this.confirmLoading = false;
        // })
      }
    })
  },
  // created() {
  //   var upload = {};
  //   upload.path = null;
  //   upload.format = 'jpg';
  //   this.upload = upload;
  // },
  methods: {
    //选择保养项目
    selectMaintenanceProjects: function () {
      let ids = [];
      for (let i = 0; i < this.dataSource.length; i++) {
        ids.push(this.dataSource[i].maintenanceProjectId);
      }
      this.$refs.maintenanceStandardModalForm.showModals(ids);
      this.$refs.maintenanceStandardModalForm.title = '选择保养项目';
      this.$refs.maintenanceStandardModalForm.disableSubmit = false;
    },
    add() {
      this.edit({ maintenanceStandardDetaillist: [] })
      this.getSeq()
    },
    edit(record) {
      let that = this;
      // this.initOptions();
      // this.getMaintenanceCycle()
      this.dataSource = [];
      this.form.resetFields();
      this.model = Object.assign({}, record);
      this.visible = true;
      if (record.maintenanceStandardDetaillist != undefined) {
        const temp = [...record.maintenanceStandardDetaillist];
        that.dataSource = temp;
      }
      that.$nextTick(() => {
        that.form.setFieldsValue(pick(that.model, 'num', 'departId', 'teamId', 'equipmentId', 'equipmentName', 'useDepartName', 'useId', 'maintenanceType', 'teamName', 'version', 'remark'));
      });
      if (record.id) {
        // this.maintenanceCycles = []
        // this.getMaintenanceCycle(this.model.equipmentId)
        this.codeDisable = true;
        that.$nextTick(() => {
          if (that.isRevise) {
            requestPut(that.url.getReviseVersion, record).then((res) => {
              if (res.success) {
                that.form.setFieldsValue({ version: res.result, historyVersion: record.version })
              }
            })
          }
        }, 200);
      } else {
        this.codeDisable = false;
        that.$nextTick(() => {
          that.form.setFieldsValue({ "version": "1.0", })
        });
      }
    },
    initOptions() {
      getAction(this.url.loadOptions).then(res => {
        if (res.success) {
          this.treeData = res.result
        } else {
          this.$message.warning(res.message)
        }
      })
    },
    getSeq() {
      getAction(this.url.getNum, { type: 'DailyMaintenanceStandard', length: 4 }).then(res => {
        if (res.success) {
          this.form.setFieldsValue({ "num": res.result })
        }
      })
    },
    onEquipmentList() {
      let data = this.form.getFieldsValue(['departId']);
      // if (data.departId == null || data.departId == "") {
      //   this.$message.warning("请先选择使用部门!");
      //   return
      // }
      this.$refs.EquipmentList.list(data.departId);
      this.$refs.EquipmentList.title = "选择设备信息";
    },
    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() {
      this.$refs.DepartList.list();
      this.$refs.DepartList.title = "选择使用部门";
    },
    sendDepartRecord(data) {
      this.dataSource = [];
      let record = data.record;
      this.form.setFieldsValue({ useId: record.id, useDepartName: record.departName, departId: record.id });
    },
    close() {
      this.$emit('close');
      this.visible = false;
    },
    handleCancel() {
      this.realDelete()
      this.close();
    },
    handleOk() {
      const that = this;
      this.form.validateFields((err, values) => {
        if (!err) {
          that.confirmLoading = true;
          let formData = Object.assign(this.model, values);
          if (that.dataSource.length === 0) {
            that.$message.warning("请选择保养项目!");
            that.confirmLoading = false;
            return
          }
          formData.maintenanceStandardDetaillist = that.dataSource;
          formData.type = 'daily';
          formData.maintenanceType = '3';
          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 });
            }
          }
          obj.then((res) => {
            if (res.success) {
              that.$message.success(res.message);
              that.$emit('ok');
            } else {
              that.$message.warning(res.message);
            }
          }).finally(() => {
            that.confirmLoading = false;
            that.close();
          })
        }
      })
    },
    handleDelete(text, record, index) {
      this.dataSource.splice(index, 1);
    },
    realDelete() {
      var that = this
      deleteAction(that.url.realDelete).then(res => {
        if (res.success) {
          //重新计算分页问题
          // that.reCalculatePage(1)
          // that.$message.success(res.message)
          // that.loadData()
        } else {
          // that.$message.warning(res.message)
        }
      })
    },
    getMaintenanceCycle(equipmentId) {
      getAction(this.url.getMaintenanceCycle, { equipmentId: equipmentId }).then((res) => {
        if (res.success) {
          this.maintenanceCycles = res.result
        }
      })
    },
    handle2Change(val) {
      this.dataSource = [];
    },
    handleChange(value, key, column, index) {
      let that = this;
      const temp = [...that.dataSource];
      const target = temp.filter(item => key === item.key)[index];
      if (target) {
        if (column.dataIndex == 'maintenanceCycleId') {
          target[column.dataIndex] = value;
        }
        if (column.dataIndex == 'maintenanceRequire') {
          target[column.dataIndex] = value.target.value;
        }
        if ('photo' == column.dataIndex) {
          target['photo'] = value;
        }
        if (column.dataIndex == 'location') {
          target[column.dataIndex] = value.target.value;
        }
        if (column.dataIndex == 'maintenanceRole') {
          target[column.dataIndex] = value;
        }
        //显示带过来的数据
        that.dataSource = temp;
      }
    },
    handleUpload: function (record) {
      this.$refs.modalForm.edit(record);
      this.$refs.modalForm.title = "文件上传";
      this.$refs.modalForm.disableSubmit = false;
    },
    modalFormOk() {
      let ids = [];
      for (let i = 0; i < this.dataSource.length; i++) {
        ids.push(this.dataSource[i].id);
      }
      postAction(this.url.list, { ids: ids }).then(res => {
        if (res.success) {
          this.dataSource = res.result.records || res.result
          for (let i = 0; i < this.dataSource.length; i++) {
            let r = this.dataSource[i].upload;
            r.src = this.getSrc(this.dataSource[i].upload);
          }
        } else {
          this.$message.warning(res.message)
        }
      })
    },
    getSrc(record) {
      if (!record.path) {
        return '';
      }
      //本地:local\Minio:minio\阿里云:alioss
      if (record.uploadType == 'local') {
        let ssoLoginFlag = Vue.ls.get("ssoLoginFlag");
        let deployMode = Vue.ls.get("deployMode");
        if (ssoLoginFlag && deployMode == "container") {
          var baseProject = Vue.ls.get("baseProject");
          console.log("baseProject==>" + baseProject)
          var hostname = window.location.protocol + "//" + window.location.host;
          var url = hostname + '/' + baseProject + '/sys/common/static';
          return getFileAccessHttpUrl(record.path + record.encodeName, url, window._CONFIG['hyperTextTransfer'])
        } else {
          //根据发布状态修改https æˆ– http
          return getFileAccessHttpUrl(record.path + record.encodeName, this.url.urlDownload, window._CONFIG['hyperTextTransfer'])
        }
      } else if (record.uploadType == 'alioss') {
        const OSS = require('ali-oss')
        const client = new OSS({
          // region以杭州为例(oss-cn-hangzhou),其他region按实际情况填写。
          region: window._CONFIG['region'],
          // é˜¿é‡Œäº‘主账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM账号进行API访问或日常运维,请登录RAM控制台创建RAM账号。
          accessKeyId: window._CONFIG['accessKeyId'],
          accessKeySecret: window._CONFIG['accessKeySecret'],
          bucket: window._CONFIG['bucket'],
        })
        // object-key表示从OSS下载文件时需要指定包含文件后缀在内的完整路径,例如abc/efg/123.jpg。
        return client.signatureUrl(record.path)
      }
    },
    view(record) {
      this.$refs.pdfview.showPdf(record.src);
    },
    getUuiD(randomLength) {
      return Number(
        Math.random()
          .toString()
          .substr(2, randomLength) + Date.now()
      ).toString(36)
    },
  },
}
</script>
<style lang="less" scoped>
/deep/ .frozenRowClass {
  color: #c9c9c9;
}
.fontweight {
  font-weight: bold;
}
.ant-btn {
  padding: 0 10px;
  margin-left: 3px;
}
.ant-form-item-control {
  line-height: 0px;
}
/** ä¸»è¡¨å•行间距 */
.ant-form .ant-form-item {
  margin-bottom: 10px;
}
/** Tab页面行间距 */
.ant-tabs-content .ant-form-item {
  margin-bottom: 0px;
}
</style>
src/views/eam/modules/dailyMaintenanceStandard3/JSelectMaintenanceStandardModal.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,282 @@
<template>
  <!--支持全屏缩放-->
  <a-modal
    :visible='visible'
    :title='title'
    switchFullscreen
    @ok='handleSubmit'
    @cancel='close'
    style='top:50px'
    cancelText='关闭'
    :width='1500'
  >
    <a-card :bordered='false'>
      <div class='table-page-search-wrapper'>
        <a-form
          layout='inline'
          @keyup.enter.native='searchQuery'
        >
          <a-row :gutter='24'>
            <a-col
              :md='8'
              :sm='6'
            >
              <a-form-item label='保养项目名称'>
                <j-input
                  placeholder='请输入保养项目名称'
                  v-model='queryParam.name'
                />
              </a-form-item>
            </a-col>
            <a-col :md='3'>
              <span
                style='float: left;overflow: hidden;'
                class='table-page-search-submitButtons'
              >
                <a-button
                  type='primary'
                  @click='searchQuery'
                  icon='search'
                >查询</a-button>
                <a-button
                  @click='searchReset'
                  icon='reload'
                  style='margin-left: 10px'
                >重置</a-button>
              </span>
            </a-col>
          </a-row>
        </a-form>
      </div>
      <a-table
        ref='table'
        :scroll='scrollTrigger'
        size='middle'
        rowKey='id'
        bordered
        :columns='columns'
        :dataSource='dataSource'
        :pagination='ipagination'
        :rowSelection='rowSelection'
        :loading='loading'
        @change='handleTableChange'
      >
      </a-table>
    </a-card>
  </a-modal>
</template>
<script>
import { filterObj } from '@/utils/util'
import { getAction } from '@/api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
export default {
  name: 'JSelectMaintenanceStandardModal',
  mixins: [JeecgListMixin],
  components: {},
  props: {},
  data() {
    return {
      queryParam: {},
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 50,
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          }
        },
        {
          title: '保养项目',
          align: 'center',
          dataIndex: 'name'
        },
        {
          title: '保养标准',
          align: 'center',
          dataIndex: 'standard'
        },
        // {
        //   title: '方法',
        //   align: 'center',
        //   dataIndex: 'maintenanceMethod_dictText'
        // },
        // {
        //   title: '工具',
        //   align: 'center',
        //   dataIndex: 'maintenanceTool'
        // },
        // {
        //   title: '维保专业',
        //   align: 'center',
        //   dataIndex: 'maintenanceSpecialtyId_dictText'
        // },
        {
          title: '保养部位',
          align: 'center',
          dataIndex: 'location'
        },
        // {
        //   title: '安全要求',
        //   align: 'center',
        //   dataIndex: 'maintenanceRequire'
        // },
        // {
        //   title: '工时定额',
        //   align: 'center',
        //   dataIndex: 'workingHourQuota'
        // },
      ],
      selectedRowKeys: [],
      oldSelectRows: [],
      scrollTrigger: {},
      dataSource: [],
      selectionRows: [],
      title: '根据查询结果选择保养项目',
      ipagination: {
        current: 1,
        pageSize: 10,
        pageSizeOptions: ['5', '10', '30', '50', '100'],
        showTotal: (total, range) => {
          return range[0] + '-' + range[1] + ' å…±' + total + '条'
        },
        showQuickJumper: true,
        showSizeChanger: true,
        total: 0
      },
      isorter: {
        column: 'num',
        order: 'desc'
      },
      visible: false,
      loading: false,
      url: {
        list: '/eam/maintenanceProject/list'
      }
    }
  },
  computed: {
    rowSelection() {
      return {
        type: 'checkbox',
        onChange: (selectedRowKeys, selectedRows) => {
          this.selectedRowKeys = selectedRowKeys
          this.onSelectChange(selectedRows)
        },
        getCheckboxProps: record => ({
          props: {
            disabled: record.distable
          }
        }),
        selectedRowKeys: this.selectedRowKeys
      }
    }
  },
  methods: {
    async loadData(arg) {
      if (arg === 1) {
        this.ipagination.current = 1
      }
      let that = this
      this.loading = true
      let params = this.getQueryParams()//查询条件
      await getAction(this.url.list, params).then((res) => {
        if (res.success) {
          for (let i = 0; i < res.result.records.length; i++) {
            if (that.oldSelectRows.indexOf(res.result.records[i].id) > -1) {
              res.result.records[i].distable = true
            } else {
              res.result.records[i].distable = false
            }
          }
          this.dataSource = res.result.records
          this.ipagination.total = res.result.total
        }
        if (res.code === 510) {
          this.$message.warning(res.message)
        }
        this.loading = false
      })
    },
    showModals(oldSelectRows) {
      this.selectionRows = []
      this.oldSelectRows = oldSelectRows
      this.visible = true
      this.loadData(1)
    },
    getQueryParams() {
      let param = Object.assign({}, this.queryParam, this.isorter)
      param.field = this.getQueryField()
      param.pageNo = this.ipagination.current
      param.pageSize = this.ipagination.pageSize
      return filterObj(param)
    },
    //查询条件处理
    getQueryField() {
      let str = 'id,'
      for (let a = 0; a < this.columns.length; a++) {
        str += ',' + this.columns[a].dataIndex
      }
      return str
    },
    searchReset(num) {
      let that = this
      this.queryParam = []
      if (num !== 0) {
        that.loadData(1)
      }
      that.selectborrowIds = []
    },
    close() {
      this.searchReset(0)
      this.selectedRowKeys = []
      this.visible = false
    },
    handleTableChange(pagination, filters, sorter) {
      //TODO ç­›é€‰
      if (Object.keys(sorter).length > 0) {
        this.isorter.column = sorter.field
        this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc'
      }
      this.ipagination = pagination
      this.loadData()
    },
    handleSubmit() {
      this.$bus.$emit('selectionRows', this.selectionRows)
      // this.searchReset(0)
      this.close()
    },
    onSelectChange(selectionRows) {
      this.selectionRows = selectionRows
    },
    searchQuery() {
      this.loadData(1)
    }
  }
}
</script>
<style scoped>
.ant-table-tbody .ant-table-row td {
  padding-top: 10px;
  padding-bottom: 10px;
}
#components-layout-demo-custom-trigger .trigger {
  font-size: 18px;
  line-height: 64px;
  padding: 0 24px;
  cursor: pointer;
  transition: color 0.3s;
}
</style>
src/views/eam/modules/maintenancePlan/EquipmentMaintenancePlanForm.vue
@@ -35,6 +35,7 @@
                :triggerChange="true"
                dictCode="maintenance_type"
                v-model="model.type"
                @change="(e)=>handleClearTable(e)"
              />
            </a-form-model-item>
          </a-col>
@@ -375,6 +376,10 @@
        }
      })
    },
    handleClearTable(e) {
      this.equipmentMaintenancePlanDetailTable.dataSource = []
    }
  }
}
</script>
src/views/eam/modules/specialtyInspectionOrder/SpecialtyInspectionOrderAssignModal.vue
@@ -36,7 +36,7 @@
                :disabled="true"
                v-decorator="['inspectionTime', validatorRules.inspectionTime ]"
                placeholder="请选择点检时间"
                style="width: 100%"
                style="text-align:left;width: 100%"
                :showTime="true"
                dateFormat="YYYY-MM-DD HH:mm:ss"
              />