Sfoglia il codice sorgente

完成新增问题功能

linqilong 1 settimana fa
parent
commit
bcced33103

+ 0 - 676
src/api/home.js

@@ -1,676 +0,0 @@
-import request from "@/utils/request";
-
-/**
- * 水文测站实时信息
- */
-export function getRStLLMaxDate() {
-  return request({
-    url: '/tbazmw/thdata/getRVandDrpMaxDate',
-    method: 'get'
-  })
-  // return Promise.resolve([
-  //   {
-  //     "stcd": "63304700",
-  //     "stnm": "太师桥",
-  //     "title": "太师桥",
-  //     "tm": "2024-10-30 14:00:00",
-  //     "lgtd": "120.4941",
-  //     "lttd": "30.762836",
-  //     "shuxing": "基本站",
-  //     "xzqh": "浙江嘉兴",
-  //     "z": "3.24",
-  //     "q": "73.791",
-  //     "drp": "0",
-  //     "dyp": null,
-  //     "stjl": null,
-  //     "xsa": null,
-  //     "xsavv": null,
-  //     "xsmxv": null,
-  //     "flwchrcd": null,
-  //     "wptn": null,
-  //     "msqmt": null,
-  //     "msamt": null,
-  //     "msvmt": null,
-  //     "grz": null,
-  //     "wrz": null,
-  //     "avz": null,
-  //     "avq": null,
-  //     "maxz": null,
-  //     "minz": null,
-  //     "maxq": null,
-  //     "minq": null,
-  //     "maxztm": null,
-  //     "minztm": null,
-  //     "maxqtm": null,
-  //     "minqtm": null,
-  //     "day": null,
-  //     "mnth": null,
-  //     "ohmaxr": null,
-  //     "ohbgtm": null,
-  //     "twhmaxr": null,
-  //     "shmaxr": null,
-  //     "shbgtm": null,
-  //     "twemaxr": null,
-  //     "twbgtm": null,
-  //     "odbgtm": null,
-  //     "tedmaxr": null,
-  //     "tedbgtm": null,
-  //     "odmaxr": null,
-  //     "mydavz": null,
-  //     "mydavq": null,
-  //     "swz": null
-  //   },
-  //   {
-  //     "stcd": "63304650",
-  //     "stnm": "思源",
-  //     "title": "思源",
-  //     "tm": "2024-10-30 14:00:00",
-  //     "lgtd": "120.522088",
-  //     "lttd": "30.841321",
-  //     "shuxing": "基本站",
-  //     "xzqh": "浙江嘉兴",
-  //     "z": "3.15",
-  //     "q": "15.308",
-  //     "drp": "0",
-  //     "dyp": null,
-  //     "stjl": null,
-  //     "xsa": null,
-  //     "xsavv": null,
-  //     "xsmxv": null,
-  //     "flwchrcd": null,
-  //     "wptn": null,
-  //     "msqmt": null,
-  //     "msamt": null,
-  //     "msvmt": null,
-  //     "grz": null,
-  //     "wrz": null,
-  //     "avz": null,
-  //     "avq": null,
-  //     "maxz": null,
-  //     "minz": null,
-  //     "maxq": null,
-  //     "minq": null,
-  //     "maxztm": null,
-  //     "minztm": null,
-  //     "maxqtm": null,
-  //     "minqtm": null,
-  //     "day": null,
-  //     "mnth": null,
-  //     "ohmaxr": null,
-  //     "ohbgtm": null,
-  //     "twhmaxr": null,
-  //     "shmaxr": null,
-  //     "shbgtm": null,
-  //     "twemaxr": null,
-  //     "twbgtm": null,
-  //     "odbgtm": null,
-  //     "tedmaxr": null,
-  //     "tedbgtm": null,
-  //     "odmaxr": null,
-  //     "mydavz": null,
-  //     "mydavq": null,
-  //     "swz": null
-  //   },
-  //   {
-  //     "stcd": "70112100",
-  //     "stnm": "罗桐埠 ",
-  //     "title": "罗桐埠 ",
-  //     "tm": "2024-10-30 14:00:00",
-  //     "lgtd": "119.254444",
-  //     "lttd": "29.476389",
-  //     "shuxing": "基本站",
-  //     "xzqh": "浙江杭州",
-  //     "z": "23.14",
-  //     "q": "0",
-  //     "drp": "0",
-  //     "dyp": null,
-  //     "stjl": null,
-  //     "xsa": null,
-  //     "xsavv": null,
-  //     "xsmxv": null,
-  //     "flwchrcd": null,
-  //     "wptn": null,
-  //     "msqmt": null,
-  //     "msamt": null,
-  //     "msvmt": null,
-  //     "grz": null,
-  //     "wrz": null,
-  //     "avz": null,
-  //     "avq": null,
-  //     "maxz": null,
-  //     "minz": null,
-  //     "maxq": null,
-  //     "minq": null,
-  //     "maxztm": null,
-  //     "minztm": null,
-  //     "maxqtm": null,
-  //     "minqtm": null,
-  //     "day": null,
-  //     "mnth": null,
-  //     "ohmaxr": null,
-  //     "ohbgtm": null,
-  //     "twhmaxr": null,
-  //     "shmaxr": null,
-  //     "shbgtm": null,
-  //     "twemaxr": null,
-  //     "twbgtm": null,
-  //     "odbgtm": null,
-  //     "tedmaxr": null,
-  //     "tedbgtm": null,
-  //     "odmaxr": null,
-  //     "mydavz": null,
-  //     "mydavq": null,
-  //     "swz": null
-  //   },
-  //   {
-  //     "stcd": "70111400",
-  //     "stnm": "街口",
-  //     "title": "街口",
-  //     "tm": "2024-10-30 14:00:00",
-  //     "lgtd": "118.71691",
-  //     "lttd": "29.72391",
-  //     "shuxing": "基本站",
-  //     "xzqh": "浙江杭州",
-  //     "z": "102.43",
-  //     "q": "0",
-  //     "drp": "0",
-  //     "dyp": null,
-  //     "stjl": null,
-  //     "xsa": null,
-  //     "xsavv": null,
-  //     "xsmxv": null,
-  //     "flwchrcd": null,
-  //     "wptn": null,
-  //     "msqmt": null,
-  //     "msamt": null,
-  //     "msvmt": null,
-  //     "grz": null,
-  //     "wrz": null,
-  //     "avz": null,
-  //     "avq": null,
-  //     "maxz": null,
-  //     "minz": null,
-  //     "maxq": null,
-  //     "minq": null,
-  //     "maxztm": null,
-  //     "minztm": null,
-  //     "maxqtm": null,
-  //     "minqtm": null,
-  //     "day": null,
-  //     "mnth": null,
-  //     "ohmaxr": null,
-  //     "ohbgtm": null,
-  //     "twhmaxr": null,
-  //     "shmaxr": null,
-  //     "shbgtm": null,
-  //     "twemaxr": null,
-  //     "twbgtm": null,
-  //     "odbgtm": null,
-  //     "tedmaxr": null,
-  //     "tedbgtm": null,
-  //     "odmaxr": null,
-  //     "mydavz": null,
-  //     "mydavq": null,
-  //     "swz": null
-  //   },
-  //   {
-  //     "stcd": "63301700",
-  //     "stnm": "北虹大桥",
-  //     "title": "北虹大桥",
-  //     "tm": "2024-10-30 14:00:00",
-  //     "lgtd": "120.709747",
-  //     "lttd": "30.885936",
-  //     "shuxing": "基本站",
-  //     "xzqh": "浙江嘉兴",
-  //     "z": "3.049",
-  //     "q": "26.255",
-  //     "drp": null,
-  //     "dyp": null,
-  //     "stjl": null,
-  //     "xsa": null,
-  //     "xsavv": null,
-  //     "xsmxv": null,
-  //     "flwchrcd": null,
-  //     "wptn": null,
-  //     "msqmt": null,
-  //     "msamt": null,
-  //     "msvmt": null,
-  //     "grz": null,
-  //     "wrz": null,
-  //     "avz": null,
-  //     "avq": null,
-  //     "maxz": null,
-  //     "minz": null,
-  //     "maxq": null,
-  //     "minq": null,
-  //     "maxztm": null,
-  //     "minztm": null,
-  //     "maxqtm": null,
-  //     "minqtm": null,
-  //     "day": null,
-  //     "mnth": null,
-  //     "ohmaxr": null,
-  //     "ohbgtm": null,
-  //     "twhmaxr": null,
-  //     "shmaxr": null,
-  //     "shbgtm": null,
-  //     "twemaxr": null,
-  //     "twbgtm": null,
-  //     "odbgtm": null,
-  //     "tedmaxr": null,
-  //     "tedbgtm": null,
-  //     "odmaxr": null,
-  //     "mydavz": null,
-  //     "mydavq": null,
-  //     "swz": null
-  //   },
-  //   {
-  //     "stcd": "63304730",
-  //     "stnm": "文桥",
-  //     "title": "文桥",
-  //     "tm": "2024-10-30 14:00:00",
-  //     "lgtd": "120.465831",
-  //     "lttd": "30.800258",
-  //     "shuxing": "预警站",
-  //     "xzqh": "浙江湖州",
-  //     "z": "3.21",
-  //     "q": "7.77",
-  //     "drp": null,
-  //     "dyp": null,
-  //     "stjl": null,
-  //     "xsa": null,
-  //     "xsavv": null,
-  //     "xsmxv": null,
-  //     "flwchrcd": null,
-  //     "wptn": null,
-  //     "msqmt": null,
-  //     "msamt": null,
-  //     "msvmt": null,
-  //     "grz": null,
-  //     "wrz": null,
-  //     "avz": null,
-  //     "avq": null,
-  //     "maxz": null,
-  //     "minz": null,
-  //     "maxq": null,
-  //     "minq": null,
-  //     "maxztm": null,
-  //     "minztm": null,
-  //     "maxqtm": null,
-  //     "minqtm": null,
-  //     "day": null,
-  //     "mnth": null,
-  //     "ohmaxr": null,
-  //     "ohbgtm": null,
-  //     "twhmaxr": null,
-  //     "shmaxr": null,
-  //     "shbgtm": null,
-  //     "twemaxr": null,
-  //     "twbgtm": null,
-  //     "odbgtm": null,
-  //     "tedmaxr": null,
-  //     "tedbgtm": null,
-  //     "odmaxr": null,
-  //     "mydavz": null,
-  //     "mydavq": null,
-  //     "swz": null
-  //   },
-  //   {
-  //     "stcd": "63305451",
-  //     "stnm": "圣塘桥",
-  //     "title": "圣塘桥",
-  //     "tm": "2024-10-30 14:00:00",
-  //     "lgtd": "120.589144",
-  //     "lttd": "30.838792",
-  //     "shuxing": "预警站",
-  //     "xzqh": "浙江嘉兴",
-  //     "z": "3.13",
-  //     "q": "-40.204",
-  //     "drp": null,
-  //     "dyp": null,
-  //     "stjl": null,
-  //     "xsa": null,
-  //     "xsavv": null,
-  //     "xsmxv": null,
-  //     "flwchrcd": null,
-  //     "wptn": null,
-  //     "msqmt": null,
-  //     "msamt": null,
-  //     "msvmt": null,
-  //     "grz": null,
-  //     "wrz": null,
-  //     "avz": null,
-  //     "avq": null,
-  //     "maxz": null,
-  //     "minz": null,
-  //     "maxq": null,
-  //     "minq": null,
-  //     "maxztm": null,
-  //     "minztm": null,
-  //     "maxqtm": null,
-  //     "minqtm": null,
-  //     "day": null,
-  //     "mnth": null,
-  //     "ohmaxr": null,
-  //     "ohbgtm": null,
-  //     "twhmaxr": null,
-  //     "shmaxr": null,
-  //     "shbgtm": null,
-  //     "twemaxr": null,
-  //     "twbgtm": null,
-  //     "odbgtm": null,
-  //     "tedmaxr": null,
-  //     "tedbgtm": null,
-  //     "odmaxr": null,
-  //     "mydavz": null,
-  //     "mydavq": null,
-  //     "swz": null
-  //   },
-  //   {
-  //     "stcd": "63205690",
-  //     "stnm": "太平桥",
-  //     "title": "太平桥",
-  //     "tm": "2024-10-30 14:00:00",
-  //     "lgtd": "120.702609",
-  //     "lttd": "30.886256",
-  //     "shuxing": "预警站",
-  //     "xzqh": "江苏苏州",
-  //     "z": "3.05",
-  //     "q": "18.11",
-  //     "drp": null,
-  //     "dyp": null,
-  //     "stjl": null,
-  //     "xsa": null,
-  //     "xsavv": null,
-  //     "xsmxv": null,
-  //     "flwchrcd": null,
-  //     "wptn": null,
-  //     "msqmt": null,
-  //     "msamt": null,
-  //     "msvmt": null,
-  //     "grz": null,
-  //     "wrz": null,
-  //     "avz": null,
-  //     "avq": null,
-  //     "maxz": null,
-  //     "minz": null,
-  //     "maxq": null,
-  //     "minq": null,
-  //     "maxztm": null,
-  //     "minztm": null,
-  //     "maxqtm": null,
-  //     "minqtm": null,
-  //     "day": null,
-  //     "mnth": null,
-  //     "ohmaxr": null,
-  //     "ohbgtm": null,
-  //     "twhmaxr": null,
-  //     "shmaxr": null,
-  //     "shbgtm": null,
-  //     "twemaxr": null,
-  //     "twbgtm": null,
-  //     "odbgtm": null,
-  //     "tedmaxr": null,
-  //     "tedbgtm": null,
-  //     "odmaxr": null,
-  //     "mydavz": null,
-  //     "mydavq": null,
-  //     "swz": null
-  //   },
-  //   {
-  //     "stcd": "63205680",
-  //     "stnm": "双林桥 ",
-  //     "title": "双林桥 ",
-  //     "tm": "2024-10-30 14:00:00",
-  //     "lgtd": "120.705375",
-  //     "lttd": "30.922552",
-  //     "shuxing": "预警站",
-  //     "xzqh": "江苏苏州",
-  //     "z": "3.05",
-  //     "q": "-1.666",
-  //     "drp": null,
-  //     "dyp": null,
-  //     "stjl": null,
-  //     "xsa": null,
-  //     "xsavv": null,
-  //     "xsmxv": null,
-  //     "flwchrcd": null,
-  //     "wptn": null,
-  //     "msqmt": null,
-  //     "msamt": null,
-  //     "msvmt": null,
-  //     "grz": null,
-  //     "wrz": null,
-  //     "avz": null,
-  //     "avq": null,
-  //     "maxz": null,
-  //     "minz": null,
-  //     "maxq": null,
-  //     "minq": null,
-  //     "maxztm": null,
-  //     "minztm": null,
-  //     "maxqtm": null,
-  //     "minqtm": null,
-  //     "day": null,
-  //     "mnth": null,
-  //     "ohmaxr": null,
-  //     "ohbgtm": null,
-  //     "twhmaxr": null,
-  //     "shmaxr": null,
-  //     "shbgtm": null,
-  //     "twemaxr": null,
-  //     "twbgtm": null,
-  //     "odbgtm": null,
-  //     "tedmaxr": null,
-  //     "tedbgtm": null,
-  //     "odmaxr": null,
-  //     "mydavz": null,
-  //     "mydavq": null,
-  //     "swz": null
-  //   },
-  //   {
-  //     "stcd": "63205670",
-  //     "stnm": "章湾圩公路桥",
-  //     "title": "章湾圩公路桥",
-  //     "tm": "2024-10-30 14:00:00",
-  //     "lgtd": "120.756256",
-  //     "lttd": "30.978642",
-  //     "shuxing": "预警站",
-  //     "xzqh": "江苏苏州",
-  //     "z": "3.04",
-  //     "q": "-9.445",
-  //     "drp": null,
-  //     "dyp": null,
-  //     "stjl": null,
-  //     "xsa": null,
-  //     "xsavv": null,
-  //     "xsmxv": null,
-  //     "flwchrcd": null,
-  //     "wptn": null,
-  //     "msqmt": null,
-  //     "msamt": null,
-  //     "msvmt": null,
-  //     "grz": null,
-  //     "wrz": null,
-  //     "avz": null,
-  //     "avq": null,
-  //     "maxz": null,
-  //     "minz": null,
-  //     "maxq": null,
-  //     "minq": null,
-  //     "maxztm": null,
-  //     "minztm": null,
-  //     "maxqtm": null,
-  //     "minqtm": null,
-  //     "day": null,
-  //     "mnth": null,
-  //     "ohmaxr": null,
-  //     "ohbgtm": null,
-  //     "twhmaxr": null,
-  //     "shmaxr": null,
-  //     "shbgtm": null,
-  //     "twemaxr": null,
-  //     "twbgtm": null,
-  //     "odbgtm": null,
-  //     "tedmaxr": null,
-  //     "tedbgtm": null,
-  //     "odmaxr": null,
-  //     "mydavz": null,
-  //     "mydavq": null,
-  //     "swz": null
-  //   },
-  //   {
-  //     "stcd": "701T0001",
-  //     "stnm": "新安江水文实验站",
-  //     "title": "丁栅闸",
-  //     "tm": "2024-10-30 14:00:00",
-  //     "lgtd": "120.9528",
-  //     "lttd": "31.018267",
-  //     "shuxing": "预警站",
-  //     "xzqh": "浙江嘉兴",
-  //     "z": "3.22",
-  //     "q": "-3.014",
-  //     "drp": null,
-  //     "dyp": null,
-  //     "stjl": null,
-  //     "xsa": null,
-  //     "xsavv": null,
-  //     "xsmxv": null,
-  //     "flwchrcd": null,
-  //     "wptn": null,
-  //     "msqmt": null,
-  //     "msamt": null,
-  //     "msvmt": null,
-  //     "grz": null,
-  //     "wrz": null,
-  //     "avz": null,
-  //     "avq": null,
-  //     "maxz": null,
-  //     "minz": null,
-  //     "maxq": null,
-  //     "minq": null,
-  //     "maxztm": null,
-  //     "minztm": null,
-  //     "maxqtm": null,
-  //     "minqtm": null,
-  //     "day": null,
-  //     "mnth": null,
-  //     "ohmaxr": null,
-  //     "ohbgtm": null,
-  //     "twhmaxr": null,
-  //     "shmaxr": null,
-  //     "shbgtm": null,
-  //     "twemaxr": null,
-  //     "twbgtm": null,
-  //     "odbgtm": null,
-  //     "tedmaxr": null,
-  //     "tedbgtm": null,
-  //     "odmaxr": null,
-  //     "mydavz": null,
-  //     "mydavq": null,
-  //     "swz": null
-  //   },
-  //   {
-  //     "stcd": "71501011",
-  //     "stnm": "双港",
-  //     "title": "马蹄岙电站",
-  //     "tm": "2024-10-28 00:00:00",
-  //     "lgtd": "118.91861",
-  //     "lttd": "27.61917",
-  //     "shuxing": null,
-  //     "xzqh": null,
-  //     "z": null,
-  //     "q": "12.69",
-  //     "drp": null,
-  //     "dyp": null,
-  //     "stjl": null,
-  //     "xsa": null,
-  //     "xsavv": null,
-  //     "xsmxv": null,
-  //     "flwchrcd": null,
-  //     "wptn": null,
-  //     "msqmt": null,
-  //     "msamt": null,
-  //     "msvmt": null,
-  //     "grz": null,
-  //     "wrz": null,
-  //     "avz": null,
-  //     "avq": null,
-  //     "maxz": null,
-  //     "minz": null,
-  //     "maxq": null,
-  //     "minq": null,
-  //     "maxztm": null,
-  //     "minztm": null,
-  //     "maxqtm": null,
-  //     "minqtm": null,
-  //     "day": null,
-  //     "mnth": null,
-  //     "ohmaxr": null,
-  //     "ohbgtm": null,
-  //     "twhmaxr": null,
-  //     "shmaxr": null,
-  //     "shbgtm": null,
-  //     "twemaxr": null,
-  //     "twbgtm": null,
-  //     "odbgtm": null,
-  //     "tedmaxr": null,
-  //     "tedbgtm": null,
-  //     "odmaxr": null,
-  //     "mydavz": null,
-  //     "mydavq": null,
-  //     "swz": null
-  //   },
-  //   {
-  //     "stcd": "71501010",
-  //     "stnm": "托溪水文站",
-  //     "title": "托溪水文站",
-  //     "tm": "2024-10-30 14:00:00",
-  //     "lgtd": "119.354764",
-  //     "lttd": "27.491128",
-  //     "shuxing": null,
-  //     "xzqh": "福建宁德",
-  //     "z": "1.58",
-  //     "q": "2",
-  //     "drp": "0",
-  //     "dyp": null,
-  //     "stjl": null,
-  //     "xsa": null,
-  //     "xsavv": null,
-  //     "xsmxv": null,
-  //     "flwchrcd": null,
-  //     "wptn": null,
-  //     "msqmt": null,
-  //     "msamt": null,
-  //     "msvmt": null,
-  //     "grz": null,
-  //     "wrz": null,
-  //     "avz": null,
-  //     "avq": null,
-  //     "maxz": null,
-  //     "minz": null,
-  //     "maxq": null,
-  //     "minq": null,
-  //     "maxztm": null,
-  //     "minztm": null,
-  //     "maxqtm": null,
-  //     "minqtm": null,
-  //     "day": null,
-  //     "mnth": null,
-  //     "ohmaxr": null,
-  //     "ohbgtm": null,
-  //     "twhmaxr": null,
-  //     "shmaxr": null,
-  //     "shbgtm": null,
-  //     "twemaxr": null,
-  //     "twbgtm": null,
-  //     "odbgtm": null,
-  //     "tedmaxr": null,
-  //     "tedbgtm": null,
-  //     "odmaxr": null,
-  //     "mydavz": null,
-  //     "mydavq": null,
-  //     "swz": null
-  //   }
-  // ])
-}

+ 17 - 0
src/api/questions.js

@@ -38,6 +38,16 @@ export function getIllegalActList(data) {
     })
 }
 
+/**
+ * 违法事项详情
+ */
+export function getIllegalActById(id) {
+    return request({
+        url: `/tac/obj/pblmstb/${id}`,
+        method: 'get',
+    })
+}
+
 /**
  * 稽查 - 稽查单位
  */
@@ -59,3 +69,10 @@ export function addTacQuestion(data) {
         data: data
     })
 }
+
+export function deleteTacQuestion(pblmId) {
+    return request({
+        url: `/tac/pblm/info/del/${pblmId}`,
+        method: 'get',
+    })
+}

+ 2 - 2
src/components/GwSelect02.vue

@@ -34,11 +34,11 @@ const onConfirm = ({selectedOptions}) => {
 };
 
 function getTypeName(code) {
-  debugger
   if (!code) return '';
   if (props.columns && props.columns.length > 0) {
-    return props.columns.find(item => item.value === code)?.text;
+    return props.columns.find(item => item.value === code)?.text || code;
   }
+  return code;
 }
 
 watch(() => props.value, (newValue) => {

+ 4 - 2
src/components/card01.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="card-01-wrapper">
     <van-row>
-      <van-col :span="$slots.right ? 20 : 24">
+      <van-col :span="$slots.right ? 20 : 24" @click="emits('select')">
         <div class="card-01-header">
           <van-icon v-if="props.icon && isString(props.icon)" :name="props.icon" color="#1989fa"
                     size="1.3rem" style="margin-right: 5px;"/>
@@ -23,9 +23,11 @@
   </div>
 </template>
 <script setup>
-import {defineProps} from 'vue';
+import {defineEmits, defineProps} from 'vue';
 import {isString} from '@/utils/validate';
 
+const emits = defineEmits(['select']);
+
 const props = defineProps({
   icon: {
     default: ''

+ 0 - 54
src/components/list01.vue

@@ -1,54 +0,0 @@
-<template>
-    <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
-        <card01 v-for="item in list" :key="item" :title="item.prsnTitle + ''" icon="notes"
-            :description="`时间:${item.sttm} 至 ${item.entm}`" @click="handleClick(item.prsnId)" />
-    </van-list>
-</template>
-<script setup>
-import {defineEmits, defineProps, ref, watch} from 'vue';
-import card01 from './card01.vue';
-import {getCurrGroup, getInspBaseByPersid} from '@/api/inspect.js';
-
-const emits = defineEmits(['onClick']);
-
-const props = defineProps({
-    type: {
-        type: String,
-    },
-    batch: {
-        type: String,
-    },
-})
-
-
-const list = ref([]);
-const loading = ref(false);
-const finished = ref(false);
-
-function onLoad() {
-    if (props.type === 'history' && props.batch) {
-        getInspBaseByPersid(props.batch).then(res => {
-            list.value = res.data;
-            loading.value = false;
-            finished.value = true;
-        })
-    } else {
-        getCurrGroup(props.batch).then(res => {
-            list.value = res.data;
-            loading.value = false;
-            finished.value = true;
-        })
-    }
-}
-
-function handleClick(id) {
-    emits('onClick', id);
-}
-
-
-watch(() => props.batch, batch => {
-    if (batch) {
-        onLoad()
-    }
-})
-</script>

+ 6 - 5
src/layout/components/BottomNav.vue

@@ -10,14 +10,15 @@
 </template>
 
 <script setup>
-import { ref } from 'vue';
-import { useRouter, useRoute } from 'vue-router';
-import { useAppStore } from '@/stores/app'
+import {ref} from 'vue';
+import {useRoute, useRouter} from 'vue-router';
+import {useAppStore} from '@/stores/app'
+
 const appStore = useAppStore()
 
 const menuList = [
     { name: '首页', icon: 'wap-home-o', path: '/home' },
-    { name: '一张图', icon: 'location-o', path: '/map' },
+    // { name: '一张图', icon: 'location-o', path: '/map' },
     { name: appStore.ownApp === "1" ? '督查': '稽查', icon: 'completed-o', path: '/inspect' },
     { name: '问题', icon: 'orders-o', path: '/problem' },
     { name: '我的', icon: 'user-o', path: '/about' },
@@ -61,4 +62,4 @@ const setActiveIndex = (path) => {
 .bottom-nav a.active {
     color: #007BFF;
 }
-</style>
+</style>

+ 6 - 0
src/router/index.js

@@ -58,6 +58,12 @@ const routes = [
                 component: () => import('@/views/Problem/detail/index.vue'),
                 meta: {title: '问题详情', showBack: true}
             },
+            {
+                path: 'problemAdd',
+                name: 'problemAdd',
+                component: () => import('@/views/Problem/detail/index.vue'),
+                meta: {title: '问题详情', showBack: true}
+            },
         ],
     },
 ];

+ 12 - 12
src/utils/page.js

@@ -7,16 +7,16 @@ import router from '@/router/index';
  * @param isBlank 是否新页面打开
  */
 export function jumpPage(path, query = null, isBlank = false) {
-  if (path) {
-    if (!isBlank) {
-      router.push({path, query})
-    } else {
-      if (path.indexOf('http') !== -1) {
-        window.open(path, '_blank')
-      } else {
-        let routeUrl = router.resolve({path, query})
-        window.open(routeUrl.href, '_blank')
-      }
+    if (path) {
+        if (!isBlank) {
+            router.push({path, query})
+        } else {
+            if (path.indexOf('http') !== -1) {
+                window.open(path, '_blank')
+            } else {
+                let routeUrl = router.resolve({path, query})
+                window.open(routeUrl.href, '_blank')
+            }
+        }
     }
-  }
-}
+}

+ 39 - 10
src/views/Inspect/Object/Problem/index.vue

@@ -5,19 +5,33 @@
     <van-collapse v-model="activeNames" class="pblm-list-wrapper">
       <van-collapse-item v-for="item in list" :key="item.id" :name="item.id">
         <template #title>
-          <div>{{ item.name }}&nbsp;&nbsp;<van-tag v-if="item.pblmList && item.pblmList.length > 0" round
-                                                   type="primary">{{ item.pblmList.length }}
-          </van-tag>
+          <div>
+            {{ item.name }}&nbsp;&nbsp;
+            <van-tag v-if="item.pblmList && item.pblmList.length > 0" round type="primary">
+              {{ item.pblmList.length }}
+            </van-tag>
           </div>
         </template>
         <card01 v-for="pblm in item.pblmList" :key="pblm.pblmId" :title="pblm.pblmNm" icon="question"
-                @click="jumpPage(`/problem/${pblm.id}`)">
+                @onSelect="jumpPage(`/problem/${pblm.id}`)">
           <template #right>
-            <van-icon color="#000" name="delete-o" size="1rem" @click="deletePblm()"/>
+            <van-icon color="#000" name="delete-o" size="1rem" @click="deletePblm(item.id)"/>
           </template>
         </card01>
       </van-collapse-item>
     </van-collapse>
+
+    <div style="position: absolute;right: 5px;bottom: 5px;">
+      <van-popover v-model:show="showAddPopover"
+                   :actions="list.map(a =>  { return {text: a.name.replace('专业', '')} })"
+                   class="new-problem"
+                   placement="top-end"
+                   @select="onSelect">
+        <template #reference>
+          <van-button type="primary">新增问题</van-button>
+        </template>
+      </van-popover>
+    </div>
   </div>
 </template>
 <script setup>
@@ -28,6 +42,7 @@ import {getTacQuestionList} from "@/api/inspect";
 import {getBaseByInspectType} from "@/assets/js/base";
 import {renderData} from "@/utils/template";
 import {jumpPage} from "@/utils/page";
+import {deleteTacQuestion} from "@/api/questions";
 
 const route = useRoute();
 const activeNames = ref(['1']);
@@ -43,6 +58,13 @@ const loading = ref(false);
 const inspectType = route.query.inspectType;
 const object = ref(JSON.parse(route.query.object));
 const objectConfig = ref(getBaseByInspectType(inspectType));
+const showAddPopover = ref(false);
+
+const onSelect = (action) => {
+  const inspect = list.value.find(item => item.name === action.text + '专业')
+
+  jumpPage(`/problemAdd`, {inspectType: inspect.id, rgstrId: object.value.id, objId: object.value.objId});
+};
 
 function getData() {
   getTacQuestionList(route.params.objId).then(res => {
@@ -53,17 +75,19 @@ function getData() {
   })
 }
 
-function deletePblm() {
-  console.log('deletePblm');
+/**
+ * 删除问题
+ */
+function deletePblm(pblmId) {
+  deleteTacQuestion(pblmId).then(() => {
+    getData();
+  })
 }
 
 onMounted(() => {
   getData();
 })
 </script>
-<style lang="scss" scoped>
-
-</style>
 <style lang="scss">
 .pblm-list-wrapper {
   padding: 0 10px;
@@ -76,4 +100,9 @@ onMounted(() => {
   }
 }
 
+.new-problem {
+  .van-popover__action {
+    width: auto;
+  }
+}
 </style>

+ 53 - 53
src/views/Inspect/history.vue

@@ -1,27 +1,27 @@
 <template>
-    <div class="content-wrapper">
-        <div class="filter-wrapper">
-            <gw-select :columns="inspectTypes" v-model:value="inspectType" />
-            <gw-select :columns="baseBatchs" v-model:value="baseBatch" />
-            <gw-select :columns="twoBatchs" v-model:value="twoBatch" />
-        </div>
-        <van-pull-refresh class="inspect-group-wrapper" v-model="loading" @refresh="getInspBase(twoBatch, 3)">
-            <card01 v-for="item in list" :key="item" :title="item.prsnTitle + ''" icon="notes"
-                :description="`时间:${item.sttm} 至 ${item.entm}`" @click="jumpPage(`/inspect/${item.plnaId}/objects`, { inspectType  })" />
-        </van-pull-refresh>
+  <div class="content-wrapper">
+    <div class="filter-wrapper">
+      <gw-select v-model:value="inspectType" :columns="inspectTypes"/>
+      <gw-select v-model:value="baseBatch" :columns="baseBatchs"/>
+      <gw-select v-model:value="twoBatch" :columns="twoBatchs"/>
     </div>
+    <van-pull-refresh v-model="loading" class="inspect-group-wrapper" @refresh="getInspBase(twoBatch, 3)">
+      <card01 v-for="item in list" :key="item" :description="`时间:${item.sttm} 至 ${item.entm}`"
+              :title="item.prsnTitle + ''"
+              icon="notes"
+              @click="jumpPage(`/inspect/${item.plnaId}/objects`, { inspectType  })"/>
+    </van-pull-refresh>
+  </div>
 </template>
 <script setup>
-import { ref, watch, defineEmits } from "vue";
+import {ref, watch} from "vue";
 import GwSelect from "@/components/GwSelect.vue";
 import card01 from '@/components/card01.vue';
-import { getInspBaseByPersid } from "@/api/inspect";
-import { jumpPage } from "@/utils/page";
-
-const emits = defineEmits(['onClick']);
+import {getInspBaseByPersid} from "@/api/inspect";
+import {jumpPage} from "@/utils/page";
 
 const inspectType = ref('008');
-const inspectTypes = [{ text: '稽查工作', value: '008' }];
+const inspectTypes = [{text: '稽查工作', value: '008'}];
 
 const baseBatch = ref(null);
 const baseBatchs = ref([]);
@@ -33,54 +33,54 @@ const list = ref([]);
 const loading = ref(false);
 
 function getInspBase(value, level = 1) {
-    if (!value) {
-        return;
+  if (!value) {
+    return;
+  }
+  // 获取批次
+  getInspBaseByPersid(value).then(res => {
+    if (level === 3) {
+      list.value = res.data;
+      loading.value = false;
+      return;
+    }
+    if (level === 2) {
+      twoBatchs.value = res.data.map(item => ({text: item.prsnTitle, value: item.plnaId}))
+      twoBatch.value = twoBatchs.value[0].value;
+      return;
     }
-    // 获取批次
-    getInspBaseByPersid(value).then(res => {
-        if (level === 3) {
-            list.value = res.data;
-            loading.value = false;
-            return;
-        }
-        if (level === 2) {
-            twoBatchs.value = res.data.map(item => ({ text: item.prsnTitle, value: item.plnaId }))
-            twoBatch.value = twoBatchs.value[0].value;
-            return;
-        }
-        baseBatchs.value = res.data.map(item => ({ text: item.prsnTitle, value: item.plnaId })).reverse();
-        baseBatch.value = baseBatchs.value[0].value;
-    });
+    baseBatchs.value = res.data.map(item => ({text: item.prsnTitle, value: item.plnaId})).reverse();
+    baseBatch.value = baseBatchs.value[0].value;
+  });
 }
 
 watch(() => inspectType, inspectType => {
-    if (inspectType.value) {
-        getInspBase(inspectType.value);
-    }
-}, { deep: true, immediate: true })
+  if (inspectType.value) {
+    getInspBase(inspectType.value);
+  }
+}, {deep: true, immediate: true})
 watch(() => baseBatch, baseBatch => {
-    if (baseBatch.value) {
-        getInspBase(baseBatch.value, 2);
-    }
-}, { deep: true, immediate: true })
+  if (baseBatch.value) {
+    getInspBase(baseBatch.value, 2);
+  }
+}, {deep: true, immediate: true})
 watch(() => twoBatch, twoBatch => {
-    if (twoBatch.value) {
-        getInspBase(twoBatch.value, 3)
-    }
-}, { deep: true, immediate: true })
+  if (twoBatch.value) {
+    getInspBase(twoBatch.value, 3)
+  }
+}, {deep: true, immediate: true})
 </script>
 <style lang="scss" scoped>
 @import '@/assets/styles/filter.scss';
 
 .content-wrapper {
-    padding-top: 8px;
-    height: 100%;
-    overflow: auto;
+  padding-top: 8px;
+  height: 100%;
+  overflow: auto;
 
-    .inspect-group-wrapper {
-        height: calc(100% - 35px);
-        overflow: auto;
-    }
+  .inspect-group-wrapper {
+    height: calc(100% - 35px);
+    overflow: auto;
+  }
 
 }
-</style>
+</style>

+ 0 - 5
src/views/Map/index.vue

@@ -4,14 +4,9 @@
   </div>
 </template>
 <script setup>
-
 import {onMounted} from "vue";
-import {getRStLLMaxDate} from "@/api/home";
 
 onMounted(() => {
-  getRStLLMaxDate().then(res => {
-    console.log(res)
-  })
 })
 </script>
 <style scoped>

+ 9 - 7
src/views/Problem/detail/TacObjPblmstbList.vue

@@ -1,11 +1,13 @@
 <template>
-  <van-search v-model="name" placeholder="请输入搜索关键词" @search="onSearch"/>
-  <div class="tac-obj-pblmstb-list-wrapper">
-    <van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
-      <card01 v-for="item in list" :key="item.id" :title="item.pblmsDesc + ''" icon="file"
-              :description="item.class1Name"
-              @click="handleClick(item)"/>
-    </van-list>
+  <div style="width: 100%;height: 100%;">
+    <van-search v-model="name" placeholder="请输入搜索关键词" @search="onSearch"/>
+    <div class="tac-obj-pblmstb-list-wrapper">
+      <van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
+        <card01 v-for="item in list" :key="item.id" :description="item.class1Name" :title="item.pblmsDesc + ''"
+                icon="file"
+                @click="handleClick(item)"/>
+      </van-list>
+    </div>
   </div>
 </template>
 <script setup>

+ 114 - 17
src/views/Problem/detail/index.vue

@@ -1,7 +1,8 @@
 <template>
   <div class="pblm-detail-wrapper">
     <van-form @submit="onSubmit">
-      <card01 :description="`工程地址:${pblm.location}<br/>问题类型:${listTypeConvert(pblm.listType)}`"
+      <card01 v-if="pblm && pblm.length > 0"
+              :description="`工程地址:${pblm.location}<br/>问题类型:${listTypeConvert(pblm.listType)}`"
               :title="pblm.name + ''" icon="label"
               style="margin-top: 0;"/>
       <div class="pblm-detail-label">
@@ -70,7 +71,6 @@
               <van-icon color="#000" name="delete-o" size="1rem"/>
             </van-col>
           </van-row>
-
         </div>
         <van-button block hairline plain round @click="addPblmSubject">
           <van-icon color="#000" name="plus" size="1rem" style="margin-right: 5px;"/>
@@ -85,8 +85,8 @@
     </van-form>
 
     <van-popup v-model:show="tacObjPblmstbShow" :style="{ width: '80%', height: '100%' }" position="left">
-      <tacObjPblmstbList :listType="pblm.listType" style="z-index:3000;" @change="changeTacObjPblmstb">
-      </tacObjPblmstbList>
+      <tacObjPblmstbList :listType="pblm.listType" style="z-index:3000;"
+                         @change="changeTacObjPblmstb"></tacObjPblmstbList>
     </van-popup>
   </div>
 </template>
@@ -99,16 +99,17 @@ import GwSelect02 from '@/components/GwSelect02.vue';
 import tacObjPblmstbList from './TacObjPblmstbList.vue';
 import {listTypeConvert} from "@/utils/convert";
 import {getTacQuestionById} from "@/api/inspect";
-import {addTacQuestion, getTacUnitList} from "@/api/questions";
+import {addTacQuestion, getIllegalActById, getTacUnitList} from "@/api/questions";
 import {copyObj} from "@/utils/ruoyi";
+import {useUserStore} from "@/stores/user";
 
 const route = useRoute();
+const userStore = useUserStore();
+const listType = ref(route.query.inspectType || '1');
 const pblm = ref({});
 const tacObjPblmstb = computed(() => pblm.value.tacObjPblmstb || {});
-const cateObjList = computed(() => tacObjPblmstb.value?.cateObjList?.map(i => {
-  return {text: i.desc, value: i.cate}
-}) || []);
-const objSubjectList = computed(() => pblm.value.tacObjPblmstb.objSubjectList || []);
+const cateObjList = ref([]);
+const objSubjectList = ref([]);
 const objSubjectTypeColumns = computed(() => objSubjectList.value?.map(i => {
   return {text: i.subName, value: i.id}
 }) || []);
@@ -119,14 +120,20 @@ const gwComFileList = computed(() => pblm.value.gwComFileList?.map(i => {
 /**
  * 责任主体
  */
-const subjectList = ref([])
-
+const subjectList = ref([]);
 const tacObjPblmstbShow = ref(false);
 
 function getQuestionData() {
   getTacQuestionById(route.params.id).then(res => {
-    pblm.value = res.data
-    subjectList.value = res.data.pblmSubjectList;
+    if (res.data && Object.keys(res.data).length > 0) {
+      pblm.value = res.data
+      listType.value = res.data.listType
+      subjectList.value = res.data.pblmSubjectList;
+      cateObjList.value = res.data.tacObjPblmstb.cateObjList.map(i => {
+        return {text: i.desc, value: i.cate}
+      }) || []
+      objSubjectList.value = pblm.value.tacObjPblmstb.objSubjectList
+    }
   })
 }
 
@@ -138,9 +145,44 @@ function showTacObjPblmstbPopup() {
 }
 
 function changeTacObjPblmstb(data) {
-  tacObjPblmstbShow.value = false;
-  pblm.value.tacObjPblmstb = data;
-  pblm.value.pblmstdId = data.id;
+  if (!data || !data.id) {
+    return
+  }
+  getIllegalActById(data.id).then(res => {
+    tacObjPblmstbShow.value = false;
+    pblm.value.tacObjPblmstb = res.data;
+    pblm.value.pblmstdId = res.data.id;
+    cateObjList.value = res.data.cateObjList.map(i => {
+      return {text: i.desc, value: i.cate}
+    }) || []
+    objSubjectList.value = res.data.objSubjectList
+  })
+}
+
+// eslint-disable-next-line no-unused-vars
+function uniArr(tempArr) {
+  var newTempArr = [];
+  if (tempArr && tempArr.length > 0) {
+    tempArr.forEach((item) => {
+      if (item.unitNm || item.subId) {
+        newTempArr.push(item);
+      }
+    })
+    for (let i = 0; i < newTempArr.length; i++) {
+      for (let j = i + 1; j < newTempArr.length; j++) {
+        if ((newTempArr[i].unitNm == newTempArr[j].unitNm) && (newTempArr[i].subId == newTempArr[j].subId)) {
+          newTempArr.splice(j, 1);
+          j--;
+        }
+
+      }
+
+    }
+
+    return newTempArr;
+  } else {
+    return [];
+  }
 }
 
 /**
@@ -148,8 +190,63 @@ function changeTacObjPblmstb(data) {
  */
 function onSubmit() {
   const data = copyObj(pblm.value)
+  if (!data.pblmstdId) {
+    showNotify({type: 'warning', message: '请选择问题'});
+    return
+  }
+  if (!data.sn) {
+    data.sn = 0
+  }
+  if (data.pblmReason && data.pblmReason.length >= 500) {
+    showNotify({type: 'warning', message: '主要原因分析需字数小于500字!'});
+    return;
+  }
+  if (data.pblmSggtn && data.pblmSggtn.length >= 1000) {
+    showNotify({type: 'warning', message: '整改意见及建议字数需小于1000字!'});
+    return;
+  }
+  if (data.spclRvwOptn && data.spclRvwOptn.length >= 500) {
+    showNotify({type: 'warning', message: '稽察组长意见字数需小于500字!'});
+    return;
+  }
+  if (data.pblmRevision && data.pblmRevision.length >= 500) {
+    showNotify({type: 'warning', message: '问题修改理由字数需小于500字!'});
+    return;
+  }
+  data.relativeLaw = data.tacObjPblmstb.relativeLaw
+  data.lawContent = data.tacObjPblmstb.lawContent
   data.pblmSubjectList = subjectList.value
-  addTacQuestion(data).then(() => {
+  if (!data.id) {
+    // data.stepId  = stepId
+    data.objId = route.query.objId;
+    data.rgstrId = route.query.rgstrId;
+    data.listType = listType.value;
+    data.persId = userStore.userId;
+  }
+
+  let unitNames = []
+  let subIds = []
+  const unitArray = uniArr(subjectList.value);
+  unitArray.forEach((ele) => {
+    unitNames.push(ele.unitNm)
+    subIds.push(ele.subId)
+  })
+  unitNames = unitNames.filter(function (s) {
+    return s && s.trim();
+  });
+  subIds = subIds.filter(function (s) {
+    return s && s.trim();
+  });
+  if ((unitNames.length != subIds.length) && unitNames.length != 0 && subIds.length != 0) {
+    showNotify({type: 'warning', message: '对应的单位性质或单位名称其中一个不能为空'});
+    return false;
+  }
+  data.subjectNames = unitNames.join(',')
+  data.subjectIds = subIds.join(',')
+
+
+  addTacQuestion(data).then(res => {
+    pblm.value.id = res.data.id
     showNotify({type: 'success', message: '保存成功'});
   })
 }

+ 6 - 7
src/views/Problem/listquestions.vue

@@ -10,12 +10,12 @@
 </template>
 <script setup>
 
-import { renderData } from "@/utils/template";
-import { jumpPage } from "@/utils/page";
-import { getTacQuestionList } from "@/api/questions";
-import { onMounted, ref } from "vue";
+import {renderData} from "@/utils/template";
+import {jumpPage} from "@/utils/page";
+import {getTacQuestionList} from "@/api/questions";
+import {onMounted, ref} from "vue";
 import card01 from '@/components/card01.vue';
-import { pblmPasiConvert } from "@/utils/convert";
+import {pblmPasiConvert} from "@/utils/convert";
 
 // 使用 ref 定义响应式变量 list 和 loading
 const list = ref([]);
@@ -29,7 +29,6 @@ function getData() {
     getTacQuestionList().then(res => {
         // 将接口返回的数据赋值给 list
         list.value = res.data.list;
-        console.log(list.value);
         // 设置 loading 为 false,表示数据加载完成
         loading.value = false;
     })
@@ -47,4 +46,4 @@ onMounted(() => {
     height: 100%;
     overflow: auto;
 }
-</style>
+</style>