Handy_Cao 7 months ago
parent
commit
e633737b9a

+ 1 - 1
src/packages/pc/components/modules/roles/index.vue

@@ -53,7 +53,7 @@ const getSensitiveWords = () => {
 
 const { data, loading } = useRequest(queryDetail, {
     params: {
-        autoId: props.record.userid
+        autoId: 1
     },
     onSuccess: (res) => {
         const codeSet = new Set(res.data.menuids)

+ 1 - 1
src/packages/pc/views/member/institution/broker/components/edit/index.vue

@@ -52,7 +52,7 @@ const refresh = shallowRef(false)
 
 const { data, loading } = useRequest(initAdd, {
     params: {
-        role: props.record?.roleIds
+        role: 'broker'
     },
     onError: (err) => {
         ElMessage.error(err)

+ 7 - 7
src/packages/pc/views/member/institution/industry/components/edit/index.vue

@@ -39,21 +39,21 @@ const formRef = ref<FormInstance>()
 const show = shallowRef(true)
 const refresh = shallowRef(false)
 
+const props = defineProps({
+    record: {
+        type: Object as PropType<Member.OrganRoleRsp>
+    }
+})
+
 const { data, loading } = useRequest(initAdd, {
     params: {
-        role: props.record?.roleIds
+        role: 'industry'
     },
     onError: (err) => {
         ElMessage.error(err)
     }
 })
 
-const props = defineProps({
-    record: {
-        type: Object as PropType<Member.OrganRoleRsp>
-    }
-})
-
 const componentMap = new Map<string, unknown>([
     ['Roles', defineAsyncComponent(() => import('@pc/components/modules/roles/index.vue'))], // 角色权限信息
 ])

+ 1 - 1
src/packages/pc/views/member/institution/marketer/components/edit/index.vue

@@ -55,7 +55,7 @@ const refresh = shallowRef(false)
 
 const { data, loading } = useRequest(initAdd, {
     params: {
-        role: props.record?.roleIds
+        role: 'marketer'
     },
     onError: (err) => {
         ElMessage.error(err)

+ 1 - 1
src/packages/pc/views/member/institution/marketing/components/edit/index.vue

@@ -48,7 +48,7 @@ const refresh = shallowRef(false)
 
 const { data, loading } = useRequest(initAdd, {
     params: {
-        role: props.record?.roleIds
+        role: 'marketing'
     },
     onError: (err) => {
         ElMessage.error(err)

+ 4 - 1
src/packages/pc/views/member/institution/operation/components/edit/index.vue

@@ -11,6 +11,9 @@
                     <el-button @click="openComponent('Roles')">查看</el-button>
                 </el-form-item>
             </fieldset>
+            <fieldset class="g-fieldset el-form--horizontal">
+                <legend class="g-fieldset__legend">商品查询权限</legend>
+            </fieldset>
         </el-form>
         <template #footer>
             <el-button @click="onCancel(false)">{{ t('operation.cancel') }}</el-button>
@@ -48,7 +51,7 @@ const refresh = shallowRef(false)
 
 const { data, loading } = useRequest(initAdd, {
     params: {
-        role: props.record?.roleIds
+        role: 'operate'
     },
     onError: (err) => {
         ElMessage.error(err)

+ 11 - 2
src/packages/pc/views/member/institution/operation/components/modify/index.vue

@@ -25,9 +25,10 @@ import { shallowRef, PropType, ref, defineAsyncComponent, onMounted } from 'vue'
 import { ElMessage, FormInstance, FormRules } from 'element-plus'
 import { useComponent } from '@/hooks/component'
 import { i18n } from '@/stores'
-import { roleadd } from '@/services/api/member'
+import { roleadd, initAdd } from '@/services/api/member'
 import AppSelectMember from '@pc/components/modules/select-member/index.vue'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
+import { useRequest } from '@/hooks/request'
 
 const props = defineProps({
     record: {
@@ -44,7 +45,15 @@ const { global: { t } } = i18n
 const formRef = ref<FormInstance>()
 const show = shallowRef(true)
 const refresh = shallowRef(false)
-const loading = shallowRef(false)
+
+const { data, loading } = useRequest(initAdd, {
+    params: {
+        role: 'operate'
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
 
 const formData = ref<Partial<Member.RoleAddReq>>({
     roleid: 2

+ 1 - 1
src/packages/pc/views/member/institution/self/components/edit/index.vue

@@ -48,7 +48,7 @@ const refresh = shallowRef(false)
 
 const { data, loading } = useRequest(initAdd, {
     params: {
-        role: props.record?.roleIds
+        role: 'selfsupport'
     },
     onError: (err) => {
         ElMessage.error(err)

+ 1 - 1
src/packages/pc/views/member/institution/warehouse/components/edit/index.vue

@@ -48,7 +48,7 @@ const refresh = shallowRef(false)
 
 const { data, loading } = useRequest(initAdd, {
     params: {
-        role: props.record?.roleIds
+        role: 'warehouse'
     },
     onError: (err) => {
         ElMessage.error(err)