details.vue 9.1 KB

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