123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 |
- <template>
- <div class="m-container">
- <h2>
- <div class="squrt"></div>
- 工作台
- <filter-search
- v-if="$route.query.tabrouter === 'teamSchedule'&&permission('/teamSchedule/abnormal')"
- :keys="['searchType']"
- :moreKeys="['organId']"
- @reload="reloadItem"
- />
- </h2>
- <div class="m-core">
- <tab-router @change="changeKey">
- <el-tab-pane
- v-if="permission('/main/main/allData/826')"
- lazy
- label="基本信息"
- name="baseinfo"
- >
- <baseinfo v-if="activeKey === 'baseinfo'" />
- </el-tab-pane>
- <el-tab-pane
- v-if="permission('/cloudDate')"
- lazy
- label="云教练数据"
- name="cloudDate"
- >
- <cloudDate v-if="activeKey === 'cloudDate'" />
- </el-tab-pane>
- <el-tab-pane v-if="permission('/getIndexErrData')" lazy name="abnormal">
- <el-badge
- slot="label"
- class="badge"
- is-dot
- :hidden="!status.indexErrData"
- >异常处理</el-badge
- >
- <abnormal v-if="activeKey === 'abnormal'" />
- </el-tab-pane>
- <el-tab-pane v-if="permission('getRemindMatterData')" name="reminders">
- <el-badge
- slot="label"
- class="badge"
- is-dot
- :hidden="!status.remindMatterData"
- >事项提醒</el-badge
- >
- <reminders v-if="activeKey === 'reminders'" />
- </el-tab-pane>
- <el-tab-pane
- v-if="permission('inspectionItem/queryPage')"
- lazy
- label="【乐团主管】日程安排"
- name="teamSchedule"
- >
- <teamSchedule
- v-if="activeKey === 'teamSchedule'"
- ref="teamSchedule"
- />
- </el-tab-pane>
- <el-tab-pane
- v-if="permission('inspection/queryPage')"
- lazy
- label="【分部经理】日程安排"
- name="ScheduleBranch"
- >
- <ScheduleBranch v-if="activeKey === 'ScheduleBranch'" />
- </el-tab-pane>
- </tab-router>
- </div>
- </div>
- </template>
- <script>
- import { permission } from "@/utils/directivePage";
- import baseinfo from "./baseinfo";
- import abnormal from "./abnormal";
- import teamSchedule from "./teamSchedule";
- import ScheduleBranch from "./schedule-branch";
- import reminders from "./reminders";
- import cloudDate from './cloudDate'
- export default {
- name: "Main",
- components: {
- baseinfo,
- abnormal,
- teamSchedule,
- ScheduleBranch,
- reminders,
- cloudDate
- },
- data() {
- return {
- activeKey: "",
- };
- },
- mounted() {
- // console.log(permission('/main/main/allData/826'))
- },
- computed: {
- status() {
- return this.$store.state.app.status || {};
- },
- },
- watch: {
- "$route.query"(newValue, oldValue) {
- if (newValue.tabrouter !== oldValue.tabrouter) {
- this.$forceUpdate();
- this.$store.dispatch("app/setDotStatus");
- }
- },
- },
- methods: {
- permission,
- changeKey(val) {
- this.activeKey = val;
- },
- __init() {
- getIndex().then((res) => {
- if (res.code == 200) {
- // this.dataInfo = res.data
- let md = res.data.musicDatas || {},
- vd = res.data.vipDatas || {},
- dd = res.data.demoDatas || {};
- let tempDate = {
- mdTotal:
- (md.progress_num_ ? md.progress_num_ : 0) +
- (md.prepare_num_ ? md.prepare_num_ : 0) +
- (md.pause_num_ ? md.pause_num_ : 0),
- progress_num_: md.progress_num_ >= 0 ? md.progress_num_ : "--",
- prepare_num_: md.prepare_num_ >= 0 ? md.prepare_num_ : "--",
- pause_num_: md.pause_num_ >= 0 ? md.pause_num_ : "--",
- vdTotal:
- (vd.finished_num_ ? vd.finished_num_ : 0) +
- (vd.applying_num_ ? vd.applying_num_ : 0),
- finished_num_: vd.finished_num_ >= 0 ? vd.finished_num_ : "--",
- applying_num_: vd.applying_num_ >= 0 ? vd.applying_num_ : "--",
- ddTotal:
- (dd.booked_num_ ? dd.booked_num_ : 0) +
- (dd.unbooked_num_ ? dd.unbooked_num_ : 0),
- booked_num_: dd.booked_num_ >= 0 ? dd.booked_num_ : "--",
- unbooked_num_: dd.unbooked_num_ >= 0 ? dd.unbooked_num_ : "--",
- };
- this.dataInfo = Object.assign(res.data, tempDate);
- }
- });
- },
- reloadItem() {
- console.log("调用");
- if (this.$refs.teamSchedule) {
- this.$refs.teamSchedule.getList();
- }
- },
- },
- };
- </script>
- <style lang="scss" scope>
- .itemWrap {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- align-items: center;
- flex-wrap: wrap;
- .item {
- width: 333px;
- height: 137px;
- padding: 22px 28px 20px;
- box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.1);
- border-radius: 6px;
- margin: 0 15px 3rem;
- h4 {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- margin-bottom: 20px;
- color: #323c47;
- font-size: 14px;
- }
- .infos {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- .sub {
- font-size: 14px;
- line-height: 20px;
- color: #aaa;
- margin-bottom: 8px;
- }
- .msg {
- font-size: 24px;
- font-weight: 500;
- color: rgba(68, 68, 68, 1);
- line-height: 28px;
- text-align: center;
- }
- }
- }
- }
- .badge {
- .el-badge__content.is-fixed.is-dot {
- top: 5px;
- }
- }
- </style>
|