From f87d3c33c8a0444e540a89f342e8dfbca5c61c61 Mon Sep 17 00:00:00 2001 From: hcong <1050828145@qq.com> Date: 星期二, 26 十一月 2024 17:02:23 +0800 Subject: [PATCH] FYBgTaskCard.vue 中生成测试任务的测试代码撤回 --- src/components/SearchBar.vue | 56 +++++++++++++++++++++++++++++++++++++------------------- 1 files changed, 37 insertions(+), 19 deletions(-) diff --git a/src/components/SearchBar.vue b/src/components/SearchBar.vue index ca5c7e2..b137a36 100644 --- a/src/components/SearchBar.vue +++ b/src/components/SearchBar.vue @@ -4,18 +4,31 @@ <el-form :inline="true" :model="formSearch"> <el-form-item label="鎬讳换鍔�"> <!-- <el-input v-model="formSearch.topTaskId" placeholder="鎬讳换鍔�" /> --> - <el-select v-model="formSearch.topTaskId" placeholder="鎬讳换鍔�" style="width: 260px"> - <el-option v-for="s in topTasks" :key="s.value" :label="s.label" :value="s.value" /> + <el-select + v-model="formSearch.topTaskId" + placeholder="鎬讳换鍔�" + style="width: 260px" + > + <el-option + v-for="s in topTasks" + :key="s.value" + :label="s.label" + :value="s.value" + /> </el-select> </el-form-item> - <!-- <FYOptionScene - :allOption="false" - :type="2" - v-model:value="formSearch.scenetype" - ></FYOptionScene> --> <el-form-item label="鍦烘櫙绫诲瀷"> - <el-select v-model="formSearch.sceneTypeId" placeholder="鍦烘櫙绫诲瀷" style="width: 150px"> - <el-option v-for="s in sceneTypes" :key="s.value" :label="s.label" :value="s.value" /> + <el-select + v-model="formSearch.sceneTypeId" + placeholder="鍦烘櫙绫诲瀷" + style="width: 150px" + > + <el-option + v-for="s in sceneTypes" + :key="s.value" + :label="s.label" + :value="s.value" + /> </el-select> </el-form-item> <el-form-item> @@ -51,25 +64,30 @@ //鑾峰彇鏌ヨ鏉′欢 getOptions() { taskApi.getTopTask().then((res) => { - const list = []; - res.forEach((r) => { - list.push({ + const list = res.map((r) => { + return { value: r.tguid, label: r.name, - towncode: r.towncode, - districtCode: r.districtcode, - month: r.starttime.slice(0, 7) - }); + data: r + }; }); this.topTasks = list; this.formSearch.topTaskId = list[0].value; - this.$emit('onSubmit', this.formSearch); + this.onSubmit(); }); }, //鏌ヨ瀛愪换鍔$粺璁′俊鎭� onSubmit() { - // console.log(this.formSearch.sceneTypeId) - this.$emit('onSubmit', this.formSearch); + const task = this.topTasks.find( + (t) => t.data.tguid == this.formSearch.topTaskId + ); + const param = { + topTask: task ? task.data : {}, + sceneTypeId: this.formSearch.sceneTypeId + }; + console.log(param); + + this.$emit('onSubmit', param); } }, mounted() { -- Gitblit v1.9.3