From 158c32b93ec5813c022e1355afb8e12c58945379 Mon Sep 17 00:00:00 2001 From: yanyan Date: Wed, 28 Feb 2024 11:26:43 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=A7=92=E8=89=B2=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- subpkg/role/role.vue | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/subpkg/role/role.vue b/subpkg/role/role.vue index fcc5c40..1519555 100644 --- a/subpkg/role/role.vue +++ b/subpkg/role/role.vue @@ -3,12 +3,13 @@ - + 请选择您在“{{sceneName}}”演练中的角色: - {{item.name}} + {{item.name}} + 更多角色 @@ -86,12 +87,27 @@ } = await uni.$http.post('/small/project/role/listAll',{sceneId: this.sceneId}) if (!res.success) return uni.$showMsg() + res.data.forEach(item=>{ + this.$set(item, 'choose', 'false') + }) this.roleList = res.data //uni.$showMsg('数据请求成功!') }, + chooseRole(item){ + if (item.choose === "true") { + this.$set(item, 'choose', 'false') + this.roleId = '' + } else if(item.choose === "false"){ + this.$set(item, 'choose', 'true') + this.roleId = item.guid + } + }, startPractice(item) { + if (this.roleId === "") { + return uni.$showMsg('请先选择一个角色') + } uni.navigateTo({ - url: '/subpkg/practice/practice?roleId='+item.guid + url: '/subpkg/practice/practice?roleId='+this.roleId }) }, back(){ @@ -288,5 +304,9 @@ line-height: 3.0; letter-spacing: 2px; } +.change_color{ + background:rgba(0, 153, 255, 1.0); + } + \ No newline at end of file From c1b6b2c0af45291be6dbd22a008f8b96cd1e6647 Mon Sep 17 00:00:00 2001 From: yanyan Date: Wed, 28 Feb 2024 11:32:29 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=A7=92=E8=89=B2=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- subpkg/role/role.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subpkg/role/role.vue b/subpkg/role/role.vue index 1519555..6afc6ce 100644 --- a/subpkg/role/role.vue +++ b/subpkg/role/role.vue @@ -98,6 +98,7 @@ this.$set(item, 'choose', 'false') this.roleId = '' } else if(item.choose === "false"){ + this.roleList.forEach(item=>{this.$set(item, 'choose', 'false')}) this.$set(item, 'choose', 'true') this.roleId = item.guid } @@ -305,7 +306,7 @@ letter-spacing: 2px; } .change_color{ - background:rgba(0, 153, 255, 1.0); + background:rgba(138, 162, 254, 1.0); } From d526e630b59790a30948976b77840503413712d6 Mon Sep 17 00:00:00 2001 From: yanyan Date: Wed, 28 Feb 2024 14:58:43 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- subpkg/list/list.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/subpkg/list/list.vue b/subpkg/list/list.vue index 4a82d53..4d9f6e3 100644 --- a/subpkg/list/list.vue +++ b/subpkg/list/list.vue @@ -41,6 +41,7 @@ pageSize:10 }, total:0, + search: false, isloading:false, //轮播图数据列表 swiperList: [], @@ -77,7 +78,12 @@ res.rows.forEach(item=>{ item.uploadPath = uni.$http.baseUrl +item.uploadPath }) - this.sceneList =[...this.sceneList,...res.rows] + if (this.search) { + this.sceneList = res.rows + this.search = false + } else { + this.sceneList =[...this.sceneList,...res.rows] + } this.total = res.total // uni.$showMsg('数据请求成功!') }, @@ -92,7 +98,8 @@ clearTimeout(this.timer) this.timer = setTimeout(() => { - this.name = e + this.queryObj.name = e + this.search = true this.getSceneList() }, 500) }, From 852c19f27881a070092c4492d5ba19d5f7fd20e8 Mon Sep 17 00:00:00 2001 From: yanyan Date: Thu, 29 Feb 2024 09:20:08 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- subpkg/complete/complete.vue | 64 ++++++++++++++++++++++++++++-------- 1 file changed, 51 insertions(+), 13 deletions(-) diff --git a/subpkg/complete/complete.vue b/subpkg/complete/complete.vue index ad7245e..d769e70 100644 --- a/subpkg/complete/complete.vue +++ b/subpkg/complete/complete.vue @@ -1,8 +1,8 @@