【fix ESLint】src/views/system
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
@change="handleTableChange"
|
||||
>
|
||||
<!-- 字符串超长截取省略号显示-->
|
||||
<span slot="dataContent" slot-scope="text, record">
|
||||
<span slot="dataContent" slot-scope="text">
|
||||
<j-ellipsis :value="text" :length="80" />
|
||||
</span>
|
||||
</a-table>
|
||||
@@ -111,10 +111,10 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleCompare: function () {
|
||||
if (!this.selectionRows || this.selectionRows.length != 2) {
|
||||
if (!this.selectionRows || this.selectionRows.length !== 2) {
|
||||
this.openNotifIcon('请选择两条数据')
|
||||
return false
|
||||
} else if (this.selectionRows[0].dataId != this.selectionRows[1].dataId) {
|
||||
} else if (this.selectionRows[0].dataId !== this.selectionRows[1].dataId) {
|
||||
this.openNotifIcon('请选择相同的数据库表和数据ID进行比较')
|
||||
return false
|
||||
} else {
|
||||
@@ -134,5 +134,5 @@ export default {
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less'
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<a-dropdown :trigger="[this.dropTrigger]" @visibleChange="dropStatus">
|
||||
<span style="user-select: none">
|
||||
<a-tree
|
||||
checkable
|
||||
:checkable="true"
|
||||
multiple
|
||||
@select="onSelect"
|
||||
@check="onCheck"
|
||||
@@ -258,7 +258,7 @@ export default {
|
||||
this.refresh()
|
||||
},
|
||||
loadTree () {
|
||||
var that = this
|
||||
const that = this
|
||||
that.treeData = []
|
||||
that.departTree = []
|
||||
queryDepartTreeList().then((res) => {
|
||||
@@ -306,7 +306,7 @@ export default {
|
||||
},
|
||||
// 右键点击下拉框改变事件
|
||||
dropStatus (visible) {
|
||||
if (visible == false) {
|
||||
if (visible === false) {
|
||||
this.dropTrigger = ''
|
||||
}
|
||||
},
|
||||
@@ -322,11 +322,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 + ' 条数据,以及子节点数据吗?',
|
||||
@@ -396,11 +396,7 @@ export default {
|
||||
},
|
||||
// 触发onSelect事件时,为部门树右侧的form表单赋值
|
||||
setValuesToForm (record) {
|
||||
if (record.orgCategory == '1') {
|
||||
this.orgCategoryDisabled = true
|
||||
} else {
|
||||
this.orgCategoryDisabled = false
|
||||
}
|
||||
this.orgCategoryDisabled = (record.orgCategory + '') === '1'
|
||||
},
|
||||
getCurrSelectedTitle () {
|
||||
return !this.currSelected.title ? '' : this.currSelected.title
|
||||
@@ -455,10 +451,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('请先点击选中上级部门!')
|
||||
@@ -472,7 +468,7 @@ export default {
|
||||
}
|
||||
},
|
||||
handleDelete () {
|
||||
var that = this
|
||||
const that = this
|
||||
this.$confirm({
|
||||
title: '确认删除',
|
||||
content: '确定要删除此部门以及子节点数据吗?',
|
||||
@@ -532,9 +528,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
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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('您的手机号码格式不正确!')
|
||||
}
|
||||
},
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
/>
|
||||
|
||||
</template>
|
||||
<div style="margin-top: 24px;" v-else-if="userIdentity === '2' && departTree.length==0">
|
||||
<div style="margin-top: 24px;" v-else-if="userIdentity === '2' && departTree.length===0">
|
||||
<h3><span>您的部门下暂无有效部门信息</span></h3>
|
||||
</div>
|
||||
<div style="margin-top: 24px;" v-else><h3>普通员工暂无此权限</h3></div>
|
||||
@@ -109,7 +109,7 @@ export default {
|
||||
this.$refs.DeptUserInfo.currentDeptId = ''
|
||||
},
|
||||
loadTree () {
|
||||
var that = this
|
||||
const that = this
|
||||
that.treeData = []
|
||||
that.departTree = []
|
||||
queryMyDepartTreeList().then((res) => {
|
||||
@@ -199,5 +199,5 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less'
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
|
||||
@@ -115,7 +115,7 @@ export default {
|
||||
</div>),
|
||||
centered: false,
|
||||
onOk: () => {
|
||||
var that = this
|
||||
const that = this
|
||||
deleteAction('/sys/dict/deletePhysic/' + id).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
|
||||
@@ -170,7 +170,7 @@ export default {
|
||||
// update--begin--autor:wangshuai-----date:20191204------for:清空总条数 teambition JT-113------
|
||||
this.ipagination.total = 0
|
||||
// update--end--autor:wangshuai-----date:20191204------for:清空总条数 teambition JT-113------
|
||||
var param = Object.assign({}, this.queryParam)
|
||||
const param = Object.assign({}, this.queryParam)
|
||||
param.dictId = this.dictId
|
||||
param.field = this.getQueryField()
|
||||
param.pageNo = this.ipagination.current
|
||||
@@ -207,7 +207,7 @@ export default {
|
||||
// update--begin--autor:wangshuai-----date:20191204------for:系统管理 数据字典禁用和正常区别开,添加背景颜色 teambition JT-22------
|
||||
// 增加样式方法返回值
|
||||
getRowClassname (record) {
|
||||
if (record.status == 0) {
|
||||
if ((record.status + '') === '0') {
|
||||
return 'data-rule-invalid'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getQueryParams () {
|
||||
var param = Object.assign({}, this.queryParam, this.isorter)
|
||||
const param = Object.assign({}, this.queryParam, this.isorter)
|
||||
param.field = this.getQueryField()
|
||||
param.pageNo = this.ipagination.current
|
||||
param.pageSize = this.ipagination.pageSize
|
||||
@@ -170,7 +170,7 @@ export default {
|
||||
},
|
||||
// 重置字典类型搜索框的内容
|
||||
searchReset () {
|
||||
var that = this
|
||||
const that = this
|
||||
that.queryParam.dictName = ''
|
||||
that.queryParam.dictCode = ''
|
||||
that.loadData(this.ipagination.current)
|
||||
@@ -204,5 +204,5 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less'
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
|
||||
@@ -59,12 +59,12 @@
|
||||
:loading="loading"
|
||||
@change="handleTableChange">
|
||||
|
||||
<div v-show="queryParam.logType==2" slot="expandedRowRender" slot-scope="record" style="margin: 0">
|
||||
<div v-show="(queryParam.logType+'')==='2'" slot="expandedRowRender" slot-scope="record" style="margin: 0">
|
||||
<div style="margin-bottom: 5px"><a-badge status="success" style="vertical-align: middle;"/><span style="vertical-align: middle;">请求方法:{{ record.method }}</span></div>
|
||||
<div><a-badge status="processing" style="vertical-align: middle;"/><span style="vertical-align: middle;">请求参数:{{ record.requestParam }}</span></div>
|
||||
</div>
|
||||
<!-- 字符串超长截取省略号显示-->
|
||||
<span slot="logContent" slot-scope="text, record">
|
||||
<span slot="logContent" slot-scope="text">
|
||||
<j-ellipsis :value="text" :length="40"/>
|
||||
</span>
|
||||
</a-table>
|
||||
@@ -178,7 +178,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getQueryParams () {
|
||||
var param = Object.assign({}, this.queryParam, this.isorter)
|
||||
const param = Object.assign({}, this.queryParam, this.isorter)
|
||||
param.field = this.getQueryField()
|
||||
param.pageNo = this.ipagination.current
|
||||
param.pageSize = this.ipagination.pageSize
|
||||
@@ -192,8 +192,8 @@ export default {
|
||||
|
||||
// 重置
|
||||
searchReset () {
|
||||
var that = this
|
||||
var logType = that.queryParam.logType
|
||||
const that = this
|
||||
const logType = that.queryParam.logType
|
||||
that.queryParam = {} // 清空查询区域参数
|
||||
that.queryParam.logType = logType
|
||||
that.loadData(this.ipagination.current)
|
||||
@@ -201,10 +201,10 @@ export default {
|
||||
// 日志类型
|
||||
callback (key) {
|
||||
// 动态添加操作类型列
|
||||
if (key == 2) {
|
||||
if ((key + '') === '2') {
|
||||
this.tabKey = '2'
|
||||
this.columns.splice(7, 0, this.operateColumn)
|
||||
} else if (this.columns.length == 9) {
|
||||
} else if (this.columns.length === 9) {
|
||||
this.tabKey = '1'
|
||||
this.columns.splice(7, 1)
|
||||
}
|
||||
@@ -225,5 +225,5 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less'
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
|
||||
@@ -43,13 +43,13 @@
|
||||
</a>
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item>
|
||||
<a href="javascript:;" @click="handleDetail(record)">详情</a>
|
||||
<a href="javascript:" @click="handleDetail(record)">详情</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a href="javascript:;" @click="handleAddSub(record)">添加下级</a>
|
||||
<a href="javascript:" @click="handleAddSub(record)">添加下级</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a href="javascript:;" @click="handleDataRule(record)">数据规则</a>
|
||||
<a href="javascript:" @click="handleDataRule(record)">数据规则</a>
|
||||
</a-menu-item>
|
||||
|
||||
<a-menu-item>
|
||||
@@ -96,11 +96,11 @@ const columns = [
|
||||
dataIndex: 'menuType',
|
||||
key: 'menuType',
|
||||
customRender: function (text) {
|
||||
if (text == 0) {
|
||||
if ((text + '') === '0') {
|
||||
return '菜单'
|
||||
} else if (text == 1) {
|
||||
} else if ((text + '') === '1') {
|
||||
return '菜单'
|
||||
} else if (text == 2) {
|
||||
} else if ((text + '') === '2') {
|
||||
return '按钮/权限'
|
||||
} else {
|
||||
return text
|
||||
|
||||
@@ -123,7 +123,7 @@ export default {
|
||||
}
|
||||
const that = this
|
||||
this.dataSource = []
|
||||
var params = this.getQueryParams()// 查询条件
|
||||
const params = this.getQueryParams()// 查询条件
|
||||
getPermissionRuleList(params).then((res) => {
|
||||
if (res.success) {
|
||||
that.dataSource = res.result
|
||||
@@ -146,7 +146,7 @@ export default {
|
||||
this.$refs.modalForm.title = '新增'
|
||||
},
|
||||
searchQuery () {
|
||||
var params = this.getQueryParams()
|
||||
const params = this.getQueryParams()
|
||||
params.permissionId = this.permId
|
||||
queryPermissionRule(params).then((res) => {
|
||||
if (res.success) {
|
||||
@@ -172,7 +172,7 @@ export default {
|
||||
}
|
||||
},
|
||||
getRowClassname (record) {
|
||||
if (record.status != 1) {
|
||||
if ((record.status + '') !== '1') {
|
||||
return 'data-rule-invalid'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,13 +43,13 @@
|
||||
</a>
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item>
|
||||
<a href="javascript:;" @click="handleDetail(record)">详情</a>
|
||||
<a href="javascript:" @click="handleDetail(record)">详情</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a href="javascript:;" @click="handleAddSub(record)">添加下级</a>
|
||||
<a href="javascript:" @click="handleAddSub(record)">添加下级</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a href="javascript:;" @click="handleDataRule(record)">数据规则</a>
|
||||
<a href="javascript:" @click="handleDataRule(record)">数据规则</a>
|
||||
</a-menu-item>
|
||||
|
||||
<a-menu-item>
|
||||
@@ -96,11 +96,11 @@ const columns = [
|
||||
dataIndex: 'menuType',
|
||||
key: 'menuType',
|
||||
customRender: function (text) {
|
||||
if (text == 0) {
|
||||
if ((text + '') === '0') {
|
||||
return '菜单'
|
||||
} else if (text == 1) {
|
||||
} else if ((text + '') === '1') {
|
||||
return '菜单'
|
||||
} else if (text == 2) {
|
||||
} else if ((text + '') === '2') {
|
||||
return '按钮/权限'
|
||||
} else {
|
||||
return text
|
||||
|
||||
@@ -75,8 +75,8 @@
|
||||
</span>
|
||||
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="resumeJob(record)" v-if="record.status==-1">启动</a>
|
||||
<a @click="pauseJob(record)" v-if="record.status==0">停止</a>
|
||||
<a @click="resumeJob(record)" v-if="record.status==='-1'">启动</a>
|
||||
<a @click="pauseJob(record)" v-if="record.status==='0'">停止</a>
|
||||
|
||||
<a-divider type="vertical" />
|
||||
<a-dropdown>
|
||||
@@ -95,8 +95,8 @@
|
||||
|
||||
<!-- 状态渲染模板 -->
|
||||
<template slot="customRenderStatus" slot-scope="status">
|
||||
<a-tag v-if="status==0" color="green">已启动</a-tag>
|
||||
<a-tag v-if="status==-1" color="orange">已暂停</a-tag>
|
||||
<a-tag v-if="status==='0'" color="green">已启动</a-tag>
|
||||
<a-tag v-if="status==='-1'" color="orange">已暂停</a-tag>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
@@ -210,7 +210,7 @@ export default {
|
||||
// TODO 筛选
|
||||
if (Object.keys(sorter).length > 0) {
|
||||
this.isorter.column = sorter.field
|
||||
this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
|
||||
this.isorter.order = sorter.order === 'ascend' ? 'asc' : 'desc'
|
||||
}
|
||||
// 这种筛选方式只支持单选
|
||||
|
||||
@@ -223,7 +223,7 @@ export default {
|
||||
this.loadData()
|
||||
},
|
||||
pauseJob: function (record) {
|
||||
var that = this
|
||||
const that = this
|
||||
// 暂停定时任务
|
||||
this.$confirm({
|
||||
title: '确认暂停',
|
||||
@@ -242,7 +242,7 @@ export default {
|
||||
})
|
||||
},
|
||||
resumeJob: function (record) {
|
||||
var that = this
|
||||
const that = this
|
||||
// 恢复定时任务
|
||||
this.$confirm({
|
||||
title: '确认启动',
|
||||
@@ -261,7 +261,7 @@ export default {
|
||||
})
|
||||
},
|
||||
executeImmediately (record) {
|
||||
var that = this
|
||||
const that = this
|
||||
// 立即执行定时任务
|
||||
this.$confirm({
|
||||
title: '确认提示',
|
||||
@@ -283,5 +283,5 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less'
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
|
||||
@@ -188,5 +188,5 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less'
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
<role-modal ref="modalForm" @ok="modalFormOk"></role-modal>
|
||||
</a-card>
|
||||
</a-col>
|
||||
<a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 1">
|
||||
<a-col :md="rightColMd" :sm="24" v-if="this.rightcolval === 1">
|
||||
<a-card :bordered="false">
|
||||
<div style="text-align: right;">
|
||||
<a-icon type="close-circle" @click="hideUserList" />
|
||||
@@ -115,7 +115,7 @@
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- 操作按钮区域 -->
|
||||
<div class="table-operator" :md="24" :sm="24">
|
||||
<div class="table-operator">
|
||||
<a-button @click="handleAdd2" type="primary" icon="plus" style="margin-top: 16px">新增用户</a-button>
|
||||
<!--<a-button @click="handleEdit2" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
|
||||
<a-button @click="handleAddUserRole" type="primary" icon="plus" style="margin-top: 16px">已有用户</a-button>
|
||||
@@ -195,6 +195,7 @@ export default {
|
||||
SelectUserModal,
|
||||
RoleModal,
|
||||
UserModal,
|
||||
// eslint-disable-next-line vue/no-unused-components
|
||||
moment
|
||||
},
|
||||
data () {
|
||||
@@ -360,7 +361,7 @@ export default {
|
||||
sqp.superQueryParams = encodeURI(this.superQueryParams2)
|
||||
sqp.superQueryMatchType = this.superQueryMatchType2
|
||||
}
|
||||
var param = Object.assign(sqp, this.queryParam2, this.isorter2, this.filters2)
|
||||
const param = Object.assign(sqp, this.queryParam2, this.isorter2, this.filters2)
|
||||
param.field = this.getQueryField2()
|
||||
param.pageNo = this.ipagination2.current
|
||||
param.pageSize = this.ipagination2.pageSize
|
||||
@@ -368,7 +369,7 @@ export default {
|
||||
},
|
||||
getQueryField2 () {
|
||||
// TODO 字段权限控制
|
||||
var str = 'id,'
|
||||
let str = 'id,'
|
||||
this.columns2.forEach(function (value) {
|
||||
str += ',' + value.dataIndex
|
||||
})
|
||||
@@ -380,7 +381,7 @@ export default {
|
||||
this.$refs.modalForm2.edit(record)
|
||||
},
|
||||
handleAdd2: function () {
|
||||
if (this.currentRoleId == '') {
|
||||
if (!this.currentRoleId) {
|
||||
this.$message.error('请选择一个角色!')
|
||||
} else {
|
||||
this.$refs.modalForm2.roleDisabled = true
|
||||
@@ -423,7 +424,7 @@ export default {
|
||||
this.$message.error('请设置url.delete2属性!')
|
||||
return
|
||||
}
|
||||
var that = this
|
||||
const that = this
|
||||
deleteAction(that.url.delete2, { roleId: this.currentRoleId, userId: id }).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
@@ -441,11 +442,11 @@ export default {
|
||||
if (this.selectedRowKeys2.length <= 0) {
|
||||
this.$message.warning('请选择一条记录!')
|
||||
} else {
|
||||
var ids = ''
|
||||
for (var a = 0; a < this.selectedRowKeys2.length; a++) {
|
||||
let ids = ''
|
||||
for (let a = 0; a < this.selectedRowKeys2.length; a++) {
|
||||
ids += this.selectedRowKeys2[a] + ','
|
||||
}
|
||||
var that = this
|
||||
const that = this
|
||||
console.log(this.currentDeptId)
|
||||
this.$confirm({
|
||||
title: '确认删除',
|
||||
@@ -468,7 +469,7 @@ export default {
|
||||
const params = {}
|
||||
params.roleId = this.currentRoleId
|
||||
params.userIdList = []
|
||||
for (var a = 0; a < data.length; a++) {
|
||||
for (let a = 0; a < data.length; a++) {
|
||||
params.userIdList.push(data[a])
|
||||
}
|
||||
console.log(params)
|
||||
@@ -483,7 +484,7 @@ export default {
|
||||
},
|
||||
|
||||
handleAddUserRole () {
|
||||
if (this.currentRoleId == '') {
|
||||
if (!this.currentRoleId) {
|
||||
this.$message.error('请选择一个角色!')
|
||||
} else {
|
||||
this.$refs.selectUserModal.visible = true
|
||||
@@ -517,7 +518,7 @@ export default {
|
||||
// TODO 筛选
|
||||
if (Object.keys(sorter).length > 0) {
|
||||
this.isorter2.column = sorter.field
|
||||
this.isorter2.order = sorter.order == 'ascend' ? 'asc' : 'desc'
|
||||
this.isorter2.order = sorter.order === 'ascend' ? 'asc' : 'desc'
|
||||
}
|
||||
this.ipagination2 = pagination
|
||||
this.loadData2()
|
||||
|
||||
@@ -68,23 +68,23 @@
|
||||
@change="handleTableChange">
|
||||
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="record.sendStatus == 0" @click="handleEdit(record)">编辑</a>
|
||||
<a v-if="(record.sendStatus + '') === '0'" @click="handleEdit(record)">编辑</a>
|
||||
|
||||
<a-divider type="vertical" v-if="record.sendStatus == 0"/>
|
||||
<a-divider type="vertical" v-if="(record.sendStatus + '') === '0'"/>
|
||||
<a-dropdown>
|
||||
<a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item v-if="record.sendStatus != 1">
|
||||
<a-menu-item v-if="(record.sendStatus + '') !== '1'">
|
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||
<a>删除</a>
|
||||
</a-popconfirm>
|
||||
</a-menu-item>
|
||||
<a-menu-item v-if="record.sendStatus == 0">
|
||||
<a-menu-item v-if="(record.sendStatus + '') === '0'">
|
||||
<a-popconfirm title="确定发布吗?" @confirm="() => releaseData(record.id)">
|
||||
<a>发布</a>
|
||||
</a-popconfirm>
|
||||
</a-menu-item>
|
||||
<a-menu-item v-if="record.sendStatus == 1">
|
||||
<a-menu-item v-if="(record.sendStatus + '') === '1'">
|
||||
<a-popconfirm title="确定撤销吗?" @confirm="() => reovkeData(record.id)">
|
||||
<a>撤销</a>
|
||||
</a-popconfirm>
|
||||
@@ -152,9 +152,9 @@ export default {
|
||||
align: 'center',
|
||||
dataIndex: 'msgCategory',
|
||||
customRender: function (text) {
|
||||
if (text == '1') {
|
||||
if ((text + '') === '1') {
|
||||
return '通知公告'
|
||||
} else if (text == '2') {
|
||||
} else if ((text + '') === '2') {
|
||||
return '系统消息'
|
||||
} else {
|
||||
return text
|
||||
@@ -181,11 +181,11 @@ export default {
|
||||
align: 'center',
|
||||
dataIndex: 'priority',
|
||||
customRender: function (text) {
|
||||
if (text == 'L') {
|
||||
if ((text + '') === 'L') {
|
||||
return '低'
|
||||
} else if (text == 'M') {
|
||||
} else if ((text + '') === 'M') {
|
||||
return '中'
|
||||
} else if (text == 'H') {
|
||||
} else if ((text + '') === 'H') {
|
||||
return '高'
|
||||
} else {
|
||||
return text
|
||||
@@ -197,9 +197,9 @@ export default {
|
||||
align: 'center',
|
||||
dataIndex: 'msgType',
|
||||
customRender: function (text) {
|
||||
if (text == 'USER') {
|
||||
if ((text + '') === 'USER') {
|
||||
return '指定用户'
|
||||
} else if (text == 'ALL') {
|
||||
} else if ((text + '') === 'ALL') {
|
||||
return '全体用户'
|
||||
} else {
|
||||
return text
|
||||
@@ -211,11 +211,11 @@ export default {
|
||||
align: 'center',
|
||||
dataIndex: 'sendStatus',
|
||||
customRender: function (text) {
|
||||
if (text == 0) {
|
||||
if ((text + '') === '0') {
|
||||
return '未发布'
|
||||
} else if (text == 1) {
|
||||
} else if ((text + '') === '1') {
|
||||
return '已发布'
|
||||
} else if (text == 2) {
|
||||
} else if ((text + '') === '2') {
|
||||
return '已撤销'
|
||||
} else {
|
||||
return text
|
||||
@@ -265,7 +265,7 @@ export default {
|
||||
// 执行发布操作
|
||||
releaseData: function (id) {
|
||||
console.log(id)
|
||||
var that = this
|
||||
const that = this
|
||||
doReleaseData({ id: id }).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
@@ -277,7 +277,7 @@ export default {
|
||||
},
|
||||
// 执行撤销操作
|
||||
reovkeData: function (id) {
|
||||
var that = this
|
||||
const that = this
|
||||
doReovkeData({ id: id }).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
|
||||
@@ -114,19 +114,19 @@ export default {
|
||||
// 列表项是否可选择
|
||||
rowSelection: {
|
||||
selectedRowKeys: _this.selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => _this.selectedRowKeys = selectedRowKeys
|
||||
onChange: (selectedRowKeys) => (_this.selectedRowKeys = selectedRowKeys)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadData (arg) {
|
||||
if (arg == 1) {
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1
|
||||
}
|
||||
this.loading = true
|
||||
const params = this.getQueryParams()
|
||||
return new Promise((resolve) => {
|
||||
return new Promise(() => {
|
||||
getAction(this.url.list, params).then(res => {
|
||||
if (res.success) {
|
||||
const result = res.result
|
||||
@@ -152,7 +152,7 @@ export default {
|
||||
if (result && result.length > 0) {
|
||||
return result.map(item => {
|
||||
// 判断是否标记了带有子节点
|
||||
if (item[this.hasChildrenField] == '1') {
|
||||
if ((item[this.hasChildrenField] + '') === '1') {
|
||||
const loadChild = { id: item.id + '_loadChild', name: 'loading...', isLoading: true }
|
||||
item.children = [loadChild]
|
||||
}
|
||||
@@ -201,7 +201,7 @@ export default {
|
||||
editOk (formData, arr) {
|
||||
if (arr && arr.length > 0) {
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if (arr[i].id == formData.id) {
|
||||
if (arr[i].id === formData.id) {
|
||||
arr[i] = formData
|
||||
break
|
||||
} else {
|
||||
@@ -238,9 +238,11 @@ export default {
|
||||
} else {
|
||||
row.children = ''
|
||||
row.hasChildrenField = '0'
|
||||
// eslint-disable-next-line prefer-promise-reject-errors
|
||||
reject()
|
||||
}
|
||||
} else {
|
||||
// eslint-disable-next-line prefer-promise-reject-errors
|
||||
reject()
|
||||
}
|
||||
})
|
||||
@@ -249,7 +251,7 @@ export default {
|
||||
getFormDataById (id, arr) {
|
||||
if (arr && arr.length > 0) {
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if (arr[i].id == id) {
|
||||
if (arr[i].id === id) {
|
||||
this.parentFormData = arr[i]
|
||||
} else {
|
||||
this.getFormDataById(id, arr[i].children)
|
||||
@@ -281,7 +283,7 @@ export default {
|
||||
getExpandKeysByPid (pid, arr, all) {
|
||||
if (pid && arr && arr.length > 0) {
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if (arr[i].id == pid) {
|
||||
if (arr[i].id === pid) {
|
||||
this.subExpandedKeys.push(arr[i].id)
|
||||
this.getExpandKeysByPid(arr[i].pid, all, all)
|
||||
} else {
|
||||
@@ -332,5 +334,5 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less'
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
|
||||
@@ -116,7 +116,12 @@ import SysCheckRuleTestModal from './modules/SysCheckRuleTestModal'
|
||||
export default {
|
||||
name: 'SysCheckRuleList',
|
||||
mixins: [JeroListMixin],
|
||||
components: { SysCheckRuleModal, SysCheckRuleTestModal, JEllipsis },
|
||||
components: {
|
||||
SysCheckRuleModal,
|
||||
SysCheckRuleTestModal,
|
||||
// eslint-disable-next-line vue/no-unused-components
|
||||
JEllipsis
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
description: '编码校验规则管理页面',
|
||||
|
||||
@@ -183,5 +183,5 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less'
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
:loading="loading"
|
||||
class="j-table-force-nowrap"
|
||||
@change="handleTableChange">
|
||||
<span slot="status" slot-scope="text, record, index">
|
||||
<a-tag color="pink" v-if="text==0">禁用</a-tag>
|
||||
<a-tag color="#87d068" v-if="text==1" >正常</a-tag>
|
||||
<span slot="status" slot-scope="text">
|
||||
<a-tag color="pink" v-if="(text + '')==='0'">禁用</a-tag>
|
||||
<a-tag color="#87d068" v-if="(text + '')==='1'" >正常</a-tag>
|
||||
</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="showModal(record)">编辑</a>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
class="j-table-force-nowrap"
|
||||
@change="handleTableChange">
|
||||
|
||||
<template slot="avatarslot" slot-scope="text, record, index">
|
||||
<template slot="avatarslot" slot-scope="text, record">
|
||||
<div class="anty-img-wrap">
|
||||
<a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/>
|
||||
</div>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
type="primary"
|
||||
icon="download"
|
||||
size="small"
|
||||
@click="uploadFile(text)">
|
||||
@click="downloadFile(text)">
|
||||
下载
|
||||
</a-button>
|
||||
</template>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { filterObj } from '@/utils/util'
|
||||
// import { filterObj } from '@/utils/util'
|
||||
import { getAction, putAction } from '@/api/manage'
|
||||
import ShowAnnouncement from '@/components/tools/ShowAnnouncement'
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
@@ -77,9 +77,9 @@ export default {
|
||||
align: 'center',
|
||||
dataIndex: 'msgCategory',
|
||||
customRender: function (text) {
|
||||
if (text == '1') {
|
||||
if ((text + '') === '1') {
|
||||
return '通知公告'
|
||||
} else if (text == '2') {
|
||||
} else if ((text + '') === '2') {
|
||||
return '系统消息'
|
||||
} else {
|
||||
return text
|
||||
@@ -98,11 +98,11 @@ export default {
|
||||
align: 'center',
|
||||
dataIndex: 'priority',
|
||||
customRender: function (text) {
|
||||
if (text == 'L') {
|
||||
if ((text + '') === 'L') {
|
||||
return '低'
|
||||
} else if (text == 'M') {
|
||||
} else if ((text + '') === 'M') {
|
||||
return '中'
|
||||
} else if (text == 'H') {
|
||||
} else if ((text + '') === 'H') {
|
||||
return '高'
|
||||
} else {
|
||||
return text
|
||||
@@ -113,9 +113,9 @@ export default {
|
||||
align: 'center',
|
||||
dataIndex: 'readFlag',
|
||||
customRender: function (text) {
|
||||
if (text == '0') {
|
||||
if ((text + '') === '0') {
|
||||
return '未读'
|
||||
} else if (text == '1') {
|
||||
} else if ((text + '') === '1') {
|
||||
return '已读'
|
||||
} else {
|
||||
return text
|
||||
@@ -127,7 +127,7 @@ export default {
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}],
|
||||
url: {
|
||||
url: {
|
||||
list: '/sys/sysAnnouncementSend/getMyAnnouncementSend',
|
||||
editCementSend: 'sys/sysAnnouncementSend/editByAnntIdAndUserId',
|
||||
readAllMsg: 'sys/sysAnnouncementSend/readAll'
|
||||
@@ -161,7 +161,7 @@ export default {
|
||||
getAction('sys/annountCement/syncNotic', { anntId: anntId })
|
||||
},
|
||||
readAll () {
|
||||
var that = this
|
||||
const that = this
|
||||
that.$confirm({
|
||||
title: '确认操作',
|
||||
content: '是否全部标注已读?',
|
||||
@@ -184,7 +184,7 @@ export default {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
.anty-row-operator button{margin: 0 5px}
|
||||
.ant-btn-danger{background-color: #ffffff}z
|
||||
.ant-btn-danger{background-color: #ffffff}
|
||||
|
||||
.ant-modal-cust-warp{height: 100%}
|
||||
.ant-modal-cust-warp .ant-modal-body{height:calc(100% - 110px) !important;overflow-y: auto}
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
tree-node-filter-prop="title"
|
||||
v-model="queryParam.departId"
|
||||
:maxTagCount="1"
|
||||
show-search
|
||||
:show-search="true"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
@@ -138,7 +138,7 @@
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
@change="handleTableChange">
|
||||
|
||||
<template slot="avatarslot" slot-scope="text, record, index">
|
||||
<template slot="avatarslot" slot-scope="text, record/* , index */">
|
||||
<div class="anty-img-wrap">
|
||||
<a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/>
|
||||
</div>
|
||||
@@ -155,11 +155,11 @@
|
||||
</a>
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item>
|
||||
<a href="javascript:;" @click="handleDetail(record)">详情</a>
|
||||
<a href="javascript:" @click="handleDetail(record)">详情</a>
|
||||
</a-menu-item>
|
||||
|
||||
<a-menu-item>
|
||||
<a href="javascript:;" @click="handleChangePassword(record.username)">密码</a>
|
||||
<a href="javascript:" @click="handleChangePassword(record.username)">密码</a>
|
||||
</a-menu-item>
|
||||
|
||||
<a-menu-item>
|
||||
@@ -168,13 +168,13 @@
|
||||
</a-popconfirm>
|
||||
</a-menu-item>
|
||||
|
||||
<a-menu-item v-if="record.status==1">
|
||||
<a-menu-item v-if="(record.status + '')==='1'">
|
||||
<a-popconfirm title="确定冻结吗?" @confirm="() => handleFrozen(record.id,2,record.username)">
|
||||
<a>冻结</a>
|
||||
</a-popconfirm>
|
||||
</a-menu-item>
|
||||
|
||||
<a-menu-item v-if="record.status==2">
|
||||
<a-menu-item v-if="(record.status + '')==='2'">
|
||||
<a-popconfirm title="确定解冻吗?" @confirm="() => handleFrozen(record.id,1,record.username)">
|
||||
<a>解冻</a>
|
||||
</a-popconfirm>
|
||||
@@ -352,7 +352,7 @@ export default {
|
||||
const that = this
|
||||
let isAdmin = false
|
||||
that.selectionRows.forEach(function (row) {
|
||||
if (row.username == 'admin') {
|
||||
if (row.username === 'admin') {
|
||||
isAdmin = true
|
||||
}
|
||||
})
|
||||
@@ -365,7 +365,7 @@ export default {
|
||||
})
|
||||
that.$confirm({
|
||||
title: '确认操作',
|
||||
content: '是否' + (status == 1 ? '解冻' : '冻结') + '选中账号?',
|
||||
content: '是否' + ((status + '') === '1' ? '解冻' : '冻结') + '选中账号?',
|
||||
onOk: function () {
|
||||
frozenBatch({ ids: ids, status: status }).then((res) => {
|
||||
if (res.success) {
|
||||
@@ -381,17 +381,17 @@ export default {
|
||||
}
|
||||
},
|
||||
handleMenuClick (e) {
|
||||
if (e.key == 1) {
|
||||
if ((e.key + '') === '1') {
|
||||
this.batchDel()
|
||||
} else if (e.key == 2) {
|
||||
this.batchFrozen(2)
|
||||
} else if (e.key == 3) {
|
||||
this.batchFrozen(1)
|
||||
} else if ((e.key + '') === '2') {
|
||||
this.batchFrozen('2')
|
||||
} else if ((e.key + '') === '3') {
|
||||
this.batchFrozen('1')
|
||||
}
|
||||
},
|
||||
handleFrozen: function (id, status, username) {
|
||||
const that = this
|
||||
if (username == 'admin') {
|
||||
if (username === 'admin') {
|
||||
that.$message.warning('管理员账号不允许此操作!')
|
||||
return
|
||||
}
|
||||
@@ -424,22 +424,21 @@ export default {
|
||||
initRoleList () {
|
||||
queryall().then((res) => {
|
||||
if (res.success) {
|
||||
this.rolesList = res.result.map((item, index, arr) => {
|
||||
const c = { text: item.roleName, value: item.id }
|
||||
return c
|
||||
this.rolesList = res.result.map((item) => {
|
||||
return { text: item.roleName, value: item.id }
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 角色配置
|
||||
roleAssignment () {
|
||||
if (this.selectedRowKeys.length == 0) {
|
||||
if (this.selectedRowKeys.length === 0) {
|
||||
this.$message.warning('请选择至少一条数据')
|
||||
} else {
|
||||
this.$refs.roleAssignmentModal.show()
|
||||
}
|
||||
},
|
||||
rolevisibleMethods (val) {
|
||||
rolevisibleMethods () {
|
||||
this.selectedRowKeys = []
|
||||
}
|
||||
}
|
||||
@@ -447,5 +446,5 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less'
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user