diff --git a/package.json b/package.json index cd06e68..f38aa43 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "camunda-bpmn-moddle": "^7.0.1", "cropperjs": "^1.6.1", "crypto-js": "^4.1.1", + "datav-vue3": "^1.0.0", "dayjs": "^1.11.10", "diagram-js": "^12.3.0", "docx-preview": "^0.1.4", diff --git a/src/views/detection/records/records.data.ts b/src/views/detection/records/records.data.ts index 046b142..658e22d 100644 --- a/src/views/detection/records/records.data.ts +++ b/src/views/detection/records/records.data.ts @@ -38,7 +38,7 @@ export const Records = useCrudSchemas(reactive([ }, }, { - label: '项目编号', + label: '物料编号', field: 'itemCode', isSearch: true, search: { diff --git a/src/views/tjanalysis/zlanalysis/index.vue b/src/views/tjanalysis/zlanalysis/index.vue index 51014ce..296eaf5 100644 --- a/src/views/tjanalysis/zlanalysis/index.vue +++ b/src/views/tjanalysis/zlanalysis/index.vue @@ -8,33 +8,36 @@ style="margin-bottom: -17px" label-width="100px" > - + - + - + - + @@ -46,6 +49,7 @@ v-model="queryParams.detectionItemContentId" placeholder="请选择检测项" clearable + filterable style="width: 100%" @change="deItemChange" > @@ -494,7 +498,7 @@ const detectionProjectChange = async()=> { } queryParams.detectionItemContentId = null const _detectionItemList = await TemplateItemDetailsApi.selectDetectionItems(queryParams.itemCode , queryParams.detectionType) - if (_detectionItemList != null && _detectionItemList.length != 0) { + if (_detectionItemList != null && _detectionItemList.length > 0) { detectionItemList.value = _detectionItemList queryParams.detectionItemContentId = _detectionItemList[0].value } @@ -506,7 +510,7 @@ const detectionItemChange = async()=> { queryParams.detectionItemContentId = null isShow.value=false const _detectionItemList = await TemplateItemDetailsApi.selectDetectionItems(queryParams.itemCode , queryParams.detectionType) - if (_detectionItemList != null && _detectionItemList.length != 0) { + if (_detectionItemList != null && _detectionItemList.length > 0) { detectionItemList.value = _detectionItemList queryParams.detectionItemContentId = _detectionItemList[0].value if(queryParams.detectionType =='CHROMATIC_ABERRATION'){//色差显示行号下拉选 @@ -541,6 +545,7 @@ const changTabIndex = async (tIndexV) => { tabIndex.value = tIndexV queryParams.ecTab = tIndexV const dvDatas = await ZlnalysisAPI.getZcnlEcharts(queryParams) + debugger if (dvDatas != null) { if (tIndexV == 0) { setChart1(dvDatas.menMap) @@ -557,21 +562,24 @@ const changTabIndex = async (tIndexV) => { setChart5(dvDatas.jzMap) ec5Loading.value = false } + }else{ + ec1Loading.value = false + ec2Loading.value = false + ec3Loading.value = false + ec4Loading.value = false + ec5Loading.value = false } } const initData = async () => { await resetDats() const _datas = await ZlnalysisAPI.getZcnlInfos(queryParams) - console.log(_datas , 'daikun') + changTabIndex(0) if (_datas != null) { datas.tvList = _datas.tvList datas.tzrv = _datas.tzrv setChart1(_datas.menMap) setChart2(_datas.ranMap) - } else { - setChart1(null) - setChart2(null) } pnaLoading.value = false @@ -582,28 +590,31 @@ const initData = async () => { const initQuerys = async () => { const dictOptions = await getIntDictOptions(DICT_TYPE.ITEMBASIC_TYPE)//查询物料类型 - if (dictOptions != null && dictOptions.length != 0) { + if (dictOptions != null && dictOptions.length > 0) { queryParams.detectionType = dictOptions[0].value + '' } const _projectList = await ProjecAPI.selectAllPros() - if (_projectList != null && _projectList.length != 0) { + if (_projectList != null && _projectList.length > 0) { projectList.value = _projectList } const _itemList = await ItembasicApi.selectItems() - if (_itemList != null && _itemList.length != 0) { + if (_itemList != null && _itemList.length > 0) { itemList.value = _itemList queryParams.itemCode = _itemList[0].code } const _detectionItemList = await TemplateItemDetailsApi.selectDetectionItems(queryParams.itemCode , queryParams.detectionType) - if (_detectionItemList != null && _detectionItemList.lenght != 0) { + if (_detectionItemList != null && _detectionItemList.lenght > 0) { detectionItemList.value = _detectionItemList queryParams.detectionItemContentId = _detectionItemList[0].value } if(queryParams.detectionType =='CHROMATIC_ABERRATION'){//色差显示行号下拉选 lineNumberList.value = await TemplateItemDetailsApi.selectDetectionLineNumber(queryParams.itemCode , queryParams.detectionType) - queryParams.lineNumber = lineNumberList.value[0].lineNumber + if(lineNumberList.value!=null&&lineNumberList.value.length>0){ + queryParams.lineNumber = lineNumberList.value[0].lineNumber + } isShow.value = true; + } initData() @@ -618,6 +629,12 @@ function resetDats() { ec4Loading.value = true ec5Loading.value = true + setChart1(null) + setChart2(null) + setChart3(null) + setChart4(null) + setChart5(null) + datas.tvList = null datas.tzrv = null datas.echatrtData = null