Our pure JavaScript Scheduler component


Post by simon »

I need to save the newly created tasks in the space in the back-end database through my buttons. Is there any way to learn about it :D

Post by saki »

We have a guide on working with remote data.

Post by simon »

I used the crudmanager method, but I can't use sync in the document successfully. Do I need to change the method, and I operated on the control in the front end, how can I check the response of the browser to the control

Post by saki »

I can't use sync in the document successfully
We need more information about the problem. Error messages, screenshots, video, etc. The best would be your code that we can then study/run/debug.

Post by simon »

saki wrote: Thu Apr 02, 2020 9:03 am
I can't use sync in the document successfully
We need more information about the problem. Error messages, screenshots, video, etc. The best would be your code that we can then study/run/debug.
The back end is a simple function written in Java to provide the data in the correct format
Attachments
components.zip
This is a page I copied from the demo
(7.06 MiB) Downloaded 98 times

Post by saki »

I haven't found a way to run the application you posted. There's no package.json. Therefore I've only studied the sources and I found that dataSave function is commented out and even if it wouldn't it doesn't seem that it sends any payload to the server:
    dataSave() {
      if(!this.url.list){
        this.$message.error("请设置url.list属性!")
        return
      }
      alert(121312)
      var params = this.getQueryParams();//查询条件
    
      //params.datouyu = '21313213121'
      getAction(this.url.list, params).then((res) => {
        if (res.success) {
    
          // this.dataSource = res.result.records;
          // this.ipagination.total = res.result.total;
        }
        if(res.code===510){
          this.$message.warning(res.message)
        }
      })
    },
FYI, it is not necessary to write a custom implementations of sending-to-server task as CrudManager (or individual Ajax stores) do it for you. The complete discussion on how to do it is here.

In this case it would be probably enough to get the CrudManager and then call its sync() method on the button click. Something like
this.crudManager.sync()
If you're still in troubles, post please the code that we can run so that we can see what is actually happening.

Post by simon »

saki wrote: Fri Apr 03, 2020 11:06 am I haven't found a way to run the application you posted. There's no package.json. Therefore I've only studied the sources and I found that dataSave function is commented out and even if it wouldn't it doesn't seem that it sends any payload to the server:
    dataSave() {
      if(!this.url.list){
        this.$message.error("请设置url.list属性!")
        return
      }
      alert(121312)
      var params = this.getQueryParams();//查询条件
    
      //params.datouyu = '21313213121'
      getAction(this.url.list, params).then((res) => {
        if (res.success) {
    
          // this.dataSource = res.result.records;
          // this.ipagination.total = res.result.total;
        }
        if(res.code===510){
          this.$message.warning(res.message)
        }
      })
    },
FYI, it is not necessary to write a custom implementations of sending-to-server task as CrudManager (or individual Ajax stores) do it for you. The complete discussion on how to do it is here.

In this case it would be probably enough to get the CrudManager and then call its sync() method on the button click. Something like
this.crudManager.sync()
If you're still in troubles, post please the code that we can run so that we can see what is actually happening.
Sorry, the code is too large to upload. I also read the introduction of the document. I found that when using crudManager, you can use sync directly in this method, but when I use sync in my application, it cannot respond. Which side should I consider

Post by simon »

Image
saki wrote: Fri Apr 03, 2020 11:06 am I haven't found a way to run the application you posted. There's no package.json. Therefore I've only studied the sources and I found that dataSave function is commented out and even if it wouldn't it doesn't seem that it sends any payload to the server:
    dataSave() {
      if(!this.url.list){
        this.$message.error("请设置url.list属性!")
        return
      }
      alert(121312)
      var params = this.getQueryParams();//查询条件
    
      //params.datouyu = '21313213121'
      getAction(this.url.list, params).then((res) => {
        if (res.success) {
    
          // this.dataSource = res.result.records;
          // this.ipagination.total = res.result.total;
        }
        if(res.code===510){
          this.$message.warning(res.message)
        }
      })
    },
FYI, it is not necessary to write a custom implementations of sending-to-server task as CrudManager (or individual Ajax stores) do it for you. The complete discussion on how to do it is here.

In this case it would be probably enough to get the CrudManager and then call its sync() method on the button click. Something like
this.crudManager.sync()
If you're still in troubles, post please the code that we can run so that we can see what is actually happening.
Attachments
1586423973(1).png
1586423973(1).png (12.41 KiB) Viewed 1804 times

Post by simon »

saki wrote: Fri Apr 03, 2020 11:06 am I haven't found a way to run the application you posted. There's no package.json. Therefore I've only studied the sources and I found that dataSave function is commented out and even if it wouldn't it doesn't seem that it sends any payload to the server:
    dataSave() {
      if(!this.url.list){
        this.$message.error("请设置url.list属性!")
        return
      }
      alert(121312)
      var params = this.getQueryParams();//查询条件
    
      //params.datouyu = '21313213121'
      getAction(this.url.list, params).then((res) => {
        if (res.success) {
    
          // this.dataSource = res.result.records;
          // this.ipagination.total = res.result.total;
        }
        if(res.code===510){
          this.$message.warning(res.message)
        }
      })
    },
FYI, it is not necessary to write a custom implementations of sending-to-server task as CrudManager (or individual Ajax stores) do it for you. The complete discussion on how to do it is here.

In this case it would be probably enough to get the CrudManager and then call its sync() method on the button click. Something like
this.crudManager.sync()
If you're still in troubles, post please the code that we can run so that we can see what is actually happening.
Or I want to know where my newly created tasks are cached when I use space in the front end. Thank you

Post by pmiklashevich »

Is your issue solved? If not, please attach a runnable testcase that we can check.
Sorry, the code is too large to upload.
Please strip out node_modules and our sources. We will add them and build your project.
Please see "How to ask for help here": viewtopic.php?f=35&t=772

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply