| | |
| | | import {useI18n} from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import footSum from "@/hook/footSum" |
| | | import TagStyle from "@/components/pp/TagStyle.vue" |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | |
| | | let router = useRouter() |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum = $ref(1) |
| | | let pageState = null |
| | | let titleStyleVisible = ref(false) |
| | | |
| | | |
| | | const form = reactive({ |
| | | date1: '', |
| | |
| | | |
| | | //获取七天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 7) |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 10) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10) //默认开始时间7天前 |
| | |
| | | }) |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | loading: true, |
| | |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | buttons: [], |
| | | import: false, |
| | | // export: true, |
| | | // print: true, |
| | | buttons: [ |
| | | {'code': 'titleStyle', 'name': t('processCard.labelStyle'),status: 'primary'} |
| | | ], |
| | | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | } |
| | | |
| | | }) |
| | | |
| | | const gridEvents = { |
| | | async toolbarButtonClick({code}) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'titleStyle': { |
| | | titleStyleVisible.value = true |
| | | break |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | |
| | |
| | | height="100%" |
| | | max-height="100%" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | |
| | | |
| | | |
| | | </vxe-grid> |
| | | <el-dialog |
| | | id="titleStyle" |
| | | :title="$t('processCard.labelStyle')" |
| | | style="width: 70%;height:70% " |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | v-model="titleStyleVisible"> |
| | | <tag-style style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | #selectForm { |
| | | width: 60%; |
| | | } |
| | | |
| | | :deep(#titleStyle .el-dialog__body){ |
| | | height: 90%; |
| | | width: 100%; |
| | | } |
| | | |
| | | </style> |