From 8fdd04dca4a054ea545354e4cf20810418f3f1ef Mon Sep 17 00:00:00 2001
From: songguoqiang <765017469@qq.com>
Date: Thu, 23 Nov 2023 13:45:37 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=A3=80=E6=B5=8B=E8=AE=B0?=
=?UTF-8?q?=E5=BD=95=E7=BA=A7=E8=81=94=E4=BB=A5=E5=8F=8Aecharts=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=E6=A0=87=E5=87=86=E7=BA=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/spc/itembasic/index.ts | 4 +
src/api/spc/project/index.ts | 2 +-
.../ImportForm/src/DetecImportForm.vue | 412 ++++++++++++++++++
src/components/ImportForm/src/ImportForm.vue | 112 -----
src/views/Login/components/LoginForm.vue | 2 +-
src/views/Login/components/MobileForm.vue | 2 +-
src/views/detection/records/index.vue | 5 +-
src/views/tjanalysis/zlanalysis/index.vue | 62 ++-
8 files changed, 470 insertions(+), 131 deletions(-)
create mode 100644 src/components/ImportForm/src/DetecImportForm.vue
diff --git a/src/api/spc/itembasic/index.ts b/src/api/spc/itembasic/index.ts
index fd23503..f50d2f9 100644
--- a/src/api/spc/itembasic/index.ts
+++ b/src/api/spc/itembasic/index.ts
@@ -84,4 +84,8 @@ export const importTemplate = () => {
export const selectItems = async () => {
return await request.get({ url: `/spc/itembasic/selectItems`})
+}
+
+export const selectItemsByProjectCode = async (code:String) => {
+ return await request.get({ url: `/spc/itembasic/selectItemsByProjectCode?code=` + code})
}
\ No newline at end of file
diff --git a/src/api/spc/project/index.ts b/src/api/spc/project/index.ts
index a43adae..288afb6 100644
--- a/src/api/spc/project/index.ts
+++ b/src/api/spc/project/index.ts
@@ -55,6 +55,6 @@ export const importTemplate = () => {
return request.download({ url: '/spc/project/get-import-template' })
}
-export const selectAllPros = async () => {
+export const selectAllPros = async () => {//查询所有的项目
return await request.get({ url: `/spc/project/selectAllPros`})
}
\ No newline at end of file
diff --git a/src/components/ImportForm/src/DetecImportForm.vue b/src/components/ImportForm/src/DetecImportForm.vue
new file mode 100644
index 0000000..6ef2ff9
--- /dev/null
+++ b/src/components/ImportForm/src/DetecImportForm.vue
@@ -0,0 +1,412 @@
+
+
+
+
+
+
+
diff --git a/src/components/ImportForm/src/ImportForm.vue b/src/components/ImportForm/src/ImportForm.vue
index 37864f2..a1561eb 100644
--- a/src/components/ImportForm/src/ImportForm.vue
+++ b/src/components/ImportForm/src/ImportForm.vue
@@ -1,63 +1,6 @@
diff --git a/src/views/tjanalysis/zlanalysis/index.vue b/src/views/tjanalysis/zlanalysis/index.vue
index 777cbca..25493ac 100644
--- a/src/views/tjanalysis/zlanalysis/index.vue
+++ b/src/views/tjanalysis/zlanalysis/index.vue
@@ -14,6 +14,7 @@
placeholder="请选择项目"
clearable
style="width: 100%"
+ @change="detectionProjectChange"
>
@@ -230,6 +231,7 @@ const tabIndex = ref(0)
// 设置延期未交付数据
function setChart1(datavv) {
+ console.info("datavv",datavv)
let chart = echart.init(document.getElementById('myEcharts1'), 'light')
// 把配置和数据放这里
chart.setOption({
@@ -355,7 +357,6 @@ function setChart2(rangeData) {
}
}
function setChart3(ztData) {
- // console.log(ztData , 'daikun')
if (ztData != null) {
myEcharts3Ref.value.open(ztData.datas , ztData.downLimit , ztData.upLimit)
}
@@ -370,11 +371,11 @@ function setChart4(ybData) {
tooltip: {
trigger: 'axis'
},
- // legend: {
- // data: ['Highest', 'Lowest'],
- // top: '0',
- // right: '3%'
- // },
+ legend: {
+ data: ['标准上限', '标准下限'],
+ top: '0',
+ right: '3%'
+ },
grid: {
left: '3%',
right: '4%',
@@ -394,7 +395,17 @@ function setChart4(ybData) {
name: '检测值',
data: ybData != null ? ybData.yDatas : [],
type: 'line'
- }
+ },
+ {
+ name: '标准上限',
+ data: ybData != null ? ybData.bzsx : [],
+ type: 'line'
+ },
+ {
+ name: '标准下限',
+ data: ybData != null ? ybData.bzxx : [],
+ type: 'line'
+ },
]
})
window.onresize = function () {
@@ -412,11 +423,11 @@ function setChart5(jzData) {
tooltip: {
trigger: 'axis'
},
- // legend: {
- // data: ['Highest', 'Lowest'],
- // top: '0',
- // right: '3%'
- // },
+ legend: {
+ data: ['均值上限', '均值下限'],
+ top: '0',
+ right: '3%'
+ },
grid: {
left: '3%',
right: '4%',
@@ -436,6 +447,16 @@ function setChart5(jzData) {
name: '均值',
data: jzData != null ? jzData.yDatas : [],
type: 'line'
+ },
+ {
+ name: '均值上限',
+ data: jzData != null ? jzData.jzsx : [],
+ type: 'line'
+ },
+ {
+ name: '均值下限',
+ data: jzData != null ? jzData.jzxx : [],
+ type: 'line'
}
]
})
@@ -445,6 +466,20 @@ function setChart5(jzData) {
}
}
+
+const detectionProjectChange = async()=> {
+ if(queryParams.proCode==''){
+
+ }
+ queryParams.detectionItemContentId = null
+ const _detectionItemList = await TemplateItemDetailsApi.selectDetectionItems(queryParams.itemCode , queryParams.detectionType)
+ if (_detectionItemList != null && _detectionItemList.length != 0) {
+ detectionItemList.value = _detectionItemList
+ queryParams.detectionItemContentId = _detectionItemList[0].value
+ }
+ initData()
+}
+
const detectionItemChange = async()=> {
detectionItemList.value = null
queryParams.detectionItemContentId = null
@@ -474,7 +509,6 @@ const changTabIndex = async (tIndexV) => {
tabIndex.value = tIndexV
queryParams.ecTab = tIndexV
const dvDatas = await ZlnalysisAPI.getZcnlEcharts(queryParams)
- // console.log(dvDatas , '333333')
if (dvDatas != null) {
if (tIndexV == 0) {
setChart1(dvDatas.menMap)
@@ -515,7 +549,7 @@ const initData = async () => {
}
const initQuerys = async () => {
- const dictOptions = await getIntDictOptions(DICT_TYPE.ITEMBASIC_TYPE)
+ const dictOptions = await getIntDictOptions(DICT_TYPE.ITEMBASIC_TYPE)//查询物料类型
if (dictOptions != null && dictOptions.length != 0) {
queryParams.detectionType = dictOptions[0].value + ''
}