【fix ESLint】src/components/jerobiz

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