123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- function OnInitializeData(reload, preview) {
-
- PUI(()=>{
-
-
-
-
- });
-
- }
- function OnReady(reload, preview) {
-
- PUI(()=>{
-
-
-
-
- });
- }
- function OnCloseForm() {
- }
- function OnException(err) {
-
- }
- let myArray = [];
- function OnError(){
- myArray.forEach((item) => {
- console.log(item);
- unit.form.mainfrm.OnSend("BadFace " + item);
- });
- }
- function OnReturnMeun(){
- unit.form.mainfrm.menu(0);
- }
- function OnTestModel(){
-
- unit.form.mainfrm.OnCueline('检测中...', 'Blue');
- model.spawn(model.getCurrentDirectory() + "src/check4/demo1.exe", model.getStepPath(), cb =>{
-
-
-
-
- const numbers = cb.match(/FaceIndex: (\d+)/g).map(item => item.match(/\d+/)[0]);
-
- if (cb.indexOf("ssuccess!!!") !== -1) {
- ui.cueline.value += '成功!\n';
- ui.cueline.row = -1;
- unit.form.mainfrm.OnChangePicture(1, 2);
- unit.form.mainfrm.OnCueline('通过!', 'green');
- ui.pb_pass.enable = true;
- ui.pb_pass01.enable = true;
- }
-
- if(cb.indexOf("FaceIndex: ") !== -1){
- ui.cueline.value += '您需要修改错误面:' + numbers[0] + '\n';
- ui.cueline.row = -1;
- myArray.push(numbers[0]);
- unit.form.mainfrm.OnChangePicture(1, 3);
- unit.form.mainfrm.OnCueline('您需要修改错误面:' + numbers[0], 'red');
- ui.pb_Error.enable = true;
- ui.pb_pass01.enable = false;
- }
- });
-
- }
- function OnParentDockerMessage(type, para) {
- }
- function onDragFile(filepath) {
- }
- function PUI(cb) {
- if(pui){cb();}
- }
- CW_DeclareVariable("path",
- val => {
- ui.pb_value.value = val;
- }, () => {});
- function BLOCK_EVENT(cb) {
- ui.block_event = true;
-
- cb();
-
- ui.block_event = false;
- }
- function CW_DeclareVariable(name, setter, getter) {
- if(typeof(__DeclareVariable) === 'function') {
- __DeclareVariable(name, setter, getter);
- }
- }
- function CW_DeclareOuterVariable(name) {
- if(typeof(__DeclareOuterVariable) === 'function') {
- __DeclareOuterVariable(name);
- }
- }
|