| | |
| | | <a-input placeholder="" v-model="queryParam.workshopName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <span style="float: left; overflow: hidden" class="table-page-search-submitButtons"> |
| | | <a-col :md="12" :sm="24"> |
| | | <a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 21px">查询</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
| | |
| | | <a-button @click="handleAdd" type="primary" icon="plus">新建车间</a-button> |
| | | </div> |
| | | |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"> |
| | | </i> 已选择 <a><b>{{ selectedRowKeys1.length }}</b></a>项 |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"> </i> 已选择 |
| | | <a |
| | | ><b>{{ selectedRowKeys1.length }}</b></a |
| | | >项 |
| | | <a style="margin-left: 24px" @click="onClearSelected1">清空</a> |
| | | </div> |
| | | |
| | |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type:'radio'}" |
| | | @change="handleTableChange"> |
| | | @change="handleTableChange" |
| | | > |
| | | <template slot="backgroundImage" slot-scope="text,record"> |
| | | <img :src="getImgView(record.backgroundImage)" width="50" height="50"> |
| | | <img :src="getImgView(record.backgroundImage)" width="50" height="50" /> |
| | | </template> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleOpen(record)">车间</a> |
| | | <a @click="handleOpen(record)">设备</a> |
| | | <a-divider type="vertical"/> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link"> |
| | | 更多 <a-icon type="down"/> |
| | | </a> |
| | | <a class="ant-dropdown-link"> 更多 <a-icon type="down" /> </a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handleEdit(record)">编辑</a> |
| | |
| | | </a-col> |
| | | <a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 1"> |
| | | <a-card :bordered="false"> |
| | | <div style="text-align: right;"> |
| | | <div style="text-align: right"> |
| | | <a-icon type="close-circle" @click="hideUserList"/> |
| | | </div> |
| | | <!-- 查询区域 --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline"> |
| | | <a-row :gutter="24"> |
| | | |
| | | <a-col :md="12" :sm="12"> |
| | | <a-form-item label="设备编码"> |
| | | <a-input placeholder="" v-model="queryParam2.equipmentId"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <span style="float: left; overflow: hidden" class="table-page-search-submitButtons"> |
| | | <a-col :md="9" :sm="24"> |
| | | <a-button type="primary" @click="searchQuery2" icon="search" style="margin-left: 21px">查询</a-button> |
| | | <a-button type="primary" @click="searchReset2" icon="reload" style="margin-left: 8px">重置</a-button> |
| | | |
| | | </a-col> |
| | | </span> |
| | | </a-row> |
| | |
| | | </div> |
| | | <!-- 操作按钮区域 --> |
| | | <div class="table-operator" :md="24" :sm="24"> |
| | | <a-button @click="handleAddDeviceInWorkshop" type="primary" icon="plus" style="margin-top: 16px">已有设备 |
| | | <a-button @click="handleAddDeviceInWorkshop" type="primary" icon="plus" style="margin-top: 16px" |
| | | >已有设备 |
| | | </a-button> |
| | | |
| | | <a-dropdown v-if="selectedRowKeys2.length > 0"> |
| | |
| | | 删除 |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> 批量操作 |
| | | <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">{{ |
| | | selectedRowKeys2.length }}</a>项 |
| | | <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">{{ selectedRowKeys2.length }}</a |
| | | >项 |
| | | <a style="margin-left: 24px" @click="onClearSelected2">清空</a> |
| | | </div> |
| | | <a-table |
| | |
| | | :pagination="ipagination2" |
| | | :loading="loading2" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2}" |
| | | @change="handleTableChange2"> |
| | | @change="handleTableChange2" |
| | | > |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete2(record.equipmentId)"> |
| | | <a>删除</a> |
| | |
| | | </a-card> |
| | | </a-col> |
| | | <!-- 表单区域 --> |
| | | <workshop-modal ref="modalForm" @ok="modalFormOk"></workshop-modal> <!--新增车间--> |
| | | <select-device-modal ref="selectUserModal" @selectFinished="selectOK"></select-device-modal> <!--已有设备--> |
| | | <workshop-modal ref="modalForm" @ok="modalFormOk"></workshop-modal> |
| | | <!--新增车间--> |
| | | <select-device-modal ref="selectUserModal" @selectFinished="selectOK"></select-device-modal> |
| | | <!--已有设备--> |
| | | </a-row> |
| | | </template> |
| | | <script> |
| | |
| | | components: { |
| | | SelectDeviceModal, |
| | | WorkshopModal, |
| | | moment |
| | | moment, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | total: 0, |
| | | }, |
| | | ipagination2: { |
| | | current: 1, |
| | |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | total: 0, |
| | | }, |
| | | isorter1: { |
| | | column: 'createTime', |
| | | order: 'desc' |
| | | order: 'desc', |
| | | }, |
| | | isorter2: { |
| | | column: 'createTime', |
| | | order: 'desc' |
| | | order: 'desc', |
| | | }, |
| | | filters1: {}, |
| | | filters2: {}, |
| | |
| | | { |
| | | title: '车间名称', |
| | | align: 'center', |
| | | dataIndex: 'workshopName' |
| | | dataIndex: 'workshopName', |
| | | }, |
| | | { |
| | | title: '车间背景图', |
| | | dataIndex: 'backgroundImage', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'backgroundImage' } |
| | | scopedSlots: { customRender: 'backgroundImage' }, |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | scopedSlots: { customRender: 'action' }, |
| | | }, |
| | | ], |
| | | columns2: [ |
| | | { |
| | | title: '设备编码', |
| | | align: 'center', |
| | | dataIndex: 'equipmentId', |
| | | width: 120 |
| | | width: 120, |
| | | }, |
| | | { |
| | | title: '设备名称', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'equipmentName' |
| | | dataIndex: 'equipmentName', |
| | | }, |
| | | { |
| | | title: '设备类型', |
| | | align: 'center', |
| | | width: 80, |
| | | dataIndex: 'equipmentType' |
| | | dataIndex: 'equipmentType', |
| | | }, |
| | | |
| | | { |
| | |
| | | dataIndex: 'action', |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: 'center', |
| | | width: 120 |
| | | }], |
| | | width: 120, |
| | | }, |
| | | ], |
| | | // 高级查询参数 |
| | | superQueryParams2: '', |
| | | // 高级查询拼接条件 |
| | |
| | | list2: '/mdc/mdcWorkshopInfo/workshopEquipmentList', |
| | | addDeviceInWorkshop: '/mdc/mdcWorkshopInfo/addWorkshopEquipment', |
| | | delete2: '/mdc/mdcWorkshopInfo/deleteWorkshopEquipment', |
| | | deleteBatch2: '/mdc/mdcWorkshopInfo/deleteWorkshopEquipmentBatch' |
| | | } |
| | | deleteBatch2: '/mdc/mdcWorkshopInfo/deleteWorkshopEquipmentBatch', |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | }, |
| | | rightColMd() { |
| | | return this.selectedRowKeys1.length === 0 ? 0 : 12 |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | onSelectChange2(selectedRowKeys, selectionRows) { |
| | |
| | | // this.$message.warning('请选择一条记录!') |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | | description: '请选择一条记录' |
| | | description: '请选择一条记录', |
| | | }) |
| | | return |
| | | } else { |
| | |
| | | onOk: function() { |
| | | deleteAction(that.url.deleteBatch2, { |
| | | workshopId: that.currentWorkshopId, |
| | | equipmentIds: ids |
| | | equipmentIds: ids, |
| | | }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | }) |
| | | } |
| | | }, |
| | |
| | | hideUserList() { |
| | | //this.rightcolval = 0 |
| | | this.selectedRowKeys1 = [] |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | /** Button按钮间距 */ |
| | | .ant-btn { |
| | | margin-left: 8px |
| | | margin-left: 8px; |
| | | } |
| | | </style> |