Commit be8f6869 authored by hubaoshan's avatar hubaoshan

循环泵的音频波形图

parent 7eeb7f35
...@@ -33,19 +33,16 @@ const handleSizeChange = (val) => { ...@@ -33,19 +33,16 @@ const handleSizeChange = (val) => {
// 当前页改变时触发 // 当前页改变时触发
const handleCurrentChange = (val) => { const handleCurrentChange = (val) => {
Page.page = val; Page.page = val;
console.log('Page.page:',Page.page)
getDataByParams() getDataByParams()
}; };
const selectedRow = ref({}); const selectedRow = ref({});
const selectedRowIndex = ref(); const selectedRowIndex = ref();
// 高亮行
function selectRow(row) { function selectRow(row) {
const index = RecyclePumpData.value.indexOf(row) const index = RecyclePumpData.value.indexOf(row)
selectedRow.value = row; selectedRow.value = row;
selectedRowIndex.value = index; selectedRowIndex.value = index;
console.log('aaaaaaaaaaaaaaaaaa')
// playAudio()
} }
const audioPlayer = ref(null); const audioPlayer = ref(null);
...@@ -168,7 +165,7 @@ const props = defineProps({ ...@@ -168,7 +165,7 @@ const props = defineProps({
required: true required: true
} }
}); });
// 监听父组件传值(搜索条件)变化
watch( watch(
() => props.queryParams, () => props.queryParams,
(newData) => { (newData) => {
...@@ -183,7 +180,7 @@ watch( ...@@ -183,7 +180,7 @@ watch(
// getData() // getData()
// playAudio() // playAudio()
// } // }
// 查找最新数据
function getData(){ function getData(){
console.log('getData') console.log('getData')
const item = reactive({ const item = reactive({
...@@ -201,6 +198,7 @@ function getData(){ ...@@ -201,6 +198,7 @@ function getData(){
Page.rows = res.pageSize Page.rows = res.pageSize
}) })
} }
// 根据父传子的搜索条件 查数据(分页使用)
function getDataByParams(){ function getDataByParams(){
const item = { const item = {
page: Page.page, page: Page.page,
...@@ -227,7 +225,7 @@ function getDataByParams(){ ...@@ -227,7 +225,7 @@ function getDataByParams(){
Page.rows = res.pageSize Page.rows = res.pageSize
}) })
} }
/** 根据父传子的搜索条件 查数据*/
function getDataNew(item) { function getDataNew(item) {
getRecycleListNewData(item).then(res => { getRecycleListNewData(item).then(res => {
RecyclePumpData.value = res.rows RecyclePumpData.value = res.rows
...@@ -285,7 +283,7 @@ const handleSortChange = (data) => { ...@@ -285,7 +283,7 @@ const handleSortChange = (data) => {
Page.total = res.total Page.total = res.total
}) })
}; };
// 暴露方法名
defineExpose({ defineExpose({
getData, getData,
playAudio playAudio
......
...@@ -72,7 +72,7 @@ const queryParams = reactive({ ...@@ -72,7 +72,7 @@ const queryParams = reactive({
beginTime: '', beginTime: '',
endTime: '', endTime: '',
}); });
// 搜索
const Page = reactive({total: 0, rows: 20, page: 1}); const Page = reactive({total: 0, rows: 20, page: 1});
const searchData = ref({}); const searchData = ref({});
const search = () => { const search = () => {
...@@ -105,7 +105,7 @@ const search = () => { ...@@ -105,7 +105,7 @@ const search = () => {
} }
console.log('查询:', item); console.log('查询:', item);
}; };
// 获取报警数量
function getNumber() { function getNumber() {
getRecycleAlarmNumber().then(res => { getRecycleAlarmNumber().then(res => {
console.log('123123123123-----------', res.data) console.log('123123123123-----------', res.data)
...@@ -196,12 +196,14 @@ const resetSearch = () => { ...@@ -196,12 +196,14 @@ const resetSearch = () => {
getData() getData()
}; };
const childComponentRef = ref(null); const childComponentRef = ref(null);
// 子组件getData()方法
const getData = () => { const getData = () => {
if (childComponentRef.value && childComponentRef.value.getData) { if (childComponentRef.value && childComponentRef.value.getData) {
console.log('能不能成功啊') console.log('能不能成功啊')
childComponentRef.value.getData(); // 调用子组件的 getData 方法 childComponentRef.value.getData(); // 调用子组件的 getData 方法
} }
}; };
// 子组件playAudio()方法
const playAudio = () => { const playAudio = () => {
if (childComponentRef.value && childComponentRef.value.playAudio) { if (childComponentRef.value && childComponentRef.value.playAudio) {
childComponentRef.value.playAudio(); // 调用子组件的 playAudio 方法 childComponentRef.value.playAudio(); // 调用子组件的 playAudio 方法
...@@ -232,6 +234,7 @@ watch( ...@@ -232,6 +234,7 @@ watch(
}, },
{ immediate: true } // 只在路径变化时触发 { immediate: true } // 只在路径变化时触发
) )
// 获取换热站信息
const options = ref([]); const options = ref([]);
const enterpriseId = ref(); const enterpriseId = ref();
const props = {multiple: true, emitPath: false} const props = {multiple: true, emitPath: false}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment