移除产线和工厂区域状态字段
This commit is contained in:
@@ -47,10 +47,6 @@
|
|||||||
"please_enter": "Please enter {name}",
|
"please_enter": "Please enter {name}",
|
||||||
"parent_area": "Parent Area",
|
"parent_area": "Parent Area",
|
||||||
"select_parent_area": "Please select parent area",
|
"select_parent_area": "Please select parent area",
|
||||||
"status": "Status",
|
|
||||||
"select_status": "Please select status",
|
|
||||||
"enabled": "Enabled",
|
|
||||||
"disabled": "Disabled",
|
|
||||||
"add_child": "Add Subarea",
|
"add_child": "Add Subarea",
|
||||||
"add_child_title": "Add Subarea",
|
"add_child_title": "Add Subarea",
|
||||||
"export": "Export",
|
"export": "Export",
|
||||||
@@ -85,10 +81,6 @@
|
|||||||
"tip": "Tip",
|
"tip": "Tip",
|
||||||
"confirm_delete": "Are you sure to delete?",
|
"confirm_delete": "Are you sure to delete?",
|
||||||
"validation_fail": "Validation failed",
|
"validation_fail": "Validation failed",
|
||||||
"status": "Status",
|
|
||||||
"select_status": "Please select status",
|
|
||||||
"enabled": "Enabled",
|
|
||||||
"disabled": "Disabled",
|
|
||||||
"export": "Export",
|
"export": "Export",
|
||||||
"confirm_export": "Create export task?",
|
"confirm_export": "Create export task?",
|
||||||
"length_1_100": "Length should be 1 to 100 characters",
|
"length_1_100": "Length should be 1 to 100 characters",
|
||||||
|
|||||||
@@ -47,10 +47,6 @@
|
|||||||
"please_enter": "请输入{name}",
|
"please_enter": "请输入{name}",
|
||||||
"parent_area": "上级区域",
|
"parent_area": "上级区域",
|
||||||
"select_parent_area": "请选择上级区域",
|
"select_parent_area": "请选择上级区域",
|
||||||
"status": "状态",
|
|
||||||
"select_status": "请选择状态",
|
|
||||||
"enabled": "启用",
|
|
||||||
"disabled": "禁用",
|
|
||||||
"add_child": "新增子区域",
|
"add_child": "新增子区域",
|
||||||
"add_child_title": "新增子区域",
|
"add_child_title": "新增子区域",
|
||||||
"export": "导出",
|
"export": "导出",
|
||||||
@@ -85,10 +81,6 @@
|
|||||||
"tip": "提示",
|
"tip": "提示",
|
||||||
"confirm_delete": "确定要执行该操作吗?",
|
"confirm_delete": "确定要执行该操作吗?",
|
||||||
"validation_fail": "校验失败",
|
"validation_fail": "校验失败",
|
||||||
"status": "状态",
|
|
||||||
"select_status": "请选择状态",
|
|
||||||
"enabled": "启用",
|
|
||||||
"disabled": "禁用",
|
|
||||||
"export": "导出",
|
"export": "导出",
|
||||||
"confirm_export": "确认创建导出任务?",
|
"confirm_export": "确认创建导出任务?",
|
||||||
"length_1_100": "长度在 1 到 100 个字符",
|
"length_1_100": "长度在 1 到 100 个字符",
|
||||||
|
|||||||
@@ -9,12 +9,6 @@
|
|||||||
<el-form-item :label="$t(key('name'))">
|
<el-form-item :label="$t(key('name'))">
|
||||||
<el-input v-model="search.name" :placeholder="$t(key('enter_name'))" clearable style="width:200px" @keyup.enter.native="onSearch" />
|
<el-input v-model="search.name" :placeholder="$t(key('enter_name'))" clearable style="width:200px" @keyup.enter.native="onSearch" />
|
||||||
</el-form-item>
|
</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-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">{{ $t(key('search')) }}</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="onSearch">{{ $t(key('search')) }}</el-button>
|
||||||
<el-button icon="el-icon-refresh" @click="onReset">{{ $t(key('reset')) }}</el-button>
|
<el-button icon="el-icon-refresh" @click="onReset">{{ $t(key('reset')) }}</el-button>
|
||||||
@@ -38,10 +32,6 @@
|
|||||||
auto-height
|
auto-height
|
||||||
@selection-change="onSelect"
|
@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-table>
|
||||||
|
|
||||||
<page-dialog-form
|
<page-dialog-form
|
||||||
@@ -91,13 +81,9 @@ export default {
|
|||||||
dialogTitle: '',
|
dialogTitle: '',
|
||||||
editId: '',
|
editId: '',
|
||||||
handleType: 'create',
|
handleType: 'create',
|
||||||
search: { code: '', name: '', status: '' },
|
search: { code: '', name: '' },
|
||||||
tableAttrs: { defaultExpandAll: true, treeProps: { children: 'children', hasChildren: 'hasChildren' } },
|
tableAttrs: { defaultExpandAll: true, treeProps: { children: 'children', hasChildren: 'hasChildren' } },
|
||||||
statusOptions: [
|
formData: { code: '', name: '', parent_id: '', remark: '' },
|
||||||
{ value: '1', label: this.$t(this.key('enabled')) },
|
|
||||||
{ value: '0', label: this.$t(this.key('disabled')) }
|
|
||||||
],
|
|
||||||
formData: { code: '', name: '', parent_id: '', status: '1', remark: '' },
|
|
||||||
rules: {
|
rules: {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: this.key('enter_code'), trigger: 'blur' },
|
{ required: true, message: this.key('enter_code'), trigger: 'blur' },
|
||||||
@@ -107,7 +93,6 @@ export default {
|
|||||||
{ required: true, message: this.key('enter_name'), trigger: 'blur' },
|
{ required: true, message: this.key('enter_name'), trigger: 'blur' },
|
||||||
{ min: 1, max: 100, message: this.key('length_1_100'), trigger: 'blur' }
|
{ min: 1, max: 100, message: this.key('length_1_100'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
status: [{ required: true, message: this.key('select_status'), trigger: 'change' }],
|
|
||||||
remark: [{ max: 500, message: this.key('remark_max_500'), trigger: 'blur' }]
|
remark: [{ max: 500, message: this.key('remark_max_500'), trigger: 'blur' }]
|
||||||
},
|
},
|
||||||
columns: [],
|
columns: [],
|
||||||
@@ -117,7 +102,6 @@ export default {
|
|||||||
[{ type: 'input', prop: 'code', label: this.key('code'), placeholder: this.key('enter_code'), clearable: true, style: { width: '90%' } }],
|
[{ 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: 'input', prop: 'name', label: this.key('name'), placeholder: this.key('enter_name'), clearable: true, style: { width: '90%' } }],
|
||||||
[{ type: 'select', prop: 'parent_id', label: this.key('parent_area'), placeholder: this.key('select_parent_area'), clearable: true, filterable: true, style: { width: '90%' }, options: [] }],
|
[{ type: 'select', prop: 'parent_id', label: this.key('parent_area'), placeholder: this.key('select_parent_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('remark_required'), clearable: true, style: { width: '90%' } }]
|
[{ type: 'input', prop: 'remark', inputType: 'textarea', autosize: { minRows: 2, maxRows: 6 }, label: this.key('remark'), placeholder: this.key('remark_required'), clearable: true, style: { width: '90%' } }]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -126,7 +110,6 @@ export default {
|
|||||||
dialogFormCols () {
|
dialogFormCols () {
|
||||||
const cols = JSON.parse(JSON.stringify(this.baseFormCols))
|
const cols = JSON.parse(JSON.stringify(this.baseFormCols))
|
||||||
cols[2][0].options = this.parentAreaOptions
|
cols[2][0].options = this.parentAreaOptions
|
||||||
cols[3][0].options = this.statusOptions
|
|
||||||
return cols
|
return cols
|
||||||
},
|
},
|
||||||
parentAreaOptions () {
|
parentAreaOptions () {
|
||||||
@@ -141,7 +124,6 @@ export default {
|
|||||||
{ prop: 'sort', label: this.key('sort'), width: 80 },
|
{ prop: 'sort', label: this.key('sort'), width: 80 },
|
||||||
{ prop: 'code', label: this.key('code'), minWidth: 140 },
|
{ prop: 'code', label: this.key('code'), minWidth: 140 },
|
||||||
{ prop: 'name', label: this.key('name'), minWidth: 160 },
|
{ prop: 'name', label: this.key('name'), minWidth: 160 },
|
||||||
{ prop: 'status', label: this.key('status'), slot: 'status', width: 110 },
|
|
||||||
{ prop: 'remark', label: this.key('remark') },
|
{ prop: 'remark', label: this.key('remark') },
|
||||||
{ prop: '_actions', label: this.key('operation'), width: 230, fixed: 'right' }
|
{ prop: '_actions', label: this.key('operation'), width: 230, fixed: 'right' }
|
||||||
])
|
])
|
||||||
@@ -236,14 +218,14 @@ export default {
|
|||||||
this.fetchData()
|
this.fetchData()
|
||||||
},
|
},
|
||||||
onReset () {
|
onReset () {
|
||||||
this.search = { code: '', name: '', status: '' }
|
this.search = { code: '', name: '' }
|
||||||
this.fetchData()
|
this.fetchData()
|
||||||
},
|
},
|
||||||
onSelect (rows) {
|
onSelect (rows) {
|
||||||
this.selectedRows = rows
|
this.selectedRows = rows
|
||||||
},
|
},
|
||||||
resetForm () {
|
resetForm () {
|
||||||
this.formData = { code: '', name: '', parent_id: '', status: '1', remark: '' }
|
this.formData = { code: '', name: '', parent_id: '', remark: '' }
|
||||||
this.editId = ''
|
this.editId = ''
|
||||||
},
|
},
|
||||||
openAdd () {
|
openAdd () {
|
||||||
@@ -269,7 +251,7 @@ export default {
|
|||||||
this.handleType = 'edit'
|
this.handleType = 'edit'
|
||||||
this.dialogTitle = this.key('edit_title')
|
this.dialogTitle = this.key('edit_title')
|
||||||
this.editId = this.getId(row)
|
this.editId = this.getId(row)
|
||||||
this.formData = { code: row.code, name: row.name, parent_id: this.getParentId(row), status: row.status !== undefined ? String(row.status) : '1', remark: row.remark || '' }
|
this.formData = { code: row.code, name: row.name, parent_id: this.getParentId(row), remark: row.remark || '' }
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
},
|
},
|
||||||
validateHierarchy () {
|
validateHierarchy () {
|
||||||
@@ -322,7 +304,5 @@ export default {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.search-bar { padding: 10px 0; }
|
.search-bar { padding: 10px 0; }
|
||||||
.status-on { color: #67C23A; }
|
|
||||||
.status-off { color: #909399; }
|
|
||||||
/deep/ .el-form-item--mini.el-form-item { margin-bottom: 4px; }
|
/deep/ .el-form-item--mini.el-form-item { margin-bottom: 4px; }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -38,18 +38,6 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</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-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||||
{{ $t(key('search')) }}
|
{{ $t(key('search')) }}
|
||||||
@@ -76,10 +64,6 @@
|
|||||||
@page-change="onPageChange"
|
@page-change="onPageChange"
|
||||||
@selection-change="onSelect"
|
@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-table>
|
||||||
|
|
||||||
<page-dialog-form
|
<page-dialog-form
|
||||||
@@ -129,14 +113,10 @@ export default {
|
|||||||
dialogTitle: '',
|
dialogTitle: '',
|
||||||
editId: '',
|
editId: '',
|
||||||
handleType: 'create',
|
handleType: 'create',
|
||||||
search: { code: '', name: '', area_id: '', status: '' },
|
search: { code: '', name: '', area_id: '' },
|
||||||
pagination: { current: 1, size: 10, total: 0 },
|
pagination: { current: 1, size: 10, total: 0 },
|
||||||
areaOptions: [],
|
areaOptions: [],
|
||||||
statusOptions: [
|
formData: { code: '', name: '', area_id: '', remark: '' },
|
||||||
{ value: '1', label: this.$t(this.key('enabled')) },
|
|
||||||
{ value: '0', label: this.$t(this.key('disabled')) }
|
|
||||||
],
|
|
||||||
formData: { code: '', name: '', area_id: '', status: '1', remark: '' },
|
|
||||||
rules: {
|
rules: {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: this.key('enter_code'), trigger: 'blur' },
|
{ required: true, message: this.key('enter_code'), trigger: 'blur' },
|
||||||
@@ -149,9 +129,6 @@ export default {
|
|||||||
area_id: [
|
area_id: [
|
||||||
{ required: true, message: this.key('select_area'), trigger: 'change' }
|
{ required: true, message: this.key('select_area'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
status: [
|
|
||||||
{ required: true, message: this.key('select_status'), trigger: 'change' }
|
|
||||||
],
|
|
||||||
remark: [
|
remark: [
|
||||||
{ max: 500, message: this.key('remark_max_500'), trigger: 'blur' }
|
{ 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: '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: '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: '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%' } }]
|
[{ 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 () {
|
dialogFormCols () {
|
||||||
const cols = JSON.parse(JSON.stringify(this.baseFormCols))
|
const cols = JSON.parse(JSON.stringify(this.baseFormCols))
|
||||||
cols[2][0].options = this.areaOptions
|
cols[2][0].options = this.areaOptions
|
||||||
cols[3][0].options = this.statusOptions
|
|
||||||
return cols
|
return cols
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -183,7 +158,6 @@ export default {
|
|||||||
{ prop: 'code', label: this.key('code'), minWidth: 120 },
|
{ prop: 'code', label: this.key('code'), minWidth: 120 },
|
||||||
{ prop: 'name', label: this.key('name'), minWidth: 120 },
|
{ prop: 'name', label: this.key('name'), minWidth: 120 },
|
||||||
{ prop: 'area_name', label: this.key('area_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: 'remark', label: this.key('remark') },
|
||||||
{ prop: '_actions', label: this.key('operation'), width: 160, fixed: 'right' }
|
{ prop: '_actions', label: this.key('operation'), width: 160, fixed: 'right' }
|
||||||
])
|
])
|
||||||
@@ -233,7 +207,7 @@ export default {
|
|||||||
this.fetchData()
|
this.fetchData()
|
||||||
},
|
},
|
||||||
onReset () {
|
onReset () {
|
||||||
this.search = { code: '', name: '', area_id: '', status: '' }
|
this.search = { code: '', name: '', area_id: '' }
|
||||||
this.pagination.current = 1
|
this.pagination.current = 1
|
||||||
this.fetchData()
|
this.fetchData()
|
||||||
},
|
},
|
||||||
@@ -246,7 +220,7 @@ export default {
|
|||||||
this.selectedRows = rows
|
this.selectedRows = rows
|
||||||
},
|
},
|
||||||
resetForm () {
|
resetForm () {
|
||||||
this.formData = { code: '', name: '', area_id: '', status: '1', remark: '' }
|
this.formData = { code: '', name: '', area_id: '', remark: '' }
|
||||||
this.editId = ''
|
this.editId = ''
|
||||||
},
|
},
|
||||||
openAdd () {
|
openAdd () {
|
||||||
@@ -262,7 +236,7 @@ export default {
|
|||||||
this.handleType = 'edit'
|
this.handleType = 'edit'
|
||||||
this.dialogTitle = this.key('edit_title')
|
this.dialogTitle = this.key('edit_title')
|
||||||
this.editId = row.id
|
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
|
this.dialogVisible = true
|
||||||
},
|
},
|
||||||
async onDialogSubmit () {
|
async onDialogSubmit () {
|
||||||
@@ -306,7 +280,5 @@ export default {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.search-bar { padding: 10px 0; }
|
.search-bar { padding: 10px 0; }
|
||||||
.status-on { color: #67C23A; }
|
|
||||||
.status-off { color: #909399; }
|
|
||||||
/deep/ .el-form-item--mini.el-form-item { margin-bottom: 4px; }
|
/deep/ .el-form-item--mini.el-form-item { margin-bottom: 4px; }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user