Compare commits

..

No commits in common. "62c02bdaa35082447303509cc0b59b13f9317612" and "b0776906aa9a83b5f2926b30e5352a430e798dec" have entirely different histories.

27 changed files with 111 additions and 4612 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 3e4645aaac3d48d4896ad6e7b2a1f1cc
PrefabImporter:
externalObjects: {}
userData:
assetBundleName: uiknowledge_prefab
assetBundleVariant:

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: d0622dae4bc2b2a4d937ad88a765e87a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: fa05fa85bd33f6c4ca626c1e0317d53d
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -27,8 +27,7 @@ public class ActionHelper
{ "UI3DObjSelect", typeof(QFramework.Example.UI3DObjSelect) },
{ "UITextTip", typeof(QFramework.Example.UITextTip) },
{ "UITextWindow", typeof(QFramework.Example.UITextWindow) },
{ "UIKnowledge", typeof(QFramework.Example.UIKnowledge) },
};

View File

@ -1,9 +1,7 @@
using Newtonsoft.Json;
using QFramework;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using TMPro;
using UnityEngine;
using UnityEngine.SocialPlatforms.Impl;
@ -50,29 +48,6 @@ public class ScoreController : MonoSingleton<ScoreController>
}
public string GetModuleDictJson(string name = "")
{
var resultDict = new Dictionary<string, object>();
resultDict.Add("name", name);
foreach (var dataPair in moduleDict)
{
var data = dataPair.Value;
if (data.scoreDict != null)
{
foreach (var scoreStepPair in data.scoreDict)
{
var scoreStep = scoreStepPair.Value;
string key = $"{scoreStep.step}{scoreStep.name}";
resultDict[key] = scoreStep.value;
resultDict.Add(key + "Time", string.IsNullOrEmpty(scoreStep.time) == true ? "" : scoreStep.time);
}
}
}
return JsonConvert.SerializeObject(resultDict);
}
private void OnStart(OnModuleStart start)
{
@ -109,8 +84,6 @@ public class ScoreController : MonoSingleton<ScoreController>
{
scoreDict[key].value = 0;
}
DateTime currentTime = DateTime.Now;
scoreDict[key].time = currentTime.ToString(scoreDict[key].timeFormat);
}
else
{

View File

@ -9,77 +9,34 @@ public class AsposeHelper : MonoBehaviour
{
//public static void Writer(string json, Action callback = null)
//{
// // 加载Word文档
// Document doc = new Document(Global.reportDemoPath);
// JObject jObject = JObject.Parse(json);
// foreach (JProperty property in jObject.Properties())
// {
// string key = property.Name;
// string value = property.Value.ToString();
// doc.Range.Replace($"{{{key}}}", $"{value}", new FindReplaceOptions());
// }
// string filePath = ChinarFileController.SaveProject(Path.GetFileName(Global.reportDemoPath).Split('.')[1]);
// if (string.IsNullOrEmpty(filePath) == false)
// {
// doc.Save(filePath);
// }
// callback?.Invoke();
// // 替换文本
// //SaveWithDialog(doc, callback);
// //Debug.Log("文档处理完成,新文档已保存到: " + outputFilePath);
//}
public static void Writer(string json, Action callback = null)
{
// ¼ÓÔØWordÎĵµ
Document doc = new Document(Global.reportDemoPath);
JToken jToken = JToken.Parse(json);
TraverseAndReplace(jToken, doc);
JObject jObject = JObject.Parse(json);
foreach (JProperty property in jObject.Properties())
{
string key = property.Name;
string value = property.Value.ToString();
doc.Range.Replace($"{{{key}}}", $"{value}", new FindReplaceOptions());
}
string filePath = ChinarFileController.SaveProject(Path.GetFileName(Global.reportDemoPath).Split('.')[1]);
if (!string.IsNullOrEmpty(filePath))
if (string.IsNullOrEmpty(filePath) == false)
{
doc.Save(filePath);
}
callback?.Invoke();
// 替换文本
//SaveWithDialog(doc, callback);
//Debug.Log("文档处理完成,新文档已保存到: " + outputFilePath);
}
private static void TraverseAndReplace(JToken jToken, Document doc)
{
if (jToken.Type == JTokenType.Object)
{
foreach (JProperty property in ((JObject)jToken).Properties())
{
if (property.Value.Type == JTokenType.Object || property.Value.Type == JTokenType.Array)
{
TraverseAndReplace(property.Value, doc);
}
else
{
string key = property.Name;
string value = property.Value.ToString();
doc.Range.Replace($"{{{key}}}", $"{value}", new FindReplaceOptions());
}
}
}
else if (jToken.Type == JTokenType.Array)
{
foreach (JToken item in jToken)
{
TraverseAndReplace(item, doc);
}
}
}
//private static void SaveWithDialog(Document doc, Action<DialogResult> callback)
//{
// SaveFileDialog dialog = new SaveFileDialog();

View File

@ -35,6 +35,7 @@ namespace QFramework.Example
{
Point.anchoredPosition = Utility.GetScreenPosByObj(transform as RectTransform);
}
}
#endif

View File

@ -1,5 +1,4 @@
using Newtonsoft.Json;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
@ -58,7 +57,11 @@ namespace QFramework.Example
public string GetScoreDataJson()
{
return ScoreController.Instance.GetModuleDictJson(InputName.text);
var data = new LabReprotData();
data.realname = InputName.text;
data.biaobencaiji_1_buzhou_1 = "[1111]";
string json = JsonConvert.SerializeObject(data);
return json;
}
@ -84,9 +87,7 @@ namespace QFramework.Example
onlyCur = mData.onlyCurModule;
}
List<string> stepNames = new List<string>();
List<int> maxScore = new List<int>();
List<int> scores = new List<int>();
if (onlyCur)
{
foreach (var item in ScoreController.Instance.GetCurScoreData())
@ -98,9 +99,6 @@ namespace QFramework.Example
obj.transform.Find("Score").GetComponent<TextMeshProUGUI>().text = item.Value.value.ToString();
sum += float.Parse(item.Value.sum);
score += item.Value.value;
stepNames.Add(item.Value.step + item.Value.name);
maxScore.Add(int.Parse(item.Value.sum));
scores.Add((int)item.Value.value);
}
}
else
@ -116,9 +114,6 @@ namespace QFramework.Example
obj.transform.Find("Score").GetComponent<TextMeshProUGUI>().text = item.Value.value.ToString();
sum += float.Parse(item.Value.sum);
score += item.Value.value;
stepNames.Add(item.Value.step + item.Value.name);
maxScore.Add((int)float.Parse(item.Value.sum));
scores.Add((int)item.Value.value);
}
}
}
@ -127,9 +122,6 @@ namespace QFramework.Example
this.Score.text = score.ToString();
this.Sum.text = sum.ToString();
//#if UNITY_WEBGL
// LYTWebGLHelper.Instance.UpLoadData((int)score, stepNames, maxScore, scores);
//#endif
}
protected override void OnShow()

View File

@ -135,17 +135,10 @@ namespace QFramework.Example
VideoContent.rectTransform.sizeDelta = mData.size;
}
VideoContent.transform.localPosition = mData.offset;
string path = Global.videoPath + mData.url;
if (string.IsNullOrEmpty(path) == false)
{
player.url = path;
player.Play();
SetImg();
}
else
{
Debug.LogError("没有找到视频:" + path);
}
player.url = Global.videoPath + mData.url;
player.Play();
SetImg();
}
private void VideoPlayer_loopPointReached(UnityEngine.Video.VideoPlayer source)

View File

@ -1,67 +0,0 @@
using System;
using UnityEngine;
using UnityEngine.UI;
using QFramework;
namespace QFramework.Example
{
// Generate Id:d21887cc-bea5-4c87-8eae-a1d693d6555a
public partial class UIKnowledge
{
public const string Name = "UIKnowledge";
[SerializeField]
public UnityEngine.UI.Button CloseBtn;
[SerializeField]
public RectTransform LeftContent;
[SerializeField]
public UnityEngine.UI.ScrollRect Right;
[SerializeField]
public UnityEngine.UI.Image RightContent;
[SerializeField]
public RectTransform GlobalComs;
[SerializeField]
public RectTransform ItemComs;
[SerializeField]
public RectTransform LeftItem;
[SerializeField]
public UnityEngine.UI.Button BtnPrefab;
private UIKnowledgeData mPrivateData = null;
protected override void ClearUIComponents()
{
CloseBtn = null;
LeftContent = null;
Right = null;
RightContent = null;
GlobalComs = null;
ItemComs = null;
LeftItem = null;
BtnPrefab = null;
mData = null;
}
public UIKnowledgeData Data
{
get
{
return mData;
}
}
UIKnowledgeData mData
{
get
{
return mPrivateData ?? (mPrivateData = new UIKnowledgeData());
}
set
{
mUIData = value;
mPrivateData = value;
}
}
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 9a5d5c0eba3097b48b9c67e7e229ccee
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,198 +0,0 @@
using UnityEngine;
using UnityEngine.UI;
using QFramework;
using TMPro;
using System.Collections.Generic;
using System;
namespace QFramework.Example
{
public class UIKnowledgeData : UIPanelData
{
public XMLTool.Knowledge knowledge;
}
public partial class UIKnowledge : UIPanel
{
ResLoader loader;
Dictionary<string, Sprite> sprites = new Dictionary<string, Sprite>();
IAction curAction;
protected override void OnInit(IUIData uiData = null)
{
mData = uiData as UIKnowledgeData ?? new UIKnowledgeData();
// please add init code here
loader = ResLoader.Allocate();
CloseBtn.onClick.AddListener(() =>
{
Hide();
});
}
protected override void OnOpen(IUIData uiData = null)
{
if (Global.Instance.curModule.knowledge != null && Global.Instance.curModule.knowledge.items != null)
{
LeftContent.RemoveAllChildren();
string bg = Global.Instance.curModule.knowledge.bgImage;
LoadBgImage(bg, () =>
{
SetRightContentPos("");
RefreshComponents(Global.Instance.curModule.knowledge.components, GlobalComs);
});
foreach (var item in Global.Instance.curModule.knowledge.items)
{
ItemFactory(item);
}
}
}
public void ItemFactory(XMLTool.Knowledge.Item itemData, Transform parent = null)
{
Transform content = parent == null ? LeftContent : parent;
GameObject leftObj = GameObject.Instantiate(LeftItem.gameObject, content);
Transform subContent = leftObj.transform.Find("SubContent");
Toggle toggle = leftObj.transform.Find("Toggle").GetComponent<Toggle>();
TextMeshProUGUI label = toggle.transform.Find("Name").GetComponent<TextMeshProUGUI>();
label.text = itemData.title;
toggle.onValueChanged.AddListener(isOn =>
{
if (isOn)
{
LoadBgImage(itemData.bgImage, () =>
{
SetRightContentPos(itemData.setPos);
});
ItemComs.RemoveAllChildren();
RefreshComponents(itemData.components, ItemComs);
}
if (subContent.childCount > 0)
{
subContent.gameObject.SetActive(isOn);
if (isOn)
{
subContent.GetChild(0).GetComponentInChildren<Toggle>().isOn = true;
}
}
else
{
label.color = isOn == true ? Color.blue : Color.black;
}
});
if (itemData.subs != null && itemData.subs.Count > 0)
{
foreach (var sub in itemData.subs)
{
ItemFactory(sub, subContent);
}
}
else
{
toggle.group = LeftContent.GetComponent<ToggleGroup>();
}
}
/// <summary>
/// ˢе±Ç°Ò³ÃæµÄ¹Ò¼þ
/// </summary>
public void RefreshComponents(List<XMLTool.Knowledge.Item.Component> coms, Transform content)
{
if (coms != null && coms.Count > 0)
{
foreach (var ComData in coms)
{
switch (ComData.type)
{
case "Button":
GameObject btn = GameObject.Instantiate(BtnPrefab.gameObject, content);
btn.GetComponent<RectTransform>().sizeDelta = Utility.GetVector2FromStrArray(ComData.size);
btn.transform.localPosition = Utility.GetVector2FromStrArray(ComData.pos);
btn.GetComponent<Button>().onClick.AddListener(() =>
{
if (curAction != null)
{
curAction.Deinit();
curAction = null;
}
curAction = ActionHelper.GetActionAndSub(ComData.action);
curAction.StartGlobal(() =>
{
curAction = null;
});
});
break;
}
}
}
}
public void LoadBgImage(string bg, Action callback = null)
{
if (string.IsNullOrEmpty(bg) == false)
{
if (sprites.ContainsKey(bg))
{
RightContent.sprite = sprites[bg];
RightContent.SetNativeSize();
callback?.Invoke();
}
else
{
var localImageUrl = Global.imagePath + bg;
loader.Add2Load(localImageUrl.ToNetImageResName(), (success, res) =>
{
if (success)
{
Sprite sprite = Utility.GetSprite(res.Asset.As<Texture2D>());
if (sprites.ContainsKey(bg) == false)
{
sprites.Add(bg, sprite);
}
}
});
TypeEventSystem.Global.Send<OnLoadingShow>();
loader.LoadAsync(() =>
{
callback?.Invoke();
RightContent.sprite = sprites[bg];
RightContent.SetNativeSize();
TypeEventSystem.Global.Send<OnLoadingHide>();
});
}
}
else
{
callback?.Invoke();
}
}
public void SetRightContentPos(string setPos)
{
Vector2 pos = default;
if (string.IsNullOrEmpty(setPos) == false)
{
pos = Utility.GetVector2FromStrArray(setPos);
}
RightContent.rectTransform.anchoredPosition = pos;
}
protected override void OnShow()
{
}
protected override void OnHide()
{
}
protected override void OnClose()
{
sprites.Clear();
loader.ReleaseAllRes();
}
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: fd25ee86b2071da4aa68360bc13232e8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,12 +1,7 @@
using QFramework;
using QFramework.Example;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
using System.Xml.Serialization;
using UnityEngine;
using static XMLTool.Body3D;
namespace XMLTool
@ -43,8 +38,6 @@ namespace XMLTool
public Score score;
public Body3D body3d;
public Knowledge knowledge;
}
public class Device
@ -74,8 +67,6 @@ namespace XMLTool
public string sum;
public string bind;
public float value;
public string time;
public string timeFormat = "yyyy-MM-dd HH:mm:ss";
}
@ -216,32 +207,6 @@ namespace XMLTool
public string isOff;
}
public class Knowledge
{
public class Item
{
public class Component
{
public string type;
public string size;
public string pos;
public Action action;
}
public string title;
public string bgImage;
public string setPos;
public List<Item> subs;
public List<Component> components;
}
public string bgImage;
public List<Item> items;
public List<Item.Component> components;
}
public class XmlParser
{
public static AppData ParseXml(string xmlString)
@ -417,7 +382,6 @@ namespace XMLTool
module.body3d.parts.Add(part.Name, part);
}
}
// 解析评分
XElement scoreNode = moduleElement.Element("Score");
if (scoreNode != null)
{
@ -434,70 +398,11 @@ namespace XMLTool
name = item.Attribute("name")?.Value,
sum = item.Attribute("sum")?.Value,
bind = item.Attribute("bind")?.Value,
timeFormat = item.Attribute("timeFormat")?.Value,
});
}
}
// 解析知识点
var knowledge = moduleElement.Element("Knowledge");
if (knowledge != null)
{
module.knowledge = new Knowledge();
module.knowledge.bgImage = knowledge.Attribute("bgImage")?.Value;
foreach (var itemXml in knowledge.Elements("Item"))
{
Knowledge.Item item = ParserKnowledgeItem(itemXml);
if (module.knowledge.items == null)
{
module.knowledge.items = new List<Knowledge.Item>();
}
module.knowledge.items.Add(item);
}
module.knowledge.components = ParserKnowledgeComponet(knowledge);
}
}
}
private static Knowledge.Item ParserKnowledgeItem(XElement itemXml)
{
Knowledge.Item item = new Knowledge.Item();
item.title = itemXml.Attribute("title")?.Value;
item.bgImage = itemXml.Attribute("bgImage")?.Value;
item.setPos = itemXml.Attribute("setPos")?.Value;
item.components = ParserKnowledgeComponet(itemXml);
foreach (var subXml in itemXml.Elements("Item"))
{
if (item.subs == null)
{
item.subs = new List<Knowledge.Item>();
}
// 增加子物体
item.subs.Add(ParserKnowledgeItem(subXml));
}
return item;
}
private static List<Knowledge.Item.Component> ParserKnowledgeComponet(XElement xmlData)
{
List<Knowledge.Item.Component> list = null;
foreach (var componentXml in xmlData.Elements("Component"))
{
if (list == null)
{
list = new List<Knowledge.Item.Component>();
}
Knowledge.Item.Component component = new Knowledge.Item.Component();
component.type = componentXml.Attribute("type")?.Value;
component.pos = componentXml.Attribute("pos")?.Value;
component.size = componentXml.Attribute("size")?.Value;
component.action = ParseAction(componentXml.Element("Action"));
list.Add(component);
}
return list;
}
private static Body3D.Body ParseBody(XElement bodyElement, Body parent = null)
{
Body3D.Body body = new Body3D.Body
@ -509,7 +414,7 @@ namespace XMLTool
Audio = bodyElement.Attribute("audio")?.Value,
FocusDistance = bodyElement.Attribute("FocusDistance")?.Value
};
var isShow = bodyElement.Attribute("isShow");
if (isShow != null)
{

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 13457db631332b149901c3d79f802d84
guid: 72fe0ae24cde45946914fa10b54896b0
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,17 +1,9 @@
// 名为 "URLParameters.jslib" 的插件文件
mergeInto(LibraryManager.library, {
GetURLParameter: function (name) {
const paramName = UTF8ToString(name);
const search = window.location.search.substring(1);
const params = new URLSearchParams(search);
const value = params.get(paramName);
console.log('GetURLParameter:', value);
if (value) {
var buffer = _malloc((value.length + 1) * 2);
stringToUTF8(value, buffer, (value.length + 1) * 2);
return buffer;
} else {
return 0;
}
var search = window.location.search.substring(1);
var params = new URLSearchParams(search);
var value = params.get(name);
return value ? Pointer_stringify(value) : null;
}
});

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 762d12b9d2c220c46afe6eb3eda2e85c
guid: b8dbba4c57255fc4495c422b41445cbe
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -11,22 +11,21 @@ using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Networking;
public class LYTWebGLHelper : MonoSingleton<LYTWebGLHelper>
public class WebGLHelper : Singleton<WebGLHelper>
{
private LYTWebGLHelper() { }
private WebGLHelper() { }
public class LabData
{
public string GUID;
public string ExpID;
public string HOST = string.Empty;
public string HOST;
public string PARA1;
public string PARA;
public string PARA2;
}
#if UNITY_WEBGL
[DllImport("__Internal")]
private static extern IntPtr GetURLParameter(string name);
#endif
private static extern string GetURLParameter(string name);
string token = string.Empty;
LabData labData = new LabData();
@ -36,39 +35,19 @@ public class LYTWebGLHelper : MonoSingleton<LYTWebGLHelper>
public string uploadUrl;
private void Awake()
{
Init();
}
public void Init()
{
#if UNITY_WEBGL && !UNITY_EDITOR
token = GetURLParameter("token").Replace("%2B", "+");
RSA = Resources.Load<TextAsset>("RSA");
string urlData = Decrypt(token);
var datas = urlData.Split("&");
labData.GUID = datas[0];
labData.ExpID = datas[1];
labData.HOST = datas[2];
labData.PARA1 = datas[3];
labData.PARA = datas[4];
labData.PARA2 = datas[5];
var paramPtr = GetURLParameter("token");
if (paramPtr != IntPtr.Zero)
{
string value = Marshal.PtrToStringUTF8(paramPtr);
//token = value.Replace("%2B", "+");
token = value.Replace(" ", "+");
Marshal.FreeHGlobal(paramPtr); // 释放分配的内存
}
Debug.LogError("获取的:" + token);
#endif
RSA = Resources.Load<TextAsset>("LYTWebGL/RSA");
if (string.IsNullOrEmpty(token) == false)
{
string urlData = Decrypt(token);
var datas = urlData.Split("&");
labData.GUID = datas[0];
labData.ExpID = datas[1];
labData.HOST = datas[2];
labData.PARA1 = datas[3];
labData.PARA = datas[4];
labData.PARA2 = datas[5];
}
uploadUrl = Path.Combine(labData.HOST, "host/public/Exp/AddScore/");
}
/// <summary>
@ -108,9 +87,7 @@ public class LYTWebGLHelper : MonoSingleton<LYTWebGLHelper>
{
var data = new UploadData();
data.GUID = labData.GUID;
int expId = 0;
int.TryParse(labData.ExpID, out expId);
data.ExpID = expId;
data.ExpID = int.Parse(labData.ExpID);
data.score = totalScore;
data.flag = true;
@ -121,21 +98,20 @@ public class LYTWebGLHelper : MonoSingleton<LYTWebGLHelper>
step.ExpStepName = stepNames[i];
step.maxScore = maxScore[i];
step.score = score[i];
list.Add(step);
}
data.ExpStepVTwoList = list.ToArray();
StartCoroutine(SendScore(JsonConvert.SerializeObject(data)));
}
IEnumerator SendScore(string json, UnityAction<string> action = null)
IEnumerator SendScore(string json, UnityAction<string> action)
{
if (string.IsNullOrEmpty(uploadUrl))
{
Debug.LogError("ÉÏ´«½Ó¿ÚµØÖ·´íÎó:" + uploadUrl);
yield break;
}
Debug.LogError("上传的数据:" + json);
using (UnityWebRequest request = new UnityWebRequest(uploadUrl, "POST"))
{
request.SetRequestHeader("Content-Type", "application/json");
@ -146,7 +122,6 @@ public class LYTWebGLHelper : MonoSingleton<LYTWebGLHelper>
if (request.result == UnityWebRequest.Result.ConnectionError ||
request.result == UnityWebRequest.Result.ProtocolError)
{
Debug.LogError($"Upload failed: {request.uri}");
Debug.LogError($"Upload failed: {request.error}");
Debug.LogError($"Response Code: {request.responseCode}");
}
@ -157,60 +132,58 @@ public class LYTWebGLHelper : MonoSingleton<LYTWebGLHelper>
Debug.Log($"Server Response: {request.downloadHandler.text}");
Response response = JsonConvert.DeserializeObject<Response>(request.downloadHandler.text);
Debug.LogError(response.msg);
action?.Invoke(response.msg);
}
}
}
public class UploadData
{
public string GUID { get; set; }
// 实验 ID
public int ExpID { get; set; }
// 成绩
public int score { get; set; }
// 标志位:默认值 true
public bool flag { get; set; }
// 实验步骤列表
public Expstepvtwolist[] ExpStepVTwoList { get; set; }
}
public class Expstepvtwolist
{
// 实验步骤序号
public int seq { get; set; }
// 实验步骤名称
public string ExpStepName = "";
// 实验步骤状态
public string StepState = "";
// 实验步骤开始时间
public DateTime startTime = default;
// 实验步骤结束时间
public DateTime endTime = default;
// 实验步骤合理用时:单位秒
public int expectTime = 0;
// 实验步骤满分0 ~100百分制
public int maxScore = 100;
// 实验步骤得分0 ~100百分制
public int score = 0;
// 实验步骤操作次数
public int repeatCount = 1;
// 步骤评价200 字以内
public string evaluation = "";
// 赋分模型200 字以内
public string scoringModel = "";
// 备注
public string remarks { get; set; }
}
public class Response
{
public string msg;
public bool success;
}
}
public class UploadData
{
public string GUID { get; set; }
// 实验 ID
public int ExpID { get; set; }
// 成绩
public int score { get; set; }
// 标志位:默认值 true
public bool flag { get; set; }
// 实验步骤列表
public Expstepvtwolist[] ExpStepVTwoList { get; set; }
}
public class Expstepvtwolist
{
// 实验步骤序号
public int seq { get; set; }
// 实验步骤名称
public string ExpStepName = "";
// 实验步骤状态
public string StepState = "";
// 实验步骤开始时间
public DateTime startTime = default;
// 实验步骤结束时间
public DateTime endTime = default;
// 实验步骤合理用时:单位秒
public int expectTime = 0;
// 实验步骤满分0 ~100百分制
public int maxScore = 100;
// 实验步骤得分0 ~100百分制
public int score = 0;
// 实验步骤操作次数
public int repeatCount = 1;
// 步骤评价200 字以内
public string evaluation = "";
// 赋分模型200 字以内
public string scoringModel = "";
// 备注
public string remarks { get; set; }
}
public class Response
{
public string msg;
public bool success;
}

View File

@ -1,23 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class WebTest : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
List<string> stepNames = new List<string>() { "µÚÒ»²½", "µÚ¶þ²½", "µÚÈý²½" };
List<int> maxScore = new List<int>() { 10, 20, 30 };
List<int> score = new List<int>() { 5, 10, 15 };
LYTWebGLHelper.Instance.UpLoadData(60, stepNames, maxScore, score);
}
// Update is called once per frame
void Update()
{
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 08f51ad357b70604492d4c3e95ce1e27
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 MiB

View File

@ -20,7 +20,7 @@
<!--显示得分UI界面 onlyCurModule 是否仅显示当前模块成绩 默认为false-->
<Action type="ShowScore" onlyCurModule="true"></Action>
<!--切换operation模块 使用此功能 operation的配置中必须有name属性
name为operation配置中的name
执行此行后 不需要在执行NextOperationAction 框架底层执行了
@ -337,45 +337,6 @@
</Step>
</Operation>
<!--知识点
title对应左侧树状图的名字
bgImage是右侧的长图
Component是长图上挂在的组件 目前仅支持Type=Button的按钮类型
Action是动作组 点击按钮后的动作
Component标签与bgImage属性 可以在根节点Knowledge上也可以在子节点Item上
位于根节点时 是全局的 位于Item节点时是切换Item后展示的针对与Item的
-->
<Knowledge bgImage="Knowledge/ChangTu.png">
<Item title="第一步" setPos="0,0">
<Item title="第一步_第一个子步骤" bgImage="" setPos="0,100">
<Component type="Button" size="200,200" pos="200,-200">
<Action type="Log" value="第二步_第二个子步骤"></Action>
</Component>
<Component type="Button" size="200,200" pos="400,-200">
<Action type="Log" value="第二步_第二个子步骤"></Action>
</Component>
</Item>
</Item>
<Item title="第二步" setPos="0,400">
<Item title="第二步_第一个子步骤" bgImage="" setPos="0,500">
<Component type="Button" size="200,200" pos="200,-400">
<Action type="Log" value="第二步_第二个子步骤"></Action>
</Component>
<Component type="Button" size="200,200" pos="400,-400">
<Action type="Log" value="第二步_第二个子步骤"></Action>
</Component>
</Item>
<Item title="第二步_第二个子步骤" bgImage="" setPos="0,600"></Item>
</Item>
<Component type="Button" size="932,526" pos="20,-9653">
<Action type="Sequence">
<Action type="Log" value="第一步_第一个子步骤"></Action>
<Action type="Video" value="test.mp4" size="500,500" offset="10,10" finishedEvent="finished" closeEvent="close"></Action>
</Action>
</Component>
</Knowledge>
<!--动作组-->
<Action name="初始化" type="Sequence">
@ -424,9 +385,9 @@
<Action type="Log" value="ddd"></Action>
</Action>
</Exit>
</State>
</State>-->
<Transision from="any" to="状态1">
<Condition type="UIClick" value="Cube"></Condition>
<Condition type="ObjClick" value="Cube"></Condition>
</Transision>
<Transision from="初始状态" to="状态2">
<Condition type="ObjClick" value="Cube (1)"></Condition>
@ -446,7 +407,7 @@
<Body name="左一" path="Ren_NEW/SM_GuGe/upper_limb_bone/Left_upper_limb_bones/Left_free_upper_limb_bones" tip="左一肋骨描述">
<ObjectToggle>
<Color isOn="0,255,255" isOff="255,255,255"></Color>
</ObjectToggle>
</ObjectToggle>
</Body>
<Body name="左二" path="Ren/Tou/GuGe/LeiGu/ZuoLei/2" tip="左二肋骨描述">
<ObjectToggle>
@ -454,9 +415,9 @@
</ObjectToggle>
</Body>
</Body>
<Body name="右肋" path="Ren/Tou/GuGe/LeiGu/YouLei">
<Body name="右一" path="Ren/Tou/GuGe/LeiGu/YouLei/1" tip="7右一肋骨描述">
<ObjectToggle>
@ -500,8 +461,8 @@
</ObjectToggle>
</Body>
</Body>
<Body name="神经" isBodyList="true">
<Body name="神经" isBodyList="true">
<Body name="aaa" path="Ren/Tou/ShenJing/1">
<ObjectToggle>
<Color></Color>
@ -518,7 +479,7 @@
</ObjectToggle>
</Body>
</Body>
</Body>
</Body3D>

View File

@ -971,4 +971,4 @@ PlayerSettings:
hmiLoadingImage: {fileID: 0}
platformRequiresReadableAssets: 0
virtualTexturingSupportEnabled: 0
insecureHttpOption: 2
insecureHttpOption: 0