修改字典展示

This commit is contained in:
liuhanqing
2025-08-11 16:50:52 +08:00
parent 27b5d68d08
commit b2c916b806
4 changed files with 8 additions and 16 deletions

View File

@@ -82,7 +82,7 @@ public class KpiController extends BaseController {
* @return 货位分析数据 * @return 货位分析数据
*/ */
@GetMapping("/spaceAnalysis") @GetMapping("/spaceAnalysis")
public AjaxResult getSpaceAnalysis(@RequestParam("warehouseId") String warehouseId) { public AjaxResult getSpaceAnalysis(@RequestParam(value = "warehouseId",required = false) String warehouseId) {
return success(kpiService.getSpaceAnalysis(warehouseId)); return success(kpiService.getSpaceAnalysis(warehouseId));
} }

View File

@@ -37,7 +37,7 @@ function install() {
...item, ...item,
dictLabel: i18n.t(item.dictLabel) || item.dictLabel dictLabel: i18n.t(item.dictLabel) || item.dictLabel
})) }))
//console.log(translatedData) console.log(translatedData)
store.dispatch('dict/setDict', { key: dictMeta.type, value: translatedData }) store.dispatch('dict/setDict', { key: dictMeta.type, value: translatedData })
resolve(translatedData) resolve(translatedData)
}).catch(error => { }).catch(error => {

View File

@@ -40,10 +40,10 @@
@change="handleQuery" @change="handleQuery"
> >
<el-option <el-option
v-for="dict in statusOptions" v-for="dict in dict.type.receive_bill_status"
:key="dict.dictValue" :key="dict.value"
:label="dict.dictLabel" :label="dict.label"
:value="dict.dictValue" :value="dict.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@@ -282,8 +282,6 @@ export default {
return { return {
// 仓库选项列表 // 仓库选项列表
warehouseOptions: [], warehouseOptions: [],
// 单据状态字典
statusOptions: [],
// 遮罩层 // 遮罩层
loading: true, loading: true,
detailLoading: true, detailLoading: true,
@@ -520,12 +518,6 @@ export default {
this.getList() this.getList()
}) })
}, },
/** 获取字典数据 */
getDictList() {
getDicts("receive_bill_status").then(response => {
this.statusOptions = response.data;
});
},
/** 获取仓库列表 */ /** 获取仓库列表 */
getWarehouseList() { getWarehouseList() {
listWarehouse(this.queryWarehouseParams).then(response => { listWarehouse(this.queryWarehouseParams).then(response => {

View File

@@ -107,8 +107,8 @@
<!-- 字典标签 --> <!-- 字典标签 -->
<el-table-column :label="$t('systemManagement_DictManagement.dictLabel')" align="center" prop="dictLabel"> <el-table-column :label="$t('systemManagement_DictManagement.dictLabel')" align="center" prop="dictLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="(scope.row.listClass == '' || scope.row.listClass == 'default') && (scope.row.cssClass == '' || scope.row.cssClass == null)">{{ scope.row.dictLabel }}</span> <span v-if="(scope.row.listClass == '' || scope.row.listClass == 'default') && (scope.row.cssClass == '' || scope.row.cssClass == null)">{{ $t(scope.row.dictLabel) }}</span>
<el-tag v-else :type="scope.row.listClass == 'primary' ? '' : scope.row.listClass" :class="scope.row.cssClass">{{ scope.row.dictLabel }}</el-tag> <el-tag v-else :type="scope.row.listClass == 'primary' ? '' : scope.row.listClass" :class="scope.row.cssClass">{{ $t(scope.row.dictLabel) }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- 字典键值 --> <!-- 字典键值 -->