wujingjing
2024-10-25 a34acfc9181792e2c4a6fa113bd9e21780c5224d
src/views/project/yw/systemManage/userMgr/UserMgr.vue
@@ -7,8 +7,7 @@
            </el-form-item>
            <el-form-item>
               <el-button icon="ele-Refresh" @click="resetQuery">重置 </el-button>
               <el-button icon="ele-Plus" @click="openOptDlg()"> 添加 </el-button>
               <el-button icon="ele-Plus" @click="openOptDlg()" type="primary"> 添加 </el-button>
            </el-form-item>
         </el-form>
      </template>
@@ -24,7 +23,7 @@
               highlight-current-row
            >
               <el-table-column prop="user_name" label="用户名" width="120" fixed="left" show-overflow-tooltip> </el-table-column>
               <el-table-column label="中文名" prop="real_name" width="90" show-overflow-tooltip> </el-table-column>
               <el-table-column label="姓名" prop="real_name" width="90" show-overflow-tooltip> </el-table-column>
               <el-table-column label="性别" prop="sex" width="70" show-overflow-tooltip> </el-table-column>
               <el-table-column label="角色" prop="user_roles" width="250" show-overflow-tooltip>
                  <template #default="{ row }">
@@ -37,7 +36,7 @@
               <el-table-column label="手机号" prop="phone" width="120" show-overflow-tooltip> </el-table-column>
               <el-table-column label="邮件" prop="email" width="190" show-overflow-tooltip> </el-table-column>
               <el-table-column label="创建时间" prop="create_time" width="105" show-overflow-tooltip> </el-table-column>
               <el-table-column prop="note" label="说明" show-overflow-tooltip />
               <el-table-column label="操作" width="180" fixed="right" show-overflow-tooltip>
@@ -118,6 +117,7 @@
      email: item.email,
      note: item.note,
      user_roles: item.roles,
      create_time: item.create_time?.slice(0, 10),
   }));
};
//#endregion
@@ -226,39 +226,6 @@
   }
};
//#endregion
//#region ====================== 改变发布状态 ======================
// const publishStatusChange = async (published: SupervisorPublished, id, index) => {
//    const res = await updatePublishStatus(
//       {
//          id: id,
//          publish: published,
//       },
//       {
//          loading: false,
//       }
//    );
//    const origin = published === SupervisorPublished.Y ? SupervisorPublished.N : SupervisorPublished.Y;
//    const final = res.publish ?? origin;
//    if (final === origin) {
//       ElMessage.warning('操作失败' + (res.fail_msg ? `:${res.fail_msg}` : ''));
//       return;
//    }
//    tableData.value[index].published = final;
//    published === SupervisorPublished.Y ? ElMessage.success('发布成功') : ElMessage.info('已取消发布');
// };
//#endregion
//#region ====================== 更新发布状态 ======================
// useUpdateData({
//    event: 'supervisor.publish',
//    updateFun({ id, published }) {
//       updatePublishedById(id, published);
//    },
// });
//#endregion
const roleList = ref([]);