mp_chgchk.html 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta
  6. name="viewport"
  7. content="width=device-width, initial-scale=1.0, user-scalable=no"
  8. />
  9. <title>审核</title>
  10. <script src="/js/mp_base/base.js"></script>
  11. <style>
  12. [v-cloak] {
  13. display: none !important;
  14. }
  15. #app {
  16. background: #f5f5f5;
  17. height: 100vh;
  18. display: flex;
  19. flex-direction: column;
  20. overflow: hidden;
  21. box-sizing: border-box;
  22. }
  23. .content-wrap {
  24. flex: 1;
  25. display: flex;
  26. flex-direction: column;
  27. gap: 8px;
  28. padding: 8px;
  29. box-sizing: border-box;
  30. overflow: hidden;
  31. }
  32. .frame-card {
  33. background: #fff;
  34. border-radius: 8px;
  35. overflow: hidden;
  36. box-sizing: border-box;
  37. }
  38. .info-frame-wrap {
  39. flex: 0 0 176px;
  40. }
  41. .chg-frame-wrap,
  42. .sh-frame-wrap {
  43. flex: 1;
  44. min-height: 0;
  45. }
  46. .info-iframe,
  47. .chg-iframe,
  48. .sh-iframe {
  49. width: 100%;
  50. height: 100%;
  51. border: none;
  52. display: block;
  53. background: #fff;
  54. }
  55. .status-wrap {
  56. flex: 1;
  57. display: flex;
  58. align-items: center;
  59. justify-content: center;
  60. padding: 16px;
  61. box-sizing: border-box;
  62. }
  63. .status-card {
  64. width: 100%;
  65. max-width: 520px;
  66. background: #fff;
  67. border-radius: 8px;
  68. padding: 16px;
  69. box-sizing: border-box;
  70. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  71. }
  72. .status-title {
  73. font-size: 15px;
  74. font-weight: 600;
  75. color: #2d3748;
  76. }
  77. .status-text {
  78. margin-top: 8px;
  79. line-height: 1.6;
  80. color: #4a5568;
  81. font-size: 13px;
  82. word-break: break-all;
  83. }
  84. .status-retry {
  85. margin-top: 12px;
  86. height: 34px;
  87. padding: 0 14px;
  88. border: none;
  89. border-radius: 4px;
  90. background: #4a5568;
  91. color: #fff;
  92. font-size: 13px;
  93. }
  94. .url-log-fab {
  95. position: fixed;
  96. right: 12px;
  97. bottom: 72px;
  98. z-index: 1200;
  99. border: none;
  100. border-radius: 16px;
  101. background: rgba(36, 40, 53, 0.88);
  102. color: #fff;
  103. font-size: 12px;
  104. line-height: 1;
  105. padding: 8px 10px;
  106. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  107. display: none;
  108. }
  109. .url-log-panel {
  110. position: fixed;
  111. left: 12px;
  112. right: 12px;
  113. bottom: 116px;
  114. z-index: 1200;
  115. background: rgba(36, 40, 53, 0.96);
  116. color: #fff;
  117. border-radius: 8px;
  118. padding: 10px;
  119. max-height: 42vh;
  120. overflow: auto;
  121. box-sizing: border-box;
  122. }
  123. .url-log-panel__head {
  124. display: flex;
  125. align-items: center;
  126. justify-content: space-between;
  127. margin-bottom: 8px;
  128. font-size: 12px;
  129. }
  130. .url-log-panel__close {
  131. border: none;
  132. background: transparent;
  133. color: #fff;
  134. font-size: 14px;
  135. line-height: 1;
  136. }
  137. .url-log-panel__body {
  138. margin: 0;
  139. white-space: pre-wrap;
  140. word-break: break-all;
  141. font-size: 12px;
  142. line-height: 1.5;
  143. }
  144. </style>
  145. </head>
  146. <body>
  147. <div id="app" v-cloak>
  148. <div class="content-wrap" v-if="initStatus === 'ready'">
  149. <div class="frame-card info-frame-wrap">
  150. <iframe
  151. ref="infoIframe"
  152. class="info-iframe"
  153. :src="topIframeSrc || 'about:blank'"
  154. frameborder="0"
  155. ></iframe>
  156. </div>
  157. <div class="frame-card chg-frame-wrap">
  158. <iframe
  159. ref="chgIframe"
  160. class="chg-iframe"
  161. :src="chgIframeSrc || 'about:blank'"
  162. frameborder="0"
  163. ></iframe>
  164. </div>
  165. <div class="frame-card sh-frame-wrap">
  166. <iframe
  167. ref="shIframe"
  168. class="sh-iframe"
  169. :src="shIframeSrc || 'about:blank'"
  170. frameborder="0"
  171. ></iframe>
  172. </div>
  173. </div>
  174. <div class="status-wrap" v-else>
  175. <div class="status-card">
  176. <div class="status-title">{{ initStatusTitle }}</div>
  177. <div class="status-text">{{ initStatusMessage }}</div>
  178. <div class="status-text" v-if="missingParams.length > 0">
  179. 缺少参数:{{ missingParams.join('、') }}
  180. </div>
  181. <button class="status-retry" type="button" @click="callApi">
  182. 重新加载
  183. </button>
  184. </div>
  185. </div>
  186. <ss-bottom
  187. :buttons="bottomButtons"
  188. :show-shyj="true"
  189. @button-click="handleBottomAction"
  190. :disabled="submitting"
  191. v-if="initStatus === 'ready' && bottomButtons.length > 0"
  192. ></ss-bottom>
  193. <button class="url-log-fab" type="button" @click="showCurrentUrls">
  194. URL
  195. </button>
  196. <div class="url-log-panel" v-if="urlLogVisible">
  197. <div class="url-log-panel__head">
  198. <span>当前 URL</span>
  199. <button
  200. class="url-log-panel__close"
  201. type="button"
  202. @click="urlLogVisible = false"
  203. >
  204. ×
  205. </button>
  206. </div>
  207. <pre class="url-log-panel__body">{{ urlLogText }}</pre>
  208. </div>
  209. </div>
  210. <script>
  211. window.SS.ready(function () {
  212. window.SS.dom.initializeFormApp({
  213. el: "#app",
  214. data() {
  215. return {
  216. pageParams: {},
  217. loading: false,
  218. submitting: false,
  219. jdmc: "",
  220. sqid: "",
  221. shid: "",
  222. shyjm: "",
  223. bdlbm: "",
  224. dataType: "bdplay",
  225. encode_shid: "",
  226. ssObjName: "",
  227. ssObjId: "",
  228. initStatus: "loading",
  229. initStatusTitle: "页面初始化中",
  230. initStatusMessage: "正在加载审核数据,请稍候...",
  231. missingParams: [],
  232. infoData: null,
  233. actionAgreeData: null,
  234. actionRejectData: null,
  235. bottomButtons: [],
  236. topIframeSrc: "",
  237. chgIframeSrc: "",
  238. shIframeSrc: "",
  239. urlLogVisible: false,
  240. urlLogText: "",
  241. };
  242. },
  243. mounted() {
  244. this.pageParams = this.getUrlParams();
  245. this.callApi();
  246. },
  247. methods: {
  248. // 新增变动审核页初始化状态控制 by xu 2026-03-06
  249. setInitStatus(status, title, message) {
  250. this.initStatus = status;
  251. this.initStatusTitle = title || "";
  252. this.initStatusMessage = message || "";
  253. },
  254. normalizeError(error) {
  255. return {
  256. message: (error && error.message) || String(error),
  257. };
  258. },
  259. getUrlParams() {
  260. const params = {};
  261. const aliasMap = {
  262. ssobjname: "ssObjName",
  263. ssobjid: "ssObjId",
  264. sqid: "sqid",
  265. shid: "shid",
  266. shyjm: "shyjm",
  267. bdlbm: "bdlbm",
  268. datatype: "dataType",
  269. encode_shid: "encode_shid",
  270. jdmc: "jdmc",
  271. };
  272. const urlSearchParams = new URLSearchParams(
  273. window.location.search
  274. );
  275. for (const [rawKey, rawValue] of urlSearchParams) {
  276. const decodedValue = this.safeDecode(rawValue);
  277. params[rawKey] = decodedValue;
  278. const normalizedKey = aliasMap[String(rawKey).toLowerCase()];
  279. if (normalizedKey) {
  280. params[normalizedKey] = decodedValue;
  281. }
  282. }
  283. return params;
  284. },
  285. safeDecode(text) {
  286. if (text === undefined || text === null || text === "") return "";
  287. try {
  288. return decodeURIComponent(String(text));
  289. } catch (_) {
  290. return String(text);
  291. }
  292. },
  293. pickFirstValue(sources, keys) {
  294. const srcArr = Array.isArray(sources) ? sources : [];
  295. const keyArr = Array.isArray(keys) ? keys : [];
  296. for (let i = 0; i < srcArr.length; i += 1) {
  297. const src = srcArr[i];
  298. if (!src || typeof src !== "object") continue;
  299. for (let j = 0; j < keyArr.length; j += 1) {
  300. const key = keyArr[j];
  301. const value = src[key];
  302. if (value !== undefined && value !== null && value !== "") {
  303. return value;
  304. }
  305. }
  306. }
  307. return "";
  308. },
  309. extractTokenData(apiResponse) {
  310. const wantedKeys = [
  311. "sqid",
  312. "shid",
  313. "ssObjName",
  314. "ssObjId",
  315. "jdmc",
  316. "bdlbm",
  317. "dataType",
  318. "encode_shid",
  319. ];
  320. const candidates = [
  321. apiResponse && apiResponse.data && apiResponse.data.ssData,
  322. apiResponse && apiResponse.ssData,
  323. apiResponse && apiResponse.data,
  324. apiResponse,
  325. ];
  326. let best = {};
  327. let bestScore = -1;
  328. candidates.forEach((item) => {
  329. if (!item || typeof item !== "object") return;
  330. let score = 0;
  331. wantedKeys.forEach((key) => {
  332. if (
  333. item[key] !== undefined &&
  334. item[key] !== null &&
  335. item[key] !== ""
  336. ) {
  337. score += 1;
  338. }
  339. });
  340. if (score > bestScore) {
  341. best = item;
  342. bestScore = score;
  343. }
  344. });
  345. return best;
  346. },
  347. resolveBusinessContext(apiResponse) {
  348. const tokenData = this.extractTokenData(apiResponse);
  349. const sources = [tokenData, this.pageParams];
  350. return {
  351. sqid: String(this.pickFirstValue(sources, ["sqid"]) || ""),
  352. shid: String(this.pickFirstValue(sources, ["shid"]) || ""),
  353. shyjm: String(this.pickFirstValue(sources, ["shyjm"]) || ""),
  354. ssObjName: String(
  355. this.pickFirstValue(sources, ["ssObjName", "ssobjname"]) ||
  356. ""
  357. ),
  358. ssObjId: String(
  359. this.pickFirstValue(sources, ["ssObjId", "ssobjid"]) || ""
  360. ),
  361. bdlbm: String(this.pickFirstValue(sources, ["bdlbm"]) || ""),
  362. dataType:
  363. String(
  364. this.pickFirstValue(sources, ["dataType", "datatype"]) ||
  365. this.dataType ||
  366. "bdplay"
  367. ) || "bdplay",
  368. encode_shid: String(
  369. this.pickFirstValue(sources, ["encode_shid"]) || ""
  370. ),
  371. jdmc: this.safeDecode(
  372. this.pickFirstValue(sources, ["jdmc"]) || ""
  373. ),
  374. };
  375. },
  376. parseInfoParm(rawParm) {
  377. if (!rawParm) return {};
  378. if (typeof rawParm === "object") return rawParm;
  379. const text = String(rawParm).trim();
  380. if (!text) return {};
  381. try {
  382. return JSON.parse(text);
  383. } catch (_) {}
  384. try {
  385. const normalized = text
  386. .replace(/([{,]\s*)([A-Za-z0-9_]+)\s*:/g, '$1"$2":')
  387. .replace(/'/g, '"');
  388. return JSON.parse(normalized);
  389. } catch (_) {
  390. return {};
  391. }
  392. },
  393. resolveInfoDestPath(destName) {
  394. const raw = String(destName || "").trim();
  395. if (!raw) return "";
  396. if (/^https?:\/\//i.test(raw)) return raw;
  397. if (raw.startsWith("/")) return raw;
  398. if (raw.endsWith(".html")) return `/page/${raw}`;
  399. if (raw.startsWith("mp_")) return `/page/${raw}.html`;
  400. return `/page/mp_${raw}.html`;
  401. },
  402. buildIframeSrc(path, queryObj) {
  403. const search = new URLSearchParams();
  404. Object.keys(queryObj || {}).forEach((key) => {
  405. const value = queryObj[key];
  406. if (value === undefined || value === null) return;
  407. search.set(key, String(value));
  408. });
  409. return `${path}?${search.toString()}`;
  410. },
  411. buildInfoIframeSrc(infoData, fallbackQuery) {
  412. const conf =
  413. infoData && typeof infoData === "object" ? infoData : {};
  414. const serviceName = conf.service || conf.servName || "";
  415. const destName = conf.dest || "";
  416. const parmObj = this.parseInfoParm(conf.parm);
  417. const mergedQuery = {
  418. ...(fallbackQuery || {}),
  419. ...(parmObj || {}),
  420. };
  421. if (!serviceName || !destName) {
  422. return this.buildIframeSrc("/page/mp_objInfo.html", mergedQuery);
  423. }
  424. const pagePath = this.resolveInfoDestPath(destName);
  425. if (!pagePath) {
  426. return this.buildIframeSrc("/page/mp_objInfo.html", mergedQuery);
  427. }
  428. const paramText =
  429. typeof conf.parm === "string"
  430. ? conf.parm
  431. : JSON.stringify(parmObj || {});
  432. const iframeQuery = {
  433. ...mergedQuery,
  434. ssServ: serviceName,
  435. ssDest: destName,
  436. service: serviceName,
  437. dest: destName,
  438. param: paramText,
  439. };
  440. return this.buildIframeSrc(pagePath, iframeQuery);
  441. },
  442. buildCommonQuery() {
  443. return {
  444. sqid: this.sqid,
  445. shid: this.shid,
  446. shyjm: this.shyjm,
  447. bdlbm: this.bdlbm,
  448. dataType: this.dataType,
  449. encode_shid: this.encode_shid,
  450. ssObjName: this.ssObjName,
  451. ssObjId: this.ssObjId,
  452. jdmc: this.jdmc,
  453. };
  454. },
  455. normalizeActionConfig(config) {
  456. if (!config || typeof config !== "object") return null;
  457. const normalized = { ...config };
  458. if (!normalized.service && normalized.servName) {
  459. normalized.service = normalized.servName;
  460. }
  461. return normalized;
  462. },
  463. async fetchActionConfigs() {
  464. // 按 bdlbm 拉取变动审核同意退回动作配置 by xu 2026-03-06
  465. const query = `ssObjName=${encodeURIComponent(
  466. this.ssObjName
  467. )}&ssObjId=${encodeURIComponent(
  468. this.ssObjId
  469. )}&sqid=${encodeURIComponent(
  470. this.sqid
  471. )}&shid=${encodeURIComponent(
  472. this.shid
  473. )}&bdlbm=${encodeURIComponent(
  474. this.bdlbm
  475. )}&dataType=${encodeURIComponent(
  476. this.dataType
  477. )}&encode_shid=${encodeURIComponent(this.encode_shid)}`;
  478. let agreeTag = "";
  479. let rejectTag = "";
  480. if (String(this.bdlbm) === "55") {
  481. agreeTag = "agrRes";
  482. rejectTag = "rejRes";
  483. } else if (String(this.bdlbm) === "51") {
  484. agreeTag = "agrSus";
  485. rejectTag = "rejSus";
  486. } else if (!["1", "51", "55"].includes(String(this.bdlbm))) {
  487. agreeTag = "agrChg";
  488. rejectTag = "rejChg";
  489. }
  490. this.actionAgreeData = null;
  491. this.actionRejectData = null;
  492. const buttons = [];
  493. if (rejectTag) {
  494. const rejectRes = await request.post(
  495. `/service?ssServ=dataTag&ssDest=data&name=${rejectTag}&${query}`,
  496. {},
  497. { loading: false, formData: true }
  498. );
  499. this.actionRejectData = this.normalizeActionConfig(
  500. rejectRes && rejectRes.data ? rejectRes.data[rejectTag] : null
  501. );
  502. if (
  503. this.actionRejectData &&
  504. this.actionRejectData.service &&
  505. this.actionRejectData.dest
  506. ) {
  507. buttons.push({ text: "退回", action: "reject" });
  508. }
  509. }
  510. if (agreeTag) {
  511. const agreeRes = await request.post(
  512. `/service?ssServ=dataTag&ssDest=data&name=${agreeTag}&${query}`,
  513. {},
  514. { loading: false, formData: true }
  515. );
  516. this.actionAgreeData = this.normalizeActionConfig(
  517. agreeRes && agreeRes.data ? agreeRes.data[agreeTag] : null
  518. );
  519. if (
  520. this.actionAgreeData &&
  521. this.actionAgreeData.service &&
  522. this.actionAgreeData.dest
  523. ) {
  524. buttons.push({ text: "同意", action: "agree" });
  525. }
  526. }
  527. this.bottomButtons = buttons;
  528. },
  529. async callApi() {
  530. this.loading = true;
  531. this.infoData = null;
  532. this.actionAgreeData = null;
  533. this.actionRejectData = null;
  534. this.bottomButtons = [];
  535. this.topIframeSrc = "";
  536. this.chgIframeSrc = "";
  537. this.shIframeSrc = "";
  538. this.missingParams = [];
  539. this.setInitStatus(
  540. "loading",
  541. "页面初始化中",
  542. "正在加载审核数据,请稍候..."
  543. );
  544. let apiResponse = null;
  545. try {
  546. if (this.pageParams.ssToken) {
  547. apiResponse = await request.post(
  548. `/service?ssToken=${this.pageParams.ssToken}`,
  549. {},
  550. { loading: false }
  551. );
  552. }
  553. const context = this.resolveBusinessContext(apiResponse);
  554. this.sqid = context.sqid;
  555. this.shid = context.shid;
  556. this.shyjm = context.shyjm;
  557. this.ssObjName = context.ssObjName;
  558. this.ssObjId = context.ssObjId;
  559. this.bdlbm = context.bdlbm;
  560. this.dataType = context.dataType;
  561. this.encode_shid = context.encode_shid;
  562. this.jdmc = context.jdmc || "";
  563. const requiredKeys = ["sqid", "shid", "ssObjId"];
  564. this.missingParams = requiredKeys.filter((key) => !this[key]);
  565. const query = this.buildCommonQuery();
  566. const infoRes = await request.post(
  567. `/service?ssServ=dataTag&ssDest=data&name=info&ssObjName=${encodeURIComponent(
  568. this.ssObjName
  569. )}&ssObjId=${encodeURIComponent(
  570. this.ssObjId
  571. )}&sqid=${encodeURIComponent(
  572. this.sqid
  573. )}&shid=${encodeURIComponent(this.shid)}`,
  574. {},
  575. { loading: false, formData: true }
  576. );
  577. this.infoData = infoRes && infoRes.data ? infoRes.data.info : null;
  578. this.topIframeSrc = this.buildInfoIframeSrc(this.infoData, query);
  579. // 新增变动情况子页承接 by xu 2026-03-06
  580. this.chgIframeSrc = this.buildIframeSrc(
  581. // 功能说明:变动页签入口改为精确命中 mp_chgChkTab.html,对齐 chgChkTab.ss.jsp by xu 2026-03-08
  582. "/page/mp_chgChkTab.html",
  583. {
  584. ...query,
  585. service: "selChgInfo",
  586. dest: "chgList",
  587. ssServ: "selChgInfo",
  588. ssDest: "chgList",
  589. param: JSON.stringify({ sqid: this.sqid }),
  590. }
  591. );
  592. this.shIframeSrc = this.buildIframeSrc(
  593. "/page/mp_shList.html",
  594. query
  595. );
  596. await this.fetchActionConfigs();
  597. this.setInitStatus("ready", "页面已就绪", "审核数据加载完成");
  598. } catch (error) {
  599. const normalized = this.normalizeError(error);
  600. this.setInitStatus(
  601. "error",
  602. "页面初始化失败",
  603. normalized.message || "页面初始化失败,请稍后重试"
  604. );
  605. console.error("[mp_chgchk] 初始化失败", error);
  606. if (typeof showToastEffect === "function") {
  607. showToastEffect("页面初始化失败,请稍后重试", 2200, "error");
  608. }
  609. } finally {
  610. this.loading = false;
  611. }
  612. },
  613. buildSubmitPayload(actionPayload) {
  614. const submitPayload = {};
  615. if (this.shid) submitPayload.shid = this.shid;
  616. if (this.sqid) submitPayload.sqid = this.sqid;
  617. if (this.ssObjName) submitPayload.ssObjName = this.ssObjName;
  618. if (this.ssObjId) submitPayload.ssObjId = this.ssObjId;
  619. const payloadObj =
  620. actionPayload && typeof actionPayload === "object"
  621. ? actionPayload
  622. : {};
  623. const reviewValue = this.pickFirstValue(
  624. [payloadObj],
  625. [
  626. "shsm",
  627. "shyjValue",
  628. "shyj",
  629. "spyj",
  630. "opinion",
  631. "comment",
  632. "remark",
  633. "reason",
  634. "yj",
  635. ]
  636. );
  637. if (
  638. reviewValue !== undefined &&
  639. reviewValue !== null &&
  640. reviewValue !== ""
  641. ) {
  642. submitPayload.shsm = String(reviewValue);
  643. }
  644. return submitPayload;
  645. },
  646. goBackWithRefresh() {
  647. if (
  648. window.NavigationManager &&
  649. typeof window.NavigationManager.goBack === "function"
  650. ) {
  651. window.NavigationManager.goBack({ refreshParent: true });
  652. return;
  653. }
  654. window.history.back();
  655. },
  656. async submitByConfig(conf, actionPayload) {
  657. const serviceName = conf && (conf.service || conf.servName);
  658. const destName = conf && conf.dest;
  659. if (!conf || !serviceName || !destName) {
  660. if (typeof showToastEffect === "function") {
  661. showToastEffect("缺少提交配置", 2200, "error");
  662. }
  663. return;
  664. }
  665. if (this.submitting) return;
  666. try {
  667. this.submitting = true;
  668. await request.post(
  669. `/service?ssServ=${encodeURIComponent(
  670. serviceName
  671. )}&ssDest=${encodeURIComponent(destName)}`,
  672. this.buildSubmitPayload(actionPayload),
  673. {
  674. loading: true,
  675. formData: true,
  676. }
  677. );
  678. if (typeof showToastEffect === "function") {
  679. showToastEffect("提交成功", 1200, "success");
  680. }
  681. setTimeout(() => {
  682. this.goBackWithRefresh();
  683. }, 300);
  684. } catch (error) {
  685. console.error("[mp_chgchk] 提交失败", error);
  686. if (typeof showToastEffect === "function") {
  687. showToastEffect("提交失败,请稍后重试", 2200, "error");
  688. }
  689. } finally {
  690. this.submitting = false;
  691. }
  692. },
  693. handleBottomAction(payload) {
  694. if (!payload || !payload.action) return;
  695. if (payload.action === "agree") {
  696. this.submitByConfig(this.actionAgreeData, payload);
  697. return;
  698. }
  699. if (payload.action === "reject") {
  700. this.submitByConfig(this.actionRejectData, payload);
  701. }
  702. },
  703. showCurrentUrls() {
  704. const lines = [
  705. `page: ${window.location.href}`,
  706. `info: ${
  707. (this.$refs.infoIframe && this.$refs.infoIframe.src) ||
  708. this.topIframeSrc ||
  709. "(empty)"
  710. }`,
  711. `chg: ${
  712. (this.$refs.chgIframe && this.$refs.chgIframe.src) ||
  713. this.chgIframeSrc ||
  714. "(empty)"
  715. }`,
  716. `sh: ${
  717. (this.$refs.shIframe && this.$refs.shIframe.src) ||
  718. this.shIframeSrc ||
  719. "(empty)"
  720. }`,
  721. ];
  722. this.urlLogText = lines.join("\n");
  723. this.urlLogVisible = true;
  724. },
  725. },
  726. });
  727. });
  728. </script>
  729. </body>
  730. </html>