移除产线和工厂区域状态字段
Some checks failed
Release pipeline / publish (push) Has been cancelled
Release pipeline / Always run job (push) Has been cancelled

This commit is contained in:
sheng
2026-06-24 16:12:56 +08:00
parent a383b1b01e
commit 9fd6aee93f
4 changed files with 10 additions and 74 deletions

View File

@@ -38,18 +38,6 @@
/>
</el-select>
</el-form-item>
<el-form-item :label="$t(key('status'))">
<el-select
v-model="search.status"
:placeholder="$t(key('select_status'))"
clearable
style="width:140px"
@change="onSearch"
>
<el-option value="1" :label="$t(key('enabled'))" />
<el-option value="0" :label="$t(key('disabled'))" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="onSearch">
{{ $t(key('search')) }}
@@ -76,10 +64,6 @@
@page-change="onPageChange"
@selection-change="onSelect"
>
<template #col-status="{ row }">
<span v-if="String(row.status) === '1'" class="status-on"><i class="el-icon-circle-check" /> {{ $t(key('enabled')) }}</span>
<span v-else class="status-off"><i class="el-icon-circle-close" /> {{ $t(key('disabled')) }}</span>
</template>
</page-table>
<page-dialog-form
@@ -129,14 +113,10 @@ export default {
dialogTitle: '',
editId: '',
handleType: 'create',
search: { code: '', name: '', area_id: '', status: '' },
search: { code: '', name: '', area_id: '' },
pagination: { current: 1, size: 10, total: 0 },
areaOptions: [],
statusOptions: [
{ value: '1', label: this.$t(this.key('enabled')) },
{ value: '0', label: this.$t(this.key('disabled')) }
],
formData: { code: '', name: '', area_id: '', status: '1', remark: '' },
formData: { code: '', name: '', area_id: '', remark: '' },
rules: {
code: [
{ required: true, message: this.key('enter_code'), trigger: 'blur' },
@@ -149,9 +129,6 @@ export default {
area_id: [
{ required: true, message: this.key('select_area'), trigger: 'change' }
],
status: [
{ required: true, message: this.key('select_status'), trigger: 'change' }
],
remark: [
{ max: 500, message: this.key('remark_max_500'), trigger: 'blur' }
]
@@ -163,7 +140,6 @@ export default {
[{ type: 'input', prop: 'code', label: this.key('code'), placeholder: this.key('enter_code'), clearable: true, style: { width: '90%' } }],
[{ type: 'input', prop: 'name', label: this.key('name'), placeholder: this.key('enter_name'), clearable: true, style: { width: '90%' } }],
[{ type: 'select', prop: 'area_id', label: this.key('area'), placeholder: this.key('select_area'), clearable: true, filterable: true, style: { width: '90%' }, options: [] }],
[{ type: 'select', prop: 'status', label: this.key('status'), placeholder: this.key('select_status'), clearable: false, style: { width: '90%' }, options: [] }],
[{ type: 'input', prop: 'remark', inputType: 'textarea', autosize: { minRows: 2, maxRows: 6 }, label: this.key('remark'), placeholder: this.key('enter_remark'), clearable: true, style: { width: '90%' } }]
]
}
@@ -172,7 +148,6 @@ export default {
dialogFormCols () {
const cols = JSON.parse(JSON.stringify(this.baseFormCols))
cols[2][0].options = this.areaOptions
cols[3][0].options = this.statusOptions
return cols
}
},
@@ -183,7 +158,6 @@ export default {
{ prop: 'code', label: this.key('code'), minWidth: 120 },
{ prop: 'name', label: this.key('name'), minWidth: 120 },
{ prop: 'area_name', label: this.key('area_name'), minWidth: 120 },
{ prop: 'status', label: this.key('status'), slot: 'status', width: 110 },
{ prop: 'remark', label: this.key('remark') },
{ prop: '_actions', label: this.key('operation'), width: 160, fixed: 'right' }
])
@@ -233,7 +207,7 @@ export default {
this.fetchData()
},
onReset () {
this.search = { code: '', name: '', area_id: '', status: '' }
this.search = { code: '', name: '', area_id: '' }
this.pagination.current = 1
this.fetchData()
},
@@ -246,7 +220,7 @@ export default {
this.selectedRows = rows
},
resetForm () {
this.formData = { code: '', name: '', area_id: '', status: '1', remark: '' }
this.formData = { code: '', name: '', area_id: '', remark: '' }
this.editId = ''
},
openAdd () {
@@ -262,7 +236,7 @@ export default {
this.handleType = 'edit'
this.dialogTitle = this.key('edit_title')
this.editId = row.id
this.formData = { code: row.code, name: row.name, area_id: row.area_id, status: row.status !== undefined ? String(row.status) : '1', remark: row.remark || '' }
this.formData = { code: row.code, name: row.name, area_id: row.area_id, remark: row.remark || '' }
this.dialogVisible = true
},
async onDialogSubmit () {
@@ -306,7 +280,5 @@ export default {
<style scoped>
.search-bar { padding: 10px 0; }
.status-on { color: #67C23A; }
.status-off { color: #909399; }
/deep/ .el-form-item--mini.el-form-item { margin-bottom: 4px; }
</style>