【fix ESLint】src/views/system
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
<span style="user-select: none">
|
||||
<a-tree
|
||||
v-if="loading"
|
||||
checkable
|
||||
:checkable="true"
|
||||
multiple
|
||||
@select="onSelect"
|
||||
@check="onCheck"
|
||||
@@ -260,7 +260,7 @@ export default {
|
||||
this.refresh()
|
||||
},
|
||||
loadTree () {
|
||||
var that = this
|
||||
const that = this
|
||||
// 上级部门树信息
|
||||
that.treeData = []
|
||||
// 保存的树信息,搜索是需要用到
|
||||
@@ -294,12 +294,12 @@ export default {
|
||||
})
|
||||
},
|
||||
loadSubTree (treeNode) {
|
||||
var that = this
|
||||
const that = this
|
||||
return new Promise(resolve => {
|
||||
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
|
||||
return
|
||||
} else {
|
||||
@@ -316,8 +316,8 @@ export default {
|
||||
})
|
||||
resolve()
|
||||
})
|
||||
// 保存全部部门信息,方便后面搜索使用
|
||||
that.departTreeAll = that.departTree
|
||||
// 保存全部部门 信息,方便后面搜索使用
|
||||
// that.departTreeAll = that.departTree
|
||||
},
|
||||
refresh () {
|
||||
this.loading = true
|
||||
@@ -342,7 +342,7 @@ export default {
|
||||
},
|
||||
// 右键点击下拉框改变事件
|
||||
dropStatus (visible) {
|
||||
if (visible == false) {
|
||||
if (visible === false) {
|
||||
this.dropTrigger = ''
|
||||
}
|
||||
},
|
||||
@@ -358,11 +358,11 @@ export default {
|
||||
if (this.checkedKeys.length <= 0) {
|
||||
this.$message.warning('请选择一条记录!')
|
||||
} else {
|
||||
var ids = ''
|
||||
for (var a = 0; a < this.checkedKeys.length; a++) {
|
||||
let ids = ''
|
||||
for (let a = 0; a < this.checkedKeys.length; a++) {
|
||||
ids += this.checkedKeys[a] + ','
|
||||
}
|
||||
var that = this
|
||||
const that = this
|
||||
this.$confirm({
|
||||
title: '确认删除',
|
||||
content: '确定要删除所选中的 ' + this.checkedKeys.length + ' 条数据,以及子节点数据吗?',
|
||||
@@ -432,11 +432,7 @@ export default {
|
||||
},
|
||||
// 触发onSelect事件时,为部门树右侧的form表单赋值
|
||||
setValuesToForm (record) {
|
||||
if (record.orgCategory == '1') {
|
||||
this.orgCategoryDisabled = true
|
||||
} else {
|
||||
this.orgCategoryDisabled = false
|
||||
}
|
||||
this.orgCategoryDisabled = (record.orgCategory + '') === '1'
|
||||
this.$nextTick(() => {
|
||||
this.model = cloneObject(record)
|
||||
})
|
||||
@@ -462,7 +458,7 @@ export default {
|
||||
this.currSelected.receiptTriggerType = value
|
||||
},
|
||||
submitCurrForm () {
|
||||
this.$refs.form.validate((ok, err) => {
|
||||
this.$refs.form.validate((ok) => {
|
||||
if (ok) {
|
||||
if (!this.currSelected.id) {
|
||||
this.$message.warning('请点击选择要修改部门!')
|
||||
@@ -486,7 +482,7 @@ export default {
|
||||
this.model = this.currSelected
|
||||
},
|
||||
nodeSettingFormSubmit () {
|
||||
this.$refs.form.validate((ok, err) => {
|
||||
this.$refs.form.validate((ok) => {
|
||||
if (ok) {
|
||||
console.log('Received values of form: ', this.model)
|
||||
}
|
||||
@@ -496,10 +492,10 @@ export default {
|
||||
this.$refs.sysDirectiveModal.show()
|
||||
},
|
||||
handleAdd (num) {
|
||||
if (num == 1) {
|
||||
if (num === 1) {
|
||||
this.$refs.departModal.add()
|
||||
this.$refs.departModal.title = '新增'
|
||||
} else if (num == 2) {
|
||||
} else if (num === 2) {
|
||||
const key = this.currSelected.key
|
||||
if (!key) {
|
||||
this.$message.warning('请先点击选中上级部门!')
|
||||
@@ -513,7 +509,7 @@ export default {
|
||||
}
|
||||
},
|
||||
handleDelete () {
|
||||
var that = this
|
||||
const that = this
|
||||
this.$confirm({
|
||||
title: '确认删除',
|
||||
content: '确定要删除此部门以及子节点数据吗?',
|
||||
@@ -575,9 +571,9 @@ export default {
|
||||
this.checkedKeys = []
|
||||
},
|
||||
switchCheckStrictly (v) {
|
||||
if (v == 1) {
|
||||
if (v === 1) {
|
||||
this.checkStrictly = false
|
||||
} else if (v == 2) {
|
||||
} else if (v === 2) {
|
||||
this.checkStrictly = true
|
||||
}
|
||||
},
|
||||
@@ -597,6 +593,7 @@ export default {
|
||||
if (!value || new RegExp(/^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/).test(value)) {
|
||||
callback()
|
||||
} else {
|
||||
// eslint-disable-next-line standard/no-callback-literal
|
||||
callback('您的手机号码格式不正确!')
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user