Ver Fonte

fix:修改bug

wuguojie há 1 ano atrás
pai
commit
e8ebac7072

+ 19 - 6
src/views/organizationManagement/functionConfiguration.vue

@@ -39,8 +39,8 @@
                     </el-row>
                   </el-radio-group>
                   <div v-if="functionForm.quoteCompany == 2" style="display: flex; justify-content: flex-start; flex-wrap: wrap">
-                    <div style="display: flex; align-items: center; padding: 3px 16px; margin-right: 10px; color: #0083ff; background: #e9f4ff; border-radius: 3px; width: 240px" v-for="(item, index) in companySelected">
-                      <span>{{ item.nameSimple }}</span>
+                    <div style="display: flex; align-items: center; padding: 3px 16px; margin-right: 10px; color: #0083ff; background: #e9f4ff; border-radius: 3px; width: 240px; margin-top: 10px" v-for="(item, index) in companySelected">
+                      <span>{{ item?.nameSimple }}</span>
                     <el-icon style=" margin-left: 20px;cursor: pointer;" @click="handleDelete(item, index)"><Close /></el-icon></div>
                   </div>
                 </el-form-item>
@@ -187,6 +187,20 @@ const initCompany = () => {
   })
 }
 
+let newCompany = ref([])
+const initNewCompany = () => {
+    api.configurate.gainTopList().then((res: any) => {
+        if (res.code == 200) {
+            newCompany.value = res.data
+        } else {
+            ElMessage({
+                message: res.msg,
+                type: 'warning'
+            })
+        }
+    })
+}
+
 // 机构
 let institutionList = ref([])
 const initInstitution = (val) => {
@@ -214,10 +228,8 @@ const handleEdit = () => {
       functionForm.value.salesmanWithdrawAccountAuditDeptList = functionForm.value.salesmanWithdrawAccountAuditDeptList[0]
       functionForm.value.salesmanWithdrawPaymentAuditDeptList = functionForm.value.salesmanWithdrawPaymentAuditDeptList[0]
       if(functionForm.value.quoteCompanyList.length > 0) {
-        companySelected.value = functionForm.value.quoteCompanyList.map(a => {
-          let obj = company.value.find(b => b.id === a)
-          return obj || null
-        })
+        companySelected.value = newCompany.value.filter(a => functionForm.value.quoteCompanyList.find(b => b === a.id))
+          console.log(123, companySelected.value)
       }
     } else {
       ElMessage.error(res.msg)
@@ -317,6 +329,7 @@ const handleComfirm = () => {
 
 onMounted(() => {
   initCompany()
+  initNewCompany()
 })
 
 </script>

+ 2 - 1
src/views/organizationManagement/tenantPermissions.vue

@@ -43,7 +43,7 @@
               </el-checkbox>
             </el-checkbox-group>
           </div>
-          <el-empty v-else image="../../../src/assets/images/empty.png" />
+          <el-empty v-else :image="empty" />
         </ElCol>
       </ElRow>
 
@@ -57,6 +57,7 @@ import { ElMessage } from 'element-plus';
 import { TreeNode } from '@/utils/composables/routeUtils'; // 导入工具方法
 import { Search } from '@element-plus/icons-vue'
 import api from '@/api'
+import empty from '@/assets/images/empty.png'
 
 onBeforeMount(() => {
   findpage()//租户列表