修改禅道已知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{
min-height: 135px!important;
}
::v-deep .page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style>
<style lang='less'>
.area-module {
@@ -292,9 +297,4 @@ export default {
}
}
}
.page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style>
+5 -5
View File
@@ -240,6 +240,11 @@ export default {
display: flex;
justify-content: center;
}
::v-deep .page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style>
<style lang='less'>
.area-module {
@@ -253,9 +258,4 @@ export default {
}
}
}
.page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style>
@@ -150,6 +150,11 @@ export default {
display: flex;
justify-content: center;
}
::v-deep .page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style>
<style lang='less'>
.area-module {
@@ -163,9 +168,4 @@ export default {
}
}
}
.page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style>
@@ -348,6 +348,11 @@ export default {
border: 1px #00B3BE solid;
color: #00B3BE;
}
::v-deep .page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style>
<style lang='less'>
.area-module {
@@ -361,9 +366,4 @@ export default {
}
}
}
.page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style>
@@ -348,6 +348,11 @@ export default {
border: 1px #00B3BE solid;
color: #00B3BE;
}
::v-deep .page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style>
<style lang='less'>
.area-module {
@@ -361,9 +366,4 @@ export default {
}
}
}
.page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style>
@@ -37,7 +37,7 @@
</a-table>
<div class="page" v-if="dataSource.length > 0">
<a-pagination
:show-total="total => $t('total')+`${total}`+$t('strip')"
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize "
@@ -86,7 +86,7 @@
size="middle"
:loading="loading"
:pagination="false"
:scroll="{x: '100%',y:'calc(100vh - 130px)'}"
:scroll="{x: '100%',y:'calc(100vh - 140px)'}"
rowKey="id"
:data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@@ -130,6 +130,11 @@ export default {
display: flex;
justify-content: center;
}
::v-deep .page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style>
<style lang='less'>
.area-module {
@@ -143,9 +148,5 @@ export default {
}
}
}
.page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style>
@@ -41,236 +41,239 @@
</template>
<script>
import { putAction, postAction, getAction, deleteAction } from '@/api/manage'
import axios from 'axios'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { queryDepartTreeList, searchByKeywords, deleteByDepartId } from '@/api/api'
import pick from 'lodash.pick'
export default {
name: 'diolagArea',
components: {},
data() {
return {
checkedDepartNameString: '',
token:Vue.ls.get(ACCESS_TOKEN),
title: this.$t('add'),
total: 0,
selectedRowKeysDate: {},
loading: false,
editId: '',
newVisible: false,
selectedRole: undefined,
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 14 }
},
form: {},
rules: {},
areaTable: [],
flag: false, //表单提交标识
spinLoading: false,
confirmLoading: false,
selectedRowKeys: [],
roleList: [],
departTree: [],
allTreeKeys: [],
selectedKeys: [],
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])
}
import { putAction, postAction, getAction, deleteAction } from '@/api/manage'
import axios from 'axios'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { queryDepartTreeList, searchByKeywords, deleteByDepartId } from '@/api/api'
import pick from 'lodash.pick'
export default {
name: 'diolagArea',
components: {},
data() {
return {
checkedDepartNameString: '',
token: Vue.ls.get(ACCESS_TOKEN),
title: this.$t('add'),
total: 0,
selectedRowKeysDate: {},
loading: false,
editId: '',
newVisible: false,
selectedRole: undefined,
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 14 }
},
form: {},
rules: {},
areaTable: [],
flag: false, //表单提交标识
spinLoading: false,
confirmLoading: false,
selectedRowKeys: [],
roleList: [],
departTree: [],
allTreeKeys: [],
selectedKeys: [],
checkStrictly: true,
checkedKeys: []
}
},
getAllKeys(node) {
console.log('getAllKeys',node);
this.allTreeKeys.push(node.key)
if (node.children && node.children.length > 0) {
for (let a = 0; a < node.children.length; a++) {
this.getAllKeys(node.children[a])
}
props: {
selectedRowKeysArray: {
type: Array,
default: [],
require: true
}
},
onExpand(expandedKeys) {
console.log(expandedKeys,'expandedKeys')
this.iExpandedKeys = expandedKeys
mounted() {
this.loadData()
this.loadTree()
},
// 触发onSelect事件时,为部门树右侧的form表单赋值
setValuesToForm(record) {
if (record.orgCategory == '1') {
this.orgCategoryDisabled = true
} else {
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) => {
methods: {
loadTree() {
var that = this
that.treeData = []
that.departTree = []
queryDepartTreeList().then((res) => {
if (res.success) {
that.departTree = []
//部门全选后,再添加部门,选中数量增多
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)
}
} else {
that.$message.warning(res.message)
this.loading = false
}
})
} else {
that.loadTree()
}
},
loadData() {
this.loading = true
getAction(`sys/role/queryall`, {}).then(res => {
if (res.success) {
this.roleList = [...res.result]
},
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])
}
}
}).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)
},
getAllKeys(node) {
console.log('getAllKeys', node)
this.allTreeKeys.push(node.key)
if (node.children && node.children.length > 0) {
for (let a = 0; a < node.children.length; a++) {
this.getAllKeys(node.children[a])
}
}
},
onExpand(expandedKeys) {
console.log(expandedKeys, 'expandedKeys')
this.iExpandedKeys = expandedKeys
},
// 触发onSelect事件时,为部门树右侧的form表单赋值
setValuesToForm(record) {
if (record.orgCategory == '1') {
this.orgCategoryDisabled = true
} 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>
<style lang='less' scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/common.less';
.diolag-area {
.table-area {
margin: 20px 0;
.diolag-area {
.table-area {
margin: 20px 0;
.action-edit {
margin-right: 10px;
.action-edit {
margin-right: 10px;
}
}
.table-del {
color: red;
}
}
.table-del {
color: red;
.drawer-bootom-button {
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 lang='less'>
.area-module {
.ant-modal-wrap {
.ant-modal {
.ant-modal-content {
.ant-modal-footer {
text-align: center;
.area-module {
.ant-modal-wrap {
.ant-modal {
.ant-modal-content {
.ant-modal-footer {
text-align: center;
}
}
}
}
}
}
.page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style>