gaojs
5 months ago
11 changed files with 2104 additions and 3 deletions
@ -0,0 +1,91 @@ |
|||
import request from '@/config/axios' |
|||
import {MaintenanceVO} from "@/api/eam/maintenance"; |
|||
|
|||
export interface PlanInspectionVO { |
|||
id: number |
|||
number: string |
|||
name: string |
|||
equipmentCode: string |
|||
type: string |
|||
optionCode: string |
|||
cycle: string |
|||
startTime: Date |
|||
endTime: Date |
|||
status: string |
|||
approver: number |
|||
approveContent: string |
|||
approveTime: Date |
|||
autoExamine: string |
|||
autoAgree: string |
|||
directCreateRecord: string |
|||
factoryAreaCode: string |
|||
workshopCode: string |
|||
lineCode: string |
|||
processCode: string |
|||
workstationCode: string |
|||
departmentCode: string |
|||
remark: string |
|||
siteId: string |
|||
available: string |
|||
deletionTime: Date |
|||
deleterId: byte[] |
|||
concurrencyStamp: number |
|||
} |
|||
|
|||
// 查询巡检计划列表
|
|||
export const getPlanInspectionPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/eam/plan-inspection/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/eam/plan-inspection/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询巡检计划详情
|
|||
export const getPlanInspection = async (id: number) => { |
|||
return await request.get({ url: `/eam/plan-inspection/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增巡检计划
|
|||
export const createPlanInspection = async (data: PlanInspectionVO) => { |
|||
return await request.post({ url: `/eam/plan-inspection/create`, data }) |
|||
} |
|||
|
|||
// 修改巡检计划
|
|||
export const updatePlanInspection = async (data: PlanInspectionVO) => { |
|||
return await request.put({ url: `/eam/plan-inspection/update`, data }) |
|||
} |
|||
|
|||
// 修改巡检计划-审核
|
|||
export const updateInspectionPlanAudi = async (data: PlanInspectionVO) => { |
|||
return await request.post({ url: `/eam/plan-inspection/updateAudi`, data }) |
|||
} |
|||
|
|||
// 删除巡检计划
|
|||
export const deletePlanInspection = async (id: number) => { |
|||
return await request.delete({ url: `/eam/plan-inspection/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出巡检计划 Excel
|
|||
export const exportPlanInspection = async (params) => { |
|||
return await request.download({ url: `/eam/plan-inspection/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/eam/plan-inspection/get-import-template' }) |
|||
} |
|||
|
|||
|
|||
// 启用 / 禁用
|
|||
export const updateEnableCode = async (data: PlanInspectionVO) => { |
|||
return await request.post({ url: `/eam/plan-inspection/ables` , data }) |
|||
} |
|||
|
|||
|
|||
// 修改计划状态
|
|||
export const updateInspectionPlan = async (data: PlanInspectionVO) => { |
|||
return await request.post({ url: `/eam/plan-inspection/updatePlan`, data }) |
|||
} |
@ -0,0 +1,91 @@ |
|||
import request from '@/config/axios' |
|||
import {PlanInspectionVO} from "@/api/eam/planInspection"; |
|||
|
|||
export interface PlanSpotCheckVO { |
|||
id: number |
|||
number: string |
|||
name: string |
|||
equipmentCode: string |
|||
type: string |
|||
optionCode: string |
|||
cycle: string |
|||
startTime: Date |
|||
endTime: Date |
|||
status: string |
|||
approver: number |
|||
approveContent: string |
|||
approveTime: Date |
|||
autoExamine: string |
|||
autoAgree: string |
|||
directCreateRecord: string |
|||
factoryAreaCode: string |
|||
workshopCode: string |
|||
lineCode: string |
|||
processCode: string |
|||
workstationCode: string |
|||
departmentCode: string |
|||
remark: string |
|||
siteId: string |
|||
available: string |
|||
deletionTime: Date |
|||
deleterId: byte[] |
|||
concurrencyStamp: number |
|||
} |
|||
|
|||
// 查询点检计划列表
|
|||
export const getPlanSpotCheckPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/eam/plan-spot-check/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/eam/plan-spot-check/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询点检计划详情
|
|||
export const getPlanSpotCheck = async (id: number) => { |
|||
return await request.get({ url: `/eam/plan-spot-check/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增点检计划
|
|||
export const createPlanSpotCheck = async (data: PlanSpotCheckVO) => { |
|||
return await request.post({ url: `/eam/plan-spot-check/create`, data }) |
|||
} |
|||
|
|||
// 修改点检计划
|
|||
export const updatePlanSpotCheck = async (data: PlanSpotCheckVO) => { |
|||
return await request.put({ url: `/eam/plan-spot-check/update`, data }) |
|||
} |
|||
|
|||
// 修改巡检计划-审核
|
|||
export const updateSpotCheckPlanAudi = async (data: PlanSpotCheckVO) => { |
|||
return await request.post({ url: `/eam/plan-spot-check/updateAudi`, data }) |
|||
} |
|||
|
|||
// 删除点检计划
|
|||
export const deletePlanSpotCheck = async (id: number) => { |
|||
return await request.delete({ url: `/eam/plan-spot-check/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出点检计划 Excel
|
|||
export const exportPlanSpotCheck = async (params) => { |
|||
return await request.download({ url: `/eam/plan-spot-check/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/eam/plan-spot-check/get-import-template' }) |
|||
} |
|||
|
|||
|
|||
// 启用 / 禁用
|
|||
export const updateEnableCode = async (data: PlanSpotCheckVO) => { |
|||
return await request.post({ url: `/eam/plan-spot-check/ables` , data }) |
|||
} |
|||
|
|||
|
|||
// 修改计划状态
|
|||
export const updateSpotCheckPlan = async (data: PlanSpotCheckVO) => { |
|||
return await request.post({ url: `/eam/plan-spot-check/updatePlan`, data }) |
|||
} |
@ -0,0 +1,143 @@ |
|||
<template> |
|||
<Dialog v-model="dialogVisible" :title="dialogTitle" :close-on-click-modal="false"> |
|||
<el-form ref="basicFormRef" v-loading="formLoading" :model="formData" :rules="formRules" label-width="100px"> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<el-form-item label="审核人" prop="approver"> |
|||
<el-input v-model="formData.approver" placeholder="请输入审核人" :disabled="isDisabled"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="审核内容" prop="approveContent"> |
|||
<el-input v-model="formData.approveContent" placeholder="请输入审核内容" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<el-form-item label="审核时间" prop="approveTime"> |
|||
<el-date-picker |
|||
v-model="formData.approveTime" |
|||
type="datetime" |
|||
value-format="x" |
|||
placeholder="选择审核时间"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<template #footer> |
|||
<el-button :disabled="formLoading" type="primary" @click="submitForm('success')">确 定</el-button> |
|||
<el-button @click="handleClose('close')">取 消</el-button> |
|||
</template> |
|||
</Dialog> |
|||
|
|||
<!--添加巡检项弹窗--> |
|||
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" /> |
|||
|
|||
</template> |
|||
<script lang="ts" setup> |
|||
import * as PlanInspectionApi from '@/api/eam/planInspection' |
|||
import { SearchTable } from '@/components/SearchTable' |
|||
import {ElInput} from "element-plus"; |
|||
|
|||
defineOptions({ name: 'TeamForm' }) |
|||
|
|||
const { t } = useI18n() // 国际化 |
|||
const message = useMessage() // 消息弹窗 |
|||
|
|||
const dialogVisible = ref(false) // 弹窗的是否展示 |
|||
const dialogTitle = ref('') // 弹窗的标题 |
|||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 |
|||
const formType = ref('') // 表单的类型:create - 新增;update - 修改 |
|||
const tags=ref([]) |
|||
|
|||
const inputValue = ref('') |
|||
const inputVisible = ref(false) |
|||
const isDisabled = ref(false) |
|||
const InputRef = ref<InstanceType<typeof ElInput>>() |
|||
|
|||
|
|||
const formData = ref({ |
|||
id:'', |
|||
number:'', |
|||
approver: '', |
|||
approveContent: '', |
|||
approveTime: '', |
|||
}) |
|||
const formRules = reactive({ |
|||
approver: [ |
|||
{ required: true, message: '审核人不能为空', trigger: 'blur' }, |
|||
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } |
|||
], |
|||
approveContent: [ |
|||
{ required: true, message: '审核内容不能为空', trigger: 'blur' }, |
|||
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } |
|||
], |
|||
approveTime: [ |
|||
{ required: true, message: '审核时间不能为空', trigger: 'blur' }, |
|||
], |
|||
}) |
|||
const basicFormRef = ref() // 表单 Ref |
|||
|
|||
|
|||
/** 初始化弹窗 */ |
|||
const open = async (type: string, row?: object) => { |
|||
dialogVisible.value = true |
|||
dialogTitle.value = t('action.' + type) |
|||
formType.value = type |
|||
//初始化数据 |
|||
formData.value.id = row.id |
|||
formData.value.number = row.number |
|||
} |
|||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗 |
|||
|
|||
/** 提交表单 */ |
|||
const submitForm = async (val) => { |
|||
|
|||
// 校验表单 |
|||
if (!basicFormRef) return |
|||
const valid = await basicFormRef.value.validate() |
|||
if (!valid) return |
|||
|
|||
//发送数据 |
|||
await PlanInspectionApi.updateInspectionPlanAudi(formData.value) |
|||
|
|||
//把success函数传递到父页面 |
|||
emit('success',formData.value.id) |
|||
dialogVisible.value = false |
|||
} |
|||
|
|||
const handleClose=(val)=>{ |
|||
dialogVisible.value = false |
|||
emit('close',val) |
|||
} |
|||
|
|||
// 传递给父类 |
|||
const emit = defineEmits(['close','success']) |
|||
|
|||
</script> |
|||
|
|||
<style scoped> |
|||
.tag-container { |
|||
margin-top: 10px; /* 可根据需要调整标签容器与表单项之间的间距 */ |
|||
border: 1px solid #ccc; /* 添加边框样式 */ |
|||
padding: 10px; /* 可根据需要调整容器内边距 */ |
|||
width: 950px; /* 设置固定宽度为 950px */ |
|||
overflow-y: auto; /* 当内容溢出容器高度时显示滚动条 */ |
|||
word-wrap: break-word; /* 使用 word-wrap 属性实现超出范围换行 */ |
|||
overflow-wrap: break-word; /* 兼容性更好的写法 */ |
|||
flex-wrap: wrap; |
|||
} |
|||
.input-with-button { |
|||
display: flex; |
|||
align-items: center; |
|||
width: 100%; |
|||
} |
|||
|
|||
.input-with-button > .el-input { |
|||
flex: 1; |
|||
/*margin-right: 10px;*/ |
|||
} |
|||
|
|||
</style> |
@ -0,0 +1,419 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="PlanInspection.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="PlanInspection.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 #number="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.number)"> |
|||
<span>{{ row.number }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="formsSuccess" |
|||
:rules="PlanInspectionRules" |
|||
:formAllSchemas="PlanInspection.allSchemas" |
|||
:apiUpdate="PlanInspectionApi.updatePlanInspection" |
|||
:apiCreate="PlanInspectionApi.createPlanInspection" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
@onChange="onChange" |
|||
/> |
|||
|
|||
<!-- 详情 --> |
|||
<Detail ref="detailRef" :isBasic="true" :allSchemas="PlanInspection.allSchemas" /> |
|||
|
|||
<AudiForm ref="audiFormRef" @success="getData" @close="getClosed"/> |
|||
|
|||
<!-- 导入 --> |
|||
<ImportForm ref="importFormRef" url="/eam/plan-inspection/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { PlanInspection,PlanInspectionRules } from './planInspection.data' |
|||
import * as PlanInspectionApi from '@/api/eam/planInspection' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|||
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|||
import Detail from '@/components/Detail/src/Detail.vue' |
|||
import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data"; |
|||
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; |
|||
import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data"; |
|||
import * as ToolItemApi from "@/api/eam/toolAccounts"; |
|||
import AudiForm from '@/views/eam/planInspection/audiForm.vue' |
|||
|
|||
defineOptions({ name: 'PlanInspection' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(PlanInspection.allSchemas.tableColumns) |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: PlanInspectionApi.getPlanInspectionPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
defaultButtons.defaultAddBtn({hasPermi:'eam:planInspection:create'}), // 新增 |
|||
//defaultButtons.defaultImportBtn({hasPermi:'eam:planInspection:import'}), // 导入 |
|||
defaultButtons.defaultExportBtn({hasPermi:'eam:planInspection:export'}), // 导出 |
|||
defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
// { |
|||
// label: '自定义扩展按钮', |
|||
// name: 'zdy', |
|||
// hide: false, |
|||
// type: 'primary', |
|||
// icon: 'Select', |
|||
// color: '' |
|||
// }, |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
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 isShowMainButton = (row,val) => { |
|||
if (val.indexOf(row.available) > -1) { |
|||
return false |
|||
} else { |
|||
return true |
|||
} |
|||
} |
|||
|
|||
const isShowStatusButton = (row,val) => { |
|||
if (val.indexOf(row.status) > -1) { |
|||
return false |
|||
} else { |
|||
return true |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = (row) => { |
|||
return [ |
|||
defaultButtons.mainListEditBtn({hasPermi:'eam:planInspection:update'}), // 编辑 |
|||
defaultButtons.mainListAuditingBtn({hide: isShowStatusButton(row,['0']),hasPermi:'eam:planInspection:update'}), // 审核 |
|||
defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:planInspection:update'}), // 完成 |
|||
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:planInspection:update'}), |
|||
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:planInspection:update'}), |
|||
] |
|||
} |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} else if (val == 'enable') { |
|||
handleEnable(row.id) |
|||
} else if (val == 'disable') { |
|||
handleDisable(row.id) |
|||
} else if (val == 'auditing') { // 审核 |
|||
handleAuditing(row.id) |
|||
} else if (val == 'finish') { // 完成 |
|||
handleFinish(row) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
if(type == "create"){ |
|||
PlanInspection.allSchemas.formSchema.forEach((item) => { |
|||
if(item.field == 'status'){ |
|||
item.componentProps.disabled = true |
|||
} |
|||
}) |
|||
}else{ |
|||
PlanInspection.allSchemas.formSchema.forEach((item) => { |
|||
if(item.field == 'status'){ |
|||
item.componentProps.disabled = false |
|||
} |
|||
}) |
|||
} |
|||
|
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// form表单提交 |
|||
const formsSuccess = async (formType,data) => { |
|||
var isHave =PlanInspection.allSchemas.formSchema.some(function (item) { |
|||
return item.field === 'activeTime' || item.field === 'expireTime'; |
|||
}); |
|||
if(isHave){ |
|||
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ |
|||
message.error('失效时间要大于生效时间') |
|||
return; |
|||
} |
|||
} |
|||
if(data.activeTime==0)data.activeTime = null; |
|||
if(data.expireTime==0)data.expireTime = null; |
|||
if (formType === 'create') { |
|||
await PlanInspectionApi.createPlanInspection(data) |
|||
message.success(t('common.createSuccess')) |
|||
} else { |
|||
await PlanInspectionApi.updatePlanInspection(data) |
|||
message.success(t('common.updateSuccess')) |
|||
} |
|||
basicFormRef.value.dialogVisible = false |
|||
getList() |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicPlanInspection') |
|||
} |
|||
|
|||
//完成按钮 |
|||
const handleFinish = async (row) => { |
|||
message.confirmAudi(t('')).then(async () => { |
|||
//打开提交表单 |
|||
audiFormRef.value.open('update', row); |
|||
}).catch(async (action: Action) => { |
|||
if(action === 'cancel'){ |
|||
const params = ref({ |
|||
id: '', |
|||
status:'', |
|||
}) |
|||
params.value.id = row.id |
|||
params.value.status = '5' |
|||
await PlanInspectionApi.updateInspectionPlan(params.value) |
|||
message.success(t('common.updateSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} |
|||
}) |
|||
} |
|||
|
|||
//审核按钮 |
|||
const audiFormRef = ref() |
|||
const handleAuditing = async (id: number) => { |
|||
await message.delConfirm('是否审核所选中工单?'); |
|||
const params = ref({ |
|||
id: '', |
|||
status:'', |
|||
}) |
|||
params.value.id = id |
|||
params.value.status = '3' |
|||
await PlanInspectionApi.updateInspectionPlan(params.value) |
|||
message.success(t('common.updateSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} |
|||
|
|||
/** 启用 */ |
|||
const handleEnable = async (id: number) => { |
|||
try { |
|||
const params = ref({ |
|||
id: '', |
|||
available:'', |
|||
}) |
|||
params.value.id = id |
|||
params.value.available = 'TRUE' |
|||
await PlanInspectionApi.updateEnableCode(params.value) |
|||
message.success(t('common.updateSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
/** 禁用 */ |
|||
const handleDisable = async (id: number) => { |
|||
try { |
|||
const params = ref({ |
|||
id: '', |
|||
available:'', |
|||
}) |
|||
params.value.id = id |
|||
params.value.available = 'FALSE' |
|||
await PlanInspectionApi.updateEnableCode(params.value) |
|||
message.success(t('common.updateSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await PlanInspectionApi.deletePlanInspection(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
const onChange = (field, item) => { |
|||
//设备 |
|||
if(field == 'type' && item == 'DEVICE'){ |
|||
PlanInspection.allSchemas.formSchema.forEach((items) => { |
|||
if (items.field == 'equipmentCode') { |
|||
basicFormRef.value.formRef.setValues({ |
|||
equipmentCode:'' |
|||
}) |
|||
items.componentProps.searchAllSchemas = EquipmentAccounts.allSchemas |
|||
items.componentProps.searchPage = EquipmentItemApi.getEquipmentAccountsPage |
|||
} |
|||
}) |
|||
} |
|||
//工装 |
|||
if(field == 'type' && item == 'EQUIPMENT'){ |
|||
PlanInspection.allSchemas.formSchema.forEach((items) => { |
|||
if (items.field == 'equipmentCode') { |
|||
basicFormRef.value.formRef.setValues({ |
|||
equipmentCode:'' |
|||
}) |
|||
items.componentProps.searchAllSchemas = ToolAccounts.allSchemas |
|||
items.componentProps.searchPage = ToolItemApi.getToolAccountsPage |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await PlanInspectionApi.exportPlanInspection(tableObject.params) |
|||
download.excel(data, '巡检计划.xlsx') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
|
|||
//audiForm 关闭按钮回传 |
|||
const getClosed=(val)=> { |
|||
nextTick?.(() => { |
|||
getList() |
|||
}) |
|||
} |
|||
|
|||
//audiForm 提交按钮回传 |
|||
const getData=(val)=> { |
|||
nextTick?.(async () => { |
|||
|
|||
try { |
|||
const params = ref({ |
|||
id: '', |
|||
status:'', |
|||
}) |
|||
params.value.id = val |
|||
params.value.status = '4' |
|||
await PlanInspectionApi.updateInspectionPlan(params.value) |
|||
message.success(t('计划已流转')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
|
|||
} |
|||
) |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '巡检计划导入模版.xlsx' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,395 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data"; |
|||
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; |
|||
import * as BasicInspectionApi from "@/api/eam/basicInspectionOption"; |
|||
import {BasicInspectionOption} from "@/views/eam/basicInspectionOption/basicInspectionOption.data"; |
|||
import {getBasicInspectionOptionPage} from "@/api/eam/basicInspectionOption"; |
|||
import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data"; |
|||
import * as WorkshopApi from "@/api/wms/workshop"; |
|||
|
|||
// 表单校验
|
|||
export const PlanInspectionRules = reactive({ |
|||
number: [required], |
|||
name: [required], |
|||
equipmentCode: [required], |
|||
optionCode: [required], |
|||
cycle: [required], |
|||
startTime: [required], |
|||
endTime: [required], |
|||
}) |
|||
|
|||
export const PlanInspection = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: 'id', |
|||
field: 'id', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '计划编号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
isForm: false, |
|||
isDetail:true, |
|||
}, |
|||
{ |
|||
label: '计划名称', |
|||
field: 'name', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '设备类别', |
|||
field: 'type', |
|||
dictType: DICT_TYPE.DEVICE_TYPE, |
|||
dictClass: 'string', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '设备工装编号', |
|||
field: 'equipmentCode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
isForm: true, |
|||
form: { |
|||
componentProps: { |
|||
isSearchList: true, // 开启查询弹窗
|
|||
searchTitle: '设备信息', // 查询弹窗标题
|
|||
searchListPlaceholder: '请选择 设备编号', // 输入框占位文本
|
|||
searchAllSchemas: EquipmentAccounts.allSchemas, // 查询弹窗所需类
|
|||
searchField: 'code', // 查询弹窗赋值字段
|
|||
searchPage: EquipmentItemApi.getEquipmentAccountsPage, // 查询弹窗所需分页方法
|
|||
multiple:true, |
|||
searchCondition: [{ |
|||
key: 'status', |
|||
value: 'NORMAL', |
|||
action: '==', |
|||
isSearch: true, |
|||
isMainValue: false |
|||
}] |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '方案编号', |
|||
field: 'optionCode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
isForm: true, |
|||
form: { |
|||
componentProps: { |
|||
isSearchList: true, // 开启查询弹窗
|
|||
searchTitle: '巡检方案信息', // 查询弹窗标题
|
|||
searchListPlaceholder: '请选择巡检方案', // 输入框占位文本
|
|||
searchAllSchemas: BasicInspectionOption.allSchemas, // 查询弹窗所需类
|
|||
searchField: 'code', // 查询弹窗赋值字段
|
|||
searchPage: BasicInspectionApi.getBasicInspectionOptionPage, // 查询弹窗所需分页方法
|
|||
multiple:true, |
|||
searchCondition: [{ |
|||
key: 'available', |
|||
value: 'TRUE', |
|||
action: '==', |
|||
isSearch: true, |
|||
isMainValue: false |
|||
}] |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '计划类型', |
|||
field: 'cycle', |
|||
dictType: DICT_TYPE.INSPECTION_CYCLE, |
|||
dictClass: 'string', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '计划开始时间', |
|||
field: 'startTime', |
|||
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')] |
|||
} |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '计划结束时间', |
|||
field: 'endTime', |
|||
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')] |
|||
} |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '状态', |
|||
field: 'status', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
dictType: DICT_TYPE.EAM_PLAN_STATUS, |
|||
dictClass: 'string', |
|||
}, |
|||
{ |
|||
label: '审核人', |
|||
field: 'approver', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '审核内容', |
|||
field: 'approveContent', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '审核时间', |
|||
field: 'approveTime', |
|||
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')] |
|||
} |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '自动审核', |
|||
field: 'autoExamine', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '自动通过', |
|||
field: 'autoAgree', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '直接生成记录', |
|||
field: 'directCreateRecord', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '所属厂区编号', |
|||
field: 'factoryAreaCode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '车间编号', |
|||
field: 'workshopCode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
required: true, |
|||
form: { |
|||
// labelMessage: '信息提示说明!!!',
|
|||
componentProps: { |
|||
isSearchList: true, // 开启查询弹窗
|
|||
searchListPlaceholder: '车间', // 输入框占位文本
|
|||
searchField: 'code', // 查询弹窗赋值字段
|
|||
searchTitle: '车间信息', // 查询弹窗标题
|
|||
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类
|
|||
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法
|
|||
searchCondition: [{ |
|||
key: 'available', |
|||
value: 'TRUE', |
|||
isMainValue: false |
|||
}] |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '产线编号', |
|||
field: 'lineCode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '工序编号', |
|||
field: 'processCode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '工位编号', |
|||
field: 'workstationCode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail: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: '部门id', |
|||
field: 'departmentCode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '备注', |
|||
field: 'remark', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '地点ID', |
|||
field: 'siteId', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '是否可用', |
|||
field: 'available', |
|||
sort: 'custom', |
|||
dictType: DICT_TYPE.TRUE_FALSE, |
|||
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|||
isTable: true, |
|||
isDetail: false, |
|||
isSearch: true, |
|||
isTableForm: false, |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '删除时间', |
|||
field: 'deletionTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail: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')] |
|||
} |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '删除人id', |
|||
field: 'deleterId', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '并发乐观锁', |
|||
field: 'concurrencyStamp', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
form: { |
|||
component: 'InputNumber', |
|||
value: 0 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '操作', |
|||
field: 'action', |
|||
isForm: false, |
|||
table: { |
|||
width: 150, |
|||
fixed: 'right' |
|||
} |
|||
} |
|||
])) |
@ -0,0 +1,143 @@ |
|||
<template> |
|||
<Dialog v-model="dialogVisible" :title="dialogTitle" :close-on-click-modal="false"> |
|||
<el-form ref="basicFormRef" v-loading="formLoading" :model="formData" :rules="formRules" label-width="100px"> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<el-form-item label="审核人" prop="approver"> |
|||
<el-input v-model="formData.approver" placeholder="请输入审核人" :disabled="isDisabled"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="审核内容" prop="approveContent"> |
|||
<el-input v-model="formData.approveContent" placeholder="请输入审核内容" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<el-form-item label="审核时间" prop="approveTime"> |
|||
<el-date-picker |
|||
v-model="formData.approveTime" |
|||
type="datetime" |
|||
value-format="x" |
|||
placeholder="选择审核时间"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<template #footer> |
|||
<el-button :disabled="formLoading" type="primary" @click="submitForm('success')">确 定</el-button> |
|||
<el-button @click="handleClose('close')">取 消</el-button> |
|||
</template> |
|||
</Dialog> |
|||
|
|||
<!--添加巡检项弹窗--> |
|||
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" /> |
|||
|
|||
</template> |
|||
<script lang="ts" setup> |
|||
import * as SpotCheckApi from '@/api/eam/planSpotCheck' |
|||
import { SearchTable } from '@/components/SearchTable' |
|||
import {ElInput} from "element-plus"; |
|||
|
|||
defineOptions({ name: 'TeamForm' }) |
|||
|
|||
const { t } = useI18n() // 国际化 |
|||
const message = useMessage() // 消息弹窗 |
|||
|
|||
const dialogVisible = ref(false) // 弹窗的是否展示 |
|||
const dialogTitle = ref('') // 弹窗的标题 |
|||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 |
|||
const formType = ref('') // 表单的类型:create - 新增;update - 修改 |
|||
const tags=ref([]) |
|||
|
|||
const inputValue = ref('') |
|||
const inputVisible = ref(false) |
|||
const isDisabled = ref(false) |
|||
const InputRef = ref<InstanceType<typeof ElInput>>() |
|||
|
|||
|
|||
const formData = ref({ |
|||
id:'', |
|||
number:'', |
|||
approver: '', |
|||
approveContent: '', |
|||
approveTime: '', |
|||
}) |
|||
const formRules = reactive({ |
|||
approver: [ |
|||
{ required: true, message: '审核人不能为空', trigger: 'blur' }, |
|||
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } |
|||
], |
|||
approveContent: [ |
|||
{ required: true, message: '审核内容不能为空', trigger: 'blur' }, |
|||
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } |
|||
], |
|||
approveTime: [ |
|||
{ required: true, message: '审核时间不能为空', trigger: 'blur' }, |
|||
], |
|||
}) |
|||
const basicFormRef = ref() // 表单 Ref |
|||
|
|||
|
|||
/** 初始化弹窗 */ |
|||
const open = async (type: string, row?: object) => { |
|||
dialogVisible.value = true |
|||
dialogTitle.value = t('action.' + type) |
|||
formType.value = type |
|||
//初始化数据 |
|||
formData.value.id = row.id |
|||
formData.value.number = row.number |
|||
} |
|||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗 |
|||
|
|||
/** 提交表单 */ |
|||
const submitForm = async (val) => { |
|||
|
|||
// 校验表单 |
|||
if (!basicFormRef) return |
|||
const valid = await basicFormRef.value.validate() |
|||
if (!valid) return |
|||
|
|||
//发送数据 |
|||
await SpotCheckApi.updateSpotCheckPlanAudi(formData.value) |
|||
|
|||
//把success函数传递到父页面 |
|||
emit('success',formData.value.id) |
|||
dialogVisible.value = false |
|||
} |
|||
|
|||
const handleClose=(val)=>{ |
|||
dialogVisible.value = false |
|||
emit('close',val) |
|||
} |
|||
|
|||
// 传递给父类 |
|||
const emit = defineEmits(['close','success']) |
|||
|
|||
</script> |
|||
|
|||
<style scoped> |
|||
.tag-container { |
|||
margin-top: 10px; /* 可根据需要调整标签容器与表单项之间的间距 */ |
|||
border: 1px solid #ccc; /* 添加边框样式 */ |
|||
padding: 10px; /* 可根据需要调整容器内边距 */ |
|||
width: 950px; /* 设置固定宽度为 950px */ |
|||
overflow-y: auto; /* 当内容溢出容器高度时显示滚动条 */ |
|||
word-wrap: break-word; /* 使用 word-wrap 属性实现超出范围换行 */ |
|||
overflow-wrap: break-word; /* 兼容性更好的写法 */ |
|||
flex-wrap: wrap; |
|||
} |
|||
.input-with-button { |
|||
display: flex; |
|||
align-items: center; |
|||
width: 100%; |
|||
} |
|||
|
|||
.input-with-button > .el-input { |
|||
flex: 1; |
|||
/*margin-right: 10px;*/ |
|||
} |
|||
|
|||
</style> |
@ -0,0 +1,422 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="PlanSpotCheck.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="PlanSpotCheck.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 #number="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.number)"> |
|||
<span>{{ row.number }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="formsSuccess" |
|||
:rules="PlanSpotCheckRules" |
|||
:formAllSchemas="PlanSpotCheck.allSchemas" |
|||
:apiUpdate="PlanSpotCheckApi.updatePlanSpotCheck" |
|||
:apiCreate="PlanSpotCheckApi.createPlanSpotCheck" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
@onChange="onChange" |
|||
/> |
|||
|
|||
<!-- 详情 --> |
|||
<Detail ref="detailRef" :isBasic="true" :allSchemas="PlanSpotCheck.allSchemas" /> |
|||
|
|||
<AudiForm ref="audiFormRef" @success="getData" @close="getClosed"/> |
|||
|
|||
<!-- 导入 --> |
|||
<ImportForm ref="importFormRef" url="/eam/plan-spot-check/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { PlanSpotCheck,PlanSpotCheckRules } from './planSpotCheck.data' |
|||
import * as PlanSpotCheckApi from '@/api/eam/planSpotCheck' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|||
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|||
import Detail from '@/components/Detail/src/Detail.vue' |
|||
import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data"; |
|||
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; |
|||
import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data"; |
|||
import * as ToolItemApi from "@/api/eam/toolAccounts"; |
|||
import AudiForm from '@/views/eam/planSpotCheck/audiForm.vue' |
|||
import {updateSpotCheckPlan} from "@/api/eam/planSpotCheck"; |
|||
|
|||
defineOptions({ name: 'PlanSpotCheck' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(PlanSpotCheck.allSchemas.tableColumns) |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: PlanSpotCheckApi.getPlanSpotCheckPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
defaultButtons.defaultAddBtn({hasPermi:'eam:planSpotCheck:create'}), // 新增 |
|||
//defaultButtons.defaultImportBtn({hasPermi:'eam:planSpotCheck:import'}), // 导入 |
|||
defaultButtons.defaultExportBtn({hasPermi:'eam:planSpotCheck:export'}), // 导出 |
|||
defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
// { |
|||
// label: '自定义扩展按钮', |
|||
// name: 'zdy', |
|||
// hide: false, |
|||
// type: 'primary', |
|||
// icon: 'Select', |
|||
// color: '' |
|||
// }, |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
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 isShowMainButton = (row,val) => { |
|||
if (val.indexOf(row.available) > -1) { |
|||
return false |
|||
} else { |
|||
return true |
|||
} |
|||
} |
|||
|
|||
const isShowStatusButton = (row,val) => { |
|||
if (val.indexOf(row.status) > -1) { |
|||
return false |
|||
} else { |
|||
return true |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = (row) => { |
|||
return [ |
|||
defaultButtons.mainListEditBtn({hasPermi:'eam:planSpotCheck:update'}), // 编辑 |
|||
defaultButtons.mainListAuditingBtn({hide: isShowStatusButton(row,['0']),hasPermi:'eam:planSpotCheck:update'}), // 审核 |
|||
defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:planSpotCheck:update'}), // 完成 |
|||
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:planSpotCheck:update'}), |
|||
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:planSpotCheck:update'}), |
|||
] |
|||
} |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} else if (val == 'enable') { |
|||
handleEnable(row.id) |
|||
} else if (val == 'disable') { |
|||
handleDisable(row.id) |
|||
} else if (val == 'auditing') { // 审核 |
|||
handleAuditing(row.id) |
|||
} else if (val == 'finish') { // 完成 |
|||
handleFinish(row) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
if(type == "create"){ |
|||
PlanSpotCheck.allSchemas.formSchema.forEach((item) => { |
|||
if(item.field == 'status'){ |
|||
item.componentProps.disabled = true |
|||
} |
|||
}) |
|||
}else{ |
|||
PlanSpotCheck.allSchemas.formSchema.forEach((item) => { |
|||
if(item.field == 'status'){ |
|||
item.componentProps.disabled = false |
|||
} |
|||
}) |
|||
} |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// form表单提交 |
|||
const formsSuccess = async (formType,data) => { |
|||
var isHave =PlanSpotCheck.allSchemas.formSchema.some(function (item) { |
|||
return item.field === 'activeTime' || item.field === 'expireTime'; |
|||
}); |
|||
if(isHave){ |
|||
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ |
|||
message.error('失效时间要大于生效时间') |
|||
return; |
|||
} |
|||
} |
|||
if(data.activeTime==0)data.activeTime = null; |
|||
if(data.expireTime==0)data.expireTime = null; |
|||
if (formType === 'create') { |
|||
await PlanSpotCheckApi.createPlanSpotCheck(data) |
|||
message.success(t('common.createSuccess')) |
|||
} else { |
|||
await PlanSpotCheckApi.updatePlanSpotCheck(data) |
|||
message.success(t('common.updateSuccess')) |
|||
} |
|||
basicFormRef.value.dialogVisible = false |
|||
getList() |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicPlanSpotCheck') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await PlanSpotCheckApi.deletePlanSpotCheck(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
|
|||
//完成按钮 |
|||
const handleFinish = async (row) => { |
|||
message.confirmAudi(t('')).then(async () => { |
|||
//打开提交表单 |
|||
audiFormRef.value.open('update', row); |
|||
}).catch(async (action: Action) => { |
|||
if(action === 'cancel'){ |
|||
const params = ref({ |
|||
id: '', |
|||
status:'', |
|||
}) |
|||
params.value.id = row.id |
|||
params.value.status = '5' |
|||
await PlanSpotCheckApi.updateSpotCheckPlan(params.value) |
|||
message.success(t('common.updateSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} |
|||
}) |
|||
} |
|||
|
|||
//审核按钮 |
|||
const audiFormRef = ref() |
|||
const handleAuditing = async (id: number) => { |
|||
await message.delConfirm('是否审核所选中工单?'); |
|||
try { |
|||
const params = ref({ |
|||
id: '', |
|||
status:'', |
|||
}) |
|||
params.value.id = id |
|||
params.value.status = '3' |
|||
await PlanSpotCheckApi.updateSpotCheckPlan(params.value) |
|||
message.success(t('common.updateSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 启用 */ |
|||
const handleEnable = async (id: number) => { |
|||
try { |
|||
const params = ref({ |
|||
id: '', |
|||
available:'', |
|||
}) |
|||
params.value.id = id |
|||
params.value.available = 'TRUE' |
|||
await PlanSpotCheckApi.updateEnableCode(params.value) |
|||
message.success(t('common.updateSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
/** 禁用 */ |
|||
const handleDisable = async (id: number) => { |
|||
try { |
|||
const params = ref({ |
|||
id: '', |
|||
available:'', |
|||
}) |
|||
params.value.id = id |
|||
params.value.available = 'FALSE' |
|||
await PlanSpotCheckApi.updateEnableCode(params.value) |
|||
message.success(t('common.updateSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
const onChange = (field, item) => { |
|||
//设备 |
|||
if(field == 'type' && item == 'DEVICE'){ |
|||
PlanSpotCheck.allSchemas.formSchema.forEach((items) => { |
|||
if (items.field == 'equipmentCode') { |
|||
basicFormRef.value.formRef.setValues({ |
|||
equipmentCode:'' |
|||
}) |
|||
items.componentProps.searchAllSchemas = EquipmentAccounts.allSchemas |
|||
items.componentProps.searchPage = EquipmentItemApi.getEquipmentAccountsPage |
|||
} |
|||
}) |
|||
} |
|||
//工装 |
|||
if(field == 'type' && item == 'EQUIPMENT'){ |
|||
PlanSpotCheck.allSchemas.formSchema.forEach((items) => { |
|||
if (items.field == 'equipmentCode') { |
|||
basicFormRef.value.formRef.setValues({ |
|||
equipmentCode:'' |
|||
}) |
|||
items.componentProps.searchAllSchemas = ToolAccounts.allSchemas |
|||
items.componentProps.searchPage = ToolItemApi.getToolAccountsPage |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
|
|||
|
|||
//audiForm 关闭按钮回传 |
|||
const getClosed=(val)=> { |
|||
nextTick?.(() => { |
|||
getList() |
|||
}) |
|||
} |
|||
|
|||
//audiForm 提交按钮回传 |
|||
const getData=(val)=> { |
|||
nextTick?.(async () => { |
|||
|
|||
try { |
|||
const params = ref({ |
|||
id: '', |
|||
status:'', |
|||
}) |
|||
params.value.id = val |
|||
params.value.status = '4' |
|||
await PlanSpotCheckApi.updateSpotCheckPlan(params.value) |
|||
message.success(t('计划已流转')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
|
|||
} |
|||
) |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await PlanSpotCheckApi.exportPlanSpotCheck(tableObject.params) |
|||
download.excel(data, '点检计划.xlsx') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '点检计划导入模版.xlsx' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,394 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data"; |
|||
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; |
|||
import * as SpotCheckOptionApi from "@/api/eam/basicSpotCheckOption"; |
|||
import {BasicSpotCheckOption} from "@/views/eam/basicSpotCheckOption/basicSpotCheckOption.data"; |
|||
import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data"; |
|||
import * as WorkshopApi from "@/api/wms/workshop"; |
|||
|
|||
// 表单校验
|
|||
export const PlanSpotCheckRules = reactive({ |
|||
number: [required], |
|||
name: [required], |
|||
equipmentCode: [required], |
|||
optionCode: [required], |
|||
cycle: [required], |
|||
startTime: [required], |
|||
endTime: [required], |
|||
}) |
|||
|
|||
export const PlanSpotCheck = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: 'id', |
|||
field: 'id', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '计划编号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
isForm: false, |
|||
isDetail:true, |
|||
}, |
|||
{ |
|||
label: '计划名称', |
|||
field: 'name', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '设备类别', |
|||
field: 'type', |
|||
dictType: DICT_TYPE.DEVICE_TYPE, |
|||
dictClass: 'string', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '设备工装编号', |
|||
field: 'equipmentCode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
isForm: true, |
|||
form: { |
|||
componentProps: { |
|||
isSearchList: true, // 开启查询弹窗
|
|||
searchTitle: '设备信息', // 查询弹窗标题
|
|||
searchListPlaceholder: '请选择 设备编号', // 输入框占位文本
|
|||
searchAllSchemas: EquipmentAccounts.allSchemas, // 查询弹窗所需类
|
|||
searchField: 'code', // 查询弹窗赋值字段
|
|||
searchPage: EquipmentItemApi.getEquipmentAccountsPage, // 查询弹窗所需分页方法
|
|||
multiple:true, |
|||
searchCondition: [{ |
|||
key: 'status', |
|||
value: 'NORMAL', |
|||
action: '==', |
|||
isSearch: true, |
|||
isMainValue: false |
|||
}] |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '方案编号', |
|||
field: 'optionCode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
isForm: true, |
|||
form: { |
|||
componentProps: { |
|||
isSearchList: true, // 开启查询弹窗
|
|||
searchTitle: '点检方案信息', // 查询弹窗标题
|
|||
searchListPlaceholder: '请选择点检方案', // 输入框占位文本
|
|||
searchAllSchemas: BasicSpotCheckOption.allSchemas, // 查询弹窗所需类
|
|||
searchField: 'code', // 查询弹窗赋值字段
|
|||
searchPage: SpotCheckOptionApi.getBasicSpotCheckOptionPage, // 查询弹窗所需分页方法
|
|||
multiple:true, |
|||
searchCondition: [{ |
|||
key: 'available', |
|||
value: 'TRUE', |
|||
action: '==', |
|||
isSearch: true, |
|||
isMainValue: false |
|||
}] |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '计划类型', |
|||
field: 'cycle', |
|||
dictType: DICT_TYPE.SPOTCHECK_CYCLE, |
|||
dictClass: 'string', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '计划开始时间', |
|||
field: 'startTime', |
|||
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')] |
|||
} |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '计划结束时间', |
|||
field: 'endTime', |
|||
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')] |
|||
} |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '状态', |
|||
field: 'status', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
dictType: DICT_TYPE.EAM_PLAN_STATUS, |
|||
dictClass: 'string', |
|||
}, |
|||
{ |
|||
label: '审核人', |
|||
field: 'approver', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '审核内容', |
|||
field: 'approveContent', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '审核时间', |
|||
field: 'approveTime', |
|||
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')] |
|||
} |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '自动审核', |
|||
field: 'autoExamine', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '自动通过', |
|||
field: 'autoAgree', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '直接生成记录', |
|||
field: 'directCreateRecord', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '所属厂区编号', |
|||
field: 'factoryAreaCode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '车间编号', |
|||
field: 'workshopCode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
required: true, |
|||
form: { |
|||
// labelMessage: '信息提示说明!!!',
|
|||
componentProps: { |
|||
isSearchList: true, // 开启查询弹窗
|
|||
searchListPlaceholder: '车间', // 输入框占位文本
|
|||
searchField: 'code', // 查询弹窗赋值字段
|
|||
searchTitle: '车间信息', // 查询弹窗标题
|
|||
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类
|
|||
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法
|
|||
searchCondition: [{ |
|||
key: 'available', |
|||
value: 'TRUE', |
|||
isMainValue: false |
|||
}] |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '产线编号', |
|||
field: 'lineCode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '工序编号', |
|||
field: 'processCode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '工位编号', |
|||
field: 'workstationCode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail: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: '部门id', |
|||
field: 'departmentCode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '备注', |
|||
field: 'remark', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '地点ID', |
|||
field: 'siteId', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '是否可用', |
|||
field: 'available', |
|||
sort: 'custom', |
|||
dictType: DICT_TYPE.TRUE_FALSE, |
|||
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|||
isTable: true, |
|||
isDetail: false, |
|||
isSearch: true, |
|||
isTableForm: false, |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '删除时间', |
|||
field: 'deletionTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail: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')] |
|||
} |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '删除人id', |
|||
field: 'deleterId', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '并发乐观锁', |
|||
field: 'concurrencyStamp', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
form: { |
|||
component: 'InputNumber', |
|||
value: 0 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '操作', |
|||
field: 'action', |
|||
isForm: false, |
|||
table: { |
|||
width: 150, |
|||
fixed: 'right' |
|||
} |
|||
} |
|||
])) |
Loading…
Reference in new issue