update code

dev_xds
haha 2023-09-11 00:19:49 +08:00
parent 3e026402b3
commit bca6a3aafd
6 changed files with 64 additions and 4 deletions

View File

@ -26,3 +26,31 @@ export default {
display: none;
}
</style>
<style lang="scss">
.nest-menu,.el-submenu__title{
position: relative;
.todo_num_tips{
position: absolute;
right: 36px;
background-color: #f56c6c;
border-radius: 10px;
color: #fff;
display: inline-block;
font-size: 12px;
height: 18px;
line-height: 18px;
padding: 0 6px;
text-align: center;
white-space: nowrap;
border: 1px solid #fff;
cursor: pointer;
top: 16px;
display: none;
}
}
.el-submenu__title{
.todo_num_tips{
top:20px;
}
}
</style>

View File

@ -26,6 +26,20 @@ export default {
} else {
vnodes.push(<span slot='title'>{(title)}</span>)
}
let name=context?.parent?.item?.name;
if(['Todo','Task'].includes(name)){
vnodes.push(h('span',{
class:"todo_num_tips tips_"+name,
on:{
click:function(e){
context?.parent.$bus.$emit("todo_tips_click",name)
e.preventDefault();
e.stopPropagation();
}
}
},1
))
}
}
return vnodes
}

View File

@ -49,8 +49,8 @@ filters(Vue);
BorderBox(Vue)
Vue.prototype.$api=Api;
// 全局方法挂
Vue.prototype.$bus=new Vue();
// 全局方法挂
Vue.prototype.getDicts = getDicts
Vue.prototype.getConfigKey = getConfigKey
Vue.prototype.parseTime = parseTime

View File

@ -140,3 +140,4 @@ input, textarea{
line-height: 1.2;
}

View File

@ -150,6 +150,8 @@
icon="el-icon-s-check">今日出勤</el-button>
<el-button type="primary" @click="doPrjCostOutput" v-hasPermi="['project:costOutput:edit']"
icon="el-icon-money">项目成本产值管理</el-button>
</div>
<ProjectScheduleDlg ref="prjSchDlg"></ProjectScheduleDlg>
<assess-drawer ref="assessDrawer"></assess-drawer>
@ -198,9 +200,24 @@ export default {
mounted() {
this.loadData();
this.$bus.$on("todo_tips_click",name=>{
console.log("----todo点击----",name)
});
//this.test();
},
methods: {
test(){
setInterval(() => {
let els=document.querySelectorAll(".todo_num_tips");
if(els.length>0){
els.forEach(el=>{
el.innerHTML=Math.random().toString().substring(4,6);
el.style.display="inline";
});
}
}, 1000);
},
doPrjCostOutput(){
this.$refs.costOutput.show(this.prj);
},

View File

@ -41,8 +41,8 @@ module.exports = {
}
},
'/jhapi':{
//target: `http://62.234.3.186/jhapi/`,
target: `http://127.0.0.1:8090/jhapi/`,
target: `http://62.234.3.186/jhapi/`,
//target: `http://127.0.0.1:8090/jhapi/`,
changeOrigin: true,
pathRewrite: {
'^/jhapi':'/'