Explorar o código

关联分析-更新

lxh hai 3 meses
pai
achega
08ecc051ab
Modificáronse 1 ficheiros con 11 adicións e 4 borrados
  1. 11 4
      src/views/analysis/warningAnalysis/connectAnalysis/index.vue

+ 11 - 4
src/views/analysis/warningAnalysis/connectAnalysis/index.vue

@@ -6,7 +6,7 @@
           <div class="filter-section param-section">
             <span class="filter-label">煤矿名称:</span>
             <div class="param-selector">
-              <MineCascader style="width: 300px"></MineCascader>
+              <MineCascader style="width: 300px" @change="changeCascader"></MineCascader>
             </div>
           </div>
         </Col>
@@ -100,8 +100,10 @@ const goafId = ref('')//采空区id
 const goafOption = ref<any[]>([])//采空区列表
 const filteredData = ref<any[]>([])//曲线数据
 const mineStore = useMineStore();
-const { getMine, getMineCode, getMinePath, getMineTree } = storeToRefs(mineStore);
-const innerValue = computed(() => getMinePath.value.map((e) => e.fax));
+const { getDepartPath, getDepartTree, getDepartId, getMineCode } = storeToRefs(mineStore);
+// const innerValue = computed(() => getDepartPath.value.map((e) => e.fax));
+const innerValue = ref('')
+
 
 // Tree Key 与参数名映射(关键:关联树形节点和实际参数)
 const treeKeyToParamMap = computed(() => ({
@@ -160,6 +162,11 @@ const paramColorMap = computed(() => ({
 //     console.log(selectedParamsText.value, ' selectedParamsText')
 //   };
 
+
+function changeCascader(val) {
+  innerValue.value = val
+  console.log(innerValue.value, 'innerValue')
+}
 function changeTime(val) {
   dateRange.value[0] = val[0]
   dateRange.value[1] = val[1]
@@ -270,7 +277,7 @@ async function generateChart() {
 
 //获取采空区列表
 async function getGoafListData() {
-  let res = await getGoafList({ mineCode: innerValue.value[innerValue.value.length - 1] })
+  let res = await getGoafList({ mineCode: innerValue.value })
   if (res.length) {
     goafOption.value = res.map(el => {
       return {