dev
parent
c5203e407c
commit
aa28880ef8
@ -0,0 +1,220 @@
|
||||
<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="电表编号">
|
||||
<!-- <a-input placeholder="请输入设备编号" v-model="queryParam.eqtNo"></a-input>-->
|
||||
<j-input placeholder="请输入电表编号" v-model="queryParam.eqtNo"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
||||
<a-form-item label="开始时间">
|
||||
<j-date placeholder="请选择开始日期" class="query-group-cust" v-model="queryParam.createTime"></j-date>
|
||||
<span class="query-group-split-cust"></span>
|
||||
<j-date placeholder="请选择结束日期" class="query-group-cust" v-model="queryParam.updateTime"></j-date>
|
||||
</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>
|
||||
|
||||
</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('tt_electric_meter')">导出</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,record">
|
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
|
||||
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
|
||||
</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-dropdown>
|
||||
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item>
|
||||
<a @click="handleDetail(record)">详情</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||
<a>删除</a>
|
||||
</a-popconfirm>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
</span>
|
||||
|
||||
</a-table>
|
||||
</div>
|
||||
|
||||
<tt-electric-meter-modal ref="modalForm" @ok="modalFormOk"></tt-electric-meter-modal>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import '@/assets/less/TableExpand.less'
|
||||
import { mixinDevice } from '@/utils/mixin'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import TtElectricMeterModal from './modules/TtElectricMeterModal'
|
||||
import JInput from '@/components/jeecg/JInput'
|
||||
export default {
|
||||
name: 'TtElectricMeterList',
|
||||
mixins:[JeecgListMixin, mixinDevice],
|
||||
components: {
|
||||
TtElectricMeterModal,
|
||||
JInput
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
description: 'tt_electric_meter管理页面',
|
||||
// 表头
|
||||
columns: [
|
||||
// {
|
||||
// title: '#',
|
||||
// dataIndex: '',
|
||||
// key:'rowIndex',
|
||||
// width:60,
|
||||
// align:"center",
|
||||
// customRender:function (t,r,index) {
|
||||
// return parseInt(index)+1;
|
||||
// }
|
||||
// },
|
||||
{
|
||||
title:'电表编号',
|
||||
align:"center",
|
||||
dataIndex: 'eqtNo'
|
||||
},
|
||||
{
|
||||
title:'设备位置',
|
||||
align:"center",
|
||||
dataIndex: 'location'
|
||||
},
|
||||
{
|
||||
title:'谷电量(度)',
|
||||
align:"center",
|
||||
dataIndex: 'valleyPower'
|
||||
},
|
||||
{
|
||||
title:'峰电量(度)',
|
||||
align:"center",
|
||||
dataIndex: 'peakPower'
|
||||
},
|
||||
{
|
||||
title:'采集时间',
|
||||
align:"center",
|
||||
dataIndex: 'createTime'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align:"center",
|
||||
fixed:"right",
|
||||
width:147,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
url: {
|
||||
// list: "/ttelectricmeter/ttElectricMeter/list",
|
||||
list: "/ttelectricmeter/ttElectricMeter/QueryElectricMeterList",
|
||||
delete: "/ttelectricmeter/ttElectricMeter/delete",
|
||||
deleteBatch: "/ttelectricmeter/ttElectricMeter/deleteBatch",
|
||||
exportXlsUrl: "/ttelectricmeter/ttElectricMeter/exportXls",
|
||||
importExcelUrl: "ttelectricmeter/ttElectricMeter/importExcel",
|
||||
|
||||
},
|
||||
dictOptions:{},
|
||||
superFieldList:[],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getSuperFieldList();
|
||||
},
|
||||
computed: {
|
||||
importExcelUrl: function(){
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
initDictConfig(){
|
||||
},
|
||||
getSuperFieldList(){
|
||||
let fieldList=[];
|
||||
fieldList.push({type:'string',value:'eqtNo',text:'电表编号'})
|
||||
fieldList.push({type:'number',value:'valleyPower',text:'谷电量'})
|
||||
fieldList.push({type:'number',value:'peakPower',text:'峰电量'})
|
||||
fieldList.push({type:'datetime',value:'createTime',text:'采集时间'})
|
||||
this.superFieldList = fieldList
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
@ -0,0 +1,120 @@
|
||||
<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="eqtNo">
|
||||
<a-input v-model="model.eqtNo" placeholder="请输入电表编号" disabled="disabled" ></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="谷电量(度)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="valleyPower">
|
||||
<a-input-number v-model="model.valleyPower" placeholder="请输入谷电量" style="width: 100%" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="峰电量(度)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="peakPower">
|
||||
<a-input-number v-model="model.peakPower" placeholder="请输入峰电量" style="width: 100%" />
|
||||
</a-form-model-item>
|
||||
</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: 'TtElectricMeterForm',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
//表单禁用
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
model:{
|
||||
},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 },
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
},
|
||||
confirmLoading: false,
|
||||
validatorRules: {
|
||||
eqtNo: [
|
||||
{ required: true, message: '请输入电表编号!'},
|
||||
],
|
||||
peakPower: [
|
||||
{ required: true, message: '请输入峰电量!'},
|
||||
],
|
||||
},
|
||||
url: {
|
||||
add: "/ttelectricmeter/ttElectricMeter/add",
|
||||
edit: "/ttelectricmeter/ttElectricMeter/edit",
|
||||
queryById: "/ttelectricmeter/ttElectricMeter/queryById"
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
formDisabled(){
|
||||
return this.disabled
|
||||
},
|
||||
},
|
||||
created () {
|
||||
//备份model原始值
|
||||
this.modelDefault = JSON.parse(JSON.stringify(this.model));
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.edit(this.modelDefault);
|
||||
},
|
||||
edit (record) {
|
||||
this.model = Object.assign({}, record);
|
||||
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;
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="false"
|
||||
@close="close"
|
||||
destroyOnClose
|
||||
:visible="visible">
|
||||
<tt-electric-meter-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-electric-meter-form>
|
||||
<div class="drawer-footer">
|
||||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtElectricMeterForm from './TtElectricMeterForm'
|
||||
|
||||
export default {
|
||||
name: 'TtElectricMeterModal',
|
||||
components: {
|
||||
TtElectricMeterForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:"操作",
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
});
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/** Button按钮间距 */
|
||||
.ant-btn {
|
||||
margin-left: 30px;
|
||||
margin-bottom: 30px;
|
||||
float: right;
|
||||
}
|
||||
.drawer-footer{
|
||||
position: absolute;
|
||||
bottom: -8px;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭">
|
||||
<tt-electric-meter-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-electric-meter-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtElectricMeterForm from './TtElectricMeterForm'
|
||||
export default {
|
||||
name: 'TtElectricMeterModal',
|
||||
components: {
|
||||
TtElectricMeterForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:'',
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
})
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="false"
|
||||
@close="close"
|
||||
destroyOnClose
|
||||
:visible="visible">
|
||||
<tt-sulf-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-sulf-equip-form>
|
||||
<div class="drawer-footer">
|
||||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtSulfEquipForm from './TtSulfEquipForm'
|
||||
|
||||
export default {
|
||||
name: 'TtSulfEquipModal',
|
||||
components: {
|
||||
TtSulfEquipForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:"操作",
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
});
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/** Button按钮间距 */
|
||||
.ant-btn {
|
||||
margin-left: 30px;
|
||||
margin-bottom: 30px;
|
||||
float: right;
|
||||
}
|
||||
.drawer-footer{
|
||||
position: absolute;
|
||||
bottom: -8px;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭">
|
||||
<tt-sulf-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-sulf-equip-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtSulfEquipForm from './TtSulfEquipForm'
|
||||
export default {
|
||||
name: 'TtSulfEquipModal',
|
||||
components: {
|
||||
TtSulfEquipForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:'',
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
})
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="false"
|
||||
@close="close"
|
||||
destroyOnClose
|
||||
:visible="visible">
|
||||
<tt-virsual-sort-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-virsual-sort-equip-form>
|
||||
<div class="drawer-footer">
|
||||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtVirsualSortEquipForm from './TtVirsualSortEquipForm'
|
||||
|
||||
export default {
|
||||
name: 'TtVirsualSortEquipModal',
|
||||
components: {
|
||||
TtVirsualSortEquipForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:"操作",
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
});
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/** Button按钮间距 */
|
||||
.ant-btn {
|
||||
margin-left: 30px;
|
||||
margin-bottom: 30px;
|
||||
float: right;
|
||||
}
|
||||
.drawer-footer{
|
||||
position: absolute;
|
||||
bottom: -8px;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭">
|
||||
<tt-virsual-sort-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-virsual-sort-equip-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtVirsualSortEquipForm from './TtVirsualSortEquipForm'
|
||||
export default {
|
||||
name: 'TtVirsualSortEquipModal',
|
||||
components: {
|
||||
TtVirsualSortEquipForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:'',
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
})
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="false"
|
||||
@close="close"
|
||||
destroyOnClose
|
||||
:visible="visible">
|
||||
<tt-virsual-sort-equip-second-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-virsual-sort-equip-second-form>
|
||||
<div class="drawer-footer">
|
||||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtVirsualSortEquipSecondForm from './TtVirsualSortEquipSecondForm'
|
||||
|
||||
export default {
|
||||
name: 'TtVirsualSortEquipSecondModal',
|
||||
components: {
|
||||
TtVirsualSortEquipSecondForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:"操作",
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
});
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/** Button按钮间距 */
|
||||
.ant-btn {
|
||||
margin-left: 30px;
|
||||
margin-bottom: 30px;
|
||||
float: right;
|
||||
}
|
||||
.drawer-footer{
|
||||
position: absolute;
|
||||
bottom: -8px;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭">
|
||||
<tt-virsual-sort-equip-second-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-virsual-sort-equip-second-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtVirsualSortEquipSecondForm from './TtVirsualSortEquipSecondForm'
|
||||
export default {
|
||||
name: 'TtVirsualSortEquipSecondModal',
|
||||
components: {
|
||||
TtVirsualSortEquipSecondForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:'',
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
})
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -0,0 +1,194 @@
|
||||
package org.jeecg.modules.demo.ttelectricmeter.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.demo.ttelectricmeter.entity.TtElectricMeter;
|
||||
import org.jeecg.modules.demo.ttelectricmeter.service.ITtElectricMeterService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: tt_electric_meter
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="tt_electric_meter")
|
||||
@RestController
|
||||
@RequestMapping("/ttelectricmeter/ttElectricMeter")
|
||||
@Slf4j
|
||||
public class TtElectricMeterController extends JeecgController<TtElectricMeter, ITtElectricMeterService> {
|
||||
@Autowired
|
||||
private ITtElectricMeterService ttElectricMeterService;
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value="tt列表查询", notes="tt列表查询")
|
||||
@GetMapping(value = "/QueryElectricMeterList")
|
||||
public Result<IPage<TtElectricMeter>> QueryElectricMeterList(TtElectricMeter ttElectricMeter,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<TtElectricMeter> queryWrapper = QueryGenerator.initQueryWrapper(ttElectricMeter, req.getParameterMap());
|
||||
Page<TtElectricMeter> page = new Page<TtElectricMeter>(pageNo, pageSize);
|
||||
IPage<TtElectricMeter> pageList = ttElectricMeterService.QueryElectricMeter(page,ttElectricMeter);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param ttElectricMeter
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tt_electric_meter-分页列表查询")
|
||||
@ApiOperation(value="tt_electric_meter-分页列表查询", notes="tt_electric_meter-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<TtElectricMeter>> queryPageList(TtElectricMeter ttElectricMeter,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<TtElectricMeter> queryWrapper = QueryGenerator.initQueryWrapper(ttElectricMeter, req.getParameterMap());
|
||||
Page<TtElectricMeter> page = new Page<TtElectricMeter>(pageNo, pageSize);
|
||||
IPage<TtElectricMeter> pageList = ttElectricMeterService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param ttElectricMeter
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_electric_meter-添加")
|
||||
@ApiOperation(value="tt_electric_meter-添加", notes="tt_electric_meter-添加")
|
||||
//@RequiresPermissions("ttelectricmeter:tt_electric_meter:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody TtElectricMeter ttElectricMeter) {
|
||||
ttElectricMeterService.save(ttElectricMeter);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param ttElectricMeter
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_electric_meter-编辑")
|
||||
@ApiOperation(value="tt_electric_meter-编辑", notes="tt_electric_meter-编辑")
|
||||
//@RequiresPermissions("ttelectricmeter:tt_electric_meter:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody TtElectricMeter ttElectricMeter) {
|
||||
ttElectricMeterService.updateById(ttElectricMeter);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_electric_meter-通过id删除")
|
||||
@ApiOperation(value="tt_electric_meter-通过id删除", notes="tt_electric_meter-通过id删除")
|
||||
//@RequiresPermissions("ttelectricmeter:tt_electric_meter:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
ttElectricMeterService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_electric_meter-批量删除")
|
||||
@ApiOperation(value="tt_electric_meter-批量删除", notes="tt_electric_meter-批量删除")
|
||||
//@RequiresPermissions("ttelectricmeter:tt_electric_meter:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.ttElectricMeterService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tt_electric_meter-通过id查询")
|
||||
@ApiOperation(value="tt_electric_meter-通过id查询", notes="tt_electric_meter-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<TtElectricMeter> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
TtElectricMeter ttElectricMeter = ttElectricMeterService.getById(id);
|
||||
if(ttElectricMeter==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(ttElectricMeter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param ttElectricMeter
|
||||
*/
|
||||
//@RequiresPermissions("ttelectricmeter:tt_electric_meter:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, TtElectricMeter ttElectricMeter) {
|
||||
return super.exportXls(request, ttElectricMeter, TtElectricMeter.class, "tt_electric_meter");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
//@RequiresPermissions("ttelectricmeter:tt_electric_meter:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, TtElectricMeter.class);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package org.jeecg.modules.demo.ttelectricmeter.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.ttelectricmeter.entity.TtElectricMeter;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: tt_electric_meter
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface TtElectricMeterMapper extends BaseMapper<TtElectricMeter> {
|
||||
|
||||
IPage TtElectricMeterinfo(@Param("page")Page<TtElectricMeter> page ,@Param("ttElectricMeter")TtElectricMeter ttElectricMeter);
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.demo.ttelectricmeter.mapper.TtElectricMeterMapper">
|
||||
<select id="TtElectricMeterinfo" resultType="org.jeecg.modules.demo.ttelectricmeter.entity.TtElectricMeter">
|
||||
SELECT
|
||||
a.id,
|
||||
a.eqt_no,
|
||||
b.location,
|
||||
valley_power,
|
||||
peak_power,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time
|
||||
FROM
|
||||
tt_electric_meter a,
|
||||
tt_eqt_base b
|
||||
WHERE
|
||||
b.eqt_type = 6
|
||||
AND a.eqt_no = b.eqt_no
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,17 @@
|
||||
package org.jeecg.modules.demo.ttelectricmeter.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.demo.ttelectricmeter.entity.TtElectricMeter;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: tt_electric_meter
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITtElectricMeterService extends IService<TtElectricMeter> {
|
||||
|
||||
IPage QueryElectricMeter(Page<TtElectricMeter> page ,TtElectricMeter ttElectricMeter);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package org.jeecg.modules.demo.ttelectricmeter.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.demo.ttelectricmeter.entity.TtElectricMeter;
|
||||
import org.jeecg.modules.demo.ttelectricmeter.mapper.TtElectricMeterMapper;
|
||||
import org.jeecg.modules.demo.ttelectricmeter.service.ITtElectricMeterService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Description: tt_electric_meter
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class TtElectricMeterServiceImpl extends ServiceImpl<TtElectricMeterMapper, TtElectricMeter> implements ITtElectricMeterService {
|
||||
|
||||
@Resource
|
||||
TtElectricMeterMapper ttElectricMeterMapper;
|
||||
|
||||
@Override
|
||||
public IPage QueryElectricMeter(Page<TtElectricMeter> page, TtElectricMeter ttElectricMeter) {
|
||||
return ttElectricMeterMapper.TtElectricMeterinfo(page,ttElectricMeter);
|
||||
}
|
||||
}
|
@ -0,0 +1,183 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<!-- 查询区域 -->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
</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('tt_electric_meter')">导出</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,record">
|
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
|
||||
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
|
||||
</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-dropdown>
|
||||
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item>
|
||||
<a @click="handleDetail(record)">详情</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||
<a>删除</a>
|
||||
</a-popconfirm>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
</span>
|
||||
|
||||
</a-table>
|
||||
</div>
|
||||
|
||||
<tt-electric-meter-modal ref="modalForm" @ok="modalFormOk"></tt-electric-meter-modal>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import '@/assets/less/TableExpand.less'
|
||||
import { mixinDevice } from '@/utils/mixin'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import TtElectricMeterModal from './modules/TtElectricMeterModal'
|
||||
|
||||
export default {
|
||||
name: 'TtElectricMeterList',
|
||||
mixins:[JeecgListMixin, mixinDevice],
|
||||
components: {
|
||||
TtElectricMeterModal
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
description: 'tt_electric_meter管理页面',
|
||||
// 表头
|
||||
columns: [
|
||||
{
|
||||
title: '#',
|
||||
dataIndex: '',
|
||||
key:'rowIndex',
|
||||
width:60,
|
||||
align:"center",
|
||||
customRender:function (t,r,index) {
|
||||
return parseInt(index)+1;
|
||||
}
|
||||
},
|
||||
{
|
||||
title:'电表编号',
|
||||
align:"center",
|
||||
dataIndex: 'eqtNo'
|
||||
},
|
||||
{
|
||||
title:'谷电量',
|
||||
align:"center",
|
||||
dataIndex: 'valleyPower'
|
||||
},
|
||||
{
|
||||
title:'峰电量',
|
||||
align:"center",
|
||||
dataIndex: 'peakPower'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align:"center",
|
||||
fixed:"right",
|
||||
width:147,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: "/ttelectricmeter/ttElectricMeter/list",
|
||||
delete: "/ttelectricmeter/ttElectricMeter/delete",
|
||||
deleteBatch: "/ttelectricmeter/ttElectricMeter/deleteBatch",
|
||||
exportXlsUrl: "/ttelectricmeter/ttElectricMeter/exportXls",
|
||||
importExcelUrl: "ttelectricmeter/ttElectricMeter/importExcel",
|
||||
|
||||
},
|
||||
dictOptions:{},
|
||||
superFieldList:[],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getSuperFieldList();
|
||||
},
|
||||
computed: {
|
||||
importExcelUrl: function(){
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
initDictConfig(){
|
||||
},
|
||||
getSuperFieldList(){
|
||||
let fieldList=[];
|
||||
fieldList.push({type:'string',value:'eqtNo',text:'电表编号'})
|
||||
fieldList.push({type:'number',value:'valleyPower',text:'谷电量'})
|
||||
fieldList.push({type:'number',value:'peakPower',text:'峰电量'})
|
||||
this.superFieldList = fieldList
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
@ -0,0 +1,120 @@
|
||||
<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="eqtNo">
|
||||
<a-input v-model="model.eqtNo" placeholder="请输入电表编号" ></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="谷电量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="valleyPower">
|
||||
<a-input-number v-model="model.valleyPower" placeholder="请输入谷电量" style="width: 100%" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="峰电量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="peakPower">
|
||||
<a-input-number v-model="model.peakPower" placeholder="请输入峰电量" style="width: 100%" />
|
||||
</a-form-model-item>
|
||||
</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: 'TtElectricMeterForm',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
//表单禁用
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
model:{
|
||||
},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 },
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
},
|
||||
confirmLoading: false,
|
||||
validatorRules: {
|
||||
eqtNo: [
|
||||
{ required: true, message: '请输入电表编号!'},
|
||||
],
|
||||
peakPower: [
|
||||
{ required: true, message: '请输入峰电量!'},
|
||||
],
|
||||
},
|
||||
url: {
|
||||
add: "/ttelectricmeter/ttElectricMeter/add",
|
||||
edit: "/ttelectricmeter/ttElectricMeter/edit",
|
||||
queryById: "/ttelectricmeter/ttElectricMeter/queryById"
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
formDisabled(){
|
||||
return this.disabled
|
||||
},
|
||||
},
|
||||
created () {
|
||||
//备份model原始值
|
||||
this.modelDefault = JSON.parse(JSON.stringify(this.model));
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.edit(this.modelDefault);
|
||||
},
|
||||
edit (record) {
|
||||
this.model = Object.assign({}, record);
|
||||
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;
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="false"
|
||||
@close="close"
|
||||
destroyOnClose
|
||||
:visible="visible">
|
||||
<tt-electric-meter-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-electric-meter-form>
|
||||
<div class="drawer-footer">
|
||||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtElectricMeterForm from './TtElectricMeterForm'
|
||||
|
||||
export default {
|
||||
name: 'TtElectricMeterModal',
|
||||
components: {
|
||||
TtElectricMeterForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:"操作",
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
});
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/** Button按钮间距 */
|
||||
.ant-btn {
|
||||
margin-left: 30px;
|
||||
margin-bottom: 30px;
|
||||
float: right;
|
||||
}
|
||||
.drawer-footer{
|
||||
position: absolute;
|
||||
bottom: -8px;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭">
|
||||
<tt-electric-meter-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-electric-meter-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtElectricMeterForm from './TtElectricMeterForm'
|
||||
export default {
|
||||
name: 'TtElectricMeterModal',
|
||||
components: {
|
||||
TtElectricMeterForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:'',
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
})
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,5 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.demo.ttsulfequip.mapper.TtSulfEquipMapper">
|
||||
<resultMap id="TtSulfEquip" type="org.jeecg.modules.demo.ttsulfequip.entity.TtSulfEquip">
|
||||
<result column="eqt_no" property="eqtNo" jdbcType="VARCHAR"/>
|
||||
<result column="open_date" property="openDate" jdbcType="TIMESTAMP"/>
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="queryTtSulfEquip" resultType="org.jeecg.modules.demo.ttsulfequip.entity.TtSulfEquip" >
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
tt_sulf_equip a,
|
||||
tt_eqt_base b
|
||||
WHERE 1=1
|
||||
AND
|
||||
b.eqt_type = 3
|
||||
AND a.eqt_no = b.eqt_no
|
||||
order by a.id desc
|
||||
<!-- <if test="ttSulfEquip.eqtNo!=null and ttSulfEquip.eqtNo!=''">-->
|
||||
<!-- AND a.eqt_no like concat('%',#{eqtNo},'%')-->
|
||||
<!-- </if>-->
|
||||
|
||||
</select>
|
||||
<!-- <if test="createTime!= null">-->
|
||||
<!-- and date_format(open_date,'%Y-%m-%d') >= date_format(#{createTime},'%Y-%m-%d')-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="updateTime!= null">-->
|
||||
<!-- and date_format(open_date,'%Y-%m-%d') <= date_format(#{updateTime},'%Y-%m-%d')-->
|
||||
<!-- </if>-->
|
||||
<!-- order by a.id desc-->
|
||||
</mapper>
|
@ -0,0 +1,192 @@
|
||||
package org.jeecg.modules.demo.ttvirsualsortequip.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.demo.ttvirsualsortequip.entity.TtVirsualSortEquip;
|
||||
import org.jeecg.modules.demo.ttvirsualsortequip.service.ITtVirsualSortEquipService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: tt_virsual_sort_equip
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="tt_virsual_sort_equip")
|
||||
@RestController
|
||||
@RequestMapping("/ttvirsualsortequip/ttVirsualSortEquip")
|
||||
@Slf4j
|
||||
public class TtVirsualSortEquipController extends JeecgController<TtVirsualSortEquip, ITtVirsualSortEquipService> {
|
||||
@Autowired
|
||||
private ITtVirsualSortEquipService ttVirsualSortEquipService;
|
||||
|
||||
|
||||
//@AutoLog(value = "tt_virsual_sort_equip-分页列表查询询胶塞为2")
|
||||
@ApiOperation(value="tt_virsual_sort_equip-分页列表查询胶塞为2", notes="tt_virsual_sort_equip-分页列表查询询胶塞为2")
|
||||
@GetMapping(value = "/QueryTtVirsualSortEquipInfoList")
|
||||
public Result<IPage<TtVirsualSortEquip>> QueryTtVirsualSortEquipInfoList(TtVirsualSortEquip ttVirsualSortEquip,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<TtVirsualSortEquip> queryWrapper = QueryGenerator.initQueryWrapper(ttVirsualSortEquip, req.getParameterMap());
|
||||
Page<TtVirsualSortEquip> page = new Page<TtVirsualSortEquip>(pageNo, pageSize);
|
||||
IPage<TtVirsualSortEquip> pageList = ttVirsualSortEquipService.QueryTtVirsualSortEquipInfo(page,ttVirsualSortEquip);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param ttVirsualSortEquip
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tt_virsual_sort_equip-分页列表查询")
|
||||
@ApiOperation(value="tt_virsual_sort_equip-分页列表查询", notes="tt_virsual_sort_equip-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<TtVirsualSortEquip>> queryPageList(TtVirsualSortEquip ttVirsualSortEquip,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<TtVirsualSortEquip> queryWrapper = QueryGenerator.initQueryWrapper(ttVirsualSortEquip, req.getParameterMap());
|
||||
Page<TtVirsualSortEquip> page = new Page<TtVirsualSortEquip>(pageNo, pageSize);
|
||||
IPage<TtVirsualSortEquip> pageList = ttVirsualSortEquipService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param ttVirsualSortEquip
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_virsual_sort_equip-添加")
|
||||
@ApiOperation(value="tt_virsual_sort_equip-添加", notes="tt_virsual_sort_equip-添加")
|
||||
//@RequiresPermissions("ttvirsualsortequip:tt_virsual_sort_equip:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody TtVirsualSortEquip ttVirsualSortEquip) {
|
||||
ttVirsualSortEquipService.save(ttVirsualSortEquip);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param ttVirsualSortEquip
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_virsual_sort_equip-编辑")
|
||||
@ApiOperation(value="tt_virsual_sort_equip-编辑", notes="tt_virsual_sort_equip-编辑")
|
||||
//@RequiresPermissions("ttvirsualsortequip:tt_virsual_sort_equip:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody TtVirsualSortEquip ttVirsualSortEquip) {
|
||||
ttVirsualSortEquipService.updateById(ttVirsualSortEquip);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_virsual_sort_equip-通过id删除")
|
||||
@ApiOperation(value="tt_virsual_sort_equip-通过id删除", notes="tt_virsual_sort_equip-通过id删除")
|
||||
//@RequiresPermissions("ttvirsualsortequip:tt_virsual_sort_equip:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
ttVirsualSortEquipService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_virsual_sort_equip-批量删除")
|
||||
@ApiOperation(value="tt_virsual_sort_equip-批量删除", notes="tt_virsual_sort_equip-批量删除")
|
||||
//@RequiresPermissions("ttvirsualsortequip:tt_virsual_sort_equip:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.ttVirsualSortEquipService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tt_virsual_sort_equip-通过id查询")
|
||||
@ApiOperation(value="tt_virsual_sort_equip-通过id查询", notes="tt_virsual_sort_equip-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<TtVirsualSortEquip> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
TtVirsualSortEquip ttVirsualSortEquip = ttVirsualSortEquipService.getById(id);
|
||||
if(ttVirsualSortEquip==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(ttVirsualSortEquip);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param ttVirsualSortEquip
|
||||
*/
|
||||
//@RequiresPermissions("ttvirsualsortequip:tt_virsual_sort_equip:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, TtVirsualSortEquip ttVirsualSortEquip) {
|
||||
return super.exportXls(request, ttVirsualSortEquip, TtVirsualSortEquip.class, "tt_virsual_sort_equip");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
//@RequiresPermissions("ttvirsualsortequip:tt_virsual_sort_equip:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, TtVirsualSortEquip.class);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package org.jeecg.modules.demo.ttvirsualsortequip.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.ttvirsualsortequip.entity.TtVirsualSortEquip;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: tt_virsual_sort_equip
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface TtVirsualSortEquipMapper extends BaseMapper<TtVirsualSortEquip> {
|
||||
|
||||
IPage TtVirsualSortEquipInfo(@Param("page")Page page,@Param("ttVirsualSortEquip") TtVirsualSortEquip ttVirsualSortEquip);
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.demo.ttvirsualsortequip.mapper.TtVirsualSortEquipMapper">
|
||||
<select id="TtVirsualSortEquipInfo" resultType="org.jeecg.modules.demo.ttvirsualsortequip.entity.TtVirsualSortEquip">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
tt_virsual_sort_equip
|
||||
WHERE
|
||||
type_id = '2' -- 胶塞 为2
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,16 @@
|
||||
package org.jeecg.modules.demo.ttvirsualsortequip.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.demo.ttvirsualsortequip.entity.TtVirsualSortEquip;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: tt_virsual_sort_equip
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITtVirsualSortEquipService extends IService<TtVirsualSortEquip> {
|
||||
IPage<TtVirsualSortEquip> QueryTtVirsualSortEquipInfo(Page page,TtVirsualSortEquip ttVirsualSortEquip);
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package org.jeecg.modules.demo.ttvirsualsortequip.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.demo.ttvirsualsortequip.entity.TtVirsualSortEquip;
|
||||
import org.jeecg.modules.demo.ttvirsualsortequip.mapper.TtVirsualSortEquipMapper;
|
||||
import org.jeecg.modules.demo.ttvirsualsortequip.service.ITtVirsualSortEquipService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Description: tt_virsual_sort_equip
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class TtVirsualSortEquipServiceImpl extends ServiceImpl<TtVirsualSortEquipMapper, TtVirsualSortEquip> implements ITtVirsualSortEquipService {
|
||||
@Resource
|
||||
TtVirsualSortEquipMapper ttVirsualSortEquipMapper;
|
||||
|
||||
@Override
|
||||
public IPage<TtVirsualSortEquip> QueryTtVirsualSortEquipInfo(Page page, TtVirsualSortEquip ttVirsualSortEquip) {
|
||||
return ttVirsualSortEquipMapper.TtVirsualSortEquipInfo(page,ttVirsualSortEquip);
|
||||
}
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="false"
|
||||
@close="close"
|
||||
destroyOnClose
|
||||
:visible="visible">
|
||||
<tt-virsual-sort-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-virsual-sort-equip-form>
|
||||
<div class="drawer-footer">
|
||||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtVirsualSortEquipForm from './TtVirsualSortEquipForm'
|
||||
|
||||
export default {
|
||||
name: 'TtVirsualSortEquipModal',
|
||||
components: {
|
||||
TtVirsualSortEquipForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:"操作",
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
});
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/** Button按钮间距 */
|
||||
.ant-btn {
|
||||
margin-left: 30px;
|
||||
margin-bottom: 30px;
|
||||
float: right;
|
||||
}
|
||||
.drawer-footer{
|
||||
position: absolute;
|
||||
bottom: -8px;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭">
|
||||
<tt-virsual-sort-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-virsual-sort-equip-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtVirsualSortEquipForm from './TtVirsualSortEquipForm'
|
||||
export default {
|
||||
name: 'TtVirsualSortEquipModal',
|
||||
components: {
|
||||
TtVirsualSortEquipForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:'',
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
})
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -0,0 +1,199 @@
|
||||
package org.jeecg.modules.demo.ttvirsualsortequipsecond.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.demo.ttvirsualsortequipsecond.entity.TtVirsualSortEquipSecond;
|
||||
import org.jeecg.modules.demo.ttvirsualsortequipsecond.service.ITtVirsualSortEquipSecondService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: tt_virsual_sort_equip_second
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="tt_virsual_sort_equip_second")
|
||||
@RestController
|
||||
@RequestMapping("/ttvirsualsortequipsecond/ttVirsualSortEquipSecond")
|
||||
@Slf4j
|
||||
public class TtVirsualSortEquipSecondController extends JeecgController<TtVirsualSortEquipSecond, ITtVirsualSortEquipSecondService> {
|
||||
@Autowired
|
||||
private ITtVirsualSortEquipSecondService ttVirsualSortEquipSecondService;
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value="tt_virsual_sort_equip_second-分页列表查询底座为1", notes="tt_virsual_sort_equip_second-分页列表查询底座为1")
|
||||
@GetMapping(value = "/QueryTtVirsualSortEquipSecondInfoList")
|
||||
public Result<IPage<TtVirsualSortEquipSecond>> QueryTtVirsualSortEquipSecondInfoList(TtVirsualSortEquipSecond ttVirsualSortEquipSecond,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<TtVirsualSortEquipSecond> queryWrapper = QueryGenerator.initQueryWrapper(ttVirsualSortEquipSecond, req.getParameterMap());
|
||||
Page<TtVirsualSortEquipSecond> page = new Page<TtVirsualSortEquipSecond>(pageNo, pageSize);
|
||||
IPage<TtVirsualSortEquipSecond> pageList = ttVirsualSortEquipSecondService.QueryTtVirsualSortEquipSecondInfo(page,ttVirsualSortEquipSecond);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param ttVirsualSortEquipSecond
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tt_virsual_sort_equip_second-分页列表查询")
|
||||
@ApiOperation(value="tt_virsual_sort_equip_second-分页列表查询", notes="tt_virsual_sort_equip_second-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<TtVirsualSortEquipSecond>> queryPageList(TtVirsualSortEquipSecond ttVirsualSortEquipSecond,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<TtVirsualSortEquipSecond> queryWrapper = QueryGenerator.initQueryWrapper(ttVirsualSortEquipSecond, req.getParameterMap());
|
||||
Page<TtVirsualSortEquipSecond> page = new Page<TtVirsualSortEquipSecond>(pageNo, pageSize);
|
||||
IPage<TtVirsualSortEquipSecond> pageList = ttVirsualSortEquipSecondService.page(page, queryWrapper);
|
||||
List<TtVirsualSortEquipSecond> list =pageList.getRecords();
|
||||
for (TtVirsualSortEquipSecond ttVirsualSortEquipSecond1 :list ){
|
||||
ttVirsualSortEquipSecond1.setTypeId(1);
|
||||
|
||||
}
|
||||
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param ttVirsualSortEquipSecond
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_virsual_sort_equip_second-添加")
|
||||
@ApiOperation(value="tt_virsual_sort_equip_second-添加", notes="tt_virsual_sort_equip_second-添加")
|
||||
//@RequiresPermissions("ttvirsualsortequipsecond:tt_virsual_sort_equip:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody TtVirsualSortEquipSecond ttVirsualSortEquipSecond) {
|
||||
ttVirsualSortEquipSecondService.save(ttVirsualSortEquipSecond);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param ttVirsualSortEquipSecond
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_virsual_sort_equip_second-编辑")
|
||||
@ApiOperation(value="tt_virsual_sort_equip_second-编辑", notes="tt_virsual_sort_equip_second-编辑")
|
||||
//@RequiresPermissions("ttvirsualsortequipsecond:tt_virsual_sort_equip:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody TtVirsualSortEquipSecond ttVirsualSortEquipSecond) {
|
||||
ttVirsualSortEquipSecondService.updateById(ttVirsualSortEquipSecond);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_virsual_sort_equip_second-通过id删除")
|
||||
@ApiOperation(value="tt_virsual_sort_equip_second-通过id删除", notes="tt_virsual_sort_equip_second-通过id删除")
|
||||
//@RequiresPermissions("ttvirsualsortequipsecond:tt_virsual_sort_equip:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
ttVirsualSortEquipSecondService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_virsual_sort_equip_second-批量删除")
|
||||
@ApiOperation(value="tt_virsual_sort_equip_second-批量删除", notes="tt_virsual_sort_equip_second-批量删除")
|
||||
//@RequiresPermissions("ttvirsualsortequipsecond:tt_virsual_sort_equip:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.ttVirsualSortEquipSecondService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tt_virsual_sort_equip_second-通过id查询")
|
||||
@ApiOperation(value="tt_virsual_sort_equip_second-通过id查询", notes="tt_virsual_sort_equip_second-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<TtVirsualSortEquipSecond> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
TtVirsualSortEquipSecond ttVirsualSortEquipSecond = ttVirsualSortEquipSecondService.getById(id);
|
||||
if(ttVirsualSortEquipSecond==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(ttVirsualSortEquipSecond);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param ttVirsualSortEquipSecond
|
||||
*/
|
||||
//@RequiresPermissions("ttvirsualsortequipsecond:tt_virsual_sort_equip:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, TtVirsualSortEquipSecond ttVirsualSortEquipSecond) {
|
||||
return super.exportXls(request, ttVirsualSortEquipSecond, TtVirsualSortEquipSecond.class, "tt_virsual_sort_equip_second");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
//@RequiresPermissions("ttvirsualsortequipsecond:tt_virsual_sort_equip:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, TtVirsualSortEquipSecond.class);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package org.jeecg.modules.demo.ttvirsualsortequipsecond.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.ttvirsualsortequip.entity.TtVirsualSortEquip;
|
||||
import org.jeecg.modules.demo.ttvirsualsortequipsecond.entity.TtVirsualSortEquipSecond;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: tt_virsual_sort_equip_second
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface TtVirsualSortEquipSecondMapper extends BaseMapper<TtVirsualSortEquipSecond> {
|
||||
|
||||
IPage TtVirsualSortEquipSecondInfo(@Param("page") Page page, @Param("ttVirsualSortEquipSecond") TtVirsualSortEquipSecond ttVirsualSortEquipSecond);
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.demo.ttvirsualsortequipsecond.mapper.TtVirsualSortEquipSecondMapper">
|
||||
|
||||
<select id="TtVirsualSortEquipSecondInfo" resultType="org.jeecg.modules.demo.ttvirsualsortequipsecond.entity.TtVirsualSortEquipSecond">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
tt_virsual_sort_equip
|
||||
WHERE
|
||||
type_id = '1' -- 底座 为2
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,18 @@
|
||||
package org.jeecg.modules.demo.ttvirsualsortequipsecond.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.demo.ttvirsualsortequip.entity.TtVirsualSortEquip;
|
||||
import org.jeecg.modules.demo.ttvirsualsortequipsecond.entity.TtVirsualSortEquipSecond;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: tt_virsual_sort_equip_second
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITtVirsualSortEquipSecondService extends IService<TtVirsualSortEquipSecond> {
|
||||
|
||||
IPage<TtVirsualSortEquipSecond> QueryTtVirsualSortEquipSecondInfo(Page page, TtVirsualSortEquipSecond ttVirsualSortEquipSecond);
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package org.jeecg.modules.demo.ttvirsualsortequipsecond.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.demo.ttvirsualsortequipsecond.entity.TtVirsualSortEquipSecond;
|
||||
import org.jeecg.modules.demo.ttvirsualsortequipsecond.mapper.TtVirsualSortEquipSecondMapper;
|
||||
import org.jeecg.modules.demo.ttvirsualsortequipsecond.service.ITtVirsualSortEquipSecondService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Description: tt_virsual_sort_equip_second
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class TtVirsualSortEquipSecondServiceImpl extends ServiceImpl<TtVirsualSortEquipSecondMapper, TtVirsualSortEquipSecond> implements ITtVirsualSortEquipSecondService {
|
||||
@Resource
|
||||
TtVirsualSortEquipSecondMapper ttVirsualSortEquipSecondMapper;
|
||||
@Override
|
||||
public IPage<TtVirsualSortEquipSecond> QueryTtVirsualSortEquipSecondInfo(Page page, TtVirsualSortEquipSecond ttVirsualSortEquipSecond) {
|
||||
return ttVirsualSortEquipSecondMapper.TtVirsualSortEquipSecondInfo(page,ttVirsualSortEquipSecond);
|
||||
}
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="false"
|
||||
@close="close"
|
||||
destroyOnClose
|
||||
:visible="visible">
|
||||
<tt-virsual-sort-equip-second-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-virsual-sort-equip-second-form>
|
||||
<div class="drawer-footer">
|
||||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtVirsualSortEquipSecondForm from './TtVirsualSortEquipSecondForm'
|
||||
|
||||
export default {
|
||||
name: 'TtVirsualSortEquipSecondModal',
|
||||
components: {
|
||||
TtVirsualSortEquipSecondForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:"操作",
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
});
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/** Button按钮间距 */
|
||||
.ant-btn {
|
||||
margin-left: 30px;
|
||||
margin-bottom: 30px;
|
||||
float: right;
|
||||
}
|
||||
.drawer-footer{
|
||||
position: absolute;
|
||||
bottom: -8px;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭">
|
||||
<tt-virsual-sort-equip-second-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-virsual-sort-equip-second-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtVirsualSortEquipSecondForm from './TtVirsualSortEquipSecondForm'
|
||||
export default {
|
||||
name: 'TtVirsualSortEquipSecondModal',
|
||||
components: {
|
||||
TtVirsualSortEquipSecondForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:'',
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
})
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue