speakdetails.vue 8.6 KB

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