已添加2个文件
已修改11个文件
已删除14个文件
8947 ■■■■ 文件已修改
src/api/manage.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/jeecgbiz/JSelectRepairDepart.vue 183 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/jeecgbiz/modal/JSelectRepairDepartModal.vue 294 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mixins/JeecgListMixin.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/base/EamMaintenanceStandardList.vue 454 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue 226 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/base/modules/EamMaintenanceStandardModal.vue 450 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/equipment/EamEquipmentLedger.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/equipment/modules/EamEquipmentModal.vue 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/maintenance/EamInspectionOrderList.vue 750 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/maintenance/modules/EamInspectionOrderModal.vue 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/assignEquipmentFileStream/AssignEquipmentFileStreamHandle.vue 469 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/assignFileStream/AssignFileStreamHandle.vue 510 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/assignFileStream/AssignFileStreamXq.vue 389 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/dispatchFile/DispatchFileBachHandleForm.vue 215 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/dispatchFile/DispatchFileBachHandleStyle#Drawer.vue 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/dispatchFile/DispatchFileHandle.vue 506 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/dispatchFile/DispatchFileXq.vue 364 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/guideCardBatch/GuideCardBatchHandle.vue 484 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/inboundOrder/InboundOrderHandle.vue 522 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/lossBound/lossBoundHandle.vue 582 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue 569 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/sparePartApply/SparePartApplyHandle.vue 576 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/standardizedProcess/StandardizedProcessHandle.vue 495 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/stocktakingBound/stocktakingBoundHandle.vue 599 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/UserList.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/modules/UserModal.vue 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/manage.js
@@ -224,3 +224,11 @@
   return;
  }
}
export function templateXlsDownload(fileUrl) {
  let downloadUrl = getFileAccessHttpUrl(fileUrl)
  if (downloadUrl) {
    window.open(downloadUrl)
  }
}
src/components/jeecgbiz/JSelectRepairDepart.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,183 @@
<template>
  <div class="components-input-demo-presuffix">
    <!---->
    <a-input @click="openModal" placeholder="请点击选择维修部门" v-model="textVals" readOnly :disabled="disabled">
      <a-icon slot="prefix" type="cluster" title="维修部门选择控件"/>
      <a-icon v-if="storeVals" slot="suffix" type="close-circle" @click="handleEmpty" title="清空"/>
    </a-input>
    <j-select-repair-depart-modal
      ref="innerRepairDepartSelectModal"
      :modal-width="modalWidth"
      :multi="multi"
      :rootOpened="rootOpened"
      :repairDepartId="value"
      :store="storeField"
      :text="textField"
      :treeRepairDepartOpera="treeRepairDepartOpera"
      @ok="handleOK"
      @initComp="initComp">
    </j-select-repair-depart-modal>
  </div>
</template>
<script>
  import JSelectRepairDepartModal from './modal/JSelectRepairDepartModal'
  import { underLinetoHump } from '@/components/_util/StringUtil'
  export default {
    name: 'JSelectRepairDepart',
    components:{
      JSelectRepairDepartModal
    },
    props:{
      modalWidth:{
        type:Number,
        default:500,
        required:false
      },
      multi:{
        type:Boolean,
        default:false,
        required:false
      },
      rootOpened:{
        type:Boolean,
        default:true,
        required:false
      },
      value:{
        type:String,
        required:false
      },
      disabled:{
        type: Boolean,
        required: false,
        default: false
      },
      // è‡ªå®šä¹‰è¿”回字段,默认返回 id
      customReturnField: {
        type: String,
        default: ''
      },
      backRepairDepart: {
        type: Boolean,
        default: false,
        required: false
      },
      // å­˜å‚¨å­—段 [key field]
      store: {
        type: String,
        default: 'id',
        required: false
      },
      // æ˜¾ç¤ºå­—段 [label field]
      text: {
        type: String,
        default: 'departName',
        required: false
      },
      treeRepairDepartOpera: {
        type: Boolean,
        default: false,
        required: false
      }
    },
    data(){
      return {
        visible:false,
        confirmLoading:false,
        storeVals: '', //[key values]
        textVals: '' //[label values]
      }
    },
    computed:{
      storeField(){
        let field = this.customReturnField
        if(!field){
          field = this.store;
        }
        return underLinetoHump(field)
      },
      textField(){
        return underLinetoHump(this.text)
      }
    },
    mounted(){
      this.storeVals = this.value
    },
    watch:{
      value(val){
        this.storeVals = val
      }
    },
    methods:{
      initComp(textVals){
        this.textVals = textVals
      },
      //返回选中的车间信息
      backRepairDepartInfo(){
        if(this.backRepairDepart===true){
          //LOWCOD-2147 ã€ç”¨æˆ·ç®¡ç†ã€‘选择部门和上级以后,负责部门没有数据可选 (陶炎改造自定义返回字段导致)
          if(this.storeVals && this.storeVals.length>0){
            let arr1 = this.storeVals.split(',')
            let arr2 = this.textVals.split(',')
            let info = []
            for(let i=0;i<arr1.length;i++){
              info.push({
                value: arr1[i],
                text: arr2[i]
              })
            }
            this.$emit('back', info)
          }
        }
      },
      openModal(){
        this.$refs.innerRepairDepartSelectModal.show()
      },
      handleOK(rows) {
        if (!rows && rows.length <= 0) {
          this.textVals = ''
          this.storeVals = ''
        } else {
          let arr1 = []
          let arr2 = []
          for(let dep of rows){
            arr1.push(dep[this.storeField])
            arr2.push(dep[this.textField])
          }
          this.storeVals = arr1.join(',')
          this.textVals = arr2.join(',')
        }
        this.$emit("change", this.storeVals)
        this.backRepairDepartInfo()
      },
      getRepairDepartNames(){
        return this.departNames
      },
      handleEmpty(){
        this.handleOK('')
      }
    },
    model: {
      prop: 'value',
      event: 'change'
    }
  }
</script>
<style scoped>
  .components-input-demo-presuffix .anticon-close-circle {
    cursor: pointer;
    color: #ccc;
    transition: color 0.3s;
    font-size: 12px;
  }
  .components-input-demo-presuffix .anticon-close-circle:hover {
    color: #f5222d;
  }
  .components-input-demo-presuffix .anticon-close-circle:active {
    color: #666;
  }
</style>
src/components/jeecgbiz/modal/JSelectRepairDepartModal.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,294 @@
<template>
  <j-modal
    title="选择维修部门"
    :width="modalWidth"
    :visible="visible"
    :confirmLoading="confirmLoading"
    @ok="handleSubmit"
    @cancel="handleCancel"
    @update:fullscreen="isFullscreen"
    wrapClassName="j-repair-depart-select-modal"
    switchFullscreen
    cancelText="关闭">
    <a-spin tip="Loading..." :spinning="false">
      <a-input-search style="margin-bottom: 1px" placeholder="请输入维修部门名称按回车进行搜索" @search="onSearch" />
      <a-tree
        checkable
        :class="treeScreenClass"
        :treeData="treeData"
        :checkStrictly="checkStrictly"
        @check="onCheck"
        @select="onSelect"
        @expand="onExpand"
        :autoExpandParent="autoExpandParent"
        :expandedKeys="expandedKeys"
        :checkedKeys="checkedKeys">
        <template slot="title" slot-scope="{title}">
          <span v-if="title.indexOf(searchValue) > -1">
            {{title.substr(0, title.indexOf(searchValue))}}
            <span style="color: #f50">{{searchValue}}</span>
            {{title.substr(title.indexOf(searchValue) + searchValue.length)}}
          </span>
          <span v-else>{{title}}</span>
        </template>
      </a-tree>
    </a-spin>
  </j-modal>
</template>
<script>
  import { queryRepairDepartTreeList } from '@/api/api'
  export default {
    name: 'JSelectRepairDepartModal',
    props:['modalWidth','multi','rootOpened','repairDepartId', 'store', 'text','treeOpera'],
    data(){
      return {
        visible:false,
        confirmLoading:false,
        treeData:[],
        autoExpandParent:true,
        expandedKeys:[],
        dataList:[],
        checkedKeys:[],
        checkedRows:[],
        searchValue:"",
        checkStrictly: false,
        fullscreen:false
      }
    },
    created(){
      this.loadRepairDepart();
    },
    watch:{
      repairDepartId(){
        this.initDepartComponent()
      },
      visible: {
        handler() {
          this.initRepairDepartComponent(true)
        }
      }
    },
    computed:{
      treeScreenClass() {
        return {
          'my-dept-select-tree': true,
          'fullscreen': this.fullscreen,
        }
      },
    },
    methods:{
      show(){
        this.visible=true
        this.checkedRows=[]
        this.checkedKeys=[]
      },
      loadRepairDepart(){
        // è¿™ä¸ªæ–¹æ³•是找到所有的部门信息
        queryRepairDepartTreeList().then(res=>{
          if(res.success){
            let arr = [...res.result]
            this.reWriterWithSlot(arr)
            this.treeData = arr
            this.initRepairDepartComponent()
            if(this.rootOpened){
              this.initExpandedKeys(res.result)
            }
          }
        })
      },
      initRepairDepartComponent(flag){
        let arr = []
        //该方法两个地方用 1.visible改变事件重新设置选中项 2.组件编辑页面回显
        let fieldName = flag==true?'key':this.text
        if(this.repairDepartId){
          let arr2 = this.repairDepartId.split(',')
          for(let item of this.dataList){
            if(arr2.indexOf(item[this.store])>=0){
              arr.push(item[fieldName])
            }
          }
        }
        if(flag==true){
          this.checkedKeys = [...arr]
        }else{
          this.$emit("initComp", arr.join(','))
        }
      },
      reWriterWithSlot(arr){
        for(let item of arr){
          if(item.children && item.children.length>0){
            this.reWriterWithSlot(item.children)
            let temp = Object.assign({},item)
            temp.children = {}
            this.dataList.push(temp)
          }else{
            this.dataList.push(item)
            item.scopedSlots={ title: 'title' }
          }
        }
      },
      initExpandedKeys(arr){
        if(arr && arr.length>0){
          let keys = []
          for(let item of arr){
            if(item.children && item.children.length>0){
              keys.push(item.id)
            }
          }
          this.expandedKeys=[...keys]
          //全部keys
          //this.allTreeKeys = [...keys]
        }else{
          this.expandedKeys=[]
          //this.allTreeKeys = []
        }
      },
      onCheck (checkedKeys,info) {
        if(!this.multi){
          let arr = checkedKeys.checked.filter(item => this.checkedKeys.indexOf(item) < 0)
          this.checkedKeys = [...arr]
          this.checkedRows = (this.checkedKeys.length === 0) ? [] : [info.node.dataRef]
        }else{
          if(this.checkStrictly){
            this.checkedKeys = checkedKeys.checked
          }else{
            this.checkedKeys = checkedKeys
          }
          this.checkedRows = this.getCheckedRows(this.checkedKeys)
        }
      },
      onSelect(selectedKeys,info) {
        //取消关联的情况下才走onSelect的逻辑
        if(this.checkStrictly){
          let keys = []
          keys.push(selectedKeys[0])
          if(!this.checkedKeys || this.checkedKeys.length===0 || !this.multi){
            this.checkedKeys = [...keys]
            this.checkedRows=[info.node.dataRef]
          }else{
            let currKey = info.node.dataRef.key
            if(this.checkedKeys.indexOf(currKey)>=0){
              this.checkedKeys = this.checkedKeys.filter(item=> item !==currKey)
            }else{
              this.checkedKeys.push(...keys)
            }
          }
          this.checkedRows = this.getCheckedRows(this.checkedKeys)
        }
      },
      onExpand (expandedKeys) {
        this.expandedKeys = expandedKeys
        this.autoExpandParent = false
      },
      handleSubmit(){
        if(!this.checkedKeys || this.checkedKeys.length==0){
          this.$emit("ok",'')
        }else{
          let checkRow = this.getCheckedRows(this.checkedKeys)
          let keyStr = this.checkedKeys.join(",")
          this.$emit("ok", checkRow, keyStr)
        }
        this.handleClear()
      },
      handleCancel(){
        this.handleClear()
      },
      handleClear(){
        this.visible=false
        this.checkedKeys=[]
      },
      getParentKey(currKey,treeData){
        let parentKey
        for (let i = 0; i < treeData.length; i++) {
          const node = treeData[i]
          if (node.children) {
            if (node.children.some(item => item.key === currKey)) {
              parentKey = node.key
            } else if (this.getParentKey(currKey, node.children)) {
              parentKey = this.getParentKey(currKey, node.children)
            }
          }
        }
        return parentKey
      },
      onSearch(value){
        const expandedKeys = this.dataList.map((item) => {
          if (item.title.indexOf(value) > -1) {
            return this.getParentKey(item.key,this.treeData)
          }
          return null
        }).filter((item, i, self) => item && self.indexOf(item) === i)
        Object.assign(this, {
          expandedKeys,
          searchValue: value,
          autoExpandParent: true,
        })
      },
      // æ ¹æ® checkedKeys èŽ·å– rows
      getCheckedRows(checkedKeys) {
        const forChildren = (list, key) => {
          for (let item of list) {
            if (item.id === key) {
              return item
            }
            if (item.children instanceof Array) {
              let value = forChildren(item.children, key)
              if (value != null) {
                return value
              }
            }
          }
          return null
        }
        let rows = []
        for (let key of checkedKeys) {
          let row = forChildren(this.treeData, key)
          if (row != null) {
            rows.push(row)
          }
        }
        return rows
      },
      switchCheckStrictly (v) {
        if(v==1){
          this.checkStrictly = false
        }else if(v==2){
          this.checkStrictly = true
        }
      },
      isFullscreen(val){
        this.fullscreen=val
      }
    }
  }
</script>
<style lang="less" scoped>
  // é™åˆ¶éƒ¨é—¨é€‰æ‹©æ ‘高度,避免部门太多时点击确定不便
  .my-dept-select-tree{
    height:350px;
    &.fullscreen{
      height: calc(100vh - 250px);
    }
    overflow-y: scroll;
  }
  .drawer-bootom-button {
    position: absolute;
    bottom: 0;
    width: 100%;
    border-top: 1px solid #e8e8e8;
    padding: 10px 16px;
    text-align: right;
    left: 0;
    background: #fff;
    border-radius: 0 0 2px 2px;
  }
</style>
src/mixins/JeecgListMixin.js
@@ -233,6 +233,7 @@
            description:res.message
          });
          that.loadData();
          that.clearSelected()
        } else {
          // that.$message.warning(res.message);
          that.$notification.warning({
src/views/eam/base/EamMaintenanceStandardList.vue
@@ -1,37 +1,38 @@
<template>
  <a-card :bordered="false">
    <template v-if="isDisplayOperation">
      <!-- æŸ¥è¯¢åŒºåŸŸ -->
      <div class="table-page-search-wrapper">
        <a-form layout="inline" @keyup.enter.native="searchQuery">
          <a-row :gutter="24">
            <a-col :xl="4" :lg="7" :md="8" :sm="24">
              <a-form-item label="标准编码">
                <a-input placeholder="请输入标准编码" v-model="queryParam.standardCode"></a-input>
              <a-form-item label="规范编码">
                <a-input placeholder="请输入规范编码" v-model="queryParam.standardCode"/>
              </a-form-item>
            </a-col>
            <a-col :xl="4" :lg="7" :md="8" :sm="24">
              <a-form-item label="标准名称">
                <a-input placeholder="请输入标准名称" v-model="queryParam.standardName"></a-input>
              <a-form-item label="规范名称">
                <a-input placeholder="请输入规范名称" v-model="queryParam.standardName"/>
              </a-form-item>
            </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>
            <a-col :xl="5" :lg="7" :md="8" :sm="24">
              <a-form-item label="统一编码">
                <lx-search-equipment-select placeholder="请输入统一编码或名称搜索" v-model="queryParam.equipmentId"/>
              </a-form-item>
            </a-col>
            <a-col :xl="4" :lg="7" :md="8" :sm="24">
              <a-form-item label="保养分类">
                <j-dict-select-tag dict-code="maintenance_category" placeholder="请选择保养分类" v-model="queryParam.maintenanceCategory" />
                <j-dict-select-tag dict-code="maintenance_category" placeholder="请选择保养分类"
                                   v-model="queryParam.maintenanceCategory"/>
              </a-form-item>
            </a-col>
            <a-col :xl="4" :lg="7" :md="8" :sm="24">
              <a-form-item label="标准状态">
                <j-dict-select-tag dict-code="maintenance_standard_status" placeholder="请选择标准状态" v-model="queryParam.standardStatus" />
              <a-form-item label="规范状态">
                <j-dict-select-tag dict-code="maintenance_standard_status" placeholder="请选择规范状态"
                                   v-model="queryParam.standardStatus"/>
              </a-form-item>
            </a-col>
            <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <a-col :xl="3" :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="info" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
@@ -44,21 +45,30 @@
      <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
      <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"
        <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader"
                  :action="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="secondMaintenanceImportExcel"
        <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.inspectionXlsDownloadUrl)">
          ç‚¹æ£€æ ‡å‡†æ¨¡æ¿ä¸‹è½½
        </a-button>
        <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader"
                  :action="secondMaintenanceImportExcel"
                  @change="handleImportExcel">
          <a-button type="primary" icon="import">二保标准导入</a-button>
        </a-upload>
        <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.secondMaintenanceXlsDownloadUrl)">二保标准模板下载</a-button>
        <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" :action="thirdMaintenanceImportExcel"
        <a-button type="primary" icon="download"
                  @click="handleTemplateXlsDownload(url.secondMaintenanceXlsDownloadUrl)">二保标准模板下载
        </a-button>
        <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader"
                  :action="thirdMaintenanceImportExcel"
                  @change="handleImportExcel">
          <a-button type="primary" icon="import">三保标准导入</a-button>
        </a-upload>
        <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.thirdMaintenanceXlsDownloadUrl)">三保标准模板下载</a-button>
        <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.thirdMaintenanceXlsDownloadUrl)">
          ä¸‰ä¿æ ‡å‡†æ¨¡æ¿ä¸‹è½½
        </a-button>
        <a-dropdown v-if="selectedRowKeys.length > 0">
          <a-menu slot="overlay">
            <a-menu-item key="1" @click="batchDel">
@@ -72,8 +82,6 @@
        </a-dropdown>
      </div>
    </template>
    <!-- table区域-begin -->
    <div>
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;" v-if="isDisplayOperation">
@@ -95,33 +103,23 @@
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        :customRow='clickThenSelect'
        @change="handleTableChange">
        <template slot="referenceFile" slot-scope="text, record, index">
          <a v-if="text && text !== ''" @click.stop="handlePreview(record)">预览</a>
        </template>
        <span slot="action" slot-scope="text, record">
          <a v-if="record.standardStatus === 'NORMAL'" @click.stop="handleEdit(record)">编辑</a>
          <a v-if="record.standardStatus === 'WAIT_SUBMIT'" @click.stop="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.standardStatus === 'NORMAL'">
                <a @click.stop="handleUpgrade(record)">升版</a>
              </a-menu-item>
              <a-menu-item v-if="record.standardStatus === 'NORMAL'">
                <a-popconfirm title="确定作废吗?" @confirm="() => handleAbolish(record.id)">
                  <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>
          <template v-if="record.standardStatus === 'START'">
             <a-divider type="vertical"/>
             <a @click.stop="handleUpgrade(record)">升版</a>
          </template>
          <template v-if="record.standardStatus === 'WAIT_SUBMIT'">
             <a-divider type="vertical"/>
              <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                  <a @click="event=>event.stopPropagation()">删除</a>
              </a-popconfirm>
          </template>
        </span>
      </a-table>
      <a-tabs defaultActiveKey="1">
@@ -137,219 +135,191 @@
    <!-- è¡¨å•区域 -->
    <eamMaintenanceStandard-modal ref="modalForm" @ok="modalFormOk"></eamMaintenanceStandard-modal>
    <lx-file-preview ref="lxFilePreview" :fileUrl="fileUrl"></lx-file-preview>
  </a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import EamMaintenanceStandardModal from './modules/EamMaintenanceStandardModal'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import EamMaintenanceStandardDetailList from '@views/eam/base/modules/EamMaintenanceStandardDetailList'
import { deleteAction, templateXlsDownload } from '@api/manage'
import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue'
  import '@/assets/less/TableExpand.less'
  import EamMaintenanceStandardModal from './modules/EamMaintenanceStandardModal'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import EamMaintenanceStandardDetailList from '@views/eam/base/modules/EamMaintenanceStandardDetailList'
  import { deleteAction, templateXlsDownload } from '@api/manage'
  import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue'
export default {
  name: 'EamMaintenanceStandardList',
  mixins: [JeecgListMixin],
  props: {
    isDisplayOperation: {
      type: Boolean,
      default: true
    }
  },
  components: {
    LxSearchEquipmentSelect,
    EamMaintenanceStandardModal,
    EamMaintenanceStandardDetailList
  },
  data() {
    return {
      description: '保养标准管理页面',
      disableMixinCreated: true,
      // è¡¨å¤´
      columns: [
        {
          title: '标准编码',
          align: 'center',
          dataIndex: 'standardCode'
        },
        {
          title: '标准名称',
          align: 'center',
          dataIndex: 'standardName'
        },
        {
          title: '文件编号',
          align: 'center',
          dataIndex: 'fileCode'
        },
        {
          title: '保养周期(天)',
          align: 'center',
          dataIndex: 'maintenancePeriod'
        },
        {
          title: '初始日期',
          align: 'center',
          dataIndex: 'initialDate'
        },
        {
          title: '保养分类',
          align: 'center',
          dataIndex: 'maintenanceCategory_dictText'
        },
        {
          title: '设备编号',
          align: 'center',
          dataIndex: 'equipmentId_dictText'
        },
        {
          title: '标准状态',
          align: 'center',
          dataIndex: 'standardStatus_dictText'
        },
        {
          title: '版本',
          align: 'center',
          dataIndex: 'standardVersion'
        },
        {
          title: '参考文件',
          align: 'center',
          dataIndex: 'referenceFile',
          scopedSlots: { customRender: 'referenceFile' }
        }
      ],
      url: {
        list: '/eam/maintenanceStandard/list',
        delete: '/eam/maintenanceStandard/delete',
        deleteBatch: '/eam/maintenanceStandard/deleteBatch',
        exportXlsUrl: 'eam/maintenanceStandard/exportXls',
        inspectionImportExcel: 'eam/maintenanceStandard/inspectionImportExcel',
        weekMaintenanceImportExcel: 'eam/maintenanceStandard/weekMaintenanceImportExcel',
        secondMaintenanceImportExcel: 'eam/maintenanceStandard/secondMaintenanceImportExcel',
        thirdMaintenanceImportExcel: 'eam/maintenanceStandard/thirdMaintenanceImportExcel',
        inspectionXlsDownloadUrl: '导入模板/点检标准导入模板_v1.0.xlsx',
        weekMaintenanceXlsDownloadUrl: '导入模板/周保标准导入模板_v1.0.xlsx',
        secondMaintenanceXlsDownloadUrl: '导入模板/二保标准导入模板_v1.0.xlsx',
        thirdMaintenanceXlsDownloadUrl: '导入模板/三保标准导入模板_v1.0.xlsx',
        abolish: '/eam/maintenanceStandard/abolish',
      },
      fileUrl: '',
      standardId: '-1'
    }
  },
  computed: {
    inspectionImportExcel: function() {
      return `${window._CONFIG['domianURL']}/${this.url.inspectionImportExcel}`
    },
    weekMaintenanceImportExcel: function() {
      return `${window._CONFIG['domianURL']}/${this.url.weekMaintenanceImportExcel}`
    },
    secondMaintenanceImportExcel: function() {
      return `${window._CONFIG['domianURL']}/${this.url.secondMaintenanceImportExcel}`
    },
    thirdMaintenanceImportExcel: function() {
      return `${window._CONFIG['domianURL']}/${this.url.thirdMaintenanceImportExcel}`
    }
  },
  created() {
    if (!this.isDisplayOperation) {
      return
    }
    const operationColumn = {
      title: '操作',
      dataIndex: 'action',
      align: 'center',
      scopedSlots: { customRender: 'action' }
    }
    this.columns = [...this.columns, operationColumn]
    this.loadData(1)
  },
  methods: {
    handlePreview: function(record) {
      if (record.referenceFile) {
        try {
          let file = JSON.parse(record.referenceFile)
          this.$refs.lxFilePreview.preview(file.filePath)
        } catch (e) {
          console.error(e)
          this.$message.error(e.message)
        }
      } else {
        this.$message.warning('参考文件为空!')
  export default {
    name: 'EamMaintenanceStandardList',
    mixins: [JeecgListMixin],
    props: {
      isDisplayOperation: {
        type: Boolean,
        default: true
      }
    },
    clickThenSelect(record) {
    components: {
      LxSearchEquipmentSelect,
      EamMaintenanceStandardModal,
      EamMaintenanceStandardDetailList
    },
    data() {
      return {
        style: {
          cursor: 'pointer'
        },
        on: {
          click: () => {
            this.onSelectChange(record.id.split(','), [record])
        description: '保养规范页面',
        disableMixinCreated: true,
        // è¡¨å¤´
        columns: [
          {
            title: '统一编码',
            align: 'center',
            dataIndex: 'equipmentCode'
          },
          {
            title: '设备名称',
            align: 'center',
            dataIndex: 'equipmentName'
          },
          {
            title: '设备型号',
            align: 'center',
            dataIndex: 'equipmentModel'
          },
          {
            title: '保养分类',
            align: 'center',
            dataIndex: 'maintenanceCategory_dictText',
            width: 100
          },
          {
            title: '规范编码',
            align: 'center',
            dataIndex: 'standardCode',
            width: 150
          },
          {
            title: '规范名称',
            align: 'center',
            dataIndex: 'standardName'
          },
          {
            title: '保养周期',
            align: 'center',
            dataIndex: 'maintenancePeriod',
            width: 100
          },
          {
            title: '保养周期单位',
            align: 'center',
            dataIndex: 'periodUnit',
            width: 120
          },
          {
            title: '初始日期',
            align: 'center',
            dataIndex: 'initialDate',
            width: 100
          },
          {
            title: '规范状态',
            align: 'center',
            dataIndex: 'standardStatus_dictText'
          },
          {
            title: '规范版本',
            align: 'center',
            dataIndex: 'standardVersion',
            width: 100
          }
        }
        ],
        url: {
          list: '/eam/maintenanceStandard/list',
          delete: '/eam/maintenanceStandard/delete',
          deleteBatch: '/eam/maintenanceStandard/deleteBatch',
          exportXlsUrl: 'eam/maintenanceStandard/exportXls',
          inspectionImportExcel: 'eam/maintenanceStandard/inspectionImportExcel',
          weekMaintenanceImportExcel: 'eam/maintenanceStandard/weekMaintenanceImportExcel',
          secondMaintenanceImportExcel: 'eam/maintenanceStandard/secondMaintenanceImportExcel',
          thirdMaintenanceImportExcel: 'eam/maintenanceStandard/thirdMaintenanceImportExcel',
          inspectionXlsDownloadUrl: '导入模板/点检标准导入模板_v1.0.xlsx',
          weekMaintenanceXlsDownloadUrl: '导入模板/周保标准导入模板_v1.0.xlsx',
          secondMaintenanceXlsDownloadUrl: '导入模板/二保标准导入模板_v1.0.xlsx',
          thirdMaintenanceXlsDownloadUrl: '导入模板/三保标准导入模板_v1.0.xlsx',
          abolish: '/eam/maintenanceStandard/abolish'
        },
        standardId: '-1'
      }
    },
    onClearSelected() {
      this.selectedRowKeys = []
      this.selectionRows = []
      this.standardId = '-1'
    },
    onSelectChange(selectedRowKeys, selectionRows) {
      this.selectedRowKeys = selectedRowKeys
      this.selectionRows = selectionRows
      if (selectedRowKeys.length === 1) {
        this.standardId = selectedRowKeys[0]
      } else {
        this.standardId = '-1'
    computed: {
      inspectionImportExcel: function() {
        return `${window._CONFIG['domianURL']}/${this.url.inspectionImportExcel}`
      },
      weekMaintenanceImportExcel: function() {
        return `${window._CONFIG['domianURL']}/${this.url.weekMaintenanceImportExcel}`
      },
      secondMaintenanceImportExcel: function() {
        return `${window._CONFIG['domianURL']}/${this.url.secondMaintenanceImportExcel}`
      },
      thirdMaintenanceImportExcel: function() {
        return `${window._CONFIG['domianURL']}/${this.url.thirdMaintenanceImportExcel}`
      }
    },
    searchReset() {
      this.standardId = '-1'
      this.queryParam = {}
      this.loadData(1)
    },
    handleTemplateXlsDownload(url) {
      templateXlsDownload(url)
    },
    handleAbolish: function (id) {
      if(!this.url.abolish){
        this.$message.error("请设置url.abolish属性!")
    created() {
      if (!this.isDisplayOperation) {
        return
      }
      var that = this;
      deleteAction(that.url.abolish, {id: id}).then((res) => {
        if (res.success) {
          //重新计算分页问题
          that.reCalculatePage(1)
          // that.$message.success(res.message);
          that.$notification.success({
            message:'消息',
            description:res.message
          });
          that.loadData();
        } else {
          // that.$message.warning(res.message);
          that.$notification.warning({
            message:'消息',
            description:res.message
          });
      const operationColumn = {
        title: '操作',
        dataIndex: 'action',
        align: 'center',
        scopedSlots: { customRender: 'action' }
      }
      this.columns = [...this.columns, operationColumn]
      this.loadData(1)
    },
    methods: {
      clickThenSelect(record) {
        return {
          style: {
            cursor: 'pointer'
          },
          on: {
            click: () => {
              this.onSelectChange(record.id.split(','), [record])
            }
          }
        }
      });
    },
    handleUpgrade(record) {
      //升版
      this.$refs.modalForm.upgrade(record);
      this.$refs.modalForm.title = "升版";
      this.$refs.modalForm.disableSubmit = false;
    },
      },
      onClearSelected() {
        this.selectedRowKeys = []
        this.selectionRows = []
        this.standardId = '-1'
      },
      onSelectChange(selectedRowKeys, selectionRows) {
        this.selectedRowKeys = selectedRowKeys
        this.selectionRows = selectionRows
        if (selectedRowKeys.length === 1) {
          this.standardId = selectedRowKeys[0]
        } else {
          this.standardId = '-1'
        }
      },
      handleTemplateXlsDownload(url) {
        templateXlsDownload(url)
      },
      handleUpgrade(record) {
        //升版
        this.$refs.modalForm.upgrade(record)
        this.$refs.modalForm.title = '升版'
        this.$refs.modalForm.disableSubmit = false
      },
      searchReset() {
        this.standardId = '-1'
        this.queryParam = {}
        this.loadData(1)
      }
    }
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
</script>
src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue
@@ -21,131 +21,123 @@
</template>
<script>
import '@/assets/less/TableExpand.less'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getAction } from '@api/manage'
  import '@/assets/less/TableExpand.less'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import { getAction } from '@api/manage'
export default {
  name: 'EamMaintenanceStandardDetailList',
  mixins: [JeecgListMixin],
  props: {
    standardId: {
      type: String,
      required: true,
      default: '-1'
    }
  },
  data() {
    return {
      description: '保养标准明细管理页面',
      // è¡¨å¤´
      columns: [
        {
          title: '序号',
          align: 'center',
          dataIndex: 'itemCode',
          width: 60,
        },
        {
          title: '部位',
          align: 'center',
          dataIndex: 'itemPart',
          width: 200,
          ellipsis: true,
        },
        {
          title: '保养项',
          align: 'center',
          dataIndex: 'itemName',
          ellipsis: true,
        },
        {
          title: '保养要求',
          align: 'center',
          dataIndex: 'itemDemandAlias',
          ellipsis: true,
        },
        {
          title: '检查标准或要求',
          align: 'center',
          dataIndex: 'itemDemand',
          ellipsis: true,
        },
        {
          title: '检查方法',
          align: 'center',
          dataIndex: 'checkMethod',
          ellipsis: true,
        }
      ],
      url: {
        list: '/eam/eamMaintenanceStandardDetail/list'
  export default {
    name: 'EamMaintenanceStandardDetailList',
    mixins: [JeecgListMixin],
    props: {
      standardId: {
        type: String,
        required: true,
        default: '-1'
      }
    }
  },
  watch: {
    standardId: {
      immediate: true,
      handler(val) {
        if(val) {
          this.loadData(1)
        }else {
          this.clearList();
    },
    data() {
      return {
        description: '保养标准明细管理页面',
        // è¡¨å¤´
        columns: [
          {
            title: '序号',
            align: 'center',
            dataIndex: 'itemCode',
            width: 60
          },
          {
            title: '部位',
            align: 'center',
            dataIndex: 'itemPart',
            ellipsis: true
          },
          {
            title: '保养项分类',
            align: 'center',
            dataIndex: 'itemCategory_dictText',
            ellipsis: true
          },
          {
            title: '保养项目',
            align: 'center',
            dataIndex: 'itemName',
            ellipsis: true
          },
          {
            title: '保养规范或要求',
            align: 'center',
            dataIndex: 'itemDemand',
            ellipsis: true
          }
        ],
        url: {
          list: '/eam/eamMaintenanceStandardDetail/list'
        }
      }
    }
  },
  created() {
  },
  computed: {
  },
  methods: {
    loadData(arg) {
      if (!this.url.list) {
        this.$message.error('请设置url.list属性!')
        return
    },
    watch: {
      standardId: {
        immediate: true,
        handler(val) {
          if (val) {
            this.loadData(1)
          } else {
            this.clearList()
          }
        }
      }
      if(this.standardId && this.standardId === '-1'){
        this.clearList();
        return;
      }
      //加载数据 è‹¥ä¼ å…¥å‚æ•°1则加载第一页的内容
      if (arg === 1) {
    },
    created() {
    },
    computed: {},
    methods: {
      loadData(arg) {
        if (!this.url.list) {
          this.$message.error('请设置url.list属性!')
          return
        }
        if (this.standardId && this.standardId === '-1') {
          this.clearList()
          return
        }
        //加载数据 è‹¥ä¼ å…¥å‚æ•°1则加载第一页的内容
        if (arg === 1) {
          this.ipagination.current = 1
        }
        let params = this.getQueryParams()//查询条件
        if (!params) {
          return false
        }
        this.dataSource = []
        params.standardId = this.standardId
        this.loading = true
        getAction(this.url.list, params).then((res) => {
          if (res.success) {
            // console.log(res)
            //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
            this.dataSource = res.result.records || res.result
            if (res.result.total) {
              this.ipagination.total = res.result.total
            } else {
              this.ipagination.total = 0
            }
            //update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
          } else {
            this.$message.warning(res.message)
          }
        }).finally(() => {
          this.loading = false
        })
      },
      clearList() {
        this.dataSource = []
        this.selectedRowKeys = []
        this.ipagination.current = 1
      }
      let params = this.getQueryParams()//查询条件
      if (!params) {
        return false
      }
      this.dataSource = []
      params.standardId = this.standardId
      this.loading = true
      getAction(this.url.list, params).then((res) => {
        if (res.success) {
          // console.log(res)
          //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
          this.dataSource = res.result.records || res.result
          if (res.result.total) {
            this.ipagination.total = res.result.total
          } else {
            this.ipagination.total = 0
          }
          //update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
        } else {
          this.$message.warning(res.message)
        }
      }).finally(() => {
        this.loading = false
      })
    },
    clearList() {
      this.dataSource = []
      this.selectedRowKeys = []
      this.ipagination.current = 1
    },
    }
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
  @import '~@assets/less/common.less';
</style>
src/views/eam/base/modules/EamMaintenanceStandardModal.vue
@@ -8,75 +8,67 @@
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭">
    <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 prop="standardCode" label="规范编码">
              <a-input placeholder="编码系统自动生成" v-model="model.standardCode" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item prop="standardName" label="规范名称">
              <a-input placeholder="请输入规范名称" v-model="model.standardName"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item prop="equipmentId" label="统一编码">
              <lx-search-equipment-select placeholder="请输入统一编码或名称搜索" v-model="model.equipmentId" :disabled="!editable"/>
            </a-form-model-item>
          </a-col>
        </a-row>
    <a-spin :spinning="confirmLoading">
      <a-form-model ref="form" :model="model" :rules="validatorRules">
        <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.standardCode" disabled />
            <a-form-model-item prop="maintenanceCategory" label="保养分类">
              <j-dict-select-tag dict-code="maintenance_category" placeholder="请选择保养分类"
                                 @change="handleMaintenanceCategoryChange"
                                 v-model="model.maintenanceCategory" :disabled="!editable"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardName" label="标准名称">
              <a-input placeholder="请输入标准名称" v-model="model.standardName" />
            <a-form-model-item label="保养周期单位">
              <a-input readOnly v-model="model.periodUnit" placeholder="根据保养分类自动带出"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenanceCategory" label="保养分类">
              <j-dict-select-tag dict-code="maintenance_category" placeholder="请选择保养分类" v-model="model.maintenanceCategory" :disabled="editable" />
            <a-form-model-item prop="maintenancePeriod" label="保养周期">
              <a-input-number v-model="model.maintenancePeriod" placeholder="请输入保养周期" :min="1" :precision="0"
                              style="width: 100%"/>
            </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="fileCode" label="文件编号">
              <a-input placeholder="请输入保养标准文件编号" v-model="model.fileCode"/>
            <a-form-model-item prop="initialDate" label="初始日期">
              <a-date-picker placeholder="请选择初始日期" v-model="model.initialDate" value-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="initialDate" label="初始日期">
              <a-date-picker placeholder="请选择初始日期" v-model="model.initialDate" format="YYYY-MM-DD" style="width: 100%" :disabled="editable"/>
            <a-form-model-item label="规范状态">
              <j-dict-select-tag dict-code="maintenance_standard_status" placeholder="根据流程进度自动带出"
                                 v-model="model.standardStatus" disabled/>
            </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" style="width: 100%"/>
            <a-form-model-item label="规范版本">
              <a-input-number v-model="model.standardVersion" placeholder="根据流程进度自动带出" style="width: 100%" 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="equipmentId" label="设备编号">
              <lx-search-equipment-select placeholder="请输入设备编号或名称搜索" v-model="model.equipmentId" :disabled="editable"></lx-search-equipment-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardStatus" label="标准状态">
              <j-dict-select-tag dict-code="maintenance_standard_status" v-model="model.standardStatus" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardVersion" label="标准版本">
              <a-input-number v-model="model.standardVersion" style="width: 100%" disabled/>
            </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="fileList">
              <lx-upload :returnUrl="false"
                         :multiple="false"
                         v-model="model.fileList"
                         biz="EamMaintenanceStandard">
              </lx-upload>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <j-vxe-table
            ref="editableDetailTable"
@@ -91,7 +83,20 @@
            :loading="detail.loading"
            :dataSource="detail.dataSource"
            :columns="detail.columns"
            style="margin-top: 8px;"/>
            style="margin-top: 8px;">
            <template v-slot:itemPart="props">
              <a-textarea v-model="props.row.itemPart" allowClear @change="$refs.editableDetailTable.validateTable()"
                          :placeholder="model.maintenanceCategory!='THIRD_MAINTENANCE'?'仅三保需要维护':'请输入部位'" :rows="1"
                          autoSize :disabled="model.maintenanceCategory!='THIRD_MAINTENANCE'"/>
            </template>
            <template v-slot:itemCategory="props">
              <j-dict-select-tag v-model="props.row.itemCategory" :dict-code="encodedDictCode"
                                 @change="$refs.editableDetailTable.validateTable()"
                                 :placeholder="getItemCategoryPlaceholder"
                                 :disabled="!Boolean(model.maintenanceCategory)||model.maintenanceCategory=='THIRD_MAINTENANCE'"/>
            </template>
          </j-vxe-table>
        </a-row>
      </a-form-model>
    </a-spin>
@@ -99,55 +104,56 @@
</template>
<script>
import { getAction, httpAction } from '@/api/manage'
  import { getAction, httpAction } from '@/api/manage'
  import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js'
  import { JVXETypes } from '@/components/jeecg/JVxeTable'
  import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect'
  export default {
    name: "EamMaintenanceStandardModal",
    name: 'EamMaintenanceStandardModal',
    mixins: [JVxeTableModelMixin],
    components: {
      LxSearchEquipmentSelect,
      LxSearchEquipmentSelect
    },
    data () {
    data() {
      return {
        title:"操作",
        title: '操作',
        visible: false,
        model: {},
        editable: false,
        editable: true,
        upgradeFlag: false,
        labelCol: {
          xs: { span: 24 },
          sm: { span: 5 },
          sm: { span: 7 }
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 },
          sm: { span: 16 }
        },
        confirmLoading: false,
        spinning: false,
        validatorRules: {
          standardName: [
            { required: true, message: '请输入标准名称!' }
            { required: true, message: '请输入规范名称', trigger: 'change' }
          ],
          maintenanceCategory: [
            { required: true, message: '请选择保养分类!' }
            { required: true, message: '请选择保养分类', trigger: 'change' }
          ],
          initialDate: [
            { required: true, message: '请选择初始日期!' }
            { required: true, message: '请选择初始日期', trigger: 'change' }
          ],
          maintenancePeriod: [
            { required: true, message: '请输入保养周期,单位:天!' }
            { required: true, message: '请输入保养周期', trigger: 'change' }
          ],
          equipmentId: [
            { required: true, message: '请选择设备!' }
            { required: true, message: '请输入统一编码或名称搜索', trigger: 'change' }
          ]
        },
        url: {
          add: "/eam/maintenanceStandard/add",
          edit: "/eam/maintenanceStandard/edit",
          detail: "/eam/eamMaintenanceStandardDetail/queryList",
          upgrade: '/eam/maintenanceStandard/upgrade',
          add: '/eam/maintenanceStandard/add',
          edit: '/eam/maintenanceStandard/edit',
          detail: '/eam/eamMaintenanceStandardDetail/queryList',
          upgrade: '/eam/maintenanceStandard/upgrade'
        },
        detail: {
          loading: false,
@@ -156,169 +162,249 @@
            {
              title: 'ID',
              key: 'id',
              type: JVXETypes.hidden,
              type: JVXETypes.hidden
            },
            {
              title: 'standardId',
              key: 'standardId',
              type: JVXETypes.hidden,
              type: JVXETypes.hidden
            },
            {
              title: '序号',
              title: '项目序号',
              key: 'itemCode',
              type: JVXETypes.inputNumber,
              align:"center",
              width: 100,
              align: 'center',
              placeholder: '请输入项目序号',
              width: 150,
              validateRules: [
                {required : true, unique: true, message: '序号不能重复'}
                { required: true, message: '请输入项目序号' },
                { unique: true, message: '项目序号不能重复' }
              ]
            },
            {
              title: '部位',
              key: 'itemPart',
              type: JVXETypes.textarea,
              align:"center",
              type: JVXETypes.slot,
              slotName: 'itemPart',
              placeholder: '请输入部位',
              align: 'center',
              validateRules: [{ handler: this.itemPartValidate }]
            },
            {
              title: '保养项',
              title: '保养项分类',
              key: 'itemCategory',
              type: JVXETypes.slot,
              slotName: 'itemCategory',
              align: 'center',
              validateRules: [{ handler: this.itemCategoryValidate }]
            },
            {
              title: '保养项目',
              key: 'itemName',
              placeholder: '请输入保养项目',
              type: JVXETypes.textarea,
              align:"center",
              align: 'center',
              validateRules: [
                {required : true, message: '保养项不能为空!'}
                { required: true, message: '请输入保养项目' }
              ]
            },
            {
              title: '保养要求',
              key: 'itemDemandAlias',
              type: JVXETypes.textarea,
              align:"center",
            },
            {
              title: '检查标准或要求',
              title: '保养规范或要求',
              key: 'itemDemand',
              placeholder: '请输入保养规范或要求',
              type: JVXETypes.textarea,
              align:"center",
              align: 'center',
              validateRules: [
                {required : true, message: "保养要求不能为空!"}
                { required: true, message: '请输入保养规范或要求' }
              ]
            },
            {
              title: '检查方法',
              key: 'checkMethod',
              type: JVXETypes.textarea,
              align:"center",
            },
            }
          ],
          toolbarConfig: {
            // prefix å‰ç¼€ï¼›suffix åŽç¼€
            slot: ['prefix', 'suffix'],
            // add æ–°å¢žæŒ‰é’®ï¼›remove åˆ é™¤æŒ‰é’®ï¼›clearSelection æ¸…空选择按钮
            btn: ['add', 'remove', 'clearSelection']
          },
          }
        }
      }
    },
    created () {
    computed: {
      getItemCategoryPlaceholder() {
        if (!Boolean(this.model.maintenanceCategory)) return '请选择保养分类'
        else {
          if (this.model.maintenanceCategory != 'THIRD_MAINTENANCE') return '请选择保养项分类'
          else return '三保无需维护'
        }
      },
      encodedDictCode() {
        let suffix
        if (!Boolean(this.model.maintenanceCategory) || this.model.maintenanceCategory === 'THIRD_MAINTENANCE') return
        else suffix = this.model.maintenanceCategory.split('_')[1]
        const dictCode = `sys_dict_item,item_text,item_value,item_value like '%${suffix}' and dict_id='1940598438685134850'`
        return encodeURIComponent(dictCode)
      }
    },
    methods: {
      add () {
        this.model = {};
        this.visible = true;
        this.editable = false;
        this.upgradeFlag = false;
        this.detail.dataSource = [];
      add() {
        this.model = {}
        this.visible = true
        this.editable = true
        this.upgradeFlag = false
        this.detail.dataSource = []
      },
      edit (record) {
        this.model = Object.assign({}, record);
        this.visible = true;
        this.editable = true;
        this.upgradeFlag = false;
        this.detail.dataSource = [];
        if(record && record.referenceFile) {
          let obj = JSON.parse(record.referenceFile);
          this.model.fileList = [obj];
        }else {
          this.model.fieldList = [];
        }
        this.loadDetail(record.id);
      },
      upgrade(record) {
        this.model = Object.assign({}, record);
        this.visible = true;
        this.editable = true;
        this.upgradeFlag = true;
        this.detail.dataSource = [];
        if(record && record.referenceFile) {
          let obj = JSON.parse(record.referenceFile);
          this.model.fileList = [obj];
        }else {
          this.model.fieldList = [];
        }
        this.loadDetail(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();
        if(errMap){
          this.$message.warning("数据校验失败!");
          return;
        }
        // è§¦å‘表单验证
         this.$refs.form.validate(valid => {
          if (valid) {
            let tableData = that.$refs.editableDetailTable.getTableData();
            let removeData = that.$refs.editableDetailTable.getDeleteData();
            that.model.tableDetailList = [...tableData];
            that.model.removeDetailList = [...removeData];
            that.confirmLoading = true;
            let httpurl = '';
            let method = '';
            if(!this.model.id){
              httpurl+=this.url.add;
              method = 'post';
            }else{
              if(this.upgradeFlag) {
                httpurl+=this.url.upgrade;
              }else {
                httpurl+=this.url.edit;
      edit(record) {
        this.model = Object.assign({}, record)
        this.visible = true
        this.editable = false
        this.upgradeFlag = false
        this.detail.dataSource = []
        this.loadDetail(record.id)
      },
      upgrade(record) {
        this.model = Object.assign({}, record)
        this.visible = true
        this.editable = false
        this.upgradeFlag = true
        this.detail.dataSource = []
        this.loadDetail(record.id)
      },
      /**
       * ä¿å…»åˆ†ç±»å€¼æ”¹å˜æ—¶åŒæ—¶æ”¹å˜ä¿å…»å‘¨æœŸå•位以及保养项分类
       * @param value ä¿å…»åˆ†ç±»å€¼
       */
      handleMaintenanceCategoryChange(value) {
        switch (value) {
          case 'THIRD_MAINTENANCE':
            this.model.periodUnit = 'å¹´'
            break
          case 'SECOND_MAINTENANCE':
            this.model.periodUnit = '月'
            break
          case 'POINT_INSPECTION':
            this.model.periodUnit = '天'
            break
          default:
            delete this.model.periodUnit
        }
        const tableData = this.$refs.editableDetailTable.getTableData()
        tableData.forEach(item => {
          if (value !== 'THIRD_MAINTENANCE') delete item.itemPart
          delete item.itemCategory
        })
        this.detail.dataSource = [...tableData]
        console.log('tableData', tableData)
      },
      /**
       * ä¿å…»éƒ¨ä½æ ¡éªŒ
       * @param cellValue è¾“入值
       * @param callback å›žè°ƒå‡½æ•°
       */
      itemPartValidate({ cellValue }, callback) {
        if (this.model.maintenanceCategory === 'THIRD_MAINTENANCE') {
          if (cellValue) callback(true)
          else callback(false, '请选择${title}')
        } else {
          callback(true)
        }
      },
      /**
       * ä¿å…»é¡¹åˆ†ç±»æ ¡éªŒ
       * @param cellValue è¾“入值
       * @param callback å›žè°ƒå‡½æ•°
       */
      itemCategoryValidate({ cellValue }, callback) {
        if (this.model.maintenanceCategory === 'THIRD_MAINTENANCE') {
          callback(true)
        } else {
          if (cellValue) callback(true)
          else callback(false, '请选择${title}')
        }
      },
      // æäº¤äº‹ä»¶
      async handleOk() {
        const that = this
        let errMap = await that.$refs.editableDetailTable.validateTable()
        if (errMap) return false
        // è§¦å‘表单验证
        this.$refs.form.validate(valid => {
          if (valid) {
            let tableData = that.$refs.editableDetailTable.getTableData()
            let removeData = that.$refs.editableDetailTable.getDeleteData()
            that.model.tableDetailList = [...tableData]
            that.model.removeDetailList = [...removeData]
            that.confirmLoading = that.spinning = true
            let httpUrl = ''
            let method = ''
            if (!this.model.id) {
              httpUrl += this.url.add
              method = 'post'
            } else {
              if (this.upgradeFlag) {
                httpUrl += this.url.upgrade
              } else {
                httpUrl += this.url.edit
              }
              method = 'put';
              method = 'put'
            }
            httpAction(httpurl,this.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;
            httpAction(httpUrl, this.model, method)
              .then((res) => {
                if (res.success) {
                  that.$notification.success({
                    message: '消息',
                    description: res.message
                  })
                  that.$emit('ok')
                  that.close()
                } else {
                  that.$notification.warning({
                    message: '消息',
                    description: res.message
                  })
                }
              })
              .finally(() => {
                that.confirmLoading = that.spinning = false
              })
          } else {
            return false
          }
        })
      },
      handleCancel () {
      handleCancel() {
        this.close()
      },
      close() {
        this.$emit('close')
        this.visible = false
        this.$refs.form.clearValidate()
      },
      //加载详情数据
      loadDetail(standardId) {
        this.detail.dataSource = [];
        this.spinning = true
        this.detail.dataSource = []
        if (standardId) {
          getAction(this.url.detail, { standardId: standardId }).then(res => {
            if (res.success) {
              this.detail.dataSource = [...res.result];
            }
          })
          getAction(this.url.detail, { standardId })
            .then(res => {
              if (res.success) {
                this.detail.dataSource = [...res.result]
              }
            })
            .finally(() => {
              this.spinning = false
            })
        }
      }
@@ -326,6 +412,12 @@
  }
</script>
<style lang="less" scoped>
<style scoped lang="less">
  /deep/ .ant-select-dropdown-menu {
    text-align: left;
  }
  /deep/ textarea.ant-input {
    resize: none;
  }
</style>
src/views/eam/equipment/EamEquipmentLedger.vue
@@ -92,19 +92,9 @@
        style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
        <a style="margin-left: 24px" @click="onSelectChange([])">清空</a>
      </div>
      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :scroll="{ x: 'max-content' }"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        @change="handleTableChange"
      >
      <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
               :pagination="ipagination" :loading="loading" :scroll="{ x: 'max-content' }"
               :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange">
        <!--统一编码-->
        <template slot="equipmentCode" slot-scope="text">
          <a href="#" @click="handleDetail(record)" style="display: inline-block;height: 100%">{{text}}</a>
@@ -139,6 +129,7 @@
          <a @click.stop="handleEdit(record)">编辑</a>
          <a-divider type="vertical"/>
          <a-dropdown>
            <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
            <a-menu slot="overlay">
@@ -298,7 +289,7 @@
          {
            title: '维修班组',
            align: 'center',
            dataIndex: 'repairDepartOrgCode'
            dataIndex: 'repairDepartOrgCode_dictText'
          },
          {
            title: '安全配置',
@@ -308,7 +299,7 @@
          {
            title: '冷却系统',
            align: 'center',
            dataIndex: 'coolSystem'
            dataIndex: 'coolSystem_dictText'
          },
          {
            title: '灭火器',
@@ -441,7 +432,7 @@
            dataIndex: 'nextThirdMaintenance'
          },
          {
            title: '三保周期',
            title: '三保周期(年)',
            align: 'center',
            dataIndex: 'thirdMaintenancePeriod'
          },
@@ -456,7 +447,7 @@
            dataIndex: 'nextTechnologyCheck'
          },
          {
            title: '技术鉴定周期',
            title: '技术鉴定周期(年)',
            align: 'center',
            dataIndex: 'technologyCheckPeriod'
          },
@@ -541,7 +532,4 @@
      }
    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less';
</style>
</script>
src/views/eam/equipment/modules/EamEquipmentModal.vue
@@ -24,7 +24,7 @@
                </a-col>
                <a-col :span="customSpan">
                  <a-form-model-item prop="equipmentCode" label="统一编码">
                    <a-input placeholder="请输入统一编码" v-model="model.equipmentCode"/>
                    <a-input placeholder="请输入统一编码" v-model="model.equipmentCode" :disabled="!editable"/>
                  </a-form-model-item>
                </a-col>
                <a-col :span="customSpan">
@@ -35,7 +35,7 @@
                <a-col :span="customSpan">
                  <a-form-model-item prop="factoryOrgCode" label="使用部门">
                    <a-tree-select v-model="model.factoryOrgCode" style="width: 100%" show-search
                                   :tree-data="productionTreeData"
                                   :tree-data="productionTreeData" :disabled="!editable"
                                   :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                                   placeholder="请选择使用部门" allow-clear treeNodeFilterProp="title"
                                   :replaceFields="{key:'orgCode',value:'orgCode'}"
@@ -47,7 +47,7 @@
              <a-row>
                <a-col :span="customSpan">
                  <a-form-model-item prop="equipmentCategory" label="所属分类">
                    <j-dict-select-tag dict-code="equipment_category" placeholder="请选择所属分类"
                    <j-dict-select-tag dict-code="equipment_category" placeholder="请选择所属分类" :disabled="!editable"
                                       v-model="model.equipmentCategory"/>
                  </a-form-model-item>
                </a-col>
@@ -216,7 +216,8 @@
              <a-row>
                <a-col :span="customSpan">
                  <a-form-model-item label="本次三保日期">
                    <a-date-picker v-model="model.latestThirdMaintenance" value-format="YYYY-MM-DD" style="width:100%"/>
                    <a-date-picker v-model="model.latestThirdMaintenance" value-format="YYYY-MM-DD"
                                   :disabled="!editable" style="width:100%"/>
                  </a-form-model-item>
                </a-col>
                <a-col :span="customSpan">
@@ -225,14 +226,15 @@
                  </a-form-model-item>
                </a-col>
                <a-col :span="customSpan">
                  <a-form-model-item label="三保周期">
                    <a-input-number placeholder="请输入三保周期" v-model="model.thirdMaintenancePeriod" :min="0"
                  <a-form-model-item label="三保周期(年)">
                    <a-input-number placeholder="请输入三保周期(年)" v-model="model.thirdMaintenancePeriod" :min="1"
                                    style="width: 100%"/>
                  </a-form-model-item>
                </a-col>
                <a-col :span="customSpan">
                  <a-form-model-item label="本次技术鉴定日期">
                    <a-date-picker v-model="model.latestTechnologyCheck" value-format="YYYY-MM-DD" style="width:100%"/>
                    <a-date-picker v-model="model.latestTechnologyCheck" value-format="YYYY-MM-DD"
                                   :disabled="!editable" style="width:100%"/>
                  </a-form-model-item>
                </a-col>
              </a-row>
@@ -244,8 +246,8 @@
                  </a-form-model-item>
                </a-col>
                <a-col :span="customSpan">
                  <a-form-model-item label="技术鉴定周期">
                    <a-input-number placeholder="请输入技术鉴定周期" v-model="model.technologyCheckPeriod" :min="0"
                  <a-form-model-item label="技术鉴定周期(年)">
                    <a-input-number placeholder="请输入技术鉴定周期(年)" v-model="model.technologyCheckPeriod" :min="1"
                                    style="width: 100%"/>
                  </a-form-model-item>
                </a-col>
@@ -355,7 +357,7 @@
    },
    methods: {
      add() {
        this.editable = false
        this.editable = true
        //初始化默认值
        this.model = {
          operationSystem: 1,
@@ -365,7 +367,7 @@
      },
      edit(record) {
        this.editable = true
        this.editable = false
        this.model = Object.assign({}, record)
        this.visible = true
      },
@@ -376,32 +378,34 @@
        this.$refs.form.validate(valid => {
          if (valid) {
            that.confirmLoading = true
            let httpurl = ''
            let httpUrl = ''
            let method = ''
            if (!this.model.id) {
              httpurl += this.url.add
              httpUrl += this.url.add
              method = 'post'
            } else {
              httpurl += this.url.edit
              httpUrl += this.url.edit
              method = 'put'
            }
            httpAction(httpurl, this.model, method).then((res) => {
              if (res.success) {
                that.$notification.success({
                  message: '消息',
                  description: res.message
                })
                that.$emit('ok')
                that.close()
              } else {
                that.$notification.warning({
                  message: '消息',
                  description: res.message
                })
              }
            }).finally(() => {
              that.confirmLoading = false
            })
            httpAction(httpUrl, this.model, method)
              .then((res) => {
                if (res.success) {
                  that.$notification.success({
                    message: '消息',
                    description: res.message
                  })
                  that.$emit('ok')
                  that.close()
                } else {
                  that.$notification.warning({
                    message: '消息',
                    description: res.message
                  })
                }
              })
              .finally(() => {
                that.confirmLoading = false
              })
          } else {
            return false
          }
src/views/eam/maintenance/EamInspectionOrderList.vue
@@ -10,12 +10,7 @@
        @keyup.enter.native="searchQuery"
      >
        <a-row :gutter="24">
          <a-col
            :xl="4"
            :lg="7"
            :md="8"
            :sm="24"
          >
          <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <a-form-item label="工单号">
              <a-input
                placeholder="请输入工单号"
@@ -23,69 +18,27 @@
              ></a-input>
            </a-form-item>
          </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>
          <a-col :xl="5" :lg="7" :md="8" :sm="24">
            <a-form-item label="统一编码">
              <lx-search-equipment-select placeholder="请输入统一编码或名称搜索" v-model="queryParam.equipmentId"/>
            </a-form-item>
          </a-col>
          <a-col
            :xl="6"
            :lg="7"
            :md="8"
            :sm="24"
          >
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="计划点检日期">
              <a-range-picker
                v-model="queryParam.inspectionDateRange"
                @change="onInspectionDateChange"
                format="YYYY-MM-DD"
                value-format="YYYY-MM-DD"
              />
              <a-range-picker v-model="queryParam.inspectionDateRange" @change="onInspectionDateChange"
                              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-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"
              />
              <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="info"
                @click="searchReset"
                icon="reload"
                style="margin-left: 8px"
              >重置</a-button>
          <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="info" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </span>
          </a-col>
        </a-row>
@@ -94,431 +47,374 @@
    <!-- æŸ¥è¯¢åŒºåŸŸ-END -->
    <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
    <div
      class="table-operator"
      v-if="isDisplayOperation"
    >
      <a-button
        @click="handleAdd"
        type="primary"
        icon="plus"
        v-if="isShowAuth('eam:inspection:add')"
      >新增</a-button>
    <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"
            v-if="isShowAuth('eam:inspection:abolish')"
            @click="batchZf('ABOLISH')"
          >
            <a-icon type="snippets" />
          <a-menu-item key="1" @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 key="2" @click="batchLq('UNDER_INSPECTION')">
            <a-icon type="form"/>
            é¢†å–
          </a-menu-item>
        </a-menu>
        <a-button style="margin-left: 8px"> æ‰¹é‡æ“ä½œ
          <a-icon type="down" />
          <a-icon type="down"/>
        </a-button>
      </a-dropdown>
    </div>
    <!-- table区域-begin -->
    <div>
      <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 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>
      <a-table
        ref="table"
        size="middle"
        :scroll="{x:true}"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        class="j-table-force-nowrap"
        @change="handleTableChange"
      >
      <a-table ref="table" size="middle" :scroll="{x:true}" bordered rowKey="id" :columns="columns"
               :dataSource="dataSource" :pagination="ipagination" :loading="loading"
               :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" class="j-table-force-nowrap"
               @change="handleTableChange">
        <span slot="action" slot-scope="text, record">
          <template v-if=" record.inspectionStatus === 'WAIT_INSPECTION'">
            <a @click="handleEdit(record)">编辑</a>
        <span
          slot="action"
          slot-scope="text, record"
        >
          <a
            @click="handleEdit(record)"
            v-if="isShowAuth('eam:inspection:edit') && record.inspectionStatus === 'WAIT_INSPECTION'"
          >编辑</a>
          <a-divider type="vertical"/>
          <a-divider
            type="vertical"
            v-if="isShowAuth('eam:inspection:edit') && record.inspectionStatus === 'WAIT_INSPECTION'"
          />
          <a-popconfirm
            title="确定领取吗?"
            v-if="isShowAuth('eam:inspection:collect') && record.inspectionStatus === 'WAIT_INSPECTION'"
            @confirm="() => handleInspection(record.id)"
          >
          <a-popconfirm title="确定领取吗?" @confirm="() => handleInspection(record.id)">
            <a>领取</a>
          </a-popconfirm>
          <a-divider
            type="vertical"
            v-if="isShowAuth('eam:inspection:collect') && record.inspectionStatus === 'WAIT_INSPECTION'"
          />
          <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="isShowAuth('eam:inspection:abolish') && record.inspectionStatus === 'WAIT_INSPECTION'">
                <a-popconfirm
                  title="确定作废吗?"
                  @confirm="() => handleOrReceive(record.id)"
                >
              <a-menu-item>
                <a-popconfirm title="确定作废吗?" @confirm="() => handleOrReceive(record.id)">
                  <a>作废</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
          </template>
          <a-divider
            v-if="record.inspectionStatus === 'COMPLETE'"
            type="vertical"
          />
          <a
            v-if="record.inspectionStatus === 'COMPLETE'"
            @click="handlePrint(record)"
          >打印</a>
          <a v-else @click="handleDetail(record)">详情</a>
          <template v-if="record.inspectionStatus === 'COMPLETE'">
            <a-divider type="vertical"/>
             <a @click="handlePrint(record)">打印</a>
          </template>
        </span>
      </a-table>
    </div>
    <eam-inspection-order-modal
      ref="modalForm"
      @ok="modalFormOk"
    ></eam-inspection-order-modal>
    <eam-inspection-order-modal ref="modalForm" @ok="modalFormOk"/>
    <inspection-order-handle
      ref="modalFormXq"
      :selectShenpiData="selectInspectionOrderXqData"
    />
    <inspection-order-handle ref="modalFormXq" :selectShenpiData="selectInspectionOrderXqData"/>
  </a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import EamInspectionOrderModal from './modules/EamInspectionOrderModal'
import { deleteAction, getAction } from '@api/manage'
import InspectionOrderHandle from '../../flowable/workflow/InspectionOrder/InspectionOrderHandle'
import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue'
  import '@/assets/less/TableExpand.less'
  import { mixinDevice } from '@/utils/mixin'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import EamInspectionOrderModal from './modules/EamInspectionOrderModal'
  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,
    LxSearchEquipmentSelect,
  },
  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
  export default {
    name: 'EamInspectionOrderList',
    mixins: [JeecgListMixin, mixinDevice],
    components: {
      InspectionOrderHandle,
      EamInspectionOrderModal,
      LxSearchEquipmentSelect
    },
    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: 'equipmentCode'
          },
          {
            title: '设备名称',
            align: 'center',
            dataIndex: 'equipmentName'
          },
          {
            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: 'operator_dictText'
          },
          {
            title: '点检时间',
            align: 'center',
            dataIndex: 'operateTime'
          },
          {
            title: '管理员确认',
            align: 'center',
            dataIndex: 'confirmUser_dictText'
          },
          {
            title: '确认时间',
            align: 'center',
            dataIndex: 'confirmTime'
          },
          {
            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'
        },
        {
          title: '工单号',
          align: 'center',
          dataIndex: 'orderNum'
        },
        {
          title: '设备编号',
          align: 'center',
          dataIndex: 'equipmentCode'
        },
        {
          title: '设备名称',
          align: 'center',
          dataIndex: 'equipmentName'
        },
        {
          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: 'operator_dictText'
        },
        {
          title: '点检时间',
          align: 'center',
          dataIndex: 'operateTime',
        },
        {
          title: '管理员确认',
          align: 'center',
          dataIndex: 'confirmUser_dictText'
        },
        {
          title: '确认时间',
          align: 'center',
          dataIndex: 'confirmTime',
        },
        {
          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'
        dictOptions: {},
        superFieldList: [],
        selectInspectionOrderXqData: {}
      }
    },
    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: {
      importExcelUrl: function() {
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
      }
    },
    methods: {
      initDictConfig() {
      },
      dictOptions: {},
      superFieldList: [],
      selectInspectionOrderXqData: {}
    }
  },
  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: {
    importExcelUrl: function () {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
    }
  },
  methods: {
    initDictConfig() {
    },
    //详情
    handleDetail: function (record) {
      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!')
        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] + ','
      //详情
      handleDetail: function(record) {
        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!')
          return
        }
        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
        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
            })
          }
        })
      }
    },
    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] + ','
      },
      handleOrReceive(id) {
        if (!this.url.cancelInspectionOrder) {
          this.$message.error('请设置url.cancelInspectionOrder!')
          return
        }
        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
        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
            })
          }
        })
      }
    },
    onInspectionDateChange: function (value, dateString) {
      this.queryParam.inspectionDateBegin = dateString[0]
      this.queryParam.inspectionDateEnd = dateString[1]
    },
      },
      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
              })
            }
          })
        }
      },
      onInspectionDateChange: function(value, dateString) {
        this.queryParam.inspectionDateBegin = dateString[0]
        this.queryParam.inspectionDateEnd = dateString[1]
      },
    handlePrint(record) {
      let href = `${window._CONFIG['domianURL']}/jmreport/view/1094871242505912320?id=` + record.id + `&equipmentId=` + record.equipmentId + `&inspectionDate=` + record.inspectionDate; //网站链接
      window.open(href, "_blank");
    },
      handlePrint(record) {
        let href = `${window._CONFIG['domianURL']}/jmreport/view/1094871242505912320?id=` + record.id + `&equipmentId=` + record.equipmentId + `&inspectionDate=` + record.inspectionDate //网站链接
        window.open(href, '_blank')
      }
    }
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
  @import '~@assets/less/common.less';
</style>
src/views/eam/maintenance/modules/EamInspectionOrderModal.vue
@@ -1,40 +1,31 @@
<template>
  <j-modal
    :title="title"
    :width="1200"
    :visible="visible"
    :confirmLoading="confirmLoading"
    switchFullscreen
    centered
    :mask-closable="false"
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭">
  <j-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen centered
           :mask-closable="false" @ok="handleOk" @cancel="handleCancel" cancelText="关闭">
    <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 prop="standardCode" label="工单号">
              <a-input placeholder="工单号自动生成" v-model="model.orderNum" readOnly/>
              <a-input placeholder="工单号自动生成" v-model="model.orderNum" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item prop="equipmentId" label="设备编号">
              <MaintenanceEquipmentSelect placeholder="请输入设备编号或名称搜索" v-model="model.equipmentId"
            <a-form-model-item prop="equipmentId" label="统一编码">
              <MaintenanceEquipmentSelect placeholder="请输入统一编码或名称搜索" v-model="model.equipmentId"
                                          :maintenanceCategory="maintenanceCategory" :disabled="disabled"
                                          @autocompleteForm="autocompleteForm"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item prop="standardName" label="标准名称">
            <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 prop="standardCode" label="标准编码">
            <a-form-model-item prop="standardCode" label="规范编码">
              <a-input placeholder="选择设备后自动带出" readOnly v-model="model.standardCode"/>
            </a-form-model-item>
          </a-col>
@@ -73,19 +64,9 @@
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <j-vxe-table
            ref="editableDetailTable"
            :rowNumber="true"
            :rowSelection="true"
            :bordered="true"
            :alwaysEdit="true"
            :toolbar="true"
            keep-source
            :height="300"
            :loading="detail.loading"
            :dataSource="detail.dataSource"
            :columns="detail.columns"
            style="margin-top: 8px;"/>
          <j-vxe-table ref="editableDetailTable" :rowNumber="true" :rowSelection="true" :bordered="true"
                       :alwaysEdit="true" :toolbar="true" keep-source :height="300" :loading="detail.loading"
                       :dataSource="detail.dataSource" :columns="detail.columns" style="margin-top: 8px;"/>
        </a-row>
      </a-form-model>
    </a-spin>
@@ -123,16 +104,16 @@
        disabled: false,
        validatorRules: {
          // standardName: [
          //   { required: true, message: '请输入标准名称!' }
          //   { required: true, message: '请输入规范名称!' }
          // ],
          inspectionDate: [
            { required: true, message: '请选择点检日期!' }
            { required: true, message: '请选择点检日期', trigger: 'change' }
          ],
          // maintenancePeriod: [
          //   { required: true, message: '请输入保养周期,单位:天!' }
          // ],
          equipmentId: [
            { required: true, message: '请选择设备!' }
            { required: true, message: '请选择设备', trigger: 'change' }
          ]
        },
        url: {
@@ -157,7 +138,8 @@
              width: '10%',
              align: 'center',
              validateRules: [
                { required: true, unique: true, message: '序号不能重复' }
                { required: true, message: '请输入${title}' },
                { unique: true, message: '序号不能重复' }
              ]
            },
            {
@@ -167,7 +149,7 @@
              width: '20%',
              align: 'center',
              validateRules: [
                { required: true, message: '保养项不能为空!' }
                { required: true, message: '请输入${title}' }
              ]
            },
            {
@@ -177,14 +159,12 @@
              width: '30%',
              align: 'center',
              validateRules: [
                { required: true, message: '保养要求不能为空!' }
                { required: true, message: '请输入${title}' }
              ]
            }
          ]
        }
      }
    },
    created() {
    },
    methods: {
      add() {
src/views/flowable/workflow/assignEquipmentFileStream/AssignEquipmentFileStreamHandle.vue
ÎļþÒÑɾ³ý
src/views/flowable/workflow/assignFileStream/AssignFileStreamHandle.vue
ÎļþÒÑɾ³ý
src/views/flowable/workflow/assignFileStream/AssignFileStreamXq.vue
ÎļþÒÑɾ³ý
src/views/flowable/workflow/dispatchFile/DispatchFileBachHandleForm.vue
ÎļþÒÑɾ³ý
src/views/flowable/workflow/dispatchFile/DispatchFileBachHandleStyle#Drawer.vue
ÎļþÒÑɾ³ý
src/views/flowable/workflow/dispatchFile/DispatchFileHandle.vue
ÎļþÒÑɾ³ý
src/views/flowable/workflow/dispatchFile/DispatchFileXq.vue
ÎļþÒÑɾ³ý
src/views/flowable/workflow/guideCardBatch/GuideCardBatchHandle.vue
ÎļþÒÑɾ³ý
src/views/flowable/workflow/inboundOrder/InboundOrderHandle.vue
ÎļþÒÑɾ³ý
src/views/flowable/workflow/lossBound/lossBoundHandle.vue
ÎļþÒÑɾ³ý
src/views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue
ÎļþÒÑɾ³ý
src/views/flowable/workflow/sparePartApply/SparePartApplyHandle.vue
ÎļþÒÑɾ³ý
src/views/flowable/workflow/standardizedProcess/StandardizedProcessHandle.vue
ÎļþÒÑɾ³ý
src/views/flowable/workflow/stocktakingBound/stocktakingBoundHandle.vue
ÎļþÒÑɾ³ý
src/views/system/UserList.vue
@@ -220,6 +220,13 @@
            ellipsis: true,
          },
          {
            title: '维修部门',
            align: "center",
            width: 240,
            dataIndex: 'repairDepartName',
            ellipsis: true,
          },
          {
            title: '状态',
            align: "center",
            width: 80,
src/views/system/modules/UserModal.vue
@@ -212,6 +212,20 @@
          />
        </a-form-model-item>
        <a-form-model-item
          label="维修部门/班组分配"
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          v-show="!repairDepartDisabled"
        >
          <j-select-repair-depart
            v-model="model.selectedRepairDeparts"
            :multi="true"
            @back="backRepairDepartInfo"
            :backRepairDepart="true"
            :treeRepairDepartOpera="true"
          ></j-select-repair-depart>
        </a-form-model-item>
        <a-form-model-item
          label="负责部门"
@@ -267,6 +281,7 @@
  import { disabledAuthFilter } from '@/utils/authFilter'
  import { duplicateCheck } from '@/api/api'
  import JSelectProduction from '../../../components/jeecgbiz/JSelectProduction'
  import JSelectRepairDepart from '../../../components/jeecgbiz/JSelectRepairDepart'
  import { mapActions } from 'vuex'
  import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api'
  import SelectDeviceModal from './SelectDeviceModal'
@@ -275,13 +290,15 @@
    name: 'UserModal',
    components: {
      SelectDeviceModal,
      JSelectProduction
      JSelectProduction,
      JSelectRepairDepart
    },
    data() {
      return {
        departDisabled: false, //是否是我的部门调用该页面
        productionDisabled: false, //是否是我的车间调用该页面
        roleDisabled: false, //是否是角色维护调用该页面
        repairDepartDisabled: false, //是否是我的维修部门班组调用该页面
        modalWidth: 800,
        drawerWidth: 700,
        modaltoggleFlag: true,
@@ -331,15 +348,19 @@
          userProductionList: '/sys/user/userProductionList',
          userId: '/sys/user/generateUserId', // å¼•入生成添加用户情况下的url
          syncUserByUserName: '/act/process/extActProcess/doSyncUserByUserName',//同步用户到工作流
          queryTenantList: '/sys/tenant/queryList'
          queryTenantList: '/sys/tenant/queryList',
          userRepairDepartList: '/sys/user/userRepairDepartList',
          repairDepartTreeList: '/eam/eamBaseRepairDepart/queryTreeList'
        },
        tenantsOptions: [],
        rolesOptions: [],
        nextDepartOptions: [],
        nextProductionOptions: [],
        nextRepairDepartOptions: [],
        isDepartType: '',
        model: {
          selectedProduction: ''
          selectedProduction: '',
          selectedRepairDeparts: ''
        }
      }
    },
@@ -367,6 +388,7 @@
      this.initRoleList()
      this.initTenantList()
      this.queryTreeData()
      this.getRepairDepartTreeDataByApi()
    },
    computed: {
      uploadAction: function() {
@@ -389,6 +411,20 @@
        }).finally(() => {
        })
      },
      // èŽ·å–ç»´ä¿®ç­ç»„æ ‘
      getRepairDepartTreeDataByApi() {
        getAction(this.url.repairDepartTreeList)
          .then(res => {
            if (res.success) {
              this.repairDepartTreeData = res.result
            } else {
              this.$notification.warning({
                message: '消息',
                description: res.message
              })
            }
          })
      },
      add() {
        this.refresh()
        this.edit({
@@ -397,7 +433,8 @@
          userIdentity: 1,
          selectedroles: '',
          selecteddeparts: '',
          selectedProduction: ''
          selectedProduction: '',
          selectedRepairDeparts: ''
        })
      },
      edit(record) {
@@ -418,6 +455,8 @@
        if (record.hasOwnProperty('id')) {
          that.getUserRoles(record.id)
          that.getUserDeparts(record.id)
          that.getUserProductions(record.id)
          that.getUserRepairDeparts(record.id)
        }
      },
      isDisabledAuth(code) {
@@ -490,7 +529,9 @@
            that.nextDepartOptions = departOptions
          }
        })
      },
      getUserProductions(userid) {
        let that = this
        // èŽ·å–è½¦é—´åˆ†é…
        getAction(that.url.userProductionList, { userId: userid }).then((res) => {
          if (res.success) {
@@ -509,7 +550,27 @@
            that.nextProductionOptions = ProductionOptions
          }
        })
        //车间的url
      },
      getUserRepairDeparts(userid) {
        let that = this
        // èŽ·å–ç»´ä¿®éƒ¨é—¨/班组分配
        getAction(that.url.userRepairDepartList, { userId: userid }).then((res) => {
          if (res.success) {
            let repairDepartOptions = []
            let selectedRepairDepartKeys = []
            for (let i = 0; i < res.result.length; i++) {
              selectedRepairDepartKeys.push(res.result[i].key)
              //新增负责维修部门/班组选择下拉框
              repairDepartOptions.push({
                value: res.result[i].key,
                label: res.result[i].title
              })
            }
            this.$set(this.model, 'selectedRepairDeparts', selectedRepairDepartKeys.join(','))
            that.nextRepairDepartOptions = repairDepartOptions
          }
        })
      },
      backDepartInfo(info) {
        this.model.departIds = this.model.selecteddeparts
@@ -525,11 +586,19 @@
          return c
        })
      },
      backRepairDepartInfo(info) {
        this.model.repairDepartIds = this.model.selectedRepairDeparts
        this.nextRepairDepartOptions = info.map((item, index, arr) => {
          let c = { label: item.text, value: item.value + '' }
          return c
        })
      },
      refresh() {
        this.userId = ''
        this.nextDepartOptions = []
        this.nextProductionOptions = []
        this.nextRepairDepartOptions = []
        this.departIdShow = false
      },
      close() {
@@ -538,6 +607,7 @@
        this.disableSubmit = false
        this.nextDepartOptions = []
        this.nextProductionOptions = []
        this.nextRepairDepartOptions = []
        this.departIdShow = false
        this.$refs.form.resetFields()
      },