Muhammad al-xorazmiy nomidagi toshkent axborot texnologiyalar universetuti


Download 12.22 Kb.
bet1/3
Sana05.04.2023
Hajmi12.22 Kb.
#1277020
  1   2   3
Bog'liq
MBBBAAAAA


MUHAMMAD AL-XORAZMIY NOMIDAGI TOSHKENT AXBOROT TEXNOLOGIYALAR UNIVERSETUTI
MALUMOTLAR BAZASI
2-MUSTAQIL ISH
Bajardi 315-21 guruh talabadsi Abdunazarov Ravshan

REJA :

  • Kirish
  • Asosiy qism
    • Malumotlar bazasini dasturlash tili bilan bog’lash
    • Malumotlar bazasidan malumotlarni userga ko’rsatish
    • Malumotlar bazasiga malumot qo’shish
    • Malumotlarni tahrirlash
    • Malumotlarni o’chirish
  • Xulosa
  • Foydalanilgan adabiyotlar

Kirish

  • Ushbu mustaqil ishda database sifatida 3-tomon databasedan ya’ni Json serverda foydalanildi Malumotlar bazasi Javascriptning Vue js framervorki yordamida bog’landi
  • Dastavval dasturni ishga tushiramiz va unda json sereverni o’rnatamiz
  • npx run json-server –watch data/db.json

Dastur strukturasi

Dastur ko’rishi

Malumotlar bazasidan malumotlarni olish

Listga render qilib chiqarish

Add methods MB ga malumot qo’shish

Add methods MB ga malumot qo’shishni koding qismi

  • getUserInfo() {
  • const newUser = {
  • fullName: this.fullName,
  • departament: this.departament,
  • position: this.position,
  • gender: this.gender,
  • age: +this.age,
  • };
  • this.newUser = newUser;
  • console.log(newUser);
  • this.getServer();
  • },

 async getServer() {

  •  async getServer() {
  • console.log("Serverga jo'natdi");
  • await axios.post("http://localhost:3000/users", this.newUser, {});
  • // await axios.delete("http://localhost:3000/users/"+ this.id)
  • // await axios.patch("http://localhost:3000/users/9",this.newUser)
  • this.clearInputValue();
  • },
  •  clearInputValue() {
  • (this.fullName = ""),
  • (this.departament = ""),
  • (this.position = ""),
  • (this.gender = ""),
  • (this.age = ""),
  • (this.isChecked = false);
  • },
  • getRadioAnsver(result) {
  • this.gender = result.target.value;
  • },
  • exitHome() {
  • this.$router.push({ path: "/" });
  • },

Download 12.22 Kb.

Do'stlaringiz bilan baham:
  1   2   3




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling