diff --git a/src/api/imgUtil.js b/src/api/imgUtil.js new file mode 100644 index 00000000..3de3fa8c --- /dev/null +++ b/src/api/imgUtil.js @@ -0,0 +1,150 @@ +import axios from '@/utils/request' + +import config from '@/common/config' + + + + var h1=require('../../static/images/head/1.png') + var h2=require('../../static/images/head/2.png') + var h3=require('../../static/images/head/3.png') + var h4=require('../../static/images/head/4.png') + var h5=require('../../static/images/head/5.png') + var h6=require('../../static/images/head/6.png') + var h7=require('../../static/images/head/7.png') + var h8=require('../../static/images/head/8.png') + var h9=require('../../static/images/head/9.png') + var h10=require('../../static/images/head/10.png') + var h11=require('../../static/images/head/11.png') + var h12=require('../../static/images/head/12.png') + var h13=require('../../static/images/head/13.png') + var h14=require('../../static/images/head/14.png') + var h15=require('../../static/images/head/15.png') + var h16=require('../../static/images/head/16.png') + var h17=require('../../static/images/head/17.png') + var h18=require('../../static/images/head/18.png') + var h19=require('../../static/images/head/19.png') + var h20=require('../../static/images/head/20.png') + var h21=require('../../static/images/head/21.png') + var h22=require('../../static/images/head/22.png') + var h23=require('../../static/images/head/23.png') + var h24=require('../../static/images/head/24.png') + var h25=require('../../static/images/head/25.png') + var h26=require('../../static/images/head/26.png') + var h27=require('../../static/images/head/27.png') + var h28=require('../../static/images/head/28.png') + var h29=require('../../static/images/head/29.png') + var h30=require('../../static/images/head/30.png') + var h31=require('../../static/images/head/31.png') + var h32=require('../../static/images/head/32.png') + var h33=require('../../static/images/head/33.png') + var h33=require('../../static/images/head/33.png') + var h33=require('../../static/images/head/33.png') + var h34=require('../../static/images/head/34.png') + var h35=require('../../static/images/head/35.png') + var h36=require('../../static/images/head/36.png') + var h37=require('../../static/images/head/37.png') + var h38=require('../../static/images/head/38.png') + var h39=require('../../static/images/head/39.png') + var h40=require('../../static/images/head/40.png') + var h41=require('../../static/images/head/41.png') + var h42=require('../../static/images/head/42.png') + var h43=require('../../static/images/head/43.png') + var h44=require('../../static/images/head/44.png') + var h45=require('../../static/images/head/45.png') + var h46=require('../../static/images/head/46.png') + var h47=require('../../static/images/head/47.png') + var h48=require('../../static/images/head/48.png') + var h49=require('../../static/images/head/49.png') + var h50=require('../../static/images/head/50.png') + var h51=require('../../static/images/head/51.png') + var h52=require('../../static/images/head/52.png') + var h53=require('../../static/images/head/53.png') + var h54=require('../../static/images/head/54.png') + var h55=require('../../static/images/head/55.png') + var h56=require('../../static/images/head/56.png') + var h57=require('../../static/images/head/57.png') + var h58=require('../../static/images/head/58.png') + var h59=require('../../static/images/head/59.png') + var h60=require('../../static/images/head/60.png') + var h61=require('../../static/images/head/61.png') + var h62=require('../../static/images/head/62.png') + var h63=require('../../static/images/head/63.png') + var h64=require('../../static/images/head/64.png') + var h65=require('../../static/images/head/65.png') + var h66=require('../../static/images/head/66.png') + var h67=require('../../static/images/head/67.png') + var h68=require('../../static/images/head/68.png') + var h69=require('../../static/images/head/69.png') + var h70=require('../../static/images/head/70.png') + + var defaultMan=require('../../static/images/man.png') + + var noData=require('../../static/images/no-information.png') + + var imgList=[ h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11,h12,h13,h14,h15,h16,h17,h18,h19,h20,h21,h22,h23,h24,h25,h26, +h27,h28,h29,h30,h31,h32,h33,h34,h35,h36,h37,h38,h39,h40,h41,h42,h43,h44,h45,h46,h47,h48,h49,h50,h51,h52,h53,h54, +h55,h56,h57,h58,h59,h60,h61,h62,h63,h64,h64,h66,h67,h68,h69,h70 +] + + export default { + + onImgError:function(userid,$event){ + let img = $event.srcElement; + img.src = this.getDefHeadimg(userid) + img.onerror = null; //防止闪图 + }, + +/** + * 对于给定的用户编号,返回一个固定的默认头像,用于用户未设置头像的情况下,给页面显示一个头像 + * @param {*} userid + * @returns + */ +getDefHeadimg:function(userid){ + + if(userid){ + var nums=0; + var codes = userid.split(''); + codes.forEach(e=>{ + nums=nums+e.charCodeAt(); + }) + var cp=imgList[nums%imgList.length] + return cp; + }else{ + return defaultMan; + } +}, + +/** + * 通过用户编号组装请求用户头像的url + * @param {*} userid 用户编号 + * @param {*} headimgurl 用户配置的头像地址 + * @param {*} rand false || true ,是否给url添加随机数,用于立即刷新头像,否则头像更新后,会被cdn缓存一段时间 + * @returns + */ + getHeadimgurl:function (userid,headimgurl,rand) { + if(headimgurl){ + return headimgurl; + }else{ + var authorStr=sessionStorage.getItem('authorMsg_' + userid) + if(authorStr){ + var author=JSON.parse(authorStr) + if(author && author.headimgurl){ + return author.headimgurl + } + } + } + if(rand){ + var dateTime=new Date().getTime(); + return `/api/m1/arc/${dateTime}/arc/image/user/${userid}.jpg` + }else{ + return `/api/m1/arc/arc/image/user/${userid}.jpg` + } + + }, + + noDataImg:function(){ + return noData; + } + + +} diff --git a/src/api/xm/core/xmMenuComment.js b/src/api/xm/core/xmMenuComment.js new file mode 100644 index 00000000..9064ac64 --- /dev/null +++ b/src/api/xm/core/xmMenuComment.js @@ -0,0 +1,44 @@ +import axios from '@/utils/request' + +import { getDicts,initSimpleDicts,initComplexDicts } from '@/api/mdp/meta/item';//字典表 +import config from '@/common/config' + +let base = config.getCoreBasePath(); + +/**-------------------------与后端通讯接口------------------请写在下面-------------------------------------------- */ +/** + * 档案评论表 + *1 默认只开放普通查询,所有查询,只要上传 分页参数 {pageNum:当前页码从1开始,pageSize:每页记录数,total:总记录【数如果是0后台会自动计算总记录数非0不会自动计算】},后台都会自动按分页查询 其它 api用到再打开,没用到的api请注释掉, + *2 查询、新增、修改的参数格式 params={id:'主键 主键',userid:'评论人',username:'评论人姓名',star:'星级',cdate:'时间',menuId:'需求编号',pid:'上级评论',ups:'点赞数量',isShow:'是否显示0否1是',toUserid:'回复用户编号',toUsername:'回复用户名',lvl:'层级0,1,2,3,4',context:'评论内容',branchId:'机构编号',ip:'ip地址',cityId:'城市编号',cityName:'城市名称',status:'状态0未审核,1已审核,3审核不通过',childNums:'儿子节点数量'} + **/ + +//普通查询 条件之间and关系 +export const listXmMenuComment = params => { return axios.get(`${base}/xm/core/xmMenuComment/list`, { params: params }); }; + +//删除一条档案评论表 params={id:'主键 主键'} +export const delXmMenuComment = params => { return axios.post(`${base}/xm/core/xmMenuComment/del`,params); }; + +//批量删除档案评论表 params=[{id:'主键 主键'}] +export const batchDelXmMenuComment = params => { return axios.post(`${base}/xm/core/xmMenuComment/batchDel`, params); }; + +//修改一条档案评论表记录 +export const editXmMenuComment = params => { return axios.post(`${base}/xm/core/xmMenuComment/edit`, params); }; + +//新增一条档案评论表 +export const addXmMenuComment = params => { return axios.post(`${base}/xm/core/xmMenuComment/add`, params); }; + +//批量修改某些字段 +export const editSomeFieldsXmMenuComment = params => { return axios.post(`${base}/xm/core/xmMenuComment/editSomeFields`, 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/xm/core/xmMenuComment/XmMenuCommentEdit.vue b/src/views/xm/core/xmMenuComment/XmMenuCommentEdit.vue new file mode 100644 index 00000000..71df12c5 --- /dev/null +++ b/src/views/xm/core/xmMenuComment/XmMenuCommentEdit.vue @@ -0,0 +1,204 @@ + + + + + \ No newline at end of file diff --git a/src/views/xm/core/xmMenuComment/XmMenuCommentMng.vue b/src/views/xm/core/xmMenuComment/XmMenuCommentMng.vue new file mode 100644 index 00000000..d38b2a6f --- /dev/null +++ b/src/views/xm/core/xmMenuComment/XmMenuCommentMng.vue @@ -0,0 +1,372 @@ + + + + + \ No newline at end of file diff --git a/src/views/xm/core/xmMenuComment/comment-area.vue b/src/views/xm/core/xmMenuComment/comment-area.vue new file mode 100644 index 00000000..c05f7f26 --- /dev/null +++ b/src/views/xm/core/xmMenuComment/comment-area.vue @@ -0,0 +1,233 @@ + + + + + \ No newline at end of file diff --git a/src/views/xm/core/xmMenuComment/comment-list.vue b/src/views/xm/core/xmMenuComment/comment-list.vue new file mode 100644 index 00000000..dcc70ab9 --- /dev/null +++ b/src/views/xm/core/xmMenuComment/comment-list.vue @@ -0,0 +1,326 @@ + + + + + \ No newline at end of file diff --git a/static/expression.png b/static/expression.png new file mode 100644 index 00000000..498871ca Binary files /dev/null and b/static/expression.png differ diff --git a/static/head/1.png b/static/head/1.png new file mode 100644 index 00000000..7665e45d Binary files /dev/null and b/static/head/1.png differ diff --git a/static/head/10.png b/static/head/10.png new file mode 100644 index 00000000..ddd3b886 Binary files /dev/null and b/static/head/10.png differ diff --git a/static/head/11.png b/static/head/11.png new file mode 100644 index 00000000..d7f8e4c1 Binary files /dev/null and b/static/head/11.png differ diff --git a/static/head/12.png b/static/head/12.png new file mode 100644 index 00000000..4ab7d186 Binary files /dev/null and b/static/head/12.png differ diff --git a/static/head/13.png b/static/head/13.png new file mode 100644 index 00000000..e9f8957a Binary files /dev/null and b/static/head/13.png differ diff --git a/static/head/14.png b/static/head/14.png new file mode 100644 index 00000000..c36b452d Binary files /dev/null and b/static/head/14.png differ diff --git a/static/head/15.png b/static/head/15.png new file mode 100644 index 00000000..146d0b1c Binary files /dev/null and b/static/head/15.png differ diff --git a/static/head/16.png b/static/head/16.png new file mode 100644 index 00000000..a06e088c Binary files /dev/null and b/static/head/16.png differ diff --git a/static/head/17.png b/static/head/17.png new file mode 100644 index 00000000..45dd2c01 Binary files /dev/null and b/static/head/17.png differ diff --git a/static/head/18.png b/static/head/18.png new file mode 100644 index 00000000..11b327a6 Binary files /dev/null and b/static/head/18.png differ diff --git a/static/head/19.png b/static/head/19.png new file mode 100644 index 00000000..91521404 Binary files /dev/null and b/static/head/19.png differ diff --git a/static/head/2.png b/static/head/2.png new file mode 100644 index 00000000..413fb082 Binary files /dev/null and b/static/head/2.png differ diff --git a/static/head/20.png b/static/head/20.png new file mode 100644 index 00000000..e7c51b36 Binary files /dev/null and b/static/head/20.png differ diff --git a/static/head/21.png b/static/head/21.png new file mode 100644 index 00000000..862c678b Binary files /dev/null and b/static/head/21.png differ diff --git a/static/head/22.png b/static/head/22.png new file mode 100644 index 00000000..c44193c5 Binary files /dev/null and b/static/head/22.png differ diff --git a/static/head/23.png b/static/head/23.png new file mode 100644 index 00000000..9387c707 Binary files /dev/null and b/static/head/23.png differ diff --git a/static/head/24.png b/static/head/24.png new file mode 100644 index 00000000..9ae4f12c Binary files /dev/null and b/static/head/24.png differ diff --git a/static/head/25.png b/static/head/25.png new file mode 100644 index 00000000..6d006765 Binary files /dev/null and b/static/head/25.png differ diff --git a/static/head/26.png b/static/head/26.png new file mode 100644 index 00000000..cc135f4b Binary files /dev/null and b/static/head/26.png differ diff --git a/static/head/27.png b/static/head/27.png new file mode 100644 index 00000000..5109a215 Binary files /dev/null and b/static/head/27.png differ diff --git a/static/head/28.png b/static/head/28.png new file mode 100644 index 00000000..7908fdf4 Binary files /dev/null and b/static/head/28.png differ diff --git a/static/head/29.png b/static/head/29.png new file mode 100644 index 00000000..26a3862a Binary files /dev/null and b/static/head/29.png differ diff --git a/static/head/3.png b/static/head/3.png new file mode 100644 index 00000000..82bf661f Binary files /dev/null and b/static/head/3.png differ diff --git a/static/head/30.png b/static/head/30.png new file mode 100644 index 00000000..2d2bc730 Binary files /dev/null and b/static/head/30.png differ diff --git a/static/head/31.png b/static/head/31.png new file mode 100644 index 00000000..d32a4a8e Binary files /dev/null and b/static/head/31.png differ diff --git a/static/head/32.png b/static/head/32.png new file mode 100644 index 00000000..a6a7f284 Binary files /dev/null and b/static/head/32.png differ diff --git a/static/head/33.png b/static/head/33.png new file mode 100644 index 00000000..fa31cd07 Binary files /dev/null and b/static/head/33.png differ diff --git a/static/head/34.png b/static/head/34.png new file mode 100644 index 00000000..9a5a76b9 Binary files /dev/null and b/static/head/34.png differ diff --git a/static/head/35.png b/static/head/35.png new file mode 100644 index 00000000..dcd3a06d Binary files /dev/null and b/static/head/35.png differ diff --git a/static/head/36.png b/static/head/36.png new file mode 100644 index 00000000..c283400b Binary files /dev/null and b/static/head/36.png differ diff --git a/static/head/37.png b/static/head/37.png new file mode 100644 index 00000000..263a4ac9 Binary files /dev/null and b/static/head/37.png differ diff --git a/static/head/38.png b/static/head/38.png new file mode 100644 index 00000000..fccfec87 Binary files /dev/null and b/static/head/38.png differ diff --git a/static/head/39.png b/static/head/39.png new file mode 100644 index 00000000..152c4207 Binary files /dev/null and b/static/head/39.png differ diff --git a/static/head/4.png b/static/head/4.png new file mode 100644 index 00000000..fdbf7486 Binary files /dev/null and b/static/head/4.png differ diff --git a/static/head/40.png b/static/head/40.png new file mode 100644 index 00000000..67efb3eb Binary files /dev/null and b/static/head/40.png differ diff --git a/static/head/41.png b/static/head/41.png new file mode 100644 index 00000000..52cca0b9 Binary files /dev/null and b/static/head/41.png differ diff --git a/static/head/42.png b/static/head/42.png new file mode 100644 index 00000000..988f4725 Binary files /dev/null and b/static/head/42.png differ diff --git a/static/head/43.png b/static/head/43.png new file mode 100644 index 00000000..2f002160 Binary files /dev/null and b/static/head/43.png differ diff --git a/static/head/44.png b/static/head/44.png new file mode 100644 index 00000000..b03cd3c3 Binary files /dev/null and b/static/head/44.png differ diff --git a/static/head/45.png b/static/head/45.png new file mode 100644 index 00000000..0c9ce79d Binary files /dev/null and b/static/head/45.png differ diff --git a/static/head/46.png b/static/head/46.png new file mode 100644 index 00000000..4d232985 Binary files /dev/null and b/static/head/46.png differ diff --git a/static/head/47.png b/static/head/47.png new file mode 100644 index 00000000..6744c229 Binary files /dev/null and b/static/head/47.png differ diff --git a/static/head/48.png b/static/head/48.png new file mode 100644 index 00000000..f12fe462 Binary files /dev/null and b/static/head/48.png differ diff --git a/static/head/49.png b/static/head/49.png new file mode 100644 index 00000000..e6d0702d Binary files /dev/null and b/static/head/49.png differ diff --git a/static/head/5.png b/static/head/5.png new file mode 100644 index 00000000..0198feae Binary files /dev/null and b/static/head/5.png differ diff --git a/static/head/50.png b/static/head/50.png new file mode 100644 index 00000000..8c140aff Binary files /dev/null and b/static/head/50.png differ diff --git a/static/head/51.png b/static/head/51.png new file mode 100644 index 00000000..3d9df3ef Binary files /dev/null and b/static/head/51.png differ diff --git a/static/head/52.png b/static/head/52.png new file mode 100644 index 00000000..e6cd3a47 Binary files /dev/null and b/static/head/52.png differ diff --git a/static/head/53.png b/static/head/53.png new file mode 100644 index 00000000..42fb3b57 Binary files /dev/null and b/static/head/53.png differ diff --git a/static/head/54.png b/static/head/54.png new file mode 100644 index 00000000..d0d4712d Binary files /dev/null and b/static/head/54.png differ diff --git a/static/head/55.png b/static/head/55.png new file mode 100644 index 00000000..2bba77a9 Binary files /dev/null and b/static/head/55.png differ diff --git a/static/head/56.png b/static/head/56.png new file mode 100644 index 00000000..dc2110ee Binary files /dev/null and b/static/head/56.png differ diff --git a/static/head/57.png b/static/head/57.png new file mode 100644 index 00000000..e23542f9 Binary files /dev/null and b/static/head/57.png differ diff --git a/static/head/58.png b/static/head/58.png new file mode 100644 index 00000000..a916dac8 Binary files /dev/null and b/static/head/58.png differ diff --git a/static/head/59.png b/static/head/59.png new file mode 100644 index 00000000..a7d086dd Binary files /dev/null and b/static/head/59.png differ diff --git a/static/head/6.png b/static/head/6.png new file mode 100644 index 00000000..bfb8aa50 Binary files /dev/null and b/static/head/6.png differ diff --git a/static/head/60.png b/static/head/60.png new file mode 100644 index 00000000..b02892ea Binary files /dev/null and b/static/head/60.png differ diff --git a/static/head/61.png b/static/head/61.png new file mode 100644 index 00000000..8d799fcf Binary files /dev/null and b/static/head/61.png differ diff --git a/static/head/62.png b/static/head/62.png new file mode 100644 index 00000000..9989d03e Binary files /dev/null and b/static/head/62.png differ diff --git a/static/head/63.png b/static/head/63.png new file mode 100644 index 00000000..19adb30d Binary files /dev/null and b/static/head/63.png differ diff --git a/static/head/64.png b/static/head/64.png new file mode 100644 index 00000000..2fdb3b6e Binary files /dev/null and b/static/head/64.png differ diff --git a/static/head/65.png b/static/head/65.png new file mode 100644 index 00000000..8fac60f7 Binary files /dev/null and b/static/head/65.png differ diff --git a/static/head/66.png b/static/head/66.png new file mode 100644 index 00000000..294649d1 Binary files /dev/null and b/static/head/66.png differ diff --git a/static/head/67.png b/static/head/67.png new file mode 100644 index 00000000..d5caf84b Binary files /dev/null and b/static/head/67.png differ diff --git a/static/head/68.png b/static/head/68.png new file mode 100644 index 00000000..ccc4baa5 Binary files /dev/null and b/static/head/68.png differ diff --git a/static/head/69.png b/static/head/69.png new file mode 100644 index 00000000..e0912652 Binary files /dev/null and b/static/head/69.png differ diff --git a/static/head/7.png b/static/head/7.png new file mode 100644 index 00000000..74284b58 Binary files /dev/null and b/static/head/7.png differ diff --git a/static/head/70.png b/static/head/70.png new file mode 100644 index 00000000..9720b290 Binary files /dev/null and b/static/head/70.png differ diff --git a/static/head/8.png b/static/head/8.png new file mode 100644 index 00000000..4f500fa1 Binary files /dev/null and b/static/head/8.png differ diff --git a/static/head/9.png b/static/head/9.png new file mode 100644 index 00000000..950933b6 Binary files /dev/null and b/static/head/9.png differ diff --git a/static/like-not.png b/static/like-not.png new file mode 100644 index 00000000..25fb1379 Binary files /dev/null and b/static/like-not.png differ diff --git a/static/like-selected.png b/static/like-selected.png new file mode 100644 index 00000000..180cdd0a Binary files /dev/null and b/static/like-selected.png differ diff --git a/static/no-comment.png b/static/no-comment.png new file mode 100644 index 00000000..0a3405a2 Binary files /dev/null and b/static/no-comment.png differ