Browse Source

修改bug

master
songguoqiang 12 months ago
parent
commit
d4e2e4abf9
  1. 1
      package.json
  2. 2
      src/views/detection/records/records.data.ts
  3. 47
      src/views/tjanalysis/zlanalysis/index.vue

1
package.json

@ -29,6 +29,7 @@
"camunda-bpmn-moddle": "^7.0.1", "camunda-bpmn-moddle": "^7.0.1",
"cropperjs": "^1.6.1", "cropperjs": "^1.6.1",
"crypto-js": "^4.1.1", "crypto-js": "^4.1.1",
"datav-vue3": "^1.0.0",
"dayjs": "^1.11.10", "dayjs": "^1.11.10",
"diagram-js": "^12.3.0", "diagram-js": "^12.3.0",
"docx-preview": "^0.1.4", "docx-preview": "^0.1.4",

2
src/views/detection/records/records.data.ts

@ -38,7 +38,7 @@ export const Records = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '项目编号', label: '物料编号',
field: 'itemCode', field: 'itemCode',
isSearch: true, isSearch: true,
search: { search: {

47
src/views/tjanalysis/zlanalysis/index.vue

@ -8,33 +8,36 @@
style="margin-bottom: -17px" style="margin-bottom: -17px"
label-width="100px" label-width="100px"
> >
<el-form-item label="项目" style="width: calc(20% - 32px)"> <el-form-item label="项目名称" style="width: calc(20% - 32px)">
<el-select <el-select
v-model="queryParams.proCode" v-model="queryParams.proCode"
placeholder="请选择项目" placeholder="请选择项目"
clearable clearable
filterable
style="width: 100%" style="width: 100%"
@change="detectionProjectChange" @change="detectionProjectChange"
> >
<el-option v-for=" (item) in projectList" :key="item" :label="item.name" :value="item.code" /> <el-option v-for=" (item) in projectList" :key="item" :label="item.name" :value="item.code" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="物料" style="width: calc(20% - 32px)"> <el-form-item label="物料编码" style="width: calc(20% - 32px)">
<el-select <el-select
v-model="queryParams.itemCode" v-model="queryParams.itemCode"
placeholder="请选择物料" placeholder="请选择物料编码"
clearable clearable
filterable
style="width: 100%" style="width: 100%"
@change="detectionItemChange" @change="detectionItemChange"
> >
<el-option v-for=" (item) in itemList" :key="item" :label="item.name" :value="item.code" /> <el-option v-for=" (item) in itemList" :key="item" :label="item.code" :value="item.code" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="检测模版类型" style="width: calc(20% - 32px)"> <el-form-item label="检测模版类型" style="width: calc(20% - 36px)">
<el-select <el-select
v-model="queryParams.detectionType" v-model="queryParams.detectionType"
placeholder="请选择检测模版类型" placeholder="请选择检测模版类型"
clearable clearable
filterable
style="width: 100%" style="width: 100%"
@change="detectionItemChange" @change="detectionItemChange"
> >
@ -46,6 +49,7 @@
v-model="queryParams.detectionItemContentId" v-model="queryParams.detectionItemContentId"
placeholder="请选择检测项" placeholder="请选择检测项"
clearable clearable
filterable
style="width: 100%" style="width: 100%"
@change="deItemChange" @change="deItemChange"
> >
@ -494,7 +498,7 @@ const detectionProjectChange = async()=> {
} }
queryParams.detectionItemContentId = null queryParams.detectionItemContentId = null
const _detectionItemList = await TemplateItemDetailsApi.selectDetectionItems(queryParams.itemCode , queryParams.detectionType) const _detectionItemList = await TemplateItemDetailsApi.selectDetectionItems(queryParams.itemCode , queryParams.detectionType)
if (_detectionItemList != null && _detectionItemList.length != 0) { if (_detectionItemList != null && _detectionItemList.length > 0) {
detectionItemList.value = _detectionItemList detectionItemList.value = _detectionItemList
queryParams.detectionItemContentId = _detectionItemList[0].value queryParams.detectionItemContentId = _detectionItemList[0].value
} }
@ -506,7 +510,7 @@ const detectionItemChange = async()=> {
queryParams.detectionItemContentId = null queryParams.detectionItemContentId = null
isShow.value=false isShow.value=false
const _detectionItemList = await TemplateItemDetailsApi.selectDetectionItems(queryParams.itemCode , queryParams.detectionType) const _detectionItemList = await TemplateItemDetailsApi.selectDetectionItems(queryParams.itemCode , queryParams.detectionType)
if (_detectionItemList != null && _detectionItemList.length != 0) { if (_detectionItemList != null && _detectionItemList.length > 0) {
detectionItemList.value = _detectionItemList detectionItemList.value = _detectionItemList
queryParams.detectionItemContentId = _detectionItemList[0].value queryParams.detectionItemContentId = _detectionItemList[0].value
if(queryParams.detectionType =='CHROMATIC_ABERRATION'){// if(queryParams.detectionType =='CHROMATIC_ABERRATION'){//
@ -541,6 +545,7 @@ const changTabIndex = async (tIndexV) => {
tabIndex.value = tIndexV tabIndex.value = tIndexV
queryParams.ecTab = tIndexV queryParams.ecTab = tIndexV
const dvDatas = await ZlnalysisAPI.getZcnlEcharts(queryParams) const dvDatas = await ZlnalysisAPI.getZcnlEcharts(queryParams)
debugger
if (dvDatas != null) { if (dvDatas != null) {
if (tIndexV == 0) { if (tIndexV == 0) {
setChart1(dvDatas.menMap) setChart1(dvDatas.menMap)
@ -557,21 +562,24 @@ const changTabIndex = async (tIndexV) => {
setChart5(dvDatas.jzMap) setChart5(dvDatas.jzMap)
ec5Loading.value = false ec5Loading.value = false
} }
}else{
ec1Loading.value = false
ec2Loading.value = false
ec3Loading.value = false
ec4Loading.value = false
ec5Loading.value = false
} }
} }
const initData = async () => { const initData = async () => {
await resetDats() await resetDats()
const _datas = await ZlnalysisAPI.getZcnlInfos(queryParams) const _datas = await ZlnalysisAPI.getZcnlInfos(queryParams)
console.log(_datas , 'daikun') changTabIndex(0)
if (_datas != null) { if (_datas != null) {
datas.tvList = _datas.tvList datas.tvList = _datas.tvList
datas.tzrv = _datas.tzrv datas.tzrv = _datas.tzrv
setChart1(_datas.menMap) setChart1(_datas.menMap)
setChart2(_datas.ranMap) setChart2(_datas.ranMap)
} else {
setChart1(null)
setChart2(null)
} }
pnaLoading.value = false pnaLoading.value = false
@ -582,28 +590,31 @@ const initData = async () => {
const initQuerys = 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) { if (dictOptions != null && dictOptions.length > 0) {
queryParams.detectionType = dictOptions[0].value + '' queryParams.detectionType = dictOptions[0].value + ''
} }
const _projectList = await ProjecAPI.selectAllPros() const _projectList = await ProjecAPI.selectAllPros()
if (_projectList != null && _projectList.length != 0) { if (_projectList != null && _projectList.length > 0) {
projectList.value = _projectList projectList.value = _projectList
} }
const _itemList = await ItembasicApi.selectItems() const _itemList = await ItembasicApi.selectItems()
if (_itemList != null && _itemList.length != 0) { if (_itemList != null && _itemList.length > 0) {
itemList.value = _itemList itemList.value = _itemList
queryParams.itemCode = _itemList[0].code queryParams.itemCode = _itemList[0].code
} }
const _detectionItemList = await TemplateItemDetailsApi.selectDetectionItems(queryParams.itemCode , queryParams.detectionType) const _detectionItemList = await TemplateItemDetailsApi.selectDetectionItems(queryParams.itemCode , queryParams.detectionType)
if (_detectionItemList != null && _detectionItemList.lenght != 0) { if (_detectionItemList != null && _detectionItemList.lenght > 0) {
detectionItemList.value = _detectionItemList detectionItemList.value = _detectionItemList
queryParams.detectionItemContentId = _detectionItemList[0].value queryParams.detectionItemContentId = _detectionItemList[0].value
} }
if(queryParams.detectionType =='CHROMATIC_ABERRATION'){// if(queryParams.detectionType =='CHROMATIC_ABERRATION'){//
lineNumberList.value = await TemplateItemDetailsApi.selectDetectionLineNumber(queryParams.itemCode , queryParams.detectionType) lineNumberList.value = await TemplateItemDetailsApi.selectDetectionLineNumber(queryParams.itemCode , queryParams.detectionType)
if(lineNumberList.value!=null&&lineNumberList.value.length>0){
queryParams.lineNumber = lineNumberList.value[0].lineNumber queryParams.lineNumber = lineNumberList.value[0].lineNumber
}
isShow.value = true; isShow.value = true;
} }
initData() initData()
@ -618,6 +629,12 @@ function resetDats() {
ec4Loading.value = true ec4Loading.value = true
ec5Loading.value = true ec5Loading.value = true
setChart1(null)
setChart2(null)
setChart3(null)
setChart4(null)
setChart5(null)
datas.tvList = null datas.tvList = null
datas.tzrv = null datas.tzrv = null
datas.echatrtData = null datas.echatrtData = null

Loading…
Cancel
Save