llj
2025-12-02 aff120c4c18ab3fe3687632c6ad0b23fe30a5bd5
角色用户清单修改
2个文件已修改
36 ■■■■■ 已修改文件
src/views/system/user/Xt_UserGroupEdit.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/user/Xt_UserGroupList.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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,11 +97,13 @@
    };
  },
  created() {
    this.getdata()
  },
  methods: {
    //#region 页面初始化
    getdata() {
      try {
      this.formShow = false
      this.formLoading = true
      this.getUserGroup()
@@ -111,6 +113,9 @@
        this.$nextTick(() => {
          this.handleUpdate()
        })
        }
      } catch (err) {
        console.error('Error ', err)
      }
    },
@@ -179,6 +184,7 @@
    handleUpdate() {
      this.reset()
      let rowHmainid = this.linterid
      console.log("编辑用户ID",rowHmainid)
      axios.get(this.baseURL + "/Xt_User/EditUser", {
        params: { 'HID': rowHmainid }
      }).then(response => {
@@ -238,16 +244,20 @@
    //#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
          console.log("zhiwei",this.editData)
          //this.get_DisplayUserGroupInfoList()
        }
      }).catch(error => {
        this.$modal.msgError("接口请求失败!");
@@ -256,14 +266,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) {
src/views/system/user/Xt_UserGroupList.vue
@@ -148,11 +148,11 @@
      </el-dialog>
      <!-- 编辑 -->
      <el-dialog title="编辑" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox" @close="close">
        <edit :OperationType=OperationType :linterid="this.rowForm.hmainid" @editClose="editClose" v-if="editShow" />
        <edit :OperationType="OperationType" :linterid="this.rowForm.HGroupID" @editClose="editClose" v-if="editShow" />
      </el-dialog>
      <!-- 权限 -->
      <el-dialog title="角色权限" :visible.sync="openQuery" width="1480px" append-to-body class="xsckdBox">
        <Query HSouceBillType="js" @editQueryClose="editQueryClose" :linterid=this.rowForm.HGroupID v-if="queryShow" />
        <Query HSouceBillType="js" @editQueryClose="editQueryClose" :linterid="this.rowForm.HGroupID" v-if="queryShow" />
      </el-dialog>
    </div>
  </div>
@@ -282,7 +282,7 @@
    //#region 选中行高亮样式
    rowStyle({ row, rowIndex }) {
      if (this.ids.includes(row.hmainid)) {
        return { "background": "#ecf5ff" }
        return {  }
      }
    },
    //#endregion
@@ -290,7 +290,7 @@
    //#region 双击行
    handleDblclick(row, column, cell, event) {
      this.OperationType = 3
      this.handleEdit()
      this.handleEdit(row)
    },
    //#endregion
@@ -519,7 +519,9 @@
    //#region 新增
    handleAddEdit() {
      this.rowForm.hmainid = 0
      this.OperationType = 1
      this.rowForm.HGroupID = 0
      console.log(' OperationType=', this.OperationType, 'rowForm.HGroupID=', this.rowForm.HGroupID)
      this.editShow = true
      this.openEdit = true
    },
@@ -528,6 +530,7 @@
    //#region 编辑
    handleEdit(row) {
      this.rowForm = row
      console.log('OperationType=', this.OperationType, 'rowForm=', this.rowForm)
      this.editShow = true
      this.openEdit = true
    },