Ver Fonte

权限和数据分离

wenjie há 3 meses atrás
pai
commit
6ca168442c

+ 42 - 42
src/router/index.js

@@ -2,7 +2,7 @@
  * @Author: wenjie 1454560336@qq.com
  * @Author: wenjie 1454560336@qq.com
  * @Date: 2024-03-05 11:36:07
  * @Date: 2024-03-05 11:36:07
  * @LastEditors: wenjie 1454560336@qq.com
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-12-04 09:48:22
+ * @LastEditTime: 2024-12-05 14:21:31
  * @FilePath: \admin-manage\src\router\index.js
  * @FilePath: \admin-manage\src\router\index.js
  * @Description:
  * @Description:
  *
  *
@@ -1399,47 +1399,47 @@ export let constantRoutes = [{
 ]
 ]
 
 
 export const asyncRouter = [
 export const asyncRouter = [
-  {
-    id: 0,
-    path: '/authorityManage',
-    component: Layout,
-    meta: {
-      title: '权限管理',
-      icon: 'icon-shouyefill'
-    },
-    children: [
-      {
-        id: 1,
-        path: '/authorityManage/menuList',
-        name: '/authorityManage/menuList',
-        component: () => import('@/views/authorityManage/menuList.vue'),
-        meta: {
-          title: '菜单列表',
-          icon: ''
-        },
-      },
-      {
-        id: 2,
-        path: '/authorityManage/roleList',
-        name: '/authorityManage/roleList',
-        component: () => import('@/views/authorityManage/roleList.vue'),
-        meta: {
-          title: '角色列表',
-          icon: ''
-        },
-      },
-      {
-        id: 2,
-        path: '/authorityManage/userList',
-        name: '/authorityManage/userList',
-        component: () => import('@/views/authorityManage/userList.vue'),
-        meta: {
-          title: '用户列表',
-          icon: ''
-        },
-      },
-    ]
-  },
+  // {
+  //   id: 0,
+  //   path: '/authorityManage',
+  //   component: Layout,
+  //   meta: {
+  //     title: '权限管理',
+  //     icon: 'icon-shouyefill'
+  //   },
+  //   children: [
+  //     {
+  //       id: 1,
+  //       path: '/authorityManage/menuList',
+  //       name: '/authorityManage/menuList',
+  //       component: () => import('@/views/authorityManage/menuList.vue'),
+  //       meta: {
+  //         title: '菜单列表',
+  //         icon: ''
+  //       },
+  //     },
+  //     {
+  //       id: 2,
+  //       path: '/authorityManage/roleList',
+  //       name: '/authorityManage/roleList',
+  //       component: () => import('@/views/authorityManage/roleList.vue'),
+  //       meta: {
+  //         title: '角色列表',
+  //         icon: ''
+  //       },
+  //     },
+  //     {
+  //       id: 2,
+  //       path: '/authorityManage/userList',
+  //       name: '/authorityManage/userList',
+  //       component: () => import('@/views/authorityManage/userList.vue'),
+  //       meta: {
+  //         title: '用户列表',
+  //         icon: ''
+  //       },
+  //     },
+  //   ]
+  // },
 
 
 ]
 ]
 
 

+ 8 - 3
src/store/modules/user.js

@@ -2,7 +2,7 @@
  * @Author: wenjie 1454560336@qq.com
  * @Author: wenjie 1454560336@qq.com
  * @Date: 2024-11-14 15:02:58
  * @Date: 2024-11-14 15:02:58
  * @LastEditors: wenjie 1454560336@qq.com
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-11-25 17:13:07
+ * @LastEditTime: 2024-12-12 09:29:54
  * @FilePath: \admin-manage\src\store\modules\user.js
  * @FilePath: \admin-manage\src\store\modules\user.js
  * @Description: 
  * @Description: 
  * 
  * 
@@ -83,7 +83,12 @@ const actions = {
       getMenuAuth({menuSource:1,shopId:0}).then(response => {
       getMenuAuth({menuSource:1,shopId:0}).then(response => {
         if(response.state == 'Success'){
         if(response.state == 'Success'){
 
 
-        let menuList = response.content
+        let menuList = []
+        response.content.map(item=>{
+          if(item.menuSource == 1){
+            menuList.push(item) 
+          }
+        })
         let list = []
         let list = []
         menuList.map(item=>{
         menuList.map(item=>{
           let obj = {}
           let obj = {}
@@ -149,7 +154,7 @@ const actions = {
         list = asyncRouter.concat(list)
         list = asyncRouter.concat(list)
         commit('SET_MENU', list)
         commit('SET_MENU', list)
 
 
-          getAuthButton({shopId:0}).then(res=>{
+          getAuthButton({menuSource:1,shopId:0}).then(res=>{
             if(res.state == 'Success'){
             if(res.state == 'Success'){
                 commit('SET_BTNAUTH', res.content)
                 commit('SET_BTNAUTH', res.content)
             }
             }

+ 3 - 3
src/utils/config.js

@@ -2,14 +2,14 @@
  * @Author: wj 1454560336@qq.com
  * @Author: wj 1454560336@qq.com
  * @Date: 2024-01-05 16:08:18
  * @Date: 2024-01-05 16:08:18
  * @LastEditors: wenjie 1454560336@qq.com
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-12-04 09:46:53
+ * @LastEditTime: 2024-12-04 15:31:42
  * @FilePath: \admin-manage\src\utils\config.js
  * @FilePath: \admin-manage\src\utils\config.js
  * @Description: 124234
  * @Description: 124234
  * 
  * 
  * Copyright (c) 2024 by ${git_name_email}, All Rights Reserved. 
  * Copyright (c) 2024 by ${git_name_email}, All Rights Reserved. 
  */
  */
-const BASE_URL = 'https://api.zonelife.cn/';
-// const BASE_URL = 'https://api.dev.zonelife.cn/';
+// const BASE_URL = 'https://api.zonelife.cn/';
+const BASE_URL = 'https://api.dev.zonelife.cn/';
 // http://192.168.110.226:9002
 // http://192.168.110.226:9002
 
 
 
 

+ 2 - 2
src/utils/request.js

@@ -2,7 +2,7 @@
  * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
  * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
  * @Date: 2022-08-02 14:50:38
  * @Date: 2022-08-02 14:50:38
  * @LastEditors: wenjie 1454560336@qq.com
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-11-12 15:35:43
+ * @LastEditTime: 2024-12-11 16:44:19
  * @FilePath: \admin-manage\src\utils\request.js
  * @FilePath: \admin-manage\src\utils\request.js
  * @Description: 
  * @Description: 
  * 
  * 
@@ -33,7 +33,7 @@ service.interceptors.request.use(
       // ['X-Token'] is a custom headers key
       // ['X-Token'] is a custom headers key
       // please modify it according to the actual situation
       // please modify it according to the actual situation
       config.headers['Accesstoken'] = getToken()
       config.headers['Accesstoken'] = getToken()
-      config.headers['code'] = '520100,5201000,p-0001' //慧研学520100 中数5201000 贵大 p-0001
+      config.headers['code'] = 'p-0001,p-0002,p-0003' //慧研学p-0002 中数p-0003 贵大 p-0001
       config.headers['epid'] = localStorage.getItem('epid')
       config.headers['epid'] = localStorage.getItem('epid')
       // config.headers['Content-Type'] = 'application/x-www-form-urlencoded'
       // config.headers['Content-Type'] = 'application/x-www-form-urlencoded'
     // }
     // }

+ 24 - 4
src/views/authorityManage/roleList.vue

@@ -270,6 +270,17 @@ export default {
     }
     }
   },
   },
   methods: {
   methods: {
+    formatData(data){
+      let arr = []
+      data.map(item=>{
+        if(item.childs.length){
+          arr = arr.concat(this.formatData(item.childs)) 
+        }else{
+          arr.push(item.id)
+        }
+      })
+      return arr
+    },
     handleEdit(row){
     handleEdit(row){
         this.title = "编辑"
         this.title = "编辑"
         this.dialogFormVisible = true
         this.dialogFormVisible = true
@@ -282,11 +293,20 @@ export default {
           "sourceId": row.sourceId,
           "sourceId": row.sourceId,
           "status": row.status
           "status": row.status
         }
         }
-        let parentIds = this.data.map(item => {
-          return item.id
-        })
+ 
+
+        // let parentIds = this.data.map(item => {
+        //   return item.id
+        // })
+        // let authRang = this.setQuery.authRang.map(item=>{
+        //   if(!parentIds.includes(item)){
+        //     return item
+        //   }
+        // })
+        
+        // 筛选出最后一层
         let authRang = this.setQuery.authRang.map(item=>{
         let authRang = this.setQuery.authRang.map(item=>{
-          if(!parentIds.includes(item)){
+          if(this.formatData(this.data).includes(item)){
             return item
             return item
           }
           }
         })
         })

+ 54 - 16
src/views/authorityManage/userList.vue

@@ -4,21 +4,21 @@
     <div class="search">
     <div class="search">
         <div>
         <div>
             <el-input
             <el-input
-            v-model="query.name"
+            v-model="query.employeeName"
             size="small"
             size="small"
             clearable
             clearable
             placeholder="请输入名称"
             placeholder="请输入名称"
             class="item-width-200 "
             class="item-width-200 "
             ></el-input>
             ></el-input>
              <el-input
              <el-input
-            v-model="query.name"
+            v-model="query.phoneNum"
             size="small"
             size="small"
             clearable
             clearable
             placeholder="请输入登录账号"
             placeholder="请输入登录账号"
             class="item-width-200 ml10"
             class="item-width-200 ml10"
             ></el-input>
             ></el-input>
             <el-select
             <el-select
-          v-model="query.activityType"
+          v-model="query.roleId"
           size="small"
           size="small"
           class="item-width-200 ml10"
           class="item-width-200 ml10"
           placeholder="请选择角色"
           placeholder="请选择角色"
@@ -36,7 +36,8 @@
         <el-date-picker
         <el-date-picker
           v-model="date"
           v-model="date"
           size="small"
           size="small"
-          value-format="timestamp"
+          :default-time="['00:00:00', '23:59:59']"
+          value-format="yyyy-MM-dd HH:mm:ss"
           class="item-width-350 ml10"
           class="item-width-350 ml10"
           type="datetimerange"
           type="datetimerange"
           range-separator="至"
           range-separator="至"
@@ -143,6 +144,7 @@
             </el-form-item>
             </el-form-item>
             <el-form-item label="登录账号:"  prop="phoneNum">
             <el-form-item label="登录账号:"  prop="phoneNum">
                 <el-input
                 <el-input
+                :disabled="title == '编辑'"
                 v-model="setQuery.phoneNum"
                 v-model="setQuery.phoneNum"
                 :maxlength="11"
                 :maxlength="11"
                 class="item-width-300"
                 class="item-width-300"
@@ -191,9 +193,12 @@
 
 
   <script>
   <script>
   import {getUserList,enableUser,addUser,updateUser,getAllRole} from '@/api/auth'
   import {getUserList,enableUser,addUser,updateUser,getAllRole} from '@/api/auth'
+  import {setAes} from '@/utils/index'
+
 export default {
 export default {
   name: "userList",
   name: "userList",
   data() {
   data() {
+   
     return {
     return {
         date:'',
         date:'',
       options:[
       options:[
@@ -212,8 +217,12 @@ export default {
       btnLoading: false,
       btnLoading: false,
       dialogFormVisible: false,
       dialogFormVisible: false,
       query: {
       query: {
-        "activityType":null,
-        "state":'',
+        source:1,
+        "employeeName":'',
+        "phoneNum":'',
+        "roleId":'',
+        "start":'',
+        "end":'',
         "currentPage": 1,
         "currentPage": 1,
         "pageSize": 10,
         "pageSize": 10,
         shopId: 0,
         shopId: 0,
@@ -239,10 +248,13 @@ export default {
               { required:true,message:'请选择角色', trigger: 'change' }
               { required:true,message:'请选择角色', trigger: 'change' }
           ],
           ],
           password:[
           password:[
-              { required:true,message:'请填写密码', trigger: 'blur' }
+              { required:true,message:'请填写密码', trigger: 'blur' },
+               { validator: this.validatePassword, trigger: 'blur' }
           ],
           ],
           confirmPass:[
           confirmPass:[
-              { required:true,message:'请填写确认密码', trigger: 'blur' }
+              { required:true,message:'请填写确认密码', trigger: 'blur' },
+               { validator: this.validatePassword1, trigger: 'blur' }
+
           ],
           ],
         }
         }
       }else{
       }else{
@@ -265,15 +277,37 @@ export default {
   watch: {
   watch: {
     date(val){
     date(val){
       if(val){
       if(val){
-        this.query.startTime = val[0]
-        this.query.endTime = val[1]
+        this.query.start = val[0]
+        this.query.end = val[1]
       }else{
       }else{
-        this.query.startTime = ''
-        this.query.endTime = ''
+        this.query.start = ''
+        this.query.end = ''
       }
       }
     }
     }
   },
   },
   methods: {
   methods: {
+      validatePassword(rule, value, callback) {
+          let reg = /(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,16}/
+          if (reg.test(value)) {
+              callback()
+          }else if(value != this.setQuery.confirmPass){
+              callback(new Error('两次密码不一致'))
+          }
+            else {
+              callback(new Error('密码长度应在8-16,并且需要包含字母、数字、符号'))
+          }
+      },
+      validatePassword1(rule, value, callback){
+          let reg = /(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,16}/
+          if (reg.test(value)) {
+              callback()
+          }else if(value != this.setQuery.password){
+              callback(new Error('两次密码不一致'))
+          }
+          else {
+              callback(new Error('密码长度应在8-16,并且需要包含字母、数字、符号'))
+          }
+      },
     handleEdit(row){
     handleEdit(row){
         this.title = "编辑"
         this.title = "编辑"
         this.dialogFormVisible = true
         this.dialogFormVisible = true
@@ -346,7 +380,7 @@ export default {
       })
       })
     },
     },
     getAllRole(){
     getAllRole(){
-      getAllRole({roleSource:1}).then(res=>{
+      getAllRole({roleSource:1,shopId:0}).then(res=>{
         if(res.state == 'Success'){
         if(res.state == 'Success'){
           this.options = []
           this.options = []
           for (const key in res.content) {
           for (const key in res.content) {
@@ -364,10 +398,14 @@ export default {
         if (v) {
         if (v) {
           this.btnLoading = true
           this.btnLoading = true
           if(this.title == "添加"){
           if(this.title == "添加"){
-            addUser(this.setQuery).then(res=>{
-              this.btnLoading = false
+            let setQuery = JSON.parse(JSON.stringify(this.setQuery))
+            // setQuery.time = new Date().getTime()
+            // setQuery.password = setAes(setQuery.password,setQuery.time+'hyx')
+            // setQuery.confirmPass = setAes(setQuery.confirmPass,setQuery.time+'hyx')
+            addUser(setQuery).then(res=>{
               if(res.state == 'Success'){
               if(res.state == 'Success'){
-                  this.dialogFormVisible = false
+                this.dialogFormVisible = false
+                this.btnLoading = false
                   this.$notify({
                   this.$notify({
                     title: '成功',
                     title: '成功',
                     message: '操作成功',
                     message: '操作成功',

+ 5 - 5
src/views/home/index.vue

@@ -1,7 +1,7 @@
 <!--
 <!--
  * @Author: your name
  * @Author: your name
  * @Date: 2021-07-08 12:10:55
  * @Date: 2021-07-08 12:10:55
- * @LastEditTime: 2024-11-12 11:11:26
+ * @LastEditTime: 2024-12-11 16:43:39
  * @LastEditors: wenjie 1454560336@qq.com
  * @LastEditors: wenjie 1454560336@qq.com
  * @Description: In User Settings Edit
  * @Description: In User Settings Edit
  * @FilePath: \admin-manage\src\views\home\index.vue
  * @FilePath: \admin-manage\src\views\home\index.vue
@@ -148,7 +148,7 @@
           </div>
           </div>
           <div class="item">
           <div class="item">
             <!-- <div class="today">{{ userData.totalRegister }}</div> -->
             <!-- <div class="today">{{ userData.totalRegister }}</div> -->
-            <div class="today">{{ userData.totalRegisterByHyx }}</div>
+            <div class="today">{{ userData.totalRegisterByPm }}</div>
             <div class="lastDay">{{ userData.yesterdayRegister }} </div>
             <div class="lastDay">{{ userData.yesterdayRegister }} </div>
           </div>
           </div>
         </el-col>
         </el-col>
@@ -185,9 +185,9 @@ export default {
         platformType:1,
         platformType:1,
       },
       },
       platformTypeObj:{
       platformTypeObj:{
-        1:'520100',
-        2:'p-000',
-        3:'5201000',
+        1:'p-0002',
+        2:'p-0001',
+        3:'p-0003',
       },
       },
       userData: {
       userData: {
         dayRegister: 0,
         dayRegister: 0,

+ 3 - 2
src/views/login/index.vue

@@ -123,8 +123,9 @@ export default {
           this.$store.dispatch('user/login', obj).then((content) => {
           this.$store.dispatch('user/login', obj).then((content) => {
              superadminList().then(r=>{
              superadminList().then(r=>{
                 if (r.state == 'Success'&&r.content.length) {
                 if (r.state == 'Success'&&r.content.length) {
-                  localStorage.setItem('epid',r.content[0].id)
-                  localStorage.setItem('shopName',r.content[0].name)
+                  let arr = r.content.filter(item=>item.authType == 'Platform')
+                  localStorage.setItem('epid',arr[0].id)
+                  localStorage.setItem('shopName',arr[0].name)
                   // this.$router.push({ path: this.redirect || '/' }) //登录成功进入之前访问的页面,没有权限会报错
                   // this.$router.push({ path: this.redirect || '/' }) //登录成功进入之前访问的页面,没有权限会报错
                    if(content.update){
                    if(content.update){
                     this.$router.push('/updatePassword')
                     this.$router.push('/updatePassword')

+ 1 - 1
src/views/merchantManage/addUser.vue

@@ -286,7 +286,7 @@ export default {
               platformType:item.value
               platformType:item.value
             })
             })
           })
           })
-          let platformShareLists = JSON.parse(this.setQuery.platformShares)
+          let platformShareLists = JSON.parse(this.setQuery.platformShares)||[]
           platformShareLists.map(item=>{
           platformShareLists.map(item=>{
             this.setQuery.platformShareLists.map(i=>{
             this.setQuery.platformShareLists.map(i=>{
               if(item.platformType == i.platformType){
               if(item.platformType == i.platformType){

+ 4 - 4
src/views/merchantManage/index.vue

@@ -35,7 +35,7 @@
         搜索
         搜索
       </el-button>
       </el-button>
       </div>
       </div>
-      <el-button class="add-btn" type="primary" size="small" @click="handleAdd"
+      <el-button class="add-btn" type="primary" size="small" v-if="btnAuthObj.addMerchant" @click="handleAdd"
         >添加</el-button
         >添加</el-button
       >
       >
     </div>
     </div>
@@ -99,13 +99,13 @@
 
 
       <el-table-column prop="address" align="center" label="操作">
       <el-table-column prop="address" align="center" label="操作">
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <el-button type="text" size="small" @click="handleEdit(scope.row)"
+          <el-button type="text" size="small" v-if="btnAuthObj.editMerchant" @click="handleEdit(scope.row)"
             >编辑</el-button
             >编辑</el-button
           >
           >
-           <el-button type="text" size="small" @click="handle(scope.row.accountId,scope.row.accountChildType)"
+           <el-button type="text" size="small" v-if="btnAuthObj.merchantAccount" @click="handle(scope.row.accountId,scope.row.accountChildType)"
             >账户</el-button
             >账户</el-button
           >
           >
-           <el-button type="text" size="small" @click="handleDel(scope.row.accountId)"
+           <el-button type="text" size="small" v-if="btnAuthObj.delMerchant" @click="handleDel(scope.row.accountId)"
             >删除</el-button
             >删除</el-button
           >
           >
         </template>
         </template>

+ 4 - 0
src/views/operationManage/appMenuManage/addMenu.vue

@@ -129,6 +129,10 @@ export default {
           label: "慧研学",
           label: "慧研学",
           value: '2',
           value: '2',
         },
         },
+        {
+          label: "生活宝",
+          value: '3',
+        },
       ],
       ],
       rules: {
       rules: {
         menuName: [{ required: true, message: "请输入菜单名称", trigger: "blur" }],
         menuName: [{ required: true, message: "请输入菜单名称", trigger: "blur" }],

+ 11 - 1
src/views/operationManage/appMenuManage/index.vue

@@ -64,7 +64,7 @@
         show-overflow-tooltip
         show-overflow-tooltip
       >
       >
        <template slot-scope="scope">
        <template slot-scope="scope">
-          <span>{{scope.row.belongType ==2?'慧研学':'贵大'}}</span>
+          <span>{{ filterPlat(scope.row.belongType)}}</span>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
       <el-table-column
       <el-table-column
@@ -161,6 +161,16 @@ export default {
   //   },
   //   },
   // },
   // },
   methods: {
   methods: {
+    filterPlat(val){
+      let msg
+      this.options.forEach(v=>{
+          if(v.value == val){
+            msg =  v.label
+          }
+        })
+        return msg
+
+    },
     handleSearch(){
     handleSearch(){
       this.query.currentPage = 1
       this.query.currentPage = 1
       this.getMenu();
       this.getMenu();

+ 9 - 4
src/views/operationManage/financeManage/index.vue

@@ -10,7 +10,7 @@
             class="item-width-200 "
             class="item-width-200 "
           ></el-input>
           ></el-input>
           <el-select
           <el-select
-          v-model="query.channel"
+          v-model="query.code"
           size="small"
           size="small"
           class="item-width-200 ml10"
           class="item-width-200 ml10"
           placeholder="请选择"
           placeholder="请选择"
@@ -155,18 +155,23 @@ export default {
     return {
     return {
       options: [
       options: [
         {
         {
-          value: "ZhongShu",
-          label: "中数未来",
+          value: "p-0002",
+          label: "慧研学",
         },
         },
         {
         {
-          value: "GuiDa",
+          value: "p-0001",
           label: "印象贵大",
           label: "印象贵大",
+        },
+        {
+          value: "p-0003",
+          label: "中数本地生活宝",
         }
         }
       ],
       ],
       date:'',
       date:'',
       tableData: [],
       tableData: [],
       loading: false,
       loading: false,
       query: {
       query: {
+        code:'p-0002',
         noOrGName: "",
         noOrGName: "",
         startTime: "",
         startTime: "",
         endTime: "",
         endTime: "",

+ 13 - 9
src/views/operationManage/financeManage/withdraw.vue

@@ -45,7 +45,7 @@
     </div>
     </div>
     <div class="right">
     <div class="right">
        <el-select
        <el-select
-            v-model="query.channel"
+            v-model="query.code"
             size="small"
             size="small"
             class="item-width-200 ml10"
             class="item-width-200 ml10"
             placeholder="请选择"
             placeholder="请选择"
@@ -268,11 +268,12 @@ export default {
         startTime: "",
         startTime: "",
         endTime: "",
         endTime: "",
         channel:"ZhongShu",
         channel:"ZhongShu",
+        code:'p-0002',
         page: 1,
         page: 1,
         size: 10,
         size: 10,
       },
       },
        query1: {
        query1: {
-        channel:"",
+        channel:"ZhongShu",
         page: 1,
         page: 1,
         size: 10,
         size: 10,
       },
       },
@@ -285,12 +286,16 @@ export default {
       },
       },
       options: [
       options: [
         {
         {
-          value: "ZhongShu",
-          label: "中数未来",
+          value: "p-0002",
+          label: "慧研学",
         },
         },
         {
         {
-          value: "GuiDa",
+          value: "p-0001",
           label: "印象贵大",
           label: "印象贵大",
+        },
+        {
+          value: "p-0003",
+          label: "中数本地生活宝",
         }
         }
       ],
       ],
       pickerOptions: {
       pickerOptions: {
@@ -362,7 +367,7 @@ export default {
           type: 'warning'
           type: 'warning'
         }).then(() => {
         }).then(() => {
              this.btnLoading = true
              this.btnLoading = true
-            withdrawals({channel:this.query.channel}).then(res=>{
+            withdrawals({code:this.query.code}).then(res=>{
                 this.btnLoading = false
                 this.btnLoading = false
                 if(res.state == 'Success'){
                 if(res.state == 'Success'){
                 this.dialogFormVisible = false
                 this.dialogFormVisible = false
@@ -410,8 +415,7 @@ export default {
     withdrawList(){
     withdrawList(){
       this.loading1 = true
       this.loading1 = true
       let obj = JSON.parse(JSON.stringify(this.query1))
       let obj = JSON.parse(JSON.stringify(this.query1))
-      obj.channel = this.query.channel
-      obj.shopId = this.query.channel
+      obj.code = this.query.code
       --obj.page
       --obj.page
       withdrawList(obj).then(res=>{
       withdrawList(obj).then(res=>{
         this.loading1 = false
         this.loading1 = false
@@ -435,7 +439,7 @@ export default {
     },
     },
     getDetail(){
     getDetail(){
       this.moneyLoading = true
       this.moneyLoading = true
-      getDetail({channel:this.query.channel}).then(res=>{
+      getDetail({code:this.query.code}).then(res=>{
         this.moneyLoading = false
         this.moneyLoading = false
          if(res.state == 'Success'){
          if(res.state == 'Success'){
           this.money = res.content
           this.money = res.content

+ 8 - 1
src/views/operationManage/goodsManage/goodsDetail.vue

@@ -2,7 +2,7 @@
  * @Author: wj 1454560336@qq.com
  * @Author: wj 1454560336@qq.com
  * @Date: 2023-11-24 14:39:54
  * @Date: 2023-11-24 14:39:54
  * @LastEditors: wenjie 1454560336@qq.com
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-12-02 09:11:47
+ * @LastEditTime: 2024-12-11 16:45:28
  * @FilePath: \admin-manage\src\views\operationManage\goodsManage\goodsDetail.vue
  * @FilePath: \admin-manage\src\views\operationManage\goodsManage\goodsDetail.vue
  * @Description: 
  * @Description: 
  * 
  * 
@@ -456,6 +456,11 @@ export default Vue.extend({
   },
   },
   data() {
   data() {
     return {
     return {
+      platformTypeObj:{
+        1:'p-0002',
+        2:'p-0001',
+        3:'p-0003',
+      },
       that:this,
       that:this,
       showGoodsLabel:1,
       showGoodsLabel:1,
       labelId:0,//标签id
       labelId:0,//标签id
@@ -842,6 +847,8 @@ export default Vue.extend({
       detail({
       detail({
         goodsId: this.$route.query.id,
         goodsId: this.$route.query.id,
         resource: this.mode == 'audit'? 3:1,
         resource: this.mode == 'audit'? 3:1,
+        platform: this.platformTypeObj[this.$route.query.source] ,
+
         // shopId: localStorage.getItem("epid"),
         // shopId: localStorage.getItem("epid"),
       }).then((res) => {
       }).then((res) => {
         this.loading = false;
         this.loading = false;

+ 11 - 6
src/views/operationManage/goodsManage/index.vue

@@ -19,8 +19,7 @@
         ></el-input>
         ></el-input>
 
 
         <el-select
         <el-select
-          v-model="platformType"
-          multiple
+          v-model="query.platformType"
           size="small"
           size="small"
           clearable
           clearable
           class="item-width-200 ml10"
           class="item-width-200 ml10"
@@ -184,6 +183,11 @@ export default {
   name: "goodsList",
   name: "goodsList",
   data() {
   data() {
     return {
     return {
+      platformTypeObj:{
+        1:'p-0002',
+        2:'p-0001',
+        3:'p-0003',
+      },
       activeName:'上架商品',
       activeName:'上架商品',
       options: [
       options: [
         {
         {
@@ -200,6 +204,7 @@ export default {
       goodsTypeObj:JSON.parse(sessionStorage.getItem('goodsTypeObj')),
       goodsTypeObj:JSON.parse(sessionStorage.getItem('goodsTypeObj')),
       platformType:"",
       platformType:"",
       query: {
       query: {
+        platform:null,
         platformType:null,
         platformType:null,
         applyState:'',
         applyState:'',
         status: '3',
         status: '3',
@@ -228,11 +233,11 @@ export default {
         this.goodsList()
         this.goodsList()
 
 
     },
     },
-    platformType(val) {
-        if(val.length){
-          this.query.platformType = val.join(',')
+    "query.platformType"(val) {
+        if(val){
+          this.query.platform = this.platformTypeObj[val]
         }else{
         }else{
-          this.query.platformType = null
+          this.query.platform = null
         }
         }
       }
       }
     // query: {
     // query: {

+ 100 - 0
src/views/operationManage/marketingManage/shareSetting.vue

@@ -0,0 +1,100 @@
+<!--
+ * @Author: wenjie 1454560336@qq.com
+ * @Date: 2025-02-06 16:00:54
+ * @LastEditors: wenjie 1454560336@qq.com
+ * @LastEditTime: 2025-02-06 16:06:29
+ * @FilePath: \admin-manage\src\views\operationManage\marketingManage\shareSetting.vue
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+-->
+
+<template>
+    <div class="updatePassword app-container">
+        <el-form :model="form" status-icon :rules="rules" ref="form" label-width="100px" class="demo-form">
+            <el-form-item label="分享标题" prop="old">
+                <el-input type="text" class="item-width-300" v-model="form.old" autocomplete="off"></el-input>
+            </el-form-item>
+            <el-form-item label="分享描述" prop="pwd">
+                <el-input type="text"  class="item-width-300" v-model="form.pwd" autocomplete="off"></el-input>
+            </el-form-item>
+            <el-form-item label="分享封面" prop="pwd1">
+                 <Upload
+                type="imgUrl"
+                id="imgUrl"
+                width="150px"
+                height="150px"
+                uploadType="SHOP_INFO"
+                :imgUrl="form.imgUrl"
+                @uploadEnd="uploadEnd"
+                ></Upload>
+            </el-form-item>
+            <el-form-item>
+                <!-- <el-button @click="resetForm('form')">取消</el-button> -->
+                <el-button :loading="loading" type="primary" @click="submitForm('form')">确认</el-button>
+            </el-form-item>
+        </el-form>
+    </div>
+</template>
+
+<script>
+import Upload from '@/components/Upload'
+import {updateLoginPassword} from '@/api/auth'
+import { removeToken } from '@/utils/auth'
+
+    export default {
+        components: {
+            Upload,
+        },
+        data() {
+            return {
+                loading:false,
+                form: {
+                    old:'',
+                    pwd:'',
+                    imgUrl:'',
+                },
+                rules: {
+                    old:[
+                        { required:true,message:'请填写旧密码', trigger: 'blur' }
+                    ],
+                    pwd: [
+                      { required:true,message:'请填写旧密码', trigger: 'blur' }
+                    ],
+                    imgUrl: [
+                        {  required:true,message:'请上传分享封面', trigger: 'change' }
+                    ],
+                    
+                },
+            }
+        },
+        methods: {
+            submitForm(formName) {
+                this.$refs[formName].validate((v) => {
+                    if(v){
+                        this.loading = true
+                        updateLoginPassword(this.form).then(res=>{
+                            this.loading = false
+                            if(res.state == 'Success'){
+                                this.$notify({
+                                    title: '成功',
+                                    message: '操作成功',
+                                    type: 'success'
+                                });
+                                this.resetForm('form')
+                            }
+                        })
+                    }
+                });
+            },
+            resetForm(formName) {
+                this.$refs[formName].resetFields();
+            },
+        },
+  
+    }
+</script>
+
+<style lang="scss" scoped>
+.updatePassword{
+
+}
+</style>

+ 19 - 2
src/views/operationManage/shopManage/shopAdd.vue

@@ -2,7 +2,7 @@
  * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
  * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
  * @Date: 2023-05-26 16:37:34
  * @Date: 2023-05-26 16:37:34
  * @LastEditors: wenjie 1454560336@qq.com
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-11-12 15:37:19
+ * @LastEditTime: 2024-12-13 09:21:06
  * @FilePath: \admin-manage\src\views\operationManage\shopManage\shopAdd.vue
  * @FilePath: \admin-manage\src\views\operationManage\shopManage\shopAdd.vue
  * @Description:
  * @Description:
  *
  *
@@ -674,6 +674,23 @@ export default {
           this.setQuery.serviceCate = this.setQuery.serviceCate.split('/').map(item=>{return item = item.split(',').map(item=> Number(item))})
           this.setQuery.serviceCate = this.setQuery.serviceCate.split('/').map(item=>{return item = item.split(',').map(item=> Number(item))})
           this.setQuery.shopMenuId = this.setQuery.shopMenuId.split(',').map(item=> Number(item))
           this.setQuery.shopMenuId = this.setQuery.shopMenuId.split(',').map(item=> Number(item))
           this.setQuery.platformType = this.setQuery.platformType.split(',').map(item=> Number(item))
           this.setQuery.platformType = this.setQuery.platformType.split(',').map(item=> Number(item))
+                  
+          if(!this.setQuery.shopInfos){
+            this.setQuery.shopInfos = []
+            // this.masterShopOptions.map(item=>{
+            //       this.setQuery.shopInfos.push({
+            //         shareId:'',
+            //         authAccount:'',
+            //         platformType:item.value
+            //       })
+            //       this.shopOptions.push({
+            //         label: this.filterMasterName(item.value),
+            //         value: Number(item.value) 
+            //       })
+            //     })
+          }
+
+          // console.log('shopInfos',this.setQuery.shopInfos
           // let shopInfos = JSON.parse(JSON.stringify(this.setQuery.shopInfos))
           // let shopInfos = JSON.parse(JSON.stringify(this.setQuery.shopInfos))
           // this.setQuery.shopInfos=[]
           // this.setQuery.shopInfos=[]
 
 
@@ -873,7 +890,7 @@ export default {
 
 
                 let shopInfos = JSON.parse(JSON.stringify(this.setQuery.shopInfos))
                 let shopInfos = JSON.parse(JSON.stringify(this.setQuery.shopInfos))
                 this.setQuery.shopInfos=[]
                 this.setQuery.shopInfos=[]
-
+                console.log('shopInfos',this.setQuery.shopInfos);
                 this.shopOptions.map(item=>{
                 this.shopOptions.map(item=>{
                   this.setQuery.shopInfos.push({
                   this.setQuery.shopInfos.push({
                     shareId:'',
                     shareId:'',

+ 3 - 3
src/views/setting/cityList.vue

@@ -21,7 +21,7 @@
         搜索
         搜索
       </el-button>
       </el-button>
       </div>
       </div>
-       <el-button class="add-btn" type="primary" size="small" @click="handleAdd"
+       <el-button class="add-btn" type="primary" size="small" v-if="btnAuthObj.addCity" @click="handleAdd"
         >添加</el-button
         >添加</el-button
       >
       >
     </div>
     </div>
@@ -56,10 +56,10 @@
       </el-table-column>
       </el-table-column>
       <el-table-column align="center" label="操作">
       <el-table-column align="center" label="操作">
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <el-button type="text" size="small" @click="handleEdit(scope.row)"
+          <el-button type="text" size="small" v-if="btnAuthObj.editCity" @click="handleEdit(scope.row)"
             >编辑</el-button
             >编辑</el-button
           >
           >
-          <el-button type="text" size="small" @click="handleDel(scope.row.code)"
+          <el-button type="text" size="small" v-if="btnAuthObj.delCity" @click="handleDel(scope.row.code)"
             >删除</el-button
             >删除</el-button
           >
           >
         </template>
         </template>

+ 1 - 0
src/views/studyManage/bannerManage/addBanner.vue

@@ -85,6 +85,7 @@ export default {
     return {
     return {
         loading:false,
         loading:false,
         setQuery: {
         setQuery: {
+          platformType:1,
           "bannerImg": "",
           "bannerImg": "",
           "bannerName": "",
           "bannerName": "",
           "id": 0,
           "id": 0,

+ 3 - 3
src/views/studyManage/bannerManage/index.vue

@@ -34,7 +34,7 @@
           </el-option>
           </el-option>
         </el-select> -->
         </el-select> -->
       </div>
       </div>
-      <el-button class="add-btn" type="primary" size="small" @click="handleAdd"
+      <el-button class="add-btn" type="primary" size="small" v-if="btnAuthObj.addStudyBanner" @click="handleAdd"
         >添加</el-button
         >添加</el-button
       >
       >
     </div>
     </div>
@@ -90,8 +90,8 @@
       </el-table-column>
       </el-table-column>
       <el-table-column prop="address" align="center" label="操作">
       <el-table-column prop="address" align="center" label="操作">
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <el-button type="text" size="small" @click="handleEdit(scope.row)">编辑</el-button>
-          <el-button type="text" size="small" @click="handleDel(scope.row.id)">删除</el-button>
+          <el-button type="text" size="small" v-if="btnAuthObj.editStudyBanner"  @click="handleEdit(scope.row)">编辑</el-button>
+          <el-button type="text" size="small" v-if="btnAuthObj.delStudyBanner"  @click="handleDel(scope.row.id)">删除</el-button>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>

+ 3 - 3
src/views/studyManage/communityManage/index.vue

@@ -26,7 +26,7 @@
       </el-button>
       </el-button>
       </div>
       </div>
 
 
-        <el-button class="add-btn" type="primary" size="small" @click="handleAdd">添加</el-button>
+        <el-button class="add-btn" type="primary" size="small" v-if="btnAuthObj.addArticle" @click="handleAdd">添加</el-button>
     </div>
     </div>
 
 
     <el-table
     <el-table
@@ -98,10 +98,10 @@
      
      
        <el-table-column prop="address" align="center" label="操作">
        <el-table-column prop="address" align="center" label="操作">
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <el-button type="text" size="small" @click="handleDetail(scope.row)">编辑</el-button>
+          <el-button type="text" size="small" v-if="btnAuthObj.editArticle" @click="handleDetail(scope.row)">编辑</el-button>
           <el-button type="text" size="small" @click="handleTop(scope.row.id)">置顶</el-button>
           <el-button type="text" size="small" @click="handleTop(scope.row.id)">置顶</el-button>
           <el-button type="text" size="small" @click="handleState(scope.row.id,scope.row.state == 1?2:1)">{{scope.row.state == 1?'显示':'隐藏' }}</el-button>
           <el-button type="text" size="small" @click="handleState(scope.row.id,scope.row.state == 1?2:1)">{{scope.row.state == 1?'显示':'隐藏' }}</el-button>
-          <el-button type="text" class="red" size="small" @click="handleDel(scope.row.id)">删除</el-button>
+          <el-button type="text" class="red" v-if="btnAuthObj.delArticle" size="small" @click="handleDel(scope.row.id)">删除</el-button>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>

+ 3 - 3
src/views/studyManage/courseManage/index.vue

@@ -25,7 +25,7 @@
       </div>
       </div>
         
         
 
 
-        <el-button class="add-btn" type="primary" size="small" @click="handleAdd">添加</el-button>
+        <el-button class="add-btn" type="primary" size="small" v-if="btnAuthObj.addCourse" @click="handleAdd">添加</el-button>
     </div>
     </div>
 
 
     <el-table
     <el-table
@@ -93,10 +93,10 @@
        <el-table-column prop="address" align="center" label="操作">
        <el-table-column prop="address" align="center" label="操作">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <el-button type="text" size="small" @click="handleDetail(scope.row.id)">查看</el-button>
           <el-button type="text" size="small" @click="handleDetail(scope.row.id)">查看</el-button>
-          <el-button type="text" size="small" @click="handleEdit(scope.row.id)">编辑</el-button>
+          <el-button type="text" size="small"  v-if="btnAuthObj.editCourse" @click="handleEdit(scope.row.id)">编辑</el-button>
           <el-button type="text" size="small" @click="handleStatus(scope.row.id,scope.row.status == 1?2:1)">{{scope.row.status == 1?'立即发布':'取消发布' }}</el-button>
           <el-button type="text" size="small" @click="handleStatus(scope.row.id,scope.row.status == 1?2:1)">{{scope.row.status == 1?'立即发布':'取消发布' }}</el-button>
           <el-button type="text" size="small" @click="handleState(scope.row.id,scope.row.state == 1?2:1)">{{scope.row.state == 1?'显示':'隐藏' }}</el-button>
           <el-button type="text" size="small" @click="handleState(scope.row.id,scope.row.state == 1?2:1)">{{scope.row.state == 1?'显示':'隐藏' }}</el-button>
-          <el-button type="text" class="red" size="small" @click="handleDel(scope.row.id)">删除</el-button>
+          <el-button type="text" class="red"  v-if="btnAuthObj.delCourse" size="small" @click="handleDel(scope.row.id)">删除</el-button>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>

+ 3 - 3
src/views/studyManage/menuManage/index.vue

@@ -35,7 +35,7 @@
         </el-select> -->
         </el-select> -->
         
         
       </div>
       </div>
-      <el-button class="add-btn" type="primary" size="small" @click="handleAdd"
+      <el-button class="add-btn" type="primary" size="small" v-if="btnAuthObj.addColumn" @click="handleAdd"
         >添加</el-button
         >添加</el-button
       >
       >
     </div>
     </div>
@@ -102,8 +102,8 @@
       <el-table-column prop="address" align="center" label="操作">
       <el-table-column prop="address" align="center" label="操作">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <el-button type="text" size="small" v-if="$route.query.title != '二级栏目'" @click="handle(scope.row.id)">查看下级</el-button>
           <el-button type="text" size="small" v-if="$route.query.title != '二级栏目'" @click="handle(scope.row.id)">查看下级</el-button>
-          <el-button type="text" size="small" @click="handleEdit(scope.row)">编辑</el-button>
-          <el-button type="text" size="small" @click="handleDel(scope.row.id)">删除</el-button>
+          <el-button type="text" size="small" v-if="btnAuthObj.editColumn" @click="handleEdit(scope.row)">编辑</el-button>
+          <el-button type="text" size="small" v-if="btnAuthObj.delColumn" @click="handleDel(scope.row.id)">删除</el-button>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>

+ 5 - 3
src/views/studyManage/questionBankManage/index.vue

@@ -26,7 +26,7 @@
       </el-button>
       </el-button>
       </div>
       </div>
 
 
-      <el-button class="add-btn" type="primary" size="small" @click="handleAdd"
+      <el-button class="add-btn" type="primary" size="small" v-if="btnAuthObj.addQuestion" @click="handleAdd"
         >添加</el-button
         >添加</el-button
       >
       >
     </div>
     </div>
@@ -78,15 +78,17 @@
           <el-button
           <el-button
             type="text"
             type="text"
             size="small"
             size="small"
+             v-if="btnAuthObj.publishQuestion"
             @click="handleState(scope.row.id, scope.row.status == 1 ? 2 : 1)"
             @click="handleState(scope.row.id, scope.row.status == 1 ? 2 : 1)"
             >{{ scope.row.status == 1 ? "立即发布" : "取消发布" }}</el-button
             >{{ scope.row.status == 1 ? "立即发布" : "取消发布" }}</el-button
           >
           >
-          <el-button type="text" size="small" @click="handleEdit(scope.row)">编辑</el-button>
-          <el-button type="text" size="small" @click="editQuestions(scope.row.paperName,scope.row.id)">编辑题库</el-button>
+          <el-button type="text" size="small" v-if="btnAuthObj.editQuestion" @click="handleEdit(scope.row)">编辑</el-button>
+          <el-button type="text" size="small" v-if="btnAuthObj.editQuestionBank" @click="editQuestions(scope.row.paperName,scope.row.id)">编辑题库</el-button>
           <el-button
           <el-button
             type="text"
             type="text"
             class="red"
             class="red"
             size="small"
             size="small"
+             v-if="btnAuthObj.delQuestion"
             @click="handleDel(scope.row.id)"
             @click="handleDel(scope.row.id)"
             >删除</el-button
             >删除</el-button
           >
           >

+ 3 - 3
src/views/studyManage/tabManage/index.vue

@@ -2,7 +2,7 @@
 <template>
 <template>
   <div class="tabManage app-container">
   <div class="tabManage app-container">
     <div class="search">
     <div class="search">
-      <el-button class="add-btn" type="primary" size="small" @click="handleAdd"
+      <el-button class="add-btn" type="primary" size="small" v-if="btnAuthObj.addTab" @click="handleAdd"
         >添加</el-button
         >添加</el-button
       >
       >
     </div>
     </div>
@@ -31,10 +31,10 @@
 
 
       <el-table-column align="center" label="操作">
       <el-table-column align="center" label="操作">
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <el-button type="text" size="small" @click="handleEdit(scope.row)"
+          <el-button type="text" size="small" v-if="btnAuthObj.editTab" @click="handleEdit(scope.row)"
             >编辑</el-button
             >编辑</el-button
           >
           >
-          <el-button type="text" size="small" @click="handleDel(scope.row.id)"
+          <el-button type="text" size="small" v-if="btnAuthObj.delTab" @click="handleDel(scope.row.id)"
             >删除</el-button
             >删除</el-button
           >
           >
         </template>
         </template>