福禄克专用脚本添加、监测计划表单控制
This commit is contained in:
@@ -79,6 +79,7 @@
|
||||
collapse-tags
|
||||
filterable
|
||||
placeholder="请选择检测源"
|
||||
@change="handleSourceChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="(option, index) in pqSourceArray"
|
||||
@@ -125,6 +126,7 @@
|
||||
:key="index"
|
||||
:label="option.label"
|
||||
:value="option.value"
|
||||
:disabled="option.fluke!=1&&pqSourceArray?.find(item=>formContent.sourceIds==item.value)?.label.includes('FLUKE')"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -472,7 +474,7 @@ const pqStandardDevList = ref<StandardDevice.ResPqStandardDevice[]>([]) //获取
|
||||
const pqReportName = ref<{ name: string }[]>([])
|
||||
|
||||
const pqSourceArray = ref<{ label: string; value: string }[]>()
|
||||
const pqScriptArray = ref<{ label: string; value: string }[]>()
|
||||
const pqScriptArray = ref<{ label: string; value: string,fluke?:number|boolean}[]>()
|
||||
const pqErrorArray = ref<{ label: string; value: string }[]>()
|
||||
const pqStandardDevArray = ref<{ label: string; value: string }[]>()
|
||||
const secondLevelOptions: any[] = []
|
||||
@@ -529,6 +531,8 @@ const generateData = () => {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
function useMetaInfo() {
|
||||
const dialogVisible = ref(false)
|
||||
const titleType = ref('add')
|
||||
@@ -598,6 +602,18 @@ watch(
|
||||
}
|
||||
)
|
||||
|
||||
const handleSourceChange = () => {
|
||||
let pqSource = pqSourceArray.value?.find(item => item.value === formContent.sourceIds)
|
||||
|
||||
if (pqSource?.label.includes('FLUKE')) {
|
||||
|
||||
let pqScript = pqScriptArray.value?.find(item => item.value === formContent.scriptId)
|
||||
if (pqScript?.fluke!=1) {
|
||||
formContent.scriptId = ''
|
||||
ElMessage.warning('专用检测脚本只能使用福禄克检测源!')
|
||||
}
|
||||
}
|
||||
}
|
||||
// 清空formContent
|
||||
const resetFormContent = () => {
|
||||
Object.assign(formContent, {
|
||||
@@ -1199,7 +1215,8 @@ function pqToArray() {
|
||||
const sourceArray2 = Array.isArray(pqScriptList.value) ? pqScriptList.value : []
|
||||
pqScriptArray.value = sourceArray2.map(item => ({
|
||||
label: item.name || '',
|
||||
value: item.id || ''
|
||||
value: item.id || '',
|
||||
fluke:item.fluke
|
||||
}))
|
||||
|
||||
const sourceArray3 = Array.isArray(pqErrSysList.value) ? pqErrSysList.value : []
|
||||
|
||||
Reference in New Issue
Block a user