| | |
| | | // 打开详情抽屉时禁用设备编码、设备名称输入框 |
| | | this.$refs.modalForm.disSeach = true; |
| | | // 调用抽屉表单组件中的清除表单验证方法 |
| | | this.$refs.modalForm.removeValidate() |
| | | if(this.$refs.modalForm.removeValidate) { |
| | | this.$refs.modalForm.removeValidate() |
| | | } |
| | | |
| | | }, |
| | | /* 导出 */ |
| | | handleExportXls2(){ |
| | |
| | | :scroll="{ x: 'max-content' }" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | |
| | | <span slot="equipmentImportance" slot-scope="text"> |
| | | <lx-switch v-model="text" disabled checked-children='是' un-checked-children='否' /> |
| | | <lx-switch v-model="text" disabled checked-children="是" un-checked-children="否" /> |
| | | </span> |
| | | |
| | | <span slot="mdcFlag" slot-scope="text"> |
| | | <lx-switch v-model="text" disabled checked-children="是" un-checked-children="否" /> |
| | | </span> |
| | | <span slot="processParametersFlag" slot-scope="text"> |
| | | <lx-switch v-model="text" disabled checked-children="是" un-checked-children="否" /> |
| | | </span> |
| | | <span slot="precisionParametersFlag" slot-scope="text"> |
| | | <lx-switch v-model="text" disabled checked-children="是" un-checked-children="否" /> |
| | | </span> |
| | | <span slot="specialEquipment" slot-scope="text"> |
| | | <lx-switch v-model="text" disabled checked-children="是" un-checked-children="否" /> |
| | | </span> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">编辑</a> |
| | | |
| | |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a href="javascript:;" @click="handleDetail(record)">详情</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
| | | <a>删除</a> |
| | |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | }, |
| | | fixed: 'left', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: '设备编号', |
| | |
| | | { |
| | | title: '关键设备标识', |
| | | align: 'center', |
| | | width : 100, |
| | | width: 100, |
| | | dataIndex: 'equipmentImportance', |
| | | scopedSlots: { customRender: 'equipmentImportance' } |
| | | }, |
| | | { |
| | | title: '技术状态', |
| | | align: 'center', |
| | | width : 100, |
| | | width: 100, |
| | | dataIndex: 'technologyStatus_dictText' |
| | | }, |
| | | { |
| | | title: '操作系统', |
| | | align: 'center', |
| | | width : 100, |
| | | width: 100, |
| | | dataIndex: 'operationSystem' |
| | | }, |
| | | { |
| | | title: '使用车间', |
| | | align: 'center', |
| | | width : 100, |
| | | dataIndex: 'orgId' |
| | | width: 100, |
| | | dataIndex: 'orgId_dictText' |
| | | }, |
| | | { |
| | | title: '设备管理员', |
| | | align: 'center', |
| | | width : 100, |
| | | dataIndex: 'equipmentManager' |
| | | width: 100, |
| | | dataIndex: 'equipmentManager_dictText' |
| | | }, |
| | | { |
| | | title: '设备分类', |
| | | align: 'center', |
| | | width : 100, |
| | | width: 100, |
| | | dataIndex: 'equipmentCategory_dictText' |
| | | }, |
| | | { |
| | | title: '设备型号', |
| | | align: 'center', |
| | | width : 100, |
| | | width: 100, |
| | | dataIndex: 'equipmentModel' |
| | | }, |
| | | { |
| | | title: '设备规格', |
| | | align: 'center', |
| | | width : 100, |
| | | width: 100, |
| | | dataIndex: 'equipmentSpecification' |
| | | }, |
| | | { |
| | | title: '主轴连接尺寸', |
| | | align: 'center', |
| | | width : 100, |
| | | width: 100, |
| | | dataIndex: 'spindleConnectDimension' |
| | | }, |
| | | { |
| | | title: '总功率', |
| | | align: 'center', |
| | | width : 100, |
| | | width: 100, |
| | | dataIndex: 'equipmentPower' |
| | | }, |
| | | { |
| | | title: '安装位置', |
| | | align: 'center', |
| | | width : 100, |
| | | width: 100, |
| | | dataIndex: 'installationPosition' |
| | | }, |
| | | { |
| | | title: '资产状态', |
| | | align: 'center', |
| | | width : 100, |
| | | width: 100, |
| | | dataIndex: 'assetStatus_dictText' |
| | | }, |
| | | { |
| | | title: '立项卡号', |
| | | align: 'center', |
| | | width : 100, |
| | | width: 100, |
| | | dataIndex: 'cardNumber' |
| | | }, |
| | | { |
| | | title: '出厂编号', |
| | | align: 'center', |
| | | width : 100, |
| | | width: 100, |
| | | dataIndex: 'factoryNumber' |
| | | }, |
| | | { |
| | | title: '机床厂家', |
| | | align: 'center', |
| | | width : 100, |
| | | width: 100, |
| | | dataIndex: 'manufacturingEnterprise' |
| | | }, |
| | | { |
| | | title: '来源国家', |
| | | align: 'center', |
| | | width : 100, |
| | | width: 100, |
| | | dataIndex: 'originCountry' |
| | | }, |
| | | { |
| | | title: '出厂日期', |
| | | align: 'center', |
| | | width : 100, |
| | | width: 100, |
| | | dataIndex: 'leaveFactoryDate' |
| | | }, |
| | | { |
| | | title: '验收日期', |
| | | align: 'center', |
| | | width : 100, |
| | | width: 100, |
| | | dataIndex: 'acceptanceCheckDate' |
| | | }, |
| | | { |
| | | title: '质保开始日期', |
| | | align: 'center', |
| | | width : 100, |
| | | width: 100, |
| | | dataIndex: 'warrantyStartDate' |
| | | }, |
| | | { |
| | | title: '质保结束日期', |
| | | align: 'center', |
| | | width : 100, |
| | | width: 100, |
| | | dataIndex: 'warrantyEndDate' |
| | | }, |
| | | { |
| | | title: '是否实施MDC', |
| | | align: 'center', |
| | | width : 100, |
| | | dataIndex: 'mdcFlag' |
| | | width: 100, |
| | | dataIndex: 'mdcFlag', |
| | | scopedSlots: { customRender: 'mdcFlag' } |
| | | }, |
| | | { |
| | | title: '是否有工艺参数', |
| | | title: '有无工艺参数', |
| | | align: 'center', |
| | | width : 100, |
| | | dataIndex: 'processParametersFlag' |
| | | width: 100, |
| | | dataIndex: 'processParametersFlag', |
| | | scopedSlots: { customRender: 'processParametersFlag' } |
| | | }, |
| | | { |
| | | title: '是否有精度参数', |
| | | title: '有无精度参数', |
| | | align: 'center', |
| | | width : 100, |
| | | dataIndex: 'precisionParametersFlag' |
| | | width: 100, |
| | | dataIndex: 'precisionParametersFlag', |
| | | scopedSlots: { customRender: 'precisionParametersFlag' } |
| | | }, |
| | | { |
| | | title: '是否为特种设备', |
| | | align: 'center', |
| | | width : 100, |
| | | dataIndex: 'specialEquipment' |
| | | width: 100, |
| | | dataIndex: 'specialEquipment', |
| | | scopedSlots: { customRender: 'specialEquipment' } |
| | | }, |
| | | { |
| | | title: '重量', |
| | |
| | | :visible="visible" |
| | | centered |
| | | :confirmLoading="confirmLoading" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | |
| | | <a-row> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="equipmentCode" label="设备编号"> |
| | | <a-input placeholder="请输入设备编号" v-model="model.equipmentCode"/> |
| | | <a-input placeholder="请输入设备编号" v-model="model.equipmentCode" :disabled="editable || disableSubmit" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="equipmentName" label="设备名称"> |
| | | <a-input placeholder="请输入设备名称" v-model="model.equipmentName"/> |
| | | <a-input placeholder="请输入设备名称" v-model="model.equipmentName" :disabled="disableSubmit" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="equipmentModel" label="设备型号"> |
| | | <a-input placeholder="请输入设备型号" v-model="model.equipmentModel"/> |
| | | <a-input :placeholder="disableSubmit?'':'请输入设备型号'" v-model="model.equipmentModel" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="equipmentSpecification" |
| | | label="设备规格"> |
| | | <a-input placeholder="请输入设备规格" v-model="model.equipmentSpecification"/> |
| | | <a-input :placeholder="disableSubmit?'':'请输入设备规格'" v-model="model.equipmentSpecification" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="equipmentCategory" |
| | | label="设备分类"> |
| | | <j-dict-select-tag dict-code="equipment_category" placeholder="请选择设备分类" |
| | | v-model="model.equipmentCategory"/> |
| | | v-model="model.equipmentCategory" :disabled="disableSubmit" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="operationSystem" |
| | | label="操作系统"> |
| | | <a-input placeholder="请输入操作系统" v-model="model.operationSystem"/> |
| | | <a-input :placeholder="disableSubmit?'':'请输入操作系统'" v-model="model.operationSystem" :disabled="disableSubmit" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | checked-children='是' |
| | | un-checked-children='否' |
| | | v-model="model.equipmentImportance" |
| | | :disabled="disableSubmit" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="equipmentPower" label="总功率"> |
| | | <a-input placeholder="请输入总功率" v-model="model.equipmentPower"/> |
| | | <a-input :placeholder="disableSubmit?'':'请输入总功率'" v-model="model.equipmentPower" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="cardNumber" label="立项卡号"> |
| | | <a-input placeholder="请输入立项卡号" v-model="model.cardNumber"/> |
| | | <a-input :placeholder="disableSubmit?'':'请输入立项卡号'" v-model="model.cardNumber" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <j-image-upload></j-image-upload> |
| | | <j-image-upload text="设备图片" biz="eam_equipment_image" v-model="model.equipmentImage"></j-image-upload> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="equipmentWeight" label="重量"> |
| | | <a-input placeholder="请输入重量" v-model="model.equipmentWeight"/> |
| | | <a-input :placeholder="disableSubmit?'':'请输入重量'" v-model="model.equipmentWeight" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="equipmentPort" label="设备端口"> |
| | | <a-input placeholder="请输入设备端口" v-model="model.equipmentPort"/> |
| | | <a-input :placeholder="disableSubmit?'':'请输入设备端口'" v-model="model.equipmentPort" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="coordinateNum" label="坐标数量"> |
| | | <a-input-number v-model="model.coordinateNum" style="width: 100%"/> |
| | | <a-input-number :placeholder="disableSubmit?'':'请输入坐标数量'" v-model="model.coordinateNum" style="width: 100%" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="assetStatus" label="资产状态"> |
| | | <j-dict-select-tag dict-code="asset_status" placeholder="请选择资产状态" v-model="model.assetStatus" |
| | | <j-dict-select-tag dict-code="asset_status" v-model="model.assetStatus" |
| | | disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="factoryNumber" label="出厂编号"> |
| | | <a-input placeholder="请输入出厂编号" v-model="model.factoryNumber"/> |
| | | <a-input :placeholder="disableSubmit?'':'请输入出厂编号'" v-model="model.factoryNumber" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="leaveFactoryDate" label="出厂日期"> |
| | | <a-date-picker placeholder="请选择出厂日期" v-model="model.leaveFactoryDate"/> |
| | | <a-date-picker placeholder="请选择出厂日期" v-model="model.leaveFactoryDate" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="acceptanceCheckDate" label="验收日期"> |
| | | <a-date-picker placeholder="请选择验收日期" v-model="model.acceptanceCheckDate"/> |
| | | <a-date-picker placeholder="请选择验收日期" v-model="model.acceptanceCheckDate" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="installationPosition" label="安装位置"> |
| | | <a-input placeholder="请输入安装位置" v-model="model.installationPosition"/> |
| | | <a-input :placeholder="disableSubmit?'':'请输入安装位置'" v-model="model.installationPosition" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="spindleConnectDimension" label="主轴连接尺寸"> |
| | | <a-input placeholder="请输入主轴连接尺寸" v-model="model.spindleConnectDimension"/> |
| | | <a-input :placeholder="disableSubmit?'':'请输入主轴连接尺寸'" v-model="model.spindleConnectDimension" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="specialEquipment" label="是否特种设备"> |
| | | <lx-switch checked-children='是' un-checked-children='否' v-model="model.specialEquipment"/> |
| | | <lx-switch checked-children='是' un-checked-children='否' v-model="model.specialEquipment" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="manufacturingEnterprise" label="制造厂家"> |
| | | <a-input placeholder="请输入制造厂家" v-model="model.manufacturingEnterprise"/> |
| | | <a-input :placeholder="disableSubmit?'':'请输入制造厂家'" v-model="model.manufacturingEnterprise" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="originCountry" label="来源国家"> |
| | | <a-input placeholder="请输入来源国家" v-model="model.originCountry"/> |
| | | <a-input :placeholder="disableSubmit?'':'请输入来源国家'" v-model="model.originCountry" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | placeholder="请选择使用车间" |
| | | allow-clear |
| | | tree-default-expand-all |
| | | :disabled="editable || disableSubmit" |
| | | > |
| | | </a-tree-select> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="equipmentManager" label="设备管理员"> |
| | | <j-search-select-tag placeholder="请选择设备管理员" v-model="model.equipmentManager" dict="sys_user,realname, username, del_flag=0"/> |
| | | <j-search-select-tag placeholder="请选择设备管理员" v-model="model.equipmentManager" dict="sys_user,realname, username, del_flag=0" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="technologyStatus" label="技术状态"> |
| | | <j-dict-select-tag dict-code="technology_status" placeholder="请选择技术状态" |
| | | v-model="model.technologyStatus"/> |
| | | v-model="model.technologyStatus" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="mdcFlag" label="是否实施MDC"> |
| | | <lx-switch checked-children='是' un-checked-children='否' @change="handleMdcFlagChange" v-model="model.mdcFlag"/> |
| | | <lx-switch checked-children='是' un-checked-children='否' @change="handleMdcFlagChange" v-model="model.mdcFlag" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6" v-if="model.mdcFlag === '1'"> |
| | | <a-form-model-item prop="deviceType" label="MDC设备类型"> |
| | | <j-search-select-tag placeholder="请选择设备类型" v-model="model.deviceType" dict="mdc_equipment_type,equipment_type_name, equipment_type_name, equipment_type_states='Y'" /> |
| | | <j-search-select-tag placeholder="请选择设备类型" v-model="model.deviceType" dict="mdc_equipment_type,equipment_type_name, equipment_type_name, equipment_type_states='Y'" :disabled="disableSubmit" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="warrantyStartDate" label="质保开始日期"> |
| | | <a-date-picker placeholder="请选择开始日期" v-model="model.warrantyStartDate"/> |
| | | <a-date-picker :placeholder="disableSubmit?'':'请选择开始日期'" v-model="model.warrantyStartDate" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="warrantyEndDate" label="质保结束日期"> |
| | | <a-date-picker placeholder="请选择结束日期" v-model="model.warrantyEndDate"/> |
| | | <a-date-picker :placeholder="disableSubmit?'':'请选择结束日期'" v-model="model.warrantyEndDate" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="processParametersFlag" label="有无工艺参数"> |
| | | <lx-switch checked-children='有' un-checked-children='无' v-model="model.processParametersFlag"/> |
| | | <lx-switch checked-children='有' un-checked-children='无' v-model="model.processParametersFlag" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="precisionParametersFlag" label="有无精度参数"> |
| | | <lx-switch checked-children='有' un-checked-children='无' v-model="model.precisionParametersFlag"/> |
| | | <lx-switch checked-children='有' un-checked-children='无' v-model="model.precisionParametersFlag" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="remark" label="备注"> |
| | | <a-textarea placeholder="请输入备注" v-model="model.remark"/> |
| | | <a-textarea :placeholder="disableSubmit?'':'请输入备注'" v-model="model.remark" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | return { |
| | | title: '操作', |
| | | visible: false, |
| | | //控制编辑 |
| | | editable: false, |
| | | //详情控制 |
| | | disableSubmit: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.editable = false; |
| | | //初始化默认值 |
| | | this.edit({}) |
| | | this.model = {}; |
| | | this.visible = true |
| | | }, |
| | | edit(record) { |
| | | this.editable = true; |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | handleMdcFlagChange(checked){ |
| | | this.model.deviceType = ''; |
| | | if (checked) { |
| | | this.validatorRules.deviceType[0].required = true |
| | | } else { |