parent
8275dc9272
commit
57ec5893a4
@ -0,0 +1,17 @@
|
|||||||
|
package org.jeecg.modules.demo.injectdata.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.jeecg.modules.demo.injectdata.entity.TtInjectData;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_inject_data
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-08
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface TtInjectDataMapper extends BaseMapper<TtInjectData> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
<?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.injectdata.mapper.TtInjectDataMapper">
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,14 @@
|
|||||||
|
package org.jeecg.modules.demo.injectdata.service;
|
||||||
|
|
||||||
|
import org.jeecg.modules.demo.injectdata.entity.TtInjectData;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_inject_data
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-08
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ITtInjectDataService extends IService<TtInjectData> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package org.jeecg.modules.demo.injectdata.service.impl;
|
||||||
|
|
||||||
|
import org.jeecg.modules.demo.injectdata.entity.TtInjectData;
|
||||||
|
import org.jeecg.modules.demo.injectdata.mapper.TtInjectDataMapper;
|
||||||
|
import org.jeecg.modules.demo.injectdata.service.ITtInjectDataService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_inject_data
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-08
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TtInjectDataServiceImpl extends ServiceImpl<TtInjectDataMapper, TtInjectData> implements ITtInjectDataService {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,84 @@
|
|||||||
|
<template>
|
||||||
|
<a-drawer
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
placement="right"
|
||||||
|
:closable="false"
|
||||||
|
@close="close"
|
||||||
|
destroyOnClose
|
||||||
|
:visible="visible">
|
||||||
|
<tt-inject-data-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-inject-data-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 TtInjectDataForm from './TtInjectDataForm'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'TtInjectDataModal',
|
||||||
|
components: {
|
||||||
|
TtInjectDataForm
|
||||||
|
},
|
||||||
|
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-inject-data-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-inject-data-form>
|
||||||
|
</j-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import TtInjectDataForm from './TtInjectDataForm'
|
||||||
|
export default {
|
||||||
|
name: 'TtInjectDataModal',
|
||||||
|
components: {
|
||||||
|
TtInjectDataForm
|
||||||
|
},
|
||||||
|
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>
|
Loading…
Reference in new issue