Selaa lähdekoodia

Merge branch 'develop3.0-tmd' of http://106.12.23.251:10080/TEAMMODEL/TEAMModelOS into develop3.0-tmd

liqk 4 vuotta sitten
vanhempi
commit
7686a0808e

+ 0 - 11
TEAMModelOS/ClientApp/src/view/evaluation/components/BaseRepair.vue

@@ -133,17 +133,6 @@
 				this.$refs.chooseContentRef.clickTab('content')
 			}
 		},
-
-		watch: {
-			datas:{
-				handler(n,o){
-					// console.log('监听到资源',n)
-				},
-				deep:true,
-				immediate:true
-			}
-		}
-
 	}
 </script>
 

+ 5 - 1
TEAMModelOS/ClientApp/src/view/evaluation/index/CreateExercises.vue

@@ -228,7 +228,11 @@
 
 			onSelectPoints() {
 				if (this.hasSchool) {
-					this.selectPointsModal = true
+					if(this.exersicesType === 'compose'){
+						this.$Message.warning('综合题的知识点请绑定在小题上!')
+					}else{
+						this.selectPointsModal = true
+					}
 				} else {
 					this.$Message.warning('您当前未加入学校,无法选择知识点!')
 				}

+ 4 - 2
TEAMModelOS/ClientApp/src/view/knowledge-point/index/Index.vue

@@ -603,9 +603,10 @@
 						let that = this
 						this.isLoading = true
 						this.$api.knowledge.DeleteSchoolPoint({
+							code:data.code.replace('Knowledge-',''),
 							id: data.id
 						}).then(res => {
-							if (res.knowledges) {
+							if (!res.error) {
 								console.log(this.blockList)
 								console.log(this.originBlockList)
 								console.log(data)
@@ -640,9 +641,10 @@
 					onOk: () => {
 						this.isLoadPoints = true
 						this.$api.knowledge.DeleteSchoolPoint({
+							code:data.code.replace('Knowledge-',''),
 							id: data.id
 						}).then(res => {
-							if (!res.error && res.knowledges) {
+							if (!res.error) {
 								this.$Message.success('删除成功')
 								this.originPointList.splice(this.originPointList.indexOf(data), 1)
 								if (!this.isShowPoints) this.currentBlock.points.splice(this.currentBlock.points.indexOf(data.id), 1)

+ 1 - 0
TEAMModelOS/Controllers/knowledge/KnowledgeController.cs

@@ -288,6 +288,7 @@ namespace TEAMModelOS.Controllers
                 if (!request.TryGetProperty("code", out JsonElement code)) return BadRequest();
                 if (!request.TryGetProperty("id", out JsonElement id)) return BadRequest();
                 await client.GetContainer("TEAMModelOS", "School").DeleteItemStreamAsync(id.ToString(), new PartitionKey($"Knowledge-{code}"));
+                return Ok(id);
             } catch (Exception ex) {
                 await _dingDing.SendBotMsg($"knowledge,{_option.Location},delete()\n{ex.Message}", GroupNames.醍摩豆服務運維群組);
                 return BadRequest();