7 changed files with 555 additions and 4 deletions
-
47src/api/mdp/sys/userFocus.js
-
113src/views/myWork/my/components/DoFocus.vue
-
391src/views/myWork/my/components/MyFocusList.vue
-
2src/views/myWork/my/components/boxCard.vue
-
2src/views/xm/core/xmMenu/XmMenuEdit.vue
-
2src/views/xm/core/xmQuestion/XmQuestionEdit.vue
-
2src/views/xm/core/xmTask/XmTaskEdit.vue
@ -0,0 +1,47 @@ |
|||||
|
import axios from '@/utils/request' |
||||
|
|
||||
|
import { getDicts,initSimpleDicts,initComplexDicts } from '@/api/mdp/meta/item';//字典表
|
||||
|
import config from '@/common/config' |
||||
|
|
||||
|
let base = config.getSysBasePath(); |
||||
|
|
||||
|
/**-------------------------与后端通讯接口------------------请写在下面-------------------------------------------- */ |
||||
|
/** |
||||
|
* 我关注的项目或者任务 |
||||
|
*1 默认只开放普通查询,所有查询,只要上传 分页参数 {pageNum:当前页码从1开始,pageSize:每页记录数,total:总记录【数如果是0后台会自动计算总记录数非0不会自动计算】},后台都会自动按分页查询 其它 api用到再打开,没用到的api请注释掉, |
||||
|
*2 查询、新增、修改的参数格式 params={userid:'用户编号 主键',bizId:'关注的对象主键 主键',pbizId:'对象上级编号,项目时填项目编号,任务时填项目编号,产品时填产品编号,需求时填产品编号,bug时填产品编号,迭代时填产品编号 主键',username:'用户名称',focusType:'对象类型:项目-1/任务-2/产品-3/需求-4/bug-5/迭代-6/团队-7/组织-8/个人-9/文章-W/合同-H/客户-K',bizName:'任务名称',pbizName:'对象上级名称',ftime:'关注时间',ubranchId:'用户归属机构'} |
||||
|
**/ |
||||
|
|
||||
|
//普通查询 条件之间and关系
|
||||
|
export const listUserFocus = params => { return axios.get(`${base}/mdp/sys/userFocus/list`, { params: params }); }; |
||||
|
|
||||
|
//删除一条我关注的项目或者任务 params={userid:'用户编号 主键',bizId:'关注的对象主键 主键',pbizId:'对象上级编号,项目时填项目编号,任务时填项目编号,产品时填产品编号,需求时填产品编号,bug时填产品编号,迭代时填产品编号 主键'}
|
||||
|
export const delUserFocus = params => { return axios.post(`${base}/mdp/sys/userFocus/del`,params); }; |
||||
|
|
||||
|
//批量删除我关注的项目或者任务 params=[{userid:'用户编号 主键',bizId:'关注的对象主键 主键',pbizId:'对象上级编号,项目时填项目编号,任务时填项目编号,产品时填产品编号,需求时填产品编号,bug时填产品编号,迭代时填产品编号 主键'}]
|
||||
|
export const batchDelUserFocus = params => { return axios.post(`${base}/mdp/sys/userFocus/batchDel`, params); }; |
||||
|
|
||||
|
//修改一条我关注的项目或者任务记录
|
||||
|
export const editUserFocus = params => { return axios.post(`${base}/mdp/sys/userFocus/edit`, params); }; |
||||
|
|
||||
|
//新增一条我关注的项目或者任务
|
||||
|
export const addUserFocus = params => { return axios.post(`${base}/mdp/sys/userFocus/add`, params); }; |
||||
|
|
||||
|
//批量修改某些字段
|
||||
|
export const editSomeFieldsUserFocus = params => { return axios.post(`${base}/mdp/sys/userFocus/editSomeFields`, params); }; |
||||
|
|
||||
|
//普通查询 条件之间and关系
|
||||
|
export const myFocusForIndex = params => { |
||||
|
return axios.get(`${base}/mdp/sys/userFocus/myFocusForIndex`, { params: params }); |
||||
|
}; |
||||
|
|
||||
|
/**-------------------------前端mng|add|edit界面公共函数---------------请写在下面----------------------------------------------- */ |
||||
|
//初始化页面上的字典
|
||||
|
export const initDicts = (that) => { |
||||
|
var itemCodes=['objType'];//在此添加要加载的字典 如['sex','grade','lvl']
|
||||
|
if(itemCodes.length>0){ |
||||
|
initSimpleDicts('all',itemCodes).then(res=>{ |
||||
|
Object.assign(that.dicts,res.data.data) |
||||
|
}); |
||||
|
} |
||||
|
}; |
||||
@ -0,0 +1,113 @@ |
|||||
|
<template> |
||||
|
<section> |
||||
|
<el-row v-if="userFocuss.length>0"> |
||||
|
<el-tag type="success">已关注</el-tag> <el-button @click="handleDel">取消关注</el-button> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-row v-if="userFocuss.length<=0"> |
||||
|
<el-tag type="primary">未关注</el-tag> <el-button @click="saveSubmit">去关注</el-button> |
||||
|
</el-row> |
||||
|
</section> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import util from '@/common/js/util';//全局公共库 |
||||
|
import config from "@/common/config"; //全局公共库import |
||||
|
import { initDicts, listUserFocus,addUserFocus,delUserFocus } from '@/api/mdp/sys/userFocus'; |
||||
|
import { mapGetters } from 'vuex' |
||||
|
|
||||
|
export default { |
||||
|
name:'xmMyDoFocus', |
||||
|
components: { |
||||
|
|
||||
|
}, |
||||
|
computed: { |
||||
|
...mapGetters([ 'userInfo' ]), |
||||
|
|
||||
|
}, |
||||
|
props:['pbizId','bizId','focusType','bizName'], |
||||
|
|
||||
|
watch: { |
||||
|
bizId(){ |
||||
|
this.searchUserFocuss() |
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
load:{ list: false, edit: false, del: false, add: false },//查询中... |
||||
|
dicts:{},//下拉选择框的所有静态数据 params={categoryId:'all',itemCodes:['sex']} 返回结果 {sex: [{id:'1',name:'男'},{id:'2',name:'女'}]} |
||||
|
|
||||
|
userFocuss:[], |
||||
|
}//end return |
||||
|
},//end data |
||||
|
methods: { |
||||
|
|
||||
|
...util, |
||||
|
|
||||
|
//获取列表 UserFocus 我关注的项目或者任务 |
||||
|
searchUserFocuss() { |
||||
|
let params = { |
||||
|
pbizId:this.pbizId, |
||||
|
bizId:this.bizId, |
||||
|
focusType:this.focusType |
||||
|
}; |
||||
|
|
||||
|
|
||||
|
this.load.list = true; |
||||
|
listUserFocus(params).then((res) => { |
||||
|
var tips=res.data.tips; |
||||
|
if(tips.isOk){ |
||||
|
this.userFocuss = res.data.data; |
||||
|
}else{ |
||||
|
this.$notify({ position:'bottom-left',showClose:true, message: tips.msg, type: 'error' }); |
||||
|
} |
||||
|
this.load.list = false; |
||||
|
}).catch( err => this.load.list = false ); |
||||
|
}, |
||||
|
initData: function(){ |
||||
|
this.searchUserFocuss(); |
||||
|
}, |
||||
|
//删除userFocus |
||||
|
handleDel: function ( ) { |
||||
|
var row=this.userFocuss[0] |
||||
|
this.load.del=true; |
||||
|
let params = { userid:row.userid, bizId:row.bizId, pbizId:row.pbizId }; |
||||
|
delUserFocus(params).then((res) => { |
||||
|
this.load.del=false; |
||||
|
var tips=res.data.tips; |
||||
|
if(tips.isOk){ |
||||
|
this.searchUserFocuss(); |
||||
|
} |
||||
|
this.$notify({ position:'bottom-left', showClose:true, message: tips.msg, type: tips.isOk?'success':'error' }); |
||||
|
}).catch( err => this.load.del=false ); |
||||
|
}, |
||||
|
//新增、编辑提交UserFocus 我关注的项目或者任务父组件监听@submit="afterEditSubmit" |
||||
|
saveSubmit: function () { |
||||
|
this.load.edit=true |
||||
|
let params = {pbizId:this.pbizId,bizId:this.bizId,focusType:this.focusType,bizName:this.bizName} |
||||
|
var func=addUserFocus |
||||
|
func(params).then((res) => { |
||||
|
this.load.edit=false |
||||
|
var tips=res.data.tips; |
||||
|
|
||||
|
if(tips.isOk){ |
||||
|
this.searchUserFocuss() |
||||
|
this.$emit('submit');// @submit="afterAddSubmit" |
||||
|
} |
||||
|
this.$notify({ position:'bottom-left',showClose:true, message: tips.msg, type: tips.isOk?'success':'error' }); |
||||
|
}).catch( err =>this.load.edit=false); |
||||
|
}, |
||||
|
},//end method |
||||
|
mounted() { |
||||
|
this.$nextTick(() => { |
||||
|
initDicts(this); |
||||
|
this.initData() |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,391 @@ |
|||||
|
<template> |
||||
|
<section> |
||||
|
<el-row :gutter="20"> |
||||
|
<el-col :span="8"> |
||||
|
<el-card class="box-card"> |
||||
|
<div slot="header" class="clearfix"> |
||||
|
<div class="avatar-container"> |
||||
|
<div class="avatar-wrapper"> |
||||
|
<img class="user-avatar" src="../../img/cp.png"> |
||||
|
<span class="username"> 产品、项目</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div v-for="(o,index) in pps" :key="index" class="list-item"> |
||||
|
<el-tag v-for="(item,index) in formatDictsWithClass(dicts,'objType',o.focusType)" :key="index" :type="item.className">{{item.name}}</el-tag> |
||||
|
<el-link @click="toBizPage(o)">{{o.bizName }}</el-link> |
||||
|
<div class="tool-bar"> |
||||
|
<span class="u-btn"> |
||||
|
<el-button type="text" @click="handleDel(o,index)" icon="el-icon-remove-outline" title="取消关注" >取消关注 </el-button> |
||||
|
</span> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</el-card> |
||||
|
</el-col> |
||||
|
|
||||
|
<el-col :span="8"> |
||||
|
<el-card class="box-card"> |
||||
|
<div slot="header" class="clearfix"> |
||||
|
<div class="avatar-container"> |
||||
|
<div class="avatar-wrapper"> |
||||
|
<img class="user-avatar" src="../../img/xmgl.png"> |
||||
|
<span class="username"> 迭代、需求</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div v-for="(o,index) in ims" :key="index" class="list-item"> |
||||
|
<el-tag v-for="(item,index) in formatDictsWithClass(dicts,'objType',o.focusType)" :key="index" :type="item.className">{{item.name}}</el-tag> |
||||
|
<el-link @click="toBizPage(o)">{{o.bizName }}</el-link> |
||||
|
<div class="tool-bar"> |
||||
|
<span class="u-btn"> |
||||
|
<el-button type="text" circle @click="handleDel(o,index)" icon="el-icon-remove-outline" title="取消关注">取消关注 </el-button> |
||||
|
</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</el-card> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-card class="box-card"> |
||||
|
<div slot="header" class="clearfix"> |
||||
|
<div class="avatar-container"> |
||||
|
<div class="avatar-wrapper"> |
||||
|
<img class="user-avatar" src="../../img/xqgl.png"> |
||||
|
<span class="username">任务、缺陷</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div v-for="(o,index) in tbs" :key="index" class="list-item"> |
||||
|
<el-tag v-for="(item,index) in formatDictsWithClass(dicts,'objType',o.focusType)" :key="index" :type="item.className">{{item.name}}</el-tag> |
||||
|
<el-link @click="toBizPage(o)"> {{o.bizName }}</el-link> |
||||
|
<div class="tool-bar"> |
||||
|
<span class="u-btn"> |
||||
|
<el-button type="text" @click="handleDel(o,index)" icon="el-icon-remove-outline" title="取消关注"> 取消关注</el-button> |
||||
|
</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</el-card> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</section> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
|
||||
|
import util from '@/common/js/util';//全局公共库 |
||||
|
import config from '@/common/config';//全局公共库 |
||||
|
import { initDicts,myFocusForIndex, delUserFocus, batchDelUserFocus,editSomeFieldsUserFocus } from '@/api/mdp/sys/userFocus'; |
||||
|
import { mapGetters } from 'vuex' |
||||
|
|
||||
|
export default { |
||||
|
name:'userFocusMng', |
||||
|
components: { |
||||
|
}, |
||||
|
props:['visible'], |
||||
|
computed: { |
||||
|
...mapGetters(['userInfo']), |
||||
|
pps(){ |
||||
|
return this.userFocuss.filter(k=>k.focusType=='1'||k.focusType=='3') |
||||
|
}, |
||||
|
ims(){ |
||||
|
return this.userFocuss.filter(k=>k.focusType=='4'||k.focusType=='6') |
||||
|
}, |
||||
|
tbs(){ |
||||
|
return this.userFocuss.filter(k=>k.focusType=='2' || k.focusType=='5') |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
watch:{ |
||||
|
visible(val){ |
||||
|
if(val==true){ |
||||
|
this.initData(); |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
filters: { |
||||
|
key: '' |
||||
|
}, |
||||
|
userFocuss: [],//查询结果 |
||||
|
pageInfo:{//分页数据 |
||||
|
total:0,//服务器端收到0时,会自动计算总记录数,如果上传>0的不自动计算。 |
||||
|
pageSize:10,//每页数据 |
||||
|
count:false,//是否需要重新计算总记录数 |
||||
|
pageNum:1,//当前页码、从1开始计算 |
||||
|
orderFields:[],//排序列 如 ['sex','student_id'],必须为数据库字段 |
||||
|
orderDirs:[]//升序 asc,降序desc 如 性别 升序、学生编号降序 ['asc','desc'] |
||||
|
}, |
||||
|
load:{ list: false, edit: false, del: false, add: false },//查询中... |
||||
|
sels: [],//列表选中数据 |
||||
|
dicts:{ |
||||
|
objType:[], |
||||
|
//sex: [{id:'1',name:'男'},{id:'2',name:'女'}] |
||||
|
},//下拉选择框的所有静态数据 params={categoryId:'all',itemCodes:['sex']} 返回结果 {sex: [{id:'1',name:'男'},{id:'2',name:'女'}]} |
||||
|
addFormVisible: false,//新增userFocus界面是否显示 |
||||
|
addForm: { |
||||
|
userid:'',username:'',bizId:'',focusType:'',pbizId:'',bizName:'',pbizName:'',ftime:'',ubranchId:'' |
||||
|
}, |
||||
|
|
||||
|
editFormVisible: false,//编辑界面是否显示 |
||||
|
editForm: { |
||||
|
userid:'',username:'',bizId:'',focusType:'',pbizId:'',bizName:'',pbizName:'',ftime:'',ubranchId:'' |
||||
|
}, |
||||
|
maxTableHeight:300, |
||||
|
} |
||||
|
},//end data |
||||
|
methods: { |
||||
|
|
||||
|
...util, |
||||
|
|
||||
|
handleSizeChange(pageSize) { |
||||
|
this.pageInfo.pageSize=pageSize; |
||||
|
this.getUserFocuss(); |
||||
|
}, |
||||
|
handleCurrentChange(pageNum) { |
||||
|
this.pageInfo.pageNum = pageNum; |
||||
|
this.getUserFocuss(); |
||||
|
}, |
||||
|
// 表格排序 obj.order=ascending/descending,需转化为 asc/desc ; obj.prop=表格中的排序字段,字段驼峰命名 |
||||
|
sortChange( obj ){ |
||||
|
if(obj.order==null){ |
||||
|
this.pageInfo.orderFields=[]; |
||||
|
this.pageInfo.orderDirs=[]; |
||||
|
}else{ |
||||
|
var dir='asc'; |
||||
|
if(obj.order=='ascending'){ |
||||
|
dir='asc' |
||||
|
}else{ |
||||
|
dir='desc'; |
||||
|
} |
||||
|
|
||||
|
this.pageInfo.orderFields=[util.toLine(obj.prop)]; |
||||
|
this.pageInfo.orderDirs=[dir]; |
||||
|
} |
||||
|
this.getUserFocuss(); |
||||
|
}, |
||||
|
searchUserFocuss:function(){ |
||||
|
this.pageInfo.count=true; |
||||
|
this.getUserFocuss(); |
||||
|
}, |
||||
|
//获取列表 UserFocus 我关注的项目或者任务 |
||||
|
getUserFocuss() { |
||||
|
debugger; |
||||
|
let params = { |
||||
|
pageSize: this.pageInfo.pageSize, |
||||
|
pageNum: this.pageInfo.pageNum, |
||||
|
total: this.pageInfo.total, |
||||
|
count:this.pageInfo.count |
||||
|
}; |
||||
|
if(this.pageInfo.orderFields!=null && this.pageInfo.orderFields.length>0){ |
||||
|
let orderBys=[]; |
||||
|
for(var i=0;i<this.pageInfo.orderFields.length;i++){ |
||||
|
orderBys.push(this.pageInfo.orderFields[i]+" "+this.pageInfo.orderDirs[i]) |
||||
|
} |
||||
|
params.orderBy= orderBys.join(",") |
||||
|
} |
||||
|
if(this.filters.key){ |
||||
|
params.key=this.filters.key |
||||
|
} |
||||
|
|
||||
|
this.load.list = true; |
||||
|
myFocusForIndex(params).then((res) => { |
||||
|
debugger; |
||||
|
var tips=res.data.tips; |
||||
|
if(tips.isOk){ |
||||
|
this.pageInfo.total = res.data.total; |
||||
|
this.pageInfo.count=false; |
||||
|
this.userFocuss = res.data.data; |
||||
|
localStorage.setItem('mdp-sys-user-focus-list',JSON.stringify( this.userFocuss )) |
||||
|
}else{ |
||||
|
this.$notify({ position:'bottom-left',showClose:true, message: tips.msg, type: 'error' }); |
||||
|
} |
||||
|
this.load.list = false; |
||||
|
}).catch( err => this.load.list = false ); |
||||
|
}, |
||||
|
|
||||
|
//显示编辑界面 UserFocus 我关注的项目或者任务 |
||||
|
showEdit: function ( row,index ) { |
||||
|
this.editFormVisible = true; |
||||
|
this.editForm = Object.assign({}, row); |
||||
|
}, |
||||
|
/** |
||||
|
* that.dicts['focusType']=[{id:'1',name:'项目'},{id:'2',name:'任务'},{id:'3',name:'产品'},{id:'4',name:'需求'},{id:'5',name:'缺陷'},] |
||||
|
*/ |
||||
|
toBizPage(bizObj){ |
||||
|
if(bizObj.focusType=='1'){ |
||||
|
this.$router.push({path:'/xm/core/xmProject/XmProjectInfoRoute',query:{id:bizObj.bizId}}) |
||||
|
}else if(bizObj.focusType=='3'){ |
||||
|
this.$router.push({path:'/xm/core/xmProduct/XmProductInfoRoute',query:{id:bizObj.bizId}}) |
||||
|
}else if(bizObj.focusType=='2'){ |
||||
|
this.$router.push({path:'/xm/core/xmTask/XmTaskDetailRoute',query:{id:bizObj.bizId}}) |
||||
|
}else if(bizObj.focusType=='4'){ |
||||
|
this.$router.push({path:'/xm/core/xmMenu/XmMenuDetailRoute',query:{id:bizObj.bizId}}) |
||||
|
}else if(bizObj.focusType=='5'){ |
||||
|
this.$router.push({path:'/xm/core/xmQuestion/XmQuestionDetailRoute',query:{id:bizObj.bizId}}) |
||||
|
}else if(bizObj.focusType=='6'){ |
||||
|
this.$router.push({path:'/xm/core/xmIteration/XmIterationInfoRoute',query:{id:bizObj.bizId}}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
}, |
||||
|
//显示新增界面 UserFocus 我关注的项目或者任务 |
||||
|
showAdd: function () { |
||||
|
this.addFormVisible = true; |
||||
|
//this.addForm=Object.assign({}, this.editForm); |
||||
|
}, |
||||
|
afterAddSubmit(){ |
||||
|
this.addFormVisible=false; |
||||
|
this.pageInfo.count=true; |
||||
|
this.getUserFocuss(); |
||||
|
}, |
||||
|
afterEditSubmit(){ |
||||
|
this.editFormVisible=false; |
||||
|
}, |
||||
|
//选择行userFocus |
||||
|
selsChange: function (sels) { |
||||
|
this.sels = sels; |
||||
|
}, |
||||
|
//删除userFocus |
||||
|
handleDel: function (row,index) { |
||||
|
this.load.del=true; |
||||
|
let params = { userid:row.userid, bizId:row.bizId, pbizId:row.pbizId }; |
||||
|
delUserFocus(params).then((res) => { |
||||
|
this.load.del=false; |
||||
|
var tips=res.data.tips; |
||||
|
if(tips.isOk){ |
||||
|
this.searchUserFocuss(); |
||||
|
} |
||||
|
this.$notify({ position:'bottom-left', showClose:true, message: tips.msg, type: tips.isOk?'success':'error' }); |
||||
|
}).catch( err => this.load.del=false ); |
||||
|
|
||||
|
}, |
||||
|
//批量删除userFocus |
||||
|
batchDel: function () { |
||||
|
if(this.sels.length<=0){ |
||||
|
return; |
||||
|
} |
||||
|
var params=this.sels.map(i=>{ |
||||
|
return { userid:i.userid, bizId:i.bizId, pbizId:i.pbizId} |
||||
|
}) |
||||
|
this.$confirm('确认删除选中记录吗?', '提示', { |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
this.load.del=true; |
||||
|
batchDelUserFocus(params).then((res) => { |
||||
|
this.load.del=false; |
||||
|
var tips=res.data.tips; |
||||
|
if( tips.isOk ){ |
||||
|
this.searchUserFocuss(); |
||||
|
} |
||||
|
this.$notify({ position:'bottom-left',showClose:true, message: tips.msg, type: tips.isOk?'success':'error'}); |
||||
|
}).catch( err => this.load.del=false ); |
||||
|
}); |
||||
|
}, |
||||
|
editSomeFields(row,fieldName,$event){ |
||||
|
let params={}; |
||||
|
if(this.sels.length>0){ |
||||
|
if(!this.sels.some(k=> k.userid==row.userid && k.bizId==row.bizId && k.pbizId==row.pbizId)){ |
||||
|
this.$notify({position:'bottom-left',showClose:true,message:'请编辑选中的行',type:'warning'}) |
||||
|
Object.assign(this.editForm,this.editFormBak) |
||||
|
return; |
||||
|
} |
||||
|
params['pkList']=this.sels.map(i=>{ return { userid:i.userid, bizId:i.bizId, pbizId:i.pbizId}}) |
||||
|
}else{ |
||||
|
params['pkList']=[row].map(i=>{ return { userid:i.userid, bizId:i.bizId, pbizId:i.pbizId}}) |
||||
|
} |
||||
|
params[fieldName]=$event |
||||
|
var func = editSomeFieldsUserFocus |
||||
|
func(params).then(res=>{ |
||||
|
let tips = res.data.tips; |
||||
|
if(tips.isOk){ |
||||
|
if(this.sels.length>0){ |
||||
|
this.searchUserFocuss(); |
||||
|
} |
||||
|
this.editFormBak=[...this.editForm] |
||||
|
}else{ |
||||
|
Object.assign(this.editForm,this.editFormBak) |
||||
|
this.$notify({position:'bottom-left',showClose:true,message:tips.msg,type:tips.isOk?'success':'error'}) |
||||
|
} |
||||
|
}).catch((e)=>Object.assign(this.editForm,this.editFormBak)) |
||||
|
}, |
||||
|
rowClick: function(row, event, column){ |
||||
|
this.editForm=row |
||||
|
this.editFormBak={...row}; |
||||
|
this.$emit('row-click',row, event, column);// @row-click="rowClick" |
||||
|
}, |
||||
|
initData: function(){ |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
},//end methods |
||||
|
mounted() { |
||||
|
this.$nextTick(() => { |
||||
|
initDicts(this); |
||||
|
this.initData() |
||||
|
var myFocusList=localStorage.getItem('mdp-sys-user-focus-list') |
||||
|
debugger; |
||||
|
if(myFocusList){ |
||||
|
this.userFocuss=JSON.parse(myFocusList) |
||||
|
}else{ |
||||
|
this.searchUserFocuss(); |
||||
|
} |
||||
|
|
||||
|
//this.maxTableHeight = util.calcTableMaxHeight(this.$refs.userFocusTable.$el) |
||||
|
|
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.box-card{ |
||||
|
height: 450px; |
||||
|
} |
||||
|
|
||||
|
.avatar-container { |
||||
|
height: 20px; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
.avatar-wrapper { |
||||
|
cursor: pointer; |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
align-items: center; |
||||
|
.user-avatar { |
||||
|
height: 34px; |
||||
|
width: 34px; |
||||
|
border-radius: 50%; |
||||
|
margin-right: 12px; |
||||
|
} |
||||
|
.username{ |
||||
|
color: #7D7D7D; |
||||
|
font-size: 18px; |
||||
|
margin-right: 2px; |
||||
|
} |
||||
|
.el-icon-caret-bottom { |
||||
|
font-size: 22px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
.tool-bar{ |
||||
|
visibility: hidden; |
||||
|
float: right; |
||||
|
} |
||||
|
|
||||
|
.list-item{ |
||||
|
margin-bottom: 15px; |
||||
|
} |
||||
|
|
||||
|
.list-item:hover{ |
||||
|
.tool-bar{ |
||||
|
visibility: visible; |
||||
|
.u-btn{ |
||||
|
float: right; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue