speakdetails.vue 8.6 KB

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