15 changed files with 9 additions and 1316 deletions
-
30src/api/xm/core/xmMenuExchange.js
-
3src/router/routes_xm.js
-
3src/views/xm/core/crowd/XmTaskCrowdMng.vue
-
79src/views/xm/core/xmExchange/TaskUserEditor.vue
-
174src/views/xm/core/xmExchange/XmExchangeAdd.vue
-
169src/views/xm/core/xmExchange/XmExchangeEdit.vue
-
330src/views/xm/core/xmExchange/XmExchangeMng.vue
-
3src/views/xm/core/xmIteration/XmIterationInfo.vue
-
6src/views/xm/core/xmMenu/XmMenuEdit.vue
-
6src/views/xm/core/xmMenu/XmMenuRichDetail.vue
-
79src/views/xm/core/xmMenuExchange/MenuUserEditor.vue
-
393src/views/xm/core/xmMenuExchange/XmMenuExchangeMng.vue
-
44src/views/xm/core/xmMenuExchange/XmMenuExchangeRoute.vue
-
3src/views/xm/core/xmProduct/XmProductInfo.vue
-
3src/views/xm/core/xmTask/XmTaskMng.vue
@ -1,30 +0,0 @@ |
|||
import axios from '@/utils/request' |
|||
|
|||
import config from '@/common/config' |
|||
|
|||
let base = config.getCoreBasePath(); |
|||
|
|||
|
|||
/** |
|||
* 功能表 |
|||
*1 默认只开放普通查询,所有查询,只要上传 分页参数 {currentPage:当前页码从1开始,pageSize:每页记录数,total:总记录【数如果是0后台会自动计算总记录数非0不会自动计算】},后台都会自动按分页查询 其它 api用到再打开,没用到的api请注释掉, |
|||
*2 查询、新增、修改的参数格式 params={id:'评论编号 主键',menuId:'功能编号',menuName:'功能名称',productId:'归属产品编号',remark:'备注',pid:'上级评论编号',cuserid:'评论人编号',cusername:'评论人名称',ctime:'评论时间',cbranchId:'评论人所属机构',adopt:'是否采纳0否1采纳',adoptUserid:'采纳人编号',adoptUsername:'采纳人名称',adoptTime:'采纳时间',closed:'关闭该评论0否1是',puserid:'上级用户编号',pusername:'上级姓名',premark:'上级备注',notifyUserids:'本评论需要同步给的人列表,逗号分隔',notifyChannels:'发送通知渠道inner-email/wxpub/sms/im/out-email等逗号分割',notifyUsernames:'通知用户姓名逗号分隔',cuserHeadImg:'发言人头像地址',replyType:'回复方式1引用2回复'} |
|||
**/ |
|||
|
|||
//普通查询 条件之间and关系
|
|||
export const listXmMenuExchange = params => { return axios.get(`${base}/xm/core/xmMenuExchange/list`, { params: params }); }; |
|||
|
|||
//模糊查询功能表 条件之间or关系
|
|||
//export const listXmMenuExchangeKey = params => { return axios.get(`${base}/xm/core/xmMenuExchange/listKey`, { params: params }); };
|
|||
|
|||
//删除一条功能表 params={id:'评论编号 主键'}
|
|||
export const delXmMenuExchange = params => { return axios.post(`${base}/xm/core/xmMenuExchange/del`,params); }; |
|||
|
|||
//批量删除功能表 params=[{id:'评论编号 主键'}]
|
|||
export const batchDelXmMenuExchange = params => { return axios.post(`${base}/xm/core/xmMenuExchange/batchDel`, params); }; |
|||
|
|||
//修改一条功能表记录
|
|||
export const editXmMenuExchange = params => { return axios.post(`${base}/xm/core/xmMenuExchange/edit`, params); }; |
|||
|
|||
//新增一条功能表
|
|||
export const addXmMenuExchange = params => { return axios.post(`${base}/xm/core/xmMenuExchange/add`, params); }; |
|||
@ -1,79 +0,0 @@ |
|||
<template> |
|||
<div class="comment-list head-editor clearfix"> |
|||
<div class="comment-avater"> |
|||
<el-avatar v-if="user.headimgurl" icon="el-icon-user-solid" :src="user.headimgurl">{{user.username}}</el-avatar> |
|||
<el-avatar v-else icon="el-icon-user-solid">{{user.username}}</el-avatar> |
|||
</div> |
|||
<div class="comment-wrap"> |
|||
<div class="clearfix"> |
|||
<vue-editor :id="id" :branch-id="userInfo.branchId" :category-id="projectId+'-'+taskId" v-model="content"></vue-editor> |
|||
</div> |
|||
<div style="margin-top:20px;"></div> |
|||
<el-button @click="publish" class="toolbar" type="primary">发布</el-button> <el-button @click="clearContent" style="margin-right: 0.25rem;" class="toolbar" type="plain">清空内容</el-button> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import util from '@/common/js/util';//全局公共库 |
|||
import { mapGetters } from 'vuex'; |
|||
import VueEditor from '@/components/Tinymce/index'; |
|||
import {sn} from '@/common/js/sequence'; |
|||
export default { |
|||
props:['id',"projectId","taskId",'user'], |
|||
computed: { |
|||
...mapGetters([ |
|||
'userInfo','roles', |
|||
]), |
|||
}, |
|||
data() { |
|||
return { |
|||
content: '', |
|||
} |
|||
}, |
|||
methods: { |
|||
publish() { |
|||
let params = { |
|||
content: this.content, |
|||
} |
|||
if(!this.content){ |
|||
this.$notify.error("请输入内容再提交"); |
|||
return; |
|||
} |
|||
this.$emit('publish',params); |
|||
}, |
|||
clearContent(){ |
|||
this.content=""; |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$nextTick(() => { |
|||
}); |
|||
}, |
|||
components: { |
|||
VueEditor, |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.head-editor{ |
|||
border: none; |
|||
padding: 0 15px 10px 60px; |
|||
margin-top: 15px; |
|||
position: relative; |
|||
} |
|||
.comment-avater{ |
|||
position: absolute; |
|||
left: 10px; |
|||
top: 0; |
|||
} |
|||
.toolbar{ |
|||
float: right; |
|||
margin: .25rem 0; |
|||
} |
|||
.clearfix::after { |
|||
clear: both; |
|||
content: ""; |
|||
} |
|||
</style> |
|||
@ -1,174 +0,0 @@ |
|||
<template> |
|||
<section class="page-container padding border"> |
|||
<el-row> |
|||
<!--新增界面 XmExchange 需求表--> |
|||
<el-form :model="addForm" label-width="120px" :rules="addFormRules" ref="addForm"> |
|||
<el-form-item label="需求编号" prop="taskId"> |
|||
<el-input v-model="addForm.taskId" placeholder="需求编号" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="需求名称" prop="taskName"> |
|||
<el-input v-model="addForm.taskName" placeholder="需求名称" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="归属产品编号" prop="projectId"> |
|||
<el-input v-model="addForm.projectId" placeholder="归属产品编号" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="备注" prop="remark"> |
|||
<el-input v-model="addForm.remark" placeholder="备注" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="评论编号" prop="id"> |
|||
<el-input v-model="addForm.id" placeholder="评论编号" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="上级评论编号" prop="pid"> |
|||
<el-input v-model="addForm.pid" placeholder="上级评论编号" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="评论人编号" prop="cuserid"> |
|||
<el-input v-model="addForm.cuserid" placeholder="评论人编号" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="评论人名称" prop="cusername"> |
|||
<el-input v-model="addForm.cusername" placeholder="评论人名称" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="评论时间" prop="ctime"> |
|||
<el-date-picker type="date" placeholder="选择日期" v-model="addForm.ctime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd"></el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label="评论人所属机构" prop="cbranchId"> |
|||
<el-input v-model="addForm.cbranchId" placeholder="评论人所属机构" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="是否采纳0否1采纳" prop="adopt"> |
|||
<el-input v-model="addForm.adopt" placeholder="是否采纳0否1采纳" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="采纳人编号" prop="adoptUserid"> |
|||
<el-input v-model="addForm.adoptUserid" placeholder="采纳人编号" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="采纳人名称" prop="adoptUsername"> |
|||
<el-input v-model="addForm.adoptUsername" placeholder="采纳人名称" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="采纳时间" prop="adoptTime"> |
|||
<el-date-picker type="date" placeholder="选择日期" v-model="addForm.adoptTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd"></el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label="关闭该评论0否1是" prop="closed"> |
|||
<el-input v-model="addForm.closed" placeholder="关闭该评论0否1是" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="上级用户编号" prop="puserid"> |
|||
<el-input v-model="addForm.puserid" placeholder="上级用户编号" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="上级姓名" prop="pusername"> |
|||
<el-input v-model="addForm.pusername" placeholder="上级姓名" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="上级备注" prop="premark"> |
|||
<el-input v-model="addForm.premark" placeholder="上级备注" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="本评论需要同步给的人列表,逗号分隔" prop="notifyUserids"> |
|||
<el-input v-model="addForm.notifyUserids" placeholder="本评论需要同步给的人列表,逗号分隔" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="发送通知渠道inner-email/wxpub/sms/im/out-email等逗号分割" prop="notifyChannels"> |
|||
<el-input v-model="addForm.notifyChannels" placeholder="发送通知渠道inner-email/wxpub/sms/im/out-email等逗号分割" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="通知用户姓名逗号分隔" prop="notifyUsernames"> |
|||
<el-input v-model="addForm.notifyUsernames" placeholder="通知用户姓名逗号分隔" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="发言人头像地址" prop="cuserHeadImg"> |
|||
<el-input v-model="addForm.cuserHeadImg" placeholder="发言人头像地址" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="回复方式1引用2回复" prop="replyType"> |
|||
<el-input v-model="addForm.replyType" placeholder="回复方式1引用2回复" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-col :span="24" :offset="8"> |
|||
<el-button @click.native="handleCancel">取消</el-button> |
|||
<el-button v-loading="load.add" type="primary" @click.native="addSubmit" :disabled="load.add==true">提交</el-button> |
|||
</el-col> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-row> |
|||
</section> |
|||
</template> |
|||
|
|||
<script> |
|||
import util from '@/common/js/util';//全局公共库 |
|||
import { initSimpleDicts } from '@/api/mdp/meta/item';//下拉框数据查询 |
|||
import { addXmExchange } from '@/api/xm/core/xmExchange'; |
|||
import { mapGetters } from 'vuex' |
|||
|
|||
export default { |
|||
computed: { |
|||
...mapGetters([ |
|||
'userInfo','roles' |
|||
]) |
|||
}, |
|||
props:['xmExchange','visible'], |
|||
watch: { |
|||
'xmExchange':function( xmExchange ) { |
|||
this.addForm = xmExchange; |
|||
}, |
|||
'visible':function(visible) { |
|||
if(visible==true){ |
|||
//从新打开页面时某些数据需要重新加载,可以在这里添加 |
|||
} |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
dicts:{},//下拉选择框的所有静态数据 params=[{categoryId:'0001',itemCode:'sex'}] 返回结果 {'sex':[{optionValue:'1',optionName:'男',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'女',seqOrder:'2',fp:'',isDefault:'0'}]} |
|||
load:{ list: false, edit: false, del: false, add: false },//查询中... |
|||
addFormRules: { |
|||
id: [ |
|||
//{ required: true, message: '评论编号不能为空', trigger: 'blur' } |
|||
] |
|||
}, |
|||
//新增界面数据 需求表 |
|||
addForm: { |
|||
taskId:'',taskName:'',projectId:'',remark:'',id:'',pid:'',cuserid:'',cusername:'',ctime:'',cbranchId:'',adopt:'',adoptUserid:'',adoptUsername:'',adoptTime:'',closed:'',puserid:'',pusername:'',premark:'',notifyUserids:'',notifyChannels:'',notifyUsernames:'',cuserHeadImg:'',replyType:'' |
|||
} |
|||
/**begin 在下面加自定义属性,记得补上面的一个逗号**/ |
|||
|
|||
/**end 在上面加自定义属性**/ |
|||
}//end return |
|||
},//end data |
|||
methods: { |
|||
// 取消按钮点击 父组件监听@cancel="addFormVisible=false" 监听 |
|||
handleCancel:function(){ |
|||
this.$refs['addForm'].resetFields(); |
|||
this.$emit('cancel'); |
|||
}, |
|||
//新增提交XmExchange 需求表 父组件监听@submit="afterAddSubmit" |
|||
addSubmit: function () { |
|||
|
|||
this.$refs.addForm.validate((valid) => { |
|||
if (valid) { |
|||
|
|||
this.$confirm('确认提交吗?', '提示', {}).then(() => { |
|||
this.load.add=true |
|||
let params = Object.assign({}, this.addForm); |
|||
addXmExchange(params).then((res) => { |
|||
this.load.add=false |
|||
var tips=res.data.tips; |
|||
if(tips.isOk){ |
|||
this.$refs['addForm'].resetFields(); |
|||
this.$emit('submit');// @submit="afterAddSubmit" |
|||
} |
|||
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' }); |
|||
}).catch( err => this.load.add=false); |
|||
}); |
|||
} |
|||
}); |
|||
}, |
|||
/**begin 在下面加自定义方法,记得补上面的一个逗号**/ |
|||
|
|||
/**end 在上面加自定义方法**/ |
|||
|
|||
},//end method |
|||
components: { |
|||
//在下面添加其它组件 'xm-exchange-edit':XmExchangeEdit |
|||
}, |
|||
mounted() { |
|||
this.addForm=Object.assign(this.addForm, this.xmExchange); |
|||
/**在下面写其它函数***/ |
|||
|
|||
}//end mounted |
|||
} |
|||
|
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
|||
@ -1,169 +0,0 @@ |
|||
<template> |
|||
<section class="page-container padding border"> |
|||
<el-row> |
|||
<!--编辑界面 XmExchange 需求表--> |
|||
<el-form :model="editForm" label-width="120px" :rules="editFormRules" ref="editForm"> |
|||
<el-form-item label="需求编号" prop="taskId"> |
|||
<el-input v-model="editForm.taskId" placeholder="需求编号"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="需求名称" prop="taskName"> |
|||
<el-input v-model="editForm.taskName" placeholder="需求名称"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="归属产品编号" prop="projectId"> |
|||
<el-input v-model="editForm.projectId" placeholder="归属产品编号"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="备注" prop="remark"> |
|||
<el-input v-model="editForm.remark" placeholder="备注"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="评论编号" prop="id"> |
|||
<el-input v-model="editForm.id" placeholder="评论编号"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="上级评论编号" prop="pid"> |
|||
<el-input v-model="editForm.pid" placeholder="上级评论编号"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="评论人编号" prop="cuserid"> |
|||
<el-input v-model="editForm.cuserid" placeholder="评论人编号"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="评论人名称" prop="cusername"> |
|||
<el-input v-model="editForm.cusername" placeholder="评论人名称"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="评论时间" prop="ctime"> |
|||
<el-date-picker type="date" placeholder="选择日期" v-model="editForm.ctime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd"></el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label="评论人所属机构" prop="cbranchId"> |
|||
<el-input v-model="editForm.cbranchId" placeholder="评论人所属机构"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="是否采纳0否1采纳" prop="adopt"> |
|||
<el-input v-model="editForm.adopt" placeholder="是否采纳0否1采纳"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="采纳人编号" prop="adoptUserid"> |
|||
<el-input v-model="editForm.adoptUserid" placeholder="采纳人编号"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="采纳人名称" prop="adoptUsername"> |
|||
<el-input v-model="editForm.adoptUsername" placeholder="采纳人名称"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="采纳时间" prop="adoptTime"> |
|||
<el-date-picker type="date" placeholder="选择日期" v-model="editForm.adoptTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd"></el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label="关闭该评论0否1是" prop="closed"> |
|||
<el-input v-model="editForm.closed" placeholder="关闭该评论0否1是"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="上级用户编号" prop="puserid"> |
|||
<el-input v-model="editForm.puserid" placeholder="上级用户编号"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="上级姓名" prop="pusername"> |
|||
<el-input v-model="editForm.pusername" placeholder="上级姓名"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="上级备注" prop="premark"> |
|||
<el-input v-model="editForm.premark" placeholder="上级备注"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="本评论需要同步给的人列表,逗号分隔" prop="notifyUserids"> |
|||
<el-input v-model="editForm.notifyUserids" placeholder="本评论需要同步给的人列表,逗号分隔"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="发送通知渠道inner-email/wxpub/sms/im/out-email等逗号分割" prop="notifyChannels"> |
|||
<el-input v-model="editForm.notifyChannels" placeholder="发送通知渠道inner-email/wxpub/sms/im/out-email等逗号分割"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="通知用户姓名逗号分隔" prop="notifyUsernames"> |
|||
<el-input v-model="editForm.notifyUsernames" placeholder="通知用户姓名逗号分隔"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="发言人头像地址" prop="cuserHeadImg"> |
|||
<el-input v-model="editForm.cuserHeadImg" placeholder="发言人头像地址"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="回复方式1引用2回复" prop="replyType"> |
|||
<el-input v-model="editForm.replyType" placeholder="回复方式1引用2回复"></el-input> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-col :span="24" :offset="8"> |
|||
<el-button @click.native="handleCancel">取消</el-button> |
|||
<el-button v-loading="load.edit" type="primary" @click.native="editSubmit" :disabled="load.edit==true">提交</el-button> |
|||
</el-col> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-row> |
|||
</section> |
|||
</template> |
|||
|
|||
<script> |
|||
import util from '@/common/js/util';//全局公共库 |
|||
import { initSimpleDicts } from '@/api/mdp/meta/item';//下拉框数据查询 |
|||
import { editXmExchange } from '@/api/xm/core/xmExchange'; |
|||
import { mapGetters } from 'vuex' |
|||
|
|||
export default { |
|||
computed: { |
|||
...mapGetters([ |
|||
'userInfo','roles' |
|||
]) |
|||
}, |
|||
props:['xmExchange','visible'], |
|||
watch: { |
|||
'xmExchange':function( xmExchange ) { |
|||
this.editForm = xmExchange; |
|||
}, |
|||
'visible':function(visible) { |
|||
if(visible==true){ |
|||
//从新打开页面时某些数据需要重新加载,可以在这里添加 |
|||
} |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
dicts:{},//下拉选择框的所有静态数据 params=[{categoryId:'0001',itemCode:'sex'}] 返回结果 {'sex':[{optionValue:'1',optionName:'男',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'女',seqOrder:'2',fp:'',isDefault:'0'}]} |
|||
load:{ list: false, edit: false, del: false, add: false },//查询中... |
|||
editFormRules: { |
|||
id: [ |
|||
//{ required: true, message: '评论编号不能为空', trigger: 'blur' } |
|||
] |
|||
}, |
|||
//编辑界面数据 XmExchange 需求表 |
|||
editForm: { |
|||
taskId:'',taskName:'',projectId:'',remark:'',id:'',pid:'',cuserid:'',cusername:'',ctime:'',cbranchId:'',adopt:'',adoptUserid:'',adoptUsername:'',adoptTime:'',closed:'',puserid:'',pusername:'',premark:'',notifyUserids:'',notifyChannels:'',notifyUsernames:'',cuserHeadImg:'',replyType:'' |
|||
} |
|||
/**begin 在下面加自定义属性,记得补上面的一个逗号**/ |
|||
|
|||
/**end 在上面加自定义属性**/ |
|||
}//end return |
|||
},//end data |
|||
methods: { |
|||
// 取消按钮点击 父组件监听@cancel="editFormVisible=false" 监听 |
|||
handleCancel:function(){ |
|||
this.$refs['editForm'].resetFields(); |
|||
this.$emit('cancel'); |
|||
}, |
|||
//编辑提交XmExchange 需求表父组件监听@submit="afterEditSubmit" |
|||
editSubmit: function () { |
|||
this.$refs.editForm.validate((valid) => { |
|||
if (valid) { |
|||
this.$confirm('确认提交吗?', '提示', {}).then(() => { |
|||
this.load.edit=true |
|||
let params = Object.assign({}, this.editForm); |
|||
editXmExchange(params).then((res) => { |
|||
this.load.edit=false |
|||
var tips=res.data.tips; |
|||
if(tips.isOk){ |
|||
this.$refs['editForm'].resetFields(); |
|||
this.$emit('submit');// @submit="afterEditSubmit" |
|||
} |
|||
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' }); |
|||
}).catch( err =>this.load.edit=false); |
|||
}); |
|||
} |
|||
}); |
|||
}, |
|||
/**begin 在下面加自定义方法,记得补上面的一个逗号**/ |
|||
|
|||
/**end 在上面加自定义方法**/ |
|||
},//end method |
|||
components: { |
|||
//在下面添加其它组件 'xm-exchange-edit':XmExchangeEdit |
|||
}, |
|||
mounted() { |
|||
this.editForm=Object.assign(this.editForm, this.xmExchange); |
|||
} |
|||
} |
|||
|
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
|||
@ -1,330 +0,0 @@ |
|||
<template> |
|||
<section> |
|||
<el-row class="page-main "> |
|||
<div style="overflow-x:hidden"> |
|||
<task-user-editor :id="'head'" :user="{userid:userInfo.userid,username:userInfo.username,headimgurl:userInfo.headimgurl}" :project-id="xmTask.projectId" :task-id="xmTask.taskId" @publish="onPublishContent"></task-user-editor> |
|||
<div v-for="(item,i) in xmExchanges" :key="i" class="comment-list clearfix"> |
|||
<div class="comment-avater"> |
|||
<el-avatar icon="el-icon-user-solid"></el-avatar> |
|||
</div> |
|||
<div class="comment-wrap"> |
|||
<div class="comment-head"> |
|||
<span>{{item.cusername}}</span> |
|||
<el-button slot="reference" type="text" style="font-size:12px;" @click="handleDel(item)"><i class="el-icon-delete-solid"></i>删除</el-button> |
|||
<el-popover |
|||
placement="bottom" |
|||
trigger="click"> |
|||
<task-user-editor :id="'userquote'+i" :user="{userid:item.cuserid,username:item.cusername,headimgurl:item.cuserHeadImg}" :project-id="xmTask.projectId" :task-id="xmTask.taskId" @publish="onPublishContent($event,item)"></task-user-editor> |
|||
<el-button slot="reference" type="text" style="font-size:12px;"><i class="el-icon-paperclip"></i>引用</el-button> |
|||
</el-popover> |
|||
<el-popover |
|||
placement="bottom" |
|||
trigger="click"> |
|||
<task-user-editor :id="'userreply'+i" :user="{userid:item.cuserid,username:item.cusername,headimgurl:item.cuserHeadImg}" :project-id="xmTask.projectId" :task-id="xmTask.taskId" @publish="onPublishContent($event,item)"></task-user-editor> |
|||
<el-button slot="reference" type="text" style="font-size:12px;"><i class="el-icon-s-comment"></i>回复</el-button> |
|||
</el-popover> |
|||
<small>{{item.createTime}}</small> |
|||
</div> |
|||
|
|||
<blockquote v-if="item.pid"> |
|||
<div v-html="item.premark"></div> |
|||
<footer>—— {{item.pcusername+' '+item.ctime}}</footer> |
|||
</blockquote> |
|||
<div class="comment-content" v-html="item.remark"> |
|||
{{item.remark}} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</el-row> |
|||
</section> |
|||
</template> |
|||
|
|||
<script> |
|||
import util from '@/common/js/util';//全局公共库 |
|||
import config from '@/common/config';//全局公共库 |
|||
import { initSimpleDicts } from '@/api/mdp/meta/item';//下拉框数据查询 |
|||
import { listXmExchange, delXmExchange, batchDelXmExchange,addXmExchange } from '@/api/xm/core/xmExchange'; |
|||
import TaskUserEditor from './TaskUserEditor' |
|||
import { mapGetters } from 'vuex' |
|||
import {sn} from '@/common/js/sequence'; |
|||
|
|||
export default { |
|||
computed: { |
|||
...mapGetters([ |
|||
'userInfo','roles' |
|||
]) |
|||
}, |
|||
props:['xmTask'], |
|||
watch:{ |
|||
xmTask:function(xmTask){ |
|||
this.searchXmExchanges(); |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
filters: { |
|||
key: '' |
|||
}, |
|||
xmExchanges: [],//查询结果 |
|||
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:{ |
|||
//sex:[], |
|||
},//下拉选择框的所有静态数据 params=[{categoryId:'0001',itemCode:'sex'}] 返回结果 {'sex':[{optionValue:'1',optionName:'男',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'女',seqOrder:'2',fp:'',isDefault:'0'}]} |
|||
|
|||
addFormVisible: false,//新增xmExchange界面是否显示 |
|||
//新增xmExchange界面初始化数据 |
|||
addForm: { |
|||
taskId:'',taskName:'',projectId:'',remark:'',id:'',pid:'',cuserid:'',cusername:'',ctime:'',cbranchId:'',adopt:'',adoptUserid:'',adoptUsername:'',adoptTime:'',closed:'',puserid:'',pusername:'',premark:'',notifyUserids:'',notifyChannels:'',notifyUsernames:'',cuserHeadImg:'',replyType:'' |
|||
}, |
|||
|
|||
editFormVisible: false,//编辑界面是否显示 |
|||
//编辑xmExchange界面初始化数据 |
|||
editForm: { |
|||
taskId:'',taskName:'',projectId:'',remark:'',id:'',pid:'',cuserid:'',cusername:'',ctime:'',cbranchId:'',adopt:'',adoptUserid:'',adoptUsername:'',adoptTime:'',closed:'',puserid:'',pusername:'',premark:'',notifyUserids:'',notifyChannels:'',notifyUsernames:'',cuserHeadImg:'',replyType:'' |
|||
} |
|||
/**begin 自定义属性请在下面加 请加备注**/ |
|||
|
|||
/**end 自定义属性请在上面加 请加备注**/ |
|||
} |
|||
},//end data |
|||
methods: { |
|||
handleSizeChange(pageSize) { |
|||
this.pageInfo.pageSize=pageSize; |
|||
this.getXmExchanges(); |
|||
}, |
|||
handleCurrentChange(pageNum) { |
|||
this.pageInfo.pageNum = pageNum; |
|||
this.getXmExchanges(); |
|||
}, |
|||
// 表格排序 obj.order=ascending/descending,需转化为 asc/desc ; obj.prop=表格中的排序字段,字段驼峰命名 |
|||
sortChange( obj ){ |
|||
var dir='asc'; |
|||
if(obj.order=='ascending'){ |
|||
dir='asc' |
|||
}else{ |
|||
dir='desc'; |
|||
} |
|||
if(obj.prop=='xxx'){ |
|||
this.pageInfo.orderFields=['xxx']; |
|||
this.pageInfo.orderDirs=[dir]; |
|||
} |
|||
this.getXmExchanges(); |
|||
}, |
|||
searchXmExchanges(){ |
|||
this.pageInfo.count=true; |
|||
this.getXmExchanges(); |
|||
}, |
|||
//获取列表 XmExchange 需求表 |
|||
getXmExchanges() { |
|||
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.xxx=this.filters.key |
|||
}else{ |
|||
//params.xxx=xxxxx |
|||
} |
|||
params.taskId=this.xmTask.id |
|||
params.projectId=this.xmTask.projectId |
|||
this.load.list = true; |
|||
listXmExchange(params).then((res) => { |
|||
var tips=res.data.tips; |
|||
if(tips.isOk){ |
|||
this.pageInfo.total = res.data.total; |
|||
this.pageInfo.count=false; |
|||
this.xmExchanges = 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 ); |
|||
}, |
|||
|
|||
//显示编辑界面 XmExchange 需求表 |
|||
showEdit: function ( row,index ) { |
|||
this.editFormVisible = true; |
|||
this.editForm = Object.assign({}, row); |
|||
}, |
|||
//显示新增界面 XmExchange 需求表 |
|||
showAdd: function () { |
|||
this.addFormVisible = true; |
|||
//this.addForm=Object.assign({}, this.editForm); |
|||
}, |
|||
afterAddSubmit(){ |
|||
this.addFormVisible=false; |
|||
this.pageInfo.count=true; |
|||
this.getXmExchanges(); |
|||
}, |
|||
afterEditSubmit(){ |
|||
this.editFormVisible=false; |
|||
}, |
|||
//选择行xmExchange |
|||
selsChange: function (sels) { |
|||
this.sels = sels; |
|||
}, |
|||
//删除xmExchange |
|||
handleDel: function (row,index) { |
|||
this.$confirm('确认删除该记录吗?', '提示', { |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.load.del=true; |
|||
let params = { id: row.id }; |
|||
delXmExchange(params).then((res) => { |
|||
this.load.del=false; |
|||
var tips=res.data.tips; |
|||
if(tips.isOk){ |
|||
this.pageInfo.count=true; |
|||
this.getXmExchanges(); |
|||
} |
|||
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' }); |
|||
}).catch( err => this.load.del=false ); |
|||
}); |
|||
}, |
|||
//批量删除xmExchange |
|||
batchDel: function () { |
|||
|
|||
this.$confirm('确认删除选中记录吗?', '提示', { |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.load.del=true; |
|||
batchDelXmExchange(this.sels).then((res) => { |
|||
this.load.del=false; |
|||
var tips=res.data.tips; |
|||
if( tips.isOk ){ |
|||
this.pageInfo.count=true; |
|||
this.getXmExchanges(); |
|||
} |
|||
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error'}); |
|||
}).catch( err => this.load.del=false ); |
|||
}); |
|||
}, |
|||
rowClick: function(row, event, column){ |
|||
this.$emit('row-click',row, event, column);// @row-click="rowClick" |
|||
}, |
|||
/**begin 自定义函数请在下面加**/ |
|||
|
|||
onPublishContent:function(editor,parentXmExchange){ |
|||
var params={}; |
|||
params.remark=editor.content; |
|||
params.id=sn() |
|||
params.taskId=this.xmTask.id |
|||
params.projectId=this.xmTask.projectId |
|||
params.taskName=this.xmTask.name |
|||
|
|||
params.cuserid=this.userInfo.userid |
|||
params.cusername=this.userInfo.username |
|||
params.cbranchId=this.userInfo.branchId |
|||
params.cuserHeadImg=this.userInfo.headimgurl |
|||
if(parentXmExchange){ |
|||
params.pid=parentXmExchange.id |
|||
params.premark=parentXmExchange.remark |
|||
params.pcuserid=parentXmExchange.cuserid |
|||
params.pcusername=parentXmExchange.cusername |
|||
} |
|||
|
|||
addXmExchange(params).then(res=>{ |
|||
var tips =res.data.tips; |
|||
if(tips.isOk){ |
|||
this.xmExchanges.push(params); |
|||
} |
|||
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error'}); |
|||
}) |
|||
} |
|||
/**end 自定义函数请在上面加**/ |
|||
|
|||
},//end methods |
|||
components: { |
|||
//在下面添加其它组件 |
|||
TaskUserEditor, |
|||
}, |
|||
mounted() { |
|||
this.$nextTick(() => { |
|||
this.getXmExchanges(); |
|||
}); |
|||
/** 举例, |
|||
initSimpleDicts( "all",["sex","grade"] ).then(res=>{ |
|||
if(res.data.tips.isOk){ |
|||
this.dicts=res.data.data |
|||
} |
|||
}); |
|||
**/ |
|||
} |
|||
} |
|||
|
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
.comment-list{ |
|||
border-bottom: 1px solid #dcdcdc; |
|||
padding: 0 15px 10px 60px; |
|||
margin-top: 15px; |
|||
position: relative; |
|||
} |
|||
.comment-avater{ |
|||
position: absolute; |
|||
left: 10px; |
|||
top: 0; |
|||
} |
|||
/* .toolbar{ |
|||
float: right; |
|||
margin: .25rem 0; |
|||
} */ |
|||
.comment-head{ |
|||
font-size: 12px; |
|||
margin-bottom: 6px; |
|||
line-height: 29px; |
|||
text-align: right; |
|||
color: #00abfc!important; |
|||
} |
|||
.comment-head span:first-child{ |
|||
float: left; |
|||
font-size: 15px; |
|||
} |
|||
.comment-head .el-button--text{ |
|||
color: #606266; |
|||
} |
|||
.comment-head .el-button--text:hover { |
|||
color: #66b1ff; |
|||
} |
|||
.comment-head .el-button--text:active { |
|||
color: #3a8ee6; |
|||
} |
|||
.comment-wrap blockquote{ |
|||
margin: 0 0 1rem; |
|||
background-color: #f7f7f7; |
|||
border-left: 4px solid #eceeef; |
|||
font-size: 14px; |
|||
padding: 10px 20px; |
|||
} |
|||
.comment-wrap footer{ |
|||
margin-top: 5px; |
|||
color: #818a91; |
|||
font-size: 12px; |
|||
} |
|||
|
|||
.clearfix::after { |
|||
clear: both; |
|||
content: ""; |
|||
} |
|||
</style> |
|||
@ -1,79 +0,0 @@ |
|||
<template> |
|||
<div class="comment-list head-editor clearfix"> |
|||
<div class="comment-avater"> |
|||
<el-avatar v-if="user.headimgurl" icon="el-icon-user-solid" :src="user.headimgurl">{{user.username}}</el-avatar> |
|||
<el-avatar v-else icon="el-icon-user-solid">{{user.username}}</el-avatar> |
|||
</div> |
|||
<div class="comment-wrap"> |
|||
<div class="clearfix"> |
|||
<vue-editor :key="id" :branch-id="userInfo.branchId" :category-id="productId+'-'+menuId" v-model="content"></vue-editor> |
|||
</div> |
|||
<div style="margin-top:20px;"></div> |
|||
<el-button @click="publish" class="toolbar" type="primary">发布</el-button> <el-button @click="clearContent" style="margin-right: 0.25rem;" class="toolbar" type="plain">清空内容</el-button> <el-button @click="close" style="margin-right: 0.25rem;" class="toolbar" type="plain">关闭窗口</el-button> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import util from '@/common/js/util';//全局公共库 |
|||
import { mapGetters } from 'vuex'; |
|||
import VueEditor from '@/components/Tinymce/index'; |
|||
import {sn} from '@/common/js/sequence'; |
|||
export default { |
|||
props:['id',"productId","menuId",'user'], |
|||
computed: { |
|||
...mapGetters([ |
|||
'userInfo','roles', |
|||
]), |
|||
}, |
|||
data() { |
|||
return { |
|||
content: '', |
|||
} |
|||
}, |
|||
methods: { |
|||
publish() { |
|||
if(!this.content){ |
|||
this.$notify.error("请输入内容再提交"); |
|||
return; |
|||
} |
|||
this.$emit('publish',this.content); |
|||
}, |
|||
clearContent(){ |
|||
this.content=""; |
|||
}, |
|||
close(){ |
|||
this.$emit("close") |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$nextTick(() => { |
|||
}); |
|||
}, |
|||
components: { |
|||
VueEditor, |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.head-editor{ |
|||
border: none; |
|||
padding: 0 15px 10px 60px; |
|||
margin-top: 15px; |
|||
position: relative; |
|||
} |
|||
.comment-avater{ |
|||
position: absolute; |
|||
left: 10px; |
|||
top: 0; |
|||
} |
|||
.toolbar{ |
|||
float: right; |
|||
margin: .25rem 0; |
|||
} |
|||
.clearfix::after { |
|||
clear: both; |
|||
content: ""; |
|||
} |
|||
</style> |
|||
@ -1,393 +0,0 @@ |
|||
<template> |
|||
<section class="page-container padding"> |
|||
<el-row> |
|||
<el-input style="width:20%;" v-model="filters.key" placeholder="需求名称、评论、评论人姓名模糊搜素" clearable></el-input > <el-input style="width:20%;" v-model="filters.menuId" placeholder="需求编号查询" clearable></el-input> |
|||
<el-button type="primary" @click="searchXmMenuExchanges">查询</el-button> |
|||
<el-button type="primary" @click="headEditorVisible=true" v-if="filters.xmMenu">发表需求建议</el-button> |
|||
</el-row> |
|||
<el-row class="page-main" :style="{overflowX:'auto',height:maxTableHeight+'px'}" ref="table"> |
|||
<div style="overflow-x:hidden"> |
|||
<menu-user-editor key="head" :id="'head'+filters.xmMenu.menuId" v-if="filters.xmMenu && headEditorVisible" :user="{userid:userInfo.userid,username:userInfo.username,headimgurl:userInfo.headimgurl}" :product-id="filters.xmMenu.productId" :menu-id="filters.xmMenu.menuId" @publish="onPublishContent"></menu-user-editor> |
|||
<div v-for="(item,i) in xmMenuExchanges" :key="i" class="comment-list clearfix"> |
|||
<div class="comment-avater"> |
|||
<el-avatar icon="el-icon-user-solid"></el-avatar> |
|||
</div> |
|||
<div class="comment-wrap"> |
|||
<div class="comment-head"> |
|||
<span>{{item.cusername}}</span> <font style="font-size:12px;color:black;">需求: {{item.menuId}}{{item.menuName}}</font> {{item.ctime}} |
|||
<el-button type="text" style="font-size:12px;" @click="handleDel(item)"><i class="el-icon-delete-solid"></i>删除</el-button> |
|||
|
|||
|
|||
<el-button type="text" style="font-size:12px;" @click="showEditor(item,i)"><i class="el-icon-paperclip"></i>引用</el-button> |
|||
<el-button type="text" style="font-size:12px;" @click="showEditor(item,i)"><i class="el-icon-s-comment"></i>回复</el-button> |
|||
<small>{{item.createTime}}</small> |
|||
</div> |
|||
<blockquote v-if="item.pid"> |
|||
<div v-html="item.premark"></div> |
|||
<footer>—— {{item.pusername}}</footer> |
|||
</blockquote> |
|||
<div class="comment-content" v-html="item.remark"> |
|||
{{item.remark}} |
|||
</div> |
|||
<menu-user-editor :key="'menu-'+i" :id="'menu-'+item.id" v-show="item.showEditor" :user="{userid:userInfo.userid,username:userInfo.username,headimgurl:userInfo.headimgurl}" :product-id="item.productId" :menu-id="item.menuId" @publish="onPublishContent($event,item)" @close="item.showEditor=false"></menu-user-editor> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
</div> |
|||
</el-row> |
|||
<el-pagination layout="total, sizes, prev, pager, next" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20, 50, 100, 500]" :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :total="pageInfo.total" style="float:right;"></el-pagination> |
|||
</section> |
|||
</template> |
|||
|
|||
<script> |
|||
import util from '@/common/js/util';//全局公共库 |
|||
import config from '@/common/config';//全局公共库 |
|||
import { initSimpleDicts } from '@/api/mdp/meta/item';//下拉框数据查询 |
|||
import { listXmMenuExchange, delXmMenuExchange, batchDelXmMenuExchange,addXmMenuExchange } from '@/api/xm/core/xmMenuExchange'; |
|||
import MenuUserEditor from './MenuUserEditor' |
|||
import { mapGetters } from 'vuex' |
|||
import {sn} from '@/common/js/sequence'; |
|||
|
|||
import VueEditor from '@/components/Tinymce/index'; |
|||
|
|||
export default { |
|||
computed: { |
|||
...mapGetters([ |
|||
'userInfo','roles' |
|||
]) |
|||
}, |
|||
props:['xmMenu','simple'], |
|||
watch:{ |
|||
xmMenu:function(xmMenu){ |
|||
this.filters.xmMenu=xmMenu |
|||
this.searchXmMenuExchanges(); |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
filters: { |
|||
key: '', |
|||
xmMenu:null, |
|||
menuId:'' |
|||
}, |
|||
xmMenuExchanges: [],//查询结果 |
|||
pageInfo:{//分页数据 |
|||
total:0,//服务器端收到0时,会自动计算总记录数,如果上传>0的不自动计算。 |
|||
pageSize:10,//每页数据 |
|||
count:false,//是否需要重新计算总记录数 |
|||
pageNum:1,//当前页码、从1开始计算 |
|||
orderFields:['res.ctime'],//排序列 如 ['sex','student_id'],必须为数据库字段 |
|||
orderDirs:['desc']//升序 asc,降序desc 如 性别 升序、学生编号降序 ['asc','desc'] |
|||
}, |
|||
load:{ list: false, edit: false, del: false, add: false },//查询中... |
|||
sels: [],//列表选中数据 |
|||
dicts:{ |
|||
//sex:[], |
|||
},//下拉选择框的所有静态数据 params=[{categoryId:'0001',itemCode:'sex'}] 返回结果 {'sex':[{optionValue:'1',optionName:'男',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'女',seqOrder:'2',fp:'',isDefault:'0'}]} |
|||
|
|||
addFormVisible: false,//新增xmMenuExchange界面是否显示 |
|||
//新增xmMenuExchange界面初始化数据 |
|||
addForm: { |
|||
menuId:'',menuName:'',productId:'',remark:'',id:'',pid:'',cuserid:'',cusername:'',ctime:'',cbranchId:'',adopt:'',adoptUserid:'',adoptUsername:'',adoptTime:'',closed:'',puserid:'',pusername:'',premark:'',notifyUserids:'',notifyChannels:'',notifyUsernames:'',cuserHeadImg:'',replyType:'' |
|||
}, |
|||
addFormInit: { |
|||
menuId:'',menuName:'',productId:'',remark:'',id:'',pid:'',cuserid:'',cusername:'',ctime:'',cbranchId:'',adopt:'',adoptUserid:'',adoptUsername:'',adoptTime:'',closed:'',puserid:'',pusername:'',premark:'',notifyUserids:'',notifyChannels:'',notifyUsernames:'',cuserHeadImg:'',replyType:'' |
|||
}, |
|||
editFormVisible: false,//编辑界面是否显示 |
|||
//编辑xmMenuExchange界面初始化数据 |
|||
editForm: { |
|||
menuId:'',menuName:'',productId:'',remark:'',id:'',pid:'',cuserid:'',cusername:'',ctime:'',cbranchId:'',adopt:'',adoptUserid:'',adoptUsername:'',adoptTime:'',closed:'',puserid:'',pusername:'',premark:'',notifyUserids:'',notifyChannels:'',notifyUsernames:'',cuserHeadImg:'',replyType:'' |
|||
}, |
|||
xmMenuVisible:false, |
|||
maxTableHeight:300, |
|||
content:'', |
|||
headEditorVisible:false, |
|||
/**begin 自定义属性请在下面加 请加备注**/ |
|||
|
|||
/**end 自定义属性请在上面加 请加备注**/ |
|||
} |
|||
},//end data |
|||
methods: { |
|||
handleSizeChange(pageSize) { |
|||
this.pageInfo.pageSize=pageSize; |
|||
this.getXmMenuExchanges(); |
|||
}, |
|||
handleCurrentChange(pageNum) { |
|||
this.pageInfo.pageNum = pageNum; |
|||
this.getXmMenuExchanges(); |
|||
}, |
|||
// 表格排序 obj.order=ascending/descending,需转化为 asc/desc ; obj.prop=表格中的排序字段,字段驼峰命名 |
|||
sortChange( obj ){ |
|||
var dir='asc'; |
|||
if(obj.order=='ascending'){ |
|||
dir='asc' |
|||
}else{ |
|||
dir='desc'; |
|||
} |
|||
if(obj.prop=='xxx'){ |
|||
this.pageInfo.orderFields=['xxx']; |
|||
this.pageInfo.orderDirs=[dir]; |
|||
} |
|||
this.getXmMenuExchanges(); |
|||
}, |
|||
searchXmMenuExchanges(){ |
|||
this.pageInfo.count=true; |
|||
this.getXmMenuExchanges(); |
|||
}, |
|||
//获取列表 XmMenuExchange 需求表 |
|||
getXmMenuExchanges() { |
|||
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 |
|||
}else{ |
|||
//params.xxx=xxxxx |
|||
} |
|||
if(this.xmMenu){ |
|||
params.menuId=this.xmMenu.menuId |
|||
|
|||
}else{ |
|||
if(this.filters.xmMenu){ |
|||
params.menuId=this.filters.xmMenu.menuId |
|||
} |
|||
|
|||
} |
|||
if(this.filters.menuId){ |
|||
params.menuId=this.filters.menuId |
|||
} |
|||
if(!params.menuId){ |
|||
params.branchId=this.userInfo.branchId |
|||
} |
|||
this.load.list = true; |
|||
listXmMenuExchange(params).then((res) => { |
|||
var tips=res.data.tips; |
|||
if(tips.isOk){ |
|||
this.pageInfo.total = res.data.total; |
|||
this.pageInfo.count=false; |
|||
var data=res.data.data; |
|||
data.forEach(i=>i.showEditor=false) |
|||
this.xmMenuExchanges = data; |
|||
}else{ |
|||
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: 'error' }); |
|||
} |
|||
this.load.list = false; |
|||
}).catch( err => this.load.list = false ); |
|||
}, |
|||
|
|||
//显示编辑界面 XmMenuExchange 需求表 |
|||
showEdit: function ( row,index ) { |
|||
this.editFormVisible = true; |
|||
this.editForm = Object.assign({}, row); |
|||
}, |
|||
//显示新增界面 XmMenuExchange 需求表 |
|||
showAdd: function () { |
|||
this.addFormVisible = true; |
|||
//this.addForm=Object.assign({}, this.editForm); |
|||
}, |
|||
afterAddSubmit(){ |
|||
this.addFormVisible=false; |
|||
this.pageInfo.count=true; |
|||
this.getXmMenuExchanges(); |
|||
}, |
|||
afterEditSubmit(){ |
|||
this.editFormVisible=false; |
|||
}, |
|||
//选择行xmMenuExchange |
|||
selsChange: function (sels) { |
|||
this.sels = sels; |
|||
}, |
|||
//删除xmMenuExchange |
|||
handleDel: function (row,index) { |
|||
this.$confirm('确认删除该记录吗?', '提示', { |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.load.del=true; |
|||
let params = { id: row.id }; |
|||
delXmMenuExchange(params).then((res) => { |
|||
this.load.del=false; |
|||
var tips=res.data.tips; |
|||
if(tips.isOk){ |
|||
this.pageInfo.count=true; |
|||
this.getXmMenuExchanges(); |
|||
} |
|||
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' }); |
|||
}).catch( err => this.load.del=false ); |
|||
}); |
|||
}, |
|||
//批量删除xmMenuExchange |
|||
batchDel: function () { |
|||
|
|||
this.$confirm('确认删除选中记录吗?', '提示', { |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.load.del=true; |
|||
batchDelXmMenuExchange(this.sels).then((res) => { |
|||
this.load.del=false; |
|||
var tips=res.data.tips; |
|||
if( tips.isOk ){ |
|||
this.pageInfo.count=true; |
|||
this.getXmMenuExchanges(); |
|||
} |
|||
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error'}); |
|||
}).catch( err => this.load.del=false ); |
|||
}); |
|||
}, |
|||
rowClick: function(row, event, column){ |
|||
this.$emit('row-click',row, event, column);// @row-click="rowClick" |
|||
}, |
|||
/**begin 自定义函数请在下面加**/ |
|||
showEditor(item,replyType){ |
|||
this.editForm=item; |
|||
|
|||
this.addForm={...this.addFOrmInit} |
|||
this.addForm.replyType=replyType; |
|||
item.showEditor=true; |
|||
}, |
|||
onPublishContent:function(content,item){ |
|||
|
|||
var params={...this.addForm} |
|||
params.remark=content; |
|||
if(item){ |
|||
params.puserid=item.cuserid |
|||
params.premark=item.remark |
|||
params.pusername=item.cusername |
|||
params.productId=item.productId |
|||
params.menuId=item.menuId |
|||
params.menuName=item.menuName |
|||
params.pid=item.id |
|||
}else if(this.xmMenu){ |
|||
params.menuId=this.xmMenu.menuId |
|||
params.productId=this.xmMenu.productId |
|||
params.menuName=this.xmMenu.menuName |
|||
}else{ |
|||
if(this.filters.xmMenu){ |
|||
params.menuId=this.filters.xmMenu.menuId |
|||
params.productId=this.filters.xmMenu.productId |
|||
params.menuName=this.filters.xmMenu.menuName |
|||
}else{ |
|||
|
|||
params.menuId=item.menuId |
|||
params.productId=item.productId |
|||
params.menuName=item.menuName |
|||
} |
|||
} |
|||
params.cuserid=this.userInfo.userid |
|||
params.cusername=this.userInfo.username |
|||
params.cbranchId=this.userInfo.branchId |
|||
params.cuserHeadImg=this.userInfo.headimgurl |
|||
|
|||
addXmMenuExchange(params).then(res=>{ |
|||
var tips =res.data.tips; |
|||
if(tips.isOk){ |
|||
var data=res.data.data; |
|||
data.showEditor=false; |
|||
this.xmMenuExchanges.unshift(data); |
|||
this.editForm.showEditor=false; |
|||
this.headEditorVisible=false; |
|||
} |
|||
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error'}); |
|||
}) |
|||
}, |
|||
/**end 自定义函数请在上面加**/ |
|||
showSelectMenu(){ |
|||
this.xmMenuVisible=true; |
|||
}, |
|||
onMenuSelected(menu){ |
|||
this.filters.xmMenu=menu |
|||
this.xmMenuVisible=false |
|||
this.getXmMenuExchanges() |
|||
} |
|||
|
|||
},//end methods |
|||
components: { |
|||
//在下面添加其它组件 |
|||
MenuUserEditor,VueEditor |
|||
}, |
|||
mounted() { |
|||
this.$nextTick(() => { |
|||
|
|||
this.maxTableHeight = util.calcTableMaxHeight(this.$refs.table.$el); |
|||
this.filters.xmMenu=this.xmMenu |
|||
this.getXmMenuExchanges(); |
|||
}); |
|||
/** 举例, |
|||
initSimpleDicts( "all",["sex","grade"] ).then(res=>{ |
|||
if(res.data.tips.isOk){ |
|||
this.dicts=res.data.data |
|||
} |
|||
}); |
|||
**/ |
|||
} |
|||
} |
|||
|
|||
</script> |
|||
|
|||
<style scoped> |
|||
h1 { |
|||
text-align: center; |
|||
} |
|||
.comment-list{ |
|||
border-bottom: 1px solid #dcdcdc; |
|||
padding: 0 15px 10px 60px; |
|||
margin-top: 15px; |
|||
position: relative; |
|||
} |
|||
.comment-avater{ |
|||
position: absolute; |
|||
left: 10px; |
|||
top: 0; |
|||
} |
|||
/* .toolbar{ |
|||
float: right; |
|||
margin: .25rem 0; |
|||
} */ |
|||
.comment-head{ |
|||
font-size: 12px; |
|||
margin-bottom: 6px; |
|||
line-height: 29px; |
|||
text-align: right; |
|||
color: #00abfc!important; |
|||
} |
|||
.comment-head span:first-child{ |
|||
float: left; |
|||
font-size: 15px; |
|||
} |
|||
.comment-head .el-button--text{ |
|||
color: #606266; |
|||
} |
|||
.comment-head .el-button--text:hover { |
|||
color: #66b1ff; |
|||
} |
|||
.comment-head .el-button--text:active { |
|||
color: #3a8ee6; |
|||
} |
|||
.comment-wrap blockquote{ |
|||
margin: 0 0 1rem; |
|||
background-color: #f7f7f7; |
|||
border-left: 4px solid #eceeef; |
|||
font-size: 14px; |
|||
padding: 10px 20px; |
|||
} |
|||
.comment-wrap footer{ |
|||
margin-top: 5px; |
|||
color: #818a91; |
|||
font-size: 12px; |
|||
} |
|||
|
|||
.clearfix::after { |
|||
clear: both; |
|||
content: ""; |
|||
} |
|||
</style> |
|||
@ -1,44 +0,0 @@ |
|||
<template> |
|||
<section class="padding"> |
|||
|
|||
</section> |
|||
</template> |
|||
|
|||
<script> |
|||
import util from '@/common/js/util';//全局公共库 |
|||
import config from '@/common/config';//全局公共库 |
|||
import { initSimpleDicts } from '@/api/mdp/meta/item';//下拉框数据查询 |
|||
import { mapGetters } from 'vuex' |
|||
import {sn} from '@/common/js/sequence'; |
|||
|
|||
export default { |
|||
computed: { |
|||
...mapGetters([ |
|||
'userInfo','roles' |
|||
]) |
|||
}, |
|||
watch:{ |
|||
|
|||
}, |
|||
data() { |
|||
return { |
|||
|
|||
} |
|||
},//end data |
|||
methods: { |
|||
|
|||
|
|||
},//end methods |
|||
components: { |
|||
|
|||
}, |
|||
mounted() { |
|||
|
|||
} |
|||
} |
|||
|
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue