zsyzdetails.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  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.clueName}}</view>
  8. <view class="titinf">
  9. <!-- <view class="txt"><text>项目线索名称</text>{{datainfo.clueName}}</view> -->
  10. <view class="txt"><text>拟投资额</text>{{datainfo.investmentAmount}}万元</view>
  11. <view class="txt"><text>联系人</text>{{datainfo.contactsName}}</view>
  12. <view class="txt"><text>联系方式</text>{{datainfo.contactsPhone}}</view>
  13. <view class="txt"><text>录入时间</text>{{datainfo.publishTime}}</view>
  14. <view class="txt"><text>状态</text>{{typeFormat(datainfo.type,xsztlist)}}</view>
  15. <!-- <view class="txt"><text>备注</text>{{datainfo.remark}}</view> -->
  16. </view>
  17. </view>
  18. <view class="dbox">
  19. <view class="titbox mb14">
  20. <view class="tit flexc">
  21. <image :src="titimg"></image>
  22. <view>内容</view>
  23. </view>
  24. </view>
  25. <view class="txtbox" :class="zheList[0].zheflag?'nact':'act'">
  26. <rich-text :nodes="datainfo.contactsContent"></rich-text>
  27. </view>
  28. <view class="zhebox" :class="zheList[0].zheflag?'':'act'" @click="getZheFn(0)">
  29. <image :src="upsimg"></image>
  30. <view>{{zheList[0].zheflag?'展开信息':'折叠信息'}}</view>
  31. </view>
  32. </view>
  33. <view class="fbtns" style="flex-wrap: wrap;">
  34. <view class="btn btn3" @click="getDelFn" v-if="checkPermi(['zx:investment:remove'])">删除</view>
  35. <view class="btn btn1" @click="getEditFn" v-if="checkPermi(['zx:investment:edit'])">修改</view>
  36. </view>
  37. </view>
  38. <pop-up :type='ptype' :qjlxlist="qjlxlist" @getClose="getClose" @getupSubmit="getupSubmit"></pop-up>
  39. </view>
  40. </template>
  41. <script>
  42. import config from '@/config'
  43. const baseUrl = config.baseUrl
  44. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  45. import popUp from "@/work/components/popup/popup.vue"
  46. import noData from "@/components/nodata/nodata.vue"
  47. import {getDeptTree} from"@/api/mine/mine.js"
  48. import { selectValue,selectValuetext } from '@/utils/common.js';
  49. import {getinvestmentDetailFn,getinvestmentDelFn,getinvestmentshlFn} from "@/api/mine/meeting.js"
  50. import {getDictionaryFn} from "@/api/mine/register.js"
  51. export default{
  52. components:{popUp,noData},
  53. data(){
  54. return{
  55. bgimg:require("@/static/images/bg.png"),
  56. fjimg:require("@/work/static/images/fjimg.png"),
  57. filelist:[],
  58. tabidx:5,
  59. titimg:require("@/work/static/images/titbg.png"),
  60. upsimg:require("@/work/static/images/ups.png"),
  61. zheList:[{val:0,zheflag:true,moreflag:true},],
  62. ptype:'',
  63. datainfo:{},
  64. tary:'',
  65. hdlxlist:[],
  66. qjlxlist:[],
  67. xsztlist:[],
  68. type:'',
  69. dfinfo:{}
  70. }
  71. },
  72. onUnload(){
  73. uni.$off('refreshdetail')
  74. },
  75. onLoad(e) {
  76. this.id=e.id;
  77. this.type=e.pt;
  78. this.getDetail()
  79. this.init()
  80. uni.$on('refreshdetail', (e) => {
  81. this.getDetail()
  82. })
  83. },
  84. methods:{
  85. checkPermi, checkRole,
  86. kaType(ite){
  87. if(ite){
  88. var newArr=ite.split(',')
  89. var actions=[];
  90. var datas=this.matterList;
  91. newArr.forEach(ite=>{
  92. Object.keys(datas).some((key) => {
  93. if (datas[key].value == ('' + ite)) {
  94. actions.push(datas[key].label);
  95. return true;
  96. }
  97. })
  98. })
  99. return actions.join(' ')
  100. }
  101. },
  102. typeFormat(ite,list){
  103. return selectValue(list, ite);
  104. },
  105. typeFormattext(ite,list){
  106. return selectValuetext(list, ite);
  107. },
  108. init(){
  109. // 线索状态
  110. getDictionaryFn('investment_type').then(res=>{
  111. if(res.code==200&&res.data.length){
  112. this.xsztlist = res.data.map(v => {
  113. return {
  114. label: v.dictLabel,
  115. value:v.dictValue
  116. }
  117. })
  118. }
  119. })
  120. },
  121. getupSubmit(e){
  122. var that=this;
  123. var type=this.ptype;
  124. var params=JSON.parse(JSON.stringify(e))
  125. params.activityId=this.id
  126. getzxActivityReplyFn(params).then(res=>{
  127. if(res.code==200){
  128. this.$toast("回复成功");
  129. setTimeout(function(){
  130. uni.$emit('refreshlist')
  131. that.ptype='';
  132. that.getDetail()
  133. },1200)
  134. }
  135. })
  136. },
  137. getEditFn(){
  138. this.$tab.navigateTo('/work/pages/meeting/addzsyz?type=edit&id='+this.id)
  139. },
  140. getClose(){
  141. this.ptype=""
  142. },
  143. getScfkFn(type){
  144. this.ptype=type
  145. },
  146. getZheFn(idx){
  147. this.zheList[idx].zheflag=!this.zheList[idx].zheflag
  148. },
  149. getDelFn(){
  150. var that=this;
  151. uni.showModal({
  152. title: '确认删除',
  153. content: "是否确认删除该线索",
  154. cancelText: '取消',
  155. confirmText: '确认',
  156. success: function(res) {
  157. if (res.confirm) {
  158. getinvestmentDelFn(that.id).then(res=>{
  159. if(res.code==200){
  160. that.$toast('删除成功')
  161. uni.$emit("refreshlist")
  162. setTimeout(function(){
  163. uni.navigateBack({
  164. delta: 1 //返回层数,2则上上页
  165. });
  166. },1200)
  167. }
  168. })
  169. } else if (res.cancel) {
  170. // console.log('用户点击取消');
  171. }
  172. }
  173. });
  174. },
  175. getDetail(){
  176. var params={
  177. investmentId:this.id
  178. }
  179. // if(this.type=='zsyz'){
  180. // params.userId=this.userId
  181. // }
  182. getinvestmentDetailFn(this.id).then(res=>{
  183. if(res.code==200){
  184. this.datainfo=res.data;
  185. }
  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. &.btn3{border: 2rpx solid #FF0000;background: #ffffff;color: #FF0000;}
  256. }
  257. }
  258. </style>