1、调整全局domianUrl为/jeecg-boot
2、设备台账页面实现查询设备对应点检工单功能
3、工作流我的待办设备维修分类详情弹窗布局及功能逻辑调整
4、工作流我的待办页面表格样式调整
已修改8个文件
1656 ■■■■ 文件已修改
src/config/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/equipment/EamEquipmentList.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/maintenance/EamInspectionOrderList.vue 582 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/maintenance/modules/EamInspectionOrderModal.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/maintenance/modules/EamInspectionOrderModalXq.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/repair/EamRepairOrderList.vue 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/FlowTodo.vue 486 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue 507 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/config/index.js
@@ -2,7 +2,7 @@
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
src/views/eam/equipment/EamEquipmentList.vue
@@ -173,6 +173,9 @@
      <a-tab-pane tab="维修工单" :key="2">
        <eam-repair-order-list ref="tabPaneTableListRef2" :isDisplayOperation="false"/>
      </a-tab-pane>
      <a-tab-pane tab="点检工单" :key="3">
        <eam-inspection-order-list ref="tabPaneTableListRef3" :isDisplayOperation="false"/>
      </a-tab-pane>
    </a-tabs>
    <!-- 表单区域 -->
@@ -194,11 +197,13 @@
  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'
  export default {
    name: 'EamEquipmentList',
    mixins: [JeecgListMixin],
    components: {
      EamInspectionOrderList,
      EamRepairOrderList,
      EamMaintenanceStandardList,
      ResumeDrawer,
src/views/eam/maintenance/EamInspectionOrderList.vue
@@ -1,7 +1,7 @@
<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">
@@ -42,21 +42,30 @@
    <!-- 查询区域-END -->
    <!-- 操作按钮区域 -->
    <div class="table-operator">
    <div class="table-operator" v-if="isDisplayOperation">
      <a-button @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="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" @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>
        <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>
@@ -79,7 +88,8 @@
        </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;"/>
          <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>
@@ -95,31 +105,37 @@
        </template>
        <span slot="action" slot-scope="text, record">
          <a v-if="record.inspectionStatus === '1'" @click="handleEdit(record)">编辑</a>
          <template v-if="record.inspectionStatus === '1'">
            <a @click="handleEdit(record)">编辑</a>
          <a-divider v-if="record.inspectionStatus === '1'" type="vertical" />
          <a-divider type="vertical"/>
          <a-popconfirm v-if="record.inspectionStatus === '1'" title="确定领取吗?" @confirm="() => handleInspection(record.id)">
          <a-popconfirm title="确定领取吗?"
                        @confirm="() => handleInspection(record.id)">
                  <a>领取</a>
          </a-popconfirm>
          <a-divider v-if="record.inspectionStatus === '1'" type="vertical" />
          <a-divider type="vertical"/>
          <a-dropdown>
            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
            <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a @click="handleDetail(record)">详情</a>
              </a-menu-item>
              <a-menu-item  v-if="record.inspectionStatus === '1'" >
              <a-menu-item>
                <a-popconfirm title="确定作废吗?" @confirm="() => handleOrReceive(record.id)">
                  <a>作废</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>
          </template>
          <template v-else>
            <a @click="handleDetail(record)">详情</a>
          </template>
        </span>
      </a-table>
    </div>
@@ -130,283 +146,277 @@
<script>
import '@/assets/less/TableExpand.less'
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 '@/assets/less/TableExpand.less'
  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'
export default {
  name: 'EamInspectionOrderList',
  mixins:[JeecgListMixin, mixinDevice],
  components: {
    EamInspectionOrderModal,
    EamInspectionOrderModalXq
  },
  data () {
    return {
      description: 'eam_inspection_order管理页面',
      // 表头
      columns: [
        {
          title: '#',
          dataIndex: '',
          key:'rowIndex',
          width:60,
          align:"center",
          customRender:function (t,r,index) {
            return parseInt(index)+1;
  export default {
    name: 'EamInspectionOrderList',
    mixins: [JeecgListMixin, mixinDevice],
    components: {
      EamInspectionOrderModal,
      EamInspectionOrderModalXq
    },
    props: {
      isDisplayOperation: {
        type: Boolean,
        default: true
      }
    },
    data() {
      return {
        description: 'eam_inspection_order管理页面',
        disableMixinCreated: true,
        // 表头
        columns: [
          {
            title: '#',
            dataIndex: '',
            key: 'rowIndex',
            width: 60,
            align: 'center',
            customRender: function(t, r, index) {
              return parseInt(index) + 1
            }
          },
          {
            title: '工单号',
            align: 'center',
            dataIndex: 'orderNum'
          },
          {
            title: '设备编号',
            align: 'center',
            dataIndex: 'equipmentId_dictText'
          },
          {
            title: '标准编码',
            align: 'center',
            dataIndex: 'standardId_dictText'
          },
          {
            title: '点检日期',
            align: 'center',
            dataIndex: 'inspectionDate',
            customRender: function(text) {
              return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
            }
          },
          {
            title: '点检过期时间',
            align: 'center',
            dataIndex: 'expirationTime',
            customRender: function(text) {
              return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
            }
          },
          {
            title: '创建方式',
            align: 'center',
            dataIndex: 'creationMethod_dictText'
          },
          {
            title: '点检状态',
            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',
            dataIndex: 'operator_dictText'
          },
          {
            title: '班组长确认',
            align: 'center',
            dataIndex: 'confirmUser'
          },
          {
            title: '确认时间',
            align: 'center',
            dataIndex: 'confirmTime',
            customRender: function(text) {
              return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
            }
          }
        ],
        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'
        },
        {
          title:'工单号',
          align:"center",
          dataIndex: 'orderNum'
        },
        {
          title:'设备编号',
          align:"center",
          dataIndex: 'equipmentId_dictText'
        },
        {
          title:'标准编码',
          align:"center",
          dataIndex: 'standardId_dictText'
        },
        {
          title:'点检日期',
          align:"center",
          dataIndex: 'inspectionDate',
          customRender:function (text) {
            return !text?"":(text.length>10?text.substr(0,10):text)
          }
        },
        {
          title:'点检过期时间',
          align:"center",
          dataIndex: 'expirationTime',
          customRender:function (text) {
            return !text?"":(text.length>10?text.substr(0,10):text)
          }
        },
        {
          title:'创建方式',
          align:"center",
          dataIndex: 'creationMethod_dictText'
        },
        {
          title:'点检状态',
          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",
          dataIndex: 'operator_dictText'
        },
        {
          title:'班组长确认',
          align:"center",
          dataIndex: 'confirmUser'
        },
        {
          title:'确认时间',
          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' }
        }
      ],
      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"
        dictOptions: {},
        superFieldList: []
      }
    },
    created() {
      if (!this.isDisplayOperation) {
        return
      }
      const operationColumn = {
        title: '操作',
        dataIndex: 'action',
        align: 'center',
        fixed: 'right',
        width: 147,
        scopedSlots: { customRender: 'action' }
      }
      this.columns = [...this.columns, operationColumn]
      this.loadData(1)
    },
    computed: {
      importExcelUrl: function() {
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
      }
    },
    methods: {
      initDictConfig() {
      },
      dictOptions:{},
      superFieldList:[],
      //详情
      handleDetail: function(record) {
        this.$refs.modalFormXq.edit(record)
        this.$refs.modalFormXq.title = '详情'
        this.$refs.modalFormXq.disableSubmit = true
      },
      handleInspection(id) {
        if (!this.url.receiveInspectionOrder) {
          this.$message.error('请设置url.receiveInspectionOrder!')
          return
        }
        var that = this
        getAction(that.url.receiveInspectionOrder, { id: id }).then((res) => {
          if (res.success) {
            that.$notification.success({
              message: '消息',
              description: res.message
            })
            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!")
          return
        }
        var that = this;
        getAction(that.url.cancelInspectionOrder, { id: id }).then((res) => {
          if (res.success) {
            that.$notification.success({
              message: '消息',
              description: res.message
            });
            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: '请选择一条记录'
          })
        } 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
              getAction(that.url.cancelOrReceive, { ids: ids, type: type }).then((res) => {
                if (res.success) {
                  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
              })
            }
          })
        }
      },
      batchLq(type) {
        if (this.selectedRowKeys.length <= 0) {
          this.$notification.warning({
            message: '消息',
            description: '请选择一条记录'
          })
        } 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
              getAction(that.url.cancelOrReceive, { ids: ids, type: type }).then((res) => {
                if (res.success) {
                  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
              })
            }
          })
        }
      }
    }
  },
  created() {
    this.getSuperFieldList();
  },
  computed: {
    importExcelUrl: function(){
      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;
    },
    handleInspection(id) {
      if (!this.url.receiveInspectionOrder) {
        this.$message.error("请设置url.receiveInspectionOrder!")
        return
      }
      var that = this;
      getAction(that.url.receiveInspectionOrder, { id: id }).then((res) => {
        if (res.success) {
          that.$notification.success({
            message: '消息',
            description: res.message
          });
          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!")
        return
      }
      var that = this;
      getAction(that.url.cancelInspectionOrder, { id: id }).then((res) => {
        if (res.success) {
          that.$notification.success({
            message: '消息',
            description: res.message
          });
          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:"请选择一条记录"
        });
      } 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;
            getAction(that.url.cancelOrReceive, {ids: ids,type:type}).then((res) => {
              if (res.success) {
                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;
            });
          }
        });
      }
    },
    batchLq(type){
      if (this.selectedRowKeys.length <= 0) {
        this.$notification.warning({
          message:'消息',
          description:"请选择一条记录"
        });
      } 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;
            getAction(that.url.cancelOrReceive, {ids: ids,type:type}).then((res) => {
              if (res.success) {
                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;
            });
          }
        });
      }
    },
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
  @import '~@assets/less/common.less';
</style>
src/views/eam/maintenance/modules/EamInspectionOrderModal.vue
@@ -5,6 +5,7 @@
    :visible="visible"
    :confirmLoading="confirmLoading"
    switchFullscreen
    centered
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭">
src/views/eam/maintenance/modules/EamInspectionOrderModalXq.vue
@@ -8,6 +8,7 @@
    switchFullscreen
    @ok="handleOk"
    @cancel="handleCancel"
    centered
    cancelText="关闭">
    <a-spin :spinning="false">
@@ -183,6 +184,7 @@
        detailOrder: '/eam/eamInspectionOrderDetail/queryList'
      },
      maintenanceCategory: 'POINT_INSPECTION',
      disableSubmit:false,
      standardId:"",
      detail: {
        loading: false,
src/views/eam/repair/EamRepairOrderList.vue
@@ -80,31 +80,7 @@
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        @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>-->
        </span>
      </a-table>
      />
    </div>
    <!-- table区域-end -->
@@ -167,6 +143,12 @@
            width: 100
          },
          {
            title: '维修负责人',
            align: 'center',
            dataIndex: 'repairer',
            width: 100
          },
          {
            title: '维修开始时间',
            align: 'center',
            dataIndex: 'actualStartTime',
@@ -188,7 +170,7 @@
            title: '维修结果描述',
            align: 'center',
            dataIndex: 'repairDescription',
            width: 300
            // width: 300
          },
          {
            title: '维修图片',
@@ -196,11 +178,7 @@
            dataIndex: 'imageFiles',
            width: 100
          },
          {
            title: '维修负责人',
            align: 'center',
            dataIndex: 'repairer'
          },
          // {
          //   title: '是否委外',
          //   align: 'center',
@@ -251,13 +229,13 @@
        return
      }
      this.initDictData('report_repair_status')
      const operationColumn = {
        title: '操作',
        dataIndex: 'action',
        align: 'center',
        scopedSlots: { customRender: 'action' }
      }
      this.columns = [...this.columns, operationColumn]
      // const operationColumn = {
      //   title: '操作',
      //   dataIndex: 'action',
      //   align: 'center',
      //   scopedSlots: { customRender: 'action' }
      // }
      // this.columns = [...this.columns, operationColumn]
      this.loadData(1)
    },
    methods: {
@@ -283,24 +261,7 @@
      // 开启领取故障保修单弹窗
      handleOpenReceiveFaultModal() {
        this.$refs.receiveFaultModalRef.visible = true
        this.$refs.receiveFaultModalRef.loadData()
      },
      /**
       * 开启申请备件弹窗
       * @param record 表格行信息
       */
      handleOpenApplySparePartsModal(record) {
      },
      /**
       * 开启完成维修弹窗
       * @param record 表格行信息
       */
      handleOpenRepairCompletedModal(record) {
      }
    }
  }
</script>
src/views/flowable/workflow/FlowTodo.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,9 +27,11 @@
          </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">
@@ -44,19 +47,24 @@
    <!-- 操作按钮区域 -->
    <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>
      <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
    </a-dropdown>
      <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>
        <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>已选择&nbsp;<a style="font-weight: 600">{{
          selectedRowKeys.length }}</a>项&nbsp;&nbsp;
        selectedRowKeys.length }}</a>项&nbsp;&nbsp;
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
      </div>
@@ -73,26 +81,6 @@
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        @change="handleTableChange">
        <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>
        </span>
@@ -101,234 +89,246 @@
    </div>
    <AssignFileStreamHandle ref="modalFormApproval" :selectShenpiData="selectShenpiData"></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>
    <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>
  </a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
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 '@/assets/less/TableExpand.less'
  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,
  },
  data () {
    return {
      description: '工作流-我的待办',
      // 表头
      columns: [
        {
          title: '序号',
          dataIndex: '',
          key:'rowIndex',
          width:200,
          align:"center",
          customRender:function (t,r,index) {
            return parseInt(index)+1;
  import { getAction } from '@api/manage'
  export default {
    name: 'NcDeviceCharactersList',
    mixins: [JeecgListMixin, mixinDevice],
    components: {
      AssignFileStreamHandle,
      JDictSelectTag,
      DispatchFileHandle,
      DispatchFileBachHandleStyle,
      WeekMaintenanceApprovalModal,
      RepairOrderApprovalModal,
      InspectionOrderHandle,
      InspectionOrderHandleBzz
    },
    data() {
      return {
        description: '工作流-我的待办',
        // 表头
        columns: [
          {
            title: '序号',
            dataIndex: '',
            key: 'rowIndex',
            width: 60,
            align: 'center',
            customRender: function(t, r, index) {
              return parseInt(index) + 1
            }
          },
          {
            title: '流程分类',
            align: 'center',
            dataIndex: 'category_dictText',
            width: 300
          },
          {
            title: '流程名称',
            align: 'center',
            dataIndex: 'flowName',
            width: 200
          },
          {
            title: '流程业务简要描述',
            align: 'center',
            dataIndex: 'title',
            width: 500
          },
          {
            title: '上一步处理人',
            align: 'center',
            dataIndex: 'preNodeAssignee_dictText',
            width: 150
          },
          {
            title: '前驱节点',
            align: 'center',
            dataIndex: 'preNode',
            width: 200
          },
          {
            title: '当前节点',
            align: 'center',
            dataIndex: 'name',
            width: 200
          },
          {
            title: '当前节点开始时间',
            align: 'center',
            dataIndex: 'createTime',
            width: 200
          },
          {
            title: '操作',
            dataIndex: 'action',
            scopedSlots: { customRender: 'action' },
            align: 'center',
            width: 150,
            fixed: 'right'
          }
        ],
        url: {
          list: '/assign/flow/toTaskBySelf',
          isSameNode: '/assign/flow/isSameNode'
        },
        {
          title: '流程分类',
          align: "center",
          dataIndex: 'category_dictText',
          width: 200,
        },
        {
          title: '流程名称',
          align: "center",
          dataIndex: 'flowName',
          width: 200,
        },
        {
          title: '流程业务简要描述',
          align: "center",
          dataIndex: 'title',
          width:300
        },
        {
          title: '上一步处理人',
          align: "center",
          dataIndex: 'preNodeAssignee_dictText',
          width:200
        },
        {
          title: '前驱节点',
          align: "center",
          dataIndex: 'preNode',
          width:200
        },
        {
          title: '当前节点',
          align: "center",
          dataIndex: 'name',
          width:200
        },
        {
          title: '当前节点开始时间',
          align: "center",
          dataIndex: 'createTime',
          width:300
        },
        {
          title: '操作',
          dataIndex: 'action',
          scopedSlots: { customRender: 'action' },
          align: 'center',
          width: 200,
          fixed: 'right'
        dictOptions: {},
        selectShenpiData: {},
        selectDispatchFileXqData: {},
        selectInspectionOrderData: {},
        selectInspectionOrderDataBzz: {},
        selectBachData: {},
        selectRepairOrderData: {},
        //业务信息ID
        dataId: undefined
      }
    },
    created() {
    },
    computed: {
      importExcelUrl: function() {
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
      }
    },
    methods: {
      handelDetial(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
          case 'sbdjApproval':
            this.handInspectionOrder(item)
            break
          case 'WEEK_MAINTENANCE':
            this.handleWeekMaintenance(item)
            break
          case 'eam_repair':
            this.handleRepairOrder(item)
            break
          default:
            alert('没找到该流程')
        }
      ],
      url: {
        list: '/assign/flow/toTaskBySelf',
        isSameNode: '/assign/flow/isSameNode'
      },
      dictOptions:{},
      selectShenpiData: {},
      selectDispatchFileXqData:{},
      selectInspectionOrderData:{},
      selectInspectionOrderDataBzz:{},
      selectBachData:{},
      selectRepairOrderData: {},
      //业务信息ID
      dataId: undefined,
    }
  },
  created() {
  },
  computed: {
    importExcelUrl: function(){
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
    },
  },
  methods: {
    handelDetial(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
        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.$refs.modalFormApproval.clearTableSource()
      this.$refs.modalFormApproval.getAllApproveData(item)
    },
    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;
      } else {
        let ids = "";
        for (var a = 0; a < this.selectedRowKeys.length; a++) {
          ids += this.selectedRowKeys[a] + ",";
      splitAprocessType(title) {
        let parts = title.split(':') // 注意冒号是全角字符,使用对应的字进行分割
        let result = parts[0]
        return result
      },
      handDrDetial(item) {
        this.selectShenpiData = item
        this.$refs.modalFormApproval.clearTableSource()
        this.$refs.modalFormApproval.getAllApproveData(item)
      },
      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)
        }
        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.edit(this.selectBachData)
            this.$refs.modalFormDispatchFileBatch.disableSubmit = false;
          }else{
            this.$notification.warning({
              message: '消息',
              description: res.message
            });
      },
      batchHandle() {
        if (this.selectedRowKeys.length <= 0) {
          this.$notification.warning({
            message: '消息',
            description: '请选择一条记录'
          })
          return
        } else {
          let ids = ''
          for (var a = 0; a < this.selectedRowKeys.length; a++) {
            ids += this.selectedRowKeys[a] + ','
          }
        })
          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.edit(this.selectBachData)
              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
        }
      },
      /**
       * 点击设备维修分类流程详情时触发
       * @param record
       */
      handleRepairOrder(record) {
        this.selectRepairOrderData = Object.assign({}, record)
        this.$refs.repairOrderApprovalModal.visible = true
        this.$refs.repairOrderApprovalModal.getAllApproveData(record)
        this.$refs.repairOrderApprovalModal.getBasicInformation(record)
      }
    },
    handleWeekMaintenance(item) {
      if(item && item.dataId) {
        this.$refs.weekMaintenanceApprovalModal.handleDetail(item.dataId)
        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)
    }
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
  @import '~@assets/less/common.less';
</style>
src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue
@@ -1,16 +1,16 @@
<template>
  <a-modal
    :title="title"
    :width="width"
    :width="1000"
    :visible="visible"
    :footer="null"
    @cancel="handCancel"
    :mask-closable="false"
    centered
  >
    <a-card :bordered="false">
      <div>
        <b>{{ selectShenpiData.title }}</b>
        <br>
        <br>
        <br/>
        <br/>
        <a-tag color="blue">
          处理人 {{ selectShenpiData.assignee }}
        </a-tag>
@@ -19,37 +19,49 @@
        </a-tag>
        <br>
        <br>
        <button @click="fetchAndShowBmp" class="btn-custom">打开流程图</button>
        <div v-if="imageSrc">
          <img :src="imageSrc" alt="Fetched Image" />
        <a-button @click="fetchAndShowBmp" :loading="showBmpButtonLoading" class="btn-custom">流程图</a-button>
        <div v-if="imageSrc&&isDisplayBmp">
          <img :src="imageSrc" alt="Fetched Image"/>
        </div>
        <hr class="shallow-hr">
        <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-tabs default-active-key='1'>
              <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-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-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-form-model-item label='设备编号'>
                        <a-input :readOnly='inputReadOnly' v-model='tableRowRecord.equipmentId_dictText'/>
                      </a-form-model-item>
                    </a-col>
                    <a-col :span='span'>
                      <a-form-model-item label='单据状态'>
                        <a-input :readOnly='inputReadOnly' v-model='tableRowRecord.repairStatus_dictText'/>
                      </a-form-model-item>
                    </a-col>
                    <a-col :span='span'>
                      <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-tab-pane>
              <a-tab-pane key='2' tab='流程节点'>
                <a-card>
                  <a-timeline style="padding:0 1% 0 12%" >
                  <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>
@@ -57,8 +69,8 @@
                        <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>
                        <p v-else>处理意见:{{item.cause}}</p>
                        <div class="left_qiu"><span>{{item.name}}</span></div>
                      </div>
                    </a-timeline-item>
                  </a-timeline>
@@ -73,265 +85,252 @@
        <br>
        <b>审批详情</b>
        <br>
        <a-form-model ref="form" :model="approveData" :rules="validatorRules" slot="detail">
        <br>
        <a-form-model ref="form" :model="approveData" :rules="validatorRules" :labelCol='labelCol'
                      :wrapperCol='wrapperCol'>
          <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 :span="24">
              <a-form-model-item label="是否需要领用备件" prop="status">
                <a-radio-group v-model="approveData.status">
                  <a-radio :value="1">是</a-radio>
                  <a-radio :value="0">否</a-radio>
                </a-radio-group>
              </a-form-model-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-form-model-item >
            </a-col>
            <template v-if="approveData.status===0">
              <a-col :span="24">
                <a-form-model-item label="故障原因" prop="faultReason">
                  <a-input v-model="approveData.faultReason" rows="4" placeholder="请输入故障原因"/>
                </a-form-model-item>
              </a-col>
              <a-col :span="24">
                <a-form-model-item label="维修结果描述" prop="repairResultDescription">
                  <a-textarea v-model="approveData.repairResultDescription" placeholder="请输入维修结果描述"/>
                </a-form-model-item>
              </a-col>
              <a-col :span="24">
                <a-form-model-item label="维修图片">
                  <j-image-upload v-model="approveData.imageFiles" :is-multiple="true" :number="3"/>
                </a-form-model-item>
              </a-col>
            </template>
          </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>
        </a-form-model>
      </div>
    </a-card>
    <template slot="footer">
      <div>
        <a-button @click="handCancel">取消</a-button>
        <a-button @click="submitForm" type="primary">提 交</a-button>
      </div>
    </template>
  </a-modal>
</template>
<script>
  import '@assets/less/TableExpand.less'
  import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage'
import '@assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage'
export default {
  name: 'RepairOrderApprovalModal',
  mixins: [mixinDevice],
  props: {
    selectShenpiData: {
      type: Object,
      required: true
    }
  },
  data() {
    return {
      form: this.$form.createForm(this),
      span: 12,
      span1: 8,
      coldisabled: true,
      spinning: false,
      tableRowRecord: {},
      assignFileStream:{},
      tableDataSource: [],
      usageDataSource: [],
      hitaskDataSource:[],
      bomForm: {},
      approveContent:"",
      imageSrc: null,
      drawerVisible: true,
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 }
      },
      wrapperCol: {
        xs: { span: 30 },
        sm: { span: 16 }
      },
      validatorRules: {
      },
      approveData: {},
      flowData: {},
      title: '',
      width: 1000,
      visible: false,
      // 表头
      url: {
        queryBomDataById: '/eam/eamRepairOrder/queryById',
        diagramView: '/assign/flow/diagramView',
        queryHisTaskList:'/assign/flow/queryHisTaskList',
        approve:"/activit/assign/file/approve",
      },
      dictOptions: {},
      superFieldList: [],
      workflowSource: []
    }
  },
  created() {
  },
  computed: {},
  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)
          const urlObject = window.URL.createObjectURL(new Blob([res]))
          this.imageSrc = urlObject
        }))
      } catch (error) {
        console.error('Error fetching image blob:', error)
        alert('无法加载图片,请稍后再试。')
  export default {
    name: 'RepairOrderApprovalModal',
    props: {
      selectShenpiData: {
        type: Object,
        required: true
      }
    },
    handleQueXiaoTask(){
      this.visible = false
      this.routeReload()
    data() {
      return {
        form: this.$form.createForm(this),
        span: 12,
        inputReadOnly: true,
        spinning: false,
        tableRowRecord: {},
        assignFileStream: {},
        hitaskDataSource: [],
        imageSrc: null,
        labelCol: {
          xs: { span: 24 },
          sm: { span: 5 }
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 }
        },
        validatorRules: {
          status: [
            { required: true, message: '请选择是否需要领用备件' }
          ],
          faultReason: [
            { required: true, message: '请输入故障原因' }
          ],
          repairResultDescription: [
            { required: true, message: '请输入维修结果描述' }
          ]
        },
        approveData: {},
        flowData: {},
        visible: false,
        // 表头
        url: {
          queryBomDataById: '/eam/eamRepairOrder/queryById',
          diagramView: '/assign/flow/diagramView',
          queryHisTaskList: '/assign/flow/queryHisTaskList',
          approve: '/activit/assign/file/approve'
        },
        isDisplayBmp: false,
        showBmpButtonLoading: false
      }
    },
    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)=>{
            if(res.success){
              that.$message.success(res.message);
              that.$emit('ok');
            }else{
              that.$message.warning(res.message);
            }
          }).finally(() => {
            that.confirmLoading = false;
    created() {
    },
    methods: {
      /**
       * 获取待办记录的基本信息
       * @param record 待办记录信息
       */
      getAllApproveData(record) {
        console.log('selectShenpiData----->', this.selectShenpiData)
        this.flowData = Object.assign({}, record)
        const param = { 'procInstId': record.dataId }
        getAction(this.url.queryHisTaskList, param)
          .then(res => {
            this.hitaskDataSource = res.result
          })
        }
      },
      })
    },
    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)
      /**
       * 获取待办记录的基本信息
       * @param record 待办记录信息
       */
      getBasicInformation(record) {
        this.spinning = true
        const that = this
        const param = { id: record.dataId }
        this.tableRowRecord = this.approveData = {}
        getAction(this.url.queryBomDataById, param)
          .then((res => {
            if (res.success) {
              that.tableRowRecord = res.result
              console.log('this.tableRowRecord----->', that.tableRowRecord)
            }
          }))
          .finally(() => {
            that.spinning = false
          })
      },
      // 获取并展开流程图
      fetchAndShowBmp() {
        this.isDisplayBmp = !this.isDisplayBmp
        if (!this.imageSrc) {
          this.showBmpButtonLoading = true
          const that = this
          let param = {
            processDefinitionId: this.flowData.processDefinitionId,
            processInstanceId: this.flowData.processInstanceId,
            TaskDefinitionKey: this.flowData.processDefinitionKey
          }
        }))
      }).finally(
        this.visible = true,
        console.log('this.approveData---->', this.approveData)
      )
          downFile(this.url.diagramView, param, 'get')
            .then((res => {
              const urlObject = window.URL.createObjectURL(new Blob([res]))
              this.imageSrc = urlObject
            }))
            .catch(err => {
              that.$notification.error({
                message: '消息',
                description: res.message
              })
            })
            .finally(() => {
              this.showBmpButtonLoading = false
            })
        }
      },
      submitForm() {
        const that = this
        // 触发表单验证
        this.$refs.form.validate(valid => {
          if (valid) {
            that.confirmLoading = true
            const flowTaskVo = {}
            flowTaskVo.status = that.approveData.status
            flowTaskVo.approveContent = flowTaskVo.comment = that.approveData.approveContent
            flowTaskVo.dataId = this.selectShenpiData.dataId
            flowTaskVo.taskId = this.selectShenpiData.id
            flowTaskVo.userId = flowTaskVo.assignee = this.selectShenpiData.assignee
            flowTaskVo.instanceId = this.selectShenpiData.procInstId
            flowTaskVo.targetKey = this.selectShenpiData.taskDefKey
            flowTaskVo.values = this.selectShenpiData.variables
            console.log('表单提交数据', flowTaskVo)
            // httpAction(this.url.approve, flowTaskVo, 'post')
            //   .then((res) => {
            //     if (res.success) {
            //       that.$message.success(res.message)
            //       that.$emit('ok')
            //     } else {
            //       that.$message.warning(res.message)
            //     }
            //   }).finally(() => {
            //   that.confirmLoading = false
            // })
          } else {
            return false
          }
        })
      },
      handCancel() {
        this.visible = false
        this.isDisplayBmp = false
        this.imageSrc = null
      }
    }
  }
}
</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; /* 圆角边框 */
}
  .shallow-hr {
    border: 0;
    height: 1px; /* 分界线的高度 */
    background-color: rgba(0, 0, 0, 0.1); /* 使用 RGBA 颜色,并设置较低的透明度 */
    margin: 20px 0; /* 分界线上下的外边距 */
  }
.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%;
}
  .btn-custom {
    background-color: #4CAF50; /* 绿色背景 */
    color: #fff; /* 白色文字 */
  }
.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;
}
  .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);
  }
@import '~@assets/less/common.less';
  /deep/ .ant-timeline-item-tail {
    left: -29px !important;
  }
  .left_qiu span {
    width: 3em;
    display: block;
    color: #fff;
    text-align: center;
  }
  @import '~@assets/less/common.less';
</style>