绘制短信模块
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<my-echart :style="{ width: prop.width, height: prop.height }" :options="options" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import { ref, onMounted, provide, watch } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||
@@ -13,7 +13,8 @@ import * as echarts from 'echarts/core'
|
||||
import { getTimeOfTheMonth } from '@/utils/formatTime'
|
||||
const prop = defineProps({
|
||||
width: { type: String },
|
||||
height: { type: String }
|
||||
height: { type: String },
|
||||
timeKey: { type: String }
|
||||
})
|
||||
const dictData = useDictData()
|
||||
const options = ref({})
|
||||
@@ -92,7 +93,10 @@ const tableStore = new TableStore({
|
||||
showPage: false,
|
||||
method: 'POST',
|
||||
column: [],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.searchBeginTime = getTimeOfTheMonth(prop.timeKey)[0]
|
||||
tableStore.table.params.searchEndTime = getTimeOfTheMonth(prop.timeKey)[1]
|
||||
},
|
||||
loadCallback: () => {
|
||||
let code = tableStore.table.params.statisticalType.code
|
||||
let title = '',
|
||||
@@ -246,8 +250,7 @@ const tableStore = new TableStore({
|
||||
}
|
||||
})
|
||||
tableStore.table.params.deptIndex = dictData.state.area[0].id
|
||||
tableStore.table.params.searchBeginTime = getTimeOfTheMonth()[0]
|
||||
tableStore.table.params.searchEndTime = getTimeOfTheMonth()[1]
|
||||
|
||||
tableStore.table.params.statisticalType = classificationData[0]
|
||||
tableStore.table.params.scale = []
|
||||
tableStore.table.params.manufacturer = []
|
||||
@@ -259,5 +262,11 @@ provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
watch(
|
||||
() => prop.timeKey,
|
||||
val => {
|
||||
tableStore.index()
|
||||
}
|
||||
)
|
||||
</script>
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
Reference in New Issue
Block a user