customer_complaint.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. <template>
  2. <div class="body-wrapper">
  3. <div class="search-card">
  4. <h5>客户投诉监管</h5>
  5. </div>
  6. <br>
  7. <el-form class="form-wrapper" :inline="true" :model="formInline">
  8. <el-form-item label="投诉类型">
  9. <el-select clearable v-model="formInline.comType" placeholder="投诉类型" popper-class="cur-select">
  10. <el-option label="全部" value=""></el-option>
  11. <el-option label="经营服务类停车问题" value="经营服务类停车问题"></el-option>
  12. <el-option label="非法经营停车问题" value="非法经营停车问题"></el-option>
  13. <el-option label="不提供税票" value="不提供税票"></el-option>
  14. <el-option label="设备问题" value="设备问题"></el-option>
  15. </el-select>
  16. </el-form-item>
  17. <el-form-item>
  18. <el-button type="primary" @click="onSubmit">查询</el-button>
  19. </el-form-item>
  20. </el-form>
  21. <br>
  22. <br>
  23. <br>
  24. <br>
  25. <el-table :data="tableData" style="background: #2a2a2a;border-color: #333;">
  26. <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
  27. </el-table-column>
  28. </el-table>
  29. <div class="table-pagination">
  30. <el-pagination :background="false" layout="total, prev, pager, next" :total="total" @current-change="handlePageChange"
  31. :current-page.sync="pageNum" :page-size.sync="pageSize">
  32. </el-pagination>
  33. </div>
  34. <div class="charts_all">
  35. <div class="charts">
  36. <piechart
  37. class="model-pie-body"
  38. :roseType="false"
  39. id="chart1"
  40. :radiusArr="['30%', '70%']"
  41. :colorArr="modelPieColor"
  42. :labelFormat="['{name|{b}}', '{sub|{@value}起 {d}%}', '{hr|}']"
  43. :dataset="modelData"
  44. :encode="{ itemName: 'name', value: 'value' }"
  45. />
  46. </div>
  47. </div>
  48. <el-dialog
  49. :title="title"
  50. :visible.sync="dialogVisible"
  51. width="60%"
  52. height="600px"
  53. custom-class="audit-dialog">
  54. <el-form class="form-div" style="height: 120px" ref="formLabelAlign" label-position="left" label-width="120px" :model="formLabelAlign" >
  55. <el-form-item label="投诉类型" required>
  56. <el-select clearable v-model="formLabelAlign.comType" placeholder="请选择">
  57. <el-option label="源汇区" value="源汇区"></el-option>
  58. <el-option label="郾城区" value="郾城区"></el-option>
  59. <el-option label="召陵区" value="召陵区"></el-option>
  60. <el-option label="舞阳县" value="舞阳县"></el-option>
  61. <el-option label="临颍县" value="临颍县"></el-option>
  62. </el-select>
  63. </el-form-item>
  64. <el-form-item label="投诉停车场" required>
  65. <el-select clearable v-model="formLabelAlign.parkId" placeholder="请选择" popper-class="cur-select">
  66. <el-option v-for="item in carOptions" :key="item.id" :label="item.carParkName" :value="item.id"></el-option>
  67. </el-select>
  68. </el-form-item>
  69. <el-form-item label="投诉内容" required>
  70. <el-input v-model="formLabelAlign.comContent" placeholder="投诉内容"/>
  71. </el-form-item>
  72. </el-form>
  73. <span slot="footer" class="dialog-footer">
  74. <el-button @click="dialogVisible = false">取 消</el-button>
  75. <el-button type="primary" @click="handleConfirm('formLabelAlign')">确 定</el-button>
  76. </span>
  77. </el-dialog>
  78. </div>
  79. </template>
  80. <script>
  81. import piechart from "@/components/pieChart";
  82. import api from "@/api/article_z";
  83. export default {
  84. components: {
  85. piechart
  86. },
  87. data() {
  88. return {
  89. formInline: {
  90. comType: ''
  91. },
  92. options: [{
  93. value: '经营服务类停车问题',
  94. label: '经营服务类停车问题'
  95. }, {
  96. value: '非法经营停车问题',
  97. label: '非法经营停车问题'
  98. },
  99. {
  100. value: '设备问题',
  101. label: '设备问题'
  102. }, {
  103. value: '不提供税票',
  104. label: '不提供税票'
  105. }],
  106. columns: [
  107. {
  108. label: '投诉类型',
  109. key: 'comType'
  110. },
  111. {
  112. label: '投诉内容',
  113. key: 'comContent'
  114. },
  115. {
  116. label: '所属停车场',
  117. key: 'carParkName'
  118. },
  119. {
  120. label: '处理状态',
  121. key: 'disposeState'
  122. },
  123. {
  124. label: '处理时间',
  125. key: 'disposeTime'
  126. }
  127. ],
  128. carOptions: [],
  129. modelPieColor: ["#4382f6","#9078f8","#C1FFC1","#1E90FF"],
  130. modelData: [],
  131. tableData: [],
  132. total: 0,
  133. pageSize: 10,
  134. pageNum: 1,
  135. radio: '2',
  136. dialogVisible: false,
  137. formLabelAlign: {
  138. mid: '',
  139. searchWords:''
  140. },
  141. selRow: undefined,
  142. searchWords: undefined,
  143. title: ''
  144. }
  145. },
  146. mounted() {
  147. this.getParkDic()
  148. this.getTableData()
  149. this.getModelDataData()
  150. },
  151. watch: {
  152. },
  153. methods: {
  154. onSubmit() {
  155. this.pageNum = 1
  156. this.getTableData()
  157. },
  158. getParkDic() {
  159. api.parkDic().then(res=>{
  160. this.carOptions = res.data || [];
  161. })
  162. },
  163. getModelDataData(){
  164. api.queryCustomerComplaint_Ksfx().then(res=>{
  165. this.modelData = res.data;
  166. })
  167. },
  168. handlePageChange() {
  169. this.getTableData()
  170. },
  171. handleAdd () {
  172. this.title = '客诉登记'
  173. this.formLabelAlign = {}
  174. this.dialogVisible = true
  175. },
  176. handleConfirm(formName) {
  177. this.$refs[formName].validate((valid) => {
  178. if (valid) {
  179. api.khtsSave(this.formLabelAlign).then(res => {
  180. if(res.code === 200) {
  181. this.dialogVisible = false
  182. this.$message({
  183. message: '添加成功!',
  184. type: 'success'
  185. })
  186. this.getTableData()
  187. }
  188. })
  189. }
  190. })
  191. },
  192. getTableData() {
  193. const {pageNum, pageSize} = this
  194. api.khtsListByPage({current: pageNum, size: pageSize, ...this.formInline}).then(res => {
  195. this.tableData = res.data.records || []
  196. this.total = res.data.total
  197. })
  198. },
  199. }
  200. }
  201. </script>
  202. <style lang="scss" scoped>
  203. .form-wrapper {
  204. margin-bottom: 20px;
  205. }
  206. /deep/ .el-input__inner {
  207. background: #2d3744;
  208. border: none;
  209. border-radius: 0;
  210. }
  211. /deep/ .el-select {
  212. height: 40px;
  213. .el-input__inner {
  214. height: 40px;
  215. }
  216. .el-input__prefix, .el-input__suffix {
  217. height: 40px;
  218. }
  219. /* 下面设置右侧按钮居中 */
  220. .el-input__suffix {
  221. top: 0px;
  222. display: flex;
  223. justify-content: center;
  224. align-items: center;
  225. flex-wrap: nowrap;
  226. flex-direction: row;
  227. align-content: flex-start;
  228. }
  229. /* 输入框加上上下边是 32px + 2px =34px */
  230. .el-input__icon {
  231. line-height: 0px;
  232. }
  233. }
  234. /deep/ .form-wrapper .el-button {
  235. background: linear-gradient(90deg,#0158d9,#3c97e4);
  236. width: 100px;
  237. height: 40px;
  238. }
  239. .body-wrapper {
  240. padding: 20px;
  241. background: #0c0c0c;
  242. width: 100%;
  243. .button-block{
  244. text-align: right;
  245. margin-bottom: 20px;
  246. }
  247. .table-pagination{
  248. text-align: right;
  249. }
  250. .search-card{
  251. font-size: 24px;
  252. font-weight: bold;
  253. color: #3498db;
  254. margin-bottom: 20px;
  255. .input-wrapper{
  256. width: 36%;
  257. }
  258. }
  259. }
  260. .charts_all{
  261. display: flex;
  262. justify-content: space-around;
  263. width: 100%;
  264. height: 400px;
  265. }
  266. .charts{
  267. width: 30%;
  268. height: 300px;
  269. }
  270. .btn_save{
  271. background-color: #3498db;
  272. color: #ffffff;
  273. padding: 10px 20px;
  274. cursor: pointer;
  275. border: none;
  276. border-radius: 4px;
  277. font-size: 16px;
  278. height: 40px;
  279. }
  280. .sel{
  281. height: 200px;
  282. margin-right: 10px;
  283. }
  284. .input-search{
  285. width: 100%;
  286. padding: 10px;
  287. margin-bottom: 20px;
  288. box-sizing: border-box;
  289. background-color: #2a2a2a;
  290. border: 1px solid #333;
  291. color: #ffffff;
  292. }
  293. .audit-dialog{
  294. .mg-bt{
  295. margin-bottom: 24px;
  296. }
  297. .label{
  298. text-align: right;
  299. }
  300. .form-div{
  301. /deep/ .el-input__inner{
  302. height: 35px;
  303. width: 100%;
  304. border: 1px solid #a6a5a5;
  305. color: #fff;
  306. background: #2d3744;
  307. }
  308. /deep/ .el-input__icon {
  309. line-height: 35px;
  310. }
  311. }
  312. }
  313. </style>