startwork.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <template>
  2. <view>
  3. <!-- 开工信息 -->
  4. <uni-collapse ref="collapse" v-model="value" @change="changeone" >
  5. <!-- -->
  6. <uni-collapse-item title="开工信息" :show-arrow='false' class='cldelista' :border="false" title-border="none">
  7. <template v-slot:title>
  8. <view class="flexc contentt">
  9. <view class="flex0 f16 fw cofe">开工信息</view>
  10. <view class="flex1 cldelistz" :class="value[0]==0?'act':''">
  11. <view class="cofe f15">{{value[0]==0?'信息折叠':'信息展开'}}</view>
  12. <image :src="upimg" ></image>
  13. </view>
  14. </view>
  15. <!-- 展示的内容 项目名称、开工时间-->
  16. <view class="content pdt10" v-if="!value[0]||value[0]!=0">
  17. <view class="contenta">
  18. <view class="tit">项目名称</view>
  19. <view class="txt">{{datainfo.xmmc}}</view>
  20. </view>
  21. <view class="contenta">
  22. <view class="tit">开工日期</view>
  23. <view class="txt">{{datainfo.kgrq}}</view>
  24. </view>
  25. </view>
  26. </template>
  27. <view class="content">
  28. <view class="contenta">
  29. <view class="tit">项目名称</view>
  30. <view class="txt">{{datainfo.xmmc}}</view>
  31. </view>
  32. <view class="contenta flexcj mb10">
  33. <view class="tit" style="margin-bottom: 0;">开工日期</view>
  34. <view class="txt">{{datainfo.kgrq}}</view>
  35. </view>
  36. <view class="contenta flexcj mb10">
  37. <view class="tit" style="margin-bottom: 0;">拟竣工日期</view>
  38. <view class="txt">{{datainfo.njgrq}}</view>
  39. </view>
  40. <view class="contenta flexcj mb10">
  41. <view class="tit" style="margin-bottom: 0;">试生产日期</view>
  42. <view class="txt">{{datainfo.sscrq}}</view>
  43. </view>
  44. <view class="contenta flexcj mb10">
  45. <view class="tit" style="margin-bottom: 0;">拟投产日期</view>
  46. <view class="txt">{{datainfo.ntcsj}}</view>
  47. </view>
  48. <view class="contenta flexcj">
  49. <view class="tit" style="margin-bottom: 0;">入统日期</view>
  50. <view class="txt">{{datainfo.rtsj}}</view>
  51. </view>
  52. <view class="contenta flexcj">
  53. <view class="tit" style="margin-bottom: 0;">拟入统日期</view>
  54. <view class="txt">{{datainfo.nrtsj}}</view>
  55. </view>
  56. </view>
  57. </uni-collapse-item>
  58. <!-- 进度照片-->
  59. <uni-collapse-item title="进度照片" v-if="ratelist.length" :show-arrow='false' class='cldelista' :border="false" title-border="none">
  60. <template v-slot:title>
  61. <view class="flexc contentt">
  62. <view class="flex0 f16 fw cofe">进度照片</view>
  63. <view class="flex1 cldelistz" :class="value[0]==1||value[1]==1?'act':''">
  64. <view class="cofe f15">{{value[0]==1||value[1]==1?'信息折叠':'信息展开'}}</view>
  65. <image :src="upimg" ></image>
  66. </view>
  67. </view>
  68. </template>
  69. <view class="content" v-for="(ite,idx) in ratelist" :key="'info-'+idx">
  70. <view class="contenta flexcj">
  71. <view class="tit">进度</view>
  72. <view class="txt">{{ite.rateType}}</view>
  73. </view>
  74. <view class="contenta flexcj">
  75. <view class="tit">描述</view>
  76. <view class="txt">{{ite.jdDescribe}}</view>
  77. </view>
  78. <view class="contenta" >
  79. <view class="tit flex0">照片</view>
  80. <view class="photobox">
  81. <image class='photo' :src="baseUrl+pite" v-for="(pite,pidx) in ite.photo" @click="getPreview(ite.photo,pidx)" :key="'info1-'+pidx"></image>
  82. </view>
  83. </view>
  84. </view>
  85. </uni-collapse-item>
  86. </uni-collapse>
  87. <!-- 备注 -->
  88. <view class='cldelista cldelistb' >
  89. <view class="contenta flexcj" style="padding: 0;">
  90. <view class="tit" style="margin-bottom: 0;">存在问题</view>
  91. <view class="txt">{{datainfo.czwt||""}}</view>
  92. </view>
  93. </view>
  94. <block v-if="datainfo.zsyzFjList">
  95. <view class='cldelista cldelistb' >
  96. <!-- <view class="contenta" v-if="datainfo.remark">
  97. <view class="tit">备注</view>
  98. <view class="txt">{{datainfo.remark}}</view>
  99. </view> -->
  100. <view class="contenta " v-if="datainfo.zsyzFjList">
  101. <view class="tit">附件</view>
  102. <view class="txt flexcj cldelistbf mb10" v-for="ite,idx in datainfo.zsyzFjList" :key='idx'>
  103. <view class="flext f16 c6">
  104. <view class="imgl">
  105. <image :src="wimg" ></image>
  106. </view>
  107. <view>{{ite.fjName}}</view>
  108. </view>
  109. <view class="flexc f16 co28 flex0" @click="getDown(ite.path)">
  110. <image :src="downimg" class="imgr"></image>
  111. 预览</view>
  112. </view>
  113. </view>
  114. </view>
  115. </block>
  116. </view>
  117. </template>
  118. <script>
  119. import config from '@/config.js';
  120. const baseUrl = config.baseUrl;
  121. export default{
  122. props:{
  123. datainfo:{
  124. type: Object,
  125. default () {
  126. return {}
  127. }
  128. },
  129. ratelist:{
  130. type: Array,
  131. default () {
  132. return []
  133. }
  134. },
  135. xmxsmc:''
  136. },
  137. data(){
  138. return{
  139. upimg:require('@/static/images/index/up.png'),
  140. wimg:require('@/static/images/index/wicon.png'),
  141. downimg:require('@/static/images/index/down.png'),
  142. value:[],
  143. valuetwo:[],
  144. content: '折叠内容主体,可自定义内容及样式,点击按钮修改内容使高度发生变化。',
  145. baseUrl:''
  146. }
  147. },
  148. mounted() {
  149. this.baseUrl=baseUrl;
  150. },
  151. methods:{
  152. getDown(url){
  153. this.$emit('getDown',url)
  154. },
  155. changeone(e){
  156. // console.log(e,9)
  157. },
  158. changetwo(e){
  159. // console.log(e,9)
  160. },
  161. // 查看照片
  162. getPreview(iurl,idx) {
  163. var newArr=[];
  164. iurl.forEach(ite=>{
  165. var ds=this.baseUrl+ite
  166. newArr.push(ds)
  167. })
  168. uni.previewImage({
  169. urls: newArr,
  170. current:idx,
  171. success: function(data) {
  172. },
  173. fail: function(err) {
  174. console.log(err.errMsg);
  175. }
  176. });
  177. },
  178. }
  179. }
  180. </script>
  181. <style lang="scss" scoped>
  182. .cldelista{
  183. border-bottom: 2rpx solid #E5E5E5;
  184. .contentt{padding:48rpx 28rpx;
  185. .cldelistz{display: flex;align-items: center;justify-content: flex-end;
  186. image{width: 26rpx;height: 20rpx;margin-left: 20rpx;transition: all .5s; }
  187. &.act{
  188. image{transform: rotate(-180deg);}
  189. }
  190. }
  191. }
  192. .content{padding: 0rpx 28rpx 40rpx 28rpx;}
  193. .contenta{padding: 22rpx 0;
  194. .tit{font-size: 32rpx;font-weight: bold;color: #343434;margin-bottom: 20rpx;}
  195. .txt{font-size: 32rpx;color: #666666;}
  196. }
  197. &.cldelistb{padding: 48rpx 28rpx;}
  198. .cldelistbf {
  199. image{margin-right: 18rpx;flex: 0 0 auto;}
  200. .imgl{width: 40rpx;height: 44rpx;display: flex;align-items: center;justify-content: center;margin-right: 16rpx;
  201. image{width: 38rpx;height: 30rpx;}
  202. }
  203. .imgr{width: 36rpx;height: 32rpx;}
  204. }
  205. }
  206. .photobox{flex: 1;display: flex;align-items: center;flex-wrap: wrap;}
  207. .photo{width: 200rpx;height: 200rpx;margin: 10rpx;}
  208. </style>