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