fix:调试仪表盘展示 #282

Merged
zhaohui merged 1 commits from fix/change_task into test 1 year ago

@ -1,5 +1,5 @@
<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 { useDataHeaderStore } from '@/store/modules/DataHeader'
defineProps({
@ -55,9 +55,17 @@ function initRem() {
const scale = window.innerWidth / designWidth;
document.documentElement.style.fontSize = `${scale * rempPx}px`;
}
onMounted(() => {
initRem();
getData();
setTimeout(() => {
headerstore.setDataConfig(false)
// alert(headerstore.DataConfig)
}, 500);
// headerstore.setDataConfig(false)
});
async function getData() {
@ -117,6 +125,7 @@ async function getData() {
watch(
() => headerstore.DataConfig,
(newval) => {
if(headerstore.DataConfig){
getData();
headerstore.setDataConfig(false)

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

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

Loading…
Cancel
Save