| | |
| | | <el-table-column label="年份" min-width="80" prop="planYear"></el-table-column> |
| | | <el-table-column label="文件名称" min-width="120" prop="compiler"></el-table-column> |
| | | <el-table-column label="编制人" min-width="150" prop="compiler"></el-table-column> |
| | | <el-table-column label="编制时间" min-width="160" prop="datePreparation"></el-table-column> |
| | | <el-table-column label="编制时间" min-width="160" prop="datePreparation" |
| | | :formatter="formatDateCell"></el-table-column> |
| | | <el-table-column label="批准人" min-width="180" prop="audit"></el-table-column> |
| | | <el-table-column label="批准状态" min-width="180" prop="status"> |
| | | <template #default="scope"> |
| | |
| | | <el-tag v-if="scope.row.status === 0" type="danger">不批准</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="批准时间" min-width="180" prop="auditDate"></el-table-column> |
| | | <el-table-column label="批准时间" min-width="180" prop="auditDate" |
| | | :formatter="formatDateCell"></el-table-column> |
| | | <!-- 操作按钮 --> |
| | | <el-table-column align="center" fixed="right" label="操作" min-width="270"> |
| | | <template #default="scope"> |
| | |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | import { mapGetters } from "@/utils/store-compat"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | import { formatListDate } from './dateFormat' |
| | | export default { |
| | | name: "quantity-value-traceability-plan", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | | components: {}, |
| | | mixins: [draftSave], |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | |
| | | }, |
| | | // 方法集合 |
| | | methods: { |
| | | formatDateCell(row, column, cellValue) { |
| | | return formatListDate(cellValue) |
| | | }, |
| | | // 查询 |
| | | getYearTableDetailData() { |
| | | this.yearTableDetailDataLoading = true |
| | |
| | | if (res.code === 200) { |
| | | this.form = res.data |
| | | this.deviceTraceabilityManagementDetails = this.form.deviceTraceabilityManagementDetails |
| | | this.restoreTraceabilityDraft() |
| | | } |
| | | }).catch(error => { |
| | | console.error(error) |
| | | this.yearTableLoading = false |
| | | }) |
| | | } else { |
| | | this.restoreTraceabilityDraft() |
| | | } |
| | | }, |
| | | restoreTraceabilityDraft() { |
| | | if (this.operationType === 'add' || this.operationType === 'edit') { |
| | | const rid = this.operationType === 'edit' ? this.traceabilityManagementId : '' |
| | | this.draftRestore('traceabilityForm', 'form', rid, 'applicationForm') |
| | | this.draftRestore('traceabilityRows', 'deviceTraceabilityManagementDetails', rid, 'applicationForm') |
| | | } |
| | | }, |
| | | // 添加设备 |
| | |
| | | addTraceabilityManagement(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.draftClear('traceabilityForm') |
| | | this.draftClear('traceabilityRows') |
| | | this.applicationForm = false |
| | | this.getYearTableDetailData() |
| | | } |
| | |
| | | updateTraceabilityManagement(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('修改成功') |
| | | this.draftClear('traceabilityForm') |
| | | this.draftClear('traceabilityRows') |
| | | this.applicationForm = false |
| | | this.getYearTableDetailData() |
| | | } |