【fix ESLint】src/components/jerobiz
This commit is contained in:
@@ -16,6 +16,7 @@ import JSelectBizComponent from './JSelectBizComponent'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'JSelectMultiUser',
|
name: 'JSelectMultiUser',
|
||||||
|
// eslint-disable-next-line vue/no-unused-components
|
||||||
components: { JDate, JSelectBizComponent },
|
components: { JDate, JSelectBizComponent },
|
||||||
props: {
|
props: {
|
||||||
value: null, // any type
|
value: null, // any type
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<a-spin tip="Loading..." :spinning="false">
|
<a-spin tip="Loading..." :spinning="false">
|
||||||
<a-input-search style="margin-bottom: 1px" placeholder="请输入部门名称按回车进行搜索" @search="onSearch" />
|
<a-input-search style="margin-bottom: 1px" placeholder="请输入部门名称按回车进行搜索" @search="onSearch" />
|
||||||
<a-tree
|
<a-tree
|
||||||
checkable
|
:checkable="true"
|
||||||
:class="treeScreenClass"
|
:class="treeScreenClass"
|
||||||
:treeData="treeData"
|
:treeData="treeData"
|
||||||
:checkStrictly="checkStrictly"
|
:checkStrictly="checkStrictly"
|
||||||
@@ -117,7 +117,7 @@ export default {
|
|||||||
initDepartComponent (flag) {
|
initDepartComponent (flag) {
|
||||||
const arr = []
|
const arr = []
|
||||||
// 该方法两个地方用 1.visible改变事件重新设置选中项 2.组件编辑页面回显
|
// 该方法两个地方用 1.visible改变事件重新设置选中项 2.组件编辑页面回显
|
||||||
const fieldName = flag == true ? 'key' : this.text
|
const fieldName = flag === true ? 'key' : this.text
|
||||||
if (this.departId) {
|
if (this.departId) {
|
||||||
const arr2 = this.departId.split(',')
|
const arr2 = this.departId.split(',')
|
||||||
for (const item of this.dataList) {
|
for (const item of this.dataList) {
|
||||||
@@ -126,7 +126,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (flag == true) {
|
if (flag === true) {
|
||||||
this.checkedKeys = [...arr]
|
this.checkedKeys = [...arr]
|
||||||
} else {
|
} else {
|
||||||
this.$emit('initComp', arr.join(','))
|
this.$emit('initComp', arr.join(','))
|
||||||
@@ -196,7 +196,7 @@ export default {
|
|||||||
this.autoExpandParent = false
|
this.autoExpandParent = false
|
||||||
},
|
},
|
||||||
handleSubmit () {
|
handleSubmit () {
|
||||||
if (!this.checkedKeys || this.checkedKeys.length == 0) {
|
if (!this.checkedKeys || this.checkedKeys.length === 0) {
|
||||||
this.$emit('ok', '')
|
this.$emit('ok', '')
|
||||||
} else {
|
} else {
|
||||||
const checkRow = this.getCheckedRows(this.checkedKeys)
|
const checkRow = this.getCheckedRows(this.checkedKeys)
|
||||||
@@ -267,9 +267,9 @@ export default {
|
|||||||
return rows
|
return rows
|
||||||
},
|
},
|
||||||
switchCheckStrictly (v) {
|
switchCheckStrictly (v) {
|
||||||
if (v == 1) {
|
if (v === 1) {
|
||||||
this.checkStrictly = false
|
this.checkStrictly = false
|
||||||
} else if (v == 2) {
|
} else if (v === 2) {
|
||||||
this.checkStrictly = true
|
this.checkStrictly = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { filterObj } from '@/utils/util'
|
import { filterObj } from '@/utils/util'
|
||||||
import { queryDepartTreeList, getUserList, queryUserByDepId, queryDepartTreeSync } from '@/api/api'
|
import { getUserList, queryUserByDepId, queryDepartTreeSync } from '@/api/api'
|
||||||
import { getAction } from '@/api/manage'
|
import { getAction } from '@/api/manage'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -135,7 +135,7 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
// 计算属性的 getter
|
// 计算属性的 getter
|
||||||
getType: function () {
|
getType: function () {
|
||||||
return this.multi == true ? 'checkbox' : 'radio'
|
return this.multi === true ? 'checkbox' : 'radio'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -154,7 +154,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
initUserNames () {
|
initUserNames () {
|
||||||
if (this.userIds) {
|
if (this.userIds) {
|
||||||
// 这里最后加一个 , 的原因是因为无论如何都要使用 in 查询,防止后台进行了模糊匹配,导致查询结果不准确
|
// 这里最后加一个 , 的原因是无论如何都要使用 in 查询,防止后台进行了模糊匹配,导致查询结果不准确
|
||||||
const values = this.userIds.split(',') + ','
|
const values = this.userIds.split(',') + ','
|
||||||
const param = { [this.store]: values }
|
const param = { [this.store]: values }
|
||||||
getAction('/sys/user/getMultiUser', param).then((list) => {
|
getAction('/sys/user/getMultiUser', param).then((list) => {
|
||||||
@@ -258,7 +258,7 @@ export default {
|
|||||||
that.close()
|
that.close()
|
||||||
},
|
},
|
||||||
// 获取选择用户信息
|
// 获取选择用户信息
|
||||||
getSelectUserRows (rowId) {
|
getSelectUserRows (/* rowId */) {
|
||||||
const dataSource = this.dataSource
|
const dataSource = this.dataSource
|
||||||
let userIds = ''
|
let userIds = ''
|
||||||
this.selectUserRows = []
|
this.selectUserRows = []
|
||||||
@@ -316,7 +316,7 @@ export default {
|
|||||||
queryDepartTreeSync({ pid: treeNode.dataRef.id }).then((res) => {
|
queryDepartTreeSync({ pid: treeNode.dataRef.id }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
// 判断chidlren是否为空,并修改isLeaf属性值
|
// 判断chidlren是否为空,并修改isLeaf属性值
|
||||||
if (res.result.length == 0) {
|
if (res.result.length === 0) {
|
||||||
treeNode.dataRef.isLeaf = true
|
treeNode.dataRef.isLeaf = true
|
||||||
} else {
|
} else {
|
||||||
treeNode.dataRef.children = res.result
|
treeNode.dataRef.children = res.result
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
selectedRowKeys = []
|
selectedRowKeys = []
|
||||||
}
|
}
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve/* , reject */) => {
|
||||||
const model = this.$confirm({
|
const model = this.$confirm({
|
||||||
title: '同步',
|
title: '同步',
|
||||||
content,
|
content,
|
||||||
@@ -202,7 +202,7 @@ export async function loadEnabledTypes () {
|
|||||||
enabledTypes = cloneObject(result)
|
enabledTypes = cloneObject(result)
|
||||||
return result
|
return result
|
||||||
} else {
|
} else {
|
||||||
console.warn('getEnabledType查询失败:', res)
|
console.warn('getEnabledType查询失败:', result)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {}
|
return {}
|
||||||
|
|||||||
Reference in New Issue
Block a user