添加部分主要注解
This commit is contained in:
parent
a6f94340a0
commit
06da6c1b8b
@ -1,4 +1,13 @@
|
||||
<!-- -->
|
||||
/**
|
||||
* 组件名称
|
||||
* @desc 项目的头像组件
|
||||
* @obj {Object} [src] - 头像地址
|
||||
* @obj {Object} [name] - 用户名称
|
||||
* @obj {Object} [departmentName] - 用户所在部门
|
||||
* @isShow {Boolean} [] - 是否只显示用户头像
|
||||
* @example 调用示例
|
||||
* <InfoHeader :isShow='false' :obj="{src:'图片地址',name:'用户姓名',departmentName:'技术部门'}" />
|
||||
*/
|
||||
<template>
|
||||
<div class="header-title">
|
||||
<div class="header-title-img">
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
<template>
|
||||
<svg :class="svgClass" aria-hidden="true">
|
||||
<use :xlink:href="iconName"/>
|
||||
|
||||
@ -1,4 +1,16 @@
|
||||
<!-- -->
|
||||
/**
|
||||
* 组件名称
|
||||
* @desc 获取公司部门
|
||||
* @title 组件的标题
|
||||
* @value 绑定 form 表单的字段
|
||||
* @isShow 控制组件的显示隐藏
|
||||
* @showDataList 确认按钮后的数据更新
|
||||
* @cb 确认后的回调 添加@cb 后 动态绑定 showDataList 不会进行更新
|
||||
|
||||
* @example 调用示例
|
||||
* <getDepart v-if="isSshowOutIds" :value.sync='form.outIds' :isShow.sync='isSshowOutIds' :showDataList.sync='outIdsLsit'/>
|
||||
* <getDepart @cb='handleCheckStaffIds' v-if="isShowPersonnel" :value.sync='form.staffIds' :isShow.sync='isShowPersonnel' :showDataList.sync='personnelList'/>
|
||||
*/
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
|
||||
@ -1,4 +1,16 @@
|
||||
<!-- -->
|
||||
/**
|
||||
* 组件名称
|
||||
* @desc 获取公司人员的组件
|
||||
* @title 组件的标题
|
||||
* @value 绑定 form 表单的字段
|
||||
* @isShow 控制组件的显示隐藏
|
||||
* @showDataList 确认按钮后的数据更新
|
||||
* @cb 确认后的回调 添加@cb 后 动态绑定 showDataList 不会进行更新
|
||||
|
||||
* @example 调用示例
|
||||
* <getPersonnel v-if="isSshowOutIds" :value.sync='form.outIds' :isShow.sync='isSshowOutIds' :showDataList.sync='outIdsLsit'/>
|
||||
* <getPersonnel @cb='handleCheckStaffIds' v-if="isShowPersonnel" :value.sync='form.staffIds' :isShow.sync='isShowPersonnel' :showDataList.sync='personnelList'/>
|
||||
*/
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<!-- -->
|
||||
<!--该组件是页面顶部带返回功能的头部 -->
|
||||
<template>
|
||||
<div>
|
||||
<div class="noNav">
|
||||
|
||||
@ -26,6 +26,11 @@ export function debounce (func, wait, immediate) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @desc 处理后端选择人员后 list进行处理成接口需要的格式
|
||||
* @param func 函数
|
||||
* @param arr 部门数组
|
||||
*/
|
||||
export function personlGetForm (arr = []) {
|
||||
const params = {
|
||||
list: [],
|
||||
@ -43,12 +48,18 @@ export function personlGetForm (arr = []) {
|
||||
arr = arr.sort((a, b) => a[key] - b[key])
|
||||
params.list = arr
|
||||
for (let i in arr) {
|
||||
// 将数组的 id 进行拼接成后端所需格式,通过对象返回
|
||||
if (i < 1) { params.title = params.title + (i === '0' ? '' : ',') + arr[i].name }
|
||||
params.value += arr[i][key] + (i < arr.length - 1 ? ',' : '')
|
||||
}
|
||||
return params
|
||||
}
|
||||
|
||||
/**
|
||||
* @desc 处理后端选择人员后 list进行处理成接口需要的格式
|
||||
* @param func 函数
|
||||
* @param arr 部门数组
|
||||
*/
|
||||
export function departGetForm (arr = []) {
|
||||
const params = {
|
||||
list: [],
|
||||
@ -69,6 +80,7 @@ export function departGetForm (arr = []) {
|
||||
params.list = arr
|
||||
for (let i in arr) {
|
||||
if (i < 1) {
|
||||
// 将数组的 id 进行拼接成后端所需格式,通过对象返回
|
||||
params.title = params.title + (i === '0' ? '' : ',') + arr[i][key1]
|
||||
}
|
||||
params.value += arr[i][key] + (i < arr.length - 1 ? ',' : '')
|
||||
@ -76,6 +88,7 @@ export function departGetForm (arr = []) {
|
||||
return params
|
||||
}
|
||||
|
||||
// input 输入框只输入数字0-100处理,主要处理权重
|
||||
export function handleInput (form) {
|
||||
let value = this[form.split('.')[0]][form.split('.')[1]]
|
||||
console.log('value: ', typeof value)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user