update style card

This commit is contained in:
2024-04-20 17:53:20 +07:00
parent 054c4f0ea8
commit 2c81dc333c
6 changed files with 170 additions and 68 deletions

33
package-lock.json generated
View File

@@ -9,6 +9,7 @@
"version": "0.1.0", "version": "0.1.0",
"dependencies": { "dependencies": {
"@mdi/font": "5.9.55", "@mdi/font": "5.9.55",
"@trpc/client": "^10.45.2",
"roboto-fontface": "*", "roboto-fontface": "*",
"vue": "^3.2.13", "vue": "^3.2.13",
"vue-router": "^4.3.0", "vue-router": "^4.3.0",
@@ -1608,6 +1609,26 @@
"node": ">= 6" "node": ">= 6"
} }
}, },
"node_modules/@trpc/client": {
"version": "10.45.2",
"resolved": "https://registry.npmjs.org/@trpc/client/-/client-10.45.2.tgz",
"integrity": "sha512-ykALM5kYWTLn1zYuUOZ2cPWlVfrXhc18HzBDyRhoPYN0jey4iQHEFSEowfnhg1RvYnrAVjNBgHNeSAXjrDbGwg==",
"funding": [
"https://trpc.io/sponsor"
],
"peerDependencies": {
"@trpc/server": "10.45.2"
}
},
"node_modules/@trpc/server": {
"version": "10.45.2",
"resolved": "https://registry.npmjs.org/@trpc/server/-/server-10.45.2.tgz",
"integrity": "sha512-wOrSThNNE4HUnuhJG6PfDRp4L2009KDVxsd+2VYH8ro6o/7/jwYZ8Uu5j+VaW+mOmc8EHerHzGcdbGNQSAUPgg==",
"funding": [
"https://trpc.io/sponsor"
],
"peer": true
},
"node_modules/@trysound/sax": { "node_modules/@trysound/sax": {
"version": "0.2.0", "version": "0.2.0",
"resolved": "https://registry.npmmirror.com/@trysound/sax/-/sax-0.2.0.tgz", "resolved": "https://registry.npmmirror.com/@trysound/sax/-/sax-0.2.0.tgz",
@@ -15816,6 +15837,18 @@
"integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==",
"dev": true "dev": true
}, },
"@trpc/client": {
"version": "10.45.2",
"resolved": "https://registry.npmjs.org/@trpc/client/-/client-10.45.2.tgz",
"integrity": "sha512-ykALM5kYWTLn1zYuUOZ2cPWlVfrXhc18HzBDyRhoPYN0jey4iQHEFSEowfnhg1RvYnrAVjNBgHNeSAXjrDbGwg==",
"requires": {}
},
"@trpc/server": {
"version": "10.45.2",
"resolved": "https://registry.npmjs.org/@trpc/server/-/server-10.45.2.tgz",
"integrity": "sha512-wOrSThNNE4HUnuhJG6PfDRp4L2009KDVxsd+2VYH8ro6o/7/jwYZ8Uu5j+VaW+mOmc8EHerHzGcdbGNQSAUPgg==",
"peer": true
},
"@trysound/sax": { "@trysound/sax": {
"version": "0.2.0", "version": "0.2.0",
"resolved": "https://registry.npmmirror.com/@trysound/sax/-/sax-0.2.0.tgz", "resolved": "https://registry.npmmirror.com/@trysound/sax/-/sax-0.2.0.tgz",

BIN
src/assets/search.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

View File

@@ -32,7 +32,7 @@
</div> </div>
<div style="position: relative" class="bg-curve" id="started"> <div style="position: relative" class="bg-curve" id="started">
<v-row style="height: 100%" align="center" class="text-center"> <v-row style="height: 100%" align="center" class="text-center">
<v-col cols="12" md="6"> <v-col cols="12" md="4">
<div style="position: relative"> <div style="position: relative">
<v-btn <v-btn
elevated elevated
@@ -54,7 +54,7 @@
</v-btn> </v-btn>
</div> </div>
</v-col> </v-col>
<v-col cols="12" md="6"> <v-col cols="12" md="4" class="mt-0 mt-md-10 mt-lg-10">
<v-btn <v-btn
elevated elevated
color="#DD6C31" color="#DD6C31"
@@ -67,11 +67,30 @@
:aspect-ratio="1" :aspect-ratio="1"
src="../assets/Group 23.png" src="../assets/Group 23.png"
width="80" width="80"
style="position: absolute; bottom: -30px; right: 0px" style="position: absolute; bottom: -30px; right: 50"
></v-img> ></v-img>
แสดงตนเปนผสมคร แสดงตนเปนผสมคร
</v-btn> </v-btn>
</v-col> </v-col>
<v-col cols="12" md="4">
<v-btn
elevated
color="#DD6C31"
class="text-normal"
stacked
width="300"
height="110"
to="/search"
>
<v-img
:aspect-ratio="1"
src="../assets/search.png"
width="100"
style="position: absolute; top: -40px; right: 0px"
></v-img>
นหาผสมคร สว.
</v-btn>
</v-col>
</v-row> </v-row>
</div> </div>
</div> </div>

View File

@@ -48,7 +48,7 @@
</v-col> </v-col>
<v-col class="py-3" cols="12" md="6"> <v-col class="py-3" cols="12" md="6">
<v-text-field <v-text-field
label="อาชีพ / Occupation" label="อาชีพ / Occupation"
variant="solo" variant="solo"
></v-text-field> ></v-text-field>
<!-- <v-select <!-- <v-select
@@ -76,16 +76,27 @@
</v-col> </v-col>
<v-col> <v-col>
<v-card color="#4C884C" class="py-5" elevated> <v-card color="#4C884C" class="pa-5" elevated>
<v-icon icon="mdi-cellphone-message" size="200"></v-icon> <div class="text-sub text-left">
<div class="text-sub">นยนรห OTP</div> <v-icon icon="mdi-plus-box-multiple"></v-icon>
<div>05:00</div> เพมรปภาพ
<div>
<v-otp-input variant="solo-filled"></v-otp-input>
</div> </div>
<v-btn color="#DD6C31" class="mt-4" height="40"> <v-avatar size="200" color="grey" class="elevation-3">
<span class="text-sub">นย</span> <v-img :src="url" v-if="url"></v-img>
</v-btn> <v-icon dark v-else size="80"> mdi-account </v-icon>
</v-avatar>
<v-file-input
label="แนบรูปภาพ"
accept="image/png, image/jpeg, image/bmp"
placeholder="แนบรูปภาพไฟล์ png/jpeg/jpg"
prepend-inner-icon="mdi-camera"
prepend-icon=""
variant="solo-filled"
class="mt-5"
@change="Preview_image"
v-model="image"
></v-file-input>
</v-card> </v-card>
</v-col> </v-col>
</v-row> </v-row>
@@ -118,9 +129,7 @@
<v-card> <v-card>
<div class="text-sub"> <div class="text-sub">
งหวดทณประสงคจะลงสมคร* งหวดทณประสงคจะลงสมคร*
<span class="text-sub3" <span class="text-sub3">สามารถเลอก 1 อำเภอ/เขต</span>
>สามารถเลอก 1 อำเภอ/เขต</span
>
<hr class="my-3" /> <hr class="my-3" />
<div class="text-sub3 text-red font-weight-bold"> <div class="text-sub3 text-red font-weight-bold">
เงอนไข เงอนไข
@@ -150,9 +159,7 @@
<v-card> <v-card>
<div class="text-sub"> <div class="text-sub">
อำเภอทณประสงคจะลงสมคร* อำเภอทณประสงคจะลงสมคร*
<span class="text-sub3" <span class="text-sub3">สามารถเลอก 1 อำเภอ/เขต</span>
>สามารถเลอก 1 อำเภอ/เขต</span
>
<hr class="my-3" /> <hr class="my-3" />
<div class="text-sub3 text-red font-weight-bold"> <div class="text-sub3 text-red font-weight-bold">
เงอนไข เงอนไข
@@ -423,6 +430,14 @@
import Provinces from "./provinces.json"; import Provinces from "./provinces.json";
import Districts from "./districts.json"; import Districts from "./districts.json";
export default { export default {
watch: {
image(val) {
console.log(val);
if(val==undefined){
this.url=null
}
},
},
computed: { computed: {
disabled() { disabled() {
return this.e1 === 1 return this.e1 === 1
@@ -434,6 +449,8 @@ export default {
}, },
data() { data() {
return { return {
url: null,
image: null,
province: null, province: null,
district: null, district: null,
districtItems: [], districtItems: [],
@@ -534,6 +551,14 @@ export default {
}; };
}, },
methods: { methods: {
Preview_image() {
console.log("this.image", this.image,this.image.length);
if (this.image) {
this.url = URL.createObjectURL(this.image);
} else {
this.url = null;
}
},
filterData() { filterData() {
// กรองข้อมูลอันที่สองโดยใช้ข้อมูลจากอันแรก // กรองข้อมูลอันที่สองโดยใช้ข้อมูลจากอันแรก
if (this.province && this.province.provinceCode) { if (this.province && this.province.provinceCode) {

View File

@@ -10,49 +10,63 @@
class="pa-lg-10 pa-md-10 pa-sm-4 pa-2" class="pa-lg-10 pa-md-10 pa-sm-4 pa-2"
> >
<v-row> <v-row>
<v-col v-for="(item, i) in profile" :key="i" cols="12" md="6" lg="6"> <v-col v-for="(item, i) in profile" :key="i" cols="12" md="6" lg="6" >
<v-card
elevation="3" <v-card elevation="5" class="text-sub2 mx-auto pb-5 card-user" >
class="text-sub2 mx-auto py-5" <div
max-height="380" style="background: #37332f; color: white; width: 100%"
min-height="380" class="font-weight-bold pa-2 w-100 text-center"
> >
<v-card-item> <div class="more">{{ item.group }}</div>
</div>
<v-card-item >
<v-row align="left"> <v-row align="left">
<div class="box-province px-3 py-2"> <!-- <div class="box-province px-3 py-2">
<div class="font-weight-bold"> <div class="font-weight-bold">
{{ item.province }} เขต{{ item.district }} {{ item.province }} เขต{{ item.district }}
</div> </div>
</div> </div> -->
<v-col cols="auto" class="text-left">
<v-avatar color="#DD6C31" size="100"> <v-col cols="12" md="auto" class="text-center">
<v-avatar color="#635d56" size="100">
<v-icon <v-icon
icon="mdi-account" icon="mdi-account"
color="" color=""
size="80" size="80"
></v-icon> </v-avatar ></v-icon> </v-avatar
></v-col> ></v-col>
<v-col cols="" class="text-left"> <v-col cols="12" md="" class="text-center">
<div class="font-weight-bold text-normal my-2"> <div class="font-weight-bold text-normal my-2 text-center">
{{ item.name }} {{ item.name }}
<span class="ml-3"> <span class="ml-3">
{{ item.lastname }} {{ item.lastname }}
<span v-if="item.age" class="text-sub2"> ( {{ item.age }}ปี )</span></span <span v-if="item.age" class="text-sub2">
( {{ item.age }}ปี )</span
></span
> >
<div class="text-sub3">{{ item.group }}</div> <div class="box-province px-3 py-2 text-sub2">
<div class="font-weight-bold">
{{ item.province }} |
<span class="font-weight-medium"
>เขต{{ item.district }}</span
>
</div>
</div>
<!-- <div class="text-sub3">{{ item.group }}</div> -->
</div> </div>
</v-col> </v-col>
</v-row> </v-row>
<v-row> <v-row>
<v-col cols="12"> <v-col cols="12">
<div class="text-small text-left"> <div class="text-small text-left">
<div class="font-weight-medium "> <div class="font-weight-medium">
อาช : {{ item.occupation }} <span class="font-weight-bold">อาช :</span>
{{ item.occupation }}
</div> </div>
<div class="font-weight-medium"> <div class="font-weight-medium">
การศกษา : {{ item.education }} <span class="font-weight-bold">การศกษา :</span>
{{ item.education }}
</div> </div>
</div> </div>
</v-col> </v-col>
@@ -80,22 +94,24 @@
</span> </span>
</div> </div>
<div class="text-small font-weight-bold text-left d-none">ดย <div class="text-small font-weight-bold text-left d-none">
<v-divider class="my-1"></v-divider> ดย
<v-row class="text-small" style="height: 150px; overflow: auto"> <v-divider class="my-1"></v-divider>
<v-col class="text-left"> <v-row class="text-small" style="height: 150px; overflow: auto">
<div class="font-weight-bold">เหนดวย :</div> <v-col class="text-left">
<div v-for="(ag, k) in item.opinion.agree" :key="k"> <div class="font-weight-bold">เหนดวย :</div>
{{ ag }} <div v-for="(ag, k) in item.opinion.agree" :key="k">
</div> {{ ag }}
</v-col> </div>
<v-col class="text-left"> </v-col>
<div class="font-weight-bold">ไมเหนดวย :</div> <v-col class="text-left">
<div v-for="(ag, k) in item.opinion.disagree" :key="k"> <div class="font-weight-bold">ไมเหนดวย :</div>
{{ ag }} <div v-for="(ag, k) in item.opinion.disagree" :key="k">
</div> {{ ag }}
</v-col> </div>
</v-row></div> </v-col>
</v-row>
</div>
</v-card-item> </v-card-item>
</v-card></v-col </v-card></v-col
> >
@@ -280,23 +296,30 @@ export default {
}; };
</script> </script>
<style> <style>
.more{ .card-user{
width: 100%; height: auto;
white-space: nowrap; /* height: 370px; */
overflow: hidden; }
text-overflow: ellipsis; .more {
width: 92%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin: auto;
} }
.box-province { .box-province {
position: absolute;
top: 0;
right: 0;
background-color: #f4c03f; background-color: #f4c03f;
border-radius: 5px; border-radius: 5px;
margin: 5px; margin: auto;
width: fit-content;
box-shadow: rgba(0, 0, 0, 0.24) 3px 0px 8px; box-shadow: rgba(0, 0, 0, 0.24) 3px 0px 8px;
} }
@media only screen and (min-width: 0px) and (max-width: 700px) { @media only screen and (min-width: 0px) and (max-width: 700px) {
.box-province { .card-user {
max-height: auto !important;
height: auto !important;
}
/* .box-province {
position: unset; position: unset;
display: block; display: block;
width: 100%; width: 100%;
@@ -306,6 +329,6 @@ export default {
border-radius: 5px; border-radius: 5px;
margin: 5px; margin: 5px;
box-shadow: rgba(0, 0, 0, 0.24) 3px 0px 8px; box-shadow: rgba(0, 0, 0, 0.24) 3px 0px 8px;
} } */
} }
</style> </style>

View File

@@ -1,3 +1,5 @@
export const CONFIG = { export const CONFIG = {
api_url: "http://localhost:3000", // api_url: "http://localhost:3000",
api_url: "http://178.128.18.156:3000",
}; };