| <template> | 
|   <div class="function-btn"> | 
|     <div class="btn-list"> | 
|       <el-button size="small" type="text" class="blue" @click="addBtnClick">新建</el-button> | 
|       <!-- <el-button v-if="receive" size="small" type="text" class="gray" @click="receiveBtnClick">领取</el-button> --> | 
|       <el-button v-if="allocation" size="small" type="text" class="gray" @click="allocationBtnClick" disabled | 
|         >分配</el-button | 
|       > | 
|       <el-button v-if="deleteButton" size="small" type="text" class="gray" @click="deleteBtnClick">删除</el-button> | 
|       <!-- <el-button v-if="submitApproval" size="small" type="text" class="gray width64" @click="submitApprovalBtnClick" | 
|         >提交审批 | 
|       </el-button> --> | 
|       <el-button v-if="duplicateCheck" size="small" type="text" class="gray" @click="duplicateCheckBtnClick" disabled | 
|         >查重</el-button | 
|       > | 
|       <!-- <el-button v-if="importButton" size="small" type="text" class="gray" @click="importBtnClick">导入</el-button> | 
|       <el-button v-if="departmentSet" size="small" type="text" class="gray" @click="departmentSetClick" | 
|         >部门设置</el-button | 
|       > | 
|       <el-button v-if="dataRange" size="small" type="text" class="gray" @click="dataRangeClick">数据范围</el-button> | 
|       <el-button v-if="loginControl" size="small" type="text" class="gray" @click="loginControlClick" | 
|         >登录控制</el-button | 
|       > --> | 
|   | 
|       <!-- <el-dropdown trigger="click"> | 
|         <div class="gray btn-icon" @click="operateBtnClick"> | 
|           <i class="el-icon-present"></i> | 
|         </div> | 
|         <el-dropdown-menu slot="dropdown"> | 
|           <el-dropdown-item | 
|             v-for="operate in operatesList" | 
|             @click.native="getOperateClick(operate)" | 
|             :key="operate.id" | 
|             >{{ operate.name }}</el-dropdown-item | 
|           > | 
|         </el-dropdown-menu> | 
|       </el-dropdown> | 
|       <div class="view-scope"> | 
|         <div class="view-scope-title">查看范围</div> | 
|         <el-select v-model="viewScopeValue" placeholder="请选择" class="view-scope-sel" size="mini"> | 
|           <el-option v-for="item in viewScopeOptions" :key="item.value" :label="item.label" :value="item.value"> | 
|           </el-option> | 
|         </el-select> | 
|         <div class="view-scope-btn" @click="viewScopeClick"> | 
|           <i class="el-icon-user"></i> | 
|         </div> | 
|       </div> --> | 
|       <!-- 列表 --> | 
|       <!-- <div v-if="listButton" class="btn-icon" @click="listBtnClick"> | 
|         <i class="el-icon-tickets"></i> | 
|       </div> --> | 
|       <!-- 地图 --> | 
|       <!-- <div v-if="mapButton" class="btn-icon" title="地图" @click="mapBtnClick"> | 
|         <i class="el-icon-location-information"></i> | 
|       </div> --> | 
|       <!-- 统计 --> | 
|       <!-- <div v-if="statistics" class="btn-icon" title="统计" @click="statisticsBtnClick"> | 
|         <i class="el-icon-data-line"></i> | 
|       </div> --> | 
|       <!-- 客户漏斗 --> | 
|       <!-- <div v-if="customFunnel" class="btn-icon" title="客户漏斗" @click="statisticsBtnClick" style="color: #666"> | 
|         <i class="el-icon-postcard"></i> | 
|       </div> --> | 
|     </div> | 
|     <!-- 高级查看范围 --> | 
|     <HighViewScopeDialog v-if="highViewScopeConfig.visible" :editCommonConfig="highViewScopeConfig" /> | 
|   </div> | 
| </template> | 
|   | 
| <script> | 
| import HighViewScopeDialog from "@/views/other/commonDialog/HighViewScopeDialog" | 
| export default { | 
|   name: "PublicFunctionBtnView", | 
|   components: { HighViewScopeDialog }, | 
|   props: { | 
|     receive: { | 
|       type: Boolean, | 
|       default: false | 
|     }, | 
|     allocation: { | 
|       type: Boolean, | 
|       default: false | 
|     }, | 
|     deleteButton: { | 
|       type: Boolean, | 
|       default: true | 
|     }, | 
|     duplicateCheck: { | 
|       type: Boolean, | 
|       default: false | 
|     }, | 
|     submitApproval: { | 
|       type: Boolean, | 
|       default: false | 
|     }, | 
|     listButton: { | 
|       type: Boolean, | 
|       default: false | 
|     }, | 
|     importButton: { | 
|       type: Boolean, | 
|       default: true | 
|     }, | 
|     departmentSet: { | 
|       type: Boolean, | 
|       default: false | 
|     }, | 
|     dataRange: { | 
|       type: Boolean, | 
|       default: false | 
|     }, | 
|     loginControl: { | 
|       type: Boolean, | 
|       default: false | 
|     }, | 
|     mapButton: { | 
|       type: Boolean, | 
|       default: false | 
|     }, | 
|     statistics: { | 
|       type: Boolean, | 
|       default: false | 
|     }, | 
|     customFunnel: { | 
|       type: Boolean, | 
|       default: false | 
|     }, | 
|     operatesList: { | 
|       type: Array, | 
|       default: () => [] | 
|     } | 
|   }, | 
|   data() { | 
|     return { | 
|       viewScopeOptions: [ | 
|         { value: "1", label: "全部" }, | 
|         { value: "2", label: "高级" }, | 
|         { value: "3", label: "我负责的" }, | 
|         { value: "4", label: "我创建的" }, | 
|         { value: "5", label: "共享给我的" }, | 
|         { value: "6", label: "我共享给他人的" } | 
|       ], | 
|       viewScopeValue: "全部", | 
|       highViewScopeConfig: { | 
|         visible: false, | 
|         infomation: {} | 
|       } | 
|     } | 
|   }, | 
|   methods: { | 
|     // 新建 | 
|     addBtnClick() { | 
|       this.$parent.addBtnClick() | 
|     }, | 
|     // 领取 | 
|     receiveBtnClick() {}, | 
|     // 分配 | 
|     allocationBtnClick() { | 
|       this.$emit("allocationBtnClick") | 
|     }, | 
|     // 删除 | 
|     deleteBtnClick() { | 
|       this.$emit("batchDelete") | 
|     }, | 
|     // 提交审批 | 
|     submitApprovalBtnClick() {}, | 
|     // 查重 | 
|     duplicateCheckBtnClick() {}, | 
|     // 导入 | 
|     importBtnClick() { | 
|       this.$parent.importClitk() | 
|     }, | 
|     // 部门设置 | 
|     departmentSetClick() {}, | 
|     // 数据范围 | 
|     dataRangeClick() {}, | 
|     // 登录控制 | 
|     loginControlClick() {}, | 
|     // 高级查看范围 | 
|     viewScopeClick() { | 
|       this.highViewScopeConfig.visible = true | 
|     }, | 
|     // 操作 | 
|     operateBtnClick() {}, | 
|     // 列表 | 
|     listBtnClick() {}, | 
|     // 地图 | 
|     mapBtnClick() {}, | 
|     // 统计 | 
|     statisticsBtnClick() {}, | 
|     // 操作图标按钮 | 
|     getOperateClick(operate) { | 
|       console.log(operate) | 
|     } | 
|   } | 
| } | 
| </script> | 
|   | 
| <!-- Add "scoped" attribute to limit CSS to this component only --> | 
| <style lang="scss" scoped> | 
| .function-btn { | 
|   .btn-list { | 
|     display: flex; | 
|     .el-button { | 
|       height: 32px; | 
|     } | 
|     .blue { | 
|       background-color: #2185ee; | 
|       width: 54px; | 
|       color: #ffffff; | 
|     } | 
|     .gray { | 
|       background-color: #f0f3f7; | 
|       width: 54px; | 
|       color: #666; | 
|     } | 
|     .width64 { | 
|       width: 64px; | 
|     } | 
|     .btn-icon { | 
|       width: 48px; | 
|       margin-left: 10px; | 
|       height: 32px; | 
|       line-height: 32px; | 
|       text-align: center; | 
|       font-size: 20px; | 
|       border-radius: 4px; | 
|       color: rgb(0, 102, 255); | 
|       background-color: #f2f4fb; | 
|       cursor: pointer; | 
|     } | 
|     .view-scope { | 
|       display: flex; | 
|       height: 32px; | 
|       line-height: 32px; | 
|       .view-scope-title { | 
|         margin-left: 10px; | 
|         font-size: 13px; | 
|         color: #333; | 
|       } | 
|       .view-scope-sel { | 
|         width: 165px; | 
|         margin-left: 10px; | 
|       } | 
|       .view-scope-btn { | 
|         font-size: 16px; | 
|         margin-left: 10px; | 
|         color: #bebebe; | 
|       } | 
|     } | 
|   } | 
| } | 
| </style> |