detail.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  1. <template>
  2. <div class="detail">
  3. <el-row :gutter="30">
  4. <el-col :span="25">
  5. <div class="title">
  6. <p>经销商</p>
  7. <h3>
  8. {{ detail.distName }}
  9. </h3>
  10. </div>
  11. <header>
  12. <el-descriptions :colon="false" :column="10" direction="vertical" style="padding-top: 15px">
  13. <el-descriptions-item
  14. content-class-name="my-content"
  15. label="经销商编码"
  16. label-class-name="my-label"
  17. style="width: auto">
  18. {{ detail.distCode.substring(1, 7) }}
  19. </el-descriptions-item>
  20. <el-descriptions-item content-class-name="my-content" label="经销商名称" label-class-name="my-label">
  21. {{ detail.distName }}
  22. </el-descriptions-item>
  23. <el-descriptions-item content-class-name="my-content" label="助记名" label-class-name="my-label">
  24. {{ detail.abbrName }}
  25. </el-descriptions-item>
  26. <el-descriptions-item content-class-name="my-content" label="负责人" label-class-name="my-label">
  27. {{ detail.distBoss }}
  28. </el-descriptions-item>
  29. <el-descriptions-item content-class-name="my-content" label="负责人电话" label-class-name="my-label">
  30. {{ detail.distBossPhone }}
  31. </el-descriptions-item>
  32. <el-descriptions-item content-class-name="my-content" label="销售人" label-class-name="my-label">
  33. {{ detail.belongSale }}
  34. </el-descriptions-item>
  35. <el-descriptions-item content-class-name="my-content" label="归属省份" label-class-name="my-label">
  36. {{ detail.provinceDesc }}
  37. </el-descriptions-item>
  38. <el-descriptions-item content-class-name="my-content" label="业务范围" label-class-name="my-label">
  39. {{ detail.businessScope }}
  40. </el-descriptions-item>
  41. <el-descriptions-item content-class-name="my-content" label="创建人" label-class-name="my-label">
  42. {{ detail.createdName }}
  43. </el-descriptions-item>
  44. <el-descriptions-item content-class-name="my-content" label="创建时间" label-class-name="my-label">
  45. {{ detail.createdTime }}
  46. </el-descriptions-item>
  47. </el-descriptions>
  48. </header>
  49. </el-col>
  50. </el-row>
  51. </div>
  52. </template>
  53. <script>
  54. import { mapGetters } from 'vuex'
  55. import api from '@/api/base/distr'
  56. export default {
  57. name: 'Detail',
  58. components: {},
  59. data() {
  60. return {
  61. id: '',
  62. privateCus: '',
  63. list: [],
  64. detail: {
  65. distCode: '', //经销商编码
  66. distName: '', //经销商名称
  67. abbrName: '', //助记名
  68. distBoss: '', //负责人
  69. distBossPhone: '', //负责人电话
  70. belongSale: '', //销售人
  71. provinceDesc: '', //归属省份
  72. businessScope: '', //业务范围
  73. createdName: '', //创建人名字
  74. createdTime: '', //创建时间
  75. },
  76. }
  77. },
  78. computed: {
  79. ...mapGetters({
  80. avatar: 'user/avatar',
  81. username: 'user/username',
  82. }),
  83. },
  84. mounted() {
  85. this.id = this.$route.query.id
  86. this.privateCus = this.$route.query.privateCus
  87. this.init()
  88. //this.getDynamics()
  89. },
  90. methods: {
  91. async init() {
  92. Promise.all([api.getEntity({ id: parseInt(this.id) })]).then(([detail]) => {
  93. console.log('detail', detail)
  94. this.detail = detail.data.list
  95. })
  96. },
  97. setSelectRows(val) {
  98. this.selectRows = val
  99. },
  100. },
  101. }
  102. </script>
  103. <style lang="scss" scoped>
  104. $base: '.detail';
  105. #{$base} {
  106. height: calc(100vh - 60px - 50px - 12px * 2 - 40px);
  107. display: flex;
  108. padding: 20px 40px;
  109. > .el-row {
  110. flex: 1;
  111. > .el-col {
  112. height: 100%;
  113. }
  114. }
  115. .title {
  116. p,
  117. h3 {
  118. margin: 0;
  119. }
  120. p {
  121. font-size: 14px;
  122. font-weight: 400;
  123. line-height: 22px;
  124. }
  125. h3 {
  126. font-size: 24px;
  127. font-weight: 500;
  128. line-height: 36px;
  129. color: #333;
  130. display: flex;
  131. justify-content: space-between;
  132. }
  133. }
  134. header {
  135. height: 74px;
  136. background: rgba(196, 196, 196, 0.5);
  137. border-radius: 4px;
  138. display: flex;
  139. align-items: center;
  140. padding: 0 20px;
  141. margin-top: 16px;
  142. ::v-deep .el-descriptions__body {
  143. background: transparent;
  144. }
  145. ::v-deep .my-label {
  146. font-size: 14px;
  147. font-weight: 600;
  148. color: #1d66dc;
  149. }
  150. ::v-deep .my-content {
  151. font-size: 14px;
  152. font-weight: 600;
  153. color: #333;
  154. white-space: nowrap;
  155. overflow: hidden;
  156. text-overflow: ellipsis;
  157. }
  158. }
  159. .el-tabs {
  160. height: calc(100% - 148px);
  161. display: flex;
  162. flex-direction: column;
  163. ::v-deep .el-tabs__content {
  164. flex: 1;
  165. .el-tab-pane {
  166. height: 100%;
  167. }
  168. }
  169. }
  170. .buttons {
  171. padding-top: 28px;
  172. text-align: right;
  173. }
  174. .records {
  175. margin: 0;
  176. padding: 10px 20px;
  177. list-style: none;
  178. height: calc(100% - 60px);
  179. overflow-y: auto;
  180. > li {
  181. display: flex;
  182. & + li {
  183. margin-top: 10px;
  184. }
  185. }
  186. .date {
  187. width: 100px;
  188. display: flex;
  189. flex-direction: column;
  190. align-items: center;
  191. h2,
  192. h3 {
  193. margin: 0;
  194. }
  195. h2 {
  196. font-size: 26px;
  197. line-height: 32px;
  198. }
  199. }
  200. .content {
  201. flex: 1;
  202. list-style: none;
  203. li {
  204. display: flex;
  205. & + li {
  206. margin-top: 10px;
  207. }
  208. }
  209. .user-avatar {
  210. font-size: 40px;
  211. }
  212. .text {
  213. flex: 1;
  214. padding-left: 20px;
  215. p {
  216. font-weight: 500;
  217. margin: 0;
  218. line-height: 20px;
  219. span {
  220. color: #1d66dc;
  221. }
  222. }
  223. p:nth-child(2) {
  224. margin-bottom: 10px;
  225. }
  226. .action {
  227. font-weight: bold;
  228. color: #333;
  229. }
  230. }
  231. }
  232. }
  233. .follow {
  234. height: 100%;
  235. padding: 10px 20px;
  236. overflow: auto;
  237. > li {
  238. display: flex;
  239. + li {
  240. margin-top: 10px;
  241. }
  242. }
  243. .date {
  244. width: 100px;
  245. display: flex;
  246. flex-direction: column;
  247. align-items: center;
  248. h2,
  249. h3 {
  250. margin: 0;
  251. }
  252. h2 {
  253. font-size: 26px;
  254. line-height: 32px;
  255. }
  256. }
  257. .content {
  258. flex: 1;
  259. list-style: none;
  260. > li {
  261. border: 1px solid rgb(215, 232, 244);
  262. background: rgb(247, 251, 254);
  263. border-radius: 4px;
  264. padding: 8px;
  265. overflow: hidden;
  266. .text-container {
  267. display: flex;
  268. }
  269. .comments {
  270. padding-left: 60px;
  271. margin-top: 10px;
  272. max-height: 200px;
  273. overflow: auto;
  274. li {
  275. display: flex;
  276. border-top: 1px solid #e3e5e7;
  277. .text {
  278. flex: 1;
  279. padding: 0 10px;
  280. p {
  281. font-weight: 500;
  282. margin: 0;
  283. line-height: 32px;
  284. }
  285. p:first-child {
  286. line-height: 30px;
  287. font-weight: bold;
  288. }
  289. p:last-child {
  290. font-size: 12px;
  291. color: #9499a0;
  292. text-align: right;
  293. }
  294. }
  295. }
  296. }
  297. + li {
  298. margin-top: 10px;
  299. }
  300. }
  301. .user-avatar {
  302. font-size: 40px;
  303. }
  304. .text {
  305. flex: 1;
  306. padding-left: 20px;
  307. padding-right: 10px;
  308. p {
  309. font-weight: 500;
  310. margin: 0;
  311. line-height: 32px;
  312. span {
  313. color: #1d66dc;
  314. }
  315. }
  316. .action {
  317. display: flex;
  318. justify-content: space-between;
  319. span:first-child {
  320. font-weight: bold;
  321. color: #333;
  322. }
  323. }
  324. .footer {
  325. display: flex;
  326. justify-content: space-between;
  327. align-items: center;
  328. }
  329. }
  330. }
  331. }
  332. }
  333. .height-enter-active,
  334. .height-leave-active {
  335. transition: all 0.5s;
  336. }
  337. .height-enter-to,
  338. .height-leave {
  339. height: 200px;
  340. }
  341. .height-enter,
  342. .height-leave-to
  343. /* .fade-leave-active below version 2.1.8 */ {
  344. height: 0;
  345. }
  346. </style>