inspection_management.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. <template>
  2. <div class="body-wrapper">
  3. <el-tabs v-model="activeName">
  4. <el-tab-pane label="稽查配置" name="稽查配置">
  5. <el-form class="form-wrapper" :inline="true" style="margin-bottom: 20px;">
  6. <el-row>
  7. <el-col :span="8">
  8. <el-form-item>
  9. <el-button type="success" @click="handleAdd">添加配置</el-button>
  10. </el-form-item>
  11. </el-col>
  12. </el-row>
  13. </el-form>
  14. <el-table :data="tableData1">
  15. <el-table-column v-for="(item, index) in columns1" :key="index" :label="item.label" :prop="item.key">
  16. </el-table-column>
  17. <el-table-column
  18. label="操作"
  19. width="200">
  20. <template slot-scope="scope" style="display: inline-block">
  21. <el-button type="primary" @click="handleEdit(scope.row)" slot="reference">修改</el-button>
  22. <el-popconfirm title="确定删除吗?" @confirm="deleteRow(scope.row)">
  23. <el-button type="danger" slot="reference">删除</el-button>
  24. </el-popconfirm>
  25. </template>
  26. </el-table-column>
  27. </el-table>
  28. <div class="table-pagination">
  29. <el-pagination layout="prev, pager, next" :total="total1" @current-change="handlePageChange1"
  30. :current-page.sync="pageNum1" :page-size.sync="pageSize1">
  31. </el-pagination>
  32. </div>
  33. <el-dialog
  34. :title="title"
  35. :visible.sync="dialogVisible"
  36. width="45%"
  37. custom-class="audit-dialog">
  38. <div class="form-div">
  39. <el-form label-position="left" label-width="85px" :model="formLabelAlign">
  40. <el-form-item label="稽查对象">
  41. <el-input v-model="formLabelAlign.parkingCardName"></el-input>
  42. </el-form-item>
  43. <el-form-item label="取证类型">
  44. <el-input v-model="formLabelAlign.type"></el-input>
  45. </el-form-item>
  46. <el-form-item label="问题描述">
  47. <el-input v-model="formLabelAlign.questionDescription"></el-input>
  48. </el-form-item>
  49. </el-form>
  50. </div>
  51. <span slot="footer" class="dialog-footer">
  52. <el-button @click="dialogVisible = false">取 消</el-button>
  53. <el-button type="primary" @click="handleConfirm">确 定</el-button>
  54. </span>
  55. </el-dialog>
  56. </el-tab-pane>
  57. <el-tab-pane label="稽查审核" name="稽查审核">
  58. <div style="font-size: large;margin-bottom: 30px">稽查审核</div>
  59. <el-form class="form-wrapper" :inline="true" :model="formInline2" style="margin-bottom: 20px;">
  60. <el-row>
  61. <el-col :span="8">
  62. <el-form-item label="订单号: ">
  63. <el-input v-model="formInline2.orderCode" placeholder="请输入"></el-input>
  64. </el-form-item>
  65. </el-col>
  66. <el-col :span="8">
  67. <el-form-item>
  68. <el-button type="primary" class="query-btn" @click="onSubmit2">查询</el-button>
  69. </el-form-item>
  70. </el-col>
  71. </el-row>
  72. </el-form>
  73. <el-table :data="tableData2">
  74. <el-table-column v-for="(item, index) in columns2" :key="index" :label="item.label" :prop="item.key">
  75. </el-table-column>
  76. <el-table-column
  77. label="操作"
  78. width="100">
  79. <template slot-scope="scope" style="display: inline-block">
  80. <el-button @click="handleAudit(scope.row)" type="text">审核</el-button>
  81. </template>
  82. </el-table-column>
  83. </el-table>
  84. <div class="table-pagination">
  85. <el-pagination layout="prev, pager, next" :total="total1" @current-change="handlePageChange2"
  86. :current-page.sync="pageNum2" :page-size.sync="pageSize2">
  87. </el-pagination>
  88. </div>
  89. <el-dialog
  90. :title="title2"
  91. :visible.sync="dialogVisible2"
  92. width="45%"
  93. custom-class="audit-dialog">
  94. <el-row class="mg-bt">
  95. <el-col class="label" :span="4">审核:</el-col>
  96. <el-col :span="18">
  97. <el-radio v-model="radio" label="2">通过</el-radio>
  98. <el-radio v-model="radio" label="3">驳回</el-radio>
  99. </el-col>
  100. </el-row>
  101. <span slot="footer" class="dialog-footer">
  102. <el-button @click="dialogVisible2 = false">取 消</el-button>
  103. <el-button type="primary" @click="handleConfirm2">确 定</el-button>
  104. </span>
  105. </el-dialog>
  106. <div style="font-size: large;margin-bottom: 30px">处理记录</div>
  107. <el-form class="form-wrapper" :inline="true" :model="formInline3" style="margin-bottom: 20px;">
  108. <el-row>
  109. <el-col :span="8">
  110. <el-form-item label="停车卡名称:">
  111. <el-input v-model="formInline3.parkingCardName" placeholder="请输入"></el-input>
  112. </el-form-item>
  113. </el-col>
  114. <el-col :span="8">
  115. <el-form-item>
  116. <el-button type="primary" class="query-btn" @click="onSubmit3">查询</el-button>
  117. </el-form-item>
  118. </el-col>
  119. </el-row>
  120. </el-form>
  121. <el-table :data="tableData3">
  122. <el-table-column v-for="(item, index) in columns3" :key="index" :label="item.label" :prop="item.key">
  123. </el-table-column>
  124. </el-table>
  125. <div class="table-pagination">
  126. <el-pagination layout="prev, pager, next" :total="total3" @current-change="handlePageChange3"
  127. :current-page.sync="pageNum3" :page-size.sync="pageSize3">
  128. </el-pagination>
  129. </div>
  130. </el-tab-pane>
  131. </el-tabs>
  132. </div>
  133. </template>
  134. <script>
  135. import api from "@/api/audit.js";
  136. import dictionary from "@/util/dictionary";
  137. export default {
  138. components: {},
  139. data() {
  140. return {
  141. activeName: '稽查配置',
  142. columns1: [
  143. {
  144. label: '稽查对象',
  145. key: 'parkingCardName'
  146. },
  147. {
  148. label: '取证类型',
  149. key: 'type'
  150. },
  151. {
  152. label: '问题描述',
  153. key: 'questionDescription'
  154. },
  155. {
  156. label: '创建日期',
  157. key: 'creatTime'
  158. },
  159. ],
  160. tableData1: [{parkingCardName:'昌建东外滩西南停车场',type:'实地考察',questionDescription:'部分车位存在一车多位的占用现象',creatTime:'2023-12-30'}],
  161. total1: 0,
  162. pageSize1: 10,
  163. pageNum1: 1,
  164. title:'',
  165. dialogVisible:false,
  166. formLabelAlign: {
  167. id: '',
  168. parkingCardName: '',
  169. type: '',
  170. questionDescription: '',
  171. },
  172. columns2: [
  173. {
  174. label: '稽查对象',
  175. key: 'parkingCardName'
  176. },
  177. {
  178. label: '取证类型',
  179. key: 'type'
  180. },
  181. {
  182. label: '问题描述',
  183. key: 'questionDescription'
  184. },
  185. {
  186. label: '创建日期',
  187. key: 'creatTime'
  188. },
  189. ],
  190. tableData2: [{parkingCardName:'昌建东外滩西南停车场',type:'实地考察',questionDescription:'部分车位存在一车多位的占用现象',creatTime:'2023-12-30'}],
  191. total2: 0,
  192. radio: '2',
  193. pageSize2: 10,
  194. pageNum2: 1,
  195. formInline2: {
  196. orderCode: '',
  197. orderStatus:'',
  198. orderWay:''
  199. },
  200. title2:'',
  201. dialogVisible2:false,
  202. formLabelAlign2: {
  203. id: '',
  204. parkingCardName: '',
  205. type: '',
  206. questionDescription: '',
  207. },
  208. columns3: [
  209. {
  210. label: '稽查对象',
  211. key: 'parkingCardName'
  212. },
  213. {
  214. label: '取证类型',
  215. key: 'type'
  216. },
  217. {
  218. label: '问题描述',
  219. key: 'questionDescription'
  220. },
  221. {
  222. label: '审核日期',
  223. key: ''
  224. },
  225. {
  226. label: '审核日期',
  227. key: ''
  228. },
  229. {
  230. label: '处理人',
  231. key: ''
  232. },
  233. ],
  234. tableData3: [],
  235. total3: 0,
  236. pageSize3: 10,
  237. pageNum3: 1,
  238. formInline3: {
  239. parkingCardName: ''
  240. },
  241. }
  242. },
  243. mounted() {
  244. // this.getTableData1()
  245. // this.getTableData2()
  246. // this.getTableData3()
  247. },
  248. watch: {
  249. },
  250. methods: {
  251. handleAdd () {
  252. this.title = '添加配置'
  253. this.formLabelAlign.parkingCardName= ''
  254. this.formLabelAlign.type= ''
  255. this.formLabelAlign.questionDescription= ''
  256. this.dialogVisible = true
  257. },
  258. handleEdit(row) {
  259. this.title = '修改配置'
  260. this.formLabelAlign = row
  261. this.dialogVisible = true
  262. },
  263. deleteRow (record) {
  264. api.deleteWhiteIp({id: record.id}).then(res => {
  265. if (res.code === 200) {
  266. this.$message({type: 'success', message: '删除成功!'})
  267. this.getTableData1()
  268. }
  269. })
  270. },
  271. handleConfirm() {
  272. if (this.title === '修改配置') {
  273. api.addWhiteIp({ipAddr: this.formLabelAlign.ipAddr, id: this.formLabelAlign.id}).then(res => {
  274. if (res.code === 200) {
  275. this.dialogVisible = false
  276. this.$message({
  277. message: '修改成功!',
  278. type: 'success'
  279. })
  280. this.getTableData1()
  281. }
  282. })
  283. } else {
  284. api.addWhiteIp({ipAddr: this.formLabelAlign.ipAddr}).then(res => {
  285. if (res.code === 200) {
  286. this.dialogVisible = false
  287. this.$message({
  288. message: '添加成功!',
  289. type: 'success'
  290. })
  291. this.getTableData1()
  292. }
  293. })
  294. }
  295. },
  296. onSubmit2() {
  297. this.pageNum2 = 1
  298. this.getTableData2()
  299. },
  300. handleAudit(row) {
  301. this.formLabelAlign2 = row
  302. this.dialogVisible2 = true
  303. },
  304. handleConfirm2() {
  305. const {id} = this.formLabelAlign2.id
  306. console.log('radio', this.radio)
  307. api.applyResource({id, applyType: this.radio}).then(res => {
  308. if(res.code === 200) {
  309. this.dialogVisible2 = false
  310. this.$message({
  311. message: '审核成功!',
  312. type: 'success'
  313. })
  314. this.getTableData2()
  315. }
  316. })
  317. },
  318. onSubmit3() {
  319. this.pageNum3 = 1
  320. this.getTableData3()
  321. },
  322. handlePageChange1() {
  323. this.getTableData1()
  324. },
  325. getTableData1() {
  326. const {pageNum1, pageSize1} = this
  327. api.carListByPage({current: pageNum1, size: pageSize1, ...this.formInline1}).then(res => {
  328. this.tableData1 = (res.data.records || []).map(item => ({...item, carType: dictionary.typeMap[item.carType]}))
  329. this.total1 = res.data.total
  330. })
  331. },
  332. handlePageChange2() {
  333. this.getTableData2()
  334. },
  335. getTableData2() {
  336. const {pageNum2, pageSize2} = this
  337. api.gjListByPage({current: pageNum2, size: pageSize2, ...this.formInline2}).then(res => {
  338. this.tableData2 = res.data.records || []
  339. this.total2 = res.data.total
  340. })
  341. },
  342. handlePageChange3() {
  343. this.getTableData3()
  344. },
  345. getTableData3() {
  346. const {pageNum3, pageSize3} = this
  347. api.tcjlListByPage({current: pageNum3, size: pageSize3, ...this.formInline3}).then(res => {
  348. this.tableData3 = res.data.records || []
  349. this.total3 = res.data.total
  350. })
  351. },
  352. }
  353. }
  354. </script>
  355. <style lang="scss" scoped>
  356. .body-wrapper {
  357. padding: 20px;
  358. .button-block{
  359. text-align: right;
  360. margin-bottom: 20px;
  361. }
  362. .table-pagination{
  363. text-align: right;
  364. }
  365. .search-card{
  366. margin-bottom: 20px;
  367. text-align: center;
  368. .input-wrapper{
  369. width: 36%;
  370. }
  371. }
  372. .audit-dialog{
  373. .mg-bt{
  374. margin-bottom: 24px;
  375. }
  376. .label{
  377. text-align: right;
  378. }
  379. .form-div{
  380. /deep/ .el-input__inner{
  381. height: 35px;
  382. width: 90%;
  383. border: 1px solid #a6a5a5;
  384. }
  385. }
  386. }
  387. }
  388. </style>