Browse Source

热轧108穿孔机模块

master
songguoqiang 1 year ago
parent
commit
ea34801a30
  1. 22
      src/api/pszc/hrpuncherdata108/index.ts
  2. 5
      src/api/tjanalysis/index.ts
  3. 6
      src/utils/dict.ts
  4. 11
      src/views/pszc/hrpuncherdata108/hrPuncherdata108.data.ts
  5. 128
      src/views/pszc/hrpuncherdata108/operationtimedata108/hrPuncherdata108.data.ts
  6. 221
      src/views/pszc/hrpuncherdata108/operationtimedata108/index.vue
  7. 135
      src/views/pszc/hrpuncherdata108/rollcountdata108/hrPuncherdata108.data.ts
  8. 211
      src/views/pszc/hrpuncherdata108/rollcountdata108/index.vue
  9. 136
      src/views/pszc/hrpuncherdata108/rolltimedata108/hrPuncherdata108.data.ts
  10. 230
      src/views/pszc/hrpuncherdata108/rolltimedata108/index.vue
  11. 4
      src/views/report/goview/index.vue
  12. 32
      src/views/tjanalysis/hrpuncherdata/index.vue

22
src/api/pszc/hrpuncherdata108/index.ts

@ -9,7 +9,7 @@ export interface HrPuncherdata108VO {
mname: string
}
// 查询热轧108-穿孔机列表
// 查询热轧108-穿孔机钢针计数列表
export const getHrPuncherdata108Page = async (params) => {
if (params.isSearch) {
delete params.isSearch
@ -19,6 +19,26 @@ export const getHrPuncherdata108Page = async (params) => {
return await request.get({ url: `/pszc/hrpuncherdata108/page`, params })
}
}
// 查询热轧108-穿孔机运行时间列表
export const getHrPuncherdata108Page1 = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/pszc/hrpuncherdata108/senior', data })
} else {
return await request.get({ url: `/pszc/hrpuncherdata108/page1`, params })
}
}
// 查询热轧108-穿孔机轧制时间列表
export const getHrPuncherdata108Page2 = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/pszc/hrpuncherdata108/senior', data })
} else {
return await request.get({ url: `/pszc/hrpuncherdata108/page2`, params })
}
}
// 查询热轧108-穿孔机详情
export const getHrPuncherdata108 = async (id: number) => {

5
src/api/tjanalysis/index.ts

@ -49,3 +49,8 @@ export const queryWaterDay = async (params) => {
export const queryXcqtyDay = async (params) => {
return await request.get({ url: `/tjanalysis/queryXcqtyDay`, params})
}
// 获取热轧穿孔机日统计报表
export const queryHrpuncherDay = async (params) => {
return await request.get({ url: `/tjanalysis/queryHrpuncherDay`, params })
}

6
src/utils/dict.ts

@ -99,6 +99,12 @@ export enum DICT_TYPE {
SYSTEM_TENANT_PACKAGE_ID = 'system_tenant_package_id',
TERMINAL = 'terminal', // 终端
// ========== 热轧108穿孔机 模块 ==========
pszc_hr_puncherdata108 ='pszc_hr_puncherdata108',//热轧108运行时间类型
pszc_hr_puncherdata108_roll ='pszc_hr_puncherdata108_roll',//热轧108轧制时间类型
pszc_hr_puncherdata108_operation ='pszc_hr_puncherdata108_operation',//热轧108穿孔机运行时间下拉组合类型数据由数据库四种类型分为两种类型,数据用逗号分隔
// ========== SYSTEM 模块 ==========
SYSTEM_USER_SEX = 'system_user_sex',
SYSTEM_MENU_TYPE = 'system_menu_type',

11
src/views/pszc/hrpuncherdata108/hrPuncherdata108.data.ts

@ -2,8 +2,12 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
import * as PszcCommonApi from '@/api/pszc/pszccommon'
import * as DictApI from '@/api/system/dict/dict.data'
// 数据点
const sjdList = await PszcCommonApi.selectHr108Pros({flag: '3' , type: '1'})
const sjdList = await PszcCommonApi.selectHr108Pros({flag: '3' , type: '1',module:'2'})
debugger
const ll = DICT_TYPE.pszc_hr_puncherdata108
// 仪器仪表
const yqbList = await PszcCommonApi.selectHr108Pros({flag: '3' , type: '2'})
@ -90,7 +94,7 @@ export const HrPuncherdata108 = useCrudSchemas(reactive<CrudSchema[]>([
},
{
label: '开始时间',
field: 'createTime',
field: 'updateTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
@ -106,7 +110,7 @@ export const HrPuncherdata108 = useCrudSchemas(reactive<CrudSchema[]>([
},
{
label: '结束时间',
field: 'updateTime',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
@ -120,6 +124,7 @@ export const HrPuncherdata108 = useCrudSchemas(reactive<CrudSchema[]>([
},
isForm: false,
}
// ,
// {
// label: '操作',

128
src/views/pszc/hrpuncherdata108/operationtimedata108/hrPuncherdata108.data.ts

@ -0,0 +1,128 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
import * as PszcCommonApi from '@/api/pszc/pszccommon'
import * as DictApi from '@/utils/dict'
// 数据点
//const sjdList = await PszcCommonApi.selectHr108Pros({flag: '3' , type: '1',module:'2'})
const sjdList1 = DictApi.getStrDictOptions(DICT_TYPE.pszc_hr_puncherdata108);
const sjdList = DictApi.getStrDictOptions(DICT_TYPE.pszc_hr_puncherdata108_operation);
// 仪器仪表
const yqbList = await PszcCommonApi.selectHr108Pros({flag: '3' , type: '2'})
// 表单校验
export const HrPuncherdata108Rules = reactive({
})
export const HrPuncherdata108 = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '数据点编号',
field: 'icode',
sort: 'custom',
isSearch: false,
},
{
label: '数据点名称',
field: 'icode',
isTable: true,
// formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
// return sjdList1.find((obj) => obj.value === cellValue)?.label
// },
dictType: DICT_TYPE.pszc_hr_puncherdata108,
search: {
show: true,
component: 'Select',
api: () => sjdList,
componentProps: {
optionsAlias: {
labelField: 'label',
valueField: 'value'
}
}
},
},
{
label: '采集值',
field: 'ivalue',
sort: 'custom',
isSearch: false,
},
{
label: '仪表的编号',
field: 'mcode',
sort: 'custom',
isSearch: false,
},
{
label: '仪表的名称',
field: 'mcode',
isTable: true,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return yqbList.find((obj) => obj.code === cellValue)?.label
},
search: {
show: true,
component: 'Select',
api: () => yqbList,
componentProps: {
optionsAlias: {
labelField: 'label',
valueField: 'code'
}
}
},
form: {
component: 'Select',
api: () => yqbList,
componentProps: {
optionsAlias: {
labelField: 'label',
valueField: 'code'
}
}
}
},
{
label: '开始时间',
field: 'updateTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '结束时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
}
// ,
// {
// label: '操作',
// field: 'action',
// isForm: false,
// table: {
// width: 150,
// fixed: 'right'
// }
// }
]))

221
src/views/pszc/hrpuncherdata108/operationtimedata108/index.vue

@ -0,0 +1,221 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="HrPuncherdata108.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="HrPuncherdata108.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="getList"
:rules="HrPuncherdata108Rules"
:formAllSchemas="HrPuncherdata108.allSchemas"
:searchTableParams="searchTableParams"
:apiUpdate="HrPuncherdata108Api.updateHrPuncherdata108"
:apiCreate="HrPuncherdata108Api.createHrPuncherdata108"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { HrPuncherdata108,HrPuncherdata108Rules } from './hrPuncherdata108.data'
import * as HrPuncherdata108Api from '@/api/pszc/hrpuncherdata108'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
defineOptions({ name: 'OperationTimeData108' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(HrPuncherdata108.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableParams = ref([
//{
// formField: 'productItemCode',
// searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage
//}
])
const { tableObject, tableMethods } = useTable({
getListApi: HrPuncherdata108Api.getHrPuncherdata108Page1 //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultAddBtn(null), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:hrPuncherdata108:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'wms:hrPuncherdata108:export'}), //
// defaultButtons.defaultFreshBtn(null), //
// defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'wms:hrPuncherdata108:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:hrPuncherdata108:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicHrPuncherdata108')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await HrPuncherdata108Api.deleteHrPuncherdata108(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await HrPuncherdata108Api.exportHrPuncherdata108(setSearchParams)
download.excel(data, '热轧108-穿孔机.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '热轧108-穿孔机导入模版.xls'
})
//
const importSuccess = () => {
let param = {
icode: 'Up_Roller_Start,Up_Roller_runtime,Down_Roller_Start,Down_Roller_runtime'
}
setSearchParams(param);
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
let param = {
icode: 'Up_Roller_Start,Up_Roller_runtime,Down_Roller_Start,Down_Roller_runtime'
}
setSearchParams(param); //
}
/** 初始化 **/
onMounted(async () => {
getList();
// importTemplateData.templateUrl = await HrPuncherdata108Api.importTemplate()
})
</script>

135
src/views/pszc/hrpuncherdata108/rollcountdata108/hrPuncherdata108.data.ts

@ -0,0 +1,135 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
import * as PszcCommonApi from '@/api/pszc/pszccommon'
// 数据点
const sjdList = await PszcCommonApi.selectHr108Pros({flag: '3' , type: '1'})
// 仪器仪表
const yqbList = await PszcCommonApi.selectHr108Pros({flag: '3' , type: '2'})
// 表单校验
export const HrPuncherdata108Rules = reactive({
})
export const HrPuncherdata108 = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '数据点编号',
field: 'icode',
sort: 'custom',
isSearch: false,
},
{
label: '数据点名称',
field: 'icode',
isTable: true,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return sjdList.find((obj) => obj.code === cellValue)?.label
},
// search: {
// show: true,
// component: 'Select',
// api: () => sjdList,
// componentProps: {
// optionsAlias: {
// labelField: 'label',
// valueField: 'code'
// }
// }
// },
form: {
component: 'Select',
api: () => sjdList,
componentProps: {
optionsAlias: {
labelField: 'label',
valueField: 'code'
}
}
}
},
{
label: '采集值',
field: 'ivalue',
sort: 'custom',
isSearch: false,
},
{
label: '仪表的编号',
field: 'mcode',
sort: 'custom',
isSearch: false,
},
{
label: '仪表的名称',
field: 'mcode',
isTable: true,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return yqbList.find((obj) => obj.code === cellValue)?.label
},
search: {
show: true,
component: 'Select',
api: () => yqbList,
componentProps: {
optionsAlias: {
labelField: 'label',
valueField: 'code'
}
}
},
form: {
component: 'Select',
api: () => yqbList,
componentProps: {
optionsAlias: {
labelField: 'label',
valueField: 'code'
}
}
}
},
{
label: '开始时间',
field: 'updateTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '结束时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
}
// ,
// {
// label: '操作',
// field: 'action',
// isForm: false,
// table: {
// width: 150,
// fixed: 'right'
// }
// }
]))

211
src/views/pszc/hrpuncherdata108/rollcountdata108/index.vue

@ -0,0 +1,211 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="HrPuncherdata108.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="HrPuncherdata108.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="getList"
:rules="HrPuncherdata108Rules"
:formAllSchemas="HrPuncherdata108.allSchemas"
:searchTableParams="searchTableParams"
:apiUpdate="HrPuncherdata108Api.updateHrPuncherdata108"
:apiCreate="HrPuncherdata108Api.createHrPuncherdata108"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { HrPuncherdata108,HrPuncherdata108Rules } from './hrPuncherdata108.data'
import * as HrPuncherdata108Api from '@/api/pszc/hrpuncherdata108'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
defineOptions({ name: 'RollCountdata108' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(HrPuncherdata108.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableParams = ref([
{
icode: 'Count',
}
])
const { tableObject, tableMethods } = useTable({
getListApi: HrPuncherdata108Api.getHrPuncherdata108Page //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultAddBtn(null), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:hrPuncherdata108:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'wms:hrPuncherdata108:export'}), //
// defaultButtons.defaultFreshBtn(null), //
// defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'wms:hrPuncherdata108:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:hrPuncherdata108:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicHrPuncherdata108')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await HrPuncherdata108Api.deleteHrPuncherdata108(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await HrPuncherdata108Api.exportHrPuncherdata108(setSearchParams)
download.excel(data, '热轧108-穿孔机.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '热轧108-穿孔机导入模版.xls'
})
//
const importSuccess = () => {
getList();
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList(); //
}
/** 初始化 **/
onMounted(async () => {
getList();
})
</script>

136
src/views/pszc/hrpuncherdata108/rolltimedata108/hrPuncherdata108.data.ts

@ -0,0 +1,136 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
import * as PszcCommonApi from '@/api/pszc/pszccommon'
import * as DictApi from '@/utils/dict'
// 数据点
// const sjdList = await PszcCommonApi.selectHr108Pros({flag: '3' , type: '1',module:'2'})
const sjdList = DictApi.getStrDictOptions(DICT_TYPE.pszc_hr_puncherdata108_roll);
// 仪器仪表
const yqbList = await PszcCommonApi.selectHr108Pros({flag: '3' , type: '2'})
// 表单校验
export const HrPuncherdata108Rules = reactive({
})
export const HrPuncherdata108 = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '数据点编号',
field: 'icode',
sort: 'custom',
isSearch: false,
},
{
label: '数据点名称',
field: 'icode',
isTable: true,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return sjdList.find((obj) => obj.value === cellValue)?.label
},
search: {
show: true,
component: 'Select',
api: () => sjdList,
componentProps: {
optionsAlias: {
labelField: 'label',
valueField: 'value'
}
}
},
form: {
component: 'Select',
api: () => sjdList,
componentProps: {
optionsAlias: {
labelField: 'label',
valueField: 'code'
}
}
}
},
{
label: '采集值',
field: 'ivalue',
sort: 'custom',
isSearch: false,
},
{
label: '仪表的编号',
field: 'mcode',
sort: 'custom',
isSearch: false,
},
{
label: '仪表的名称',
field: 'mcode',
isTable: true,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return yqbList.find((obj) => obj.code === cellValue)?.label
},
search: {
show: true,
component: 'Select',
api: () => yqbList,
componentProps: {
optionsAlias: {
labelField: 'label',
valueField: 'code'
}
}
},
form: {
component: 'Select',
api: () => yqbList,
componentProps: {
optionsAlias: {
labelField: 'label',
valueField: 'code'
}
}
}
},
{
label: '开始时间',
field: 'updateTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '结束时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
}
// ,
// {
// label: '操作',
// field: 'action',
// isForm: false,
// table: {
// width: 150,
// fixed: 'right'
// }
// }
]))

230
src/views/pszc/hrpuncherdata108/rolltimedata108/index.vue

@ -0,0 +1,230 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="HrPuncherdata108.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="HrPuncherdata108.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="getList"
:rules="HrPuncherdata108Rules"
:formAllSchemas="HrPuncherdata108.allSchemas"
:searchTableParams="searchTableParams"
:apiUpdate="HrPuncherdata108Api.updateHrPuncherdata108"
:apiCreate="HrPuncherdata108Api.createHrPuncherdata108"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { HrPuncherdata108,HrPuncherdata108Rules } from './hrPuncherdata108.data'
import * as HrPuncherdata108Api from '@/api/pszc/hrpuncherdata108'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
defineOptions({ name: 'RollTimeData108' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(HrPuncherdata108.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableParams = ref([
//{
// formField: 'productItemCode',
// searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage
//}
{
icode: 'Lower_Roller_singleruntime,Up_Roller_singleruntime'
}
])
const { tableObject, tableMethods } = useTable({
getListApi: HrPuncherdata108Api.getHrPuncherdata108Page2 //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultAddBtn(null), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:hrPuncherdata108:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'wms:hrPuncherdata108:export'}), //
// defaultButtons.defaultFreshBtn(null), //
// defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'wms:hrPuncherdata108:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:hrPuncherdata108:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
const tianjia=()=>{
let param = {
icode: 'Lower_Roller_singleruntime,Up_Roller_singleruntime'
}
setSearchParams(param);
}
const tianjia1=async ()=>{
console.log(tableObject)
setSearchParams();
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicHrPuncherdata108')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await HrPuncherdata108Api.deleteHrPuncherdata108(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await HrPuncherdata108Api.exportHrPuncherdata1082(setSearchParams)
download.excel(data, '热轧108-穿孔机.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '热轧108-穿孔机导入模版.xls'
})
//
const importSuccess = () => {
getList();
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList();//
}
/** 初始化 **/
onMounted(async () => {
getList()
// importTemplateData.templateUrl = await HrPuncherdata108Api.importTemplate()
})
</script>

4
src/views/report/goview/index.vue

@ -6,6 +6,6 @@
<script lang="ts" setup>
defineOptions({ name: 'GoView' })
const src = 'http://127.0.0.1:3000'
// const src = 'http://10.140.10.4:26111'
//const src = 'http://127.0.0.1:3000'
const src = 'http://10.140.10.4:26111'
</script>

32
src/views/tjanalysis/rzcjinfo/index.vue → src/views/tjanalysis/hrpuncherdata/index.vue

@ -10,8 +10,8 @@
type="date"
/>
</el-form-item>
<el-form-item label="位置" prop="mcode">
<el-select v-model="queryParams.mcode" placeholder="请选择">
<el-form-item label="位置" prop="flag">
<el-select v-model="queryParams.flag" placeholder="请选择">
<el-option
v-for="item in types.flagList"
:key="item.value"
@ -28,9 +28,9 @@
<!-- 列表 -->
<ContentWrap>
<el-divider content-position="left"><div style="font-size:16px; float: left"><b>一次计量</b></div><div style="float: left">一九八六年五月三日安全运行{{ dataList.days }}</div></el-divider>
<el-divider content-position="left"><div style="font-size:16px; float: left"><b>{{names}}</b></div></el-divider>
<el-table
v-loading="loading" :data="dataList.dList" border="true" highlight-current-row="true"
v-loading="loading" :data="dataList" border="true" highlight-current-row="true"
header-row-style="height: 50px; text-align: center" :span-method="arraySpanMethod"
:row-class-name="tableRowClassName" :cell-class-name="tableCellClassName">
<el-table-column label="" prop="name" align="right" :show-overflow-tooltip="true" width="150" />
@ -49,7 +49,7 @@
import * as TjanalysisApi from '@/api/tjanalysis'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Rzcjinfo' })
defineOptions({ name: 'HrPuncherData' })
const message = useMessage() //
const { t } = useI18n() //
@ -58,16 +58,16 @@ const route = useRoute() // 路由信息
const routeName = ref()
routeName.value = route.name
const loading = ref(true)
const dataList = reactive({dList: [] , days: 0})
const dataList = ref([])
const names = ref("热轧108穿孔");
const queryParams = reactive({
date: formatDate(new Date() , 'YYYY-MM-DD'),
flag: '1'
})
const types = reactive({flagList: [
{name: '热轧108延伸' , value: '1'},
{name: '热轧90延伸' , value: '2'}
{name: '热轧108穿孔' , value: '1'},
{name: '热轧90穿孔' , value: '2'}
]})
const handleQuery = async () => {
@ -80,13 +80,15 @@ const resetQuery = async () => {
}
const getList = async () => {
const res = await TjanalysisApi.queryIrealdataTj(queryParams)
if (res != null && res.trList != null) {
dataList.days = res.days
dataList.dList = []
dataList.dList = res.trList
}
const res = await TjanalysisApi.queryHrpuncherDay(queryParams)
dataList.value = res.dataList
loading.value = false
if(queryParams.flag=='1'){
names.value = "热轧108穿孔"
}else{
names.value = "热轧90穿孔"
}
}
function arraySpanMethod ({ row, column, rowIndex, columnIndex }) {
Loading…
Cancel
Save