From b0363e2c04f6ef825f8dffc46e318af762941dac Mon Sep 17 00:00:00 2001 From: luobisheng <727299681@qq.com> Date: 星期五, 09 十二月 2022 14:13:35 +0800 Subject: [PATCH] 关联商铺修改,社区街道参数修改 --- src/views/operate/viewEvent/index.vue | 60 +++++++++++++++++++++++++++++++++++++----------------------- 1 files changed, 37 insertions(+), 23 deletions(-) diff --git a/src/views/operate/viewEvent/index.vue b/src/views/operate/viewEvent/index.vue index 27d6f79..cb544e7 100644 --- a/src/views/operate/viewEvent/index.vue +++ b/src/views/operate/viewEvent/index.vue @@ -15,19 +15,16 @@ <div class="contentItem"> <div style="width: 80px">鎸夌被鍨�:</div> <div class="search"> - <el-input - placeholder=" 璇疯緭鍏ョ被鍨�" - v-model="searchData.categories" - ></el-input> + <el-select clearable v-model="searchData.categories" placeholder=" 璇烽�夋嫨绫诲瀷"> + <el-option v-for="option in categoryOptions" :key="option.id" :label="option.label" :value="option.value"></el-option> + </el-select> </div> </div> <div class="contentItem"> <div style="width: 80px">鎸夌ぞ鍖�:</div> <div class="search"> - <el-input - placeholder=" 璇疯緭鍏ョぞ鍖�" - v-model="searchData.communityId" - ></el-input> + <el-cascader clearable v-model="searchData.community" :props="communityProps" :options="communityOptions" placeholder="璇烽�夋嫨绀惧尯"> + </el-cascader> </div> </div> <div class="contentItem"> @@ -80,7 +77,7 @@ > <el-table-column prop="code" label="浜嬩欢缂栧彿" min-width="18"> <template slot-scope="scope"> - <el-link>{{ scope.row.code }}</el-link> + <el-link @click="handleView(scope.row)">{{ scope.row.code }}</el-link> </template> </el-table-column> <el-table-column prop="category" label="闂绫诲埆" min-width="8"> @@ -186,6 +183,7 @@ import helper from "@/utils/mydate"; import casequery from "@/api/operate/basecase"; import { CATEGOTY } from "@/utils/helper"; +import department from "@/api/system/department"; export default { components: { @@ -207,24 +205,18 @@ totalNum: null, pageSize: 10, currentPage: 1, - typeList: [ - { - name: "杩濊", - value: 1, - checked: true, - }, - { - name: "杩濆缓", - value: 2, - checked: false, - }, - ], + categoryOptions: CATEGOTY, + communityOptions: [], + communityProps: { + label: 'regionName', + value: 'id' + }, myproblem: 1, number: "", searchData: { categories: null, number: null, - communityId: null, + community: null, endTime: null, site: null, startTime: null, @@ -233,15 +225,21 @@ }, created() { this.getList(); + this.getCommunityOptions(); }, methods: { // 鑾峰彇鍒楄〃 getList() { + const searchData = Object.assign({}, this.searchData); + if (this.searchData.community) { + searchData.communityId = searchData.community[1]; + } + delete searchData.community; casequery .baseCaseQuery({ current: this.currentPage, pageSize: this.pageSize, - ...this.searchData, + ...searchData, }) .then((res) => { this.tableData = res.records; @@ -251,6 +249,16 @@ this.tableData = []; }); }, + + // 鑾峰彇绀惧尯鍜岃閬� + getCommunityOptions() { + department.getDepartmentList() + .then(res => { + this.communityOptions = res; + }) + .catch(err => this.$message.error(err)) + }, + // 璁剧疆琛ㄦ牸鏂戦┈绾� tableRowClassName({ row, rowIndex }) { if ((rowIndex + 1) % 2 === 0) { @@ -289,9 +297,15 @@ closeDialog({ flag }) { this.dialogExamine = flag; this.dialogClosure = flag; + this.dialogView = false; this.getList(); }, + async handleView(rowData) { + this.info = await casequery.getBaseCaseDetail(rowData.code); + this.dialogView = true; + }, + filterTime(time) { return helper(time); }, -- Gitblit v1.8.0