diff --git a/src/api/xm/core/xmMyFocus.js b/src/api/xm/core/xmMyFocus.js
index a68bff76..f130e62c 100644
--- a/src/api/xm/core/xmMyFocus.js
+++ b/src/api/xm/core/xmMyFocus.js
@@ -1,30 +1,47 @@
import axios from '@/utils/request'
+import { getDicts,initSimpleDicts,initComplexDicts } from '@/api/mdp/meta/item';//字典表
import config from '@/common/config'
let base = config.getCoreBasePath();
-
+/**-------------------------与后端通讯接口------------------请写在下面-------------------------------------------- */
/**
- * xm_my_focus
- *1 默认只开放普通查询,所有查询,只要上传 分页参数 {currentPage:当前页码从1开始,pageSize:每页记录数,total:总记录【数如果是0后台会自动计算总记录数非0不会自动计算】},后台都会自动按分页查询 其它 api用到再打开,没用到的api请注释掉,
- *2 查询、新增、修改的参数格式 params={id:'主键 主键',userid:'用户编号',username:'用户名称',taskId:'关注的任务主键',focusType:'对象类型项目-project/任务-task',projectId:'项目编号',projectName:'项目名称',taskName:'任务名称'}
+ * 我关注的项目或者任务
+ *1 默认只开放普通查询,所有查询,只要上传 分页参数 {pageNum:当前页码从1开始,pageSize:每页记录数,total:总记录【数如果是0后台会自动计算总记录数非0不会自动计算】},后台都会自动按分页查询 其它 api用到再打开,没用到的api请注释掉,
+ *2 查询、新增、修改的参数格式 params={userid:'用户编号 主键',bizId:'关注的对象主键 主键',pbizId:'对象上级编号,项目时填项目编号,任务时填项目编号,产品时填产品编号,需求时填产品编号,bug时填产品编号 主键',username:'用户名称',focusType:'对象类型:项目-1/任务-2/产品-3/需求-4/bug-5',bizName:'任务名称',pbizName:'对象上级名称',ftime:'关注时间',ubranchId:'用户归属机构'}
**/
//普通查询 条件之间and关系
export const listXmMyFocus = params => { return axios.get(`${base}/xm/core/xmMyFocus/list`, { params: params }); };
-//模糊查询xm_my_focus 条件之间or关系
-//export const listXmMyFocusKey = params => { return axios.get(`${base}/xm/core/xmMyFocus/listKey`, { params: params }); };
-
-//删除一条xm_my_focus params={id:'主键 主键'}
+//删除一条我关注的项目或者任务 params={userid:'用户编号 主键',bizId:'关注的对象主键 主键',pbizId:'对象上级编号,项目时填项目编号,任务时填项目编号,产品时填产品编号,需求时填产品编号,bug时填产品编号 主键'}
export const delXmMyFocus = params => { return axios.post(`${base}/xm/core/xmMyFocus/del`,params); };
-//批量删除xm_my_focus params=[{id:'主键 主键'}]
+//批量删除我关注的项目或者任务 params=[{userid:'用户编号 主键',bizId:'关注的对象主键 主键',pbizId:'对象上级编号,项目时填项目编号,任务时填项目编号,产品时填产品编号,需求时填产品编号,bug时填产品编号 主键'}]
export const batchDelXmMyFocus = params => { return axios.post(`${base}/xm/core/xmMyFocus/batchDel`, params); };
-//修改一条xm_my_focus记录
+//修改一条我关注的项目或者任务记录
export const editXmMyFocus = params => { return axios.post(`${base}/xm/core/xmMyFocus/edit`, params); };
-//新增一条xm_my_focus
-export const addXmMyFocus = params => { return axios.post(`${base}/xm/core/xmMyFocus/add`, params); };
\ No newline at end of file
+//新增一条我关注的项目或者任务
+export const addXmMyFocus = params => { return axios.post(`${base}/xm/core/xmMyFocus/add`, params); };
+
+//批量修改某些字段
+export const editSomeFieldsXmMyFocus = params => { return axios.post(`${base}/xm/core/xmMyFocus/editSomeFields`, params); };
+
+
+//普通查询 条件之间and关系
+export const myFocusForIndex = params => { return axios.get(`${base}/xm/core/xmMyFocus/myFocusForIndex`, { params: params }); };
+
+
+/**-------------------------前端mng|add|edit界面公共函数---------------请写在下面----------------------------------------------- */
+//初始化页面上的字典
+export const initDicts = (that) => {
+ var itemCodes=[];//在此添加要加载的字典 如['sex','grade','lvl']
+ if(itemCodes.length>0){
+ initSimpleDicts('all',itemCodes).then(res=>{
+ Object.assign(that.dicts,res.data.data)
+ });
+ }
+};
\ No newline at end of file
diff --git a/src/views/myWork/my/components/boxCard.vue b/src/views/myWork/my/components/boxCard.vue
index 00aec5a5..2048eada 100644
--- a/src/views/myWork/my/components/boxCard.vue
+++ b/src/views/myWork/my/components/boxCard.vue
@@ -30,6 +30,7 @@
+
@@ -41,6 +42,8 @@ import dsp from '@/views/mdp/workflow/ru/task/TaskListAssigneeToMe.vue';
import wdrw from '@/views/xm/core/xmTask/xmMyTaskCenter.vue';
import wdcp from '@/views/xm/core/xmProduct/XmProductAllMng.vue';
import wdxm from '@/views/xm/core/xmProject/XmProjectMng';
+
+import myFocus from '@/views/xm/core/xmMyFocus/XmMyFocusList';
import VueGridLayout from 'vue-grid-layout';
import { mapGetters } from 'vuex'
@@ -50,6 +53,7 @@ export default {
wdrw,
wdcp,
wdxm,
+ myFocus,
GridLayout: VueGridLayout.GridLayout,
GridItem: VueGridLayout.GridItem
},
@@ -68,6 +72,7 @@ export default {
val.forEach((element, index) => {
this.addItem(element, index);
});
+ this.addItem({menuid:'myFocus',menuname:'我的关注'}, val.length+1);
}
}
},
@@ -100,7 +105,7 @@ export default {
mounted() {
this.$nextTick(() => {
- this.$store.dispatch('getUserFavoriteMenu', {userid: this.userInfo.displayUserid});
+ this.$store.dispatch('getUserFavoriteMenu', {userid: this.userInfo.userid});
})
},
diff --git a/src/views/myWork/my/index.vue b/src/views/myWork/my/index.vue
index 4c19cd2b..e7b6f2f0 100644
--- a/src/views/myWork/my/index.vue
+++ b/src/views/myWork/my/index.vue
@@ -3,12 +3,13 @@
-
+
{{getDate}}
{{getTimeStatus}},{{userInfo.username}},今天也要元气满满哦!
-
+
+
模块编辑
@@ -47,8 +48,10 @@
缺陷管理
-
-
+
+
+
+
@@ -57,14 +60,14 @@ import NProgress from 'nprogress' // progress bar
import moduleSet from './components/moduleSet'
import boxCard from './components/boxCard'
-import { mapGetters } from 'vuex'
+import { mapGetters } from 'vuex'
import dayjs from 'dayjs'
export default {
components: {moduleSet, boxCard},
computed: {
...mapGetters([
- 'userInfo'
+ 'userInfo'
]),
getDate() {
return dayjs().format('YYYY/M/D');
@@ -101,14 +104,14 @@ export default {
window.open(prefixUrl+path)
NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it
}
-
+
},
},
mounted() {
-
+
}
}
@@ -116,4 +119,4 @@ export default {
\ No newline at end of file
+
diff --git a/src/views/xm/core/xmMyFocus/XmMyFocusAdd.vue b/src/views/xm/core/xmMyFocus/XmMyFocusAdd.vue
deleted file mode 100644
index fa30a28d..00000000
--- a/src/views/xm/core/xmMyFocus/XmMyFocusAdd.vue
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 取消
- 提交
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/views/xm/core/xmMyFocus/XmMyFocusEdit.vue b/src/views/xm/core/xmMyFocus/XmMyFocusEdit.vue
index edfc1a13..ca6b0bd2 100644
--- a/src/views/xm/core/xmMyFocus/XmMyFocusEdit.vue
+++ b/src/views/xm/core/xmMyFocus/XmMyFocusEdit.vue
@@ -1,119 +1,169 @@
-
-
-
-
+
+
+
+
+
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
- 取消
- 提交
-
+
+
+
+
+ 取消
+ 提交
+
+
+
\ No newline at end of file
diff --git a/src/views/xm/core/xmMyFocus/XmMyFocusMng.vue b/src/views/xm/core/xmMyFocus/XmMyFocusMng.vue
index cc2c81c0..bfe5a62f 100644
--- a/src/views/xm/core/xmMyFocus/XmMyFocusMng.vue
+++ b/src/views/xm/core/xmMyFocus/XmMyFocusMng.vue
@@ -1,238 +1,312 @@
-
+
-
- 查询
- +xm_my_focus
- 批量删除
+
+ 查询
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 改
- 删
-
+
+
+
+
+
+
+
+
+
+ {{scope.row.username}}
+
+
+
+
+ {{scope.row.focusType}}
+
+
+
+
+ {{scope.row.bizName}}
+
+
+
+
+ {{scope.row.pbizName}}
+
+
+
+
+ {{scope.row.ftime}}
+
+
+
+
+ {{scope.row.ubranchId}}
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/xm/core/xmProduct/XmProductMng.vue b/src/views/xm/core/xmProduct/XmProductMng.vue
index 6803d532..fd7b7cf6 100644
--- a/src/views/xm/core/xmProduct/XmProductMng.vue
+++ b/src/views/xm/core/xmProduct/XmProductMng.vue
@@ -227,9 +227,10 @@
+ 取消关注
+ 关注
复制
- 视图
- 删除
+ 删除
@@ -319,6 +320,7 @@
import UsersSelect from "@/views/mdp/sys/user/UsersSelect";
import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect.vue';
import XmProductSelect from '@/views/xm/core/components/XmProductSelect.vue';
+ import { addXmMyFocus , delXmMyFocus } from '@/api/xm/core/xmMyFocus';
import Guider from '@/components/Guider/Index.js';
@@ -712,6 +714,23 @@
guiderStart(forceDisplayWhileClosed) { // 初始化引导页
Guider.startByName('xmProductMng',forceDisplayWhileClosed);
},
+
+ focusOrUnfocus:function(row){
+ if(this.menukey=="myFocus"){
+ delXmMyFocus({pbizId:row.id,bizId:row.id}).then(res=>{
+ var tips=res.data.tips;
+ if(tips.isOk){
+ this.getXmProjects();
+ }
+ this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' });
+ })
+ }else{
+ addXmMyFocus({pbizId:row.id,focusType:'3',bizId:row.id,bizName:row.productName}).then(res=>{
+ var tips=res.data.tips;
+ this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' });
+ })
+ }
+ },
},//end methods
components: {
'xm-product-add':XmProductAdd,
diff --git a/src/views/xm/core/xmProject/XmProjectMng.vue b/src/views/xm/core/xmProject/XmProjectMng.vue
index 1d0dd343..41de46d9 100644
--- a/src/views/xm/core/xmProject/XmProjectMng.vue
+++ b/src/views/xm/core/xmProject/XmProjectMng.vue
@@ -761,7 +761,7 @@
},
focusOrUnfocus:function(row){
if(this.menukey=="myFocus"){
- delXmMyFocus({projectId:row.id,focusType:'project',userid:this.userInfo.userid,username:this.userInfo.username}).then(res=>{
+ delXmMyFocus({pbizId:row.id,focusType:'1',bizId:row.id,bizName:row.name}).then(res=>{
var tips=res.data.tips;
if(tips.isOk){
this.getXmProjects();
@@ -769,7 +769,7 @@
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' });
})
}else{
- addXmMyFocus({projectId:row.id,focusType:'project',projectName:row.name,userid:this.userInfo.userid,username:this.userInfo.username}).then(res=>{
+ addXmMyFocus({pbizId:row.id,focusType:'1',bizId:row.id,bizName:row.name}).then(res=>{
var tips=res.data.tips;
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' });
})