修改禅道已知bug

This commit is contained in:
qq787203167
2022-08-18 12:31:29 +08:00
parent 82f2ff886a
commit 93f19bf51a
9 changed files with 236 additions and 232 deletions
@@ -279,6 +279,11 @@ export default {
/deep/.add-input{ /deep/.add-input{
min-height: 135px!important; min-height: 135px!important;
} }
::v-deep .page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style> </style>
<style lang='less'> <style lang='less'>
.area-module { .area-module {
@@ -292,9 +297,4 @@ export default {
} }
} }
} }
.page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style> </style>
+5 -5
View File
@@ -240,6 +240,11 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
::v-deep .page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style> </style>
<style lang='less'> <style lang='less'>
.area-module { .area-module {
@@ -253,9 +258,4 @@ export default {
} }
} }
} }
.page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style> </style>
@@ -150,6 +150,11 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
::v-deep .page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style> </style>
<style lang='less'> <style lang='less'>
.area-module { .area-module {
@@ -163,9 +168,4 @@ export default {
} }
} }
} }
.page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style> </style>
@@ -348,6 +348,11 @@ export default {
border: 1px #00B3BE solid; border: 1px #00B3BE solid;
color: #00B3BE; color: #00B3BE;
} }
::v-deep .page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style> </style>
<style lang='less'> <style lang='less'>
.area-module { .area-module {
@@ -361,9 +366,4 @@ export default {
} }
} }
} }
.page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style> </style>
@@ -348,6 +348,11 @@ export default {
border: 1px #00B3BE solid; border: 1px #00B3BE solid;
color: #00B3BE; color: #00B3BE;
} }
::v-deep .page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style> </style>
<style lang='less'> <style lang='less'>
.area-module { .area-module {
@@ -361,9 +366,4 @@ export default {
} }
} }
} }
.page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style> </style>
@@ -37,7 +37,7 @@
</a-table> </a-table>
<div class="page" v-if="dataSource.length > 0"> <div class="page" v-if="dataSource.length > 0">
<a-pagination <a-pagination
:show-total="total => $t('total')+`${total}`+$t('strip')" :show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper show-quick-jumper
show-size-changer show-size-changer
:page-size.sync="pageSize " :page-size.sync="pageSize "
@@ -86,7 +86,7 @@
size="middle" size="middle"
:loading="loading" :loading="loading"
:pagination="false" :pagination="false"
:scroll="{x: '100%',y:'calc(100vh - 130px)'}" :scroll="{x: '100%',y:'calc(100vh - 140px)'}"
rowKey="id" rowKey="id"
:data-source="dataSource" :data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@@ -130,6 +130,11 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
::v-deep .page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style> </style>
<style lang='less'> <style lang='less'>
.area-module { .area-module {
@@ -143,9 +148,5 @@ export default {
} }
} }
} }
.page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style> </style>
@@ -41,236 +41,239 @@
</template> </template>
<script> <script>
import { putAction, postAction, getAction, deleteAction } from '@/api/manage' import { putAction, postAction, getAction, deleteAction } from '@/api/manage'
import axios from 'axios' import axios from 'axios'
import Vue from 'vue' import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types' import { ACCESS_TOKEN } from '@/store/mutation-types'
import { queryDepartTreeList, searchByKeywords, deleteByDepartId } from '@/api/api' import { queryDepartTreeList, searchByKeywords, deleteByDepartId } from '@/api/api'
import pick from 'lodash.pick' import pick from 'lodash.pick'
export default {
name: 'diolagArea', export default {
components: {}, name: 'diolagArea',
data() { components: {},
return { data() {
checkedDepartNameString: '', return {
token:Vue.ls.get(ACCESS_TOKEN), checkedDepartNameString: '',
title: this.$t('add'), token: Vue.ls.get(ACCESS_TOKEN),
total: 0, title: this.$t('add'),
selectedRowKeysDate: {}, total: 0,
loading: false, selectedRowKeysDate: {},
editId: '', loading: false,
newVisible: false, editId: '',
selectedRole: undefined, newVisible: false,
labelCol: { selectedRole: undefined,
xs: { span: 24 }, labelCol: {
sm: { span: 7 } xs: { span: 24 },
}, sm: { span: 7 }
wrapperCol: { },
xs: { span: 24 }, wrapperCol: {
sm: { span: 14 } xs: { span: 24 },
}, sm: { span: 14 }
form: {}, },
rules: {}, form: {},
areaTable: [], rules: {},
flag: false, //表单提交标识 areaTable: [],
spinLoading: false, flag: false, //表单提交标识
confirmLoading: false, spinLoading: false,
selectedRowKeys: [], confirmLoading: false,
roleList: [], selectedRowKeys: [],
departTree: [], roleList: [],
allTreeKeys: [], departTree: [],
selectedKeys: [], allTreeKeys: [],
checkStrictly: true, selectedKeys: [],
checkedKeys: [], checkStrictly: true,
} checkedKeys: []
},
props: {
selectedRowKeysArray: {
type: Array,
default: [],
require: true
}
},
mounted() {
this.loadData()
this.loadTree()
},
methods: {
loadTree() {
var that = this
that.treeData = []
that.departTree = []
queryDepartTreeList().then((res) => {
if (res.success) {
//部门全选后,再添加部门,选中数量增多
this.allTreeKeys = []
// console.log(res.result.length,'res.result.length')
for (let i = 0; i < res.result.length; i++) {
let temp = res.result[i]
// console.log(i,'oo')
// console.log(temp,'temptemp')
that.treeData.push(temp)
that.departTree.push(temp)
// console.log(that.departTree,'that.departTreethat.departTree')
// that.setThisExpandedKeys(temp)
// that.getAllKeys(temp)
// console.log(temp.id)
}
this.loading = false
}
})
},
setThisExpandedKeys(node) {
console.log(node,'setThisExpandedKeys')
if (node.children && node.children.length > 0) {
this.iExpandedKeys.push(node.key)
for (let a = 0; a < node.children.length; a++) {
this.setThisExpandedKeys(node.children[a])
}
} }
}, },
getAllKeys(node) { props: {
console.log('getAllKeys',node); selectedRowKeysArray: {
this.allTreeKeys.push(node.key) type: Array,
if (node.children && node.children.length > 0) { default: [],
for (let a = 0; a < node.children.length; a++) { require: true
this.getAllKeys(node.children[a])
}
} }
}, },
onExpand(expandedKeys) { mounted() {
console.log(expandedKeys,'expandedKeys') this.loadData()
this.iExpandedKeys = expandedKeys this.loadTree()
}, },
// 触发onSelect事件时,为部门树右侧的form表单赋值 methods: {
setValuesToForm(record) { loadTree() {
if (record.orgCategory == '1') { var that = this
this.orgCategoryDisabled = true that.treeData = []
} else { that.departTree = []
this.orgCategoryDisabled = false queryDepartTreeList().then((res) => {
}
this.$nextTick(() => {
this.form.getFieldDecorator('fax', { initialValue: '' })
this.form.setFieldsValue(pick(record, 'departName', 'orgCategory', 'orgCode', 'departOrder', 'mobile', 'fax', 'address', 'memo'))
})
},
// 右键操作方法
rightHandle(node) {
console.log(node)
this.dropTrigger = 'contextmenu'
console.log(node.node.eventKey)
this.rightClickSelectedKey = node.node.eventKey
this.rightClickSelectedOrgCode = node.node.dataRef.orgCode
},
onCheck(checkedKeys,info) {
// console.log(checkedKeys,info)
this.hiding = false
if (this.checkStrictly) {
this.checkedKeys = checkedKeys.checked
} else {
this.checkedKeys = checkedKeys
}
},
onSelect(selectedKeys, e) {
console.log(selectedKeys,e)
this.hiding = false
let record = e.node.dataRef
this.currSelected = Object.assign({}, record)
this.model = this.currSelected
this.selectedKeys = [record.key]
this.model.parentId = record.parentId
this.setValuesToForm(record)
this.recordTab = record
// this.$refs.departAuth.show(record.id)
// 传用户信息参数
if (this.$refs.DeptUserInfo) {
this.$refs.DeptUserInfo.open(record)
}
},
onSearch(value) {
let that = this
if (value) {
searchByKeywords({ keyWord: value }).then((res) => {
if (res.success) { if (res.success) {
that.departTree = [] //部门全选后,再添加部门,选中数量增多
this.allTreeKeys = []
// console.log(res.result.length,'res.result.length')
for (let i = 0; i < res.result.length; i++) { for (let i = 0; i < res.result.length; i++) {
let temp = res.result[i] let temp = res.result[i]
// console.log(i,'oo')
// console.log(temp,'temptemp')
that.treeData.push(temp)
that.departTree.push(temp) that.departTree.push(temp)
// console.log(that.departTree,'that.departTreethat.departTree')
// that.setThisExpandedKeys(temp)
// that.getAllKeys(temp)
// console.log(temp.id)
} }
} else { this.loading = false
that.$message.warning(res.message)
} }
}) })
} else { },
that.loadTree() setThisExpandedKeys(node) {
} console.log(node, 'setThisExpandedKeys')
if (node.children && node.children.length > 0) {
}, this.iExpandedKeys.push(node.key)
loadData() { for (let a = 0; a < node.children.length; a++) {
this.loading = true this.setThisExpandedKeys(node.children[a])
getAction(`sys/role/queryall`, {}).then(res => { }
if (res.success) {
this.roleList = [...res.result]
} }
}).finally(() => { },
this.loading = false getAllKeys(node) {
}) console.log('getAllKeys', node)
}, this.allTreeKeys.push(node.key)
handleCancel() { if (node.children && node.children.length > 0) {
this.$emit('departmentvisible', false) for (let a = 0; a < node.children.length; a++) {
}, this.getAllKeys(node.children[a])
//保存 }
handleSubmit() { }
let param = {ids: this.selectedRowKeysArray.join(','), selecteddeparts: `${this.checkedKeys.join(',')}` } },
postAction('/sys/user/setDepart', param).then((res) => { onExpand(expandedKeys) {
if (res.success) { console.log(expandedKeys, 'expandedKeys')
this.$emit('departmentvisible', false) this.iExpandedKeys = expandedKeys
this.$message.success(res.message) },
// 触发onSelect事件时,为部门树右侧的form表单赋值
setValuesToForm(record) {
if (record.orgCategory == '1') {
this.orgCategoryDisabled = true
} else { } else {
this.$message.warning(res.message) this.orgCategoryDisabled = false
} }
}) this.$nextTick(() => {
this.form.getFieldDecorator('fax', { initialValue: '' })
this.form.setFieldsValue(pick(record, 'departName', 'orgCategory', 'orgCode', 'departOrder', 'mobile', 'fax', 'address', 'memo'))
})
},
// 右键操作方法
rightHandle(node) {
console.log(node)
this.dropTrigger = 'contextmenu'
console.log(node.node.eventKey)
this.rightClickSelectedKey = node.node.eventKey
this.rightClickSelectedOrgCode = node.node.dataRef.orgCode
},
onCheck(checkedKeys, info) {
// console.log(checkedKeys,info)
this.hiding = false
if (this.checkStrictly) {
this.checkedKeys = checkedKeys.checked
} else {
this.checkedKeys = checkedKeys
}
},
onSelect(selectedKeys, e) {
console.log(selectedKeys, e)
this.hiding = false
let record = e.node.dataRef
this.currSelected = Object.assign({}, record)
this.model = this.currSelected
this.selectedKeys = [record.key]
this.model.parentId = record.parentId
this.setValuesToForm(record)
this.recordTab = record
// this.$refs.departAuth.show(record.id)
// 传用户信息参数
if (this.$refs.DeptUserInfo) {
this.$refs.DeptUserInfo.open(record)
}
},
onSearch(value) {
let that = this
if (value) {
searchByKeywords({ keyWord: value }).then((res) => {
if (res.success) {
that.departTree = []
for (let i = 0; i < res.result.length; i++) {
let temp = res.result[i]
that.departTree.push(temp)
}
} else {
that.$message.warning(res.message)
}
})
} else {
that.loadTree()
}
},
loadData() {
this.loading = true
getAction(`sys/role/queryall`, {}).then(res => {
if (res.success) {
this.roleList = [...res.result]
}
}).finally(() => {
this.loading = false
})
},
handleCancel() {
this.$emit('departmentvisible', false)
},
//保存
handleSubmit() {
let param = { ids: this.selectedRowKeysArray.join(','), selecteddeparts: `${this.checkedKeys.join(',')}` }
postAction('/sys/user/setDepart', param).then((res) => {
if (res.success) {
this.$emit('departmentvisible', false)
this.$message.success(res.message)
} else {
this.$message.warning(res.message)
}
})
}
} }
} }
}
</script> </script>
<style lang='less' scoped> <style lang='less' scoped>
@import '~@assets/less/common.less'; @import '~@assets/less/common.less';
.diolag-area { .diolag-area {
.table-area { .table-area {
margin: 20px 0; margin: 20px 0;
.action-edit { .action-edit {
margin-right: 10px; margin-right: 10px;
}
}
.table-del {
color: red;
} }
} }
.table-del { .drawer-bootom-button {
color: red; display: flex;
justify-content: center;
}
::v-deep .page {
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
} }
}
.drawer-bootom-button{
display: flex;
justify-content: center;
}
</style> </style>
<style lang='less'> <style lang='less'>
.area-module { .area-module {
.ant-modal-wrap { .ant-modal-wrap {
.ant-modal { .ant-modal {
.ant-modal-content { .ant-modal-content {
.ant-modal-footer { .ant-modal-footer {
text-align: center; text-align: center;
}
} }
} }
} }
} }
}
.page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style> </style>