details.vue 10.0 KB

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