!16 1.角色提交问题修改 2.XTable var修改

Merge pull request !16 from 毕梅/master
pull/17/MERGE
芋道源码 2023-03-06 13:51:00 +00:00 committed by Gitee
commit 016472b829
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 27 additions and 22 deletions

View File

@ -26,12 +26,12 @@ const prefixCls = getPrefixCls('x-vxe-table')
const attrs = useAttrs()
const emit = defineEmits(['register'])
const removeStyles = () => {
var filename = 'cssTheme'
const filename = 'cssTheme'
//
var targetelement = 'style'
var targetattr = 'id'
var allsuspects = document.getElementsByTagName(targetelement)
for (var i = allsuspects.length; i >= 0; i--) {
const targetelement = 'style'
const targetattr = 'id'
let allsuspects = document.getElementsByTagName(targetelement)
for (let i = allsuspects.length; i >= 0; i--) {
if (
allsuspects[i] &&
allsuspects[i].getAttribute(targetattr) != null &&
@ -43,8 +43,8 @@ const removeStyles = () => {
}
}
const reImport = () => {
var head = document.getElementsByTagName('head')[0]
var style = document.createElement('style')
let head = document.getElementsByTagName('head')[0]
let style = document.createElement('style')
style.innerText = styleCss
style.id = 'cssTheme'
head.appendChild(style)

View File

@ -111,16 +111,21 @@
>
<el-card class="card" shadow="never">
<template #header>
<!--父子联动(选中父节点自动选择子节点):-->
<!--<el-switch v-model="checkStrictly" inline-prompt active-text="" inactive-text="" />-->
<!--全选/全不选:-->
<!--<el-switch-->
<!-- v-model="treeNodeAll"-->
<!-- inline-prompt-->
<!-- active-text="是"-->
<!-- inactive-text="否"-->
<!-- @change="handleCheckedTreeNodeAll()"-->
<!--/>-->
父子联动(选中父节点自动选择子节点):
<el-switch
v-model="checkStrictly"
inline-prompt
active-text="是"
inactive-text="否"
/>
全选/全不选:
<el-switch
v-model="treeNodeAll"
inline-prompt
active-text="是"
inactive-text="否"
@change="handleCheckedTreeNodeAll()"
/>
</template>
<el-tree
ref="treeRef"
@ -250,12 +255,12 @@ const dialogScopeTitle = ref('数据权限')
const actionScopeType = ref('')
const dataScopeDictDatas = ref()
//
const checkStrictly = ref(false)
// const treeNodeAll = ref(false)
const checkStrictly = ref(true)
const treeNodeAll = ref(false)
// /
// const handleCheckedTreeNodeAll = () => {
// treeRef.value!.setCheckedNodes(treeNodeAll.value ? treeOptions.value : [])
// }
const handleCheckedTreeNodeAll = () => {
treeRef.value!.setCheckedNodes(treeNodeAll.value ? treeOptions.value : [])
}
//
const handleScope = async (type: string, row: RoleApi.RoleVO) => {
dataScopeForm.id = row.id