record.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. <template>
  2. <view class="center">
  3. <view class="topCss">
  4. <view class="back-btn cuIcon-back" @click="navBack"></view>
  5. <view class="introduce">
  6. <view class="portrait">
  7. <image :src="portraits" mode="" style="height: 120rpx;border-radius: 14rpx;"></image>
  8. </view>
  9. <view class="name">{{userName}}</view>
  10. <view class="dongtai">
  11. {{count}}
  12. <text style="color: #AFB3BF;">条动态</text>
  13. </view>
  14. <view class="flex">
  15. <view v-for="(item,index) in choices" class="labels">
  16. <view :class="item.changeCss" @click="querys(item)">{{item.name}}</view>
  17. <view style="width: 40rpx;height: 6rpx;background-color: #22C572;margin: 16rpx auto 0;"
  18. v-if="item.check == true"></view>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. <view v-for="(item,index) in release">
  24. <view class="modular">
  25. <view class="flex">
  26. <view class="touxiang">
  27. <image :src="portraits" mode="" style="height: 76rpx;border-radius: 8rpx;"></image>
  28. </view>
  29. <view class="" style="margin: 20rpx 30rpx;">
  30. <view style="color: #333333;font-weight: 600;font-size: 34rpx;">{{item.compName}}</view>
  31. <view style="color: #AFB3BF; margin-top: 4rpx;">{{item.updateDate}}</view>
  32. </view>
  33. <view class="flex" style="width: 40%; justify-content: flex-end;margin: 40rpx;">
  34. <view style="color: #FE6430;" v-if="item.status == '审核中' || item.status == '未审核'|| item.status == '待审核'">{{item.status}}</view>
  35. <view style="color: #22C572;" v-if="item.status == '已通过'">{{item.status}}</view>
  36. <view style="color: #FB1E1E;" v-if="item.status == '已驳回'">{{item.status}}</view>
  37. </view>
  38. </view>
  39. <view class="title">{{item.title}}</view>
  40. <view class="titleText">
  41. {{item.content}}
  42. </view>
  43. <view class="imgList flex" v-if="item.address != ''">
  44. <view v-for="(items,count) in item.imgList" style="width: 30%;margin-left: 20rpx;">
  45. <image :src="items" style="height: 220rpx;border-radius: 16rpx;"></image>
  46. </view>
  47. </view>
  48. <view class="flex">
  49. <view class="address flex">
  50. <image src='../../static/img/location.png'
  51. style="width: 26rpx;height: 30rpx;top: 8rpx;margin: 0 10rpx;"></image>
  52. {{item.city}}
  53. </view>
  54. <view style="width: 30%;justify-content: flex-end;margin: 30rpx;" class="flex">
  55. <view @click="delRecord(item)">
  56. <image src='../../static/img/jiaoyi/shanchu@3x.png'
  57. style="width: 32rpx;height: 32rpx;margin-right: 20rpx;top: 4rpx;"></image>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </template>
  65. <script>
  66. import {
  67. mapState
  68. } from 'vuex';
  69. export default {
  70. data() {
  71. return {
  72. count: 0,
  73. portraits: "",
  74. choices: [{
  75. name: "全部",
  76. check: true,
  77. changeCss: "label2",
  78. },
  79. {
  80. name: "审核中",
  81. check: false,
  82. changeCss: "label",
  83. },
  84. {
  85. name: "已通过",
  86. check: false,
  87. changeCss: "label",
  88. },
  89. {
  90. name: "未通过",
  91. check: false,
  92. changeCss: "label",
  93. },
  94. {
  95. name: "已过期",
  96. check: false,
  97. changeCss: "label",
  98. }
  99. ],
  100. release: [{
  101. imgList: [],
  102. }],
  103. currentPage: 1,
  104. pageSize: 10,
  105. imgList: [],
  106. userName: "",
  107. searchType: "",
  108. }
  109. },
  110. computed: {
  111. ...mapState(['hasLogin', 'userInfo'])
  112. },
  113. onShow() {
  114. this.userName = this.userInfo.userName
  115. this.portraits = this.userInfo.avatarUrl
  116. this.getRelease()
  117. },
  118. methods: {
  119. navBack() {
  120. uni.navigateBack(1)
  121. },
  122. querys(item) {
  123. for (var i = 0; i < this.choices.length; i++) {
  124. if (this.choices[i].name == item.name) {
  125. this.choices[i].check = true
  126. this.choices[i].changeCss = "label2"
  127. } else {
  128. this.choices[i].check = false
  129. this.choices[i].changeCss = "label"
  130. }
  131. }
  132. if (item.name == "审核中") {
  133. this.searchType = "1"
  134. } else if (item.name == "已通过") {
  135. this.searchType = "2"
  136. } else if (item.name == "未通过") {
  137. this.searchType = "3"
  138. } else{
  139. this.searchType = ""
  140. }
  141. this.getRelease()
  142. },
  143. getRelease() {
  144. this.$api.doRequest('get', '/settledCompanyDynamics/selectSettledCompanyDynamicsPage', {
  145. currentPage: this.currentPage,
  146. pageSize: this.pageSize,
  147. loginPhone: this.userInfo.phone,
  148. searchType: this.searchType
  149. })
  150. .then(res => {
  151. if (res.data.code == 200) {
  152. this.release = res.data.data.records
  153. this.count = this.release.length
  154. for (let i = 0; i < this.release.length; i++) {
  155. this.release[i].imgList = this.release[i].address.split(",")
  156. }
  157. }
  158. })
  159. },
  160. delRecord(item) {
  161. var that = this
  162. uni.showModal({
  163. content: "确定删除该动态?",
  164. showCancel: true,
  165. confirmText: '确定',
  166. success: function(res) {
  167. if (res.confirm) {
  168. that.$api.doRequest('post',
  169. '/settledCompanyDynamics/api/deleteSettledCompanyInfo', {
  170. id: item.id,
  171. phone: item.phone
  172. })
  173. .then(res => {
  174. if (res.data.code == 200) {
  175. uni.showToast({
  176. title: '删除成功!',
  177. icon: 'none',
  178. duration: 2000,
  179. success() {
  180. setTimeout(function() {
  181. that.getRelease()
  182. }, 1000);
  183. }
  184. })
  185. }
  186. })
  187. }
  188. }
  189. })
  190. }
  191. }
  192. }
  193. </script>
  194. <style lang="scss" scoped>
  195. .center {
  196. overflow: scroll;
  197. }
  198. .topCss {
  199. overflow: scroll;
  200. background: url(../../static/img/liangmai/record@3x.png);
  201. background-size: 100%;
  202. background-repeat: no-repeat;
  203. }
  204. .back-btn {
  205. position: absolute;
  206. left: 40upx;
  207. z-index: 9999;
  208. padding-top: var(--status-bar-height);
  209. top: 40upx;
  210. font-size: 40upx;
  211. color: #fff;
  212. }
  213. .modular {
  214. width: 94%;
  215. margin: 0 auto;
  216. background-color: #FFFFFF;
  217. border-radius: 40rpx;
  218. margin-top: 40rpx;
  219. }
  220. .introduce {
  221. // height: 300rpx;
  222. background-color: #FFFFFF;
  223. border-top-right-radius: 40rpx;
  224. border-top-left-radius: 40rpx;
  225. margin-top: 250rpx;
  226. }
  227. .portrait {
  228. width: 120rpx;
  229. height: 120rpx;
  230. margin: 0 auto 0;
  231. position: relative;
  232. top: -70rpx;
  233. }
  234. .name {
  235. text-align: center;
  236. color: #333333;
  237. font-size: 40rpx;
  238. margin-top: -30rpx;
  239. }
  240. .dongtai {
  241. text-align: center;
  242. }
  243. .labels {
  244. width: 140rpx;
  245. text-align: center;
  246. margin-top: 60rpx;
  247. }
  248. .label {
  249. color: #333333;
  250. font-size: 32rpx;
  251. }
  252. .label2 {
  253. color: #333333;
  254. font-size: 36rpx;
  255. font-weight: 600;
  256. }
  257. .touxiang {
  258. width: 76rpx;
  259. height: 76rpx;
  260. margin: 20rpx 0 0 34rpx;
  261. }
  262. .title {
  263. font-size: 38rpx;
  264. font-weight: 600;
  265. margin-left: 30rpx;
  266. }
  267. .titleText {
  268. font-size: 34rpx;
  269. margin-left: 30rpx;
  270. margin-top: 10rpx;
  271. }
  272. .imgList {
  273. width: 100%;
  274. margin-top: 30rpx;
  275. flex-wrap: wrap;
  276. }
  277. .address {
  278. width: 60%;
  279. height: 48rpx;
  280. background-color: #F5F6FA;
  281. border-radius: 24rpx;
  282. margin-left: 30rpx;
  283. line-height: 48rpx;
  284. margin: 30rpx;
  285. }
  286. </style>