ソースを参照

fix:pc端机构管理调整

Signed-off-by: tsz <2417024719@qq.com>
tsz 1 年間 前
コミット
04d20d8d9d

+ 7 - 3
entbase-pc/src/views/ent/components/depart.vue

@@ -10,7 +10,7 @@
         <div class="ent-depart-table"  v-loading="loading">
             <h4>
               <strong>公司/部⻔名称</strong>
-              <strong v-if="$store.state.companyMsg.nicheDis_show === 1">商机分配</strong>
+              <strong v-if="$store.state.companyMsg.nicheDis_show === 1">资讯分配</strong>
               <strong>管理员</strong>
               <strong>人数</strong>
               <strong v-if="hasAuth">操作</strong>
@@ -20,6 +20,9 @@
                     <span>{{ companyData.department }}</span>
                     <span v-if="$store.state.companyMsg.nicheDis_show === 1">
                       <el-tooltip popper-class="depart-tooltip" class="item" effect="dark" :content="companyData.nicheDis" placement="bottom">
+                        <template slot="content">
+                          <div class="tooltip-content">{{ companyData.nicheDis }}</div>
+                        </template>
                         <i style="display: block;width: 308px;" class="ellipsis">{{ companyData.nicheDis }}</i>
                       </el-tooltip>
                     </span>
@@ -391,10 +394,11 @@ export default {
   }
 }
 </script>
-
 <style lang="scss">
-.depart-tooltip{
+.tooltip-content{
   max-width: 308px;
+  font-size: 12px;
+  line-height: 18px;
 }
 .in-app {
   .ent-depart-screen,

+ 7 - 6
entbase-pc/src/views/ent/components/entpart.vue

@@ -29,7 +29,7 @@
           v-if="hasAuth"
         >
         </el-table-column>
-        <el-table-column prop="name" label="企业商机分配"></el-table-column>
+        <el-table-column prop="name" label="企业资讯分配"></el-table-column>
         <!-- <el-table-column label="邮箱" width="190">
           <template slot-scope="scope">
             {{ scope.row.mail || "--" }}
@@ -449,9 +449,9 @@ export default {
           this.currentSort.newName = this.sortObj.nameSort
         }
       }
-      if (initpage) {
-        this.pagebj.current = 1
-      }
+      // if (initpage) {
+      //   this.pagebj.current = 1
+      // }
       entpartInter({
         powerId: 1,
         page: this.pagebj.current,
@@ -508,6 +508,7 @@ export default {
     },
     // 删除权限
     delEntRoot (status, data) {
+      this.currentDelStatus = status
       let delId = ''
       if (status === 'all') {
         this.selectDepart.forEach((v, i) => {
@@ -557,7 +558,7 @@ export default {
         this.pagebj.current -= 1
       }
       setNicheDis({
-        id: this.ruleForm.personId,
+        id: this.ruleForm.personId || this.currentArr,
         powerId: 0
       }).then((res) => {
         this.$refs.childDel.dialogTableVisible = false
@@ -586,7 +587,7 @@ export default {
       }
       this.$refs.powerNode.origin = 'entpart'
       // this.$refs.powerNode.currentIndex = this.currentIndex
-      this.$refs.powerNode.titleMsg = '选择企业商机分配人员'
+      this.$refs.powerNode.titleMsg = '选择商机分配人员'
       this.$refs.powerNode.getData()
     },
     // 保存、编辑人员信息

+ 50 - 5
entbase-pc/src/views/ent/components/personal.vue

@@ -96,12 +96,12 @@
         <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 ? '企业商机分配' : '' }}
+              {{ scope.row.role }}<i>、</i>{{ setAllocition(scope.row.niche_dis) }}
             </span>
             <span v-if="scope.row.role == '部门管理员'" class="depart_user">
-              {{ scope.row.role }}<i v-if="scope.row.niche_dis">、</i>{{ scope.row.niche_dis ? '部门商机分配' : '' }}
+              {{ scope.row.role }}<i>、</i>{{ setAllocition(scope.row.niche_dis) }}
             </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>
+            <span v-if="scope.row.role == ''">员工<i>、</i><span>{{ setAllocition(scope.row.niche_dis) }}</span></span>
           </template>
         </el-table-column>
         <el-table-column
@@ -200,6 +200,17 @@
               @focus="chooseDepartFc"
             ></el-input>
           </label>
+          <label class="">
+            <span>角色:</span>
+            <el-select v-model="ruleForm.allocation" placeholder="请选择角色">
+              <el-option
+                v-for="item in alloList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </label>
         </div>
       </template>
       <template slot="deleteBtn">
@@ -337,6 +348,7 @@ export default {
         email: '',
         personId: '',
         account: '',
+        allocation: '',
         nameStatus: false,
         phoneStatus: false,
         emailStatus: false,
@@ -374,7 +386,17 @@ export default {
       rules: {
         pass: [{ validator: validatePass, trigger: 'blur' }],
         checkPass: [{ validator: validatePass2, trigger: 'blur' }]
-      }
+      },
+      alloList: [{
+        value: '1',
+        label: '销售'
+      }, {
+        value: '2',
+        label: '资讯分配'
+      }, {
+        value: '3',
+        label: '资讯分配+销售'
+      }],
     }
   },
   created () {
@@ -418,6 +440,27 @@ export default {
     }
   },
   methods: {
+    setAllocition (data) {
+      let str = ''
+      switch (data) {
+        case 0:
+          str = '销售'
+          break;
+        case 1:
+          str = '企业资讯分配'
+          break;
+        case 2:
+          str = '部门资讯分配'
+          break;
+        case 3:
+          str = '企业资讯分配+销售'
+          break;
+        case 4:
+          str = '部门资讯分配+销售'
+          break;
+      }
+      return str
+    },
     // 打开重置密码弹框 传入姓名、手机号
     resetPwdFn (data) {
       this.pwdForm.name = data.name
@@ -692,7 +735,8 @@ export default {
             phone: this.ruleForm.phone,
             mail: this.ruleForm.email,
             user_name: this.ruleForm.account,
-            id: deparId
+            id: deparId,
+            nicheDis: this.ruleForm.allocation
           }).then((res) => {
             this.pending = false
             if (res.data.status == 1) {
@@ -718,6 +762,7 @@ export default {
             mail: this.ruleForm.email,
             did: deparId,
             user_name: this.ruleForm.account,
+            nicheDis: this.ruleForm.allocation,
             id: this.ruleForm.personId
           }).then((res) => {
             this.pending = false

+ 4 - 4
entbase-pc/src/views/ent/myEnt.vue

@@ -29,9 +29,9 @@
       </div>
       <div class="ent-content-group">
         <el-tabs v-model="activeName" @tab-click="handleClick" class="tab-group">
-          <el-tab-pane label="企业管理" name="qy" v-if="company">
+          <!-- <el-tab-pane label="企业管理" name="qy" v-if="company">
             <v-entpart v-if="activeName == 'qy'"></v-entpart>
-          </el-tab-pane>
+          </el-tab-pane> -->
           <el-tab-pane label="部门管理" name="bm" v-if="(company || deptAuth)">
             <v-depart ref="depart" v-if="activeName == 'bm'"></v-depart>
           </el-tab-pane>
@@ -176,7 +176,7 @@ export default {
   // },
   created () {
     window.te = this
-    this.activeName = this.$route.query.tab ? this.$route.query.tab : 'qy'
+    this.activeName = this.$route.query.tab ? this.$route.query.tab : 'bm'
     this.source = this.$route.query.source ? this.$route.query.source : ''
     this.getEntInfo()
     // this.myentChange() // p278 移除企业切换
@@ -318,7 +318,7 @@ export default {
         this.companyStatus = res.data.ent_status > 0 // 商机管理是否购买企业  0:未生效;1:生效;-1:到期
 
         if (this.company) {
-          this.activeName = 'qy'
+          this.activeName = 'bm'
         }
         if (!this.company && !this.$route.query.tab) {
           this.activeName = 'ry'