shprogress.vue 6.8 KB

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