From 282c594eebda801fbb6331cb199c1958ffd68ae1 Mon Sep 17 00:00:00 2001 From: “linengliang” <vanSuperEnergy@163.com> Date: 星期一, 04 九月 2023 17:04:00 +0800 Subject: [PATCH] 设备台账修改 --- src/views/eam/modules/equipmentNew/EquipmentDocumentList.vue | 5 src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentChangeRecord.vue | 159 +++ src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentMaintenanceRecord.vue | 173 +++ src/views/eam/modules/equipmentNew/serach/ProcessParametersDetailList.vue | 189 ++++ src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentInspectionRecord.vue | 167 +++ src/views/eam/modules/equipmentNew/EquipmentPrecisionParametersList.vue | 52 + src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentCalibrationRecord.vue | 156 +++ src/views/eam/modules/equipmentNew/serach/PrecisionParametersTemplateList.vue | 338 +++++++ src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentSpareRecord.vue | 182 ++++ src/views/eam/modules/equipmentNew/EquipmentProcessParametersList.vue | 44 src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentResumeDrawer.vue | 378 ++++++++ src/views/eam/modules/equipmentNew/serach/ProcessParametersTemplateList.vue | 338 +++++++ src/views/eam/modules/equipmentNew/EquipmentModal.vue | 29 src/views/eam/modules/equipmentNew/serach/PrecisionParametersDetailList.vue | 180 ++++ src/views/eam/EquipmentList.vue | 41 src/views/eam/modules/equipmentCategory/EquipmentCategoryModel.vue | 28 src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentRepairRecord.vue | 183 ++++ 17 files changed, 2,587 insertions(+), 55 deletions(-) diff --git a/src/views/eam/newEquipment/EquipmentList.vue b/src/views/eam/EquipmentList.vue similarity index 94% rename from src/views/eam/newEquipment/EquipmentList.vue rename to src/views/eam/EquipmentList.vue index 7da1592..2b74ece 100644 --- a/src/views/eam/newEquipment/EquipmentList.vue +++ b/src/views/eam/EquipmentList.vue @@ -6,11 +6,8 @@ <a-row :gutter="24"> <a-col :span="6"> <a-form-item label="璁惧鎵�灞炲垎绫�"> - <j-dict-select-tag - allow-clear - placeholder="璇烽�夋嫨璁惧鎵�灞炲垎绫�" - :triggerChange="true" - dictCode="mom_eam_equipment_category,name,id" + <j-search-select-tag + dict="mom_eam_equipment_category,name,id" v-model="queryParam.equipmentCategoryId" /> </a-form-item> @@ -18,21 +15,21 @@ <a-col :span="6" > - <a-form-item label="璁惧缂栧彿"> - <a-input - placeholder="璇疯緭鍏ヨ澶囩紪鍙锋煡璇�" + <a-form-item label="缁熶竴缂栫爜"> + <j-input + placeholder="璇疯緭鍏ヨ澶囩粺涓�缂栫爜鏌ヨ" v-model="queryParam.num" - ></a-input> + ></j-input> </a-form-item> </a-col> <a-col :span="6" > <a-form-item label="璁惧鍚嶇О"> - <a-input + <j-input placeholder="璇疯緭鍏ヨ澶囧悕绉版煡璇�" v-model="queryParam.name" - ></a-input> + ></j-input> </a-form-item> </a-col> </a-row> @@ -249,13 +246,14 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { mixinDevice } from '@/utils/mixin' - import EquipmentModal from '../modules/equipmentNew/EquipmentModal' + import EquipmentModal from './modules/equipmentNew/EquipmentModal' import { getAction } from '@/api/manage' - import EquipmentProcessParametersList from './EquipmentProcessParametersList' - import EquipmentDocumentList from './EquipmentDocumentList' - import EquipmentPrecisionParametersList from './EquipmentPrecisionParametersList' + import EquipmentProcessParametersList from './modules/equipmentNew/EquipmentProcessParametersList' + import EquipmentDocumentList from './modules/equipmentNew/EquipmentDocumentList' + import EquipmentPrecisionParametersList from './modules/equipmentNew/EquipmentPrecisionParametersList' import '@/assets/less/TableExpand.less' - import EquipmentResumeDrawer from '../modules/equipment/EquipmentResume/EquipmentResumeDrawer' + import EquipmentResumeDrawer from './modules/equipmentNew/EquipmentResume/EquipmentResumeDrawer' +import JSearchSelectTag from '../../components/dict/JSearchSelectTag.vue' export default { @@ -266,7 +264,8 @@ EquipmentDocumentList, EquipmentPrecisionParametersList, EquipmentModal, - EquipmentResumeDrawer + EquipmentResumeDrawer, + JSearchSelectTag }, data () { return { @@ -331,7 +330,7 @@ { title: 'ABC鏍囪瘑', align: "center", - dataIndex: 'equipmentImportanceId_dictText', + dataIndex: 'equipmentImportanceId', }, { title: '鍏抽敭璁惧鏍囪瘑', @@ -453,7 +452,7 @@ { title: '宸ヨ壓鍙傛暟妯℃澘', align: "center", - dataIndex: 'processParametersTemplateName', + dataIndex: 'processParametersTemplateId_dictText', }, { title: '璁惧绮惧害绠$悊', @@ -464,7 +463,7 @@ { title: '绮惧害鍙傛暟妯℃澘', align: "center", - dataIndex: 'precisionParametersTemplateName', + dataIndex: 'precisionParametersTemplateId_dictText', }, // { // title: '澶囨敞', @@ -483,7 +482,7 @@ }, ], url: { - list: "/eam/equipment/list", + list: "/eam/equipment/getEquipmentList", delete: "/eam/equipment/delete", deleteBatch: "/eam/equipment/deleteBatch", active: "/eam/equipment/active", diff --git a/src/views/eam/modules/equipmentCategory/EquipmentCategoryModel.vue b/src/views/eam/modules/equipmentCategory/EquipmentCategoryModel.vue index 1ad133f..dc508bd 100644 --- a/src/views/eam/modules/equipmentCategory/EquipmentCategoryModel.vue +++ b/src/views/eam/modules/equipmentCategory/EquipmentCategoryModel.vue @@ -46,7 +46,7 @@ </a-row>--> <a-row :gutter="24"> - <a-col :span="24"> + <a-col :span="12"> <a-form-item label="璁惧鍒嗙被缂栧彿" :labelCol="labelCol" @@ -60,9 +60,7 @@ /> </a-form-item> </a-col> - </a-row> - <a-row :gutter="24" v-if="parentId!='-1'"> - <a-col :span="24"> + <a-col :span="12" v-if="parentId!='-1'"> <a-form-item label="璁惧鍒嗙被鍚嶇О" :labelCol="labelCol" @@ -76,9 +74,7 @@ /> </a-form-item> </a-col> - </a-row> - <a-row :gutter="24" v-if="parentId=='-1'"> - <a-col :span="24"> + <a-col :span="12" v-if="parentId=='-1'"> <a-form-item label="璁惧鍒嗙被鍚嶇О" :labelCol="labelCol" @@ -94,10 +90,7 @@ /> </a-form-item> </a-col> - </a-row> - - <a-row :gutter="24"> - <a-col :span="24"> + <a-col :span="12"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" @@ -113,9 +106,7 @@ /> </a-form-item> </a-col> - </a-row> - <a-row :gutter="24"> - <a-col :span="24"> + <a-col :span="12"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" @@ -131,9 +122,7 @@ /> </a-form-item> </a-col> - </a-row> - <a-row :gutter="24"> - <a-col :span="24"> + <a-col :span="12"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" @@ -148,7 +137,6 @@ </a-form-item> </a-col> </a-row> - </a-form> <a-divider v-if="title!='鏂板'" orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 閫夋嫨瀛愯澶囧垎绫讳娇鍏惰窡闅忕埗璁惧鍒嗙被灞炴�� </a-divider> <a-tabs @@ -247,10 +235,10 @@ parentId: '', model: {}, labelCol: { - span:3 + span:7 }, wrapperCol: { - span:21 + span:17 }, confirmLoading: false, form: this.$form.createForm(this), diff --git a/src/views/eam/newEquipment/EquipmentDocumentList.vue b/src/views/eam/modules/equipmentNew/EquipmentDocumentList.vue similarity index 98% rename from src/views/eam/newEquipment/EquipmentDocumentList.vue rename to src/views/eam/modules/equipmentNew/EquipmentDocumentList.vue index 92347dc..7002013 100644 --- a/src/views/eam/newEquipment/EquipmentDocumentList.vue +++ b/src/views/eam/modules/equipmentNew/EquipmentDocumentList.vue @@ -143,7 +143,7 @@ <script> import { JeecgListMixin } from '@/mixins/JeecgListMixin' -import EquipmentDocumentModal from '../modules/equipmentNew/EquipmentDocumentModal' +import EquipmentDocumentModal from './EquipmentDocumentModal' import { preview } from 'vue-photo-preview' import { mixinDevice } from '@/utils/mixin' import { ACCESS_TOKEN } from '@/store/mutation-types' @@ -155,7 +155,7 @@ import { getFileAccessHttpUrl } from '@/api/manage'; import '@/assets/less/TableExpand.less' import store from '@/store/' -import { downFile, getAction } from '../../../api/manage' +import { downFile, getAction } from '../../../../api/manage' export default { name: "EquipmentDocumentList", mixins: [JeecgListMixin, mixinDevice], @@ -246,6 +246,7 @@ customRender: 'action' }, width: 200, + fixed: 'right', }, ], url: { diff --git a/src/views/eam/modules/equipmentNew/EquipmentModal.vue b/src/views/eam/modules/equipmentNew/EquipmentModal.vue index 932832e..f81a881 100644 --- a/src/views/eam/modules/equipmentNew/EquipmentModal.vue +++ b/src/views/eam/modules/equipmentNew/EquipmentModal.vue @@ -701,7 +701,7 @@ enter-button @search="onSearchPrecisionParametersTemplate()" :read-only="true" - v-model="model.precisionParametersTemplateName" + v-model="model.precisionParametersTemplateId_dictText" /> </a-form-model-item> </a-col> @@ -737,7 +737,7 @@ enter-button @search="onSearchProcessParametersTemplate()" :read-only="true" - v-model="model.processParametersTemplateName" + v-model="model.processParametersTemplateId_dictText" /> </a-form-model-item> </a-col> @@ -761,8 +761,8 @@ import { postAction, requestPut, getAction } from '@/api/manage' import { duplicateCheck } from '@/api/api' import moment from 'moment' -import ProcessParametersTemplateList from '../equipment/ProcessParametersTemplateList' -import PrecisionParametersTemplateList from '../equipment/PrecisionParametersTemplateList' +import ProcessParametersTemplateList from './serach/ProcessParametersTemplateList' +import PrecisionParametersTemplateList from './serach/PrecisionParametersTemplateList' import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' import { JVXETypes } from '@/components/jeecg/JVxeTable' export default { @@ -822,7 +822,22 @@ ], equipmentCategoryId: [ { required: true, message: '璇烽�夊垯璁惧绫诲埆!' }, - ] + ], + specification:[ + { required: true, message: '璇烽�夊垯璁惧瑙勬牸!' }, + ], + model:[ + { required: true, message: '璇烽�夊垯璁惧鍨嬪彿!' }, + ], + equipmentImportanceId:[ + { required: true, message: '璇烽�夊垯璁惧ABC鏍囪瘑!' }, + ], + manageId:[ + { required: true, message: '璇烽�夋嫨缁存姢閮ㄩ棬!' }, + ], + useId:[ + { required: true, message: '璇烽�夋嫨浣跨敤閮ㄩ棬閮ㄩ棬!' }, + ], }, url: { add: "/eam/equipment/add", @@ -986,7 +1001,7 @@ sendProcessParametersTemplateRecord(data) { let record = data.record; this.model.processParametersTemplateId = record.id - this.model.processParametersTemplateName = record.name + this.model.processParametersTemplateId_dictText = record.name this.model = Object.assign({}, this.model); }, @@ -997,7 +1012,7 @@ sendPrecisionParametersTemplateRecord(data) { let record = data.record; this.model.precisionParametersTemplateId = record.id - this.model.precisionParametersTemplateName = record.name + this.model.precisionParametersTemplateId_dictText= record.name this.model = Object.assign({}, this.model); }, standardResultCompute() { diff --git a/src/views/eam/newEquipment/EquipmentPrecisionParametersList.vue b/src/views/eam/modules/equipmentNew/EquipmentPrecisionParametersList.vue similarity index 79% rename from src/views/eam/newEquipment/EquipmentPrecisionParametersList.vue rename to src/views/eam/modules/equipmentNew/EquipmentPrecisionParametersList.vue index 9fe1860..ade384d 100644 --- a/src/views/eam/newEquipment/EquipmentPrecisionParametersList.vue +++ b/src/views/eam/modules/equipmentNew/EquipmentPrecisionParametersList.vue @@ -25,6 +25,7 @@ <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-item key="1" @click="handleSubmitBatch"><a-icon type="to-top" />鎻愪氦</a-menu-item> </a-menu> <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button> </a-dropdown> @@ -107,8 +108,8 @@ <script> import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import EquipmentPrecisionParametersModal from '../modules/equipmentNew/EquipmentPrecisionParametersModal' -import { postAction } from '../../../api/manage' + import EquipmentPrecisionParametersModal from './EquipmentPrecisionParametersModal' + import { postAction, putAction } from '../../../../api/manage' export default { name: "EquipmentPrecisionParametersList", @@ -208,11 +209,13 @@ scopedSlots: { customRender: 'action' }, + fixed: 'right', }, ], url: { list: "/eam/equipmentPrecisionParameters/list", edit: "/eam/equipmentPrecisionParameters/edit", + submitBatch:"/eam/equipmentPrecisionParameters/submitBatch", // delete: "/new/equipment/deleteEquipmentPrecisionParameters", // deleteBatch: "/new/equipment/deleteBatchEquipmentPrecisionParameters", // exportXlsUrl: "/new/equipment/exportEquipmentPrecisionParameters", @@ -233,6 +236,7 @@ clearList(){ this.dataSource=[] this.selectedRowKeys=[] + this.selectionRows = [] this.ipagination.current = 1 }, handleChange(value, key, column, index) { @@ -276,6 +280,50 @@ modalFormOk() { this.loadData(1); }, + handleSubmitBatch(){ + for(var i=0;i<this.selectionRows.length;i++){ + let upperLimit = this.selectionRows[i].upperLimit; + let lowerLimit = this.selectionRows[i].lowerLimit; + let actualValue = this.selectionRows[i].actualValue; + if(upperLimit==null||upperLimit==undefined||upperLimit==''){ + this.$message.warning("璇峰厛濉啓閫夋嫨椤圭殑涓婇檺鍊煎啀鎻愪氦") + return false; + } + if(lowerLimit==null||lowerLimit==undefined||lowerLimit==''){ + this.$message.warning("璇峰厛濉啓閫夋嫨椤圭殑涓嬮檺鍊煎啀鎻愪氦") + return false; + } + if(actualValue==null||actualValue==undefined||actualValue==''){ + this.$message.warning("璇峰厛濉啓閫夋嫨椤圭殑瀹為檯鍊煎啀鎻愪氦") + return false; + } + } + let that = this; + this.$confirm({ + title: '璁惧绮惧害纭鎻愪氦锛�', + content: '纭鎻愪氦鍚楋紒', + okText: '纭', + cancelText: '鍙栨秷', + onOk() { + that.loading=true; + putAction(that.url.submitBatch,that.selectionRows).then((res) => { + if (res.success) { + that.$message.success("鎻愪氦鎴愬姛锛�") + that.loadData(1) + } else { + that.$message.warning("鎻愪氦澶辫触锛�") + } + }).finally(() => { + that.loading = false; + that.clearList(); + }) + }, + }) + }, + onSelectChange(selectedRowKeys, selectionRows) { + this.selectedRowKeys = selectedRowKeys; + this.selectionRows = selectionRows; + }, } } diff --git a/src/views/eam/newEquipment/EquipmentProcessParametersList.vue b/src/views/eam/modules/equipmentNew/EquipmentProcessParametersList.vue similarity index 81% rename from src/views/eam/newEquipment/EquipmentProcessParametersList.vue rename to src/views/eam/modules/equipmentNew/EquipmentProcessParametersList.vue index b676148..2646bd9 100644 --- a/src/views/eam/newEquipment/EquipmentProcessParametersList.vue +++ b/src/views/eam/modules/equipmentNew/EquipmentProcessParametersList.vue @@ -24,6 +24,7 @@ <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-item key="1" @click="handleSubmitBatch"><a-icon type="to-top" />鎻愪氦</a-menu-item> </a-menu> <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button> </a-dropdown> @@ -89,8 +90,8 @@ <script> import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import EquipmentProcessParametersModal from '../modules/equipmentNew/EquipmentProcessParametersModal' -import { postAction } from '../../../api/manage' + import EquipmentProcessParametersModal from './EquipmentProcessParametersModal' +import { postAction,putAction } from '../../../../api/manage' export default { name: "EquipmentProcessParametersList", @@ -174,12 +175,14 @@ scopedSlots: { customRender: 'action' }, - width:200 + width:200, + fixed: 'right', }, ], url: { list: "/eam/equipmentProcessParameters/list", edit: "/eam/equipmentProcessParameters/edit", + submitBatch:"/eam/equipmentProcessParameters/submitBatch", // delete: "/new/equipment/deleteEquipmentProcessParameters", // deleteBatch: "/new/equipment/deleteBatchEquipmentProcessParameters", // exportXlsUrl: "/new/equipment/exportEquipmentProcessParameters", @@ -199,6 +202,7 @@ methods: { clearList(){ this.dataSource=[] + this.selectionRows = [] this.selectedRowKeys=[] this.ipagination.current = 1 }, @@ -233,6 +237,40 @@ that.dataSource = temp; } }, + handleSubmitBatch(){ + for(var i=0;i<this.selectionRows.length;i++){ + let parametersValue = this.selectionRows[i].parametersValue; + if(parametersValue==null||parametersValue==undefined||parametersValue==''){ + this.$message.warning("璇峰厛濉啓閫夋嫨椤圭殑鍙傛暟鍊煎啀鎻愪氦") + return false; + } + } + let that = this; + this.$confirm({ + title: '璁惧绮惧害纭鎻愪氦锛�', + content: '纭鎻愪氦鍚楋紒', + okText: '纭', + cancelText: '鍙栨秷', + onOk() { + that.loading=true; + putAction(that.url.submitBatch,that.selectionRows).then((res) => { + if (res.success) { + that.$message.success("鎻愪氦鎴愬姛锛�") + that.loadData(1) + } else { + that.$message.warning("鎻愪氦澶辫触锛�") + } + }).finally(() => { + that.loading = false; + that.clearList(); + }) + }, + }) + }, + onSelectChange(selectedRowKeys, selectionRows) { + this.selectedRowKeys = selectedRowKeys; + this.selectionRows = selectionRows; + }, } diff --git a/src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentCalibrationRecord.vue b/src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentCalibrationRecord.vue new file mode 100644 index 0000000..f031a92 --- /dev/null +++ b/src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentCalibrationRecord.vue @@ -0,0 +1,156 @@ +<template> + <a-card + :bordered="false" + :class="'cust-erp-sub-tab'" + > + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > + <a-row :gutter="24"> + </a-row> + </a-form> + </div> + <div> + + <a-table + ref="table" + size="middle" + bordered + rowKey="id" + :scroll="{x:true}" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + @change="handleTableChange" + > + + </a-table> + </div> + </a-card> +</template> + +<script> +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import { getAction, deleteAction } from '@/api/manage' +import Tooltip from 'ant-design-vue/es/tooltip' + +export default { + name: "EquipmentCalibrationRecord", + components: { + Tooltip, + }, + mixins: [JeecgListMixin], + props: { + equipmentId: { + type: String, + default: '-1', + required: false + } + }, + watch: { + equipmentId: { + immediate: true, + handler(val) { + if (!this.equipmentId) { + this.clearList() + } else { + this.queryParam['equipmentId'] = val; + this.queryParam['delFlag'] = 0; + this.loadData(1); + } + } + } + }, + data() { + return { + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 100, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, + { + title: '宸ュ崟鍙�', + align: "center", + dataIndex: 'num', + + }, + { + title: '妫�瀹氭柟寮�', + align: "center", + dataIndex: 'calibrationTypeName', + + }, + { + title: '缁撴灉', + align: "center", + dataIndex: 'calibrationResult', + }, + { + title: '妫�瀹氫汉', + align: "center", + dataIndex: 'calibrationUserName', + }, + { + title: '妫�瀹氭椂闂�', + align: "center", + dataIndex: 'calibrationTime', + }, + ], + url: { + list: "/eam/equipment/getResumeCalibrationRecordList", + }, + } + }, + + methods: { + + + clearList() { + this.dataSource = [] + this.selectedRowKeys = [] + this.ipagination.current = 1 + }, + loadData(arg) { + if (!this.url.list) { + this.$message.error("璇疯缃畊rl.list灞炴��!") + return + } + //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 + if (arg === 1) { + this.ipagination.current = 1; + } + var params = this.getQueryParams();//鏌ヨ鏉′欢 + this.loading = true; + // this.originTargetKeys = []; + getAction(this.url.list, params).then((res) => { + if (res.success) { + this.dataSource = res.result.records || res.result; + if (res.result.total) { + this.ipagination.total = res.result.total; + } else { + this.ipagination.total = 0; + } + //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + }, + } +} +</script> +<style scoped> +@import '~@assets/less/common.less'; +</style> diff --git a/src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentChangeRecord.vue b/src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentChangeRecord.vue new file mode 100644 index 0000000..67029a6 --- /dev/null +++ b/src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentChangeRecord.vue @@ -0,0 +1,159 @@ +<template> + <a-card + :bordered="false" + :class="'cust-erp-sub-tab'" + > + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > + <a-row :gutter="24"> + </a-row> + </a-form> + </div> + <div> + + <a-table + ref="table" + size="middle" + bordered + rowKey="id" + :scroll="{x:true}" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + @change="handleTableChange" + > + <span + slot="action" + slot-scope="text, record" + > + <a-popconfirm + title="纭畾鍒犻櫎鍚�?" + @confirm="() => handleDelete(record.id)" + > + <a>鍒犻櫎</a> + </a-popconfirm> + </span> + </a-table> + </div> + </a-card> +</template> + +<script> +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import { getAction, deleteAction } from '@/api/manage' +import Tooltip from 'ant-design-vue/es/tooltip' + +export default { + name: "EquipmentChangeRecord", + components: { + Tooltip, + }, + mixins: [JeecgListMixin], + props: { + equipmentId: { + type: String, + default: '-1', + required: false + } + }, + watch: { + equipmentId: { + immediate: true, + handler(val) { + if (!this.equipmentId) { + this.clearList() + } else { + this.queryParam['equipmentId'] = val; + // this.queryParam['delFlag'] = 0; + this.loadData(1); + } + } + } + }, + data() { + return { + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 100, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, + { + title: '鍗曟嵁鍙�', + align: 'center', + dataIndex: 'num' + }, + + { + title: '鍗曟嵁绫诲瀷', + align: 'center', + dataIndex: 'changeMethod' + }, + { + title: '缁忓姙浜�', + align: 'center', + dataIndex: 'createBy' + }, + { + title: '涓氬姟鏃ユ湡', + align: 'center', + dataIndex: 'createTime' + }, + + ], + url: { + list: "/eam/equipment/getResumeChangeRecordList", + }, + } + }, + + methods: { + clearList() { + this.dataSource = [] + this.selectedRowKeys = [] + this.ipagination.current = 1 + }, + loadData(arg) { + if (!this.url.list) { + this.$message.error("璇疯缃畊rl.list灞炴��!") + return + } + //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 + if (arg === 1) { + this.ipagination.current = 1; + } + var params = this.getQueryParams();//鏌ヨ鏉′欢 + this.loading = true; + getAction(this.url.list, params).then((res) => { + if (res.success) { + this.dataSource = res.result.records || res.result; + + if (res.result.total) { + this.ipagination.total = res.result.total; + } else { + this.ipagination.total = 0; + } + //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + }, + } +} +</script> +<style scoped> +@import '~@assets/less/common.less'; +</style> diff --git a/src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentInspectionRecord.vue b/src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentInspectionRecord.vue new file mode 100644 index 0000000..0161010 --- /dev/null +++ b/src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentInspectionRecord.vue @@ -0,0 +1,167 @@ +<template> + <a-card + :bordered="false" + :class="'cust-erp-sub-tab'" + > + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > + <a-row :gutter="24"> + </a-row> + </a-form> + </div> + <div> + + <a-table + ref="table" + size="middle" + bordered + rowKey="id" + :scroll="{x:true}" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + @change="handleTableChange" + > + + </a-table> + </div> + </a-card> +</template> + +<script> +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import { getAction, deleteAction } from '@/api/manage' +import Tooltip from 'ant-design-vue/es/tooltip' + +export default { + name: "EquipmentInspectionRecord", + components: { + Tooltip, + }, + mixins: [JeecgListMixin], + props: { + equipmentId: { + type: String, + default: '-1', + required: false + } + }, + watch: { + equipmentId: { + immediate: true, + handler(val) { + if (!this.equipmentId) { + this.clearList() + } else { + this.queryParam['equipmentId'] = val; + this.queryParam['delFlag'] = 0; + this.loadData(1); + } + } + } + }, + data() { + return { + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 100, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, + { + title: '鐐规绫诲瀷', + align: "center", + dataIndex: 'inspectionType', + + }, + { + title: '鐐规宸ュ崟鍙�', + align: "center", + dataIndex: 'num', + + }, + { + title: '鐐规缁撴灉', + align: "center", + dataIndex: 'result', + }, + { + title: '鐐规鏃ユ湡', + align: "center", + dataIndex: 'inspectionTime', + }, + { + title: '璐d换鐝粍', + align: "center", + dataIndex: 'teamName', + }, + { + title: '鐐规浜�', + align: "center", + dataIndex: 'inspectionUserName', + }, + { + title: '瀹屾垚鏃堕棿', + align: "center", + dataIndex: 'actualEndTime', + }, + + ], + url: { + list: "/eam/equipment/getResumeInspectionRecordList", + }, + } + }, + + methods: { + + + clearList() { + this.dataSource = [] + this.selectedRowKeys = [] + this.ipagination.current = 1 + }, + loadData(arg) { + if (!this.url.list) { + this.$message.error("璇疯缃畊rl.list灞炴��!") + return + } + //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 + if (arg === 1) { + this.ipagination.current = 1; + } + var params = this.getQueryParams();//鏌ヨ鏉′欢 + this.loading = true; + // this.originTargetKeys = []; + getAction(this.url.list, params).then((res) => { + if (res.success) { + this.dataSource = res.result.records || res.result; + if (res.result.total) { + this.ipagination.total = res.result.total; + } else { + this.ipagination.total = 0; + } + //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + }, + } +} +</script> +<style scoped> +@import '~@assets/less/common.less'; +</style> diff --git a/src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentMaintenanceRecord.vue b/src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentMaintenanceRecord.vue new file mode 100644 index 0000000..36458fd --- /dev/null +++ b/src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentMaintenanceRecord.vue @@ -0,0 +1,173 @@ +<template> + <a-card + :bordered="false" + :class="'cust-erp-sub-tab'" + > + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > + <a-row :gutter="24"> + </a-row> + </a-form> + </div> + <div> + + <a-table + ref="table" + size="middle" + bordered + rowKey="id" + :scroll="{x:true}" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + @change="handleTableChange" + > + <span + slot="action" + slot-scope="text, record" + > + <a-popconfirm + title="纭畾鍒犻櫎鍚�?" + @confirm="() => handleDelete(record.id)" + > + <a>鍒犻櫎</a> + </a-popconfirm> + </span> + </a-table> + </div> + </a-card> +</template> + +<script> +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import { getAction, deleteAction } from '@/api/manage' +import Tooltip from 'ant-design-vue/es/tooltip' + +export default { + name: "EquipmentMaintenanceRecord", + components: { + Tooltip, + }, + mixins: [JeecgListMixin], + props: { + equipmentId: { + type: String, + default: '-1', + required: false + } + }, + watch: { + equipmentId: { + immediate: true, + handler(val) { + if (!this.equipmentId) { + this.clearList() + } else { + this.queryParam['equipmentId'] = val; + // this.queryParam['delFlag'] = 0; + this.loadData(1); + } + } + } + }, + data() { + return { + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 100, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, + { + title: '淇濆吇绫诲瀷', + align: 'center', + dataIndex: 'maintenanceType' + }, + + { + title: '淇濆吇宸ュ崟鍙�', + align: 'center', + dataIndex: 'num' + }, + { + title: '璐d换鐝粍', + align: 'center', + dataIndex: 'teamName' + }, + { + title: '鎵ц浜�', + align: 'center', + dataIndex: 'maintenanceuserName' + }, + { + title: '瀹為檯寮�濮嬫椂闂�', + align: 'center', + dataIndex: 'actualStartTime' + }, + { + title: '瀹為檯缁撴潫鏃堕棿', + align: 'center', + dataIndex: 'actualEndTime' + }, + { + title: '瀹為檯宸ユ椂', + align: 'center', + dataIndex: 'measure' + }, + ], + url: { + list: "/eam/equipment/getResumeMaintenanceRecordList", + }, + } + }, + + methods: { + clearList() { + this.dataSource = [] + this.selectedRowKeys = [] + this.ipagination.current = 1 + }, + loadData(arg) { + if (!this.url.list) { + this.$message.error("璇疯缃畊rl.list灞炴��!") + return + } + //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 + if (arg === 1) { + this.ipagination.current = 1; + } + var params = this.getQueryParams();//鏌ヨ鏉′欢 + this.loading = true; + getAction(this.url.list, params).then((res) => { + if (res.success) { + this.dataSource = res.result.records || res.result; + + if (res.result.total) { + this.ipagination.total = res.result.total; + } else { + this.ipagination.total = 0; + } + //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + }, + } +} +</script> +<style scoped> +@import '~@assets/less/common.less'; +</style> diff --git a/src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentRepairRecord.vue b/src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentRepairRecord.vue new file mode 100644 index 0000000..a47f554 --- /dev/null +++ b/src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentRepairRecord.vue @@ -0,0 +1,183 @@ +<template> + <a-card + :bordered="false" + :class="'cust-erp-sub-tab'" + > + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > + <a-row :gutter="24"> + </a-row> + </a-form> + </div> + <div> + + <a-table + ref="table" + size="middle" + bordered + rowKey="id" + :scroll="{x:true}" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + @change="handleTableChange" + > + <span + slot="action" + slot-scope="text, record" + > + <a-popconfirm + title="纭畾鍒犻櫎鍚�?" + @confirm="() => handleDelete(record.id)" + > + <a>鍒犻櫎</a> + </a-popconfirm> + </span> + </a-table> + </div> + </a-card> +</template> + +<script> +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import { getAction, deleteAction } from '@/api/manage' +import Tooltip from 'ant-design-vue/es/tooltip' + +export default { + name: "EquipmentMaintenanceRecord", + components: { + Tooltip, + }, + mixins: [JeecgListMixin], + props: { + equipmentId: { + type: String, + default: '-1', + required: false + } + }, + watch: { + equipmentId: { + immediate: true, + handler(val) { + if (!this.equipmentId) { + this.clearList() + } else { + this.queryParam['equipmentId'] = val; + // this.queryParam['delFlag'] = 0; + this.loadData(1); + } + } + } + }, + data() { + return { + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 100, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, + { + title: '缁翠慨宸ュ崟鍙�', + align: 'center', + dataIndex: 'num' + }, + + { + title: '鏁呴殰鎻忚堪', + align: 'center', + dataIndex: 'faultDescription' + }, + { + title: '鏁呴殰鏃堕棿', + align: 'center', + dataIndex: 'faultTime' + }, + { + title: '缁翠繚鏂瑰紡', + align: 'center', + dataIndex: 'maintenanceMethodName' + }, + { + title: '璐d换鐝粍', + align: 'center', + dataIndex: 'teamName' + }, + { + title: '鎵ц浜�', + align: 'center', + dataIndex: 'recipientuserName' + }, + { + title: '瀹為檯宸ユ椂', + align: 'center', + dataIndex: 'actualHour' + }, + { + title: '瀹為檯寮�濮嬫椂闂�', + align: 'center', + dataIndex: 'actualStartTime' + }, + { + title: '瀹為檯缁撴潫鏃堕棿', + align: 'center', + dataIndex: 'actualEndTime' + }, + ], + url: { + list: "/eam/equipment/getResumeRepairRecordList", + }, + } + }, + + methods: { + clearList() { + this.dataSource = [] + this.selectedRowKeys = [] + this.ipagination.current = 1 + }, + loadData(arg) { + if (!this.url.list) { + this.$message.error("璇疯缃畊rl.list灞炴��!") + return + } + //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 + if (arg === 1) { + this.ipagination.current = 1; + } + var params = this.getQueryParams();//鏌ヨ鏉′欢 + this.loading = true; + getAction(this.url.list, params).then((res) => { + if (res.success) { + this.dataSource = res.result.records || res.result; + + if (res.result.total) { + this.ipagination.total = res.result.total; + } else { + this.ipagination.total = 0; + } + //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + }, + } +} +</script> +<style scoped> +@import '~@assets/less/common.less'; +</style> diff --git a/src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentResumeDrawer.vue b/src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentResumeDrawer.vue new file mode 100644 index 0000000..c00c9ee --- /dev/null +++ b/src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentResumeDrawer.vue @@ -0,0 +1,378 @@ +<template> + <a-drawer + :title="title" + :width="drawerWidth" + :visible="visible" + @close="handleCancel" + :confirmLoading="confirmLoading" + :maskClosable="maskClosable" + > + <a-card :style="getBackground()"> + <template> + <a-card> + <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> + <a-row :gutter="24"> + <a-col :span="6"> + <a-form-item + :labelCol="labelCol" + :wrapperCol="wrapperCol" + label="璁惧缂栫爜" + class="hightColor" + > + <span + v-if="this.model != null" + class="hightColor" + >{{ this.model.num }}</span> + <span + v-else + class="frozenRowClass" + >-</span> + </a-form-item> + </a-col> + <a-col :span="6"> + <a-form-item + :labelCol="labelCol" + :wrapperCol="wrapperCol" + label="璁惧鍚嶇О" + class="hightColor" + > + <span + v-if="this.model != null" + class="hightColor" + >{{ this.model.name }}</span> + <span + v-else + class="frozenRowClass" + >-</span> + </a-form-item> + </a-col> + <a-col :span="6"> + <a-form-item + :labelCol="labelCol" + :wrapperCol="wrapperCol" + label="瑙勬牸" + class="hightColor" + > + <span + v-if="this.model != null" + class="hightColor" + >{{ this.model.specification }}</span> + <span + v-else + class="frozenRowClass" + >-</span> + </a-form-item> + </a-col> + <a-col :span="6"> + <a-form-item + :labelCol="labelCol" + :wrapperCol="wrapperCol" + label="鍨嬪彿" + class="hightColor" + > + <span + v-if="this.model != null" + class="hightColor" + >{{ this.model.model }}</span> + <span + v-else + class="frozenRowClass" + >-</span> + </a-form-item> + </a-col> + </a-row> + </div> + + <a-tabs + type="card" + defaultActiveKey="1" + > + <a-tab-pane + tab='浣跨敤璁板綍' + key="1" + class="hightColor" + > + <div> + <a-table + ref="table" + size="middle" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :loading="loading" + @change="handleTableChange" + :pagination="ipagination" + > + <!-- :scroll="{ x: 'calc(1000px + 50%)', y: 900 }" --> + </a-table> + </div> + </a-tab-pane> + + <a-tab-pane + tab='鐐规璁板綍' + key="2" + > + <div + class="table-operator" + style="margin:-16px" + > + <equipment-inspection-record :equipmentId='equipmentId' /> + </div> + </a-tab-pane> + <a-tab-pane + tab='淇濆吇璁板綍' + key="3" + > + <div + class="table-operator" + style="margin:-16px" + > + <equipment-maintenance-record :equipmentId='equipmentId' /> + </div> + </a-tab-pane> + <a-tab-pane + tab='缁翠慨璁板綍' + key="4" + > + <div + class="table-operator" + style="margin:-16px" + > + <equipment-repair-record :equipmentId='equipmentId' /> + </div> + </a-tab-pane> + <a-tab-pane + tab='鎹欢璁板綍' + key="5" + > + <div + class="table-operator" + style="margin:-16px" + > + <equipment-spare-record :equipmentId="equipmentId" /> + </div> + </a-tab-pane> + <a-tab-pane + tab='妫�瀹氳褰�' + key="6" + > + <div + class="table-operator" + style="margin:-16px" + > + <equipment-calibration-record :equipmentId="equipmentId" /> + </div> + </a-tab-pane> + <a-tab-pane + tab='澶勭悊璁板綍' + key="7" + > + <div + class="table-operator" + style="margin:-16px" + > + <equipment-change-record :equipmentId="equipmentId" /> + </div> + </a-tab-pane> + </a-tabs> + </a-card> + <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> + <a-row :style="{textAlign:'right'}"> + <a-button + :style="{marginRight: '8px'}" + @click="handleCancel" + > + 鍙栨秷 + </a-button> + </a-row> + </div> + </template> + </a-card> + </a-drawer> +</template> + +<script> +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import { requestPut, getAction, downFile } from '@/api/manage' +import Tooltip from 'ant-design-vue/es/tooltip' +import { ACCESS_TOKEN } from '@/store/mutation-types' +import Vue from 'vue' +import { getFileAccessHttpUrl } from '@/api/manage'; + +import EquipmentInspectionRecord from './EquipmentInspectionRecord' +import EquipmentMaintenanceRecord from './EquipmentMaintenanceRecord' +import EquipmentRepairRecord from './EquipmentRepairRecord' +import EquipmentSpareRecord from './EquipmentSpareRecord.vue' +import EquipmentCalibrationRecord from './EquipmentCalibrationRecord.vue' +import EquipmentChangeRecord from './EquipmentChangeRecord.vue' + +export default { + name: 'EquipmentResumeDrawer', + mixins: [JeecgListMixin], + components: { + Tooltip, + EquipmentInspectionRecord, + EquipmentMaintenanceRecord, + EquipmentRepairRecord, + EquipmentCalibrationRecord, + EquipmentSpareRecord, + EquipmentChangeRecord, + + }, + data() { + return { + title: "璁惧灞ュ巻", + visible: false, + maskClosable: true, + confirmLoading: false, + drawerWidth: "100%", + equipmentId: '-1', + dataSource: [], + model: {}, + ipagination: { + current: 1, + pageSize: 5, + pageSizeOptions: ['5', '10', '20'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, + labelCol: { + xs: { span: 24 }, + sm: { span: 6 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 18 }, + }, + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + align: 'center', + width: 50, + customRender: function (t, r, index) { + return parseInt(index) + 1 + } + }, + { + title: '鍗曟嵁鍙�', + align: 'center', + dataIndex: 'num', + }, + { + title: '鍗曟嵁绫诲瀷', + align: 'center', + dataIndex: 'type', + }, + { + title: '涓氬姟绫诲瀷', + align: 'center', + dataIndex: 'businessType', + }, + { + title: '缁忓姙浜�', + align: 'center', + dataIndex: 'createBy', + }, + { + title: '涓氬姟鏃ユ湡', + align: 'center', + dataIndex: 'createTime', + }, + ], + url: { + list: "/eam/equipment/getResumeUseRecordList", + }, + } + }, + mounted() { + this.$bus.$on('closeDrawer', (data) => { + this.visible = false; + }) + }, + + methods: { + + handleShow(record) { + this.model = Object.assign({}, record); + this.equipmentId = record.id + this.dataSource = [] + this.visible = true; + this.queryParam.equipmentId = record.id + this.loadData(1) + }, + + loadData(arg) { + if (!this.url.list) { + this.$message.error("璇疯缃畊rl.list灞炴��!") + return + } + //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 + if (arg === 1) { + this.ipagination.current = 1; + } + var params = this.getQueryParams();//鏌ヨ鏉′欢 + this.loading = true; + getAction(this.url.list, params).then((res) => { + if (res.success) { + //update-begin---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ + this.dataSource = res.result.records || res.result; + if (res.result.total) { + this.ipagination.total = res.result.total; + } else { + this.ipagination.total = 0; + } + //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + }, + + // loadData() { + // }, + getBackground() { + return "background-color:rgba(127, 127, 127,0.08)"; + }, + handleCancel() { + this.$emit('ok'); + this.alterFlag = new Date(); + this.close() + }, + close() { + this.visible = false; + }, + + }, +} +</script> + +<style scoped> +@import '~@assets/less/common.less'; +.hightColor { + height: 10%; + font-weight: bold; + font-size: 20px; + color: #1b1e1e; +} +.frozenRowClass { + color: #c9c9c9; +} +.fontweight { + font-weight: bold; +} +.hight { + color: #f5222d; +} +/deep/ .red { + color: red; +} +</style> \ No newline at end of file diff --git a/src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentSpareRecord.vue b/src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentSpareRecord.vue new file mode 100644 index 0000000..dd5ec04 --- /dev/null +++ b/src/views/eam/modules/equipmentNew/EquipmentResume/EquipmentSpareRecord.vue @@ -0,0 +1,182 @@ +<template> + <a-card + :bordered="false" + :class="'cust-erp-sub-tab'" + > + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > + <a-row :gutter="24"> + </a-row> + </a-form> + </div> + <div> + + <a-table + ref="table" + size="middle" + bordered + rowKey="id" + :scroll="{x:true}" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + @change="handleTableChange" + > + + </a-table> + </div> + </a-card> +</template> + +<script> +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import { getAction, deleteAction } from '@/api/manage' +import Tooltip from 'ant-design-vue/es/tooltip' + +export default { + name: "EquipmentSpareRecord", + components: { + Tooltip, + }, + mixins: [JeecgListMixin], + props: { + equipmentId: { + type: String, + default: '-1', + required: false + } + }, + watch: { + equipmentId: { + immediate: true, + handler(val) { + if (!this.equipmentId) { + this.clearList() + } else { + this.queryParam['equipmentId'] = val; + this.queryParam['delFlag'] = 0; + this.loadData(1); + } + } + } + }, + data() { + return { + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 100, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, + { + title: '鍗曟嵁缂栧彿', + align: "center", + dataIndex: 'inspectionType', + + }, + { + title: '鍗曟嵁绫诲瀷', + align: "center", + dataIndex: 'num', + + }, + { + title: '澶囦欢缂栫爜', + align: "center", + dataIndex: 'result', + }, + { + title: '澶囦欢鍚嶇О', + align: "center", + dataIndex: 'inspectionTime', + }, + { + title: '瑙勬牸', + align: "center", + dataIndex: 'teamName', + }, + { + title: '鍨嬪彿', + align: "center", + dataIndex: 'inspectionUserName', + }, + { + title: '鍒堕�犲晢', + align: "center", + dataIndex: 'actualEndTime', + }, + { + title: '涓诲崟浣�', + align: "center", + dataIndex: 'actualEndTime1', + }, + { + title: '涓绘暟閲�', + align: "center", + dataIndex: 'actualEndTime2', + }, + { + title: '鏇存崲鏃堕棿', + align: "center", + dataIndex: 'actualEndTime3', + }, + + ], + url: { + list: "/eam/equipment/getResumeInspectionRecordList", + }, + } + }, + + methods: { + + + clearList() { + this.dataSource = [] + this.selectedRowKeys = [] + this.ipagination.current = 1 + }, + loadData(arg) { + if (!this.url.list) { + this.$message.error("璇疯缃畊rl.list灞炴��!") + return + } + //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 + if (arg === 1) { + this.ipagination.current = 1; + } + var params = this.getQueryParams();//鏌ヨ鏉′欢 + this.loading = true; + // this.originTargetKeys = []; + getAction(this.url.list, params).then((res) => { + if (res.success) { + this.dataSource = res.result.records || res.result; + if (res.result.total) { + this.ipagination.total = res.result.total; + } else { + this.ipagination.total = 0; + } + //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + }, + } +} +</script> +<style scoped> +@import '~@assets/less/common.less'; +</style> diff --git a/src/views/eam/modules/equipmentNew/serach/PrecisionParametersDetailList.vue b/src/views/eam/modules/equipmentNew/serach/PrecisionParametersDetailList.vue new file mode 100644 index 0000000..2144e99 --- /dev/null +++ b/src/views/eam/modules/equipmentNew/serach/PrecisionParametersDetailList.vue @@ -0,0 +1,180 @@ +<template> + <a-card :bordered="false"> + <!-- table鍖哄煙-begin --> + <div> + <a-table + ref="table" + size="middle" + bordered + rowKey="id" + :columns="columns" + :pagination="ipagination" + :dataSource="dataSource" + :loading="loading" + @change="handleTableChange" + > + + </a-table> + </div> + + </a-card> +</template> + +<script> + +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import JEllipsis from "@/components/jeecg/JEllipsis"; +import { deleteAction, getAction } from '@/api/manage' + +export default { + name: "ProcessParametersDetailList", + mixins: [JeecgListMixin], + components: { + JEllipsis, + }, + data() { + return { + disabled: true, + description: '璁惧绮惧害鏄庣粏', + val: { precisionParametersTemplateId: -1 }, + dataSource: [], + /* 鍒嗛〉鍙傛暟 */ + ipagination: { + current: 1, + pageSize: 5, + pageSizeOptions: ['5', '10', '20', '30'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + }, + width: 50, + }, + { + title: '璁惧绮惧害缂栫爜', + align: 'center', + dataIndex: 'precisionParametersNum', + }, + { + title: '璁惧绮惧害鍚嶇О', + align: 'center', + dataIndex: 'precisionParametersName', + }, + { + title: '璁¢噺鍗曚綅', + align: 'center', + dataIndex: 'unit', + }, + { + title: '澶囨敞', + align: 'center', + dataIndex: 'remark', + }, + ], + + url: { + list: '/eam/precisionParametersTemplateDetail/listByPrecisionParametersTemplateId', + }, + } + }, + + mounted() { + this.$bus.$on('refreshChildPage', (data) => { + this.val = data + this.loadData2("1", data); + }) + }, + + watch: { + dataSource() { + this.$bus.$emit('precisionParametersDataSource', this.dataSource); + }, + }, + + methods: { + + handleTableChange(pagination, filters, sorter) { + //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂 + //TODO 绛涢�� + if (Object.keys(sorter).length > 0) { + this.isorter.column = sorter.field; + this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" + } + this.ipagination = pagination; + this.loadData(); + }, + loadData() { + this.loadData2(this.ipagination.current, this.val) + }, + + loadData2(arg, val) { + if (arg === 1) { + this.ipagination.current = 1; + } + var params = this.getQueryParams(); + if (val != null) { + params.precisionParametersTemplateId = val.precisionParametersTemplateId + } else { + params.precisionParametersTemplateId = "-1" + } + this.loading = true; + getAction(this.url.list, params).then((res) => { + if (res.success) { + this.dataSource = res.result.records; + this.ipagination.total = res.result.total; + } + this.loading = false; + }) + }, + + }, + +} +</script> + +<style lang='less' scoped> +@import '~@assets/less/common.less'; +/deep/ .frozenRowClass { + color: #c9c9c9; +} +.success { + color: green; +} +.error { + color: red; +} +.fontweight { + font-weight: bold; +} +.fontweightSuccess { + color: green; + font-weight: bold; +} +.fontweightfrozen { + color: #c9c9c9; + font-weight: bold; +} +.ant-card { + margin-left: -30px; + margin-right: -30px; +} +.fontweightColor { + font-weight: bold; + color: red; +} +.ant-card { + margin-left: -30px; + margin-right: -30px; +} +</style> \ No newline at end of file diff --git a/src/views/eam/modules/equipmentNew/serach/PrecisionParametersTemplateList.vue b/src/views/eam/modules/equipmentNew/serach/PrecisionParametersTemplateList.vue new file mode 100644 index 0000000..693eaef --- /dev/null +++ b/src/views/eam/modules/equipmentNew/serach/PrecisionParametersTemplateList.vue @@ -0,0 +1,338 @@ +<template> + <a-modal + :title="title" + :width="1250" + :visible="visible" + :confirmLoading="confirmLoading" + :okButtonProps="{ props: {disabled: disableSubmit} }" + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴" + > + <a-spin :spinning="confirmLoading"> + <a-form :form="form"> + <a-table + ref="table" + size="middle" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + @change="handleTableChange" + :customRow="clickThenCheck" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:type}" + > + + </a-table> + + <a-tabs defaultActiveKey="1"> + <a-tab-pane key="1"> + <span slot="tab"> + <a-badge>绮惧害鍙傛暟 </a-badge> + </span> + <div + class="table-operator" + style="margin:8px" + > + <precision-parameters-detail-list ref="PrecisionParametersDetailList"> </precision-parameters-detail-list> + </div> + </a-tab-pane> + </a-tabs> + </a-form> + </a-spin> + + </a-modal> +</template> + +<script> + +import { postAction, getAction } from '@/api/manage' +import JDate from '@/components/jeecg/JDate' +import Tooltip from 'ant-design-vue/es/tooltip' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import JEllipsis from '@/components/jeecg/JEllipsis'//寮曞叆杩囬暱瑁佸壀 +import PrecisionParametersDetailList from './PrecisionParametersDetailList' +import store from '@/store' + +export default { + name: "PrecisionParametersTemplateList", + mixins: [JeecgListMixin], + components: { + JDate, + Tooltip, + JEllipsis, + PrecisionParametersDetailList, + }, + data() { + return { + title: "绮惧害鍙傛暟妯℃澘", + visible: false, + model: {}, + dataSource: [], + precisionParametersDataSource: [], + disableSubmit: false, + equipmentId: "", + type: "radio", + /* 鍒嗛〉鍙傛暟 */ + ipagination: { + current: 1, + pageSize: 5, + pageSizeOptions: ['5', '10', '20', '30'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, + labelCol: { + xs: { span: 24 }, + sm: { span: 6 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 18 }, + }, + confirmLoading: false, + form: this.$form.createForm(this), + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + align: 'center', + customRender: function (t, r, index) { + return parseInt(index) + 1 + } + }, + { + title: '璁惧绮惧害妯℃澘缂栫爜', + align: 'center', + dataIndex: 'num', + }, + { + title: '璁惧绮惧害妯℃澘鍚嶇О', + align: 'center', + dataIndex: 'name', + }, + { + title: '鍒涘缓浜�', + align: "center", + dataIndex: 'createBy' + }, + { + title: '鍒涘缓鏃ユ湡', + align: "center", + dataIndex: 'createTime' + }, + { + title: '澶囨敞', + align: 'center', + dataIndex: 'remark', + }, + ], + url: { + add: '/eam/equipmentPrecisionParameters/add', + list: "/eam/precisionParametersTemplate/list", + }, + } + }, + + mounted() { + this.$bus.$on('precisionParametersDataSource', (data) => { + this.precisionParametersDataSource = data + }) + }, + + methods: { + + searchQuery() { + this.loadData(1); + }, + searchReset() { + this.loadData(1) + }, + list() { + this.selectedRowKeys = []; + this.selectedRowRecord = []; + this.visible = true; + this.$bus.$emit('refreshChildPage', { precisionParametersTemplateId: "-1" }); + this.loadData(1); + }, + clickThenCheck(record) { + return { + on: { + click: (e) => { + this.selectedRowRecord = record; + this.onSelectChange(record.id.split(","), [record]); + this.$bus.$emit('refreshChildPage', { precisionParametersTemplateId: record.id }); + } + } + }; + }, + onSelectChange(selectedRowKeys, selectedRows) { + this.selectedRowKeys = selectedRowKeys; + this.selectedRowRecord = selectedRows[0]; + }, + close() { + this.queryParam = {}; + this.$emit('close'); + this.visible = false; + }, + handleOk() { + const that = this; + // 瑙﹀彂琛ㄥ崟楠岃瘉 + if (that.selectedRowKeys.length > 0) { + if (that.selectedRowRecord.id != null && that.selectedRowRecord.id != "") { + that.$emit('sendPrecisionParametersTemplateRecord', { record: that.selectedRowRecord }); + that.close(); + } else { + that.$message.error("璇烽�夋嫨璁惧绮惧害妯℃澘锛�") + } + } else { + that.$message.error("璇烽�夋嫨璁惧绮惧害妯℃澘锛�") + } + }, + + handleCancel() { + this.close(); + }, + + // add() { + // let that = this + // this.form.resetFields(); + // this.disableSubmit = false; + // this.visible = true; + // this.selectedRowRecord = []; + // this.selectedRowKeys = []; + // this.loadData(1); + // this.$bus.$emit('refreshChildPage', { precisionParametersTemplateId: "-1" }); + // }, + + // close() { + // this.$emit('close'); + // this.visible = false; + // }, + // handleOk() { + // const that = this; + // if (this.precisionParametersDataSource.length == 0) { + // that.$message.warning("璇烽�夋嫨鍙傛暟妯℃澘锛�"); + // return + // } + // // 瑙﹀彂琛ㄥ崟楠岃瘉 + // this.form.validateFields((err, values) => { + // if (!err) { + // that.confirmLoading = true; + + // let formData = Object.assign(this.model, values); + // formData.equipmentId = this.equipmentId + // formData.precisionParametersList = this.precisionParametersDataSource + // postAction(this.url.add, formData).then((res) => { + // if (res.success) { + // that.$message.success(res.message); + // that.$emit('ok'); + // that.alterFlag = new Date(); + // } else { + // that.$message.warning(res.message); + // } + // }).finally(() => { + // that.confirmLoading = false; + // that.close(); + // }) + // } + // }) + // }, + // handleCancel() { + // this.close() + // }, + + // clickThenCheck(record) { + // return { + // on: { + // click: (e) => { + // this.selectedRowRecord = record; + // this.selectedRowKeys = record.id.split(","); + // this.$bus.$emit('refreshChildPage', { precisionParametersTemplateId: record.id }); + // } + // } + // }; + // }, + }, +} +</script> +<style scoped> +.ant-btn { + padding: 0 10px; + margin-left: 3px; +} + +.ant-form-item-control { + line-height: 0px; +} + +.fontweight { + font-weight: bold; +} + +/** 涓昏〃鍗曡闂磋窛 */ +.ant-form .ant-form-item { + margin-bottom: 10px; +} + +/** Tab椤甸潰琛岄棿璺� */ +.ant-tabs-content .ant-form-item { + margin-bottom: 0px; +} +.ant-table-tbody .ant-table-row td { + padding-top: 10px; + padding-bottom: 10px; +} + +.anty-row-operator button { + margin: 0 5px; +} + +.ant-btn-danger { + background-color: #ffffff; +} + +.ant-modal-cust-warp { + height: 100%; +} + +.ant-modal-cust-warp .ant-modal-body { + height: calc(100% - 110px) !important; + overflow-y: auto; +} + +.ant-modal-cust-warp .ant-modal-content { + height: 90% !important; + overflow-y: hidden; +} + +/deep/ .notshow { + display: none; +} + +.frozenRowClass { + color: #c9c9c9; +} +.hight { + color: #f5222d; +} +.middle { + color: #fa8c16; +} +.low { + color: #52c41a; +} +.dataUnKnow { + color: #1890ff; +} + +/deep/ .frozenRowClass { + color: #c9c9c9; +} +</style> \ No newline at end of file diff --git a/src/views/eam/modules/equipmentNew/serach/ProcessParametersDetailList.vue b/src/views/eam/modules/equipmentNew/serach/ProcessParametersDetailList.vue new file mode 100644 index 0000000..8333649 --- /dev/null +++ b/src/views/eam/modules/equipmentNew/serach/ProcessParametersDetailList.vue @@ -0,0 +1,189 @@ +<template> + <a-card :bordered="false"> + <!-- table鍖哄煙-begin --> + <div> + <a-table + ref="table" + size="middle" + bordered + rowKey="id" + :columns="columns" + :pagination="ipagination" + :dataSource="dataSource" + :loading="loading" + @change="handleTableChange" + > + <!-- <span + slot="workCenterName" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="10" + /> + </span> --> + + </a-table> + </div> + + </a-card> +</template> + +<script> + +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import JEllipsis from "@/components/jeecg/JEllipsis"; +import { deleteAction, getAction } from '@/api/manage' + +export default { + name: "ProcessParametersDetailList", + mixins: [JeecgListMixin], + components: { + JEllipsis, + }, + data() { + return { + disabled: true, + description: '璁惧宸ヨ壓鍙傛暟', + val: { processParametersTemplateId: -1 }, + dataSource: [], + /* 鍒嗛〉鍙傛暟 */ + ipagination: { + current: 1, + pageSize: 5, + pageSizeOptions: ['5', '10', '20', '30'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + }, + width: 50, + }, + { + title: '宸ヨ壓鍙傛暟缂栫爜', + align: 'center', + dataIndex: 'processParametersNum', + }, + { + title: '宸ヨ壓鍙傛暟鍚嶇О', + align: 'center', + dataIndex: 'processParametersName', + }, + { + title: '璁¢噺鍗曚綅', + align: 'center', + dataIndex: 'unit', + }, + { + title: '澶囨敞', + align: 'center', + dataIndex: 'remark', + }, + ], + + url: { + list: '/eam/processParametersTemplateDetail/listByProcessParametersTemplateId', + }, + } + }, + + mounted() { + this.$bus.$on('refreshChildPage', (data) => { + this.val = data + this.loadData2("1", data); + }) + }, + + watch: { + dataSource() { + this.$bus.$emit('processParametersDataSource', this.dataSource); + }, + }, + + methods: { + + handleTableChange(pagination, filters, sorter) { + //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂 + //TODO 绛涢�� + if (Object.keys(sorter).length > 0) { + this.isorter.column = sorter.field; + this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" + } + this.ipagination = pagination; + this.loadData(); + }, + loadData() { + this.loadData2(this.ipagination.current, this.val) + }, + + loadData2(arg, val) { + if (arg === 1) { + this.ipagination.current = 1; + } + var params = this.getQueryParams(); + if (val != null) { + params.processParametersTemplateId = val.processParametersTemplateId + } else { + params.processParametersTemplateId = "-1" + } + this.loading = true; + getAction(this.url.list, params).then((res) => { + if (res.success) { + this.dataSource = res.result.records; + this.ipagination.total = res.result.total; + } + this.loading = false; + }) + }, + + }, + +} +</script> + +<style lang='less' scoped> +@import '~@assets/less/common.less'; +/deep/ .frozenRowClass { + color: #c9c9c9; +} +.success { + color: green; +} +.error { + color: red; +} +.fontweight { + font-weight: bold; +} +.fontweightSuccess { + color: green; + font-weight: bold; +} +.fontweightfrozen { + color: #c9c9c9; + font-weight: bold; +} +.ant-card { + margin-left: -30px; + margin-right: -30px; +} +.fontweightColor { + font-weight: bold; + color: red; +} +.ant-card { + margin-left: -30px; + margin-right: -30px; +} +</style> \ No newline at end of file diff --git a/src/views/eam/modules/equipmentNew/serach/ProcessParametersTemplateList.vue b/src/views/eam/modules/equipmentNew/serach/ProcessParametersTemplateList.vue new file mode 100644 index 0000000..c83e15a --- /dev/null +++ b/src/views/eam/modules/equipmentNew/serach/ProcessParametersTemplateList.vue @@ -0,0 +1,338 @@ +<template> + <a-modal + :title="title" + :width="1250" + :visible="visible" + :confirmLoading="confirmLoading" + :okButtonProps="{ props: {disabled: disableSubmit} }" + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴" + > + <a-spin :spinning="confirmLoading"> + <a-form :form="form"> + <a-table + ref="table" + size="middle" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + @change="handleTableChange" + :customRow="clickThenCheck" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:type}" + > + + </a-table> + + <a-tabs defaultActiveKey="1"> + <a-tab-pane key="1"> + <span slot="tab"> + <a-badge>宸ヨ壓鍙傛暟 </a-badge> + </span> + <div + class="table-operator" + style="margin:8px" + > + <process-parameters-detail-list ref="ProcessParametersDetailList"> </process-parameters-detail-list> + </div> + </a-tab-pane> + </a-tabs> + </a-form> + </a-spin> + + </a-modal> +</template> + +<script> + +import { postAction, getAction } from '@/api/manage' +import JDate from '@/components/jeecg/JDate' +import Tooltip from 'ant-design-vue/es/tooltip' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import JEllipsis from '@/components/jeecg/JEllipsis'//寮曞叆杩囬暱瑁佸壀 +import ProcessParametersDetailList from './ProcessParametersDetailList' +import store from '@/store' + +export default { + name: "ProcessParametersTemplateList", + mixins: [JeecgListMixin], + components: { + JDate, + Tooltip, + JEllipsis, + ProcessParametersDetailList, + }, + data() { + return { + title: "宸ヨ壓鍙傛暟妯℃澘", + visible: false, + model: {}, + dataSource: [], + processParametersDataSource: [], + disableSubmit: false, + equipmentId: "", + type: "radio", + /* 鍒嗛〉鍙傛暟 */ + ipagination: { + current: 1, + pageSize: 5, + pageSizeOptions: ['5', '10', '20', '30'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, + labelCol: { + xs: { span: 24 }, + sm: { span: 6 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 18 }, + }, + confirmLoading: false, + form: this.$form.createForm(this), + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + align: 'center', + customRender: function (t, r, index) { + return parseInt(index) + 1 + } + }, + { + title: '宸ヨ壓鍙傛暟妯℃澘缂栫爜', + align: 'center', + dataIndex: 'num', + }, + { + title: '宸ヨ壓鍙傛暟妯℃澘鍚嶇О', + align: 'center', + dataIndex: 'name', + }, + { + title: '鍒涘缓浜�', + align: "center", + dataIndex: 'createBy' + }, + { + title: '鍒涘缓鏃ユ湡', + align: "center", + dataIndex: 'createTime' + }, + { + title: '澶囨敞', + align: 'center', + dataIndex: 'remark', + }, + ], + url: { + add: '/eam/equipmentProcessParameters/add', + list: "/eam/processParametersTemplate/list", + }, + } + }, + + mounted() { + this.$bus.$on('processParametersDataSource', (data) => { + this.processParametersDataSource = data + }) + }, + + methods: { + + searchQuery() { + this.loadData(1); + }, + searchReset() { + this.loadData(1) + }, + list() { + this.selectedRowKeys = []; + this.selectedRowRecord = []; + this.visible = true; + this.$bus.$emit('refreshChildPage', { processParametersTemplateId: "-1" }); + this.loadData(1); + }, + clickThenCheck(record) { + return { + on: { + click: (e) => { + this.selectedRowRecord = record; + this.onSelectChange(record.id.split(","), [record]); + // this.selectedRowRecord = record; + // this.selectedRowKeys = record.id.split(","); + this.$bus.$emit('refreshChildPage', { processParametersTemplateId: record.id }); + } + } + }; + }, + onSelectChange(selectedRowKeys, selectedRows) { + this.selectedRowKeys = selectedRowKeys; + this.selectedRowRecord = selectedRows[0]; + }, + close() { + this.queryParam = {}; + this.$emit('close'); + this.visible = false; + }, + handleOk() { + const that = this; + // 瑙﹀彂琛ㄥ崟楠岃瘉 + if (that.selectedRowKeys.length > 0) { + if (that.selectedRowRecord.id != null && that.selectedRowRecord.id != "") { + that.$emit('sendProcessParametersTemplateRecord', { record: that.selectedRowRecord }); + that.close(); + } else { + that.$message.error("璇烽�夋嫨宸ヨ壓鍙傛暟妯℃澘锛�") + } + } else { + that.$message.error("璇烽�夋嫨宸ヨ壓鍙傛暟妯℃澘锛�") + } + }, + + handleCancel() { + this.close(); + }, + + + // add() { + // let that = this + // this.form.resetFields(); + // this.disableSubmit = false; + // this.visible = true; + // this.selectedRowRecord = []; + // this.selectedRowKeys = []; + // this.loadData(1); + // this.$bus.$emit('refreshChildPage', { processParametersTemplateId: "-1" }); + // }, + + // close() { + // this.$emit('close'); + // this.visible = false; + // }, + // handleOk() { + // const that = this; + // if (this.processParametersDataSource.length == 0) { + // that.$message.warning("璇烽�夋嫨鍙傛暟妯℃澘锛�"); + // return + // } + // // 瑙﹀彂琛ㄥ崟楠岃瘉 + // this.form.validateFields((err, values) => { + // if (!err) { + // that.confirmLoading = true; + + // let formData = Object.assign(this.model, values); + // formData.equipmentId = this.equipmentId + // formData.processParametersList = this.processParametersDataSource + // postAction(this.url.add, formData).then((res) => { + // if (res.success) { + // that.$message.success(res.message); + // that.$emit('ok'); + // that.alterFlag = new Date(); + // } else { + // that.$message.warning(res.message); + // } + // }).finally(() => { + // that.confirmLoading = false; + // that.close(); + // }) + // } + // }) + // }, + + // clickThenCheck(record) { + // return { + // on: { + // click: (e) => { + // this.selectedRowRecord = record; + // this.selectedRowKeys = record.id.split(","); + // this.$bus.$emit('refreshChildPage', { processParametersTemplateId: record.id }); + // } + // } + // }; + // }, + }, +} +</script> +<style scoped> +.ant-btn { + padding: 0 10px; + margin-left: 3px; +} + +.ant-form-item-control { + line-height: 0px; +} + +.fontweight { + font-weight: bold; +} + +/** 涓昏〃鍗曡闂磋窛 */ +.ant-form .ant-form-item { + margin-bottom: 10px; +} + +/** Tab椤甸潰琛岄棿璺� */ +.ant-tabs-content .ant-form-item { + margin-bottom: 0px; +} +.ant-table-tbody .ant-table-row td { + padding-top: 10px; + padding-bottom: 10px; +} + +.anty-row-operator button { + margin: 0 5px; +} + +.ant-btn-danger { + background-color: #ffffff; +} + +.ant-modal-cust-warp { + height: 100%; +} + +.ant-modal-cust-warp .ant-modal-body { + height: calc(100% - 110px) !important; + overflow-y: auto; +} + +.ant-modal-cust-warp .ant-modal-content { + height: 90% !important; + overflow-y: hidden; +} + +/deep/ .notshow { + display: none; +} + +.frozenRowClass { + color: #c9c9c9; +} +.hight { + color: #f5222d; +} +.middle { + color: #fa8c16; +} +.low { + color: #52c41a; +} +.dataUnKnow { + color: #1890ff; +} + +/deep/ .frozenRowClass { + color: #c9c9c9; +} +</style> \ No newline at end of file -- Gitblit v1.9.3