Update dailyInspection.vue
This commit is contained in:
parent
b5634e58fd
commit
44d49bbe40
|
@ -114,7 +114,7 @@ import { ref, computed, reactive, watch } from 'vue'
|
|||
import api from '@/request/index'
|
||||
import { useDailyStore } from '@/store/daily'
|
||||
|
||||
const picker_search = ref()
|
||||
// const picker_search = ref()
|
||||
const starRating = ref<any[]>([])
|
||||
const store = useDailyStore()
|
||||
const daily = computed(() => store.getdailyinspection)
|
||||
|
@ -166,7 +166,7 @@ const assessmentCriteriaRulesByCkProjectId = async function (ckProjectId) {
|
|||
// title: '加载中...',
|
||||
// mask: true,
|
||||
// })
|
||||
const res = await api.get<StarRating[]>(`/m2/sa/assessmentCriteriaRulesByCkProjectId`, { ckProjectId })
|
||||
const res = await api.get<StarRating[]>(`/mp/sa/assessmentCriteriaRulesByCkProjectId`, { ckProjectId })
|
||||
|
||||
res.data?.forEach((item) => {
|
||||
item.currentScore = 0
|
||||
|
@ -203,7 +203,7 @@ const assessmentCriteriaRulesByCkProjectId = async function (ckProjectId) {
|
|||
const selectorCheckedType = ref<string>('')
|
||||
const selectorType = ref<CkProjectListByType[]>()
|
||||
const ckProjectListByType = async function (type) {
|
||||
const res = await api.get<CkProjectListByType[]>(`/m2/sa/ckProjectListByType`, { type })
|
||||
const res = await api.get<CkProjectListByType[]>(`/mp/sa/ckProjectListByType`, { type })
|
||||
console.log(res.data)
|
||||
|
||||
if (res.data?.length === 0) {
|
||||
|
@ -229,18 +229,18 @@ const onChangeType = function (e: any) {
|
|||
|
||||
const selector = ref<UnitEnterprisesUnitList[]>()
|
||||
const selectorCopy = ref<UnitEnterprisesUnitList[]>()
|
||||
const selectorChecked = ref<string>('')
|
||||
const onChange = function (e: any) {
|
||||
try {
|
||||
let index = Number(e.detail.value)
|
||||
selectorChecked.value = selector.value?.[index].label as string
|
||||
let type = selector.value?.[index].extData.type.value
|
||||
ckProjectListByType(type)
|
||||
_form.enterprisesUnitId = selector.value?.[index].value as string
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ onChange ~ error:', error)
|
||||
}
|
||||
}
|
||||
// const selectorChecked = ref<string>('')
|
||||
// const onChange = function (e: any) {
|
||||
// try {
|
||||
// let index = Number(e.detail.value)
|
||||
// selectorChecked.value = selector.value?.[index].label as string
|
||||
// let type = selector.value?.[index].extData.type.value
|
||||
// ckProjectListByType(type)
|
||||
// _form.enterprisesUnitId = selector.value?.[index].value as string
|
||||
// } catch (error) {
|
||||
// console.log('🚀 ~ onChange ~ error:', error)
|
||||
// }
|
||||
// }
|
||||
|
||||
const getUnitEnterprisesUnitList = async function () {
|
||||
const res = await api.get<UnitEnterprisesUnitList[]>(`/policeIndex/getUnitEnterprisesUnitList`)
|
||||
|
@ -326,7 +326,7 @@ const onSubmit = async function () {
|
|||
}
|
||||
Object.assign(assessmentRecordParams, _form)
|
||||
assessmentRecordParams.assessmentRecordDetails = [...assessmentRecordDetails.value]
|
||||
const result = await api.post('/m2/sa/submitAssessmentRecord', assessmentRecordParams)
|
||||
const result = await api.post('/mp/sa/submitAssessmentRecord', assessmentRecordParams)
|
||||
|
||||
clearData() //清空数据
|
||||
if (result.code === 200) {
|
||||
|
|
Loading…
Reference in New Issue