dev
parent
aa28880ef8
commit
52fed54e45
@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="a862a2cd-82ba-4c94-9e4e-63f1c87abe63" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/ant-design-vue/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/ant-design-vue/package-lock.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ant-design-vue/yarn.lock" beforeDir="false" afterPath="$PROJECT_DIR$/ant-design-vue/yarn.lock" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="ComposerSettings">
|
||||
<execution />
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="MavenImportPreferences">
|
||||
<option name="generalSettings">
|
||||
<MavenGeneralSettings>
|
||||
<option name="localRepository" value="D:\repository" />
|
||||
<option name="mavenHome" value="D:/apache-maven-3.8.3" />
|
||||
<option name="userSettingsFile" value="D:\apache-maven-3.8.3\conf\settings.xml" />
|
||||
</MavenGeneralSettings>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectId" id="2LhoDwE5w7BA0XDsAiCCE3ipVCr" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
|
||||
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="aspect.path.notification.shown" value="true" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/linkage-boot/pom.xml" />
|
||||
<property name="settings.editor.selected.configurable" value="configurable.group.editor" />
|
||||
</component>
|
||||
<component name="SvnConfiguration">
|
||||
<configuration />
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="a862a2cd-82ba-4c94-9e4e-63f1c87abe63" name="Default Changelist" comment="" />
|
||||
<created>1676332559948</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1676332559948</updated>
|
||||
<workItem from="1676332564626" duration="1065000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="2" />
|
||||
</component>
|
||||
<component name="WindowStateProjectService">
|
||||
<state x="410" y="165" width="1201" height="710" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1676333642307">
|
||||
<screen x="0" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state x="410" y="165" width="1201" height="710" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1676333642307" />
|
||||
<state x="674" y="258" key="#com.intellij.ide.util.TreeClassChooserDialog" timestamp="1676333640707">
|
||||
<screen x="0" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state x="674" y="258" key="#com.intellij.ide.util.TreeClassChooserDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1676333640707" />
|
||||
<state x="687" y="214" key="FileChooserDialogImpl" timestamp="1676333654392">
|
||||
<screen x="0" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state x="687" y="214" key="FileChooserDialogImpl/0.0.1920.1040@0.0.1920.1040" timestamp="1676333654392" />
|
||||
<state x="329" y="77" key="SettingsEditor" timestamp="1676333540030">
|
||||
<screen x="0" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state x="329" y="77" key="SettingsEditor/0.0.1920.1040@0.0.1920.1040" timestamp="1676333540030" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,213 @@
|
||||
<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>
|
||||
</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_begin"></j-date>
|
||||
<span class="query-group-split-cust"></span>
|
||||
<j-date placeholder="请选择结束日期" class="query-group-cust" v-model="queryParam.createTime_end"></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>
|
||||
<a @click="handleToggleSearch" style="margin-left: 8px">
|
||||
{{ toggleSearchStatus ? '收起' : '展开' }}
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
||||
</a>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- 查询区域-END -->
|
||||
|
||||
<!-- 操作按钮区域 -->
|
||||
<div class="table-operator">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('tt_feeding_equip')">导出</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-feeding-equip-modal ref="modalForm" @ok="modalFormOk"></tt-feeding-equip-modal>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import '@/assets/less/TableExpand.less'
|
||||
import { mixinDevice } from '@/utils/mixin'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import TtFeedingEquipModal from './modules/TtFeedingEquipModal'
|
||||
|
||||
export default {
|
||||
name: 'TtFeedingEquipList',
|
||||
mixins:[JeecgListMixin, mixinDevice],
|
||||
components: {
|
||||
TtFeedingEquipModal
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
description: 'tt_feeding_equip管理页面',
|
||||
// 表头
|
||||
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: 'descr'
|
||||
},
|
||||
{
|
||||
title:'料罐温度(℃)',
|
||||
align:"center",
|
||||
dataIndex: 'bucketTemperature'
|
||||
},
|
||||
{
|
||||
title:'采集时间',
|
||||
align:"center",
|
||||
dataIndex: 'createTime',
|
||||
// customRender:function (text) {
|
||||
// return !text?"":(text.length>10?text.substr(0,10):text)
|
||||
// }
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align:"center",
|
||||
fixed:"right",
|
||||
width:147,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: "/ttfeedingequip/ttFeedingEquip/list",
|
||||
delete: "/ttfeedingequip/ttFeedingEquip/delete",
|
||||
deleteBatch: "/ttfeedingequip/ttFeedingEquip/deleteBatch",
|
||||
exportXlsUrl: "/ttfeedingequip/ttFeedingEquip/exportXls",
|
||||
importExcelUrl: "ttfeedingequip/ttFeedingEquip/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:'供料系统编号',dictCode:''})
|
||||
fieldList.push({type:'BigDecimal',value:'bucketTemperature',text:'料罐温度',dictCode:''})
|
||||
fieldList.push({type:'date',value:'createTime',text:'创建时间'})
|
||||
this.superFieldList = fieldList
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="false"
|
||||
@close="close"
|
||||
destroyOnClose
|
||||
:visible="visible">
|
||||
<tt-feeding-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-feeding-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 TtFeedingEquipForm from './TtFeedingEquipForm'
|
||||
|
||||
export default {
|
||||
name: 'TtFeedingEquipModal',
|
||||
components: {
|
||||
TtFeedingEquipForm
|
||||
},
|
||||
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-feeding-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-feeding-equip-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtFeedingEquipForm from './TtFeedingEquipForm'
|
||||
export default {
|
||||
name: 'TtFeedingEquipModal',
|
||||
components: {
|
||||
TtFeedingEquipForm
|
||||
},
|
||||
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-mold-temperature-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-mold-temperature-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 TtMoldTemperatureEquipForm from './TtMoldTemperatureEquipForm'
|
||||
|
||||
export default {
|
||||
name: 'TtMoldTemperatureEquipModal',
|
||||
components: {
|
||||
TtMoldTemperatureEquipForm
|
||||
},
|
||||
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-mold-temperature-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-mold-temperature-equip-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtMoldTemperatureEquipForm from './TtMoldTemperatureEquipForm'
|
||||
export default {
|
||||
name: 'TtMoldTemperatureEquipModal',
|
||||
components: {
|
||||
TtMoldTemperatureEquipForm
|
||||
},
|
||||
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,219 @@
|
||||
<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>
|
||||
</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_begin"></j-date>
|
||||
<span class="query-group-split-cust"></span>
|
||||
<j-date placeholder="请选择结束日期" class="query-group-cust" v-model="queryParam.createTime_end"></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>
|
||||
<a @click="handleToggleSearch" style="margin-left: 8px">
|
||||
{{ toggleSearchStatus ? '收起' : '展开' }}
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
||||
</a>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- 查询区域-END -->
|
||||
|
||||
<!-- 操作按钮区域 -->
|
||||
<div class="table-operator">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('tt_pouring_equip')">导出</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-pouring-equip-modal ref="modalForm" @ok="modalFormOk"></tt-pouring-equip-modal>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import '@/assets/less/TableExpand.less'
|
||||
import { mixinDevice } from '@/utils/mixin'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import TtPouringEquipModal from './modules/TtPouringEquipModal'
|
||||
|
||||
export default {
|
||||
name: 'TtPouringEquipList',
|
||||
mixins:[JeecgListMixin, mixinDevice],
|
||||
components: {
|
||||
TtPouringEquipModal
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
description: 'tt_pouring_equip管理页面',
|
||||
// 表头
|
||||
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: 'eqtSupplier'
|
||||
},
|
||||
{
|
||||
title:'料罐温度(℃)',
|
||||
align:"center",
|
||||
dataIndex: 'bucketTemperature'
|
||||
},
|
||||
{
|
||||
title:'模具温度(℃)',
|
||||
align:"center",
|
||||
dataIndex: 'moldTemperature'
|
||||
},
|
||||
{
|
||||
title:'采集时间',
|
||||
align:"center",
|
||||
dataIndex: 'createTime',
|
||||
// customRender:function (text) {
|
||||
// return !text?"":(text.length>10?text.substr(0,10):text)
|
||||
// }
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align:"center",
|
||||
fixed:"right",
|
||||
width:147,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: "/ttpouringequip/ttPouringEquip/list",
|
||||
delete: "/ttpouringequip/ttPouringEquip/delete",
|
||||
deleteBatch: "/ttpouringequip/ttPouringEquip/deleteBatch",
|
||||
exportXlsUrl: "/ttpouringequip/ttPouringEquip/exportXls",
|
||||
importExcelUrl: "ttpouringequip/ttPouringEquip/importExcel",
|
||||
|
||||
},
|
||||
dictOptions:{},
|
||||
superFieldList:[],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getSuperFieldList();
|
||||
},
|
||||
computed: {
|
||||
importExcelUrl: function(){
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
initDictConfig(){
|
||||
},
|
||||
getSuperFieldList(){
|
||||
let fieldList=[];
|
||||
fieldList.push({type:'BigDecimal',value:'bucketTemperature',text:'料罐温度',dictCode:''})
|
||||
fieldList.push({type:'BigDecimal',value:'moldTemperature',text:'模具温度',dictCode:''})
|
||||
fieldList.push({type:'string',value:'eqtNo',text:'浇筑设备编号',dictCode:''})
|
||||
fieldList.push({type:'date',value:'createTime',text:'记录的创建时间'})
|
||||
this.superFieldList = fieldList
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
@ -0,0 +1,123 @@
|
||||
<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" disabled="true" ></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="料罐温度(℃)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bucketTemperature">
|
||||
<a-input-number v-model="model.bucketTemperature" placeholder="请输入料罐温度" style="width: 100%" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="模具温度(℃)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moldTemperature">
|
||||
<a-input-number v-model="model.moldTemperature" 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: 'TtPouringEquipForm',
|
||||
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: {
|
||||
bucketTemperature: [
|
||||
{ required: true, message: '请输入料罐温度!'},
|
||||
],
|
||||
moldTemperature: [
|
||||
{ required: true, message: '请输入模具温度!'},
|
||||
],
|
||||
// eqtNo: [
|
||||
// { required: true, message: '请输入浇筑设备编号!'},
|
||||
// ],
|
||||
},
|
||||
url: {
|
||||
add: "/ttpouringequip/ttPouringEquip/add",
|
||||
edit: "/ttpouringequip/ttPouringEquip/edit",
|
||||
queryById: "/ttpouringequip/ttPouringEquip/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-pouring-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-pouring-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 TtPouringEquipForm from './TtPouringEquipForm'
|
||||
|
||||
export default {
|
||||
name: 'TtPouringEquipModal',
|
||||
components: {
|
||||
TtPouringEquipForm
|
||||
},
|
||||
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-pouring-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-pouring-equip-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtPouringEquipForm from './TtPouringEquipForm'
|
||||
export default {
|
||||
name: 'TtPouringEquipModal',
|
||||
components: {
|
||||
TtPouringEquipForm
|
||||
},
|
||||
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,178 @@
|
||||
package org.jeecg.modules.demo.tteqtbase.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.tteqtbase.entity.TtEqtBase;
|
||||
import org.jeecg.modules.demo.tteqtbase.service.ITtEqtBaseService;
|
||||
|
||||
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_eqt_base
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="tt_eqt_base")
|
||||
@RestController
|
||||
@RequestMapping("/tteqtbase/ttEqtBase")
|
||||
@Slf4j
|
||||
public class TtEqtBaseController extends JeecgController<TtEqtBase, ITtEqtBaseService> {
|
||||
@Autowired
|
||||
private ITtEqtBaseService ttEqtBaseService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param ttEqtBase
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tt_eqt_base-分页列表查询")
|
||||
@ApiOperation(value="tt_eqt_base-分页列表查询", notes="tt_eqt_base-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<TtEqtBase>> queryPageList(TtEqtBase ttEqtBase,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<TtEqtBase> queryWrapper = QueryGenerator.initQueryWrapper(ttEqtBase, req.getParameterMap());
|
||||
Page<TtEqtBase> page = new Page<TtEqtBase>(pageNo, pageSize);
|
||||
IPage<TtEqtBase> pageList = ttEqtBaseService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param ttEqtBase
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_eqt_base-添加")
|
||||
@ApiOperation(value="tt_eqt_base-添加", notes="tt_eqt_base-添加")
|
||||
//@RequiresPermissions("tteqtbase:tt_eqt_base:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody TtEqtBase ttEqtBase) {
|
||||
ttEqtBaseService.save(ttEqtBase);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param ttEqtBase
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_eqt_base-编辑")
|
||||
@ApiOperation(value="tt_eqt_base-编辑", notes="tt_eqt_base-编辑")
|
||||
//@RequiresPermissions("tteqtbase:tt_eqt_base:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody TtEqtBase ttEqtBase) {
|
||||
ttEqtBaseService.updateById(ttEqtBase);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_eqt_base-通过id删除")
|
||||
@ApiOperation(value="tt_eqt_base-通过id删除", notes="tt_eqt_base-通过id删除")
|
||||
//@RequiresPermissions("tteqtbase:tt_eqt_base:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
ttEqtBaseService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_eqt_base-批量删除")
|
||||
@ApiOperation(value="tt_eqt_base-批量删除", notes="tt_eqt_base-批量删除")
|
||||
//@RequiresPermissions("tteqtbase:tt_eqt_base:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.ttEqtBaseService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tt_eqt_base-通过id查询")
|
||||
@ApiOperation(value="tt_eqt_base-通过id查询", notes="tt_eqt_base-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<TtEqtBase> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
TtEqtBase ttEqtBase = ttEqtBaseService.getById(id);
|
||||
if(ttEqtBase==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(ttEqtBase);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param ttEqtBase
|
||||
*/
|
||||
//@RequiresPermissions("tteqtbase:tt_eqt_base:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, TtEqtBase ttEqtBase) {
|
||||
return super.exportXls(request, ttEqtBase, TtEqtBase.class, "tt_eqt_base");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
//@RequiresPermissions("tteqtbase:tt_eqt_base:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, TtEqtBase.class);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package org.jeecg.modules.demo.tteqtbase.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.tteqtbase.entity.TtEqtBase;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: tt_eqt_base
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface TtEqtBaseMapper extends BaseMapper<TtEqtBase> {
|
||||
|
||||
}
|
@ -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.tteqtbase.mapper.TtEqtBaseMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,14 @@
|
||||
package org.jeecg.modules.demo.tteqtbase.service;
|
||||
|
||||
import org.jeecg.modules.demo.tteqtbase.entity.TtEqtBase;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: tt_eqt_base
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITtEqtBaseService extends IService<TtEqtBase> {
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package org.jeecg.modules.demo.tteqtbase.service.impl;
|
||||
|
||||
import org.jeecg.modules.demo.tteqtbase.entity.TtEqtBase;
|
||||
import org.jeecg.modules.demo.tteqtbase.mapper.TtEqtBaseMapper;
|
||||
import org.jeecg.modules.demo.tteqtbase.service.ITtEqtBaseService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: tt_eqt_base
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class TtEqtBaseServiceImpl extends ServiceImpl<TtEqtBaseMapper, TtEqtBase> implements ITtEqtBaseService {
|
||||
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="false"
|
||||
@close="close"
|
||||
destroyOnClose
|
||||
:visible="visible">
|
||||
<tt-eqt-base-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-eqt-base-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 TtEqtBaseForm from './TtEqtBaseForm'
|
||||
|
||||
export default {
|
||||
name: 'TtEqtBaseModal',
|
||||
components: {
|
||||
TtEqtBaseForm
|
||||
},
|
||||
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-eqt-base-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-eqt-base-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtEqtBaseForm from './TtEqtBaseForm'
|
||||
export default {
|
||||
name: 'TtEqtBaseModal',
|
||||
components: {
|
||||
TtEqtBaseForm
|
||||
},
|
||||
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,195 @@
|
||||
package org.jeecg.modules.demo.ttfeedingequip.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.checkerframework.checker.units.qual.A;
|
||||
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.tteqtbase.entity.TtEqtBase;
|
||||
|
||||
import org.jeecg.modules.demo.tteqtbase.service.ITtEqtBaseService;
|
||||
import org.jeecg.modules.demo.ttfeedingequip.entity.TtFeedingEquip;
|
||||
import org.jeecg.modules.demo.ttfeedingequip.service.ITtFeedingEquipService;
|
||||
|
||||
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.jeecg.modules.demo.ttpouringequip.entity.TtPouringEquip;
|
||||
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_feeding_equip
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="tt_feeding_equip")
|
||||
@RestController
|
||||
@RequestMapping("/ttfeedingequip/ttFeedingEquip")
|
||||
@Slf4j
|
||||
public class TtFeedingEquipController extends JeecgController<TtFeedingEquip, ITtFeedingEquipService> {
|
||||
@Autowired
|
||||
private ITtFeedingEquipService ttFeedingEquipService;
|
||||
|
||||
@Autowired
|
||||
private ITtEqtBaseService ttEqtBaseService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param ttFeedingEquip
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tt_feeding_equip-分页列表查询")
|
||||
@ApiOperation(value="tt_feeding_equip-分页列表查询", notes="tt_feeding_equip-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<TtFeedingEquip>> queryPageList(TtFeedingEquip ttFeedingEquip,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<TtFeedingEquip> queryWrapper = QueryGenerator.initQueryWrapper(ttFeedingEquip, req.getParameterMap());
|
||||
Page<TtFeedingEquip> page = new Page<TtFeedingEquip>(pageNo, pageSize);
|
||||
IPage<TtFeedingEquip> pageList = ttFeedingEquipService.page(page, queryWrapper);
|
||||
List<TtFeedingEquip> list = pageList.getRecords();
|
||||
for (TtFeedingEquip feeding : list){
|
||||
QueryWrapper<TtEqtBase> eqtBase = new QueryWrapper<>();
|
||||
eqtBase.eq("eqt_no",feeding.getEqtNo());
|
||||
eqtBase.eq("eqt_type",5);
|
||||
TtEqtBase ttEqtBase = ttEqtBaseService.getOne(eqtBase);
|
||||
feeding.setDescr(ttEqtBase.getDescr());
|
||||
}
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param ttFeedingEquip
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_feeding_equip-添加")
|
||||
@ApiOperation(value="tt_feeding_equip-添加", notes="tt_feeding_equip-添加")
|
||||
//@RequiresPermissions("ttfeedingequip:tt_feeding_equip:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody TtFeedingEquip ttFeedingEquip) {
|
||||
ttFeedingEquipService.save(ttFeedingEquip);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param ttFeedingEquip
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_feeding_equip-编辑")
|
||||
@ApiOperation(value="tt_feeding_equip-编辑", notes="tt_feeding_equip-编辑")
|
||||
//@RequiresPermissions("ttfeedingequip:tt_feeding_equip:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody TtFeedingEquip ttFeedingEquip) {
|
||||
ttFeedingEquipService.updateById(ttFeedingEquip);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_feeding_equip-通过id删除")
|
||||
@ApiOperation(value="tt_feeding_equip-通过id删除", notes="tt_feeding_equip-通过id删除")
|
||||
//@RequiresPermissions("ttfeedingequip:tt_feeding_equip:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
ttFeedingEquipService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_feeding_equip-批量删除")
|
||||
@ApiOperation(value="tt_feeding_equip-批量删除", notes="tt_feeding_equip-批量删除")
|
||||
//@RequiresPermissions("ttfeedingequip:tt_feeding_equip:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.ttFeedingEquipService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tt_feeding_equip-通过id查询")
|
||||
@ApiOperation(value="tt_feeding_equip-通过id查询", notes="tt_feeding_equip-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<TtFeedingEquip> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
TtFeedingEquip ttFeedingEquip = ttFeedingEquipService.getById(id);
|
||||
if(ttFeedingEquip==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(ttFeedingEquip);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param ttFeedingEquip
|
||||
*/
|
||||
//@RequiresPermissions("ttfeedingequip:tt_feeding_equip:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, TtFeedingEquip ttFeedingEquip) {
|
||||
return super.exportXls(request, ttFeedingEquip, TtFeedingEquip.class, "tt_feeding_equip");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
//@RequiresPermissions("ttfeedingequip:tt_feeding_equip:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, TtFeedingEquip.class);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package org.jeecg.modules.demo.ttfeedingequip.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.ttfeedingequip.entity.TtFeedingEquip;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: tt_feeding_equip
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface TtFeedingEquipMapper extends BaseMapper<TtFeedingEquip> {
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
<?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.ttfeedingequip.mapper.TtFeedingEquipMapper">
|
||||
<select id="queryFeedingData" resultType="org.jeecg.modules.demo.ttfeedingequip.entity.TtFeedingEquip">
|
||||
SELECT
|
||||
a.id,
|
||||
a.eqt_no,
|
||||
a.bucket_temperature,
|
||||
b.descr,
|
||||
a.create_time
|
||||
FROM
|
||||
`tt_feeding_equip` a
|
||||
LEFT JOIN tt_eqt_base b ON b.eqt_type = 5
|
||||
AND a.eqt_no = b.eqt_no
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,14 @@
|
||||
package org.jeecg.modules.demo.ttfeedingequip.service;
|
||||
|
||||
import org.jeecg.modules.demo.ttfeedingequip.entity.TtFeedingEquip;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: tt_feeding_equip
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITtFeedingEquipService extends IService<TtFeedingEquip> {
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package org.jeecg.modules.demo.ttfeedingequip.service.impl;
|
||||
|
||||
import org.jeecg.modules.demo.ttfeedingequip.entity.TtFeedingEquip;
|
||||
import org.jeecg.modules.demo.ttfeedingequip.mapper.TtFeedingEquipMapper;
|
||||
import org.jeecg.modules.demo.ttfeedingequip.service.ITtFeedingEquipService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: tt_feeding_equip
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class TtFeedingEquipServiceImpl extends ServiceImpl<TtFeedingEquipMapper, TtFeedingEquip> implements ITtFeedingEquipService {
|
||||
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="false"
|
||||
@close="close"
|
||||
destroyOnClose
|
||||
:visible="visible">
|
||||
<tt-feeding-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-feeding-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 TtFeedingEquipForm from './TtFeedingEquipForm'
|
||||
|
||||
export default {
|
||||
name: 'TtFeedingEquipModal',
|
||||
components: {
|
||||
TtFeedingEquipForm
|
||||
},
|
||||
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-feeding-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-feeding-equip-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtFeedingEquipForm from './TtFeedingEquipForm'
|
||||
export default {
|
||||
name: 'TtFeedingEquipModal',
|
||||
components: {
|
||||
TtFeedingEquipForm
|
||||
},
|
||||
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,196 @@
|
||||
package org.jeecg.modules.demo.ttmoldtemperatureequip.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.tteqtbase.entity.TtEqtBase;
|
||||
import org.jeecg.modules.demo.tteqtbase.service.ITtEqtBaseService;
|
||||
|
||||
|
||||
|
||||
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.jeecg.modules.demo.ttmoldtemperatureequip.entity.TtMoldTemperatureEquip;
|
||||
import org.jeecg.modules.demo.ttmoldtemperatureequip.service.ITtMoldTemperatureEquipService;
|
||||
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_mold_temperature_equip
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="tt_mold_temperature_equip")
|
||||
@RestController
|
||||
@RequestMapping("/ttmoldtemperatureequip/ttMoldTemperatureEquip")
|
||||
@Slf4j
|
||||
public class TtMoldTemperatureEquipController extends JeecgController<TtMoldTemperatureEquip, ITtMoldTemperatureEquipService> {
|
||||
@Autowired
|
||||
private ITtMoldTemperatureEquipService ttMoldTemperatureEquipService;
|
||||
|
||||
@Autowired
|
||||
private ITtEqtBaseService ttEqtBaseService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param ttMoldTemperatureEquip
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tt_mold_temperature_equip-分页列表查询")
|
||||
@ApiOperation(value="tt_mold_temperature_equip-分页列表查询", notes="tt_mold_temperature_equip-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<TtMoldTemperatureEquip>> queryPageList(TtMoldTemperatureEquip ttMoldTemperatureEquip,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<TtMoldTemperatureEquip> queryWrapper = QueryGenerator.initQueryWrapper(ttMoldTemperatureEquip, req.getParameterMap());
|
||||
Page<TtMoldTemperatureEquip> page = new Page<TtMoldTemperatureEquip>(pageNo, pageSize);
|
||||
IPage<TtMoldTemperatureEquip> pageList = ttMoldTemperatureEquipService.page(page, queryWrapper);
|
||||
List<TtMoldTemperatureEquip> list = pageList.getRecords();
|
||||
for (TtMoldTemperatureEquip mold : list){
|
||||
QueryWrapper<TtEqtBase> eqtBase = new QueryWrapper<>();
|
||||
eqtBase.eq("eqt_no",mold.getEqtNo());
|
||||
eqtBase.eq("eqt_type",7);
|
||||
TtEqtBase ttEqtBase = ttEqtBaseService.getOne(eqtBase);
|
||||
mold.setDescr(ttEqtBase.getDescr());
|
||||
}
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param ttMoldTemperatureEquip
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_mold_temperature_equip-添加")
|
||||
@ApiOperation(value="tt_mold_temperature_equip-添加", notes="tt_mold_temperature_equip-添加")
|
||||
//@RequiresPermissions("ttmoldtemperatureequip:tt_mold_temperature_equip:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody TtMoldTemperatureEquip ttMoldTemperatureEquip) {
|
||||
ttMoldTemperatureEquipService.save(ttMoldTemperatureEquip);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param ttMoldTemperatureEquip
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_mold_temperature_equip-编辑")
|
||||
@ApiOperation(value="tt_mold_temperature_equip-编辑", notes="tt_mold_temperature_equip-编辑")
|
||||
//@RequiresPermissions("ttmoldtemperatureequip:tt_mold_temperature_equip:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody TtMoldTemperatureEquip ttMoldTemperatureEquip) {
|
||||
ttMoldTemperatureEquipService.updateById(ttMoldTemperatureEquip);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_mold_temperature_equip-通过id删除")
|
||||
@ApiOperation(value="tt_mold_temperature_equip-通过id删除", notes="tt_mold_temperature_equip-通过id删除")
|
||||
//@RequiresPermissions("ttmoldtemperatureequip:tt_mold_temperature_equip:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
ttMoldTemperatureEquipService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_mold_temperature_equip-批量删除")
|
||||
@ApiOperation(value="tt_mold_temperature_equip-批量删除", notes="tt_mold_temperature_equip-批量删除")
|
||||
//@RequiresPermissions("ttmoldtemperatureequip:tt_mold_temperature_equip:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.ttMoldTemperatureEquipService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tt_mold_temperature_equip-通过id查询")
|
||||
@ApiOperation(value="tt_mold_temperature_equip-通过id查询", notes="tt_mold_temperature_equip-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<TtMoldTemperatureEquip> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
TtMoldTemperatureEquip ttMoldTemperatureEquip = ttMoldTemperatureEquipService.getById(id);
|
||||
if(ttMoldTemperatureEquip==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(ttMoldTemperatureEquip);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param ttMoldTemperatureEquip
|
||||
*/
|
||||
//@RequiresPermissions("ttmoldtemperatureequip:tt_mold_temperature_equip:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, TtMoldTemperatureEquip ttMoldTemperatureEquip) {
|
||||
return super.exportXls(request, ttMoldTemperatureEquip, TtMoldTemperatureEquip.class, "tt_mold_temperature_equip");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
//@RequiresPermissions("ttmoldtemperatureequip:tt_mold_temperature_equip:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, TtMoldTemperatureEquip.class);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package org.jeecg.modules.demo.ttmoldtemperatureequip.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.ttmoldtemperatureequip.entity.TtMoldTemperatureEquip;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: tt_mold_temperature_equip
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface TtMoldTemperatureEquipMapper extends BaseMapper<TtMoldTemperatureEquip> {
|
||||
|
||||
}
|
@ -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.ttmoldtemperatureequip.mapper.TtMoldTemperatureEquipMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,14 @@
|
||||
package org.jeecg.modules.demo.ttmoldtemperatureequip.service;
|
||||
|
||||
import org.jeecg.modules.demo.ttmoldtemperatureequip.entity.TtMoldTemperatureEquip;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: tt_mold_temperature_equip
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITtMoldTemperatureEquipService extends IService<TtMoldTemperatureEquip> {
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package org.jeecg.modules.demo.ttmoldtemperatureequip.service.impl;
|
||||
|
||||
import org.jeecg.modules.demo.ttmoldtemperatureequip.entity.TtMoldTemperatureEquip;
|
||||
import org.jeecg.modules.demo.ttmoldtemperatureequip.mapper.TtMoldTemperatureEquipMapper;
|
||||
import org.jeecg.modules.demo.ttmoldtemperatureequip.service.ITtMoldTemperatureEquipService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: tt_mold_temperature_equip
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class TtMoldTemperatureEquipServiceImpl extends ServiceImpl<TtMoldTemperatureEquipMapper, TtMoldTemperatureEquip> implements ITtMoldTemperatureEquipService {
|
||||
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="false"
|
||||
@close="close"
|
||||
destroyOnClose
|
||||
:visible="visible">
|
||||
<tt-mold-temperature-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-mold-temperature-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 TtMoldTemperatureEquipForm from './TtMoldTemperatureEquipForm'
|
||||
|
||||
export default {
|
||||
name: 'TtMoldTemperatureEquipModal',
|
||||
components: {
|
||||
TtMoldTemperatureEquipForm
|
||||
},
|
||||
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-mold-temperature-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-mold-temperature-equip-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtMoldTemperatureEquipForm from './TtMoldTemperatureEquipForm'
|
||||
export default {
|
||||
name: 'TtMoldTemperatureEquipModal',
|
||||
components: {
|
||||
TtMoldTemperatureEquipForm
|
||||
},
|
||||
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,193 @@
|
||||
package org.jeecg.modules.demo.ttpouringequip.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.PrimitiveIterator;
|
||||
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.tteqtbase.entity.TtEqtBase;
|
||||
import org.jeecg.modules.demo.tteqtbase.service.ITtEqtBaseService;
|
||||
import org.jeecg.modules.demo.ttmoldtemperatureequip.entity.TtMoldTemperatureEquip;
|
||||
import org.jeecg.modules.demo.ttpouringequip.entity.TtPouringEquip;
|
||||
import org.jeecg.modules.demo.ttpouringequip.service.ITtPouringEquipService;
|
||||
|
||||
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_pouring_equip
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="tt_pouring_equip")
|
||||
@RestController
|
||||
@RequestMapping("/ttpouringequip/ttPouringEquip")
|
||||
@Slf4j
|
||||
public class TtPouringEquipController extends JeecgController<TtPouringEquip, ITtPouringEquipService> {
|
||||
@Autowired
|
||||
private ITtPouringEquipService ttPouringEquipService;
|
||||
|
||||
@Autowired
|
||||
private ITtEqtBaseService ttEqtBaseService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param ttPouringEquip
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tt_pouring_equip-分页列表查询")
|
||||
@ApiOperation(value="tt_pouring_equip-分页列表查询", notes="tt_pouring_equip-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<TtPouringEquip>> queryPageList(TtPouringEquip ttPouringEquip,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<TtPouringEquip> queryWrapper = QueryGenerator.initQueryWrapper(ttPouringEquip, req.getParameterMap());
|
||||
Page<TtPouringEquip> page = new Page<TtPouringEquip>(pageNo, pageSize);
|
||||
IPage<TtPouringEquip> pageList = ttPouringEquipService.page(page, queryWrapper);
|
||||
List<TtPouringEquip> list = pageList.getRecords();
|
||||
for (TtPouringEquip pouring : list){
|
||||
QueryWrapper<TtEqtBase> eqtBase = new QueryWrapper<>();
|
||||
eqtBase.eq("eqt_no",pouring.getEqtNo());
|
||||
eqtBase.eq("eqt_type",2);
|
||||
TtEqtBase ttEqtBase = ttEqtBaseService.getOne(eqtBase);
|
||||
pouring.setEqtSupplier(ttEqtBase.getEqtSupplier());
|
||||
}
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param ttPouringEquip
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_pouring_equip-添加")
|
||||
@ApiOperation(value="tt_pouring_equip-添加", notes="tt_pouring_equip-添加")
|
||||
//@RequiresPermissions("ttpouringequip:tt_pouring_equip:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody TtPouringEquip ttPouringEquip) {
|
||||
ttPouringEquipService.save(ttPouringEquip);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param ttPouringEquip
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_pouring_equip-编辑")
|
||||
@ApiOperation(value="tt_pouring_equip-编辑", notes="tt_pouring_equip-编辑")
|
||||
//@RequiresPermissions("ttpouringequip:tt_pouring_equip:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody TtPouringEquip ttPouringEquip) {
|
||||
ttPouringEquipService.updateById(ttPouringEquip);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_pouring_equip-通过id删除")
|
||||
@ApiOperation(value="tt_pouring_equip-通过id删除", notes="tt_pouring_equip-通过id删除")
|
||||
//@RequiresPermissions("ttpouringequip:tt_pouring_equip:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
ttPouringEquipService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_pouring_equip-批量删除")
|
||||
@ApiOperation(value="tt_pouring_equip-批量删除", notes="tt_pouring_equip-批量删除")
|
||||
//@RequiresPermissions("ttpouringequip:tt_pouring_equip:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.ttPouringEquipService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tt_pouring_equip-通过id查询")
|
||||
@ApiOperation(value="tt_pouring_equip-通过id查询", notes="tt_pouring_equip-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<TtPouringEquip> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
TtPouringEquip ttPouringEquip = ttPouringEquipService.getById(id);
|
||||
if(ttPouringEquip==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(ttPouringEquip);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param ttPouringEquip
|
||||
*/
|
||||
//@RequiresPermissions("ttpouringequip:tt_pouring_equip:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, TtPouringEquip ttPouringEquip) {
|
||||
return super.exportXls(request, ttPouringEquip, TtPouringEquip.class, "tt_pouring_equip");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
//@RequiresPermissions("ttpouringequip:tt_pouring_equip:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, TtPouringEquip.class);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package org.jeecg.modules.demo.ttpouringequip.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.ttpouringequip.entity.TtPouringEquip;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: tt_pouring_equip
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface TtPouringEquipMapper extends BaseMapper<TtPouringEquip> {
|
||||
|
||||
}
|
@ -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.ttpouringequip.mapper.TtPouringEquipMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,14 @@
|
||||
package org.jeecg.modules.demo.ttpouringequip.service;
|
||||
|
||||
import org.jeecg.modules.demo.ttpouringequip.entity.TtPouringEquip;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: tt_pouring_equip
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITtPouringEquipService extends IService<TtPouringEquip> {
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package org.jeecg.modules.demo.ttpouringequip.service.impl;
|
||||
|
||||
import org.jeecg.modules.demo.ttpouringequip.entity.TtPouringEquip;
|
||||
import org.jeecg.modules.demo.ttpouringequip.mapper.TtPouringEquipMapper;
|
||||
import org.jeecg.modules.demo.ttpouringequip.service.ITtPouringEquipService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: tt_pouring_equip
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class TtPouringEquipServiceImpl extends ServiceImpl<TtPouringEquipMapper, TtPouringEquip> implements ITtPouringEquipService {
|
||||
|
||||
}
|
@ -0,0 +1,214 @@
|
||||
<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>
|
||||
</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_begin"></j-date>
|
||||
<span class="query-group-split-cust"></span>
|
||||
<j-date placeholder="请选择结束日期" class="query-group-cust" v-model="queryParam.createTime_end"></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>
|
||||
<a @click="handleToggleSearch" style="margin-left: 8px">
|
||||
{{ toggleSearchStatus ? '收起' : '展开' }}
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
||||
</a>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- 查询区域-END -->
|
||||
|
||||
<!-- 操作按钮区域 -->
|
||||
<div class="table-operator">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('tt_pouring_equip')">导出</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-pouring-equip-modal ref="modalForm" @ok="modalFormOk"></tt-pouring-equip-modal>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import '@/assets/less/TableExpand.less'
|
||||
import { mixinDevice } from '@/utils/mixin'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import TtPouringEquipModal from './modules/TtPouringEquipModal'
|
||||
|
||||
export default {
|
||||
name: 'TtPouringEquipList',
|
||||
mixins:[JeecgListMixin, mixinDevice],
|
||||
components: {
|
||||
TtPouringEquipModal
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
description: 'tt_pouring_equip管理页面',
|
||||
// 表头
|
||||
columns: [
|
||||
{
|
||||
title: '#',
|
||||
dataIndex: '',
|
||||
key:'rowIndex',
|
||||
width:60,
|
||||
align:"center",
|
||||
customRender:function (t,r,index) {
|
||||
return parseInt(index)+1;
|
||||
}
|
||||
},
|
||||
{
|
||||
title:'料罐温度',
|
||||
align:"center",
|
||||
dataIndex: 'bucketTemperature'
|
||||
},
|
||||
{
|
||||
title:'模具温度',
|
||||
align:"center",
|
||||
dataIndex: 'moldTemperature'
|
||||
},
|
||||
{
|
||||
title:'浇筑设备编号',
|
||||
align:"center",
|
||||
dataIndex: 'eqtNo'
|
||||
},
|
||||
{
|
||||
title:'记录的创建时间',
|
||||
align:"center",
|
||||
dataIndex: 'createTime',
|
||||
customRender:function (text) {
|
||||
return !text?"":(text.length>10?text.substr(0,10):text)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align:"center",
|
||||
fixed:"right",
|
||||
width:147,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: "/ttpouringequip/ttPouringEquip/list",
|
||||
delete: "/ttpouringequip/ttPouringEquip/delete",
|
||||
deleteBatch: "/ttpouringequip/ttPouringEquip/deleteBatch",
|
||||
exportXlsUrl: "/ttpouringequip/ttPouringEquip/exportXls",
|
||||
importExcelUrl: "ttpouringequip/ttPouringEquip/importExcel",
|
||||
|
||||
},
|
||||
dictOptions:{},
|
||||
superFieldList:[],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getSuperFieldList();
|
||||
},
|
||||
computed: {
|
||||
importExcelUrl: function(){
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
initDictConfig(){
|
||||
},
|
||||
getSuperFieldList(){
|
||||
let fieldList=[];
|
||||
fieldList.push({type:'BigDecimal',value:'bucketTemperature',text:'料罐温度',dictCode:''})
|
||||
fieldList.push({type:'BigDecimal',value:'moldTemperature',text:'模具温度',dictCode:''})
|
||||
fieldList.push({type:'string',value:'eqtNo',text:'浇筑设备编号',dictCode:''})
|
||||
fieldList.push({type:'date',value:'createTime',text:'记录的创建时间'})
|
||||
this.superFieldList = fieldList
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
@ -0,0 +1,123 @@
|
||||
<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="bucketTemperature">
|
||||
<a-input-number v-model="model.bucketTemperature" placeholder="请输入料罐温度" style="width: 100%" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="模具温度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moldTemperature">
|
||||
<a-input-number v-model="model.moldTemperature" placeholder="请输入模具温度" style="width: 100%" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<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-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: 'TtPouringEquipForm',
|
||||
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: {
|
||||
bucketTemperature: [
|
||||
{ required: true, message: '请输入料罐温度!'},
|
||||
],
|
||||
moldTemperature: [
|
||||
{ required: true, message: '请输入模具温度!'},
|
||||
],
|
||||
eqtNo: [
|
||||
{ required: true, message: '请输入浇筑设备编号!'},
|
||||
],
|
||||
},
|
||||
url: {
|
||||
add: "/ttpouringequip/ttPouringEquip/add",
|
||||
edit: "/ttpouringequip/ttPouringEquip/edit",
|
||||
queryById: "/ttpouringequip/ttPouringEquip/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-pouring-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-pouring-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 TtPouringEquipForm from './TtPouringEquipForm'
|
||||
|
||||
export default {
|
||||
name: 'TtPouringEquipModal',
|
||||
components: {
|
||||
TtPouringEquipForm
|
||||
},
|
||||
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-pouring-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-pouring-equip-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtPouringEquipForm from './TtPouringEquipForm'
|
||||
export default {
|
||||
name: 'TtPouringEquipModal',
|
||||
components: {
|
||||
TtPouringEquipForm
|
||||
},
|
||||
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
Loading…
Reference in new issue