details.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. <template>
  2. <view class="detail">
  3. <!-- 主体 -->
  4. <view class="deboxs">
  5. <view class="bghbox"></view>
  6. <view class="dbox fmt30">
  7. <view class="dtit">{{datainfo.conferenceTitle}}</view>
  8. <view class="titinf">
  9. <view class="txt"><text>会议类型</text>{{typeFormat(datainfo.conferenceType,hylxlist)}}</view>
  10. <view class="txt"><text>会议日期</text>{{datainfo.conferenceDate}}</view>
  11. <view class="txt"><text>会议时间</text>{{datainfo.conferenceTime}}</view>
  12. <view class="txt"><text>会议地点</text>{{datainfo.conferenceAddress}}</view>
  13. <view class="txt"><text>参会人员</text>
  14. <block v-if="datainfo.zxConferenceUserList&&datainfo.zxConferenceUserList.length">
  15. <view v-for="(ite,idx) in datainfo.zxConferenceUserList" :key="idx">{{ite.userName}}
  16. <block v-if="idx<datainfo.zxConferenceUserList.length-1">,</block>
  17. </view>
  18. </block>
  19. </view>
  20. <view class="txt"><text>备注</text>{{datainfo.remark}}</view>
  21. </view>
  22. </view>
  23. <view class="dbox" v-if="filelist.length">
  24. <!-- <view class="titbox mb14">
  25. <view class="tit flexc">
  26. <image :src="titimg"></image>
  27. <view>会议内容</view>
  28. </view>
  29. </view>
  30. <view class="txtbox" :class="zheList[0].zheflag?'nact':'act'">
  31. <rich-text :nodes="datainfo.proposalContent"></rich-text>
  32. </view>
  33. <view class="zhebox" :class="zheList[0].zheflag?'':'act'" @click="getZheFn(0)">
  34. <image :src="upsimg"></image>
  35. <view>{{zheList[0].zheflag?'展开信息':'折叠信息'}}</view>
  36. </view>
  37. <view class="bortop"></view> -->
  38. <view class="ftit mb14">附件信息</view>
  39. <view class="fjlists flext" v-for="(ite,idx) in filelist" :key='idx' @click="getDown(ite.url)">
  40. <view class="imgl"><image :src="fjimg" ></image></view>
  41. <view class="tit">{{ite.name}}</view>
  42. <view class="fjlook">查看</view>
  43. </view>
  44. </view>
  45. <view class="fbtns" style="flex-wrap: wrap;">
  46. <view class="btn btn1" @click="getEditFn" v-if="checkPermi(['zxConference:conference:edit'])">修改</view>
  47. <view class="btn btn3" @click="getDelFn" v-if="checkPermi(['zxConference:conference:remove'])">删除</view>
  48. <block v-if="type=='hytz'&&checkPermi(['zxConference:conference:updateReply'])">
  49. <view class="btn btn2" @click="getScfkFn('chdf')" v-if="!dfinfo.isJoin">参会答复</view>
  50. <view class="btn btn2" @click="getqdFn" v-if="dfinfo.isJoin=='Y'&&!dfinfo.signIn">签到</view>
  51. </block>
  52. <!-- <view class="btn btn2" @click="getScfkFn('chdf')" v-if="checkPermi(['zxConference:conference:updateReply'])&&type=='hyhd'">会议答复</view> -->
  53. </view>
  54. </view>
  55. <pop-up :type='ptype' :qjlxlist="qjlxlist" @getClose="getClose" @getupSubmit="getupSubmit"></pop-up>
  56. </view>
  57. </template>
  58. <script>
  59. import config from '@/config'
  60. const baseUrl = config.baseUrl
  61. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  62. import popUp from "@/work/components/popup/popup.vue"
  63. import noData from "@/components/nodata/nodata.vue"
  64. import {getDeptTree} from"@/api/mine/mine.js"
  65. import { selectValue,selectValuetext } from '@/utils/common.js';
  66. import {getMeetDetaiFn,getMeetDelFn,getupdateReplyFn} from "@/api/mine/meeting.js"
  67. import {getDictionaryFn} from "@/api/mine/register.js"
  68. export default{
  69. components:{popUp,noData},
  70. data(){
  71. return{
  72. bgimg:require("@/static/images/bg.png"),
  73. fjimg:require("@/work/static/images/fjimg.png"),
  74. filelist:[],
  75. tabidx:5,
  76. titimg:require("@/work/static/images/titbg.png"),
  77. upsimg:require("@/work/static/images/ups.png"),
  78. zheList:[{val:0,zheflag:true,moreflag:true},],
  79. ptype:'',
  80. datainfo:{},
  81. tary:'',
  82. qjlxlist:[],
  83. hylxlist:[],
  84. type:'',
  85. userId:this.$store.state.user.userId,
  86. dfinfo:{}
  87. }
  88. },
  89. onUnload(){
  90. uni.$off('refreshdetail')
  91. },
  92. onLoad(e) {
  93. this.id=e.id;
  94. this.type=e.pt;
  95. this.getDetail()
  96. this.init()
  97. uni.$on('refreshdetail', (e) => {
  98. this.getDetail()
  99. })
  100. },
  101. methods:{
  102. checkPermi, checkRole,
  103. kaType(ite){
  104. if(ite){
  105. var newArr=ite.split(',')
  106. var actions=[];
  107. var datas=this.matterList;
  108. newArr.forEach(ite=>{
  109. Object.keys(datas).some((key) => {
  110. if (datas[key].value == ('' + ite)) {
  111. actions.push(datas[key].label);
  112. return true;
  113. }
  114. })
  115. })
  116. return actions.join(' ')
  117. }
  118. },
  119. typeFormat(ite,list){
  120. return selectValue(list, ite);
  121. },
  122. typeFormattext(ite,list){
  123. return selectValuetext(list, ite);
  124. },
  125. getqdFn(){
  126. this.$tab.navigateTo('/work/pages/meeting/signin?id='+this.id)
  127. },
  128. init(){
  129. // 请假类型
  130. getDictionaryFn('leave').then(res=>{
  131. if(res.code==200&&res.data.length){
  132. this.qjlxlist = res.data.map(v => {
  133. return {
  134. text: v.dictLabel,
  135. value: v.dictValue
  136. }
  137. })
  138. }
  139. })
  140. getDictionaryFn('conference_type').then(res=>{
  141. if(res.code==200&&res.data.length){
  142. this.hylxlist = res.data.map(v => {
  143. return {
  144. label: v.dictLabel,
  145. value:v.dictValue
  146. }
  147. })
  148. }
  149. })
  150. },
  151. getupSubmit(e){
  152. var that=this;
  153. var type=this.ptype;
  154. var params=JSON.parse(JSON.stringify(e))
  155. params.conferenceId=this.id
  156. getupdateReplyFn(params).then(res=>{
  157. if(res.code==200){
  158. this.$toast("回复成功");
  159. setTimeout(function(){
  160. uni.$emit('refreshlist')
  161. that.ptype='';
  162. that.getDetail()
  163. },1200)
  164. }
  165. })
  166. },
  167. getEditFn(){
  168. this.$tab.navigateTo('/work/pages/meeting/add?type=edit&id='+this.id)
  169. },
  170. getClose(){
  171. this.ptype=""
  172. },
  173. getScfkFn(type){
  174. this.ptype=type
  175. },
  176. getZheFn(idx){
  177. this.zheList[idx].zheflag=!this.zheList[idx].zheflag
  178. },
  179. getDelFn(){
  180. var that=this;
  181. uni.showModal({
  182. title: '确认删除',
  183. content: "是否确认删除",
  184. cancelText: '取消',
  185. confirmText: '确认',
  186. success: function(res) {
  187. if (res.confirm) {
  188. getMeetDelFn(that.id).then(res=>{
  189. if(res.code==200){
  190. that.$toast('删除成功')
  191. uni.$emit("refreshlist")
  192. setTimeout(function(){
  193. uni.navigateBack({
  194. delta: 1 //返回层数,2则上上页
  195. });
  196. },1200)
  197. }
  198. })
  199. } else if (res.cancel) {
  200. // console.log('用户点击取消');
  201. }
  202. }
  203. });
  204. },
  205. getDetail(){
  206. var params={
  207. conferenceId:this.id
  208. }
  209. if(this.type=='hytz'){
  210. params.userId=this.userId
  211. }
  212. getMeetDetaiFn(params).then(res=>{
  213. if(res.code==200){
  214. this.datainfo=res.data;
  215. if(res.data.zxConferenceUserList){
  216. this.dfinfo=res.data.zxConferenceUserList[0]
  217. }
  218. if(res.data.zxFjList&&res.data.zxFjList.length){
  219. this.filelist=JSON.parse(JSON.stringify(res.data.zxFjList))
  220. }
  221. }
  222. })
  223. },
  224. getDown(e){
  225. uni.showLoading({
  226. title: '加载中'
  227. });
  228. var url=baseUrl+e;
  229. uni.downloadFile({
  230. url: url,//文件的下载路径
  231. success(result) {
  232. uni.hideLoading()
  233. var filePath = result.tempFilePath;
  234. uni.openDocument({
  235. filePath: filePath,
  236. showMenu: true,
  237. success: function (res) {
  238. // console.log('打开文档成功');
  239. }
  240. });
  241. },
  242. fail(res) {uni.hideLoading()}
  243. })
  244. },
  245. }
  246. }
  247. </script>
  248. <style scoped lang="scss">
  249. .detail{display: flex;flex-direction: column;height: 100vh;}
  250. .deboxs{flex:1;overflow: auto;padding-bottom: 30rpx;
  251. .bghbox{height: 80rpx;background-color: $com-cd3;}
  252. .dbox{background: #FFFFFF;border-radius: 10rpx;margin: 0 24rpx 24rpx;padding: 36rpx 24rpx 24rpx;
  253. .dtit{font-weight: bold;font-size: 15px;color: #222327;margin-bottom: 48rpx;
  254. text{color: #E70000;}
  255. }
  256. .titbox{
  257. .tit{
  258. image{width: 32rpx;height: 18rpx;margin-right: 10rpx;}
  259. view{font-weight: bold;font-size: 32rpx;color: #222327;}
  260. }
  261. }
  262. .titinf{display: flex;flex-wrap: wrap;flex-direction: column;
  263. &.nact{height: 0;overflow: hidden;}
  264. &.act{height: auto;}
  265. .txt{font-weight: 500;font-size: 26rpx;margin-bottom: 20rpx;color: #222327;display: flex;align-items: flex-start;wi
  266. &.nact{height: 200rpx;overflow: hidden;}
  267. &.act{height: auto;}
  268. text{color: #AAAAAA;min-width: 104rpx;text-align-last: justify;flex: 0 0 auto;margin-right: 20rpx;
  269. &.w65{width: 130rpx;}
  270. }
  271. // view{text-indent: 2rem;}
  272. }
  273. }
  274. .txtbox{text-indent: 2rem;line-height: 36rpx;font-weight: 500;font-size: 26rpx;color: #222327;
  275. &.nact{max-height: 432rpx;overflow: hidden;}
  276. &.act{height: auto;}
  277. }
  278. // tab
  279. .dbtabs{
  280. .dbtab{font-weight: 500;font-size: 26rpx;height: 60rpx;line-height: 60rpx;color: #666666;position: relative;padding: 0 38rpx;margin-left: 8rpx;
  281. &.act{font-weight: bold;font-size: 30rpx;color: #222327;
  282. &::after{content: "";width: 48rpx;height: 4rpx;background: #3699FF;border-radius: 2rpx;position: absolute;left: 50%;margin-left: -24rpx;bottom: -4rpx;}
  283. }
  284. }
  285. }
  286. .bortop{border-top: 2rpx dashed #C1C1C1;margin-bottom: 32rpx;margin-top: 14rpx;width: 100%;}
  287. .ftit{font-weight: bold;font-size: 26rpx;color: #222327;}
  288. .zhebox{display: flex;align-items: center;flex-direction: column;padding: 24rpx 0;
  289. image{width: 28rpx;height: 30rpx;margin-bottom: 10rpx;transition: all 0.3s;}
  290. &.act{
  291. image{transform: rotate(-180deg);}
  292. }
  293. view{font-weight: 500;font-size: 24rpx;color: #AAAAAA;}
  294. }
  295. // 附件
  296. .fjlists {display: flex;align-items: flex-start;justify-content: space-between;margin-bottom: 12rpx;
  297. // image{margin-right: 18rpx;flex: 0 0 auto;}
  298. .imgl{width: 40rpx;height: 40rpx;display: flex;align-items: center;justify-content: center;margin-right: 6rpx;flex: 0 0 auto;
  299. image{width: 26rpx;height: 24rpx;}
  300. }
  301. .tit{font-size: 26rpx;color: #343434;font-weight: 500;margin-top: 4rpx;flex:1;}
  302. .fjlook{font-weight: 500;font-size: 26rpx;color: #1D64E2;flex: 0 0 auto;margin-left: 20rpx;margin-top: 4rpx;}
  303. }
  304. }
  305. }
  306. // 按钮
  307. .fbtns{display: flex;align-items: center;justify-content: space-between;padding: 54rpx 12rpx 34rpx;display: flex;flex-wrap: wrap;
  308. .btn{height: 80rpx;font-weight: bold;font-size: 30rpx;box-sizing: border-box;border-radius: 40rpx;display: flex;align-items: center;
  309. justify-content: center;margin:0 12rpx;flex:1;
  310. &.btn1{border: 2rpx solid #1D64E2;background: #ffffff;color: #1D64E2;}
  311. &.btn2{background: #1D64E2;color: #ffffff;}
  312. &.btn3{border: 2rpx solid #FF0000;background: #ffffff;color: #FF0000;}
  313. }
  314. }
  315. </style>