This commit is contained in:
zk
2023-12-21 09:02:45 +08:00
parent 1c65f18bab
commit 9230f659c1
34 changed files with 473 additions and 327 deletions
@@ -56,7 +56,8 @@
function tableReload() {
apiParams.value = {
...getParams(),
flag: 0,
userId: props.userId,
pageSize: 10,
pageNo: 1,
};
@@ -84,8 +85,6 @@
status.value = s;
if (s) {
initEchart('0');
} else {
tableReload();
}
}
@@ -57,7 +57,8 @@
function tableReload() {
apiParams.value = {
...getParams(),
flag: 0,
userId: props.userId,
pageSize: 10,
pageNo: 1,
};
@@ -87,8 +88,6 @@
nextTick(() => {
initEchart('0');
});
} else {
tableReload();
}
}
@@ -52,7 +52,8 @@
function tableReload() {
apiParams.value = {
...getParams(),
flag: 0,
userId: props.userId,
pageSize: 10,
pageNo: 1,
};
@@ -55,7 +55,8 @@
function tableReload() {
apiParams.value = {
...getParams(),
flag: 0,
userId: props.userId,
pageSize: 10,
pageNo: 1,
};
@@ -83,8 +84,6 @@
nextTick(() => {
initEchart('0');
});
} else {
tableReload();
}
}
@@ -15,7 +15,7 @@
style="display: flex; justify-content: center; margin-top: 20px; align-items: center; position: relative"
:style="{ minHeight: props.showList ? '' : '30px' }"
>
<div style="position: absolute; left: 10px; display: flex; align-items: center" v-if="!props.showList">
<div class="fff" style="position: absolute; left: 10px; display: flex; align-items: center; color: #fff" v-if="!props.showList">
锻炼类型
<!-- <JDictSelectTag-->
<!-- v-model:value="motionType"-->
@@ -24,6 +24,13 @@
<!-- dictCode="watch_exercise_type"-->
<!-- @change="changeSelect"-->
<!-- />-->
<a-select
v-model:value="motionType"
class="type-select"
:field-names="montionFieldNames"
:options="selectOptions"
@change="changeSelect"
></a-select>
</div>
<div class="item-picker" style="display: flex; font-size: 20px" v-if="showStatus && props.showList">
<span style="margin: 0 0 0 5px; cursor: pointer" @click="changeDate('0')">&lt;</span>
@@ -52,13 +59,14 @@
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { nextTick, onMounted, ref } from 'vue';
import chartImg from '/@/assets/images/chart.png';
import listImg from '/@/assets/images/list.png';
import dayjs from 'dayjs';
import { propTypes } from '/@/utils/propTypes';
// import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { userDataDayByYearApi } from '/@/components/secondaryScreen/secondMap/secondMapApi.ts';
import { getCodeInfo, montionFieldNames } from '/@/api/dictCode.ts';
const props = defineProps({
showOne: propTypes.bool.def(true),
@@ -66,6 +74,21 @@
keyType: propTypes.string.def(''),
userId: propTypes.string.def(''),
});
const selectOptions = ref([]);
onMounted(() => {
getOptions();
});
async function getOptions() {
try {
const { code, result } = await getCodeInfo();
if (code == 0) {
nextTick(() => {
selectOptions.value = result?.records;
});
}
} catch {}
}
const emit = defineEmits(['changeV', 'changeShowStatus', 'changeM']);
@@ -93,7 +116,7 @@
};
userDataDayByYearApi(params)
.then((res) => {
infoData.value = res.month;
infoData.value = res?.result?.month;
})
.catch(() => {});
}
@@ -239,4 +262,4 @@
border: 1px solid #1890ff;
border-radius: 50px;
}
</style>
</style>
@@ -60,7 +60,8 @@
function tableReload() {
nextTick(() => {
apiParams.value = {
...getParams(),
flag: 0,
userId: props.userId,
pageSize: 10,
pageNo: 1,
};
@@ -93,8 +94,6 @@
nextTick(() => {
initEchart('0');
});
} else {
tableReload();
}
}
@@ -130,22 +129,29 @@
echart = echarts.init(chartRef.value);
const option = {
title: {},
legend: {},
legend: {
textStyle: {
color: '#fff',
},
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
},
textStyle: {
color: '#fff',
},
backgroundColor: 'rgba(50,50,50,0.7)',
borderColor: '#1b7ef2',
formatter: function (params) {
let tar1 = params[1];
let tar = params[0];
// let tar = params[1];
// return (tar1.value > 0 ? '短睡' : '长睡') + '<br/>' + tar.seriesName + ' : ' + tar.value;
let str = '';
if (type.value === 1) {
str = tar1.value > 0 ? '睡' : '睡';
str = tar1.value > 0 ? '睡' : '睡';
} else {
str = '睡' + ' : ' + (tar.value ? tar.value : 0) + '<br/>' + '睡' + ' : ' + (tar1.value ? tar1.value : 0);
str = '睡' + ' : ' + (tar.value ? tar.value : 0) + '<br/>' + '睡' + ' : ' + (tar1.value ? tar1.value : 0);
}
return str;
},
@@ -159,14 +165,18 @@
xAxis: {
type: 'category',
splitLine: { show: false },
data: xArr,
data: xArr || ['', ''],
axisLabel: {
color: '#fff',
},
min: 5,
},
yAxis: {
show: false,
},
series: [
{
name: '睡',
name: '睡',
type: 'bar',
barMaxWidth: '20px',
itemStyle: {
@@ -174,16 +184,10 @@
borderWidth: 0,
color: '#5087ec',
},
// emphasis: {
// itemStyle: {
// borderColor: '#68bbc4',
// color: '#68bbc4',
// },
// },
data: yArr,
},
{
name: '睡',
name: '睡',
barMaxWidth: '20px',
itemStyle: {
borderColor: '#85d0dc',
@@ -234,4 +238,4 @@
initEchart('0');
});
</script>
<style scoped lang="less"></style>
<style scoped lang="less"></style>
@@ -59,7 +59,8 @@
function tableReload() {
apiParams.value = {
...getParams(),
flag: 0,
userId: props.userId,
pageSize: 10,
pageNo: 1,
};
@@ -89,8 +90,6 @@
nextTick(() => {
initEchart('0');
});
} else {
tableReload();
}
}
@@ -123,7 +122,11 @@
backgroundColor: 'rgba(50,50,50,0.7)',
borderColor: '#1b7ef2',
},
legend: {},
legend: {
textStyle: {
color: '#fff',
},
},
xAxis: {
type: 'category',
boundaryGap: true,
@@ -56,7 +56,8 @@
function tableReload() {
apiParams.value = {
...getParams(),
flag: 0,
userId: props.userId,
pageSize: 10,
pageNo: 1,
};
@@ -86,8 +87,6 @@
nextTick(() => {
initEchart('0');
});
} else {
tableReload();
}
}
@@ -201,4 +200,4 @@
initEchart('0');
});
</script>
<style scoped lang="less"></style>
<style scoped lang="less"></style>
@@ -21,13 +21,19 @@
}
}
.fff {
color: #fff;
}
:deep(.ant-radio-button-checked) {
background-color: #1B7EF2 !important;
border-color: #1B7EF2 !important;
}
:deep(.ant-radio-button-wrapper-checked) {
border-color: #1B7EF2 !important;
}
:deep(.ant-radio-button-wrapper) {
background-color: #d8dce5 !important;
border-color: #d8dce5 !important;
@@ -29,6 +29,8 @@
import UserInfoModal from '/@/components/secondaryScreen/secondMap/components/userInfoModal/userInfoModal.vue';
import { columns } from '/@/components/secondaryScreen/secondMap/secondMapHooks.ts';
import { getUserListByDeptId } from '/@/components/secondaryScreen/secondMap/secondMapApi.ts';
const emit = defineEmits(['close']);
//分页相关
const current = ref(1);
const pageSize = ref(10);
@@ -61,6 +63,7 @@
function closeModal() {
visible.value = false;
emit('close');
}
async function getRecords(id: string) {
@@ -76,7 +79,6 @@
const userInfoModal = ref();
function openUserInfoModal(item) {
console.log('item', item);
const data = {
...item,
username: item?.realName,
@@ -9,32 +9,32 @@
</div>
<div v-show="false" id="container"></div>
<div v-show="false" id="panel"></div>
<div class="footer-data" v-show="isShow" style="--moveUp: 50px; --moveDown: -90px" :class="className">
<div v-show="isShow" :class="className" class="footer-data" style="--moveUp: 50px; --moveDown: -90px">
<div class="empty-png"></div>
<div
class="col-item nowrap"
v-for="item in footerList"
:style="{ cursor: item.key == 'allotDeviceNum' ? 'pointer' : 'default' }"
class="col-item nowrap"
@click="openWatchList(item)"
>
<div class="col-text">{{ item?.name }}</div>
<div class="col-value nowrap" :title="item.value">{{ item?.value }}</div>
<div :title="item.value" class="col-value nowrap">{{ item?.value }}</div>
</div>
</div>
<div
v-show="isShowAlarm"
:class="isShowAlarm ? 'slide-top' : 'slide-bottom'"
class="footer-dialog-con"
style="--moveUp: 120px; --moveDown: -120px"
:class="isShowAlarm ? 'slide-top' : 'slide-bottom'"
v-show="isShowAlarm"
>
<FooterDialog :detailLeft="detailLeft" :detailRight="detailRight" @closeDialog="closeDialog"></FooterDialog>
</div>
</div>
<WatchListDialog ref="watchDialogRef"></WatchListDialog>
<WatchListDialog ref="watchDialogRef" @close="closeWatch"></WatchListDialog>
</div>
</template>
<script lang="ts" setup>
import { onMounted, ref } from 'vue';
import { onMounted, ref, watch } from 'vue';
import { Map } from '/@/assets/mapUtils/map';
import $bus from '/@/utils/bus.ts';
import FooterDialog from '/@/components/secondaryScreen/secondMap/components/footerDialog.vue';
@@ -109,6 +109,12 @@
} catch {}
}
watch(
() => props.orgCode,
() => {
getMapList();
}
);
const { detailLeft, detailRight, setDetail } = useAlarmDetail();
onMounted(() => {
init();
@@ -121,12 +127,18 @@
});
/**
*@desc 预警弹窗关闭
*@desc 底部信息
*/
function closeDialog() {
setIsShowAlarm(!isShowAlarm.value);
Map.clearMarker();
}
/**
* @desc 预警弹窗关闭
*/
function closeWatch() {}
function drawMarker(data: any) {
const { lon, lat } = data;
if (!lon || !lat) return;
@@ -24,7 +24,8 @@ export function useDepart() {
async function getOptionData() {
const { result, code } = await allSecondaryDeparts();
if (code == 200) {
setOption(result);
let res = [{ departName: '长庆油田', orgCode: 'A01' }, ...result];
setOption(res);
}
}