evaluateDetailDialog.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. <template>
  2. <div class="container">
  3. <!-- 遮罩层区域 -->
  4. <div class="mask" @click="handleClose"></div>
  5. <!-- 主体内容区域 -->
  6. <div class="detail">
  7. <!-- 标题区域 -->
  8. <div class="detail_title"></div>
  9. <!-- 关闭按钮区域 -->
  10. <div class="close_icon" @click="handleClose"></div>
  11. <!-- 筛选区域 -->
  12. <div class="detail_search">
  13. 姓名
  14. <el-input
  15. v-model="nameValue"
  16. style="width: 575px; height: 75px; margin: 0 50px 0 30px"
  17. size="large"
  18. placeholder="请输入姓名"
  19. :suffix-icon="Search"
  20. @change="handleSearch"
  21. />
  22. 评价时间
  23. <el-date-picker
  24. v-model="timeRang"
  25. type="daterange"
  26. range-separator="至"
  27. start-placeholder="请选择日期"
  28. end-placeholder="请选择日期"
  29. size="large"
  30. value-format="YYYY-MM-DD HH:mm:ss"
  31. style="width: 575px; height: 75px; margin: 0 50px 0 30px"
  32. @change="handleSearch"
  33. />
  34. 舆情等级
  35. <el-select
  36. v-model="levelValue"
  37. placeholder="全部"
  38. size="large"
  39. style="width: 575px; margin-left: 30px"
  40. @change="handleSearch"
  41. >
  42. <el-option
  43. v-for="(item, index) in levelList"
  44. :key="index"
  45. :label="item.text"
  46. :value="item.value"
  47. />
  48. </el-select>
  49. </div>
  50. <!-- 表格区域 -->
  51. <div class="detail_table">
  52. <el-table :data="tableData" height="835px" style="width: 100%">
  53. <el-table-column
  54. type="index"
  55. label="序号"
  56. align="center"
  57. width="100"
  58. />
  59. <el-table-column label="头像" align="center">
  60. <template #default="{ row }">
  61. <el-image
  62. class="table_img"
  63. fit="contain"
  64. :src="row.photo"
  65. :preview-src-list="[row.photo]"
  66. hide-on-click-modal
  67. preview-teleported
  68. ></el-image>
  69. </template>
  70. </el-table-column>
  71. <el-table-column prop="comment_name" label="姓名" align="center" />
  72. <el-table-column label="评价时间" align="center">
  73. <template #default="{ row }">
  74. {{ dayjs(row.create_date).format("YYYY-MM-DD HH:mm:ss") }}
  75. </template>
  76. </el-table-column>
  77. <el-table-column
  78. prop="comment_status"
  79. label="来源渠道"
  80. align="center"
  81. />
  82. <el-table-column prop="booking_id" label="订单号" align="center" />
  83. <el-table-column prop="content" label="评价内容" align="center" />
  84. <el-table-column label="舆情等级" align="center">
  85. <template #default="{ row }">
  86. {{ row.comment_status == 0 ? "优" : "良" }}
  87. </template>
  88. </el-table-column>
  89. <el-table-column label="操作" align="center">
  90. <template #default="{ row }">
  91. <div class="table_btn" @click="lookDetail(row)">查看详情</div>
  92. </template>
  93. </el-table-column>
  94. </el-table>
  95. </div>
  96. <!-- 分页器区域 -->
  97. <div class="pagination">
  98. <el-pagination
  99. hide-on-single-page
  100. background
  101. :pager-count="5"
  102. layout="prev, pager, next"
  103. v-model:current-page="currentPage"
  104. v-model:page-size="pageSize"
  105. :total="total"
  106. />
  107. </div>
  108. <!-- 评价详情弹窗区域 -->
  109. <Transition name="fade">
  110. <EvaluateMsgDialog
  111. v-if="showMsg"
  112. :showObj="showObj"
  113. @closeMsg="closeMsg"
  114. />
  115. </Transition>
  116. </div>
  117. </div>
  118. </template>
  119. <script setup lang="ts">
  120. import { ref, onMounted } from "vue";
  121. import { Search } from "@element-plus/icons-vue";
  122. import EvaluateMsgDialog from "./evaluateMsgDialog.vue";
  123. // 引入旅游服务相关的接口
  124. import { reqGetCommentInfo } from "@/api/serve/index";
  125. import dayjs from "dayjs";
  126. const $emit = defineEmits(["closeDialog"]);
  127. // 时间输入框绑定数据
  128. const nameValue = ref("");
  129. // 舆情等级筛选框绑定数据
  130. const levelValue = ref("");
  131. // 评价时间选择框绑定数据
  132. const timeRang = ref([]);
  133. // 舆情等级数组
  134. const levelList = ref([
  135. {
  136. text: "全部",
  137. value: "",
  138. },
  139. {
  140. text: "优",
  141. value: 0,
  142. },
  143. {
  144. text: "良",
  145. value: 1,
  146. },
  147. ]);
  148. // 每页多少条
  149. const pageSize = ref(8);
  150. // 当前页
  151. const currentPage = ref(1);
  152. // 总条数
  153. const total = ref(0);
  154. // 评价信息列表
  155. const tableData = ref([]);
  156. // 单个评价详细信息
  157. const showObj = ref({});
  158. // 评价详情弹窗显示隐藏控制
  159. const showMsg = ref<boolean>(false);
  160. onMounted(() => {
  161. // 获取用户评价列表数据
  162. getCommentInfo();
  163. });
  164. // 获取用户评价列表数据
  165. const getCommentInfo = async () => {
  166. const res = await reqGetCommentInfo({
  167. pageNum: currentPage.value,
  168. pageSize: pageSize.value,
  169. startTime: timeRang.value ? timeRang.value[0] : "",
  170. endTime: timeRang.value ? timeRang.value[1] : "",
  171. name: nameValue.value,
  172. flag: levelValue.value,
  173. });
  174. // console.log(res);
  175. if ((res as any).code == 200 && res.data.commentInfoList) {
  176. tableData.value = res.data.commentInfoList;
  177. total.value = res.data.total;
  178. } else {
  179. tableData.value = [];
  180. total.value = 0;
  181. }
  182. };
  183. // 点击关闭按钮回调
  184. const handleClose = () => {
  185. $emit("closeDialog", false);
  186. };
  187. // 点击查看详情按钮回调
  188. const lookDetail = (row: any) => {
  189. showMsg.value = true;
  190. showObj.value = row;
  191. };
  192. // 自定义事件
  193. const closeMsg = (data: boolean) => {
  194. showMsg.value = data;
  195. };
  196. // 筛选条件触发的回调
  197. const handleSearch = () => {
  198. currentPage.value = 1;
  199. getCommentInfo();
  200. };
  201. </script>
  202. <style lang="scss" scoped>
  203. .container {
  204. z-index: 9999;
  205. position: absolute;
  206. top: -362px;
  207. left: -140px;
  208. display: flex;
  209. justify-content: center;
  210. align-items: center;
  211. width: 7072px;
  212. height: 1872px;
  213. background-color: rgba($color: #000000, $alpha: 0.4);
  214. .mask {
  215. position: absolute;
  216. top: 0;
  217. left: 0;
  218. width: 7072px;
  219. height: 1872px;
  220. }
  221. .detail {
  222. position: relative;
  223. width: 2687px;
  224. height: 1302px;
  225. background-image: url(@/assets/images/9.png);
  226. background-size: 100% 100%;
  227. .detail_title {
  228. margin-top: 51px;
  229. margin-left: 51px;
  230. width: 2521px;
  231. height: 96px;
  232. background-image: url(@/assets/images/79.png);
  233. background-size: 100% 100%;
  234. }
  235. .close_icon {
  236. position: absolute;
  237. top: 59px;
  238. right: 17px;
  239. width: 82px;
  240. height: 82px;
  241. cursor: pointer;
  242. background-image: url(@/assets/images/12.png);
  243. background-size: 100% 100%;
  244. }
  245. .detail_search {
  246. display: flex;
  247. align-items: center;
  248. margin-left: 53px;
  249. width: 2567px;
  250. height: 176px;
  251. font-size: 30px;
  252. }
  253. .detail_table {
  254. margin-left: 53px;
  255. width: 2567px;
  256. height: 835px;
  257. .table_img {
  258. width: 52px;
  259. height: 63px;
  260. }
  261. .table_btn {
  262. color: #0aadda;
  263. font-size: 16px;
  264. cursor: pointer;
  265. }
  266. }
  267. .pagination {
  268. display: flex;
  269. justify-content: flex-end;
  270. align-items: center;
  271. margin-left: 53px;
  272. width: 2567px;
  273. height: 100px;
  274. }
  275. }
  276. }
  277. ::v-deep(.el-input__wrapper) {
  278. font-size: 30px;
  279. background-color: rgba(36, 98, 125, 0.5);
  280. }
  281. ::v-deep(.el-input__inner) {
  282. color: #fff;
  283. }
  284. ::v-deep(.el-range-input),
  285. ::v-deep(.el-range-separator) {
  286. color: #fff;
  287. font-size: 30px;
  288. }
  289. ::v-deep(.el-date-editor .el-range__icon),
  290. ::v-deep(.el-date-editor .el-range__close-icon),
  291. ::v-deep(.el-select__caret) {
  292. font-size: 30px;
  293. }
  294. ::v-deep(.el-select--large .el-select__wrapper) {
  295. height: 75px;
  296. font-size: 30px;
  297. background-color: rgba(36, 98, 125, 0.5);
  298. }
  299. ::v-deep(.el-select__placeholder) {
  300. color: #fff;
  301. line-height: 75px;
  302. }
  303. /*最外层透明*/
  304. .detail_table ::v-deep(.el-table),
  305. .detail_table ::v-deep(.el-table__expanded-cell) {
  306. background-color: transparent;
  307. color: white;
  308. border: none;
  309. }
  310. /* 表格内背景颜色 */
  311. .detail_table ::v-deep(.el-table th),
  312. .detail_table ::v-deep(.el-table tr),
  313. .detail_table ::v-deep(.el-table td) {
  314. background-color: transparent !important;
  315. color: white;
  316. font-size: 16px;
  317. border-color: rgba(255, 255, 255, 0.1);
  318. }
  319. // 表格底部白线清除
  320. ::v-deep(.el-table__inner-wrapper::before) {
  321. height: 0;
  322. }
  323. // 修改表头背景颜色
  324. ::v-deep(.el-table__header) {
  325. background-color: rgba(41, 67, 102, 0.7);
  326. }
  327. ::v-deep(.el-pagination.is-background .el-pager li),
  328. ::v-deep(.el-pagination.is-background .btn-next),
  329. ::v-deep(.el-pagination.is-background .btn-prev) {
  330. color: #000;
  331. background-color: #cccccc;
  332. }
  333. ::v-deep(.el-pagination.is-background .el-pager li.is-active) {
  334. color: #fff;
  335. background-color: #0aadda;
  336. }
  337. // ::v-deep(.el-pagination__goto),
  338. // ::v-deep(.el-pagination__classifier),
  339. // ::v-deep(.el-input__inner) {
  340. // color: #b0b0b0;
  341. // }
  342. </style>