| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119 |
- <template>
- <div class="abnormal-track-page">
- <custom-header
- name="异常态势巡园要点"
- :isGoBack="!isFromShare"
- :showHome="isFromShare"
- @goback="handleBack"
- />
- <div class="abnormal-track-body" v-loading="loading" element-loading-background="rgba(15, 15, 15, 0.55)" element-loading-text="加载中...">
- <div class="abnormal-hero">
- <div class="abnormal-hero__share" @click="handleShare">
- <Icon name="share" color="rgba(255,255,255,0.85)" />
- <span>{{ t("agriFile.forward") }}</span>
- </div>
- <div class="abnormal-mask"></div>
- <div class="abnormal-top">
- <div class="abnormal-hero__tags">
- <span class="abnormal-hero__tag abnormal-hero__tag--level">
- <el-icon><WarningFilled /></el-icon>
- {{ level }}
- </span>
- <span class="abnormal-hero__tag abnormal-hero__tag--zone">{{ zoneName }}</span>
- </div>
- <div class="abnormal-hero__title">{{ theme }}</div>
- <div class="abnormal-hero__reason">{{ reason }}</div>
- </div>
- </div>
- <div class="abnormal-main">
- <!-- 农情研判 -->
- <div class="box-wrap stage-card analysis-card">
- <div class="work-info">
- <div class="section-title">
- <span class="title-bar"></span>
- {{ t("agriFile.agriAssessment") }}
- </div>
- <div class="analysis-card__desc">{{ assessmentDesc }}</div>
- <!-- <div class="analysis-card__stats">
- <div v-for="(item, index) in analysisStats" :key="index" class="analysis-card__stat">
- <div class="analysis-card__stat-value" :class="{ highlight: item.highlight }">
- <template v-if="item.unit">
- <span class="num">{{ item.value }}</span>
- <span class="unit">{{ item.unit }}</span>
- </template>
- <template v-else>{{ item.value }}</template>
- </div>
- <div class="analysis-card__stat-label">{{ item.label }}</div>
- </div>
- </div> -->
- </div>
- </div>
- <!-- 异常排查互动 -->
- <div class="interact-section-head">
- <span class="interact-section-head__text"> 异常排查互动 · 共 {{ interactList.length }} 项 </span>
- <span class="interact-section-head__line"></span>
- </div>
- <div v-for="(item, index) in interactList" :key="item.fw_code || index" class="abnormal-item">
- <div class="abnormal-item__wrap">
- <div class="abnormal-item__title">
- <img class="abnormal-item__icon" src="@/assets/img/agricultural/gaojin.png" alt="" />
- <span>{{ item.abnormal_type || t("agriFile.rootAbnormal") }}</span>
- </div>
- <div class="stage-card interact-card">
- <div class="work-info">
- <!-- 已答:问题 + 答案一句 + 修改;点修改后回到选项态 -->
- <div v-if="isAnsweredView(item, index)" class="interact-card__answered">
- <div class="interact-card__answered-text">
- <span class="interact-card__answered-problem">{{
- item.interact_problem
- }}:</span>
- <span class="interact-card__answered-value">{{
- resolveAnswerText(item)
- }}</span>
- </div>
- <div class="interact-card__edit" @click="startEdit(item, index)">
- 修改
- <el-icon class="interact-card__edit-icon"><Edit /></el-icon>
- </div>
- </div>
- <template v-else>
- <div class="interact-card__head">
- <div class="section-title interact-card__title">
- <span class="title-bar"></span>
- {{ t("agriFile.interactQuestion") }}
- </div>
- <div
- class="interact-card__submit"
- :class="{ disabled: selectedMap[item.fw_code || index] == null }"
- @click="handleSubmit(item, index)"
- >
- 确认提交
- </div>
- </div>
- <div class="interact-card__qa">
- <div class="interact-card__question">{{ item.interact_problem }}</div>
- <div class="interact-card__options">
- <div
- v-for="(opt, optIndex) in item.options"
- :key="`${item.fw_code || index}-${optIndex}`"
- class="interact-option"
- :class="{
- selected: selectedMap[item.fw_code || index] === optIndex,
- }"
- @click="selectedMap[item.fw_code || index] = optIndex"
- >
- <span class="interact-option__text">{{ opt }}</span>
- </div>
- </div>
- </div>
- </template>
- </div>
- </div>
- <!-- 巡园向导 -->
- <div class="guide-card">
- <div class="work-info">
- <div class="section-title">
- <img class="guide-icon" src="@/assets/img/farm/guide.png" alt="" />
- {{ t("agriFile.patrolGuide") }}
- </div>
- <div class="guide-card__img-box">
- <photo-provider :photo-closable="true">
- <photo-consumer :src="resolveGuideImage(item.pic_url)">
- <img :src="resolveGuideImage(item.pic_url)" alt="" />
- </photo-consumer>
- </photo-provider>
- </div>
- </div>
- <div class="guide-card__upload-wrap">
- <div class="guide-card__upload" @click="handleUploadClick">
- <img class="guide-card__upload-icon" src="@/assets/img/common/camera.png" alt="" />
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <album-upload-popup v-model:show="showUploadPopup" @confirm="handleUploadConfirm" />
- <tip-popup
- v-model:show="showSuccessPopup"
- type="executeSuccess"
- text="您已上传成功"
- text2="诊断报告正在生成,请稍后..."
- hideBtn
- >
- <template #footer>
- <div class="bottom-btn-container">
- <div class="bottom-btn primary-btn" @click="handleComplete">完成</div>
- </div>
- </template>
- </tip-popup>
- <tip-popup
- v-model:show="showInteractSuccessPopup"
- type="executeSuccess"
- :text="interactSuccessText"
- :text2="interactSuccessText2"
- hideBtn
- >
- <template #footer>
- <div class="bottom-btn-container">
- <div class="bottom-btn secondary-btn" @click="handleInteractComplete">完成</div>
- <div class="bottom-btn primary-btn" @click="handleViewWorkDetail">查看详情</div>
- </div>
- </template>
- </tip-popup>
- </div>
- </template>
- <script setup>
- import { computed, nextTick, onActivated, reactive, ref } from "vue";
- import { useRoute, useRouter } from "vue-router";
- import { Icon } from "vant";
- import { ElMessage } from "element-plus";
- import { EditPen } from "@element-plus/icons-vue";
- import customHeader from "@/components/customHeader.vue";
- import albumUploadPopup from "../components/albumUploadPopup.vue";
- import tipPopup from "@/components/popup/tipPopup.vue";
- import { useI18n } from "@/i18n";
- import { base_img_url2 } from "@/api/config";
- import {
- ensureFarmContext,
- getSelectedFarmIdFromStorage,
- resolvePairedFarmZone,
- } from "@/utils/selectedFarm";
- import wx from "weixin-js-sdk";
- const { t } = useI18n();
- const route = useRoute();
- const router = useRouter();
- // ---------- 常量 ----------
- const DEFAULT_GUIDE_IMAGE = require("@/assets/img/agricultural/patrol-guide.png");
- /** 农情研判底部指标:接口未接好前写死 */
- const analysisStats = [
- { value: "126", unit: "mm", label: "累计降雨", highlight: false },
- { value: "92", unit: "%", label: "土壤含水率", highlight: false },
- { value: "52", unit: "h", label: "根部积水", highlight: true },
- ];
- // ---------- 页面状态 ----------
- const loading = ref(false);
- const submitting = ref(false);
- const showUploadPopup = ref(false);
- const showSuccessPopup = ref(false);
- const showInteractSuccessPopup = ref(false);
- /** 异常确认成功弹窗:文案与跳转参数来自接口 farmwork_brief */
- const interactSuccessBrief = ref({
- fw_name: "",
- suggest_execute_date: "",
- farm_id: null,
- zone_id: null,
- fw_code: "",
- });
- const needDraw = ref(true); // status≠1 时需先勾画种植范围
- const interactList = ref([]); // ab_it_info.interact_Info 映射后的列表
- const stressInfo = ref({}); // 胁迫等级等公共信息
- const selectedMap = reactive({}); // fw_code/index → 选项下标
- const editingMap = reactive({}); // fw_code/index → 已答后点「修改」进入选项态
- /** 与查询共用的提交上下文,保证 fw 答案与列表同源 */
- const queryContext = ref({
- farm_id: null,
- zone_id: null,
- calc_date: "",
- crop_type: "",
- });
- const interactSuccessText = computed(() => {
- const name = interactSuccessBrief.value.fw_name || "";
- return `系统已触发了 ${name}农事`;
- });
- const interactSuccessText2 = computed(() => {
- const date = interactSuccessBrief.value.suggest_execute_date || "";
- return `建议 ${date} 执行`;
- });
- // ---------- 工具函数 ----------
- function isTruthyFlag(value) {
- return value === 1 || value === "1" || value === true || value === "true";
- }
- function parseMaybeJson(value) {
- if (value == null || value === "") return null;
- if (typeof value === "object") return value;
- try {
- return JSON.parse(value);
- } catch {
- return null;
- }
- }
- /**
- * 分享链路:dev_login 把整份登录 query 塞进 miniJson,
- * 真正的页面参数在 miniJson.paramsPage(id / zoneId / farmId / fromShare / pageName)
- */
- function resolvePageParams() {
- const mini = parseMaybeJson(route.query.miniJson);
- if (mini) {
- const page = parseMaybeJson(mini.paramsPage) || {};
- return { ...mini, ...page };
- }
- const paramsPage = parseMaybeJson(route.query.paramsPage);
- if (paramsPage) {
- return { ...route.query, ...paramsPage };
- }
- return { ...(route.query || {}) };
- }
- // ---------- 计算属性 ----------
- const pageParams = computed(() => resolvePageParams());
- const zoneId = computed(
- () => pageParams.value.zoneId || pageParams.value.id || "",
- );
- const firstInteract = computed(() => interactList.value[0] || null);
- /** interaction_theme */
- const theme = computed(() => firstInteract.value?.interaction_title || t("agriFile.interactTheme"));
- /** interaction_title */
- const reason = computed(() => firstInteract.value?.interaction_theme || t("agriFile.interactReason"));
- /** 农情研判说明 */
- const assessmentDesc = computed(() => firstInteract.value?.interaction_reason || t("agriFile.agriAssessmentDesc"));
- const guideImage = computed(() => resolveGuideImage(firstInteract.value?.pic_url));
- /** stress_info.level */
- const level = computed(() => {
- const lv = stressInfo.value?.level;
- if (lv == null || lv === "") return t("agriFile.riskLevel2");
- return `${lv}级`;
- });
- const zoneName = computed(() => {
- const farm = getSelectedFarm();
- return farm.variety_name || farm.zone_name || t("agriFile.zoneOne");
- });
- /** 通过分享进入:无返回箭头 */
- const isFromShare = computed(() => isTruthyFlag(pageParams.value?.fromShare));
- function getSelectedFarm() {
- try {
- return JSON.parse(localStorage.getItem("selectedFarmData") || "{}");
- } catch {
- return {};
- }
- }
- function getSelectedFarmId() {
- const stored = localStorage.getItem("selectedFarmId");
- if (stored != null && stored !== "") return Number(stored);
- const farm = getSelectedFarm();
- const id = farm.farm_id ?? farm.id;
- return id != null && id !== "" ? Number(id) : null;
- }
- /** 农场品类编码,接口 crop_type */
- const resolveCropType = (farm = getSelectedFarm()) =>
- farm.category_code || farm.categorycode || farm.crop_code || farm.crop_type || "";
- function resolveImageUrl(path) {
- if (!path) return "";
- const text = String(path).trim();
- if (!text) return "";
- if (/^https?:\/\//i.test(text)) return text;
- return base_img_url2 + text.replace(/^\//, "");
- }
- function resolveGuideImage(picUrl) {
- return resolveImageUrl(picUrl) || DEFAULT_GUIDE_IMAGE;
- }
- /** interact_options 可能是 JSON 字符串 */
- function parseInteractOptions(value) {
- if (Array.isArray(value)) return value.map((name) => String(name));
- const parsed = parseMaybeJson(value);
- if (Array.isArray(parsed)) return parsed.map((name) => String(name));
- return [];
- }
- /** 已答文案:提交字段为 options,回显兼容 answer / interact_answer / 字符串 options */
- function resolveAnswerText(item) {
- const raw =
- item?.answerText ||
- item?.answer ||
- item?.interact_answer ||
- item?.fw_answer ||
- (typeof item?.options === "string" ? item.options : "");
- return raw != null && raw !== "" ? String(raw) : "";
- }
- function mapInteractItem(raw) {
- const optionsStr =
- typeof raw?.options === "string" && raw.options.trim() && !raw.options.trim().startsWith("[")
- ? raw.options
- : "";
- return {
- ...raw,
- options: parseInteractOptions(raw?.interact_options),
- answerText: String(raw?.answer ?? raw?.interact_answer ?? raw?.fw_answer ?? optionsStr ?? ""),
- };
- }
- function interactKey(item, index) {
- return item?.fw_code || index;
- }
- /** 已答且未进入修改态 */
- function isAnsweredView(item, index) {
- return Number(item?.is_answered) === 1 && !editingMap[interactKey(item, index)];
- }
- /** 点修改:回到选项,并尽量回填当前答案 */
- function startEdit(item, index) {
- const key = interactKey(item, index);
- editingMap[key] = true;
- const answer = resolveAnswerText(item);
- if (!answer || !Array.isArray(item?.options)) return;
- const optIndex = item.options.findIndex((opt) => opt === answer);
- if (optIndex >= 0) selectedMap[key] = optIndex;
- }
- const formatLocalDate = (date) => {
- const y = date.getFullYear();
- const m = String(date.getMonth() + 1).padStart(2, "0");
- const d = String(date.getDate()).padStart(2, "0");
- return `${y}-${m}-${d}`;
- };
- // ---------- 业务逻辑 ----------
- const fetchAbnormalInteract = async () => {
- const farm = getSelectedFarm();
- const { farmId, zoneId: zId } = await resolvePairedFarmZone(zoneId.value);
- const cropType = resolveCropType(farm);
- if (farmId == null || zId == null || zId === "" || !cropType) {
- interactList.value = [];
- stressInfo.value = {};
- return;
- }
- const params = {
- crop_type: cropType,
- farm_id: farmId,
- zone_id: zId,
- calc_date: formatLocalDate(new Date()),
- };
- queryContext.value = { ...params };
- loading.value = true;
- try {
- const res = await VE_API.questionnaire.getAbnormalInteract(params);
- if (res?.code !== 200) {
- interactList.value = [];
- stressInfo.value = {};
- return;
- }
- const data = res?.data || {};
- const abInfo = data.ab_it_info || {};
- const list = Array.isArray(abInfo.interact_Info) ? abInfo.interact_Info : [];
- interactList.value = list.map(mapInteractItem);
- stressInfo.value = abInfo.stress_info || data.stress_info || {};
- } catch (e) {
- console.warn("[abnormalTrack] getAbnormalInteract failed", e);
- interactList.value = [];
- stressInfo.value = {};
- } finally {
- loading.value = false;
- }
- };
- /** status=1 有范围无需勾画;status=0 无范围需要勾画 */
- const fetchZoneRangeStatus = async () => {
- const { farmId, zoneId: zId } = await resolvePairedFarmZone(zoneId.value);
- if (farmId == null || farmId === "" || zId == null || zId === "") {
- needDraw.value = true;
- return;
- }
- try {
- const res = await VE_API.questionnaire.checkZoneRange({
- farm_id: farmId,
- zone_id: zId,
- });
- needDraw.value = Number(res?.data?.status) !== 1;
- } catch (e) {
- console.warn("[abnormalTrack] checkZoneRange failed", e);
- needDraw.value = true;
- }
- };
- // ---------- 事件处理 / 生命周期 ----------
- const handleShare = () => {
- const shareFarmId =
- pageParams.value.farmId ||
- pageParams.value.farm_id ||
- getSelectedFarmIdFromStorage();
- const query = {
- askInfo: { title: "转发巡园要点", content: "是否分享给好友" },
- shareText: reason.value || "速长窗口不追肥?后期发育慢人一步,直接掉队!",
- targetUrl: "abnormal_track",
- paramsPage: JSON.stringify({
- id: pageParams.value.id || zoneId.value,
- zoneId: zoneId.value,
- ...(shareFarmId ? { farmId: shareFarmId } : {}),
- fromShare: 1,
- ...(pageParams.value.pageName
- ? { pageName: pageParams.value.pageName }
- : {}),
- }),
- imageUrl: "https://birdseye-img.sysuimars.com/farm-h5/abnormal_cover.png",
- };
- wx.miniProgram.navigateTo({
- url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
- });
- };
- /** 需勾画则先画范围;否则直接上传(同 growthTrack) */
- const handleUploadClick = () => {
- if (needDraw.value) {
- router.push({
- path: "/add_zone",
- query: {
- type: "farm",
- targetUrl: "/abnormal_track",
- ...(zoneId.value ? { trackId: zoneId.value } : {}),
- },
- });
- return;
- }
- showUploadPopup.value = true;
- };
- const handleUploadConfirm = async ({ images } = {}) => {
- const imageList = (Array.isArray(images) ? images : [])
- .filter(Boolean)
- .map((url) => resolveImageUrl(url));
- if (!imageList.length) {
- ElMessage.warning("请先上传照片");
- return;
- }
- const { farmId, zoneId: pairedZoneId } = await resolvePairedFarmZone(zoneId.value);
- if (farmId == null || pairedZoneId == null || pairedZoneId === "") {
- ElMessage.warning("当前农场与分区不匹配,请返回后重试");
- return;
- }
- try {
- const res = await VE_API.pheno.uploadAbnormalPhoto({
- farm_id: farmId,
- zone_id: pairedZoneId,
- images: imageList,
- });
- if (res?.code === 200) {
- showSuccessPopup.value = true;
- return;
- }
- ElMessage.error(res?.msg || "上传失败,请稍后再试");
- } catch {
- ElMessage.error("上传失败,请稍后再试");
- }
- };
- const handleComplete = () => {
- showSuccessPopup.value = false;
- router.replace("/agri_file");
- };
- const handleInteractComplete = () => {
- showInteractSuccessPopup.value = false;
- };
- const handleViewWorkDetail = () => {
- const { farm_id, zone_id, fw_code } = interactSuccessBrief.value;
- showInteractSuccessPopup.value = false;
- if (farm_id == null || zone_id == null || !fw_code) {
- ElMessage.warning("农事信息不完整,无法查看详情");
- return;
- }
- router.push({
- path: "/work_detail",
- query: {
- farm_id,
- zone_id,
- fw_code,
- },
- });
- };
- const handleSubmit = async (item, index) => {
- const key = interactKey(item, index);
- const optIndex = selectedMap[key];
- if (optIndex == null) {
- ElMessage.warning(t("agriFile.pleaseSelectOption"));
- return;
- }
- const optionText = item?.options?.[optIndex];
- if (!optionText || !item?.fw_code) {
- ElMessage.warning(t("agriFile.pleaseSelectOption"));
- return;
- }
- if (submitting.value) return;
- submitting.value = true;
- try {
- const res = await VE_API.questionnaire.confirmAbnormalInteract({
- ...queryContext.value,
- fw_code: item.fw_code,
- options: String(optionText),
- });
- if (res?.code === 200) {
- const data = res?.data || {};
- const brief = data.farmwork_brief || {};
- interactSuccessBrief.value = {
- fw_name: brief.fw_name || "",
- suggest_execute_date: brief.suggest_execute_date || "",
- farm_id: data.farm_id ?? queryContext.value.farm_id,
- zone_id: data.zone_id ?? queryContext.value.zone_id,
- fw_code: brief.fw_code || data.fw_code || "",
- };
- editingMap[key] = false;
- await fetchAbnormalInteract();
- showInteractSuccessPopup.value = true;
- return;
- }
- ElMessage.error(res?.msg || "提交失败,请稍后再试");
- } catch (e) {
- console.warn("[abnormalTrack] confirmAbnormalInteract failed", e);
- ElMessage.error("提交失败,请稍后再试");
- } finally {
- submitting.value = false;
- }
- };
- const handleBack = () => {
- router.back();
- };
- /** keep-alive 离开再进:清掉「修改」态,按接口已答态回到「已答 + 修改」 */
- function resetEditingState() {
- Object.keys(editingMap).forEach((k) => delete editingMap[k]);
- }
- onActivated(async () => {
- resetEditingState();
- // 分享进页可能落在接收方当前选中农场,先按 farmId / zoneId 切回分享上下文
- await ensureFarmContext({
- farmId: pageParams.value.farmId || pageParams.value.farm_id,
- zoneId: zoneId.value,
- });
- fetchZoneRangeStatus();
- fetchAbnormalInteract();
- if (route.query.showUpload !== "1") return;
- nextTick(() => {
- showUploadPopup.value = true;
- const { showUpload, ...restQuery } = route.query;
- router.replace({ path: route.path, query: restQuery });
- });
- });
- </script>
- <style lang="scss" scoped>
- .abnormal-track-page {
- display: flex;
- flex-direction: column;
- width: 100%;
- height: 100vh;
- overflow: hidden;
- background: #0b0b0b;
- color: #fff;
- .abnormal-track-body {
- flex: 1;
- overflow-y: auto;
- -webkit-overflow-scrolling: touch;
- padding-bottom: 10px;
- box-sizing: border-box;
- }
- .abnormal-hero {
- position: relative;
- padding: 86px 70px 0px 12px;
- box-sizing: border-box;
- z-index: 2;
- min-height: 240px;
- background: linear-gradient(
- 180deg,
- rgba(11, 11, 11, 0) 8.51%,
- rgba(11, 11, 11, 0.416) 42.95%,
- rgba(11, 11, 11, 0.468) 56.49%,
- rgba(11, 11, 11, 0.52) 80.47%
- ),
- url("@/assets/img/agricultural/detail-bg.png") right bottom / cover no-repeat;
- .abnormal-mask {
- position: absolute;
- bottom: 0;
- left: 0;
- width: 100%;
- height: 107px;
- background: linear-gradient(
- 180deg,
- rgba(11, 11, 11, 0) 8.47%,
- rgba(11, 11, 11, 0.8) 26.93%,
- rgba(11, 11, 11, 0.9) 37.74%,
- #0b0b0b 56.89%
- );
- }
- .abnormal-top {
- position: relative;
- z-index: 2;
- padding-bottom: 40px;
- }
- &__share {
- position: absolute;
- top: 16px;
- right: 16px;
- z-index: 2;
- display: inline-flex;
- align-items: center;
- gap: 4px;
- height: 28px;
- padding: 0 12px;
- border-radius: 14px;
- background: rgba(0, 0, 0, 0.45);
- border: 1px solid rgba(255, 255, 255, 0.12);
- color: rgba(255, 255, 255, 0.85);
- font-size: 12px;
- }
- &__tags {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- gap: 8px;
- margin-bottom: 12px;
- padding-right: 88px;
- }
- &__tag {
- display: inline-flex;
- align-items: center;
- gap: 3px;
- height: 20px;
- padding: 0 7px;
- border-radius: 24px;
- font-size: 12px;
- line-height: 20px;
- box-sizing: border-box;
- border: 1px solid rgba(138, 106, 46, 1);
- }
- &__tag--level {
- background: linear-gradient(90deg, #7e2321 0%, #350302 100%);
- color: #ff7d7b;
- border-color: rgba(201, 53, 50, 0.41);
- }
- &__tag--zone {
- color: #e8c27a;
- background: #2a2418;
- }
- &__title {
- font-family: "PangMenZhengDao", sans-serif;
- font-size: 26px;
- line-height: 34px;
- background: linear-gradient(180deg, #ffffff 0%, #fecd76 100%);
- -webkit-background-clip: text;
- background-clip: text;
- color: transparent;
- margin-bottom: 6px;
- }
- &__reason {
- font-size: 12px;
- line-height: 22px;
- padding: 4px;
- border-radius: 4px;
- background: linear-gradient(90deg, rgba(255, 212, 137, 0.1) 0%, rgba(255, 212, 137, 0) 100%);
- color: rgba(255, 255, 255, 1);
- }
- }
- .abnormal-main {
- position: relative;
- z-index: 3;
- margin-top: -38px;
- padding: 0 12px 12px;
- box-sizing: border-box;
- }
- .box-wrap {
- padding: 1px;
- border-radius: 12px;
- background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 72.15%);
- .work-info {
- background: linear-gradient(180deg, #1a191d 0%, #121216 100%);
- border-radius: 12px;
- padding: 12px 13px;
- box-sizing: border-box;
- }
- }
- .stage-card + .stage-card {
- margin-top: 12px;
- }
- .section-title {
- display: flex;
- align-items: center;
- gap: 10px;
- font-size: 16px;
- font-weight: 500;
- color: #f2e9d8;
- margin-bottom: 10px;
- &.interact-card__title {
- font-size: 14px;
- }
- .title-bar {
- width: 4px;
- height: 16px;
- border-radius: 2px;
- background: #ffd489;
- flex-shrink: 0;
- }
- }
- .analysis-card {
- .analysis-card__desc {
- font-size: 14px;
- line-height: 22px;
- color: rgba(255, 255, 255, 0.6);
- margin-bottom: 10px;
- }
- .analysis-card__stats {
- display: flex;
- align-items: stretch;
- background: rgba(255, 255, 255, 0.05);
- border-radius: 10px;
- padding: 8px 0 6px;
- }
- .analysis-card__stat {
- flex: 1;
- min-width: 0;
- text-align: center;
- position: relative;
- & + .analysis-card__stat::before {
- content: "";
- position: absolute;
- left: 0;
- top: 50%;
- transform: translateY(-50%);
- width: 1px;
- height: 32px;
- background: rgba(255, 255, 255, 0.06);
- }
- }
- .analysis-card__stat-value {
- font-size: 22px;
- line-height: 27px;
- color: #fff;
- margin-bottom: 2px;
- height: 27px;
- &.highlight {
- color: #ff9f5a;
- }
- .num {
- font-size: 22px;
- font-weight: 600;
- }
- .unit {
- color: rgba(255, 255, 255, 0.5);
- margin-left: 1px;
- font-size: 12px;
- }
- }
- .analysis-card__stat-label {
- font-size: 12px;
- line-height: 18px;
- color: rgba(255, 255, 255, 0.5);
- }
- }
- .interact-section-head {
- display: flex;
- align-items: center;
- gap: 10px;
- margin: 16px 0 12px;
- &__text {
- flex-shrink: 0;
- font-size: 12px;
- line-height: 18px;
- color: #727272;
- }
- &__line {
- flex: 1;
- height: 1px;
- background: rgba(255, 255, 255, 0.08);
- }
- }
- .abnormal-item {
- padding: 1px;
- border-radius: 12px;
- background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 25%),
- linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 25%);
- &__wrap {
- padding: 11px 13px;
- border-radius: 12px;
- background: linear-gradient(180deg, #1A191D 0%, #121216 100%);
- }
- & + .abnormal-item {
- margin-top: 16px;
- }
- &__title {
- display: flex;
- align-items: center;
- gap: 10px;
- margin-bottom: 12px;
- font-size: 16px;
- font-weight: 500;
- color: #FFD489;
- }
- &__icon {
- width: 18px;
- height: 23px;
- object-fit: contain;
- }
- }
- .interact-card {
- padding: 10px 12px;
- border-radius: 12px;
- border: 1px solid rgba(255, 241, 217, 0.2);
- background: linear-gradient(180deg, #1A191D 0%, #121216 100%);
- &__head {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 8px;
- margin-bottom: 12px;
- .section-title {
- margin-bottom: 0;
- }
- }
- &__submit {
- flex-shrink: 0;
- height: 27px;
- padding: 0 15px;
- border-radius: 24px;
- background: rgba(255, 212, 137, 0.1);
- border: 1px solid rgba(255, 212, 137, 0.4);
- color: #FFD489;
- font-size: 12px;
- line-height: 27px;
- text-align: center;
- box-sizing: border-box;
- &.disabled {
- opacity: 0.35;
- }
- }
- &__question {
- font-size: 16px;
- font-family: "PangMenZhengDao";
- line-height: 20px;
- color: #FFD489;
- margin-bottom: 12px;
- }
- &__answered {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 6px;
- }
- &__answered-text {
- flex: 1;
- min-width: 0;
- font-size: 14px;
- line-height: 22px;
- word-break: break-all;
- }
- &__answered-problem {
- color: rgba(255, 255, 255, 0.85);
- }
- &__answered-value {
- padding-left: 4px;
- color: #ffd489;
- }
- &__edit {
- flex-shrink: 0;
- display: inline-flex;
- align-items: center;
- gap: 4px;
- height: 22px;
- padding: 0 10px;
- border-radius: 12px;
- background: rgba(255, 212, 137, 0.1);
- color: #ffd489;
- font-size: 12px;
- line-height: 22px;
- box-sizing: border-box;
- }
- &__edit-icon {
- font-size: 12px;
- color: #ffd489;
- }
- &__options {
- display: flex;
- gap: 12px;
- }
- .interact-option {
- position: relative;
- flex: 1;
- min-width: 0;
- min-height: 41px;
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: 8px;
- background: rgba(255, 255, 255, 0.05);
- border: 1px solid rgba(255, 255, 255, 0.12);
- box-sizing: border-box;
- cursor: pointer;
- &__text {
- display: block;
- padding: 0 6px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- font-size: 14px;
- color: rgba(255, 255, 255, 0.7);
- }
- &.selected {
- border-color: rgba(255, 255, 255, 0.5);
- background: rgba(255, 255, 255, 0.1);
- .interact-option__text {
- color: #fff;
- }
- }
- }
- }
- .guide-card {
- position: relative;
- margin-top: 12px;
- background: rgba(75, 74, 70, 0.2);
- border-radius: 10px;
- padding: 10px;
- &__img {
- display: block;
- width: 100%;
- border-radius: 8px;
- }
- .guide-card__img-box {
- img {
- display: block;
- width: 100%;
- }
- }
- .section-title {
- gap: 6px;
- font-size: 14px;
- color: rgba(255, 255, 255, 0.6);
- }
- .guide-icon {
- width: 14px;
- height: 14px;
- object-fit: contain;
- filter: grayscale(100%);
- -webkit-filter: grayscale(100%);
- }
- }
- .guide-card__upload-wrap {
- position: absolute;
- right: 25px;
- bottom: 27px;
- z-index: 10;
- }
- .guide-card__upload {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 52px;
- height: 52px;
- border-radius: 50%;
- background: linear-gradient(90deg, #ffebc9 0%, #ffca6d 100%);
- }
- .guide-card__upload-icon {
- width: 18px;
- height: 16px;
- object-fit: contain;
- }
- }
- .bottom-btn-container {
- display: flex;
- justify-content: space-between;
- gap: 12px;
- width: 100%;
- .bottom-btn {
- flex: 1;
- padding: 0 25px;
- border-radius: 8px;
- font-size: 16px;
- height: 44px;
- line-height: 44px;
- box-sizing: border-box;
- text-align: center;
- &.secondary-btn {
- color: rgba(255, 255, 255, 0.6);
- border: 1px solid rgba(255, 255, 255, 0.12);
- background: transparent;
- }
- &.primary-btn {
- background: linear-gradient(90deg, #FFEBC9 0%, #FFCA6D 100%);
- color: #1A1408;
- }
- }
- }
- </style>
|