<template>
    <hc-card scrollbar class="hc-system-set-box">
        <div class="hc-system-set-title hc-flex">
            <div class="title flex-1">
                <hc-icon class="font-bold" name="alarm-warning" />
                <span class="ml-1 text-[18px] font-bold">项目异常设置</span>
            </div>
            <div class="extra">
                <el-button :loading="saveProjectWarningLoad" class="ml-8 text-white" color="#20C98B" @click="saveProjectWarning">保存项目异常设置</el-button>
            </div>
        </div>
        <div class="warn-box-items flex">
            <el-row :gutter="14">
                <el-col :span="12" class="h-full">
                    <div class="warn-item h-full">
                        <div class="warn-item-tilte">投资进展缓慢</div>
                        <div class="warn-item-inner">
                            <el-row :gutter="4" class="h-full">
                                <el-col :span="12">
                                    <div class="warn-item-inner-box">
                                        <div class="text-center text-14px">第一季度</div>
                                        <div class="warn-item-inner-title mt-2 text-right text-14px">该季度投资计划完成比例</div>
                                        <div class="warn-item-inner-box-detail">
                                            <div class="arrow w-60px text-14px">三级</div>
                                            <div class="container">
                                                <div class="triangle" />
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"> < </span>
                                                <HcInputNumber v-model="projectWarning[0].oneThree" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div class="arrow arrow-oringe w-60px text-14px">二级</div>
                                            <div class="container">
                                                <div class="triangle" />
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"> < </span>
                                                <HcInputNumber v-model="projectWarning[0].oneTwo" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div class="arrow arrow-red w-60px text-14px"> 一级</div>
                                            <div class="container">
                                                <div class="triangle" />
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"> < </span>
                                                <HcInputNumber v-model="projectWarning[0].oneOne" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                    </div>
                                </el-col>
                                <el-col :span="12">
                                    <div class="warn-item-inner-box">
                                        <div class="text-center text-14px">第二季度</div>
                                        <div class="warn-item-inner-box-title mt-2 text-14px">
                                            <div class="flex-1" />
                                            <div class="warn-item-inner-title flex-1 text-center">该季度投资计划完成比例</div>
                                            <div class="warn-item-inner-title ml-2 flex-1 text-center">前两季度累计投资计化完成比例</div>
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div>
                                                <div class="arrow"> 三级</div>
                                                <div class="container">
                                                    <div class="triangle" />
                                                </div>
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"> < </span>
                                                <HcInputNumber v-model="projectWarning[0].twoThree" />
                                                <span class="ml-1">%</span>
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"><</span>
                                                <HcInputNumber v-model="projectWarning[0].twoThreeAll" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div>
                                                <div class="arrow arrow-oringe"> 二级</div>
                                                <div class="container">
                                                    <div class="triangle" />
                                                </div>
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"><</span>
                                                <HcInputNumber v-model="projectWarning[0].twoTwo" />
                                                <span class="ml-1">%</span>
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"><</span>
                                                <HcInputNumber v-model="projectWarning[0].twoTwoAll" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div>
                                                <div class="arrow arrow-red"> 一级</div>
                                                <div class="container">
                                                    <div class="triangle" />
                                                </div>
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"><</span>
                                                <HcInputNumber v-model="projectWarning[0].twoOne" />
                                                <span class="ml-1">%</span>
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"><</span>
                                                <HcInputNumber v-model="projectWarning[0].twoOneAll" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                    </div>
                                </el-col>
                                <el-col :span="12">
                                    <div class="warn-item-inner-box">
                                        <div class="text-center text-14px">第三季度</div>
                                        <div class="warn-item-inner-box-title mt-2 text-14px">
                                            <div class="flex-1" />
                                            <div class="warn-item-inner-title flex-1 text-center">
                                                该季度投资计划完成比例
                                            </div>
                                            <div class="warn-item-inner-title ml-2 flex-1 text-center">
                                                前三季度累计投资计化完成比例
                                            </div>
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div>
                                                <div class="arrow"> 三级</div>
                                                <div class="container">
                                                    <div class="triangle" />
                                                </div>
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"> < </span>
                                                <HcInputNumber v-model="projectWarning[0].threeThree" />
                                                <span class="ml-1">%</span>
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"> < </span>
                                                <HcInputNumber v-model="projectWarning[0].threeThreeAll" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div>
                                                <div class="arrow arrow-oringe"> 二级</div>
                                                <div class="container">
                                                    <div class="triangle" />
                                                </div>
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"><</span>
                                                <HcInputNumber v-model="projectWarning[0].threeTwo" />
                                                <span class="ml-1">%</span>
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"><</span>
                                                <HcInputNumber v-model="projectWarning[0].threeTwoAll" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div>
                                                <div class="arrow arrow-red"> 一级</div>
                                                <div class="container">
                                                    <div class="triangle" />
                                                </div>
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"><</span>
                                                <HcInputNumber v-model="projectWarning[0].threeOne" />
                                                <span class="ml-1">%</span>
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"><</span>
                                                <HcInputNumber v-model="projectWarning[0].threeOneAll" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                    </div>
                                </el-col>
                                <el-col :span="12">
                                    <div class="warn-item-inner-box">
                                        <div class="text-center text-14px">第四季度</div>
                                        <div class="warn-item-inner-box-title mt-2 text-14px">
                                            <div class="flex-1" />
                                            <div class="warn-item-inner-title flex-1 text-center">
                                                该季度投资计划完成比例
                                            </div>
                                            <div class="warn-item-inner-title ml-2 flex-1 text-center">
                                                当年度累计投资计化完成比例
                                            </div>
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div>
                                                <div class="arrow"> 三级</div>
                                                <div class="container">
                                                    <div class="triangle" />
                                                </div>
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"> < </span>
                                                <HcInputNumber v-model="projectWarning[0].fourThree" />
                                                <span class="ml-1">%</span>
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"><</span>
                                                <HcInputNumber v-model="projectWarning[0].fourThreeAll" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div>
                                                <div class="arrow arrow-oringe"> 二级</div>
                                                <div class="container">
                                                    <div class="triangle" />
                                                </div>
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"><</span>
                                                <HcInputNumber v-model="projectWarning[0].fourTwo" />
                                                <span class="ml-1">%</span>
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"><</span>
                                                <HcInputNumber v-model="projectWarning[0].fourTwoAll" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div>
                                                <div class="arrow arrow-red"> 一级</div>
                                                <div class="container">
                                                    <div class="triangle" />
                                                </div>
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"><</span>
                                                <HcInputNumber v-model="projectWarning[0].fourOne" />
                                                <span class="ml-1">%</span>
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"><</span>
                                                <HcInputNumber v-model="projectWarning[0].fourOneAll" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                    </div>
                                </el-col>
                            </el-row>
                        </div>
                    </div>
                </el-col>
                <el-col :span="12" class="h-full">
                    <div class="warn-item h-full">
                        <div class="warn-item-tilte">建设进展缓慢</div>
                        <div class="warn-item-inner">
                            <el-row :gutter="4" class="h-full">
                                <el-col :span="12">
                                    <div class="warn-item-inner-box">
                                        <div class="text-center text-14px">第一季度</div>
                                        <div class="warn-item-inner-title mt-2 text-right text-14px">该季度工作计划完成比例</div>
                                        <div class="warn-item-inner-box-detail">
                                            <div class="arrow w-60px text-14px">三级</div>
                                            <div class="container">
                                                <div class="triangle" />
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"> < </span>
                                                <HcInputNumber v-model="projectWarning[1].oneThree" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div class="arrow arrow-oringe w-60px text-14px">二级</div>
                                            <div class="container">
                                                <div class="triangle" />
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"> < </span>
                                                <HcInputNumber v-model="projectWarning[1].oneTwo" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div class="arrow arrow-red w-60px text-14px"> 一级</div>
                                            <div class="container">
                                                <div class="triangle" />
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"> < </span>
                                                <HcInputNumber v-model="projectWarning[1].oneOne" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                    </div>
                                </el-col>
                                <el-col :span="12">
                                    <div class="warn-item-inner-box">
                                        <div class="text-center text-14px">第二季度</div>
                                        <div class="warn-item-inner-title mt-2 text-right text-14px">
                                            该季度工作计划完成比例
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div class="arrow w-60px text-14px">三级</div>
                                            <div class="container">
                                                <div class="triangle" />
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"> < </span>
                                                <HcInputNumber v-model="projectWarning[1].twoThree" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div class="arrow arrow-oringe w-60px text-14px">二级</div>
                                            <div class="container">
                                                <div class="triangle" />
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"> < </span>
                                                <HcInputNumber v-model="projectWarning[1].twoTwo" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div class="arrow arrow-red w-60px text-14px"> 一级</div>
                                            <div class="container">
                                                <div class="triangle" />
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"> < </span>
                                                <HcInputNumber v-model="projectWarning[1].twoOne" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                    </div>
                                </el-col>
                                <el-col :span="12">
                                    <div class="warn-item-inner-box">
                                        <div class="text-center text-14px">第三季度</div>
                                        <div class="warn-item-inner-title mt-2 text-right text-14px">
                                            该季度工作计划完成比例
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div class="arrow w-60px text-14px">三级</div>
                                            <div class="container">
                                                <div class="triangle" />
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"> < </span>
                                                <HcInputNumber v-model="projectWarning[1].threeThree" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div class="arrow arrow-oringe w-60px text-14px">二级</div>
                                            <div class="container">
                                                <div class="triangle" />
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"> < </span>
                                                <HcInputNumber v-model="projectWarning[1].threeTwo" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div class="arrow arrow-red w-60px text-14px"> 一级</div>
                                            <div class="container">
                                                <div class="triangle" />
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"> < </span>
                                                <HcInputNumber v-model="projectWarning[1].threeOne" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                    </div>
                                </el-col>
                                <el-col :span="12">
                                    <div class="warn-item-inner-box">
                                        <div class="text-center text-14px">第四季度</div>
                                        <div class="warn-item-inner-title mt-2 text-right text-14px">
                                            该季度工作计划完成比例
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div class="arrow w-60px text-14px">三级</div>
                                            <div class="container">
                                                <div class="triangle" />
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"> < </span>
                                                <HcInputNumber v-model="projectWarning[1].fourThree" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div class="arrow arrow-oringe w-60px text-14px">二级</div>
                                            <div class="container">
                                                <div class="triangle" />
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"> < </span>
                                                <HcInputNumber v-model="projectWarning[1].fourTwo" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                        <div class="warn-item-inner-box-detail">
                                            <div class="arrow arrow-red w-60px text-14px"> 一级</div>
                                            <div class="container">
                                                <div class="triangle" />
                                            </div>
                                            <div class="hc-flex">
                                                <span class="mr-1"> < </span>
                                                <HcInputNumber v-model="projectWarning[1].fourOne" />
                                                <span class="ml-1">%</span>
                                            </div>
                                        </div>
                                    </div>
                                </el-col>
                            </el-row>
                        </div>
                    </div>
                </el-col>
            </el-row>
        </div>
        <div class="hc-system-set-title hc-flex mt-5">
            <hc-icon class="font-bold" name="projector" />
            <span class="ml-1 text-[18px] font-bold">项目相关设置</span>
        </div>
        <div class="hc-system-set-project">
            <div class="set-project-row">
                <el-row :gutter="24">
                    <el-col :span="8">
                        <div class="set-project-row-col">
                            <div class="set-project-row-col-title hc-flex">
                                <div class="title flex-1">
                                    <span class="mr-2">项目阶段</span>
                                    <span class="text-14px">(重点项目推进计划)</span>
                                </div>
                                <div class="extra">
                                    <el-button :loading="saveProStationLoad" class="text-white" color="#20C98B" @click="saveProStation">保存项目阶段</el-button>
                                </div>
                            </div>
                            <div class="set-project-row-col-content max-h-300px">
                                <div v-for="(item, index) in proStation" :key="index" class="hc-flex mt-1">
                                    <el-input v-model="item.dictValue" placeholder="阶段名称" class="flex-1" />
                                    <el-link :underline="false" type="primary" class="ml-2">
                                        <hc-icon class="text-20px font-bold" name="add" @click="addClick(item, index)" />
                                    </el-link>
                                    <el-link :underline="false" type="danger" class="ml-1">
                                        <hc-icon class="text-20px font-bold" name="close" @click="delClick(item, index)" />
                                    </el-link>
                                </div>
                            </div>
                        </div>
                    </el-col>
                    <el-col :span="8">
                        <div class="set-project-row-col">
                            <div class="set-project-row-col-title hc-flex">
                                <div class="title flex-1">项目类型</div>
                                <div class="extra">
                                    <el-button :loading="saveProTypenLoad" class="text-white" color="#20C98B" @click="saveProType">保存项目类型</el-button>
                                </div>
                            </div>
                            <div class="set-project-row-col-content max-h-300px">
                                <div v-for="(item, index) in proType" :key="index" class="hc-flex mt-1">
                                    <el-input v-model="item.dictValue" placeholder="类型名称" class="flex-1" />
                                    <el-link :underline="false" type="primary" class="ml-2">
                                        <hc-icon class="text-20px font-bold" name="add" @click="addClickType(item, index)" />
                                    </el-link>
                                    <el-link :underline="false" type="danger" class="ml-1">
                                        <hc-icon class="text-20px font-bold" name="close" @click="delClickType(item, index)" />
                                    </el-link>
                                </div>
                            </div>
                        </div>
                    </el-col>
                    <el-col :span="8">
                        <div class="set-project-row-col">
                            <div class="set-project-row-col-title hc-flex">
                                <div class="title flex-1">
                                    <span class="mr-2">项目阶段</span>
                                    <span class="text-14px">(工作要点任务分工)</span>
                                </div>
                                <div class="extra">
                                    <el-button :loading="savProStationTipLoad" class="text-white" color="#20C98B" @click="saveProStationTip">保存项目阶段</el-button>
                                </div>
                            </div>
                            <div class="set-project-row-col-content max-h-300px">
                                <div v-for="(item, index) in proStationTip" :key="index" class="hc-flex mt-1">
                                    <el-input v-model="item.dictValue" placeholder="阶段名称" class="flex-1" />
                                    <el-link :underline="false" type="primary" class="ml-2">
                                        <hc-icon class="text-20px font-bold" name="add" @click="addClickTip(item, index)" />
                                    </el-link>
                                    <el-link :underline="false" type="danger" class="ml-1">
                                        <hc-icon class="text-20px font-bold" name="close" @click="delClickTip(item, index)" />
                                    </el-link>
                                </div>
                            </div>
                        </div>
                    </el-col>
                </el-row>
            </div>
        </div>
    </hc-card>
</template>

<script setup>
import { onMounted, ref } from 'vue'
import { getDictionary, saveDict } from '~api/dictbiz'
import { projectDetailWarning, projectSaveWarning } from '~api/other'
import { arrToKey, getArrValue, isArrItem } from 'js-fast-way'
import HcInputNumber from './modules/input-number.vue'

onMounted(() => {
    projectWarningDetail()
    getProStation()
    getProType()
    getProStationTip()
})

//项目预警详情
const projectWarning = ref([{ warningType: 1 }, { warningType: 2 }])
const projectWarningDetail = async () => {
    const { data } = await projectDetailWarning()
    const res = getArrValue(data?.list)
    if (res.length <= 0 ) {
        projectWarning.value = [{ warningType: 1 }, { warningType: 2 }]
    } else {
        projectWarning.value = res
    }
}

//保存项目预警
const saveProjectWarningLoad = ref(false)
const saveProjectWarning = async () => {
    saveProjectWarningLoad.value = true
    const list = projectWarning.value
    const { error, code, msg } = await projectSaveWarning(list)
    saveProjectWarningLoad.value = false
    if (!error && code === 200) {
        window?.$message?.success(msg)
        projectWarningDetail().then()
    } else {
        window.$message.error(msg ?? '操作失败')
    }
}


//相关相关设置

const proStation = ref([{ dictValue: '' }])
const getProStation = async () => {
    const { error, code, data } = await getDictionary({ code: 'projectStage' })
    if (!error && code === 200) {
        proStation.value = getArrValue(data)
        if (proStation.value.length === 0) {
            proStation.value = [
                { dictValue: '' },
            ]
        }
    } else {
        proStation.value = []
    }

}
const addClick = (item, index) => {
    proStation.value.splice(index + 1, 0, { dictValue: '' })
}
const delClick = (item, index) => {
    if (proStation.value.length === 1) {
        window.$message.warning('请至少保留一条数据')
        return
    }
    proStation.value.splice(index, 1)
}
const saveProStationLoad = ref(false)
const saveProStation = async () => {
    const list = arrToKey(proStation.value, 'dictValue', ',').split(',')
    const isIn = isArrItem(list, '') // true
    if (isIn) {
        window.$message.warning('请输入阶段名称')
        return
    }
    saveProStationLoad.value = true
    const { error, code, msg } = await saveDict({ type: 'projectStage', list })
    saveProStationLoad.value = false
    if (!error && code === 200) {
        window?.$message?.success(msg)
        getProStation()
    } else {
        window.$message.error(msg ?? '操作失败')
    }
}
const proType = ref([
    { name: '铁路' },
    { name: '建成项目' },

])
const getProType = async () => {
    const { error, code, data } = await getDictionary({ code: 'projectType' })
    if (!error && code === 200) {
        proType.value = getArrValue(data)
        if (proType.value.length === 0) {
            proType.value = [
                { dictValue: '' },
            ]
        }
    } else {
        proType.value = []
    }

}
const addClickType = (item, index) => {

    proType.value.splice(index + 1, 0, { dictValue: '' })
}
const delClickType = (item, index) => {
    if (proType.value.length === 1) {
        window.$message.warning('请至少保留一条数据')
        return
    }
    proType.value.splice(index, 1)
}
const saveProTypenLoad = ref(false)
const saveProType = async () => {
    const list = arrToKey(proType.value, 'dictValue', ',').split(',')
    const isIn = isArrItem(list, '') // true
    if (isIn) {
        window.$message.warning('请输入类型名称')
        return
    }
    saveProTypenLoad.value = true
    const { error, code, msg } = await saveDict({ type: 'projectType', list })
    saveProTypenLoad.value = false
    if (!error && code === 200) {
        window?.$message?.success(msg)
        getProType()
    } else {
        window.$message.error(msg ?? '操作失败')
    }
}
const proStationTip = ref([])
const getProStationTip = async () => {
    const { error, code, data } = await getDictionary({ code: 'workFocusStage' })
    if (!error && code === 200) {
        proStationTip.value = getArrValue(data)
        if (proStationTip.value.length === 0) {
            proStationTip.value = [
                { dictValue: '' },
            ]
        }
    } else {
        proStationTip.value = []
    }
}
const addClickTip = (item, index) => {
    proStationTip.value.splice(index + 1, 0, { dictValue: '' })
}
const delClickTip = (item, index) => {
    if (proStationTip.value.length === 1) {
        window.$message.warning('请至少保留一条数据')
        return
    }
    proStationTip.value.splice(index, 1)
}
const savProStationTipLoad = ref(false)
const saveProStationTip = async () => {
    const list = arrToKey(proStationTip.value, 'dictValue', ',').split(',')
    const isIn = isArrItem(list, '') // true
    if (isIn) {
        window.$message.warning('请输入阶段名称')
        return
    }
    savProStationTipLoad.value = true
    const { error, code, msg } = await saveDict({ type: 'workFocusStage', list })
    savProStationTipLoad.value = false
    if (!error && code === 200) {
        window?.$message?.success(msg)
        getProStationTip()
    } else {
        window.$message.error(msg ?? '操作失败')
    }
}
</script>

<style lang='scss'>
@import "~src/styles/view/set";
</style>
