| | |
| | | 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" |
| | |
| | | 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 |
| | |
| | | }, |
| | | |
| | | searchReset() { |
| | | this.onClearSelected(); |
| | | this.queryParam = { maintenanceType: '3' } |
| | | this.loadData(1); |
| | | this.finishTime = [] |
| | |
| | | </a-upload> |
| | | <a-button |
| | | type="primary" |
| | | @click="handleDownload" |
| | | icon="download" |
| | | >模çä¸è½½</a-button> |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | >æ¥è¯¢</a-button> |
| | |
| | | |
| | | 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' |
| | |
| | | versionTakeEffect: "/eam/inspectionStandard/versionTakeEffect", |
| | | importExcelUrl: "/eam/inspectionStandard/importExcel", |
| | | passBatch: '/eam/inspectionStandard/auditApprovalBatch', |
| | | download: '/sys/upload/downloadFile', |
| | | uploadList: '/sys/upload/list', |
| | | }, |
| | | version: '1.0', |
| | | dictOptions: {}, |
| | |
| | | } |
| | | }, |
| | | |
| | | 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> |
| | |
| | | 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" |
| | |
| | | }, |
| | | |
| | | searchReset() { |
| | | this.onClearSelected(); |
| | | this.queryParam = { maintenanceType: '2' } |
| | | this.loadData(1); |
| | | this.finishTime = [] |
| | |
| | | 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" |
| | |
| | | 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 --> |
| | |
| | | |
| | | 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' |
| | |
| | | deleteBatch: '/eam/maintenanceStandard/deleteBatch', |
| | | versionTakeEffect: "/eam/maintenanceStandard/versionTakeEffect", |
| | | importExcelUrl: "/eam/maintenanceStandard/importExcelOfTwoMaintenance", |
| | | download: '/sys/upload/downloadFile', |
| | | uploadList: '/sys/upload/list', |
| | | }, |
| | | /* å页忰 */ |
| | | ipagination: { |
| | |
| | | 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> |
| | |
| | | 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" |
| | |
| | | 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 --> |
| | |
| | | |
| | | 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' |
| | |
| | | deleteBatch: '/eam/maintenanceStandard/deleteBatch', |
| | | versionTakeEffect: "/eam/maintenanceStandard/versionTakeEffect", |
| | | importExcelUrl: "/eam/maintenanceStandard/importExcelOfTwoMaintenance", |
| | | download: '/sys/upload/downloadFile', |
| | | uploadList: '/sys/upload/list', |
| | | }, |
| | | /* å页忰 */ |
| | | ipagination: { |
| | |
| | | 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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
| | |
| | | :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> |
| | |
| | | </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 |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | </div> --> |
| | | </a-form> |
| | | </a-spin> |
| | | |
| | |
| | | }, |
| | | |
| | | handleChange(value, key, column, index) { |
| | | debugger |
| | | let that = this; |
| | | const temp = [...that.dataSource]; |
| | | const target = temp.filter(item => key === item.key)[index]; |
| | |
| | | target['standard'] = value.target.value; |
| | | } |
| | | if (column.dataIndex == 'firstInspect') { |
| | | debugger |
| | | target["firstInspect"] = value; |
| | | } |
| | | if (column.dataIndex == 'secondInspect') { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |