Commit 41848f8d authored by 15008242619's avatar 15008242619

工作包页面优化

parent 11e3922f
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
> >
<el-option v-for="(item, i) in wpOptions" :key="i" :label="item.name" :value="item.id" /> <el-option v-for="(item, i) in wpOptions" :key="i" :label="item.name" :value="item.id" />
</el-select> </el-select>
<span v-else>{{ $utils.getParamsFromLists(wpOptions, 'id', scope.row[scope.column.property], 'name') }}</span> <span v-else>{{ $utils.getParamsFromLists(wpDictionary, 'id', scope.row[scope.column.property], 'name') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -305,8 +305,10 @@ export default { ...@@ -305,8 +305,10 @@ export default {
total: 0, total: 0,
pageSizes: [5, 10, 20, 50] pageSizes: [5, 10, 20, 50]
}, },
// 工作包数据 // 工作包数据(有效)
wpOptions: [], wpOptions: [],
// 工作包数据字典(包含有效和无效)
wpDictionary: [],
// 加载中 // 加载中
loading: false, loading: false,
curRowId: null, curRowId: null,
...@@ -375,10 +377,6 @@ export default { ...@@ -375,10 +377,6 @@ export default {
'children': [], 'children': [],
'items': [ 'items': [
{ {
'fieldName': 'workState',
'operator': 'EQ',
'value': 'Y'
}, {
'fieldName': 'sorties', 'fieldName': 'sorties',
'operator': 'EQ', 'operator': 'EQ',
'value': data.serialNo 'value': data.serialNo
...@@ -400,10 +398,16 @@ export default { ...@@ -400,10 +398,16 @@ export default {
} }
post('/ExtWorkPackage/search', params).then(res => { post('/ExtWorkPackage/search', params).then(res => {
this.wpOptions = res.items.content.map(row => { this.wpOptions = res.items.content.map(row => {
return { if (row.workState === 'Y') {
this.wpOptions.push({
name: row.name, name: row.name,
id: row.id id: row.id
})
} }
this.wpDictionary.push({
name: row.name,
id: row.id
})
}) })
}) })
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment