From ab493128b646ede67a2bfa2e16c966eb4e5f2d94 Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期四, 13 六月 2024 23:19:00 +0800
Subject: [PATCH] 传输文件
---
src/views/console/system/allocationDialog.vue | 30 +++++++++++++++++++++++++-----
1 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/src/views/console/system/allocationDialog.vue b/src/views/console/system/allocationDialog.vue
index bed3421..041fb0a 100644
--- a/src/views/console/system/allocationDialog.vue
+++ b/src/views/console/system/allocationDialog.vue
@@ -9,7 +9,7 @@
<template>
<el-dialog title="瀛楀吀鍚嶇О瀛楀吀閰嶇疆" v-model="visible" :width="1000" destroy-on-close @closed="$emit('closed')">
<div class="dict-main">
- <el-form :inline="true" :model="searchData" abel-width="120px">
+ <el-form :inline="true" :model="searchData" label-width="80px">
<el-form-item label="瀛楀吀缂栧彿">
<el-input v-model="searchData.code" placeholder="瀛楀吀缂栧彿" clearable />
</el-form-item>
@@ -70,6 +70,7 @@
emits: ['success', 'closed'],
data(){
return {
+ oldRow: {},
selection: [],
mode: "edit",
visible: false,
@@ -127,7 +128,19 @@
},
//瀛楀吀閰嶇疆
table_allocation(row) {
- this.addAllocation();
+ this.addAllocation(row,"subitem");
+ },
+ showDict() {
+ this.$HTTP.get("/api/blade-system/dict/tree?code=DICT").then(res=> {
+ if(res.code == 200) {
+ res.data.forEach(item=> {
+ if(item.id == this.addAllocationForm.parentId) {
+ this.addAllocationForm.$parentId = item.title;
+ }
+ })
+ this.parentData = res.data;
+ }
+ })
},
//鍒犻櫎
table_del(row) {
@@ -146,14 +159,19 @@
})
},
//娣诲姞
- addAllocation(){
- this.dialog.allocation = true
+ addAllocation(row,type){
+ this.dialog.allocation = true;
this.$nextTick(() => {
- this.$refs.SubitemAddDict.open('edit').setData(this.allocationTableData[0])
+ if(type == "subitem") { //娣诲姞瀛愰」
+ this.$refs.SubitemAddDict.open('edit').setData(row)
+ }else {
+ this.$refs.SubitemAddDict.open('edit').setData(this.oldRow)
+ }
})
},
table_edit(row){
this.dialog.allocation = true
+ row.mode = "edit";
this.$nextTick(() => {
this.$refs.SubitemAddDict.open('edit').setData(row)
})
@@ -161,6 +179,7 @@
//鏌ョ湅
table_show(row){
this.dialog.allocation = true
+ row.mode = "show";
this.$nextTick(() => {
this.$refs.SubitemAddDict.open('show').setData(row)
})
@@ -209,6 +228,7 @@
setData(row){
//鍙互鍜屼笂闈竴鏍峰崟涓敞鍏ワ紝涔熷彲浠ュ儚涓嬮潰涓�鏍风洿鎺ュ悎骞惰繘鍘�
this.searchData.parentId = row.id;
+ this.oldRow = row;
this.searchBtn();
},
//鏄剧ず
--
Gitblit v1.9.3