parent
23cf772c66
commit
28f88603d4
3 changed files with 662 additions and 649 deletions
@ -1,302 +1,307 @@ |
||||
<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-model-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="organizer"> |
||||
<a-input v-model="queryParam.brandId" placeholder="请输入品牌名称" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<a-form-model-item label="型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="organizer"> |
||||
<a-input v-model="queryParam.modelId" placeholder="请输入品牌名称" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<a-form-model-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="organizer"> |
||||
<a-input v-model="queryParam.name" placeholder="请输入名称" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="organizer"> |
||||
<a-input v-model="queryParam.code" placeholder="请输入编号" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<a-form-model-item label="设备状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status"> |
||||
<j-dict-select-tag type="radio" v-model="queryParam.status" dictCode="devicestatus1" |
||||
placeholder="设备状态"></j-dict-select-tag> |
||||
</a-form-model-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> |
||||
</span> |
||||
</a-col> |
||||
</a-row> |
||||
</a-form> |
||||
</div> |
||||
<!-- 查询区域-END --> |
||||
|
||||
<!-- 操作按钮区域 --> |
||||
<div class="table-operator"> |
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
||||
<!-- <a-button type="primary" icon="download" @click="handleExportXls('设备信息')">导出</a-button>--> |
||||
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> |
||||
<!-- <a-button type="primary" icon="import">导入</a-button>--> |
||||
<!-- </a-upload>--> |
||||
<!-- <!– 高级查询区域 –>--> |
||||
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> |
||||
<!-- <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" |
||||
:scroll="{x:true}" |
||||
bordered |
||||
rowKey="id" |
||||
:columns="columns" |
||||
:dataSource="dataSource" |
||||
:pagination="ipagination" |
||||
:loading="loading" |
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
||||
class="j-table-force-nowrap" |
||||
@change="handleTableChange"> |
||||
|
||||
<template slot="htmlSlot" slot-scope="text"> |
||||
<div v-html="text"></div> |
||||
</template> |
||||
<template slot="imgSlot" slot-scope="text"> |
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
||||
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
||||
</template> |
||||
<template slot="imgeSlot" slot-scope="text"> |
||||
<img :src="text" height="" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
||||
</template> |
||||
<template slot="img3dSlot" slot-scope="text"> |
||||
<a :href="text" target="_blank">显示3d模型</a> |
||||
|
||||
</template> |
||||
<template slot="fileSlot" slot-scope="text"> |
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
||||
<a-button |
||||
v-else |
||||
:ghost="true" |
||||
type="primary" |
||||
icon="download" |
||||
size="small" |
||||
@click="downloadFile(text)"> |
||||
下载 |
||||
</a-button> |
||||
</template> |
||||
|
||||
<span slot="action" slot-scope="text, record"> |
||||
<a @click="handleEdit(record)">编辑</a> |
||||
<a-divider type="vertical" /> |
||||
<a @click="openDetail(record.id)">详情</a> |
||||
<a-divider type="vertical" /> |
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
||||
<a>删除</a> |
||||
</a-popconfirm> |
||||
|
||||
</span> |
||||
|
||||
</a-table> |
||||
</div> |
||||
<ZyDeviceDetail ref="ZyDeviceDetail"></ZyDeviceDetail> |
||||
<zy-device-modal ref="modalForm" @ok="modalFormOk"></zy-device-modal> |
||||
</a-card> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import '@/assets/less/TableExpand.less' |
||||
import { mixinDevice } from '@/utils/mixin' |
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
||||
import ZyDeviceModal from './modules/ZyDeviceModal' |
||||
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
||||
import ZyDeviceDetail from './modules/ZyDeviceDetail' |
||||
export default { |
||||
name: 'ZyDeviceList', |
||||
mixins:[JeecgListMixin, mixinDevice], |
||||
components: { |
||||
ZyDeviceModal, |
||||
ZyDeviceDetail |
||||
}, |
||||
data () { |
||||
return { |
||||
description: '设备信息管理页面', |
||||
labelCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 5 }, |
||||
}, |
||||
wrapperCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 16 }, |
||||
}, |
||||
// 表头 |
||||
columns: [ |
||||
{ |
||||
title: '#', |
||||
dataIndex: '', |
||||
key:'rowIndex', |
||||
width:60, |
||||
align:"center", |
||||
customRender:function (t,r,index) { |
||||
return parseInt(index)+1; |
||||
} |
||||
}, |
||||
{ |
||||
title:'设备类型编码', |
||||
align:"center", |
||||
dataIndex: 'typeCode' |
||||
}, |
||||
{ |
||||
title:'设备型号', |
||||
align:"center", |
||||
dataIndex: 'modelId_dictText' |
||||
}, |
||||
{ |
||||
title:'设备品牌', |
||||
align:"center", |
||||
dataIndex: 'brandId_dictText' |
||||
}, |
||||
{ |
||||
title:'设备名称', |
||||
align:"center", |
||||
dataIndex: 'name' |
||||
}, |
||||
{ |
||||
title:'设备图片', |
||||
align:"center", |
||||
dataIndex: 'img', |
||||
scopedSlots: {customRender: 'imgSlot'} |
||||
}, |
||||
{ |
||||
title:'设备二维码', |
||||
align:"center", |
||||
dataIndex: 'qrcode', |
||||
scopedSlots: {customRender: 'imgeSlot'} |
||||
}, |
||||
|
||||
{ |
||||
title:'设备编号', |
||||
align:"center", |
||||
dataIndex: 'code' |
||||
}, |
||||
{ |
||||
title:'购买时间', |
||||
align:"center", |
||||
dataIndex: 'buydate', |
||||
customRender:function (text) { |
||||
return !text?"":(text.length>10?text.substr(0,10):text) |
||||
} |
||||
}, |
||||
{ |
||||
title:'经办人', |
||||
align:"center", |
||||
dataIndex: 'agent_dictText' |
||||
}, |
||||
{ |
||||
title:'设备状态', |
||||
align:"center", |
||||
dataIndex: 'status_dictText' |
||||
}, |
||||
{ |
||||
title:'维护周期', |
||||
align:"center", |
||||
dataIndex: 'maintenancecycle' |
||||
}, |
||||
{ |
||||
title:'管理人', |
||||
align:"center", |
||||
dataIndex: 'administrator_dictText' |
||||
}, |
||||
{ |
||||
title:'上次维护时间', |
||||
align:"center", |
||||
dataIndex: 'maintenancedate', |
||||
customRender:function (text) { |
||||
return !text?"":(text.length>10?text.substr(0,10):text) |
||||
} |
||||
}, |
||||
{ |
||||
title:'3d模型', |
||||
align:"center", |
||||
dataIndex: 'img3d', |
||||
scopedSlots: {customRender: 'img3dSlot'} |
||||
}, |
||||
{ |
||||
title: '操作', |
||||
dataIndex: 'action', |
||||
align:"center", |
||||
// fixed:"right", |
||||
width:147, |
||||
scopedSlots: { customRender: 'action' } |
||||
} |
||||
], |
||||
url: { |
||||
list: "/device/zyDevice/list", |
||||
delete: "/device/zyDevice/delete", |
||||
deleteBatch: "/device/zyDevice/deleteBatch", |
||||
exportXlsUrl: "/device/zyDevice/exportXls", |
||||
importExcelUrl: "device/zyDevice/importExcel", |
||||
|
||||
}, |
||||
dictOptions:{}, |
||||
superFieldList:[], |
||||
} |
||||
}, |
||||
created() { |
||||
this.getSuperFieldList(); |
||||
console.log(this.superFieldList) |
||||
}, |
||||
computed: { |
||||
importExcelUrl: function(){ |
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||
}, |
||||
}, |
||||
methods: { |
||||
initDictConfig(){ |
||||
}, |
||||
getSuperFieldList(){ |
||||
let fieldList=[]; |
||||
fieldList.push({type:'string',value:'img',text:'设备图片',dictCode:''}) |
||||
fieldList.push({type:'string',value:'typeid',text:'设备类型',dictCode:'zy_devicetype,name,id'}) |
||||
fieldList.push({type:'string',value:'code',text:'设备编号',dictCode:''}) |
||||
fieldList.push({type:'date',value:'buydate',text:'购买时间'}) |
||||
fieldList.push({type:'sel_user',value:'agent',text:'经办人'}) |
||||
fieldList.push({type:'string',value:'adress',text:'存放位置',dictCode:''}) |
||||
fieldList.push({type:'string',value:'status',text:'设备状态',dictCode:''}) |
||||
fieldList.push({type:'string',value:'maintenancecycle',text:'维护周期',dictCode:''}) |
||||
fieldList.push({type:'sel_user',value:'administrator',text:'管理人'}) |
||||
fieldList.push({type:'date',value:'maintenancedate',text:'上次维护时间'}) |
||||
fieldList.push({type:'string',value:'img3d',text:'3d模型',dictCode:''}) |
||||
this.superFieldList = fieldList |
||||
}, |
||||
openDetail(id){ |
||||
this.$refs.ZyDeviceDetail.showModal(id) |
||||
// this.$children[0].showModal(id) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
<style scoped> |
||||
@import '~@assets/less/common.less'; |
||||
<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-model-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="organizer"> |
||||
<a-input v-model="queryParam.brandId" placeholder="请输入品牌名称" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<a-form-model-item label="型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="organizer"> |
||||
<a-input v-model="queryParam.modelId" placeholder="请输入品牌名称" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<a-form-model-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="organizer"> |
||||
<a-input v-model="queryParam.name" placeholder="请输入名称" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="organizer"> |
||||
<a-input v-model="queryParam.code" placeholder="请输入编号" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<a-form-model-item label="设备状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status"> |
||||
<j-dict-select-tag type="radio" v-model="queryParam.status" dictCode="devicestatus1" |
||||
placeholder="设备状态"></j-dict-select-tag> |
||||
</a-form-model-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> |
||||
</span> |
||||
</a-col> |
||||
</a-row> |
||||
</a-form> |
||||
</div> |
||||
<!-- 查询区域-END --> |
||||
|
||||
<!-- 操作按钮区域 --> |
||||
<div class="table-operator"> |
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
||||
<!-- <a-button type="primary" icon="download" @click="handleExportXls('设备信息')">导出</a-button>--> |
||||
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> |
||||
<!-- <a-button type="primary" icon="import">导入</a-button>--> |
||||
<!-- </a-upload>--> |
||||
<!-- <!– 高级查询区域 –>--> |
||||
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> |
||||
<!-- <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" |
||||
:scroll="{x:true}" |
||||
bordered |
||||
rowKey="id" |
||||
:columns="columns" |
||||
:dataSource="dataSource" |
||||
:pagination="ipagination" |
||||
:loading="loading" |
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
||||
class="j-table-force-nowrap" |
||||
@change="handleTableChange"> |
||||
|
||||
<template slot="htmlSlot" slot-scope="text"> |
||||
<div v-html="text"></div> |
||||
</template> |
||||
<template slot="imgSlot" slot-scope="text"> |
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
||||
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
||||
</template> |
||||
<template slot="imgeSlot" slot-scope="text"> |
||||
<img :src="text" height="" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
||||
</template> |
||||
<template slot="img3dSlot" slot-scope="text"> |
||||
<a :href="text" target="_blank">显示3d模型</a> |
||||
|
||||
</template> |
||||
<template slot="fileSlot" slot-scope="text"> |
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
||||
<a-button |
||||
v-else |
||||
:ghost="true" |
||||
type="primary" |
||||
icon="download" |
||||
size="small" |
||||
@click="downloadFile(text)"> |
||||
下载 |
||||
</a-button> |
||||
</template> |
||||
|
||||
<span slot="action" slot-scope="text, record"> |
||||
<a @click="handleEdit(record)">编辑</a> |
||||
<a-divider type="vertical" /> |
||||
<a @click="openDetail(record.id)">详情</a> |
||||
<a-divider type="vertical" /> |
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
||||
<a>删除</a> |
||||
</a-popconfirm> |
||||
|
||||
</span> |
||||
|
||||
</a-table> |
||||
</div> |
||||
<ZyDeviceDetail ref="ZyDeviceDetail"></ZyDeviceDetail> |
||||
<zy-device-modal ref="modalForm" @ok="modalFormOk"></zy-device-modal> |
||||
</a-card> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import '@/assets/less/TableExpand.less' |
||||
import { mixinDevice } from '@/utils/mixin' |
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
||||
import ZyDeviceModal from './modules/ZyDeviceModal' |
||||
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
||||
import ZyDeviceDetail from './modules/ZyDeviceDetail' |
||||
export default { |
||||
name: 'ZyDeviceList', |
||||
mixins:[JeecgListMixin, mixinDevice], |
||||
components: { |
||||
ZyDeviceModal, |
||||
ZyDeviceDetail |
||||
}, |
||||
data () { |
||||
return { |
||||
description: '设备信息管理页面', |
||||
labelCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 5 }, |
||||
}, |
||||
wrapperCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 16 }, |
||||
}, |
||||
// 表头 |
||||
columns: [ |
||||
{ |
||||
title: '#', |
||||
dataIndex: '', |
||||
key:'rowIndex', |
||||
width:60, |
||||
align:"center", |
||||
customRender:function (t,r,index) { |
||||
return parseInt(index)+1; |
||||
} |
||||
}, |
||||
{ |
||||
title:'设备类型编码', |
||||
align:"center", |
||||
dataIndex: 'typeCode' |
||||
}, |
||||
{ |
||||
title:'设备型号', |
||||
align:"center", |
||||
dataIndex: 'modelId_dictText' |
||||
}, |
||||
{ |
||||
title:'设备品牌', |
||||
align:"center", |
||||
dataIndex: 'brandId_dictText' |
||||
}, |
||||
{ |
||||
title:'设备名称', |
||||
align:"center", |
||||
dataIndex: 'name' |
||||
}, |
||||
{ |
||||
title:'设备图片', |
||||
align:"center", |
||||
dataIndex: 'img', |
||||
scopedSlots: {customRender: 'imgSlot'} |
||||
}, |
||||
{ |
||||
title:'设备二维码', |
||||
align:"center", |
||||
dataIndex: 'qrcode', |
||||
scopedSlots: {customRender: 'imgeSlot'} |
||||
}, |
||||
|
||||
{ |
||||
title:'设备编号', |
||||
align:"center", |
||||
dataIndex: 'code' |
||||
}, |
||||
{ |
||||
title:'购买时间', |
||||
align:"center", |
||||
dataIndex: 'buydate', |
||||
customRender:function (text) { |
||||
return !text?"":(text.length>10?text.substr(0,10):text) |
||||
} |
||||
}, |
||||
{ |
||||
title:'经办人', |
||||
align:"center", |
||||
dataIndex: 'agent_dictText' |
||||
}, |
||||
{ |
||||
title:'设备状态', |
||||
align:"center", |
||||
dataIndex: 'status_dictText' |
||||
}, |
||||
{ |
||||
title:'设备日负载', |
||||
align:"center", |
||||
dataIndex: 'val' |
||||
}, |
||||
{ |
||||
title:'维护周期', |
||||
align:"center", |
||||
dataIndex: 'maintenancecycle' |
||||
}, |
||||
{ |
||||
title:'管理人', |
||||
align:"center", |
||||
dataIndex: 'administrator_dictText' |
||||
}, |
||||
{ |
||||
title:'上次维护时间', |
||||
align:"center", |
||||
dataIndex: 'maintenancedate', |
||||
customRender:function (text) { |
||||
return !text?"":(text.length>10?text.substr(0,10):text) |
||||
} |
||||
}, |
||||
{ |
||||
title:'3d模型', |
||||
align:"center", |
||||
dataIndex: 'img3d', |
||||
scopedSlots: {customRender: 'img3dSlot'} |
||||
}, |
||||
{ |
||||
title: '操作', |
||||
dataIndex: 'action', |
||||
align:"center", |
||||
// fixed:"right", |
||||
width:147, |
||||
scopedSlots: { customRender: 'action' } |
||||
} |
||||
], |
||||
url: { |
||||
list: "/device/zyDevice/list", |
||||
delete: "/device/zyDevice/delete", |
||||
deleteBatch: "/device/zyDevice/deleteBatch", |
||||
exportXlsUrl: "/device/zyDevice/exportXls", |
||||
importExcelUrl: "device/zyDevice/importExcel", |
||||
|
||||
}, |
||||
dictOptions:{}, |
||||
superFieldList:[], |
||||
} |
||||
}, |
||||
created() { |
||||
this.getSuperFieldList(); |
||||
console.log(this.superFieldList) |
||||
}, |
||||
computed: { |
||||
importExcelUrl: function(){ |
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||
}, |
||||
}, |
||||
methods: { |
||||
initDictConfig(){ |
||||
}, |
||||
getSuperFieldList(){ |
||||
let fieldList=[]; |
||||
fieldList.push({type:'string',value:'img',text:'设备图片',dictCode:''}) |
||||
fieldList.push({type:'string',value:'typeid',text:'设备类型',dictCode:'zy_devicetype,name,id'}) |
||||
fieldList.push({type:'string',value:'code',text:'设备编号',dictCode:''}) |
||||
fieldList.push({type:'date',value:'buydate',text:'购买时间'}) |
||||
fieldList.push({type:'sel_user',value:'agent',text:'经办人'}) |
||||
fieldList.push({type:'string',value:'adress',text:'存放位置',dictCode:''}) |
||||
fieldList.push({type:'string',value:'status',text:'设备状态',dictCode:''}) |
||||
fieldList.push({type:'string',value:'maintenancecycle',text:'维护周期',dictCode:''}) |
||||
fieldList.push({type:'sel_user',value:'administrator',text:'管理人'}) |
||||
fieldList.push({type:'date',value:'maintenancedate',text:'上次维护时间'}) |
||||
fieldList.push({type:'string',value:'img3d',text:'3d模型',dictCode:''}) |
||||
this.superFieldList = fieldList |
||||
}, |
||||
openDetail(id){ |
||||
this.$refs.ZyDeviceDetail.showModal(id) |
||||
// this.$children[0].showModal(id) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
<style scoped> |
||||
@import '~@assets/less/common.less'; |
||||
</style> |
@ -1,223 +1,228 @@ |
||||
<template> |
||||
<a-spin :spinning="confirmLoading"> |
||||
<j-form-container :disabled="formDisabled"> |
||||
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
||||
<a-row> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="所属部门" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="manufacturer"> |
||||
<j-select-depart v-model="model.orgCode" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
|
||||
<a-col :span="24"> |
||||
<a-form-model-item label="设备名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name"> |
||||
<a-input v-model="model.name" placeholder="请输入设备名称" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="设备图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="img"> |
||||
<j-image-upload isMultiple v-model="model.img" ></j-image-upload> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="设备类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeid">--> |
||||
<!-- <j-dict-select-tag type="list" v-model="model.typeid" dictCode="zy_devicetype,name,id" pidField="pid"--> |
||||
<!-- pidValue="" placeholder="请选择设备类型" />--> |
||||
|
||||
<!-- <!– <j-tree-select--> |
||||
<!-- v-decorator="[model.typeid]"--> |
||||
<!-- placeholder="父级节点"--> |
||||
<!-- dict="zy_devicetype,name,id"--> |
||||
<!-- pidField="pid"--> |
||||
<!-- pidValue=""--> |
||||
<!-- />–>--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="购买时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="buydate"> |
||||
<j-date placeholder="请选择购买时间" v-model="model.buydate" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="经办人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="agent"> |
||||
<j-select-user-by-dep v-model="model.agent" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="存放位置" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="adress">--> |
||||
<!-- <a-input v-model="model.adress" placeholder="请输入存放位置" ></a-input>--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="设备状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status"> |
||||
<j-dict-select-tag type="radio" v-model="model.status" dictCode="devicestatus1" |
||||
placeholder="设备状态"></j-dict-select-tag> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="维护周期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancecycle"> |
||||
<a-input v-model="model.maintenancecycle" placeholder="请输入维护周期" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="管理人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="administrator"> |
||||
<j-select-user-by-dep v-model="model.administrator" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="上次维护时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancedate"> |
||||
<j-date placeholder="请选择上次维护时间" v-model="model.maintenancedate" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="3d模型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="img3d"> |
||||
<!-- <j-upload v-model="model.img3d" ></j-upload>--> |
||||
<a-input v-model="model.img3d" placeholder="请输入模型地址" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="设备品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status"> |
||||
<j-dict-select-tag v-model="model.brandId" dictCode="zy_devicebrand,brand,id" |
||||
placeholder="设备品牌" ></j-dict-select-tag> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="类型编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="devicetypeCode ">--> |
||||
<!-- <j-popup--> |
||||
<!-- v-model="model.code1"--> |
||||
<!-- field="code1"--> |
||||
<!-- org-fields="model,id"--> |
||||
<!-- dest-fields="code1,modelId"--> |
||||
<!-- code="zy_devicemodel"--> |
||||
<!-- :multi="false"--> |
||||
<!-- :param="parm1"--> |
||||
<!-- @input="popupCallback"--> |
||||
<!-- />--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- <a-input v-model="model.modelId" hidden/>--> |
||||
<!-- </a-col>--> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="类型编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeCode"> |
||||
<j-popup |
||||
v-model="model.typeCode" |
||||
field="typeCode" |
||||
org-fields="code" |
||||
dest-fields="typeCode" |
||||
code="zy_devicetype" |
||||
:multi="false" |
||||
:param="parm1" |
||||
@input="popupCallback" |
||||
/> |
||||
</a-form-model-item> |
||||
<a-input v-model="model.modelId" hidden/> |
||||
</a-col> |
||||
</a-row> |
||||
</a-form-model> |
||||
</j-form-container> |
||||
</a-spin> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import { httpAction, getAction } from '@/api/manage' |
||||
import { validateDuplicateValue } from '@/utils/util' |
||||
|
||||
export default { |
||||
name: 'ZyDeviceForm', |
||||
components: { |
||||
}, |
||||
props: { |
||||
//表单禁用 |
||||
disabled: { |
||||
type: Boolean, |
||||
default: false, |
||||
required: false |
||||
} |
||||
}, |
||||
data () { |
||||
return { |
||||
parm1:{ |
||||
brand_id:'' |
||||
}, |
||||
model:{ |
||||
status:1, |
||||
}, |
||||
labelCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 5 }, |
||||
}, |
||||
wrapperCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 16 }, |
||||
}, |
||||
confirmLoading: false, |
||||
validatorRules: { |
||||
name:[ |
||||
{ required: true, message: '请输入设备名称!'}, |
||||
{min: 1, max: 200, message: '最多输入200字!', trigger: 'blur'}, |
||||
], |
||||
}, |
||||
url: { |
||||
add: "/device/zyDevice/add", |
||||
edit: "/device/zyDevice/edit", |
||||
queryById: "/device/zyDevice/queryById" |
||||
} |
||||
} |
||||
}, |
||||
computed: { |
||||
formDisabled(){ |
||||
return this.disabled |
||||
}, |
||||
}, |
||||
created () { |
||||
//备份model原始值 |
||||
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
||||
}, |
||||
methods: { |
||||
canshu(){ |
||||
this.parm1.brand_id=this.model.canshu |
||||
// console.log(this.parm1) |
||||
}, |
||||
add () { |
||||
this.edit(this.modelDefault); |
||||
}, |
||||
edit (record) { |
||||
this.model = Object.assign({}, record); |
||||
this.model.code1=this.model.typeCode |
||||
this.visible = true; |
||||
}, |
||||
submitForm () { |
||||
const that = this; |
||||
// 触发表单验证 |
||||
this.$refs.form.validate(valid => { |
||||
if (valid) { |
||||
that.confirmLoading = true; |
||||
let httpurl = ''; |
||||
let method = ''; |
||||
if(!this.model.id){ |
||||
httpurl+=this.url.add; |
||||
method = 'post'; |
||||
}else{ |
||||
httpurl+=this.url.edit; |
||||
method = 'put'; |
||||
} |
||||
httpAction(httpurl,this.model,method).then((res)=>{ |
||||
if(res.success){ |
||||
that.$message.success(res.message); |
||||
that.$emit('ok'); |
||||
}else{ |
||||
that.$message.warning(res.message); |
||||
} |
||||
}).finally(() => { |
||||
that.confirmLoading = false; |
||||
}) |
||||
} |
||||
|
||||
}) |
||||
}, |
||||
popupCallback(value,row){ |
||||
this.model = Object.assign(this.model, row); |
||||
}, |
||||
} |
||||
} |
||||
<template> |
||||
<a-spin :spinning="confirmLoading"> |
||||
<j-form-container :disabled="formDisabled"> |
||||
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
||||
<a-row> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="所属部门" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="manufacturer"> |
||||
<j-select-depart v-model="model.orgCode" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
|
||||
<a-col :span="24"> |
||||
<a-form-model-item label="设备名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name"> |
||||
<a-input v-model="model.name" placeholder="请输入设备名称" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="设备图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="img"> |
||||
<j-image-upload isMultiple v-model="model.img" ></j-image-upload> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="设备类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeid">--> |
||||
<!-- <j-dict-select-tag type="list" v-model="model.typeid" dictCode="zy_devicetype,name,id" pidField="pid"--> |
||||
<!-- pidValue="" placeholder="请选择设备类型" />--> |
||||
|
||||
<!-- <!– <j-tree-select--> |
||||
<!-- v-decorator="[model.typeid]"--> |
||||
<!-- placeholder="父级节点"--> |
||||
<!-- dict="zy_devicetype,name,id"--> |
||||
<!-- pidField="pid"--> |
||||
<!-- pidValue=""--> |
||||
<!-- />–>--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="购买时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="buydate"> |
||||
<j-date placeholder="请选择购买时间" v-model="model.buydate" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="经办人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="agent"> |
||||
<j-select-user-by-dep v-model="model.agent" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="存放位置" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="adress">--> |
||||
<!-- <a-input v-model="model.adress" placeholder="请输入存放位置" ></a-input>--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="设备状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status"> |
||||
<j-dict-select-tag type="radio" v-model="model.status" dictCode="devicestatus1" |
||||
placeholder="设备状态"></j-dict-select-tag> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="设备日负载" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="val"> |
||||
<a-input v-model="model.val" placeholder="设备日负载" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="维护周期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancecycle"> |
||||
<a-input v-model="model.maintenancecycle" placeholder="请输入维护周期" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="管理人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="administrator"> |
||||
<j-select-user-by-dep v-model="model.administrator" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="上次维护时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancedate"> |
||||
<j-date placeholder="请选择上次维护时间" v-model="model.maintenancedate" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="3d模型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="img3d"> |
||||
<!-- <j-upload v-model="model.img3d" ></j-upload>--> |
||||
<a-input v-model="model.img3d" placeholder="请输入模型地址" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="设备品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status"> |
||||
<j-dict-select-tag v-model="model.brandId" dictCode="zy_devicebrand,brand,id" |
||||
placeholder="设备品牌" ></j-dict-select-tag> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="类型编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="devicetypeCode ">--> |
||||
<!-- <j-popup--> |
||||
<!-- v-model="model.code1"--> |
||||
<!-- field="code1"--> |
||||
<!-- org-fields="model,id"--> |
||||
<!-- dest-fields="code1,modelId"--> |
||||
<!-- code="zy_devicemodel"--> |
||||
<!-- :multi="false"--> |
||||
<!-- :param="parm1"--> |
||||
<!-- @input="popupCallback"--> |
||||
<!-- />--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- <a-input v-model="model.modelId" hidden/>--> |
||||
<!-- </a-col>--> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="类型编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeCode"> |
||||
<j-popup |
||||
v-model="model.typeCode" |
||||
field="typeCode" |
||||
org-fields="code" |
||||
dest-fields="typeCode" |
||||
code="zy_devicetype" |
||||
:multi="false" |
||||
:param="parm1" |
||||
@input="popupCallback" |
||||
/> |
||||
</a-form-model-item> |
||||
<a-input v-model="model.modelId" hidden/> |
||||
</a-col> |
||||
</a-row> |
||||
</a-form-model> |
||||
</j-form-container> |
||||
</a-spin> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import { httpAction, getAction } from '@/api/manage' |
||||
import { validateDuplicateValue } from '@/utils/util' |
||||
|
||||
export default { |
||||
name: 'ZyDeviceForm', |
||||
components: { |
||||
}, |
||||
props: { |
||||
//表单禁用 |
||||
disabled: { |
||||
type: Boolean, |
||||
default: false, |
||||
required: false |
||||
} |
||||
}, |
||||
data () { |
||||
return { |
||||
parm1:{ |
||||
brand_id:'' |
||||
}, |
||||
model:{ |
||||
status:1, |
||||
}, |
||||
labelCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 5 }, |
||||
}, |
||||
wrapperCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 16 }, |
||||
}, |
||||
confirmLoading: false, |
||||
validatorRules: { |
||||
name:[ |
||||
{ required: true, message: '请输入设备名称!'}, |
||||
{min: 1, max: 200, message: '最多输入200字!', trigger: 'blur'}, |
||||
], |
||||
}, |
||||
url: { |
||||
add: "/device/zyDevice/add", |
||||
edit: "/device/zyDevice/edit", |
||||
queryById: "/device/zyDevice/queryById" |
||||
} |
||||
} |
||||
}, |
||||
computed: { |
||||
formDisabled(){ |
||||
return this.disabled |
||||
}, |
||||
}, |
||||
created () { |
||||
//备份model原始值 |
||||
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
||||
}, |
||||
methods: { |
||||
canshu(){ |
||||
this.parm1.brand_id=this.model.canshu |
||||
// console.log(this.parm1) |
||||
}, |
||||
add () { |
||||
this.edit(this.modelDefault); |
||||
}, |
||||
edit (record) { |
||||
this.model = Object.assign({}, record); |
||||
this.model.code1=this.model.typeCode |
||||
this.visible = true; |
||||
}, |
||||
submitForm () { |
||||
const that = this; |
||||
// 触发表单验证 |
||||
this.$refs.form.validate(valid => { |
||||
if (valid) { |
||||
that.confirmLoading = true; |
||||
let httpurl = ''; |
||||
let method = ''; |
||||
if(!this.model.id){ |
||||
httpurl+=this.url.add; |
||||
method = 'post'; |
||||
}else{ |
||||
httpurl+=this.url.edit; |
||||
method = 'put'; |
||||
} |
||||
httpAction(httpurl,this.model,method).then((res)=>{ |
||||
if(res.success){ |
||||
that.$message.success(res.message); |
||||
that.$emit('ok'); |
||||
}else{ |
||||
that.$message.warning(res.message); |
||||
} |
||||
}).finally(() => { |
||||
that.confirmLoading = false; |
||||
}) |
||||
} |
||||
|
||||
}) |
||||
}, |
||||
popupCallback(value,row){ |
||||
this.model = Object.assign(this.model, row); |
||||
}, |
||||
} |
||||
} |
||||
</script> |
@ -1,126 +1,129 @@ |
||||
package org.jeecg.modules.device.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.io.UnsupportedEncodingException; |
||||
import java.util.Date; |
||||
import java.math.BigDecimal; |
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import lombok.Data; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
import org.jeecgframework.poi.excel.annotation.Excel; |
||||
import org.jeecg.common.aspect.annotation.Dict; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.EqualsAndHashCode; |
||||
import lombok.experimental.Accessors; |
||||
|
||||
/** |
||||
* @Description: 设备信息 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2021-11-11 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Data |
||||
@TableName("zy_device") |
||||
@Accessors(chain = true) |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@ApiModel(value="zy_device对象", description="设备信息") |
||||
public class ZyDevice implements Serializable { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/**主键*/ |
||||
@TableId(type = IdType.ASSIGN_ID) |
||||
@ApiModelProperty(value = "主键") |
||||
private String id; |
||||
/**创建人*/ |
||||
@ApiModelProperty(value = "创建人") |
||||
private String createBy; |
||||
/**创建日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "创建日期") |
||||
private Date createTime; |
||||
/**更新人*/ |
||||
@ApiModelProperty(value = "更新人") |
||||
private String updateBy; |
||||
/**更新日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "更新日期") |
||||
private Date updateTime; |
||||
/**所属部门*/ |
||||
@ApiModelProperty(value = "所属部门") |
||||
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") |
||||
private String orgCode; |
||||
/**设备图片*/ |
||||
@Excel(name = "设备图片", width = 15) |
||||
@ApiModelProperty(value = "设备图片") |
||||
private String img; |
||||
/**设备类型*/ |
||||
// @Excel(name = "设备类型", width = 15, dictTable = "zy_devicetype", dicText = "name", dicCode = "id")
|
||||
// @Dict(dictTable = "zy_devicetype", dicText = "name", dicCode = "id")
|
||||
// @ApiModelProperty(value = "设备类型")
|
||||
// private String typeid;
|
||||
/**设备编号*/ |
||||
@Excel(name = "设备编号", width = 15) |
||||
@ApiModelProperty(value = "设备编号") |
||||
private String code; |
||||
/**购买时间*/ |
||||
@Excel(name = "购买时间", width = 15, format = "yyyy-MM-dd") |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd") |
||||
@ApiModelProperty(value = "购买时间") |
||||
private Date buydate; |
||||
/**经办人*/ |
||||
@Excel(name = "经办人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username") |
||||
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username") |
||||
@ApiModelProperty(value = "经办人") |
||||
private String agent; |
||||
/**存放位置*/ |
||||
// @Excel(name = "存放位置", width = 15)
|
||||
// @ApiModelProperty(value = "存放位置")
|
||||
// private String adress;
|
||||
/**设备状态*/ |
||||
@Excel(name = "设备状态", width = 15) |
||||
@ApiModelProperty(value = "设备状态") |
||||
@Dict(dicCode = "devicestatus1") |
||||
private String status; |
||||
/**二维码*/ |
||||
@Excel(name = "二维码", width = 15) |
||||
@ApiModelProperty(value = "二维码") |
||||
private String qrcode; |
||||
/**维护周期*/ |
||||
@Excel(name = "维护周期", width = 15) |
||||
@ApiModelProperty(value = "维护周期") |
||||
private Integer maintenancecycle; |
||||
/**管理人*/ |
||||
@Excel(name = "管理人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username") |
||||
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username") |
||||
@ApiModelProperty(value = "管理人") |
||||
private String administrator; |
||||
/**上次维护时间*/ |
||||
@Excel(name = "上次维护时间", width = 15, format = "yyyy-MM-dd") |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd") |
||||
@ApiModelProperty(value = "上次维护时间") |
||||
private Date maintenancedate; |
||||
/**3d模型*/ |
||||
@Excel(name = "3d模型", width = 15) |
||||
@ApiModelProperty(value = "3d模型") |
||||
private String img3d; |
||||
// @Excel(name = "设备品牌", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
|
||||
@Dict(dictTable = "zy_devicebrand", dicText = "brand", dicCode = "id") |
||||
@ApiModelProperty(value = "设备品牌") |
||||
private String brandId; |
||||
@Dict(dictTable = "zy_devicemodel", dicText = "model", dicCode = "id") |
||||
@ApiModelProperty(value = "设备型号") |
||||
private String modelId; |
||||
@ApiModelProperty(value = "设备类型") |
||||
private String typeCode; |
||||
|
||||
@ApiModelProperty(value = "设备名称") |
||||
private String name; |
||||
} |
||||
package org.jeecg.modules.device.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.io.UnsupportedEncodingException; |
||||
import java.util.Date; |
||||
import java.math.BigDecimal; |
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import lombok.Data; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
import org.jeecgframework.poi.excel.annotation.Excel; |
||||
import org.jeecg.common.aspect.annotation.Dict; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.EqualsAndHashCode; |
||||
import lombok.experimental.Accessors; |
||||
|
||||
/** |
||||
* @Description: 设备信息 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2021-11-11 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Data |
||||
@TableName("zy_device") |
||||
@Accessors(chain = true) |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@ApiModel(value="zy_device对象", description="设备信息") |
||||
public class ZyDevice implements Serializable { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/**主键*/ |
||||
@TableId(type = IdType.ASSIGN_ID) |
||||
@ApiModelProperty(value = "主键") |
||||
private String id; |
||||
/**创建人*/ |
||||
@ApiModelProperty(value = "创建人") |
||||
private String createBy; |
||||
/**创建日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "创建日期") |
||||
private Date createTime; |
||||
/**更新人*/ |
||||
@ApiModelProperty(value = "更新人") |
||||
private String updateBy; |
||||
/**更新日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "更新日期") |
||||
private Date updateTime; |
||||
/**所属部门*/ |
||||
@ApiModelProperty(value = "所属部门") |
||||
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") |
||||
private String orgCode; |
||||
/**设备图片*/ |
||||
@Excel(name = "设备图片", width = 15) |
||||
@ApiModelProperty(value = "设备图片") |
||||
private String img; |
||||
/**设备类型*/ |
||||
// @Excel(name = "设备类型", width = 15, dictTable = "zy_devicetype", dicText = "name", dicCode = "id")
|
||||
// @Dict(dictTable = "zy_devicetype", dicText = "name", dicCode = "id")
|
||||
// @ApiModelProperty(value = "设备类型")
|
||||
// private String typeid;
|
||||
/**设备编号*/ |
||||
@Excel(name = "设备编号", width = 15) |
||||
@ApiModelProperty(value = "设备编号") |
||||
private String code; |
||||
/**购买时间*/ |
||||
@Excel(name = "购买时间", width = 15, format = "yyyy-MM-dd") |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd") |
||||
@ApiModelProperty(value = "购买时间") |
||||
private Date buydate; |
||||
/**经办人*/ |
||||
@Excel(name = "经办人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username") |
||||
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username") |
||||
@ApiModelProperty(value = "经办人") |
||||
private String agent; |
||||
/**存放位置*/ |
||||
// @Excel(name = "存放位置", width = 15)
|
||||
// @ApiModelProperty(value = "存放位置")
|
||||
// private String adress;
|
||||
/**设备状态*/ |
||||
@Excel(name = "设备状态", width = 15) |
||||
@ApiModelProperty(value = "设备状态") |
||||
@Dict(dicCode = "devicestatus1") |
||||
private String status; |
||||
/**二维码*/ |
||||
@Excel(name = "二维码", width = 15) |
||||
@ApiModelProperty(value = "二维码") |
||||
private String qrcode; |
||||
/**维护周期*/ |
||||
@Excel(name = "维护周期", width = 15) |
||||
@ApiModelProperty(value = "维护周期") |
||||
private Integer maintenancecycle; |
||||
/**管理人*/ |
||||
@Excel(name = "管理人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username") |
||||
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username") |
||||
@ApiModelProperty(value = "管理人") |
||||
private String administrator; |
||||
/**上次维护时间*/ |
||||
@Excel(name = "上次维护时间", width = 15, format = "yyyy-MM-dd") |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd") |
||||
@ApiModelProperty(value = "上次维护时间") |
||||
private Date maintenancedate; |
||||
/**3d模型*/ |
||||
@Excel(name = "3d模型", width = 15) |
||||
@ApiModelProperty(value = "3d模型") |
||||
private String img3d; |
||||
// @Excel(name = "设备品牌", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
|
||||
@Dict(dictTable = "zy_devicebrand", dicText = "brand", dicCode = "id") |
||||
@ApiModelProperty(value = "设备品牌") |
||||
private String brandId; |
||||
@Dict(dictTable = "zy_devicemodel", dicText = "model", dicCode = "id") |
||||
@ApiModelProperty(value = "设备型号") |
||||
private String modelId; |
||||
@ApiModelProperty(value = "设备类型") |
||||
private String typeCode; |
||||
|
||||
@ApiModelProperty(value = "设备名称") |
||||
private String name; |
||||
|
||||
@ApiModelProperty(value = "设备日负载") |
||||
private Integer val; |
||||
} |
||||
|
Loading…
Reference in new issue