tengxi 2 years ago
parent c5203e407c
commit aa28880ef8

@ -0,0 +1,220 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="电表编号">
<!-- <a-input placeholder="请输入设备编号" v-model="queryParam.eqtNo"></a-input>-->
<j-input placeholder="请输入电表编号" v-model="queryParam.eqtNo"></j-input>
</a-form-item>
</a-col>
<a-col :xl="10" :lg="11" :md="12" :sm="24">
<a-form-item label="开始时间">
<j-date placeholder="请选择开始日期" class="query-group-cust" v-model="queryParam.createTime"></j-date>
<span class="query-group-split-cust"></span>
<j-date placeholder="请选择结束日期" class="query-group-cust" v-model="queryParam.updateTime"></j-date>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<a-button type="primary" icon="download" @click="handleExportXls('tt_electric_meter')"></a-button>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
<!-- </a-menu>-->
<!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
<!-- </a-dropdown>-->
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected"></a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)"></a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tt-electric-meter-modal ref="modalForm" @ok="modalFormOk"></tt-electric-meter-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtElectricMeterModal from './modules/TtElectricMeterModal'
import JInput from '@/components/jeecg/JInput'
export default {
name: 'TtElectricMeterList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtElectricMeterModal,
JInput
},
data () {
return {
description: 'tt_electric_meter管理页面',
//
columns: [
// {
// title: '#',
// dataIndex: '',
// key:'rowIndex',
// width:60,
// align:"center",
// customRender:function (t,r,index) {
// return parseInt(index)+1;
// }
// },
{
title:'电表编号',
align:"center",
dataIndex: 'eqtNo'
},
{
title:'设备位置',
align:"center",
dataIndex: 'location'
},
{
title:'谷电量(度)',
align:"center",
dataIndex: 'valleyPower'
},
{
title:'峰电量(度)',
align:"center",
dataIndex: 'peakPower'
},
{
title:'采集时间',
align:"center",
dataIndex: 'createTime'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
// list: "/ttelectricmeter/ttElectricMeter/list",
list: "/ttelectricmeter/ttElectricMeter/QueryElectricMeterList",
delete: "/ttelectricmeter/ttElectricMeter/delete",
deleteBatch: "/ttelectricmeter/ttElectricMeter/deleteBatch",
exportXlsUrl: "/ttelectricmeter/ttElectricMeter/exportXls",
importExcelUrl: "ttelectricmeter/ttElectricMeter/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'eqtNo',text:'电表编号'})
fieldList.push({type:'number',value:'valleyPower',text:'谷电量'})
fieldList.push({type:'number',value:'peakPower',text:'峰电量'})
fieldList.push({type:'datetime',value:'createTime',text:'采集时间'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- 注意该页面对应的前台目录为views/ttelectricmeter文件夹下
-- 如果你想更改到其他目录请修改sql中component字段对应的值
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2023021403266860110', NULL, 'tt_electric_meter', '/ttelectricmeter/ttElectricMeterList', 'ttelectricmeter/TtElectricMeterList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-14 15:26:11', NULL, NULL, 0);
-- 权限控制sql
-- 新增
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021403266860111', '2023021403266860110', '添加tt_electric_meter', NULL, NULL, 0, NULL, NULL, 2, 'ttelectricmeter:tt_electric_meter:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 15:26:11', NULL, NULL, 0, 0, '1', 0);
-- 编辑
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021403266860112', '2023021403266860110', '编辑tt_electric_meter', NULL, NULL, 0, NULL, NULL, 2, 'ttelectricmeter:tt_electric_meter:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 15:26:11', NULL, NULL, 0, 0, '1', 0);
-- 删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021403266860113', '2023021403266860110', '删除tt_electric_meter', NULL, NULL, 0, NULL, NULL, 2, 'ttelectricmeter:tt_electric_meter:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 15:26:11', NULL, NULL, 0, 0, '1', 0);
-- 批量删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021403266860114', '2023021403266860110', '批量删除tt_electric_meter', NULL, NULL, 0, NULL, NULL, 2, 'ttelectricmeter:tt_electric_meter:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 15:26:11', NULL, NULL, 0, 0, '1', 0);
-- 导出excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021403266860115', '2023021403266860110', '导出excel_tt_electric_meter', NULL, NULL, 0, NULL, NULL, 2, 'ttelectricmeter:tt_electric_meter:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 15:26:11', NULL, NULL, 0, 0, '1', 0);
-- 导入excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021403266860116', '2023021403266860110', '导入excel_tt_electric_meter', NULL, NULL, 0, NULL, NULL, 2, 'ttelectricmeter:tt_electric_meter:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 15:26:11', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,120 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="电表编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="eqtNo">
<a-input v-model="model.eqtNo" placeholder="请输入电表编号" disabled="disabled" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="谷电量(度)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="valleyPower">
<a-input-number v-model="model.valleyPower" placeholder="请输入谷电量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="峰电量(度)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="peakPower">
<a-input-number v-model="model.peakPower" placeholder="请输入峰电量" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtElectricMeterForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
eqtNo: [
{ required: true, message: '请输入电表编号!'},
],
peakPower: [
{ required: true, message: '请输入峰电量!'},
],
},
url: {
add: "/ttelectricmeter/ttElectricMeter/add",
edit: "/ttelectricmeter/ttElectricMeter/edit",
queryById: "/ttelectricmeter/ttElectricMeter/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tt-electric-meter-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-electric-meter-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;"></a-button>
</div>
</a-drawer>
</template>
<script>
import TtElectricMeterForm from './TtElectricMeterForm'
export default {
name: 'TtElectricMeterModal',
components: {
TtElectricMeterForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tt-electric-meter-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-electric-meter-form>
</j-modal>
</template>
<script>
import TtElectricMeterForm from './TtElectricMeterForm'
export default {
name: 'TtElectricMeterModal',
components: {
TtElectricMeterForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,266 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="设备编号">
<!-- <a-input placeholder="请输入设备编号" v-model="queryParam.eqtNo"></a-input>-->
<j-input placeholder="请输入设备编号" v-model="queryParam.eqtNo"></j-input>
</a-form-item>
</a-col>
<a-col :xl="10" :lg="11" :md="12" :sm="24">
<a-form-item label="开始时间">
<j-date placeholder="请选择开始日期" class="query-group-cust" v-model="queryParam.createTime"></j-date>
<span class="query-group-split-cust"></span>
<j-date placeholder="请选择结束日期" class="query-group-cust" v-model="queryParam.updateTime"></j-date>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<a-button type="primary" icon="download" @click="handleExportXls('tt_sulf_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-sulf-equip-modal ref="modalForm" @ok="modalFormOk"></tt-sulf-equip-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtSulfEquipModal from './modules/TtSulfEquipModal'
import JInput from '@/components/jeecg/JInput'
export default {
name: 'TtSulfEquipList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtSulfEquipModal,
JInput
},
data () {
return {
description: 'tt_sulf_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: 'openDate',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'开模时间',
align:"center",
dataIndex: 'openTime'
},
{
title:'产品批号',
align:"center",
dataIndex: 'lotNo'
},
{
title:'胶料牌号',
align:"center",
dataIndex: 'rubberNo'
},
{
title:'模具编号',
align:"center",
dataIndex: 'moldNo'
},
{
title:'硫化压力',
align:"center",
dataIndex: 'sulfPressure'
},
{
title:'硫化时间',
align:"center",
dataIndex: 'sulfTime'
},
{
title:'硫化温度(上模)',
align:"center",
dataIndex: 'sulfTempUpper'
},
{
title:'硫化温度(中模)',
align:"center",
dataIndex: 'sulfTempMiddle'
},
{
title:'硫化温度(下模)',
align:"center",
dataIndex: 'sulfTempLower'
},
{
title:'采集时间',
align:"center",
dataIndex: 'createTime'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/ttsulfequip/ttSulfEquip/list",
delete: "/ttsulfequip/ttSulfEquip/delete",
deleteBatch: "/ttsulfequip/ttSulfEquip/deleteBatch",
exportXlsUrl: "/ttsulfequip/ttSulfEquip/exportXls",
importExcelUrl: "ttsulfequip/ttSulfEquip/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'date',value:'openDate',text:'开模日期'})
fieldList.push({type:'string',value:'openTime',text:'开模时间,类似: 13:15'})
fieldList.push({type:'string',value:'lotNo',text:'产品批号'})
fieldList.push({type:'string',value:'rubberNo',text:'胶料牌号'})
fieldList.push({type:'string',value:'moldNo',text:'模具编号'})
fieldList.push({type:'int',value:'sulfPressure',text:'硫化压力bar单位Mpa'})
fieldList.push({type:'int',value:'sulfTime',text:'硫化时间s单位'})
fieldList.push({type:'int',value:'sulfTempUpper',text:'硫化温度(上模)'})
fieldList.push({type:'int',value:'sulfTempMiddle',text:'硫化温度(中模)'})
fieldList.push({type:'int',value:'sulfTempLower',text:'硫化温度(下模)'})
fieldList.push({type:'string',value:'eqtNo',text:'设备编号类似31,32,33...'})
fieldList.push({type:'datetime',value:'createTime',text:'采集时间'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- 注意该页面对应的前台目录为views/ttsulfequip文件夹下
-- 如果你想更改到其他目录请修改sql中component字段对应的值
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2023021408258300530', NULL, 'tt_sulf_equip', '/ttsulfequip/ttSulfEquipList', 'ttsulfequip/TtSulfEquipList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-14 08:25:53', NULL, NULL, 0);
-- 权限控制sql
-- 新增
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021408258300531', '2023021408258300530', '添加tt_sulf_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttsulfequip:tt_sulf_equip:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 08:25:53', NULL, NULL, 0, 0, '1', 0);
-- 编辑
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021408258300532', '2023021408258300530', '编辑tt_sulf_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttsulfequip:tt_sulf_equip:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 08:25:53', NULL, NULL, 0, 0, '1', 0);
-- 删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021408258300533', '2023021408258300530', '删除tt_sulf_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttsulfequip:tt_sulf_equip:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 08:25:53', NULL, NULL, 0, 0, '1', 0);
-- 批量删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021408258310534', '2023021408258300530', '批量删除tt_sulf_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttsulfequip:tt_sulf_equip:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 08:25:53', NULL, NULL, 0, 0, '1', 0);
-- 导出excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021408258310535', '2023021408258300530', '导出excel_tt_sulf_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttsulfequip:tt_sulf_equip:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 08:25:53', NULL, NULL, 0, 0, '1', 0);
-- 导入excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021408258310536', '2023021408258300530', '导入excel_tt_sulf_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttsulfequip:tt_sulf_equip:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 08:25:53', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,189 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="设备编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="eqtNo">
<a-input v-model="model.eqtNo" placeholder="请输入设备编号" disabled="disabled" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="开模日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="openDate">
<j-date placeholder="请选择开模日期" v-model="model.openDate" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="开模时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="openTime">
<a-input v-model="model.openTime" placeholder="请输入开模时间" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品批号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lotNo">
<a-input v-model="model.lotNo" placeholder="请输入产品批号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="胶料牌号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="rubberNo">
<a-input v-model="model.rubberNo" placeholder="请输入胶料牌号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="模具编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moldNo">
<a-input v-model="model.moldNo" placeholder="请输入模具编号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="硫化压力" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sulfPressure">
<a-input-number v-model="model.sulfPressure" placeholder="请输入硫化压力" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="硫化时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sulfTime">
<a-input-number v-model="model.sulfTime" placeholder="请输入硫化时间" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="硫化温度(上模)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sulfTempUpper">
<a-input-number v-model="model.sulfTempUpper" placeholder="请输入硫化温度(上模)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="硫化温度(中模)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sulfTempMiddle">
<a-input-number v-model="model.sulfTempMiddle" placeholder="请输入硫化温度(中模)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="硫化温度(下模)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sulfTempLower">
<a-input-number v-model="model.sulfTempLower" 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: 'TtSulfEquipForm',
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: {
openDate: [
{ required: true, message: '请输入开模日期!'},
],
openTime: [
{ required: true, message: '请输入开模时间,类似: 13:15!'},
],
lotNo: [
{ required: true, message: '请输入产品批号!'},
],
rubberNo: [
{ required: true, message: '请输入胶料牌号!'},
],
moldNo: [
{ required: true, message: '请输入模具编号!'},
],
sulfPressure: [
{ required: true, message: '请输入硫化压力bar单位Mpa!'},
],
sulfTime: [
{ required: true, message: '请输入硫化时间s单位!'},
],
sulfTempUpper: [
{ required: true, message: '请输入硫化温度(上模)!'},
],
sulfTempMiddle: [
{ required: true, message: '请输入硫化温度(中模)!'},
],
sulfTempLower: [
{ required: true, message: '请输入硫化温度(下模)!'},
],
eqtNo: [
{ required: true, message: '请输入设备编号类似31,32,33...!'},
],
},
url: {
add: "/ttsulfequip/ttSulfEquip/add",
edit: "/ttsulfequip/ttSulfEquip/edit",
queryById: "/ttsulfequip/ttSulfEquip/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-sulf-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-sulf-equip-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;"></a-button>
</div>
</a-drawer>
</template>
<script>
import TtSulfEquipForm from './TtSulfEquipForm'
export default {
name: 'TtSulfEquipModal',
components: {
TtSulfEquipForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tt-sulf-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-sulf-equip-form>
</j-modal>
</template>
<script>
import TtSulfEquipForm from './TtSulfEquipForm'
export default {
name: 'TtSulfEquipModal',
components: {
TtSulfEquipForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,254 @@
<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="10" :lg="11" :md="12" :sm="24">
<a-form-item label="创建时间">
<j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.cpdateTime_begin"></j-date>
<span class="query-group-split-cust"></span>
<j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.cpdateTime_end"></j-date>
</a-form-item>
</a-col>
<a-col :xl="10" :lg="11" :md="12" :sm="24">
<a-form-item label="记录的修改时间">
<j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.updateTime_begin"></j-date>
<span class="query-group-split-cust"></span>
<j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.updateTime_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_virsual_sort_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-virsual-sort-equip-modal ref="modalForm" @ok="modalFormOk"></tt-virsual-sort-equip-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtVirsualSortEquipModal from './modules/TtVirsualSortEquipModal'
export default {
name: 'TtVirsualSortEquipList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtVirsualSortEquipModal
},
data () {
return {
description: 'tt_virsual_sort_equip管理页面',
//
columns: [
// {
// title: '#',
// dataIndex: '',
// key:'rowIndex',
// width:60,
// align:"center",
// customRender:function (t,r,index) {
// return parseInt(index)+1;
// }
// },
{
title:'工位',
align:"center",
dataIndex: 'psName'
},
{
title:'检测项',
align:"center",
dataIndex: 'testItem'
},
{
title:'公差上限',
align:"center",
dataIndex: 'upperLimit'
},
{
title:'公差下限',
align:"center",
dataIndex: 'lowerLimit'
},
{
title:'总数',
align:"center",
dataIndex: 'totalCount'
},
{
title:'NG数',
align:"center",
dataIndex: 'ngCount'
},
{
title:'NG率',
align:"center",
dataIndex: 'ngRate'
},
// {
// title:'id12',
// align:"center",
// dataIndex: 'typeId'
// },
// {
// title:'id, 12',
// align:"center",
// dataIndex: 'companyId'
// },
{
title:'采集时间',
align:"center",
dataIndex: 'createTime'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
// list: "/ttvirsualsortequip/ttVirsualSortEquip/list",
list: "/ttvirsualsortequip/ttVirsualSortEquip/QueryTtVirsualSortEquipInfoList",
delete: "/ttvirsualsortequip/ttVirsualSortEquip/delete",
deleteBatch: "/ttvirsualsortequip/ttVirsualSortEquip/deleteBatch",
exportXlsUrl: "/ttvirsualsortequip/ttVirsualSortEquip/exportXls",
importExcelUrl: "ttvirsualsortequip/ttVirsualSortEquip/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:'psName',text:'工位',dictCode:''})
fieldList.push({type:'string',value:'testItem',text:'检测项',dictCode:''})
fieldList.push({type:'BigDecimal',value:'upperLimit',text:'公差上限',dictCode:''})
fieldList.push({type:'BigDecimal',value:'lowerLimit',text:'公差下限',dictCode:''})
fieldList.push({type:'int',value:'totalCount',text:'总数',dictCode:''})
fieldList.push({type:'int',value:'ngCount',text:'NG数',dictCode:''})
fieldList.push({type:'BigDecimal',value:'ngRate',text:'NG率',dictCode:''})
fieldList.push({type:'int',value:'typeId',text:'产品类型id1表示底座2表示胶塞',dictCode:''})
fieldList.push({type:'int',value:'companyId',text:'公司id, 1表示电气元器件2表示轨道扣件',dictCode:''})
fieldList.push({type:'string',value:'createBy',text:'记录的创建人员',dictCode:''})
fieldList.push({type:'datetime',value:'createTime',text:'采集时间'})
fieldList.push({type:'datetime',value:'updateTime',text:'记录的修改时间'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- 注意该页面对应的前台目录为views/ttvirsualsortequip文件夹下
-- 如果你想更改到其他目录请修改sql中component字段对应的值
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2023021402357050400', NULL, 'tt_virsual_sort_equip', '/ttvirsualsortequip/ttVirsualSortEquipList', 'ttvirsualsortequip/TtVirsualSortEquipList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-14 14:35:40', NULL, NULL, 0);
-- 权限控制sql
-- 新增
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021402357050401', '2023021402357050400', '添加tt_virsual_sort_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequip:tt_virsual_sort_equip:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 14:35:40', NULL, NULL, 0, 0, '1', 0);
-- 编辑
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021402357050402', '2023021402357050400', '编辑tt_virsual_sort_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequip:tt_virsual_sort_equip:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 14:35:40', NULL, NULL, 0, 0, '1', 0);
-- 删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021402357050403', '2023021402357050400', '删除tt_virsual_sort_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequip:tt_virsual_sort_equip:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 14:35:40', NULL, NULL, 0, 0, '1', 0);
-- 批量删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021402357050404', '2023021402357050400', '批量删除tt_virsual_sort_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequip:tt_virsual_sort_equip:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 14:35:40', NULL, NULL, 0, 0, '1', 0);
-- 导出excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021402357050405', '2023021402357050400', '导出excel_tt_virsual_sort_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequip:tt_virsual_sort_equip:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 14:35:40', NULL, NULL, 0, 0, '1', 0);
-- 导入excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021402357050406', '2023021402357050400', '导入excel_tt_virsual_sort_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequip:tt_virsual_sort_equip:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 14:35:40', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,176 @@
<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="psName">
<a-input v-model="model.psName" placeholder="请输入工位" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="检测项" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="testItem">
<a-input v-model="model.testItem" placeholder="请输入检测项" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公差上限" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upperLimit">
<a-input-number v-model="model.upperLimit" placeholder="请输入公差上限" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公差下限" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lowerLimit">
<a-input-number v-model="model.lowerLimit" placeholder="请输入公差下限" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="总数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalCount">
<a-input-number v-model="model.totalCount" placeholder="请输入总数" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="NG数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ngCount">
<a-input-number v-model="model.ngCount" placeholder="请输入NG数" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="NG率" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ngRate">
<a-input-number v-model="model.ngRate" placeholder="请输入NG率" style="width: 100%" />
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="产品类型id1表示底座2表示胶塞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">-->
<!-- <a-input-number v-model="model.typeId" placeholder="请输入产品类型id1表示底座2表示胶塞" style="width: 100%" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="公司id, 1表示电气元器件2表示轨道扣件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyId">-->
<!-- <a-input-number v-model="model.companyId" placeholder="请输入公司id, 1表示电气元器件2表示轨道扣件" style="width: 100%" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="记录的创建人员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createBy">-->
<!-- <a-input v-model="model.createBy" 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: 'TtVirsualSortEquipForm',
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: {
psName: [
{ required: true, message: '请输入工位!'},
],
testItem: [
{ required: true, message: '请输入检测项!'},
],
upperLimit: [
{ required: true, message: '请输入公差上线!'},
],
lowerLimit: [
{ required: true, message: '请输入公差下线!'},
],
totalCount: [
{ required: true, message: '请输入总数!'},
],
ngCount: [
{ required: true, message: '请输入NG数!'},
],
ngRate: [
{ required: true, message: '请输入NG率!'},
],
typeId: [
{ required: true, message: '请输入项目类型!'},
],
companyId: [
{ required: true, message: '请输入公司!'},
],
},
url: {
add: "/ttvirsualsortequip/ttVirsualSortEquip/add",
edit: "/ttvirsualsortequip/ttVirsualSortEquip/edit",
queryById: "/ttvirsualsortequip/ttVirsualSortEquip/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-virsual-sort-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-virsual-sort-equip-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;"></a-button>
</div>
</a-drawer>
</template>
<script>
import TtVirsualSortEquipForm from './TtVirsualSortEquipForm'
export default {
name: 'TtVirsualSortEquipModal',
components: {
TtVirsualSortEquipForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tt-virsual-sort-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-virsual-sort-equip-form>
</j-modal>
</template>
<script>
import TtVirsualSortEquipForm from './TtVirsualSortEquipForm'
export default {
name: 'TtVirsualSortEquipModal',
components: {
TtVirsualSortEquipForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,253 @@
<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="10" :lg="11" :md="12" :sm="24">
<a-form-item label="创建时间">
<j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.cpdateTime_begin"></j-date>
<span class="query-group-split-cust"></span>
<j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.cpdateTime_end"></j-date>
</a-form-item>
</a-col>
<a-col :xl="10" :lg="11" :md="12" :sm="24">
<a-form-item label="记录的修改时间">
<j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.updateTime_begin"></j-date>
<span class="query-group-split-cust"></span>
<j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.updateTime_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_virsual_sort_equip_second')"></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-virsual-sort-equip-second-modal ref="modalForm" @ok="modalFormOk"></tt-virsual-sort-equip-second-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtVirsualSortEquipSecondModal from './modules/TtVirsualSortEquipSecondModal'
export default {
name: 'TtVirsualSortEquipSecondList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtVirsualSortEquipSecondModal
},
data () {
return {
description: 'tt_virsual_sort_equip_second管理页面',
//
columns: [
// {
// title: '#',
// dataIndex: '',
// key:'rowIndex',
// width:60,
// align:"center",
// customRender:function (t,r,index) {
// return parseInt(index)+1;
// }
// },
{
title:'工位',
align:"center",
dataIndex: 'psName'
},
{
title:'检测项',
align:"center",
dataIndex: 'testItem'
},
{
title:'公差上限',
align:"center",
dataIndex: 'upperLimit'
},
{
title:'公差下限',
align:"center",
dataIndex: 'lowerLimit'
},
{
title:'总数',
align:"center",
dataIndex: 'totalCount'
},
{
title:'NG数',
align:"center",
dataIndex: 'ngCount'
},
{
title:'NG率',
align:"center",
dataIndex: 'ngRate'
},
// {
// title:'id12',
// align:"center",
// dataIndex: 'typeId'
// },
// {
// title:'id, 12',
// align:"center",
// dataIndex: 'companyId'
// },
{
title:'采集时间',
align:"center",
dataIndex: 'createTime'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
// list: "/ttvirsualsortequipsecond/ttVirsualSortEquipSecond/list",
list: "/ttvirsualsortequipsecond/ttVirsualSortEquipSecond/QueryTtVirsualSortEquipSecondInfoList",
delete: "/ttvirsualsortequipsecond/ttVirsualSortEquipSecond/delete",
deleteBatch: "/ttvirsualsortequipsecond/ttVirsualSortEquipSecond/deleteBatch",
exportXlsUrl: "/ttvirsualsortequipsecond/ttVirsualSortEquipSecond/exportXls",
importExcelUrl: "ttvirsualsortequipsecond/ttVirsualSortEquipSecond/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:'psName',text:'工位',dictCode:''})
fieldList.push({type:'string',value:'testItem',text:'检测项',dictCode:''})
fieldList.push({type:'BigDecimal',value:'upperLimit',text:'公差上限',dictCode:''})
fieldList.push({type:'BigDecimal',value:'lowerLimit',text:'公差下限',dictCode:''})
fieldList.push({type:'int',value:'totalCount',text:'总数',dictCode:''})
fieldList.push({type:'int',value:'ngCount',text:'NG数',dictCode:''})
fieldList.push({type:'BigDecimal',value:'ngRate',text:'NG率',dictCode:''})
fieldList.push({type:'int',value:'typeId',text:'产品类型id1表示底座2表示胶塞',dictCode:''})
fieldList.push({type:'int',value:'companyId',text:'公司id, 1表示电气元器件2表示轨道扣件',dictCode:''})
fieldList.push({type:'datetime',value:'createTime',text:'采集时间'})
fieldList.push({type:'datetime',value:'updateTime',text:'记录的修改时间'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- 注意该页面对应的前台目录为views/ttvirsualsortequipsecond文件夹下
-- 如果你想更改到其他目录请修改sql中component字段对应的值
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2023021404055020180', NULL, 'tt_virsual_sort_equip_second', '/ttvirsualsortequipsecond/ttVirsualSortEquipSecondList', 'ttvirsualsortequipsecond/TtVirsualSortEquipSecondList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-14 16:05:18', NULL, NULL, 0);
-- 权限控制sql
-- 新增
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404055020181', '2023021404055020180', '添加tt_virsual_sort_equip_second', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequipsecond:tt_virsual_sort_equip:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:05:18', NULL, NULL, 0, 0, '1', 0);
-- 编辑
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404055020182', '2023021404055020180', '编辑tt_virsual_sort_equip_second', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequipsecond:tt_virsual_sort_equip:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:05:18', NULL, NULL, 0, 0, '1', 0);
-- 删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404055020183', '2023021404055020180', '删除tt_virsual_sort_equip_second', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequipsecond:tt_virsual_sort_equip:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:05:18', NULL, NULL, 0, 0, '1', 0);
-- 批量删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404055020184', '2023021404055020180', '批量删除tt_virsual_sort_equip_second', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequipsecond:tt_virsual_sort_equip:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:05:18', NULL, NULL, 0, 0, '1', 0);
-- 导出excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404055020185', '2023021404055020180', '导出excel_tt_virsual_sort_equip_second', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequipsecond:tt_virsual_sort_equip:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:05:18', NULL, NULL, 0, 0, '1', 0);
-- 导入excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404055020186', '2023021404055020180', '导入excel_tt_virsual_sort_equip_second', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequipsecond:tt_virsual_sort_equip:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:05:18', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,178 @@
<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="psName">
<a-input v-model="model.psName" placeholder="请输入工位" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="检测项" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="testItem">
<a-input v-model="model.testItem" placeholder="请输入检测项" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公差上限" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upperLimit">
<a-input-number v-model="model.upperLimit" placeholder="请输入公差上限" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公差下限" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lowerLimit">
<a-input-number v-model="model.lowerLimit" placeholder="请输入公差下限" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="总数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalCount">
<a-input-number v-model="model.totalCount" placeholder="请输入总数" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="NG数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ngCount">
<a-input-number v-model="model.ngCount" placeholder="请输入NG数" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="NG率" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ngRate">
<a-input-number v-model="model.ngRate" placeholder="请输入NG率" style="width: 100%" />
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="产品类型id1表示底座2表示胶塞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">-->
<!-- <a-input-number v-model="model.typeId" placeholder="请输入产品类型id1表示底座2表示胶塞" style="width: 100%" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="公司id, 1表示电气元器件2表示轨道扣件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyId">-->
<!-- <a-input-number v-model="model.companyId" placeholder="请输入公司id, 1表示电气元器件2表示轨道扣件" style="width: 100%" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="记录的创建人员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createBy">-->
<!-- <a-input v-model="model.createBy" 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: 'TtVirsualSortEquipSecondForm',
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: {
psName: [
{ required: true, message: '请输入工位!'},
],
testItem: [
{ required: true, message: '请输入检测项!'},
],
upperLimit: [
{ required: true, message: '请输入公差上线!'},
],
lowerLimit: [
{ required: true, message: '请输入公差下线!'},
],
totalCount: [
{ required: true, message: '请输入总数!'},
],
ngCount: [
{ required: true, message: '请输入NG数!'},
],
ngRate: [
{ required: true, message: '请输入NG率!'},
],
typeId: [
{ required: true, message: '请输入项目类型!'},
],
companyId: [
{ required: true, message: '请输入公司!'},
],
},
url: {
add: "/ttvirsualsortequipsecond/ttVirsualSortEquipSecond/add",
edit: "/ttvirsualsortequipsecond/ttVirsualSortEquipSecond/edit",
queryById: "/ttvirsualsortequipsecond/ttVirsualSortEquipSecond/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-virsual-sort-equip-second-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-virsual-sort-equip-second-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;"></a-button>
</div>
</a-drawer>
</template>
<script>
import TtVirsualSortEquipSecondForm from './TtVirsualSortEquipSecondForm'
export default {
name: 'TtVirsualSortEquipSecondModal',
components: {
TtVirsualSortEquipSecondForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tt-virsual-sort-equip-second-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-virsual-sort-equip-second-form>
</j-modal>
</template>
<script>
import TtVirsualSortEquipSecondForm from './TtVirsualSortEquipSecondForm'
export default {
name: 'TtVirsualSortEquipSecondModal',
components: {
TtVirsualSortEquipSecondForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,194 @@
package org.jeecg.modules.demo.ttelectricmeter.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.ttelectricmeter.entity.TtElectricMeter;
import org.jeecg.modules.demo.ttelectricmeter.service.ITtElectricMeterService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.apache.shiro.authz.annotation.RequiresPermissions;
/**
* @Description: tt_electric_meter
* @Author: jeecg-boot
* @Date: 2023-02-14
* @Version: V1.0
*/
@Api(tags="tt_electric_meter")
@RestController
@RequestMapping("/ttelectricmeter/ttElectricMeter")
@Slf4j
public class TtElectricMeterController extends JeecgController<TtElectricMeter, ITtElectricMeterService> {
@Autowired
private ITtElectricMeterService ttElectricMeterService;
@ApiOperation(value="tt列表查询", notes="tt列表查询")
@GetMapping(value = "/QueryElectricMeterList")
public Result<IPage<TtElectricMeter>> QueryElectricMeterList(TtElectricMeter ttElectricMeter,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TtElectricMeter> queryWrapper = QueryGenerator.initQueryWrapper(ttElectricMeter, req.getParameterMap());
Page<TtElectricMeter> page = new Page<TtElectricMeter>(pageNo, pageSize);
IPage<TtElectricMeter> pageList = ttElectricMeterService.QueryElectricMeter(page,ttElectricMeter);
return Result.OK(pageList);
}
/**
*
*
* @param ttElectricMeter
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "tt_electric_meter-分页列表查询")
@ApiOperation(value="tt_electric_meter-分页列表查询", notes="tt_electric_meter-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<TtElectricMeter>> queryPageList(TtElectricMeter ttElectricMeter,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TtElectricMeter> queryWrapper = QueryGenerator.initQueryWrapper(ttElectricMeter, req.getParameterMap());
Page<TtElectricMeter> page = new Page<TtElectricMeter>(pageNo, pageSize);
IPage<TtElectricMeter> pageList = ttElectricMeterService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
*
*
* @param ttElectricMeter
* @return
*/
@AutoLog(value = "tt_electric_meter-添加")
@ApiOperation(value="tt_electric_meter-添加", notes="tt_electric_meter-添加")
//@RequiresPermissions("ttelectricmeter:tt_electric_meter:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody TtElectricMeter ttElectricMeter) {
ttElectricMeterService.save(ttElectricMeter);
return Result.OK("添加成功!");
}
/**
*
*
* @param ttElectricMeter
* @return
*/
@AutoLog(value = "tt_electric_meter-编辑")
@ApiOperation(value="tt_electric_meter-编辑", notes="tt_electric_meter-编辑")
//@RequiresPermissions("ttelectricmeter:tt_electric_meter:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody TtElectricMeter ttElectricMeter) {
ttElectricMeterService.updateById(ttElectricMeter);
return Result.OK("编辑成功!");
}
/**
* id
*
* @param id
* @return
*/
@AutoLog(value = "tt_electric_meter-通过id删除")
@ApiOperation(value="tt_electric_meter-通过id删除", notes="tt_electric_meter-通过id删除")
//@RequiresPermissions("ttelectricmeter:tt_electric_meter:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
ttElectricMeterService.removeById(id);
return Result.OK("删除成功!");
}
/**
*
*
* @param ids
* @return
*/
@AutoLog(value = "tt_electric_meter-批量删除")
@ApiOperation(value="tt_electric_meter-批量删除", notes="tt_electric_meter-批量删除")
//@RequiresPermissions("ttelectricmeter:tt_electric_meter:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.ttElectricMeterService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* id
*
* @param id
* @return
*/
//@AutoLog(value = "tt_electric_meter-通过id查询")
@ApiOperation(value="tt_electric_meter-通过id查询", notes="tt_electric_meter-通过id查询")
@GetMapping(value = "/queryById")
public Result<TtElectricMeter> queryById(@RequestParam(name="id",required=true) String id) {
TtElectricMeter ttElectricMeter = ttElectricMeterService.getById(id);
if(ttElectricMeter==null) {
return Result.error("未找到对应数据");
}
return Result.OK(ttElectricMeter);
}
/**
* excel
*
* @param request
* @param ttElectricMeter
*/
//@RequiresPermissions("ttelectricmeter:tt_electric_meter:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TtElectricMeter ttElectricMeter) {
return super.exportXls(request, ttElectricMeter, TtElectricMeter.class, "tt_electric_meter");
}
/**
* excel
*
* @param request
* @param response
* @return
*/
//@RequiresPermissions("ttelectricmeter:tt_electric_meter:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, TtElectricMeter.class);
}
}

@ -0,0 +1,72 @@
package org.jeecg.modules.demo.ttelectricmeter.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_electric_meter
* @Author: jeecg-boot
* @Date: 2023-02-14
* @Version: V1.0
*/
@Data
@TableName("tt_electric_meter")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_electric_meter对象", description="tt_electric_meter")
public class TtElectricMeter implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.Integer id;
/**电表编号*/
@Excel(name = "电表编号", width = 15)
@ApiModelProperty(value = "电表编号")
private java.lang.String eqtNo;
/**谷电量*/
@Excel(name = "谷电量", width = 15)
@ApiModelProperty(value = "谷电量")
private java.math.BigDecimal valleyPower;
/**峰电量*/
@Excel(name = "峰电量", width = 15)
@ApiModelProperty(value = "峰电量")
private java.math.BigDecimal peakPower;
/**记录的创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "记录的创建时间")
private java.util.Date createTime;
/**记录的创建人默认admin*/
@ApiModelProperty(value = "记录的创建人默认admin")
private java.lang.String createBy;
/**记录的修改时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "记录的修改时间")
private java.util.Date updateTime;
/**记录的修改人,修改人员的登录账号*/
@ApiModelProperty(value = "记录的修改人,修改人员的登录账号")
private java.lang.String updateBy;
/**设备位置*/
@Excel(name = "设备位置", width = 15)
@ApiModelProperty(value = "设备位置")
private java.lang.String location;
}

@ -0,0 +1,20 @@
package org.jeecg.modules.demo.ttelectricmeter.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.ttelectricmeter.entity.TtElectricMeter;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: tt_electric_meter
* @Author: jeecg-boot
* @Date: 2023-02-14
* @Version: V1.0
*/
public interface TtElectricMeterMapper extends BaseMapper<TtElectricMeter> {
IPage TtElectricMeterinfo(@Param("page")Page<TtElectricMeter> page ,@Param("ttElectricMeter")TtElectricMeter ttElectricMeter);
}

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.ttelectricmeter.mapper.TtElectricMeterMapper">
<select id="TtElectricMeterinfo" resultType="org.jeecg.modules.demo.ttelectricmeter.entity.TtElectricMeter">
SELECT
a.id,
a.eqt_no,
b.location,
valley_power,
peak_power,
a.create_by,
a.create_time,
a.update_by,
a.update_time
FROM
tt_electric_meter a,
tt_eqt_base b
WHERE
b.eqt_type = 6
AND a.eqt_no = b.eqt_no
</select>
</mapper>

@ -0,0 +1,17 @@
package org.jeecg.modules.demo.ttelectricmeter.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.demo.ttelectricmeter.entity.TtElectricMeter;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: tt_electric_meter
* @Author: jeecg-boot
* @Date: 2023-02-14
* @Version: V1.0
*/
public interface ITtElectricMeterService extends IService<TtElectricMeter> {
IPage QueryElectricMeter(Page<TtElectricMeter> page ,TtElectricMeter ttElectricMeter);
}

@ -0,0 +1,30 @@
package org.jeecg.modules.demo.ttelectricmeter.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.demo.ttelectricmeter.entity.TtElectricMeter;
import org.jeecg.modules.demo.ttelectricmeter.mapper.TtElectricMeterMapper;
import org.jeecg.modules.demo.ttelectricmeter.service.ITtElectricMeterService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
/**
* @Description: tt_electric_meter
* @Author: jeecg-boot
* @Date: 2023-02-14
* @Version: V1.0
*/
@Service
public class TtElectricMeterServiceImpl extends ServiceImpl<TtElectricMeterMapper, TtElectricMeter> implements ITtElectricMeterService {
@Resource
TtElectricMeterMapper ttElectricMeterMapper;
@Override
public IPage QueryElectricMeter(Page<TtElectricMeter> page, TtElectricMeter ttElectricMeter) {
return ttElectricMeterMapper.TtElectricMeterinfo(page,ttElectricMeter);
}
}

@ -0,0 +1,183 @@
<template>
<a-card :bordered="false">
<!-- -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- -END -->
<!-- -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus"></a-button>
<a-button type="primary" icon="download" @click="handleExportXls('tt_electric_meter')"></a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import"></a-button>
</a-upload>
<!-- -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/></a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected"></a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)"></a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link"> <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a></a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tt-electric-meter-modal ref="modalForm" @ok="modalFormOk"></tt-electric-meter-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtElectricMeterModal from './modules/TtElectricMeterModal'
export default {
name: 'TtElectricMeterList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtElectricMeterModal
},
data () {
return {
description: 'tt_electric_meter',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'',
align:"center",
dataIndex: 'eqtNo'
},
{
title:'',
align:"center",
dataIndex: 'valleyPower'
},
{
title:'',
align:"center",
dataIndex: 'peakPower'
},
{
title: '',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/ttelectricmeter/ttElectricMeter/list",
delete: "/ttelectricmeter/ttElectricMeter/delete",
deleteBatch: "/ttelectricmeter/ttElectricMeter/deleteBatch",
exportXlsUrl: "/ttelectricmeter/ttElectricMeter/exportXls",
importExcelUrl: "ttelectricmeter/ttElectricMeter/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'eqtNo',text:''})
fieldList.push({type:'number',value:'valleyPower',text:''})
fieldList.push({type:'number',value:'peakPower',text:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- views/ttelectricmeter
-- sqlcomponent
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2023021403266860110', NULL, 'tt_electric_meter', '/ttelectricmeter/ttElectricMeterList', 'ttelectricmeter/TtElectricMeterList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-14 15:26:11', NULL, NULL, 0);
-- sql
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021403266860111', '2023021403266860110', 'tt_electric_meter', NULL, NULL, 0, NULL, NULL, 2, 'ttelectricmeter:tt_electric_meter:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 15:26:11', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021403266860112', '2023021403266860110', 'tt_electric_meter', NULL, NULL, 0, NULL, NULL, 2, 'ttelectricmeter:tt_electric_meter:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 15:26:11', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021403266860113', '2023021403266860110', 'tt_electric_meter', NULL, NULL, 0, NULL, NULL, 2, 'ttelectricmeter:tt_electric_meter:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 15:26:11', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021403266860114', '2023021403266860110', 'tt_electric_meter', NULL, NULL, 0, NULL, NULL, 2, 'ttelectricmeter:tt_electric_meter:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 15:26:11', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021403266860115', '2023021403266860110', 'excel_tt_electric_meter', NULL, NULL, 0, NULL, NULL, 2, 'ttelectricmeter:tt_electric_meter:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 15:26:11', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021403266860116', '2023021403266860110', 'excel_tt_electric_meter', NULL, NULL, 0, NULL, NULL, 2, 'ttelectricmeter:tt_electric_meter:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 15:26:11', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,120 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="电表编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="eqtNo">
<a-input v-model="model.eqtNo" placeholder="请输入电表编号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="谷电量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="valleyPower">
<a-input-number v-model="model.valleyPower" placeholder="请输入谷电量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="峰电量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="peakPower">
<a-input-number v-model="model.peakPower" placeholder="请输入峰电量" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtElectricMeterForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
eqtNo: [
{ required: true, message: '!'},
],
peakPower: [
{ required: true, message: '!'},
],
},
url: {
add: "/ttelectricmeter/ttElectricMeter/add",
edit: "/ttelectricmeter/ttElectricMeter/edit",
queryById: "/ttelectricmeter/ttElectricMeter/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tt-electric-meter-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-electric-meter-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;"></a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;"></a-button>
</div>
</a-drawer>
</template>
<script>
import TtElectricMeterForm from './TtElectricMeterForm'
export default {
name: 'TtElectricMeterModal',
components: {
TtElectricMeterForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tt-electric-meter-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-electric-meter-form>
</j-modal>
</template>
<script>
import TtElectricMeterForm from './TtElectricMeterForm'
export default {
name: 'TtElectricMeterModal',
components: {
TtElectricMeterForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -168,10 +168,29 @@ public class TtSulfEquipController extends JeecgController<TtSulfEquip, ITtSulfE
HttpServletRequest req) { HttpServletRequest req) {
QueryWrapper<TtSulfEquip> queryWrapper = QueryGenerator.initQueryWrapper(ttSulfEquip, req.getParameterMap()); QueryWrapper<TtSulfEquip> queryWrapper = QueryGenerator.initQueryWrapper(ttSulfEquip, req.getParameterMap());
Page<TtSulfEquip> page = new Page<TtSulfEquip>(pageNo, pageSize); Page<TtSulfEquip> page = new Page<TtSulfEquip>(pageNo, pageSize);
IPage<TtSulfEquip> pageList = ttSulfEquipService.page(page, queryWrapper); // IPage<TtSulfEquip> pageList = ttSulfEquipService.page(page, queryWrapper);
IPage<TtSulfEquip> pageList = ttSulfEquipService.queryTtSulfEquipInfo(page,ttSulfEquip);
// pageList=ttSulfEquipService.queryTtSulfEquipInfo((Page<TtSulfEquip>) pageList,ttSulfEquip.getEqtNo(),ttSulfEquip.getCreateTime(),ttSulfEquip.getUpdateTime());
return Result.OK(pageList); return Result.OK(pageList);
} }
// /**
// * 查询编号
// *
// * @param ttSulfEquip
// * @return
// */
// @AutoLog(value = "tt_sulf_equip-查询编号")
// @ApiOperation(value="tt_sulf_equip-查询编号", notes="tt_sulf_equip-查询编号")
// //@RequiresPermissions("ttsulfequip:tt_sulf_equip:add")
// @PostMapping(value = "/addselect")
// public Result<List> addselect(TtSulfEquip ttSulfEquip) {
//
// List list= ttSulfEquipService.queryTtSulfEquipInfo(ttSulfEquip);
// return Result.OK(list);
// }
/** /**
* *
* *

@ -4,6 +4,8 @@ import java.io.Serializable;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.util.Date; import java.util.Date;
import java.math.BigDecimal; import java.math.BigDecimal;
import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
@ -79,18 +81,18 @@ public class TtSulfEquip implements Serializable {
@ApiModelProperty(value = "硫化温度(下模)") @ApiModelProperty(value = "硫化温度(下模)")
private Integer sulfTempLower; private Integer sulfTempLower;
/**记录的创建时间*/ /**记录的创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "记录的创建时间") @ApiModelProperty(value = "记录的创建时间")
private Date createTime; private java.util.Date createTime;
/**记录的创建人默认admin*/ /**记录的创建人默认admin*/
@ApiModelProperty(value = "记录的创建人默认admin") @ApiModelProperty(value = "记录的创建人默认admin")
private String createBy; private String createBy;
/**记录的修改时间*/ /**记录的修改时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "记录的修改时间") @ApiModelProperty(value = "记录的修改时间")
private Date updateTime; private java.util.Date updateTime;
/**记录的修改人,修改人员的登录账号*/ /**记录的修改人,修改人员的登录账号*/
@ApiModelProperty(value = "记录的修改人,修改人员的登录账号") @ApiModelProperty(value = "记录的修改人,修改人员的登录账号")
private String updateBy; private String updateBy;

@ -1,7 +1,10 @@
package org.jeecg.modules.demo.ttsulfequip.mapper; package org.jeecg.modules.demo.ttsulfequip.mapper;
import java.util.Date;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.ttsulfequip.entity.TtSulfEquip; import org.jeecg.modules.demo.ttsulfequip.entity.TtSulfEquip;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -14,4 +17,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/ */
public interface TtSulfEquipMapper extends BaseMapper<TtSulfEquip> { public interface TtSulfEquipMapper extends BaseMapper<TtSulfEquip> {
// List<TtSulfEquip> queryTtSulfEquip(@Param("page") Page<TtSulfEquip> page, @Param("eqtNo") String eqtNo, @Param("createTime") Date createTime,@Param("updateTime") Date updateTime);
IPage<TtSulfEquip> queryTtSulfEquip(@Param("page") Page<TtSulfEquip> page, @Param("ttSulfEquip") TtSulfEquip ttSulfEquip);
} }

@ -1,5 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.ttsulfequip.mapper.TtSulfEquipMapper"> <mapper namespace="org.jeecg.modules.demo.ttsulfequip.mapper.TtSulfEquipMapper">
<resultMap id="TtSulfEquip" type="org.jeecg.modules.demo.ttsulfequip.entity.TtSulfEquip">
<result column="eqt_no" property="eqtNo" jdbcType="VARCHAR"/>
<result column="open_date" property="openDate" jdbcType="TIMESTAMP"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
</resultMap>
<select id="queryTtSulfEquip" resultType="org.jeecg.modules.demo.ttsulfequip.entity.TtSulfEquip" >
SELECT
*
FROM
tt_sulf_equip a,
tt_eqt_base b
WHERE 1=1
AND
b.eqt_type = 3
AND a.eqt_no = b.eqt_no
order by a.id desc
<!-- <if test="ttSulfEquip.eqtNo!=null and ttSulfEquip.eqtNo!=''">-->
<!-- AND a.eqt_no like concat('%',#{eqtNo},'%')-->
<!-- </if>-->
</select>
<!-- <if test="createTime!= null">-->
<!-- and date_format(open_date,'%Y-%m-%d') &gt;= date_format(#{createTime},'%Y-%m-%d')-->
<!-- </if>-->
<!-- <if test="updateTime!= null">-->
<!-- and date_format(open_date,'%Y-%m-%d') &lt;= date_format(#{updateTime},'%Y-%m-%d')-->
<!-- </if>-->
<!-- order by a.id desc-->
</mapper> </mapper>

@ -1,8 +1,12 @@
package org.jeecg.modules.demo.ttsulfequip.service; package org.jeecg.modules.demo.ttsulfequip.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.demo.ttsulfequip.entity.TtSulfEquip; import org.jeecg.modules.demo.ttsulfequip.entity.TtSulfEquip;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import java.util.Date;
/** /**
* @Description: tt_sulf_equip * @Description: tt_sulf_equip
* @Author: jeecg-boot * @Author: jeecg-boot
@ -11,4 +15,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/ */
public interface ITtSulfEquipService extends IService<TtSulfEquip> { public interface ITtSulfEquipService extends IService<TtSulfEquip> {
IPage<TtSulfEquip> queryTtSulfEquipInfo(Page<TtSulfEquip> page,TtSulfEquip ttSulfEquip);
} }

@ -1,5 +1,7 @@
package org.jeecg.modules.demo.ttsulfequip.service.impl; package org.jeecg.modules.demo.ttsulfequip.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.demo.ttsulfequip.entity.TtSulfEquip; import org.jeecg.modules.demo.ttsulfequip.entity.TtSulfEquip;
import org.jeecg.modules.demo.ttsulfequip.mapper.TtSulfEquipMapper; import org.jeecg.modules.demo.ttsulfequip.mapper.TtSulfEquipMapper;
import org.jeecg.modules.demo.ttsulfequip.service.ITtSulfEquipService; import org.jeecg.modules.demo.ttsulfequip.service.ITtSulfEquipService;
@ -7,6 +9,9 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
import java.util.Date;
/** /**
* @Description: tt_sulf_equip * @Description: tt_sulf_equip
* @Author: jeecg-boot * @Author: jeecg-boot
@ -15,5 +20,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
*/ */
@Service @Service
public class TtSulfEquipServiceImpl extends ServiceImpl<TtSulfEquipMapper, TtSulfEquip> implements ITtSulfEquipService { public class TtSulfEquipServiceImpl extends ServiceImpl<TtSulfEquipMapper, TtSulfEquip> implements ITtSulfEquipService {
@Resource
TtSulfEquipMapper ttSulfEquipMapper;
@Override
public IPage<TtSulfEquip> queryTtSulfEquipInfo(Page<TtSulfEquip> page,TtSulfEquip ttSulfEquip) {
return ttSulfEquipMapper.queryTtSulfEquip(page, ttSulfEquip);
}
} }

@ -0,0 +1,192 @@
package org.jeecg.modules.demo.ttvirsualsortequip.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.ttvirsualsortequip.entity.TtVirsualSortEquip;
import org.jeecg.modules.demo.ttvirsualsortequip.service.ITtVirsualSortEquipService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.apache.shiro.authz.annotation.RequiresPermissions;
/**
* @Description: tt_virsual_sort_equip
* @Author: jeecg-boot
* @Date: 2023-02-14
* @Version: V1.0
*/
@Api(tags="tt_virsual_sort_equip")
@RestController
@RequestMapping("/ttvirsualsortequip/ttVirsualSortEquip")
@Slf4j
public class TtVirsualSortEquipController extends JeecgController<TtVirsualSortEquip, ITtVirsualSortEquipService> {
@Autowired
private ITtVirsualSortEquipService ttVirsualSortEquipService;
//@AutoLog(value = "tt_virsual_sort_equip-分页列表查询询胶塞为2")
@ApiOperation(value="tt_virsual_sort_equip-分页列表查询胶塞为2", notes="tt_virsual_sort_equip-分页列表查询询胶塞为2")
@GetMapping(value = "/QueryTtVirsualSortEquipInfoList")
public Result<IPage<TtVirsualSortEquip>> QueryTtVirsualSortEquipInfoList(TtVirsualSortEquip ttVirsualSortEquip,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TtVirsualSortEquip> queryWrapper = QueryGenerator.initQueryWrapper(ttVirsualSortEquip, req.getParameterMap());
Page<TtVirsualSortEquip> page = new Page<TtVirsualSortEquip>(pageNo, pageSize);
IPage<TtVirsualSortEquip> pageList = ttVirsualSortEquipService.QueryTtVirsualSortEquipInfo(page,ttVirsualSortEquip);
return Result.OK(pageList);
}
/**
*
*
* @param ttVirsualSortEquip
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "tt_virsual_sort_equip-分页列表查询")
@ApiOperation(value="tt_virsual_sort_equip-分页列表查询", notes="tt_virsual_sort_equip-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<TtVirsualSortEquip>> queryPageList(TtVirsualSortEquip ttVirsualSortEquip,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TtVirsualSortEquip> queryWrapper = QueryGenerator.initQueryWrapper(ttVirsualSortEquip, req.getParameterMap());
Page<TtVirsualSortEquip> page = new Page<TtVirsualSortEquip>(pageNo, pageSize);
IPage<TtVirsualSortEquip> pageList = ttVirsualSortEquipService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
*
*
* @param ttVirsualSortEquip
* @return
*/
@AutoLog(value = "tt_virsual_sort_equip-添加")
@ApiOperation(value="tt_virsual_sort_equip-添加", notes="tt_virsual_sort_equip-添加")
//@RequiresPermissions("ttvirsualsortequip:tt_virsual_sort_equip:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody TtVirsualSortEquip ttVirsualSortEquip) {
ttVirsualSortEquipService.save(ttVirsualSortEquip);
return Result.OK("添加成功!");
}
/**
*
*
* @param ttVirsualSortEquip
* @return
*/
@AutoLog(value = "tt_virsual_sort_equip-编辑")
@ApiOperation(value="tt_virsual_sort_equip-编辑", notes="tt_virsual_sort_equip-编辑")
//@RequiresPermissions("ttvirsualsortequip:tt_virsual_sort_equip:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody TtVirsualSortEquip ttVirsualSortEquip) {
ttVirsualSortEquipService.updateById(ttVirsualSortEquip);
return Result.OK("编辑成功!");
}
/**
* id
*
* @param id
* @return
*/
@AutoLog(value = "tt_virsual_sort_equip-通过id删除")
@ApiOperation(value="tt_virsual_sort_equip-通过id删除", notes="tt_virsual_sort_equip-通过id删除")
//@RequiresPermissions("ttvirsualsortequip:tt_virsual_sort_equip:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
ttVirsualSortEquipService.removeById(id);
return Result.OK("删除成功!");
}
/**
*
*
* @param ids
* @return
*/
@AutoLog(value = "tt_virsual_sort_equip-批量删除")
@ApiOperation(value="tt_virsual_sort_equip-批量删除", notes="tt_virsual_sort_equip-批量删除")
//@RequiresPermissions("ttvirsualsortequip:tt_virsual_sort_equip:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.ttVirsualSortEquipService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* id
*
* @param id
* @return
*/
//@AutoLog(value = "tt_virsual_sort_equip-通过id查询")
@ApiOperation(value="tt_virsual_sort_equip-通过id查询", notes="tt_virsual_sort_equip-通过id查询")
@GetMapping(value = "/queryById")
public Result<TtVirsualSortEquip> queryById(@RequestParam(name="id",required=true) String id) {
TtVirsualSortEquip ttVirsualSortEquip = ttVirsualSortEquipService.getById(id);
if(ttVirsualSortEquip==null) {
return Result.error("未找到对应数据");
}
return Result.OK(ttVirsualSortEquip);
}
/**
* excel
*
* @param request
* @param ttVirsualSortEquip
*/
//@RequiresPermissions("ttvirsualsortequip:tt_virsual_sort_equip:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TtVirsualSortEquip ttVirsualSortEquip) {
return super.exportXls(request, ttVirsualSortEquip, TtVirsualSortEquip.class, "tt_virsual_sort_equip");
}
/**
* excel
*
* @param request
* @param response
* @return
*/
//@RequiresPermissions("ttvirsualsortequip:tt_virsual_sort_equip:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, TtVirsualSortEquip.class);
}
}

@ -0,0 +1,91 @@
package org.jeecg.modules.demo.ttvirsualsortequip.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_virsual_sort_equip
* @Author: jeecg-boot
* @Date: 2023-02-14
* @Version: V1.0
*/
@Data
@TableName("tt_virsual_sort_equip")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_virsual_sort_equip对象", description="tt_virsual_sort_equip")
public class TtVirsualSortEquip implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.Integer id;
/**工位*/
@Excel(name = "工位", width = 15)
@ApiModelProperty(value = "工位")
private java.lang.String psName;
/**检测项*/
@Excel(name = "检测项", width = 15)
@ApiModelProperty(value = "检测项")
private java.lang.String testItem;
/**公差上限*/
@Excel(name = "公差上限", width = 15)
@ApiModelProperty(value = "公差上限")
private java.math.BigDecimal upperLimit;
/**公差下限*/
@Excel(name = "公差下限", width = 15)
@ApiModelProperty(value = "公差下限")
private java.math.BigDecimal lowerLimit;
/**总数*/
@Excel(name = "总数", width = 15)
@ApiModelProperty(value = "总数")
private java.lang.Integer totalCount;
/**NG数*/
@Excel(name = "NG数", width = 15)
@ApiModelProperty(value = "NG数")
private java.lang.Integer ngCount;
/**NG率*/
@Excel(name = "NG率", width = 15)
@ApiModelProperty(value = "NG率")
private java.math.BigDecimal ngRate;
/**产品类型id1表示底座2表示胶塞*/
@Excel(name = "产品类型id1表示底座2表示胶塞", width = 15)
@ApiModelProperty(value = "产品类型id1表示底座2表示胶塞")
private java.lang.Integer typeId;
/**公司id, 1表示电气元器件2表示轨道扣件*/
@Excel(name = "公司id, 1表示电气元器件2表示轨道扣件", width = 15)
@ApiModelProperty(value = "公司id, 1表示电气元器件2表示轨道扣件")
private java.lang.Integer companyId;
/**记录的创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "记录的创建时间")
private java.util.Date createTime;
/**记录的创建人员*/
@ApiModelProperty(value = "记录的创建人员")
private java.lang.String createBy;
/**记录的修改时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "记录的修改时间")
private java.util.Date updateTime;
/**记录的修改人员*/
@ApiModelProperty(value = "记录的修改人员")
private java.lang.String updateBy;
}

@ -0,0 +1,20 @@
package org.jeecg.modules.demo.ttvirsualsortequip.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.ttvirsualsortequip.entity.TtVirsualSortEquip;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: tt_virsual_sort_equip
* @Author: jeecg-boot
* @Date: 2023-02-14
* @Version: V1.0
*/
public interface TtVirsualSortEquipMapper extends BaseMapper<TtVirsualSortEquip> {
IPage TtVirsualSortEquipInfo(@Param("page")Page page,@Param("ttVirsualSortEquip") TtVirsualSortEquip ttVirsualSortEquip);
}

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.ttvirsualsortequip.mapper.TtVirsualSortEquipMapper">
<select id="TtVirsualSortEquipInfo" resultType="org.jeecg.modules.demo.ttvirsualsortequip.entity.TtVirsualSortEquip">
SELECT
*
FROM
tt_virsual_sort_equip
WHERE
type_id = '2' -- 胶塞 为2
</select>
</mapper>

@ -0,0 +1,16 @@
package org.jeecg.modules.demo.ttvirsualsortequip.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.demo.ttvirsualsortequip.entity.TtVirsualSortEquip;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: tt_virsual_sort_equip
* @Author: jeecg-boot
* @Date: 2023-02-14
* @Version: V1.0
*/
public interface ITtVirsualSortEquipService extends IService<TtVirsualSortEquip> {
IPage<TtVirsualSortEquip> QueryTtVirsualSortEquipInfo(Page page,TtVirsualSortEquip ttVirsualSortEquip);
}

@ -0,0 +1,29 @@
package org.jeecg.modules.demo.ttvirsualsortequip.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.demo.ttvirsualsortequip.entity.TtVirsualSortEquip;
import org.jeecg.modules.demo.ttvirsualsortequip.mapper.TtVirsualSortEquipMapper;
import org.jeecg.modules.demo.ttvirsualsortequip.service.ITtVirsualSortEquipService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
/**
* @Description: tt_virsual_sort_equip
* @Author: jeecg-boot
* @Date: 2023-02-14
* @Version: V1.0
*/
@Service
public class TtVirsualSortEquipServiceImpl extends ServiceImpl<TtVirsualSortEquipMapper, TtVirsualSortEquip> implements ITtVirsualSortEquipService {
@Resource
TtVirsualSortEquipMapper ttVirsualSortEquipMapper;
@Override
public IPage<TtVirsualSortEquip> QueryTtVirsualSortEquipInfo(Page page, TtVirsualSortEquip ttVirsualSortEquip) {
return ttVirsualSortEquipMapper.TtVirsualSortEquipInfo(page,ttVirsualSortEquip);
}
}

@ -0,0 +1,243 @@
<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.createBy"></a-input>
</a-form-item>
</a-col>
<a-col :xl="10" :lg="11" :md="12" :sm="24">
<a-form-item label="记录的修改时间">
<j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.updateTime_begin"></j-date>
<span class="query-group-split-cust"></span>
<j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.updateTime_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_virsual_sort_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-virsual-sort-equip-modal ref="modalForm" @ok="modalFormOk"></tt-virsual-sort-equip-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtVirsualSortEquipModal from './modules/TtVirsualSortEquipModal'
export default {
name: 'TtVirsualSortEquipList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtVirsualSortEquipModal
},
data () {
return {
description: 'tt_virsual_sort_equip',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'',
align:"center",
dataIndex: 'psName'
},
{
title:'',
align:"center",
dataIndex: 'testItem'
},
{
title:'',
align:"center",
dataIndex: 'upperLimit'
},
{
title:'',
align:"center",
dataIndex: 'lowerLimit'
},
{
title:'',
align:"center",
dataIndex: 'totalCount'
},
{
title:'NG',
align:"center",
dataIndex: 'ngCount'
},
{
title:'NG',
align:"center",
dataIndex: 'ngRate'
},
{
title:'id12',
align:"center",
dataIndex: 'typeId'
},
{
title:'id, 12',
align:"center",
dataIndex: 'companyId'
},
{
title: '',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/ttvirsualsortequip/ttVirsualSortEquip/list",
delete: "/ttvirsualsortequip/ttVirsualSortEquip/delete",
deleteBatch: "/ttvirsualsortequip/ttVirsualSortEquip/deleteBatch",
exportXlsUrl: "/ttvirsualsortequip/ttVirsualSortEquip/exportXls",
importExcelUrl: "ttvirsualsortequip/ttVirsualSortEquip/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:'psName',text:'',dictCode:''})
fieldList.push({type:'string',value:'testItem',text:'',dictCode:''})
fieldList.push({type:'BigDecimal',value:'upperLimit',text:'',dictCode:''})
fieldList.push({type:'BigDecimal',value:'lowerLimit',text:'',dictCode:''})
fieldList.push({type:'int',value:'totalCount',text:'',dictCode:''})
fieldList.push({type:'int',value:'ngCount',text:'NG',dictCode:''})
fieldList.push({type:'BigDecimal',value:'ngRate',text:'NG',dictCode:''})
fieldList.push({type:'int',value:'typeId',text:'id12',dictCode:''})
fieldList.push({type:'int',value:'companyId',text:'id, 12',dictCode:''})
fieldList.push({type:'string',value:'createBy',text:'',dictCode:''})
fieldList.push({type:'datetime',value:'updateTime',text:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- views/ttvirsualsortequip
-- sqlcomponent
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2023021402357050400', NULL, 'tt_virsual_sort_equip', '/ttvirsualsortequip/ttVirsualSortEquipList', 'ttvirsualsortequip/TtVirsualSortEquipList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-14 14:35:40', NULL, NULL, 0);
-- sql
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021402357050401', '2023021402357050400', 'tt_virsual_sort_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequip:tt_virsual_sort_equip:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 14:35:40', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021402357050402', '2023021402357050400', 'tt_virsual_sort_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequip:tt_virsual_sort_equip:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 14:35:40', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021402357050403', '2023021402357050400', 'tt_virsual_sort_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequip:tt_virsual_sort_equip:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 14:35:40', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021402357050404', '2023021402357050400', 'tt_virsual_sort_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequip:tt_virsual_sort_equip:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 14:35:40', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021402357050405', '2023021402357050400', 'excel_tt_virsual_sort_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequip:tt_virsual_sort_equip:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 14:35:40', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021402357050406', '2023021402357050400', 'excel_tt_virsual_sort_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequip:tt_virsual_sort_equip:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 14:35:40', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,149 @@
<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="psName">
<a-input v-model="model.psName" placeholder="请输入工位" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="检测项" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="testItem">
<a-input v-model="model.testItem" placeholder="请输入检测项" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公差上限" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upperLimit">
<a-input-number v-model="model.upperLimit" placeholder="请输入公差上限" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公差下限" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lowerLimit">
<a-input-number v-model="model.lowerLimit" placeholder="请输入公差下限" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="总数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalCount">
<a-input-number v-model="model.totalCount" placeholder="请输入总数" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="NG数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ngCount">
<a-input-number v-model="model.ngCount" placeholder="请输入NG数" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="NG率" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ngRate">
<a-input-number v-model="model.ngRate" placeholder="请输入NG率" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品类型id1表示底座2表示胶塞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<a-input-number v-model="model.typeId" placeholder="请输入产品类型id1表示底座2表示胶塞" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司id, 1表示电气元器件2表示轨道扣件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyId">
<a-input-number v-model="model.companyId" placeholder="请输入公司id, 1表示电气元器件2表示轨道扣件" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="记录的创建人员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createBy">
<a-input v-model="model.createBy" 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: 'TtVirsualSortEquipForm',
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: {
},
url: {
add: "/ttvirsualsortequip/ttVirsualSortEquip/add",
edit: "/ttvirsualsortequip/ttVirsualSortEquip/edit",
queryById: "/ttvirsualsortequip/ttVirsualSortEquip/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-virsual-sort-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-virsual-sort-equip-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;"></a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;"></a-button>
</div>
</a-drawer>
</template>
<script>
import TtVirsualSortEquipForm from './TtVirsualSortEquipForm'
export default {
name: 'TtVirsualSortEquipModal',
components: {
TtVirsualSortEquipForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tt-virsual-sort-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-virsual-sort-equip-form>
</j-modal>
</template>
<script>
import TtVirsualSortEquipForm from './TtVirsualSortEquipForm'
export default {
name: 'TtVirsualSortEquipModal',
components: {
TtVirsualSortEquipForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,199 @@
package org.jeecg.modules.demo.ttvirsualsortequipsecond.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.ttvirsualsortequipsecond.entity.TtVirsualSortEquipSecond;
import org.jeecg.modules.demo.ttvirsualsortequipsecond.service.ITtVirsualSortEquipSecondService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.apache.shiro.authz.annotation.RequiresPermissions;
/**
* @Description: tt_virsual_sort_equip_second
* @Author: jeecg-boot
* @Date: 2023-02-14
* @Version: V1.0
*/
@Api(tags="tt_virsual_sort_equip_second")
@RestController
@RequestMapping("/ttvirsualsortequipsecond/ttVirsualSortEquipSecond")
@Slf4j
public class TtVirsualSortEquipSecondController extends JeecgController<TtVirsualSortEquipSecond, ITtVirsualSortEquipSecondService> {
@Autowired
private ITtVirsualSortEquipSecondService ttVirsualSortEquipSecondService;
@ApiOperation(value="tt_virsual_sort_equip_second-分页列表查询底座为1", notes="tt_virsual_sort_equip_second-分页列表查询底座为1")
@GetMapping(value = "/QueryTtVirsualSortEquipSecondInfoList")
public Result<IPage<TtVirsualSortEquipSecond>> QueryTtVirsualSortEquipSecondInfoList(TtVirsualSortEquipSecond ttVirsualSortEquipSecond,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TtVirsualSortEquipSecond> queryWrapper = QueryGenerator.initQueryWrapper(ttVirsualSortEquipSecond, req.getParameterMap());
Page<TtVirsualSortEquipSecond> page = new Page<TtVirsualSortEquipSecond>(pageNo, pageSize);
IPage<TtVirsualSortEquipSecond> pageList = ttVirsualSortEquipSecondService.QueryTtVirsualSortEquipSecondInfo(page,ttVirsualSortEquipSecond);
return Result.OK(pageList);
}
/**
*
*
* @param ttVirsualSortEquipSecond
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "tt_virsual_sort_equip_second-分页列表查询")
@ApiOperation(value="tt_virsual_sort_equip_second-分页列表查询", notes="tt_virsual_sort_equip_second-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<TtVirsualSortEquipSecond>> queryPageList(TtVirsualSortEquipSecond ttVirsualSortEquipSecond,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TtVirsualSortEquipSecond> queryWrapper = QueryGenerator.initQueryWrapper(ttVirsualSortEquipSecond, req.getParameterMap());
Page<TtVirsualSortEquipSecond> page = new Page<TtVirsualSortEquipSecond>(pageNo, pageSize);
IPage<TtVirsualSortEquipSecond> pageList = ttVirsualSortEquipSecondService.page(page, queryWrapper);
List<TtVirsualSortEquipSecond> list =pageList.getRecords();
for (TtVirsualSortEquipSecond ttVirsualSortEquipSecond1 :list ){
ttVirsualSortEquipSecond1.setTypeId(1);
}
return Result.OK(pageList);
}
/**
*
*
* @param ttVirsualSortEquipSecond
* @return
*/
@AutoLog(value = "tt_virsual_sort_equip_second-添加")
@ApiOperation(value="tt_virsual_sort_equip_second-添加", notes="tt_virsual_sort_equip_second-添加")
//@RequiresPermissions("ttvirsualsortequipsecond:tt_virsual_sort_equip:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody TtVirsualSortEquipSecond ttVirsualSortEquipSecond) {
ttVirsualSortEquipSecondService.save(ttVirsualSortEquipSecond);
return Result.OK("添加成功!");
}
/**
*
*
* @param ttVirsualSortEquipSecond
* @return
*/
@AutoLog(value = "tt_virsual_sort_equip_second-编辑")
@ApiOperation(value="tt_virsual_sort_equip_second-编辑", notes="tt_virsual_sort_equip_second-编辑")
//@RequiresPermissions("ttvirsualsortequipsecond:tt_virsual_sort_equip:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody TtVirsualSortEquipSecond ttVirsualSortEquipSecond) {
ttVirsualSortEquipSecondService.updateById(ttVirsualSortEquipSecond);
return Result.OK("编辑成功!");
}
/**
* id
*
* @param id
* @return
*/
@AutoLog(value = "tt_virsual_sort_equip_second-通过id删除")
@ApiOperation(value="tt_virsual_sort_equip_second-通过id删除", notes="tt_virsual_sort_equip_second-通过id删除")
//@RequiresPermissions("ttvirsualsortequipsecond:tt_virsual_sort_equip:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
ttVirsualSortEquipSecondService.removeById(id);
return Result.OK("删除成功!");
}
/**
*
*
* @param ids
* @return
*/
@AutoLog(value = "tt_virsual_sort_equip_second-批量删除")
@ApiOperation(value="tt_virsual_sort_equip_second-批量删除", notes="tt_virsual_sort_equip_second-批量删除")
//@RequiresPermissions("ttvirsualsortequipsecond:tt_virsual_sort_equip:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.ttVirsualSortEquipSecondService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* id
*
* @param id
* @return
*/
//@AutoLog(value = "tt_virsual_sort_equip_second-通过id查询")
@ApiOperation(value="tt_virsual_sort_equip_second-通过id查询", notes="tt_virsual_sort_equip_second-通过id查询")
@GetMapping(value = "/queryById")
public Result<TtVirsualSortEquipSecond> queryById(@RequestParam(name="id",required=true) String id) {
TtVirsualSortEquipSecond ttVirsualSortEquipSecond = ttVirsualSortEquipSecondService.getById(id);
if(ttVirsualSortEquipSecond==null) {
return Result.error("未找到对应数据");
}
return Result.OK(ttVirsualSortEquipSecond);
}
/**
* excel
*
* @param request
* @param ttVirsualSortEquipSecond
*/
//@RequiresPermissions("ttvirsualsortequipsecond:tt_virsual_sort_equip:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TtVirsualSortEquipSecond ttVirsualSortEquipSecond) {
return super.exportXls(request, ttVirsualSortEquipSecond, TtVirsualSortEquipSecond.class, "tt_virsual_sort_equip_second");
}
/**
* excel
*
* @param request
* @param response
* @return
*/
//@RequiresPermissions("ttvirsualsortequipsecond:tt_virsual_sort_equip:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, TtVirsualSortEquipSecond.class);
}
}

@ -0,0 +1,91 @@
package org.jeecg.modules.demo.ttvirsualsortequipsecond.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_virsual_sort_equip_second
* @Author: jeecg-boot
* @Date: 2023-02-14
* @Version: V1.0
*/
@Data
@TableName("tt_virsual_sort_equip")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_virsual_sort_equip对象", description="tt_virsual_sort_equip_second")
public class TtVirsualSortEquipSecond implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.Integer id;
/**工位*/
@Excel(name = "工位", width = 15)
@ApiModelProperty(value = "工位")
private java.lang.String psName;
/**检测项*/
@Excel(name = "检测项", width = 15)
@ApiModelProperty(value = "检测项")
private java.lang.String testItem;
/**公差上限*/
@Excel(name = "公差上限", width = 15)
@ApiModelProperty(value = "公差上限")
private java.math.BigDecimal upperLimit;
/**公差下限*/
@Excel(name = "公差下限", width = 15)
@ApiModelProperty(value = "公差下限")
private java.math.BigDecimal lowerLimit;
/**总数*/
@Excel(name = "总数", width = 15)
@ApiModelProperty(value = "总数")
private java.lang.Integer totalCount;
/**NG数*/
@Excel(name = "NG数", width = 15)
@ApiModelProperty(value = "NG数")
private java.lang.Integer ngCount;
/**NG率*/
@Excel(name = "NG率", width = 15)
@ApiModelProperty(value = "NG率")
private java.math.BigDecimal ngRate;
/**产品类型id1表示底座2表示胶塞*/
@Excel(name = "产品类型id1表示底座2表示胶塞", width = 15)
@ApiModelProperty(value = "产品类型id1表示底座2表示胶塞")
private java.lang.Integer typeId;
/**公司id, 1表示电气元器件2表示轨道扣件*/
@Excel(name = "公司id, 1表示电气元器件2表示轨道扣件", width = 15)
@ApiModelProperty(value = "公司id, 1表示电气元器件2表示轨道扣件")
private java.lang.Integer companyId;
/**记录的创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "记录的创建时间")
private java.util.Date createTime;
/**记录的创建人员*/
@ApiModelProperty(value = "记录的创建人员")
private java.lang.String createBy;
/**记录的修改时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "记录的修改时间")
private java.util.Date updateTime;
/**记录的修改人员*/
@ApiModelProperty(value = "记录的修改人员")
private java.lang.String updateBy;
}

@ -0,0 +1,21 @@
package org.jeecg.modules.demo.ttvirsualsortequipsecond.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.ttvirsualsortequip.entity.TtVirsualSortEquip;
import org.jeecg.modules.demo.ttvirsualsortequipsecond.entity.TtVirsualSortEquipSecond;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: tt_virsual_sort_equip_second
* @Author: jeecg-boot
* @Date: 2023-02-14
* @Version: V1.0
*/
public interface TtVirsualSortEquipSecondMapper extends BaseMapper<TtVirsualSortEquipSecond> {
IPage TtVirsualSortEquipSecondInfo(@Param("page") Page page, @Param("ttVirsualSortEquipSecond") TtVirsualSortEquipSecond ttVirsualSortEquipSecond);
}

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.ttvirsualsortequipsecond.mapper.TtVirsualSortEquipSecondMapper">
<select id="TtVirsualSortEquipSecondInfo" resultType="org.jeecg.modules.demo.ttvirsualsortequipsecond.entity.TtVirsualSortEquipSecond">
SELECT
*
FROM
tt_virsual_sort_equip
WHERE
type_id = '1' -- 底座 为2
</select>
</mapper>

@ -0,0 +1,18 @@
package org.jeecg.modules.demo.ttvirsualsortequipsecond.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.demo.ttvirsualsortequip.entity.TtVirsualSortEquip;
import org.jeecg.modules.demo.ttvirsualsortequipsecond.entity.TtVirsualSortEquipSecond;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: tt_virsual_sort_equip_second
* @Author: jeecg-boot
* @Date: 2023-02-14
* @Version: V1.0
*/
public interface ITtVirsualSortEquipSecondService extends IService<TtVirsualSortEquipSecond> {
IPage<TtVirsualSortEquipSecond> QueryTtVirsualSortEquipSecondInfo(Page page, TtVirsualSortEquipSecond ttVirsualSortEquipSecond);
}

@ -0,0 +1,28 @@
package org.jeecg.modules.demo.ttvirsualsortequipsecond.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.demo.ttvirsualsortequipsecond.entity.TtVirsualSortEquipSecond;
import org.jeecg.modules.demo.ttvirsualsortequipsecond.mapper.TtVirsualSortEquipSecondMapper;
import org.jeecg.modules.demo.ttvirsualsortequipsecond.service.ITtVirsualSortEquipSecondService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
/**
* @Description: tt_virsual_sort_equip_second
* @Author: jeecg-boot
* @Date: 2023-02-14
* @Version: V1.0
*/
@Service
public class TtVirsualSortEquipSecondServiceImpl extends ServiceImpl<TtVirsualSortEquipSecondMapper, TtVirsualSortEquipSecond> implements ITtVirsualSortEquipSecondService {
@Resource
TtVirsualSortEquipSecondMapper ttVirsualSortEquipSecondMapper;
@Override
public IPage<TtVirsualSortEquipSecond> QueryTtVirsualSortEquipSecondInfo(Page page, TtVirsualSortEquipSecond ttVirsualSortEquipSecond) {
return ttVirsualSortEquipSecondMapper.TtVirsualSortEquipSecondInfo(page,ttVirsualSortEquipSecond);
}
}

@ -0,0 +1,243 @@
<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.createBy"></a-input>
</a-form-item>
</a-col>
<a-col :xl="10" :lg="11" :md="12" :sm="24">
<a-form-item label="记录的修改时间">
<j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.updateTime_begin"></j-date>
<span class="query-group-split-cust"></span>
<j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.updateTime_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_virsual_sort_equip_second')"></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-virsual-sort-equip-second-modal ref="modalForm" @ok="modalFormOk"></tt-virsual-sort-equip-second-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtVirsualSortEquipSecondModal from './modules/TtVirsualSortEquipSecondModal'
export default {
name: 'TtVirsualSortEquipSecondList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtVirsualSortEquipSecondModal
},
data () {
return {
description: 'tt_virsual_sort_equip_second',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'',
align:"center",
dataIndex: 'psName'
},
{
title:'',
align:"center",
dataIndex: 'testItem'
},
{
title:'',
align:"center",
dataIndex: 'upperLimit'
},
{
title:'',
align:"center",
dataIndex: 'lowerLimit'
},
{
title:'',
align:"center",
dataIndex: 'totalCount'
},
{
title:'NG',
align:"center",
dataIndex: 'ngCount'
},
{
title:'NG',
align:"center",
dataIndex: 'ngRate'
},
{
title:'id12',
align:"center",
dataIndex: 'typeId'
},
{
title:'id, 12',
align:"center",
dataIndex: 'companyId'
},
{
title: '',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/ttvirsualsortequipsecond/ttVirsualSortEquipSecond/list",
delete: "/ttvirsualsortequipsecond/ttVirsualSortEquipSecond/delete",
deleteBatch: "/ttvirsualsortequipsecond/ttVirsualSortEquipSecond/deleteBatch",
exportXlsUrl: "/ttvirsualsortequipsecond/ttVirsualSortEquipSecond/exportXls",
importExcelUrl: "ttvirsualsortequipsecond/ttVirsualSortEquipSecond/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:'psName',text:'',dictCode:''})
fieldList.push({type:'string',value:'testItem',text:'',dictCode:''})
fieldList.push({type:'BigDecimal',value:'upperLimit',text:'',dictCode:''})
fieldList.push({type:'BigDecimal',value:'lowerLimit',text:'',dictCode:''})
fieldList.push({type:'int',value:'totalCount',text:'',dictCode:''})
fieldList.push({type:'int',value:'ngCount',text:'NG',dictCode:''})
fieldList.push({type:'BigDecimal',value:'ngRate',text:'NG',dictCode:''})
fieldList.push({type:'int',value:'typeId',text:'id12',dictCode:''})
fieldList.push({type:'int',value:'companyId',text:'id, 12',dictCode:''})
fieldList.push({type:'string',value:'createBy',text:'',dictCode:''})
fieldList.push({type:'datetime',value:'updateTime',text:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- views/ttvirsualsortequipsecond
-- sqlcomponent
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2023021404055020180', NULL, 'tt_virsual_sort_equip_second', '/ttvirsualsortequipsecond/ttVirsualSortEquipSecondList', 'ttvirsualsortequipsecond/TtVirsualSortEquipSecondList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-14 16:05:18', NULL, NULL, 0);
-- sql
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404055020181', '2023021404055020180', 'tt_virsual_sort_equip_second', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequipsecond:tt_virsual_sort_equip:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:05:18', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404055020182', '2023021404055020180', 'tt_virsual_sort_equip_second', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequipsecond:tt_virsual_sort_equip:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:05:18', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404055020183', '2023021404055020180', 'tt_virsual_sort_equip_second', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequipsecond:tt_virsual_sort_equip:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:05:18', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404055020184', '2023021404055020180', 'tt_virsual_sort_equip_second', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequipsecond:tt_virsual_sort_equip:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:05:18', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404055020185', '2023021404055020180', 'excel_tt_virsual_sort_equip_second', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequipsecond:tt_virsual_sort_equip:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:05:18', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404055020186', '2023021404055020180', 'excel_tt_virsual_sort_equip_second', NULL, NULL, 0, NULL, NULL, 2, 'ttvirsualsortequipsecond:tt_virsual_sort_equip:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:05:18', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,149 @@
<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="psName">
<a-input v-model="model.psName" placeholder="请输入工位" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="检测项" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="testItem">
<a-input v-model="model.testItem" placeholder="请输入检测项" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公差上限" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upperLimit">
<a-input-number v-model="model.upperLimit" placeholder="请输入公差上限" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公差下限" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lowerLimit">
<a-input-number v-model="model.lowerLimit" placeholder="请输入公差下限" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="总数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalCount">
<a-input-number v-model="model.totalCount" placeholder="请输入总数" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="NG数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ngCount">
<a-input-number v-model="model.ngCount" placeholder="请输入NG数" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="NG率" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ngRate">
<a-input-number v-model="model.ngRate" placeholder="请输入NG率" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品类型id1表示底座2表示胶塞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<a-input-number v-model="model.typeId" placeholder="请输入产品类型id1表示底座2表示胶塞" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司id, 1表示电气元器件2表示轨道扣件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyId">
<a-input-number v-model="model.companyId" placeholder="请输入公司id, 1表示电气元器件2表示轨道扣件" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="记录的创建人员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createBy">
<a-input v-model="model.createBy" 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: 'TtVirsualSortEquipSecondForm',
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: {
},
url: {
add: "/ttvirsualsortequipsecond/ttVirsualSortEquipSecond/add",
edit: "/ttvirsualsortequipsecond/ttVirsualSortEquipSecond/edit",
queryById: "/ttvirsualsortequipsecond/ttVirsualSortEquipSecond/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-virsual-sort-equip-second-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-virsual-sort-equip-second-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;"></a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;"></a-button>
</div>
</a-drawer>
</template>
<script>
import TtVirsualSortEquipSecondForm from './TtVirsualSortEquipSecondForm'
export default {
name: 'TtVirsualSortEquipSecondModal',
components: {
TtVirsualSortEquipSecondForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tt-virsual-sort-equip-second-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-virsual-sort-equip-second-form>
</j-modal>
</template>
<script>
import TtVirsualSortEquipSecondForm from './TtVirsualSortEquipSecondForm'
export default {
name: 'TtVirsualSortEquipSecondModal',
components: {
TtVirsualSortEquipSecondForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save