shprogress.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. <template>
  2. <view class="probox">
  3. <view class="zhanline" v-if="shenhelist.length"></view>
  4. <!-- 步骤条 -->
  5. <view class="step" v-if="shenhelist.length">
  6. <view class="steplist flex" v-for="(ite,idx) in shenhelist" :key="idx">
  7. <view class="stepl">
  8. <!-- 待审核 -->
  9. <image :src="statimga" v-if="ite.shjg==1"></image>
  10. <!-- 已通过 -->
  11. <image :src="statimgc" v-else-if="ite.shjg==2"></image>
  12. <!-- 未通过 -->
  13. <image :src="statimgb" v-else></image>
  14. </view>
  15. <view class="stepr">
  16. <view class="mb6 flexc">
  17. <!-- <view class="f17 c34 f500 flex1">{{ite.shrxm}}</view> -->
  18. <view class="f17 co80 f500 flex1" v-if="ite.shjg==1">待审核</view>
  19. <view class="f17 co28 f500 flex1" v-if="ite.shjg==2">已通过</view>
  20. <view class="f17 cof4 f500 flex1" v-if="ite.shjg==3">未通过</view>
  21. </view>
  22. <!-- <view class="flex mb6"><view class="flex0 f15 ca">是否通过:</view>
  23. <view class="f15 c34 f500" >
  24. <block v-if="ite.shjg==1">待审核</block>
  25. <block v-if="ite.shjg==2">已通过</block>
  26. <block v-if="ite.shjg==3">未通过</block>
  27. </view>
  28. </view> -->
  29. <view class="flex mb6"><view class="flex0 f15 ca">审核时间:</view>
  30. <view class="f15 c34 f500" >{{ite.shsj}}</view>
  31. </view>
  32. <view class="flex mb6"><view class="flex0 f15 ca">审核单位:</view>
  33. <view class="f15 c34 f500" >{{ite.shrxm}}</view>
  34. </view>
  35. <!-- <view class="flex mb6"><view class="flex0 f15 ca">审核内容:</view>
  36. <view class="f15 c34 f500">{{ite.progress==1?'基本信息':'前期工作手续'}}</view>
  37. </view> -->
  38. <view class="flex mb6" v-if="ite.shyj"><view class="flex0 f15 ca">反馈意见:</view><view class="f15 c34 f500">{{ite.shyj}}</view></view>
  39. </view>
  40. </view>
  41. </view>
  42. <block v-else>
  43. <no-data ></no-data>
  44. </block>
  45. <!-- 弹窗 -->
  46. <pop-up :status="status" :iteminfo='iteminfo' :type="type" @getClose='getClose' @getLinSubmit="getLinSubmit" @getldDelFn="getldDelFn"></pop-up>
  47. </view>
  48. </template>
  49. <script>
  50. import popUp from "@/components/popup/popup.vue"
  51. import { getlistzdshyjFn} from '@/api/zdwork/clue.js'
  52. import noData from "@/components/nodata/nodata.vue"
  53. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  54. export default{
  55. data(){
  56. return{
  57. psimg:require("@/static/images/mine/psicon.png"),
  58. xpsimg:require("@/static/images/mine/xpicon.png"),
  59. statimga:require("@/static/images/mine/ywicon.png"),//审核
  60. statimgb:require("@/static/images/mine/cicon.png"),//未通过
  61. statimgc:require("@/static/images/mine/jicon.png"),//通过
  62. type:0,
  63. status:'add',
  64. id:'',//线索id
  65. xmId:'',//项目id,
  66. roles:this.$store.state.user.roles[0],
  67. shenhelist:[],
  68. iteminfo:{},
  69. xmbh:"",
  70. xmmc:'',
  71. sourceId:'',
  72. deptId:this.$store.state.user.deptId,
  73. pageSize: 10,
  74. pageNum: 1,
  75. reachflag:true,
  76. }
  77. },
  78. components:{
  79. popUp,noData
  80. },
  81. onReachBottom() {
  82. if (this.reachflag) {
  83. this.pageNum++
  84. this.getDataFn()
  85. }
  86. },
  87. onLoad(e) {
  88. // this.id=e.id;
  89. this.xmId=e.id;
  90. this.getDataFn()
  91. },
  92. methods:{
  93. checkPermi, checkRole,
  94. getDataFn(){
  95. var params={
  96. xmId:this.xmId,
  97. pageSize:this.pageSize,
  98. pageNum: this.pageNum,
  99. }
  100. getlistzdshyjFn(params).then(res=>{
  101. if(res.code==200){
  102. if (res.rows.length < this.pageSize) {
  103. this.reachflag = false
  104. this.wtdt = '到底了~';
  105. } else {
  106. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  107. if (num < res.total) {
  108. this.reachflag = true
  109. this.wtdt = '上拉加载更多'
  110. } else {
  111. this.reachflag = false
  112. this.wtdt = '到底了~';
  113. }
  114. }
  115. if (this.pageNum == 1) {
  116. this.shenhelist = res.rows;
  117. } else {
  118. this.shenhelist = this.shenhelist.concat(res.rows)
  119. }
  120. }else{
  121. this.$toast(res.msg)
  122. }
  123. // if(res.code==200){
  124. // this.shenhelist=res.rows;
  125. // }else{
  126. // this.$toast(res.msg)
  127. // }
  128. })
  129. },
  130. getClose(){
  131. this.type=0;
  132. },
  133. getldDelFn(){
  134. var params={};
  135. var that=this;
  136. params.id=this.iteminfo.ids;
  137. getldpsdelFn(params).then(res=>{
  138. if(res.code==200){
  139. that.$toast('批示撤回成功')
  140. setTimeout(function(){
  141. that.getDataFn()
  142. that.type=0;
  143. },1500)
  144. }else{
  145. this.$toast(res.msg)
  146. }
  147. })
  148. },
  149. getLinSubmit(data){
  150. var that=this;
  151. var params={};
  152. var str=''
  153. if(data.type==0){//暂存
  154. params.zcpsnr=data.psnr;
  155. params.type=1;
  156. str='批示暂存成功'
  157. }else{
  158. params.psnr=data.psnr;
  159. params.type=2;
  160. str='批示提交成功'
  161. }
  162. if(this.status=='add'){
  163. params.xmId=this.xmId;
  164. params.sourceId=this.sourceId;
  165. params.xmbh=this.xmbh;
  166. params.xmmc=this.xmmc;
  167. getldpsFn(params).then(res=>{
  168. if(res.code==200){
  169. that.$toast(str)
  170. setTimeout(function(){
  171. that.getDataFn()
  172. that.type=0;
  173. },1500)
  174. }else{
  175. this.$toast(res.msg)
  176. }
  177. })
  178. }else{
  179. //修改
  180. params.id=this.iteminfo.ids
  181. getldpsputFn(params).then(res=>{
  182. if(res.code==200){
  183. that.$toast(str)
  184. setTimeout(function(){
  185. that.getDataFn()
  186. that.type=0;
  187. },1500)
  188. }else{
  189. this.$toast(res.msg)
  190. }
  191. })
  192. }
  193. },
  194. getPiFn(e,ite){
  195. this.sourceId=ite.id;
  196. this.xmbh=ite.xmbh;
  197. this.xmmc=ite.xmmc;
  198. if(ite.zsyzLdpsList.length){
  199. this.iteminfo=ite.zsyzLdpsList[0]
  200. }else{
  201. this.iteminfo={};
  202. }
  203. if(this.iteminfo.ids){
  204. this.status='update';
  205. }else{
  206. this.status='add';
  207. }
  208. this.type=3
  209. }
  210. }
  211. }
  212. </script>
  213. <style lang="scss" scoped>
  214. .probox{background-color: #ffffff;min-height: 100vh;}
  215. .step{padding: 56rpx 44rpx 40rpx 44rpx;
  216. .steplist{position: relative;padding-bottom: 24rpx;
  217. &::before{width: 2rpx;height: 100%;background: #E5E5E5;content: '';position: absolute;left: 18rpx;top: 18rpx;}
  218. &:last-of-type::before{display: none;}
  219. .stepl{ flex:0 0 auto;margin-right: 26rpx;width: 34rpx;height: 34rpx;border-radius: 50%;background-color: #ffffff;z-index: 1;
  220. image{width: 36rpx;height: 36rpx;border-radius: 50%;}
  221. }
  222. .stepr{flex: 1;
  223. .titp{display: flex;align-items: center;height: 48rpx;min-width: 120rpx;justify-content: center;
  224. image{width: 32rpx;height: 32rpx;}
  225. view{font-size: 30rpx;color: #1FB9F7 ;margin-left: 12rpx;}
  226. }
  227. }
  228. }
  229. }
  230. </style>