From a82d79851affba166693ba617fdeea43f1848e7f Mon Sep 17 00:00:00 2001 From: luobisheng <727299681@qq.com> Date: 星期五, 09 十二月 2022 13:52:16 +0800 Subject: [PATCH] 接口参数修改 --- src/views/operate/disposal/casepool/pool/index.vue | 41 +++++++++++++++++++++-------------------- 1 files changed, 21 insertions(+), 20 deletions(-) diff --git a/src/views/operate/disposal/casepool/pool/index.vue b/src/views/operate/disposal/casepool/pool/index.vue index eeffed6..e4f43ae 100644 --- a/src/views/operate/disposal/casepool/pool/index.vue +++ b/src/views/operate/disposal/casepool/pool/index.vue @@ -5,8 +5,8 @@ <div class="search"> <span>鏉ユ簮鏌ヨ:</span> <div class="option"> - <el-select v-model="mystatus" placeholder="杩濊" @change="setMyStatus"> - <el-option v-for="item in typeList" :key="item.label" :label="item.name" + <el-select clearable v-model="resource" placeholder="璇烽�夋嫨鏉ユ簮"> + <el-option v-for="item in eventSourceOptions" :key="item.label" :label="item.label" :value="item.value"> </el-option> </el-select> @@ -59,7 +59,7 @@ </el-table-column> <el-table-column prop="eventSource" label="闂鏉ユ簮" min-width="8"> <template slot-scope="scope"> - <span>{{scope.row.eventSource === 2 ? '浜哄伐涓婃姤' : '瑙嗛涓婁紶'}}</span> + <span>{{scope.row.eventSource === 2 ? '瑙嗛涓婁紶' : '浜哄伐涓婁紶'}}</span> </template> </el-table-column> <el-table-column :prop="mystatus === 1 ? 'category' :'category'" @@ -152,6 +152,9 @@ import MyVio from './createUser/vio' import MyDispatch from '@/components/dispatch' import helper from '@/utils/mydate' +import { RESOURCE_OPTIONS } from "@/utils/helper"; +import basecase from "@/api/operate/basecase"; + export default { components: { createUser, MyIll, MyVio, MyDetail, MyDispatch, MyIllDetail @@ -231,10 +234,11 @@ checked: false, }, ], + eventSourceOptions: RESOURCE_OPTIONS, mystatus: 1, statusArr: [], - baseId: 0 - + baseId: 0, + resource: null } }, created() { @@ -255,11 +259,6 @@ handleDispatch(data) { this.baseId = data.id; this.dialogDispatch = true; - }, - // 椤堕儴涓嬫媺妗� - setMyStatus(value) { - this.statusArr[1] = value; - this.changeTypeChecked(value - 1); }, // 閫夋嫨杩濊杩濆缓 setDialog({ flag, type }) { @@ -327,17 +326,19 @@ }, // 鑾峰彇鐢ㄦ埛鍒楄〃 getUserList() { - const { currentPage, pageSize, statusArr } = this; - this.$axios({ - method: 'get', - url: `sccg/base_case/query?state=${statusArr[0]}¤t=${currentPage}&size=${pageSize}&resource=2&type=${statusArr[1]}` - }).then(res => { - this.totalNum = res.data.total; - this.tableData = res.data.records; - }) - .catch(err => { - this.tableData = []; + const params = { + current: this.currentPage, + state: this.statusArr[0] ?? null, + size: this.pageSize, + resource: this.resource, + type: this.statusArr[1] ?? null + } + basecase.baseCasePoolList(params) + .then(({ records, total }) => { + this.tableData = records; + this.totalNum = total; }) + .catch(err => this.$message.error(err)) }, // 璁剧疆琛ㄦ牸鏂戦┈绾� tableRowClassName({ row, rowIndex }) { -- Gitblit v1.8.0