RiderFeedback.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. <template>
  2. <div class="table">
  3. <div class="crumbs">
  4. <el-breadcrumb separator="/">
  5. <el-breadcrumb-item
  6. ><i class="el-icon-lx-cascades"></i>骑手意见反馈</el-breadcrumb-item
  7. >
  8. </el-breadcrumb>
  9. </div>
  10. <div class="container" style="margin-top:10px; line-height: 24px;">
  11. <div class="media-body" v-for="(item, index) in tableData" :key="index">
  12. <a href="javascript:0;" class="media-left" style="float: left; margin-right: 10px;">
  13. <img src="http://img.weizhi.so/head2.jpg" height="46px" width="46px">
  14. </a>
  15. <div class="pad-btm">
  16. <p class="fontColor">
  17. <a href="javascript:0;">{{item.userName}}</a>
  18. </p>
  19. <p class="min-font">
  20. <span style="visibility: visible;">
  21. <a href="javascript:0;">{{item.createDate}}</a>
  22. </span>
  23. </p>
  24. </div>
  25. <p class="message-text">{{item.rmk}}</p>
  26. <hr>
  27. <el-button type="primary" round @click="handleClick">回复</el-button>
  28. </div>
  29. <div>
  30. <el-pagination
  31. @size-change="handleSizeChange"
  32. @current-change="handleCurrentChange"
  33. :current-page="currentPage"
  34. :page-sizes="[100, 200, 300, 400]"
  35. :page-size="100"
  36. layout="total, sizes, prev, pager, next, jumper"
  37. :total="400">
  38. </el-pagination>
  39. </div>
  40. <el-dialog title="请输入回复内容" :visible.sync="dialogVisible" :before-close="closeDialog" width="300px">
  41. <el-input type="textarea" :rows="4" v-model="text"></el-input>
  42. <span slot="footer" class="dialog-footer">
  43. <el-button type="primary" @click="closeDialog">保存</el-button>
  44. <el-button @click="closeDialog">关闭</el-button>
  45. </span>
  46. </el-dialog>
  47. </div>
  48. </div>
  49. </template>
  50. <script>
  51. import dptable from "../../../common/Dptable";
  52. export default {
  53. components: {
  54. dptable,
  55. },
  56. data() {
  57. return {
  58. text: '',
  59. dialogVisible: false,
  60. currentPage: 4,
  61. storeList: [
  62. {
  63. storeId: 1,
  64. storeName: '门店一'
  65. },
  66. {
  67. storeId: 2,
  68. storeName: '门店二'
  69. }
  70. ], // 门店下拉列表
  71. // 检索条件
  72. form: {
  73. userCode: "",
  74. userName: "",
  75. charactorId: "",
  76. dptId: ""
  77. },
  78. tableData: [
  79. {
  80. evaluateId: '1',
  81. headUrl: '',
  82. userName: '孙娜',
  83. storeName: '大叔麻辣拌',
  84. createDate: '2023-04-23 11:23:54',
  85. rate: 3,
  86. taste: 1,
  87. package: 3,
  88. rateUrl: [
  89. {
  90. rateId: '1',
  91. rateUrl: ''
  92. },
  93. {
  94. rateId: '2',
  95. rateUrl: ''
  96. }
  97. ],
  98. rmk: '太少了,我寻思点了哥汤底呢,东西都是一个吗,面就几根,有这样做生意的?',
  99. peiSong: '超赞'
  100. },
  101. {
  102. evaluateId: '2',
  103. headUrl: '',
  104. userName: '刘长林',
  105. createDate: '2023-04-21 10:56:37',
  106. rate: 5,
  107. taste: 5,
  108. storeName: '金柱鸡架',
  109. package: 5,
  110. rateUrl: [
  111. {
  112. rateId: '1',
  113. rateUrl: ''
  114. },
  115. {
  116. rateId: '2',
  117. rateUrl: ''
  118. }
  119. ],
  120. rmk: '阔以阔以',
  121. peiSong: '超赞'
  122. }
  123. ],
  124. pagination: {
  125. resultCount: 0,
  126. currentPage: 1,
  127. pageSize: 20
  128. },
  129. options: {
  130. singleSelect: false, // 是否有前部的单选框
  131. mutiSelect: false, // 是否有前部的多选框
  132. index: false, // 显示序号, 多选则 mutiSelect
  133. initTable: true, // 是否一挂载就加载数据
  134. height: "550"
  135. },
  136. charList: [], // 角色下拉框
  137. dptList: [], // 部门下拉框
  138. isShow: false,
  139. currentView: "",
  140. dialogOptions: {}
  141. };
  142. },
  143. methods: {
  144. handleClick(){
  145. this.dialogVisible = true;
  146. },
  147. closeDialog(){
  148. this.dialogVisible = false;
  149. },
  150. handleSizeChange(val) {
  151. console.log(`每页 ${val} 条`);
  152. },
  153. handleCurrentChange(val) {
  154. console.log(`当前页: ${val}`);
  155. },
  156. changeStatus(e, row) {
  157. //transform-vue-jsx 的nativeOnClick 失效 , 所以采用 event.cancelBubble 控制点击事件的冒泡... 如果点击事件不影响你的点击行事件,可以不传
  158. e.cancelBubble = true; // 停止冒泡,否则会触发 row-click
  159. this.options.loading = true;
  160. let status = row.status == "1" ? "0" : "1";
  161. const querystring = require("querystring");
  162. this.$axios
  163. .post(
  164. this.changeStatusUrl,
  165. querystring.stringify({
  166. id: row.userId,
  167. status: status
  168. })
  169. )
  170. .then(res => {
  171. if (res.data.rtnBean.rtnCode == 0) {
  172. this.$message.success(res.data.rtnBean.rtnMsg);
  173. } else {
  174. this.$message.error(res.data.rtnBean.rtnMsg);
  175. }
  176. this.options.loading = false;
  177. this.getDataList();
  178. })
  179. .catch(error => {
  180. console.log(error);
  181. this.options.loading = false;
  182. });
  183. },
  184. dialogCallback() {
  185. console.log(111);
  186. this.$refs.updateUser.clearForm();
  187. this.isShow = false;
  188. this.getDataList();
  189. },
  190. dialogClose() {
  191. this.$refs.updateUser.clearForm();
  192. this.dialogOptions = {}
  193. this.isShow = false;
  194. },
  195. getDataList() {
  196. this.options.loading = true;
  197. const querystring = require("querystring");
  198. this.$axios
  199. .post(
  200. this.getUserVListUrl,
  201. querystring.stringify({
  202. userCode: this.form.userCode,
  203. userName: this.form.userName,
  204. charactorId: this.form.charactorId,
  205. pageSize: this.pagination.pageSize,
  206. currentPage: this.pagination.currentPage,
  207. dptId: this.form.dptId
  208. })
  209. )
  210. .then(res => {
  211. if (res.data.list.length == 0) {
  212. this.$message("数据不存在,请更换查询条件重新再试");
  213. }
  214. this.tableData = res.data.list;
  215. this.pagination.resultCount = res.data.page.resultCount;
  216. this.pagination.currentPage = res.data.page.currentPage;
  217. })
  218. .catch(error => {
  219. console.log(error);
  220. });
  221. this.options.loading = false;
  222. },
  223. addRow() {
  224. this.currentView = "update-user";
  225. this.isShow = true;
  226. // this.$nextTick(() => {
  227. // this.$refs.updateUser.getData();
  228. // });
  229. setTimeout(() => {
  230. this.$refs.updateUser.getData();
  231. }, 250);
  232. // this.$router.push({
  233. // path: '/admin/updateuser'
  234. // })
  235. },
  236. // 编辑行
  237. enditRow(key) {
  238. this.currentView = "update-user";
  239. this.isShow = true;
  240. this.dialogOptions = {
  241. rowId: key
  242. };
  243. // this.$nextTick(() => {
  244. setTimeout(() => {
  245. this.$refs.updateUser.getData();
  246. }, 250);
  247. // });
  248. },
  249. // 重置密码
  250. resetPwd(key) {
  251. const querystring = require("querystring");
  252. this.$axios
  253. .post(
  254. this.resetPwdUrl,
  255. querystring.stringify({
  256. id: key
  257. })
  258. )
  259. .then(res => {
  260. console.log(res);
  261. if (res.data.rtnBean.rtnCode == 0) {
  262. this.$message.success("重置密码成功!");
  263. } else {
  264. this.$message.error(res.data.rtnBean.rtnMsg);
  265. }
  266. this.getDataList();
  267. })
  268. .catch(error => {
  269. console.log(error);
  270. this.$message.error("数据处理异常,请与管理员联系!");
  271. });
  272. }
  273. }
  274. };
  275. </script>
  276. <style scoped>
  277. .handle-box {
  278. margin-bottom: 20px;
  279. }
  280. .handle-select {
  281. width: 120px;
  282. }
  283. .handle-input {
  284. width: 300px;
  285. display: inline-block;
  286. }
  287. .del-dialog-cnt {
  288. font-size: 16px;
  289. text-align: center;
  290. }
  291. .table {
  292. width: 100%;
  293. font-size: 14px;
  294. }
  295. .red {
  296. color: #ff0000;
  297. }
  298. .mr10 {
  299. margin-right: 10px;
  300. }
  301. .media-body {
  302. margin-bottom: 60px;
  303. width: auto;
  304. display: block;
  305. overflow: hidden;
  306. }
  307. .pad-btm {
  308. padding-bottom: 0;
  309. }
  310. .pad-btm p:first-child {
  311. padding-bottom: 5px;
  312. }
  313. .layadmin-homepage-list-imgtxt .media-body .min-font {
  314. margin-bottom: 10px;
  315. }
  316. .message-text {
  317. padding-top: 10px;
  318. }
  319. a {
  320. color: #333;
  321. text-decoration: none;
  322. }
  323. .media-body .pad-btm .fontColor a {
  324. font-weight: 600;
  325. color: #337ab7;
  326. }
  327. hr{
  328. height: 1px;
  329. margin: 10px 0;
  330. border: 0;
  331. clear: both;
  332. background-color: #e6e6e6;
  333. }
  334. </style>