qushaowei
2024-03-28 e7eca504e167de53fd97e5c2cc1fc039a8e758cc
提交
已添加3个文件
已修改7个文件
1570 ■■■■■ 文件已修改
src/views/eam/Daily3MaintenanceOrderList.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/DailyInspectionStandardList.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/DailyMaintenanceOrderList.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/DailyMaintenanceStandard3List.vue 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/DailyMaintenanceStandardList.vue 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/InspectionReportForms.vue 561 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/UploadList.vue 486 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/daily3MaintenanceOrder/EquipmentPrecisionCheckOrderModal.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/daily3MaintenanceOrder/Maintenance3ReceiptModal.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/uploadModel/UploadModel.vue 299 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/Daily3MaintenanceOrderList.vue
@@ -97,25 +97,40 @@
        style="margin-left: 8px"
      >重置</a-button>
      <a-button
        v-show="selectedRowKeys.length == 1 && selectionRows[0].status == '8'"
        v-show="selectedRowKeys.length == 1 && selectionRows[0].status === '5' && selectionRows[0].isNotStoveCategoryFlag == false && selectionRows[0].precisionParameters == '1' "
        @click="handlePrintPrecision(selectionRows[0])"
        type="primary"
        style="margin-left: 8px"
      >精度检验单打印
      </a-button>
      <a-button
        v-show="selectedRowKeys.length == 1 && selectionRows[0].status == '8'"
        v-show="selectedRowKeys.length == 1 && selectionRows[0].status === '5'"
        @click="handlePrintCheck(selectionRows[0])"
        type="primary"
        style="margin-left: 8px"
      >验收单打印
      </a-button>
      <!-- v-show="selectedRowKeys.length == 1 && selectionRows[0].status == '8'" -->
      <a-button
        v-show="selectedRowKeys.length == 1 && selectionRows[0].status == '8'"
        @click="handlePrintInfo(selectionRows[0])"
        type="primary"
        style="margin-left: 8px"
      >移交单打印
      </a-button>
      <a-button
        v-show="selectedRowKeys.length == 1 && selectionRows[0].status == '5' && selectionRows[0].isNotStoveCategoryFlag == false && selectionRows[0].precisionParameters != '1'"
        @click="handlePrintTechnology(selectionRows[0])"
        type="primary"
        style="margin-left: 8px"
      >技术状态鉴定打印
      </a-button>
      <a-button
        v-show="selectedRowKeys.length == 1 && selectionRows[0].status == '5' && selectionRows[0].isNotStoveCategoryFlag == true"
        @click="handlePrintStove(selectionRows[0])"
        type="primary"
        style="margin-left: 8px"
      >炉类检测打印
      </a-button>
      <!-- <a-button
        v-if="selectedRowKeys.length > 0"
@@ -700,6 +715,15 @@
      window.open(href, "_blank");
    },
    handlePrintTechnology(record) {
      let href = `${window._CONFIG['domianURL']}/jmreport/view/932475014657814528?id=` + record.id; //网站链接
      window.open(href, "_blank");
    },
    handlePrintStove(record) {
      let href = `${window._CONFIG['domianURL']}/jmreport/view/932491838782910464?id=` + record.id; //网站链接
      window.open(href, "_blank");
    },
    handleOrderExe(record) {
      this.$refs.DailyMaintenanceOrderExeDrawer.visible = true
@@ -839,6 +863,7 @@
    },
    searchReset() {
      this.onClearSelected();
      this.queryParam = { maintenanceType: '3' }
      this.loadData(1);
      this.finishTime = []
src/views/eam/DailyInspectionStandardList.vue
@@ -83,6 +83,11 @@
      </a-upload>
      <a-button
        type="primary"
        @click="handleDownload"
        icon="download"
      >模版下载</a-button>
      <a-button
        type="primary"
        @click="searchQuery"
        icon="search"
      >查询</a-button>
@@ -262,7 +267,7 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getAction, requestPut } from '@/api/manage'
import { getAction, requestPut, downFile } from '@/api/manage'
import DailyInspectionStandardDetail from './modules/dailyInspectionStandard/DailyInspectionStandardDetail'
import DailylnspectionStandardModal from './modules/dailyInspectionStandard/DailylnspectionStandardModal'
import AuditApprovalModal from './modules/dailyInspectionStandard/AuditApprovalModal'
@@ -440,6 +445,8 @@
        versionTakeEffect: "/eam/inspectionStandard/versionTakeEffect",
        importExcelUrl: "/eam/inspectionStandard/importExcel",
        passBatch: '/eam/inspectionStandard/auditApprovalBatch',
        download: '/sys/upload/downloadFile',
        uploadList: '/sys/upload/list',
      },
      version: '1.0',
      dictOptions: {},
@@ -671,6 +678,40 @@
      }
    },
    handleDownload() {
      var params = {}//查询条件
      params.type = "inspection"
      params.pageNo = 1
      params.pageSize = 10
      getAction(this.url.uploadList, params).then((res2) => {
        if (res2.success) {
          if (res2.result.records.length > 0) {
            downFile(this.url.download, { id: res2.result.records[0].id }).then((res) => {
              if (!res) {
                this.$message.warning('文件下载失败')
                return
              } else {
                let fileName = res2.result.records[0].name
                if (typeof window.navigator.msSaveBlob !== 'undefined') {
                  window.navigator.msSaveBlob(new Blob([res]), fileName)
                } else {
                  let url = window.URL.createObjectURL(new Blob([res]))
                  let link = document.createElement('a')
                  link.style.display = 'none'
                  link.href = url
                  link.setAttribute('download', fileName)
                  document.body.appendChild(link)
                  link.click()
                  document.body.removeChild(link) //下载完成移除元素
                  window.URL.revokeObjectURL(url) //释放掉blob对象
                }
              }
            })
          }
        }
      })
    },
  }
}
</script>
src/views/eam/DailyMaintenanceOrderList.vue
@@ -106,12 +106,13 @@
        style="margin-left: 8px"
      >重置</a-button>
      <a-button
        v-show="selectedRowKeys.length == 1 && selectionRows[0].status == '8'"
        v-show="selectedRowKeys.length == 1 && (selectionRows[0].status === '5' || selectionRows[0].status === '8')"
        @click="handlePrintInfo(selectionRows[0])"
        type="primary"
        style="margin-left: 8px"
      >移交单打印
      </a-button>
      <!-- v-show="selectedRowKeys.length == 1 && selectionRows[0].status == '8'" -->
      <!-- <a-button
        v-show="selectedRowKeys.length > 0"
        type="primary"
@@ -641,6 +642,7 @@
    },
    searchReset() {
      this.onClearSelected();
      this.queryParam = { maintenanceType: '2' }
      this.loadData(1);
      this.finishTime = []
src/views/eam/DailyMaintenanceStandard3List.vue
@@ -91,17 +91,6 @@
        icon='plus'
        v-has="'dailyMaintenance3Standard:add'"
      >编制</a-button>
      <a-button
        type='primary'
        @click='searchQuery'
        icon='search'
      >查询</a-button>
      <a-button
        type='primary'
        @click='searchReset'
        icon='reload'
        style='margin-left: 8px'
      >重置</a-button>
      <a-upload
        name="file"
        :showUploadList="false"
@@ -116,6 +105,22 @@
          v-has="'dailyMaintenance3Standard:import'"
        >导入</a-button>
      </a-upload>
      <a-button
        type="primary"
        @click="handleDownload"
        icon="download"
      >模版下载</a-button>
      <a-button
        type='primary'
        @click='searchQuery'
        icon='search'
      >查询</a-button>
      <a-button
        type='primary'
        @click='searchReset'
        icon='reload'
        style='margin-left: 8px'
      >重置</a-button>
    </div>
    <!-- table区域-begin -->
@@ -287,7 +292,7 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getAction, postAction, requestPut } from '@/api/manage'
import { getAction, postAction, requestPut, downFile } from '@/api/manage'
import DailyMaintenanceStandardDetail from './modules/dailyMaintenanceStandard3/DailyMaintenanceStandardDetail'
import MaintenanceStandardPlanningMaterial from '@/views/eam/modules/dailyMaintenanceStandard/MaintenanceStandardPlanningMaterial'
import MaintenanceStandardSafetyRequirement from '@/views/eam/modules/dailyMaintenanceStandard/MaintenanceStandardSafetyRequirement'
@@ -465,6 +470,8 @@
        deleteBatch: '/eam/maintenanceStandard/deleteBatch',
        versionTakeEffect: "/eam/maintenanceStandard/versionTakeEffect",
        importExcelUrl: "/eam/maintenanceStandard/importExcelOfTwoMaintenance",
        download: '/sys/upload/downloadFile',
        uploadList: '/sys/upload/list',
      },
      /* åˆ†é¡µå‚æ•° */
      ipagination: {
@@ -602,6 +609,40 @@
      this.queryParam = { type: 'daily', maintenanceType: '3' }
      this.loadData(1);
    },
    handleDownload() {
      var params = {}//查询条件
      params.type = "threeMaintenance"
      params.pageNo = 1
      params.pageSize = 10
      getAction(this.url.uploadList, params).then((res2) => {
        if (res2.success) {
          if (res2.result.records.length > 0) {
            downFile(this.url.download, { id: res2.result.records[0].id }).then((res) => {
              if (!res) {
                this.$message.warning('文件下载失败')
                return
              } else {
                let fileName = res2.result.records[0].name
                if (typeof window.navigator.msSaveBlob !== 'undefined') {
                  window.navigator.msSaveBlob(new Blob([res]), fileName)
                } else {
                  let url = window.URL.createObjectURL(new Blob([res]))
                  let link = document.createElement('a')
                  link.style.display = 'none'
                  link.href = url
                  link.setAttribute('download', fileName)
                  document.body.appendChild(link)
                  link.click()
                  document.body.removeChild(link) //下载完成移除元素
                  window.URL.revokeObjectURL(url) //释放掉blob对象
                }
              }
            })
          }
        }
      })
    },
  }
}
</script>
src/views/eam/DailyMaintenanceStandardList.vue
@@ -91,17 +91,6 @@
        icon='plus'
        v-has="'dailyMaintenanceStandard:add'"
      >编制</a-button>
      <a-button
        type='primary'
        @click='searchQuery'
        icon='search'
      >查询</a-button>
      <a-button
        type='primary'
        @click='searchReset'
        icon='reload'
        style='margin-left: 8px'
      >重置</a-button>
      <a-upload
        name="file"
        :showUploadList="false"
@@ -116,6 +105,22 @@
          v-has="'dailyMaintenanceStandard:import'"
        >导入</a-button>
      </a-upload>
      <a-button
        type="primary"
        @click="handleDownload"
        icon="download"
      >模版下载</a-button>
      <a-button
        type='primary'
        @click='searchQuery'
        icon='search'
      >查询</a-button>
      <a-button
        type='primary'
        @click='searchReset'
        icon='reload'
        style='margin-left: 8px'
      >重置</a-button>
    </div>
    <!-- table区域-begin -->
@@ -287,7 +292,7 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getAction, postAction, requestPut } from '@/api/manage'
import { getAction, postAction, requestPut, downFile } from '@/api/manage'
import DailyMaintenanceStandardDetail from './modules/dailyMaintenanceStandard/DailyMaintenanceStandardDetail'
import MaintenanceStandardPlanningMaterial from '@/views/eam/modules/dailyMaintenanceStandard/MaintenanceStandardPlanningMaterial'
import MaintenanceStandardSafetyRequirement from '@/views/eam/modules/dailyMaintenanceStandard/MaintenanceStandardSafetyRequirement'
@@ -465,6 +470,8 @@
        deleteBatch: '/eam/maintenanceStandard/deleteBatch',
        versionTakeEffect: "/eam/maintenanceStandard/versionTakeEffect",
        importExcelUrl: "/eam/maintenanceStandard/importExcelOfTwoMaintenance",
        download: '/sys/upload/downloadFile',
        uploadList: '/sys/upload/list',
      },
      /* åˆ†é¡µå‚æ•° */
      ipagination: {
@@ -602,6 +609,40 @@
      this.queryParam = { type: 'daily', maintenanceType: '2' }
      this.loadData(1);
    },
    handleDownload() {
      var params = {}//查询条件
      params.type = "twoMaintenance"
      params.pageNo = 1
      params.pageSize = 10
      getAction(this.url.uploadList, params).then((res2) => {
        if (res2.success) {
          if (res2.result.records.length > 0) {
            downFile(this.url.download, { id: res2.result.records[0].id }).then((res) => {
              if (!res) {
                this.$message.warning('文件下载失败')
                return
              } else {
                let fileName = res2.result.records[0].name
                if (typeof window.navigator.msSaveBlob !== 'undefined') {
                  window.navigator.msSaveBlob(new Blob([res]), fileName)
                } else {
                  let url = window.URL.createObjectURL(new Blob([res]))
                  let link = document.createElement('a')
                  link.style.display = 'none'
                  link.href = url
                  link.setAttribute('download', fileName)
                  document.body.appendChild(link)
                  link.click()
                  document.body.removeChild(link) //下载完成移除元素
                  window.URL.revokeObjectURL(url) //释放掉blob对象
                }
              }
            })
          }
        }
      })
    },
  }
}
</script>
src/views/eam/InspectionReportForms.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,561 @@
<template>
  <a-card
    :bordered="false"
    title="生产设备自主维护点检表"
  >
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div class="table-page-search-wrapper">
      <a-form
        layout="inline"
        @keyup.enter.native="searchQuery"
      >
        <a-row :gutter="24">
          <a-col :span="6">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="统一编码"
            >
              <a-input
                placeholder="请输入设备统一编码查询"
                v-model="queryParam.num"
              ></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="6">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="设备名称"
            >
              <a-input
                placeholder="请输入设备名称查询"
                v-model="queryParam.name"
              ></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="6">
            <a-form-item
              label="型号"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input
                v-model="queryParam.model"
                placeholder="请输入型号"
              ></a-input>
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <div class="table-operator">
      <a-button
        type="primary"
        @click="searchQuery"
        icon="search"
      >查询</a-button>
      <a-button
        @click="searchReset"
        icon="reload"
      >重置</a-button>
    </div>
    <div>
      <a-table
        ref="table"
        size="small"
        bordered
        rowKey="id"
        :scroll="{x:true}"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        @change="handleTableChange"
      >
        <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'checkbox'}" -->
        <!-- :customRow="clickThenSelect" -->
        <span
          slot="yseNoPrecisionParameters"
          slot-scope="text"
        >
          <a-icon
            type="check"
            style="color: chartreuse;"
            v-if="text==='0'"
          />
          <a-icon
            type="close"
            v-else
            style="color:red;"
          />
        </span>
        <span
          slot="yseNoInspectionStandard"
          slot-scope="text"
        >
          <a-icon
            type="check"
            style="color: chartreuse;"
            v-if="text==='0'"
          />
          <a-icon
            type="close"
            v-else
            style="color:red;"
          />
        </span>
        <span
          slot="yseNoMaintenance2Standard"
          slot-scope="text"
        >
          <a-icon
            type="check"
            style="color: chartreuse;"
            v-if="text==='0'"
          />
          <a-icon
            type="close"
            v-else
            style="color:red;"
          />
        </span>
        <span
          slot="yseNoMaintenance3Standard"
          slot-scope="text"
        >
          <a-icon
            type="check"
            style="color: chartreuse;"
            v-if="text==='0'"
          />
          <a-icon
            type="close"
            v-else
            style="color:red;"
          />
        </span>
      </a-table>
      <!-- <a-table
        ref="table"
        size="small"
        bordered
        rowKey="id"
        :scroll="{x:true}"
        :columns="columns"
        :dataSource="dataSource2"
        :pagination="ipagination"
        :loading="loading"
        @change="handleTableChange"
      >
      </a-table> -->
    </div>
  </a-card>
</template>
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { mixinDevice } from '@/utils/mixin'
import { getAction } from '@/api/manage'
import EquipmentPrecisionParametersList from './modules/equipmentNew/EquipmentPrecisionParametersList'
import '@/assets/less/TableExpand.less'
import JSearchSelectTag from '../../components/dict/JSearchSelectTag.vue'
export default {
  name: "EquipmentList",
  mixins: [JeecgListMixin, mixinDevice],
  components: {
    JSearchSelectTag,
  },
  data() {
    return {
      description: '生产设备自主维护点检表',
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          },
          width: 50,
        },
        // {
        //   title: '设备类型',
        //   align: "center",
        //   dataIndex: 'categoryName',
        // },
        {
          title: '统一编码',
          align: "center",
          dataIndex: 'equipmentNum',
        },
        {
          title: '设备名称',
          align: "center",
          dataIndex: 'equipmentName',
        },
        {
          title: '型号',
          align: "center",
          dataIndex: 'equipmentModel',
        },
        {
          title: '点检项目',
          align: "center",
          dataIndex: 'name',
        },
        {
          title: '完成数据/要求',
          align: "center",
          dataIndex: 'detectionStandard',
        },
        {
          title: '1',
          align: "center",
          dataIndex: 'data1',
          width: 50,
        },
        {
          title: '2',
          align: "center",
          dataIndex: 'data2',
          width: 50,
        },
        {
          title: '3',
          align: "center",
          dataIndex: 'data3',
          width: 50,
          // scopedSlots: { customRender: 'yseNoPrecisionParameters' }
        },
        {
          title: '4',
          align: "center",
          dataIndex: 'data4',
          width: 50,
          // scopedSlots: { customRender: 'yseNoInspectionStandard' }
        },
        {
          title: '5',
          align: "center",
          dataIndex: 'data5',
          // scopedSlots: { customRender: 'yseNoMaintenance2Standard' }
          width: 50,
        },
        {
          title: '6',
          align: "center",
          dataIndex: 'data6',
          width: 50,
        },
        {
          title: '7',
          align: "center",
          dataIndex: 'data7',
          width: 50,
        },
        {
          title: '8',
          align: "center",
          dataIndex: 'data8',
          width: 50,
        },
        {
          title: '9',
          align: "center",
          dataIndex: 'data9',
          width: 50,
        },
        {
          title: '10',
          align: "center",
          dataIndex: 'data10',
          width: 50,
        },
        {
          title: '11',
          align: "center",
          dataIndex: 'data11',
          width: 50,
        },
        {
          title: '12',
          align: "center",
          dataIndex: 'data12',
          width: 50,
        },
        {
          title: '13',
          align: "center",
          dataIndex: 'data13',
          width: 50,
        },
        {
          title: '14',
          align: "center",
          dataIndex: 'data14',
          width: 50,
        },
        {
          title: '15',
          align: "center",
          dataIndex: 'data15',
          width: 50,
        },
        {
          title: '16',
          align: "center",
          dataIndex: 'data16',
          width: 50,
        },
        {
          title: '17',
          align: "center",
          dataIndex: 'data17',
          width: 50,
        },
        {
          title: '18',
          align: "center",
          dataIndex: 'data18',
          width: 50,
        },
        {
          title: '19',
          align: "center",
          dataIndex: 'data19',
          width: 50,
        },
        {
          title: '20',
          align: "center",
          dataIndex: 'data20',
          width: 50,
        },
        {
          title: '21',
          align: "center",
          dataIndex: 'data21',
          width: 50,
        },
        {
          title: '22',
          align: "center",
          dataIndex: 'data22',
          width: 50,
        },
        {
          title: '23',
          align: "center",
          dataIndex: 'data23',
          width: 50,
        },
        {
          title: '24',
          align: "center",
          dataIndex: 'data24',
          width: 50,
        },
        {
          title: '25',
          align: "center",
          dataIndex: 'data25',
          width: 50,
        },
        {
          title: '26',
          align: "center",
          dataIndex: '26',
          width: 50,
        },
        {
          title: '27',
          align: "center",
          dataIndex: '27',
          width: 50,
        },
        {
          title: '28',
          align: "center",
          dataIndex: 'data28',
          width: 50,
        },
        {
          title: '29',
          align: "center",
          dataIndex: 'data29',
          width: 50,
        },
        {
          title: '30',
          align: "center",
          dataIndex: 'data30',
          width: 50,
        },
        {
          title: '31',
          align: "center",
          dataIndex: 'data31',
          width: 50,
        },
      ],
      columns2: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          },
          width: 50,
        },
        {
          title: '设备类型',
          align: "center",
          dataIndex: 'categoryName',
        },
        {
          title: '统一编码',
          align: "center",
          dataIndex: 'equipmentNum',
        },
        {
          title: '设备名称',
          align: "center",
          dataIndex: 'equipmentName',
        },
        {
          title: '型号',
          align: "center",
          dataIndex: 'equipmentModel',
        },
        {
          title: '使用部门',
          align: "center",
          dataIndex: 'departName',
        },
        {
          title: 'ABC标识',
          align: "center",
          dataIndex: 'abc',
        },
        {
          title: '关键设备标识',
          align: "center",
          dataIndex: 'specificEquipment',
        },
        {
          title: '技术状态',
          align: "center",
          dataIndex: 'technologyStatus',
        },
      ],
      url: {
        list: "/eam/inspectionOrder/findInspectionProjectList",
      },
      dictOptions: {
      },
      /* åˆ†é¡µå‚æ•° */
      ipagination: {
        current: 1,
        pageSize: 20,
        pageSizeOptions: ['5', '10', '20', '50'],
        showTotal: (total, range) => {
          return range[0] + "-" + range[1] + " å…±" + total + "条"
        },
        showQuickJumper: true,
        showSizeChanger: true,
        total: 0
      },
      // selectedMainId: '',
      // // superFieldList: [],
      // equipmentProcessParametersMainId: '',
      // equipmentDocumentMainId: '',
      // equipmentPrecisionParametersMainId: '',
      // precisionParametersTemplateId: '',
      // isOpenPrecision: true,
      // isOpenProcess: true,
      // treeData: [],
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 },
      },
      mainId: '',
    }
  },
  created() {
    // this.getSuperFieldList();
    // this.initOptions();
  },
  // computed: {
  //   importExcelUrl: function () {
  //     return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  //   }
  // },
  methods: {
    // clickThenSelect(record) {
    //   return {
    //     on: {
    //       click: () => {
    //         this.onSelectChange(record.id.split(","), [record]);
    //       }
    //     }
    //   }
    // },
    onClearSelected() {
      this.selectedRowKeys = [];
      this.selectionRows = [];
      // this.selectedMainId = ''
    },
    // onSelectChange(selectedRowKeys, selectionRows) {
    //   if (selectedRowKeys.length == 1) {
    //     this.selectedMainId = selectedRowKeys[0]
    //     this.precisionParametersTemplateId = selectionRows[0].precisionParametersTemplateId;
    //     // this.isOpenProcess = selectionRows[0].processParameters == 1;
    //     this.isOpenPrecision = selectionRows[0].precisionParameters == 1;
    //   } else {
    //     this.selectedMainId = ''
    //     this.precisionParametersTemplateId = ''
    //   }
    //   this.selectedRowKeys = selectedRowKeys;
    //   this.selectionRows = selectionRows;
    // },
    loadData(arg) {
      if (!this.url.list) {
        this.$message.error("请设置url.list属性!")
        return
      }
      //加载数据 è‹¥ä¼ å…¥å‚æ•°1则加载第一页的内容
      if (arg === 1) {
        this.ipagination.current = 1;
      }
      this.onClearSelected()
      var params = this.getQueryParams();//查询条件
      this.loading = true;
      getAction(this.url.list, params).then((res) => {
        if (res.success) {
          // this.dataSource = res.result.records;
          this.dataSource = res.result;
          this.ipagination.total = res.result.total;
        }
        if (res.code === 510) {
          this.$message.warning(res.message)
        }
        this.loading = false;
      })
    },
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
src/views/eam/UploadList.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,486 @@
<template>
  <a-card
    :bordered="false"
    title="模板管理"
  >
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div class="table-page-search-wrapper">
      <a-form
        layout="inline"
        @keyup.enter.native="searchQuery"
      >
        <a-row :gutter="24">
          <a-col
            :md="6"
            :sm="8"
          >
            <a-form-item label="名称">
              <j-input
                placeholder="请输入名称检索"
                v-model="queryParam.name"
              ></j-input>
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
    <div class="table-operator">
      <a-button
        type="primary"
        @click="searchQuery"
        icon="search"
      >查询</a-button>
      <a-button
        @click="searchReset"
        icon="reload"
      >重置</a-button>
      <a-button
        @click="handleAdd"
        type="primary"
        icon="upload"
      >标准模板上传</a-button>
      <a-dropdown v-if="selectedRowKeys.length > 0">
        <a-menu slot="overlay">
          <a-menu-item
            key="1"
            @click="batchDel"
          >
            <a-icon type="delete" />删除
          </a-menu-item>
        </a-menu>
        <a-button style="margin-left: 8px">
          æ‰¹é‡æ“ä½œ
          <a-icon type="down" />
        </a-button>
      </a-dropdown>
    </div>
    <!-- table区域-begin -->
    <div>
      <div
        class="ant-alert ant-alert-info"
        style="margin-bottom: 16px"
      >
        <i class="anticon anticon-info-circle ant-alert-icon"></i> å·²é€‰æ‹©
        <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
        <a
          style="margin-left: 24px"
          @click="onClearSelected"
        >清空</a>
      </div>
      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{
          selectedRowKeys: selectedRowKeys,
          onChange: onSelectChange,
          getCheckboxProps: getCheckboxProps,
        }"
        @change="handleTableChange"
      >
        <!--字符串超长截取省略号显示-->
        <span
          slot="description"
          slot-scope="text"
        >
          <j-ellipsis
            :value="text"
            :length="20"
          />
        </span>
        <span
          slot="size"
          slot-scope="text"
          class="error"
        >
          {{ sizeConvert(text) }}
        </span>
        <span
          slot="format"
          slot-scope="text"
          class="success"
        >
          <a-icon
            v-if="text == 'pdf'"
            type="file-pdf"
          />
          <a-icon
            v-else-if="text == 'xls' || text == 'xlsx'"
            type="file-excel"
          />
          <a-icon
            v-else-if="text == 'doc' || text == 'docx'"
            type="file-word"
          />
          <a-icon
            v-else-if="
              text == 'jpg' ||
              text == 'bmp' ||
              text == 'gif' ||
              text == 'png' ||
              text == 'jpeg' ||
              text == 'tiff' ||
              text == 'psd' ||
              text == 'raw' ||
              text == 'tif' ||
              text == 'pcx' ||
              text == 'tga' ||
              text == 'exif' ||
              text == 'fpx' ||
              text == 'svg' ||
              text == 'cdr' ||
              text == 'pcd' ||
              text == 'dxf' ||
              text == 'ufo' ||
              text == 'eps'
            "
            type="file-image"
          />
          <a-icon
            v-else-if="text == 'ppt'"
            type="file-ppt"
          />
          <a-icon
            v-else-if="text == 'text'"
            type="file-text"
          />
          <a-icon
            v-else-if="text == 'zip' || text == 'rar'"
            type="file-zip"
          />
          <a-icon
            v-else
            type="file-unknown"
          />
          {{ text }}
        </span>
        <span
          slot="action"
          slot-scope="text, record"
        >
          <Tooltip
            placement="top"
            title="预览图片"
          >
            <img
              v-if="
                record.path && (record.format.toLowerCase()=='jpg'||record.format.toLowerCase()=='bmp'||record.format.toLowerCase()=='png'||record.format.toLowerCase()=='jpeg'||record.format.toLowerCase()=='gif')
              "
              width="30"
              height="14"
              border="1"
              draggable="false"
              :preview="record.id"
              :preview-text="record.name"
              :src="record.src"
            />
          </Tooltip>
          <!-- :src="'http://127.0.0.1:8090/mes/sys/common/static//2022-03/30/051ce6948b96dc2eed0d66a838eb443e468b1990919a8fafd9f145869f587c38'" -->
          <a
            v-if="record.path && record.format.toLowerCase() == 'pdf'"
            href="javascript:;"
            @click="view(record)"
          >
            é¢„览
          </a>
          <a-divider
            v-if="
              record.path &&
              (record.format.toLowerCase() == 'jpg' ||
                record.format.toLowerCase() == 'bmp' ||
                record.format.toLowerCase() == 'png' ||
                record.format.toLowerCase() == 'jpeg' ||
                record.format.toLowerCase() == 'gif' ||
                record.format.toLowerCase() == 'pdf')
            "
            type="vertical"
          />
          <a
            href="javascript:;"
            @click="handleDownload(record)"
          >下载</a>
          <a-divider type="vertical" />
          <a-popconfirm
            title="确定删除吗?"
            @confirm="() => handleDelete(record.id)"
          >
            <a :disabled="record.uploadRelaCount != 0">删除</a>
          </a-popconfirm>
        </span>
      </a-table>
    </div>
    <!-- table区域-end -->
    <pdf-view ref="pdfview"></pdf-view>
    <!-- è¡¨å•区域 -->
    <upload-model
      ref="modalForm"
      @ok="modalFormOk"
    ></upload-model>
  </a-card>
</template>
<script>
import UploadModel from './modules/uploadModel/UploadModel'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import JDictSelectTag from '@/components/dict/JDictSelectTag'
import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
import { initDictOptions, filterDictText } from '@/components/dict/JDictSelectUtil'
import { getAction, requestPut, downFile, getFileAccessHttpUrl } from '@/api/manage'
import JInput from '@/components/jeecg/JInput'
import JEllipsis from '@/components/jeecg/JEllipsis'
import Tooltip from 'ant-design-vue/es/tooltip'
import { preview } from 'vue-photo-preview'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import Vue from 'vue'
import PdfView from '../common/PdfView' //PDF预览
export default {
  name: 'UploadList',
  mixins: [JeecgListMixin],
  components: {
    UploadModel,
    JDictSelectTag,
    JInput,
    JEllipsis,
    JSearchSelectTag,
    Tooltip,
    PdfView,
    preview,
  },
  data() {
    return {
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 50,
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          },
        },
        {
          title: '名称',
          align: 'center',
          dataIndex: 'name',
          sorter: true,
        },
        {
          title: '格式',
          align: 'center',
          dataIndex: 'format',
          scopedSlots: { customRender: 'format' },
          sorter: true,
        },
        {
          title: '大小',
          align: 'center',
          dataIndex: 'size',
          scopedSlots: { customRender: 'size' },
          sorter: true,
        },
        {
          title: '描述',
          align: 'center',
          dataIndex: 'description',
          scopedSlots: { customRender: 'description' },
          sorter: true,
        },
        {
          title: '上传人',
          align: 'center',
          dataIndex: 'createBy',
          sorter: true,
        },
        {
          title: '上传时间',
          align: 'center',
          dataIndex: 'createTime',
          sorter: true,
        },
        {
          width: 150,
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          scopedSlots: { customRender: 'action' },
        },
      ],
      url: {
        list: '/sys/upload/listByType',
        uploadRelaListByUploadId: '/sys/uploadRela/listByUploadId',
        delete: '/sys/upload/delete',
        deleteBatch: '/sys/upload/deleteBatch',
        urlDownload: '/sys/common/static',
        download: '/sys/upload/downloadFile',
        // download: '/sys/upload/downloadFileByType',
        realityUrl: 'sys/upload/realityUrl',
      },
      path: '',
    }
  },
  methods: {
    getCheckboxProps(record) {
      return {
        props: {
          disabled: record.uploadRelaCount != 0,
        },
      }
    },
    view(record) {
      // let realPath;
      // //获取当前文件真实路径
      // getAction(this.url.realityUrl, { id: record.id }).then((res) => {
      //   if (res.success) {
      //     let path = res.message;
      //     console.log("获取后台路径path---------------->" + path);
      //     realPath = this.url.urlDownload + '/' + path;
      //   }
      // }).then(() => {
      //   this.$refs.pdfview.showPdf(realPath);
      // })
      // this.$refs.pdfview.showPdf('http://127.0.0.1:8090/mes/sys/common/static//2022-03/30/8bc6d02e2421bf94ff73afedc422cf42b9f8c868c8dbb0689f598e87902ed2fd')
      this.$refs.pdfview.showPdf(record.src);
    },
    loadData(arg) {
      if (arg === 1) {
        this.ipagination.current = 1
      }
      var params = this.getQueryParams() //查询条件
      this.loading = true
      getAction(this.url.list, params).then((res) => {
        if (res.success) {
          for (let i = 0; i < res.result.records.length; i++) {
            let r = res.result.records[i]
            r.src = this.getSrc(res.result.records[i])
          }
          this.dataSource = res.result.records
          console.log('dataSource', this.dataSource);
          this.ipagination.total = res.result.total
        }
        this.loading = false
      })
    },
    //拼装src
    getSrc(record) {
      if (!record.path) {
        return ''
      }
      //本地:local\Minio:minio\阿里云:alioss
      if (record.uploadType == 'local') {
        //根据发布状态修改https æˆ– http
        // return getFileAccessHttpUrl(record.path + record.encodeName, this.url.urlDownload, window._CONFIG['hyperTextTransfer'])
        return window._CONFIG['domianURL'] + this.url.urlDownload + "/" + record.path + record.encodeName;
        // return window._CONFIG['domianURL'] + this.url.urlDownload + "/" + record.path + record.encodeName;
      } else if (record.uploadType == 'alioss') {
        const OSS = require('ali-oss')
        const client = new OSS({
          // region以杭州为例(oss-cn-hangzhou),其他region按实际情况填写。
          region: window._CONFIG['region'],
          // é˜¿é‡Œäº‘主账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM账号进行API访问或日常运维,请登录RAM控制台创建RAM账号。
          accessKeyId: window._CONFIG['accessKeyId'],
          accessKeySecret: window._CONFIG['accessKeySecret'],
          bucket: window._CONFIG['bucket'],
        })
        // object-key表示从OSS下载文件时需要指定包含文件后缀在内的完整路径,例如abc/efg/123.jpg。
        return client.signatureUrl(record.path)
      }
    },
    handleDownload(record) {
      downFile(this.url.download, { id: record.id }).then((res) => {
        if (!res) {
          this.$message.warning('文件下载失败')
          return
        } else {
          let fileName = record.name
          if (typeof window.navigator.msSaveBlob !== 'undefined') {
            window.navigator.msSaveBlob(new Blob([res]), fileName)
          } else {
            let url = window.URL.createObjectURL(new Blob([res]))
            let link = document.createElement('a')
            link.style.display = 'none'
            link.href = url
            link.setAttribute('download', fileName)
            document.body.appendChild(link)
            link.click()
            document.body.removeChild(link) //下载完成移除元素
            window.URL.revokeObjectURL(url) //释放掉blob对象
          }
        }
      })
    },
    sizeConvert(limit) {
      var size = ''
      if (limit < 0.1 * 1024) {
        size = parseFloat(limit).toFixed(2) + 'B' //小于0.1KB,则转化成B
      } else if (limit < 0.1 * 1024 * 1024) {
        size = (parseFloat(limit) / 1024).toFixed(2) + 'KB' //小于0.1MB,则转化成KB
      } else if (limit < 0.1 * 1024 * 1024 * 1024) {
        size = (parseFloat(limit) / (1024 * 1024)).toFixed(2) + 'MB' //小于0.1GB,则转化成MB
      } else {
        size = (parseFloat(limit) / (1024 * 1024 * 1024)).toFixed(2) + 'GB' //其他转化成GB
      }
      var sizeStr = size + '' //转成字符串
      var index = sizeStr.indexOf('.') //获取小数点处的索引
      var dou = sizeStr.substr(index + 1, 2) //获取小数点后两位的值
      if (dou == '00') {
        //判断后两位是否为00,如果是则删除00
        return sizeStr.substring(0, index) + sizeStr.substr(index + 3, 2)
      }
      return size
    },
    handleAdd: function () {
      this.$refs.modalForm.add()
      this.$refs.modalForm.title = '文件上传'
      this.$refs.modalForm.disableSubmit = false
    },
  },
  computed: {
    importExcelUrl: function () {
      console.log('请求地址为::', `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`)
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
    },
  },
  mounted() {
    this.$previewRefresh()
    this.$preview.on('close', () => {
      this.isShow = false
    })
  },
}
</script>
<style>
@import '~@assets/less/common.less';
.frozenRowClass {
  color: #c9c9c9;
}
.success {
  color: green;
}
.error {
  color: red;
}
.fontweight {
  font-weight: bold;
}
</style>
src/views/eam/modules/daily3MaintenanceOrder/EquipmentPrecisionCheckOrderModal.vue
@@ -70,7 +70,7 @@
              :wrapperCol="wrapperCol"
              label="保养单位"
            >
              <span v-if="this.model != null">{{ this.model.actualEndTime }}</span>
              <span v-if="this.model != null">{{ this.model.manageName }}</span>
              <span v-else>-</span>
            </a-form-item>
          </a-col>
src/views/eam/modules/daily3MaintenanceOrder/Maintenance3ReceiptModal.vue
@@ -129,17 +129,7 @@
            </div>
          </template>
        </a-table>
        <div :style="{height: '140px',width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}">
          <!-- <a-row :gutter="24">
            <a-col :span="12">
              <a-form-item
                :labelCol="labelCol"
                :wrapperCol="wrapperCol"
                label="验收结果"
              >
              </a-form-item>
            </a-col>
          </a-row> -->
        <!-- <div :style="{height: '140px',width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}">
          <a-row :gutter="24">
            <a-col :span="24">
              <a-form-item
@@ -158,7 +148,7 @@
              </a-form-item>
            </a-col>
          </a-row>
        </div>
        </div> -->
      </a-form>
    </a-spin>
@@ -390,7 +380,6 @@
    },
    handleChange(value, key, column, index) {
      debugger
      let that = this;
      const temp = [...that.dataSource];
      const target = temp.filter(item => key === item.key)[index];
@@ -405,7 +394,6 @@
          target['standard'] = value.target.value;
        }
        if (column.dataIndex == 'firstInspect') {
          debugger
          target["firstInspect"] = value;
        }
        if (column.dataIndex == 'secondInspect') {
src/views/eam/modules/uploadModel/UploadModel.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,299 @@
<template>
  <a-modal
    :title="title"
    :width="850"
    :visible="visible"
    :maskClosable="false"
    :confirmLoading="confirmLoading"
    :okButtonProps="{ props: {disabled: disableSubmit} }"
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭"
  >
    <a-spin :spinning="confirmLoading">
      <a-form :form="form">
        <!-- <a-row :gutter="24">
          <a-col :lg="12">
            <a-form-item
              label="文件类型"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <j-dict-select-tag
                placeholder="请选择单位类型"
                :triggerChange="true"
                dictCode="common_upload_type"
                v-decorator="['type', validatorRules.type]"
              />
            </a-form-item>
          </a-col>
          <a-col :span="12">
          </a-col>
        </a-row> -->
        <a-row :gutter="24">
          <a-col :span="24">
            <a-form-item
              :labelCol="{span:3}"
              :wrapperCol="{span:21}"
              label="文件类型"
            >
              <a-radio-group
                v-for="(item,index) in fileTypes"
                :key="index"
                button-style="solid"
                v-decorator="['type', validatorRules.type ]"
                :disabled="disableSubmit"
              >
                <a-radio-button :value="item.value">
                  {{item.text}}
                </a-radio-button>
              </a-radio-group>
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :lg="24">
            <a-form-item
              label="文件上传"
              :labelCol="{span:3}"
              :wrapperCol="{span:21}"
            >
              <!-- <a-upload
                name="file"
                @change="handleChange"
                :file-list="fileList"
                :remove="handleRemove"
                :before-upload="beforeUpload"
                :multiple="false"
              >
                <a-button>
                  <a-icon type="upload" /> é€‰æ‹©æ–‡ä»¶ </a-button>
              </a-upload> -->
              <a-upload-dragger
                name="file"
                @change="handleChange"
                :file-list="fileList"
                :remove="handleRemove"
                :before-upload="beforeUpload"
                :multiple="false"
              >
                <p class="ant-upload-drag-icon">
                  <a-icon type="inbox" />
                </p>
                <p class="ant-upload-text">
                  ç‚¹å‡»ä¸Šä¼ æˆ–拖拽文件至该区域进行上传
                </p>
                <p class="ant-upload-hint">
                  æ”¯æŒå•次或批量上传
                </p>
              </a-upload-dragger>
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="24">
            <a-form-item
              :labelCol="{span:3}"
              :wrapperCol="{span:21}"
              label="描述"
            >
              <a-textarea
                placeholder="请输入描述"
                allow-clear
                v-decorator="['description', validatorRules.description]"
              />
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </a-spin>
    <template slot="footer">
      <a-button
        :style="{marginRight: '8px'}"
        @click="handleCancel"
      >
        å…³é—­
      </a-button>
      <a-button
        :disabled="confirmLoading"
        :loading="confirmLoading"
        @click="handleOk"
        type="primary"
      >确定</a-button>
      <!-- icon="save" -->
    </template>
  </a-modal>
</template>
<script>
import pick from 'lodash.pick'
import { postAction } from '@/api/manage'
import { duplicateCheck } from '@/api/api'
import { ajaxGetDictItems } from '@/api/api'
let validatorCodeTimer = null
export default {
  name: 'UploadModel',
  data() {
    return {
      title: '',
      visible: false,
      model: {},
      labelCol: {
        xs: { span: 24 },
        sm: { span: 6 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 18 },
      },
      confirmLoading: false,
      form: this.$form.createForm(this),
      validatorRules: {
        type: {
          rules: [{ required: true, message: '请选择文件类型' }],
        },
        description: {
          rules: [
            { min: 0, max: 100, message: '最长 100 ä¸ªå­—符', trigger: 'blur' },
          ]
        },
      },
      url: {
        add: '/sys/upload/uploadFile',
        // add: '/sys/upload/batchUploadFile',
      },
      disableSubmit: false,
      fileList: [],
      fileTypes: [],
    }
  },
  methods: {
    handleRemove(file) {
      const index = this.fileList.indexOf(file)
      const newFileList = this.fileList.slice()
      newFileList.splice(index, 1)
      this.fileList = newFileList
    },
    beforeUpload(file) {
      this.fileList = [...this.fileList, file];
      return false;
    },
    add() {
      this.visible = true;
      this.form.resetFields();
      this.model = {};
      this.fileList = [];
    },
    close() {
      this.$emit('close')
      this.visible = false
    },
    handleCancel() {
      this.close();
    },
    handleOk() {
      const that = this;
      // è§¦å‘表单验证
      this.form.validateFields((err, values) => {
        if (!err) {
          that.confirmLoading = true;
          // let formData = Object.assign(this.model, values);
          var description = '';
          if (values.description) {
            description = values.description;
          }
          that.handleUpload(values.type, description);
        }
      })
    },
    handleUpload(type, description) {
      const { fileList } = this;
      const formData = new FormData();
      if (fileList.length == 0) {
        this.$message.error('请上传文件!');
      } else {
        fileList.forEach((file) => {
          formData.append('files[]', file);
        })
        formData.append('type', type);
        formData.append('description', description);
        postAction(this.url.add, formData)
          .then((res) => {
            if (res.success) {
              this.$message.success(res.message);
              this.$emit('ok')
            } else {
              this.$message.warning(res.message);
            }
          })
          .finally(() => {
            this.confirmLoading = false;
            this.close();
          })
      }
    },
    handleChange(info) {
      if (info.file.status !== 'uploading') {
        console.log(info.file, info.fileList);
      }
      if (info.file.status === 'done') {
        this.$message.success(`${info.file.name} file uploaded successfully`);
      } else if (info.file.status === 'error') {
        this.$message.error(`${info.file.name} file upload failed.`);
      }
    },
    initFileTypes() {
      ajaxGetDictItems("standard_type", null).then((res) => {
        if (res.success) {
          this.fileTypes = res.result;
        }
      })
    },
  },
  created() {
    this.initFileTypes();
  },
}
</script>
<style scoped>
.ant-btn {
  padding: 0 10px;
  margin-left: 3px;
}
.ant-form-item-control {
  line-height: 0px;
}
/** ä¸»è¡¨å•行间距 */
.ant-form .ant-form-item {
  margin-bottom: 10px;
}
/** Tab页面行间距 */
.ant-tabs-content .ant-form-item {
  margin-bottom: 0px;
}
</style>