修复菜单树点击问题、修复应用设置图标没默认显示问题,。
This commit is contained in:
parent
232c436863
commit
31b8ae27a1
|
@ -20,7 +20,7 @@
|
|||
<el-upload class="avatar-uploader" ref="upload" action="https://jsonplaceholder.typicode.com/posts/" :on-preview="handlePreview" :on-progress="handleProgress" :before-upload="beforeUpload" list-type="picture" :limit="1" :disabled="lookFlag" :on-success="handleAvatarSuccess" :show-file-list="false">
|
||||
<div class="line">
|
||||
<div class="left">
|
||||
<img v-if="imgUrl" :src="imgUrl" class="avatar">
|
||||
<img v-if="imgUrl" :src="imgUrl" class="avatar" @error="handleImageError">
|
||||
<!-- <el-image style="width: 64px; height: 64px" :src="iconBase64" fit="cover" alt="点击上传">
|
||||
<template v-slot:error>
|
||||
<div style="line-height: 64px; font-size: 12px">
|
||||
|
@ -76,6 +76,9 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
handleImageError(row) {
|
||||
this.imgUrl = require('./images/1.png')
|
||||
},
|
||||
// 文件上传相关时间
|
||||
handleProgress(file, fileList) {
|
||||
this.loading = true
|
||||
|
@ -306,9 +309,12 @@ export default {
|
|||
border: 1px dashed #999999;
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
> img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// height: 100%;
|
||||
}
|
||||
}
|
||||
.right {
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
<img src="./images/5.png" alt="" />
|
||||
</template> -->
|
||||
<template>
|
||||
<img :src="row.imgUrl" alt="" />
|
||||
<img :src="row.imgUrl" alt="" @error="handleImageError(row)"/>
|
||||
</template>
|
||||
</div>
|
||||
<div class="nameInfo">
|
||||
|
@ -136,6 +136,9 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
handleImageError(row) {
|
||||
row.imgUrl = require('./images/1.png')
|
||||
},
|
||||
// 状态改变
|
||||
async appStatusChange(val, row) {
|
||||
const res = await getApiModuleApi({
|
||||
|
@ -322,10 +325,13 @@ export default {
|
|||
flex: 0.25;
|
||||
width: 29px;
|
||||
height: 29px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
<img src="./images/4.png" alt="" style="width: 64px; height: 64px"/>
|
||||
</template>
|
||||
<template v-else-if="name==='ERP'">
|
||||
<img src="./images/5.png" alt="" style="width: 64px; height: 64px"/>
|
||||
<img src="./images/5.png" alt="" />
|
||||
</template> -->
|
||||
<template>
|
||||
<img :src="imgUrl" alt="" style="width: 64px; height: 64px"/>
|
||||
<img :src="imgUrl" alt="" @error="handleImageError" style="width: 64px;"/>
|
||||
</template>
|
||||
</div>
|
||||
<div class="appName">{{ name }}</div>
|
||||
|
@ -62,6 +62,9 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
handleImageError(row) {
|
||||
this.imgUrl = require('./images/1.png')
|
||||
},
|
||||
flashActive(val) {
|
||||
this.menuActived = val
|
||||
},
|
||||
|
@ -137,6 +140,9 @@ export default {
|
|||
> .img {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.appName {
|
||||
|
|
|
@ -180,7 +180,56 @@ export default {
|
|||
})
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
row.check = !row.check
|
||||
this.multipleSelection = val
|
||||
let data = this.treeToArray([row])
|
||||
this.childNode = !row.check
|
||||
console.log(this.childNode,'this.childNode')
|
||||
if (data.length > 1) {
|
||||
console.log(data,'data')
|
||||
data.forEach((el, index) => {
|
||||
el.check = this.childNode
|
||||
this.$refs.multipleTable.toggleRowSelection(el, this.childNode)
|
||||
})
|
||||
let ids = data[0].id
|
||||
let arr = this.treeFindPath(
|
||||
this.menuDatas,
|
||||
(data) => data.id == ids,
|
||||
'id'
|
||||
)
|
||||
arr = arr.splice(0, arr.length - 1)
|
||||
let dataList = []
|
||||
let allList = this.treeToArray(this.menuDatas)
|
||||
allList.forEach((el, index) => {
|
||||
if (arr.includes(el.id)) {
|
||||
dataList.push(el)
|
||||
}
|
||||
})
|
||||
dataList.forEach((el, index) => {
|
||||
el.check = true
|
||||
this.$refs.multipleTable.toggleRowSelection(el, true)
|
||||
})
|
||||
} else {
|
||||
let ids = data[0].id
|
||||
let arr = this.treeFindPath(
|
||||
this.menuDatas,
|
||||
(data) => data.id == ids,
|
||||
'id'
|
||||
)
|
||||
console.log(arr,'arr')
|
||||
// arr = arr.splice(0, arr.length - 1)
|
||||
let dataList = []
|
||||
let allList = this.treeToArray(this.menuDatas)
|
||||
allList.forEach((el, index) => {
|
||||
if (arr.includes(el.id)) {
|
||||
dataList.push(el)
|
||||
}
|
||||
})
|
||||
console.log(dataList,'dataList')
|
||||
dataList.forEach((el, index) => {
|
||||
el.check = this.childNode
|
||||
this.$refs.multipleTable.toggleRowSelection(el, this.childNode )
|
||||
})
|
||||
}
|
||||
},
|
||||
// 默认选中
|
||||
exhibitList(menu, homeList, id) {
|
||||
|
@ -239,13 +288,13 @@ export default {
|
|||
}
|
||||
this.homeListHandle(params.sysPopedomHomeEntities)
|
||||
this.menuListHandle(this.menuDatas, params.sysPopedomMenuEntities, params.sysPopedomOperateEntities)
|
||||
const res = await authApi("sysUserService","","saveJurisdiction","",params)
|
||||
const res = await authApi('sysUserService', '', 'saveJurisdiction', '', params)
|
||||
if (res.status == '200') {
|
||||
this.handleDialogClose();
|
||||
this.handleDialogClose()
|
||||
this.$message({
|
||||
message: "保存成功",
|
||||
type: "success",
|
||||
});
|
||||
message: '保存成功',
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
},
|
||||
//处理首页拖拽
|
||||
|
|
Loading…
Reference in New Issue