1、增加首页背景图
2、新增零部件管理页面并实现相应功能
| | |
| | | deleteParamThresholdApi: id => deleteAction('/mdc/mdcEquipmentThreshold/delete', { id }), |
| | | // å é¤è®¾å¤åæ°éå¼ |
| | | deleteBatchParamThresholdApi: ids => deleteAction('/mdc/mdcEquipmentThreshold/deleteBatch', { ids }), |
| | | // -------------------------------------é¶é¨ä»¶ç®¡ç页é¢-------------------------------------------- |
| | | // å¢å 设å¤åæ°éå¼ |
| | | addSparePartApi: params => postAction('/mdc/mdcComponentInfo/add', params), |
| | | // ç¼è¾è®¾å¤åæ°éå¼ |
| | | editSparePartApi: params => postAction('/mdc/mdcComponentInfo/edit', params), |
| | | // è·åç产线 |
| | | getProductionLineApi: () => getAction('/mdc/mdcProduction/productionList'), |
| | | // è·åç产线ä¸è®¾å¤å表 |
| | | getEquipmentListByProductionIdApi: productionId => getAction('/mdc/mdcEquipment/equipmentListByProduction', { productionId }), |
| | | // -------------------------------------æ»æ§è½¦é´çæ¿é¡µé¢-------------------------------------------- |
| | | // è·åæ¨æ¥æ¦åµ |
| | | getYesterdayOverviewApi: () => getAction('/mdc/largeScreen/yesterdayOverview'), |
| | |
| | | <span slot="tab" :pagekey="page.fullPath">{{ page.meta.title }}</span> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | <div style="margin: 12px 12px 0;"> |
| | | <div :style="{margin:$route.meta.title!=='é¦é¡µ'? '12px 12px 0':0,flex:1,display: 'flex',flexDirection: 'column'}"> |
| | | <!-- update-begin-author:taoyan date:20201221 for:æ¤å¤å ætransitionæ ç¾ ä¸ç¥é为ä»ä¹å ä¸å 页é¢è·¯ç±åæ¢çæ¶åå³1åèååå°2åèåçæ¶å 两个èå页é¢ä¼åæ¶åºç°300-500ç§å·¦å³ --> |
| | | <keep-alive v-if="multipage"> |
| | | <router-view v-if="reloadFlag"/> |
| | |
| | | * You can easily play with the page transition by editing |
| | | * these styles. |
| | | */ |
| | | |
| | | .page-transition-enter { |
| | | opacity: 0; |
| | | } |
| | |
| | | /> |
| | | |
| | | <!-- layout content --> |
| | | <a-layout-content :style="{ height: '100%', paddingTop: fixedHeader ? '59px' : '0' }"> |
| | | <a-layout-content :style="{ height: '100%', paddingTop: fixedHeader ? '59px' : '0' ,display:'flex',flexDirection:'column'}"> |
| | | <slot></slot> |
| | | </a-layout-content> |
| | | |
| | |
| | | <template> |
| | | <div> |
| | | |
| | | <div class="container"> |
| | | <img src="@/assets/dashboard.jpg"> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | |
| | | |
| | | export default { |
| | | name: "Analysis", |
| | | components: { |
| | | |
| | | }, |
| | | name: 'Analysis', |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | indexStyle:1 |
| | | indexStyle: 1 |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | methods: { |
| | | methods: {} |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | .container { |
| | | flex: 1; |
| | | display: flex; |
| | | flex-direction: column; |
| | | img { |
| | | width: 100%; |
| | | flex: 1; |
| | | } |
| | | } |
| | | </script> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="é¶ä»¶åç§°"> |
| | | <j-input placeholder="请è¾å
¥é¶ä»¶åç§°" v-model="queryParam.componentName"></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <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 @click="handleToggleSearch" style="margin-left: 8px">--> |
| | | <!--{{ toggleSearchStatus ? 'æ¶èµ·' : 'å±å¼' }}--> |
| | | <!--<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>--> |
| | | <!--</a>--> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</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}" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange" |
| | | :scroll="{x:'max-content',y:465}" |
| | | > |
| | | <span slot="overallFlag" slot-scope="text"> |
| | | {{text=='Y'?'æ¯':'å¦'}} |
| | | </span> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | |
| | | <a-divider type="vertical"/> |
| | | |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <SparePartsModal ref="modalForm" @ok="modalFormOk"></SparePartsModal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import SparePartsModal from './modules/SparePartsManagement/SparePartsModal' |
| | | |
| | | export default { |
| | | name: 'SparePartsManagement', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | SparePartsModal |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'é¶é¨ä»¶ç®¡ç页é¢', |
| | | /* å页忰 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 30, |
| | | pageSizeOptions: ['30', '50', '100'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'é¶ä»¶å·', |
| | | align: 'center', |
| | | dataIndex: 'componentNo', |
| | | width: 300 |
| | | }, |
| | | { |
| | | title: 'é¶ä»¶åç§°', |
| | | align: 'center', |
| | | dataIndex: 'componentName', |
| | | width: 300 |
| | | }, |
| | | { |
| | | title: 'ç产è½', |
| | | align: 'center', |
| | | dataIndex: 'scheduleNum', |
| | | width: 175 |
| | | }, |
| | | { |
| | | title: 'æ¥äº§è½', |
| | | align: 'center', |
| | | dataIndex: 'dayNum', |
| | | width: 175 |
| | | }, |
| | | { |
| | | title: '产线', |
| | | align: 'center', |
| | | dataIndex: 'productionId_dictText', |
| | | width: 300 |
| | | }, |
| | | { |
| | | title: 'æ¯å¦ä¸ºèªå¨çº¿', |
| | | align: 'center', |
| | | dataIndex: 'overallFlag', |
| | | scopedSlots: { customRender: 'overallFlag' }, |
| | | width: 175 |
| | | }, |
| | | { |
| | | title: 'ç产设å¤', |
| | | align: 'center', |
| | | dataIndex: 'equipmentId', |
| | | width: 175 |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | width: 150, |
| | | fixed: 'right' |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/mdc/mdcComponentInfo/list', |
| | | delete: '/mdc/mdcComponentInfo/delete', |
| | | deleteBatch: '/mdc/mdcComponentInfo/deleteBatch' |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: {}, |
| | | methods: {} |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :maskClosable="true" |
| | | :width="modalWidth" |
| | | @cancel="handleModalClose" |
| | | :visible="visible"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :form="form" :model="model" :rules="validatorRules"> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="componentNo" label="é¶ä»¶å·" :labelCol="labelColLong" |
| | | :wrapperCol="wrapperColLong"> |
| | | <a-input v-model="model.componentNo" placeholder="请è¾å
¥é¶ä»¶å·"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="componentName" label="é¶ä»¶åç§°" :labelCol="labelColLong" |
| | | :wrapperCol="wrapperColLong"> |
| | | <a-input v-model="model.componentName" placeholder="请è¾å
¥é¶ä»¶åç§°"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="scheduleNum" label="ç产è½" :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol"> |
| | | <a-input v-model="model.scheduleNum" placeholder="请è¾å
¥ç产è½"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="dayNum" label="天产è½" :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol"> |
| | | <a-input v-model="model.dayNum" placeholder="请è¾å
¥å¤©äº§è½"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="productionId" label="ç产线" :labelCol="labelColLong" |
| | | :wrapperCol="wrapperColLong"> |
| | | <a-select v-model="model.productionId" @change="handleProductionLineChange" |
| | | placeholder="è¯·éæ©ç产线"> |
| | | <a-select-option v-for="(item,index) in productionList" :key="index" :value="item.id"> |
| | | {{item.productionName}} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="overallFlag" label="æ¯å¦ä¸ºèªå¨çº¿" :labelCol="{xs: { span: 24 },sm: { span: 8 }}" |
| | | :wrapperCol="{xs: { span: 24 },sm: { span: 16 }}"> |
| | | <j-switch v-model="model.overallFlag"></j-switch> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="equipmentId" label="ç产设å¤" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-select v-model="model.equipmentId" placeholder="è¯·éæ©ç产设å¤" style="width: 100%"> |
| | | <a-select-option v-for="(item,index) in equipmentList" :key="index" :value="item.equipmentId"> |
| | | {{item.equipmentId}} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | </a-row> |
| | | |
| | | </a-form-model> |
| | | </a-spin> |
| | | |
| | | |
| | | <template slot="footer"> |
| | | <a-popconfirm title="ç¡®å®æ¾å¼æä½ï¼" @confirm="visible=false" okText="ç¡®å®" cancelText="åæ¶"> |
| | | <a-button style="margin-right: .8rem">åæ¶</a-button> |
| | | </a-popconfirm> |
| | | <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">æäº¤</a-button> |
| | | </template> |
| | | |
| | | </a-modal> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import api from '@/api/mdc' |
| | | |
| | | export default { |
| | | name: 'SparePartsModal', |
| | | components: {}, |
| | | props: { |
| | | driveTypeList: { |
| | | type: Array |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | modalWidth: 700, |
| | | form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | componentNo: [ |
| | | { |
| | | required: true, message: '请è¾å
¥é¶ä»¶å·' |
| | | } |
| | | ], |
| | | componentName: [ |
| | | { |
| | | required: true, message: '请è¾å
¥é¶ä»¶åç§°' |
| | | } |
| | | ], |
| | | scheduleNum: [ |
| | | { |
| | | required: true, message: '请è¾å
¥ç产è½' |
| | | } |
| | | ], |
| | | dayNum: [ |
| | | { |
| | | required: true, message: '请è¾å
¥å¤©äº§è½' |
| | | } |
| | | ], |
| | | productionId: [ |
| | | { |
| | | required: true, message: 'è¯·éæ©ç产线' |
| | | } |
| | | ] |
| | | }, |
| | | title: 'æä½', |
| | | visible: false, |
| | | model: { |
| | | componentNo: '', |
| | | componentName: '', |
| | | scheduleNum: '', |
| | | dayNum: '', |
| | | overallFlag: 'Y' |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 18 } |
| | | }, |
| | | labelColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 3 } |
| | | }, |
| | | wrapperColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 21 } |
| | | }, |
| | | confirmLoading: false, |
| | | productionList: [], |
| | | equipmentList: [] |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.visible = true |
| | | this.model = { |
| | | componentNo: '', |
| | | componentName: '', |
| | | scheduleNum: '', |
| | | dayNum: '', |
| | | overallFlag: 'Y' |
| | | } |
| | | this.getProductionLineByApi() |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'componentNo', 'componentName', 'scheduleNum', 'dayNum', 'overallFlag')) |
| | | }) |
| | | }, |
| | | |
| | | edit(record) { |
| | | this.visible = true |
| | | this.model = Object.assign({}, record) |
| | | console.log('model', this.model) |
| | | this.getProductionLineByApi() |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'componentNo', 'componentName', 'scheduleNum', 'dayNum', 'productionId', 'overallFlag', 'equipmentId')) |
| | | }) |
| | | }, |
| | | |
| | | handleSubmit() { |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true |
| | | let obj |
| | | if (this.title == 'æ°å¢') { |
| | | obj = api.addSparePartApi(this.model) |
| | | } else { |
| | | obj = api.editSparePartApi(this.model) |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.$emit('ok') |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | this.visible = false |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | getProductionLineByApi() { |
| | | api.getProductionLineApi() |
| | | .then(res => { |
| | | if (res.success) { |
| | | console.log('res', res) |
| | | this.productionList = res.result |
| | | if (this.model.productionId) { |
| | | if (!this.model.equipmentId) delete this.model.equipmentId |
| | | this.getEquipmentListByProductionId() |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * ç产线éä¸åè·å对åºçäº§è®¾å¤ |
| | | */ |
| | | handleProductionLineChange() { |
| | | delete this.model.equipmentId |
| | | this.getEquipmentListByProductionId() |
| | | }, |
| | | |
| | | getEquipmentListByProductionId() { |
| | | api.getEquipmentListByProductionIdApi(this.model.productionId) |
| | | .then(res => { |
| | | console.log('res=-', res) |
| | | this.equipmentList = res.result.records |
| | | }) |
| | | }, |
| | | |
| | | handleModalClose() { |
| | | this.visible = false |
| | | this.equipmentList = [] |
| | | }, |
| | | |
| | | /** |
| | | * ç¼è¾ææ¥ç详æ
æ°æ®æ¶æ¸
餿½å±è¡¨åéªè¯ |
| | | */ |
| | | removeValidate() { |
| | | if (this.$refs.form) this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |