From f82511343cf2c8ecf3981954e7eb92172d72a905 Mon Sep 17 00:00:00 2001 From: Huangxiaoqiang-03 <1247017146@qq.com> Date: 星期二, 05 十一月 2024 17:26:08 +0800 Subject: [PATCH] 1 --- 代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/extend/GetLocationStatus.vue | 50 ++++++++++++++++++++++++++------------------------ 1 files changed, 26 insertions(+), 24 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/GetLocationStatus.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/GetLocationStatus.vue" index 9dab816..84c031e 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/GetLocationStatus.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/GetLocationStatus.vue" @@ -9,10 +9,18 @@ <el-table-column label="搴忓彿" type="index" fixed="left" width="55" align="center"></el-table-column> <el-table-column v-for="(item, index) in tableColumns.filter((x) => !x.hidden)" :key="index" :prop="item.field" :label="item.title" :width="item.width" align="center"> - <template #default="scoped" v-if="item.type == 'icon'"> - <el-tooltip class="item" effect="dark" :content="item.title" placement="bottom"><el-button - type="text" @click="tableButtonClick(scoped.row, item)"><i :class="item.icon" - style="font-size: 22px"></i></el-button></el-tooltip> + <template #default="scoped"> + <div v-if="item.type == 'icon'"> + <el-tooltip class="item" effect="dark" :content="item.title" + placement="bottom"><el-button type="text" + @click="tableButtonClick(scoped.row, item)"><i :class="item.icon" + style="font-size: 22px"></i></el-button></el-tooltip> + </div> + <div v-else-if="item.type == 'tag'"> + <el-tag size="small"> + {{ getDictionary(scoped.row, item) }} + </el-tag> + </div> </template> </el-table-column> </el-table> @@ -28,7 +36,7 @@ data() { return { showDetialBox: false, - row: {}, + row: null, tableData: [], tableColumns: [ { @@ -48,7 +56,7 @@ { field: "beforeStatus", title: "鍙樺姩鍓嶈揣浣嶇姸鎬�", - type: "string", + type: "tag", width: 150, align: "left", bindKey: "locationStatusEnum" @@ -56,7 +64,7 @@ { field: "afterStatus", title: "鍙樺姩鍚庤揣浣嶇姸鎬�", - type: "decimal", + type: "tag", width: 150, align: "left", bindKey: "locationStatusEnum" @@ -64,8 +72,8 @@ { field: "changeType", title: "鍙樺姩绫诲瀷", - type: "string", - width: 90, + type: "tag", + width: 100, align: "left", bindKey: "stockChangeType", }, @@ -81,7 +89,7 @@ field: "orderNo", title: "鍗曟嵁缂栧彿", type: "int", - width: 120, + width: 160, align: "left", }, { @@ -138,6 +146,7 @@ hidden: true, }, ], + dictionaryList: null, }; }, methods: { @@ -145,7 +154,7 @@ this.row = row; this.showDetialBox = true; this.getDetailData(); - getDictionaryData(); + this.getDictionaryData(); }, getDetailData() { this.http @@ -157,7 +166,6 @@ .then((x) => { if (!x.status) return this.$message.error(x.message); this.tableData = x.data; - console.log(this.tableData); }); }, getDictionaryData() { @@ -182,25 +190,19 @@ if (this.dictionaryList) { var item = this.dictionaryList.find((x) => x.dicNo == column.bindKey); if (item) { - var dicItem = item.data.find((x) => x.key == row[column.prop]); + var dicItem = item.data.find((x) => x.key == row[column.field]); + console.log(dicItem); if (dicItem) { return dicItem.value; - } else { - return row[column.prop]; + } + else { + return row[column.field]; } } else { - return row[column.prop]; + return row[column.field]; } } }, - tableRowClassName({ row, rowIndex }) { - if (row.isNormal) { - - } else if (row.isManual) { - return "success-row"; - } - - }, }, -- Gitblit v1.9.3