<template>
  <!-- 任务消息列表 -->
  <div class="taskMessagePage flex-col">
    <s-header :name="$t('taskMessage.taskMessage')" :noback="false"></s-header>
    <div class="taskMessageBox flex-col">
      <div class="taskListRow flex-col" @click="pushPageList('/taskEquipment')">
        <div class="taskIcon deviceIcon"></div>
        <div class="taskRight">
          <div class="taskTitle">{{ $t('taskMessage.equipmentInitializationApproval') }}</div>
        </div>
      </div>
      <div v-if="user.ifForeign != '1'" class="taskListRow flex-col" @click="pushPageList('/taskProportion')">
        <div class="taskIcon retailIcon"></div>
        <div class="taskRight">
          <div class="taskTitle">{{ $t('taskMessage.distributionApplicationApproval') }}</div>
        </div>
      </div>
      <!-- <div class="taskListRow flex-col" @click="pushPageList('/taskJoinPayMchCheck')">
        <div class="taskIcon withIcon"></div>
        <div class="taskRight">
          <div class="taskTitle">{{ $t('taskMessage.withdrawalAccountApproval') }}</div>
        </div>
      </div> -->
    </div>
  </div>
</template>

<script>
import { onMounted } from 'vue';
import sHeader from "@/components/SimpleHeader";
import { useRouter } from "vue-router";
import { getLoginUser, styleUrl } from "../../common/js/utils";


export default {
  components: { sHeader },
  setup() {
    const router = useRouter();
    const user = getLoginUser();

    // 初始化页面获取列表
    onMounted(async () => {
      styleUrl('taskMessage');
    });
    const pushPageList = (url) => {
      router.push(url);
    }
    return {
      pushPageList,
      user
    };
  }
};
</script>

<style lang="less" scoped>
@import "../../common/style/common.less";
</style>
