From e7eca504e167de53fd97e5c2cc1fc039a8e758cc Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期四, 28 三月 2024 09:29:37 +0800 Subject: [PATCH] 提交 --- src/views/eam/modules/daily3MaintenanceOrder/Maintenance3ReceiptModal.vue | 16 src/views/eam/modules/daily3MaintenanceOrder/EquipmentPrecisionCheckOrderModal.vue | 2 src/views/eam/DailyInspectionStandardList.vue | 43 + src/views/eam/Daily3MaintenanceOrderList.vue | 29 + src/views/eam/DailyMaintenanceOrderList.vue | 4 src/views/eam/DailyMaintenanceStandard3List.vue | 65 + src/views/eam/InspectionReportForms.vue | 561 ++++++++++++++++++++ src/views/eam/UploadList.vue | 486 ++++++++++++++++++ src/views/eam/DailyMaintenanceStandardList.vue | 65 + src/views/eam/modules/uploadModel/UploadModel.vue | 299 +++++++++++ 10 files changed, 1,527 insertions(+), 43 deletions(-) diff --git a/src/views/eam/Daily3MaintenanceOrderList.vue b/src/views/eam/Daily3MaintenanceOrderList.vue index 2d5a16a..a93be15 100644 --- a/src/views/eam/Daily3MaintenanceOrderList.vue +++ b/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 = [] diff --git a/src/views/eam/DailyInspectionStandardList.vue b/src/views/eam/DailyInspectionStandardList.vue index 70a8850..8ce3764 100644 --- a/src/views/eam/DailyInspectionStandardList.vue +++ b/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) //閲婃斁鎺塨lob瀵硅薄 + } + } + }) + } + } + }) + }, + } } </script> diff --git a/src/views/eam/DailyMaintenanceOrderList.vue b/src/views/eam/DailyMaintenanceOrderList.vue index e4e31a8..cc5e5e8 100644 --- a/src/views/eam/DailyMaintenanceOrderList.vue +++ b/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 = [] diff --git a/src/views/eam/DailyMaintenanceStandard3List.vue b/src/views/eam/DailyMaintenanceStandard3List.vue index 62a3c7b..7e4462e 100644 --- a/src/views/eam/DailyMaintenanceStandard3List.vue +++ b/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) //閲婃斁鎺塨lob瀵硅薄 + } + } + }) + } + } + }) + }, } } </script> diff --git a/src/views/eam/DailyMaintenanceStandardList.vue b/src/views/eam/DailyMaintenanceStandardList.vue index 9f10714..55486c8 100644 --- a/src/views/eam/DailyMaintenanceStandardList.vue +++ b/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) //閲婃斁鎺塨lob瀵硅薄 + } + } + }) + } + } + }) + }, } } </script> diff --git a/src/views/eam/InspectionReportForms.vue b/src/views/eam/InspectionReportForms.vue new file mode 100644 index 0000000..fca2173 --- /dev/null +++ b/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("璇疯缃畊rl.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> \ No newline at end of file diff --git a/src/views/eam/UploadList.vue b/src/views/eam/UploadList.vue new file mode 100644 index 0000000..3d1da92 --- /dev/null +++ b/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 '' + } + //鏈湴锛歭ocal\Minio锛歮inio\闃块噷浜戯細alioss + if (record.uploadType == 'local') { + //鏍规嵁鍙戝竷鐘舵�佷慨鏀筯ttps 鎴� 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鎷ユ湁鎵�鏈堿PI鐨勮闂潈闄愶紝椋庨櫓寰堥珮銆傚己鐑堝缓璁偍鍒涘缓骞朵娇鐢≧AM璐﹀彿杩涜API璁块棶鎴栨棩甯歌繍缁达紝璇风櫥褰昍AM鎺у埗鍙板垱寤篟AM璐﹀彿銆� + accessKeyId: window._CONFIG['accessKeyId'], + accessKeySecret: window._CONFIG['accessKeySecret'], + bucket: window._CONFIG['bucket'], + }) + // object-key琛ㄧず浠嶰SS涓嬭浇鏂囦欢鏃堕渶瑕佹寚瀹氬寘鍚枃浠跺悗缂�鍦ㄥ唴鐨勫畬鏁磋矾寰勶紝渚嬪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) //閲婃斁鎺塨lob瀵硅薄 + } + } + }) + }, + sizeConvert(limit) { + var size = '' + if (limit < 0.1 * 1024) { + size = parseFloat(limit).toFixed(2) + 'B' //灏忎簬0.1KB锛屽垯杞寲鎴怋 + } else if (limit < 0.1 * 1024 * 1024) { + size = (parseFloat(limit) / 1024).toFixed(2) + 'KB' //灏忎簬0.1MB锛屽垯杞寲鎴怟B + } else if (limit < 0.1 * 1024 * 1024 * 1024) { + size = (parseFloat(limit) / (1024 * 1024)).toFixed(2) + 'MB' //灏忎簬0.1GB锛屽垯杞寲鎴怣B + } else { + size = (parseFloat(limit) / (1024 * 1024 * 1024)).toFixed(2) + 'GB' //鍏朵粬杞寲鎴怗B + } + 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> \ No newline at end of file diff --git a/src/views/eam/modules/daily3MaintenanceOrder/EquipmentPrecisionCheckOrderModal.vue b/src/views/eam/modules/daily3MaintenanceOrder/EquipmentPrecisionCheckOrderModal.vue index fe0f077..967fa43 100644 --- a/src/views/eam/modules/daily3MaintenanceOrder/EquipmentPrecisionCheckOrderModal.vue +++ b/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> diff --git a/src/views/eam/modules/daily3MaintenanceOrder/Maintenance3ReceiptModal.vue b/src/views/eam/modules/daily3MaintenanceOrder/Maintenance3ReceiptModal.vue index 64de24a..58774f0 100644 --- a/src/views/eam/modules/daily3MaintenanceOrder/Maintenance3ReceiptModal.vue +++ b/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') { diff --git a/src/views/eam/modules/uploadModel/UploadModel.vue b/src/views/eam/modules/uploadModel/UploadModel.vue new file mode 100644 index 0000000..d77f6c6 --- /dev/null +++ b/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> \ No newline at end of file -- Gitblit v1.9.3