From 05fb7af4f0316fdae54f52076509e582ca5e1e4c Mon Sep 17 00:00:00 2001
From: qq_41295110 <qq_41295110@noreply.gitcode.com>
Date: 星期四, 04 十二月 2025 11:01:49 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-VUEUI
---
src/views/system/user/Xt_UserGroupEdit.vue | 58 +++++++++++++++++++++++++++++++++++++++-------------------
1 files changed, 39 insertions(+), 19 deletions(-)
diff --git a/src/views/system/user/Xt_UserGroupEdit.vue b/src/views/system/user/Xt_UserGroupEdit.vue
index a970543..c762ae4 100644
--- a/src/views/system/user/Xt_UserGroupEdit.vue
+++ b/src/views/system/user/Xt_UserGroupEdit.vue
@@ -6,7 +6,7 @@
<!-- <el-button @click="cancel">鍙� 娑�</el-button> -->
</div>
<div style="margin: 10px; font-size: 28px; font-weight: bold; text-align: center;">鏂板/缂栬緫鐢ㄦ埛淇℃伅</div>
- <el-form ref="form" :model="form" :rules="rules" label-width="128px">
+ <el-form ref="form" :model="form" label-width="128px">
<el-tabs v-model="activeName" type="card">
<el-tab-pane label="鍩烘湰淇℃伅" name="first">
<el-row>
@@ -74,7 +74,7 @@
components: {},
props: {
OperationType: { type: Number, },
- linterid: {},
+ linterid: {type: Number},
},
data() {
return {
@@ -97,20 +97,25 @@
};
},
created() {
+
this.getdata()
},
methods: {
//#region 椤甸潰鍒濆鍖�
getdata() {
- this.formShow = false
- this.formLoading = true
- this.getUserGroup()
- if ((this.OperationType == 1 && this.copyType != 1) || (!this.OperationType && !this.copyType)) {
- this.handleAdd()
- } else if (this.OperationType == 3 || this.copyType == 1) {
- this.$nextTick(() => {
- this.handleUpdate()
- })
+ try {
+ this.formShow = false
+ this.formLoading = true
+ this.getUserGroup()
+ if ((this.OperationType == 1 && this.copyType != 1) || (!this.OperationType && !this.copyType)) {
+ this.handleAdd()
+ } else if (this.OperationType == 3 || this.copyType == 1) {
+ this.$nextTick(() => {
+ this.handleUpdate()
+ })
+ }
+ } catch (err) {
+ console.error('Error ', err)
}
},
@@ -179,12 +184,20 @@
handleUpdate() {
this.reset()
let rowHmainid = this.linterid
- axios.get(this.baseURL + "/Xt_User/EditUser", {
- params: { 'HID': rowHmainid }
+ let sWhere = " and HGroupID=" + rowHmainid ;
+ console.log("缂栬緫鐢ㄦ埛ID",rowHmainid)
+ ///Xt_User/EditUser
+ axios.get(this.baseURL + "Xt_UserGroup/list", {
+ params: { 'sWhere': sWhere }
}).then(response => {
if (response.data.code == 1) {
var result = response.data
- var data = result.data.h_v_IF_UserList_Edit[0]
+ // var data = result.data.h_v_IF_UserList_Edit[0]
+ var data = result.data[0]
+ console.log("缂栬緫鐢ㄦ埛淇℃伅",data)
+ this.form.HLev = data.绾у埆
+ this.form.HGroupName = data.瑙掕壊
+ this.form.HUSEORGID = sessionStorage["Organization"]
this.form.Czybm = data.鐢ㄦ埛缂栫爜
this.form.Czymc = data.鐢ㄦ埛鍚嶇О
this.form.Czmm = data.瀵嗙爜
@@ -216,7 +229,7 @@
this.form.HCusID = data.HCusID
this.form.HCusName = data.瀹㈡埛
this.form.HGroupID = data.HGroupID
- this.form.HGroupName = data.鐝粍
+ // this.form.HGroupName = data.鐝粍
this.form.HSourceID = data.HSourceID
this.form.HSourceName = data.鐢熶骇璧勬簮
this.form.HCheckEmpID = data.HCheckEmpID
@@ -238,16 +251,22 @@
//#endregion
//#region 鑾峰彇瀛愯〃鏁版嵁
- getUserGroup() {
+ async getUserGroup() {
//瑙掕壊鍒楄〃
- axios.get(this.baseURL + '/Xt_UserGroup/list', {
+ axios.get(this.baseURL + '/Xt_User/list', {
params: {
sWhere: '',
+ user: sessionStorage["HUserName"],
},
}).then(response => {
let data1 = response.data
if (data1.code == 1) {
+ console.log(data1)
this.editData = data1.data
+ this.form.Czybm = data1.data.鐢ㄦ埛缂栫爜
+ console.log("zhiwei",this.editData)
+ console.log("鐢ㄦ埛",this.form.Czybm)
+ //this.get_DisplayUserGroupInfoList()
}
}).catch(error => {
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
@@ -256,14 +275,15 @@
//#endregion
- get_DisplayUserGroupInfoList() {
- var sWhere = "and UserId='" + this.linterid + "'";
+ async get_DisplayUserGroupInfoList() {
+ var sWhere = "and GroupId='" + this.linterid + "'";
axios.get(this.baseURL + '/Xt_UserGroup/UserGroupInfoList', {
params: {
sWhere: sWhere,
},
}).then(response => {
let data1 = response.data
+ console.log(data1)
if (data1.count == 1) {
if (data1.data.length > 0)
if (this.editData.length > 0) {
--
Gitblit v1.9.1