แก้โค้ดตาม issue
This commit is contained in:
parent
3968d2b1a0
commit
bb6afbb98e
12 changed files with 323 additions and 252 deletions
|
|
@ -441,6 +441,21 @@ onMounted(() => {
|
|||
<q-separator />
|
||||
<q-card-section >
|
||||
<div class="row q-col-gutter-sm">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
class="inputgreen"
|
||||
label="ชื่อตัวชี้วัด"
|
||||
v-model="formIndicators.indicators"
|
||||
hide-bottom-space
|
||||
:rules="[
|
||||
(val:string) =>
|
||||
!!val || `${'กรุณากรอกชื่อตัวชี้วัด'}`,
|
||||
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<q-select
|
||||
dense
|
||||
|
|
@ -461,23 +476,9 @@ onMounted(() => {
|
|||
]"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
class="inputgreen"
|
||||
label="ชื่อตัวชี้วัด"
|
||||
v-model="formIndicators.indicators"
|
||||
hide-bottom-space
|
||||
:rules="[
|
||||
(val:string) =>
|
||||
!!val || `${'กรุณากรอกชื่อตัวชี้วัด'}`,
|
||||
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
|
||||
<div class="col-6">
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ onMounted(() => {
|
|||
<q-tab-panel name="Target"> <Target /></q-tab-panel>
|
||||
<q-tab-panel name="ProjectDetail" style="padding: 0px"> <ProjectDetail /> </q-tab-panel>
|
||||
<q-tab-panel name="FollowResult"> <FollowResult /> </q-tab-panel>
|
||||
<q-tab-panel name="Other" style="padding: 0px"> <Other /> </q-tab-panel>
|
||||
<q-tab-panel name="Other" style="padding: 0px"> <Other :status="status"/> </q-tab-panel>
|
||||
<q-tab-panel name="Record"> <Record /> </q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ const {
|
|||
const route = useRoute();
|
||||
const projectId = ref<string>(route.params.id.toLocaleString());
|
||||
|
||||
const status = defineModel<string>('status',{required:true})
|
||||
const provinceOp = ref<DataOption[]>([]);
|
||||
const provinceOpMain = ref<DataOption[]>([]);
|
||||
const budgetOp = ref<DataOption[]>([
|
||||
|
|
@ -475,7 +476,7 @@ onMounted(() => {
|
|||
reverse-fill-mask
|
||||
/>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<div class="col-3" v-if="status == 'FINISH'">
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
|
|
|
|||
|
|
@ -15,6 +15,11 @@ import { useDevelopmentDataStore } from "@/modules/15_development/store/developm
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
const other1 = ref<boolean>(false);
|
||||
const other2 = ref<boolean>(false);
|
||||
const otherInput1 = ref<string>("");
|
||||
const otherInput2 = ref<string>("");
|
||||
|
||||
const $q = useQuasar();
|
||||
const store = useDevelopmentDataStore();
|
||||
const route = useRoute();
|
||||
|
|
@ -161,7 +166,9 @@ async function onSubmit() {
|
|||
projectModal: formData.projectModal,
|
||||
isBackPlanned: formData.isBackPlanned,
|
||||
isHoldPlanned: formData.isHoldPlanned,
|
||||
projectDayBackPlanned: formData.isBackPlanned ? formData.projectDayBackPlanned:null,
|
||||
projectDayBackPlanned: formData.isBackPlanned
|
||||
? formData.projectDayBackPlanned
|
||||
: null,
|
||||
projectDayHoldPlanned: formData.projectDayHoldPlanned,
|
||||
projectNigthHoldPlanned: formData.projectNigthHoldPlanned,
|
||||
developmentProjectTechniquePlanneds:
|
||||
|
|
@ -206,6 +213,15 @@ function updateSelected(data: DataStrategic, type: string) {
|
|||
}
|
||||
}
|
||||
|
||||
function checkOther(type: number, val: boolean) {
|
||||
if(val == false){
|
||||
if(type == 1){
|
||||
otherInput1.value = ''
|
||||
}else if(type == 2){
|
||||
otherInput2.value = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
/** ดึงข้อมูลเมื่อคอมโพเนนต์โหลดเสร็จสมบูรณ์ */
|
||||
onMounted(() => {
|
||||
fetchData();
|
||||
|
|
@ -232,7 +248,6 @@ onMounted(() => {
|
|||
/>
|
||||
</div>
|
||||
|
||||
|
||||
<q-card bordered class="col-12 q-my-sm">
|
||||
<div
|
||||
class="col-xs-12 col-sm-12 text-weight-medium bg-grey-3 q-py-xs q-px-md"
|
||||
|
|
@ -285,7 +300,9 @@ onMounted(() => {
|
|||
<q-item
|
||||
clickable
|
||||
@click.stop="updateSelected(prop.node, '1')"
|
||||
:active="formData.strategyChildPlannedId == prop.node.id"
|
||||
:active="
|
||||
formData.strategyChildPlannedId == prop.node.id
|
||||
"
|
||||
active-class="my-list-link text-primary text-weight-medium"
|
||||
class="row col-12 items-center text-dark q-py-xs q-pl-sm rounded-borders my-list"
|
||||
>
|
||||
|
|
@ -448,7 +465,29 @@ onMounted(() => {
|
|||
type="checkbox"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 q-mb-lg">
|
||||
<div class="row">
|
||||
<div class="col-4 relative-position">
|
||||
<div class="other_custom">
|
||||
<q-checkbox
|
||||
v-model="other1"
|
||||
label="อื่นๆ"
|
||||
size="sm"
|
||||
color="primary"
|
||||
keep-color
|
||||
:disable="store.projectStatus === 'FINISH'"
|
||||
@update:model-value="checkOther(1, other1)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-8 relative-position">
|
||||
<div class="other_custom_input" v-if="other1 == true">
|
||||
<q-input v-model="otherInput1" dense outlined label="กรุณากรอก อื่นๆ"></q-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-6 col-md-4">
|
||||
<q-input
|
||||
:disable="store.projectStatus === 'FINISH'"
|
||||
|
|
@ -534,6 +573,28 @@ onMounted(() => {
|
|||
type="checkbox"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 q-mb-lg">
|
||||
<div class="row">
|
||||
<div class="col-4 relative-position">
|
||||
<div class="other_custom">
|
||||
<q-checkbox
|
||||
v-model="other2"
|
||||
label="อื่นๆ"
|
||||
size="sm"
|
||||
color="primary"
|
||||
keep-color
|
||||
@update:model-value="checkOther(2, other2)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-8 relative-position">
|
||||
<div class="other_custom_input" v-if="other2 == true">
|
||||
<q-input v-model="otherInput2" dense outlined label="กรุณากรอก อื่นๆ"></q-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-6 col-md-4">
|
||||
<q-input
|
||||
dense
|
||||
|
|
@ -573,4 +634,14 @@ onMounted(() => {
|
|||
font-weight: 600;
|
||||
border: 1px solid rgba(175, 185, 196, 0.217);
|
||||
}
|
||||
.other_custom {
|
||||
position: absolute;
|
||||
left: -7px;
|
||||
top: -29px;
|
||||
}
|
||||
.other_custom_input {
|
||||
position: absolute;
|
||||
top: -25px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1104,6 +1104,47 @@ onMounted(() => {
|
|||
v-for="(items, index) in formGroupTarget.positions"
|
||||
class="col-12 row q-col-gutter-sm"
|
||||
>
|
||||
|
||||
<div
|
||||
class="col"
|
||||
v-if="formGroupTarget.groupTarget !== 'OUTSIDERS'"
|
||||
>
|
||||
<q-select
|
||||
dense
|
||||
outlined
|
||||
class="inputgreen"
|
||||
v-model="items.posTypeId"
|
||||
:options="posTypeOp"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
emit-value
|
||||
map-options
|
||||
input-class="text-red"
|
||||
label="ประเภทตำแหน่ง"
|
||||
@update:model-value="updatePosTypeName"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="col"
|
||||
v-if="formGroupTarget.groupTarget !== 'OUTSIDERS'"
|
||||
>
|
||||
<q-select
|
||||
dense
|
||||
outlined
|
||||
class="inputgreen"
|
||||
v-model="items.posLevelId"
|
||||
:options="
|
||||
posTypeMain.find((v) => items.posTypeId === v.id)
|
||||
?.posLevels || []
|
||||
"
|
||||
option-label="posLevelName"
|
||||
option-value="id"
|
||||
emit-value
|
||||
map-options
|
||||
input-class="text-red"
|
||||
label="ระดับตำแหน่ง"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="col"
|
||||
v-if="formGroupTarget.groupTarget !== 'OUTSIDERS'"
|
||||
|
|
@ -1121,58 +1162,6 @@ onMounted(() => {
|
|||
]"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="col"
|
||||
v-if="formGroupTarget.groupTarget !== 'OUTSIDERS'"
|
||||
>
|
||||
<q-select
|
||||
dense
|
||||
outlined
|
||||
hide-bottom-space
|
||||
lazy-rules
|
||||
class="inputgreen"
|
||||
v-model="items.posTypeId"
|
||||
:options="posTypeOp"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
emit-value
|
||||
map-options
|
||||
input-class="text-red"
|
||||
label="ประเภทตำแหน่ง"
|
||||
@update:model-value="updatePosTypeName"
|
||||
:rules="[
|
||||
(val:string) =>
|
||||
!!val || `${'กรุณาเลือกประเภทตำแหน่ง'}`,
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="col"
|
||||
v-if="formGroupTarget.groupTarget !== 'OUTSIDERS'"
|
||||
>
|
||||
<q-select
|
||||
dense
|
||||
outlined
|
||||
hide-bottom-space
|
||||
lazy-rules
|
||||
class="inputgreen"
|
||||
v-model="items.posLevelId"
|
||||
:options="
|
||||
posTypeMain.find((v) => items.posTypeId === v.id)
|
||||
?.posLevels || []
|
||||
"
|
||||
option-label="posLevelName"
|
||||
option-value="id"
|
||||
emit-value
|
||||
map-options
|
||||
input-class="text-red"
|
||||
label="ระดับตำแหน่ง"
|
||||
:rules="[
|
||||
(val:string) =>
|
||||
!!val || `${'กรุณาเลือกระดับ'}`,
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="col-1 q-mt-sm"
|
||||
v-if="formGroupTarget.groupTarget !== 'OUTSIDERS'"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue