zhangherong
2025-04-27 dbb3445dc720a8f36b3424e73f2e02a6b0f9deb6
art: 从沃克项目迁移设备管理代码到航宇
已添加2个文件
已修改25个文件
已删除5个文件
5302 ■■■■■ 文件已修改
src/config/index.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/base/EamMaintenanceStandardList.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/equipment/EamEquipmentAttachmentList.vue 185 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/equipment/EamEquipmentList.vue 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/equipment/modules/EamEquipmentAttachmentModal.vue 138 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/equipment/modules/EamEquipmentModal.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/equipment/modules/MaintenanceEquipmentSelect.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/equipment/modules/NameplateModal.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/equipment/modules/ResumeDrawer.vue 138 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/maintenance/EamInspectionOrderList.vue 318 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/maintenance/EamWeekMaintenanceOrderList.vue 286 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/maintenance/modules/EamInspectionOrderDetailForm.vue 124 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/maintenance/modules/EamInspectionOrderForm.vue 164 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/maintenance/modules/EamInspectionOrderModal.vue 200 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/maintenance/modules/EamInspectionOrderModalXq.vue 358 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/maintenance/modules/EamWeekMaintenanceOrderModal.vue 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/repair/EamRepairOrderList.vue 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/repair/EamReportRepairList.vue 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/repair/modules/EamRepairOrderList/ReceiveFaultModal.vue 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/repair/modules/EamReportRepairList/EamReportRepairModal.vue 73 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/repair/modules/ImagesPreviewModal.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/FlowCompleted.vue 158 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/FlowLedger.vue 134 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/FlowTodo.vue 234 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue 644 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/InspectionOrder/InspectionOrderHandleBzz.vue 468 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/InspectionOrder/InspectionOrderXq.vue 443 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue 540 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal.vue 383 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/modules/SelectDeviceDrawer.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/config/index.js
@@ -2,9 +2,9 @@
import Vue from 'vue'
//设置全局API_BASE_URL
Vue.prototype.API_BASE_URL = window._CONFIG.VUE_APP_API_BASE_URL?window._CONFIG.VUE_APP_API_BASE_URL:process.env.VUE_APP_API_BASE_URL
window._CONFIG['domianURL'] = Vue.prototype.API_BASE_URL
window._CONFIG['domianURL'] = '/jeecg-boot'
//单点登录地址
window._CONFIG['casPrefixUrl'] = window._CONFIG.VUE_APP_CAS_BASE_URL?window._CONFIG.VUE_APP_CAS_BASE_URL:process.env.VUE_APP_CAS_BASE_URL
window._CONFIG['onlinePreviewDomainURL'] =  window._CONFIG.VUE_APP_ONLINE_BASE_URL?window._CONFIG.VUE_APP_ONLINE_BASE_URL:process.env.VUE_APP_ONLINE_BASE_URL
window._CONFIG['staticDomainURL'] = Vue.prototype.API_BASE_URL + '/sys/common/static'
window._CONFIG['pdfDomainURL'] = Vue.prototype.API_BASE_URL+ '/sys/common/pdf/pdfPreviewIframe'
window._CONFIG['staticDomainURL'] = '/jeecg-boot/sys/common/static'
window._CONFIG['pdfDomainURL'] = '/jeecg-boot/sys/common/pdf/pdfPreviewIframe'
src/utils/request.js
@@ -11,7 +11,7 @@
 * åˆ™æ˜ å°„后端域名,通过 vue.config.js
 * @type {*|string}
 */
let apiBaseUrl = window._CONFIG['domianURL'] || "/jeecg-boot";
let apiBaseUrl = "/jeecg-boot";
//console.log("apiBaseUrl= ",apiBaseUrl)
// åˆ›å»º axios å®žä¾‹
const service = axios.create({
src/views/eam/base/EamMaintenanceStandardList.vue
@@ -45,12 +45,12 @@
      <div class="table-operator">
        <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
        <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" :action="inspectionImportExcel"
                  @change="inspectionImportExcel">
                  @change="handleImportExcel">
          <a-button type="primary" icon="import">点检标准导入</a-button>
        </a-upload>
        <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.inspectionXlsDownloadUrl)">点检标准模板下载</a-button>
        <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" :action="weekMaintenanceImportExcel"
                  @change="weekMaintenanceImportExcel">
                  @change="handleImportExcel">
          <a-button type="primary" icon="import">周保标准导入</a-button>
        </a-upload>
        <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.weekMaintenanceXlsDownloadUrl)">周保标准模板下载</a-button>
src/views/eam/equipment/EamEquipmentAttachmentList.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,185 @@
<template>
  <a-card :bordered="false">
    <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
    <div class="table-operator">
      <a-button v-if="queryParam.equipmentId" @click="handleAdd" type="primary" icon="plus">新增</a-button>
      <a-dropdown v-if="selectedRowKeys.length > 0">
        <a-menu slot="overlay">
          <a-menu-item key="1" @click="batchDel">
            <a-icon type="delete" />
            åˆ é™¤
          </a-menu-item>
        </a-menu>
        <a-button style="margin-left: 8px"> æ‰¹é‡æ“ä½œ
          <a-icon type="down" />
        </a-button>
      </a-dropdown>
    </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"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        class="j-table-force-nowrap"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        @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 @click="handlePreview(record)">预览</a>
              </a-menu-item>
              <a-menu-item>
                <a-popconfirm title="确定下载文件吗?" @confirm="() => handleDownload(record)">
                  <a>下载</a>
                </a-popconfirm>
              </a-menu-item>
              <a-menu-item>
                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                  <a>删除</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>
      </a-table>
    </div>
    <!-- table区域-end -->
    <!-- è¡¨å•区域 -->
    <eamEquipmentAttachment-modal ref="modalForm" @ok="modalFormOk" :equipmentId="queryParam.equipmentId"></eamEquipmentAttachment-modal>
    <lx-file-preview ref="lxFilePreview" :fileUrl="fileUrl"></lx-file-preview>
  </a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import EamEquipmentAttachmentModal from './modules/EamEquipmentAttachmentModal'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { downFile } from '@api/manage'
export default {
  name: 'EamEquipmentAttachmentList',
  mixins: [JeecgListMixin],
  components: {
    EamEquipmentAttachmentModal
  },
  data() {
    return {
      description: '设备文档台账使用管理页面',
      disableMixinCreated: true,
      fileUrl: '',
      // è¡¨å¤´
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: 'center',
          customRender: function(t, r, index) {
            return parseInt(index) + 1
          }
        },
        {
          title: '文件加密名',
          align: 'center',
          dataIndex: 'fileEncodeName',
          ellipsis: true,
        },
        {
          title: '文件名称',
          align: 'center',
          dataIndex: 'fileName',
          ellipsis: true,
        },
        {
          title: '文件路径',
          align: 'center',
          dataIndex: 'filePath',
          ellipsis: true,
        },
        {
          title: '文件后缀名',
          align: 'center',
          dataIndex: 'fileSuffix'
        },
        {
          title: '文件大小',
          align: 'center',
          dataIndex: 'fileSize'
        },
        {
          title: '描述',
          align: 'center',
          dataIndex: 'description',
          ellipsis: true,
        },
        {
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          scopedSlots: { customRender: 'action' }
        }
      ],
      url: {
        list: '/eam/equipmentAttachment/list',
        delete: '/eam/equipmentAttachment/delete',
        deleteBatch: '/eam/equipmentAttachment/deleteBatch',
        download: '/eam/equipmentAttachment/downloadFile',
      }
    }
  },
  computed: {
  },
  methods: {
    handleDownload(record) {
      downFile(this.url.download, { id: record.id }).then((res) => {
        if (!res) {
          this.$message.warning('文件下载失败')
          return
        } else {
          let fileName = record.fileName;
          if (typeof window.navigator.msSaveBlob !== 'undefined') {
            window.navigator.msSaveBlob(new Blob([res]), fileName);
          } else {
            let url = window.URL.createObjectURL(new Blob([res]));
            let link = document.createElement('a');
            link.style.display = 'none';
            link.href = url;
            link.setAttribute('download', fileName);
            document.body.appendChild(link);
            link.click()
            document.body.removeChild(link) //下载完成移除元素
            window.URL.revokeObjectURL(url) //释放掉blob对象
          }
        }
      })
    },
    handlePreview: function (record) {
      this.$refs.lxFilePreview.preview(record.filePath);
    },
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
src/views/eam/equipment/EamEquipmentList.vue
@@ -85,13 +85,13 @@
      <a-button type="primary" icon="download" @click="handleTemplateXlsDownload">导入模板下载</a-button>
      <a-dropdown v-if="selectedRowKeys.length > 0">
        <a-menu slot="overlay">
          <a-menu-item key="1" @click="batchDel">
            <a-icon type="delete"/>
            åˆ é™¤
          </a-menu-item>
          <a-menu-item key="2" @click="handleOpenNameplateModal(selectionRows)">
          <a-menu-item key="1" @click="handleOpenNameplateModal(selectionRows)">
            <a-icon type="printer"/>
            æ‰“印铭牌
          </a-menu-item>
          <a-menu-item key="2" @click="batchDel" v-if="isShowAuth('eam:equipment:delete')">
            <a-icon type="delete"/>
            åˆ é™¤
          </a-menu-item>
        </a-menu>
        <a-button style="margin-left: 8px"> æ‰¹é‡æ“ä½œ
@@ -107,7 +107,6 @@
        style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
        <a style="margin-left: 24px" @click="onSelectChange([])">清空</a>
      </div>
      <a-table
        ref="table"
        size="middle"
@@ -153,7 +152,7 @@
              <a-menu-item>
                <a href="javascript:;" @click="handleDetail(record)">详情</a>
              </a-menu-item>
              <a-menu-item>
              <a-menu-item v-if="isShowAuth('eam:equipment:delete')">
                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                  <a>删除</a>
                </a-popconfirm>
@@ -167,11 +166,20 @@
    <!-- table区域-end -->
    <a-tabs v-model="activeTabKey" @change="handleTabChange">
      <a-tab-pane tab="保养标准" :key="1">
        <eam-maintenance-standard-list ref="tabPaneTableListRef1" :isDisplayOperation="false"/>
      <a-tab-pane tab="设备文档" :key="1">
        <eam-equipment-attachment-list ref="tabPaneTableListRef1"/>
      </a-tab-pane>
      <a-tab-pane tab="维修工单" :key="2">
        <eam-repair-order-list ref="tabPaneTableListRef2" :isDisplayOperation="false"/>
      <a-tab-pane tab="点检工单" :key="2">
        <eam-inspection-order-list ref="tabPaneTableListRef2" :isDisplayOperation="false"/>
      </a-tab-pane>
      <a-tab-pane tab="周保工单" :key="3">
        <eam-week-maintenance-order-list ref="tabPaneTableListRef3" :isDisplayOperation="false"/>
      </a-tab-pane>
      <a-tab-pane tab="维修工单" :key="4">
        <eam-repair-order-list ref="tabPaneTableListRef4" :isDisplayOperation="false"/>
      </a-tab-pane>
      <a-tab-pane tab="保养标准" :key="5">
        <eam-maintenance-standard-list ref="tabPaneTableListRef5" :isDisplayOperation="false"/>
      </a-tab-pane>
    </a-tabs>
@@ -180,7 +188,7 @@
    <!--铭牌弹窗-->
    <nameplate-modal ref="nameplateModalRef" :printedRows="printedRows"/>
    <!--履历弹窗-->
    <resume-drawer ref="resumeDrawerRef"/>
    <resume-drawer ref="resumeDrawerRef" :currentTableRowRecord="currentTableRowRecord"/>
  </a-card>
</template>
@@ -194,16 +202,22 @@
  import ResumeDrawer from '@views/eam/equipment/modules/ResumeDrawer.vue'
  import EamMaintenanceStandardList from '@views/eam/base/EamMaintenanceStandardList.vue'
  import EamRepairOrderList from '../repair/EamRepairOrderList'
  import EamInspectionOrderList from '../maintenance/EamInspectionOrderList'
  import EamEquipmentAttachmentList from '@views/eam/equipment/EamEquipmentAttachmentList.vue'
  import EamWeekMaintenanceOrderList from '@views/eam/maintenance/EamWeekMaintenanceOrderList.vue'
  export default {
    name: 'EamEquipmentList',
    mixins: [JeecgListMixin],
    components: {
      EamInspectionOrderList,
      EamRepairOrderList,
      EamMaintenanceStandardList,
      ResumeDrawer,
      NameplateModal,
      EamEquipmentModal
      EamEquipmentModal,
      EamEquipmentAttachmentList,
      EamWeekMaintenanceOrderList
    },
    data() {
      return {
@@ -290,7 +304,6 @@
          {
            title: '设备分类',
            align: 'center',
            width: 100,
            dataIndex: 'equipmentCategory_dictText'
          },
          {
@@ -323,23 +336,20 @@
            width: 100,
            dataIndex: 'installationPosition'
          },
          {
            title: '立项卡号',
            align: 'center',
            width: 100,
            dataIndex: 'cardNumber'
          },
          {
            title: '出厂编号',
            align: 'center',
            width: 100,
            dataIndex: 'factoryNumber'
          },
          {
            title: '机床厂家',
            align: 'center',
            width: 100,
            width: 300,
            dataIndex: 'manufacturingEnterprise'
          },
          {
@@ -408,23 +418,23 @@
          {
            title: '设备端口',
            align: 'center',
            width: 100,
            dataIndex: 'equipmentPort'
          },
          {
            title: '坐标数量',
            align: 'center',
            width: 100,
            dataIndex: 'coordinateNum'
          },
          {
            title: '创建人',
            align: 'center',
            width: 100,
            dataIndex: 'createBy_dictText'
          },
          {
            title: '创建时间',
            align: 'center',
            width: 200,
            dataIndex: 'createTime'
          },
          {
@@ -440,7 +450,6 @@
          {
            title: '备注',
            align: 'center',
            width: 100,
            dataIndex: 'remark'
          },
          {
@@ -464,7 +473,8 @@
        treeData: [],
        printedRows: [],
        activeTabKey: 1,
        appHomeUrl: ''
        appHomeUrl: '',
        currentTableRowRecord: {}
      }
    },
    computed: {
@@ -503,7 +513,11 @@
       * @param record è¡¨æ ¼è¡Œä¿¡æ¯
       */
      handleOpenResumeDrawer(record) {
        this.currentTableRowRecord = Object.assign({}, record)
        this.$refs.resumeDrawerRef.title = '设备履历' + `(${record.equipmentCode})`
        this.$refs.resumeDrawerRef.dataSource = []
        this.$refs.resumeDrawerRef.visible = true
        this.$nextTick(() => this.$refs.resumeDrawerRef.getEquipmentResumeByApi())
      },
      /**
@@ -550,6 +564,7 @@
      onSelectChange(selectedRowKeys, selectionRows) {
        this.selectedRowKeys = selectedRowKeys
        this.selectionRows = selectionRows
        this.$refs['tabPaneTableListRef' + this.activeTabKey].queryParam.equipmentId = null
        this.$refs['tabPaneTableListRef' + this.activeTabKey].dataSource = []
        this.$refs['tabPaneTableListRef' + this.activeTabKey].onClearSelected()
        if (selectedRowKeys.length === 1) this.loadTabPaneTableData(selectedRowKeys[0])
src/views/eam/equipment/modules/EamEquipmentAttachmentModal.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,138 @@
<template>
  <j-modal
    :title="title"
    :width="800"
    :visible="visible"
    :confirmLoading="confirmLoading"
    switchFullscreen
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭">
    <a-spin :spinning="confirmLoading">
      <a-form-model ref="form" :model="model" :rules="validatorRules">
        <a-form-model-item
          label="上传"
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          v-if="!editable"
          prop="fileList">
          <lx-upload :returnUrl="false"
                     :isMultiple="false"
                     v-model="model.fileList"
                     biz="test">
          </lx-upload>
        </a-form-model-item>
        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fileName" label="文件名称" v-if="editable">
          <a-input placeholder="请输入文件名称" v-model="model.fileName" />
        </a-form-model-item>
        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description" label="描述">
          <a-textarea placeholder="请输入描述" v-model="model.description" />
        </a-form-model-item>
      </a-form-model>
    </a-spin>
  </j-modal>
</template>
<script>
import { httpAction } from '@/api/manage'
export default {
    name: "EamEquipmentAttachmentModal",
    props: {
      equipmentId: {
        type: String,
        required: true,
        default: '-1'
      }
    },
    data () {
      return {
        title:"操作",
        visible: false,
        model: {},
        labelCol: {
          xs: { span: 24 },
          sm: { span: 5 },
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 },
        },
        confirmLoading: false,
        validatorRules:{
          fileName: [
            { required: true, message: '请输入文件名称!' }
          ]
        },
        url: {
          add: "/eam/equipmentAttachment/add",
          edit: "/eam/equipmentAttachment/edit",
        },
        editable: false,
      }
    },
    created () {
    },
    methods: {
      add () {
        this.editable = false;
        //初始化默认值
        this.model = {};
        this.visible = true
      },
      edit (record) {
        this.editable = true;
        this.model = Object.assign({}, record)
        this.visible = true
      },
      close () {
        this.$emit('close');
        this.visible = false;
        this.$refs.form.clearValidate();
      },
      handleOk () {
        const that = this;
        // è§¦å‘表单验证
         this.$refs.form.validate(valid => {
          if (valid) {
            that.confirmLoading = true;
            let httpurl = '';
            let method = '';
            if(!this.model.id){
              httpurl+=this.url.add;
              method = 'post';
            }else{
              httpurl+=this.url.edit;
               method = 'put';
            }
            that.model.equipmentId = that.equipmentId;
            httpAction(httpurl, that.model, method).then((res)=>{
              if(res.success){
                that.$message.success(res.message);
                that.$emit('ok');
                that.close();
              }else{
                that.$message.warning(res.message);
              }
            }).finally(() => {
              that.confirmLoading = false;
            })
          }else{
             return false;
          }
        })
      },
      handleCancel () {
        this.close()
      },
    }
  }
</script>
<style lang="less" scoped>
</style>
src/views/eam/equipment/modules/EamEquipmentModal.vue
@@ -284,7 +284,7 @@
          { required: true, message: '请选择出厂日期' }
        ],
        acceptanceCheckDate: [
          { required: true, message: '请选择验收日期' }
          { required: false, message: '请选择验收日期' }
        ],
        technologyStatus: [
          { required: true, message: '请选择技术状态' }
src/views/eam/equipment/modules/MaintenanceEquipmentSelect.vue
@@ -82,7 +82,7 @@
      if (!this.selectedAsyncValue || !this.selectedAsyncValue.key || this.selectedAsyncValue.key != this.value || !this.maintenanceCategory) {
        console.log('这才请求后台')
        getAction(`/eam/maintenanceStandard/listByUser`, {
          id: this.value,
          equipmentId: this.value,
          maintenanceCategory: this.maintenanceCategory
        }).then(res => {
          if (res.success) {
src/views/eam/equipment/modules/NameplateModal.vue
@@ -18,8 +18,10 @@
        <tbody>
        <tr>
          <td rowspan="3">
            <QrcodeVue :value="httpUrl+item.equipmentCode"/>
          <td rowspan="3" align="center">
            <div style="height: 80%;width: 50%">
              <QrcodeVue :value="httpUrl+item.id" :size="50"/>
            </div>
          </td>
          <td>设备编号</td>
          <td>{{ item.equipmentCode }}</td>
@@ -42,8 +44,10 @@
        </tr>
        <tr>
          <td rowspan="3">
            <QrcodeVue :value="item.equipmentCode"/>
          <td rowspan="3" align="center">
            <div style="height: 80%;width: 50%">
              <QrcodeVue :value="item.equipmentCode" :size="50"/>
            </div>
          </td>
          <td>出厂编号</td>
          <td>{{ item.factoryNumber }}</td>
@@ -133,14 +137,15 @@
  }
  th {
    font-size: 28px;
      font-size: 24px;
    letter-spacing: 3px;
    padding: 20px;
      padding: 12px;
  }
  td {
    font-size: 18px;
      font-size: 14px;
    width: 33%;
      padding: 6px;
  }
}
</style>
src/views/eam/equipment/modules/ResumeDrawer.vue
@@ -1,79 +1,105 @@
<template>
  <a-drawer title="设备履历" placement="right" :width="500" :closable="false" :visible="visible" @close="onClose">
  <a-drawer :title="title" placement="right" :width="600" :closable="false" :visible="visible" @close="onClose">
    <a-spin :spinning="spinning">
      <a-skeleton :title="false" :paragraph="{ rows: 30}" v-if="spinning&&dataSource.length===0"/>
      <template v-if="dataSource.length>0">
    <a-timeline mode="alternate">
      <a-timeline-item>Create a services site 2015-09-01</a-timeline-item>
      <a-timeline-item color="green">
        Solve initial network problems 2015-09-01
      </a-timeline-item>
      <a-timeline-item>
        <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/>
        Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque
        laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
        beatae vitae dicta sunt explicabo.
      </a-timeline-item>
      <a-timeline-item color="red">
        Network problems being solved 2015-09-01
      </a-timeline-item>
      <a-timeline-item>Create a services site 2015-09-01</a-timeline-item>
      <a-timeline-item>
        <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/>
        Technical testing 2015-09-01
      </a-timeline-item>
      <a-timeline-item>Create a services site 2015-09-01</a-timeline-item>
      <a-timeline-item color="green">
        Solve initial network problems 2015-09-01
      </a-timeline-item>
      <a-timeline-item>
        <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/>
        Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque
        laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
        beatae vitae dicta sunt explicabo.
      </a-timeline-item>
      <a-timeline-item color="red">
        Network problems being solved 2015-09-01
      </a-timeline-item>
      <a-timeline-item>Create a services site 2015-09-01</a-timeline-item>
      <a-timeline-item>
        <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/>
        Technical testing 2015-09-01
      </a-timeline-item>
      <a-timeline-item>Create a services site 2015-09-01</a-timeline-item>
      <a-timeline-item color="green">
        Solve initial network problems 2015-09-01
      </a-timeline-item>
      <a-timeline-item>
        <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/>
        Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque
        laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
        beatae vitae dicta sunt explicabo.
      </a-timeline-item>
      <a-timeline-item color="red">
        Network problems being solved 2015-09-01
      </a-timeline-item>
      <a-timeline-item>Create a services site 2015-09-01</a-timeline-item>
      <a-timeline-item>
        <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/>
        Technical testing 2015-09-01
          <a-timeline-item v-for="item in dataSource" :key="item.id">
            <span>操作人:{{item.operator_dictText}}</span><br/>
            <span>操作:{{item.operationTag_dictText}}</span><br/>
            <!--<span>描述:{{item.description}}</span>-->
            <span>操作时间:{{item.createTime}}</span>
      </a-timeline-item>
    </a-timeline>
        <div style="text-align: center">
          <a v-if="dataSource.length>0&&pageConfig.pageNo===1&&pageConfig.pageNo!==pageConfig.totalPage"
             @click="loadNextPageData">
            ç‚¹å‡»åŠ è½½æ›´å¤š
            <a-icon type="down"/>
          </a>
          <span v-if="isNoMoreData">- å·²ç»åˆ°åº•了 -</span>
          <a-empty v-if="dataSource.length===0"/>
        </div>
      </template>
    </a-spin>
  </a-drawer>
</template>
<script>
  import { getAction } from '@/api/manage'
export default {
  name: 'ResumeDrawer',
    props: {
      currentTableRowRecord: {
        type: Object
      }
    },
  data() {
    return {
      visible: false
        title: '设备履历',
        visible: false,
        spinning: false,
        dataSource: [],
        url: {
          list: '/eam/equipmentHistoryLog/list'
        },
        pageConfig: {
          pageNo: 1,
          pageSize: 10,
          totalPage: 0
        },
        drawerBodyElement: null,
        isNoMoreData: false
    }
  },
  methods: {
    getEquipmentResumeByApi() {
      getEquipmentResumeByApi(pageNo = 1) {
        this.pageConfig.pageNo = pageNo
        const params = Object.assign({}, this.pageConfig, { equipmentId: this.currentTableRowRecord.id })
        const that = this
        this.spinning = true
        getAction(this.url.list, params)
          .then(res => {
            if (res.success) {
              console.log('res.result', res.result)
              if (!this.pageConfig.totalPage) this.pageConfig.totalPage = res.result.pages
              res.result.records.forEach(item => that.dataSource.push(item))
              if (this.pageConfig.totalPage !== this.pageConfig.pageNo) {
                if (res.result.current === 2) {
                  if (!this.drawerBodyElement) this.drawerBodyElement = document.querySelector('.ant-drawer-body')
                  this.drawerBodyElement.addEventListener('scroll', this.handleDrawerBodyScroll)
                }
              } else this.isNoMoreData = true
            }
          })
          .finally(() => {
            that.spinning = false
          })
      },
      // åŠ è½½ä¸‹ä¸€é¡µæ•°æ®
      loadNextPageData() {
        const current = this.pageConfig.pageNo + 1
        this.getEquipmentResumeByApi(current)
      },
      // æŠ½å±‰å…ƒç´ æ»šåŠ¨äº‹ä»¶
      handleDrawerBodyScroll() {
        if (this.pageConfig.totalPage === this.pageConfig.pageNo) return
        const { scrollTop, clientHeight, scrollHeight } = this.drawerBodyElement
        if (scrollTop + clientHeight + 1 >= scrollHeight) this.loadNextPageData()
    },
    onClose() {
      this.visible = false
        this.pageConfig.totalPage = 0
        this.isNoMoreData = false
        if (this.drawerBodyElement) this.drawerBodyElement.removeEventListener('scroll', this.handleDrawerBodyScroll)
    }
  }
}
src/views/eam/maintenance/EamInspectionOrderList.vue
@@ -1,39 +1,33 @@
<template>
  <a-card :bordered="false">
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div class="table-page-search-wrapper">
    <div class="table-page-search-wrapper" v-if="isDisplayOperation">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
          <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <a-form-item label="工单号">
              <a-input placeholder="请输入工单号" v-model="queryParam.orderNum"></a-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="设备ID">
              <a-input placeholder="请输入设备ID" v-model="queryParam.equipmentId"></a-input>
            </a-form-item>
          </a-col>
          <template v-if="toggleSearchStatus">
            <a-col :xl="6" :lg="7" :md="8" :sm="24">
              <a-form-item label="点检日期">
                <j-date placeholder="请选择点检日期" v-model="queryParam.inspectionDate"></j-date>
          <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <a-form-item label="设备编号">
              <lx-search-equipment-select placeholder="请输入设备编号或名称搜索" v-model="queryParam.equipmentId"></lx-search-equipment-select>
              </a-form-item>
            </a-col>
            <a-col :xl="6" :lg="7" :md="8" :sm="24">
              <a-form-item label="点检时间">
                <j-date placeholder="请选择点检时间" v-model="queryParam.operateTime"></j-date>
            <a-form-item label="计划点检日期">
              <a-range-picker v-model="queryParam.inspectionDateRange" @change="onInspectionDateChange" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
              </a-form-item>
            </a-col>
          </template>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
          <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <a-form-item label="点检状态">
              <j-dict-select-tag placeholder="请选择点检状态" dict-code="inspection_status" v-model="queryParam.inspectionStatus" />
            </a-form-item>
          </a-col>
          <a-col :xl="4" :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>
              <a @click="handleToggleSearch" style="margin-left: 8px">
                {{ toggleSearchStatus ? '收起' : '展开' }}
                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
              </a>
              <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </span>
          </a-col>
        </a-row>
@@ -42,21 +36,30 @@
    <!-- æŸ¥è¯¢åŒºåŸŸ-END -->
    <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
    <div class="table-operator">
      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
    <div class="table-operator" v-if="isDisplayOperation">
      <a-button @click="handleAdd" type="primary" icon="plus" v-if="isShowAuth('eam:inspection:add')">新增</a-button>
      <a-dropdown v-if="selectedRowKeys.length > 0">
        <a-menu slot="overlay">
          <a-menu-item key="1" @click="batchZf(5)"><a-icon type="snippets"/>作废</a-menu-item>
          <a-menu-item key="2" @click="batchLq(2)"><a-icon type="form"/>领取</a-menu-item>
          <a-menu-item key="1" v-if="isShowAuth('eam:inspection:abolish')" @click="batchZf('ABOLISH')">
            <a-icon type="snippets"/>
            ä½œåºŸ
          </a-menu-item>
          <a-menu-item key="2" v-if="isShowAuth('eam:inspection:collect')" @click="batchLq('UNDER_INSPECTION')">
            <a-icon type="form"/>
            é¢†å–
          </a-menu-item>
        </a-menu>
        <a-button style="margin-left: 8px"> æ‰¹é‡æ“ä½œ <a-icon type="down" /></a-button>
        <a-button style="margin-left: 8px"> æ‰¹é‡æ“ä½œ
          <a-icon type="down"/>
        </a-button>
      </a-dropdown>
    </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>项
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;" v-if="isDisplayOperation">
        <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>
@@ -74,36 +77,17 @@
        class="j-table-force-nowrap"
        @change="handleTableChange">
        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </template>
        <template slot="imgSlot" 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>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
          <a-button
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="downloadFile(text)">
            ä¸‹è½½
          </a-button>
        </template>
        <span slot="action" slot-scope="text, record">
          <a v-if="record.inspectionStatus === '1'" @click="handleEdit(record)">编辑</a>
            <a @click="handleEdit(record)" v-if="isShowAuth('eam:inspection:edit') && record.inspectionStatus === 'WAIT_INSPECTION'" >编辑</a>
          <a-divider v-if="record.inspectionStatus === '1'" type="vertical" />
          <a-divider type="vertical" v-if="isShowAuth('eam:inspection:edit') && record.inspectionStatus === 'WAIT_INSPECTION'" />
          <a-popconfirm v-if="record.inspectionStatus === '1'" title="确定领取吗?" @confirm="() => handleInspection(record.id)">
          <a-popconfirm title="确定领取吗?" v-if="isShowAuth('eam:inspection:collect') && record.inspectionStatus === 'WAIT_INSPECTION'"
                        @confirm="() => handleInspection(record.id)">
                  <a>领取</a>
          </a-popconfirm>
          <a-divider v-if="record.inspectionStatus === '1'" type="vertical" />
          <a-divider type="vertical" v-if="isShowAuth('eam:inspection:collect') && record.inspectionStatus === 'WAIT_INSPECTION'" />
          <a-dropdown>
            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
@@ -111,7 +95,7 @@
              <a-menu-item>
                <a @click="handleDetail(record)">详情</a>
              </a-menu-item>
              <a-menu-item  v-if="record.inspectionStatus === '1'" >
              <a-menu-item v-if="isShowAuth('eam:inspection:abolish') && record.inspectionStatus === 'WAIT_INSPECTION'">
                <a-popconfirm title="确定作废吗?" @confirm="() => handleOrReceive(record.id)">
                  <a>作废</a>
                </a-popconfirm>
@@ -119,12 +103,12 @@
            </a-menu>
          </a-dropdown>
        </span>
      </a-table>
    </div>
    <eam-inspection-order-modal ref="modalForm" @ok="modalFormOk"></eam-inspection-order-modal>
    <EamInspectionOrderModalXq ref="modalFormXq" @ok="modalFormOk"></EamInspectionOrderModalXq>
    <inspection-order-handle ref="modalFormXq" :selectShenpiData="selectInspectionOrderXqData"/>
  </a-card>
</template>
@@ -134,19 +118,28 @@
  import { mixinDevice } from '@/utils/mixin'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import EamInspectionOrderModal from './modules/EamInspectionOrderModal'
  import EamInspectionOrderModalXq from './modules/EamInspectionOrderModalXq.vue'
  import { deleteAction, getAction } from '@api/manage'
  import InspectionOrderHandle from '../../flowable/workflow/InspectionOrder/InspectionOrderHandle'
  import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue'
  export default {
    name: 'EamInspectionOrderList',
    mixins:[JeecgListMixin, mixinDevice],
    components: {
      InspectionOrderHandle,
      EamInspectionOrderModal,
      EamInspectionOrderModalXq
      LxSearchEquipmentSelect,
    },
    props: {
      isDisplayOperation: {
        type: Boolean,
        default: true
      }
    },
    data () {
      return {
        description: 'eam_inspection_order管理页面',
        disableMixinCreated: true,
        // è¡¨å¤´
        columns: [
          {
@@ -154,256 +147,255 @@
            dataIndex: '',
            key:'rowIndex',
            width:60,
            align:"center",
            align: 'center',
            customRender:function (t,r,index) {
              return parseInt(index)+1;
              return parseInt(index) + 1
            }
          },
          {
            title:'工单号',
            align:"center",
            align: 'center',
            dataIndex: 'orderNum'
          },
          {
            title:'设备编号',
            align:"center",
            dataIndex: 'equipmentId_dictText'
            align: 'center',
            dataIndex: 'equipmentCode'
          },
          {
            title:'标准编码',
            align:"center",
            title: '设备名称',
            align: 'center',
            dataIndex: 'equipmentName'
          },
          {
            title: '标准名称',
            align: 'center',
            dataIndex: 'standardId_dictText'
          },
          {
            title:'点检日期',
            align:"center",
            align: 'center',
            dataIndex: 'inspectionDate',
            customRender:function (text) {
              return !text?"":(text.length>10?text.substr(0,10):text)
              return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
            }
          },
          {
            title:'点检过期时间',
            align:"center",
            title: '点检过期日期',
            align: 'center',
            dataIndex: 'expirationTime',
            customRender:function (text) {
              return !text?"":(text.length>10?text.substr(0,10):text)
              return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
            }
          },
          {
            title:'创建方式',
            align:"center",
            align: 'center',
            dataIndex: 'creationMethod_dictText'
          },
          {
            title:'点检状态',
            align:"center",
            align: 'center',
            dataIndex: 'inspectionStatus_dictText'
          },
          {
            title:'点检时间',
            align:"center",
            dataIndex: 'operateTime',
            customRender:function (text) {
              return !text?"":(text.length>10?text.substr(0,10):text)
            }
          },
          {
            title:'点检人',
            align:"center",
            align: 'center',
            dataIndex: 'operator_dictText'
          },
          {
            title: '点检时间',
            align: 'center',
            dataIndex: 'operateTime',
          },
          {
            title:'班组长确认',
            align:"center",
            dataIndex: 'confirmUser'
            align: 'center',
            dataIndex: 'confirmUser_dictText'
          },
          {
            title:'确认时间',
            align:"center",
            align: 'center',
            dataIndex: 'confirmTime',
            customRender:function (text) {
              return !text?"":(text.length>10?text.substr(0,10):text)
            }
          },
          {
            title: '操作',
            dataIndex: 'action',
            align:"center",
            fixed:"right",
            width:147,
            scopedSlots: { customRender: 'action' }
            title: '确认意见',
            align: 'center',
            dataIndex: 'confirmComment',
          }
        ],
        url: {
          list: "/eam/eamInspectionOrder/list",
          cancelInspectionOrder: "/eam/eamInspectionOrder/cancelInspectionOrder",
          deleteBatch: "/eam/eamInspectionOrder/deleteBatch",
          exportXlsUrl: "/eam/eamInspectionOrder/exportXls",
          importExcelUrl: "eam/eamInspectionOrder/importExcel",
          receiveInspectionOrder : "eam/eamInspectionOrder/receiveInspectionOrder",
          cancelOrReceive: "eam/eamInspectionOrder/cancelOrReceive"
          list: '/eam/eamInspectionOrder/list',
          cancelInspectionOrder: '/eam/eamInspectionOrder/cancelInspectionOrder',
          deleteBatch: '/eam/eamInspectionOrder/deleteBatch',
          exportXlsUrl: '/eam/eamInspectionOrder/exportXls',
          importExcelUrl: 'eam/eamInspectionOrder/importExcel',
          receiveInspectionOrder: 'eam/eamInspectionOrder/receiveInspectionOrder',
          cancelOrReceive: 'eam/eamInspectionOrder/cancelOrReceive'
        },
        dictOptions:{},
        superFieldList:[],
        selectInspectionOrderXqData: {}
      }
    },
    created() {
    this.getSuperFieldList();
      if (!this.isDisplayOperation) {
        return
      }
      const operationColumn = {
        title: '操作',
        dataIndex: 'action',
        align: 'center',
        fixed: 'right',
        width: 200,
        scopedSlots: { customRender: 'action' }
      }
      this.columns = [...this.columns, operationColumn]
      this.loadData(1)
    },
    computed: {
      importExcelUrl: function(){
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
      },
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
      }
    },
    methods: {
      initDictConfig(){
      },
      getSuperFieldList(){
        let fieldList=[];
        fieldList.push({type:'string',value:'orderNum',text:'工单号',dictCode:''})
        fieldList.push({type:'string',value:'equipmentId',text:'设备ID',dictCode:''})
        fieldList.push({type:'string',value:'standardId',text:'标准ID',dictCode:''})
        fieldList.push({type:'date',value:'inspectionDate',text:'点检日期'})
        fieldList.push({type:'date',value:'operateTime',text:'点检时间'})
        fieldList.push({type:'string',value:'operator',text:'点检人',dictCode:''})
        fieldList.push({type:'date',value:'expirationTime',text:'点检过期时间'})
        fieldList.push({type:'string',value:'creationMethod',text:'创建方式',dictCode:''})
        fieldList.push({type:'string',value:'inspectionStatus',text:'点检状态',dictCode:''})
        fieldList.push({type:'string',value:'confirmUser',text:'设备管理员确认',dictCode:''})
        fieldList.push({type:'date',value:'confirmTime',text:'确认时间'})
        fieldList.push({type:'string',value:'remark',text:'备注',dictCode:''})
        fieldList.push({type:'string',value:'imageFiles',text:'照片文件ids;id以逗号分隔',dictCode:''})
        this.superFieldList = fieldList
      },
      //详情
      handleDetail: function(record) {
        this.$refs.modalFormXq.edit(record);
        this.$refs.modalFormXq.title = "详情";
        this.$refs.modalFormXq.disableSubmit = true;
        this.selectInspectionOrderXqData = Object.assign({}, record)
        this.$refs.modalFormXq.visible = true
        this.$refs.modalFormXq.title = '详情'
        this.$refs.modalFormXq.disableSubmit = true
        this.$refs.modalFormXq.getAllApproveData(record)
        this.$refs.modalFormXq.getBasicInformation({ ...record, dataId: record.id })
      },
      handleInspection(id) {
        if (!this.url.receiveInspectionOrder) {
          this.$message.error("请设置url.receiveInspectionOrder!")
          this.$message.error('请设置url.receiveInspectionOrder!')
          return
        }
        var that = this;
        var that = this
        getAction(that.url.receiveInspectionOrder, { id: id }).then((res) => {
          if (res.success) {
            that.$notification.success({
              message: '消息',
              description: res.message
            });
            that.loadData();
            })
            that.loadData()
          } else {
            // that.$message.warning(res.message);
            that.$notification.warning({
              message: '消息',
              description: res.message
            });
            })
          }
        });
        })
      },
      handleOrReceive(id){
        if (!this.url.cancelInspectionOrder) {
          this.$message.error("请设置url.cancelInspectionOrder!")
          this.$message.error('请设置url.cancelInspectionOrder!')
          return
        }
        var that = this;
        var that = this
        getAction(that.url.cancelInspectionOrder, { id: id }).then((res) => {
          if (res.success) {
            that.$notification.success({
              message: '消息',
              description: res.message
            });
            that.loadData();
            })
            that.loadData()
          } else {
            // that.$message.warning(res.message);
            that.$notification.warning({
              message: '消息',
              description: res.message
            });
            })
          }
        });
        })
      },
      batchZf(type){
        if (this.selectedRowKeys.length <= 0) {
          this.$notification.warning({
            message:'消息',
            description:"请选择一条记录"
          });
            description: '请选择一条记录'
          })
        } else {
          var ids = "";
          var ids = ''
          for (var a = 0; a < this.selectedRowKeys.length; a++) {
            ids += this.selectedRowKeys[a] + ",";
            ids += this.selectedRowKeys[a] + ','
          }
          var that = this;
          var that = this
          this.$confirm({
            title: "确认作废",
            content: "是否作废选中数据,只有待点检状态的数据才可作废成功?",
            title: '确认作废',
            content: '是否作废选中数据,只有待点检状态的数据才可作废成功?',
            onOk: function () {
              that.loading = true;
              that.loading = true
              getAction(that.url.cancelOrReceive, {ids: ids,type:type}).then((res) => {
                if (res.success) {
                  that.$notification.success({
                    message:'消息',
                    description:res.message
                  });
                  that.loadData();
                  that.onClearSelected();
                  })
                  that.loadData()
                  that.onClearSelected()
                } else {
                  // that.$message.warning(res.message);
                  that.$notification.warning({
                    message:'消息',
                    description:res.message
                  });
                  })
                }
              }).finally(() => {
                that.loading = false;
              });
                that.loading = false
              })
            }
          });
          })
        }
      },
      batchLq(type){
        if (this.selectedRowKeys.length <= 0) {
          this.$notification.warning({
            message:'消息',
            description:"请选择一条记录"
          });
            description: '请选择一条记录'
          })
        } else {
          var ids = "";
          var ids = ''
          for (var a = 0; a < this.selectedRowKeys.length; a++) {
            ids += this.selectedRowKeys[a] + ",";
            ids += this.selectedRowKeys[a] + ','
          }
          var that = this;
          var that = this
          this.$confirm({
            title: "确认领取",
            content: "是否领取选中数据,只有待点检状态的数据才可领取成功?",
            title: '确认领取',
            content: '是否领取选中数据,只有待点检状态的数据才可领取成功?',
            onOk: function () {
              that.loading = true;
              that.loading = true
              getAction(that.url.cancelOrReceive, {ids: ids,type:type}).then((res) => {
                if (res.success) {
                  that.$notification.success({
                    message:'消息',
                    description:res.message
                  });
                  that.loadData();
                  that.onClearSelected();
                  })
                  that.loadData()
                  that.onClearSelected()
                } else {
                  // that.$message.warning(res.message);
                  that.$notification.warning({
                    message:'消息',
                    description:res.message
                  });
                  })
                }
              }).finally(() => {
                that.loading = false;
              });
                that.loading = false
              })
            }
          });
          })
        }
      },
      onInspectionDateChange: function(value, dateString) {
        this.queryParam.inspectionDateBegin = dateString[0]
        this.queryParam.inspectionDateEnd = dateString[1]
      },
    }
  }
</script>
src/views/eam/maintenance/EamWeekMaintenanceOrderList.vue
@@ -2,7 +2,7 @@
  <a-card :bordered="false">
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div class="table-page-search-wrapper">
    <div class="table-page-search-wrapper" v-if="isDisplayOperation">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :xl="4" :lg="7" :md="8" :sm="24">
@@ -12,17 +12,20 @@
          </a-col>
          <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <a-form-item label="设备编号">
              <lx-search-equipment-select placeholder="请输入设备编号或名称搜索" v-model="queryParam.equipmentId"></lx-search-equipment-select>
              <lx-search-equipment-select placeholder="请输入设备编号或名称搜索"
                                          v-model="queryParam.equipmentId"></lx-search-equipment-select>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="计划保养日期">
              <a-range-picker v-model="queryParam.maintenanceDateRange" @change="onMaintenanceDateChange" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
              <a-range-picker v-model="queryParam.maintenanceDateRange" @change="onMaintenanceDateChange"
                              format="YYYY-MM-DD" value-format="YYYY-MM-DD"/>
            </a-form-item>
          </a-col>
          <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <a-form-item label="保养状态">
              <j-dict-select-tag placeholder="请选择保养状态" dict-code="week_maintenance_status" v-model="queryParam.maintenanceStatus" />
              <j-dict-select-tag placeholder="请选择保养状态" dict-code="week_maintenance_status"
                                 v-model="queryParam.maintenanceStatus"/>
            </a-form-item>
          </a-col>
          <a-col :xl="4" :lg="7" :md="8" :sm="24">
@@ -37,16 +40,16 @@
    </div>
    <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
    <div class="table-operator">
      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
    <div class="table-operator" v-if="isDisplayOperation">
      <a-button @click="handleAdd" type="primary" icon="plus" v-if="isShowAuth('eam:weekMaintenance:add')">新增</a-button>
      <a-dropdown v-if="selectedRowKeys.length > 0">
        <a-menu slot="overlay">
          <a-menu-item key="1" @click="handlerBatchAbolish">
          <a-menu-item key="1" @click="handlerBatchAbolish" v-if="isShowAuth('eam:weekMaintenance:abolish')">
            <a-icon type="delete" />
            ä½œåºŸ
          </a-menu-item>
          <a-menu-item key="1" @click="handlerBatchCollect">
            <a-icon type="delete" />
          <a-menu-item key="2" @click="handlerBatchCollect" v-if="isShowAuth('eam:weekMaintenance:collect')">
            <a-icon type="form"/>
            é¢†å–
          </a-menu-item>
        </a-menu>
@@ -58,7 +61,7 @@
    <!-- table区域-begin -->
    <div>
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;" v-if="isDisplayOperation">
        <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>
@@ -74,21 +77,26 @@
        :pagination="ipagination"
        :loading="loading"
        class="j-table-force-nowrap"
        :scroll="{x:'max-content'}"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        @change="handleTableChange">
        <span slot="action" slot-scope="text, record">
          <a v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE'" @click="handleEdit(record)">编辑</a>
          <template v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE' && isShowAuth('eam:weekMaintenance:edit')">
          <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 v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE'">
                <a-popconfirm title="确定领取吗?" @confirm="() => handlerCollect(record.id)">
                  <a>领取</a>
                </a-popconfirm>
              </a-menu-item>
              <a-menu-item v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE'">
          <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="() => handlerAbolish(record.id)">
                  <a>作废</a>
                </a-popconfirm>
@@ -98,14 +106,20 @@
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>
          </template>
          <template v-else>
              <a @click="handleDetail(record)">详情</a>
          </template>
        </span>
      </a-table>
    </div>
    <!-- table区域-end -->
    <!-- è¡¨å•区域 -->
    <eamWeekMaintenanceOrder-modal ref="modalForm" @ok="modalFormOk"></eamWeekMaintenanceOrder-modal>
    <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal"
                                     :selectShenpiData="selectWeekMaintenanceData"></week-maintenance-approval-modal>
  </a-card>
</template>
@@ -115,17 +129,27 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue'
import { deleteAction, getAction } from '@api/manage'
  import WeekMaintenanceApprovalModal from '@views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal'
export default {
  name: 'EamWeekMaintenanceOrderList',
  mixins: [JeecgListMixin],
  components: {
    LxSearchEquipmentSelect,
    EamWeekMaintenanceOrderModal
      EamWeekMaintenanceOrderModal,
      WeekMaintenanceApprovalModal
    },
    props: {
      isDisplayOperation: {
        type: Boolean,
        default: true
      }
  },
  data() {
    return {
      description: '周保工单管理页面',
        disableMixinCreated: true,
        selectWeekMaintenanceData: {},
      // è¡¨å¤´
      columns: [
        {
@@ -134,6 +158,7 @@
          key: 'rowIndex',
          width: 60,
          align: 'center',
            fixed: 'left',
          customRender: function(t, r, index) {
            return parseInt(index) + 1
          }
@@ -141,88 +166,158 @@
        {
          title: '工单号',
          align: 'center',
          dataIndex: 'orderNum'
            dataIndex: 'orderNum',
            fixed: 'left',
            width: 60
        },
        {
          title: '设备编号',
          align: 'center',
          dataIndex: 'equipmentCode'
            dataIndex: 'equipmentCode',
            fixed: 'left',
            width: 60
        },
        {
          title: '设备名称',
          align: 'center',
          dataIndex: 'equipmentName'
            dataIndex: 'equipmentName',
            fixed: 'left',
            width: 60
        },
        {
          title: '标准名称',
          align: 'center',
          dataIndex: 'standardId_dictText'
            dataIndex: 'standardId_dictText',
            width: 100
        },
        {
          title: '计划保养日期',
          align: 'center',
          dataIndex: 'maintenanceDate'
            dataIndex: 'maintenanceDate',
            width: 60
        },
        {
          title: '实际开始时间',
          align: 'center',
          dataIndex: 'actualStartTime'
            dataIndex: 'actualStartTime',
            width: 60
        },
        {
          title: '实际结束时间',
          align: 'center',
          dataIndex: 'actualEndTime'
            dataIndex: 'actualEndTime',
            width: 60
        },
        {
          title: '保养人',
          align: 'center',
          dataIndex: 'operator_dictText'
            dataIndex: 'operator_dictText',
            width: 60
        },
        {
          title: '保养状态',
          align: 'center',
          dataIndex: 'maintenanceStatus_dictText'
            dataIndex: 'maintenanceStatus_dictText',
            width: 60
        },
        {
          title: '创建方式',
          align: 'center',
          dataIndex: 'creationMethod_dictText'
            dataIndex: 'creationMethod_dictText',
            width: 60
        },
        {
          title: '确认人',
          align: 'center',
          dataIndex: 'confirmUser_dictText'
            dataIndex: 'confirmUser_dictText',
            width: 60
        },
        {
          title: '确认时间',
          align: 'center',
          dataIndex: 'confirmTime'
            dataIndex: 'confirmTime',
            width: 60
        },
        {
          title: '保养图片',
            title: '确认意见',
          align: 'center',
          dataIndex: 'imageFiles'
            dataIndex: 'confirmComment',
            width: 60
          },
          {
            title: '初验收人',
            align: 'center',
            dataIndex: 'initialAcceptanceUser_dictText',
            width: 60
          },
          {
            title: '初验收时间',
            align: 'center',
            dataIndex: 'initialAcceptanceTime',
            width: 60
          },
          {
            title: '初验收意见',
            align: 'center',
            dataIndex: 'initialAcceptanceComment',
            width: 60
          },
          {
            title: '终验收人',
            align: 'center',
            dataIndex: 'finalAcceptanceUser_dictText',
            width: 60
          },
          {
            title: '终验收时间',
            align: 'center',
            dataIndex: 'finalAcceptanceTime',
            width: 60
          },
          {
            title: '终验收意见',
            align: 'center',
            dataIndex: 'finalAcceptanceComment',
            width: 60
        },
        {
          title: '备注',
          align: 'center',
          dataIndex: 'remark',
          editable: true,
        },
        {
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          scopedSlots: { customRender: 'action' }
            width: 60
        }
          // {
          //   title: '操作',
          //   dataIndex: 'action',
          //   align: 'center',
          //   fixed: 'right',
          //   width: 100,
          //   scopedSlots: { customRender: 'action' }
          // }
      ],
      url: {
        list: '/eam/weekMaintenanceOrder/list',
        abolish: '/eam/weekMaintenanceOrder/abolish',
        abolishBatch: '/eam/weekMaintenanceOrder/abolishBatch',
        collect: '/eam/weekMaintenanceOrder/collect',
          collectBatch: '/eam/weekMaintenanceOrder/collectBatch'
      }
    }
    },
    created() {
      if (!this.isDisplayOperation) {
        return
      }
      const operationColumn = {
        title: '操作',
        dataIndex: 'action',
        align: 'center',
        fixed: 'right',
        width: 200,
        scopedSlots: { customRender: 'action' }
      }
      this.columns = [...this.columns, operationColumn]
      this.loadData(1)
  },
  computed: {},
  methods: {
@@ -232,10 +327,10 @@
    },
    handlerAbolish(id) {
      if(!this.url.abolish){
        this.$message.error("请设置url.abolish属性!")
          this.$message.error('请设置url.abolish属性!')
        return
      }
      var that = this;
        var that = this
      deleteAction(that.url.abolish, {id: id}).then((res) => {
        if (res.success) {
          //重新计算分页问题
@@ -244,40 +339,40 @@
          that.$notification.success({
            message:'消息',
            description:res.message
          });
          that.loadData();
            })
            that.loadData()
        } else {
          // that.$message.warning(res.message);
          that.$notification.warning({
            message:'消息',
            description:res.message
          });
            })
        }
      });
        })
    },
    handlerBatchAbolish() {
      if(!this.url.abolishBatch){
        this.$message.error("请设置url.abolishBatch属性!")
          this.$message.error('请设置url.abolishBatch属性!')
        return
      }
      if (this.selectedRowKeys.length <= 0) {
        // this.$message.warning('请选择一条记录!');
        this.$notification.warning({
          message:'消息',
          description:"请选择一条记录"
        });
        return;
            description: '请选择一条记录'
          })
          return
      } else {
        var ids = "";
          var ids = ''
        for (var a = 0; a < this.selectedRowKeys.length; a++) {
          ids += this.selectedRowKeys[a] + ",";
            ids += this.selectedRowKeys[a] + ','
        }
        var that = this;
          var that = this
        this.$confirm({
          title: "确认作废",
          content: "是否作废选中数据,只有待保养状态的数据才可作废成功?",
            title: '确认作废',
            content: '是否作废选中数据,只有待保养状态的数据才可作废成功?',
          onOk: function () {
            that.loading = true;
              that.loading = true
            deleteAction(that.url.abolishBatch, {ids: ids}).then((res) => {
              if (res.success) {
                //重新计算分页问题
@@ -286,30 +381,30 @@
                that.$notification.success({
                  message:'消息',
                  description:res.message
                });
                that.loadData();
                that.onClearSelected();
                  })
                  that.loadData()
                  that.onClearSelected()
              } else {
                // that.$message.warning(res.message);
                that.$notification.warning({
                  message:'消息',
                  description:res.message
                });
                  })
              }
            }).finally(() => {
              that.loading = false;
            });
                that.loading = false
              })
          }
        });
          })
      }
    },
    //单个领取
    handlerCollect(id) {
      if(!this.url.collect){
        this.$message.error("请设置url.collect属性!")
          this.$message.error('请设置url.collect属性!')
        return
      }
      var that = this;
        let that = this
      getAction(that.url.collect, {id: id}).then((res) => {
        if (res.success) {
          //重新计算分页问题
@@ -318,20 +413,71 @@
          that.$notification.success({
            message:'消息',
            description:res.message
          });
          that.loadData();
            })
            that.loadData()
        } else {
          // that.$message.warning(res.message);
          that.$notification.warning({
            message:'消息',
            description:res.message
          });
            })
        }
      });
        })
    },
    //批量领取
    handlerBatchCollect(){
        if (!this.url.collectBatch) {
          this.$message.error('请设置url.abolishBatch属性!')
          return
        }
        if (this.selectedRowKeys.length <= 0) {
          // this.$message.warning('请选择一条记录!');
          this.$notification.warning({
            message: '消息',
            description: '请选择一条记录'
          })
          return
        } else {
          var ids = ''
          for (var a = 0; a < this.selectedRowKeys.length; a++) {
            ids += this.selectedRowKeys[a] + ','
          }
          var that = this
          this.$confirm({
            title: '确认领取',
            content: '是否领取选中数据,只有待保养状态的数据才可领取成功?',
            onOk: function() {
              that.loading = true
              deleteAction(that.url.collectBatch, { ids: ids }).then((res) => {
                if (res.success) {
                  //重新计算分页问题
                  that.reCalculatePage(that.selectedRowKeys.length)
                  // that.$message.success(res.message);
                  that.$notification.success({
                    message: '消息',
                    description: res.message
                  })
                  that.loadData()
                  that.onClearSelected()
                } else {
                  // that.$message.warning(res.message);
                  that.$notification.warning({
                    message: '消息',
                    description: res.message
                  })
                }
              }).finally(() => {
                that.loading = false
              })
            }
          })
        }
      },
      handleDetail(record) {
        this.selectWeekMaintenanceData = Object.assign({}, record)
        this.$refs.weekMaintenanceApprovalModal.recordDetail(record)
        this.$refs.weekMaintenanceApprovalModal.title = '详情'
        this.$refs.weekMaintenanceApprovalModal.disableSubmit = true
    }
  }
}
src/views/eam/maintenance/modules/EamInspectionOrderDetailForm.vue
ÎļþÒÑɾ³ý
src/views/eam/maintenance/modules/EamInspectionOrderForm.vue
ÎļþÒÑɾ³ý
src/views/eam/maintenance/modules/EamInspectionOrderModal.vue
@@ -5,79 +5,69 @@
    :visible="visible"
    :confirmLoading="confirmLoading"
    switchFullscreen
    centered
    :mask-closable="false"
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭">
    <a-spin :spinning="confirmLoading">
      <a-form-model ref="form" :model="model" :rules="validatorRules">
    <a-spin :spinning="spinning">
      <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol">
        <a-row :gutter="24">
          <a-col :span="8">
            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardCode" label="工单号">
              <a-input placeholder="工单号自动生成" v-model="model.orderNum" disabled />
            <a-form-model-item prop="standardCode" label="工单号">
              <a-input placeholder="工单号自动生成" v-model="model.orderNum" readOnly/>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="设备编号">
            <a-form-model-item prop="equipmentId" label="设备编号">
              <MaintenanceEquipmentSelect placeholder="请输入设备编号或名称搜索" v-model="model.equipmentId"
                                          :maintenanceCategory="maintenanceCategory" :disabled="editable"
                                          @autocompleteForm="autocompleteForm"></MaintenanceEquipmentSelect>
                                          :maintenanceCategory="maintenanceCategory" :disabled="disabled"
                                          @autocompleteForm="autocompleteForm"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardName" label="标准名称">
              <a-input placeholder="请输入标准名称" disabled v-model="model.standardName" />
            <a-form-model-item prop="standardName" label="标准名称">
              <a-input placeholder="选择设备后自动带出" readOnly v-model="model.standardName"/>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="8">
            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardCode" label="标准编码">
              <a-input placeholder="请输入标准编码" disabled v-model="model.standardCode" />
            <a-form-model-item prop="standardCode" label="标准编码">
              <a-input placeholder="选择设备后自动带出" readOnly v-model="model.standardCode"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancePeriod" label="保养周期">
              <a-input-number v-model="model.maintenancePeriod" :min="1" :precision="0" disabled style="width: 100%" />
            <a-form-model-item label="保养周期">
              <a-input placeholder="选择设备后自动带出" v-model="model.maintenancePeriod" readOnly/>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator" label="点检人">
              <j-dict-select-tag v-model="model.operator" placeholder="请选择用户" dictCode="sys_user,realname,username,username!='admin' order by create_time"/>
            <a-form-model-item prop="operator" label="点检人">
              <j-search-select-tag v-model="model.operator" placeholder="请选择点检人" :disabled="!model.equipmentId"
                                   :dictOptions="maintenanceOperatorOptions"/>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="8">
            <a-form-model-item label="点检日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inspectionDate">
              <j-date placeholder="请选择点检日期" v-model="model.inspectionDate" @change="expirationTimeFrom(model.inspectionDate)" style="width: 100%" />
            <a-form-model-item label="点检日期" prop="inspectionDate">
              <j-date :placeholder="!model.maintenancePeriod?'请填写保养周期':'请选择点检日期'" v-model="model.inspectionDate"
                      :disabled="!model.maintenancePeriod"
                      @change="expirationTimeFrom(model.inspectionDate)" style="width: 100%"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="点检过期时间" :labelCol="{span:6}" :wrapperCol="{span:15}" prop="expirationTime">
              <j-date placeholder="请选择点检过期时间" v-model="model.expirationTime" disabled style="width: 100%" />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="8">
            <a-form-model-item
              label="照片文件"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              prop="imageFiles">
              <lx-upload :returnUrl="false"
                         :multiple="false"
                         v-model="model.imageFiles"
                         biz="EamMaintenanceStandard">
              </lx-upload>
            <a-form-model-item label="点检过期时间">
              <j-date placeholder="选择点检日期后自动带出" v-model="model.expirationTime" disabled style="width: 100%"/>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="24">
            <a-form-model-item label="备注" :labelCol="{span:1}" :wrapperCol="{span:22}" prop="remark">
            <a-form-model-item label="备注" :labelCol="{span:2}" :wrapperCol="{span:21}" prop="remark">
              <a-textarea v-model="model.remark" rows="3" placeholder="请输入备注" />
            </a-form-model-item>
          </a-col>
@@ -120,41 +110,41 @@
      title: '操作',
      visible: false,
      model: {},
      editable: false,
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 }
          sm: { span: 6 }
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 }
          sm: { span: 15 }
      },
      confirmLoading: false,
        spinning: false,
        disabled: false,
      validatorRules: {
        standardName: [
          { required: true, message: '请输入标准名称!' }
          // standardName: [
          //   { required: true, message: '请输入标准名称!' }
          // ],
          inspectionDate: [
            { required: true, message: '请选择点检日期!' }
        ],
        maintenanceCategory: [
          { required: true, message: '请选择保养分类!' }
        ],
        initialDate: [
          { required: true, message: '请选择初始日期!' }
        ],
        maintenancePeriod: [
          { required: true, message: '请输入保养周期,单位:天!' }
        ],
          // maintenancePeriod: [
          //   { required: true, message: '请输入保养周期,单位:天!' }
          // ],
        equipmentId: [
          { required: true, message: '请选择设备!' }
        ],
          ]
      },
      url: {
        add: '/eam/eamInspectionOrder/add',
        edit: '/eam/eamInspectionOrder/edit',
        detail: '/eam/eamMaintenanceStandardDetail/queryList',
        detailOrder: '/eam/eamInspectionOrderDetail/queryList'
          detailOrder: '/eam/eamInspectionOrderDetail/queryList',
          userSelect: '/eam/user_select/list'
      },
      maintenanceCategory: 'POINT_INSPECTION',
      standardId:"",
        maintenanceOperatorOptions: [],
        standardId: '',
      standardType:false,
      detail: {
        loading: false,
@@ -165,7 +155,7 @@
            key: 'itemCode',
            type: JVXETypes.inputNumber,
            width: '10%',
            align:"center",
              align: 'center',
            validateRules: [
              {required : true, unique: true, message: '序号不能重复'}
            ]
@@ -175,7 +165,7 @@
            key: 'itemName',
            type: JVXETypes.textarea,
            width: '20%',
            align:"center",
              align: 'center',
            validateRules: [
              {required : true, message: '保养项不能为空!'}
            ]
@@ -185,11 +175,11 @@
            key: 'itemDemand',
            type: JVXETypes.textarea,
            width: '30%',
            align:"center",
              align: 'center',
            validateRules: [
              {required : true, message: "保养要求不能为空!"}
                { required: true, message: '保养要求不能为空!' }
            ]
          },
            }
        ]
      }
    }
@@ -199,18 +189,18 @@
  methods: {
    add() {
      this.model = {}
      this.detail.dataSource = [];
        this.detail.dataSource = []
      this.visible = true
      this.editable = false
      this.standardType=false;
        this.disabled = false
        this.standardType = false
    },
    edit(record) {
      console.log(record)
      this.model = Object.assign({}, record)
      this.standardId=record.standardId
      this.standardType=true;
        this.disabled = true
        this.standardType = true
      this.visible = true
      this.editable = true
      this.detail.dataSource = []
      if (record && record.referenceFile) {
        let obj = JSON.parse(record.referenceFile)
@@ -220,11 +210,7 @@
      }
      this.loadDetailOrder(record.id)
    },
    close() {
      this.$emit('close')
      this.visible = false
      this.$refs.form.clearValidate()
    },
    async handleOk() {
      const that = this
      let errMap = await that.$refs.editableDetailTable.validateTable()
@@ -240,7 +226,7 @@
          that.model.tableDetailList = [...tableData]
          that.model.removeDetailList = [...removeData]
          that.confirmLoading = true
            that.confirmLoading = that.spinning = true
          let httpurl = ''
          let method = ''
          if (!this.model.id) {
@@ -260,25 +246,34 @@
              that.$message.warning(res.message)
            }
          }).finally(() => {
            that.confirmLoading = false
              that.confirmLoading = that.spinning = false
          })
        } else {
          return false
        }
      })
    },
    handleCancel() {
      this.close()
    },
    autocompleteForm(selectObj) {
      this.model.standardName = selectObj.standardName
      this.model.maintenancePeriod=selectObj.maintenancePeriod
      this.model.standardCode=selectObj.standardCode
        // è‹¥å–消设备选择后保养周期为空则需清空点检日期和点检过期时间
        if (!this.model.equipmentId) {
          delete this.model.inspectionDate
          delete this.model.expirationTime
        } else {
          // å¦‚果点检日期存在,则在重新选择设备后即保养周期可能发生改变后重新计算过期时间
          if (this.model.inspectionDate) this.expirationTimeFrom(this.model.inspectionDate)
        }
      if (!this.standardType) {
          console.log('this.standardType', this.standardType)
        this.standardId=selectObj.id
        this.loadDetail(selectObj.id)
      }
        this.$nextTick(() => this.loadMaintenanceOperatorList(this.model.equipmentId))
    },
    expirationTimeFrom(date) {
      //过期时间是初始时间+保养周期
      if (date && this.model.maintenancePeriod) {
@@ -287,28 +282,79 @@
          .add(this.model.maintenancePeriod, 'days')
          .format('YYYY-MM-DD')
      } else {
        this.model.expirationTime = null; // æ¸…空无效值
          this.model.expirationTime = null // æ¸…空无效值
      }
    },
    //加载详情数据
    loadDetail(standardId) {
        this.detail.dataSource = []
      if (standardId) {
        getAction(this.url.detail, { standardId: standardId }).then(res => {
          console.log('standardId', standardId)
          this.spinning = true
          getAction(this.url.detail, { standardId: standardId })
            .then(res => {
          if (res.success) {
            this.detail.dataSource = [...res.result]
            this.standardType=false;
          }
            })
            .finally(() => {
              this.spinning = false
        })
      }
    },
    loadDetailOrder(orderId){
      if (orderId) {
        getAction(this.url.detailOrder, { orderId: orderId }).then(res => {
          this.spinning = true
          getAction(this.url.detailOrder, { orderId: orderId })
            .then(res => {
          if (res.success) {
            this.detail.dataSource = [...res.result]
          }
        })
            .finally(() => {
              this.spinning = false
            })
      }
      },
      loadMaintenanceOperatorList(equipmentId) {
        this.maintenanceOperatorOptions = []
        let params = { positionCode: 'PCR0001' }
        if (equipmentId) {
          params.equipmentId = equipmentId
        } else {
          delete this.model.operator
          return
        }
        const that = this
        getAction(this.url.userSelect, params)
          .then(res => {
            if (res.success) {
              that.maintenanceOperatorOptions = res.result.map(item => ({
                key: item.id,
                value: item.username,
                text: item.realname
              }))
              if (!that.maintenanceOperatorOptions.find(item => item.value === that.model.operator)) delete that.model.operator
            } else {
              if (that.model.operator) delete that.model.operator
            }
          })
          .catch(err => {
            if (that.model.operator) delete that.model.operator
          })
      },
      handleCancel() {
        this.close()
      },
      close() {
        this.$emit('close')
        this.visible = false
        this.$refs.form.clearValidate()
    }
  }
}
src/views/eam/maintenance/modules/EamInspectionOrderModalXq.vue
ÎļþÒÑɾ³ý
src/views/eam/maintenance/modules/EamWeekMaintenanceOrderModal.vue
@@ -5,46 +5,47 @@
    :visible="visible"
    :confirmLoading="confirmLoading"
    switchFullscreen
    :mask-closable="false"
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭">
    <a-spin :spinning="confirmLoading">
      <a-form-model ref="form" :model="model" :rules="validatorRules">
    <a-spin :spinning="spinning">
      <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol">
        <a-row :gutter="24">
          <a-col :span="8">
            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderNum" label="工单号">
            <a-form-model-item prop="orderNum" label="工单号">
              <a-input placeholder="工单号系统自动生成" v-model="model.orderNum" disabled />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="设备编码">
            <a-form-model-item prop="equipmentId" label="设备编码">
              <maintenance-equipment-select placeholder="请输入设备编号或名称搜索" v-model="model.equipmentId"
                                            :maintenanceCategory="maintenanceCategory"
                                            @autocompleteForm="autocompleteForm" :disabled="editable"></maintenance-equipment-select>
                                            @autocompleteForm="autocompleteForm"
                                            :disabled="editable"></maintenance-equipment-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardName" label="标准名称">
            <a-form-model-item prop="standardName" label="标准名称">
              <a-input placeholder="选择设备后自动带出" v-model="model.standardName" disabled />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="8">
            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenanceDate" label="保养日期">
            <a-form-model-item prop="maintenanceDate" label="保养日期">
              <a-date-picker placeholder="请选择计划保养日期" v-model="model.maintenanceDate" format="YYYY-MM-DD"
                             style="width: 100%" />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator" label="保养人">
              <j-search-select-tag v-model="model.operator" placeholder="请选择保养人"
            <a-form-model-item prop="operator" label="保养人">
              <j-search-select-tag v-model="model.operator" placeholder="请选择保养人" :disabled="!model.equipmentId"
                                 :dictOptions="maintenanceOperatorOptions" />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancePeriod" label="保养周期">
            <a-form-model-item prop="maintenancePeriod" label="保养周期">
              <a-input placeholder="选择设备后自动带出" v-model="model.maintenancePeriod" disabled />
            </a-form-model-item>
          </a-col>
@@ -55,6 +56,7 @@
          </a-form-model-item>
        </a-row>
        <a-row :gutter="24">
          <a-spin :spinning="detail.loading">
          <j-vxe-table
            ref="editableDetailTable"
            :rowNumber="true"
@@ -65,10 +67,10 @@
            :toolbarConfig="detail.toolbarConfig"
            keep-source
            :height="300"
            :loading="detail.loading"
            :dataSource="detail.dataSource"
            :columns="detail.columns"
            style="margin-top: 8px;" />
          </a-spin>
        </a-row>
      </a-form-model>
    </a-spin>
@@ -112,6 +114,7 @@
        sm: { span: 21 }
      },
      confirmLoading: false,
        spinning: false,
      validatorRules: {
        equipmentId: [
          { required: true, message: '请选择设备!' }
@@ -125,7 +128,7 @@
        edit: '/eam/weekMaintenanceOrder/edit',
        standardDetail: '/eam/eamMaintenanceStandardDetail/queryList',
        detail: '/eam/weekMaintenanceOrderDetail/queryList',
        userSelect: '/eam/user_select/list',
          userSelect: '/eam/user_select/list'
      },
      detail: {
        loading: false,
@@ -197,7 +200,6 @@
      this.visible = true
      this.editable = false
      this.detail.dataSource = []
      this.loadMaintenanceOperatorList();
    },
    edit(record) {
      this.model = Object.assign({}, record)
@@ -271,15 +273,19 @@
      this.$set(this.model, 'standardId', selectObj.id)
      this.$set(this.model, 'equipmentId', selectObj.equipmentId)
      // console.log('model', this.model)
        if (!this.model.equipmentId) delete this.model.operator
      if (!this.model.id) {
        this.loadStandardDetail(selectObj.id)
      }
      this.loadMaintenanceOperatorList(this.model.equipmentId);
        this.loadMaintenanceOperatorList(this.model.equipmentId)
    },
    //加载详情数据
    loadStandardDetail(standardId) {
        this.detail.dataSource = []
      if (standardId) {
        getAction(this.url.standardDetail, { standardId: standardId }).then(res => {
          this.spinning = true
          getAction(this.url.standardDetail, { standardId: standardId })
            .then(res => {
          if (res.success) {
            this.detail.dataSource = res.result.map(item => ({
              itemCode: item.itemCode,
@@ -288,6 +294,9 @@
              itemDemand: item.itemDemand
            }))
          }
            })
            .finally(() => {
              this.spinning = false
        })
      }
    },
@@ -307,15 +316,24 @@
      if (equipmentId) {
        params.equipmentId = equipmentId
      }
      getAction(this.url.userSelect, params).then(res => {
        else return
        const that = this
        getAction(this.url.userSelect, params)
          .then(res => {
        if (res.success) {
          this.maintenanceOperatorOptions = res.result.map(item => ({
              that.maintenanceOperatorOptions = res.result.map(item => ({
            key: item.id,
            value: item.username,
            text: item.realname
          }))
              if (!that.maintenanceOperatorOptions.find(item => item.value === that.model.operator)) delete that.model.operator
            } else {
              if (that.model.operator) delete that.model.operator
        }
      })
          .catch(err => {
            if (that.model.operator) delete that.model.operator
          })
    }
  }
src/views/eam/repair/EamRepairOrderList.vue
@@ -45,7 +45,7 @@
    <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
    <div class="table-operator" v-if="isDisplayOperation">
      <a-button @click="handleOpenReceiveFaultModal" type="primary" icon="plus">领取</a-button>
      <a-button type="primary" icon="download" @click="handleExportXls('维修工单')">导出</a-button>
      <!--<a-button type="primary" icon="download" @click="handleExportXls('维修工单')">导出</a-button>-->
      <a-dropdown v-if="selectedRowKeys.length > 0">
        <a-menu slot="overlay">
          <a-menu-item key="1" @click="batchDel">
@@ -81,34 +81,16 @@
        @change="handleTableChange"
        :scroll="{x:'max-content'}"
      >
        <span slot="action" slot-scope="text, record">
          <a @click="handleOpenApplySparePartsModal(record)">申请备件</a>
          <a-divider type="vertical"/>
          <a @click="handleOpenRepairCompletedModal(record)">完成维修</a>
          <!--<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>-->
          <a @click="handleDetail(record)">详情</a>
        </span>
      </a-table>
    </div>
    <!-- table区域-end -->
    <receive-fault-modal ref="receiveFaultModalRef" @ok="loadData"/>
    <repair-order-approval-modal ref="repairOrderApprovalModal" :selectShenpiData="selectRepairOrderData"/>
  </a-card>
</template>
@@ -118,11 +100,13 @@
  import ReceiveFaultModal from './modules/EamRepairOrderList/ReceiveFaultModal'
  import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api'
  import LxSearchEquipmentSelect from '../equipment/modules/LxSearchEquipmentSelect'
  import RepairOrderApprovalModal from '../../flowable/workflow/repairOrder/RepairOrderApprovalModal'
  export default {
    name: 'EamRepairOrderList',
    mixins: [JeecgListMixin],
    components: {
      RepairOrderApprovalModal,
      LxSearchEquipmentSelect,
      ReceiveFaultModal
    },
@@ -167,6 +151,12 @@
            width: 100
          },
          {
            title: '维修负责人',
            align: 'center',
            dataIndex: 'repairer',
            width: 100
          },
          {
            title: '维修开始时间',
            align: 'center',
            dataIndex: 'actualStartTime',
@@ -181,26 +171,20 @@
          {
            title: '故障原因',
            align: 'center',
            dataIndex: 'faultReason',
            width: 150
            dataIndex: 'faultReason'
          },
          {
            title: '维修结果描述',
            align: 'center',
            dataIndex: 'repairDescription',
            width: 300
          },
          {
            title: '维修图片',
            align: 'center',
            dataIndex: 'imageFiles',
            width: 100
          },
          {
            title: '维修负责人',
            align: 'center',
            dataIndex: 'repairer'
          },
            dataIndex: 'repairDescription'
            // width: 300
          }
          // {
          //   title: '维修图片',
          //   align: 'center',
          //   dataIndex: 'imageFiles',
          //   width: 100
          // },
          // {
          //   title: '是否委外',
          //   align: 'center',
@@ -233,6 +217,7 @@
          // },
        ],
        report_repair_status_list: [],
        selectRepairOrderData: {},
        url: {
          list: '/eam/eamRepairOrder/list',
          delete: '/eam/eamRepairOrder/delete',
@@ -255,6 +240,7 @@
        title: '操作',
        dataIndex: 'action',
        align: 'center',
        width: 100,
        scopedSlots: { customRender: 'action' }
      }
      this.columns = [...this.columns, operationColumn]
@@ -283,23 +269,19 @@
      // å¼€å¯é¢†å–故障保修单弹窗
      handleOpenReceiveFaultModal() {
        this.$refs.receiveFaultModalRef.visible = true
        this.$refs.receiveFaultModalRef.loadData()
      },
      /**
       * å¼€å¯ç”³è¯·å¤‡ä»¶å¼¹çª—
       * ç‚¹å‡»è¯¦æƒ…触发
       * @param record è¡¨æ ¼è¡Œä¿¡æ¯
       */
      handleOpenApplySparePartsModal(record) {
      },
      /**
       * å¼€å¯å®Œæˆç»´ä¿®å¼¹çª—
       * @param record è¡¨æ ¼è¡Œä¿¡æ¯
       */
      handleOpenRepairCompletedModal(record) {
      handleDetail(record) {
        this.selectRepairOrderData = Object.assign({}, record)
        this.$refs.repairOrderApprovalModal.visible = true
        this.$refs.repairOrderApprovalModal.title = '详情'
        this.$refs.repairOrderApprovalModal.disableSubmit = true
        this.$refs.repairOrderApprovalModal.getAllApproveData(record)
        this.$refs.repairOrderApprovalModal.getBasicInformation({ ...record, dataId: record.id })
      }
    }
  }
src/views/eam/repair/EamReportRepairList.vue
@@ -12,28 +12,18 @@
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24" v-if="isDisplayOperation">
            <a-form-item label="单据状态">
              <a-select placeholder="请选择单据状态" v-model="queryParam.reportStatus" allow-clear>
            <a-form-item label="报修状态">
              <a-select placeholder="请选择报修状态" v-model="queryParam.reportStatus" allow-clear>
                <a-select-option v-for="item in report_repair_status_list" :key="item.value">{{ item.label }}
                </a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="故障简称">
              <!--              <a-select placeholder="请选择故障简称" v-model="queryParam.faultName" allow-clear>-->
              <!--                <a-select-option v-for="item in faultReasonList" :key="item.faultName">-->
              <!--                  {{ item.faultName }}-->
              <!--                </a-select-option>-->
              <!--              </a-select>-->
              <a-input placeholder="请输入故障简称" v-model="queryParam.faultName" allow-clear/>
            <a-form-item label="故障描述">
              <a-input placeholder="请输入故障描述" v-model="queryParam.faultDescription" allow-clear/>
            </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.faultType"></a-input>-->
          <!--              </a-form-item>-->
          <!--            </a-col>-->
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="故障时间">
              <a-range-picker showTime v-model="faultTimeRange" value-format="YYYY-MM-DD HH:mm:ss"
@@ -69,11 +59,11 @@
    <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
    <div class="table-operator" v-if="isDisplayOperation">
      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
      <a-button type="primary" icon="download" @click="handleExportXls('故障报修')">导出</a-button>
      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
                @change="handleImportExcel">
        <a-button type="primary" icon="import">导入</a-button>
      </a-upload>
      <!--<a-button type="primary" icon="download" @click="handleExportXls('故障报修')">导出</a-button>-->
      <!--<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
                <!--@change="handleImportExcel">-->
        <!--<a-button type="primary" icon="import">导入</a-button>-->
      <!--</a-upload>-->
      <a-dropdown v-if="selectedRowKeys.length > 0">
        <a-menu slot="overlay">
          <a-menu-item key="1" @click="batchDel">
@@ -105,7 +95,7 @@
        :pagination="ipagination"
        :loading="loading"
        class="j-table-force-nowrap"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:isDisplayOperation?'checkbox':'radio'}"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:isDisplayOperation?'checkbox':'radio',getCheckboxProps:getCheckboxProps}"
        @change="handleTableChange">
        <template slot="imageFiles" slot-scope="text, record" v-if="text">
@@ -184,7 +174,7 @@
            width: 200
          },
          {
            title: '状态',
            title: '报修状态',
            align: 'center',
            dataIndex: 'reportStatus_dictText',
            width: 100
@@ -255,7 +245,6 @@
    created() {
      this.initDictData('breakdown_flag')
      this.initDictData('report_repair_status')
      this.getFaultReasonListByApi()
      if (!this.isDisplayOperation) this.queryParam = Object.assign({} ,this.propsQueryParam)
      else {
        const operationColumn = {
@@ -266,6 +255,7 @@
          width: 150
        }
        this.columns = [...this.columns, operationColumn]
        this.getFaultReasonListByApi()
      }
      this.loadData(1)
    },
@@ -317,6 +307,14 @@
        this.$refs.imagesPreviewModalRef.visible = true
      },
      getCheckboxProps(record) {
        return {
          props: {
            disabled: record.reportStatus !== 'WAIT_REPAIR'
          }
        }
      },
      searchReset() {
        if (this.isDisplayOperation) this.queryParam = {}
        else this.queryParam = Object.assign({}, this.propsQueryParam)
src/views/eam/repair/modules/EamRepairOrderList/ReceiveFaultModal.vue
@@ -23,7 +23,7 @@
    components: { EamReportRepairList },
    data() {
      return {
        title: '故障保修单',
        title: '故障报修单',
        visible: false,
        model: {},
        labelCol: {
@@ -52,34 +52,36 @@
    created() {
    },
    methods: {
      loadData() {
        this.$nextTick(() => {
          // this.$refs.reportRepairListRef.queryParam.reportStatus = 'WAIT_REPAIR'
          // this.$refs.reportRepairListRef.loadData(1)
        })
      },
      close() {
        this.$emit('close')
        this.visible = false
      },
      handleOk() {
        console.log('rowKey', this.$refs.reportRepairListRef.selectedRowKeys[0])
        const reportId = this.$refs.reportRepairListRef.selectedRowKeys[0]
        if (!reportId) {
          this.$notification.warning({
            message: '消息',
            description: '请选择需领取的故障报修单'
          })
          return
        }
        this.confirmLoading = true
        httpAction(this.url.receiveFault, { reportId }, 'post').then((res) => {
        httpAction(this.url.receiveFault, { reportId }, 'post')
          .then((res) => {
          if (res.success) {
            this.$message.success(res.message)
            this.$emit('ok')
          } else {
            this.$message.warning(res.message)
          }
        }).finally(() => {
          })
          .finally(() => {
          this.confirmLoading = false
          this.close()
        })
      },
      handleCancel() {
        this.close()
      },
      close() {
        this.$emit('close')
        this.visible = false
      }
    }
  }
src/views/eam/repair/modules/EamReportRepairList/EamReportRepairModal.vue
@@ -35,10 +35,13 @@
              <a-input placeholder="请输入故障分类" v-model="model.faultType_dictText" readOnly/>
            </a-form-model-item>
          </a-col>
        </a-row>
          <a-col :span="12">
            <a-form-model-item label="故障描述">
              <a-input placeholder="请输入故障描述" v-model="model.faultDescription" readOnly/>
        <a-row>
          <a-col :span="24">
            <a-form-model-item label="故障描述" prop="faultDescription" :labelCol="labelColLong"
                               :wrapperCol="wrapperColLong">
              <a-textarea placeholder="请输入故障描述" v-model="model.faultDescription"/>
            </a-form-model-item>
          </a-col>
        </a-row>
@@ -47,7 +50,8 @@
          <a-col :span="12">
            <a-form-model-item prop="faultStartTime" label="故障开始时间">
              <a-date-picker showTime placeholder="请选择故障开始时间" v-model="model.faultStartTime"
                             :allow-clear="false" value-format="YYYY-MM-DD HH:mm:ss"/>
                             :allow-clear="false" value-format="YYYY-MM-DD HH:mm:ss" :disabledDate="disabledDate"
                             :disabledTime="disabledTime"/>
            </a-form-model-item>
          </a-col>
@@ -63,7 +67,8 @@
        <a-row>
          <a-col :span="24">
            <a-form-model-item prop="imageFiles" label="报修图片" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
              <j-image-upload v-model="model.imageFiles" :is-multiple="true" :number="3"/>
              <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3"
                         v-model="model.imageFilesResult"/>
            </a-form-model-item>
          </a-col>
        </a-row>
@@ -75,10 +80,6 @@
            </a-form-model-item>
          </a-col>
        </a-row>
        <!--        <a-form-model-item  prop="reportStatus" label="报修状态">-->
        <!--          <a-input placeholder="请输入报修状态" v-model="model.reportStatus" />-->
        <!--        </a-form-model-item>-->
      </a-form-model>
    </a-spin>
  </j-modal>
@@ -87,6 +88,7 @@
<script>
import { httpAction } from '@/api/manage'
import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue'
  import moment from 'moment'
export default {
  name: 'EamReportRepairModal',
@@ -133,6 +135,9 @@
        ],
        faultName: [
          { required: true, message: '请选择故障简称' }
          ],
          faultDescription: [
            { required: true, message: '请输入故障描述' }
        ]
      },
      url: {
@@ -141,19 +146,20 @@
      }
    }
  },
  created() {
  },
  methods: {
    add() {
      //初始化默认值
      this.edit({
        breakdownFlag: this.breakdownFlagList.find(item => item.label === '是').value
          faultDescription: '',
          breakdownFlag: this.breakdownFlagList.find(item => item.label === '否').value
      })
    },
    edit(record) {
      this.model = Object.assign({}, record)
        this.model = Object.assign({}, record, { imageFilesResult: record.imageFiles && this.isJSON(record.imageFiles) ? JSON.parse(record.imageFiles) : null })
      this.visible = true
    },
    handleFaultNameChange(value) {
      const faultReasonItem = this.faultReasonList.find(item => item.faultName === value)
      this.model.faultType = faultReasonItem.faultCategory
@@ -194,10 +200,49 @@
      })
    },
      // åˆ¤æ–­æ˜¯ä¸æ˜¯JSON字符串
      isJSON(str) {
        try {
          JSON.parse(str)
          return true // å¦‚果这里没有抛出异常,说明是JSON格式的字符串
        } catch (e) {
          return false // å¦‚果抛出异常,说明不是JSON格式的字符串
        }
      },
      /**
       * ç¦ç”¨æ—¥æœŸ
       * @params current è¢«ç¦ç”¨çš„æ—¶é—´
       */
      disabledDate(current) {
        // Can not select days after today
        return current > moment().endOf('day')
      },
      /**
       * ç¦ç”¨æ—¥æœŸä¸­çš„æ—¶é—´
       * @returns {{disabledHours: (function(): Array), disabledMinutes: (function(): Array)}}
       */
      disabledTime() {
        function range(start, end) {
          const result = []
          for (let i = start; i < end; i++) {
            result.push(i)
          }
          return result
        }
        return {
          disabledHours: () => range(moment().hour() + 1, 24),
          disabledMinutes: () => range(moment().minute() + 1, 60),
          disabledSeconds: () => range(moment().second() + 1, 60)
        }
      },
    close() {
      this.$emit('close')
      this.visible = false
      this.$refs.form.clearValidate()
        if (this.$refs.form) this.$refs.form.clearValidate()
    }
  }
}
src/views/eam/repair/modules/ImagesPreviewModal.vue
@@ -1,9 +1,9 @@
<template>
  <a-modal title="预览" :visible="visible" width="50%" :footer="null" @cancel="visible=false">
    <template v-for="(item,index) in imageListUrl.split(',')">
    <template v-for="(item,index) in imageUrlArr">
      <img :src="getImageItemUrl(item)" width="100%;"/>
      <a-divider v-if="index+1<imageListUrl.split(',').length" style="margin:20px 0;background-color: #000"></a-divider>
      <a-divider v-if="index+1<imageUrlArr.length" style="margin:20px 0;background-color: #000"></a-divider>
    </template>
  </a-modal>
</template>
@@ -22,6 +22,11 @@
      visible: false
    }
  },
    computed: {
      imageUrlArr() {
        return JSON.parse(this.imageListUrl).map(item => item.filePath)
      }
    },
  methods: {
    getImageItemUrl(imageItemSrcSuffix) {
      return `${window._CONFIG['domianURL']}/${imageItemSrcSuffix}`
src/views/flowable/workflow/FlowCompleted.vue
@@ -11,20 +11,23 @@
        <a-row :gutter="24">
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="流程分类">
              <j-dict-select-tag placeholder="请选择流程分类" v-model="queryParam.category" dictCode="flow_type"></j-dict-select-tag>
              <j-dict-select-tag placeholder="请选择流程分类" v-model="queryParam.category"
                                 dictCode="flow_type"></j-dict-select-tag>
            </a-form-item>
          </a-col>
            <a-col :xl="10" :lg="11" :md="12" :sm="24">
              <a-form-item label="操作时间">
                <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.startTime"></j-date>
              <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust"
                      v-model="queryParam.startTime"></j-date>
                <span class="query-group-split-cust"></span>
                <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.endTime"></j-date>
              <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust"
                      v-model="queryParam.endTime"></j-date>
              </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>
              <a-button @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </span>
          </a-col>
        </a-row>
@@ -48,17 +51,13 @@
        class="j-table-force-nowrap"
        @change="handleTableChange">
        <!-- å­—符串超长截取省略号显示-->
        <span slot="description" slot-scope="text">
          <j-ellipsis :value="text" :length="25" />
        </span>
        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </template>
        <template slot="imgSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
          <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
          <img v-else :src="getImgView(text)" height="25px" alt=""
               style="max-width:80px;font-size: 12px;font-style: italic;"/>
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
@@ -80,12 +79,11 @@
      </a-table>
    </div>
    <AssignFileStreamXq ref="modalFormApproval" :selectShenpiData="selectShenpiData"></AssignFileStreamXq>
    <inspection-order-handle ref="modalFormInspectionOrderXq" :selectShenpiData="selectInspectionOrderXqData"/>
    <DispatchFileXq ref="modalFormDispatchFileXq"  :selectShenpiData="selectDispatchFileXqData"></DispatchFileXq>
    <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal" :selectShenpiData="selectWeekMaintenanceData"/>
    <InspectionOrderXq ref="modalFormInspectionOrderXq"  :selectShenpiData="selectInspectionOrderXqData"></InspectionOrderXq>
    <repair-order-approval-modal ref="repairOrderApprovalModal" :selectShenpiData="selectRepairOrderData"/>
  </a-card>
</template>
@@ -95,22 +93,22 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import JDictSelectTag from '@/components/dict/JDictSelectTag.vue'
import AssignFileStreamXq from '@views/flowable/workflow/assignFileStream/AssignFileStreamXq.vue'
import DispatchFileXq from '@views/flowable/workflow/dispatchFile/DispatchFileXq.vue'
import InspectionOrderXq from '@views/flowable/workflow/InspectionOrder/InspectionOrderXq.vue'
  import InspectionOrderHandle from './InspectionOrder/InspectionOrderHandle'
  import WeekMaintenanceApprovalModal from './weekMaintenance/WeekMaintenanceApprovalModal'
  import RepairOrderApprovalModal from './repairOrder/RepairOrderApprovalModal'
export default {
  name: 'NcDeviceCharactersList',
  mixins:[JeecgListMixin, mixinDevice],
  components: {
    InspectionOrderXq,
    DispatchFileXq,
    AssignFileStreamXq: AssignFileStreamXq,
    JDictSelectTag,
      RepairOrderApprovalModal,
      WeekMaintenanceApprovalModal,
      InspectionOrderHandle,
      JDictSelectTag
  },
  data () {
    return {
      description: '工作流-已办',
        description: '设备特殊字符管理页面',
      // è¡¨å¤´
      columns: [
        {
@@ -118,45 +116,44 @@
          dataIndex: '',
          key:'rowIndex',
          width:200,
          align:"center",
            align: 'center',
          customRender:function (t,r,index) {
            return parseInt(index)+1;
              return parseInt(index) + 1
          }
        },
        {
          title: '流程分类',
          align: "center",
            align: 'center',
          dataIndex: 'category_dictText',
          width: 200,
            width: 200
        },
        {
          title: '流程名称',
          align: "center",
            align: 'center',
          dataIndex: 'procDefName',
          width: 200,
            width: 200
        },
        {
          title:'流程业务简要描述',
          align:"center",
            align: 'center',
          dataIndex: 'description',
          width:300,
          scopedSlots: {customRender: 'description'},
            width: 300
        },
        {
          title: '流程发起人名称',
          align: "center",
            align: 'center',
          dataIndex: 'startUserName',
          width: 250,
            width: 250
        },
        {
          title: '任务名称',
          align: "center",
            align: 'center',
          dataIndex: 'taskName',
          width:250
        },
        {
          title: '操作时间',
          align: "center",
            align: 'center',
          dataIndex: 'finishTime',
          width:300
        },
@@ -170,20 +167,20 @@
        }
      ],
      url: {
        list: "/assign/flow/finishedList",
          list: '/assign/flow/finishedList'
      },
      dictOptions:{},
      selectShenpiData: {},
      selectDispatchFileXqData:{},
      selectInspectionOrderXqData:{}
        selectWeekMaintenanceData: {},
        selectInspectionOrderXqData: {},
        selectRepairOrderData: {}
    }
  },
  created() {
  },
  computed: {
    importExcelUrl: function(){
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
    },
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
      }
  },
  methods: {
    handelDetial(item, index) {
@@ -193,51 +190,68 @@
      let approcesstype = this.splitAprocessType(item.category)
      console.log('approcesstype--->', approcesstype)
      switch (approcesstype) {
        case 'drApproval':
          this.handDrDetial(item)
          break
        case 'ggApproval':
          this.handDispatchFileDetial(item)
          break
        case 'sbdjApproval':
          this.handInspectionOrder(item)
            break
          case 'WEEK_MAINTENANCE':
            this.handleWeekMaintenance(item)
            break
          case 'eam_repair':
            this.handleRepairOrder(item)
          break
        default:
          alert('没找到该流程')
      }
    },
    splitAprocessType(title) {
      let parts = title.split(':') // æ³¨æ„å†’号是全角字符,使用对应的字进行分割
      let result = parts[0]
      return result
    },
    handDrDetial(item) {
      this.selectShenpiData = item
      this.selectShenpiData.assignee_dictText=item.todoUsers_dictText
      this.selectShenpiData.procInstId=item.procInsId
      this.selectShenpiData.title=item.description
      this.$refs.modalFormApproval.clearTableSource()
      this.$refs.modalFormApproval.getAllApproveData(item)
      handleWeekMaintenance(record) {
        this.selectWeekMaintenanceData = Object.assign({}, record)
        this.$refs.weekMaintenanceApprovalModal.handleDetail(record)
        this.$refs.weekMaintenanceApprovalModal.title = '详情'
        this.$refs.weekMaintenanceApprovalModal.disableSubmit = true
    },
    handDispatchFileDetial(item){
      console.log('item----->', item)
      this.selectDispatchFileXqData = item
      this.selectDispatchFileXqData.assignee_dictText=item.todoUsers_dictText
      this.selectDispatchFileXqData.procInstId=item.procInsId
      this.selectDispatchFileXqData.processInstanceId=item.procInsId
      this.selectDispatchFileXqData.title=item.description
      this.$refs.modalFormDispatchFileXq.clearTableSource()
      this.$refs.modalFormDispatchFileXq.getAllApproveData(item)
      handInspectionOrder(record) {
        console.log('record----->', record)
        this.selectInspectionOrderXqData = Object.assign({}, record)
        const { todoUsers_dictText, procInsId, description, taskName } = this.selectInspectionOrderXqData
        this.selectInspectionOrderXqData.assignee_dictText = todoUsers_dictText
        this.selectInspectionOrderXqData.procInstId = procInsId
        this.selectInspectionOrderXqData.processInstanceId = procInsId
        this.selectInspectionOrderXqData.title = description
        this.$refs.modalFormInspectionOrderXq.visible = true
        this.$refs.modalFormInspectionOrderXq.title = taskName
        this.$refs.modalFormInspectionOrderXq.disableSubmit = true
        this.$refs.modalFormInspectionOrderXq.getAllApproveData({
          ...record,
          procInstId: procInsId,
          processInstanceId: procInsId
        })
        this.$refs.modalFormInspectionOrderXq.getBasicInformation(record)
    },
    handInspectionOrder(item) {
      console.log('item----->', item)
      this.selectInspectionOrderXqData = item
      this.selectInspectionOrderXqData.assignee_dictText=item.todoUsers_dictText
      this.selectInspectionOrderXqData.procInstId=item.procInsId
      this.selectInspectionOrderXqData.processInstanceId=item.procInsId
      this.selectInspectionOrderXqData.title=item.description
      this.$refs.modalFormInspectionOrderXq.clearTableSource()
      this.$refs.modalFormInspectionOrderXq.getAllApproveData(item)
      /**
       * ç‚¹å‡»è®¾å¤‡ç»´ä¿®åˆ†ç±»æµç¨‹è¯¦æƒ…时触发
       * @param record
       */
      handleRepairOrder(record) {
        this.selectRepairOrderData = Object.assign({}, record)
        const { procInsId, taskName } = this.selectRepairOrderData
        this.$refs.repairOrderApprovalModal.visible = true
        this.$refs.repairOrderApprovalModal.disableSubmit = true
        this.$refs.repairOrderApprovalModal.title = taskName
        this.$refs.modalFormInspectionOrderXq.getAllApproveData({
          ...record,
          procInstId: procInsId,
          processInstanceId: procInsId
        })
        this.$refs.repairOrderApprovalModal.getBasicInformation(record)
    }
  }
}
src/views/flowable/workflow/FlowLedger.vue
@@ -11,7 +11,8 @@
        <a-row :gutter="24">
        <a-col :xl="6" :lg="7" :md="8" :sm="24">
          <a-form-item label="流程分类">
            <j-dict-select-tag placeholder="请选择流程分类" v-model="queryParam.category" dictCode="flow_type"></j-dict-select-tag>
              <j-dict-select-tag placeholder="请选择流程分类" v-model="queryParam.category"
                                 dictCode="flow_type"></j-dict-select-tag>
          </a-form-item>
        </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -26,15 +27,17 @@
          </a-col>
        <a-col :xl="10" :lg="11" :md="12" :sm="24">
          <a-form-item label="操作时间">
            <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.startTime"></j-date>
              <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust"
                      v-model="queryParam.startTime"></j-date>
            <span class="query-group-split-cust"></span>
            <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.endTime"></j-date>
              <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust"
                      v-model="queryParam.endTime"></j-date>
          </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>
              <a-button @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </span>
          </a-col>
        </a-row>
@@ -59,44 +62,14 @@
        :loading="loading"
        class="j-table-force-nowrap"
        @change="handleTableChange">
        <!-- å­—符串超长截取省略号显示-->
        <span slot="description" slot-scope="text">
          <j-ellipsis :value="text" :length="25" />
        </span>
        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </template>
        <template slot="imgSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
          <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
          <a-button
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="downloadFile(text)">
            ä¸‹è½½
          </a-button>
        </template>
        <span slot="action" slot-scope="text, record">
            <a @click="handelDetial(record,text)">详情</a>
            <a @click="handelDetail(record,text)">详情</a>
        </span>
      </a-table>
    </div>
    <AssignFileStreamXq ref="modalFormApproval" :selectShenpiData="selectShenpiData"></AssignFileStreamXq>
    <DispatchFileXq ref="modalFormDispatchFileXq"  :selectShenpiData="selectDispatchFileXqData"></DispatchFileXq>
    <InspectionOrderXq ref="modalFormInspectionOrderXq"  :selectShenpiData="selectInspectionOrderXqData"></InspectionOrderXq>
    <inspection-order-handle ref="modalFormInspectionOrderXq" :selectShenpiData="selectInspectionOrderXqData"/>
  </a-card>
</template>
@@ -106,89 +79,83 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import JDictSelectTag from '@/components/dict/JDictSelectTag.vue'
import AssignFileStreamXq from '@views/flowable/workflow/assignFileStream/AssignFileStreamXq.vue'
import DispatchFileXq from '@views/flowable/workflow/dispatchFile/DispatchFileXq.vue'
import InspectionOrderXq from '@views/flowable/workflow/InspectionOrder/InspectionOrderXq.vue'
  import InspectionOrderHandle from './InspectionOrder/InspectionOrderHandle'
export default {
  name: 'NcDeviceCharactersList',
    name: 'FlowLedger',
  mixins:[JeecgListMixin, mixinDevice],
  components: {
    DispatchFileXq,
    AssignFileStreamXq: AssignFileStreamXq,
    JDictSelectTag,
    InspectionOrderXq
      InspectionOrderHandle,
      JDictSelectTag
  },
  data () {
    return {
      description: '设备特殊字符管理页面',
        description: '流程管理',
      // è¡¨å¤´
      columns: [
        {
          title: '序号',
          dataIndex: '',
          key:'rowIndex',
          align:"center",
            align: 'center',
          customRender:function (t,r,index) {
            return parseInt(index)+1;
              return parseInt(index) + 1
          }
        },
        {
          title: '流程分类',
          align: "center",
            align: 'center',
          dataIndex: 'category_dictText',
          width: 200,
            width: 200
        },
        {
          title:'流程名称',
          align:"center",
            align: 'center',
          dataIndex: 'flowName'
        },
        {
          title:'流程业务简要描述',
          align:"center",
          dataIndex: 'description',
          width: '30%',
          scopedSlots: {customRender: 'description'},
            align: 'center',
            dataIndex: 'title'
        },
        {
          title:'申请人',
          align:"center",
            align: 'center',
          dataIndex: 'proposer_dictText'
        },
        {
          title: '前驱节点',
          align: "center",
          dataIndex: 'preNode',
            align: 'center',
            dataIndex: 'preNode'
        },
        {
          title:'当前节点',
          align:"center",
            align: 'center',
          dataIndex: 'taskName'
        },
        {
          title:'流程开始时间',
          align:"center",
            align: 'center',
          dataIndex: 'startTime'
        },
        {
          title:'流程结束时间',
          align:"center",
            align: 'center',
          dataIndex: 'endTime'
        },
        {
          title:'处理时长',
          align:"center",
            align: 'center',
          dataIndex: 'duration'
        },
        {
          title:'当前任务人',
          align:"center",
            align: 'center',
          dataIndex: 'todoUsers_dictText'
        },
        {
          title:'处理过的人',
          align:"center",
            align: 'center',
          dataIndex: 'doneUsers_dictText'
        },
        {
@@ -201,7 +168,7 @@
        }
      ],
      url: {
        list: "/assign/flow/list",
          list: '/assign/flow/list'
      },
      dictOptions:{},
      selectShenpiData: {},
@@ -213,28 +180,20 @@
  },
  computed: {
    importExcelUrl: function(){
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
    },
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
      }
  },
  methods: {
    handelDetial(item, index) {
      handelDetail(item, index) {
      console.log('点击了详情')
      console.log('item----->', item)
      console.log('index----->', index)
      let approcesstype = this.splitAprocessType(item.category)
      console.log('approcesstype--->', approcesstype)
      switch (approcesstype) {
        case 'drApproval':
          item.description=item.title
          this.handDrDetial(item)
          break
        case 'ggApproval':
          item.description=item.title
          this.handDispatchFileDetial(item)
          break
        case 'sbdjApproval':
          item.description=item.title
          this.handInspectionOrderDetial(item)
            this.handInspectionOrderDetail(item)
          break
        default:
          alert('没找到该流程')
@@ -245,29 +204,16 @@
      let result = parts[0]
      return result
    },
    handDrDetial(item) {
      this.selectShenpiData = item
      this.selectShenpiData.assignee_dictText=item.todoUsers_dictText
      this.selectShenpiData.createTime=item.startTime
      this.selectShenpiData.procInstId=item.processInstanceId
      this.$refs.modalFormApproval.clearTableSource()
      this.$refs.modalFormApproval.getAllApproveData(item)
    },
    handDispatchFileDetial(item){
      this.selectDispatchFileXqData = item
      this.selectDispatchFileXqData.assignee_dictText=item.todoUsers_dictText
      this.selectDispatchFileXqData.createTime=item.startTime
      this.selectDispatchFileXqData.procInstId=item.processInstanceId
      this.$refs.modalFormDispatchFileXq.clearTableSource()
      this.$refs.modalFormDispatchFileXq.getAllApproveData(item)
    },
    handInspectionOrderDetial(item){
      handInspectionOrderDetail(item) {
      this.selectInspectionOrderXqData = item
      this.selectInspectionOrderXqData.assignee_dictText=item.todoUsers_dictText
      this.selectInspectionOrderXqData.createTime=item.startTime
      this.selectInspectionOrderXqData.procInstId=item.processInstanceId
      this.$refs.modalFormInspectionOrderXq.clearTableSource()
        this.$refs.modalFormInspectionOrderXq.visible = true
        this.$refs.modalFormInspectionOrderXq.disableSubmit = true
      this.$refs.modalFormInspectionOrderXq.getAllApproveData(item)
        this.$refs.modalFormInspectionOrderXq.getBasicInformation(item)
    }
  }
}
src/views/flowable/workflow/FlowTodo.vue
@@ -9,32 +9,47 @@
    <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-col :xl="4" :lg="6" :md="8" :sm="24">
            <a-form-item label="流程分类">
              <j-dict-select-tag placeholder="请选择流程分类" v-model="queryParam.category" dictCode="flow_type"></j-dict-select-tag>
              <j-dict-select-tag placeholder="请选择流程分类" v-model="queryParam.category"
                                 dictCode="flow_type"></j-dict-select-tag>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
          <a-col :xl="4" :lg="6" :md="8" :sm="24">
            <a-form-item label="流程名称">
              <a-input placeholder="请输入流程名称" v-model="queryParam.flowName"></a-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
          <a-col :xl="4" :lg="6" :md="8" :sm="24">
            <a-form-item label="当前节点">
              <a-input placeholder="请输入当前节点精确查询" v-model="queryParam.name"></a-input>
            </a-form-item>
          </a-col>
          <a-col :xl="4" :lg="6" :md="8" :sm="24">
            <a-form-item label="简要描述">
              <a-input placeholder="请输入简要描述" v-model="queryParam.title"></a-input>
            </a-form-item>
          </a-col>
          <a-col :xl="10" :lg="11" :md="12" :sm="24">
            <a-form-item label="当前操作时间">
              <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.startTime"></j-date>
          <template v-if="toggleSearchStatus">
            <a-col :xl="8" :lg="8" :md="12" :sm="24">
              <a-form-item label="任务时间范围">
                <j-date :show-time="false" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust"
                        v-model="queryParam.startTime"></j-date>
              <span class="query-group-split-cust"></span>
              <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.endTime"></j-date>
                <j-date :show-time="false" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust"
                        v-model="queryParam.endTime"></j-date>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
          </template>
          <a-col :xl="4" :lg="6" :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>
              <a-button @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
               <a @click="handleToggleSearch" style="margin-left: 8px">
                {{ toggleSearchStatus ? '收起' : '展开' }}
                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
              </a>
            </span>
          </a-col>
        </a-row>
@@ -46,9 +61,14 @@
    <div class="table-operator">
    <a-dropdown v-if="selectedRowKeys.length > 0 ">
      <a-menu slot="overlay">
        <a-menu-item key="1" @click="batchHandle"><a-icon type="delete"/>批量处理</a-menu-item>
          <a-menu-item key="1" @click="batchHandle">
            <a-icon type="delete"/>
            æ‰¹é‡å¤„理
          </a-menu-item>
      </a-menu>
      <a-button style="margin-left: 8px"> æ‰¹é‡æ“ä½œ <a-icon type="down" /></a-button>
        <a-button style="margin-left: 8px"> æ‰¹é‡æ“ä½œ
          <a-icon type="down"/>
        </a-button>
    </a-dropdown>
    </div>
@@ -65,7 +85,7 @@
        bordered
        size="middle"
        rowKey="id"
        :scroll="{x:'max-content',y:465}"
        :scroll="{x:getTableColumnsTotalWidth,y:465}"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
@@ -73,45 +93,19 @@
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        @change="handleTableChange">
        <!-- å­—符串超长截取省略号显示-->
        <span slot="description" slot-scope="text">
          <j-ellipsis :value="text" :length="25" />
        </span>
        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </template>
        <template slot="imgSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
          <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
          <a-button
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="downloadFile(text)">
            ä¸‹è½½
          </a-button>
        </template>
        <span slot="action" slot-scope="text, record">
            <a @click="handelDetial(record,text)">查看详情</a>
            <a @click="handelDetail(record,text)">执行/审批</a>
        </span>
      </a-table>
    </div>
    <AssignFileStreamHandle ref="modalFormApproval" :selectShenpiData="selectShenpiData" @searchReset="searchReset"></AssignFileStreamHandle>
    <DispatchFileHandle ref="modalFormDispatchFileXq"  :selectShenpiData="selectDispatchFileXqData" @searchReset="searchReset"></DispatchFileHandle>
    <DispatchFileBachHandleStyle ref="modalFormDispatchFileBatch" @searchReset="searchReset" @ok="modalFormOk"></DispatchFileBachHandleStyle>
    <InspectionOrderHandle ref="modalFormInspectionOrder" :selectShenpiData="selectInspectionOrderData" @searchReset="searchReset"></InspectionOrderHandle>
    <InspectionOrderHandleBzz ref="modalFormInspectionOrderBzz" :selectShenpiData="selectInspectionOrderDataBzz" @searchReset="searchReset"></InspectionOrderHandleBzz>
    <week-maintenance-approval-modal ref = "weekMaintenanceApprovalModal" ></week-maintenance-approval-modal>
    <repair-order-approval-modal ref="repairOrderApprovalModal" :selectShenpiData="selectRepairOrderData" ></repair-order-approval-modal>
    <InspectionOrderHandle ref="modalFormInspectionOrder" :selectShenpiData="selectInspectionOrderData"
                           @searchReset="searchReset"></InspectionOrderHandle>
    <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal" :selectShenpiData="selectWeekMaintenanceData"
                                     @searchReset="searchReset"></week-maintenance-approval-modal>
    <repair-order-approval-modal ref="repairOrderApprovalModal" @searchReset="searchReset"
                                 :selectShenpiData="selectRepairOrderData"></repair-order-approval-modal>
  </a-card>
</template>
@@ -121,27 +115,20 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import JDictSelectTag from '@/components/dict/JDictSelectTag.vue'
import AssignFileStreamHandle from '@views/flowable/workflow/assignFileStream/AssignFileStreamHandle.vue'
import DispatchFileHandle from '@views/flowable/workflow/dispatchFile/DispatchFileHandle.vue'
import DispatchFileBachHandleStyle from '@views/flowable/workflow/dispatchFile/DispatchFileBachHandleStyle#Drawer.vue'
import WeekMaintenanceApprovalModal from '@views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal'
import RepairOrderApprovalModal from '@views/flowable/workflow/repairOrder/RepairOrderApprovalModal'
import InspectionOrderHandle from '@views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue'
import InspectionOrderHandleBzz from '@views/flowable/workflow/InspectionOrder/InspectionOrderHandleBzz.vue'
import { getAction } from '@api/manage'
export default {
  name: 'NcDeviceCharactersList',
  mixins:[JeecgListMixin, mixinDevice],
  components: {
    AssignFileStreamHandle,
    JDictSelectTag,
    DispatchFileHandle,
    DispatchFileBachHandleStyle,
    WeekMaintenanceApprovalModal,
    RepairOrderApprovalModal,
    InspectionOrderHandle,
    InspectionOrderHandleBzz,
      InspectionOrderHandle
  },
  data () {
    return {
@@ -152,61 +139,61 @@
          title: '序号',
          dataIndex: '',
          key:'rowIndex',
          width:100,
          align:"center",
            width: 60,
            align: 'center',
          customRender:function (t,r,index) {
            return parseInt(index)+1;
              return parseInt(index) + 1
          }
        },
        {
          title: '流程分类',
          align: "center",
            align: 'center',
          dataIndex: 'category_dictText',
          width: 200,
        },
        {
          title: '流程名称',
          align: "center",
            align: 'center',
          dataIndex: 'flowName',
          width: 200,
            width: 200
        },
        {
          title:'流程业务简要描述',
          align:"center",
          dataIndex: 'description',
          width:300,
          scopedSlots: {customRender: 'description'},
            align: 'center',
            dataIndex: 'title',
            width: 350,
            ellipsis: true
        },
        {
          title: '上一步处理人',
          align: "center",
            align: 'center',
          dataIndex: 'preNodeAssignee_dictText',
          width:100
            width: 150
        },
        {
          title: '前驱节点',
          align: "center",
            align: 'center',
          dataIndex: 'preNode',
          width:200
        },
        {
          title: '当前节点',
          align: "center",
            align: 'center',
          dataIndex: 'name',
          width:200
        },
        {
          title: '当前节点开始时间',
          align: "center",
            align: 'center',
          dataIndex: 'createTime',
          width:300
            width: 200
        },
        {
          title: '操作',
          dataIndex: 'action',
          scopedSlots: { customRender: 'action' },
          align: 'center',
          width: 200,
            width: 150,
          fixed: 'right'
        }
      ],
@@ -215,37 +202,32 @@
        isSameNode: '/assign/flow/isSameNode'
      },
      dictOptions:{},
      selectShenpiData: {},
      selectDispatchFileXqData:{},
      selectInspectionOrderData:{},
      selectInspectionOrderDataBzz:{},
        selectWeekMaintenanceData: {},
      selectBachData:{},
      selectRepairOrderData: {},
      //业务信息ID
      dataId: undefined,
        dataId: undefined
    }
  },
  created() {
  },
  computed: {
    importExcelUrl: function(){
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
    },
      getTableColumnsTotalWidth() {
        return this.columns.reduce((total, item) => total + item.width, 0)
      }
  },
  methods: {
    handelDetial(item, index) {
      handelDetail(item, index) {
      console.log('点击了详情')
      console.log('item----->', item)
      console.log('index----->', index)
      let approcesstype = this.splitAprocessType(item.category)
      console.log('approcesstype--->', approcesstype)
      switch (approcesstype) {
        case 'drApproval':
          this.handDrDetial(item)
          break
        case 'ggApproval':
          this.handDispatchFileDetial(item)
          break
        let processType = this.splitAprocessType(item.category)
        console.log('processType--->', processType)
        switch (processType) {
        case 'sbdjApproval':
          this.handInspectionOrder(item)
          break
@@ -264,73 +246,65 @@
      let result = parts[0]
      return result
    },
    handDrDetial(item) {
      this.selectShenpiData = item
      this.$refs.modalFormApproval.clearTableSource()
      this.$refs.modalFormApproval.getAllApproveData(item)
      handInspectionOrder(record) {
        console.log('record----->', record)
        this.selectInspectionOrderData = Object.assign({}, record)
        this.$refs.modalFormInspectionOrder.visible = true
        this.$refs.modalFormInspectionOrder.title = record.name
        this.$refs.modalFormInspectionOrder.getAllApproveData(record)
        this.$refs.modalFormInspectionOrder.getBasicInformation(record)
    },
    searchReset() {
      this.queryParam = {}
      this.loadData(1);
    },
    handDispatchFileDetial(item){
      console.log('item----->', item)
      this.selectDispatchFileXqData = item
      this.$refs.modalFormDispatchFileXq.clearTableSource()
      this.$refs.modalFormDispatchFileXq.getAllApproveData(item)
    },
    handInspectionOrder(item) {
      console.log('item----->', item)
      if (item.taskDefKey ==='Confirmed_completed'){
        this.selectInspectionOrderDataBzz = item
        this.$refs.modalFormInspectionOrderBzz .clearTableSource()
        this.$refs.modalFormInspectionOrderBzz .getAllApproveData(item)
      }else {
        this.selectInspectionOrderData = item
        this.$refs.modalFormInspectionOrder.clearTableSource()
        this.$refs.modalFormInspectionOrder.getAllApproveData(item)
      }
    },
    batchHandle() {
      if (this.selectedRowKeys.length <= 0) {
        this.$notification.warning({
          message: '消息',
          description: "请选择一条记录"
        });
        return;
            description: '请选择一条记录'
          })
          return
      } else {
        let ids = "";
          let ids = ''
        for (var a = 0; a < this.selectedRowKeys.length; a++) {
          ids += this.selectedRowKeys[a] + ",";
            ids += this.selectedRowKeys[a] + ','
        }
        getAction(this.url.isSameNode+"?taskIds="+ids).then((res)=>{
          getAction(this.url.isSameNode + '?taskIds=' + ids).then((res) => {
          if(res.success){
            let taskDefKey=res.result
            this.selectBachData.taskIds = ids
            this.selectBachData.taskDefKey = taskDefKey
            this.$refs.modalFormDispatchFileBatch.title="批量处理";
              this.$refs.modalFormDispatchFileBatch.title = '批量处理'
            this.$refs.modalFormDispatchFileBatch.edit(this.selectBachData)
            this.$refs.modalFormDispatchFileBatch.disableSubmit = false;
              this.$refs.modalFormDispatchFileBatch.disableSubmit = false
          }else{
            this.$notification.warning({
              message: '消息',
              description: res.message
            });
              })
          }
        })
      }
    },
    handleWeekMaintenance(item) {
      if(item && item.dataId) {
        this.$refs.weekMaintenanceApprovalModal.handleDetail(item.dataId)
        this.$refs.weekMaintenanceApprovalModal.title = item.name;
        this.$refs.weekMaintenanceApprovalModal.disableSubmit = false;
          this.selectWeekMaintenanceData = Object.assign({}, item)
          this.$refs.weekMaintenanceApprovalModal.handleDetail(item)
          this.$refs.weekMaintenanceApprovalModal.title = item.name
          this.$refs.weekMaintenanceApprovalModal.disableSubmit = false
      }
    },
    handleRepairOrder(item) {
      this.selectRepairOrderData = item
      this.$refs.repairOrderApprovalModal.clearTableSource()
      this.$refs.repairOrderApprovalModal.getAllApproveData(item)
      /**
       * ç‚¹å‡»è®¾å¤‡ç»´ä¿®åˆ†ç±»æµç¨‹è¯¦æƒ…时触发
       * @param record
       */
      handleRepairOrder(record) {
        this.selectRepairOrderData = Object.assign({}, record)
        this.$refs.repairOrderApprovalModal.visible = true
        this.$refs.repairOrderApprovalModal.title = record.name
        this.$refs.repairOrderApprovalModal.getAllApproveData(record)
        this.$refs.repairOrderApprovalModal.getBasicInformation(record)
    }
  }
}
src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue
@@ -1,133 +1,98 @@
<!--
 Description: å·¥ä½œæµ-设备点检处理页面 List
 Author: ä½œè€… liuyh
 Date:   2025-02-27
-->
<template>
  <a-modal
  <j-modal
    :title="title"
    :width="width"
    :width="1200"
    :visible="visible"
    :footer="null"
    @cancel="handCancel"
    :okButtonProps="{ class:{'jee-hidden': disableSubmit||!hasInspectionDateArrived} }"
    @ok="submitForm"
    @cancel="handleCancel"
    :mask-closable="false"
    :confirmLoading="confirmLoading"
    switchFullscreen
    centered
  >
    <a-card :bordered="false">
      <div>
        <b>{{ selectShenpiData.description }}</b>
        <br>
        <br>
        <a-tag color="blue">
          å½“前处理人 {{ selectShenpiData.assignee_dictText }}
        </a-tag>
        <a-tag color="blue">
          ä»»åŠ¡åˆ›å»ºæ—¶é—´ {{ selectShenpiData.createTime }}
        </a-tag>
        <br>
        <br>
        <button @click="fetchAndShowBmp" class="btn-custom">打开流程图</button>
        <div v-if="imageSrc">
          <img :src="imageSrc" alt="Fetched Image" />
        </div>
        <hr class="shallow-hr">
      </div>
      <div>
        <b>点检工单详情</b>
        <br>
        <a-form :form='form'>
          <a-spin :spinning="spinning">
            <a-tabs default-active-key='1' @change='callback'>
              <a-tab-pane key='1' tab='基本信息'>
                <a-form-model ref='form' :model='tableRowRecord' :rules='validatorRules'>
                  <a-row>
                    <a-col :span='span'>
                      <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardCode" label="工单号">
                        <a-input placeholder="工单号自动生成" :disabled="true" v-model="tableRowRecord.orderNum" />
                      </a-form-model-item>
                    </a-col>
                    <a-col :span='span'>
                      <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="设备编号">
                        <MaintenanceEquipmentSelect placeholder="请输入设备编号或名称搜索" v-model="tableRowRecord.equipmentId"
                                                    :maintenanceCategory="maintenanceCategory" :disabled="true"
                                                    @autocompleteForm="autocompleteForm"></MaintenanceEquipmentSelect>
                      </a-form-model-item>
                    </a-col>
      <a-form-model ref='form' :model='tableRowRecord' :labelCol="labelCol" :wrapperCol="wrapperCol"
                    :rules="validatorRules">
        <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> ç‚¹æ£€åŸºç¡€ä¿¡æ¯</a-divider>
                  </a-row>
                  <a-row>
                    <a-col :span='span'>
                      <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardName" label="标准名称">
                        <a-input placeholder="请输入标准名称" disabled v-model="this.standardName" />
            <a-form-model-item label="工单号">
              <a-input readOnly v-model="tableRowRecord.orderNum"/>
                      </a-form-model-item>
                    </a-col>
                    <a-col :span='span'>
                      <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardCode" label="标准编码">
                        <a-input placeholder="请输入标准编码" disabled v-model="this.standardCode" />
            <a-form-model-item label="设备编号">
              <MaintenanceEquipmentSelect v-model="tableRowRecord.equipmentId"
                                          :maintenanceCategory="'POINT_INSPECTION'" disabled
                                          @autocompleteForm="autoCompleteForm"/>
            </a-form-model-item>
          </a-col>
          <a-col :span='span'>
            <a-form-model-item label="标准名称">
              <a-input readOnly v-model="tableRowRecord.standardName"/>
                      </a-form-model-item>
                    </a-col>
                  </a-row>
                  <a-row>
                    <a-col :span='span'>
                      <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancePeriod" label="保养周期">
                        <a-input-number v-model="this.maintenancePeriod" :min="1" :precision="0" disabled style="width: 100%" />
            <a-form-model-item label="标准编码">
              <a-input readOnly v-model="tableRowRecord.standardCode"/>
                      </a-form-model-item>
                    </a-col>
                    <a-col :span='span'>
                      <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator" label="点检人">
                        <j-dict-select-tag v-model="tableRowRecord.operator" placeholder="请选择用户" disabled dictCode="sys_user,realname,username,username!='admin' order by create_time"/>
            <a-form-model-item label="点检日期">
              <a-input v-model="tableRowRecord.inspectionDate" readOnly/>
            </a-form-model-item>
          </a-col>
          <a-col :span='span'>
            <a-form-model-item label="点检过期时间">
              <a-input v-model="tableRowRecord.expirationTime" readOnly/>
                      </a-form-model-item>
                    </a-col>
                  </a-row>
                  <a-row>
                    <a-col :span='span'>
                      <a-form-model-item label="点检日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inspectionDate">
                        <j-date placeholder="请选择点检日期" v-model="tableRowRecord.inspectionDate" disabled  style="width: 100%" />
            <a-form-model-item label="保养周期">
              <a-input v-model="tableRowRecord.maintenancePeriod" readOnly/>
                      </a-form-model-item>
                    </a-col>
                    <a-col :span='span'>
                      <a-form-model-item label="点检过期时间" :labelCol="{span:6}" :wrapperCol="{span:15}" prop="expirationTime">
                        <j-date placeholder="请选择点检过期时间" v-model="tableRowRecord.expirationTime" disabled style="width: 100%" />
            <a-form-model-item label="点检人">
              <a-input v-model="tableRowRecord.operator_dictText" readOnly/>
                      </a-form-model-item>
                    </a-col>
                  </a-row>
                  <a-row >
                    <a-col :span="24">
                      <a-form-model-item label="备注" :labelCol="{span:1}" :wrapperCol="{span:22}" prop="remark">
                        <a-textarea v-model="tableRowRecord.remark" rows="3" placeholder="请输入备注" disabled />
          <a-col :span="span*3">
            <a-form-model-item label="备注" :labelCol="{span:2}" :wrapperCol="{span:21}">
              <a-textarea v-model="tableRowRecord.remark" rows="3" readOnly/>
                      </a-form-model-item>
                    </a-col>
                  </a-row>
                </a-form-model>
              </a-tab-pane>
              <a-tab-pane key='2' tab='流程节点'>
                <a-card>
                  <a-timeline style="padding:0 1% 0 12%" >
                    <a-timeline-item color='white' v-for="(item,index1) in hitaskDataSource" :key="index1">
                      <div class="bottom">
                        <p>处理人:{{item.assignee_dictText}}</p>
                        <p v-if="index1 !==0">处理时长:{{item.duration}}</p>
                        <p v-if="item.name !== '提交申请'">处理类型:{{item.sequenceFlowName}}</p>
                        <p v-if="item.description != null">处理意见:{{item.description}}</p>
                        <div class="left_qiu"><span>{{item.taskName}}</span></div>
                      </div>
                    </a-timeline-item>
                  </a-timeline>
                </a-card>
              </a-tab-pane>
            </a-tabs>
          </a-spin>
        </a-form>
      </div>
      <div>
        <hr class="shallow-hr">
        <br>
        <b>保养项明细</b>
        <br>
        <a-form-model ref="form" :model="approveData" :rules="validatorRules" slot="detail">
          <a-row :gutter="24">
        <a-row>
          <a-form-model-item prop="imageFilesResult" label="点检图片" :labelCol="{span:2}" :wrapperCol="{span:21}">
            <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3"
                       :disabled="isDisableOperation||!hasInspectionDateArrived"
                       v-model="tableRowRecord.fileList"/>
          </a-form-model-item>
        </a-row>
        <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">
          ä¿å…»é¡¹ä¿¡æ¯
        </a-divider>
        <a-tabs v-model="activeTabKey">
          <a-tab-pane key="1" tab="保养项明细">
            <j-vxe-table
              ref="editableDetailTable"
              :rowNumber="false"
              :rowSelection="false"
              :rowSelection="true"
              :bordered="true"
              :alwaysEdit="true"
              :toolbar="false"
@@ -136,89 +101,148 @@
              :loading="detail.loading"
              :dataSource="detail.dataSource"
              :columns="detail.columns"
              style="margin-top: 8px;" />
          </a-row>
          <div class="table-operator" style="text-align: right;">
            <a-button  @click="handleQueXiaoTask" type="primary" icon="close">取消</a-button>
            <a-button @click="submitForm">提 äº¤</a-button>
              @selectRowChange="handleTableSelectRowChange"
            >
              <template v-slot:inspectionResult="props">
                <j-dict-select-tag v-model="props.row.inspectionResult" dictCode="eam_inspection_result"
                                   :disabled="isDisableOperation"
                                   placeholder="请选择点检结果"
                                   @change="handleInspectionResultSelectChange($event,props.row)"
                                   style="width: 100%"/>
              </template>
              <template v-slot:exceptionDescription="props">
                <a-textarea style="height: 32px" v-model="props.row.exceptionDescription"
                            :placeholder="props.row.inspectionResult==='2'?'请输入异常描述':''"
                            :disabled="isDisableOperation||!props.row.inspectionResult||props.row.inspectionResult==='1'"/>
              </template>
              <template v-slot:reportFlag="props">
                <j-dict-select-tag v-model="props.row.reportFlag"
                                   :placeholder="props.row.inspectionResult==='2'?'请选择异常是否报修':''"
                                   :disabled="isDisableOperation||!props.row.inspectionResult||props.row.inspectionResult==='1'"
                                   dictCode="yn"
                                   style="width: 100%"/>
              </template>
            </j-vxe-table>
          </a-tab-pane>
          <template v-if="selectShenpiData.procInstId">
            <a-tab-pane key='2' tab='流程节点'>
              <a-card :bordered="false">
                <a-timeline>
                  <a-timeline-item v-for="(item,index) in hitaskDataSource" :key="index">
                    <div>
                      <h3 style="font-weight: bold;">{{item.taskName}}</h3>
                      <div>处理人:{{item.assignee_dictText}}</div>
                      <div v-if="index !==0">处理时长:{{item.duration}}</div>
                      <div v-if="item.name !== '提交申请'">处理类型:{{item.sequenceFlowName}}</div>
                      <div v-if="item.description">处理意见:{{item.description}}</div>
          </div>
        </a-form-model>
      </div>
                  </a-timeline-item>
                </a-timeline>
    </a-card>
            </a-tab-pane>
            <a-tab-pane key='3' tab='流程图'>
              <img :src="imageSrc" alt="Fetched Image"/>
            </a-tab-pane>
          </template>
  </a-modal>
          <a-button
            v-if="selectedRowKeys.length>0&&!isDisableOperation&&hasInspectionDateArrived&&activeTabKey==='1'"
            slot="tabBarExtraContent" type="primary"
            @click="handleSelectAllInspectionResult">批量点检正常
          </a-button>
          <!--<a-dropdown slot="tabBarExtraContent" v-if="selectedRowKeys.length>0">-->
          <!--<a-menu slot="overlay">-->
          <!--<a-menu-item key="1" @click="handleSelectAllInspectionResult('正常')">正常</a-menu-item>-->
          <!--<a-menu-item key="2" @click="handleSelectAllInspectionResult('异常')">异常</a-menu-item>-->
          <!--</a-menu>-->
          <!--<a-button> æ‰¹é‡é€‰æ‹©ç‚¹æ£€ç»“æžœ-->
          <!--<a-icon type="down"/>-->
          <!--</a-button>-->
          <!--</a-dropdown>-->
        </a-tabs>
        <template v-if="isDisplayConfirm">
          <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> ç­ç»„长确认信息
          </a-divider>
          <a-row :gutter="24">
            <a-col :span="12">
              <a-form-model-item prop="confirmDealType" label="处理类型">
                <j-dict-select-tag type='radio' v-model='tableRowRecord.confirmDealType' dictCode='approved_rejected'
                                   :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='WAIT_CONFIRM'"/>
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
              <a-form-model-item prop="confirmComment" label="处理意见">
                <a-textarea placeholder="请输入处理意见"
                            :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='WAIT_CONFIRM'"
                            v-model="tableRowRecord.confirmComment"/>
              </a-form-model-item>
            </a-col>
          </a-row>
        </template>
      </a-form-model>
    </a-spin>
  </j-modal>
</template>
<script>
import '@assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage'
import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue'
import { JVXETypes } from '@comp/jeecg/JVxeTable'
  import moment from 'moment'
export default {
  name: 'FlowShenPi',
    name: 'InspectionOrderHandle',
  components: { MaintenanceEquipmentSelect },
  mixins: [mixinDevice],
  props: {
    selectShenpiData: {
      type: Object,
      required: true
        type: Object
    }
  },
  data() {
    return {
      form: this.$form.createForm(this),
      span: 12,
      span1: 8,
      coldisabled: true,
        span: 8,
        confirmLoading: false,
      spinning: false,
      tableRowRecord: {},
      assignFileStream:{},
      tableDataSource: [],
      usageDataSource: [],
      hitaskDataSource:[],
      bomForm: {},
      approveContent:"",
        validatorRules: {
          confirmDealType: [
            { required: true, message: '请选择处理类型' }
          ],
          confirmComment: [
            { required: true, message: '请输入处理意见' }
          ]
        },
      imageSrc: null,
      drawerVisible: true,
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 }
          sm: { span: 6 }
      },
      wrapperCol: {
        xs: { span: 30 },
        sm: { span: 16 }
      },
      validatorRules: {
        status: {
          rules: [
            { required: true, message: '请选择审批状态!'},
          ]
        },
      },
      approveData: {},
      flowData: {},
      title: '详情页面',
      width: 1000,
      visible: false,
      // è¡¨å¤´
      url: {
        queryBomDataById: '/eam/eamInspectionOrder/selectVoById',
          // queryBomDataById: '/eam/eamInspectionOrder/selectVoById',
        diagramView: '/assign/flow/diagramView',
        queryHisTaskList:'/dncFlow/dispatchFile/queryHisTaskList',
        approve:"/eam/eamInspectionOrder/approval",
        saveDispatchFile:"/dncFlow/dispatchFile/saveDispatchFile"
          queryHisTaskList: '/assign/flow/queryHisTaskList',
          approve: '/eam/eamInspectionOrder/approval',
          queryById: '/eam/eamInspectionOrder/queryById',
          detailList: '/eam/eamInspectionOrderDetail/queryList'
      },
      dictOptions: {},
      superFieldList: [],
      workflowSource: [],
      maintenanceCategory: 'POINT_INSPECTION',
      standardName:"",
      maintenancePeriod:"",
      standardCode:"",
      detail: {
        loading: false,
        dataSource: [],
@@ -227,219 +251,243 @@
            title: '序号',
            key: 'itemCode',
            type: JVXETypes.normal,
            width: '10%',
            align:"center",
              width: '5%',
              align: 'center',
              fixed: 'left'
          },
          {
            title: '保养项',
            key: 'itemName',
            type: JVXETypes.normal,
            width: '20%',
            align:"center",
              width: '15%',
              align: 'center',
              fixed: 'left'
          },
          {
            title: '保养要求',
            key: 'itemDemand',
            type: JVXETypes.normal,
            width: '30%',
            align:"center",
              width: '15%',
              align: 'center',
              fixed: 'left'
          },
          {
            title: "点检结果"
            ,key: 'inspectionResult'
            ,type: JVXETypes.selectSearch
            ,dictCode:'eam_inspection_result'
            ,width: '20%'
            ,align:"center"
              title: '点检结果',
              key: 'inspectionResult',
              type: JVXETypes.slot,
              slotName: 'inspectionResult',
              width: '15%',
              align: 'center',
              validateRules: [
                { required: true, message: '${title}不能为空!' }
              ]
          },
          {
            title: '异常描述',
            key: 'exceptionDescription',
            type: JVXETypes.textarea,
            width: '30%',
            align:"center",
              type: JVXETypes.slot,
              slotName: 'exceptionDescription',
              width: '20%',
              align: 'center',
              validateRules: [
                { handler: this.customValidator }
              ]
          },
          {
            title: '异常是否报修',
            key: 'reportFlag',
            type: JVXETypes.selectSearch,
            dictCode:'yn',
              type: JVXETypes.slot,
              slotName: 'reportFlag',
            width: '20%',
            align:"center",
          }
              align: 'center',
              validateRules: [
                { handler: this.customValidator }
        ]
      }
          ]
        },
        selectedRowKeys: [],
        disableSubmit: false,
        activeTabKey: '1',
        title: ''
    }
  },
  created() {
    computed: {
      hasInspectionDateArrived() {
        return moment(this.tableRowRecord.inspectionDate).diff(moment(), 'hours') <= 0
  },
  computed: {},
      isDisplayConfirm() {
        return ['WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.inspectionStatus)
      },
      isDisableOperation() {
        return this.disableSubmit || this.tableRowRecord.inspectionStatus !== 'UNDER_INSPECTION'
      }
    },
  methods: {
    callback() {
    },
    handCancel() {
      this.visible = false
    },
    clearTableSource() {
      this.tableDataSource = []
      this.usageDataSource = []
    },
    fetchAndShowBmp() {
      console.log('flowData----->', this.flowData)
      try {
        let parm = {
          processDefinitionId: this.flowData.processDefinitionId,
          processInstanceId:this.flowData.processInstanceId,
          TaskDefinitionKey:this.flowData.processDefinitionKey
        }
        downFile(this.url.diagramView,parm,'get').then((res=>{
          console.log('Pica------>',res)
      /**
       * èŽ·å–æµç¨‹èŠ‚ç‚¹å’Œæµç¨‹å›¾
       * @param record å¾…办记录信息
       */
      getAllApproveData(record) {
        if (record.procInstId) {
          const { processDefinitionId, processInstanceId, processDefinitionKey, procInstId } = record
          const param = { procInstId }
          const imageParam = { processDefinitionId, processInstanceId, TaskDefinitionKey: processDefinitionKey }
          const that = this
          getAction(this.url.queryHisTaskList, param)
            .then(res => {
              that.hitaskDataSource = res.result
            })
          downFile(this.url.diagramView, imageParam, 'get')
            .then((res => {
          const urlObject = window.URL.createObjectURL(new Blob([res]))
          this.imageSrc = urlObject
              that.imageSrc = urlObject
        }))
      } catch (error) {
        console.error('Error fetching image blob:', error)
        alert('无法加载图片,请稍后再试。')
            .catch(err => {
              that.$notification.error({
                message: '消息',
                description: res.message
              })
            })
      }
    },
    handleQueXiaoTask(){
      this.visible = false
      this.routeReload()
      /**
       * èŽ·å–å¾…åŠžè®°å½•çš„åŸºæœ¬ä¿¡æ¯
       * @param record å¾…办记录信息
       */
      async getBasicInformation(record) {
        this.activeTabKey = '1'
        this.detail.dataSource = []
        this.spinning = true
        const param = { id: record.dataId }
        let res = await getAction(this.url.queryById, param);
        this.tableRowRecord = Object.assign({}, res.result);
        if (this.tableRowRecord.imageFiles) {
          let obj = JSON.parse(this.tableRowRecord.imageFiles)
          this.tableRowRecord.fileList = [...obj]
        }
        await this.loadDetail(record.dataId)
    },
    autocompleteForm(selectObj) {
      this.standardName = selectObj.standardName
      this.maintenancePeriod=selectObj.maintenancePeriod
      this.standardCode=selectObj.standardCode
    },
    submitForm () {
      const that = this;
      // è§¦å‘表单验证
      this.form.validateFields((err, values) => {
        if (!err) {
          that.confirmLoading = true;
          let url=this.url.approve
          let method = 'post';
          let flowTaskVo = {}
          let tableData = that.$refs.editableDetailTable.getTableData()
          flowTaskVo.comment =that.assignFileStream.approveContent;
      async submitForm() {
        let errMap = await this.$refs.editableDetailTable.validateTable()
        if (errMap) {
          console.log('err', errMap)
          return
        }
        this.$refs.form.validate(valid => {
          if (valid) {
            this.confirmLoading = this.spinning = true
            const flowTaskVo = {}
          flowTaskVo.dataId = this.selectShenpiData.dataId
          flowTaskVo.taskId = this.selectShenpiData.id
          flowTaskVo.userId = this.selectShenpiData.assignee
          flowTaskVo.instanceId = this.selectShenpiData.procInstId
          flowTaskVo.values = this.selectShenpiData.variables
          flowTaskVo.tableDetailList=tableData
          console.log("表单提交数据",flowTaskVo)
          httpAction(url,flowTaskVo,method).then((res)=>{
            flowTaskVo.confirmDealType = this.tableRowRecord.confirmDealType
            flowTaskVo.confirmComment = this.tableRowRecord.confirmComment
            flowTaskVo.fileList = this.tableRowRecord.fileList
            flowTaskVo.tableDetailList = this.$refs.editableDetailTable.getTableData()
            const that = this
            console.log('表单提交数据', flowTaskVo)
            httpAction(this.url.approve, flowTaskVo, 'post')
              .then((res) => {
            if(res.success){
              that.$message.success(res.message);
              that.visible = false
                  that.$message.success(res.message)
              //刷新表格
              that.$emit('searchReset')
                  that.handleCancel()
            }else{
              that.$message.warning(res.message);
                  that.$message.warning(res.message)
            }
          }).finally(() => {
            that.confirmLoading = false;
          })
              .finally(() => {
                that.confirmLoading = this.spinning = false
              })
          } else {
            return false
        }
      })
    },
    getAllApproveData(item) {
      console.log('selectShenpiData----->', this.selectShenpiData)
      this.flowData = item
      let param = {
        'id': item.dataId
      autoCompleteForm({ standardName, maintenancePeriod, standardCode }) {
        this.$set(this.tableRowRecord, 'standardName', standardName)
        this.$set(this.tableRowRecord, 'maintenancePeriod', maintenancePeriod)
        this.$set(this.tableRowRecord, 'standardCode', standardCode)
      },
      // æ‰¹é‡é€‰æ‹©æ‰€æœ‰ç‚¹æ£€ç»“æžœ
      handleSelectAllInspectionResult() {
        this.selectedRowKeys.forEach(key => {
          const dataItem = this.detail.dataSource.find(item => item.id === key)
          if (dataItem && dataItem.inspectionResult !== '1') {
            delete dataItem.exceptionDescription
            delete dataItem.reportFlag
            dataItem.inspectionResult = '1'
      }
      let parmhis={
        'procInstId': item.procInstId
        })
        this.$refs.editableDetailTable.clearCheckboxRow()
        this.selectedRowKeys = []
      },
      /**
       * è¡¨æ ¼å¤šé€‰æ¡†å‘生改变时触发
       * @param {selectedRowIds} è¡¨æ ¼ä¸­å·²é€‰æ‹©çš„ID列表
       */
      handleTableSelectRowChange({ selectedRowIds }) {
        this.selectedRowKeys = selectedRowIds
      },
      /**
       * ç‚¹æ£€ç»“果选择器发生改变时触发
       * @param value æ”¹å˜åŽçš„值
       * @param record ä¿å…»æ˜Žç»†è¡Œè®°å½•
       */
      handleInspectionResultSelectChange(value, record) {
        if (record.exceptionDescription) delete record.exceptionDescription
        if (record.reportFlag) delete record.reportFlag
      },
      customValidator({ cellValue, row }, callback) {
        if (row.inspectionResult === '2') {
          if (!cellValue) {
            callback(false, '${title}不能为空!') // false = æœªé€šè¿‡ï¼Œå¯ä»¥è·Ÿè‡ªå®šä¹‰æç¤º
          } else {
            callback(true) // true = é€šè¿‡éªŒè¯
      }
      getAction(this.url.queryHisTaskList,parmhis).then(res=>{
        this.hitaskDataSource=res.result
        getAction(this.url.queryBomDataById, param).then((res => {
        } else {
          callback(true)
        }
      },
      handleCancel() {
        this.selectedRowKeys = []
        this.visible = false
      },
      //标准选择变化
      loadDetail(orderId) {
        if (orderId) {
          getAction(this.url.detailList, { orderId: orderId })
            .then(res => {
          if (res.success) {
            this.tableRowRecord = res.result[0]
            this.detail.dataSource=res.result[0].tableDetailList
            console.log('this.tableRowRecord----->', this.tableRowRecord[0])
                this.detail.dataSource = [...res.result]
          }
        }))
      }).finally(
        this.visible = true,
        console.log('this.approveData---->', this.approveData)
      )
            })
            .finally(() => {
              this.spinning = false
            })
    }
      },
  }
}
</script>
<style scoped>
.shallow-hr {
  border: 0;
  height: 1px; /* åˆ†ç•Œçº¿çš„高度 */
  background-color: rgba(0, 0, 0, 0.1); /* ä½¿ç”¨ RGBA é¢œè‰²ï¼Œå¹¶è®¾ç½®è¾ƒä½Žçš„透明度 */
  margin: 20px 0; /* åˆ†ç•Œçº¿ä¸Šä¸‹çš„外边距 */
}
.btn-custom {
  background-color: #4CAF50; /* ç»¿è‰²èƒŒæ™¯ */
  color: white; /* ç™½è‰²æ–‡å­— */
  border: none; /* æ— è¾¹æ¡† */
  padding: 5px 15px; /* å†…边距 */
  text-align: center; /* æ–‡å­—居中 */
  text-decoration: none; /* æ— ä¸‹åˆ’线 */
  display: inline-block; /* è¡Œå†…块元素 */
  font-size: 12px; /* å­—体大小 */
  margin: 4px 2px; /* å¤–边距 */
  cursor: pointer; /* é¼ æ ‡æ‚¬åœæ—¶æ˜¾ç¤ºæ‰‹åž‹ */
  border-radius: 4px; /* åœ†è§’边框 */
}
.bold-large-label {
  font-weight: bold;
  font-size: 20px; /* æˆ–你需要的任何大小 */
}
.left_qiu{
  position: absolute;
  left: -74px;
  top: 0;
  width:54px;
  border-radius: 50%;
  height:54px;
  font-size: 13px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  background: #0099ff;
  transform: translate(0, 0);
}
/deep/ .ant-timeline-item-tail{
  left: -29px !important;
}
.left_qiu span{
  width: 3em;
  display: block;
  color: #fff;
  text-align: center;
}
.img{
  width: 75%;
}
.wrap{
  clear: both;
  width: 100%;
  display: flex;
  height: 50px;
  border: 1px solid #ccc;
  /* background-color: aqua; */
}
.box{
  width:21%;
  height:50px;
  border-right: 1px solid #ccc;
  line-height: 50px;
  /* background: red; */
  text-align:center;
  margin: auto;
  /deep/ .ant-select-dropdown-menu {
    text-align: left;
}
@import '~@assets/less/common.less';
src/views/flowable/workflow/InspectionOrder/InspectionOrderHandleBzz.vue
ÎļþÒÑɾ³ý
src/views/flowable/workflow/InspectionOrder/InspectionOrderXq.vue
ÎļþÒÑɾ³ý
src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue
@@ -1,337 +1,357 @@
<template>
  <a-modal
    :title="title"
    :width="width"
  <j-modal
    :width="1200"
    :visible="visible"
    :footer="null"
    :title="title"
    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
    @cancel="handCancel"
    @ok="submitForm"
    :mask-closable="false"
    :confirmLoading="confirmLoading"
    centered
  >
    <a-card :bordered="false">
      <div>
        <b>{{ selectShenpiData.title }}</b>
        <br>
        <br>
        <a-tag color="blue">
          å¤„理人 {{ selectShenpiData.assignee }}
        </a-tag>
        <a-tag color="blue">
          åˆ›å»ºæ—¶é—´ {{ selectShenpiData.createTime }}
        </a-tag>
        <br>
        <br>
        <button @click="fetchAndShowBmp" class="btn-custom">打开流程图</button>
        <div v-if="imageSrc">
          <img :src="imageSrc" alt="Fetched Image" />
        </div>
        <hr class="shallow-hr">
      </div>
      <div>
        <b>指派详情</b>
        <br>
        <a-form :form='form'>
          <a-spin :spinning="spinning">
            <a-tabs default-active-key='1' @change='callback'>
              <a-tab-pane key='1' tab='基本信息'>
                <a-form-model ref='form' :model='tableRowRecord' :rules='validatorRules'>
      <a-form-model ref="form" :model='tableRowRecord' :rules='validatorRules' :labelCol='labelCol'
                    :wrapperCol='wrapperCol'>
        <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">报修基础信息</a-divider>
                  <a-row>
                    <a-col :span='span'>
                      <a-form-model-item label='产品名称' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='productName'>
                        <a-input :disabled='coldisabled' v-model='tableRowRecord.productName'></a-input>
          <a-col :span='threeColSpan'>
            <a-form-model-item label='工单编号'>
              <a-input :readOnly='inputReadOnly' v-model='tableRowRecord.repairCode'/>
                      </a-form-model-item>
                    </a-col>
                    <a-col :span='span'>
                      <a-form-model-item label='部件名称' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='componentId'>
                        <a-input :disabled='coldisabled' v-model='tableRowRecord.componentName'></a-input>
          <a-col :span='threeColSpan'>
            <a-form-model-item label='设备编号'>
              <lx-search-equipment-select disabled v-model='tableRowRecord.equipmentId'/>
            </a-form-model-item>
          </a-col>
          <a-col :span='threeColSpan'>
            <a-form-model-item label='维修负责人'>
              <a-input :readOnly='inputReadOnly' v-model='tableRowRecord.repairer'/>
                      </a-form-model-item>
                    </a-col>
                  </a-row>
                </a-form-model>
        <a-row>
          <a-col :span="threeColSpan">
            <a-form-model-item label="故障开始时间">
              <a-input :readOnly='inputReadOnly' v-model="tableRowRecord.faultStartTime"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="threeColSpan">
            <a-form-model-item label="是否停机">
              <j-dict-select-tag type='radio' v-model='tableRowRecord.breakdownFlag' dictCode='breakdown_flag'
                                 disabled/>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row>
          <a-col :span='threeColSpan*3'>
            <a-form-model-item label='报修图片' :labelCol='labelColLong' :wrapperCol='wrapperColLong'>
              <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" disabled :number="3"
                         v-model="tableRowRecord.reportImageFiles"/>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">是否需要领用备件</a-divider>
        <a-tabs v-model="activeTabKey">
          <a-tab-pane key="1" tab="领用备件">
            <a-row>
              <a-col :span="twoColSpan*2">
                <a-form-model-item label="是否需要领用备件" prop="isUseSpare">
                  <a-radio-group v-model="tableRowRecord.isUseSpare"
                                 :disabled="isDisableUseSpare">
                    <a-radio :value="1">是</a-radio>
                    <a-radio :value="0">否</a-radio>
                  </a-radio-group>
                </a-form-model-item>
              </a-col>
              <template v-if="tableRowRecord.isUseSpare===0">
                <a-col :span="twoColSpan*2">
                  <a-form-model-item label="故障原因" prop="faultReason">
                    <a-input :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_REPAIR'"
                             v-model="tableRowRecord.faultReason" rows="4"
                             placeholder="请输入故障原因"/>
                  </a-form-model-item>
                </a-col>
                <a-col :span="twoColSpan*2">
                  <a-form-model-item label="维修结果描述" prop="repairDescription">
                    <a-textarea :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_REPAIR'"
                                v-model="tableRowRecord.repairDescription"
                                placeholder="请输入维修结果描述"/>
                  </a-form-model-item>
                </a-col>
                <a-col :span="twoColSpan*2">
                  <a-form-model-item label="维修图片">
                    <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3"
                               :disabled="disableSubmit||tableRowRecord.repairStatus!=='UNDER_REPAIR'"
                               v-model="tableRowRecord.imageFiles"/>
                  </a-form-model-item>
                </a-col>
              </template>
            </a-row>
              </a-tab-pane>
          <template v-if="selectShenpiData.procInstId">
              <a-tab-pane key='2' tab='流程节点'>
                <a-card>
                  <a-timeline style="padding:0 1% 0 12%" >
                    <a-timeline-item color='white' v-for="(item,index1) in hitaskDataSource" :key="index1">
                      <div class="bottom">
                        <p>开始时间:{{item.startTime}}</p>
                        <p>结束时间:{{item.endTime}}</p>
                        <p>处理人:{{item.assignee}}</p>
                        <p>办理类型:{{item.bllx_dictText}}</p>
                        <p v-if="item.name == '提交申请'">指派原因:{{item.cause}}</p>
                        <p v-else >处理意见:{{item.cause}}</p>
                        <div  class="left_qiu"><span>{{item.name}}</span></div>
              <a-card :bordered="false">
                <a-timeline>
                  <a-timeline-item v-for="(item,index) in hitaskDataSource" :key="index">
                    <div>
                      <h3 style="font-weight: bold;">{{item.taskName}}</h3>
                      <div>处理人:{{item.assignee_dictText}}</div>
                      <div v-if="index !==0">处理时长:{{item.duration}}</div>
                      <div v-if="item.name !== '提交申请'">处理类型:{{item.sequenceFlowName}}</div>
                      <div v-if="item.description">处理意见:{{item.description}}</div>
                      </div>
                    </a-timeline-item>
                  </a-timeline>
                </a-card>
              </a-tab-pane>
            <a-tab-pane key='3' tab='流程图'>
              <img :src="imageSrc" alt="Fetched Image"/>-->
            </a-tab-pane>
          </template>
            </a-tabs>
          </a-spin>
        </a-form>
      </div>
      <div>
        <hr class="shallow-hr">
        <br>
        <b>审批详情</b>
        <br>
        <a-form-model ref="form" :model="approveData" :rules="validatorRules" slot="detail">
        <template v-if="tableRowRecord.isUseSpare===1&&isDisableUseSpare">
          <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">管理员领用备件
          </a-divider>
          <a-row>
            <a-col :span="24" class="btxx">
              <a-form-item label="审批状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
                <j-dict-select-tag  type='list' v-model='assignFileStream.status' dictCode='dnc_assign_stream_status' placeholder="请选择审批状态"  />
              </a-form-item>
            </a-col>
            <a-col :span="24" class="btxx">
              <a-form-model-item  label="审批意见" :labelCol="labelCol" :wrapperCol="wrapperCol">
                <a-textarea v-model="assignFileStream.approveContent" rows="4" placeholder="请输入审批意见"/>
            <a-col :span="twoColSpan*2">
              <a-form-model-item prop="sparePartDescription" label="备件描述">
                <a-textarea placeholder="请输入备件描述" :readOnly="disableSubmit||tableRowRecord.repairStatus!=='WAIT_SPARES'"
                            v-model="tableRowRecord.sparePartDescription"></a-textarea>
              </a-form-model-item >
            </a-col>
          </a-row>
          <div class="table-operator" style="text-align: right;">
            <a-button  @click="handleQueXiaoTask" type="primary" icon="close">取消</a-button>
            <a-button @click="submitForm">提 äº¤</a-button>
          </div>
        </template>
        <template v-if="Boolean(tableRowRecord.sparePartDescription)&&isDisplayRepairResult">
          <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">维修结果上报</a-divider>
          <a-row>
            <a-col :span="twoColSpan*2">
              <a-form-model-item label="故障原因" prop="faultReason">
                <a-input :readOnly="disableSubmit||isDisableSubmitRepairResult" v-model="tableRowRecord.faultReason"
                         rows="4" placeholder="请输入故障原因"/>
              </a-form-model-item>
            </a-col>
          </a-row>
          <a-row>
            <a-col :span="twoColSpan*2">
              <a-form-model-item label="维修结果描述" prop="repairDescription">
                <a-textarea :readOnly="disableSubmit||isDisableSubmitRepairResult"
                            v-model="tableRowRecord.repairDescription"
                            placeholder="请输入维修结果描述"/>
              </a-form-model-item>
            </a-col>
          </a-row>
          <a-row>
            <a-col :span="twoColSpan*2">
              <a-form-model-item label="维修图片">
                <lx-upload :disabled="disableSubmit||isDisableSubmitRepairResult" :returnUrl="false" :isMultiple="true"
                           file-type="image" :number="3"
                           v-model="tableRowRecord.imageFiles"/>
              </a-form-model-item>
            </a-col>
          </a-row>
        </template>
        </a-form-model>
      </div>
    </a-card>
  </a-modal>
    </a-spin>
  </j-modal>
</template>
<script>
import '@assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage'
  import LxSearchEquipmentSelect from '../../../eam/equipment/modules/LxSearchEquipmentSelect'
export default {
  name: 'RepairOrderApprovalModal',
  mixins: [mixinDevice],
    components: { LxSearchEquipmentSelect },
  props: {
    selectShenpiData: {
      type: Object,
      required: true
    }
  },
  data() {
    return {
      form: this.$form.createForm(this),
      span: 12,
      span1: 8,
      coldisabled: true,
        title: '',
        threeColSpan: 8,
        twoColSpan: 12,
        inputReadOnly: true,
        disableSubmit: false,
        confirmLoading: false,
      spinning: false,
      tableRowRecord: {},
      assignFileStream:{},
      tableDataSource: [],
      usageDataSource: [],
      hitaskDataSource:[],
      bomForm: {},
      approveContent:"",
      imageSrc: null,
      drawerVisible: true,
        activeTabKey: '1',
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 }
          sm: { span: 6 }
      },
      wrapperCol: {
        xs: { span: 30 },
          xs: { span: 24 },
        sm: { span: 16 }
      },
        labelColLong: {
          xs: { span: 24 },
          sm: { span: 2 }
        },
        wrapperColLong: {
          xs: { span: 24 },
          sm: { span: 20 }
        },
      validatorRules: {
          isUseSpare: [
            { required: true, message: '请选择是否需要领用备件' }
          ],
          sparePartDescription: [
            { required: true, message: '请输入备件描述' }
          ],
          faultReason: [
            { required: true, message: '请输入故障原因' }
          ],
          repairDescription: [
            { required: true, message: '请输入维修结果描述' }
          ]
      },
      approveData: {},
      flowData: {},
      title: '',
      width: 1000,
      visible: false,
      // è¡¨å¤´
      url: {
        queryBomDataById: '/eam/eamRepairOrder/queryById',
        diagramView: '/assign/flow/diagramView',
        queryHisTaskList:'/dncFlow/dispatchFile/queryHisTaskList',
        approve:"/activit/assign/file/approve",
      },
      dictOptions: {},
      superFieldList: [],
      workflowSource: []
          queryHisTaskList: '/assign/flow/queryHisTaskList',
          approve: '/eam/eamRepairOrder/perform'
        }
    }
  },
  created() {
    computed: {
      isDisableUseSpare() {
        return this.disableSubmit || this.tableRowRecord.repairStatus !== 'UNDER_REPAIR' || Boolean(this.tableRowRecord.sparePartDescription)
  },
  computed: {},
      isDisplayRepairResult() {
        return ['UNDER_REPAIR', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus)
      },
      isDisableSubmitRepairResult() {
        return ['WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus)
      }
    },
  methods: {
    callback() {
    },
    handCancel() {
      this.visible = false
    },
    clearTableSource() {
      this.tableDataSource = []
      this.usageDataSource = []
    },
    fetchAndShowBmp() {
      console.log('flowData----->', this.flowData)
      try {
        let parm = {
          processDefinitionId: this.flowData.processDefinitionId,
          processInstanceId:this.flowData.processInstanceId,
          TaskDefinitionKey:this.flowData.processDefinitionKey
        }
        downFile(this.url.diagramView,parm,'get').then((res=>{
          console.log('Pica------>',res)
      /**
       * èŽ·å–æµç¨‹èŠ‚ç‚¹å’Œæµç¨‹å›¾
       * @param record å¾…办记录信息
       */
      getAllApproveData(record) {
        if (!record.procInstId) return
        console.log('record----->', record)
        const { procInstId, processDefinitionId, processInstanceId, processDefinitionKey } = record
        const param = { procInstId }
        const imageParam = { processDefinitionId, processInstanceId, TaskDefinitionKey: processDefinitionKey }
        const that = this
        getAction(this.url.queryHisTaskList, param)
          .then(res => {
            that.hitaskDataSource = res.result
          })
        downFile(this.url.diagramView, imageParam, 'get')
          .then((res => {
          const urlObject = window.URL.createObjectURL(new Blob([res]))
          this.imageSrc = urlObject
            that.imageSrc = urlObject
        }))
      } catch (error) {
        console.error('Error fetching image blob:', error)
        alert('无法加载图片,请稍后再试。')
      }
          .catch(err => {
            that.$notification.error({
              message: '消息',
              description: res.message
            })
          })
    },
    handleQueXiaoTask(){
      this.visible = false
      this.routeReload()
    },
    submitForm () {
      const that = this;
      if (!that.assignFileStream.status==null || that.assignFileStream.status===undefined){
        this.$message.warning('请选择审批状态!')
        return false;
      }
      if (!that.assignFileStream.approveContent==null || that.assignFileStream.approveContent===undefined) {
        this.$message.warning('请输入审批意见!')
        return false;
      }
      // è§¦å‘表单验证
      this.form.validateFields((err, values) => {
        if (!err) {
          that.confirmLoading = true;
          let url=this.url.approve
          let method = 'post';
          let flowTaskVo = {}
          flowTaskVo.status=that.assignFileStream.status;
          flowTaskVo.approveContent =that.assignFileStream.approveContent;
          flowTaskVo.comment =that.assignFileStream.approveContent;
          flowTaskVo.secretLevel = that.assignFileStream.secretLevel;
          flowTaskVo.dataId = this.selectShenpiData.dataId
          flowTaskVo.taskId = this.selectShenpiData.id
          flowTaskVo.userId = this.selectShenpiData.assignee
          flowTaskVo.instanceId = this.selectShenpiData.procInstId
          flowTaskVo.targetKey = this.selectShenpiData.taskDefKey
          flowTaskVo.values = this.selectShenpiData.variables
          flowTaskVo.assignee = this.selectShenpiData.assignee
          flowTaskVo.secretLevel = that.assignFileStream.secretLevel;
          console.log("表单提交数据",flowTaskVo)
          httpAction(url,flowTaskVo,method).then((res)=>{
      /**
       * èŽ·å–å¾…åŠžè®°å½•çš„åŸºæœ¬ä¿¡æ¯
       * @param record å¾…办记录信息
       */
      getBasicInformation(record) {
        this.spinning = true
        const that = this
        const param = { id: record.dataId }
        this.tableRowRecord = {}
        this.activeTabKey = '1'
        getAction(this.url.queryBomDataById, param)
          .then((res => {
            if(res.success){
              that.$message.success(res.message);
              that.$emit('ok');
              that.tableRowRecord = Object.assign({}, res.result, {
                isUseSpare: res.result.isUseSpare === null ? 0 : res.result.isUseSpare,
                imageFiles: JSON.parse(res.result.imageFiles),
                reportImageFiles: JSON.parse(res.result.reportImageFiles)
              })
              console.log('this.tableRowRecord----->', that.tableRowRecord)
            }
          }))
          .finally(() => {
            that.spinning = false
          })
      },
      submitForm() {
        const that = this
        // è§¦å‘表单验证
        this.$refs.form.validate(valid => {
          if (valid) {
            that.confirmLoading = that.spinning = true
            const { isUseSpare, faultReason, repairDescription, sparePartDescription, imageFiles, equipmentId } = that.tableRowRecord
            const { dataId, id, procInstId, taskDefKey, variables } = that.selectShenpiData
            const flowTaskVo = {}
            flowTaskVo.isUseSpare = isUseSpare
            flowTaskVo.faultReason = faultReason
            flowTaskVo.repairDescription = repairDescription
            flowTaskVo.sparePartDescription = sparePartDescription
            flowTaskVo.imageFilesResult = imageFiles
            flowTaskVo.equipmentId = equipmentId
            flowTaskVo.id = dataId
            flowTaskVo.dataId = dataId
            flowTaskVo.taskId = id
            flowTaskVo.instanceId = procInstId
            flowTaskVo.targetKey = taskDefKey
            flowTaskVo.values = variables
            console.log('表单提交数据', flowTaskVo)
            httpAction(this.url.approve, flowTaskVo, 'post')
              .then((res) => {
                if (res.success) {
                  that.$message.success(res.message)
                  that.handCancel()
                  that.$emit('searchReset')
            }else{
              that.$message.warning(res.message);
                  that.$message.warning(res.message)
            }
          }).finally(() => {
            that.confirmLoading = false;
              that.confirmLoading = that.spinning = false
          })
          } else {
            return false
        }
      })
    },
    getAllApproveData(item) {
      console.log('selectShenpiData----->', this.selectShenpiData)
      this.flowData = item
      let param = {
        'id': item.dataId
      }
      let parmhis={
        'procInstId': item.dataId
      }
      getAction(this.url.queryHisTaskList,parmhis).then(res=>{
        this.hitaskDataSource=res.result
        getAction(this.url.queryBomDataById, param).then((res => {
          if (res.success) {
            this.tableRowRecord = res.result
            console.log('this.tableRowRecord----->', this.tableRowRecord)
          }
        }))
      }).finally(
        this.visible = true,
        console.log('this.approveData---->', this.approveData)
      )
      handCancel() {
        this.visible = false
        if (this.$refs.form) this.$refs.form.clearValidate()
    }
  }
}
</script>
<style scoped>
.shallow-hr {
  border: 0;
  height: 1px; /* åˆ†ç•Œçº¿çš„高度 */
  background-color: rgba(0, 0, 0, 0.1); /* ä½¿ç”¨ RGBA é¢œè‰²ï¼Œå¹¶è®¾ç½®è¾ƒä½Žçš„透明度 */
  margin: 20px 0; /* åˆ†ç•Œçº¿ä¸Šä¸‹çš„外边距 */
}
.btn-custom {
  background-color: #4CAF50; /* ç»¿è‰²èƒŒæ™¯ */
  color: white; /* ç™½è‰²æ–‡å­— */
  border: none; /* æ— è¾¹æ¡† */
  padding: 5px 15px; /* å†…边距 */
  text-align: center; /* æ–‡å­—居中 */
  text-decoration: none; /* æ— ä¸‹åˆ’线 */
  display: inline-block; /* è¡Œå†…块元素 */
  font-size: 12px; /* å­—体大小 */
  margin: 4px 2px; /* å¤–边距 */
  cursor: pointer; /* é¼ æ ‡æ‚¬åœæ—¶æ˜¾ç¤ºæ‰‹åž‹ */
  border-radius: 4px; /* åœ†è§’边框 */
}
.bold-large-label {
  font-weight: bold;
  font-size: 20px; /* æˆ–你需要的任何大小 */
}
.left_qiu{
  position: absolute;
  left: -74px;
  top: 0;
  width:54px;
  border-radius: 50%;
  height:54px;
  font-size: 13px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  background: #0099ff;
  transform: translate(0, 0);
}
/deep/ .ant-timeline-item-tail{
  left: -29px !important;
}
.left_qiu span{
  width: 3em;
  display: block;
  color: #fff;
  text-align: center;
}
.img{
  width: 75%;
}
.wrap{
  clear: both;
  width: 100%;
  display: flex;
  height: 50px;
  border: 1px solid #ccc;
  /* background-color: aqua; */
}
.box{
  width:21%;
  height:50px;
  border-right: 1px solid #ccc;
  line-height: 50px;
  /* background: red; */
  text-align:center;
  margin: auto;
}
@import '~@assets/less/common.less';
</style>
src/views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal.vue
@@ -4,12 +4,14 @@
    :width="1200"
    :visible="visible"
    :confirmLoading="confirmLoading"
    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
    switchFullscreen
    @ok="handleOk"
    @cancel="handleCancel"
    centered
    cancelText="关闭">
    <a-spin :spinning="confirmLoading">
    <a-spin :spinning="spinning">
      <a-form-model ref="form" :model="model" :rules="validatorRules">
        <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> ä¿å…»åŸºç¡€ä¿¡æ¯
        </a-divider>
@@ -23,7 +25,8 @@
            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="设备编码">
              <maintenance-equipment-select placeholder="请输入设备编号或名称搜索" v-model="model.equipmentId"
                                            :maintenanceCategory="maintenanceCategory"
                                            @autocompleteForm="autocompleteForm" disabled></maintenance-equipment-select>
                                            @autocompleteForm="autocompleteForm"
                                            disabled></maintenance-equipment-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
@@ -35,7 +38,8 @@
        <a-row :gutter="24">
          <a-col :span="8">
            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenanceDate" label="保养日期">
              <a-date-picker placeholder="请选择计划保养日期" v-model="model.maintenanceDate" format="YYYY-MM-DD" disabled
              <a-date-picker placeholder="请选择计划保养日期" v-model="model.maintenanceDate" format="YYYY-MM-DD"
                             disabled
                             style="width: 100%" />
            </a-form-model-item>
          </a-col>
@@ -56,38 +60,150 @@
            <a-textarea placeholder="请输入备注" v-model="model.remark" disabled />
          </a-form-model-item>
        </a-row>
        <a-row :gutter="24">
          <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" label="保养图片">
            <lx-upload :returnUrl="false"
                       :isMultiple="true"
                       file-type="image"
                       :disabled="confirmDisable"
                       :number="3"
                       v-model="model.imageFilesResult"/>
          </a-form-model-item>
        </a-row>
        <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> ä¿å…»é¡¹ä¿¡æ¯
        </a-divider>
        <a-row :gutter="24">
          <a-tabs v-model="activeTabKey">
            <a-tab-pane key="1" tab="保养项明细">
          <j-vxe-table
            ref="editableDetailTable"
            :rowNumber="true"
                :rowNumber="false"
            :rowSelection="true"
            :bordered="true"
            :alwaysEdit="true"
            :toolbar="true"
            :toolbarConfig="detail.toolbarConfig"
                :toolbar="false"
            keep-source
            :height="300"
            :loading="detail.loading"
            :dataSource="detail.dataSource"
            :columns="detail.columns"
            style="margin-top: 8px;" />
                @selectRowChange="handleTableSelectRowChange"
              >
                <template v-slot:maintenanceResult="props">
                  <j-dict-select-tag v-model="props.row.maintenanceResult" dictCode="eam_inspection_result"
                                     placeholder="请选择保养结果"
                                     :disabled="disableSubmit || confirmDisable"
                                     @change="handleInspectionResultSelectChange($event,props.row)"
                                     style="width: 100%"/>
                </template>
                <template v-slot:exceptionDescription="props">
                  <a-textarea style="height: 32px" v-model="props.row.exceptionDescription"
                              :disabled="disableSubmit || confirmDisable || !props.row.maintenanceResult || props.row.maintenanceResult === '1'"/>
                </template>
                <template v-slot:reportFlag="props">
                  <j-dict-select-tag v-model="props.row.reportFlag"
                                     :disabled="disableSubmit || confirmDisable || !props.row.maintenanceResult || props.row.maintenanceResult === '1'"
                                     dictCode="yn"
                                     style="width: 100%"/>
                </template>
              </j-vxe-table>
            </a-tab-pane>
            <template v-if="selectShenpiData.procInstId">
              <a-tab-pane key='2' tab='流程节点'>
                <a-card :bordered="false">
                  <a-timeline>
                    <a-timeline-item v-for="(item,index) in taskData" :key="index">
                      <div>
                        <h3 style="font-weight: bold;">{{item.taskName}}</h3>
                        <div>处理人:{{item.assignee_dictText}}</div>
                        <div v-if="index !==0">处理时长:{{item.duration}}</div>
                        <div v-if="item.name !== '提交申请'">处理类型:{{item.sequenceFlowName}}</div>
                        <div v-if="item.description">处理意见:{{item.description}}</div>
                      </div>
                    </a-timeline-item>
                  </a-timeline>
                </a-card>
              </a-tab-pane>
              <a-tab-pane key='3' tab='流程图'>
                <img :src="imageSrc" alt="Fetched Image"/>-->
              </a-tab-pane>
            </template>
            <a-button v-if="!disableSubmit &&!confirmDisable&& selectedRowKeys.length > 0" slot="tabBarExtraContent"
                      type="primary" @click="handleSelectAllInspectionResult">保养正常
            </a-button>
          </a-tabs>
        </a-row>
        <div v-if="confirmDisable">
        <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> ç­ç»„长确认信息
        </a-divider>
          <a-row :gutter="24">
            <a-col :span="12">
              <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmDealType" label="确认类型">
                <j-dict-select-tag type='radio' v-model='model.confirmDealType' dictCode='approved_rejected'
                                   placeholder="请选择处理类型" :disabled="disableSubmit || initialAcceptanceDisable"/>
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
              <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmComment" label="确认意见">
                <a-textarea placeholder="请输入意见" v-model="model.confirmComment"
                            :disabled="disableSubmit || initialAcceptanceDisable"/>
              </a-form-model-item>
            </a-col>
          </a-row>
        </div>
        <div v-if="initialAcceptanceDisable">
        <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> åˆéªŒæ”¶ä¿¡æ¯
        </a-divider>
          <a-row :gutter="24">
            <a-col :span="12">
              <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="initialAcceptanceComment"
                                 label="初验收意见">
                <a-textarea placeholder="请输入意见" v-model="model.initialAcceptanceComment"
                            :disabled="disableSubmit || finalAcceptanceDisable"/>
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
              <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="initialAcceptanceFilesResult"
                                 label="初验收附件">
                <lx-upload :returnUrl="false"
                           :isMultiple="true"
                           :disabled="disableSubmit || finalAcceptanceDisable"
                           v-model="model.initialAcceptanceFilesResult"/>
              </a-form-model-item>
            </a-col>
          </a-row>
        </div>
        <div v-if="finalAcceptanceDisable">
        <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> ç»ˆéªŒæ”¶ä¿¡æ¯
        </a-divider>
          <a-row :gutter="24">
            <a-col :span="12">
              <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="finalAcceptanceComment"
                                 label="终验收意见">
                <a-textarea placeholder="请输入意见" v-model="model.finalAcceptanceComment"
                            :disabled="disableSubmit || completionDisable"/>
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
              <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="finalAcceptanceFilesResult"
                                 label="终验收附件">
                <lx-upload :returnUrl="false"
                           :isMultiple="true"
                           :disabled="disableSubmit || completionDisable"
                           v-model="model.finalAcceptanceFilesResult"/>
              </a-form-model-item>
            </a-col>
          </a-row>
        </div>
      </a-form-model>
    </a-spin>
  </j-modal>
</template>
<script>
import { getAction, httpAction } from '@/api/manage'
  import { downFile, getAction, httpAction } from '@/api/manage'
import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js'
import { JVXETypes } from '@comp/jeecg/JVxeTable'
import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect'
@@ -98,16 +214,20 @@
  components: {
    MaintenanceEquipmentSelect
  },
    props: {
      selectShenpiData: {
        type: Object
      }
    },
  data() {
    return {
      title: '操作',
      visible: false,
      //状态控制
      //保养中 ä¸å¯ç¼–辑
      underMaintenanceDisable : false,
      confirmDisable : false,
      initialAcceptanceDisable : false,
      finalAcceptanceDisable : false,
        // confirmDisable: false,
        // initialAcceptanceDisable: false,
        // finalAcceptanceDisable: false,
      editable: false,
      model: {},
      maintenanceCategory: 'WEEK_MAINTENANCE',
@@ -129,14 +249,36 @@
        sm: { span: 21 }
      },
      confirmLoading: false,
        spinning: false,
        imageSrc: null,
        activeTabKey: '1',
      validatorRules: {
          confirmDealType: [
            { required: true, message: '请选择通过或驳回!' }
          ],
          confirmComment: [
            { required: true, message: '请输入确认意见!' }
          ],
          initialAcceptanceComment: [
            { required: true, message: '请输入初验收意见!' }
          ],
          finalAcceptanceComment: [
            { required: true, message: '请输入终验收意见!' }
          ]
      },
      url: {
        queryById: '/eam/weekMaintenanceOrder/queryById',
        detail: '/eam/weekMaintenanceOrderDetail/queryList',
        approval : '/eam/weekMaintenanceOrder/approval',
        userSelect: '/eam/user_select/list',
          queryHisTaskList: '/assign/flow/queryHisTaskList',
          diagramView: '/assign/flow/diagramView'
      },
        disableSubmit: false,
        taskData: [],
        isDisplayBmp: false,
        showBmpButtonLoading: false,
        selectedRowKeys: [],
      detail: {
        loading: false,
        dataSource: [],
@@ -155,29 +297,62 @@
            title: '序号',
            key: 'itemCode',
            type: JVXETypes.normal,
            width: '10%',
            align: 'center',
              width: '5%',
              align: 'center'
          },
          {
            title: '保养项',
            key: 'itemName',
            type: JVXETypes.normal,
            width: '20%',
            align: 'center',
              width: '10%',
              align: 'center'
          },
          {
            title: '子保养项',
            key: 'subItemName',
            type: JVXETypes.normal,
            width: '25%',
              width: '10%',
            align: 'center'
          },
          {
            title: '保养要求',
            key: 'itemDemand',
            type: JVXETypes.normal,
            width: '30%',
              width: '20%',
              align: 'center'
            },
            {
              title: '保养结果',
              key: 'maintenanceResult',
              type: JVXETypes.slot,
              width: '10%',
            align: 'center',
              slotName: 'maintenanceResult',
              validateRules: [
                { required: true, message: '保养结果不能为空!' }
              ]
            },
            {
              title: '异常描述',
              key: 'exceptionDescription',
              type: JVXETypes.slot,
              width: '20%',
              align: 'center',
              slotName: 'exceptionDescription',
              validateRules: [
                { handler: this.customValidator }
              ]
            },
            {
              title: '是否报修',
              key: 'reportFlag',
              type: JVXETypes.slot,
              width: '10%',
              align: 'center',
              slotName: 'reportFlag',
              validateRules: [
                { handler: this.customValidator }
              ]
          }
        ],
        toolbarConfig: {
@@ -191,21 +366,94 @@
  },
  created() {
  },
    computed: {
      confirmDisable: function() {
        return ['WAIT_CONFIRM', 'WAIT_INITIAL_ACCEPTANCE', 'WAIT_FINAL_ACCEPTANCE', 'COMPLETE'].includes(this.model.maintenanceStatus)
      },
      initialAcceptanceDisable: function() {
        return ['WAIT_INITIAL_ACCEPTANCE', 'WAIT_FINAL_ACCEPTANCE', 'COMPLETE'].includes(this.model.maintenanceStatus)
      },
      finalAcceptanceDisable: function() {
        return ['WAIT_FINAL_ACCEPTANCE', 'COMPLETE'].includes(this.model.maintenanceStatus)
      },
      completionDisable: function() {
        return ['COMPLETE', 'ABOLISH'].includes(this.model.maintenanceStatus)
      }
    },
  methods: {
    async handleDetail(dataId) {
      this.loading = true;
      this.visible = true;
      async handleDetail(item) {
        this.initParams()
        this.model = {}
        if (item.procInstId) {
          const { processDefinitionId, processInstanceId, processDefinitionKey, procInstId } = item
          let taskDataList = await getAction(this.url.queryHisTaskList, { procInstId })
          this.taskData = [...taskDataList.result]
          downFile(this.url.diagramView, {
            processDefinitionId,
            processInstanceId,
            TaskDefinitionKey: processDefinitionKey
          }, 'get')
            .then((res => {
              const urlObject = window.URL.createObjectURL(new Blob([res]))
              this.imageSrc = urlObject
            }))
            .catch(err => {
              this.$notification.error({
                message: '消息',
                description: res.message
              })
            })
        }
        let res = await getAction(this.url.queryById, { id: item.dataId })
        this.model = Object.assign({}, res.result)
        if (this.model.imageFiles) {
          let obj = JSON.parse(this.model.imageFiles)
          this.model.imageFilesResult = [...obj]
        }
        if (this.model.initialAcceptanceFiles) {
          let obj = JSON.parse(this.model.initialAcceptanceFiles)
          this.model.initialAcceptanceFilesResult = [...obj]
        }
        if (this.model.finalAcceptanceFiles) {
          let obj = JSON.parse(this.model.finalAcceptanceFiles)
          this.model.finalAcceptanceFilesResult = [...obj]
        }
        this.model.dataId = item.dataId
        this.model.taskId = item.id
        this.model.userId = item.assignee
        this.model.instanceId = item.procInstId
        this.model.values = item.variables
        await this.loadDetail(item.dataId)
      },
      recordDetail(record) {
        console.log('record', record)
        this.initParams()
        this.model = Object.assign({}, record)
        if (this.model.imageFiles) {
          let obj = JSON.parse(this.model.imageFiles)
          this.model.imageFilesResult = [...obj]
        }
        if (this.model.initialAcceptanceFiles) {
          let obj = JSON.parse(this.model.initialAcceptanceFiles)
          this.model.initialAcceptanceFilesResult = [...obj]
        }
        if (this.model.finalAcceptanceFiles) {
          let obj = JSON.parse(this.model.finalAcceptanceFiles)
          this.model.finalAcceptanceFilesResult = [...obj]
        }
        this.loadDetail(record.id)
      },
      initParams() {
      this.detail.dataSource = []
      let res = await getAction(this.url.queryById, {id: dataId});
      this.model = Object.assign({}, res.result);
      await this.loadDetail(dataId);
      this.loading = false;
        this.visible = true
        this.activeTabKey = '1'
        this.spinning = true
    },
    close() {
      this.$emit('close')
      this.visible = false
      this.$refs.form.clearValidate()
    },
    async handleOk() {
      const that = this
      let errMap = await that.$refs.editableDetailTable.validateTable()
@@ -216,32 +464,29 @@
      // è§¦å‘表单验证
      this.$refs.form.validate(valid => {
        if (valid) {
            that.confirmLoading = that.spinning = true
          let tableData = that.$refs.editableDetailTable.getTableData()
          that.model.tableDetailList = [...tableData]
          that.confirmLoading = true
          let httpurl = this.url.approval
          let method = 'put'
          httpAction(httpurl, this.model, method).then((res) => {
            if (res.success) {
              that.$message.success(res.message)
              that.$emit('ok')
                that.$emit('searchReset')
              that.close()
            } else {
              that.$message.warning(res.message)
            }
          }).finally(() => {
            that.confirmLoading = false
              that.confirmLoading = that.spinning = false
          })
        } else {
          return false
        }
      })
    },
    handleCancel() {
      this.close()
    },
    autocompleteForm(selectObj) {
      this.$set(this.model, 'standardName', selectObj.standardName)
      this.$set(this.model, 'maintenancePeriod', selectObj.maintenancePeriod)
@@ -251,19 +496,24 @@
      if (!this.model.id) {
        this.loadStandardDetail(selectObj.id)
      }
      debugger
      this.loadMaintenanceOperatorList(this.model.equipmentId);
        this.loadMaintenanceOperatorList(this.model.equipmentId)
    },
    //标准选择变化
    loadDetail(orderId) {
      if (orderId) {
        getAction(this.url.detail, { orderId: orderId }).then(res => {
          getAction(this.url.detail, { orderId: orderId })
            .then(res => {
          if (res.success) {
            this.detail.dataSource = [...res.result]
          }
        })
            .finally(() => {
              this.spinning = false
            })
      }
    },
    loadMaintenanceOperatorList(equipmentId) {
      this.maintenanceOperatorOptions = []
      let params = { positionCode: 'PCR0001' }
@@ -279,8 +529,57 @@
          }))
        }
      })
    }
      },
      handleInspectionResultSelectChange(value, record) {
        if (record.exceptionDescription) delete record.exceptionDescription
        if (record.reportFlag) delete record.reportFlag
      },
      // æ‰¹é‡é€‰æ‹©æ‰€æœ‰ç‚¹æ£€ç»“æžœ
      handleSelectAllInspectionResult() {
        this.selectedRowKeys.forEach(key => {
          const dataItem = this.detail.dataSource.find(item => item.id === key)
          if (dataItem && dataItem.maintenanceResult !== '1') {
            console.log('dataItem', dataItem)
            delete dataItem.exceptionDescription
            delete dataItem.reportFlag
            dataItem.maintenanceResult = '1'
          }
        })
        this.$refs.editableDetailTable.clearCheckboxRow()
        this.selectedRowKeys = []
      },
      /**
       * è¡¨æ ¼å¤šé€‰æ¡†å‘生改变时触发
       * @param {selectedRowIds} è¡¨æ ¼ä¸­å·²é€‰æ‹©çš„ID列表
       */
      handleTableSelectRowChange({ selectedRowIds }) {
        this.selectedRowKeys = selectedRowIds
      },
      customValidator({ cellValue, row }, callback) {
        if (row.maintenanceResult === '2') {
          if (!cellValue) {
            callback(false, '${title}不能为空!') // false = æœªé€šè¿‡ï¼Œå¯ä»¥è·Ÿè‡ªå®šä¹‰æç¤º
          } else {
            callback(true) // true = é€šè¿‡éªŒè¯
          }
        } else {
          callback(true)
        }
      },
      handleCancel() {
        this.close()
      },
      close() {
        this.$emit('close')
        this.visible = false
        this.$refs.form.clearValidate()
      }
  }
}
</script>
src/views/system/modules/SelectDeviceDrawer.vue
@@ -96,6 +96,7 @@
        expandedKeys: [],
        checkedKeys: [],
        autoExpandParent: true,
        searchValue: '',
        url: {
          getBaseTree: '/mdc/mdcEquipment/queryTreeListByProduction'
        },
vue.config.js
@@ -109,7 +109,7 @@
      /* æ³¨æ„ï¼šjeecgboot前端做了改造,此处不需要配置跨域和后台接口(只需要改.env相关配置文件即可)
          issues/3462 å¾ˆå¤šäººæ­¤å¤„做了配置,导致刷新前端404问题,请一定注意*/
      '/jeecg-boot': {
        target: 'http://localhost:8080', // è¯·æ±‚本地 éœ€è¦jeecg-boot后台项目
        target: 'http://localhost:9999', // è¯·æ±‚本地 éœ€è¦jeecg-boot后台项目
        ws: false,
        changeOrigin: true
      }