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