jwyu 9 månader sedan
förälder
incheckning
8cfab8a44b

+ 1 - 1
index.html

@@ -4,7 +4,7 @@
     <meta charset="UTF-8" />
     <link rel="icon" type="image/x-icon" href="/fa.ico" id="icon"/>
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>ETA-CRM</title>
+    <title>东吴CRM</title>
   </head>
   <body>
     <div id="app"></div>

+ 6 - 2
src/api/system/role.js

@@ -1,9 +1,13 @@
 import { get, post } from "@/api/index";
 
 export default {
+  //角色所有选项输
+  roleAllList: () => {
+    return get("/role/allList", {});
+  },
   //角色列表
-  roleList: () => {
-    return get("/role/list", {});
+  roleList: (params) => {
+    return get("/role/list", params);
   },
   //角色新增
   roleAdd: params => {

+ 2 - 2
src/layout/Index.vue

@@ -27,10 +27,10 @@ getPermissionData()
 .layout-wrap {
   min-height: 100%;
   padding-top: 60px;
-  padding-left: 200px;
+  padding-left: 180px;
   transition: all .3s;
   .layout-content {
-    padding: 20px;
+    padding: 30px;
     min-height: calc(100% - 64px);
   }
 }

+ 1 - 1
src/layout/components/HeaderWrap.vue

@@ -79,7 +79,7 @@ const hasUnRead=ref(false)//是否有未读
   align-items: center;
   color: #fff;
   .logo-img{
-    width: 200px;
+    width: 180px;
     height: 100%;
     margin-right: 30px;
   }

+ 1 - 1
src/layout/components/LeftWrap.vue

@@ -110,7 +110,7 @@ function getMenuIcon(item){
   --el-menu-hover-bg-color: rgba(255, 255, 255, 0.15);
   --el-menu-text-color: #ffffff;
   --el-menu-active-color: #ffae4f;
-  width: 200px;
+  width: 180px;
   z-index: 50;
   position: fixed;
   top: 60px;

+ 1 - 1
src/views/customer/PotentialUserList.vue

@@ -188,7 +188,7 @@ function handleShowDetail(e){
         </el-table-column>
         <el-table-column label="操作" align="center" width="200">
           <template #default="{ row }">
-            <el-button type="primary" link @click="handleEditUser(row)"
+            <el-button type="primary" v-permission="'user:transform'" link @click="handleEditUser(row)"
               >转客户</el-button
             >
             

+ 13 - 9
src/views/customer/UserList.vue

@@ -190,7 +190,7 @@ function handleGoDetail(e){
 
 <template>
   <div class="customer-user-list-page">
-    <div class="flex filter-wrap">
+    <div>
       <el-button
         type="primary"
         :icon="Plus"
@@ -198,6 +198,16 @@ function handleGoDetail(e){
         v-permission="'user:add'"
         >新增</el-button
       >
+      <el-input
+        placeholder="姓名/手机号/邮箱"
+        v-model="filterState.keyword"
+        :prefix-icon="Search"
+        clearable
+        style="max-width: 359px;float: right"
+        @input="handleFilterList"
+      />
+    </div>
+    <div class="flex filter-wrap">
       <all-user-for-depart
         style="width: 165px"
         v-model="filterState.seller"
@@ -265,14 +275,7 @@ function handleGoDetail(e){
           @change="handleFilterList"
         />
       </div>
-      <el-input
-        placeholder="姓名/手机号/邮箱"
-        v-model="filterState.keyword"
-        :prefix-icon="Search"
-        clearable
-        style="max-width: 359px; margin-left: auto"
-        @input="handleFilterList"
-      />
+      
     </div>
     <div class="userlist-wrap" style="margin-top: 20px">
       <el-table
@@ -392,6 +395,7 @@ function handleGoDetail(e){
   width: 100%;
   overflow: hidden;
   .filter-wrap {
+    margin-top: 10px;
     flex-wrap: wrap;
     gap: 10px;
   }

+ 1 - 1
src/views/system/AuthSet.vue

@@ -6,7 +6,7 @@ import { apiSystemRole } from '@/api/system'
 const roleId = ref('')
 const roleArr = ref([])
 async function getRoleList() {
-  const res = await apiSystemRole.roleList()
+  const res = await apiSystemRole.roleAllList()
   if (res.Ret !== 200) return
   const list = res.Data.List || []
   roleArr.value = list

+ 6 - 3
src/views/system/RoleList.vue

@@ -4,12 +4,15 @@ import { apiSystemRole } from '@/api/system'
 
 const roleList = ref([])
 const page = ref(1)
-const pageSize = ref(200)
+const pageSize = ref(20)
 const tableLoading = ref(false)
 const totals = ref(0)
 async function getRoleList() {
   tableLoading.value = true
-  const res = await apiSystemRole.roleList()
+  const res = await apiSystemRole.roleList({
+    PageSize: pageSize.value,
+    CurrentIndex: page.value,
+  })
   tableLoading.value = false
   if (res.Ret !== 200) return
   roleList.value = res.Data.List || []
@@ -89,7 +92,7 @@ async function handleDel(e) {
         <el-table-column prop="SysRoleName" label="角色" />
         <el-table-column prop="opt" label="操作">
           <template #default="{ row }">
-            <el-button v-permission="'role:add'" link type="primary" @click="handleEdit(row)"
+            <el-button v-permission="'role:edit'" link type="primary" @click="handleEdit(row)"
               >编辑</el-button
             >
             <el-button v-permission="'role:delete'" link type="danger" @click="handleDel(row)"

+ 2 - 2
src/views/system/userList/Index.vue

@@ -10,7 +10,7 @@ import MoveUserDepart from './components/MoveUserDepart.vue'
 const roleId = ref('')
 const roleArr = ref([])
 async function getRoleList() {
-  const res = await apiSystemRole.roleList()
+  const res = await apiSystemRole.roleAllList()
   if (res.Ret !== 200) return
   const list = res.Data.List || []
   roleArr.value = list
@@ -192,7 +192,7 @@ async function changeStatus(e) {
                 >重置密码</el-button
               >
               <el-button
-                v-permission="'department:move'"
+                v-permission="'sysUser:move'"
                 type="primary"
                 link
                 @click.stop="openMoveDepartDialog(row)"

+ 4 - 1
src/views/system/userList/components/DepartWrap.vue

@@ -2,6 +2,9 @@
 import { apiSystemDepart } from '@/api/system'
 import { InfoFilled, Plus } from '@element-plus/icons-vue'
 import { ElMessageBox } from 'element-plus'
+import {usePermission} from '@/hooks/permission'
+
+const {hasPermission}=usePermission()
 
 const emits = defineEmits(['change'])
 
@@ -252,7 +255,7 @@ function getFormTitle(e) {
         :data="departOpts"
         :props="departTreeKeys"
         :current-node-key="departActive"
-        draggable
+        :draggable="hasPermission('department:move')"
         check-on-click-node
         :expand-on-click-node="false"
         node-key="SysDepartmentId"

+ 1 - 1
src/views/system/userList/components/EditUser.vue

@@ -74,7 +74,7 @@ getDepartList()
 // 获取角色
 const roleArr = ref([])
 async function getRoleList() {
-  const res = await apiSystemRole.roleList()
+  const res = await apiSystemRole.roleAllList()
   if (res.Ret !== 200) return
   const list = res.Data.List || []
   roleArr.value = list