Browse Source

检查预约:检查事项+检查要求全换成下来选项

master
蟑螂恶霸 3 years ago
parent
commit
78cbaccc7a
  1. 42
      src/views/administrative/appointment.vue

42
src/views/administrative/appointment.vue

@ -43,15 +43,17 @@
required required
label="检查事项" label="检查事项"
:rules="[{ required: true, message: '必填项' }]" :rules="[{ required: true, message: '必填项' }]"
@click="data.showGA = true" @click="data.showItem = true"
/> />
<van-field v-model="submitData.checkItem" v-show="false" /> <van-field v-model="submitData.checkItem" v-show="false" />
<van-field <van-field
v-model="submitData.checkRequire" v-model="data.checkRequireText"
required required
label="检查要求" label="检查要求"
:rules="[{ required: true, message: '必填项' }]" :rules="[{ required: true, message: '必填项' }]"
@click="data.showGA = true"
/> />
<van-field v-model="submitData.checkRequire" v-show="false" />
<van-field <van-field
v-model="submitData.lawEnforcement" v-model="submitData.lawEnforcement"
readonly readonly
@ -96,7 +98,7 @@
<!-- </div>--> <!-- </div>-->
<van-popup v-model:show="data.showLawEnforcerFlag" position="bottom" :style="{ height: '30%' }" /> <van-popup v-model:show="data.showLawEnforcerFlag" position="bottom" :style="{ height: '30%' }" />
<Popup :visible="data.popupVisible" :content="data.popupContent" @close="closePopup" @reciveData="reciveData" /> <UserPopup :visible="data.popupVisible" :content="data.popupContent" @close="closePopup" @reciveData="reciveVisible" />
<van-popup v-model:show="data.showTimePicker" position="bottom" :style="{ height: '30%' }" > <van-popup v-model:show="data.showTimePicker" position="bottom" :style="{ height: '30%' }" >
<van-date-picker <van-date-picker
@ -105,12 +107,18 @@
@cancel="data.showTimePicker = false" @cancel="data.showTimePicker = false"
/> />
</van-popup> </van-popup>
<van-popup v-model:show="data.showItem" position="bottom" :style="{ height: '30%' }">
<van-picker title="事项"
:columns="data.item_columns"
@confirm="itemConfirm"
@cancel="gaCancel"
/>
</van-popup>
<van-popup v-model:show="data.showGA" position="bottom" :style="{ height: '30%' }"> <van-popup v-model:show="data.showGA" position="bottom" :style="{ height: '30%' }">
<van-picker title="要求" <van-picker title="要求"
:columns="data.ga_columns" :columns="data.ga_columns"
@confirm="gaConfirm" @confirm="gaConfirm"
@cancel="gaCancel" @cancel="gaCancel"
@change="gaChange"
/> />
</van-popup> </van-popup>
</div> </div>
@ -126,7 +134,7 @@ import { reactive, ref } from "vue";
import { getDict } from "../../api/Home"; import { getDict } from "../../api/Home";
import {uploadFile} from "../../util/fileUpload"; import {uploadFile} from "../../util/fileUpload";
//用户筛选弹窗 //用户筛选弹窗
import Popup from './userFilter.vue'; import UserPopup from './userFilter.vue';
const { useMy, useCommon, useShopCard } = $globalStore; const { useMy, useCommon, useShopCard } = $globalStore;
const router = useRouter(); const router = useRouter();
@ -137,8 +145,11 @@ const data = reactive({
popupVisible: false, popupVisible: false,
popupContent: '', popupContent: '',
showGA:false, showGA:false,
showItem:false,
checkItemText:"", checkItemText:"",
checkRequireText: "",
ga_columns: [], ga_columns: [],
item_columns: [],
}); });
//保存参数 //保存参数
const submitData = reactive({ const submitData = reactive({
@ -197,21 +208,29 @@ const showPopup = () =>{
const closePopup = () =>{ const closePopup = () =>{
data.popupVisible = false; data.popupVisible = false;
} }
const reciveData = (item) =>{ const reciveVisible = (item) =>{
submitData.lawEnforcerTwo = item.userName; submitData.lawEnforcerTwo = item.userName;
submitData.lawEnforcerIdTwo = item.userId; submitData.lawEnforcerIdTwo = item.userId;
} }
/* 检查要求 start */ /* 检查要求 start */
const gaConfirm = ({ selectedOptions }) => { const gaConfirm = ({ selectedOptions }) => {
data.checkRequireText = selectedOptions[0].text;
submitData.checkRequire = selectedOptions[0].value;
data.showGA = false;
data.showItem = false;
};
/* 检查要求 start */
const itemConfirm = ({ selectedOptions }) => {
data.checkItemText = selectedOptions[0].text; data.checkItemText = selectedOptions[0].text;
submitData.checkItem = selectedOptions[0].value; submitData.checkItem = selectedOptions[0].value;
data.showGA = false; data.showGA = false;
}; data.showItem = false;
const gaChange = ({ selectedValues }) => {
}; };
const gaCancel = () => { const gaCancel = () => {
data.showGA = false; data.showGA = false;
data.showItem = false;
} }
/* 检查要求 end */ /* 检查要求 end */
@ -252,6 +271,13 @@ onMounted(() =>{
data.ga_columns.push({ text: success.data[i].dictLabel, value: success.data[i].dictValue }) data.ga_columns.push({ text: success.data[i].dictLabel, value: success.data[i].dictValue })
} }
},error=>{}); },error=>{});
// 查询检查要求字典信息
getDict({"dictType": "checkItem"}, success => {
for(var i=0; i<success.data.length; i++) {
data.item_columns.push({ text: success.data[i].dictLabel, value: success.data[i].dictValue })
}
},error=>{});
}) })
const reciveData = (item) =>{ const reciveData = (item) =>{

Loading…
Cancel
Save