From dcc4992bd51e9ee4a97099cd3a15085f7e247f23 Mon Sep 17 00:00:00 2001 From: gaoshp <291585735@qq.com> Date: 星期日, 03 十一月 2024 20:21:41 +0800 Subject: [PATCH] update --- src/views/console/basic-data/material-warehousing-data/material-storage.vue | 40 ++++++++++++++++++++++++++-------------- 1 files changed, 26 insertions(+), 14 deletions(-) diff --git a/src/views/console/basic-data/material-warehousing-data/material-storage.vue b/src/views/console/basic-data/material-warehousing-data/material-storage.vue index c3212dc..c75a534 100644 --- a/src/views/console/basic-data/material-warehousing-data/material-storage.vue +++ b/src/views/console/basic-data/material-warehousing-data/material-storage.vue @@ -1,7 +1,7 @@ <!-- * @Date: 2024-05-07 22:46:30 * @LastEditors: Sneed - * @LastEditTime: 2024-05-10 22:46:32 + * @LastEditTime: 2024-06-16 16:17:13 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/console/basic-data/material-warehousing-data/material-storage.vue --> <template> @@ -14,8 +14,15 @@ <el-main> <el-container> <el-aside width="200px" v-loading="showGrouploading"> - <el-tree default-expand-all ref="group" node-key="id" :data="treeData" :props="props" - @node-click="nodeClick"></el-tree> + <el-tree :expand-on-click-node="false" default-expand-all ref="group" node-key="id" + :data="treeData" :props="props" @node-click="nodeClick"> + <template #default="{ node, data }"> + <span class="custom-tree-node"> + <span :class="data.isArea ? 'treedisabled' : ''">{{ + node.label }}</span> + </span> + </template> + </el-tree> </el-aside> <el-container> <el-main v-if="selectNode?.id"> @@ -122,10 +129,11 @@ }, props: { - label: 'name' + label: 'name', + disabled: 'isArea' }, - exportUrl: '/api/blade-cps/material-storage/excel/template', - uploadUrl: '/api/blade-cps/material-storage/excel/import', + exportUrl: '/api/smis/material-storage/excel/template', + uploadUrl: '/api/smis/material-storage/excel/import', treeData: [], selectNode: {}, apiObj: { @@ -134,7 +142,7 @@ ...data, wareId: this.selectNode.id } - return await this.$HTTP.post(`/api/blade-cps/material-storage/page`, {}, { params }).then(res => { + return await this.$HTTP.post(`/api/smis/material-storage/page`, {}, { params }).then(res => { return res }) } @@ -152,10 +160,10 @@ }, methods: { init() { - this.$HTTP.get(`/api/blade-cps/tray-storage/tree`).then(res => { + this.$HTTP.get(`/api/smis/tray-storage/tree`).then(res => { this.treeData = res.data }) - this.$HTTP.get(`/api/blade-cps/material-type/list`).then(res => { + this.$HTTP.get(`/api/smis/material-type/list`).then(res => { this.options.typeId = res.data.map(item => ({ label: item.name, value: item.id @@ -173,12 +181,12 @@ this.queryInfo(node.id) }, queryInfo(id) { - this.$HTTP.get(`/api/blade-cps/warehouse-station/get/${id}`).then(res => { + this.$HTTP.get(`/api/smis/warehouse-station/get/${id}`).then(res => { this.selectNode = res.data }) }, table_add() { - this.$HTTP.get(`/api/blade-cps/material-storage/material/not-bind`).then(res => { + this.$HTTP.get(`/api/smis/material-storage/material/not-bind`).then(res => { if (res.data?.length > 0) { this.todoList = res.data this.dialogVisible = true @@ -188,14 +196,14 @@ }) }, add() { - this.$HTTP.post(`/api/blade-cps/material-storage`, { warehouseStationId: this.selectNode.id, materialIds: [this.materialIds] }).then(res => { + this.$HTTP.post(`/api/smis/material-storage`, { warehouseStationId: this.selectNode.id, materialIds: [this.materialIds] }).then(res => { this.$message.success("鎿嶄綔鎴愬姛") this.dialogVisible = false this.$refs.table.reload() }) }, table_del(ids) { - this.$HTTP.delete(`/api/blade-cps/material-storage`, ids.map(v => v.id)).then(res => { + this.$HTTP.delete(`/api/smis/material-storage`, ids.map(v => v.id)).then(res => { this.$message.success("鎿嶄綔鎴愬姛") this.$refs.table.reload() }) @@ -204,4 +212,8 @@ } </script> -<style lang="scss" scoped></style> \ No newline at end of file +<style lang="scss" scoped> +.treedisabled { + color: #ccc; +} +</style> \ No newline at end of file -- Gitblit v1.9.3