浏览代码

fix:机构管理逻辑调整

Signed-off-by: tsz <2417024719@qq.com>
tsz 1 年之前
父节点
当前提交
8ac8ebce3f

+ 8 - 5
entbase-pc/src/views/ent/components/depart.vue

@@ -19,8 +19,8 @@
                 <li v-if="companyMsg">
                     <span>{{ companyData.department }}</span>
                     <span v-if="$store.state.companyMsg.nicheDis_show === 1">
-                      <el-tooltip class="item" effect="dark" :content="companyData.nicheDis" placement="bottom">
-                        <i>{{ companyData.nicheDis }}</i>
+                      <el-tooltip popper-class="depart-tooltip" class="item" effect="dark" :content="companyData.nicheDis" placement="bottom">
+                        <i style="display: block;width: 308px;" class="ellipsis">{{ companyData.nicheDis }}</i>
                       </el-tooltip>
                     </span>
                     <span>{{ companyMsg.role }}</span>
@@ -393,6 +393,9 @@ export default {
 </script>
 
 <style lang="scss">
+.depart-tooltip{
+  max-width: 308px;
+}
 .in-app {
   .ent-depart-screen,
   .ent_personal,
@@ -478,7 +481,7 @@ export default {
                         flex: 1;
                     }
                     &:nth-child(2) {
-                      width: 308px;
+                      width: 340px;
                     }
                     &:nth-child(3){
                         width: 120px;
@@ -505,7 +508,7 @@ export default {
                             flex: 1;
                         }
                         &:nth-child(2){
-                          width: 308px;
+                          width: 340px;
                         }
                         &:nth-child(3){
                             width: 120px;
@@ -574,7 +577,7 @@ export default {
                             flex: 1;
                         }
                         &:nth-child(2){
-                          width: 306px;
+                          width: 340px;
                         }
                         &:nth-child(3){
                             width: 120px;

+ 11 - 2
entbase-pc/src/views/ent/components/entpart.vue

@@ -558,7 +558,7 @@ export default {
       }
       setNicheDis({
         id: this.ruleForm.personId,
-        powerId: 2
+        powerId: 0
       }).then((res) => {
         this.$refs.childDel.dialogTableVisible = false
         if (res.data.status == 1) {
@@ -581,7 +581,9 @@ export default {
     // 选择添加分配人员
     chooseDepartFc () {
       this.$refs.powerNode.searchVal = ''
-      this.$refs.powerNode.centerDialogVisible = true
+      if (this.whichPart === 'add') {
+        this.$refs.powerNode.centerDialogVisible = true
+      }
       this.$refs.powerNode.origin = 'entpart'
       // this.$refs.powerNode.currentIndex = this.currentIndex
       this.$refs.powerNode.titleMsg = '选择企业商机分配人员'
@@ -592,6 +594,13 @@ export default {
       let deparId = ''
       if (this.pending) return
       if (this.whichPart === 'add') {
+        if(!this.ruleForm.name) {
+          this.$message({
+            message: '请选择商机分配人员',
+            type: 'warning'
+          })
+          return
+        }
         if (!this.ruleForm.nameStatus && !this.ruleForm.phoneStatus) {
           this.pending = true
           setNicheDis({

+ 9 - 7
entbase-pc/src/views/ent/components/personal.vue

@@ -56,12 +56,13 @@
       >
         <el-table-column
           type="selection"
+          :style="{ width: '3%' }"
           width="3%"
           :selectable="checkSelectable"
           v-if="hasAuth"
         >
         </el-table-column>
-        <el-table-column prop="name" label="姓名" width="10%">
+        <el-table-column prop="name" :style="{ width: '10%' }" label="姓名" width="10%">
           <template slot="header">
             <div
               style="cursor: pointer"
@@ -71,18 +72,18 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column label="邮箱" width="17%">
+        <el-table-column label="邮箱" :style="{ width: '17%' }"  width="17%">
           <template slot-scope="scope">
             {{ scope.row.mail || "--" }}
           </template>
         </el-table-column>
-        <el-table-column prop="phone" label="手机" width="14%"> </el-table-column>
-        <el-table-column prop="account" label="账号名" width="21.4%">
+        <el-table-column prop="phone" label="手机" :style="{ width: '14%' }"  width="14%"> </el-table-column>
+        <el-table-column prop="account" :style="{ width: '21.4%' }"  label="账号名" width="21.4%">
            <template slot-scope="scope">
             <div :title="scope.row.user_name">{{ getAccountName(scope.row.user_name) }}</div>
           </template>
         </el-table-column>
-        <el-table-column width="17.8%" prop="dname" label="部门">
+        <el-table-column width="17.8%" :style="{ width: '17.8%' }"  prop="dname" label="部门">
           <template slot="header">
             <div
               style="cursor: pointer"
@@ -92,7 +93,7 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column label="角色" width="21.4%">
+        <el-table-column :style="{ width: '21.4%' }" label="角色" width="21.4%">
           <template slot-scope="scope">
             <span v-if="scope.row.role == '企业管理员'" class="company_user">
               {{ scope.row.role }}<i v-if="scope.row.niche_dis">、</i>{{ scope.row.niche_dis ? '企业商机分配' : '' }}
@@ -100,11 +101,12 @@
             <span v-if="scope.row.role == '部门管理员'" class="depart_user">
               {{ scope.row.role }}<i v-if="scope.row.niche_dis">、</i>{{ scope.row.niche_dis ? '部门商机分配' : '' }}
             </span>
-            <span v-if="scope.row.role == ''">员工</span>
+            <span v-if="scope.row.role == ''">员工<i v-if="scope.row.niche_dis">、</i><span v-if="scope.row.niche_dis">{{ scope.row.niche_dis === 1 ? '企业商机分配' : '部门商机分配' }}</span></span>
           </template>
         </el-table-column>
         <el-table-column
           header-align="center"
+          :style="{ width: '11%' }"
           width="11%"
           v-if="hasAuth"
           label="操作"

+ 4 - 1
entbase-pc/src/views/ent/components/powerPerson.vue

@@ -123,6 +123,9 @@ export default {
     }, 500))
     this.$watch('centerDialogVisible', (newValue, oldValue) => {
       if (newValue) {
+        if (this.$parent.part === 'entpart') {
+          this.selectedList = []
+        }
         this.$modalHelper.afterOpen()
       } else {
         this.$modalHelper.beforeClose()
@@ -331,7 +334,7 @@ export default {
       this.deal_personList.forEach(v => {
         lengthId += v.users.length
       })
-      if (this.$parent.currentIndex !== 1 && this.pagetype !== 'manage') {
+      if (this.$parent.currentIndex !== 1 && this.pagetype !== 'manage' && this.$parent.part !== 'entpart') {
         if (lengthId > this.personList.quota) {
           this.$message({ message: '全选大于可添加的人数,请单个添加', type: 'warning' })
           return