fix:调试仪表盘展示

pull/282/head
lihui_ocr 1 year ago
parent 3d657f7689
commit 643c6d5b50

@ -1,5 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import { defineProps, onMounted, ref,watch } from "vue"; import { defineProps, onMounted, ref,watch,onBeforeMount } from "vue";
import { gettaskToolsCount } from "@/api/home/main"; import { gettaskToolsCount } from "@/api/home/main";
import { useDataHeaderStore } from '@/store/modules/DataHeader' import { useDataHeaderStore } from '@/store/modules/DataHeader'
defineProps({ defineProps({
@ -55,9 +55,17 @@ function initRem() {
const scale = window.innerWidth / designWidth; const scale = window.innerWidth / designWidth;
document.documentElement.style.fontSize = `${scale * rempPx}px`; document.documentElement.style.fontSize = `${scale * rempPx}px`;
} }
onMounted(() => { onMounted(() => {
initRem(); initRem();
getData(); getData();
setTimeout(() => {
headerstore.setDataConfig(false)
// alert(headerstore.DataConfig)
}, 500);
// headerstore.setDataConfig(false)
}); });
async function getData() { async function getData() {
@ -117,6 +125,7 @@ async function getData() {
watch( watch(
() => headerstore.DataConfig, () => headerstore.DataConfig,
(newval) => { (newval) => {
if(headerstore.DataConfig){ if(headerstore.DataConfig){
getData(); getData();
headerstore.setDataConfig(false) headerstore.setDataConfig(false)

@ -330,9 +330,10 @@ function doAudit(param: any) {
audit(param).then((res) => { audit(param).then((res) => {
const { code } = res const { code } = res
if (code === 'OK') { if (code === 'OK') {
haeaderstore.setDataConfig(true)
message.success(res.message) message.success(res.message)
reload() reload()
haeaderstore.setDataConfig(true)
} }
else { message.error(res.message) } else { message.error(res.message) }
}) })

@ -11,8 +11,9 @@ import { getFinalList } from '@/api/final'
import { useFinal } from '@/store/modules/final' import { useFinal } from '@/store/modules/final'
import { formatToDateHMS } from '@/utils/dateUtil' import { formatToDateHMS } from '@/utils/dateUtil'
import { audit } from '@/api/task/task' import { audit } from '@/api/task/task'
import { useDataHeaderStore } from '@/store/modules/DataHeader' import DataHeader from '@/components/DataHeader/index.vue'
import NotPassed from '@/components/Approval/NotPassed.vue' import NotPassed from '@/components/Approval/NotPassed.vue'
import { useDataHeaderStore } from '@/store/modules/DataHeader'
const props = defineProps({ const props = defineProps({
@ -22,6 +23,8 @@ const props = defineProps({
}, },
}) })
const emit = defineEmits(['changeShow']) const emit = defineEmits(['changeShow'])
const aa=ref(true)
const haeaderstore=useDataHeaderStore()
const dialog = useDialog() const dialog = useDialog()
const message = useMessage() const message = useMessage()
const router = useRouter() const router = useRouter()
@ -45,8 +48,8 @@ const selectionIds = ref([])
const showActions = computed(() => { const showActions = computed(() => {
return selectionIds.value.length return selectionIds.value.length
}) })
const haeaderstore=useDataHeaderStore()
console.log(haeaderstore)
function handleCheck(row: any, showcheck: any) { function handleCheck(row: any, showcheck: any) {
if (showcheck == false) { if (showcheck == false) {
console.log(tableData.value) console.log(tableData.value)
@ -300,31 +303,41 @@ function actionHandler(action: any, row: any) {
} }
// //
function doAudit(param: any, row: any) { function doAudit(param: any, row: any) {
dialog.info({ dialog.info({
title: '确认提示', title: '确认提示',
content: '确认给该任务审批为【通过】吗?', content: '确认给该任务审批为【通过】吗?',
positiveText: '确定', positiveText: '确定',
negativeText: '取消', negativeText: '取消',
onPositiveClick: () => { onPositiveClick: () => {
audit(param).then((res) => {
audit(param).then((res) => {
aa.value=false
const { code } = res const { code } = res
if (code === 'OK') { if (code === 'OK') {
message.success(res.message) message.success(res.message)
// changecardstatus(3, row); // changecardstatus(3, row);
initData(1, 20, {}, props.taskvalue) initData(1, 20, {}, props.taskvalue)
num = 1 num = 1
reload() reload()
aa.value=true
selectionIds.value = [] selectionIds.value = []
haeaderstore.setDataConfig(true)
} }
else { else {
message.error(res.message) message.error(res.message)
selectionIds.value = [] selectionIds.value = []
} }
}) })
// alert("X")
// haeaderstore.setDataConfig(true)
}, },
onNegativeClick: () => {}, onNegativeClick: () => {},
}) })
} }
// //
function singleApproval(row) { function singleApproval(row) {
@ -473,9 +486,13 @@ function changesort(sortnamex) {
num = 1 num = 1
} }
function notpass() { function notpass() {
aa.value=false
initData(1, 20, {}, props.taskvalue) initData(1, 20, {}, props.taskvalue)
selectionIds.value = []
haeaderstore.setDataConfig(true) selectionIds.value = []
// haeaderstore.setDataConfig(true)
aa.value=true
} }
watch( watch(
() => finalStore.asideValue, () => finalStore.asideValue,
@ -578,7 +595,7 @@ defineExpose({
</div> </div>
<div class="header_data"> <div class="header_data">
<DataHeader :has-color="true" /> <DataHeader :has-color="true" v-if="aa"/>
</div> </div>
<div class="wrapper-settings"> <div class="wrapper-settings">
<div> <div>

Loading…
Cancel
Save