index.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <!-- 进度查询-列表 -->
  2. <script>
  3. import Cookies from "js-cookie";
  4. import { ProblemList } from "@/api/business/as/after-sales";
  5. export default {
  6. name: "Progress",
  7. components: {
  8. ProgressDetail: () => import("./details.vue"),
  9. },
  10. data() {
  11. return {
  12. loading: false,
  13. title: "进度查询",
  14. imgUrl: require("../images/order.png"),
  15. dataList: [],
  16. checkedId: null,
  17. };
  18. },
  19. methods: {
  20. useBack() {
  21. this.$router.go(-1);
  22. },
  23. handleDetail(prop) {
  24. this.checkedId = prop.id;
  25. let { setVisible } = this.$refs.ProgressDetail;
  26. setVisible(true);
  27. },
  28. async getList() {
  29. try {
  30. this.loading = true;
  31. // const { id } = this.$store.state.salesUser;
  32. const userId = Cookies.get("salesId");
  33. let { code, rows } = await ProblemList({ userId });
  34. if (code === 200) {
  35. this.dataList = rows;
  36. }
  37. } catch (error) {
  38. } finally {
  39. this.loading = false;
  40. }
  41. },
  42. },
  43. created() {
  44. this.getList();
  45. },
  46. };
  47. </script>
  48. <template>
  49. <el-card
  50. v-loading="loading"
  51. shadow="never"
  52. :body-style="{
  53. height: '100%',
  54. padding: 0,
  55. display: 'flex',
  56. 'flex-direction': 'column',
  57. 'align-items': 'center',
  58. }"
  59. >
  60. <van-sticky style="width: 100%">
  61. <van-nav-bar
  62. :title="title"
  63. left-text="返回"
  64. left-arrow
  65. @click-left="useBack"
  66. style="width: 100%"
  67. />
  68. </van-sticky>
  69. <el-row>
  70. <el-col
  71. v-for="data in dataList"
  72. :span="24"
  73. @click.native="handleDetail(data)"
  74. >
  75. <div class="mes_title">
  76. <div style="display: flex; align-items: center">
  77. <el-image
  78. style="width: 16px; height: 16px; margin-right: 12px"
  79. :src="imgUrl"
  80. fit="contain"
  81. ></el-image>
  82. <span>{{ data.problemCode }}</span>
  83. </div>
  84. <span>{{
  85. new Date(data.createTime.replace(/-/g, "/")).Format(
  86. "yyyy-MM-dd HH:mm"
  87. )
  88. }}</span>
  89. </div>
  90. <p
  91. class="van-ellipsis"
  92. style="color: #333; font-size: 14px; margin: 5px 0px"
  93. >
  94. {{ data.processFlow[0].content }}
  95. </p>
  96. <p class="van-ellipsis" style="margin: 0">
  97. 问题描述:{{ data.problemDescription }}
  98. </p>
  99. </el-col>
  100. </el-row>
  101. <progress-detail
  102. ref="ProgressDetail"
  103. v-model="checkedId"
  104. @refresh="getList"
  105. ></progress-detail>
  106. </el-card>
  107. </template>
  108. <style scoped lang="scss">
  109. .el-card {
  110. width: 100%;
  111. height: 100vh;
  112. overflow-y: auto;
  113. overflow-x: hidden;
  114. background-color: #f7f7f7;
  115. }
  116. .el-row {
  117. width: 100%;
  118. padding: 16px;
  119. box-sizing: border-box;
  120. border-radius: 4px;
  121. .el-col {
  122. margin-bottom: 16px;
  123. background-color: #fff;
  124. padding: 12px;
  125. font-size: 12px;
  126. color: #9b9b9b;
  127. .mes_title {
  128. display: flex;
  129. align-items: center;
  130. justify-content: space-between;
  131. }
  132. span {
  133. align-self: center;
  134. }
  135. }
  136. }
  137. </style>