| | |
| | | <basic-container> |
| | | <el-form ref="queryParamsRef" :model="searchParams" class="ztzf-page-history-search"> |
| | | <el-form-item label="设备名称" prop="deviceName"> |
| | | <el-input class="ztzf-data-cockpit-search-input" v-model="searchParams.deviceName" placeholder="请输入" |
| | | clearable @clear="handleSearch" /> |
| | | <el-input |
| | | class="ztzf-data-cockpit-search-input" |
| | | v-model="searchParams.deviceName" |
| | | placeholder="请输入" |
| | | clearable |
| | | @clear="handleSearch" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="设备类型" prop="deviceType"> |
| | | <el-select class="ztzf-data-cockpit-select" popper-class="ztzf-data-cockpit-select-popper" |
| | | v-model="searchParams.deviceType" placeholder="请选择" clearable @change="handleSearch"> |
| | | <el-option v-for="item in dictObj.deviceType" :key="item.dictKey" :label="item.dictValue" |
| | | :value="item.dictKey" /> |
| | | <el-select |
| | | class="ztzf-data-cockpit-select" |
| | | popper-class="ztzf-data-cockpit-select-popper" |
| | | v-model="searchParams.deviceType" |
| | | placeholder="请选择" |
| | | clearable |
| | | @change="handleSearch" |
| | | > |
| | | <el-option |
| | | v-for="item in dictObj.deviceType" |
| | | :key="item.dictKey" |
| | | :label="item.dictValue" |
| | | :value="item.dictKey" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="所属部门" prop="belongDept"> |
| | | <el-tree-select class="ztzf-data-cockpit-select" popper-class="ztzf-data-cockpit-tree-select-popper" |
| | | v-model="searchParams.belongDept" :data="deptTree" :props="treeProps" node-key="id" check-strictly |
| | | clearable @change="handleSearch" /> |
| | | <el-tree-select |
| | | class="ztzf-data-cockpit-select" |
| | | popper-class="ztzf-data-cockpit-tree-select-popper" |
| | | v-model="searchParams.belongDept" |
| | | :data="deptTree" |
| | | :props="treeProps" |
| | | node-key="id" |
| | | check-strictly |
| | | clearable |
| | | @change="handleSearch" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item class="history-search-actions"> |
| | |
| | | <el-table-column prop="source" show-overflow-tooltip label="来源" /> |
| | | <el-table-column prop="belongDeptName" show-overflow-tooltip label="所属部门" /> |
| | | <el-table-column prop="charger" show-overflow-tooltip label="负责人" /> |
| | | <el-table-column prop="scrapTime" show-overflow-tooltip label="报废时间" /> |
| | | <el-table-column prop="scrapTime" show-overflow-tooltip label="报废时间"> |
| | | <template v-slot="{ row }"> |
| | | {{dayjs(row.scrapTime).format('YYYY-MM-DD')}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="scrapReason" show-overflow-tooltip label="报废原因" /> |
| | | <el-table-column prop="disposeWay" show-overflow-tooltip label="处置方式" /> |
| | | <el-table-column label="操作" class-name="operation-btns"> |
| | |
| | | </div> |
| | | |
| | | <div class="ztzf-table-pagination"> |
| | | <el-pagination popper-class="ztzf-data-cockpit-select-popper" |
| | | v-model:current-page="searchParams.current" v-model:page-size="searchParams.size" |
| | | layout="total, prev, pager, next, sizes" :total="total" @change="getList" /> |
| | | <el-pagination |
| | | popper-class="ztzf-data-cockpit-select-popper" |
| | | v-model:current-page="searchParams.current" |
| | | v-model:page-size="searchParams.size" |
| | | layout="total, prev, pager, next, sizes" |
| | | :total="total" |
| | | @change="getList" |
| | | /> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | import FormDiaLog from './FormDiaLog.vue' |
| | | import MaintenanceDiaLog from '@/views/basicManage/maintainRecord/MaintenanceDiaLog.vue' |
| | | import { fwDeviceScrapPageApi } from '@/views/basicManage/deviceStock/fwDeviceScrapApi' |
| | | import dayjs from 'dayjs' |
| | | |
| | | const initSearchParams = () => ({ |
| | | deviceName: '', // 设备名称 |
| | |
| | | provide('planCycleOptions', planCycleOptions) |
| | | |
| | | // 获取列表 |
| | | async function getList () { |
| | | async function getList() { |
| | | loading.value = true |
| | | try { |
| | | const res = await fwDeviceScrapPageApi(searchParams.value) |
| | |
| | | } |
| | | |
| | | // 查询 |
| | | function handleSearch () { |
| | | function handleSearch() { |
| | | searchParams.value.current = 1 |
| | | getList() |
| | | } |
| | | |
| | | // 重置查询 |
| | | function resetForm () { |
| | | function resetForm() { |
| | | queryParamsRef.value?.resetFields() |
| | | searchParams.value.current = 1 |
| | | getList() |
| | | } |
| | | |
| | | // 查看 |
| | | function handleView (row) { |
| | | function handleView(row) { |
| | | dialogRef.value?.open({ mode: 'view', row: { ...row } }) |
| | | } |
| | | |
| | | // 获取字典 |
| | | function getDictList () { |
| | | function getDictList() { |
| | | getDictionaryByCode('deviceType,deviceAtt').then(res => { |
| | | dictObj.value = res.data.data |
| | | }) |
| | | } |
| | | |
| | | // 获取部门树 |
| | | function getDeptTreeFun () { |
| | | function getDeptTreeFun() { |
| | | getDeptTree().then(res => { |
| | | deptTree.value = res.data.data |
| | | }) |
| | | } |
| | | |
| | | // 新增 |
| | | function handleAdd () { |
| | | function handleAdd() { |
| | | dialogRef.value?.open({ mode: 'add' }) |
| | | } |
| | | |
| | | function getPlanCycleLabel (row) { |
| | | function getPlanCycleLabel(row) { |
| | | const item = planCycleOptions.find(option => option.value === row.planCycleType) |
| | | return item?.label + '-' + row.planCycleValue.join(',') |
| | | } |