appraiseinfo.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <template>
  2. <a-card :bordered="false">
  3. <!-- 查询区域 -->
  4. <div class="table-page-search-wrapper">
  5. <a-form layout="inline" @keyup.enter.native="searchQuery">
  6. <a-row :gutter="24">
  7. <a-col :span="3">
  8. <a-form-item label="">
  9. <a-select
  10. mode="multiple"
  11. style="width: 180px"
  12. placeholder="商家名称"
  13. :maxTagCount="1"
  14. :maxTagTextLength="50"
  15. v-model="queryParam.hotelIds"
  16. >
  17. <a-select-option
  18. v-for="(item, index) in hotelList"
  19. :key="index"
  20. :value="item.id"
  21. >
  22. {{ item.name }}
  23. </a-select-option>
  24. </a-select>
  25. </a-form-item>
  26. </a-col>
  27. <a-col :span="3">
  28. <a-form-item label="">
  29. <a-select v-model="queryParam.commentType" style="width: 100%" placeholder="类型">
  30. <a-select-option value="1">酒店</a-select-option>
  31. <a-select-option value="2">商品</a-select-option>
  32. </a-select>
  33. </a-form-item>
  34. </a-col>
  35. <a-col :md="6" :sm="8">
  36. <span
  37. style="float: left; overflow: hidden"
  38. class="table-page-search-submitButtons"
  39. >
  40. <a-button type="primary" @click="searchQuery" icon="search"
  41. >查询</a-button
  42. >
  43. <!-- <a-button
  44. type="primary"
  45. @click="searchReset"
  46. icon="reload"
  47. style="margin-left: 8px"
  48. >重置</a-button
  49. > -->
  50. </span>
  51. </a-col>
  52. </a-row>
  53. </a-form>
  54. </div>
  55. <!-- 查询区域-END -->
  56. <!-- table区域-begin -->
  57. <div>
  58. <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  59. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  60. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  61. </div> -->
  62. <a-table
  63. ref="table"
  64. size="middle"
  65. :scroll="{x:true}"
  66. bordered
  67. rowKey="id"
  68. :columns="columns"
  69. :dataSource="dataSource"
  70. :pagination="ipagination"
  71. :loading="loading"
  72. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  73. class="j-table-force-nowrap"
  74. @change="handleTableChange">
  75. <template slot="htmlSlot" slot-scope="text">
  76. <div v-html="text"></div>
  77. </template>
  78. <template slot="imgSlot" slot-scope="text,record">
  79. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  80. <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  81. </template>
  82. <template slot="fileSlot" slot-scope="text">
  83. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  84. <a-button
  85. v-else
  86. :ghost="true"
  87. type="primary"
  88. icon="download"
  89. size="small"
  90. @click="downloadFile(text)">
  91. 下载
  92. </a-button>
  93. </template>
  94. <span slot="action" slot-scope="text, record">
  95. <a @click="handleEdit(record)">回复</a>
  96. <a-divider type="vertical" />
  97. <a @click="handleDelete(record.id)">删除</a>
  98. </span>
  99. </a-table>
  100. </div>
  101. <ces-order-comment-modal ref="modalForm" @ok="modalFormOk"></ces-order-comment-modal>
  102. </a-card>
  103. </template>
  104. <script>
  105. import "@/assets/less/TableExpand.less";
  106. import { mixinDevice } from "@/utils/mixin";
  107. import { JeecgListMixin } from "@/mixins/JeecgListMixin";
  108. import CesOrderCommentModal from "./modules/CesOrderCommentModal";
  109. import { httpAction, postAction,getAction } from "@/api/manage";
  110. export default {
  111. name: "CesOrderCommentList",
  112. mixins: [JeecgListMixin, mixinDevice],
  113. components: {
  114. CesOrderCommentModal,
  115. },
  116. data() {
  117. return {
  118. description: "ces_order_comment管理页面",
  119. // 表头
  120. columns: [
  121. {
  122. title: "商家",
  123. align: "center",
  124. dataIndex: "hotelName",
  125. },
  126. {
  127. title: "评分",
  128. align: "center",
  129. dataIndex: "score",
  130. },
  131. {
  132. title: "评价类型",
  133. align: "center",
  134. dataIndex: "commentType",
  135. customRender: function (text) {
  136. return text == 1 ? "酒店" : "商品";
  137. },
  138. },
  139. {
  140. title: "评价内容",
  141. align: "center",
  142. dataIndex: "contentBody",
  143. },
  144. {
  145. title: "商家回复",
  146. align: "center",
  147. dataIndex: "sellerContent",
  148. },
  149. {
  150. title: "创建时间",
  151. align: "center",
  152. dataIndex: "createDate",
  153. // customRender: function (text) {
  154. // return !text ? "" : text.length > 10 ? text.substr(0, 10) : text;
  155. // },
  156. },
  157. {
  158. title: "操作",
  159. dataIndex: "action",
  160. align: "center",
  161. fixed: "right",
  162. width: 147,
  163. scopedSlots: { customRender: "action" },
  164. },
  165. ],
  166. url: {
  167. list: "/order/cesOrderComment/list",
  168. delete: "/order/cesOrderComment/delete",
  169. deleteBatch: "/order/cesOrderComment/deleteBatch",
  170. exportXlsUrl: "/order/cesOrderComment/exportXls",
  171. importExcelUrl: "order/cesOrderComment/importExcel",
  172. },
  173. dictOptions: {},
  174. superFieldList: [],
  175. hotelList: [],
  176. };
  177. },
  178. created() {
  179. getAction(
  180. "/business/busHotel/list",
  181. { pageNo: 1, pageSize: 100 }
  182. ).then((res) => {
  183. if (res.success) {
  184. this.hotelList = res.result.records;
  185. }
  186. });
  187. },
  188. computed: {
  189. importExcelUrl: function () {
  190. return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
  191. },
  192. },
  193. methods: {
  194. initDictConfig() {},
  195. getSuperFieldList() {
  196. let fieldList = [];
  197. fieldList.push({ type: "string", value: "tenantId", text: "关联租户" });
  198. fieldList.push({ type: "string", value: "hotelId", text: "关联酒店" });
  199. fieldList.push({ type: "int", value: "commentId", text: "父级评价ID" });
  200. fieldList.push({ type: "int", value: "score", text: "评价1-5星" });
  201. fieldList.push({ type: "int", value: "userId", text: "评价用户ID" });
  202. fieldList.push({
  203. type: "int",
  204. value: "commentType",
  205. text: "评价类型 1 酒店 2商品",
  206. });
  207. fieldList.push({
  208. type: "string",
  209. value: "orderId",
  210. text: "评价商品/订单ID",
  211. });
  212. fieldList.push({
  213. type: "string",
  214. value: "images",
  215. text: "评价图片逗号分隔",
  216. });
  217. fieldList.push({
  218. type: "string",
  219. value: "contentBody",
  220. text: "评价内容",
  221. });
  222. fieldList.push({
  223. type: "string",
  224. value: "sellerContent",
  225. text: "商家回复",
  226. });
  227. fieldList.push({ type: "date", value: "createDate", text: "创建时间" });
  228. this.superFieldList = fieldList;
  229. },
  230. },
  231. };
  232. </script>
  233. <style scoped>
  234. @import "~@assets/less/common.less";
  235. </style>