diff --git a/.env.development b/.env.development
index ba1835b..a0af6a8 100644
--- a/.env.development
+++ b/.env.development
@@ -1,4 +1,4 @@
# 开发环境
# 请求接口地址
VITE_REQUEST_BASE_URL = https://36.112.48.190
-#VITE_REQUEST_BASE_URL = http://10.75.166.6:8080
+#VITE_REQUEST_BASE_URL = http://10.75.15.247:8080
diff --git a/pages/views/renliziyuan/renyuanxinxi/qttongji.vue b/pages/views/renliziyuan/renyuanxinxi/qttongji.vue
index 5e7952b..339a860 100644
--- a/pages/views/renliziyuan/renyuanxinxi/qttongji.vue
+++ b/pages/views/renliziyuan/renyuanxinxi/qttongji.vue
@@ -178,6 +178,7 @@
const fieldValues = ref([]); //字段值
const fieldTexts = ref([]); //字段值
const chartOption = ref({});
+ const orgType = ref(''); //记录单位层级 by 闵
const chartTitle = computed(() => {
return selectedOrgCodeLabel.value + '人员(' + selectedFieldLabel.value + ')分组统计';
@@ -594,6 +595,8 @@
// 递归计算每个根节点的data
rootNodes.forEach((root) => computeData(root));
+
+ console.log(rootNodes)
return rootNodes;
// console.log('rootNodes', rootNodes);
// // 转换为目标格式
@@ -703,16 +706,24 @@
console.log(error);
}
- // console.log('全部', result);
+ console.log('全部', result);
return result;
};
// 获取统计数据 then filter
const fetchStatisticsData = async () => {
+ console.log(selectedOrgCode)
if (!selectedOrgCode.value || !selectedField.value) return;
let res = [];
chartData.value = [];
try {
+ //这里添加一个层级字段,并避免 厂机关A01A01A01 orgType by 闵
+ var tempOrgType = '1';
+ if(selectedOrgCode.value.includes('A01A01A01')){
+ tempOrgType = '1';
+ }else{
+ tempOrgType = orgType
+ }
if (selectedField.value === 'zjmc') {
console.log(dictCode.value);
console.log(dictData.value);
@@ -721,14 +732,16 @@
field: selectedField.value,
dictCode: dictCode.value,
fieldisDict: fieldisDict.value,
- typeOfWorkList: dictData.value
+ typeOfWorkList: dictData.value,
+ orgType: tempOrgType.value
});
} else {
res = await cxcRyDatAstatistics({
orgCode: selectedOrgCode.value,
field: selectedField.value,
dictCode: dictCode.value,
- fieldisDict: fieldisDict.value
+ fieldisDict: fieldisDict.value,
+ orgType: tempOrgType.value
});
}
@@ -743,7 +756,7 @@
}
//按单位进行分组
orgCodeGroupData.value = groupByOrgCode(selectedOrgCode.value, res.result);
- // console.log(orgCodeGroupData.value);
+ console.log(orgCodeGroupData.value);
//将数据转换成echart格式
const temp = transformData(selectedOrgCode.value, res.result);
@@ -752,10 +765,13 @@
chartDataCount.value = chartData.value.length;
console.log(chartData.value);
- updateChart(chartData.value);
+ // updateChart(chartData.value);
} else {
- // chartData.value = temp[0];
+ var tempArr = [];
+ tempArr.push(temp[0])
+ chartData.value =tempArr;
}
+ updateChart(chartData.value);
}
} catch (error) {
console.error('获取统计数据失败:', error);
@@ -782,7 +798,9 @@
const onOrgCodeChange = (e, data) => {
personnelList.value = [];
selectedOrgCode.value = e;
- // console.log(data.value.title);
+ console.log(e)
+ console.log(data);
+ orgType.value = data.value.orgType; //赋值层级 by 闵
selectedOrgCodeLabel.value = data.value.title;
fetchStatisticsData();
};
diff --git a/uni_modules/trq-depart-select/components/trq-depart-select/trq-depart-select.vue b/uni_modules/trq-depart-select/components/trq-depart-select/trq-depart-select.vue
index 9e3e3a3..2e7dae6 100644
--- a/uni_modules/trq-depart-select/components/trq-depart-select/trq-depart-select.vue
+++ b/uni_modules/trq-depart-select/components/trq-depart-select/trq-depart-select.vue
@@ -2,13 +2,13 @@
+ :map="{'text':'title','value':'id'}" class="no-wrap-picker">
@@ -30,6 +30,7 @@
import {
reactive,
ref,
+ watch,
defineEmits,
defineProps
} from 'vue';
@@ -46,15 +47,29 @@
let selectDepartID = ref("") //当前选中的单位ID
let selectDepartIDS = ref([]) //选中的级联单位ID数组
let tempSelectDepartID = ref("") //临时选择的单位ID
+ let depart = ref(null);
let departInfo = ref({}) //"单位的全部信息"
let $emit = defineEmits(['change']);
+
+
+ watch(
+ tempSelectDepartID,
+ (newVal,oldVal)=>{ //通过监听触发change by 闵
+ console.log(newVal)
+ $emit('change', newVal, departInfo)
+ },{
+ immediate:true,
+ deep:true
+ }
+ )
+
const getDepartList = () => {
queryMyDeptTreeListApi().then((res) => {
if (res.success) {
- // console.log(res)
+ console.log(res)
departList.value = res.result
}
}).catch((err) => {
@@ -62,22 +77,28 @@
})
}
const onnodeclick = ((e) => {
+ console.log(e)
departInfo.value = e;
- if (props.returnCodeOrID = "orgCode") {
+ if (props.returnCodeOrID == "orgCode") {
tempSelectDepartID.value = e.orgCode
} else {
tempSelectDepartID.value = e.value
}
-
+ // if(!depart.value.isOpened){//如果页面已经关闭 就触发change方法 by 闵
+ // $emit('change', selectDepartID.value, departInfo)
+ // }
})
const onchange = ((e) => {
- $emit('change', e.detail.value[e.detail.value.length - 1].value, {})
+ console.log(e)
+ selectDepartID.value = e.detail.value[e.detail.value.length - 1].value
+ // $emit('change', e.detail.value[e.detail.value.length - 1].value, {})
})
const onpopupclosed = ((e) => {
+ console.log(e)
selectDepartID.value = tempSelectDepartID.value
- $emit('change', selectDepartID.value, departInfo)
+ // $emit('change', selectDepartID.value, departInfo)
})
onLoad((e) => {
getDepartList();
diff --git a/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.uvue b/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.uvue
index dcbfd5f..4b6510f 100644
--- a/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.uvue
+++ b/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.uvue
@@ -22,8 +22,8 @@
-
-
+
+
diff --git a/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue b/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue
index 179a4e0..b6a260e 100644
--- a/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue
+++ b/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue
@@ -25,8 +25,8 @@
-
-
+
+